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
supradefinirea metodei => nu modificam nimic in headerul metodei
@Override public double getBalanta() { return this.balanta; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void updateHeader() {\n\t}", "protected void addDynamicHeaders() {\n }", "@Override\r\n\tpublic void loadHeader() {\n\r\n\t}", "void setHeaderInfo(float rFree, float rWork, float resolution, String title, String depositionDate, \n\t\t\tString releaseDate, String[] experimnetalMethods);", "public interface ReplacesHeader extends Parameters, Header {\n /**\n *set the to tag of the Replaces header.\n *@param tag - the tag to set.\n *@throws NullPointerException if null tag is set.\n *@throws ParseException if invalid characters are in the tag.\n */\n public void setToTag(String tag) throws ParseException,NullPointerException;\n\n /**\n *Set the From tag of the Replaces header.\n *@param tag - the tag to set.\n *@throws NullPointerException if null tag is set.\n *@throws ParseException if invalid characters are in the tag.\n */\n public void setFromTag(String tag) throws ParseException,NullPointerException;\n\n /**\n *Get the previously set to tag or <it>Null</it> if no tag set.\n */\n public String getToTag();\n\n /**\n *Get the previously set From tag or <it>Null</it> if no tag set.\n */\n public String getFromTag();\n \n /**\n *Set the CallId of the Replaces header.\n *@param callId - the callId to set.\n *@throws NullPointerException if null tag is set.\n *@throws ParseException if invalid characters are in the tag.\n */\n public void setCallId(String callId) throws ParseException,NullPointerException;\n\n /**\n * get the previously set call Id or Null if nothing has been set.\n */\n public String getCallId();\n\n /**\n * The header NAME.\n */\n public final static String NAME = \"Replaces\";\n\n}", "abstract public void header();", "public interface PrivacyHeader extends Header\n{\n\n /**\n * Name of PrivacyHeader\n */\n public final static String NAME = \"Privacy\";\n\n\n /**\n * Set Privacy header value\n * @param privacy -- privacy type to set.\n */\n public void setPrivacy(String privacy) throws ParseException;\n\n /**\n * Get Privacy header value\n * @return privacy token name\n */\n public String getPrivacy();\n\n\n}", "@Override\n public void setHeader(String arg0, String arg1) {\n\n }", "private static MessageHeader createMetaHeader(byte[] meta) {\n\t\tObject[] iov;\n\t\tif(meta != null) {\n\t\t\tiov = new Object[2];\n\t\t\tiov[0] = meta;\n\t\t\tiov[1] = JALP_BREAK_STR;\n\t\t} else {\n\t\t\tiov = new Object[1];\n\t\t\tiov[0] = JALP_BREAK_STR;\n\t\t}\n\n\t\tMessageHeader mh = new MessageHeader();\n\t\tmh.setIov(iov);\n\n\t\treturn mh;\n\t}", "private void writeHEADER() throws IOException {\n\t\tmeta.compute_checksum();\n\t\tmeta.write();\n\t\t\n\t\t// We could also generate a non-aldus metafile :\n\t\t// writeClipboardHeader(meta);\n\t\t\n\t\t// Generate the standard header common to all metafiles.\n\t\thead.write();\n\t}", "public abstract String header();", "@Override\n public void setHeaderIndices() {\n }", "private void initializeKnownHeaders() {\r\n needParceHeader = true;\r\n \r\n addMainHeader(\"city\", getPossibleHeaders(DataLoadPreferences.NH_CITY));\r\n addMainHeader(\"msc\", getPossibleHeaders(DataLoadPreferences.NH_MSC));\r\n addMainHeader(\"bsc\", getPossibleHeaders(DataLoadPreferences.NH_BSC));\r\n addMainIdentityHeader(\"site\", getPossibleHeaders(DataLoadPreferences.NH_SITE));\r\n addMainIdentityHeader(\"sector\", getPossibleHeaders(DataLoadPreferences.NH_SECTOR));\r\n addMainHeader(INeoConstants.PROPERTY_SECTOR_CI, getPossibleHeaders(DataLoadPreferences.NH_SECTOR_CI));\r\n addMainHeader(INeoConstants.PROPERTY_SECTOR_LAC, getPossibleHeaders(DataLoadPreferences.NH_SECTOR_LAC));\r\n addMainHeader(INeoConstants.PROPERTY_LAT_NAME, getPossibleHeaders(DataLoadPreferences.NH_LATITUDE));\r\n addMainHeader(INeoConstants.PROPERTY_LON_NAME, getPossibleHeaders(DataLoadPreferences.NH_LONGITUDE));\r\n // Stop statistics collection for properties we will not save to the sector\r\n addNonDataHeaders(1, mainHeaders);\r\n \r\n // force String types on some risky headers (sometimes these look like integers)\r\n useMapper(1, \"site\", new StringMapper());\r\n useMapper(1, \"sector\", new StringMapper());\r\n \r\n // Known headers that are sector data properties\r\n addKnownHeader(1, \"beamwidth\", getPossibleHeaders(DataLoadPreferences.NH_BEAMWIDTH), false);\r\n addKnownHeader(1, \"azimuth\", getPossibleHeaders(DataLoadPreferences.NH_AZIMUTH), false);\r\n }", "private void manageHeaderView() {\n PickupBoyDashboard.getInstance().manageHeaderVisibitlity(false);\n HeaderViewManager.getInstance().InitializeHeaderView(null, view, manageHeaderClick());\n HeaderViewManager.getInstance().setHeading(true, mActivity.getResources().getString(R.string.bokings));\n HeaderViewManager.getInstance().setLeftSideHeaderView(true, R.drawable.left_arrow);\n HeaderViewManager.getInstance().setRightSideHeaderView(false, R.drawable.left_arrow);\n HeaderViewManager.getInstance().setLogoView(false);\n HeaderViewManager.getInstance().setProgressLoader(false, false);\n\n }", "public void changeHeaderFile(){\n if ( changedAttr.isEmpty() ) return;\n else {\n Set<Object> tmpAttr = changedAttr.keySet();\n Object[] attributes = tmpAttr.toArray(new Object[tmpAttr.size()]);\n for (int i = 0; i < attributes.length; i++){\n if ( headerFile.containsKey(attributes[i]) ) {\n headerFile.put(attributes[i], changedAttr.get(attributes[i]));\n // DeidData.imageHandler.findImageByDisplayName(curimage.getImageDisplayName())\n // .getHeader().put(attributes[i], changedAttr.get(attributes[i]));\n curimage.getHeader().put(attributes[i], changedAttr.get(attributes[i]));\n //System.out.println(curimage.getHeader().get(attributes[i]));\n }\n }\n curimage.changeHeader();\n \n }\n }", "protected void setMetdata(HashMap<PageMetadataEnum,String> m ){\r\n\t\tthis.metadata = m; \r\n\t}", "void prepareMetaTag()\r\n\t{\r\n\t\tstr = replaceStringIgnoreCase(str, \"charset=iso-8859-1\", \"\");\r\n\t\tstr = replaceStringIgnoreCase(str, \"charset=windows-1252\", \"\");\r\n\t\tstr = replaceStringIgnoreCase(str, \"charset=windows-1258\", \"\");\r\n\t\tstr = replaceStringIgnoreCase(str, \"charset=us-ascii\", \"\");\r\n\t\tstr = replaceStringIgnoreCase(str, \"charset=x-user-defined\", \"\");\r\n\t\tstr = replaceStringIgnoreCase(str,\r\n\t\t\t\t\"<meta http-equiv=Content-Type content=\\\"text/html; \\\">\", \"\");\r\n\t\tstr = replaceStringIgnoreCase(str,\r\n\t\t\t\t\"<meta http-equiv=Content-Type content=\\\"text/html;\\\">\", \"\");\r\n\t\tstr = replaceStringIgnoreCase(str,\r\n\t\t\t\t\"<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; \\\">\",\r\n\t\t\t\t\"\");\r\n\t\tstr = replaceStringIgnoreCase(str,\r\n\t\t\t\t\"<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html;\\\">\", \"\");\r\n\t\tstr = replaceStringIgnoreCase(str, \"<head>\",\r\n\t\t\t\t\"<head><meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=UTF-8\\\">\");\r\n\t}", "private void setBlockMeta() {\n\t\tint meta = getBlockMetadata();\n\t\tForgeDirection dir = ForgeDirection.getOrientation(meta);\n\t\tif(dir != direction) {\n\t\t\tworldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, direction.ordinal(), 3);\n\t\t\tmarkDirty();\n\t\t}\n\t}", "public void setContentType(Header contentType) {\n/* 114 */ this.contentType = contentType;\n/* */ }", "public void setMetadata(PDMetadata meta) {\n/* 557 */ this.stream.setItem(COSName.METADATA, meta);\n/* */ }", "public void handleMeta () {\n\tstatus = \"Handling meta page\";\n\tMetaHandlerHandler mhh = new MetaHandlerHandler ();\n\ttry {\n\t mhh.handleMeta (this, request, tlh.getProxy (), tlh.getClient ());\n\t} catch (IOException ex) {\n\t logAndClose (null);\n\t}\n }", "@Override\n protected void writeStreamHeader() throws IOException {\n // metodo honek ez du ezer egiten\n }", "@Override\r\n \tpublic MetaData getMetaData(HttpHeaders headers) {\n \t\ttry {\r\n \t\t\treturn MetaDataUtil.getMetaData(new ViewListeEleve(), new HashMap<String, MetaData>(),new ArrayList<String>());\r\n \t\t} catch (Exception e) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\tthrow new WebApplicationException(Response.serverError().entity(new String(\"MetaData parse error\")).build());\r\n \t\t} \r\n \t}", "public void setMeta (boolean meta) {\n\tthis.meta = meta;\n }", "int getMeta();", "public void setHeader(boolean isHeader) {\n this.isHeader = isHeader;\n }", "public void setPageHeader(String header)\n {\n // ignore\n }", "public void setHeader(ResChunkHeader header) {\n this.header = header;\n }", "public abstract void setMimeHeader(String name, String value);", "protected void initializeHeader() throws PiaRuntimeException, IOException{\n try{\n super.initializeHeader();\n if( firstLineOk && headersObj == null ){\n\t// someone just give us the first line\n\theadersObj = new Headers();\n }\n }catch(PiaRuntimeException e){\n throw e;\n }catch(IOException ioe){\n throw ioe;\n }\n }", "protected void setHeaderInfo(String header)\n throws AbnormalTerminationException {\n // strip comment and unnecessary spaces\n String actualLine = StringUtils.trimSpaces(Comment.stripComment(header));\n // split off the name\n int nameEnd = 0;\n\n while (nameEnd < actualLine.length() && ! StringUtils.isSpace(actualLine.charAt(nameEnd))) {\n nameEnd += 1;\n }\n\n String name = actualLine.substring(0, nameEnd);\n String params = actualLine.substring(nameEnd);\n\n if (! Name.isName(name)) {\n throw new AbnormalTerminationException(\"Ongeldige macronaam: \" + name);\n }\n\n this.setName(name);\n // parse the formal parameters\n StringTokenizer tokenizer = new StringTokenizer(params, \",\");\n List formalParams = new ArrayList();\n\n while (tokenizer.hasMoreTokens()) {\n String param = StringUtils.trimSpaces(tokenizer.nextToken());\n\n if (! Name.isName(param)) {\n throw new AbnormalTerminationException(\"Geen aanvaardbare naam voor een \"\n + \"formele parameter: \" + param);\n }\n\n formalParams.add(param);\n }\n\n this.setFormalParameters(formalParams);\n }", "@Override\r\n\tpublic XContentBuilder addMeta(XContentBuilder xcb, T river) throws IOException {\r\n\t\t// We add specific metadata here\r\n\t\txcb = addFSMeta(xcb, river);\r\n\t\t\r\n\t\txcb\t\r\n\t\t\t.field(\"url\", river.getUrl())\r\n\t\t\t.field(\"update_rate\", river.getUpdateRate() * 1000)\r\n\t\t\t.field(\"includes\", river.getIncludes())\r\n\t\t\t.field(\"excludes\", river.getExcludes())\r\n\t\t\t.field(\"analyzer\", river.getAnalyzer());\r\n\r\n\t\treturn xcb;\r\n\t}", "protected void populateObjectMetadata(CosHttpResponse response, ObjectMetadata metadata) {\n for (Entry<String, String> header : response.getHeaders().entrySet()) {\n String key = header.getKey();\n if (StringUtils.beginsWithIgnoreCase(key, Headers.COS_USER_METADATA_PREFIX)) {\n key = key.substring(Headers.COS_USER_METADATA_PREFIX.length());\n metadata.addUserMetadata(key, header.getValue());\n } else if (ignoredHeaders.contains(key)) {\n // ignore...\n } else if (key.equalsIgnoreCase(Headers.LAST_MODIFIED)) {\n try {\n metadata.setHeader(key, DateUtils.parseRFC822Date(header.getValue()));\n } catch (Exception pe) {\n log.warn(\"Unable to parse last modified date: \" + header.getValue(), pe);\n }\n } else if (key.equalsIgnoreCase(Headers.CONTENT_LENGTH)) {\n try {\n metadata.setHeader(key, Long.parseLong(header.getValue()));\n } catch (NumberFormatException nfe) {\n log.warn(\"Unable to parse content length: \" + header.getValue(), nfe);\n }\n } else if (key.equalsIgnoreCase(Headers.DELETE_MARKER)) {\n metadata.setDeleteMarker(Boolean.parseBoolean(header.getValue()));\n } else if (key.equalsIgnoreCase(Headers.ETAG)) {\n metadata.setETag(StringUtils.removeQuotes(header.getValue()));\n } else if (key.equalsIgnoreCase(Headers.EXPIRES)) {\n try {\n metadata.setHttpExpiresDate(DateUtils.parseRFC822Date(header.getValue()));\n } catch (Exception pe) {\n log.warn(\"Unable to parse http expiration date: \" + header.getValue(), pe);\n }\n } else if (key.equalsIgnoreCase(Headers.EXPIRATION)) {\n new ObjectExpirationHeaderHandler<ObjectMetadata>().handle(metadata, response);\n } else if (key.equalsIgnoreCase(Headers.RESTORE)) {\n new ObjectRestoreHeaderHandler<ObjectRestoreResult>().handle(metadata, response);\n } else if (key.equalsIgnoreCase(Headers.FILE_MODE_DIR)) { // used for merge bucket\n metadata.setFileModeDir(true);\n } else {\n metadata.setHeader(key, header.getValue());\n }\n }\n }", "public void setHeader(String header) {\n this.header = header;\n }", "public void setHeader(JMSControl.HeaderType type,Object value);", "@Override\r\n public String[] headers() {\n return new String[]{\"فاکتور\", \"تاریخ\", \"شناسه مخاطب\", \"نام مخاطب\", \"نوع\", \"شناسه کالا\", \"شرح کالا\", \"مقدار کل\", \"واحد\", \"فی\", \"مقدار جزء\", \"مبلغ کل\", \"مانده\"};\r\n }", "private HttpHeaders getHttpHeader(String authToken, boolean setContentType, Optional<Map> headerInformation, boolean setFormData) {\n HttpHeaders headers = new HttpHeaders();\n headers.set(\"Authorization\",authToken);\n\n if(null != headerInformation && headerInformation.isPresent()){\n Map headerInformationToSet = headerInformation.get();\n headerInformationToSet.forEach((k, v) -> {\n headers.set(k.toString(), v.toString());\n });\n }\n\n if(setFormData){\n headers.setContentType(MediaType.MULTIPART_FORM_DATA);\n }\n\n if(setContentType) {\n headers.setContentType(MediaType.APPLICATION_JSON);\n headers.add(\"Accept\", MediaType.APPLICATION_JSON_VALUE);\n }\n return headers;\n }", "private void setHeader(ObaResponse routeInfo, boolean addToDb) { \n mRouteInfo = routeInfo;\n \n TextView empty = (TextView)findViewById(android.R.id.empty);\n \n if (routeInfo.getCode() == ObaApi.OBA_OK) {\n ObaRoute route = routeInfo.getData().getAsRoute();\n TextView shortNameText = (TextView)findViewById(R.id.short_name);\n TextView longNameText = (TextView)findViewById(R.id.long_name);\n TextView agencyText = (TextView)findViewById(R.id.agency);\n \n String shortName = route.getShortName();\n String longName = route.getLongNameOrDescription();\n \n shortNameText.setText(shortName);\n longNameText.setText(longName);\n agencyText.setText(route.getAgencyName());\n \n if (addToDb) {\n RoutesDbAdapter.addRoute(this, route.getId(), shortName, longName, true); \n }\n }\n else {\n empty.setText(R.string.generic_comm_error);\n }\n }", "public boolean modifyHeaderContent(Header header);", "protected void writeHeader() throws IOException {\n _baos = new ByteArrayOutputStream();\n _dos = new DataOutputStream(_baos);\n _dos.write(PushCacheProtocol.instance().header(), 0, PushCacheProtocol.instance().header().length);\n }", "@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\", \"application/json\"); // header format wysłanej wiadomości - JSON\n params.put(\"Accept\", \"application/json\"); // header format otrzymanej wiadomości -JSON\n params.put(\"Consumer\", C.HEDDER_CUSTOMER); // header Consumer\n params.put(\"Authorization\", C.HEDDER_BEARER + shar.getString(C.KEY_FOR_SHAR_TOKEN, \"\")); // header Authorization\n return params;\n }", "@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\", \"application/json\"); // header format wysłanej wiadomości - JSON\n params.put(\"Accept\", \"application/json\"); // header format otrzymanej wiadomości -JSON\n params.put(\"Consumer\", C.HEDDER_CUSTOMER); // header Consumer\n params.put(\"Authorization\", C.HEDDER_BEARER + shar.getString(C.KEY_FOR_SHAR_TOKEN, \"\")); // header Authorization\n return params;\n }", "public void setHeader() {\n tvHeader.setText(getResources().getString(R.string.text_skill));\n tvDots.setVisibility(View.INVISIBLE);\n }", "private void initHeader(boolean newHeader) throws IOException {\n\n if (newHeader) writeHeader();\n /*\n if (rafShp.read() == -1) { \n //File is empty, write a new one (what else???)\n writeHeader();\n } \n */ \n readHeader();\n }", "public void setMeta(org.thdl.lex.component.Meta meta);", "Header createHeader();", "private static void setHeaderFields (String senderOID, String receiverOID) {\n result.setITSVersion(HL7Constants.ITS_VERSION);\n result.setId(HL7MessageIdGenerator.GenerateHL7MessageId(localDeviceId));\n result.setCreationTime(HL7DataTransformHelper.CreationTimeFactory());\n result.setInteractionId(HL7DataTransformHelper.IIFactory(HL7Constants.INTERACTION_ID_ROOT, \"PRPA_IN201302UV\"));\n result.setProcessingCode(HL7DataTransformHelper.CSFactory(\"T\"));\n result.setProcessingModeCode(HL7DataTransformHelper.CSFactory(\"T\"));\n result.setAcceptAckCode(HL7DataTransformHelper.CSFactory(\"AL\"));\n \n // Create the Sender\n result.setSender(HL7SenderTransforms.createMCCIMT000100UV01Sender(senderOID));\n\n // Create the Receiver\n result.getReceiver().add(HL7ReceiverTransforms.createMCCIMT000100UV01Receiver(receiverOID));\n }", "public interface HeaderData extends StickyMainData {\n @LayoutRes\n int getHeaderLayout();\n\n int getHeaderType();\n}", "void setHeaderAccessibility(String firstName, String am, String shot);", "@Override\n\t\tpublic String getHeader(String name) {\n\t\t\treturn null;\n\t\t}", "@Override\n\tpublic String getCustomHtmlHeaders()\n\t{\n\t\treturn null;\n\t}", "public CombineDetailHeaderView(Context context, AttributeSet attributeSet) {\n super(context, attributeSet);\n C32569u.m150519b(context, C6969H.m41409d(\"G6A8CDB0EBA28BF\"));\n Context context2 = getContext();\n C32569u.m150513a((Object) context2, \"context\");\n this.f54231a = new SKUDetailHeaderView(context2, null, 0, 6, null);\n Context context3 = getContext();\n C32569u.m150513a((Object) context3, \"context\");\n this.f54231a = new SKUDetailHeaderView(context3, null, 0, 6, null);\n addView(this.f54231a, new FrameLayout.LayoutParams(-1, -2));\n SKUDetailHeaderView sKUDetailHeaderView = this.f54231a;\n Context context4 = getContext();\n C32569u.m150513a((Object) context4, C6969H.m41409d(\"G6A8CDB0EBA28BF\"));\n sKUDetailHeaderView.mo77113a(CombineSubscribe.class, new CombineSKUHeaderModelProvider(context4));\n this.f54231a.mo77115b().subscribe(new AbstractC31735g<AbstractC14697h>(this) {\n /* class com.zhihu.android.app.subscribe.p1298ui.view.CombineDetailHeaderView.C154461 */\n\n /* renamed from: a */\n final /* synthetic */ CombineDetailHeaderView f54233a;\n\n {\n this.f54233a = r1;\n }\n\n /* renamed from: a */\n public final void accept(AbstractC14697h hVar) {\n CombineDetailPresenter aVar;\n if (hVar instanceof C14693d) {\n CombineDetailPresenter aVar2 = this.f54233a.f54232b;\n if (aVar2 != null) {\n aVar2.mo77862b(((C14693d) hVar).mo77065a());\n }\n } else if (hVar instanceof C14692c) {\n CombineDetailPresenter aVar3 = this.f54233a.f54232b;\n if (aVar3 != null) {\n aVar3.mo77864i();\n }\n } else if ((hVar instanceof C14696g) && (aVar = this.f54233a.f54232b) != null) {\n aVar.mo77863h();\n }\n }\n });\n }", "private void readHeader(){ \n Set<Object> tmpAttr = headerFile.keySet();\n Object[] attributes = tmpAttr.toArray(new Object[tmpAttr.size()]);\n \n Object[][] dataArray = new Object[attributes.length][2];\n for (int ndx = 0; ndx < attributes.length; ndx++) {\n dataArray[ndx][0] = attributes[ndx];\n dataArray[ndx][1] = headerFile.get(attributes[ndx]);\n if (attributes[ndx].toString().equals(\"Description\"))\n Description = headerFile.get(attributes[ndx]);\n }\n data = dataArray;\n }", "public Header(String t) {\n this.title=t;\n }", "public CombineDetailHeaderView(Context context, AttributeSet attributeSet, int i) {\n super(context, attributeSet, i);\n C32569u.m150519b(context, C6969H.m41409d(\"G6A8CDB0EBA28BF\"));\n Context context2 = getContext();\n C32569u.m150513a((Object) context2, C6969H.m41409d(\"G6A8CDB0EBA28BF\"));\n this.f54231a = new SKUDetailHeaderView(context2, null, 0, 6, null);\n Context context3 = getContext();\n C32569u.m150513a((Object) context3, C6969H.m41409d(\"G6A8CDB0EBA28BF\"));\n this.f54231a = new SKUDetailHeaderView(context3, null, 0, 6, null);\n addView(this.f54231a, new FrameLayout.LayoutParams(-1, -2));\n SKUDetailHeaderView sKUDetailHeaderView = this.f54231a;\n Context context4 = getContext();\n C32569u.m150513a((Object) context4, C6969H.m41409d(\"G6A8CDB0EBA28BF\"));\n sKUDetailHeaderView.mo77113a(CombineSubscribe.class, new CombineSKUHeaderModelProvider(context4));\n this.f54231a.mo77115b().subscribe(new AbstractC31735g<AbstractC14697h>(this) {\n /* class com.zhihu.android.app.subscribe.p1298ui.view.CombineDetailHeaderView.C154461 */\n\n /* renamed from: a */\n final /* synthetic */ CombineDetailHeaderView f54233a;\n\n {\n this.f54233a = r1;\n }\n\n /* renamed from: a */\n public final void accept(AbstractC14697h hVar) {\n CombineDetailPresenter aVar;\n if (hVar instanceof C14693d) {\n CombineDetailPresenter aVar2 = this.f54233a.f54232b;\n if (aVar2 != null) {\n aVar2.mo77862b(((C14693d) hVar).mo77065a());\n }\n } else if (hVar instanceof C14692c) {\n CombineDetailPresenter aVar3 = this.f54233a.f54232b;\n if (aVar3 != null) {\n aVar3.mo77864i();\n }\n } else if ((hVar instanceof C14696g) && (aVar = this.f54233a.f54232b) != null) {\n aVar.mo77863h();\n }\n }\n });\n }", "default boolean visitHeader() {\n\t\treturn true;\n\t}", "private void validatedHeader() {\n\t\tif(loginView != null){\n\t\t\tLabel greeting = new Label(T.get(\"LABEL_TOP_BAR_GREETING\") + T.get(\"LABEL_GUEST_USER\"));\n\t\t\tLanguageSelector languageSelector = new LanguageSelector(loginView);\n\t\t\tThemeSelector themeSelector = new ThemeSelector();\n\t\t\tbuildHeader(greeting ,null, languageSelector, themeSelector);\n\t\t}\n\t\telse if(registerView != null){\n\t\t\tLabel greeting = new Label(T.get(\"LABEL_TOP_BAR_GREETING\") + T.get(\"LABEL_GUEST_USER\"));\n\t\t\tLanguageSelector languageSelector = new LanguageSelector(registerView);\n\t\t\tThemeSelector themeSelector = new ThemeSelector();\n\t\t\tbuildHeader(greeting ,null, languageSelector, themeSelector);\n\t\t}\n\t\telse if(mainView != null){\n\t\t\tString username = UI.getCurrent().getSession().getAttribute(T.system(\"SESSION_NAME\")).toString();\n\t\t\tLabel greeting = new Label(T.get(\"LABEL_TOP_BAR_GREETING\") + username);\n\t\t\tLanguageSelector languageSelector = new LanguageSelector(mainView);\n\t\t\tThemeSelector themeSelector = new ThemeSelector();\n\t\t\tLogoutButton logout = new LogoutButton();\n\t\t\tbuildHeader(greeting ,logout, languageSelector, themeSelector);\n\t\t}\n\t\tsetStyleName(T.system(\"STYLE_VIEW_TOP_BAR\"));\n\t}", "private Map<String, String> getDefaultAdditionalHeader() {\n Map<String, String> additionalHeader = new HashMap<>();\n additionalHeader.put(\"accept-encoding \", \"gzip, deflate, sdch\");\n additionalHeader.put(\"Referer\", referer);\n additionalHeader.put(\"Upgrade-Insecure-Requests\", \"1\");\n return additionalHeader;\n }", "public interface Header {\n\n short getId();\n\n String getPhone();\n\n short getNo();\n\n short getLength();\n\n EncryptType getEncryptType();\n}", "public void setHeader(String header) {\n\t\tthis.header = header;\n\t\tthis.handleConfig(\"header\", header);\n\t}", "public void setHeader(String header) {\n\t\tthis.header = header;\n\t}", "private StringBuilder headerSetup(Meal meal) {\n StringBuilder mealHeader = new StringBuilder();\n\n mealHeader.append(meal.getDesc());\n mealHeader.append(\":\\n\");\n\n return mealHeader;\n }", "default boolean hasHeader() {\n return true;\n }", "@Override\n public void addHeader(String arg0, String arg1) {\n\n }", "private static void addMetaData(Document document) {\n document.addTitle(\"Report\");\n //document.addSubject(\"Using iText\");\n //document.addKeywords(\"Java, PDF, iText\");\n document.addAuthor(\"Illya Barziy\");\n //document.addCreator(\"Lars Vogel\");\n }", "@attribute(value = \"\", required = false, defaultValue = \"default value is false\")\r\n\tpublic void setHeader(Boolean isHeader) {\r\n\t\tthis.header = isHeader;\r\n\t}", "public void setMetadata(PDMetadata meta)\n {\n stream.setItem(COSName.METADATA, meta);\n }", "public interface CommandCustomHeader {\n\n}", "public void setFromTag(String tag){\n try{\n fromHeader.setTag(tag);\n }\n catch(ParseException e) {}\n }", "private HashMap<String, String> getHeaders() {\n mHeaders = new HashMap<>();\n // set user'token if user token is not set\n if ((this.mToken == null || this.mToken.isEmpty()) && mProfile != null)\n this.mToken = mProfile.getToken();\n\n if (this.mToken != null && !this.mToken.isEmpty()) {\n mHeaders.put(\"Authorization\", \"Token \" + this.mToken);\n Log.e(\"TOKEN\", mToken);\n }\n\n mHeaders.put(\"Content-Type\", \"application/form-data\");\n mHeaders.put(\"Accept\", \"application/json\");\n return mHeaders;\n }", "public void setHeaders(Map headers);", "private HeaderUtil() {}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public void setMetaKey(String metaKey) {\n this.metaKey = metaKey;\n }", "@Override\n protected com.squareup.okhttp.Request.Builder universal_header(com.squareup.okhttp.Request.Builder chain) {\n chain.addHeader(\"Accept\", \"*/*\");\n chain.addHeader(\"Accept-Language\", \"zh-TW,zh;q=0.8,en-US;q=0.6,en;q=0.4,zh-CN;q=0.2\");\n chain.addHeader(\"Content-Type\", \"text/html; charset=utf-8\");\n chain.addHeader(\"User-Agent\", \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36\");\n return super.universal_header(chain);\n }", "public abstract void addMimeHeader(String name, String value);", "protected void addMetadataFieldsFromParameters() {\n for (Map.Entry<String, String> e: parameters.entrySet()) {\n if (e.getKey().startsWith(\"meta-\")) {\n String fieldName = e.getKey().substring(5);\n String fieldValue = e.getValue();\n currentDoc.addTextualMetadataField(fieldName, fieldValue, getDocWriter().metadataFieldType(false));\n }\n }\n }", "public void visit(Header n){\r\n\t\tif(tempNode.notifyNode().equals(\"Header\")){\r\n\t\t\ttempNode = nodeList.get(sequence);\r\n\t\t\tArrayList<Token> tokenList = tempNode.getTokenList();\r\n\t\t\tString tmp =\"\";\r\n\t\t\tfor(int i=0;i<tempNode.getTokenListSize();i++){\r\n\t\t\t\tvisit(tokenList.get(i));\r\n\t\t\t}\r\n\r\n\t\t\tif(tokenList.size()<1)\r\n\t\t\ttmp = \"<h\"+tempNode.htype+\">\"+\"</h\"+tempNode.htype+\">\";\r\n\t\t\telse\r\n\t\t\ttmp = \"<h\"+tempNode.htype+\">\"+line+\"</h\"+tempNode.htype+\">\";\r\n\t\t\tline = tmp;\r\n\t\t}\r\n\t }", "void setHeader(java.lang.String header);", "@Override\n\tprotected String getHeaderTitle() {\n\t\treturn \"\";\n\t}", "private Thing headers(String methodName, Thing[] args, Evaller evaller,\n\t\t\tFramelike frame, Syntax src) throws FisherException {\n\t\tcheckNumberOfArgs(0, 1, methodName, args, evaller, frame, src);\n\t\tif(args.length == 0)\n\t\t\treturn http.getHeaders();\n\t\telse{\n\t\t\t// FIXME: how much checking of args?\n\t\t\tcheckArg(args[0], RecordTh.class, null);\n\t\t\treturn http.setHeaders((RecordTh)args[0]);\n\t\t\t}\n\t}", "public void setHeader(String header) {\n\t\t_header = header;\n\t}", "public void setContentEncoding(Header contentEncoding) {\n/* 143 */ this.contentEncoding = contentEncoding;\n/* */ }", "private static StyleBuilder getHeaderStyle(ExportData metaData){\n \n /*pour la police des entàtes de HARVESTING*/\n if(metaData.getTitle().equals(ITitle.HARVESTING)){\n return stl.style().setBorder(stl.pen1Point().setLineColor(Color.BLACK))\n .setPadding(5)\n .setHorizontalAlignment(HorizontalAlignment.CENTER)\n .setVerticalAlignment(VerticalAlignment.MIDDLE)\n .setForegroundColor(Color.WHITE)\n .setFontSize(7)\n .setBackgroundColor(new Color(60, 91, 31))\n .bold(); \n\n }/*pour la police des entetes de SERVICING*/\n if(metaData.getTitle().equals(ITitle.SERVICING)){\n return stl.style().setBorder(stl.pen1Point().setLineColor(Color.BLACK))\n .setPadding(5)\n .setHorizontalAlignment(HorizontalAlignment.CENTER)\n .setVerticalAlignment(VerticalAlignment.MIDDLE)\n .setForegroundColor(Color.WHITE)\n .setFontSize(7)\n .setBackgroundColor(new Color(60, 91, 31))\n .bold(); \n\n }/*pour la police des entetes de FERTILIZATION*/\n if(metaData.getTitle().equals(ITitle.FERTILIZATION)){\n return stl.style().setBorder(stl.pen1Point().setLineColor(Color.BLACK))\n .setPadding(5)\n .setHorizontalAlignment(HorizontalAlignment.CENTER)\n .setVerticalAlignment(VerticalAlignment.MIDDLE)\n .setForegroundColor(Color.WHITE)\n .setFontSize(7)\n .setBackgroundColor(new Color(60, 91, 31))\n .bold(); \n\n }/*pour la police des entetes de CONTROL_PHYTO*/\n if(metaData.getTitle().equals(ITitle.CONTROL_PHYTO)){\n return stl.style().setBorder(stl.pen1Point().setLineColor(Color.BLACK))\n .setPadding(5)\n .setHorizontalAlignment(HorizontalAlignment.CENTER)\n .setVerticalAlignment(VerticalAlignment.MIDDLE)\n .setForegroundColor(Color.WHITE)\n .setFontSize(7)\n .setBackgroundColor(new Color(60, 91, 31))\n .bold(); \n\n }else{\n return stl.style().setBorder(stl.pen1Point().setLineColor(Color.BLACK))\n .setPadding(5)\n .setHorizontalAlignment(HorizontalAlignment.CENTER)\n .setVerticalAlignment(VerticalAlignment.MIDDLE)\n .setForegroundColor(Color.WHITE)\n .setBackgroundColor(new Color(60, 91, 31))\n .bold(); \n }\n \n }", "public void grabarMetaDato (Campo cm) throws IOException\r\n {\r\n cm.fWrite(maestro); \r\n }", "@Override\n\tpublic int getMeta() {\n\t\t\n\t\treturn meta;\n\t}", "@Override\n\tpublic Map<String, String> getHeader() {\n\t\treturn this.header;\n\t}", "public void grabarMetaDato (Vector c) throws IOException\r\n {\r\n // se supone que el archivo está recién creado y abierto\r\n \r\n // grabamos la cantidad de campos al inicio del archivo\r\n maestro.writeInt(c.size());\r\n \r\n // ahora grabamos los metadatos propiamente dichos\r\n for(int i = 0; i<c.size(); i++)\r\n {\r\n grabarMetaDato((Campo)c.get(i));\r\n }\r\n \r\n iniDatos = maestro.getFilePointer();\r\n }", "private void initHeader() {\r\n\r\n Typeface friendNameTypeface = UIUtils.getFontTypeface(this,\r\n UIUtils.Fonts.ROBOTO_CONDENSED);\r\n contactNameTextView.setTypeface(friendNameTypeface);\r\n contactNameTextView.setText(friendFeed.getContact().toString());\r\n\r\n Typeface lastMessageSentDateTypeface = UIUtils.getFontTypeface(\r\n this, UIUtils.Fonts.ROBOTO_LIGHT);\r\n lastMessageSentDateTextView.setTypeface(lastMessageSentDateTypeface);\r\n lastMessageSentDateTextView.setText(StringUtils\r\n .normalizeDifferenceDate(friendFeed.getLastMessageTime()));\r\n\r\n typingStatusTextView.setTypeface(lastMessageSentDateTypeface);\r\n\r\n ImageLoaderManager imageLoaderManager = new ImageLoaderManager(getApplicationContext());\r\n imageLoaderManager.loadContactAvatarImage(contactImageView, friendFeed.getContact(), false);\r\n }", "void setStockHeader(stockFilePT102.StockHeaderDocument.StockHeader stockHeader);", "@Override\n public void setHeading(String heading) {\n }", "@Override\n public void setIntHeader(String arg0, int arg1) {\n\n }", "void setPageHeader(PageHeader pageHeader);", "void setPageHeader(PageHeader pageHeader);", "@Override\n\tpublic void setupHeaderKeyFields(EquationStandardTransaction transaction)\n\t{\n\n\t}", "@Override\n public Map<String, String> getHeaders() {\n HashMap<String, String> headers = new HashMap<>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n return headers;\n }", "@Override\n public Map<String, String> getHeaders() {\n HashMap<String, String> headers = new HashMap<>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n return headers;\n }", "@Override\n public Map<String, String> getHeaders() {\n HashMap<String, String> headers = new HashMap<>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n return headers;\n }", "private void serverHeader(\n HttpHeaderFW header)\n {\n serverHeader |= header.name().value().equals(context.nameBuffer(54));\n }", "@Override\n\tpublic void addHeader(String name, String value) {\n\t}", "@SuppressWarnings(\"rawtypes\")\n private void setHeaders(BaseRequest request, Builder builder, HashMap<String, String> headerInformation) {\n try {\n Set set = headerInformation.entrySet();\n Iterator iter = set.iterator();\n\n while (iter.hasNext()) {\n Map.Entry mapEntry = (Map.Entry) iter.next();\n builder.addHeader((String) mapEntry.getKey(), (String) mapEntry.getValue());\n }\n } catch (Exception ex) {\n LOG.warn(request.getLogUtil().getLogMessage(\"Unable to set header: \" + ex.getMessage(), LogEventType.System));\n }\n }" ]
[ "0.63726825", "0.6317379", "0.6008002", "0.5991521", "0.59597665", "0.59587497", "0.5913643", "0.5908195", "0.58921766", "0.58854365", "0.5874085", "0.5864315", "0.5831058", "0.5790889", "0.57766145", "0.57690364", "0.5719639", "0.5709672", "0.5699293", "0.5675956", "0.56444395", "0.56394196", "0.56172234", "0.5599649", "0.5596757", "0.5591967", "0.55887944", "0.55869037", "0.5581973", "0.5575584", "0.5554456", "0.5537769", "0.5518107", "0.5499147", "0.5481782", "0.5478832", "0.54784614", "0.547617", "0.54683095", "0.5467719", "0.54548043", "0.54548043", "0.54264694", "0.5415304", "0.5415173", "0.54012734", "0.53963673", "0.5385298", "0.5378123", "0.5364185", "0.53620964", "0.5360552", "0.5356126", "0.5345884", "0.53443754", "0.5343921", "0.5340674", "0.5335371", "0.5325451", "0.5318796", "0.53181946", "0.5308192", "0.53080636", "0.5304904", "0.5299928", "0.5299095", "0.52946913", "0.5293657", "0.52890897", "0.5288395", "0.52871203", "0.5284207", "0.52686393", "0.5256101", "0.52515006", "0.5249908", "0.524611", "0.52457803", "0.52442664", "0.5244121", "0.5241407", "0.5236729", "0.52321786", "0.52265096", "0.52235574", "0.52216893", "0.5212247", "0.5211453", "0.5210385", "0.52096057", "0.5206649", "0.52049464", "0.51987857", "0.51987857", "0.51962876", "0.51851094", "0.51851094", "0.51851094", "0.5182208", "0.5181806", "0.5181403" ]
0.0
-1
Weapons interface to allow for specific types to be implemented
public interface Attacks { // gives a character object ability (behavior) to attack with a weapon // and deal damage to opponent's health String attack(); int attackDamage(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface WeaponBehavior {\n\n int useWeapon(int strong);\n\n int getDamageValue(int strong);\n}", "public interface Weapon {\n\n /**\n * method which is used when one war participant attacks other\n *\n * @param target target war participant\n * @param attacker attacker war participant\n */\n void fire(WarParticipant target, WarParticipant attacker, int noOfShooters);\n\n}", "@Override\n public Type getItemType() {\n return Type.WEAPON;\n }", "public interface Blacksmith {\n Weapon manufactureWeapon(WeaponType weaponType);\n}", "public void weaponAbility() {\n \tlogger.info(\"weapon abilities aren't implemented yet. Using slash ability\");\n \t//ability(map.getCurrentTurnHero().getWeaponAbility());\n \tability(new Slash());\n }", "private void createWeapons()\n {\n woodSword = new Weapon(\"wood sword\", \" | does 12 damage\", 10, true); \n rustedSword = new Weapon(\"rusted sword\", \" | does 17 damage\", 15, true);\n silverSword = new Weapon(\"silver sword\", \" | does 32 damage\", 30, true);\n goldSword = new Weapon(\"gold sword\", \" | does 22 damage\", 20, true);\n titaniumSword = new Weapon(\"titanium sword\", \" | does 52 damage\", 50, true);\n silverSpear = new Weapon(\"silver spear\", \" | does 25 damage\", 23, true);\n infantryBow = new Weapon(\"infantry bow\", \" | does 30 damage\", 28, true);\n }", "private void setWeapons()\n {\n sewers.setWeapon(woodSword);\n promenade.setWeapon(woodSword);\n depths.setWeapon(rustedSword);\n forest.setWeapon(goldSword);\n bridge.setWeapon(silverSpear);\n ramparts.setWeapon(infantryBow);\n }", "public Weapon(){\n \n name = \"Claw\"; // will be treated as a sword\n type = 'R';\n advType = 'G';\n disType = 'B';\n mt = 4;\n hit = 85;\n crit = 0;\n wt = 1;\n isMagic = true;\n \n }", "public void equipSelectedWeapon() {\n }", "@Override\n\tpublic void addEquipment(Weapon w) {\n\t\tif (nbWeapons() > 0)\n\t\t\tthrow new BreakingRuleException();\n\t\tsuper.addEquipment(w);\n\t}", "public ArrayList<Pair<Byte, Short>> getWeapons() {\n return weapons;\n }", "public ArrayList<Weapon> getWeapons() {\n return weapons;\n }", "public List<CardWeapon> getWeapons() {\n return weapons;\n }", "public List<IWeapon> getWeaponsInventory(){\n return weaponsInventory;\n }", "public void toSelectingWeapon() {\n }", "public static void genWeaponList() {\r\n int i;\r\n\r\n auxItemVector.clear();\r\n \r\n if(currentChar == null) return;\r\n\r\n for (i = 0; i < currentChar.getItemsNumber(); i++) {\r\n if(currentChar.getItem(i).getType() == weapon)\r\n auxItemVector.add(currentChar.getItem(i));\r\n }\r\n }", "private Set<BoardObject> createWeapons(){\r\n\t\tSet<BoardObject> weaps = new HashSet<BoardObject>();\r\n\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/revolver1.png\"), new Coordinate(3,12), \"Revolver\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/candlestick3.png\"), new Coordinate(2,3), \"Candlestick\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/knife1.png\"), new Coordinate(12,3), \"Knife\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/leadpipe1.png\"), new Coordinate(20,3), \"LeadPipe\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/rope1.png\"), new Coordinate(20,10), \"Rope\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/spanner1.png\"), new Coordinate(20,16), \"Wrench\"));\r\n\t\treturn weaps;\r\n\t}", "public Set<Material> getAllowedWeapons()\r\n\t{\treturn Collections.unmodifiableSet(this.allowedWeapons);\t}", "public Vector<EntityWeapon> getWeaponList();", "static void weapon(char item)\r\n {\r\n \tString pClass = MainApp.playerClass;\r\n \tif(MainApp.alreadyEquipped == false)\r\n\t\t{\r\n\t\t\tif(pClass == \"Warrior\")\r\n\t\t\t{\r\n\t \t\tif(item == '0')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Warrior Equipped!\");\r\n\t \t\t}\r\n\t \t\t//System.out.print(\"Post Equip Warrior\");\r\n\t\t\t}\r\n\t\t\tif(pClass == \"Archer\")\r\n\t\t\t{\r\n\t\t\t\tif(item == '&')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Archer Equipped!\");\r\n\t \t\t}\r\n\t\t\t\t//System.out.print(\"Post Equip Archer\");\r\n\t\t\t}\r\n\t\t\tif(pClass == \"Rogue\")\r\n\t\t\t{\r\n\t\t\t\tif(item == '!')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Rogue Equipped!\");\r\n\t \t\t}\r\n\t\t\t\t//System.out.print(\"Post Equip Rogue\");\r\n\t\t\t}\r\n\t }\r\n }", "public void setWeapons(ArrayList<WeaponClient> weapons) {\n this.weapons = weapons;\n }", "public int getWeapons() {\n return weapons;\n }", "private static Weapon randomWeapon() {\r\n Random rand = new Random();\r\n int weaponType = rand.nextInt(7);\r\n switch (weaponType) {\r\n case 0: \r\n return new FryingPan();\r\n case 1:\r\n return new SubmachineGun();\r\n case 2:\r\n return new AssaultRifle();\r\n case 3:\r\n return new Pistol();\r\n case 4:\r\n return new Axe();\r\n case 5:\r\n return new Crowbar();\r\n default:\r\n return new Shotgun();\r\n }\r\n }", "public WeaponType getEquippedWeaponType() {\n return WeaponType.NULL;\n }", "public void setWeapons() {\n\t\tca_weapons.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew CapAmerWeapons(Battleground.captainAmerica).setVisible(true);\n\t\t\t}\n\t\t}\n\t\t);\n\t\the_weapons.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew HawkeyeWeapons(Battleground.hawkeye).setVisible(true);\n\t\t\t}\n\t\t}\n\t\t);\n\t\tbw_weapons.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew BlackWidowWeapons(Battleground.blackWidow).setVisible(true);\n\t\t\t}\n\t\t}\n\t\t);\n\t\thulk_weapons.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew HulkWeapons(Battleground.hulk).setVisible(true);\n\t\t\t}\n\t\t}\n\t\t);\n\t\tthor_weapons.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew ThorWeapons(Battleground.thor).setVisible(true);\n\t\t\t}\n\t\t}\n\t\t);\n\t\tloki_weapons.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew LokiWeapons(Battleground.loki).setVisible(true);\n\t\t\t}\n\t\t}\n\t\t);\n\t}", "public Weapon[] getWeapons(){\n\t\tSystem.out.println(\"Creating Weapons...\");\n\t\tfor(int i=0; i<boardWeapons.length; i++){\n\t\t\tSystem.out.println(boardWeapons[i].getName());\n\t\t}\n\t\treturn boardWeapons;\n\t}", "public WeaponInterface getWeaponTab() {\r\n return player.getExtension(WeaponInterface.class);\r\n }", "public void generateTutorialWeapons() {\n this.loot.add(new Weapon(\"Weathered Longsword\", \"A weathered longsword - it'll do.\", 3, 1));\n this.loot.add(new Weapon(\"Weathered Battle Axe\", \"A weathered battle axe - it'll do.\", 2, 2));\n this.loot.add(new Weapon(\"Weathered Bow\", \"A weathered bow - it'll do.\", 3, 2));\n }", "public Weapon ()\r\n\t{\r\n\t\t//no default values for Weapon attributes are set here as the specific weapon type unspecified at super level\r\n\t}", "public interface BluesIWomen {\n public int getType();\n\n public String getRequest();\n}", "public interface Item {\n\n String getName();\n\n String getDescription();\n\n int getSkill(SkillType skillType);\n\n String getSkillDescr();\n}", "public Weapon getWeapon(){\n return this.weaponPos;\n }", "@Test\r\n public void test_weapon() {\r\n Weapon weapon1 = new Weapon(\"gun\", \"that a weapon for sure\", 7);\r\n assertEquals(\"gun\", weapon1.getInformation().getName());\r\n assertEquals(\"that a weapon for sure\", weapon1.getInformation().getDescription());\r\n assertEquals(7, weapon1.getDamage());\r\n }", "public interface Gun {\n\n boolean fire();\n\n default void reload(int bullets) {\n\n }\n}", "public interface GiveGift {\n\n void give1();\n void give2();\n void give3();\n}", "public interface Unit {\n\n public String name();\n public double damage();\n public double damageVsStrong();\n public double range();\n public double hp();\n public double speed();\n public int armor();\n public int popcap();\n public String type();\n public String strongVS();\n public String weakVS();\n}", "public interface IEnemyFeature {\n\n}", "@Override\n public void equip(@NotNull IWeapon weapon) {\n weapon.equipToMage(this);\n }", "public ArrayList<WeaponClient> getWeapons() {\n return weapons;\n }", "public interface RightHand extends Hand, EquipSlot<RightHandEquip> {\n\n}", "public ArrayList<Weapon> getWeaponList() {\n return new ArrayList<>(weaponList);\n }", "public Weapon getWeapon() {\n\t\treturn weapon;\n\t}", "public void giveWeapon(Weapon weapon) throws RuntimeException {\n if (weaponList.size() > 2)\n throw new RuntimeException(\"This player can't receive any more weapons\");\n weaponList.add(weapon);\n }", "public interface WipableIngredient extends Ingredient {\n\n void wip();\n}", "public ShotgunWeapon() {\n description = \" Weapon: Shotgun has\";\n }", "public IntrinsicWeapon getIntrinsicWeapon() {\r\n\t\treturn new IntrinsicWeapon(10, \"bombard\");\r\n\t}", "public interface Item {\n\t/**\n\t * Use the item on the player. If it's gold, it is added to his inventory. Else, it directly modify the player stats.\n\t * @param character - the player ( a monster cannot use an item) who's using an item\n\t * @return the player with his new stats due to the item\n\t */\n\tpublic Character isUsedBy(Character character);\n}", "private HashMap<String, Weapon> readWeapons() {\n JSONObject weaponsData = getAssetJson(\"weapons.json\").getJSONObject(\"weapons\");\n HashMap<String, Weapon> weapons = new HashMap<>();\n\n for(String categoryName : weaponsData.keySet()) {\n Weapon.CATEGORY category = Weapon.CATEGORY.fromName(categoryName);\n JSONObject categoryWeaponsData = weaponsData.getJSONObject(categoryName);\n final String categoryPath = Weapon.BASE_PATH + categoryName + \"/\";\n\n for(String weaponId : categoryWeaponsData.keySet()) {\n JSONObject weaponData = categoryWeaponsData.getJSONObject(weaponId);\n\n weapons.put(\n weaponId,\n new Weapon(\n weaponId,\n weaponData.getString(NAME_KEY),\n category,\n weaponData.getInt(\"cost\"),\n resourceHandler.getImageResource(categoryPath + weaponId + \".png\")\n )\n );\n }\n }\n\n return weapons;\n }", "public String getWeapon() {\n return weapon1;\n }", "public static Weapon spawnWeapon()\r\n\t{\r\n\t\tfinal int numberOfWeapons = 5; //update as weapons are added\r\n\t\t\r\n\t\t//Create weapons in order to access attributes / randomly select a weapon\r\n\t\tSword sword = new Sword();\r\n\t\tStick stick = new Stick();\r\n\t\tBazooka bazooka = new Bazooka();\r\n\t\tAtomicBomb atomicBomb = new AtomicBomb();\r\n\t\tPotatoCannon potatoCannon = new PotatoCannon();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tWeapon[] weapons = new Weapon[] {sword, stick,bazooka,atomicBomb,potatoCannon}; //store weapons in an array to randomly grab one to use in Game\r\n\t\t\r\n\t\tint randomWeapon; //weapon chosen\t\t\r\n\t\tRandom rng = new Random (); //create generator based upon current number of weapons\r\n\t\trandomWeapon = rng.nextInt(numberOfWeapons); //get a weapon object at random from array\r\n\r\n\t\treturn (weapons[randomWeapon]); //we have no need to create separate instance\r\n\t}", "public void addWeapon(Weapon x){\n\t\tplayerWeapon=new Weapon(x);\n\t\tHealth+=x.gethealthStat();\n\t\tAttackForce+=x.getafStat();\n\t\tDefense+=x.getdefenseStat();\n\t}", "public void setEquippedWeapon(String w)\n\t{\n\t\tstrEquippedWeapon = w;\n\t\t\n\t}", "public void setWeapon(int weapon)\n\t{\n\t\tthis.weapon = weapon;\n\t}", "public void addWeapon(CardWeapon cw)\n {\n this.weapons.add(cw);\n }", "public interface Wall extends Product {\n}", "public interface Unit {\n int getDamage();\n // Returns true if alive, false if the unit died from the damage\n boolean takeDamage(int dmg);\n int getHp();\n int getLevel();\n int getEndurance();\n String getName();\n}", "private Card murderWeapon(UI ui, Player currentPlayer) {\n CardPanel cardPanel = new CardPanel(ui.getBoard(), ui.getCmd(), \"weapons\");\n ui.getLayers().add(cardPanel, Integer.valueOf(6));\n cardPanel.showPanel();\n ui.getInfo().addText(\"Enter the weapon you think \" + murderer.getName() + \" killed Gunther in \" + location.getName() + \". Listed Below\"); // prompt\n\n // display all the characters to the player that they can select\n for (int i = 0; i < WEAPON_NAMES.length; i++) {\n ui.getInfo().addText(WEAPON_NAMES[i].toString().substring(0,1) + WEAPON_NAMES[i].toString().substring(1).toLowerCase());\n }\n\n WeaponTypes murderWeapon = null;\n String weapon;\n\n // check the input from the user whether it is a weapon, help command, notes command or the wrong input\n do {\n weapon = ui.getCmd().getCommand().toLowerCase();\n switch (weapon) {\n case \"rope\":\n murderWeapon = WeaponTypes.ROPE;\n break;\n case \"dagger\":\n murderWeapon = WeaponTypes.DAGGER;\n break;\n case \"wrench\":\n murderWeapon = WeaponTypes.WRENCH;\n break;\n case \"pistol\":\n murderWeapon = WeaponTypes.PISTOL;\n break;\n case \"candlestick\":\n murderWeapon = WeaponTypes.CANDLESTICK;\n break;\n case \"pipe\":\n murderWeapon = WeaponTypes.PIPE;\n break;\n case \"notes\":\n currentPlayer.getPlayerNotes().showNotes(currentPlayer);\n break;\n case \"help\":\n ui.getInfo().addText(\"Select a weapon from the list above for the questioning!\");\n break;\n default:\n ui.getInfo().addText(\"That was an invalid entry, enter a weapon from the list above for the questioning!\");\n break;\n }\n } while (murderWeapon == null); // while the player input was not a weapon\n\n cardPanel.removePanel();\n ui.getLayers().remove(cardPanel);\n return new Card(murderWeapon.toString()); // return a card with the murder weapon selected by the user\n }", "boolean sellWeaponsForUser(int uid, List<Integer> wIds);", "public interface Damage {\n}", "public WeaponComponent() {\n weaponName = \"none\";\n owned = false;\n damagePower = 1;\n }", "public interface IShipDamage {\n public boolean isAlive();\n\n public int getHealth();\n}", "public void addWeapon(Pair<Byte,Short> weapon){\n //Total number of weapons player can carry is 5 (inc. default weapon)\n //If player has <3 weapons, simply add weapon.\n //Otherwise, first remove oldest weapon in inventory then add at that\n //position.\n //oldest weapon tracked by linked list of weapon entries.\n if(this.weapons.size() < 3) {\n this.weapons.add(weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n }else{\n //Checks for duplicates, if duplicate weapons\n //found, new weapons ammo is just added to the current\n //weapon already in inventory\n for(Pair<Byte,Short> w : this.weapons){\n if(Objects.equals(w.getKey(), weapon.getKey())){\n if(weaponEntryTracker.size() == 1){\n weaponEntryTracker = new LinkedList<>();\n }\n else{\n for(int tracker : weaponEntryTracker){\n if(tracker == this.weapons.indexOf(w)){\n weaponEntryTracker.remove((Integer) tracker);\n }\n }\n }\n Pair<Byte,Short> newWeapon = new Pair<>(weapon.getKey(), (short) (w.getValue()+weapon.getValue()));\n if(this.currentWeapon == w){\n this.setCurrentWeapon(newWeapon);\n }\n this.weapons.set(this.weapons.indexOf(w),newWeapon);\n weaponEntryTracker.add((byte) this.weapons.indexOf(newWeapon));\n return;\n }\n }\n //check for any no weapon entries - indicates\n //player dropped weapon.\n for(Pair<Byte,Short> w : this.weapons){\n if(w.getKey() == NO_WEAPON_ID){\n this.weapons.set(this.weapons.indexOf(w),weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n return;\n }\n }\n //If no null entries are found, remove oldest weapon\n int oldestWeapon = this.weaponEntryTracker.poll();\n byte oldestWeaponKey = this.weapons.get(oldestWeapon).getKey();\n this.weapons.set(oldestWeapon, weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n if(oldestWeaponKey == currentWeapon.getKey()){\n setCurrentWeapon(weapon);\n }\n\n }\n }", "public Weapon()\n {\n name = \"None\";\n speed = 2;\n damage = 1;\n range = 1;\n }", "public void weaponInformation() {\n System.out.println(\"Weapon Name: \" + super.name() );\r\n System.out.println(\"Desc:\" + super.description() );\r\n System.out.println(\"Mobility: \" + super.mobility() ); \r\n }", "public interface HullModFleetEffect {\r\n\r\n\t/**\r\n\t * Called for *every* fleet, even fleets that don't have a ship with the specific hullmod.\r\n\t * \r\n\t * Shouldn't try to do a lot here; could have a lot of performance repercussions.\r\n\t * \r\n\t * @param fleet\r\n\t */\r\n\tvoid advanceInCampaign(CampaignFleetAPI fleet);\r\n\t\r\n\t\r\n\t/**\r\n\t * Whether the advanceInCampaign() method should be called for this hullmod.\r\n\t * @return\r\n\t */\r\n\tboolean withAdvanceInCampaign();\r\n\t\r\n\t/**\r\n\t * Whether the withOnFleetSync() method should be called for this hullmod.\r\n\t * @return\r\n\t */\r\n\tboolean withOnFleetSync();\r\n\t\r\n\t\r\n\t/**\r\n\t * Called when anything about the fleet composition changes, including hullmod changes.\r\n\t * Also called for all fleets, including fleets without ships with this hullmod.\r\n\t * @param fleet\r\n\t */\r\n\tvoid onFleetSync(CampaignFleetAPI fleet);\r\n}", "public void addToInventory(IWeapon weapon){\n if (weaponsInventory.size() < 12) {\n this.weaponsInventory.add(weapon);\n lenInventory += 1;\n }\n }", "@POST(\"/MakeWeaponList\")\n\tpublic Map<Integer, Weapon> makeWeaponList(@Body int id) throws GameNotFoundException;", "public Weapon useWeapon() {\n\t\tWeapon weapon = weaponList.get(weaponList.size() - 1);\n\t\tif(weaponList.size() > 1){\n\t\t\tweaponList.remove(weaponList.size() - 1);\n\t\t}\n\t\telse {\n\t\t}\n\t\treturn weapon;\n\t}", "public Weapon() {\n this(Weapon.defaultName, 0, new Level(0), 0, 0);\n }", "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 }", "public interface AttributeTypeAttack extends EObject\n{\n}", "public interface IAttackAbility\n{\n public void attack(Entity target, EntityLivingBase source);\n}", "protected void addAllowedWeapon(Material weapon) {\r\n\t\tthis.allowedWeapons.add(weapon);\r\n\t}", "public interface Animal {\n\npublic String voice();\n\n}", "public String getWeaponName()\r\n\t{\r\n\t\treturn this.weaponName;\r\n\t}", "public void add(Weapon weapon) {\n\t\tweaponList.add(weapon);\n\t}", "public interface EnemyShipPartsFactory {\n ESWeapon addESGun();\n ESEngine addESEngine();\n}", "public interface Enemy {\n /**\n * Prints Enemy name and health\n */\n void printInfo();\n\n /**\n * Returns an Enemy's current health\n *\n * @return health : Float\n */\n Float getHealth();\n\n /**\n * Decreases an Enemy's health by the amount of damage taken\n */\n void decreaseHealth(Float damage);\n\n /**\n * Checks if an Enemy is a Boss\n *\n * @return Boolean\n */\n Boolean isBoss();\n\n /**\n * Checks if an Enemy died and returns the result\n *\n * @return Boolean\n */\n Boolean isDead();\n\n /**\n * Returns the damage an Enemy has inflicted\n *\n * @return damage : Integer\n */\n Float attack();\n}", "public interface FirstPersonShooterInput {\n\n\tvoid shootWeapon();\n\n\tvoid reloadWeapon();\n\n\tvoid jump();\n\n}", "public void drawUserWeapons(Graphics g) {\r\n\t\tlevelManager.drawUserWeapons(g);\r\n\t}", "public boolean hasWeapon() { \n\t\tif (weaponHeld == null)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "AbstractWeapon createWeaponController(WeaponCard weaponCard);", "public int getEquippedWeaponWeight() {\n return 0;\n }", "public void equip();", "public void addWeapon(Weapon weapon) {\n setAttack(getAttack() + weapon.getDamage());\n setWeaponSlots(getWeaponSlots() - 1);\n }", "public String getEquippedWeaponName() {\n return \"\";\n }", "public interface Animalable {\n public enum AnimalClass {\n VERTEBRATE,\n INVERTEBRATE\n }\n\n public enum AnimalSubClass{\n REPTILE,\n FISH,\n AMPHIBIAN,\n BIRD,\n MAMMAL\n }\n\n public interface AnimalOrders {\n enum MammalOrders implements AnimalOrders {\n RODENTIA,\n CHIROPTERA,\n INSECTIVORA,\n MARSUPIALIA,\n CARNIVORA,\n PRIMATES,\n ARTIODACTYLA,\n CETACEA,\n LAGOMORPHA,\n PINNIPEDIA,\n EDENTATA,\n PERRISSODACTYLA,\n PROBOSCIDEA\n }\n enum BirdOrders implements AnimalOrders {\n STRUTHIONIFORMES,\n CRACIFORMES,\n GALLIFORMES,\n ANSERIFORMES,\n TURNICIFORMES,\n PICIFORMES,\n GALBULIFORMES,\n BUCEROTIFORMES,\n UPUPIFORMES,\n TROGONIFORMES,\n CORACIIFORMES,\n COLIIFORMES,\n CUCULIFORMES,\n PSITTACIFORMES,\n APODIFORMES,\n TROCHILIFORMES,\n MUSOPHAGIFORMES,\n STRIGIFORMES,\n COLUMBIFORMES,\n GRUIFORMES,\n CICONIIFORMES\n }\n\n enum ReptilOrders implements AnimalOrders{\n RHYNCOCEPHALIA,\n SQUAMATA,\n CHELONIA,\n CROCODILIA\n }\n\n enum FishOrders implements AnimalOrders {\n PREHISTORIC,\n BONY,\n CARTILAGINOUS,\n JAWLESS\n }\n\n enum AmphibianOrders implements AnimalOrders {\n ANURA,\n URODELA,\n APODA\n }\n }\n\n public enum Motion{\n SWIM,\n CRAWL,\n CLIMB,\n RUN,\n WALK,\n JUMP,\n FLY,\n DIG\n }\n\n public enum FeedingBehaviour {\n AUTOTROPH,\n CARNIVORE,\n ERGIVORE,\n HERBIVORE,\n OMNIVORE,\n SCAVENGER,\n INSECTIVORE\n }\n\n public enum Media {\n AIR,\n EARTH,\n WATER\n }\n\n public enum Sex {\n MALE,\n FEMALE,\n HERMAPHRODITE\n }\n\n public AnimalClass getMyClass();\n public void setMyClass(AnimalClass animalClass);\n\n public AnimalSubClass getMySubClass();\n public void setMySubClass(AnimalSubClass animalSubClass);\n\n public AnimalOrders getMyOrder();\n public void setMyOrder(AnimalOrders myOrder);\n\n public FeedingBehaviour getMyFeedingBehaviour();\n public void setMyFeedingBehaviour(FeedingBehaviour myConsumption);\n\n public ArrayList<Media> getMyMedia();\n public void addMedia(Media aMedia);\n\n public ArrayList<Motion> getMyMotion();\n public void addMotion(Motion aMotion);\n\n public String getName();\n public void setName(String name);\n\n public String getCommonName();\n public void setCommonName(String commonName);\n\n public String getScientificName();\n public void setScientificName(String scientificName);\n\n public Boolean amIHazardous();\n public void setHazardous(boolean hazardous);\n\n public Sex getMySex();\n public void setMySex(Sex aSex);\n\n public Timestamp getLastTimeFed();\n public void feedMe(Timestamp aTime, Edible food);\n\n public int getFeedingPeriod();\n public void setFeedingPeriod(int every);\n\n public boolean timeToFeed();\n\n public int howFullIsMyBelly();\n\n public boolean isAdult();\n\n public void setAsAdult();\n\n public void setAsBaby();\n\n\n\n\n}", "public Weapon(String name, String description,\n URL link,\n int cost, boolean exclusive,\n int mt, int rng, WeaponClass type, WeaponRefine refine) {\n super(name, description,\n link, new Color(0xDE1336), 'W',\n cost, exclusive, rng);\n this.mt = mt;\n this.type = type;\n int[] statModifiers = StatModifier.parseStatModifiers(description);\n statModifiers[1]+= mt;\n this.statModifiers = statModifiers;\n this.refine = refine;\n }", "private void getWeaponItem(double x, double y, String option,\r\n\t\t\tBufferedImage itemimage, SpriteGroup items) {\r\n\t\tint weaponoption = Resources.getInt(option);\r\n\t\tItem newGun = new WeaponItem(player, new Sprite(itemimage),\r\n\t\t\t\tweaponoption, x, y);\r\n\t\titems.add(newGun);\r\n\t\tnewGun.setActive(true);\r\n\t}", "@Test\n void doEffectrailgun() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"railgun\");\n Weapon w11 = new Weapon(\"railgun\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w11);\n p.setPlayerPosition(Board.getSpawnpoint('r'));\n p.getPh().drawWeapon(wd, w11.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n try {\n p.getPh().getWeaponDeck().getWeapon(w11.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n players.clear();\n players.add(victim);\n try{\n p.getPh().getWeaponDeck().getWeapon(w11.getName()).doEffect(\"alt\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n try {\n p.getPh().getWeaponDeck().getWeapon(w11.getName()).doEffect(\"alt\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 2);\n }", "public interface Movement {\n void sound ();\n}", "public interface FlyBehavior {\n String fly();\n}", "public boolean isWeaponOf(int i, int j) {\n boolean bJudge;\n\n bJudge = false;\n\n //if j is a player\n if (scene.entityManager.hasComponent(j, Player.class)) {\n player = scene.entityManager.getEntityComponentInstance(j, Player.class);\n\n //inventory of the two weapons in selection of the playe\n Inventory inventory = scene.entityManager.getEntityComponentInstance(player.LRInventory, Inventory.class);\n if (inventory.slots.get(0) == i || inventory.slots.get(1) == i) {\n bJudge = true;\n }\n } //if j is an enemy\n else if (scene.entityManager.hasComponent(j, Enemy.class)) {\n Playable playable = scene.entityManager.getEntityComponentInstance(j, Playable.class);\n\n Inventory inventory = scene.entityManager.getEntityComponentInstance(playable.inventory, Inventory.class);\n\n if (inventory.slots.get(0) == i) {\n bJudge = true;\n }\n }\n\n return bJudge;\n }", "@Test\n void doEffectcyberblade(){\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"cyberblade\");\n Weapon w20 = new Weapon(\"cyberblade\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w20);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w20.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n players.clear();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", \"opt1\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"opt1\", \"base\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", \"opt1\", \"opt2\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && victim2.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(6));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", \"opt2\", \"opt1\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && victim2.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"opt1\", \"base\", \"opt2\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && victim2.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n }", "public void selectWeaponFromInventory(int weaponIndex) {\n }", "public Weapon (Player player) {\n\t\tthis.player = player;\n\t}", "public void add(Weapon weapon) {\n\t\tif (weaponList.size() < 2) {\n\t\t\tweaponList.add(weapon);\n\t\t}\n\t}", "public void unlockWeapons(int level) {\n\t\tif (level <= weaponLevel) {\n\t\t\treturn;\n\t\t}\n\t\tList<ItemType> items = new ArrayList<>();\n\t\t// Adding all the defined weapons in WeaponType enumerate class\n\t\tfor (WeaponType wep : WeaponType.values()) {\n\t\t\titems.add(wep);\n\t\t}\n\t\tupdateShop(items, level);\n\t\tweaponLevel = level;\n\t}", "public WeaponTest() {\r\n\r\n }", "public interface hp extends Menu {\n}" ]
[ "0.7711289", "0.730172", "0.7295247", "0.7111931", "0.70127803", "0.6890374", "0.67122984", "0.6672473", "0.6616601", "0.6500406", "0.64750046", "0.6467194", "0.64251333", "0.64054984", "0.6374012", "0.63171285", "0.6310045", "0.6307079", "0.6302819", "0.6266454", "0.62251204", "0.62134", "0.6210722", "0.6177382", "0.6175441", "0.6157015", "0.61551315", "0.61413676", "0.6126465", "0.61188036", "0.61131114", "0.6104967", "0.6086703", "0.6064143", "0.6059985", "0.60461706", "0.6040341", "0.6039349", "0.601501", "0.60084474", "0.5998416", "0.5981214", "0.5976957", "0.5952097", "0.5939064", "0.59355766", "0.5928092", "0.59180933", "0.5898777", "0.5890904", "0.58755547", "0.587138", "0.58426017", "0.58357745", "0.58334213", "0.58163506", "0.5809689", "0.580119", "0.5794952", "0.5788232", "0.57810664", "0.57685804", "0.5760325", "0.5744871", "0.57413006", "0.57377416", "0.5729725", "0.5727401", "0.5721028", "0.57198405", "0.57178754", "0.5714255", "0.57127655", "0.5708228", "0.57018185", "0.57012177", "0.5697427", "0.56945485", "0.5672328", "0.56716454", "0.5671329", "0.56623834", "0.56610584", "0.56569654", "0.5654019", "0.565345", "0.5652144", "0.56439036", "0.5635612", "0.56262976", "0.56256056", "0.5625531", "0.56241345", "0.562147", "0.56147355", "0.56104577", "0.5607327", "0.55913764", "0.5588929", "0.5585629" ]
0.64228755
13
gives a character object ability (behavior) to attack with a weapon and deal damage to opponent's health
String attack();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void weaponAbility() {\n \tlogger.info(\"weapon abilities aren't implemented yet. Using slash ability\");\n \t//ability(map.getCurrentTurnHero().getWeaponAbility());\n \tability(new Slash());\n }", "public interface Attacks {\n // gives a character object ability (behavior) to attack with a weapon\n // and deal damage to opponent's health\n String attack();\n int attackDamage();\n}", "public interface WeaponBehavior {\n\n int useWeapon(int strong);\n\n int getDamageValue(int strong);\n}", "AbilityDamage getAbilityDamage();", "public interface IAttackAbility\n{\n public void attack(Entity target, EntityLivingBase source);\n}", "public void getAttackedByDarknessMagicBook(IEquipableItem item){item.strongAttackTo(this.getOwner());}", "public abstract boolean attack(Enemy w);", "public void attack(String spell, character opponent){\n Random rand = new Random();\n int prob;\n String attack;\n \n prob = rand.nextInt(2); //we need two random numbers to allow us to use the two attacks:\n if(prob==0){\n attack = \"punch\";\n opponent.setHealth(opponent.getHealth() - 10);\n System.out.println(getName() + \" has landed \" + attack);\n System.out.println(opponent.getName() + \" health now \" + opponent.getHealth());\n }\n \n else if(prob==1){\n attack = \"kick\";\n opponent.setHealth(opponent.getHealth() - 15);\n System.out.println(getName() + \" has landed \" + attack);\n System.out.println(opponent.getName() + \" health now \" + opponent.getHealth());\n }\n \n \n }", "public interface Weapon {\n\n /**\n * method which is used when one war participant attacks other\n *\n * @param target target war participant\n * @param attacker attacker war participant\n */\n void fire(WarParticipant target, WarParticipant attacker, int noOfShooters);\n\n}", "private void enemyAttack() {\n\t\t\n\t\tRandom rand = new Random();\t\n\t\t\n\t\tint roll = rand.nextInt(101);\n\t\t\n\t\tint sroll = rand.nextInt(101);\n\t\t\n\t\tevents.appendText(e.getName() + \" attacks!\\n\");\n\t\t\n\t\tif(roll <= p.getEV()) { // Player evades\n\t\t\t\n\t\t\tevents.appendText(\"You evaded \"+e.getName()+\"\\'s Attack!\\n\");\n\t\t\t\n\t\t}else if(roll > p.getEV()) { // Player is hit and dies if HP is 0 or less\n\t\t\t\n\t\t\tp.setHP(p.getHP() - e.getDMG());\n\t\t\t\n\t\t\tString newHp = p.getHP()+\"/\"+p.getMaxHP();\n\t\t\t\n\t\t\tString effect = e.getSpecial(); // Stats are afflicted\n\t\t\t\n\t\t\tif(sroll < 51){\n\t\t\t\t\n\t\t\tif(effect == \"Bleed\") { // Bleed Special\n\t\t\t\t\n\t\t\t\tp.setHP(p.getHP() - 100);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You bleed profusely. - 100 HP\\n\");\n\t\t\t\t\n\t\t\t\tnewHp = String.valueOf(p.getHP()+\"/\"+p.getMaxHP());\n\t\t\t}\n\t\t\tif(effect == \"Break\") { // Break Special \n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You feel a bone break restricting movement. - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Fear\") { // Fear Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-40>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 40);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"A crippling fear rattles your resolve. - 40 DMG\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Rend\") { // Rend Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-30>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 30);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"Morthar unleashes a pillar of flame! - 30 DMG and - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\tif(p.getHP() <= 0) {\n\t\t\t\t\n\t\t\t\tp.setDead(true);\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(0+\"/\"+e.getMaxHP());\n\t\t\t\tplayerHPBar.setProgress((double)0);\n\t\t\t}else {\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(newHp);\n\t\t\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif(p.isDead()) { // Game over if player dies\n\t\t\t\n\t\t\ttry {\n\t\t\t\tLoadGO();\n\t\t\t} catch (IOException e1) {\n\t\t\t\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tcombat = false;\n\t\t}\n\t}", "public void actionCombat(Party p1) {\n System.out.println(\"______________________________________________________________________________\\n\");\n System.out.println(this.Name + \" is attacking ...\");\n int choice = (int)(Math.random() * p1.getTeam().size());\n Character target = p1.getTeam().get(choice);\n System.out.println(this.Name + \" attacks \" + target.getName() + \"!\");\n\n if (this.SPEED - target.getSPEED() < 5) {\n int damage = Math.max(this.ATK - target.getDEF(), 0);\n System.out.println(this.Name + \" has inflicted \" + damage + \" damages to \" + target.getName() + \"!\");\n target.setActualHP(Math.max(0, target.getActualHP() - damage));\n if (target.getActualHP() == 0) {\n System.out.println(\"\\n\" + target.getName() + \" is down!\\n\");\n target.setIsDead(true);\n }\n }\n else {\n int n = 0;\n while ((target.actualHP != 0) && (n < 2)) {\n if (n == 1) {\n choice = (int)(Math.random() * p1.getTeam().size() + 1);\n target = p1.getTeam().get(choice);\n System.out.println(this.Name + \" attacks \" + target.getName() + \"!\");\n }\n int damage = Math.max(this.ATK - target.getDEF(), 0);\n System.out.println(this.Name + \" has inflicted \" + damage + \" damages to \" + target.getName() + \"!\");\n target.setActualHP(Math.max(0, target.getActualHP() - damage));\n if (target.getActualHP() == 0) {\n System.out.println(\"\\n\" + target.getName() + \" is down!\\n\");\n target.setIsDead(true);\n }\n if (n == 0) System.out.println(this.Name + \" attacks again ...\");\n n++;\n }\n }\n }", "public void ability(AbstractAbility ability) {\n\n logger.info(abilityInfo(map.getCurrentTurnHero(), ability));\n\n if (selectionX != -1 && !playerPerformingMove && !map.enemyPerformingMove()) {\n AbstractCharacter owner = map.getCurrentTurnHero();\n\n // Check range\n if (!(ability.inRange(owner.getX(), owner.getY(), selectionX, selectionY))) {\n logger.info(\"NOT IN RANGE.\");\n toAbilityInfoDialogue(\"NOT IN RANGE.\");\n return;\n }\n \tif (ability.onCooldown()) {\n \t\tlogger.info(\"ABILITY IS ON COOL-DOWN.\");\n toAbilityInfoDialogue(\"ABILITY IS ON COOL-DOWN.\");\n \t\treturn;\n \t}\n if (ability.getCostAP() > ((AbstractHero)owner).getActionPoints()) {\n \tlogger.info(\"NOT ENOUGH ABILITY POINTS.\");\n toAbilityInfoDialogue(\"NOT ENOUGH ABILITY POINTS.\");\n \treturn;\n }\n\n TargetDesignation targetDesignation;\n if (ability.canUseOnPoint()) {\n \ttargetDesignation = TargetDesignation.POINT;\n } else {\n \ttargetDesignation = getTargetDesignation(owner, selectionX, selectionY);\n }\n Thread abilityAnimationThread = new Thread(() -> playerAbilityHandler(owner, ability, targetDesignation));\n try {\n abilityAnimationThread.join();\n abilityAnimationThread.setDaemon(true);\n } catch (InterruptedException e) {\n logger.info(\"AAAAAAAAAAAAAAAAAAAAAAAAAAA\");\n Platform.exit();\n Thread.currentThread().interrupt();\n }\n\n if (targetDesignation == TargetDesignation.FRIEND && ability.canUseOnFriend()) {\n // Friend Character\n abilityAnimationThread.start();\n }\n else if (targetDesignation == TargetDesignation.FOE && ability.canUseOnFoe()) {\n // Foe Character OR Unknown Entity OR Targetable LiveTile\n\n if (!map.getTile(selectionX, selectionY).getEntities().isEmpty()\n &&!(map.getTile(selectionX, selectionY).getEntities().get(0) instanceof Targetable)) {\n logger.info(\"NOT A VALID TARGET.\");\n toAbilityInfoDialogue(\"NOT A VALID TARGET.\");\n return;\n }\n\n if(isMultiplayer()){\n multiplayerGameManager.enableTemporaryBlock();\n multiplayerGameManager.hookAttack(owner, ability, selectionX, selectionY);\n }\n\n abilityAnimationThread.start();\n }\n else if (ability.canUseOnPoint()){\n // Point\n abilityAnimationThread.start();\n }\n }\n gameChanged = true;\n }", "public abstract boolean attack(Warrior w);", "void takeDamage(HeroDamage enemy1, HeroDamage enemy2);", "public int giveDamage();", "public void attack() {\n if (activeWeapon == null) {\n return;\n }\n attacking = true;\n }", "static void weapon(char item)\r\n {\r\n \tString pClass = MainApp.playerClass;\r\n \tif(MainApp.alreadyEquipped == false)\r\n\t\t{\r\n\t\t\tif(pClass == \"Warrior\")\r\n\t\t\t{\r\n\t \t\tif(item == '0')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Warrior Equipped!\");\r\n\t \t\t}\r\n\t \t\t//System.out.print(\"Post Equip Warrior\");\r\n\t\t\t}\r\n\t\t\tif(pClass == \"Archer\")\r\n\t\t\t{\r\n\t\t\t\tif(item == '&')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Archer Equipped!\");\r\n\t \t\t}\r\n\t\t\t\t//System.out.print(\"Post Equip Archer\");\r\n\t\t\t}\r\n\t\t\tif(pClass == \"Rogue\")\r\n\t\t\t{\r\n\t\t\t\tif(item == '!')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Rogue Equipped!\");\r\n\t \t\t}\r\n\t\t\t\t//System.out.print(\"Post Equip Rogue\");\r\n\t\t\t}\r\n\t }\r\n }", "public void fight(String enemy)\n\t{\n\t\tScanner kbAlpha = new Scanner(System.in);\n\t\t\n\t\tString strInput;\t\t\t\t\t\t//player input\n\t\tchar cAttack;\t\t\t\t\t\t\t//player input attack button\n\t\trandom = new Random();\n\t\t\n\t\tcAttack = 'x';\n\t\t\n\t\tif (strEquippedWeapon.equals(\"Dagger\"))\n\t\t{\n\t\t\tthis.iMaxDmg = 5; \t\t\t\t\t//exclusive\n\t\t\tthis.iMinDmg = 2;\t\t\t\t\t//inclusive\n\t\t}\n\t\telse if (strEquippedWeapon.equals(\"Steampunk 4-Barrel Pistol\"))\n\t\t{\n\t\t\tthis.iMaxDmg = 8; \t\t\t\t\t//exclusive\n\t\t\tthis.iMinDmg = 3;\t\t\t\t\t//inclusive\t\t\t\n\t\t}\n\t\telse if (strEquippedWeapon.equals(\"Steampunk Mach. II Riflesword\"))\n\t\t{\n\t\t\tthis.iMaxDmg = 16; \t\t\t\t\t//exclusive\n\t\t\tthis.iMinDmg = 6;\t\t\t\t\t//inclusive\n\t\t}\n\t\t\n\t\tif (enemy.equals(\"alien1\"))\n\t\t{\n\t\t\tthis.iAlienHP = 15;\n\t\t\tthis.iAlienMaxDmg = 3;\t\t\t\t//exclusive\n\t\t\tthis.iAlienMinDmg = 1;\t\t\t\t//inclusive\n\t\t\t\n\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\n\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\twhile (this.iHP > 0 && this.iAlienHP > 0)\n\t\t\t{\n\t\t\t\tthis.iDmgDealt = random.nextInt(this.iMaxDmg - this.iMinDmg) + \n\t\t\t\t\tthis.iMinDmg;\n\t\t\t\tthis.iAlienHP -= this.iDmgDealt;\n\t\t\t\t\n\t\t\t\tthis.iDmgTaken = random.nextInt(this.iAlienMaxDmg - this.iAlienMinDmg) +\n\t\t\t\t\tthis.iAlienMinDmg;\n\t\t\t\tthis.iHP -= this.iDmgTaken;\n\t\t\t\t\n\t\t\t\tif (this.iHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tsetPlayerState(false);\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Oh no! You took \" + this.iDmgTaken + \" damage and died! \" +\n\t\t\t\t\t\t\"It looks like the aliens got the best\\nof you and humanity \" + \n\t\t\t\t\t\t\"is\\ndoomed... better luck next time!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if (this.iAlienHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis.inventory.add(\"Steampunk 4-Barrel Pistol\");\n\t\t\t\t\tsetEquippedWeapon(\"Steampunk 4-Barrel Pistol\");\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \", but you have killed\"\n\t\t\t\t\t\t+ \" the alien!\\nThe alien dropped his \" +\n\t\t\t\t\t\t\"weapon! You pick it up an examine it. It looks like\\nit is a \" +\n\t\t\t\t\t\t\"Steampunk 4-Barrel Pistol. This might be a better option than \" +\n\t\t\t\t\t\t\"the\\n\" + getEquippedWeapon() + \". You equip it.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you have killed\"\n\t\t\t\t\t\t\t+ \" the alien!\\nThe alien dropped his \" +\n\t\t\t\t\t\t\t\"weapon! You pick it up an examine it. It looks like\\nit is a \" +\n\t\t\t\t\t\t\t\"Steampunk 4-Barrel Pistol. This might be a better option than \" +\n\t\t\t\t\t\t\t\"the\\n\" + getEquippedWeapon() + \". You equip it.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (enemy.equals(\"alien2\"))\n\t\t{\n\t\t\tthis.iAlienHP = 18;\n\t\t\tthis.iAlienMaxDmg = 5;\t\t\t\t//exclusive\n\t\t\tthis.iAlienMinDmg = 1;\t\t\t\t//inclusive\n\t\t\t\n\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\n\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\twhile (this.iHP > 0 && this.iAlienHP > 0)\n\t\t\t{\n\t\t\t\tthis.iDmgDealt = random.nextInt(this.iMaxDmg - this.iMinDmg) + \n\t\t\t\t\tthis.iMinDmg;\n\t\t\t\tthis.iAlienHP -= this.iDmgDealt;\n\t\t\t\t\n\t\t\t\tthis.iDmgTaken = random.nextInt(this.iAlienMaxDmg - this.iAlienMinDmg) +\n\t\t\t\t\tthis.iAlienMinDmg;\n\t\t\t\tthis.iHP -= this.iDmgTaken;\n\t\t\t\t\n\t\t\t\tif (this.iHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tsetPlayerState(false);\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Oh no! You took \" + this.iDmgTaken + \" damage and died! \" +\n\t\t\t\t\t\t\"It looks like the aliens got the best\\nof you and humanity \" + \n\t\t\t\t\t\t\"is\\ndoomed... better luck next time!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(this.iAlienHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis.iHP += 10;\n\t\t\t\t\tthis.inventory.add(\"Manhole Cover Shield\");\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damge, but you \" +\n\t\t\t\t\t\t\"killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t+ \"you find a health pack that increases your health by 10. \" +\n\t\t\t\t\t\t\"Fantastic!\\nSearching the alien's corpse, you find a Manhole Cover\"\n\t\t\t\t\t\t+ \" Shield! This will\\nprotect you from some damage.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you \"\n\t\t\t\t\t\t\t+ \"killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t\t+ \"you find a health pack that increases your health by 10. \" +\n\t\t\t\t\t\t\t\"Fantastic!\\nSearching the alien's corpse, you find a Manhole Cover\"\n\t\t\t\t\t\t\t+ \" Shield! This will\\nprotect you from some damage.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (enemy.equals(\"alien3\"))\n\t\t{\n\t\t\tif (evaluateInventory(\"Manhole Cover Shield\"))\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 22;\n\t\t\t\tthis.iAlienMaxDmg = 7;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 2;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 22;\n\t\t\t\tthis.iAlienMaxDmg = 9;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 3;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\n\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\twhile (this.iHP > 0 && this.iAlienHP > 0)\n\t\t\t{\n\t\t\t\tthis.iDmgDealt = random.nextInt(this.iMaxDmg - this.iMinDmg) + \n\t\t\t\t\tthis.iMinDmg;\n\t\t\t\tthis.iAlienHP -= this.iDmgDealt;\n\t\t\t\t\n\t\t\t\tthis.iDmgTaken = random.nextInt(this.iAlienMaxDmg - this.iAlienMinDmg) +\n\t\t\t\t\tthis.iAlienMinDmg;\n\t\t\t\tthis.iHP -= this.iDmgTaken;\n\t\t\t\t\n\t\t\t\tif (this.iHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tsetPlayerState(false);\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Oh no! You took \" + this.iDmgTaken + \" damage and died! \" +\n\t\t\t\t\t\t\"It looks like the aliens got the best\\nof you and humanity \" + \n\t\t\t\t\t\t\"is\\ndoomed... better luck next time!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(this.iAlienHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis.iHP += 15;\n\t\t\t\t\tthis.inventory.add(\"Edison Grenade\");\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you \" +\n\t\t\t\t\t\t\"killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t+ \"you find a health pack that increases your health by 15. The \"\n\t\t\t\t\t\t+ \"alien also\\ndropped an Edison Grenade! It looks like a bulb but \"\n\t\t\t\t\t\t+ \"probably does more\\nthan light up a room!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you \" +\n\t\t\t\t\t\t\t\"killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t\t+ \"you find a health pack that increases your health by 15. The \"\n\t\t\t\t\t\t\t+ \"alien also\\ndropped an Edison Grenade! It looks like a bulb but \"\n\t\t\t\t\t\t\t+ \"probably does more\\nthan light up a room!\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (enemy.equals(\"alien4\"))\n\t\t{\n\t\t\tif(evaluateInventory(\"Manhole Cover Shield\"))\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 18;\n\t\t\t\tthis.iAlienMaxDmg = 6;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 1;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 18;\n\t\t\t\tthis.iAlienMaxDmg = 8;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 2;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\n\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\twhile (this.iHP > 0 && this.iAlienHP > 0)\n\t\t\t{\n\t\t\t\tthis.iDmgDealt = random.nextInt(this.iMaxDmg - this.iMinDmg) + \n\t\t\t\t\tthis.iMinDmg;\n\t\t\t\tthis.iAlienHP -= this.iDmgDealt;\n\t\t\t\t\n\t\t\t\tthis.iDmgTaken = random.nextInt(this.iAlienMaxDmg - this.iAlienMinDmg) +\n\t\t\t\t\tthis.iAlienMinDmg;\n\t\t\t\tthis.iHP -= this.iDmgTaken;\n\t\t\t\t\n\t\t\t\tif (this.iHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tsetPlayerState(false);\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Oh no! You took \" + this.iDmgTaken + \" damage and died! \" +\n\t\t\t\t\t\t\"It looks like the aliens got the best\\nof you and humanity \" + \n\t\t\t\t\t\t\"is\\ndoomed... better luck next time!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(this.iAlienHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis.iHP += 10;\n\t\t\t\t\tthis.inventory.add(\"Steampunk Mach. II Riflesword\");\n\t\t\t\t\tsetEquippedWeapon(\"Steampunk Mach. II Riflesword\");\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you\"\n\t\t\t\t\t\t+ \" killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t+ \"you find a health pack that increases your health by 10. The \"\n\t\t\t\t\t\t+ \"alien also\\ndropped a Steampunk Mach. II Riflesword! This weapon\"\n\t\t\t\t\t\t+ \" looks quite menacing.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you\"\n\t\t\t\t\t\t\t+ \" killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t\t+ \"you find a health pack that increases your health by 10. The \"\n\t\t\t\t\t\t\t+ \"alien also\\ndropped a Steampunk Mach. II Riflesword! This weapon\"\n\t\t\t\t\t\t\t+ \" looks quite menacing.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (enemy.equals(\"boss\"))\n\t\t{\n\t\t\tif(evaluateInventory(\"Manhole Cover Shield\"))\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 50;\n\t\t\t\tthis.iAlienMaxDmg = 10;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 2;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 50;\n\t\t\t\tthis.iAlienMaxDmg = 12;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 4;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\n\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t}\n\t\t\t\n\t\t\tif (evaluateInventory(\"Edison Grenade\"))\n\t\t\t{\n\t\t\t\tthis.inventory.remove(\"Edison Grenade\");\n\t\t\t\tthis.iAlienHP -= 20;\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You lob the Edison Grenade to start the battle and hide \"\n\t\t\t\t\t+ \"behind a cluster\\nof stalagmite. A few seconds later, the grenade\"\n\t\t\t\t\t+ \" explodes dealing 20\\ndamage to the boss alien!\\n\\nBoss Alien HP \" +\n\t\t\t\t\t\"left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You lob the Edison Grenade to start the battle and hide \"\n\t\t\t\t\t\t+ \"behind a cluster\\nof stalagmite. A few seconds later, the grenade\"\n\t\t\t\t\t\t+ \" explodes dealing 20 damage to the boss alien!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\twhile (this.iHP > 0 && this.iAlienHP > 0)\n\t\t\t{\n\t\t\t\tthis.iDmgDealt = random.nextInt(this.iMaxDmg - this.iMinDmg) + \n\t\t\t\t\tthis.iMinDmg;\n\t\t\t\tthis.iAlienHP -= this.iDmgDealt;\n\t\t\t\t\n\t\t\t\tthis.iDmgTaken = random.nextInt(this.iAlienMaxDmg - this.iAlienMinDmg) +\n\t\t\t\t\tthis.iAlienMinDmg;\n\t\t\t\tthis.iHP -= this.iDmgTaken;\n\t\t\t\t\n\t\t\t\tif (this.iHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tsetPlayerState(false);\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Oh no! You took \" + this.iDmgTaken + \" damage and died! \" +\n\t\t\t\t\t\t\"It looks like the aliens got the best\\nof you and humanity \" + \n\t\t\t\t\t\t\"is\\ndoomed... better luck next time!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(this.iAlienHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis.inventory.add(\"Platinum Key\");\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you \"\n\t\t\t\t\t\t+ \"have killed the boss alien! He drops the\\n\" +\n\t\t\t\t\t\t\"Platinum Key!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Pick up Platinum Key\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you \"\n\t\t\t\t\t\t\t+ \"have killed the boss alien! He drops the\\n\" +\n\t\t\t\t\t\t\t\"Platinum Key!\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Pick up Platinum Key\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nBoss Alien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nBoss Alien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void attack(){\n activity = CreatureActivity.ATTACK;\n createWeapon();\n endAttack = new CountDown(20); //100\n endAnimationAttack = new CountDown(100);\n }", "public static double getWeaponDamage(Item weapon, Skill attStrength) {\n/* 2348 */ if (weapon.isBodyPart() && weapon.getAuxData() != 100) {\n/* */ \n/* */ try {\n/* */ \n/* 2352 */ float f = Server.getInstance().getCreature(weapon.getOwnerId()).getCombatDamage(weapon);\n/* */ \n/* 2354 */ return (f + Server.rand.nextFloat() * f * 2.0F);\n/* */ }\n/* 2356 */ catch (NoSuchCreatureException nsc) {\n/* */ \n/* 2358 */ logger.log(Level.WARNING, \"Could not find Creature owner of weapon: \" + weapon + \" due to \" + nsc.getMessage(), (Throwable)nsc);\n/* */ \n/* */ }\n/* 2361 */ catch (NoSuchPlayerException nsp) {\n/* */ \n/* 2363 */ logger.log(Level.WARNING, \"Could not find Player owner of weapon: \" + weapon + \" due to \" + nsp.getMessage(), (Throwable)nsp);\n/* */ } \n/* */ }\n/* */ \n/* */ \n/* 2368 */ float base = 6.0F;\n/* 2369 */ if (weapon.isWeaponSword()) {\n/* */ \n/* 2371 */ base = 24.0F;\n/* */ }\n/* 2373 */ else if (weapon.isWeaponAxe()) {\n/* 2374 */ base = 30.0F;\n/* 2375 */ } else if (weapon.isWeaponPierce()) {\n/* 2376 */ base = 12.0F;\n/* 2377 */ } else if (weapon.isWeaponSlash()) {\n/* 2378 */ base = 18.0F;\n/* 2379 */ } else if (weapon.isWeaponCrush()) {\n/* 2380 */ base = 36.0F;\n/* 2381 */ } else if (weapon.isBodyPart() && weapon.getAuxData() == 100) {\n/* */ \n/* 2383 */ base = 6.0F;\n/* */ } \n/* 2385 */ if (weapon.isWood()) {\n/* 2386 */ base *= 0.1F;\n/* 2387 */ } else if (weapon.isTool()) {\n/* 2388 */ base *= 0.3F;\n/* */ } \n/* 2390 */ base = (float)(base * (1.0D + attStrength.getKnowledge(0.0D) / 100.0D));\n/* */ \n/* 2392 */ float randomizer = (50.0F + Server.rand.nextFloat() * 50.0F) / 100.0F;\n/* */ \n/* 2394 */ return base + (randomizer * base * 4.0F * weapon.getQualityLevel() * weapon.getDamagePercent()) / 10000.0D;\n/* */ }", "public void attack(Person victim)\r\n { \r\n int victimDef = 0;\r\n int hits = 0;\r\n String weaponName = \"bare hands\";\r\n \r\n victimDef = victim.getDef();\r\n \r\n //1/4 chance of critical or twice damage \r\n hits = (attack - victimDef) + (int)((Math.random()*(attack*.3))-(attack*.15));\r\n if (hits < 0)\r\n hits = 0;\r\n \r\n if (weapon!=null)\r\n weaponName = weapon.getName();\r\n \r\n //1/6 chance of missing when attacking\r\n if (!victim.equals(this))\r\n {\r\n if(Game.random(6)!=0)\r\n {\r\n //1/4 chance of double damage\r\n if (Game.random(8)!=0)\r\n say(\"I attack \" + victim.getName() + \" with my \" + weaponName);\r\n else \r\n {\r\n say(\"I inflict critical damage on \" + victim.getName() + \" with my \" + weaponName);\r\n hits += hits;\r\n }\r\n victim.suffer(hits);\r\n }\r\n else\r\n say(\"AHHH I attacked, but \" + victim.getName() + \" dodged my attack!\");\r\n }\r\n \r\n //if victim dies, hero's maxHealth increases\r\n if (victim.getHealth()<=0)\r\n {\r\n maxHealth += 10;\r\n attack += 2;\r\n defense += 1;\r\n }\r\n }", "public void receiveAttack(Character c,Abilities ability) {\n this.applyEffect(ability.getEffects());\n }", "public void equipWeaponToCharacter (IPlayerCharacter character) {\n if (lenInventory > 1){\n character.equip(this.weaponsInventory.get(this.pointInventory));\n }\n }", "public void attack(ItemWeapon w, Monster target) {\n\t\ttarget.takeDamage(w.getDamage()+level*20);\n\t}", "public void AIDamage() {\r\n\t\tif (attackStyle == 2) {\r\n\t\t\tfor(int i = 0; i < AIObject.length; i++) {\r\n\t\t\t\tif ((inFlight) && (Math.abs(aX-AIObject[i].getAIX()) < 5) && (Math.abs(aY-AIObject[i].getAIY())) < 4 ) {\r\n\t\t\t\t\tAIObject[i].setHealth(-25 * damageReduction);\r\n\t\t\t\t\tdrawArrow = false;\r\n\t\t\t\t\tcooldown = 15;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tif (mouseLeft) {\r\n\t\t\t\tfor(int i = 0; i < AIObject.length; i++){\r\n\t\t\t\t\tif ((drawSword) && (cooldown == 0) && (playerObject[0].getX() -AIObject[i].getAIX() <85) && (playerObject[0].getX()-AIObject[i].getAIX() >-1) && (playerObject[0].getY() - AIObject[i].getAIY() < 20) && (playerObject[0].getY()-AIObject[i].getAIY()>-5)) {\r\n\t\t\t\t\t\tAIObject[i].setHealth(-50 * damageReduction);\r\n\t\t\t\t\t\tcooldown = 5;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else {\r\n\t\t\t\tfor(int i=0; i < AIObject.length; i++){\r\n\t\t\t\t\tif ((drawSword) && (cooldown == 0) && (AIObject[i].getAIX()-playerObject[0].getX() <85) && (AIObject[i].getAIX() - playerObject[0].getX() > -1) && (playerObject[0].getY() - AIObject[i].getAIY() < 20) && (playerObject[0].getY()-AIObject[i].getAIY()>-5)) {\r\n\t\t\t\t\t\tAIObject[i].setHealth(-50 * damageReduction);\r\n\t\t\t\t\t\tcooldown = 5;\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\tfor(int i=0; i < AIObject.length; i++){\r\n\t\t\t//checks if AI is close enough to attack with melee\r\n\t\t\tfor (int j = 0; j < playerObject.length; j++) {\r\n\t\t\t\tif ((!shield) && (Math.abs(AIObject[i].getAIX() - playerObject[j].getX()) <= 10) && (Math.abs(AIObject[i].getAIY() - playerObject[j].getY())) <= 3) {\r\n\t\t\t\t\tplayerObject[j].setHealth(DAMAGE_AMOUNT * difficulty);\r\n\t\t\t\t\tif (playerObject[j].getHealth() <= 0) {\r\n\t\t\t\t\t\tdead = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void attack(DungeonCharacter that)\r\n\t{\n\t}", "public void abilityOne() {\n ability(map.getCurrentTurnHero().getAbilities().get(0));\n }", "public void takeDamage(int damage);", "int attack(Unit unit, Unit enemy);", "private void takeDamage(int damage){ health -= damage;}", "public Weapon(){\n \n name = \"Claw\"; // will be treated as a sword\n type = 'R';\n advType = 'G';\n disType = 'B';\n mt = 4;\n hit = 85;\n crit = 0;\n wt = 1;\n isMagic = true;\n \n }", "@EventHandler(priority = EventPriority.MONITOR)\n\tvoid onPlayerInteract(PlayerInteractEntityEvent event)\n\t{\n\t\tPlayer player = event.getPlayer();\n\t\tisHealingOther = true;\n\t\t\n\t\t//Check that the player right-clicked on another player.\n\t\tif (!(event.getRightClicked() instanceof Player))\n\t\t\treturn;\n\n \t//Check if the item in hand fits any of the items specified in the configuration file.\t\t\n \tSet <String> items;\n \ttry { items = config.getConfigurationSection(\"healing.\").getKeys(false); }\n \tcatch (NullPointerException e)\n \t{ return; }\n \t\n \tString item = null;\n \tfor (String i: items)\n \t\tif (player.getItemInHand().getType().toString().equalsIgnoreCase(i))\n \t\t\titem = i;\n \t\n \t//If the item isn't found, it's not a healing item.\n \tif (item == null)\n \t\treturn;\n \t\n\t\t//Check if the amount to heal is in the config\n \tSet<String> professionsRequired;\n \ttry { professionsRequired = config.getConfigurationSection(\"healing.\" + item).getKeys(false); }\n \tcatch (NullPointerException e)\n \t{ return; }\n \t\n \tfor (String p: professionsRequired)\n \t{\n \t\tProfessionStats prof = new ProfessionStats(perms, data, config, player.getUniqueId());\n \t\t\n \t\tif (p == null)\n \t\t\tcontinue;\n \t\t\n \tProfessionHandler profHandler = new ProfessionHandler(perms, data, config);\n \t\n \tdouble amountToHeal = config.getInt(\"healing.\" + item + \".\" + p + \".\"\n\t\t\t\t\t+ profHandler.getTierName(prof.getTier(p)));\n \tif (amountToHeal == 0)\n \t{\n \t\tplayer.sendMessage(ChatColor.RED + \"You do not have the skill required to do this!\");\n \t\treturn;\n \t}\n \t\n \t//Check that the recipient has missing health.\n \t\tPlayer recipient = (Player) event.getRightClicked();\n \t\tif (recipient.getHealth() >= 20)\n \t\t{\n \t\t\tplayer.sendMessage(ChatColor.YELLOW + recipient.getName() + \" does not need bandaging!\");\n \t\t\treturn;\n \t\t} \n \t\t\n \t//Check that it won't take you over the maximum amount of health.\n \tif (recipient.getHealth() + amountToHeal > 20)\n \t\tamountToHeal = 20 - recipient.getHealth();\n \t\t\n \t\tplayer.sendMessage(ChatColor.YELLOW + \"Bandaging...\");\n \t\tString name = player.getCustomName();\n \t\tif (name == null)\n \t\t\tname = player.getName();\n \t\trecipient.sendMessage(ChatColor.YELLOW + name + \" is bandaging you...\");\n \t\t\n \t\t//Schedule the task in one second.\n \t\tmakeDelayedTask(player, recipient, amountToHeal, item, p, player.getLocation(), recipient.getLocation());\n \t}\n\t}", "public void attack(Entity entity, boolean aoe) {\n if(aoe) entity.damaged((int) (this.damage*0.6));\n else entity.damaged(this.damage);\n if(entity.isDead()){\n incExp(entity.getLevel()*9);\n if(entity instanceof Boss) {\n this.bossesDefeated++;\n }\n }\n }", "public void attack(Entity entity) {\n\t}", "public static void combatPlayer(Player atk, EnemyObject def){\n\t\tif(atk.stat.getType() != def.stat.getType() ){\n\n\t\t\t\tint atkDamage = 0;\n\t\t\t\tatkDamage = atk.stat.toDamage();\n\t\t\t\tdef.stat.getDamage(atkDamage);\n\t\t\t\t//System.out.println(\"Attack!\");\n\t\t\t\t//System.out.println(\"Enemy get \"+ atkDamage + \" Damage\");\n\t\t\t\tif(def.stat.checkAlive()==false){\n\t\t\t\t\t//check the object die or not.\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(def.stat.getType()==1){\n\t\t\t\t\t//System.out.println(\"Enemy Die\");\n\t\t\t\t\t\t//def.remove(0);\n\t\t\t\t\t\t//enemy die.\n\t\t\t\t\t\t//give exp to the user.\n\t\t\t\t\t\tint exp = def.stat.giveExp();\n\t\t\t\t\t\t\n\t\t\t\t\t\tatk.stat.getExp(exp);\n\t\t\t\t\t\t//System.out.println(\"Player get \"+exp+ \" exp\");\n\t\t\t\t\t\t//destroy the enemy object.-> ??\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\n\t\t\t\t//System.out.println(\"\\n\\nEvent number : \" + atk.stat.getEventNum()+\" \\n\");\n /*\n\t\t\t\tSystem.out.println(\"Enemy Health: \" + def.stat.getHP());\n\t\t\t\tSystem.out.println(\"\\n\\n Player Stat: \");\n\t\t\t\tSystem.out.println(\"\\nPlayer HP: \"+atk.stat.getHP());\n\t\t\t\tSystem.out.println(\"Level: \"+atk.stat.getLv());\n\t\t\t\tSystem.out.println(\"STR: \"+atk.stat.getStr());\n\t\t\t\tSystem.out.println(\"DEX: \"+atk.stat.getDex());\n\t\t\t\tSystem.out.println(\"Wis: \"+atk.stat.getWis());\n\t\t\t\tSystem.out.println(\"Con: \"+atk.stat.getCon()+\"\\n\");\t*/\t\t\t\n\t\t}\n\t}", "public int attack(Weapon byWeapon) {\n\t\treturn byWeapon.getDamage();\n\t}", "public void attack(Character character) {\r\n\t\tint damageDealt = this.atk - character.def;\r\n\t\tif(damageDealt <= 0) {\r\n\t\t\tdamageDealt = 1;\r\n\t\t}\r\n\t\tcharacter.setHp(character.hp - damageDealt);\r\n\t\tSystem.out.println(\"[\" + this.getName().toUpperCase() + \"] strikes [\" + character.getName()\r\n\t\t\t\t+ \"] for \" + damageDealt + \" damage!\");\r\n\t}", "public void equip(Equip equipment)\r\n { \r\n if (equipment.getType() == Equip.WEAPON)\r\n {\r\n if (weapon!=null) unequip(weapon);\r\n items.remove(equipment);\r\n weapon = equipment;\r\n attack = attack + equipment.getRating();\r\n }\r\n else //if (equipment.getType() == Equip.ARMOR)\r\n {\r\n if (armor!=null) unequip(armor);\r\n items.remove(equipment);\r\n armor = equipment;\r\n defense += equipment.getRating();\r\n }\r\n }", "AbilityTarget getAbilityTarget();", "public void useWeapon(Character victim) {\n Weapons weapons = this.getInventory().getFirstWeapon();\n if (weapons == null)\n this.hit(victim);\n else {\n int vStrength = victim.getStrength();\n int mStrength = this.getStrength() * Hero.HERO_BONUS_OVER_ALL_CHARS + weapons.getDamage();\n if (vStrength >= mStrength) return;\n int strDif = mStrength - vStrength;\n int vLife = victim.getLife();\n vLife -= strDif;\n victim.setLife(vLife);\n this.getInventory().removeItems(weapons);\n }\n }", "private static int playerTotalAttack(String [] weaponEquip, int playerAttack, int strength){\r\n int totalAttack = 0;\r\n int shortSwordAttack;\r\n int greatSwordAttack;\r\n int longSwordAttack;\r\n int hongerAttack;\r\n shortSword ShortSword = new shortSword();\r\n longSword LongSword = new longSword();\r\n greatSword GreatSword = new greatSword();\r\n heavenSmitingDevilSlayerSword Honger = new heavenSmitingDevilSlayerSword();\r\n switch(weaponEquip[0]){\r\n case \"Short Sword\":\r\n shortSwordAttack = ShortSword.getAttack();\r\n totalAttack = playerAttack + strength + shortSwordAttack;\r\n break;\r\n case \"Long Sword\":\r\n longSwordAttack = LongSword.getAttack();\r\n totalAttack = playerAttack + strength + longSwordAttack;\r\n break;\r\n case \"Great Sword\":\r\n greatSwordAttack = GreatSword.getAttack();\r\n totalAttack = playerAttack + strength + greatSwordAttack;\r\n break;\r\n case \"Heaven Smiting Devil Slayer Sword\":\r\n hongerAttack = Honger.getAttack();\r\n totalAttack = playerAttack + strength + hongerAttack;\r\n break;\r\n default:\r\n totalAttack = playerAttack + strength;\r\n break;\r\n }\r\n return totalAttack;\r\n }", "@Test\n void doEffectheatseeker() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"heatseeker\");\n Weapon w4 = new Weapon(\"heatseeker\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n wd.addWeapon(w4);\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w4);\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w4.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(10));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n try{\n p.getPh().getWeaponDeck().getWeapon(w4.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3);\n }", "public void performAbility() { return; }", "public void attack() {\n energy = 2;\n redBull = 0;\n gun = 0;\n target = 1;\n // if Player is in range take off a life.\n if (CharacterTask.ghostLocation == GameWindow.playerLocation) {\n playerLives = playerLives - 1;\n System.out.println(\"Player Lives: \" + playerLives);\n }\n }", "void applyThornEnchantments(EntityLivingBase var0, Entity var1);", "public void attack(Player player) {\n this.damage = 18 - player.getfPoint(); // the higher the Fighter skill,\n // the lower the damage. change the math.\n int newHealth = player.getShip().getHealth() - damage;\n player.getShip().setHealth(newHealth);\n }", "@Override\n\tpublic void reduceCurrentHp(final double damage, final L2Character attacker, final boolean awake)\n\t{\n\t\t/*\n\t\t * if ((this instanceof L2SiegeGuardInstance) && (attacker instanceof L2SiegeGuardInstance)) //if((this.getEffect(L2Effect.EffectType.CONFUSION)!=null) && (attacker.getEffect(L2Effect.EffectType.CONFUSION)!=null)) return; if ((this instanceof L2MonsterInstance)&&(attacker instanceof\n\t\t * L2MonsterInstance)) if((this.getEffect(L2Effect.EffectType.CONFUSION)!=null) && (attacker.getEffect(L2Effect.EffectType.CONFUSION)!=null)) return;\n\t\t */\n\t\t\n\t\tif (isRaid() && attacker != null && attacker.getParty() != null && attacker.getParty().isInCommandChannel() && attacker.getParty().getCommandChannel().meetRaidWarCondition(this))\n\t\t{\n\t\t\tif (firstCommandChannelAttacked == null) // looting right isn't set\n\t\t\t{\n\t\t\t\tsynchronized (this)\n\t\t\t\t{\n\t\t\t\t\tif (firstCommandChannelAttacked == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tfirstCommandChannelAttacked = attacker.getParty().getCommandChannel();\n\t\t\t\t\t\tif (firstCommandChannelAttacked != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcommandChannelTimer = new CommandChannelTimer(this);\n\t\t\t\t\t\t\tcommandChannelLastAttack = System.currentTimeMillis();\n\t\t\t\t\t\t\tThreadPoolManager.getInstance().scheduleGeneral(commandChannelTimer, 10000); // check for last attack\n\t\t\t\t\t\t\tfirstCommandChannelAttacked.broadcastToChannelMembers(new CreatureSay(0, Say2.PARTYROOM_ALL, \"\", \"You have looting rights!\")); // TODO: retail msg\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (attacker.getParty().getCommandChannel().equals(firstCommandChannelAttacked)) // is in same channel\n\t\t\t{\n\t\t\t\tcommandChannelLastAttack = System.currentTimeMillis(); // update last attack time\n\t\t\t}\n\t\t}\n\t\t/*\n\t\t * // CommandChannel if(commandChannelTimer == null && isRaid() && attacker != null) { if(attacker.isInParty() && attacker.getParty().isInCommandChannel() && attacker.getParty().getCommandChannel().meetRaidWarCondition(this)) { firstCommandChannelAttacked = attacker.getParty().getCommandChannel();\n\t\t * commandChannelTimer = new CommandChannelTimer(this, attacker.getParty().getCommandChannel()); ThreadPoolManager.getInstance().scheduleGeneral(_commandChannelTimer, 300000); // 5 min firstCommandChannelAttacked.broadcastToChannelMembers(new CreatureSay(0, Say2.PARTYROOM_ALL, \"\",\n\t\t * \"You have looting rights!\")); } }\n\t\t */\n\t\tif (isEventMob)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Add damage and hate to the attacker AggroInfo of the L2Attackable aggroList\n\t\tif (attacker != null)\n\t\t{\n\t\t\taddDamage(attacker, (int) damage);\n\t\t}\n\t\t\n\t\t// If this L2Attackable is a L2MonsterInstance and it has spawned minions, call its minions to battle\n\t\tif (this instanceof L2MonsterInstance)\n\t\t{\n\t\t\tL2MonsterInstance master = (L2MonsterInstance) this;\n\t\t\t\n\t\t\tif (this instanceof L2MinionInstance)\n\t\t\t{\n\t\t\t\tmaster = ((L2MinionInstance) this).getLeader();\n\t\t\t\t\n\t\t\t\tif (!master.isInCombat() && !master.isDead())\n\t\t\t\t{\n\t\t\t\t\tmaster.addDamage(attacker, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (master.hasMinions())\n\t\t\t{\n\t\t\t\tmaster.callMinionsToAssist(attacker);\n\t\t\t}\n\t\t\t\n\t\t\tmaster = null;\n\t\t}\n\t\t\n\t\t// Reduce the current HP of the L2Attackable and launch the doDie Task if necessary\n\t\tsuper.reduceCurrentHp(damage, attacker, awake);\n\t}", "@Override\n\tpublic void onDamage(WorldObj obj, Items item) {\n\n\t\tif(is_stunned) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint dmg = (int) item.type.ATK;\n\t\t\n\t\tOnScreenText.AddText(\"\"+dmg, bounds.x , bounds.y + 1.1f);\n\t\t\n\t\tvelX = obj.direction * 5;\n\t\tvelY = 5;\n\t\tgrounded = false;\n\t\t\n\t\tHP -= dmg;\n\t\t\n\n\t\tstun_counter = 0;\n\t\t\n\t\tif(HP <= 0 && !isDead) {\n\t\t\tonDeath();\n\t\t}\n\t\t\n\t}", "public short getSiegeWeaponDamage();", "@Test\n void doEffecthellion() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"hellion\");\n Weapon w5 = new Weapon(\"hellion\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n wd.addWeapon(w5);\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w5);\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w5.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('b'));\n Terminator t = new Terminator('e', Board.getSpawnpoint('b'));\n t.setOwnerColor(victim.getColor());\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n players.add(t);\n try{\n p.getPh().getWeaponDeck().getWeapon(w5.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().getMarkedDamages('b') == 1 && victim.getPb().countDamages() == 1 && t.getPb().getMarkedDamages('b') == 1);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('b'));\n t = new Terminator('e', Board.getSpawnpoint('b'));\n t.setOwnerColor(victim.getColor());\n players.clear();\n players.add(victim);\n players.add(t);\n\n try{\n p.getPh().getWeaponDeck().getWeapon(w5.getName()).doEffect(\"alt\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().getMarkedDamages('b') == 2 && victim.getPb().countDamages() == 1 && t.getPb().getMarkedDamages('b') == 2);\n }", "@Override\n\tpublic int attack( ){\n\t\treturn enemy.attack();\n\t}", "public static void battle(int choice) {\n \t\tboolean monsterHeal = false;\r\n \t\tboolean monsterDefend = false;\r\n \t\tboolean monsterAttack = false;\r\n \t\tboolean playerDefend = false;\r\n \t\tboolean playerAttack = false;\r\n \t\tboolean playerHeal = false;\r\n \t\t\r\n \t\t//Get the move the monster will make\r\n \t\tint monsterAi = monster.getAiChoice();\r\n \t\t\r\n \t\t//Check what input the player has given\r\n \t\tif(choice == 1) {\r\n \t\t\t//Set the booleans according to the input for attack\r\n \t\t\tplayerAttack = true;\r\n \t\t\tplayerDefend = false;\r\n \t\t\tplayerHeal = false;\r\n \t\t} else if(choice == 2) {\r\n \t\t\t//Set the booleans according to the input for defend\r\n \t\t\tplayerDefend = true;\r\n \t\t\tplayerAttack = false;\r\n \t\t\tplayerHeal = false;\r\n \t\t} else if(choice == 3) {\r\n \t\t\t//Set the booleans according to the input for heal\r\n \t\t\tplayerAttack = false;\r\n \t\t\tplayerDefend = false;\r\n \t\t\tplayerHeal = true;\r\n \t\t} else {\r\n \t\t\t//Set the player not to do anything if the input is wrong\r\n \t\t\tplayerAttack = false;\r\n \t\t\tplayerDefend = false;\r\n \t\t\tplayerHeal = false;\r\n \t\t}\r\n \t\t\r\n \t\t//Link the monster AI choice to a move\r\n \t\tif(monsterAi == 1) {\r\n \t\t\t//Set the booleans according to the AI for attack\r\n \t\t\tmonsterAttack = true;\r\n \t\t\tmonsterDefend = false;\r\n \t\t\tmonsterHeal = false;\r\n \t\t} else if(monsterAi == 2) {\r\n \t\t\t//Set the booleans according to the AI for defend\r\n \t\t\tmonsterAttack = true;\r\n \t\t\tmonsterDefend = false;\r\n \t\t\tmonsterHeal = false;\r\n \t\t} else if(monsterAi == 3) {\r\n \t\t\t//Set the booleans according to the AI for heal\r\n \t\t\tmonsterAttack = false;\r\n \t\t\tmonsterDefend = false;\r\n \t\t\tmonsterHeal = true;\r\n \t\t}\r\n \t\t\r\n \t\tString pFirst = \"\";\r\n \t\tString mFirst = \"\";\r\n \t\tString mAttack = \"\";\r\n \t\tString pAttack = \"\";\r\n \t\tString pLife = \"\";\r\n \t\tString mLife = \"\";\r\n \t\t\r\n \t\t//Player moves\r\n \t\tif(playerHeal) {\r\n \t\t\t//Heal the player by 10 life\r\n \t\t\tplayer.Heal(10);\r\n \t\t\t//Show a message saying the player was healed\r\n \t\t\tpFirst = player.name + \" healed 10 life! \\n\";\r\n \t\t} else if(playerDefend) {\r\n \t\t\t//Set the monster not to attack (do damage)\r\n \t\t\tmonsterAttack = false;\r\n \t\t\t//Shows a message that the player has defended\r\n \t\t\tpFirst = player.name + \" defended and has got 0 damage from \" + monster.name + \"\\n\";\r\n \t\t} else if(!playerAttack && !playerDefend && !playerHeal) {\r\n \t\t\t//Show a message that the player did not do anything\r\n \t\t\tpFirst = player.name + \" did nothing. \\n\";\r\n \t\t} \r\n \t\t\r\n \t\t//Monster moves\r\n \t\tif(monsterHeal) {\r\n \t\t\t//heal the monster by 10 life\r\n \t\t\tmonster.Heal(10);\r\n \t\t\t//Show a message that the monster was healed\r\n \t\t\tmFirst = (monster.name + \" healed 10 life! \\n\");\r\n \t\t} else if(monsterDefend) {\r\n \t\t\t//Set the player not to attack (do damage)\r\n \t\t\tplayerAttack = false;\r\n \t\t\t//Show a message that the monster has defended\r\n \t\t\tmFirst = monster.name + \" defended and has got 0 damage from \" + player.name + \"\\n\";\r\n \t\t}\r\n \t\t\r\n \t\t//Attack moves\r\n \t\tif(playerAttack) {\r\n \t\t\t//Lower the monsters life by the players power\r\n \t\t\tmonster.life -= player.strength;\r\n \t\t} \r\n \t\t\r\n \t\tif(monsterAttack) {\r\n \t\t\t//Lower the players life by the monsters power\r\n \t\t\tplayer.life -= monster.strength;\r\n \t\t}\r\n \t\tif(playerAttack) {\r\n \t\t\t//Show a message that the player has attacked\r\n \t\t\tpAttack = player.name + \" hit \" + monster.name + \" for \" + player.strength + \" damage. \\n\";\r\n \t\t}\r\n \t\tif(monsterAttack) {\r\n \t\t\t//Show a message that the monster has attacked\r\n \t\t\tmAttack = monster.name + \" hit \" + player.name + \" for \" + monster.strength + \" damage. \\n\";\r\n \t\t}\r\n \t\t\r\n \t\t//Show the current life for the player and the monster\r\n \t\tpLife = player.name + \" does now have \" + player.life + \" life left. \\n\";\r\n \t\tmLife = monster.name + \" does now have \" + monster.life + \" life left. \\n\";\r\n \t\t\r\n \t\t//Print the moves message\r\n \t\tMainGame.display.disp(pFirst + mFirst + pAttack + mAttack + pLife + mLife);\r\n \t\t\r\n\t\t//Check if the player is still alive\r\n \t\tif(player.life <= 0) {\r\n \t\t\t\r\n \t\t\t//If the player has no life left, show him that he has lost\r\n \t\t\tMainGame.display.disp(\"Too bad! You lost!\" + \"\\n\" + \"Play again?\");\r\n \t\t\t\r\n \t\t\t//Show the option to play again\r\n \t\t\tMainGame.display.Enable(MainGame.display.playAgain);\r\n \t\t}\r\n \t\t\r\n\t\t//Check if the monster is still alive\r\n \t\tif(monster.life <= 0) {\r\n \t\t\t\r\n \t\t\tplayer.xp += monster.giveXp;\r\n \t\t\tMainGame.display.disp(\"You beat \" + monster.name + \"! \\n\" + \"You got \" + monster.giveXp + \" XP!\" + \"\\n\" + \"You now have \" + player.xp + \" XP!\");\r\n \t\t\t\r\n \t\t\tMainGame.display.Enable(MainGame.display.continueStage);\r\n \t\t}\r\n \t\t\r\n\t\tMainGame.display.Enable(MainGame.display.continueFight);\r\n \t\r\n \t}", "public void takeDamage(double damage){\n damage -= this.armor;\n this.health -= damage;\n }", "@Override\n public void attackedByPaladin(double attack) {\n this.attack += (2 * attack) / 3;\n damageCounter = Math.max(damageCounter - (2 * attack) / 3, 0);\n }", "public abstract String forceAttack(Humanoid enemy);", "void basicAttack(Character attacked);", "public void gainExperience(Combatant opponent) { }", "@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 }", "public void damage(Hero other) {\n this.weapon.knockBack(other, this.state, this.dir);\n }", "public void attack(Entity defender) {\n\t\tboolean canAttack = true;\n\n\t\tif ((abilities[3] == false && abilities[2] == false)\n\t\t\t\t&& (Math.abs(defender.getPosX() - xCoordinate) > 1 || Math.abs(defender.getPosY() - yCoordinate) > 1))\n\t\t\treturn; // if not in range, don't attack (also cant attack self)\n\n\t\tfor (int i = xCoordinate - 1; i <= xCoordinate + 1; i++) {\n\t\t\tfor (int j = yCoordinate - 1; j <= yCoordinate + 1; j++) {\n\t\t\t\tif (Game.game.getEntityAt(i, j) != null && Game.game.getEntityAt(i, j) != this\n\t\t\t\t\t\t&& Game.game.getEntityAt(i, j).hasAbility(0)) {\n\t\t\t\t\tcanAttack = false; // checks to see if there is any provoke\n\t\t\t\t\t\t\t\t\t\t// troops adjacent to attacker\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (canAttack == false) // if something had provoke...\n\t\t{\n\t\t\tif (Math.abs(defender.getPosX() - xCoordinate) <= 1 && Math.abs(defender.getPosY() - yCoordinate) <= 1\n\t\t\t\t\t&& defender.hasAbility(0)) { // if the defender is in range,\n\t\t\t\t\t\t\t\t\t\t\t\t\t// and has provoke. attack\n\t\t\t\t\t\t\t\t\t\t\t\t\t// it\n\t\t\t\tif (abilities[2]) // but if it has blast, also attack everything\n\t\t\t\t\t\t\t\t\t// else in row/col up until void troop\n\t\t\t\t{\n\t\t\t\t\tblastAttack(defender);\n\t\t\t\t} else if (abilities[0] || abilities[1] || abilities[3] || abilities[4]) {\n\t\t\t\t\tdealDamage(defender);\n\t\t\t\t}\n\t\t\t}\n\t\t} else // if there is nothing with provoke, you can just attack\n\t\t{\n\t\t\tif (abilities[2]) // if it has blast attack everything else in\n\t\t\t\t\t\t\t\t// row/col up until void troop\n\t\t\t{\n\t\t\t\tblastAttack(defender);\n\t\t\t} else if (abilities[0] || abilities[1] || abilities[3] || abilities[4]) {\n\t\t\t\tdealDamage(defender);\n\t\t\t}\n\t\t}\n\t}", "public void attack(Player p){\n p.takeDamage(damage);\n }", "@Deprecated\n/* */ protected static boolean performAttack(int pos, boolean aiming, Creature performer, Skills performerSkills, Creature defender, Skills defenderSkills, Item attWeapon, Item defPrimWeapon, double attBonus, double defBonus, Skill attackerFightSkill, Skill defenderFightSkill, int counter) {\n/* 829 */ boolean shieldBlocked = false;\n/* 830 */ boolean done = false;\n/* 831 */ Skill primWeaponSkill = null;\n/* 832 */ Skill defPrimWeaponSkill = null;\n/* 833 */ Item defShield = null;\n/* 834 */ Skill defShieldSkill = null;\n/* 835 */ int skillnum = -10;\n/* 836 */ boolean dryrun = false;\n/* */ \n/* 838 */ if (performer.isPlayer()) {\n/* */ \n/* 840 */ if (defender.isPlayer() || defender.isReborn()) {\n/* */ \n/* */ \n/* 843 */ dryrun = true;\n/* */ }\n/* 845 */ else if (defender.isKingdomGuard() || (defender\n/* 846 */ .isSpiritGuard() && defender.getKingdomId() == performer.getKingdomId())) {\n/* 847 */ dryrun = true;\n/* */ } \n/* 849 */ } else if (performer.isKingdomGuard() || (performer\n/* 850 */ .isSpiritGuard() && defender.getKingdomId() == performer.getKingdomId())) {\n/* 851 */ dryrun = true;\n/* 852 */ } if ((defender.isPlayer() && !defender.hasLink()) || (performer.isPlayer() && !performer.hasLink()))\n/* 853 */ dryrun = true; \n/* 854 */ if (defender.getStatus().getStunned() > 0.0F) {\n/* */ \n/* 856 */ defBonus -= 20.0D;\n/* 857 */ attBonus += 20.0D;\n/* */ } \n/* 859 */ if (attWeapon != null)\n/* */ {\n/* 861 */ if (attWeapon.isBodyPart()) {\n/* */ \n/* */ \n/* */ try {\n/* 865 */ skillnum = 10052;\n/* 866 */ primWeaponSkill = performerSkills.getSkill(skillnum);\n/* */ }\n/* 868 */ catch (NoSuchSkillException nss) {\n/* */ \n/* 870 */ if (skillnum != -10)\n/* 871 */ primWeaponSkill = performerSkills.learn(skillnum, 1.0F); \n/* */ } \n/* 873 */ if (performer.isPlayer() && defender.isPlayer())\n/* */ {\n/* 875 */ if (primWeaponSkill.getKnowledge(0.0D) >= 20.0D) {\n/* 876 */ dryrun = true;\n/* */ }\n/* */ }\n/* */ } else {\n/* */ \n/* */ \n/* */ try {\n/* 883 */ skillnum = attWeapon.getPrimarySkill();\n/* 884 */ primWeaponSkill = performerSkills.getSkill(skillnum);\n/* */ }\n/* 886 */ catch (NoSuchSkillException nss) {\n/* */ \n/* 888 */ if (skillnum != -10) {\n/* 889 */ primWeaponSkill = performerSkills.learn(skillnum, 1.0F);\n/* */ }\n/* */ } \n/* */ } \n/* */ }\n/* */ \n/* */ \n/* 896 */ skillnum = -10;\n/* 897 */ if (defPrimWeapon != null)\n/* */ {\n/* 899 */ if (defPrimWeapon.isBodyPart()) {\n/* */ \n/* */ \n/* */ try {\n/* 903 */ skillnum = 10052;\n/* 904 */ defPrimWeaponSkill = defenderSkills.getSkill(skillnum);\n/* */ }\n/* 906 */ catch (NoSuchSkillException nss) {\n/* */ \n/* 908 */ if (skillnum != -10)\n/* 909 */ defPrimWeaponSkill = defenderSkills.learn(skillnum, 1.0F); \n/* */ } \n/* 911 */ if (performer.isPlayer() && defender.isPlayer())\n/* */ {\n/* 913 */ if (defPrimWeaponSkill.getKnowledge(0.0D) >= 20.0D) {\n/* 914 */ dryrun = true;\n/* */ }\n/* */ }\n/* */ } else {\n/* */ \n/* */ \n/* */ try {\n/* 921 */ skillnum = defPrimWeapon.getPrimarySkill();\n/* 922 */ defPrimWeaponSkill = defenderSkills.getSkill(skillnum);\n/* */ }\n/* 924 */ catch (NoSuchSkillException nss) {\n/* */ \n/* 926 */ if (skillnum != -10) {\n/* 927 */ defPrimWeaponSkill = defenderSkills.learn(skillnum, 1.0F);\n/* */ }\n/* */ } \n/* */ } \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 939 */ Skill attStrengthSkill = null;\n/* */ \n/* */ try {\n/* 942 */ attStrengthSkill = performerSkills.getSkill(102);\n/* */ }\n/* 944 */ catch (NoSuchSkillException nss) {\n/* */ \n/* 946 */ attStrengthSkill = performerSkills.learn(102, 1.0F);\n/* 947 */ logger.log(Level.WARNING, performer.getName() + \" had no strength. Weird.\");\n/* */ } \n/* */ \n/* 950 */ double bonus = 0.0D;\n/* 951 */ if (primWeaponSkill != null) {\n/* */ \n/* 953 */ float mod = getMod(performer, defender, primWeaponSkill);\n/* 954 */ bonus = Math.max(-20.0D, primWeaponSkill.skillCheck(\n/* 955 */ Math.abs(primWeaponSkill.getKnowledge(0.0D) - attWeapon.getCurrentQualityLevel()), attBonus, (mod == 0.0F || dryrun), \n/* 956 */ (float)(long)Math.max(1.0F, counter * mod)));\n/* */ } \n/* */ \n/* */ \n/* 960 */ skillnum = -10;\n/* 961 */ defShield = defender.getShield();\n/* 962 */ if (defShield != null) {\n/* */ \n/* */ try {\n/* */ \n/* 966 */ skillnum = defShield.getPrimarySkill();\n/* 967 */ defShieldSkill = defenderSkills.getSkill(skillnum);\n/* */ }\n/* 969 */ catch (NoSuchSkillException nss) {\n/* */ \n/* 971 */ if (skillnum != -10) {\n/* 972 */ defShieldSkill = defenderSkills.learn(skillnum, 1.0F);\n/* */ }\n/* */ } \n/* */ }\n/* 976 */ if (aiming) {\n/* */ \n/* 978 */ if (pos == 1) {\n/* */ \n/* 980 */ bonus = -60.0D;\n/* */ }\n/* 982 */ else if (pos == 29) {\n/* */ \n/* 984 */ bonus = -80.0D;\n/* */ }\n/* 986 */ else if (pos == 2) {\n/* */ \n/* 988 */ bonus = -40.0D;\n/* */ }\n/* 990 */ else if (pos == 3) {\n/* */ \n/* 992 */ bonus = -30.0D;\n/* */ }\n/* 994 */ else if (pos == 4) {\n/* */ \n/* 996 */ bonus = -30.0D;\n/* */ }\n/* 998 */ else if (pos == 34) {\n/* */ \n/* 1000 */ bonus = -30.0D;\n/* */ } \n/* 1002 */ pos = getRealPosition(pos);\n/* */ } else {\n/* */ \n/* */ \n/* */ try {\n/* */ \n/* 1008 */ pos = defender.getBody().getRandomWoundPos();\n/* */ }\n/* 1010 */ catch (Exception ex) {\n/* */ \n/* 1012 */ logger.log(Level.WARNING, \"Problem getting a Random Wound Position for \" + defender.getName() + \": due to \" + ex\n/* 1013 */ .getMessage(), ex);\n/* */ } \n/* */ } \n/* 1016 */ if (performer.getEnemyPresense() > 1200 && defender.isPlayer())\n/* 1017 */ bonus += 20.0D; \n/* 1018 */ double attCheck = 0.0D;\n/* 1019 */ boolean defFumbleShield = false;\n/* 1020 */ boolean defFumbleParry = false;\n/* */ \n/* 1022 */ boolean crit = false;\n/* */ \n/* 1024 */ if (defender.isPlayer()) {\n/* */ \n/* 1026 */ int critChance = attWeapon.getDamagePercent();\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1032 */ if (Server.rand.nextInt(100 - Math.min(3, critChance)) == 0)\n/* */ {\n/* 1034 */ crit = true;\n/* */ }\n/* */ } \n/* */ \n/* */ \n/* 1039 */ if (attWeapon.isBodyPartAttached()) {\n/* */ \n/* 1041 */ float mod = getMod(performer, defender, attackerFightSkill);\n/* */ \n/* 1043 */ attCheck = attackerFightSkill.skillCheck(defenderFightSkill\n/* 1044 */ .getKnowledge(defBonus) / Math.min(5, defender.getAttackers()), bonus, (mod == 0.0F || dryrun), \n/* 1045 */ (float)(long)Math.max(1.0F, counter * mod));\n/* */ }\n/* */ else {\n/* */ \n/* 1049 */ float mod = getMod(performer, defender, attackerFightSkill);\n/* 1050 */ attCheck = attackerFightSkill.skillCheck(defenderFightSkill\n/* 1051 */ .getKnowledge(defBonus) / Math.min(5, defender.getAttackers()), attWeapon, bonus, (mod == 0.0F || dryrun), \n/* 1052 */ (float)(long)Math.max(1.0F, counter * mod));\n/* */ } \n/* 1054 */ byte type = (performer.getTemplate()).combatDamageType;\n/* 1055 */ if (attWeapon.isWeaponSword()) {\n/* */ \n/* 1057 */ if (Server.rand.nextInt(2) == 0) {\n/* 1058 */ type = 1;\n/* */ } else {\n/* 1060 */ type = 2;\n/* */ } \n/* 1062 */ } else if (attWeapon.isWeaponSlash()) {\n/* 1063 */ type = 1;\n/* 1064 */ } else if (attWeapon.isWeaponPierce()) {\n/* 1065 */ type = 2;\n/* 1066 */ } else if (attWeapon.isBodyPart()) {\n/* */ \n/* 1068 */ if (attWeapon.getTemplateId() == 17) {\n/* 1069 */ type = 3;\n/* 1070 */ } else if (attWeapon.getTemplateId() == 12) {\n/* 1071 */ type = 0;\n/* */ } \n/* */ } \n/* 1074 */ String attString = getAttackString(performer, attWeapon, type);\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1079 */ double defCheck = 0.0D;\n/* 1080 */ double damage = getWeaponDamage(attWeapon, attStrengthSkill);\n/* */ \n/* 1082 */ if (performer.getDeity() != null && performer.getDeity().isWarrior() && \n/* 1083 */ performer.getFaith() >= 40.0F && performer.getFavor() >= 20.0F)\n/* 1084 */ damage = Math.min(4000.0D, damage * 1.25D); \n/* 1085 */ if (performer.getEnemyPresense() > 1200 && defender.isPlayer()) {\n/* 1086 */ damage *= Math.min(4000.0F, 1.15F);\n/* */ }\n/* */ \n/* 1089 */ if (defShield != null || crit) {\n/* */ \n/* 1091 */ if (!crit)\n/* */ {\n/* 1093 */ if (pos == 9) {\n/* */ \n/* 1095 */ shieldBlocked = true;\n/* */ }\n/* 1097 */ else if (defender.getStatus().getStamina() >= 300 && !defender.isMoving()) {\n/* */ \n/* 1099 */ defCheck = 0.0D;\n/* 1100 */ if (defShieldSkill != null) {\n/* */ \n/* 1102 */ float mod = getMod(performer, defender, defShieldSkill);\n/* 1103 */ defCheck = defShieldSkill.skillCheck(attCheck, defShield, defBonus, (mod == 0.0F || dryrun), (float)(long)mod);\n/* */ } \n/* */ \n/* */ \n/* 1107 */ defCheck += (defShield.getSizeY() + defShield.getSizeZ()) / 10.0D;\n/* */ \n/* */ \n/* 1110 */ defender.getStatus().modifyStamina(-300.0F);\n/* */ } \n/* */ }\n/* 1113 */ if (defCheck > 0.0D || shieldBlocked) {\n/* */ \n/* 1115 */ shieldBlocked = true;\n/* 1116 */ if (defender.isPlayer()) {\n/* 1117 */ defShield.setDamage(defShield.getDamage() + 0.001F * (float)damage * defShield.getDamageModifier());\n/* */ }\n/* */ }\n/* 1120 */ else if (defCheck < -90.0D) {\n/* */ \n/* 1122 */ defFumbleShield = true;\n/* */ } \n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1134 */ if (!shieldBlocked || crit) {\n/* */ \n/* 1136 */ boolean parryPrimWeapon = true;\n/* 1137 */ defCheck = 0.0D;\n/* 1138 */ if (!crit && !defender.isMoving()) {\n/* */ \n/* 1140 */ int parryTime = 100;\n/* 1141 */ if (defender.getFightStyle() == 2) {\n/* 1142 */ parryTime = 40;\n/* 1143 */ } else if (defender.getFightStyle() == 1) {\n/* 1144 */ parryTime = 160;\n/* */ } \n/* 1146 */ if (WurmCalendar.currentTime > defender.lastParry + Server.rand.nextInt(parryTime) && \n/* 1147 */ defPrimWeapon != null && !defPrimWeapon.isWeaponAxe())\n/* */ {\n/* 1149 */ if (!defPrimWeapon.isBodyPart() || defPrimWeapon.getAuxData() == 100) {\n/* */ \n/* 1151 */ if (defender.getStatus().getStamina() >= 300) {\n/* */ \n/* 1153 */ if (defPrimWeaponSkill != null) {\n/* */ \n/* 1155 */ float mod = getMod(performer, defender, defPrimWeaponSkill);\n/* 1156 */ defCheck = defPrimWeaponSkill.skillCheck((attCheck * defender\n/* 1157 */ .getAttackers() + defPrimWeapon.getWeightGrams() / 200.0D) / \n/* 1158 */ getWeaponParryBonus(defPrimWeapon), defPrimWeapon, defBonus, (mod == 0.0F || dryrun), (float)(long)mod);\n/* */ \n/* 1160 */ defender.lastParry = WurmCalendar.currentTime;\n/* 1161 */ defender.getStatus().modifyStamina(-300.0F);\n/* */ } \n/* 1163 */ if (defCheck < -90.0D)\n/* */ {\n/* 1165 */ defFumbleParry = true;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* 1182 */ else if (defCheck < 0.0D && Server.rand.nextInt(50) == 0)\n/* */ {\n/* 1184 */ defCheck = secondaryParry(performer, attCheck, defender, defenderSkills, defCheck, defBonus, dryrun);\n/* */ \n/* 1186 */ if (defCheck < -90.0D) {\n/* */ \n/* 1188 */ defFumbleParry = true;\n/* */ }\n/* 1190 */ else if (defCheck > 0.0D) {\n/* 1191 */ parryPrimWeapon = false;\n/* */ }\n/* */ \n/* */ }\n/* */ \n/* */ } \n/* 1197 */ } else if (defender.getStatus().getStamina() >= 300) {\n/* */ \n/* 1199 */ if (defPrimWeaponSkill != null) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1204 */ float mod = getMod(performer, defender, defPrimWeaponSkill);\n/* 1205 */ defCheck = defPrimWeaponSkill.skillCheck(Math.min(100, 80 * defender.getAttackers()), defBonus, (mod == 0.0F || dryrun), (float)(long)mod);\n/* */ \n/* 1207 */ defender.lastParry = WurmCalendar.currentTime;\n/* 1208 */ defender.getStatus().modifyStamina(-300.0F);\n/* */ } \n/* 1210 */ if (defCheck < 0.0D && Server.rand.nextInt(50) == 0) {\n/* */ \n/* 1212 */ defCheck = secondaryParry(performer, attCheck, defender, defenderSkills, defCheck, defBonus, dryrun);\n/* */ \n/* 1214 */ if (defCheck < -90.0D) {\n/* */ \n/* 1216 */ defFumbleParry = true;\n/* */ }\n/* 1218 */ else if (defCheck > 0.0D) {\n/* 1219 */ parryPrimWeapon = false;\n/* */ } \n/* */ } \n/* */ } \n/* */ }\n/* */ } \n/* 1225 */ if (defCheck <= 0.0D || defFumbleShield || crit) {\n/* */ \n/* */ \n/* */ \n/* 1229 */ if (!defFumbleShield && !defFumbleParry && !crit)\n/* */ {\n/* 1231 */ if (defender.getStatus().getStamina() >= 300) {\n/* */ \n/* 1233 */ defender.getStatus().modifyStamina(-300.0F);\n/* 1234 */ Skill defenderBodyControl = null;\n/* */ \n/* */ try {\n/* 1237 */ defenderBodyControl = defenderSkills.getSkill(104);\n/* */ }\n/* 1239 */ catch (NoSuchSkillException nss) {\n/* */ \n/* 1241 */ defenderBodyControl = defenderSkills.learn(104, 1.0F);\n/* 1242 */ logger.log(Level.WARNING, defender.getName() + \" no body control?\");\n/* */ } \n/* 1244 */ if (defenderBodyControl != null) {\n/* */ \n/* 1246 */ float mod = getMod(performer, defender, defenderBodyControl);\n/* 1247 */ defCheck = defenderBodyControl.skillCheck(attCheck, 0.0D, (mod == 0.0F || dryrun), (float)(long)mod);\n/* */ } else {\n/* */ \n/* 1250 */ logger.log(Level.WARNING, defender.getName() + \" has no body control!\");\n/* */ } \n/* */ } } \n/* 1253 */ if (defCheck <= 0.0D || crit) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1261 */ Item armour = null;\n/* */ \n/* */ \n/* 1264 */ float armourMod = defender.getArmourMod();\n/* 1265 */ float evasionChance = ArmourTemplate.calculateGlanceRate(defender.getArmourType(), armour, type, armourMod);\n/* 1266 */ if (!performer.isPlayer() && !defender.isPlayer() && !defender.isUnique())\n/* 1267 */ armourMod = 1.0F; \n/* 1268 */ if (armourMod == 1.0F) {\n/* */ \n/* */ try {\n/* */ \n/* 1272 */ byte bodyPosition = ArmourTemplate.getArmourPosition((byte)pos);\n/* 1273 */ armour = defender.getArmour(bodyPosition);\n/* 1274 */ armourMod = ArmourTemplate.calculateDR(armour, type);\n/* 1275 */ if (defender.isPlayer())\n/* 1276 */ armour.setDamage(armour.getDamage() + \n/* 1277 */ Math.min(1.0F, (float)(damage * armourMod / 80.0D) * armour\n/* */ \n/* 1279 */ .getDamageModifier() * \n/* 1280 */ ArmourTemplate.getArmourDamageModFor(armour, type))); \n/* 1281 */ checkEnchantDestruction(attWeapon, armour, defender);\n/* 1282 */ evasionChance = ArmourTemplate.calculateGlanceRate(null, armour, type, armourMod);\n/* */ }\n/* 1284 */ catch (NoArmourException nsi) {\n/* */ \n/* */ \n/* 1287 */ evasionChance = 1.0F - defender.getArmourMod();\n/* */ }\n/* 1289 */ catch (NoSpaceException nsp) {\n/* */ \n/* 1291 */ logger.log(Level.WARNING, defender.getName() + \" no armour space on loc \" + pos);\n/* */ } \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1299 */ if (!attWeapon.isBodyPart() || attWeapon.getAuxData() == 100)\n/* */ {\n/* 1301 */ if (performer.isPlayer())\n/* 1302 */ attWeapon.setDamage(attWeapon.getDamage() + (float)(damage * (2.1D - armourMod) / 1000.0D) * attWeapon\n/* 1303 */ .getDamageModifier()); \n/* */ }\n/* 1305 */ if (defender.isUnique()) {\n/* */ \n/* 1307 */ evasionChance = 0.5F;\n/* 1308 */ damage *= armourMod;\n/* */ } \n/* 1310 */ if (Server.rand.nextFloat() < evasionChance) {\n/* */ \n/* 1312 */ if (aiming || performer.spamMode())\n/* 1313 */ performer.getCommunicator().sendNormalServerMessage(\"Your attack glances off \" + defender\n/* 1314 */ .getNameWithGenus() + \"'s armour.\"); \n/* 1315 */ if (defender.spamMode()) {\n/* 1316 */ defender.getCommunicator().sendNormalServerMessage(\"The attack to the \" + defender\n/* 1317 */ .getBody().getWoundLocationString(pos) + \" glances off your armour.\");\n/* */ }\n/* */ }\n/* 1320 */ else if (damage > (5.0F + Server.rand.nextFloat() * 5.0F) || crit) {\n/* */ \n/* 1322 */ if (crit)\n/* */ {\n/* 1324 */ armourMod = 1.0F;\n/* */ }\n/* */ \n/* */ \n/* 1328 */ Battle battle = performer.getBattle();\n/* 1329 */ boolean dead = false;\n/* 1330 */ if (defender.getStaminaSkill().getKnowledge(0.0D) < 2.0D) {\n/* */ \n/* 1332 */ defender.die(false, \"Combat Stam Check Fail\");\n/* 1333 */ dead = true;\n/* */ } else {\n/* */ \n/* 1336 */ dead = addWound(performer, defender, type, pos, damage, armourMod, attString, battle, 0.0F, 0.0F, false, false, false, false);\n/* */ } \n/* 1338 */ if (!dead && attWeapon.getSpellDamageBonus() > 0.0F)\n/* */ {\n/* 1340 */ if (damage * attWeapon.getSpellDamageBonus() / 300.0D > (Server.rand.nextFloat() * 5.0F) || crit) {\n/* 1341 */ dead = defender.addWoundOfType(performer, (byte)4, (byte)pos, false, armourMod, false, damage * attWeapon\n/* 1342 */ .getSpellDamageBonus() / 300.0D, 0.0F, 0.0F, false, false);\n/* */ }\n/* */ }\n/* 1345 */ if (!dead && attWeapon.getWeaponSpellDamageBonus() > 0.0F)\n/* */ {\n/* 1347 */ if (damage * attWeapon.getWeaponSpellDamageBonus() / 300.0D > (Server.rand.nextFloat() * 5.0F))\n/* */ {\n/* 1349 */ dead = defender.addWoundOfType(performer, (byte)6, 1, true, armourMod, false, damage * attWeapon\n/* 1350 */ .getWeaponSpellDamageBonus() / 300.0D, Server.rand\n/* 1351 */ .nextInt((int)attWeapon.getWeaponSpellDamageBonus()), 0.0F, false, false);\n/* */ }\n/* */ }\n/* 1354 */ if (armour != null)\n/* */ {\n/* 1356 */ if (armour.getSpellPainShare() > 0.0F)\n/* */ {\n/* 1358 */ if (performer.isUnique()) {\n/* 1359 */ defender.getCommunicator().sendNormalServerMessage(performer\n/* 1360 */ .getNameWithGenus() + \" ignores the effects of the \" + armour.getName() + \".\");\n/* */ \n/* */ \n/* */ }\n/* 1364 */ else if (damage * armour.getSpellPainShare() / 300.0D > 5.0D) {\n/* */ \n/* 1366 */ addBounceWound(defender, performer, type, pos, damage * armour\n/* 1367 */ .getSpellPainShare() / 300.0D, armourMod, 0.0F, 0.0F, false, true);\n/* */ } \n/* */ }\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 1374 */ if (dead) {\n/* */ \n/* 1376 */ performer.getCommunicator().sendSafeServerMessage(defender.getNameWithGenus() + \" is dead!\");\n/* 1377 */ if (battle != null)\n/* 1378 */ battle.addCasualty(performer, defender); \n/* 1379 */ done = true;\n/* */ \n/* */ \n/* */ }\n/* 1383 */ else if (!defender.hasNoServerSound()) {\n/* 1384 */ SoundPlayer.playSound(defender.getHitSound(), defender, 1.6F);\n/* */ }\n/* */ \n/* */ } else {\n/* */ \n/* 1389 */ if (aiming || performer.spamMode())\n/* */ {\n/* 1391 */ performer.getCommunicator().sendNormalServerMessage(defender\n/* 1392 */ .getNameWithGenus() + \" takes no real damage from the hit to the \" + defender\n/* 1393 */ .getBody().getWoundLocationString(pos) + \".\");\n/* */ }\n/* 1395 */ if (defender.spamMode()) {\n/* 1396 */ defender.getCommunicator().sendNormalServerMessage(\"You take no real damage from the blow to the \" + defender\n/* */ \n/* 1398 */ .getBody().getWoundLocationString(pos) + \".\");\n/* */ }\n/* */ } \n/* */ } else {\n/* */ \n/* 1403 */ String sstring = \"sound.combat.miss.light\";\n/* 1404 */ if (attCheck < -80.0D) {\n/* 1405 */ sstring = \"sound.combat.miss.heavy\";\n/* 1406 */ } else if (attCheck < -40.0D) {\n/* 1407 */ sstring = \"sound.combat.miss.med\";\n/* 1408 */ } SoundPlayer.playSound(sstring, defender, 1.6F);\n/* 1409 */ if (aiming || performer.spamMode())\n/* */ {\n/* 1411 */ performer.getCommunicator().sendNormalServerMessage(defender\n/* 1412 */ .getNameWithGenus() + \" \" + getParryString(defCheck) + \" evades the blow to the \" + defender\n/* 1413 */ .getBody().getWoundLocationString(pos) + \".\");\n/* */ }\n/* 1415 */ if (defender.spamMode()) {\n/* 1416 */ defender.getCommunicator().sendNormalServerMessage(\"You \" + \n/* 1417 */ getParryString(defCheck) + \" evade the blow to the \" + defender\n/* 1418 */ .getBody().getWoundLocationString(pos) + \".\");\n/* */ }\n/* */ } \n/* */ } else {\n/* */ \n/* 1423 */ defender.lastParry = WurmCalendar.currentTime;\n/* 1424 */ Item weapon = defPrimWeapon;\n/* 1425 */ if (!parryPrimWeapon)\n/* 1426 */ weapon = defender.getLefthandWeapon(); \n/* 1427 */ if (aiming || performer.spamMode())\n/* */ {\n/* 1429 */ performer.getCommunicator().sendNormalServerMessage(defender\n/* 1430 */ .getNameWithGenus() + \" \" + getParryString(defCheck) + \" parries with \" + weapon.getNameWithGenus() + \".\");\n/* */ }\n/* */ \n/* */ \n/* 1434 */ if (defender.spamMode())\n/* */ {\n/* 1436 */ defender.getCommunicator().sendNormalServerMessage(\"You \" + \n/* 1437 */ getParryString(defCheck) + \" parry with your \" + weapon.getName() + \".\");\n/* */ }\n/* */ \n/* 1440 */ if (!weapon.isBodyPart() || weapon.getAuxData() == 100) {\n/* */ \n/* 1442 */ if (defender.isPlayer())\n/* */ {\n/* 1444 */ if (weapon.isWeaponSword()) {\n/* 1445 */ weapon.setDamage(weapon.getDamage() + 0.001F * (float)damage * weapon.getDamageModifier());\n/* */ } else {\n/* 1447 */ weapon.setDamage(weapon.getDamage() + 0.005F * (float)damage * weapon.getDamageModifier());\n/* */ } } \n/* 1449 */ if (performer.isPlayer())\n/* */ {\n/* 1451 */ if (!attWeapon.isBodyPart() || attWeapon.getAuxData() == 100) {\n/* 1452 */ attWeapon\n/* 1453 */ .setDamage(attWeapon.getDamage() + 0.001F * (float)damage * attWeapon.getDamageModifier());\n/* */ }\n/* */ }\n/* */ } \n/* 1457 */ String sstring = \"sound.combat.parry1\";\n/* 1458 */ int x = Server.rand.nextInt(3);\n/* 1459 */ if (x == 0) {\n/* 1460 */ sstring = \"sound.combat.parry2\";\n/* 1461 */ } else if (x == 1) {\n/* 1462 */ sstring = \"sound.combat.parry3\";\n/* 1463 */ } SoundPlayer.playSound(sstring, defender, 1.6F);\n/* 1464 */ checkEnchantDestruction(attWeapon, weapon, defender);\n/* */ }\n/* */ \n/* */ } else {\n/* */ \n/* 1469 */ if (performer.spamMode()) {\n/* */ \n/* 1471 */ if (aiming) {\n/* 1472 */ performer.getCommunicator().sendNormalServerMessage(defender\n/* 1473 */ .getNameWithGenus() + \" raises \" + defender.getHisHerItsString() + \" shield and parries.\");\n/* */ } else {\n/* 1475 */ performer.getCommunicator().sendNormalServerMessage(\"You try to \" + attString + \" \" + defender\n/* 1476 */ .getNameWithGenus() + \" but \" + defender.getHeSheItString() + \" raises \" + defender\n/* 1477 */ .getHisHerItsString() + \" shield and parries.\");\n/* */ } \n/* 1479 */ } else if (aiming) {\n/* 1480 */ performer.getCommunicator().sendNormalServerMessage(defender\n/* 1481 */ .getNameWithGenus() + \" raises \" + defender.getHisHerItsString() + \" shield and parries.\");\n/* 1482 */ } if (defender.spamMode())\n/* 1483 */ defender.getCommunicator().sendNormalServerMessage(performer\n/* 1484 */ .getNameWithGenus() + \" tries to \" + attString + \" you but you raise your shield and parry.\"); \n/* 1485 */ if (defShield.isWood()) {\n/* 1486 */ Methods.sendSound(defender, \"sound.combat.shield.wood\");\n/* */ } else {\n/* 1488 */ Methods.sendSound(defender, \"sound.combat.shield.metal\");\n/* 1489 */ } checkEnchantDestruction(attWeapon, defShield, defender);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1510 */ return done;\n/* */ }", "public void damage(int damageTaken) {\n //TODO: Create specific damage methods instead of damage calls everywhere(see damagedByBullet())\n if (!invincible) {\n this.hp -= damageTaken;\n }\n }", "@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)\r\n public void onPlayerDamagedByPlayer(final EntityDamageByEntityEvent event) {\n if (!(event.getEntity() instanceof Player)) {\r\n return;\r\n }\r\n if (!(event.getDamager() instanceof Player)) {\r\n return;\r\n }\r\n \r\n final Player target = (Player)event.getEntity();\r\n final Player attacker = (Player)event.getDamager();\r\n final ItemStack is = attacker.getItemInHand();\r\n \r\n if (is != null){\r\n switch (is.getType()){\r\n case EMERALD:\r\n attacker.setItemInHand(ItemUtil.decrementItem(is, 1));\r\n \r\n // 体力・空腹回復、燃えてたら消化\r\n target.setHealth(target.getMaxHealth());\r\n target.setFoodLevel(20);\r\n target.setFireTicks(0);\r\n \r\n // ポーション効果付与\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 45 * 20, 0)); // 45 secs\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 7 * 60 * 20, 0)); // 7 mins\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, 9 * 60 * 20, 1)); // 9 mins\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 9 * 60 * 20, 0)); // 9 mins\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.FAST_DIGGING, 5 * 60 * 20, 1)); // 5 mins\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.NIGHT_VISION, 3 * 60 * 20, 0)); // 3 mins\r\n \r\n // effect, messaging\r\n target.getWorld().playEffect(target.getLocation(), Effect.ENDER_SIGNAL, 0, 10);\r\n Util.message(target, PlayerManager.getPlayer(attacker).getName() + \" &aから特殊効果を与えられました!\");\r\n Util.message(attacker, PlayerManager.getPlayer(target).getName() + \" &aに特殊効果を与えました!\");\r\n \r\n event.setCancelled(true);\r\n event.setDamage(0);\r\n break;\r\n default: break;\r\n }\r\n }\r\n }", "@Test\n void doEffectelectroscythe() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n setPlayers(pl);\n WeaponFactory wf = new WeaponFactory(\"electroscythe\");\n Weapon w1 = new Weapon(\"electroscythe\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.getWeapons().add(w1);\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w1.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(0));\n Terminator t = new Terminator('y', Board.getSquare(0));\n t.setOwnerColor(victim.getColor());\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n players.add(t);\n try{\n p.getPh().getWeaponDeck().getWeapon(w1.getName()).doEffect(\"alt\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && t.getPb().countDamages() == 2);\n\n try{\n p.getPh().getWeaponDeck().getWeapon(w1.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3 && t.getPb().countDamages() == 3);\n }", "@Override\r\n\t\tpublic String getAbilityName() {\n\t\t\treturn \"Death\";\r\n\t\t\t\r\n\t\t}", "public void heal(){\n\t\thp += potion.getHpBoost();\n\t\tif(hp > max_hp)hp = max_hp;\n\t}", "private void attack(int player){\n //grabs a random number\n int monster = monsterAttack();\n \n //monsters strength and modifier against the player\n double monAttack;\n double monMod;\n //players strength and modifier against the monster\n double playerAttack;\n double playerMod;\n //resets the buttons\n btnFire.setEnabled(true);\n btnWater.setEnabled(true);\n btnIce.setEnabled(true);\n btnEarth.setEnabled(true);\n //holds the types of attacks the player and monster will have\n Element mType;\n Element pType;\n \n //sets the monsters type of attack\n switch(monster){\n case 0:\n mType = new Earth();\n break;\n case 1:\n mType = new Fire();\n break;\n case 2:\n mType = new Water();\n break;\n case 3:\n mType = new Ice();\n break;\n default:\n mType = new Earth();\n System.out.println(\"Something went wrong with monster attack selection - given number\" + monster);\n break;\n }\n //sets the players attack type, and monsters modifier\n switch(player){\n case 0:\n pType = new Earth();\n playerAttack = c.getEarth();\n monMod = 1.0;\n btnEarth.setEnabled(false);\n break;\n case 1:\n pType = new Fire();\n playerAttack = c.getFire();\n monMod = mType.getFM();\n btnFire.setEnabled(false);\n break;\n case 2:\n pType = new Water();\n playerAttack = c.getWater();\n monMod = mType.getWM();\n btnWater.setEnabled(false);\n break;\n case 3:\n pType = new Ice();\n playerAttack = c.getIce();\n monMod = mType.getIM();\n btnIce.setEnabled(false);\n break;\n default:\n pType = new Earth();\n playerAttack = c.getEarth();\n monMod = 1.0;\n btnEarth.setEnabled(false);\n System.out.println(\"Something went wrong with player attack selection - given number\" + player);\n break;\n }\n //sets the monster's attack type, and player's modifier\n switch(monster){\n case 0:\n monAttack = m.getEarth();\n playerMod = 1.0;\n break;\n case 1:\n monAttack = m.getFire();\n playerMod = pType.getFM();\n break;\n case 2:\n monAttack = m.getWater();\n playerMod = pType.getWM();\n break;\n case 3:\n monAttack = m.getIce();\n playerMod = pType.getIM();\n break;\n default:\n System.out.println(\"Monster attack comparison error\");\n monAttack = m.getEarth();\n playerMod = 1.0;\n break;\n }\n //decide who won the Attack\n decide(playerAttack, playerMod, monAttack, monMod, pType, mType);\n \n }", "public int attack(Character target){ //hw3E#0 //hw46#moreThinking\n lowerHP((int)(strength * attack / 10)); //hw3E#0 //hw46#moreThinking\n return super.attack(target); //hw3E#0 //hw44#3,4 //hw46#moreThinking\n }", "@Test\r\n public void testAutoBattleAlliesAndEnemies() {\r\n BasicHelper helper = new BasicHelper();\r\n Character character = helper.testCharacter;\r\n\r\n // Level up the character and improve stats\r\n character.gainXP(2700); \r\n // 2700 xp for lvl 10\r\n assertEquals(character.getLevel(), 10);\r\n // Equip a sword and increase attack damage\r\n character.equip(helper.testSword);\r\n assertEquals(character.getCurrATK(), 11.5, 0.001); // 6.5atk base + 5atk from sword\r\n // Equip some armour\r\n character.equip(helper.testArmour);\r\n\r\n // Spawn 5 enemies of not vampire type\r\n ArrayList<MovingEntity> fighters = new ArrayList<MovingEntity>();\r\n fighters.add(new Slug(null));\r\n fighters.add(new Slug(null));\r\n fighters.add(new Zombie(null));\r\n fighters.add(new Zombie(null));\r\n fighters.add(new Zombie(null));\r\n\r\n // Spawn 3 allies\r\n fighters.add(new Ally());\r\n fighters.add(new Ally());\r\n fighters.add(new Ally());\r\n\r\n BattleSimulator battler = new BattleSimulator(character, fighters, null);\r\n \r\n boolean battleResult = battler.runBattle();\r\n // The character's team should win the battble but sustain some damage\r\n assertTrue(battleResult);\r\n assertTrue(character.getCurrHP() < character.getMaxHP());\r\n assertTrue(character.getCurrHP() > 0);\r\n // Make sure only 5 enemies are defeated\r\n assertEquals(battler.getDefeated().size(), 5); \r\n\r\n }", "@Override\n public void applyItem() {\n Player player;\n if (Battle.getRunningBattle().getTurn() % 2 == 1)\n player = Battle.getRunningBattle().getPlayer2();\n else\n player = Battle.getRunningBattle().getPlayer1();\n\n if (player.getInGameCards().size() == 0)\n return;\n Random random = new Random();\n int randomIndex = random.nextInt(player.getInGameCards().size());\n while (!(getPlayer().getInGameCards().get(randomIndex) instanceof Warrior)) {\n randomIndex = random.nextInt(getPlayer().getInGameCards().size());\n }\n\n Buff buff = new PoisonBuff(1, true);\n buff.setWarrior((Warrior) player.getInGameCards().get(randomIndex));\n Battle.getRunningBattle().getPassiveBuffs().add(buff);\n }", "public short getBowDamage();", "public void applyDamage(int damage)\r\n\t{\r\n\r\n\t}", "public boolean wantToFight(int[] enemyAbilities) {\n boolean fight = boldness < 50;//After 50 fights, believes self unstoppable \n int huntable = 0;\n for(int ability : enemyAbilities){\n if(ability == 1)\n huntable++;\n }\n if(huntable >= 3){\n fight = true;\n }//if at least 3 of the visible stats are 1 then consider this prey and attack\n else if((float)enemyAbilities[1] / (float)getDefenseLvl() <= (float)getStrengthLvl() + (float)(getClevernessLvl() % 10) / (float)enemyAbilities[2] && enemyAbilities[0] / 5 < getLifeLvl() / 5)\n fight = true;//If I fancy my odds of coming out on top, float division for chance\n if(fight){//Count every scar\n boldness++;//get more bold with every battle\n life += enemyAbilities[0] / 5;\n str += enemyAbilities[1] / 5;\n def += enemyAbilities[2] / 5;\n clever += (10 - (enemyAbilities[0] + enemyAbilities[1] + enemyAbilities[2] + enemyAbilities[3] - 4)) / 5;//count the human cleverness attained or the enemies who buffed clever early\n }\n return fight;\n }", "public final void receiveAttack(Weapon weapon) {\n this.availableLifePower = damageStrategy.processAttack(this, weapon);\n }", "public void playerAttack() {\n if (playerTurn==true) {\n myMonster.enemHealth=myMonster.enemHealth-battlePlayer.str;\n }\n playerTurn=false;\n enemyMove();\n }", "void evadeAttack(IUnit attacker, int incomingDamage);", "public void interact() {\r\n\t\tif(alive) {\r\n\t\t\tCaveExplorer.print(attackDescription);\r\n\t\t\tbattle();\r\n\t\t}else {\r\n\t\t\tCaveExplorer.print(deadDescription);\r\n\t\t}\r\n\t}", "@Test\n void doEffectwhisper() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"whisper\");\n Weapon w6 = new Weapon(\"whisper\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n wd.addWeapon(w6);\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setPlayerPosition(Board.getSpawnpoint(2));\n p.getPh().drawWeapon(wd, w6.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n\n try{\n p.getPh().getWeaponDeck().getWeapon(w6.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().getMarkedDamages('b') == 1 && victim.getPb().countDamages() == 3);\n\n players.get(0).setPlayerPosition(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w6.getName()).doEffect(\"base\", null, null, p, players, null); //\"A choice of yours is wrong\"\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n }", "void defendAttack(IUnit attacker, int incomingDamage);", "@Override\n public void attack(Entity e) {\n e.hit(atk);\n }", "public static void showCombatInterface(Player player, int weapon) {\n\t\tString itemName = ItemAssistant.getItemName(weapon);\n\t\tfor (int i = 0; i < unarmedItemNames.length; i++) {\n\t\t\tif (itemName.toLowerCase().equals(unarmedItemNames[i])) {\n\t\t\t\tplayer.playerAssistant.setSidebarInterface(0, 5855); // punch, kick, block\n\t\t\t\tplayer.getPA().sendFrame126(itemName, 5857);\n\t\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\t\tCombatInterface.updateClickedCombatStyle(player);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tboolean doNotChange = false;\n\t\tif ((GameType.isPreEoc() && weapon == 19780)) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 4705);\n\t\t\tplayer.getPA().sendFrame246(426, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 4708);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"whip\")\n\t\t\t\t|| itemName.toLowerCase().contains(\"abyssal tentacle\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 12290); // flick, lash, deflect\n\t\t\tplayer.getPA().sendFrame246(12291, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 12293);\n\t\t\treAdjustCombatStyle(player, \"AGGRESSIVE\", ServerConstants.CONTROLLED);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"chinchompa\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 27500); // first param\n\t\t\tplayer.getPA().sendFrame126(itemName, 27503); // first param + 2\n\t\t\treAdjustCombatStyle(player, \"DEFENSIVE\", ServerConstants.CONTROLLED);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"dagger\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 2276); // stab, lunge, slash, block\n\t\t\tplayer.getPA().sendFrame246(2277, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 2279);\n\t\t}\n\t\telse if (itemName.toLowerCase().contains(\"bow\") || itemName.toLowerCase().contains(\"ballista\") || itemName.toLowerCase().contains(\"cannon\") || itemName.toLowerCase().contains(\"javelin\") || itemName.toLowerCase().contains(\"throwing\") || itemName.toLowerCase().contains(\"dragon thrownaxe\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 1764); // accurate, rapid, longrange\n\t\t\tplayer.getPA().sendFrame246(1765, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 1767);\n\t\t\treAdjustCombatStyle(player, \"DEFENSIVE\", ServerConstants.CONTROLLED);\n\t\t} else if (!itemName.toLowerCase().contains(\"saradomin sword\") && !itemName.toLowerCase().contains(\"blessed sword\") && !itemName.toLowerCase().contains(\"2h\") && (\n\t\t\t\titemName.toLowerCase().contains(\"rapier\") || itemName.toLowerCase().contains(\"sword\") && !itemName.toLowerCase().contains(\"godsword\") && !itemName.toLowerCase()\n\t\t\t\t .contains(\n\t\t\t\t\t\t \"longsword\"))\n\t\t\t\t|| itemName.toLowerCase().contains(\"toktz-xil-ek\") || itemName.toLowerCase().contains(\"toktz-xil-ak\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 2276); // stab, lunge, slash, block\n\t\t\tplayer.getPA().sendFrame246(2277, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 2279);\n\t\t} else if (itemName.toLowerCase().contains(\"staff\") || itemName.toLowerCase().contains(\"wand\") || itemName.toLowerCase().contains(\"staff of light\")\n\t\t\t\t|| itemName.toLowerCase().contains(\"trident\") || itemName.toLowerCase().contains(\"thammaron's sceptre\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 328); // bash, pound, focus.\n\t\t\tplayer.getPA().sendFrame246(329, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 331);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t}\n\t\telse if (itemName.toLowerCase().contains(\"dart\") || itemName.toLowerCase().contains(\"knife\") || itemName.toLowerCase().contains(\"blowpipe\") || itemName.toLowerCase()\n\t\t .contains(\n\t\t\t\t \"toktz-xil-ul\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 4446); // accurate, rapid, longrange\n\t\t\tplayer.getPA().sendFrame246(4447, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 4449);\n\t\t\treAdjustCombatStyle(player, \"DEFENSIVE\", ServerConstants.CONTROLLED);\n\t\t} else if (itemName.toLowerCase().contains(\"pickaxe\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 5570); // spike, impale, smash, block\n\t\t\tplayer.getPA().sendFrame246(5571, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 5573);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"axe\") || itemName.toLowerCase().contains(\"hatchet\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 1698); // chop, hack, smash, block\n\t\t\tplayer.getPA().sendFrame246(1699, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 1701);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"claws\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 7762);\n\t\t\tplayer.getPA().sendFrame246(7763, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 7765);\n\t\t} else if (itemName.toLowerCase().contains(\"halberd\") || itemName.toLowerCase().contains(\"scythe\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 8460); // jab, swipe, fend\n\t\t\tplayer.getPA().sendFrame246(8461, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 8463);\n\t\t\treAdjustCombatStyle(player, \"ACCURATE\", ServerConstants.AGGRESSIVE);\n\t\t} else if (itemName.toLowerCase().contains(\"spear\") || itemName.toLowerCase().contains(\"hasta\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 4679); // lunge, swipe, pound, block\n\t\t\tplayer.getPA().sendFrame246(4680, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 4682);\n\t\t\treAdjustCombatStyle(player, \"AGGRESSIVE ACCURATE\", ServerConstants.CONTROLLED);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"mace\") || itemName.toLowerCase().contains(\"barrelchest\") || itemName.toLowerCase().contains(\"flail\") || itemName.toLowerCase()\n\t\t .contains(\n\t\t\t\t \"cane\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 3796);\n\t\t\tplayer.getPA().sendFrame246(3797, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 3799);\n\t\t} else if (itemName.toLowerCase().contains(\"maul\") || itemName.toLowerCase().contains(\"hammer\") || itemName.toLowerCase().contains(\"tzhaar-ket-om\")\n\t\t || itemName.toLowerCase().contains(\"dinh's\") || itemName.contains(\"spade\") || itemName.contains(\"club\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 425); // war hamer equip.\n\t\t\tplayer.getPA().sendFrame246(426, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 428);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"godsword\") || itemName.toLowerCase().contains(\"2h\") || itemName.toLowerCase().contains(\"saradomin sword\")\n\t\t\t\t|| itemName.toLowerCase().contains(\"sara's blessed sword\")\n\t\t\t\t|| (GameType.isPreEoc() && weapon == 19780)) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 4705); // Godsword.\n\t\t\tplayer.getPA().sendFrame246(426, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 4708);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 2423); // chop, slash, lunge, block\n\t\t\tplayer.getPA().sendFrame246(2424, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 2426);\n\t\t}\n\t\tswitch (weapon) {\n\t\t\tcase 20779:\n\t\t\t\tplayer.playerAssistant.setSidebarInterface(0, 425); // war hamer equip.\n\t\t\t\tplayer.getPA().sendFrame246(426, 200, weapon);\n\t\t\t\tplayer.getPA().sendFrame126(itemName, 428);\n\t\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\t\tdoNotChange = true;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Whip is the only main weapon where the aggressive option is controlled, so make it easier by if i use whip and switch to another weapon, it puts the other weapon\n\t\t//on aggressive instead of longrange/lunge.\n\t\tif (player.wasWearingAggressiveSharedXpWeapon && !doNotChange) {\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t}\n\t\tplayer.wasWearingAggressiveSharedXpWeapon = false;\n\t\tCombatInterface.updateClickedCombatStyle(player);\n\t}", "public int getEquippedWeaponDamage() {\n return 0;\n }", "public int calculateAttack() {\n int attack = 0;\n for (Weapon w : equippedWeapons) {\n attack += w.getType().getDamage();\n }\n return attack;\n }", "private void functionalInterface1() {\n\t\tcharmander.heal();\n\n\t\tPokedex.printData(Arrays.asList(charmander));\n\n\t\tguilherme.powerUp(charmander, new BigDecimal(\"-10\"), psMinimalDamage); // -10\n\n\t\tPokedex.printData(Arrays.asList(charmander));\n\n\t\tguilherme.powerUp(charmander, new BigDecimal(\"-10\"), psHugeDamage); // -20\n\n\t\tPokedex.printData(Arrays.asList(charmander));\n\t}", "public void attack();", "public void addWeapon(Weapon x){\n\t\tplayerWeapon=new Weapon(x);\n\t\tHealth+=x.gethealthStat();\n\t\tAttackForce+=x.getafStat();\n\t\tDefense+=x.getdefenseStat();\n\t}", "boolean takeDamage(int dmg);", "@InvokeEvent\n public void onAttack(PlayerAttackEntityEvent event) {\n int multiplier = Configuration.INSTANCE.getMultiplier();\n // Create a variable for the entity.\n Entity entity = event.getEntity();\n // Create a variable for Minecraft#thePlayer\n EntityPlayer player = Minecraft.getMinecraft().thePlayer;\n // Check if the player is null, multiplier is 1 or Configuration#isMultiplyOnAnimals() is false.\n if (player == null || multiplier == 1 || !Configuration.INSTANCE.isMultiplyOnAnimals()) return;\n // Check if the attack was critical.\n boolean critical = player.fallDistance > 0.0f && !player.onGround && !player.isOnLadder() && !player.isInWater() && !player.isPotionActive(Potion.blindness) && player.ridingEntity == null;\n // Create a float to get the EMD (Enchantment Modifier Damage).\n float enchantment = EnchantmentHelper.getEnchantmentModifierDamage(new ItemStack[]{player.getHeldItem()}, new EntityDamageSource(\"player\", player));\n // Create a for statement which loops for the length of the multiplier and runs the code inside.\n for (int i = 1; i < multiplier; ++i) {\n // Checks if enabled.\n if (Configuration.INSTANCE.isEnabled()) {\n // Check if its a critical hit or the multiply without critical hits option is enabled run Minecraft#onCriticalHit(entity) to show the critical marks\n if (critical || Configuration.INSTANCE.isMultiplyWithoutCrits()) Minecraft.getMinecraft().thePlayer.onCriticalHit(entity);\n // Check if the enchantment float is over 0.0f run Minecraft#onEnchantmentCritical(entity) instead.\n if (enchantment > 0.0f) Minecraft.getMinecraft().thePlayer.onEnchantmentCritical(entity);\n }\n }\n }", "@Test\n void doEffectthor() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"t.h.o.r.\");\n Weapon w15 = new Weapon(\"t.h.o.r.\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w15);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w15.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(10));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n players.add(victim2);\n try {\n p.getPh().getWeaponDeck().getWeapon(w15.getName()).doEffect(\"base\", \"opt1\", null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 1);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(10));\n RealPlayer victim3 = new RealPlayer('g', \"ciccia\");\n victim3.setPlayerPosition(Board.getSpawnpoint('y'));\n players.clear();\n players.add(victim);\n players.add(victim2);\n players.add(victim3);\n try {\n p.getPh().getWeaponDeck().getWeapon(w15.getName()).doEffect(\"base\", \"opt1\", \"opt2\", p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 2);\n }", "@EventHandler(priority = EventPriority.MONITOR)\n\tvoid onRightClick(PlayerInteractEvent event)\n\t{\n\t\tPlayer player = event.getPlayer();\n\t\t\n\t\t//Check that it's a right click\n\t\tif (event.getAction() != Action.RIGHT_CLICK_AIR && event.getAction() != Action.RIGHT_CLICK_BLOCK)\n\t\t\treturn;\n\t\t\n\t\t//If the player is healing another person, they're not healing themself.\n\t\tif (isHealingOther)\n\t\t{\n\t\t\tisHealingOther = false;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//Check if the item in hand fits any of the items specified in the configuration file.\t\n\t\tSet<String> items;\n \ttry { items = config.getConfigurationSection(\"healing.\").getKeys(false); }\n \tcatch (NullPointerException e)\n \t{ return; }\n \t\n \tString item = null;\n \tfor (String i: items)\n \t\tif (player.getItemInHand().getType().toString().equalsIgnoreCase(i))\n \t\t\titem = i;\n \t\n \t//If the item isn't found, it's not a healing item.\n \tif (item == null)\n \t\treturn;\n \t\n \tSet<String> professionReqs;\n \ttry { professionReqs = config.getConfigurationSection(\"healing.\" + item).getKeys(false); }\n \tcatch (NullPointerException e)\n \t{ return; }\n \t\n \tfor (String p: professionReqs)\n \t{\n \t\tProfessionHandler profHandler = new ProfessionHandler(perms, data, config);\n \t\t\n \t\tif (p == null || !profHandler.isValidProfession(p))\n \t\t\tcontinue;\n \t\t\n \t\t//Check if the amount to heal is in the config\n \tProfessionStats prof = new ProfessionStats(perms, data, config, player.getUniqueId());\n \t\n \tdouble amountToHeal = config.getInt(\"healing.\" + item + \".\" + p + \".\"\n\t\t\t\t\t+ profHandler.getTierName(prof.getTier(p)));\n \tif (amountToHeal == 0)\n \t{\n \t\tplayer.sendMessage(ChatColor.RED + \"You do not have the skill required to do this!\");\n \t\treturn;\n \t}\n \t \t\n \t//Check that the player has missing health.\n \tif (player.getHealth() >= 20)\n \t{\n \t\tplayer.sendMessage(ChatColor.YELLOW + \"You do not need bandaging!\");\n \t\treturn;\n \t} \n \t\n \t//Check that it won't take you over the maximum amount of health.\n \tif (player.getHealth() + amountToHeal > 20)\n \t\tamountToHeal = 20 - player.getHealth();\n \t\t\t\n \tplayer.sendMessage(ChatColor.YELLOW + \"Bandaging...\");\n \t\t\t\n \t//Schedule the task in one second.\n \tmakeDelayedTask(player, player, amountToHeal, item, p, player.getLocation(), player.getLocation());\n \t}\n\t}", "public static boolean determineAttackingWeapons(GameCharacter attacker, int fromX, int fromY, int targetX, int targetY, Array<Weapon> attackingWeapons) {\r\n\t\tboolean returnValue = false;\r\n\t\tInventory intentory = attacker.getInventory();\r\n\t\tInventoryItem rightEquipped = intentory.getEquipped(ItemSlot.RIGHTHAND);\r\n\t\tInventoryItem leftEquipped = intentory.getEquipped(ItemSlot.LEFTHAND);\r\n\t\tif (attackingWeapons != null) {\r\n\t\t\tattackingWeapons.clear();\r\n\t\t}\r\n\t\t\r\n\t\tif (Vector2.dst(fromX, fromY, targetX, targetY) < 2) {\r\n\t\t\treturnValue = true;\r\n\t\t\tif (rightEquipped instanceof Weapon && !((Weapon)rightEquipped).isRanged()) {\r\n\t\t\t\tif (attackingWeapons != null) {\r\n\t\t\t\t\tattackingWeapons.add((Weapon)rightEquipped);\r\n\t\t\t\t}\r\n\t\t\t\treturnValue = false;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\tif (leftEquipped instanceof Weapon && !((Weapon)leftEquipped).isRanged()) {\r\n\t\t\t\tif (attackingWeapons != null) {\r\n\t\t\t\t\tattackingWeapons.add((Weapon)leftEquipped);\r\n\t\t\t\t}\r\n\t\t\t\treturnValue = false;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\tif (!(rightEquipped instanceof Weapon) && !(leftEquipped instanceof Weapon)) {\r\n\t\t\t\treturnValue = false;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (rightEquipped instanceof Weapon && ((Weapon)rightEquipped).isRanged()) {\r\n\t\t\t\tif (attackingWeapons != null) {\r\n\t\t\t\t\tattackingWeapons.add((Weapon)rightEquipped);\r\n\t\t\t\t}\r\n\t\t\t\treturnValue = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (leftEquipped instanceof Weapon && ((Weapon)leftEquipped).isRanged()) {\r\n\t\t\t\tif (attackingWeapons != null) {\r\n\t\t\t\t\tattackingWeapons.add((Weapon)leftEquipped);\r\n\t\t\t\t}\r\n\t\t\t\treturnValue = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn returnValue;\t\r\n\t}", "public String attack(String input, boolean playerAttack) {\n\n String result = \" You didn't die\";\n\n int damage = 0;\n\n if (input.toCharArray().length == 1 && playerAttack) {\n\n switch (input.toCharArray()[0]) {\n\n case '1': damage = calculateCharacterDamage(player, 0);\n monster.setHealth(monster.getHealth() - damage);\n result = \" You hit \" + monster.getName() + \" for \" + damage + \"!\";\n break;\n\n case '2': damage = calculateCharacterDamage(player, 1);\n monster.setHealth(monster.getHealth() - damage);\n result = \" You hit \" + monster.getName() + \" for \" + damage + \"!\";\n break;\n\n case '3': damage = calculateCharacterDamage(player, 2);\n monster.setHealth(monster.getHealth() - damage);\n result = \" You hit \" + monster.getName() + \" for \" + damage + \"!\";\n break;\n\n }\n\n }\n else if (input.toCharArray().length == 1 && !playerAttack) {\n\n damage = calculateCharacterDamage(monster, 0);\n\n player.setHealth(player.getHealth() - damage);\n\n result = \"\\n \" + monster.getName() + \" hit you for \" + damage + \"!\";\n\n }\n\n if (player.getHealth() == 0)\n {\n win = monster;\n lose = player;\n try {\n combatdb.addCombat(player.getName(), monster.getName(), monster.getName());\n }\n catch(Exception e)\n {\n System.err.println(e);\n }\n }\n else if (monster.getHealth() == 0)\n {\n win = player;\n lose = monster;\n try {\n combatdb.addCombat(player.getName(), monster.getName(), player.getName());\n }\n catch(Exception e)\n {\n System.err.println(e);\n }\n }\n\n return result + \"\\n\";\n\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 }", "private void setArmor() {\n\n if (VersionChecker.currentVersionIsUnder(12, 2)) return;\n if (!ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_ARMOR)) return;\n\n eliteMob.getEquipment().setItemInMainHandDropChance(0);\n eliteMob.getEquipment().setHelmetDropChance(0);\n eliteMob.getEquipment().setChestplateDropChance(0);\n eliteMob.getEquipment().setLeggingsDropChance(0);\n eliteMob.getEquipment().setBootsDropChance(0);\n\n if (hasCustomArmor) return;\n\n if (!(eliteMob instanceof Zombie || eliteMob instanceof PigZombie ||\n eliteMob instanceof Skeleton || eliteMob instanceof WitherSkeleton)) return;\n\n eliteMob.getEquipment().setBoots(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.AIR));\n\n if (eliteMobLevel >= 12)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.LEATHER_HELMET));\n\n if (eliteMobLevel >= 14)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.LEATHER_BOOTS));\n\n if (eliteMobLevel >= 16)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.LEATHER_LEGGINGS));\n\n if (eliteMobLevel >= 18)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.LEATHER_CHESTPLATE));\n\n if (eliteMobLevel >= 20)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.CHAINMAIL_HELMET));\n\n if (eliteMobLevel >= 22)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.CHAINMAIL_BOOTS));\n\n if (eliteMobLevel >= 24)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.CHAINMAIL_LEGGINGS));\n\n if (eliteMobLevel >= 26)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.CHAINMAIL_CHESTPLATE));\n\n if (eliteMobLevel >= 28)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.IRON_HELMET));\n\n if (eliteMobLevel >= 30)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.IRON_BOOTS));\n\n if (eliteMobLevel >= 32)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.IRON_LEGGINGS));\n\n if (eliteMobLevel >= 34)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.IRON_CHESTPLATE));\n\n if (eliteMobLevel >= 36)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.DIAMOND_BOOTS));\n\n if (eliteMobLevel >= 38)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.DIAMOND_HELMET));\n\n if (eliteMobLevel >= 40)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.DIAMOND_LEGGINGS));\n\n if (eliteMobLevel >= 42)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE));\n\n }", "public boolean handleAttack(Action action) {\n ActorState a = action.getActor();\n if (a.getActor() == actor) {\n // Attacks on oneself always succeed, and we don't want to add ourselves as an enemy\n return true;\n }\n \n //maybeCounter(Augmentation.Type.ATTACK, a, combatants);\n enemies.add(a);\n \n double weaponAccuracy = 1.0; //source.getWeaponAccuracy(action);\n double chance = a.getAccuracy() * weaponAccuracy * (1.0 - getDefense());\n boolean success = Math.random() < chance;\n return success;\n }", "public void attackTargetCharacter() {\n }", "@Override\n protected int strengthViability(Creature c){\n int baseViability = super.strengthViability(c);\n if (Elements.elementDamageMultiplier(c,bossFormation.getFrontCreature().getElement()) > 1){\n baseViability = (int)(baseViability * (double)Elements.DAMAGE_BOOST * 3);\n }\n if (Elements.elementDamageMultiplier(bossFormation.getFrontCreature(),c.getElement()) > 1){\n baseViability = (int)(baseViability * (double)Elements.DAMAGE_BOOST / 3);\n }\n return baseViability;\n }", "public abstract boolean attack(KillableItem i);", "int getDamage();", "int getDamage();" ]
[ "0.74338514", "0.72998875", "0.7278341", "0.71316814", "0.6772401", "0.6699582", "0.6644259", "0.6639236", "0.6504216", "0.64458996", "0.6438748", "0.6437784", "0.6431134", "0.642639", "0.63990206", "0.6382596", "0.637299", "0.6371201", "0.63463783", "0.6314667", "0.6306062", "0.62916654", "0.62883425", "0.62865347", "0.626992", "0.62684125", "0.6240403", "0.6231141", "0.6230536", "0.6225511", "0.61814445", "0.6174554", "0.61731625", "0.6172163", "0.6166556", "0.613771", "0.61295825", "0.6111999", "0.6111242", "0.60945916", "0.60937047", "0.60862744", "0.60799", "0.60758835", "0.60746294", "0.60712165", "0.6068464", "0.60641146", "0.60521203", "0.6051818", "0.60464495", "0.604586", "0.603717", "0.6034988", "0.60273606", "0.6022699", "0.6007775", "0.599862", "0.59952265", "0.5991637", "0.5990444", "0.5985702", "0.5969874", "0.5969001", "0.59650815", "0.5955742", "0.595386", "0.5945185", "0.5943234", "0.5936717", "0.59205425", "0.59197825", "0.5919773", "0.591005", "0.5909393", "0.5908191", "0.59025514", "0.5898109", "0.58919865", "0.58898383", "0.5885427", "0.5885099", "0.5884647", "0.58812225", "0.58794737", "0.58793277", "0.5875428", "0.5873286", "0.587201", "0.5871424", "0.5871241", "0.58698523", "0.58666164", "0.5866583", "0.5860087", "0.5859225", "0.58580685", "0.58570975", "0.5855337", "0.5854877", "0.5854877" ]
0.0
-1
maintain an unchanging reference to node ahead of the return node.
public static ListNode mergeTwoLists2(ListNode l1, ListNode l2) { ListNode prehead = new ListNode(-1); ListNode prev = prehead; while (l1 != null && l2 != null) { if (l1.val <= l2.val) { prev.next = l1; l1 = l1.next; } else { prev.next = l2; l2 = l2.next; } prev = prev.next; } // exactly one of l1 and l2 can be non-null at this point, so connect // the non-null list to the end of the merged list. prev.next = l1 == null ? l2 : l1; return prehead.next; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void clearPreviouslyVisitedAfterReturnish(Visitable returnish) {\n\t\tSet<IdentifiableElement> retain = new HashSet<>();\n\t\tSet<IdentifiableElement> visitedNamed = dequeOfVisitedNamed.peek();\n\t\treturnish.accept(new Visitor() {\n\n\t\t\tint level = 0;\n\n\t\t\tVisitable entranceLevel1;\n\n\t\t\t@Override\n\t\t\tpublic void enter(Visitable segment) {\n\t\t\t\tif (entranceLevel1 == null && segment instanceof TypedSubtree) {\n\t\t\t\t\tentranceLevel1 = segment;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (entranceLevel1 != null) {\n\t\t\t\t\t++level;\n\t\t\t\t}\n\n\t\t\t\t// Only collect things exactly one level into the list of returned items\n\t\t\t\tif (level == 1 && segment instanceof IdentifiableElement identifiableElement) {\n\t\t\t\t\tretain.add(identifiableElement);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void leave(Visitable segment) {\n\n\t\t\t\tif (entranceLevel1 != null) {\n\t\t\t\t\tlevel = Math.max(0, level - 1);\n\t\t\t\t\tif (segment == entranceLevel1) {\n\t\t\t\t\t\tentranceLevel1 = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tretain.addAll(Optional.ofNullable(implicitScope.peek()).orElseGet(Set::of));\n\t\tif (visitedNamed != null) {\n\t\t\tvisitedNamed.retainAll(retain);\n\t\t}\n\t}", "public com.Node<T> getNextRef() {\n\t\treturn null;\n\t}", "private void findNewAnchor() {\n assert stack.empty();\n prevAnchor = anchor;\n if (anchor == HEAD_NODE) {\n next = Chunk.NONE; // there is no more in this chunk\n return;\n } else if (anchor == FIRST_ITEM) {\n anchor = HEAD_NODE;\n } else {\n anchor = anchor - FIELDS;\n }\n stack.push(anchor);\n }", "private void backToParent(){\n\t\tList<Node> tmp = new ArrayList<Node>();\n\t\t\n\t\tfor(int i = 0; i < r.size(); i++){\n\t\t\tif(r.get(i).getNodeType() == Node.ATTRIBUTE_NODE){\n\t\t\t\tNode localNode = ((Attr)r.get(i)).getOwnerElement();\n\t\t\t\tif(localNode != null)\n\t\t\t\t\ttmp.add(localNode);\n\t\t\t} else {\n\t\t\t\tNode localNode = r.get(i).getParentNode();\n\t\t\t\tif(localNode != null && localNode.getNodeType() != Node.DOCUMENT_NODE && !listContainsElement(tmp, localNode)){\n\t\t\t\t\ttmp.add(localNode);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tr = tmp;\n\t}", "public Item setBack (Item item) {\n if(isEmpty()) throw new NoSuchElementException(\"Failed to setBack, because DList is empty!\") ;\n // update the value of the last actual node (the last node itself is a sentinel node)\n Item oldValue = last.prev.data; \n last.prev.data = item;\n return oldValue;\n }", "private PersistentLinkedList<T> pop() {\n //the latest element won't become empty\n int index = this.treeSize - 1;\n Node<T> newRoot = new Node<>(branchingFactor);\n\n Node<T> currentNode = this.root;\n Node<T> currentNewNode = newRoot;\n\n ArrayList<Node<T>> newNodes = new ArrayList<>();\n newNodes.add(newRoot);\n ArrayList<Integer> newNodesIndices = new ArrayList<>();\n\n for (int b = base; b > 1; b = b / branchingFactor) {\n TraverseData traverseData = traverseOneLevel(\n new TraverseData(currentNode, currentNewNode, newRoot, index, b));\n currentNode = traverseData.currentNode;\n currentNewNode = traverseData.currentNewNode;\n newNodes.add(currentNewNode);\n newNodesIndices.add(index / b);\n index = traverseData.index;\n }\n newNodesIndices.add(index);\n\n for (int i = 0; i < branchingFactor && i < index; i++) {\n currentNewNode.set(i, currentNode.get(i));\n }\n currentNewNode.set(index, null);\n\n if (index == 0) {\n int latestIndex = newNodes.size() - 2;\n newNodes.get(latestIndex).set(newNodesIndices.get(latestIndex), null);\n\n for (int i = latestIndex; i > 0; i--) {\n if (newNodesIndices.get(i) == 0) {\n newNodes.get(i - 1).set(newNodesIndices.get(i - 1), null);\n } else {\n break;\n }\n }\n }\n\n if (newNodes.size() > 1) {\n int nonNullChildren = 0;\n for (Node<T> child : newRoot.children) {\n if (child != null) {\n nonNullChildren++;\n }\n }\n if (nonNullChildren == 1) { //need new root\n newRoot = newRoot.get(0);\n return new PersistentLinkedList<>(newRoot, this.branchingFactor, this.depth - 1,\n this.base / branchingFactor, this.treeSize - 1, unusedTreeIndices,\n indexCorrespondingToTheFirstElement, indexCorrespondingToTheLatestElement);\n }\n }\n return new PersistentLinkedList<>(newRoot, this.branchingFactor, this.depth, this.base,\n this.treeSize - 1, unusedTreeIndices, indexCorrespondingToTheFirstElement,\n indexCorrespondingToTheLatestElement);\n }", "void markReturning();", "protected TypeNode insertForwardedReferenceNode (TypeNode parent, String typeName) \n {\n TypeNode node = null;\n \n\t\tif ( typeName == null || typeName.trim().length() == 0 ) return null;\n\n // Same type may be forwarded ref MULTIPLE TIMES\n node = (TypeNode) _nodesHashtable.get(typeName);\n if (node != null) {\n // BUG !!! This FORWARD reference is already in tree since the caller\n // of this method ALREADY checked that this forward ref IS NOT in tree.\n \n TypeDescription meta = (TypeDescription) ((TypeNode)_nodesHashtable.get(typeName)).getObject();\n if ( meta != null ) {\n // Already defined\n node.setLabel(TypeSystemUtils2.getMyShortName(typeName)); // Use short name\n node.setObject(meta);\n _nodesHashtable.put (((TypeDescription)node.getObject()).getName(), node);\n Trace.err(\"??? BUG -- Already defined for \" + typeName);\n }\n } else {\n // NEW forwarded ref\n node = new TypeNode(parent, UimaToolsUtil.getMyShortName(typeName));\n node.setObjectType(IItemTypeConstants.ITEM_TYPE_TYPE); \n // Not yet defined (Forward reference)\n // Cannot use short name if no TypeDescription object (see TreeBaseNode.compare)\n // Trace.trace(\"Forward reference to \" + typeName);\n // _nodesHashtable.put (node.getLabel(), node);\n _nodesHashtable.put (typeName, node);\n \n // Add to undefined type hashtable\n // _undefinedTypesHashtable.put (node.getLabel(), node);\n _undefinedTypesHashtable.put (typeName, node);\n }\n \t\t\n\t\t// Insert \"node\" as child of \"parent\"\n\t\tTypeNode tempNode;\n\t\tif (parent == null) {\n\t\t if (_rootSuper == null) {\n\t\t _rootSuper = node;\n\t\t } else {\n\t\t\t\tif ( (tempNode = _rootSuper.insertChild(node)) != null ) {\n\t\t\t\t\tif (tempNode != node) {\t\t\t\t \n\t\t\t\t\t\t// Duplicate Label\n // Use full name as label\n\t\t\t\t\t\tTrace.trace(\" 1 Duplicate (short name) Label:\" + node.getLabel());\n//\t\t\t\t\t\tnode.setShowFullName(true);\n\t\t\t\t\t\tif (node.getObject() != null) {\n // Use full name as label\n\t\t\t\t\t\t\tnode.setLabel(((TypeDescription)node.getObject()).getName());\n\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t_rootSuper.insertChild(node);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t }\n\t\t} else {\n\t\t\t// parent.insertChild (node);\n\t\t\tif ( (tempNode = parent.insertChild(node)) != null && tempNode != node) {\n\t\t\t\t// Duplicate Label. Use full name as label.\n Trace.trace(\" 2 Duplicate (short name) Label:\" + node.getLabel());\n//\t\t\t\tnode.setShowFullName(true);\n\t\t\t\tif (node.getObject() != null) {\n // Use full name as label\n\t\t\t\t\tnode.setLabel(((TypeDescription)node.getObject()).getName());\n\t\t\t\t}\t\t\t\t\n\t\t\t\tparent.insertChild(node);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn node;\n\t}", "public Node setPrevNode(Node node);", "private void backPropagate(Node node, double playoutResult) {\n while (node != null) {\n node.addVisit(playoutResult);\n node = node.getParentNode();\n }\n }", "Optional<Node<UnderlyingData>> prevNode(Node<UnderlyingData> node);", "public void reassignIfNeeded() {\n\t}", "private void updateLruWithNewNode(PageId pid, Page retrievedPage) {\n Node node = new Node(pid, retrievedPage);\n changeHead(node);\n bufferedPages.put(pid, node);\n }", "public void updateDatabaseRefBackwards() {\n // we want to do this twice, since we go from children attribute to folder\n // and then folder to actual parent dir\n myRef = myRef.getParent().getParent();\n }", "TreeNode returnNode(TreeNode node);", "public T copyOnWrite() {\n T r = ref;\n if(r.getRefCount() <= 1) { return r; }\n @SuppressWarnings(\"unchecked\")\n T r2 = (T)r.clone();\n r.removeRef();\n ref = r2;\n r2.addRef();\n return r2;\n }", "public void setPrevious(DoubleNode<T> node)\n {\n\n previous = node;\n }", "public void setBack(Node back){\n this.back = back;\n }", "public void xsetReturn(org.apache.xmlbeans.XmlFloat xreturn)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlFloat target = null;\r\n target = (org.apache.xmlbeans.XmlFloat)get_store().find_element_user(RETURN$0, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlFloat)get_store().add_element_user(RETURN$0);\r\n }\r\n target.set(xreturn);\r\n }\r\n }", "private PersistentLinkedList<T> changeLinksHelper(int treeIndex, int data,\n boolean setPreviousIndex) {\n if (treeIndex == -1) {\n return this;\n }\n\n TraverseData traverseData = traverse(treeIndex);\n int finalIndex = traverseData.index;\n traverseData.currentNewNode\n .set(finalIndex,\n new Node<>(branchingFactor, traverseData.currentNode.get(finalIndex).data));\n if (setPreviousIndex) {\n traverseData.currentNewNode.get(finalIndex).previousIndex = data; //new\n traverseData.currentNewNode.get(finalIndex).nextIndex = traverseData.currentNode\n .get(finalIndex).nextIndex; //old\n } else {\n traverseData.currentNewNode.get(finalIndex).nextIndex = data; //new\n traverseData.currentNewNode.get(finalIndex).previousIndex = traverseData.currentNode\n .get(finalIndex).previousIndex; //old\n }\n\n for (int i = 0; i < branchingFactor; i++) {\n if (i == finalIndex) {\n continue;\n }\n traverseData.currentNewNode.set(i, traverseData.currentNode.get(i));\n }\n\n return new PersistentLinkedList<>(traverseData.newRoot, branchingFactor, depth, base,\n treeSize, unusedTreeIndices, indexCorrespondingToTheFirstElement,\n indexCorrespondingToTheLatestElement);\n }", "private Node getRefTo(T item){\n Node n = first;\n while(n != null && !n.value.equals(item))\n n = n.next;\n return n;\n }", "private void rebalanceLeft(TreeNodeDataType n) {\n left(n);\r\n \r\n \r\n }", "@Test\n\tpublic void addNodeAfterGiveNode() {\n\t\tSystem.out.println(\"Given a node as prev_node, insert a new node after the given node \");\n\t\tdll.push(4);\n\t\tdll.push(2);\n\t\tdll.push(1);\n\t\tdll.InsertAfter(dll.head.next, 3);\n\t\tdll.print();\n\t}", "private void resetReference(ThingTimeTriple triple)\r\n/* 221: */ {\r\n/* 222:184 */ this.previousTriples.put(triple.t.getType(), triple);\r\n/* 223:185 */ this.previousTriple = triple;\r\n/* 224: */ }", "public void retreat() {\n if( mMatches.hasPrevious() ) {\n setCurrent( mMatches.previous() );\n }\n }", "public void pushReturnAddress(){returnAddrs.push(pc);}", "node(String pline) {\n\t\tpleft = pright = null;\n\t\tlinestate = freshnode;\n\t\t/* linenum field is not always valid */\n\t\tline = pline;\n\t}", "private TreeNode fixNextptr(TreeNode root) {\r\n\t\t// Find the right most node in\r\n\t\t// BT or last node in DLL\r\n\t\twhile (root.right != null)\r\n\t\t\troot = root.right;\r\n\r\n\t\t// Start from the rightmost node, traverse\r\n\t\t// back using left pointers. While traversing,\r\n\t\t// change right pointer of nodes\r\n\t\twhile (root != null && root.left != null) {\r\n\t\t\tTreeNode left = root.left;\r\n\t\t\tleft.right = root;\r\n\t\t\troot = root.left;\r\n\t\t}\r\n\r\n\t\t// The leftmost node is head of linked list, return it\r\n\t\treturn root;\r\n\t}", "Node insertBefore(Node newChild, Node refChild);", "private MyBinNode getToReplace(MyBinNode node){\n MyBinNode replc_p = node;\n MyBinNode replace = node;\n MyBinNode aux = node.right;\n while(aux != null){\n replc_p = replace;\n replace = aux;\n aux = aux.left;\n }\n if(replace != node.right){\n replc_p.left = replace.right;\n replace.right = node.right;\n }\n return replace;\n }", "public void gotoMark() {\n\t_source.gotoMark();\n\t_current = _markedNode;\n }", "@Test\n public void testManipulateObjectByReference() {\n TreeNode root = new TreeNode(0);\n root.left = new TreeNode(1);\n root.right = new TreeNode(2);\n setLeftChildToNull(root);\n System.out.println(root.left);\n }", "protected void restoreSelf() {\n if (removed && parentNode != null && componentNode != null) {\n // Add self back BEFORE sibling (keeps original order)\n parentNode.insertBefore(componentNode, siblingNode);\n // Reset removed flag\n removed = false;\n }\n }", "public void ref() {\n\n\t}", "void moveTo(Node n);", "@Override\r\n protected void computeReferencePoint ()\r\n {\r\n setReferencePoint(getHeadLocation());\r\n }", "static Node push(Node head_ref, Node new_node) {\n // since we are adding at the beginning,\n // prev is always null\n new_node.prev = null;\n\n // link the old list off the new node\n new_node.next = (head_ref);\n\n // change prev of head node to new node\n if ((head_ref) != null) (head_ref).prev = new_node;\n\n // move the head to point to the new node\n (head_ref) = new_node;\n return head_ref;\n }", "public void borrow()\n {\n borrowed++;\n }", "public Vertex updatePointerAfterBetaReduction() {\n\n\t\t// Update pointer if needed\n\t\tif (this.getNext() != null) {\n\t\t\t// Search last Vertex in first Family layer\n\t\t\tif (this.getFamily() != null) {\n\t\t\t\tVertex pointer = new Dummy();\n\t\t\t\tpointer.setNext(this.getFamily());\n\t\t\t\twhile (pointer.getNext().getNext() != null) {\n\t\t\t\t\tpointer.setNext(pointer.getNext().getNext());\n\t\t\t\t}\n\t\t\t\t// Set next Vertex of this as Next of Last in First Family layer;\n\t\t\t\tpointer.getNext().setNext(this.getNext());\n\t\t\t}\n\t\t}\n\t\t// return new Worker\n\t\treturn this.getFamily();\n\t}", "@Override\n\tpublic void visit(ReturnNode node) {\n\t\tEvaluator.missingRet = false;\n\t\t/**\n\t\t * verificam check failed, nu si assert failed, deoarece eroarea de\n\t\t * missing return are prioritate mai mare decat cea de assert failed\n\t\t */\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\t\t/**\n\t\t * evaluam copilul nodului\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\t/**\n\t\t * preluam rezultatul evaluarii\n\t\t */\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\tnode.setName(Evaluator.variables.get(node.getChild(0).getName()));\n\t\t} else {\n\t\t\tnode.setName(node.getChild(0).getName());\n\t\t}\n\t}", "public void insertAtBack(L insertItem){\n\t\tListNode node = new ListNode(insertItem);\n\t\tif(isEmpty()) //firstNode and lastNode refer to same Object\n\t\tfirstNode = lastNode = node;\n\t\telse{ //lastNode's nextNode refers to new node\n\t\t\tlastNode.nextNode = node;\n\t\t\tlastNode = node;\n\t\t\t//you can replace the two previous lines with this line: lastNode = lastNode.nextNode = new ListNode( insertItem );\n\t\t}\n\t}", "@Override\n protected void rebalanceInsert(Position<Entry<K, V>> p) {\n if (!isRoot(p)) {\n makeRed(p);\n resolveRed(p); // The inserted red node may cause a double-red problem\n }\n }", "private void replaceNode(Node curr, Node child, AtomicReference<Node> rootRef) {\n\t\tchild.parent = curr.parent;\n if(curr.parent == null) {\n \trootRef.set(child);\n }\n else {\n if(isLeftChild(curr)) {\n \tcurr.parent.left = child;\n } else {\n \tcurr.parent.right = child;\n }\n }\n\t}", "void addHadithReferenceNo(Object newHadithReferenceNo);", "public void addAndReturnOld() {\n\n }", "@Test\n\tpublic void addNodeBeforeGiveNode() {\n\t\tSystem.out.println(\"Given a node as prev_node, insert a new node Before the given node \");\n\t\tdll.push(4);\n\t\tdll.push(3);\n\t\tdll.push(1);\n\t\tdll.InsertBefore(dll.head.next, 2);\n\t\tdll.print();\n\t}", "public void\nswitchToNodeTraversal(SoNode node)\n{\n // Store current state.\n SoActionP.AppliedData storeddata = new SoActionP.AppliedData(this.pimpl.applieddata);\n AppliedCode storedcode = this.pimpl.appliedcode;\n PathCode storedpathcode = this.currentpathcode;\n SoTempPath storedpath = new SoTempPath(this.currentpath);\n\n this.pimpl.appliedcode = SoAction.AppliedCode.NODE;\n this.pimpl.applieddata.node = node;\n this.currentpathcode = SoAction.PathCode.NO_PATH;\n this.currentpath.truncate(0);\n\n this.traverse(node);\n\n // Restore previous state.\n this.currentpath.copyFrom(storedpath);\n this.currentpathcode = storedpathcode;\n this.pimpl.applieddata.copyFrom(storeddata);\n this.pimpl.appliedcode = storedcode;\n}", "public void setPrev(DNode newPrev) { prev = newPrev; }", "private Value update(Node recentNode) {\n Node temp = recentNode.next;\n Value value = temp.val;\n recentNode.next = recentNode.next.next;\n Node node = first;\n while (node.next != null) {\n node = node.next;\n }\n node.next = temp;\n temp.next = null;\n return value;\n }", "public void advance( )\r\n {\r\n\t if(isCurrent() != true){// Implemented by student.\r\n\t throw new IllegalStateException(\"no current element\");\r\n\t }\r\n\t else\r\n\t \t precursor = cursor;\r\n\t \t cursor = cursor.getLink(); // Implemented by student.\r\n }", "public Node getBack(){\n return this.back;\n }", "public TreeNode resolve(TreeNode root, TreeNode node){\n if (root == null) {\n return node;\n }\n else if(root.val > node.val){ // no replace, keep going down\n root.right = resolve(root.right, node);\n return root;\n }\n else { // new biggest, old root becomes left child\n node.left = root;\n root = null;\n return node;\n }\n }", "private void findNewNextInStack() {\n if (stack.empty()) {\n next = Chunk.NONE;\n return;\n }\n next = stack.pop();\n long valueReference = INVALID_VALUE_REFERENCE;\n if (next != Chunk.NONE) {\n valueReference = getEntryFieldLong(next, OFFSET.VALUE_REFERENCE);\n }\n while (next != Chunk.NONE && valueReference == INVALID_VALUE_REFERENCE) {\n if (!stack.empty()) {\n next = stack.pop();\n if (next != Chunk.NONE) {\n valueReference = getEntryFieldLong(next, OFFSET.VALUE_REFERENCE);\n }\n } else {\n next = Chunk.NONE;\n return;\n }\n }\n }", "@PortedFrom(file = \"Taxonomy.h\", name = \"finishCurrentNode\")\n public void finishCurrentNode() {\n TaxonomyVertex syn = current.getSynonymNode();\n if (syn != null) {\n addCurrentToSynonym(syn);\n } else {\n // put curEntry as a representative of Current\n if (!queryMode()) {\n // insert node into taxonomy\n current.incorporate(options);\n graph.add(current);\n // we used the Current so need to create a new one\n current = new TaxonomyVertex();\n }\n }\n }", "public void set_return(Fact param) {\r\n local_returnTracker = true;\r\n\r\n this.local_return = param;\r\n\r\n\r\n }", "private PersistentLinkedList<T> setHelper(int treeIndex, T data) {\n int newSize = this.treeSize;\n if (newSize == treeIndex) {\n newSize++;\n }\n\n TraverseData traverseData = traverse(treeIndex);\n\n traverseData.currentNewNode.set(traverseData.index, new Node<>(branchingFactor, data));\n for (int i = 0; i < branchingFactor; i++) {\n if (i == traverseData.index) {\n continue;\n }\n traverseData.currentNewNode.set(i, traverseData.currentNode.get(i));\n }\n\n return new PersistentLinkedList<>(traverseData.newRoot, branchingFactor, depth, base,\n newSize, unusedTreeIndices, indexCorrespondingToTheFirstElement,\n indexCorrespondingToTheLatestElement);\n }", "private Node getReplacementKeyNode(Key key, Node node) {\n\t\tNode ret = node.getChild(node.getDataNumber(key));\r\n\t\t\r\n\t\twhile (!ret.isLeaf()) {\r\n\t\t\tret = ret.getChild(ret.getChildren().size() - 1);\r\n\t\t}\r\n\t\t\r\n\t\treturn ret;\r\n\t}", "public void relinkLR()\n {\n this.L.R = this.R.L = this;\n }", "Object visitReference(ReferenceNode node, Object state);", "public Place follow() {\n\t\t// Confirm this works...\n\t\tif (this.locked == false)\t\t\t\n\t\t\treturn to;\n\t\t// Locked, return original\n\t\t//System.out.println(\"\\nThat direction is locked. Find the key and use it!\");\n\t\tNetwork.netPrintln(\"\\nThat direction is locked. Find the key and use it!\");\n\t\treturn from;\n\t}", "private long replace(long r, Node change) throws IOException {\n Node current = new Node(r);\r\n if (current.right != 0) {\r\n current.right = replace(current.right, change);\r\n current.height = getHeight(current);\r\n current.writeNode(r);\r\n int heightDifference = getHeightDifference(r);\r\n if (heightDifference < -1) {\r\n if (getHeightDifference(current.right) > 0) {\r\n current.right = rightRotate(current.right);\r\n current.writeNode(r);\r\n return leftRotate(r);\r\n }\r\n else {\r\n return leftRotate(r);\r\n }\r\n }\r\n else if (heightDifference > 1) {\r\n if (getHeightDifference(current.left) < 0) {\r\n current.left = leftRotate(current.left);\r\n current.writeNode(r);\r\n return rightRotate(r);\r\n }\r\n else {\r\n return rightRotate(r);\r\n }\r\n }\r\n return r;\r\n }\r\n else {\r\n change.key = current.key;\r\n change.fields = current.fields;\r\n addToFree(r);\r\n return current.left;\r\n }\r\n }", "public RNode insertAtBack(int item) {\n if (next == null) {\n next = new RNode(item, null);\n return this;\n } else {\n next = next.insertAtBack(item);\n return this; \n }\n }", "boolean scavenge()\r\n/* 462: */ {\r\n/* 463:493 */ if (scavengeSome()) {\r\n/* 464:494 */ return true;\r\n/* 465: */ }\r\n/* 466:498 */ this.prev = null;\r\n/* 467:499 */ this.cursor = this.head;\r\n/* 468:500 */ return false;\r\n/* 469: */ }", "private void backObject() {\n\t\tif(this.curr_obj != null) {\n this.curr_obj.uMoveToBack();\n }\n\t}", "public void mark() {\r\n\t\tthis.markedStack.addLast(this.value);\r\n\t}", "LocalReference createLocalReference();", "private Node findOld(Node node) {\t\t\n\t\tfor (Node old : open) {\n\t\t\tif(old.state.id == node.state.id){\n\t\t\t\treturn old;\n\t\t\t}\n\t\t}\n\t\tfor (Node old : closed) {\n\t\t\tif(old.state.id == node.state.id){\n\t\t\t\treturn old;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public void getOuter(int newOut) {\r\n\t\touter = newOut;\r\n\t}", "protected Point getNewPointRelatively(Point p){\n\t\treturn new Point((int) (p.getX()-CELL_SIZE),(int) (p.getY()-CELL_SIZE));\n\t}", "public void setPrevious()\n {\n\tint currentIndex = AL.indexOf(currentObject);\n\t currentObject = AL.get(currentIndex -1);\n\t\n\t// never let currentNode be null, wrap to head\n\tif (currentObject == null)\n\t\tcurrentObject = lastObject;\n }", "public Node modify(Node root)\n {\n int s=0;\n //Node temp=root;\n solve(root);\n return root;\n }", "public Node duplicate() {\r\n Variable alterEgo = new Variable(index);\r\n return alterEgo;\r\n }", "SolutionChange getPreviousChange();", "private void pushStackStackForward( ThroughNode aNode ) {\n List<ThroughNode> curStack = nodeStackStack.peek();\n List<ThroughNode> newStack = new ArrayList<>(curStack.size()+1);\n newStack.add(aNode);\n newStack.addAll(curStack);\n nodeStackStack.push(newStack);\n }", "@Override\r\n\t\tpublic Node insertBefore(Node newChild, Node refChild) throws DOMException\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "@Override\n\tpublic Node getPreviousChild(Node existing) {\n\t\treturn null;\n\t}", "public void setPrevious(Node p) {\n previous = p;\n }", "public Node getReference() {\n return this.reference;\n }", "public void setNext(CommitNode x){\r\n\t\tnext = x;\r\n\t}", "Update withReturnAddress(ReturnAddress returnAddress);", "public final void rewind() {\n branch = 0;\n }", "private Node getMinimumOld() {\n Node tmp = null;\n\n // TODO: optimize by putting in 1 list and\n // provide 'starting offset' for remaining nodes to find mimimum\n // note: see new getMinimum method above\n\n if (null != nodeA) {\n tmp = nodeA;\n if (null != nodeB && tmp.data > nodeB.data) {\n tmp = nodeB;\n }\n if (null != nodeC && tmp.data > nodeC.data) {\n tmp = nodeC;\n }\n } else if (null != nodeB) {\n tmp = nodeB;\n if (null != nodeC && tmp.data > nodeC.data) {\n tmp = nodeC;\n }\n } else if (null != nodeC) {\n tmp = nodeC;\n }\n\n // System.out.println(tmp);\n\n if (null == tmp ) {\n // terminating condition\n return null;\n }\n\n if (tmp.equals(nodeA)) {\n nodeA = nodeA.next;\n }\n if (tmp.equals(nodeB)) {\n nodeB = nodeB.next;\n }\n if (tmp.equals(nodeC)) {\n nodeC = nodeC.next;\n }\n\n System.out.println(tmp.data);\n\n return tmp;\n }", "void setNext (ListNode newNext) { /* package access */ \n\t\tnext = newNext;\n\t}", "@Override\n\t@SuppressWarnings(\"unchecked\")\n\tprotected final void processWhenUpdated(Node node) {\n\t\tboolean first = false;\n\t\tif (!this.safeCurrentSCCNodes.contains(node)) {\n\t\t\tfirst = true;\n\t\t\t// Don't add the node to this set unless its OUT has been populated.\n\t\t}\n\t\tNodeInfo nodeInfo = node.getInfo();\n\t\tCollection<Node> predecessors;\n\t\tpredecessors = nodeInfo.getCFGInfo().getInterProceduralLeafPredecessors();\n\t\tF oldIN = (F) nodeInfo.getIN(analysisName);\n\t\tboolean propagateFurther = false;\n\t\tF newIN;\n\t\tif (oldIN == null) {\n\t\t\t// First processing ever of this node!\n\t\t\tpropagateFurther = true;\n\t\t\tnewIN = (predecessors.isEmpty()) ? newIN = this.getEntryFact() : this.getTop();\n\t\t} else if (first) {\n\t\t\t// First processing in the first round of update.\n\t\t\tnewIN = (predecessors.isEmpty()) ? newIN = this.getEntryFact() : this.getTop();\n\t\t} else {\n\t\t\tnewIN = oldIN; // Use the same object.\n\t\t}\n\n\t\tboolean inChanged = false;\n\t\tif (this.analysisName == AnalysisName.CROSSCALL_PREDICATE_ANALYSIS && node instanceof PostCallNode) {\n\t\t\t// A small hack here.\n\t\t\tPostCallNode postNode = (PostCallNode) node;\n\t\t\tList<FunctionDefinition> funcDef = postNode.getParent().getInfo().getCalledDefinitions();\n\t\t\tif (funcDef.isEmpty() || funcDef.stream().noneMatch(f -> this.functionWithBarrier.contains(f))) {\n\t\t\t\tpredecessors = new HashSet<>();\n\t\t\t\tpredecessors.add(postNode.getParent().getPreCallNode());\n\t\t\t}\n\t\t}\n\t\tboolean anyPredMissed = false;\n\t\tfor (Node predNode : predecessors) {\n\t\t\t/*\n\t\t\t * Ignore a predecessor if:\n\t\t\t * (i) it lies within the SCC, AND\n\t\t\t * (ii) it has not been processed yet.\n\t\t\t */\n\t\t\tSCC predSCC = predNode.getInfo().getCFGInfo().getSCC();\n\t\t\tif (predSCC != null) {\n\t\t\t\t// If null, then pred clearly belongs to some other SCC.\n\t\t\t\tif (node.getInfo().getCFGInfo().getSCC() == predSCC) {\n\t\t\t\t\t// Predecessor lies within the SCC.\n\t\t\t\t\tif (!this.safeCurrentSCCNodes.contains(predNode)) {\n\t\t\t\t\t\tanyPredMissed = true;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tF predOUT = (F) predNode.getInfo().getOUT(analysisName);\n\t\t\tif (predOUT == null) {\n\t\t\t\t/*\n\t\t\t\t * Here, we do not mark anyPredMissed, as this node would be\n\t\t\t\t * marked for processing whenever the predecessor has been\n\t\t\t\t * processed for the first time. Check the setting of\n\t\t\t\t * propagateFurther above.\n\t\t\t\t */\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tF edgeOUT = this.edgeTransferFunction(predOUT, predNode, node);\n\t\t\tinChanged |= newIN.merge(edgeOUT, null);\n\t\t}\n\n\t\tif (node instanceof PostCallNode) {\n\t\t\tPreCallNode preNode = ((CallStatement) node.getParent()).getPreCallNode();\n\t\t\tSCC preSCC = preNode.getInfo().getCFGInfo().getSCC();\n\t\t\tboolean doNotProcess = false;\n\t\t\tif (preSCC != null) {\n\t\t\t\t// If null, then pred clearly belongs to some other SCC.\n\t\t\t\tif (node.getInfo().getCFGInfo().getSCC() == preSCC) {\n\t\t\t\t\t// Predecessor lies within the SCC.\n\t\t\t\t\tif (!this.safeCurrentSCCNodes.contains(preNode)) {\n\t\t\t\t\t\tanyPredMissed = true;\n\t\t\t\t\t\tdoNotProcess = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!doNotProcess) {\n\t\t\t\tinChanged |= processPostCallNodesIN((PostCallNode) node, newIN);\n\t\t\t}\n\n\t\t}\n\t\tif (anyPredMissed) {\n\t\t\tthis.underApproximated.add(node);\n\t\t} else {\n\t\t\tthis.underApproximated.remove(node);\n\t\t}\n\t\tnodeInfo.setIN(analysisName, newIN);\n\n\t\t// Step 2: Apply the flow-function on IN, to obtain the OUT.\n\t\tF newOUT;\n\t\tnewOUT = node.accept(this, newIN);\n\t\tnodeInfo.setOUT(analysisName, newOUT);\n\t\tthis.safeCurrentSCCNodes.add(node); // Mark a node as processed only after its OUT has been \"purified\".\n\n\t\t// Step 3: Process the successors.\n\t\tpropagateFurther |= inChanged;\n\t\tif (propagateFurther) {\n\t\t\tthis.globalWorkList.addAll(nodeInfo.getCFGInfo().getInterProceduralLeafSuccessors());\n\t\t\tif (node instanceof PreCallNode) {\n\t\t\t\tPreCallNode pre = (PreCallNode) node;\n\t\t\t\tthis.globalWorkList.add(pre.getParent().getPostCallNode());\n\t\t\t}\n\t\t\t// If we are adding successors of a BeginNode of a FunctionDefinition, we should\n\t\t\t// add all the ParameterDeclarations.\n\t\t\tif (node instanceof BeginNode && node.getParent() instanceof FunctionDefinition) {\n\t\t\t\tFunctionDefinition func = (FunctionDefinition) node.getParent();\n\t\t\t\tfor (ParameterDeclaration paramDecl : func.getInfo().getCFGInfo().getParameterDeclarationList()) {\n\t\t\t\t\tthis.globalWorkList.add(paramDecl);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "abstract public int findTargetToReplace(MemRef r);", "private PersistentLinkedList<T> addHelper(T data) {\n //there's still space in the latest element\n if (this.treeSize == 0 || this.treeSize % branchingFactor != 0) {\n return setHelper(this.treeSize, data);\n }\n\n //there's still space for the new data\n if (this.base * branchingFactor > this.treeSize) {\n Node<T> newRoot = new Node<>(branchingFactor);\n\n Node<T> currentNode = this.root;\n Node<T> currentNewNode = newRoot;\n\n int index = this.treeSize;\n int b;\n for (b = base; b > 0; b = b / branchingFactor) {\n TraverseData traverseData = traverseOneLevel(\n new TraverseData(currentNode, currentNewNode, newRoot, index, b));\n currentNode = traverseData.currentNode;\n currentNewNode = traverseData.currentNewNode;\n index = traverseData.index;\n\n if (currentNode == null) {\n b = b / branchingFactor;\n break;\n }\n }\n\n while (b > 1) {\n currentNewNode.set(0, new Node<>(branchingFactor));\n currentNewNode = currentNewNode.get(0);\n index = index % b;\n b = b / branchingFactor;\n }\n currentNewNode.set(0, new Node<>(branchingFactor, data));\n\n return new PersistentLinkedList<>(newRoot, this.branchingFactor, this.depth, this.base,\n this.treeSize + 1, unusedTreeIndices, indexCorrespondingToTheFirstElement,\n indexCorrespondingToTheLatestElement);\n }\n\n //root overflow\n Node<T> newRoot = new Node<>(branchingFactor);\n newRoot.set(0, this.root);\n newRoot.set(1, new Node<>(branchingFactor));\n //newRoot[2..]=null\n Node<T> currentNewNode = newRoot.get(1);\n\n int b = base;\n while (b > 1) {\n currentNewNode.set(0, new Node<>(branchingFactor));\n currentNewNode = currentNewNode.get(0);\n b = b / branchingFactor;\n }\n currentNewNode.set(0, new Node<>(branchingFactor, data));\n\n return new PersistentLinkedList<>(newRoot, this.branchingFactor, this.depth + 1,\n this.base * branchingFactor, this.treeSize + 1, unusedTreeIndices,\n indexCorrespondingToTheFirstElement, indexCorrespondingToTheLatestElement);\n }", "private boolean makeReturnable(Statement statement) throws LookupException {\n if (statement.metadata(ASSIGNMENT) == null) {\n Expression e = statement.nearestDescendants(Expression.class).get(0);\n if (!e.getType().name().equals(\"void\")) {\n Statement returnStatement = oFactory().createReturnStatement(e);\n statement.replaceWith(returnStatement);\n return true;\n }\n }\n\n return false;\n }", "public void setPrevious(MyNode<? super E> _previous)\n\t{\n\t\tthis.previous = _previous;\n\t\t//this.previous = _previous;\n\t}", "Position getNewPosition();", "SELLbeholder() {\n listehode = new Node(null, null);\n }", "public native final Node changedNode() /*-{\n\t\treturn this.changedNode;\n\t}-*/;", "private BSTNode<E> successor(BSTNode<E> node) {\n\t\treturn null;\n\t}", "public ListUtilities returnToStart(){\n\t\tListUtilities temp = new ListUtilities();\n\t\tif(this.prevNum != null){\n\t\t\ttemp = this.prevNum.returnToStart();\n\t\t\treturn temp;\n\t\t}else{\n\t\t\t//System.out.println(\"Returned to... \" + this.num);\n\t\t\treturn this;\n\t\t}\n\t}", "public Node setNextNode(Node node);", "public void moveTo(Node thisNode){\n \n //remove from current node\n currentNode.deleteAnt(this);\n \n currentNode = thisNode;\n \n //add ant to new node\n currentNode.addAnt(this);\n \n //is new node visible? if not, it is now\n boolean visibility = currentNode.getVisibility();\n if (visibility == false){\n currentNode.setVisibility(true);\n currentNode.refreshNode();\n currentNode.updateNode();\n }\n }", "public FunctionTypeNode returnType(TypeNode returnType) {\n \t\tFunctionTypeNode_c n = (FunctionTypeNode_c) copy();\n \t\tn.returnType = returnType;\n \t\treturn n;\n \t}", "private E removeAfter (Node<E> node)\n { //node is the previous node\n Node<E> temp = node.next;\n if (temp != null) {\n node.next = temp.next;\n size--;\n return temp.data;\n }\n else\n return null;\n }", "public Node getNewNode(){\n for (Node n:nodes) {\n if(n.isNewTag()){\n return n;\n }\n }\n return null;\n }", "ReferenceCounted retain();", "@Override\r\npublic int checkout(int n) {\n\treturn super.checkout(n);\r\n}", "void prevSet(Entry e) {\r\n\t\t\tprev = e;\r\n\t\t}" ]
[ "0.57456046", "0.56760585", "0.56237185", "0.55525917", "0.5513323", "0.55086327", "0.54967034", "0.5469527", "0.54593074", "0.54454803", "0.5428832", "0.5416175", "0.5413634", "0.5413573", "0.53785866", "0.53636867", "0.53598577", "0.53464144", "0.5343342", "0.53381383", "0.53097606", "0.5297093", "0.52925956", "0.52791053", "0.52660495", "0.52583534", "0.5237387", "0.5232927", "0.52287185", "0.52245456", "0.52217466", "0.52060324", "0.5205491", "0.52046233", "0.52039266", "0.52025133", "0.51959133", "0.5191758", "0.5185985", "0.51763815", "0.51700765", "0.5169432", "0.515075", "0.51463777", "0.5135248", "0.51266015", "0.5123625", "0.51195323", "0.5088567", "0.50881994", "0.5084498", "0.50823516", "0.5061045", "0.50565547", "0.5045651", "0.5024576", "0.50136065", "0.5009433", "0.50075066", "0.5006125", "0.49927294", "0.49848315", "0.49624497", "0.49586764", "0.49575838", "0.4956146", "0.49546465", "0.4949161", "0.49471202", "0.49392098", "0.49335414", "0.49100056", "0.49070567", "0.4891067", "0.48905182", "0.48749185", "0.48717242", "0.48664212", "0.48643738", "0.48643512", "0.4859959", "0.48579374", "0.48559606", "0.4855591", "0.48531958", "0.48480847", "0.4847934", "0.48455477", "0.48445016", "0.48416167", "0.48409504", "0.48331138", "0.4830911", "0.48277044", "0.4827136", "0.48268986", "0.48238537", "0.4823093", "0.4820345", "0.4815647", "0.48128366" ]
0.0
-1
setter method for the errorLoader.
public final void setErrorLoader(final ErrorLoader errorLoader) { this.errorLoader = errorLoader; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setError();", "public void setError(File error) {\r\n this.error = error;\r\n incompatibleWithSpawn = true;\r\n }", "void setError(@Nullable Exception error) {\n this.error = error;\n }", "@Override\n\t\tpublic void loadError() {\n\t\t}", "public void setError(int value) {\n this.error = value;\n }", "public void setError() {\n _hasError = true;\n _highlight = HighlightMode.ERROR;\n _error = NodeError.ERROR;\n }", "public abstract void setError(String message);", "public Builder setError(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000008;\n error_ = value;\n onChanged();\n return this;\n }", "private void initErrorPath()\n\t{\n\t\tfinal Path errorPath = Paths.get(\"io/errors\");\n\t\tthis.errorState.path().set(errorPath);\n\t\tthis.log.info(\"Set ErrorPath in Model.\");\n\t}", "public void setError(Map error) {\n this.error = error;\n }", "public void setException(LoadException exception) {\n\t\tloadProgress.setException(exception);\n\t}", "public Builder setError(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n error_ = value;\n onChanged();\n return this;\n }", "public void setError(@Nullable ExceptionBean error) {\n this.error = error;\n }", "public void setError(ErrorResponse error)\n {\n data().put(_ERROR, error.data());\n }", "public synchronized void setErrListener(LineListener errListener) {\n this.errListener = errListener;\n }", "public void setError(final String pError) {\n\t\tthis.mError = pError;\n\t\ttry {\n\t\t\tthis.mErrorData = this.mError.getBytes(\"utf-8\");\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tthis.mErrorSize = this.mErrorData.length;\n\t}", "public void setError() {\r\n this.textErrorIndex = textIndex;\r\n }", "public void setOnErrorListener(IMediaPlayer.OnErrorListener l) {\n mOnErrorListener = l;\n }", "public void setError(final XyzError error) {\n this.error = error;\n }", "public static void RomLoadErr(){\n\t\tloadError = true;\t\t\n\t}", "public void setError(double error) {\r\n this.error = error;\r\n }", "public void setError(String error) {\n this.error = error;\n }", "public void setError(String error) {\n this.error = error;\n }", "public void setError(String error) {\n this.error = error;\n }", "@Override\n\tpublic void setWrongError() {\n\t\t\n\t}", "public final void error(String error){\n lastKnownError = error;\n }", "public void setErrorProperty(String errorProperty) {\r\n redirector.setErrorProperty(errorProperty);\r\n incompatibleWithSpawn = true;\r\n }", "private void setLongitudeError (float longitude, Exception e, int error) {\n this.longitude = longitude;\n longitudeErrorMessage = e.toString();\n longitudeError = error;\n }", "public com.opentext.bn.converters.avro.entity.ContentErrorEvent.Builder setErrorId(java.lang.String value) {\n validate(fields()[3], value);\n this.errorId = value;\n fieldSetFlags()[3] = true;\n return this;\n }", "public void setError(String error) {\n\t\tthis.error = error;\n\t}", "public void setError(java.lang.String error) {\n this.error = error;\n }", "@Override\n public void setError(@Nullable CharSequence error) {\n setErrorEnabled(error != null);\n super.setError(error);\n }", "public com.opentext.bn.converters.avro.entity.ContentErrorEvent.Builder setErrorLevel(java.lang.String value) {\n validate(fields()[5], value);\n this.errorLevel = value;\n fieldSetFlags()[5] = true;\n return this;\n }", "public void setErrorWriter(final Writer errorWriter) {\n this.octaveExec.setErrorWriter(errorWriter);\n }", "@Override\n public void onSetFailure(String s) {\n }", "@Override\n public void onSetFailure(String s) {\n }", "public Builder setErr(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n err_ = value;\n onChanged();\n return this;\n }", "public void setErrorHandler(ErrorHandler handler)\n {\n if (handler == null)\n {\n handler = base;\n }\n this.errorHandler = handler;\n }", "public void set(Throwable e) {\n this.classType = e.getClass().getName();\n this.objectId = System.identityHashCode(e);\n StackTraceElement[] stack = e.getStackTrace();\n if ( stack != null && stack.length > 0 ) {\n this.path = stack[0].getFileName();\n this.lineNumber = stack[0].getLineNumber();\n }\n this.message = e.getMessage();\n }", "public void setErrorCounter(int value) {\n errorCounter = value;\n }", "protected abstract void setErrorCode();", "public OnError(String value) {\n setValue(value);\n }", "public void setErrors(int err) {\n errors = err;\n }", "public void setErrorResponse(final ErrorResponse errorResponse) {\r\n this.errorResponse = errorResponse;\r\n }", "public void setLoader(Loader loader)\r\n {\r\n _loader = loader;\r\n }", "public Builder setErrorInfo(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n errorInfo_ = value;\n onChanged();\n return this;\n }", "public Builder setErrorInfo(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n errorInfo_ = value;\n onChanged();\n return this;\n }", "public Builder setErrorInfo(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n errorInfo_ = value;\n onChanged();\n return this;\n }", "public Builder setErrorInfo(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n errorInfo_ = value;\n onChanged();\n return this;\n }", "protected void setError(String message) {\n\t\tif (message == null)\n\t\t\tthrow new IllegalArgumentException(\"null error message\");\n\t\tif (hasError()) \n\t\t\tthrow new IllegalStateException(\"An error was already detected.\");\n\t\texpression = null;\n\t\terror = message;\n\t}", "public void onError(PerunError error) {\n\t\tsession.getUiElements().setLogErrorText(\"Error while loading attribute definitions.\");\n\t\tloaderImage.loadingError(error);\n\t\tevents.onError(error);\n\t}", "private void setLatitudeError (float latitude, Exception e, int error) {\n this.latitude = latitude;\n latitudeErrorMessage = e.toString();\n latitudeError = error;\n }", "public void setErrorArray(int i, noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors.Error error)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors.Error target = null;\r\n target = (noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors.Error)get_store().find_element_user(ERROR$0, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n target.set(error);\r\n }\r\n }", "public void makeError(){\n\t\tisError = true;\n\t}", "public ImageHelper setErrorResource(int errorResource) {\n this.errorResource = errorResource;\n\n return this;\n }", "public Builder setError(protodef.b_error.info value) {\n if (errorBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n error_ = value;\n onChanged();\n } else {\n errorBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000001;\n return this;\n }", "public Builder setError(protodef.b_error.info value) {\n if (errorBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n error_ = value;\n onChanged();\n } else {\n errorBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000001;\n return this;\n }", "public void setLoader(Loader loader) {\n\t\tif (loader == null) {\n\t\t\tthrow new NullPointerException(\"loader must not be null\");\n\t\t}\n\t\tthis.loader = loader;\n\t}", "public void setError(Long messageUid, String notificationLocalId, String errorMessage, String status);", "private void setChlorophyllMinError (float chlorophyllMin, Exception e, int error) {\n this.chlorophyllMin = chlorophyllMin;\n chlorophyllMinErrorMessage = e.toString();\n chlorophyllMinError = error;\n }", "private void setChlorophyllMaxError (float chlorophyllMax, Exception e, int error) {\n this.chlorophyllMax = chlorophyllMax;\n chlorophyllMaxErrorMessage = e.toString();\n chlorophyllMaxError = error;\n }", "@Override\n\tpublic void adjustToError() {\n\t\t\n\t}", "public void setErrors(noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors errors)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors target = null;\r\n target = (noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors)get_store().find_element_user(ERRORS$4, 0);\r\n if (target == null)\r\n {\r\n target = (noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors)get_store().add_element_user(ERRORS$4);\r\n }\r\n target.set(errors);\r\n }\r\n }", "public void setFailedLOC(long value) {\n this.failedLOC = value;\n }", "public void setErrorArray(noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors.Error[] errorArray)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n arraySetterHelper(errorArray, ERROR$0);\r\n }\r\n }", "public void setErrorArray(int i, noNamespace.ErrorDocument.Error error)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.ErrorDocument.Error target = null;\r\n target = (noNamespace.ErrorDocument.Error)get_store().find_element_user(ERROR$0, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n target.set(error);\r\n }\r\n }", "public void setError(String parseStatus) {\n this.parseStatus = parseStatus;\n }", "public void setErrorMsg(String errorMsg) {\n this.errorMsg = errorMsg;\n }", "public void setErrorSeparator(String errorSeparator) {\r\n\t\tthis.errorSeparator = errorSeparator;\r\n\t}", "public Builder setError(\n protodef.b_error.info.Builder builderForValue) {\n if (errorBuilder_ == null) {\n error_ = builderForValue.build();\n onChanged();\n } else {\n errorBuilder_.setMessage(builderForValue.build());\n }\n bitField0_ |= 0x00000001;\n return this;\n }", "public Builder setError(\n protodef.b_error.info.Builder builderForValue) {\n if (errorBuilder_ == null) {\n error_ = builderForValue.build();\n onChanged();\n } else {\n errorBuilder_.setMessage(builderForValue.build());\n }\n bitField0_ |= 0x00000001;\n return this;\n }", "public void setErrorMsg(String errorMsg) {\r\n\t\tthis.errorMsg = errorMsg;\r\n\t}", "@Override\r\n\tpublic void setException(Throwable throwable) {\r\n super.setException(throwable);\r\n if ( getFutureListenerProcessor() != null ) {\r\n getFutureListenerProcessor().futureSetException(this, throwable);\r\n }\r\n }", "@Override\n\tpublic void setFailedError() {\n\t\tnew Customdialog_Base(this, \"정보가 올바르지 않습니다.\").show();\n\t}", "public void setErr(boolean a) {\n\t\terr = a;\r\n\t}", "public void setErrordetectiondashlet(noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet errordetectiondashlet)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet target = null;\r\n target = (noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet)get_store().find_element_user(ERRORDETECTIONDASHLET$0, 0);\r\n if (target == null)\r\n {\r\n target = (noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet)get_store().add_element_user(ERRORDETECTIONDASHLET$0);\r\n }\r\n target.set(errordetectiondashlet);\r\n }\r\n }", "public Builder setError(\n int index, WorldUps.UErr value) {\n if (errorBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureErrorIsMutable();\n error_.set(index, value);\n onChanged();\n } else {\n errorBuilder_.setMessage(index, value);\n }\n return this;\n }", "@Override\n\tpublic void netErrorReLoad() {\n\t\t\n\t}", "@Override\n\tpublic void netErrorReLoad() {\n\t\t\n\t}", "@Override\n\t\t\t\t\t\t\tpublic void error(Exception e) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "public void setErrorResponse(final ServiceResponse errorResponse) {\n this.errorResponse = errorResponse;\n }", "void setContainerStatusError(RuleContextContainer rccContext, String sStatusInfo)\r\n throws StorageProviderException;", "public void setErrorArray(noNamespace.ErrorDocument.Error[] errorArray)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n arraySetterHelper(errorArray, ERROR$0);\r\n }\r\n }", "public static void error (Resources loader, Component frame,\r\n\t\tString name, Object[] args, String error_output, Throwable error) {\r\n\r\n\r\n\t\tString msg = loader.getResourceMessage(name.concat(\".message\"), args);\r\n\t\tString title = loader.getResourceMessage(name.concat(\".title\"), args);\r\n\r\n\t\tByteArrayOutputStream stack = new ByteArrayOutputStream();\r\n\t\tPrintWriter writer = new PrintWriter(stack);\r\n\t\terror.printStackTrace(writer);\r\n\t\twriter.close();\r\n\r\n\t\tString stack_trace;\r\n\t\ttry {\r\n\t\t\tstack_trace = stack.toString();\r\n\t\t} catch (Exception ae) {\r\n\t\t\tstack_trace = \"\";\r\n\t\t}\r\n\r\n\t\tif (error_output != null) {\r\n\t\t\tstack_trace = error_output + \"\\n\\n\" + stack_trace;\r\n\t\t}\r\n\r\n\t\textendedMessage(frame, title,\r\n\t\t\tJOptionPane.ERROR_MESSAGE,\r\n\t\t\tmsg, stack_trace);\r\n\t}", "public void setErrors(boolean value) {\r\n this.errors = value;\r\n }", "public Builder setErrorBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n\n error_ = value;\n onChanged();\n return this;\n }", "private void setSalinityMinError (float salinityMin, Exception e, int error) {\n this.salinityMin = salinityMin;\n salinityMinErrorMessage = e.toString();\n salinityMinError = error;\n }", "public void setOnErrorListener(OnErrorListener onErrorListener) {\n synchronized (this) {\n this.mOnErrorListener = onErrorListener;\n if (onErrorListener != null) {\n this.createListeners();\n }\n return;\n }\n }", "public UnifiedFormat setUnifiedError(UnifiedErrorMessage error) {\n this.errors = error;\n return this;\n }", "public void setError(RaftError error, String fmt, Object... args) {\n this.state = new State(error.getNumber(), String.format(String.valueOf(fmt), args));\n }", "public com.opentext.bn.converters.avro.entity.ContentErrorEvent.Builder setErrorInfo(com.opentext.bn.converters.avro.entity.ErrorInfo value) {\n validate(fields()[4], value);\n this.errorInfoBuilder = null;\n this.errorInfo = value;\n fieldSetFlags()[4] = true;\n return this;\n }", "public boolean setErrorResult(Object result)\n/* */ {\n/* 248 */ return setResultInternal(result);\n/* */ }", "void setFailed(Throwable lastFailure);", "private void initErrorState()\n\t{\n\t\tthis.initErrorPath();\n\t\tthis.initErrorLoopCount();\n\t}", "public void setOnExceptionListener(OnExceptionListener l) {\n this.exceptionListener = l;\n }", "public void error(Throwable error) {\n\n }", "public void error(Throwable error) {\n\n }", "protected Response.ErrorListener getErrorListener() {\n\t\tLog.e(TAG, \"error\");\n\t\treturn new Response.ErrorListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onErrorResponse(VolleyError arg0) {\n\t\t\t\tshowProgressBar(false);\n\t\t\t\thandleOnError(arg0);\n\t\t\t}\n\t\t};\n\t}", "@Override\n\tpublic String getErrorPath() {\n\t\treturn null;\n\t}", "public OfError(@NotNull ErrorResult errorResult) {\n super(null);\n Intrinsics.checkNotNullParameter(errorResult, \"error\");\n this.error = errorResult;\n }" ]
[ "0.69772583", "0.6860024", "0.65743273", "0.6497501", "0.6489895", "0.6394355", "0.6383793", "0.6347639", "0.6226193", "0.62044513", "0.618115", "0.6166199", "0.6155451", "0.6151677", "0.61374265", "0.6108175", "0.6105996", "0.6082256", "0.6068731", "0.6067107", "0.6041681", "0.60261023", "0.60261023", "0.60261023", "0.60174215", "0.5993586", "0.5977406", "0.59660053", "0.5958239", "0.59105444", "0.5887502", "0.5882047", "0.5858501", "0.58542997", "0.58476704", "0.58476704", "0.5833354", "0.57931006", "0.57764035", "0.57649314", "0.57366943", "0.5717587", "0.5677244", "0.566405", "0.56574136", "0.56502515", "0.56502515", "0.56502515", "0.56502515", "0.56210876", "0.56154543", "0.561545", "0.5573696", "0.5565421", "0.5560894", "0.55584526", "0.55584526", "0.5555288", "0.55328804", "0.5510551", "0.5504393", "0.54712147", "0.547075", "0.5467421", "0.5461461", "0.54608625", "0.54475194", "0.54320765", "0.5429885", "0.5429252", "0.5429252", "0.5423587", "0.54228055", "0.54215235", "0.5411461", "0.5411138", "0.540822", "0.54067403", "0.54067403", "0.5404198", "0.5399733", "0.5398149", "0.5389168", "0.53731364", "0.53724384", "0.5363133", "0.535638", "0.5353114", "0.5352633", "0.5347984", "0.53457755", "0.53312725", "0.53311044", "0.53268975", "0.53245467", "0.5322521", "0.5322521", "0.5320915", "0.5312913", "0.53115904" ]
0.82008743
0
searches the products based on query parameters for the given criteria.
@Override public final Search searchProducts( final Map<String, List<String>> searchCriteria, final String correlationId) throws BaseException, ServiceException, AdapterException { final long startTime = LOGGER.logMethodEntry(correlationId); LOGGER.info("Request uri map is " + searchCriteria, correlationId); Search searchList = null; if (searchCriteria.containsKey(RequestAttributeConstant.ATTR)) { final String inputParameter = StringUtils .collectionToCommaDelimitedString(searchCriteria .get(RequestAttributeConstant.ATTR)); final String[] pipeSeparated = inputParameter.split("\\|"); for (final String pipeSeparatedString : pipeSeparated) { if (pipeSeparatedString .contains(RequestAttributeConstant.PRICE)) { this.buildPriceRange(searchCriteria, pipeSeparatedString, correlationId); } } } // Added this condition to remove dim attribute if its value is false if (searchCriteria.containsKey(RequestAttributeConstant.DIM)) { final List<String> dimvalue = searchCriteria .get(RequestAttributeConstant.DIM); if (dimvalue.get(0).equalsIgnoreCase(CommonConstants.FALSE_VALUE)) { searchCriteria.remove(RequestAttributeConstant.DIM); } } final Map<String, String> requestMapURI = this.requestParser .processRequestAttribute(searchCriteria, correlationId); List<Map<String, String>> resultMap = null; final EndecaAdapter endecaAdapter = (EndecaAdapter) this.adapterManager .getAdapter(); requestMapURI.put(EndecaConstants.REFINEMENTS_REQUIRED, CommonConstants.TRUE_VALUE); //OPTIONS Parameter to be added in future final Map<String, List<String>> optionNodes = null; resultMap = endecaAdapter.service(requestMapURI, optionNodes, correlationId); this.generateSearchReport(requestMapURI, resultMap); LOGGER.debug("ResultMap " + resultMap, correlationId); if ((resultMap != null) && (!resultMap.isEmpty())) { searchList = this.searchMapper.convertToSearchPojo(resultMap, correlationId); LOGGER.info("The search list : " + searchList.getSearchReport().getTotalProducts(), correlationId); } LOGGER.logMethodExit(startTime, correlationId); return searchList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<ttu.rakarh1.backend.model.data.Product> searchProducts(\n\t\t\tfinal ProductSearchCriteria ProductSearchCriteria, final HttpServletRequest request)\n\t{\n\t\tList<ttu.rakarh1.backend.model.data.Product> ProductList = null;\n\t\ttry\n\t\t{\n\t\t\tProduct Product;\n\t\t\tProductList = new ArrayList<ttu.rakarh1.backend.model.data.Product>();\n\t\t\tdb = dbconnection.getConnection();\n\t\t\tst = this.db.createStatement();\n\t\t\tString sql_and = \"\";\n\t\t\tString sql_where = \"\";\n\t\t\tString sql_all_together = \"\";\n\t\t\tString sql_criteria = \"\";\n\t\t\tString sql_end = \" ORDER BY name\";\n\t\t\tString sql_additional_attr = \"\";\n\t\t\tString genSql = \"\";\n\t\t\tList<ttu.rakarh1.backend.model.data.FormAttribute> formAttributes = null;\n\t\t\tMyLogger.LogMessage(\"FORMATTRIBUTES1\");\n\t\t\tformAttributes = (List<FormAttribute>) request.getAttribute(\"formAttributes\");\n\n\t\t\tif (formAttributes != null)\n\t\t\t{\n\t\t\t\tMyLogger.LogMessage(\"FORMATTRIBUTES2\");\n\t\t\t\tsql_additional_attr = getAdditionalSqlAttr(formAttributes);\n\t\t\t}\n\n\t\t\tString sql_from = \" FROM item i \"; /* ,unit_type, item_type \"; */\n\t\t\tString sql_start = \"SELECT distinct i.item, i.unit_type_fk, i.supplier_enterprise_fk, i.item_type_fk,name, i.store_price, i.sale_price, i.producer, i.description, i.producer_code, i.created \";\n\t\t\t// MyLogger.LogMessage(\"SEARCH CRITERIA PRODUCT CODE\" +\n\t\t\t// ProductSearchCriteria.getProduct_code());\n\t\t\tif (ProductSearchCriteria.getGenAttrList() != null)\n\t\t\t{\n\t\t\t\tgenSql = getGeneralSqlAttr(ProductSearchCriteria);\n\t\t\t}\n\n\t\t\tif (!(ProductSearchCriteria.getProduct_code().equals(\"\")))\n\t\t\t{\n\t\t\t\tsql_criteria = \"UPPER(i.producer_code) LIKE UPPER('\"\n\t\t\t\t\t\t+ ProductSearchCriteria.getProduct_code() + \"%')\";\n\t\t\t}\n\n\t\t\tif (!(ProductSearchCriteria.getName().equals(\"\")))\n\t\t\t{\n\t\t\t\tif (sql_criteria.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tsql_and = \"\";\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tsql_and = \" AND \";\n\t\t\t\t}\n\t\t\t\tString search_string = ProductSearchCriteria.getName().replace(\" \", \" & \");\n\t\t\t\tsql_criteria = sql_criteria + sql_and + \" (to_tsvector(name) @@ to_tsquery('\"\n\t\t\t\t\t\t+ search_string + \"'))\";\n\t\t\t}\n\n\t\t\tif (ProductSearchCriteria.getMin_price() != -1)\n\t\t\t{\n\t\t\t\tif (sql_criteria.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tsql_and = \"\";\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tsql_and = \" AND \";\n\t\t\t\t}\n\t\t\t\tsql_criteria = sql_criteria + sql_and + \" i.store_price >= \"\n\t\t\t\t\t\t+ Float.toString(ProductSearchCriteria.getMin_price()) + \" \";\n\t\t\t}\n\n\t\t\tif (ProductSearchCriteria.getMax_price() != -1)\n\t\t\t{\n\t\t\t\tif (sql_criteria.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tsql_and = \"\";\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tsql_and = \" AND \";\n\t\t\t\t}\n\t\t\t\tsql_criteria = sql_criteria + sql_and + \" i.store_price <= \"\n\t\t\t\t\t\t+ Float.toString(ProductSearchCriteria.getMax_price()) + \" \";\n\t\t\t}\n\n\t\t\tif (ProductSearchCriteria.getSupplier_enterprise_fk() != 0)\n\t\t\t{\n\t\t\t\tif (sql_criteria.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tsql_and = \"\";\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tsql_and = \" AND \";\n\t\t\t\t}\n\t\t\t\tsql_criteria = sql_criteria + sql_and + \" i.supplier_enterprise_fk = \"\n\t\t\t\t\t\t+ Integer.toString(ProductSearchCriteria.getSupplier_enterprise_fk()) + \" \";\n\t\t\t}\n\n\t\t\tif (ProductSearchCriteria.getUnit_type_fk() != 0)\n\t\t\t{\n\t\t\t\tif (sql_criteria.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tsql_and = \"\";\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tsql_and = \" AND \";\n\t\t\t\t}\n\t\t\t\tsql_criteria = sql_criteria + sql_and + \" i.unit_type_fk = \"\n\t\t\t\t\t\t+ Integer.toString(ProductSearchCriteria.getUnit_type_fk()) + \" \";\n\t\t\t}\n\n\t\t\tif (ProductSearchCriteria.getItem_type_fk() != 0)\n\t\t\t{\n\t\t\t\tif (sql_criteria.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tsql_and = \"\";\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tsql_and = \" AND \";\n\t\t\t\t}\n\t\t\t\tsql_criteria = sql_criteria\n\t\t\t\t\t\t+ sql_and\n\t\t\t\t\t\t+ \" i.item_type_fk in (with recursive sumthis(item_type, super_type_fk) as (\"\n\t\t\t\t\t\t+ \"select item_type, super_type_fk \" + \"from item_type \"\n\t\t\t\t\t\t+ \"where item_type =\"\n\t\t\t\t\t\t+ Integer.toString(ProductSearchCriteria.getItem_type_fk()) + \" \"\n\t\t\t\t\t\t+ \"union all \" + \"select C.item_type, C.super_type_fk \" + \"from sumthis P \"\n\t\t\t\t\t\t+ \"inner join item_type C on P.item_type = C.super_type_fk \" + \") \"\n\t\t\t\t\t\t+ \"select item_type from sumthis\" + \") \";\n\t\t\t}\n\n\t\t\tif (!(sql_criteria.equals(\"\")))\n\t\t\t{\n\t\t\t\tsql_where = \" WHERE \";\n\t\t\t}\n\t\t\tif (!genSql.equals(\"\"))\n\t\t\t{\n\t\t\t\tsql_from += \"inner join item_type it on it.item_type = i.item_type_fk inner join type_attribute ta on ta.item_type_fk = it.item_type inner join item_attribute_type iat on iat.item_attribute_type = ta.item_attribute_type_fk inner join item_attribute ia on ia.item_attribute_type_fk = iat.item_attribute_type\";\n\t\t\t\tsql_criteria += \" and (\" + genSql + \")\";\n\t\t\t\t// sql_all_together = \" inner join ( \" + sql_additional_attr +\n\t\t\t\t// \") q2 on q2.item_fk = item\";\n\t\t\t}\n\t\t\tsql_all_together = sql_start + sql_from;\n\t\t\tif (sql_additional_attr != \"\")\n\t\t\t{\n\t\t\t\tsql_all_together += \" inner join ( \" + sql_additional_attr\n\t\t\t\t\t\t+ \") q2 on q2.item_fk = i.item\";\n\n\t\t\t}\n\n\t\t\tsql_all_together += sql_where + sql_criteria + sql_end;\n\n\t\t\tMyLogger.LogMessage(\"ProductDAOImpl -> fdfdf \" + sql_all_together);\n\t\t\tSystem.out.println(sql_all_together);\n\t\t\tResultSet rs = this.st.executeQuery(sql_all_together);\n\t\t\tint cnt = 0;\n\t\t\twhile (rs.next())\n\t\t\t{\n\t\t\t\tProduct = new Product();\n\t\t\t\tProduct.setProduct(rs.getInt(\"item\"));\n\t\t\t\tProduct.setName(rs.getString(\"name\"));\n\t\t\t\tProduct.setDescription(rs.getString(\"description\"));\n\t\t\t\tProduct.setProduct_code(rs.getString(\"producer_code\"));\n\t\t\t\tProduct.setStore_price(rs.getFloat(\"store_price\"));\n\t\t\t\tProduct.setSale_price(rs.getInt(\"sale_price\"));\n\t\t\t\tProduct.setProduct_catalog(rs.getInt(\"item_type_fk\"));\n\t\t\t\tProductList.add(Product);\n\t\t\t\tcnt = cnt + 1;\n\t\t\t}\n\n\t\t}\n\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\tMyLogger.Log(\"searchProducts():\", ex.getMessage());\n\n\t\t}\n\n\t\treturn ProductList;\n\t}", "SearchProductsResult searchProducts(SearchProductsRequest searchProductsRequest);", "private void search(String product) {\n // ..\n }", "List<Product> queryProductListBySearch(@Param(\"productCondition\") Product productCondition, \n\t\t\t@Param(\"rowIndex\") int rowIndex, @Param(\"pageSize\") int pageSize);", "public List<Product> search(String searchString);", "void searchForProducts(String searchQuery) {\n if (searchQuery.isEmpty()) {\n searchQuery = \"%\";\n } else {\n searchQuery = \"%\" + searchQuery + \"%\";\n }\n filter.postValue(searchQuery);\n }", "@Override\n\tpublic void searchProduct(HashMap<String, String> searchKeys) {\n\t\tQueryStringFormatter formatter=new QueryStringFormatter(\"http://shopper.cnet.com/1770-5_9-0.html\");\n\t\t\n\t\ttry\n\t\t{\n//\t\t\tformatter.addQuery(\"url\", \"search-alias\");\n\t\t\tif(searchKeys.get(ProductSearch.BRAND_NAME)!=null && searchKeys.get(ProductSearch.PRODUCT_NAME)!=null)\n\t\t\t{\n\t\t\t\tformatter.addQuery(\"query\",(String)searchKeys.get(ProductSearch.BRAND_NAME) +\" \"+ (String)searchKeys.get(ProductSearch.PRODUCT_NAME)+\" \" );\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tString color=(String)searchKeys.get(ProductSearch.COLOR);\n\t\t\tString min=(String)searchKeys.get(ProductSearch.MIN_PRICE);\n\t\t\tString max=(String)searchKeys.get(ProductSearch.MAX_PRICE);\n\t\t\tif(color!=null){\n\t\t\t\tformatter.addQuery(\"color\",color);\n\t\t\t}\n\t\t\tif(min.length()>0&&max.length()>0)\n\t\t\t{\n\t\t\t//formatter.addQuery(\"color\",(String)searchKeys.get(HeadPhonesSearch.COLOR_S)+\" Price between $\"+(String)searchKeys.get(HeadPhonesSearch.MIN_PRICE)+\" to $\"+(String)searchKeys.get(HeadPhonesSearch.MAX_PRICE));\n\t\t\t\t\n\t\t\t\tformatter.addQuery(\" Price between $\",min +\" to $\"+max);\n\t\t\t}\n\t\t\tformatter.addQuery(\"tag\",\"srch\");\n\t\t\t\n\t\t\tString finalQueryString=\"http://shopper.cnet.com/1770-5_9-0.html\"+formatter.getQueryString();\n\t\t\tSystem.out.println(\"query string :\"+formatter.getQueryString());\n\t\t\tSystem.out.println(\"Query:\"+finalQueryString);\n\t\t\tprocessMyNodes(finalQueryString);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\t\t\t\n\t\t\n\t}", "@Test\n void searchProduct() {\n List<DummyProduct> L1= store.SearchProduct(\"computer\",null,-1,-1);\n assertTrue(L1.get(0).getProductName().equals(\"computer\"));\n\n List<DummyProduct> L2= store.SearchProduct(null,\"Technology\",-1,-1);\n assertTrue(L2.get(0).getCategory().equals(\"Technology\")&&L2.get(1).getCategory().equals(\"Technology\"));\n\n List<DummyProduct> L3= store.SearchProduct(null,null,0,50);\n assertTrue(L3.get(0).getProductName().equals(\"MakeUp\"));\n\n List<DummyProduct> L4= store.SearchProduct(null,\"Fun\",0,50);\n assertTrue(L4.isEmpty());\n }", "public List<Product> searchProductOfShop(int shopId, String productId, String productName, String type, int startIndex, int count){\r\n\t\tSession session = getSessionFactory().openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tString sql = \"select rl.count, p from \" + ProductTable.class.getName() + \" p, \" + ShopPartyRelationship.class.getName() + \" rl where p.id = rl.productId\";\r\n\t\tif(null == productId || productId.trim().length() == 0)\r\n\t\t\tsql += \" and rl.type=:type and rl.shopId=:shopId\";\r\n\t\telse sql += \" and rl.type=:type and rl.shopId=:shopId and rl.productId like :productId\"; \r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tsql += \" and p.productName like :productName \";\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tsql += \" and p.categoryName = :groupName\";\r\n\t\tQuery query = session.createQuery(sql);\t\t\r\n\t\tquery.setParameter(\"type\", \"product\");\r\n\t\tquery.setParameter(\"shopId\", shopId);\r\n\t\tif(null != productId && productId.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productId\", \"%\" + productId + \"%\");\r\n\t\tif(null != productName && productName.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"productName\", \"%\" + productName + \"%\");\r\n\t\tif(null != type && type.trim().length() != 0)\r\n\t\t\tquery.setParameter(\"groupName\", type);\r\n\t\tquery.setFirstResult(startIndex);\r\n\t\tquery.setMaxResults(count);\r\n\t\tList<Object[]> listObject = (List<Object[]>)query.list(); \r\n\t\ttx.commit();\r\n\t\tsession.close();\r\n\t\tList<Product> listProduct = new LinkedList<>();\r\n\t\tif(null != listObject && listObject.size()>0){\r\n\t\t\tfor(Object[] object : listObject){\r\n\t\t\t\tProduct productView = converToProductView((ProductTable)object[1]);\r\n\t\t\t\tproductView.setCount((Integer)object[0]);\r\n\t\t\t\tlistProduct.add(productView);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listProduct;\r\n\t}", "private static void searchForItem() {\r\n\t\tSystem.out.println(\"******************************************************************************************\");\r\n\t\tSystem.out.println(\" Please type your search queries\");\r\n\t\tSystem.out.println();\r\n\t\tString choice = \"\";\r\n\t\tif (scanner.hasNextLine()) {\r\n\t\t\tchoice = scanner.nextLine();\r\n\t\t}\r\n\t\t//Currently only supports filtering by name\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" All products that matches your search are as listed\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Id|Name |Brand |Price |Total Sales\");\r\n\t\tint productId = 0;\r\n\t\tfor (Shop shop : shops) {\r\n\t\t\tint l = shop.getAllSales().length;\r\n\t\t\tfor (int j = 0; j < l; j++) {\r\n\t\t\t\tif (shop.getAllSales()[j].getName().contains(choice)) {\r\n\t\t\t\t\tprintProduct(productId, shop.getAllSales()[j]);\r\n\t\t\t\t}\r\n\t\t\t\tproductId++;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\t\tpublic void searchProduct(HashMap<String, String> searchKeys) {\n\t\t\t \n\t\t\tQueryStringFormatter formatter=new QueryStringFormatter(\"http://www.target.com/s\");\n\t\t\ttry{\n\t\t\t\t//formatter.addQuery1(\"query\", \"ca77b9b4beca91fe414314b86bb581f8en20\");\n\t\t\t\t\n\t\t\t\tString color=(String)searchKeys.get(ProductSearch.COLOR);\n\t\t\t\tString min=(String)searchKeys.get(ProductSearch.MIN_PRICE);\n\t\t\t\tString max=(String)searchKeys.get(ProductSearch.MAX_PRICE);\n\t\t\t\t\n\t\t\t\tif((searchKeys.get(ProductSearch.BRAND_NAME)!=null) && (searchKeys.get(ProductSearch.PRODUCT_NAME)!=null)){\n\t\t\t\t\t\n\t\t\t\tformatter.addQuery1(\"searchTerm\",(String)searchKeys.get(ProductSearch.BRAND_NAME)+\" \"+(String)searchKeys.get(ProductSearch.PRODUCT_NAME));\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\tif(color!=null){\n\t\t\t\tformatter.addQuery1(\"\",color);\n\t\t\t\t}\n\t\t\t\tif(min.length()>0&&max.length()>0)\n\t\t\t\t{\n\t\t\t\t//formatter.addQuery(\"color\",(String)searchKeys.get(HeadPhonesSearch.COLOR_S)+\" Price between $\"+(String)searchKeys.get(HeadPhonesSearch.MIN_PRICE)+\" to $\"+(String)searchKeys.get(HeadPhonesSearch.MAX_PRICE));\n\t\t\t\t\t\n\t\t\t\t\tformatter.addQuery1(\" Price between $\",min +\" to $\"+max);\n\t\t\t\t}\n\t\t\t\tString finalQueryString=\"http://www.target.com/s\"+formatter.getQueryString();\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Query:\"+finalQueryString);\n\t\t\t\tprocessMyNodes(finalQueryString);\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}", "@GetMapping(path = \"/products/search/{query}\")\n public ResponseEntity<List<Product>> searchProducts(@PathVariable(name=\"query\") String query){\n return ResponseEntity.ok(productService.search(query));\n }", "List<Product> getProductsContainingProductNameOrShortDescription(String productSearchString);", "@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {\n String productSetDisplayName = request.getParameter(\"productSetDisplayName\");\n String productCategory = request.getParameter(\"productCategory\");\n String businessId = request.getParameter(\"businessId\");\n String sortOrder = request.getParameter(\"sortOrder\");\n String searchId = request.getParameter(\"searchId\");\n\n // Set parameters to apprpriate defaults, if necessary.\n if (businessId.equals(\"getFromDatabase\")) {\n businessId = userService.getCurrentUser().getUserId();\n }\n if (productCategory.equals(\"none\")) {\n productCategory = null;\n }\n String productSetId = null;\n ProductSetEntity productSet = null;\n if (!productSetDisplayName.equals(\"none\")) {\n // true indicates we are searching with the displayname instead of the id.\n productSet = ServletLibrary.retrieveProductSetInfo(datastore, productSetDisplayName, true);\n }\n if (productSet != null) {\n productSetId = productSet.getProductSetId();\n }\n\n // Search database based on the filters. \n List<ProductEntity> products = \n ServletLibrary.findProducts(datastore, \n businessId,\n productSetId, \n productCategory, \n sortOrder);\n\n if (searchId != null) {\n SearchInfo searchInfo = ServletLibrary.retrieveSearchInfo(datastore, searchId);\n\n if (searchInfo.getGcsUrl() != null) {\n \n String generalProductSetId = \"cloudberryAllProducts\";\n List <String> productSearchIds = ProductSearchLibrary.getSimilarProductsGcs(generalProductSetId, \n searchInfo.getProductCategory(), changeGcsFormat(searchInfo.getGcsUrl()));\n List<ProductEntity> imageSearchProducts = new ArrayList<>();\n productSearchIds.forEach(productId->imageSearchProducts.add(ServletLibrary.retrieveProductInfo(datastore, productId)));\n\n Set<ProductEntity> uniqueProducts = new HashSet<>(products);\n List<ProductEntity> productsDisplayed = new ArrayList<>();\n for (ProductEntity product : imageSearchProducts) {\n if (uniqueProducts.contains(product)) productsDisplayed.add(product);\n }\n products = productsDisplayed;\n }\n\n // Text query if it is specified, will take in this list and output a new\n // list that satisfies the query.\n if (searchInfo.getTextSearch() != null) {\n products = TextSearchLibrary.textSearch(datastore, products, \n searchInfo.getTextSearch());\n }\n }\n\n // Send the response.\n String json = gson.toJson(products);\n response.setContentType(\"application/json;\");\n response.getWriter().println(json);\n }", "@Override\r\n\tpublic List<Product> searchProduct(String name,List<Product> prodlist) {\n\t\tList<Product> n=new ArrayList<Product>();\r\n\t\t{\r\n\t\t\tfor (Product x:prodlist)\r\n\t\t\t{\r\n\t\t\t\tif(name.equals(x.getName()))\r\n\t\t\t\t{\r\n\t\t\t\t\tn.add(x);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn n;\t\r\n\t\t\r\n\t}", "@Transactional(readOnly = true) \n public List<Product> search(String query) {\n \n log.debug(\"REST request to search Products for query {}\", query);\n return StreamSupport\n .stream(productSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .collect(Collectors.toList());\n }", "public void performSearch() {\n History.newItem(MyWebApp.SEARCH_RESULTS);\n getMessagePanel().clear();\n if (keywordsTextBox.getValue().isEmpty()) {\n getMessagePanel().displayMessage(\"Search term is required.\");\n return;\n }\n mywebapp.getResultsPanel().resetSearchParameters();\n //keyword search does not restrict to spots\n mywebapp.addCurrentLocation();\n if (markFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(markFilterCheckbox.getValue());\n }\n if (contestFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setContests(contestFilterCheckbox.getValue());\n }\n if (geoFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setGeospatialOff(!geoFilterCheckbox.getValue());\n }\n if (plateFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(plateFilterCheckbox.getValue());\n }\n if (spotFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setSpots(spotFilterCheckbox.getValue());\n }\n String color = getValue(colorsListBox);\n mywebapp.getResultsPanel().getSearchParameters().setColor(color);\n String manufacturer = getValue(manufacturersListBox);\n if (manufacturer != null) {\n Long id = new Long(manufacturer);\n mywebapp.getResultsPanel().getSearchParameters().setManufacturerId(id);\n }\n String vehicleType = getValue(vehicleTypeListBox);\n mywebapp.getResultsPanel().getSearchParameters().setVehicleType(vehicleType);\n// for (TagHolder tagHolder : tagHolders) {\n// mywebapp.getResultsPanel().getSearchParameters().getTags().add(tagHolder);\n// }\n mywebapp.getResultsPanel().getSearchParameters().setKeywords(keywordsTextBox.getValue());\n mywebapp.getMessagePanel().clear();\n mywebapp.getResultsPanel().performSearch();\n mywebapp.getTopMenuPanel().setTitleBar(\"Search\");\n //mywebapp.getResultsPanel().setImageResources(resources.search(), resources.searchMobile());\n }", "private void get_products_search()\r\n\r\n {\n MakeWebRequest.MakeWebRequest(\"get\", AppConfig.SALES_RETURN_PRODUCT_LIST,\r\n AppConfig.SALES_RETURN_PRODUCT_LIST + \"[\" + Chemist_ID + \",\"+client_id +\"]\", this, true);\r\n\r\n// MakeWebRequest.MakeWebRequest(\"out_array\", AppConfig.SALES_RETURN_PRODUCT_LIST, AppConfig.SALES_RETURN_PRODUCT_LIST,\r\n// null, this, false, j_arr.toString());\r\n //JSONArray jsonArray=new JSONArray();\r\n }", "List<ProductModel> getSearchedOrderedFiltered(int page, int size, String search, String orderBy, FilterModel filterModel, boolean isActive);", "@RequestMapping(value=\"SearchEngine\")\r\n\tpublic String searchParticularProduct(HttpServletRequest request,ModelMap model){\r\n\t\tString productName=request.getParameter(\"search\");\r\n\t\tProductTO productTO=new ProductTO();\r\n\t\tmodel.addAttribute(\"imageList\", searchService.getProductByName(productName));\r\n\t\treturn \"ProductName\";\r\n\t}", "public void search() {\n String q = this.query.getText();\n String cat = this.category.getValue();\n if(cat.equals(\"Book\")) {\n searchBook(q);\n } else {\n searchCharacter(q);\n }\n }", "public List<Product> searchProducts(ProductDTO product) {\n String SQL_SEARCH_QUERY=prepareSql(product);\n List<Product> productList=new ArrayList<>();\n Product p;\n List<Object[]> objList=entityManager.createNativeQuery(SQL_SEARCH_QUERY).getResultList();\n for(Object[] o: objList) {\n p=new Product();\n p.setCategory(new Category());\n p.setId(((BigInteger)o[0]).longValue());\n p.setName(o[1].toString());\n p.setPrice(((BigInteger) o[2]).longValue());\n p.setQuantity((Integer) o[3]);\n p.setVolume(((BigInteger) o[4]).longValue());\n p.setWeight(((BigInteger) o[5]).longValue());\n p.getCategory().setId(((BigInteger) o[6]).longValue());\n productList.add(p);\n }\n return productList;\n }", "public void searchProducts()\n {\n if(!searchBar1.getText().equals(\"\"))\n {\n if(searchBar1.getText().matches(\"[0-9]*\"))\n {\n int number = Integer.parseInt(searchBar1.getText());\n ObservableList<Product> newProductList = FXCollections.observableArrayList();\n Product product = Inventory.lookupProduct(number);\n newProductList.add(product);\n productTableView.setItems(newProductList);\n if(newProductList.contains(null)) {\n alert.setAlertType(Alert.AlertType.ERROR);\n alert.setContentText(\"No Product with that Name or ID found.\");\n alert.show();\n }\n } else {\n ObservableList<Product> newProductList = FXCollections.observableArrayList();\n newProductList = Inventory.lookupProduct(searchBar1.getText());\n productTableView.setItems(newProductList);\n if(newProductList.isEmpty()) {\n alert.setAlertType(Alert.AlertType.ERROR);\n alert.setContentText(\"No Product with that Name or ID found.\");\n alert.show();\n }\n }\n } else {\n productTableView.setItems(Inventory.getAllProducts());\n }\n }", "public List<products> search(String text) {\n\t\t \n\t // get the full text entity manager\n\t FullTextEntityManager fullTextEntityManager =\n\t org.hibernate.search.jpa.Search.\n\t getFullTextEntityManager(entityManager);\n\t \n\t // create the query using Hibernate Search query DSL\n\t QueryBuilder queryBuilder = \n\t fullTextEntityManager.getSearchFactory()\n\t .buildQueryBuilder().forEntity(products.class).get();\n\t \n\t // a very basic query by keywords\n\t org.apache.lucene.search.Query query =\n\t queryBuilder\n\t .keyword()\n\t .onFields(\"title\")\n\t .matching(text)\n\t .createQuery();\n\t \n\t //System.out.println(\"query \"+query.toString());\n\t // wrap Lucene query in an Hibernate Query object\n\t org.hibernate.search.jpa.FullTextQuery jpaQuery =\n\t fullTextEntityManager.createFullTextQuery(query, products.class);\n\t jpaQuery.setMaxResults(10);\n\t //System.out.println(\"query \"+jpaQuery.toString());\n\t // execute search and return results (sorted by relevance as default)\n\t @SuppressWarnings(\"unchecked\")\n\t List<products> results = jpaQuery.getResultList();\n\t \n\t return results;\n\t }", "public void handleSearchProducts()\n {\n int searchProductID;\n Product searchedProduct;\n ObservableList<Product> searchedProducts;\n if (!productSearchTextField.getText().isEmpty())\n {\n // Clear selection from table\n productTable.getSelectionModel().clearSelection();\n\n try {\n // First try to search for part ID\n searchProductID = Integer.parseInt(productSearchTextField.getText());\n searchedProduct = this.inventory.lookupProduct(searchProductID);\n if (searchedProduct != null)\n productTable.getSelectionModel().select(searchedProduct);\n else // if ID parsed and not found\n throw new Exception(\"Item not found\");\n\n } catch (Exception e) {\n // If ID cannot be parsed, try to search by name\n searchedProducts = this.inventory.lookupProduct(productSearchTextField.getText());\n\n if (searchedProducts != null && searchedProducts.size() > 0)\n {\n // If product search yields results\n searchedProducts.forEach((product -> {\n productTable.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);\n productTable.getSelectionModel().select(product);\n }));\n }\n else\n { // If no products found alert user\n Alert alert = new Alert(Alert.AlertType.WARNING);\n alert.setTitle(\"No product was found!\");\n alert.setHeaderText(\"No product was found!\");\n alert.setContentText(\"Your search returned no results.\\n\" +\n \"Please enter the product ID or part name and try again.\");\n alert.show();\n }\n }\n }\n else\n {\n productTable.getSelectionModel().clearSelection();\n }\n }", "@Override\n\tpublic List<Product> searchProducts(int price, int price1) {\n\t\treturn productDAO.findByPriceBetween(price,price1);\n\t\t//return null;\n\t}", "public void initSearchWidget(){\n\n searchview.setOnQueryTextListener(new SearchView.OnQueryTextListener() {\n @Override\n public boolean onQueryTextSubmit(String query) {\n\n //Closes the keyboard once query is submitted\n searchview.clearFocus();\n return false;\n }\n\n @Override\n public boolean onQueryTextChange(String newText) {\n\n //New arraylist for filtered products\n List<product> filteredList = new ArrayList<>();\n\n //Iterating over the array with products and adding every product that matches\n //the query to the new filtered list\n for (product product : listOfProducts){\n if (product.getProductName().toLowerCase().contains(newText.toLowerCase())){\n filteredList.add(product);\n }\n }\n\n //Hides the product list and display \"not found\" message when can't find match\n if (filteredList.size()<1){\n recyclerView.setVisibility(View.GONE);\n noResults.setVisibility(View.VISIBLE);\n }else {\n recyclerView.setVisibility(View.VISIBLE);\n noResults.setVisibility(View.GONE);\n }\n\n //Sets new adapter with filtered products to the recycler view\n productAdapter = new Adapter(MainActivity.this,filteredList);\n recyclerView.setAdapter(productAdapter);\n\n return true;\n }\n });\n }", "public void search() {\n\n lazyModel = new LazyDataModel<Pesquisa>() {\n private static final long serialVersionUID = -6541913048403958674L;\n\n @Override\n public List<Pesquisa> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String, String> filters) {\n\n pesquisarBC.searhValidation(searchParam);\n\n int count = pesquisarBC.count(searchParam);\n lazyModel.setRowCount(count);\n\n if (count > 0) {\n if (first > count) {\n // Go to last page\n first = (count / pageSize) * pageSize;\n }\n SearchFilter parameters = new SearchFilter();\n parameters.setFirst(first);\n parameters.setPageSize(pageSize);\n List<Pesquisa> list = pesquisarBC.search(searchParam, parameters);\n\n logger.info(\"END: load\");\n return list;\n } else {\n return null;\n }\n }\n };\n\n }", "@Test\n\tpublic void searchForProductLandsOnCorrectProduct() {\n\t}", "@Override\n public List<ProductDTO> getProducts(Map<String, String> allParams) throws ProductException {\n List<Criterion> criteria = new ArrayList<>();\n int criteriaCounter = 0;\n String order = null;\n\n if (allParams != null) {\n for (Map.Entry<String, String> entry : allParams.entrySet()) {\n // Validate params\n if (!Arrays.stream(avalibleParams).anyMatch(val -> val.equals(entry.getKey())))\n throw new ProductException(ProductException.INVALID_INPUT, ProductException.INVALID_INPUT_MSG);\n\n if (entry.getKey().equals(avalibleParams[0])) { // avalibleParams[0] is \"order\"\n order = entry.getValue();\n } else {\n // Add a criterion\n criteria.add(new Criterion(entry.getValue(), entry.getKey()));\n criteriaCounter++;\n }\n }\n }\n // Params Excess exception\n if (criteriaCounter > 2)\n throw new ProductException(ProductException.PARAMS_EXCESS, ProductException.PARAMS_EXCESS_MSG);\n\n return articleRepository.getProducts(criteria, order);\n }", "@Override\n public boolean onQueryTextChange(String newText) {\n List<product> filteredList = new ArrayList<>();\n\n //Iterating over the array with products and adding every product that matches\n //the query to the new filtered list\n for (product product : listOfProducts){\n if (product.getProductName().toLowerCase().contains(newText.toLowerCase())){\n filteredList.add(product);\n }\n }\n\n //Hides the product list and display \"not found\" message when can't find match\n if (filteredList.size()<1){\n recyclerView.setVisibility(View.GONE);\n noResults.setVisibility(View.VISIBLE);\n }else {\n recyclerView.setVisibility(View.VISIBLE);\n noResults.setVisibility(View.GONE);\n }\n\n //Sets new adapter with filtered products to the recycler view\n productAdapter = new Adapter(MainActivity.this,filteredList);\n recyclerView.setAdapter(productAdapter);\n\n return true;\n }", "@Override\r\n\tpublic List<Product> search(String key) {\n\tProductExample example = new ProductExample();\r\n\texample.createCriteria().andNameLike(\"%\"+key+\"%\");\r\n\texample.setOrderByClause(\"id desc\");\r\n\tList<Product> list = productMapper.selectByExample(example);\r\n\tsetAll(list);\r\n\treturn list;\r\n\t\t}", "public List searchProduct(String searchTerms) {\n ResultSet rsType = database.searchProduct(searchTerms);\n List<Product> searchedProducts = new ArrayList<>();\n try {\n while (rsType.next()) {\n searchedProducts.add(loadProductFromId(rsType.getInt(\"productid\")));\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n if (searchedProducts.isEmpty()) {\n throw new NoSuchProductException();\n }\n\n return searchedProducts;\n }", "static void searchProductDB() {\n\n int productID = Validate.readInt(ASK_PRODUCTID); // store product ID of user entry\n\n\n productDB.findProduct(productID); // use user entry as parameter for the findProduct method and if found will print details of product\n\n }", "@RequestMapping(value=\"/search\")\r\n\tpublic String searchParameter(@ModelAttribute ProductTO productTO,BindingResult result,ModelMap model){\r\n\t\tif(result.hasErrors())\r\n\t\t\treturn \"SearchResult\";\r\n\t\telse{\r\n\t\t\tmodel.addAttribute(\"imageList\", searchService.getParticularProduct(productTO.getProductBrand(),productTO.getProductPrice(),productTO.getProductCategory()));\r\n\t\t\treturn \"SearchResult\"; \r\n\t\t}\r\n\t}", "@Override\r\n\tpublic List<Mobile> searchProduct(int prodId) {\n\t\tQuery queryOne=entitymanager.createQuery(\"FROM Mobile where mobileId=:mobile_id\");\r\n\t\tqueryOne.setParameter(\"mobile_id\", prodId);\r\n\t\tList<Mobile> myProd=queryOne.getResultList();\r\n\t\treturn myProd;\r\n\t}", "protected IBundleProvider performSearch(String theCriteria) {\n\t\tRuntimeResourceDefinition responseResourceDef = getSubscriptionDao().validateCriteriaAndReturnResourceDefinition(theCriteria);\n\t\tSearchParameterMap responseCriteriaUrl = BaseHapiFhirDao.translateMatchUrl(getSubscriptionDao(), getSubscriptionDao().getContext(), theCriteria, responseResourceDef);\n\n\t\tRequestDetails req = new ServletSubRequestDetails();\n\t\treq.setSubRequest(true);\n\n\t\tIFhirResourceDao<? extends IBaseResource> responseDao = getSubscriptionDao().getDao(responseResourceDef.getImplementingClass());\n\t\tresponseCriteriaUrl.setLoadSynchronousUpTo(1);\n\n\t\tIBundleProvider responseResults = responseDao.search(responseCriteriaUrl, req);\n\t\treturn responseResults;\n\t}", "@Override\n public SearchResult queryBrandShopProduct(String brandId, String pageIndex, String pageSize, String userLv, String price, String size, String colorId, String tagId, String categoryId, String order, String postArea, String imei,String channnelType) throws Exception {\n SearchResult searchResult=aspBizSerchService.queryBrandProductList(\"\", pageIndex, pageSize, tagId, brandId, price, colorId, size, categoryId, order, userLv, postArea, imei, \"2.9.16\",channnelType);\n// brandShop.setResult(searchResult);\n \n return searchResult;\n }", "@CrossOrigin()\r\n @PostMapping(\"/products/search\")\r\n List<ProductEntity> search(@RequestBody @Valid @NotNull String searchExpression) {\r\n System.out.println(searchExpression);\r\n return productRepository.findBySearch(searchExpression);\r\n }", "public static void search() {\n int userSelected = selectFromList(crudParamOptions);\n switch (userSelected){\n case 1:\n searchFirstName();\n break;\n case 2:\n searchLastName();\n break;\n case 3:\n searchPhone();\n break;\n case 4:\n searchEmail();\n break;\n default:\n break;\n }\n }", "@Override\n\tpublic List<Product> searchByName(String productName) {\n\t\treturn productDAO.findByProductName(productName);\n\t\t\n\t}", "@GetMapping(\"/search\")\r\n\tpublic ProductDetails searchProduct(@Valid @RequestBody SearchProduct request) {\r\n\treturn productUtil.toProductDetails(productService.searchProduct(request.getProduct_Id()));\r\n\r\n\t}", "public List<Post> search(PostCriteria criteria, int page, int size);", "private void startSearch(CharSequence text) {\n Query searchByName = product.orderByChild(\"productName\").equalTo(text.toString().trim());\n\n FirebaseRecyclerOptions<Product> productOptions = new FirebaseRecyclerOptions.Builder<Product>()\n .setQuery(searchByName, Product.class)\n .build();\n\n searchAdapter = new FirebaseRecyclerAdapter<Product, ProductViewHolder>(productOptions) {\n @Override\n protected void onBindViewHolder(@NonNull ProductViewHolder viewHolder, int position, @NonNull Product model) {\n\n viewHolder.product_name.setText(model.getProductName());\n\n Picasso.with(getBaseContext()).load(model.getProductImage())\n .into(viewHolder.product_image);\n\n final Product local = model;\n\n viewHolder.setItemClickListener(new ItemClickListener() {\n @Override\n public void onClick(View view, int position, boolean isLongClick) {\n\n Intent product_detail = new Intent(ProductListActivity.this, ProductDetailActivity.class);\n product_detail.putExtra(\"productId\", searchAdapter.getRef(position).getKey());\n startActivity(product_detail);\n }\n });\n }\n\n @NonNull\n @Override\n public ProductViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {\n\n View itemView = LayoutInflater.from(viewGroup.getContext())\n .inflate(R.layout.item_products, viewGroup, false);\n return new ProductViewHolder(itemView);\n }\n };\n searchAdapter.startListening();\n recycler_product.setAdapter(searchAdapter);\n }", "public void executeQBEAdvancedCriteria() {\n Session session = getSession();\n Transaction transaction = session.beginTransaction();\n\n // SELECT p.id, p.description, p.name, p.price, p.supplier_id, p.version, p.DTYPE, s.id, s.name\n // FROM Product p\n Criteria productCriteria = session.createCriteria(Product.class);\n\n // INNER JOIN Supplier s\n // ON p.supplier_id = s.id\n Criteria supplierCriteria = productCriteria.createCriteria(\"supplier\");\n\n // WHERE (s.name = 'SuperCorp')\n Supplier supplier = new Supplier();\n supplier.setName(\"SuperCorp\");\n\n supplierCriteria.add(Example.create(supplier));\n\n // AND (p.name LIKE 'M%')\n Product product = new Product();\n product.setName(\"M%\");\n\n Example productExample = Example.create(product);\n\n // TODO: Why must the price column be excluded?\n productExample.excludeProperty(\"price\");\n productExample.enableLike();\n\n productCriteria.add(productExample);\n\n displayProductsList(productCriteria.list());\n transaction.commit();\n }", "public static ArrayList<Result> search(HashMap<String,ArrayList<String>> map) {\n result = new ArrayList<>();\n finalResult = new ArrayList<>();\n \n String input = map.get(\"search\").get(0);\n searchByName(input);\n \n ArrayList<String> type = map.get(\"type\");\n if(type.isEmpty());\n else for(String t:type){\n searchByType(t);\n result = finalResult;\n }\n \n //<editor-fold defaultstate=\"collapsed\" desc=\"FILTERS\">\n ArrayList<ArrayList<String>> filters = new ArrayList<>();\n filters.add(map.get(\"brand\"));\n filters.add(map.get(\"price\"));\n filters.add(map.get(\"os\"));\n filters.add(map.get(\"memory\"));\n filters.add(map.get(\"storage\"));\n filters.add(map.get(\"numberOfSimSlots\"));\n filters.add(map.get(\"f_camera\"));\n filters.add(map.get(\"b_camera\"));\n /**\n * ArrayList of filters from Mobile Phone\n * 0 = Brand | brand\n * 1 = Price | price\n * 2 = OS | os\n * 3 = Memory | memory\n * 4 = Storage | storage\n * 5 = SIM slots | numberOfSimSlots\n * 6 = Camera front | f_camera\n * 7 = Camera back | b_camera\n */\n int filterMode = 0;\n while(filterMode<filters.size()){\n// for(Result r:result){\n// System.out.println(r.getMP().getFullName());\n// }\n// System.out.println(\"filtermode: \"+filterMode);\n finalResult = new ArrayList<>();\n if(filters.get(filterMode).isEmpty()||filters.get(filterMode).get(0).equals(\"\")){\n filterMode++;\n continue;\n }\n filter(filterMode,filters.get(filterMode++));\n result = finalResult;\n }\n //</editor-fold>\n return result;\n }", "Page<Product> findByNameContaining(@RequestParam(\"name\") String name, Pageable pageable);", "public List<Product> getProductBySearchName(String search) {\r\n List<Product> list = new ArrayList<>();\r\n String query = \"select * from Trungnxhe141261_Product\\n \"\r\n + \"where [name] like ? \";\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, \"%\" + search + \"%\");\r\n rs = ps.executeQuery();\r\n while (rs.next()) {\r\n list.add(new Product(rs.getInt(1),\r\n rs.getString(2),\r\n rs.getString(3),\r\n rs.getDouble(4),\r\n rs.getString(5),\r\n rs.getString(6)));\r\n }\r\n } catch (Exception e) {\r\n }\r\n return list;\r\n }", "protected static void searchById(String Id)\n {\n for (Product element : productList)\n {\n if (element.productIdMatch(Id)) {\n System.out.println(\"\");\n ProductGUI.Display(\"\\n\");\n System.out.println(element);\n ProductGUI.Display(element.toString());\n\n }\n }\n }", "@GetMapping(\"search\")\n public String SearchProducts(Model model,\n @RequestParam(value = \"minCost\", required = false) Integer minCost,\n @RequestParam(value = \"maxCost\", required = false) Integer maxCost) {\n Pageable pageable = PageRequest.of(0, 9, Sort.by(Sort.Direction.DESC, \"title\"));\n Page<Product> page = productService.findAllByCostLessThanEqualAndCostGreaterThanEqual(minCost, maxCost, pageable);\n System.out.println(page);\n model.addAttribute(\"products\", page.getContent());\n model.addAttribute(\"currentPage\", page.getPageable().getPageNumber() + 1);\n //тут какой то косяк Page 1 of 1 containing com.example.springlesson3.domain.Product instances а пишет 9\n model.addAttribute(\"totalPage\", page.getPageable().getPageSize());\n return \"product/productList\";\n }", "public String searchByFilter() {\n if (selectedFilter.size() != 0) {\n for (Genre filterOption : selectedFilter) {\n searchTerm = searchResultTerm;\n searchBook();\n\n System.out.println(\"CURRENT NUMBER OF BOOKS: \" + books.size());\n\n BookCollection temp = this.db.getCollectionByGenre(filterOption);\n System.out.println(\"GETTING COLLECTION FOR FILTERING: \" + temp.getCollectionName() + \" NUM OF BOOKS: \"\n + temp.getCollectionBooks().size());\n filterBookList(temp.getCollectionBooks());\n System.out.println(\"UPDATED NUMBER OF BOOKS: \" + books.size());\n }\n } else {\n searchTerm = searchResultTerm;\n searchBook();\n }\n\n return \"list.xhtml?faces-redirect=true\";\n }", "SearchResponse search(Pageable pageable, QueryBuilder query, Collection<AggregationBuilder> aggregations);", "public void searchProd(){\n\t\t\n\t\t// STEP 4:-\n\t\t// Enter 'mobile' in search bar.\n\t\tWebElement search = driver.findElement(By.name(\"q\"));\n\t\tsearch.sendKeys(\"mobiles\");\n\t\tsearch.sendKeys(Keys.ENTER);\n\t\tSystem.out.println(\"Enter name successfully\");\n\t\t\t\t\t\n\t\t// Click on search icon.\n\t\t//WebElement searchClick = driver.findElement(By.className(\"L0Z3Pu\"));\n\t\t//searchClick.click();\n\t\t//System.out.println(\"clicked search button successfully\");\n\t}", "List<SearchResult> search(SearchQuery searchQuery);", "@PreAuthorize(\"hasRole('SEARCH_PRODUCT')\")\n\t@RequestMapping(\"/searchProductByName\")\n\tpublic ModelAndView searchProductByName(Map<String, Object> model,\n\t\t\t@Validated(Product.ValidationStepOne.class) @ModelAttribute(\"productForm\") Product productForm,\n\t\t\tBindingResult bindingresult, HttpServletRequest request) throws ServiceException, ProductException {\n\n\t\tlogger.debug(CCLPConstants.ENTER);\n\t\tModelAndView mav = new ModelAndView();\n\t\tString productName = \"\";\n\t\tString searchType = \"\";\n\n\t\tList<ProductDTO> productDtoList = null;\n\t\tmav.setViewName(\"productConfig\");\n\t\tsearchType = request.getParameter(\"searchType\");\n\t\tmav.addObject(\"SearchType\", searchType);\n\n\t\tlogger.debug(\"Before calling productService.getAllIssuers()\");\n\n\t\tif (bindingresult.hasErrors()) {\n\t\t\treturn mav;\n\t\t}\n\n\t\tproductName = productForm.getProductName();\n\t\tproductDtoList = productService.getProductsByName(productName);\n\n\t\tlogger.debug(\"after calling productService.getProductsByName()\");\n\n\t\tmav.addObject(\"productForm\", new Product());\n\t\tmav.setViewName(\"productConfig\");\n\t\tmav.addObject(\"productTableList\", productDtoList);\n\t\tmav.addObject(\"productForm\", productForm);\n\t\tmav.addObject(\"showGrid\", \"true\");\n\t\tlogger.debug(CCLPConstants.EXIT);\n\t\treturn mav;\n\t}", "public void search(Map<String, String> searchParam);", "SearchResponse query(SearchRequest request, Map<SearchParam, String> params);", "List<Revenue> search(String query);", "public void searchProduct() throws InterruptedException {\n\n Thread.sleep(2000);\n\n if(isDisplayed(popup_suscriber)){\n click(popup_suscriber_btn);\n }\n\n if(isDisplayed(search_box) && isDisplayed(search_btn)){\n type(\"Remera\", search_box);\n click(search_btn);\n Thread.sleep(2000);\n click(first_product_gallery);\n Thread.sleep(2000);\n }else{\n System.out.println(\"Search box was not found!\");\n }\n\n }", "public List<VirtualMachine> search(SearchCriteria searchCriteria, SearchMode mode,\n List<SearchCriterionType> searchOrder);", "@RequestMapping(value=\"/search\",method=RequestMethod.GET)\r\n\tpublic List<ProductBean> searchByProductName(String name)throws SearchException {\r\n\t\treturn service.searchProductByName(name); \r\n\t}", "@Override\r\n\tpublic List<Product> searchProductByName(String productName) {\n\t\treturn dao.searchProductByName(productName);\r\n\t}", "List<T> findByCriteria(String eCriteria, Object... parameters);", "public String[][] getSearchResults(List products, ProductCategoryDAO productCategoryDAO){\n \n String[][] searchProductResult = new String[products.size()][10];\n \n UserDAO userDAO = new MySQLUserDAOImpl();\n SharingProductDAO sharingProductDAO = new MySQLSharingProductDAOImpl();\n List userSharedProduct = null;\n \n for(int i=0; i<products.size(); i++){\n\n searchProductResult[i][0] = Integer.toString(((Product)(products.get(i))).getPID());\n searchProductResult[i][1] = ((Product)(products.get(i))).getName();\n searchProductResult[i][2] = ((Product)(products.get(i))).getNote();\n searchProductResult[i][3] = ((Product)(products.get(i))).getLogo();\n searchProductResult[i][4] = ((Product)(products.get(i))).getPhoto();\n searchProductResult[i][5] = (productCategoryDAO.getProductCategory(((Product)(products.get(i))).getPCID())).getName();\n searchProductResult[i][6] = ((Product)(products.get(i))).getEmail();\n searchProductResult[i][7] = userDAO.getUser(((Product)(products.get(i))).getEmail()).getName();\n searchProductResult[i][8] = userDAO.getUser(((Product)(products.get(i))).getEmail()).getSurname();\n\n if (!userDAO.getUser(((Product)(products.get(i))).getEmail()).getAdmin()) {\n userSharedProduct = sharingProductDAO.getAllEmailsbyPID(Integer.parseInt(searchProductResult[i][0]));\n if (userSharedProduct.isEmpty() || userSharedProduct.size()>1){\n searchProductResult[i][9] = String.valueOf(userSharedProduct.size()) + \" utenti\";\n } else {\n searchProductResult[i][9] = String.valueOf(userSharedProduct.size()) + \" utente\";\n }\n } else {\n searchProductResult[i][9] = \"Tutti gli utenti\";\n }\n\n }\n \n if (products.size() > 0){\n return searchProductResult;\n } else {\n return null;\n }\n \n \n }", "List<TypePatientPropertyCondition> search(String query);", "Long queryCount(ProductSearchParm productSearchParm);", "public void searchForProduct(String productName) {\n setTextOnSearchBar(productName);\n clickOnSearchButton();\n }", "@Override\n\tpublic int findProducts(List<Product> products, int[] categoryId, String keyWord, double lowNormalPrice,\n\t\t\tdouble highNormalPrice, double lowMemberPrice, double highMemberPrice, Date startDate, Date endDate,\n\t\t\tint pageNo, int pageSize) {\n\t\treturn 0;\n\t}", "List<ProductPurchaseItem> getAllSupplierProductPurchaseItems(long suppId, String searchStr);", "@Test\n\tpublic void testExistingProductsSearchTyped() {\n\t\tEntityManager em = emf.createEntityManager();\n\t\ttry {\n\t\t\tDataLoader dl = new DataLoader(emf);\n\t\t\tList<Product> products = dl.loadProducts(null);\n\t\t\tdl.loadStock(products);\n\t\t\t// Search for mutiple Stocks.\n\t\t\tTypedQuery<Stock> query = em.createNamedQuery(\"Stock.getAllStocks\", Stock.class);\n\t\t\tList<Stock> result = query.getResultList();\n\n\t\t\tassertTrue(\n\t\t\t\t\t\"Search for mutiple existing stocks: Multiple stocks not added\",\n\t\t\t\t\tresult.size() > 2);\n\t\t} finally {\n\t\t\tem.close();\n\t\t}\n\t}", "public void ProductsSearch(DefaultTableModel tableModel, String parameter){\n connect();\n ResultSet result = null;\n tableModel.setRowCount(0);\n tableModel.setColumnCount(0);\n String sql = \"SELECT id_producto as Id, descripcion, presentacion, cantidad, precio, subtotal, proveedor FROM \"+\n \"productos WHERE descripcion LIKE ? ORDER BY descripcion\";\n \n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n ps.setString(1, \"%\" + parameter + \"%\");\n result = ps.executeQuery();\n if(result != null){\n int columnNumber = result.getMetaData().getColumnCount();\n for(int i = 1; i < columnNumber; i++){\n tableModel.addColumn(result.getMetaData().getColumnName(i));\n }\n while(result.next()){\n Object []obj = new Object[columnNumber];\n for(int i = 1; i < columnNumber; i++){\n obj[i-1] = result.getObject(i);\n }\n tableModel.addRow(obj);\n }\n }\n connect.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n } \n }", "public ArrayList<Product> searchProduct(String s) throws ProductException{\r\n\tArrayList<Product> products=new ArrayList<Product>();\r\n\t\r\n\tif(ProductRepository.productsList.isEmpty()) {\r\n\t\tthrow new ProductException(\"there are no products in the store\");\r\n\t\t\r\n\t}else {\r\n\t\tproducts.addAll(pDoa.searchProducts(s));\r\n\t\t\r\n\t}\r\n\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\t\t\treturn products;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}", "public Map<String, Object> searchPaginatedAPIProducts(String searchQuery, String organization, int start, int end) throws APIManagementException {\n SortedSet<APIProduct> productSet = new TreeSet<APIProduct>(new APIProductNameComparator());\n List<APIProduct> productList = new ArrayList<APIProduct>();\n Map<String, Object> result = new HashMap<String, Object>();\n if (log.isDebugEnabled()) {\n log.debug(\"Original search query received : \" + searchQuery);\n }\n\n Organization org = new Organization(organization);\n String[] roles = APIUtil.getFilteredUserRoles(userNameWithoutChange);\n Map<String, Object> properties = APIUtil.getUserProperties(userNameWithoutChange);\n UserContext userCtx = new UserContext(userNameWithoutChange, org, properties, roles);\n try {\n PublisherAPIProductSearchResult searchAPIs = apiPersistenceInstance.searchAPIProductsForPublisher(org,\n searchQuery, start, end, userCtx);\n if (log.isDebugEnabled()) {\n log.debug(\"searched API products for query : \" + searchQuery + \" :-->: \" + searchAPIs.toString());\n }\n\n if (searchAPIs != null) {\n List<PublisherAPIProductInfo> list = searchAPIs.getPublisherAPIProductInfoList();\n List<Object> apiList = new ArrayList<>();\n for (PublisherAPIProductInfo publisherAPIInfo : list) {\n APIProduct mappedAPI = new APIProduct(new APIProductIdentifier(publisherAPIInfo.getProviderName(),\n publisherAPIInfo.getApiProductName(), publisherAPIInfo.getVersion()));\n mappedAPI.setUuid(publisherAPIInfo.getId());\n mappedAPI.setState(publisherAPIInfo.getState());\n mappedAPI.setContext(publisherAPIInfo.getContext());\n mappedAPI.setApiSecurity(publisherAPIInfo.getApiSecurity());\n mappedAPI.setThumbnailUrl(publisherAPIInfo.getThumbnail());\n populateAPIStatus(mappedAPI);\n productList.add(mappedAPI);\n }\n productSet.addAll(productList);\n result.put(\"products\", productSet);\n result.put(\"length\", searchAPIs.getTotalAPIsCount());\n result.put(\"isMore\", true);\n } else {\n result.put(\"products\", productSet);\n result.put(\"length\", 0);\n result.put(\"isMore\", false);\n }\n } catch (APIPersistenceException e) {\n throw new APIManagementException(\"Error while searching the api \", e);\n }\n return result ;\n }", "@Override\n public List<Vehicle> findBySearchCriteria(SearchCriteria criteria) {\n List<AggregationOperation> operations = new ArrayList<>();\n operations.addAll(getVehicleAggregations());\n if (criteria.getMakes() != null && !criteria.getMakes().isEmpty()) {\n operations.add(getMatchOperation(\"cars.vehicles.make\", Operation.IN, criteria.getMakes()));\n }\n if (criteria.getModels() != null && !criteria.getModels().isEmpty()) {\n operations.add(getMatchOperation(\"cars.vehicles.model\", Operation.IN, criteria.getModels()));\n }\n if (criteria.getWarehouses() != null && !criteria.getWarehouses().isEmpty()) {\n operations.add(\n getMatchOperation(\n \"_id\",\n Operation.IN,\n criteria.getWarehouses().stream()\n .mapToInt(BigDecimal::intValue)\n .boxed()\n .collect(Collectors.toList())));\n }\n if (criteria.getPriceRange() != null) {\n operations.add(\n getMatchOperation(\"cars.vehicles.price\", Operation.BTW, criteria.getPriceRange()));\n }\n if (criteria.getYearRange() != null) {\n operations.add(\n getMatchOperation(\"cars.vehicles.year_model\", Operation.BTW, criteria.getYearRange()));\n }\n\n operations.add(getVehicleProjection());\n if (criteria.getSort() != null) {\n operations.add(\n sort(\n Sort.Direction.valueOf(criteria.getSort().getDirection().toString()),\n criteria.getSort().getField()));\n }\n TypedAggregation<Warehouse> aggregation =\n Aggregation.newAggregation(Warehouse.class, operations);\n List<Vehicle> filterVehicles =\n mongoTemplate.aggregate(aggregation, Vehicle.class).getMappedResults();\n return filterVehicles;\n }", "public void performSearch() {\n OASelect<CorpToStore> sel = getCorpToStoreSearch().getSelect();\n sel.setSearchHub(getSearchFromHub());\n sel.setFinder(getFinder());\n getHub().select(sel);\n }", "private void Searchdata() {\r\n Connection con;\r\n String searchby;\r\n String sortby;\r\n String keyword;\r\n \r\n searchby = (String)cboSearchby.getSelectedItem();\r\n sortby = (String)cboSortby.getSelectedItem();\r\n keyword = txfSearch.getText();\r\n try {\r\n con = ClassSQL.getConnect();\r\n Statement stmt = con.createStatement();\r\n String sql = Searchstmt(searchby,sortby,keyword);\r\n // System.out.println(sql); //for testing purposes\r\n stmt.executeQuery(sql);\r\n con.close();\r\n } catch (SQLException ex) {\r\n ex.printStackTrace();\r\n } finally {\r\n // Place code in here that will always be run.\r\n }\r\n }", "@Override\n public Data3DPlastic search() {\n return super.search();\n }", "public void searchProduct(String product){\n driver.findElement(By.id(\"search_query_top\")).sendKeys(product);\n List<WebElement> options = driver.findElements(By.className(\"ac_results\"));\n for(WebElement option:options){\n if(option.getText().equalsIgnoreCase(\"printed dress\")){\n option.click();\n break;\n }\n }\n driver.findElement(By.name(\"submit_search\")).click();\n }", "abstract public void search();", "@Override\n public ArrayList<ItemBean> searchAll(String keyword)\n {\n String query= \"SELECT * FROM SilentAuction.Items WHERE Item_ID =?\";\n //Seacrh by Category Query\n String query1=\"SELECT * FROM SilentAuction.Items WHERE Category LIKE?\";\n //Seaches and finds items if Category is inserted\n ArrayList<ItemBean> resultsCat = searchItemsByCategory(query1,keyword);\n //Searches and finds items if number is inserted \n ArrayList<ItemBean> resultsNum= searchItemsByNumber(query,keyword);\n resultsCat.addAll(resultsNum);\n return resultsCat;\n }", "@GetMapping(\"/products/{text}\")\n public List<Product> findProductsContaining(@PathVariable String text){\n return productRepository.findProductByNameContains(text);\n }", "@Test\n public void testGetProductsSearchAction() throws ClientException, IOException, ProcessingException {\n CloudResponse response = this.actions.getProductsSearchAction(\"{text}\", \"{filter}\", \"{selectedFacets}\", \"{queryFacets}\", \"{sort}\", -1, -1);\n List<Integer> expectedResults = Arrays.asList(200, 400);\n LOG.info(\"Got status {}\", response.getStatusLine());\n Assert.assertTrue(expectedResults.contains(response.getStatusLine().getStatusCode()));\n\n if(response.getStatusLine().getStatusCode() == 200) {\n this.actions.checkResponseJSONSchema(\"#/definitions/PagedResponseProduct\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 400) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n \n }", "private void startSearch(CharSequence text) {\n Query searchByname = productList.orderByChild(\"name\").equalTo(text.toString());\n //Create Options with Query\n FirebaseRecyclerOptions<Product> productOptions = new FirebaseRecyclerOptions.Builder<Product>()\n .setQuery(searchByname,Product.class)\n .build();\n\n\n searchAdapter = new FirebaseRecyclerAdapter<Product, ProductViewHolder>(productOptions) {\n @Override\n protected void onBindViewHolder(@NonNull ProductViewHolder holder, int position, @NonNull Product model) {\n\n holder.txtProductName.setText(model.getName());\n Picasso.with(getBaseContext()).load(model.getImage())\n .into(holder.imgProduct);\n\n final Product local = model;\n holder.setItemClickListener(new ItemClickListener() {\n @Override\n public void onClick(View view, int position, boolean isLongClick) {\n //Start New Activity\n Intent detail = new Intent(ProductList.this,ProductDetail.class);\n detail.putExtra(\"ProductId\",searchAdapter.getRef(position).getKey());\n startActivity(detail);\n }\n });\n\n }\n\n @NonNull\n @Override\n public ProductViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {\n View itemView = LayoutInflater.from(viewGroup.getContext())\n .inflate(R.layout.product_item,viewGroup,false);\n return new ProductViewHolder(itemView);\n }\n };\n searchAdapter.startListening();\n recyclerView.setAdapter(searchAdapter);\n\n }", "private void onClickSearch() {\n if (lat.isEmpty() || lon.isEmpty()) {\n Toast.makeText(\n self,\n getResources()\n .getString(R.string.wait_for_getting_location),\n Toast.LENGTH_SHORT).show();\n getLatLong();\n }\n //get current distance search :\n distance = ((double) skbDistance.getProgress() / 10) + \"\";\n\n Bundle b = new Bundle();\n b.putString(GlobalValue.KEY_SEARCH, edtSearch.getText().toString());\n b.putString(GlobalValue.KEY_CATEGORY_ID, categoryId);\n b.putString(GlobalValue.KEY_CITY_ID, cityId);\n b.putString(GlobalValue.KEY_OPEN, ALL_OR_OPEN);\n b.putString(GlobalValue.KEY_DISTANCE, distance);\n b.putString(GlobalValue.KEY_SORT_BY, SORT_BY);\n b.putString(GlobalValue.KEY_SORT_TYPE, SORT_TYPE);\n if (Constant.isFakeLocation) {\n b.putString(GlobalValue.KEY_LAT, GlobalValue.glatlng.latitude + \"\");\n b.putString(GlobalValue.KEY_LONG, GlobalValue.glatlng.longitude + \"\");\n } else {\n b.putString(GlobalValue.KEY_LAT, lat);\n b.putString(GlobalValue.KEY_LONG, lon);\n }\n\n if (isSelectShop)\n ((MainTabActivity) getParent()).gotoActivity(\n SearchShopResultActivity.class, b);\n else\n ((MainTabActivity) getParent()).gotoActivity(\n SearchProductResultActivity.class, b);\n }", "public void search() {\r\n \t\r\n }", "private void searchList() {\n String keyword = search_bar.getText().toString();\n try {\n if (!TextUtils.isEmpty(keyword)) {\n RemoteMongoCollection<Document> plants = mongoDbSetup.getCollection(\"plants\");\n RemoteMongoIterable<Document> plantIterator = plants.find();\n\n docsToUse.clear();\n listOfPlants.clear();\n mRecyclerView.removeAllViews();\n\n final ArrayList<Document> docs = new ArrayList<>();\n\n plantIterator\n .forEach(document -> {\n plant_name = document.getString(\"plant_name\");\n picture_url = document.getString(\"picture_url\");\n description = document.getString(\"description\");\n\n if (plant_name.toLowerCase().contains(keyword.toLowerCase())) {\n\n docs.add(document);\n setPlantList(docs);\n listOfPlants.add(new RecyclerViewPlantItem(picture_url, plant_name, description));\n\n }\n })\n\n .addOnCompleteListener(task -> {\n if (listOfPlants.size() == 0) {\n search_bar.requestFocus();\n search_bar.setError(\"No match found\");\n\n listOfPlants.clear();\n }\n mRecyclerView.setHasFixedSize(true);\n mLayoutManager = new LinearLayoutManager(getActivity());\n mAdapter = new RecyclerViewAdapter(listOfPlants, getActivity());\n mAdapter.notifyDataSetChanged();\n\n mRecyclerView.setLayoutManager(mLayoutManager);\n mRecyclerView.setAdapter(mAdapter);\n })\n .addOnFailureListener(e -> Log.e(TAG, \"error \" + e.getMessage()));\n\n } else if (searchButton.isPressed() && TextUtils.isEmpty(keyword)) {\n search_bar.setError(\"Please type a keyword\");\n listOfPlants.clear();\n findPlantsList();\n }\n } catch (Throwable e) {\n Log.e(TAG, \"NullPointerException: \" + e.getMessage());\n }\n }", "@Override\n // String land, String[] kommune, String[] postnr, String[] lokalitet, String[] vej\n public Collection<KommuneEntity> search(SearchParameters parameters) {\n StringList hql = new StringList();\n StringList join = new StringList();\n ConditionList conditions = new ConditionList(ConditionList.Operator.AND);\n\n hql.append(\"select distinct \"+KommuneEntity.databaseKey+\" from KommuneEntity as \"+KommuneEntity.databaseKey);\n join.setPrefix(\"join \");\n\n conditions.addCondition(KommuneEntity.landCondition(parameters));\n\n conditions.addCondition(KommuneEntity.kommuneCondition(parameters));\n if (parameters.has(Key.LOKALITET)) {\n join.append(KommuneEntity.joinLokalitet());\n conditions.addCondition(LokalitetEntity.lokalitetCondition(parameters));\n }\n if (parameters.has(Key.POST)) {\n Pair<String[],Condition> post = KommuneEntity.joinPost();\n join.append(post.getLeft());\n conditions.addCondition(post.getRight());\n conditions.addCondition(PostNummerEntity.postCondition(parameters));\n }\n if (parameters.has(Key.VEJ)) {\n join.append(KommuneEntity.joinVej());\n conditions.addCondition(VejstykkeEntity.vejCondition(parameters));\n }\n if (parameters.hasGlobalCondition()) {\n // Add any further restrictions from the global condition\n conditions.addCondition(parameters.getGlobalCondition().whereField(\"kommune\"));\n }\n\n // our conditions list should now be complete\n\n if (conditions.hasRequiredJoin()) {\n join.append(conditions.getRequiredJoin());\n }\n\n // our join list should now be complete\n\n if (join.size()>0) {\n hql.append(join.join(\" \"));\n }\n if (conditions.size() > 0) {\n hql.append(\"where\");\n hql.append(conditions.getWhere());\n }\n // Append order clause\n hql.append(\"order by \"+KommuneEntity.databaseKey+\".kode\");\n\n return this.query(hql, conditions, parameters.getGlobalCondition());\n }", "List<ShipmentInfoPODDTO> search(String query);", "public boolean search(String prodName)\n\t{\n\t WebDriverWait wait = new WebDriverWait(driver, 20);\n wait.until(ExpectedConditions.visibilityOf(driver.findElement(searchbox))).sendKeys(prodName);\n \n //Tap on search after entering prod name\n wait.until(ExpectedConditions.visibilityOf(driver.findElement(searchBTN))).click();\n\t\n // When the page is loaded, verify whether the loaded result contains the name of product or not \n String k = driver.findElement(By.xpath(\"//*[@id=\\\"LST1\\\"]/div/div[1]/div[2]\")).getText();\n boolean p = k.contains(prodName);\n return p;\n \n\t}", "private void search(String querySearch) {\n searchResult = new ArrayList<>();\n for (MonitoringModel item : searchList) {\n if (item.getPROG_ID().toLowerCase().contains(querySearch) || item.getPROG_ID().contains(querySearch) ||\n item.getKEPUTUSAN().toLowerCase().contains(querySearch) || item.getKEPUTUSAN().contains(querySearch) ||\n Common.formatTgl(item.getTGL_TARGET()).toLowerCase().contains(querySearch) || Common.formatTgl(item.getTGL_TARGET()).contains(querySearch) ||\n Common.formatStatusMonitoringToString(item.getLAST_STATUS()).toLowerCase().contains(querySearch) || Common.formatStatusMonitoringToString(item.getLAST_STATUS()).contains(querySearch)) {\n searchResult.add(item);\n }\n }\n if (searchResult.isEmpty())\n tvEmptySearch.setText(\"No results found for '\" + querySearch + \"'\");\n else\n tvEmptySearch.setText(\"\");\n\n searchAdapter = new ListAdapter(getContext(), searchResult);\n rvList.setAdapter(searchAdapter);\n }", "public List<InternalProduct> queryProduct(String productId, String name, Timestamp dateAfter, Timestamp dateBefore,\r\n\t\t\tString status, String asin, String orderBy, String ascOrDesc) {\r\n\r\n\t\t// SQL part1: select & from\r\n\t\tString part1 = \"select product_id,name,description,create_time,status,asin from internal_product\";\r\n\r\n\t\t// SQL part2: where\r\n\t\tString part2 = \"\";\r\n\t\tif (Filter.nullFilter(productId) != \"\" || Filter.nullFilter(name) != \"\" || dateAfter != null\r\n\t\t\t\t|| dateBefore != null || Filter.nullFilter(status) != \"\" || Filter.nullFilter(asin) != \"\") {\r\n\t\t\t// where condition exists\r\n\t\t\t// construct where condition\r\n\t\t\tList<String> whereCondition = new ArrayList<>();\r\n\t\t\twhereCondition.add(\" where \");// size is 1 now\r\n\t\t\tif (Filter.nullFilter(productId) != \"\") {\r\n\t\t\t\twhereCondition.add(whereCondition.size() == 1 ? \"\" : \" and \");\r\n\t\t\t\twhereCondition.add(\"product_id='\" + Integer.parseInt(productId.trim()) + \"'\");\r\n\t\t\t}\r\n\t\t\tif (Filter.nullFilter(name) != \"\") {\r\n\t\t\t\twhereCondition.add(whereCondition.size() == 1 ? \"\" : \" and \");\r\n\t\t\t\twhereCondition.add(\"name like '%\" + name.trim() + \"%'\");// %name%\r\n\t\t\t}\r\n\t\t\tif (dateAfter != null) {\r\n\t\t\t\twhereCondition.add(whereCondition.size() == 1 ? \"\" : \" and \");\r\n\t\t\t\twhereCondition.add(\"create_time > '\" + dateAfter + \"'\");\r\n\t\t\t}\r\n\t\t\tif (dateBefore != null) {\r\n\t\t\t\twhereCondition.add(whereCondition.size() == 1 ? \"\" : \" and \");\r\n\t\t\t\twhereCondition.add(\"create_time < '\" + dateBefore + \"'\");\r\n\t\t\t}\r\n\t\t\tif (Filter.nullFilter(status) != \"\") {\r\n\t\t\t\twhereCondition.add(whereCondition.size() == 1 ? \"\" : \" and \");\r\n\t\t\t\twhereCondition.add(\"status='\" + status.trim() + \"'\");\r\n\t\t\t}\r\n\t\t\tif (Filter.nullFilter(asin) != \"\") {\r\n\t\t\t\twhereCondition.add(whereCondition.size() == 1 ? \"\" : \" and \");\r\n\t\t\t\twhereCondition.add(\"asin='\" + asin.trim() + \"'\");\r\n\t\t\t}\r\n\r\n\t\t\t// convert List to String\r\n\t\t\tfor (String wc : whereCondition) {\r\n\t\t\t\tpart2 += wc;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// SQL part3: order by\r\n\t\tString part3 = \"\";\r\n\t\tif (orderBy != null && !\"\".equals(orderBy.trim())) {\r\n\t\t\t// order by condition exists\r\n\t\t\t// construct order by condition\r\n\t\t\tpart3 += \" order by \" + orderBy;\r\n\t\t\tif (ascOrDesc != null && !\"\".equals(ascOrDesc)) {\r\n\t\t\t\t// use the specified sort order\r\n\t\t\t\tpart3 += \" \" + ascOrDesc;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// get the SQL string\r\n\t\tString sql = part1 + part2 + part3;\r\n\t\t// System.out.println(sql);\r\n\r\n\t\tList<InternalProduct> products = new ArrayList<>();\r\n\t\tConnection con = null;\r\n\t\ttry {\r\n\t\t\tcon = DB.getConnection();\r\n\t\t\tPreparedStatement ps = con.prepareStatement(sql);\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tInternalProduct product = new InternalProduct();\r\n\t\t\t\tproduct.setProductId(rs.getInt(1));\r\n\t\t\t\tproduct.setName(rs.getString(2));\r\n\t\t\t\tproduct.setDescription(rs.getString(3));\r\n\t\t\t\tproduct.setCreateTime(rs.getTimestamp(4));\r\n\t\t\t\tproduct.setStatus(rs.getString(5));\r\n\t\t\t\tproduct.setAsin(rs.getString(6));\r\n\r\n\t\t\t\tproducts.add(product);\r\n\t\t\t}\r\n\t\t\trs.close();\r\n\t\t\tps.close();\r\n\t\t\tcon.close();\r\n\t\t} catch (SQLException | NamingException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t} finally {\r\n\t\t\tboolean flag = true;\r\n\t\t\ttry {\r\n\t\t\t\tif (con == null || con.isClosed()) {\r\n\t\t\t\t\tflag = false;\r\n\t\t\t\t}\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tif (flag) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcon.close();\r\n\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn products;\r\n\t}", "public void onActionSearchProducts(ActionEvent actionEvent) {\r\n\r\n try {\r\n String search = searchProducts.getText();\r\n\r\n ObservableList<Product> searched = Inventory.lookupProduct(search);\r\n\r\n if (searched.size() == 0) {\r\n Alert alert1 = new Alert(Alert.AlertType.ERROR);\r\n alert1.setTitle(\"Name not found\");\r\n alert1.setContentText(\"Product name not found. If a number is entered in the search box, an id search will occur.\");\r\n alert1.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);\r\n alert1.showAndWait();\r\n try {\r\n int id = Integer.parseInt(search);\r\n Product product1 = Inventory.lookupProduct(id);\r\n if (product1 != null) {\r\n searched.add(product1);\r\n }\r\n else {\r\n Alert alert2 = new Alert(Alert.AlertType.ERROR);\r\n alert2.setTitle(\"Error Message\");\r\n alert2.setContentText(\"Product name and id not found.\");\r\n alert2.showAndWait();\r\n }\r\n } catch (NumberFormatException e) {\r\n //ignore\r\n }\r\n }\r\n\r\n productsTableView.setItems(searched);\r\n }\r\n catch (NullPointerException n) {\r\n //ignore\r\n }\r\n }", "SearchResponse search(Pageable pageable, QueryBuilder query, AggregationBuilder aggregation);", "SearchResultCompany search(String keywords);", "public void search() {\n try {\n for(int i = 0; i < this.queries.size(); i++){\n search(i);\n // in case of error stop\n if(!this.searchOK(i)){\n System.out.println(\"\\t\" + new Date().toString() + \" \" + db + \" Search for rest queries cancelled, because failed for query \" + i + \" : \" + this.queries.get(i));\n break;\n }\n }\n } catch (UnsupportedEncodingException ex) {\n Logger.getLogger(EntrezSearcher.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public List<Contact> searchContacts(Map<SearchTerm,String> criteria);", "public void performSearch() {\n OASelect<QueryInfo> sel = getQueryInfoSearch().getSelect();\n sel.setSearchHub(getSearchFromHub());\n sel.setFinder(getFinder());\n getHub().select(sel);\n }", "@Override\n public List<ProductDTO> getProducts(Map<String, String> params) throws ApiException {\n\n if (params.size() > 3 || (params.get(\"order\") == null && params.size() == 3)) {\n throw new ApiException(HttpStatus.BAD_REQUEST, \"Error: Cantidad de filtros simultaneos excedida.\");\n } else {\n List<ProductDTO> arrProducts = new ArrayList<>();\n Map<Long, ProductDTO> products = this.productsRepository.selectProducts(params);\n for (Map.Entry<Long, ProductDTO> filter : products.entrySet()) {\n arrProducts.add(filter.getValue());\n }\n return arrProducts;\n }\n }", "private JsonObject search(JsonObject request) {\n\t\t\tJsonObject result = new JsonObject();\n\t\t\tJsonArray artists = new JsonArray();\n\t\t\tJsonArray titles = new JsonArray();\n\t\t\tJsonArray tags = new JsonArray();\n\t\t\tJsonArray arSimilars = new JsonArray();\n\t\t\tJsonArray tiSimilars = new JsonArray();\n\t\t\tJsonArray taSimilars = new JsonArray();\n\t\t\t//Individually search by artist, by title and by tag. \n\t\t\tartists = request.getAsJsonArray(\"searchByArtist\");\n\t\t\ttitles = request.getAsJsonArray(\"searchByTitle\");\n\t\t\ttags = request.getAsJsonArray(\"searchByTag\");\n\t\t\t//If the request contains \"artist\", we search each artist's similar song, and add it to a JsonArray.\n\t\t\tif(artists != null && artists.size() >= 1) {\n\t\t\t\tfor(JsonElement artist: artists) {\n\t\t\t\t\tarSimilars.add(this.sl.searchByArtist(artist.getAsString()));\t\n\t\t\t\t}\n\t\t\t\t//We add the JsonArray to result, associated with \"searchByArtist\".\n\t\t\t\tresult.add(\"searchByArtist\", arSimilars);\n\t\t\t}\n\t\t\t//If the request contains \"tag\", we search each tag's similar song, and add it to a JsonArray.\n\t\t\tif(tags != null && tags.size() >= 1) {\n\t\t\t\tfor(JsonElement tag: tags) {\t\t\t\t\n\t\t\t\t\ttaSimilars.add(this.sl.searchByTag(tag.getAsString()));\t\t\t\t\n\t\t\t\t}\n\t\t\t\t//We add the JsonArray to result, associated with \"searchByTag\".\n\t\t\t\tresult.add(\"searchByTag\", taSimilars);\n\t\t\t}\t\t\n\t\t\t//If the request contains title, we search each title's similar song, and add it to a JsonArray\n\t\t\tif(titles != null && titles.size() >= 1) {\t\t\t\n\t\t\t\tfor(JsonElement title: titles) {\n\t\t\t\t\ttiSimilars.add(this.sl.searchByTitle(title.getAsString()));\n\t\t\t\t}\n\t\t\t\t//We add the JsonArray to result, associated with \"searchByTiltle\".\n\t\t\t\tresult.add(\"searchByTitle\", tiSimilars);\n\t\t\t}\n\t\t\treturn result;\n\t\t}", "private void searchExec(){\r\n\t\tString key=jComboBox1.getSelectedItem().toString();\r\n\t\tkey=NameConverter.convertViewName2PhysicName(\"Discount\", key);\r\n\t\tString valueLike=searchTxtArea.getText();\r\n\t\tList<DiscountBean>searchResult=discountService.searchDiscountByKey(key, valueLike);\r\n\t\tjTable1.setModel(ViewUtil.transferBeanList2DefaultTableModel(searchResult,\"Discount\"));\r\n\t}" ]
[ "0.7555883", "0.74527353", "0.7226163", "0.6903928", "0.67326266", "0.67190266", "0.66514593", "0.6649681", "0.65812784", "0.6558073", "0.6522826", "0.6372444", "0.63489836", "0.6296901", "0.61764026", "0.61549765", "0.6154209", "0.61345917", "0.60914004", "0.6083414", "0.60491526", "0.6027349", "0.60208803", "0.60164607", "0.6011076", "0.59862655", "0.5955669", "0.5953393", "0.59402204", "0.59355074", "0.59265524", "0.5916147", "0.59079605", "0.5897869", "0.5880531", "0.5872374", "0.58629465", "0.58494496", "0.5842369", "0.58370674", "0.58300084", "0.5823177", "0.5823021", "0.5822406", "0.58220804", "0.5814863", "0.5790027", "0.57800597", "0.57744014", "0.5771276", "0.57598", "0.57538295", "0.57531625", "0.57520044", "0.57487977", "0.57439625", "0.57298994", "0.57226336", "0.5722084", "0.57100046", "0.5708075", "0.57046616", "0.5704617", "0.5701991", "0.56976396", "0.56891906", "0.56881654", "0.5675824", "0.5665919", "0.5664578", "0.5661745", "0.56614614", "0.564913", "0.5632588", "0.5632493", "0.5630196", "0.5629731", "0.56294984", "0.5626346", "0.5624687", "0.561314", "0.56097424", "0.5592881", "0.5592478", "0.5585557", "0.5580197", "0.5571227", "0.5568465", "0.5566713", "0.55460846", "0.5542121", "0.5541157", "0.55287874", "0.5527421", "0.55273885", "0.552646", "0.55129665", "0.55093944", "0.5507892", "0.5501422" ]
0.6745379
4
The method to populate the search report map with values obtained from the request and the response.
private void generateSearchReport(final Map<String, String> request, final List<Map<String, String>> resultMap) { Map<String, String> reportMap = null; for (final Map<String, String> map : resultMap) { if (map.containsKey(CommonConstants.TOTAL_PRODUCTS)) { reportMap = this.getReportMap(request); final StringBuilder attributes = new StringBuilder(); if (request.containsKey(RequestAttributeConstant.COLOR)) { attributes.append(CommonConstants.COLOR); attributes.append(CommonConstants.FIELD_PAIR_SEPARATOR); attributes.append(request .get(RequestAttributeConstant.COLOR)); attributes.append(CommonConstants.PIPE_SEPERATOR); } if (request.containsKey(RequestAttributeConstant.SIZE)) { attributes.append(CommonConstants.SIZE); attributes.append(CommonConstants.FIELD_PAIR_SEPARATOR); attributes.append(request .get(RequestAttributeConstant.SIZE)); attributes.append(CommonConstants.PIPE_SEPERATOR); } if (request.containsKey(RequestAttributeConstant.BRAND)) { attributes.append(CommonConstants.BRAND); attributes.append(CommonConstants.FIELD_PAIR_SEPARATOR); attributes.append(request .get(RequestAttributeConstant.BRAND)); attributes.append(CommonConstants.PIPE_SEPERATOR); } this.requestAttributePrice(request, attributes); if (attributes.length() != 0) { reportMap.put(DomainConstants.ATTRIBUTES, attributes .toString().substring(0, attributes.length() - 1)); } String sortFields = ""; if (request.containsKey(RequestAttributeConstant.SORT)) { sortFields = request.get(RequestAttributeConstant.SORT); } if (!"".equals(sortFields)) { reportMap.put(DomainConstants.SORT_FIELDS, sortFields .replace(CommonConstants.EMPTY_VALUE, CommonConstants.COMMA_SEPERATOR)); } map.putAll(reportMap); break; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Map<String, String> getReportMap(final Map<String, String> request) {\r\n\t\tMap<String, String> reportMap;\r\n\t\treportMap = new LinkedHashMap<String, String>();\r\n\t\treportMap.put(CommonConstants.KEYWORD,\r\n\t\t\t\trequest.get(RequestAttributeConstant.QUERY_SEARCH));\r\n\t\treportMap.put(DomainConstants.REFINEMENT_ID,\r\n\t\t\t\trequest.get(RequestAttributeConstant.REFINEMENT_ID));\r\n\t\treportMap.put(DomainConstants.LIMIT,\r\n\t\t\t\trequest.get(RequestAttributeConstant.LIMIT));\r\n\t\treportMap.put(DomainConstants.OFFSET,\r\n\t\t\t\trequest.get(RequestAttributeConstant.OFFSET));\r\n\t\treturn reportMap;\r\n\t}", "private Map<String, Object> getReportParameterMap(\r\n\t\t\tHttpServletRequest request,\r\n\t\t\tVeteranSearchFormBean veteranSearchFormBean, EscreenUser escreenUser) {\n\t\tString veteranId = request.getParameter(\"veteranSearchFormBean.veteranId\");\r\n\t\tString lastName = request.getParameter(\"veteranSearchFormBean.lastName\");\r\n\t\tString ssnLastFour = request.getParameter(\"veteranSearchFormBean.ssnLastFour\");\r\n\r\n\t\tif (StringUtils.isNotBlank(veteranId) && StringUtils.isNumeric(veteranId)) {\r\n\t\t\tveteranSearchFormBean.setVeteranId(Integer.valueOf(veteranId));\r\n\t\t}\r\n\r\n\t\tveteranSearchFormBean.setLastName(lastName);\r\n\t\tveteranSearchFormBean.setSsnLastFour(ssnLastFour);\r\n\r\n\t\tdisplaySearchParms(request);\r\n\r\n\t\tMap<String, Object> parameterMap = new HashMap<String, Object>();\r\n\r\n\t\tSearchAttributes searchAttributes = createSearchAttributes(request);\r\n\r\n\t\t// Override to get up to max.\r\n\t\tsearchAttributes.setPageSize(MAX_PAGE_SIZE);\r\n\r\n\t\tSearchResult<VeteranSearchResult> searchResult = getVeteranSearchResultsFromForm(veteranSearchFormBean, searchAttributes, escreenUser);\r\n\r\n\t\tJRDataSource JRdataSource = new JRBeanCollectionDataSource(searchResult.getResultList());\r\n\t\tparameterMap.put(\"datasource\", JRdataSource);\r\n\r\n\t\treturn parameterMap;\r\n\t}", "protected final Map<String, Object> buildModel(HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tMap<String, Object> model = new HashMap<String, Object>();\n\t\t\n\t\t// Default from date is one week ago from last midnight\n\t\tDate lastMidnight = StatsUtils.getPreviousMidnight(null);\n\t\tDate weekAgo = StatsUtils.addDaysToDate(lastMidnight, -7);\n\t\t\n\t\t// Get from and until request parameters\n\t\tfrom = StatsUtils.getDateParameter(request, \"from\", weekAgo);\n\t\tuntil = StatsUtils.getDateParameter(request, \"until\", lastMidnight);\n maxResults = ServletRequestUtils.getIntParameter(request, \"maxResults\", 5);\n usageFilter = StatsUtils.getActionCriteriaParameter(request, \"usageFilter\", ActionCriteria.ANY);\n\t\t\n\t\t// Calculate inclusive until date by adding a day\n\t\tuntilInclusive = StatsUtils.addDaysToDate(until, 1);\n\n\t\t\n\t\t// Get paging info\n\t\tint offset = ServletRequestUtils.getIntParameter(request, \"offset\", 0);\n\t\tpaging = new PagingInfo(offset, Constants.RESULTS_PAGE_SIZE);\n\t\t\n\t\tmodel.put(\"from\", from);\n\t\tmodel.put(\"until\", until);\n model.put(\"maxResults\", maxResults);\n\t\tmodel.put(\"untilInclusive\", untilInclusive);\n\t\tmodel.put(\"usageFilter\", usageFilter);\n\t\tmodel.put(\"paging\", paging);\n\t\t\n\t\treturn model;\n\t}", "private Collection<Record> handleRequest(SearchRequest request) {\n\t\tCollection<Record> resultSet = getResults(request.getQuery());\n\t\treturn resultSet;\n\t}", "private void search(SearchRequest request) {\r\n\t\tif(request == null)return;\r\n\t\tList<Record> results = handler.search(request);\r\n\t\tlist.show(results);\r\n\t\tpanInfo.setNumRec(results.size());\r\n\t\tpanInfo.setTotalAmt(Record.sumBalance(results));\r\n\t}", "private void searchItem(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}", "private void searchResult(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\ttry {\n\t\t\trequest.setCharacterEncoding(\"UTF-8\");\n\t\t\tresponse.setContentType(\"text/html;charset=UTF-8\");\n\t\t\tString page = request.getParameter(\"page\"); // 当前页数\n\t\t\tString rows = request.getParameter(\"rows\"); // 每页显示行数\n\t\t\tString dealNo = request.getParameter(\"dealNo\");\n\t\t\tString msg = null;\n\t\t\tif (dealNo != null && dealNo.trim().length() > 0 && page != null\n\t\t\t\t\t&& page.trim().length() > 0 && rows != null\n\t\t\t\t\t&& rows.trim().length() > 0) {\n\t\t\t\tGZHQueryService gzhQueryService = new GZHQueryService();\n\t\t\t\tList<MoneyDataInfo> moneyDataList = gzhQueryService\n\t\t\t\t\t\t.getMoneyDataListPage(page, rows, dealNo);\n\t\t\t\tint total = gzhQueryService.getResultCount(dealNo);\n\t\t\t\tPagination pagination = new Pagination();\n\t\t\t\t// pagination.setRows(moneyDataList);\n\t\t\t\tpagination.setTotal(total);\n\t\t\t\tGson gson = new Gson();\n\t\t\t\tmsg = gson.toJson(pagination);\n\t\t\t} else {\n\t\t\t\tmsg = \"notfount\";\n\t\t\t}\n\t\t\tresponse.getWriter().write(msg);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String statsDefName = request.getParameter(\"stats_def\");\n \n try {\n List<ResourcePOJO> resources;\n if (statsDefName == null || \"\".equals(statsDefName)) {\n // if no layer is given in http parameters, find all stats data\n resources = manager.searchStatsDataByStatsDef(null);\n } else {\n // otherwise find all stats with the given statsDef attribute\n resources = manager.searchStatsDataByStatsDef(statsDefName);\n //request.setAttribute(\"statsDef\", statsDefName);\n }\n request.setAttribute(\"resources\", resources);\n \n //Retrieve stats data and store them in a Map \n Map<Long, ResourcePOJO> statsDefMap = new HashMap<Long, ResourcePOJO>();\n ResourcePOJO statsDef = manager.searchResourceByName(statsDefName, CategoryPOJO.STATSDEF);\n request.setAttribute(\"statsDef\", statsDef);\n \n RequestDispatcher rd = request.getRequestDispatcher(\"stats-data-list.jsp\");\n rd.forward(request, response);\n } catch (JAXBException ex) {\n throw new ServletException(ex);\n }\n }", "private RequestResponse handleSearchRequest(Request request, Response response) throws ServiceException {\n response.type(\"application/json\");\n\n String core = request.params(\":core\");\n if (StringUtils.isEmpty(core)) {\n throw new ServiceException(\"Failed to provide an index core for the document\");\n }\n\n SearchParameters searchParameters = new RequestToSearchParameters().convert(request);\n return this.searchService.query(core, searchParameters);\n }", "@Override\n public Map<String, OEEReport> build() {\n return generators.entrySet().stream().collect(Collectors.toMap(\n entry -> entry.getKey(),\n entry -> entry.getValue().getReport()\n ));\n }", "public SearchResponse<T, P> build(Pageable searchRequest, QueryResponse queryResponse) {\n // Create response\n SearchResponse<T, P> searchResponse = new SearchResponse<T, P>(searchRequest);\n searchResponse.setCount(queryResponse.getResults().getNumFound());\n searchResponse.setLimit(queryResponse.getResults().size());\n // The results and facets are copied into the response\n final List<ST> resultsST = queryResponse.getBeans(annotatedClass);\n // convert types\n final List<T> results = Lists.newArrayList();\n for (ST x : resultsST) {\n results.add(x);\n }\n searchResponse.setResults(results);\n searchResponse.setFacets(getFacetsFromResponse(queryResponse));\n setHighlightedFields(searchResponse, queryResponse);\n if(queryResponse.getSpellCheckResponse() != null){\n searchResponse.setSpellCheckResponse(SpellCheckResponseBuilder.build(queryResponse.getSpellCheckResponse()));\n }\n return searchResponse;\n }", "@RequestMapping(value=\"/searchresults\", method = RequestMethod.GET)\n\tpublic String searchResults(@RequestParam(value=\"search\", required=false) String search, Model model, \n\t\t\t\t\t\t\t\t@RequestParam(value=\"page\", required=false) Integer page, \n\t\t\t\t\t\t\t\t@RequestParam(value=\"status\", required=false) String status, \n\t\t\t\t\t\t\t\t@RequestParam(value=\"agent\", required=false) String agent, \n\t\t\t\t\t\t\t\t@RequestParam(value=\"agentDisplay\", required=false) String agentDisplay, \n\t\t\t\t\t\t\t\t@RequestParam(value=\"dateFrom\", required=false) String dateFrom, \n\t\t\t\t\t\t\t\t@RequestParam(value=\"dateTo\", required=false) String dateTo) throws Exception {\n\t\tif (page==null) {\n\t\t\tpage=0;\n\t\t}\n\t\tif (search==null) {\n\t\t\tsearch=\"\";\n\t\t}\n\t\tInteger INCREMENT = 20;\n\t\tPageable pageable = PageRequest.of(page, INCREMENT);\n\t\tsearch = search.trim();\n\t\tsearch = search.replace(\"\\\"\", \"\"); //remove quotes\n\t\tsearch = search.replaceAll(\"( )+\", \" \"); //remove extra spaces\n\t\t\n\t\tRMapSearchParams params = paramsFactory.newInstance();\n\t\tparams.setSystemAgents(agent);\n\t\tRMapStatusFilter statusFilter = RMapStatusFilter.getStatusFromTerm(status);\n\t\tstatusFilter = (statusFilter==null) ? RMapStatusFilter.ALL : statusFilter;\t\n\t\tparams.setStatusCode(statusFilter);\n\t\tparams.setDateRange(new DateRange(dateFrom,dateTo));\n\t\t\n\t\tFacetAndHighlightPage<DiscoSolrDocument> indexerResults = searchService.searchDiSCOs(search, params, pageable);\n\t\t\n\t\tboolean hasExactMatch = dataDisplayService.isResourceInRMap(search, params);\n\t\t\n\t\tmodel.addAttribute(\"search\", search);\n\t\tmodel.addAttribute(\"numRecords\",indexerResults.getTotalElements());\n\t\tmodel.addAttribute(\"matches\",indexerResults.getHighlighted());\n\t\t\t\t\n\t\tmodel.addAttribute(\"statusFacets\",indexerResults.getFacetResultPage(\"disco_status\").getContent());\n\t\tmodel.addAttribute(\"agentFacets\",indexerResults.getPivot(\"agent_uri,agent_name\"));\n\t\tmodel.addAttribute(\"pageable\", pageable);\n\t\tmodel.addAttribute(\"agent\", agent);\n\t\tmodel.addAttribute(\"agentDisplay\", agentDisplay);\n\t\tmodel.addAttribute(\"dateFrom\", dateFrom);\n\t\tmodel.addAttribute(\"dateTo\", dateTo);\n\t\tmodel.addAttribute(\"status\", status);\n\t\tmodel.addAttribute(\"hasExactMatch\", hasExactMatch);\n\t\t\t\t\n\t\treturn \"searchresults\";\t\t\n\t}", "abstract ImmutableMap<String, ReportFiles> reports();", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, java.io.IOException {\n System.out.println(\"---===| Excel Report |===---\");\n response.setContentType(\"application/x-msexcel\");\n \n Company cmp = new Company();\n try{\n Vector listCompany = DbCompany.list(0,0, \"\", \"\");\n if(listCompany!=null && listCompany.size()>0){\n cmp = (Company)listCompany.get(0);\n }\n }catch(Exception ext){\n System.out.println(ext.toString());\n }\n \n Vector result = new Vector();\n String userName = \"\";\n String filter = \"\";\n Vector temp = new Vector();\n Vector locations = DbLocation.list(0,0, \"\", \"name\");\n \n try{\n HttpSession session = request.getSession();\n \n temp = (Vector)session.getValue(\"REPORT_STOCK\");\n userName = (String)session.getValue(\"REPORT_STOCK_USER\");\n filter = (String)session.getValue(\"REPORT_STOCK_FILTER\");\n \n String srcCode = (String)temp.get(0);\n String srcName = (String)temp.get(1);\n int orderBy = Integer.parseInt((String)temp.get(2));\n int orderType = Integer.parseInt((String)temp.get(3));\n int supZero = Integer.parseInt((String)temp.get(4));\n \n String whereClause = \"\";\n String orderClause = \"\";\n\n if(srcCode!=null && srcCode.length()>0){\n whereClause = \" code like '%\"+srcCode+\"%'\"; \n }\n if(srcName!=null && srcName.length()>0){\n if(whereClause!=null && whereClause.length()>0){\n whereClause = whereClause + \" and \";\t\t\n }\n whereClause = whereClause + \" name like '%\"+srcName+\"%'\";\n }\n\n if(supZero==1){\n if(whereClause!=null && whereClause.length()>0){\n whereClause = whereClause + \" and \";\t\t\n }\n whereClause = whereClause + \" qtystock <> 0\";\n }\n\n if(orderBy==0){\n orderClause = \" name\";\n }\n else if(orderBy==1){\n orderClause = \" code\";\n }\n else{\n orderClause = \" qtystock\";\n }\n\n if(orderType==1){\n orderClause = orderClause + \" desc\";\n }\n \n \n result = SessStockReportView.getStockItemList(0, 0, whereClause, orderClause);\n\n \n }catch(Exception e){\n System.out.println(e.toString());\n }\n \n boolean gzip = false ;\n \n // response.setCharacterEncoding( \"UTF-8\" ) ;\n OutputStream gzo ;\n if ( gzip ) {\n response.setHeader( \"Content-Encoding\", \"gzip\" ) ;\n gzo = new GZIPOutputStream( response.getOutputStream() ) ;\n } else {\n gzo = response.getOutputStream() ;\n }\n PrintWriter wb = new PrintWriter( new OutputStreamWriter( gzo, \"UTF-8\" ) ) ;\n\n wb.println(\"<?xml version=\\\"1.0\\\"?>\");\n wb.println(\"<?mso-application progid=\\\"Excel.Sheet\\\"?>\");\n wb.println(\"<Workbook xmlns=\\\"urn:schemas-microsoft-com:office:spreadsheet\\\" \");\n wb.println(\" xmlns:o=\\\"urn:schemas-microsoft-com:office:office\\\" \");\n wb.println(\" xmlns:x=\\\"urn:schemas-microsoft-com:office:excel\\\" \");\n wb.println(\" xmlns:ss=\\\"urn:schemas-microsoft-com:office:spreadsheet\\\" \");\n wb.println(\" xmlns:html=\\\"http://www.w3.org/TR/REC-html40\\\">\");\n wb.println(\"<DocumentProperties xmlns=\\\"urn:schemas-microsoft-com:office:office\\\">\");\n wb.println(\" <Author>Eka D</Author>\");\n wb.println(\"<LastAuthor>Eka D</LastAuthor>\");\n wb.println(\"<Created>2014-09-10T15:22:44Z</Created>\");\n wb.println(\"<Company>Toshiba</Company>\");\n wb.println(\"<Version>14.00</Version>\");\n wb.println(\"</DocumentProperties>\");\n wb.println(\"<OfficeDocumentSettings xmlns=\\\"urn:schemas-microsoft-com:office:office\\\">\");\n wb.println(\"<AllowPNG/>\");\n wb.println(\"</OfficeDocumentSettings>\");\n wb.println(\"<ExcelWorkbook xmlns=\\\"urn:schemas-microsoft-com:office:excel\\\">\");\n wb.println(\"<WindowHeight>5190</WindowHeight>\");\n wb.println(\"<WindowWidth>13395</WindowWidth>\");\n wb.println(\"<WindowTopX>0</WindowTopX>\");\n wb.println(\"<WindowTopY>30</WindowTopY>\");\n wb.println(\"<ProtectStructure>False</ProtectStructure>\");\n wb.println(\"<ProtectWindows>False</ProtectWindows>\");\n wb.println(\"</ExcelWorkbook>\");\n wb.println(\"<Styles>\");\n wb.println(\"<Style ss:ID=\\\"Default\\\" ss:Name=\\\"Normal\\\">\");\n wb.println(\"<Alignment ss:Vertical=\\\"Bottom\\\"/>\");\n wb.println(\"<Borders/>\");\n wb.println(\"<Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"11\\\" ss:Color=\\\"#000000\\\"/>\");\n wb.println(\"<Interior/>\");\n wb.println(\"<NumberFormat/>\");\n wb.println(\"<Protection/>\");\n wb.println(\"</Style>\");\n wb.println(\"<Style ss:ID=\\\"s16\\\" ss:Name=\\\"Comma\\\">\");\n wb.println(\"<NumberFormat ss:Format=\\\"_(* #,##0.00_);_(* \\\\(#,##0.00\\\\);_(* &quot;-&quot;??_);_(@_)\\\"/>\");\n wb.println(\"</Style>\");\n wb.println(\"<Style ss:ID=\\\"s62\\\">\");\n wb.println(\"<Interior/>\");\n wb.println(\"</Style>\");\n wb.println(\"<Style ss:ID=\\\"s64\\\" ss:Parent=\\\"s16\\\">\");\n wb.println(\"<Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"11\\\" ss:Color=\\\"#000000\\\"/>\");\n wb.println(\"<Interior/>\");\n wb.println(\"<NumberFormat ss:Format=\\\"_(* #,##0_);_(* \\\\(#,##0\\\\);_(* &quot;-&quot;??_);_(@_)\\\"/>\");\n wb.println(\"</Style>\");\n wb.println(\"<Style ss:ID=\\\"s66\\\">\");\n wb.println(\"<Alignment ss:Horizontal=\\\"Center\\\" ss:Vertical=\\\"Bottom\\\"/>\");\n wb.println(\"<Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"12\\\" ss:Color=\\\"#000000\\\" \");\n wb.println(\" ss:Bold=\\\"1\\\"/>\");\n wb.println(\"<Interior/>\");\n wb.println(\"</Style>\");\n wb.println(\"<Style ss:ID=\\\"s67\\\">\");\n wb.println(\"<Borders/>\");\n wb.println(\"<Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"11\\\"/>\");\n wb.println(\"<Interior/>\");\n wb.println(\"</Style>\");\n wb.println(\"<Style ss:ID=\\\"s69\\\">\");\n wb.println(\"<Alignment ss:Horizontal=\\\"Center\\\" ss:Vertical=\\\"Center\\\" ss:WrapText=\\\"1\\\"/>\");\n wb.println(\"<Borders>\");\n wb.println(\"<Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"</Borders>\");\n wb.println(\"<Font ss:FontName=\\\"Tahoma\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"8\\\" ss:Bold=\\\"1\\\"/>\");\n wb.println(\"<Interior/>\");\n wb.println(\"</Style>\");\n wb.println(\"<Style ss:ID=\\\"s71\\\" ss:Parent=\\\"s16\\\">\");\n wb.println(\"<Alignment ss:Horizontal=\\\"Center\\\" ss:Vertical=\\\"Center\\\" ss:WrapText=\\\"1\\\"/>\");\n wb.println(\"<Borders>\");\n wb.println(\"<Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"</Borders>\");\n wb.println(\"<Font ss:FontName=\\\"Tahoma\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"8\\\" ss:Bold=\\\"1\\\"/>\");\n wb.println(\"<Interior/>\");\n wb.println(\"<NumberFormat ss:Format=\\\"_(* #,##0_);_(* \\\\(#,##0\\\\);_(* &quot;-&quot;??_);_(@_)\\\"/>\");\n wb.println(\"</Style>\");\n wb.println(\"<Style ss:ID=\\\"s72\\\" ss:Parent=\\\"s16\\\">\");\n wb.println(\"<Alignment ss:Horizontal=\\\"Center\\\" ss:Vertical=\\\"Center\\\" ss:WrapText=\\\"1\\\"/>\");\n wb.println(\"<Borders>\");\n wb.println(\"<Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"</Borders>\");\n wb.println(\"<Font ss:FontName=\\\"Tahoma\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"7.5\\\" ss:Bold=\\\"1\\\"/>\");\n wb.println(\"<Interior/>\");\n wb.println(\"<NumberFormat ss:Format=\\\"_(* #,##0_);_(* \\\\(#,##0\\\\);_(* &quot;-&quot;??_);_(@_)\\\"/>\");\n wb.println(\"</Style>\");\n wb.println(\"<Style ss:ID=\\\"s73\\\">\");\n wb.println(\"<Borders/>\");\n wb.println(\"<Interior/>\");\n wb.println(\"</Style>\");\n wb.println(\"<Style ss:ID=\\\"s75\\\">\");\n wb.println(\"<Alignment ss:Horizontal=\\\"Center\\\" ss:Vertical=\\\"Center\\\" ss:WrapText=\\\"1\\\"/>\");\n wb.println(\"<Borders>\");\n wb.println(\"<Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"</Borders>\");\n wb.println(\"<Font ss:FontName=\\\"Tahoma\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"7.5\\\" ss:Color=\\\"#333333\\\"/>\");\n wb.println(\"<Interior/>\");\n wb.println(\"</Style>\");\n wb.println(\"<Style ss:ID=\\\"s76\\\">\");\n wb.println(\"<Alignment ss:Horizontal=\\\"Left\\\" ss:Vertical=\\\"Center\\\" ss:Indent=\\\"1\\\"/>\");\n wb.println(\"<Borders>\");\n wb.println(\"<Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"</Borders>\");\n wb.println(\"<Font ss:FontName=\\\"Tahoma\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"7.5\\\" ss:Color=\\\"#333333\\\"/>\");\n wb.println(\"<Interior/>\");\n wb.println(\"</Style>\");\n wb.println(\"<Style ss:ID=\\\"s77\\\" ss:Parent=\\\"s16\\\">\");\n wb.println(\"<Alignment ss:Horizontal=\\\"Right\\\" ss:Vertical=\\\"Center\\\" ss:Indent=\\\"1\\\" ss:WrapText=\\\"1\\\"/>\");\n wb.println(\"<Borders>\");\n wb.println(\"<Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"</Borders>\");\n wb.println(\"<Font ss:FontName=\\\"Tahoma\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"7.5\\\" ss:Color=\\\"#333333\\\"/>\");\n wb.println(\"<Interior/>\");\n wb.println(\"<NumberFormat ss:Format=\\\"_(* #,##0_);_(* \\\\(#,##0\\\\);_(* &quot;-&quot;??_);_(@_)\\\"/>\");\n wb.println(\"</Style>\");\n wb.println(\"<Style ss:ID=\\\"s78\\\">\");\n wb.println(\"<Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"11\\\" ss:Color=\\\"#000000\\\" ss:Bold=\\\"1\\\"/>\");\n wb.println(\"<Interior/>\");\n wb.println(\"</Style>\");\n wb.println(\"</Styles>\");\n wb.println(\"<Worksheet ss:Name=\\\"Stock Total\\\">\");\n wb.println(\"<Table x:FullColumns=\\\"1\\\" x:FullRows=\\\"1\\\" ss:StyleID=\\\"s62\\\" ss:DefaultRowHeight=\\\"15\\\">\");\n wb.println(\"<Column ss:StyleID=\\\"s62\\\" ss:AutoFitWidth=\\\"0\\\" ss:Width=\\\"29.25\\\"/>\");\n wb.println(\"<Column ss:StyleID=\\\"s62\\\" ss:AutoFitWidth=\\\"0\\\" ss:Width=\\\"63\\\"/>\");\n wb.println(\"<Column ss:StyleID=\\\"s62\\\" ss:Width=\\\"180\\\"/>\");\n wb.println(\"<Column ss:StyleID=\\\"s64\\\" ss:AutoFitWidth=\\\"0\\\" ss:Span=\\\"9\\\"/>\");\n wb.println(\"<Column ss:Index=\\\"14\\\" ss:StyleID=\\\"s64\\\" ss:Width=\\\"49.5\\\"/>\");\n wb.println(\"<Row ss:AutoFitHeight=\\\"0\\\" ss:Height=\\\"15.75\\\">\");\n wb.println(\"<Cell ss:MergeAcross=\\\"\"+(((locations!=null && locations.size()>0) ? locations.size() : 0)+3)+\"\\\" ss:StyleID=\\\"s66\\\"><Data ss:Type=\\\"String\\\">\"+cmp.getName().toUpperCase()+\"</Data></Cell>\");\n wb.println(\"</Row>\");\n wb.println(\"<Row ss:AutoFitHeight=\\\"0\\\" ss:Height=\\\"15.75\\\">\");\n wb.println(\"<Cell ss:MergeAcross=\\\"\"+(((locations!=null && locations.size()>0) ? locations.size() : 0)+3)+\"\\\" ss:StyleID=\\\"s66\\\"><Data ss:Type=\\\"String\\\">STOCK TOTAL BY LOCATION REPORT</Data></Cell>\");\n wb.println(\"</Row>\");\n wb.println(\"<Row ss:Index=\\\"4\\\" ss:AutoFitHeight=\\\"0\\\">\");\n wb.println(\"<Cell ss:StyleID=\\\"s78\\\"><Data ss:Type=\\\"String\\\">Date : \"+JSPFormater.formatDate(new Date(), \"dd/MM/yyyy\")+\", by : \"+userName+\"</Data></Cell>\");\n wb.println(\"</Row>\");\n wb.println(\"<Row ss:AutoFitHeight=\\\"0\\\">\");\n wb.println(\"<Cell ss:StyleID=\\\"s78\\\"><Data ss:Type=\\\"String\\\">\"+filter+\"</Data></Cell>\");\n wb.println(\"</Row>\");\n wb.println(\"<Row ss:AutoFitHeight=\\\"0\\\" ss:Height=\\\"42\\\" ss:StyleID=\\\"s67\\\">\");\n wb.println(\"<Cell ss:StyleID=\\\"s69\\\"><Data ss:Type=\\\"String\\\">NO</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s69\\\"><Data ss:Type=\\\"String\\\">CODE</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s69\\\"><Data ss:Type=\\\"String\\\">ITEM NAME</Data></Cell>\");\n if(locations!=null && locations.size()>0){\n for(int i=0; i<locations.size(); i++){\n Location d = (Location)locations.get(i);\n wb.println(\"<Cell ss:StyleID=\\\"s71\\\"><Data ss:Type=\\\"String\\\">\"+d.getName()+\"</Data></Cell>\");\n }\n }\n //wb.println(\"<Cell ss:StyleID=\\\"s71\\\"><Data ss:Type=\\\"String\\\">Coco Mart Bandara R19</Data></Cell>\");\n //wb.println(\"<Cell ss:StyleID=\\\"s71\\\"><Data ss:Type=\\\"String\\\">Coco Mart Bandara R22</Data></Cell>\");\n //wb.println(\"<Cell ss:StyleID=\\\"s71\\\"><Data ss:Type=\\\"String\\\">Coco Mart Bandara R28</Data></Cell>\");\n //wb.println(\"<Cell ss:StyleID=\\\"s71\\\"><Data ss:Type=\\\"String\\\">Coco Mart Blahkiuh</Data></Cell>\");\n //wb.println(\"<Cell ss:StyleID=\\\"s71\\\"><Data ss:Type=\\\"String\\\">Coco Mart Mas Ubud</Data></Cell>\");\n //wb.println(\"<Cell ss:StyleID=\\\"s71\\\"><Data ss:Type=\\\"String\\\">DC1</Data></Cell>\");\n //wb.println(\"<Cell ss:StyleID=\\\"s71\\\"><Data ss:Type=\\\"String\\\">Gudang Costing</Data></Cell>\");\n //wb.println(\"<Cell ss:StyleID=\\\"s71\\\"><Data ss:Type=\\\"String\\\">Gudang Retur</Data></Cell>\");\n //wb.println(\"<Cell ss:StyleID=\\\"s71\\\"><Data ss:Type=\\\"String\\\">xxx</Data></Cell>\");\n //wb.println(\"<Cell ss:StyleID=\\\"s71\\\"><Data ss:Type=\\\"String\\\">xxx</Data></Cell>\");\n //wb.println(\"<Cell ss:StyleID=\\\"s71\\\"><Data ss:Type=\\\"String\\\">xxx</Data></Cell>\");\n //wb.println(\"<Cell ss:StyleID=\\\"s71\\\"><Data ss:Type=\\\"String\\\">Office</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s72\\\"><Data ss:Type=\\\"String\\\">TOTAL</Data></Cell>\");\n wb.println(\"</Row>\");\n \n String wherex = \"(\";\n if(locations!=null && locations.size()>0){\n for(int i=0; i<locations.size(); i++){\n Location d = (Location)locations.get(i);\n wherex = wherex +\" location_id=\"+d.getOID()+\" or\";\n }\n \n wherex = wherex.substring(0,wherex.length()-3)+\")\";\n }\n \n if(result!=null && result.size()>0){\n \n Hashtable hashQty = SessStockReportView.getStockByLocationByItem();//im.getOID(), wherex); \n \n for(int x=0; x<result.size(); x++){\n \n System.out.println(\"- processing line : \"+x);\n \n ItemMaster im = (ItemMaster)result.get(x);\n double totAv = 0;\n double totOtw = 0;\n double totSlp = 0;\n double tot = 0;\n wb.println(\"<Row ss:AutoFitHeight=\\\"0\\\" ss:StyleID=\\\"s73\\\">\");\n wb.println(\"<Cell ss:StyleID=\\\"s75\\\"><Data ss:Type=\\\"Number\\\">\"+(x+1)+\"</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s76\\\"><Data ss:Type=\\\"String\\\">\"+im.getCode()+\"</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s76\\\"><Data ss:Type=\\\"String\\\">\"+im.getName()+\"</Data></Cell>\");\n \n //Hashtable hashQty = SessStockReportView.getStockByLocationByItem();//im.getOID(), wherex);\n \n if(locations!=null && locations.size()>0){\n for(int i=0; i<locations.size(); i++){\n Location d = (Location)locations.get(i);\n double qty = 0;\n if((String)hashQty.get(im.getOID()+\"\"+d.getOID())!=null && ((String)hashQty.get(im.getOID()+\"\"+d.getOID())).length()>0){\n qty = Double.parseDouble((String)hashQty.get(im.getOID()+\"\"+d.getOID()));\n }\n //SessStockReportView.getStockByLocationByItem(im.getOID(), d.getOID(), \"APPROVED\");\n double qtyOtw = 0;//SessStockReportView.getStockByLocationByItem(im.getOID(), d.getOID(), \"DRAFT\");\n double qtySlp = 0;\n //if(displayPending){\n // qtySlp = 0;//SessStockReportView.getSalesPendingLocationByItem(im.getOID(), d.getOID());\n //}\n\n //if(qtyOtw < 0){\n // qtyOtw = qtyOtw * -1;\n //}\n\n //qty = qty - qtyOtw - qtySlp;\n\n totAv = totAv + qty;\n //totOtw = totOtw + qtyOtw;\n //totSlp = totSlp + qtySlp;\n //tot = tot + qty + qtyOtw + qtySlp;\n \n wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">\"+qty+\"</Data></Cell>\");\n }\n }\n \n /*wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">0</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">0</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">0</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">0</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">12345</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">24</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">0</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">0</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">0</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">0</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">0</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">0</Data></Cell>\");\n */ \n wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">\"+(totAv + totOtw +totSlp)+\"</Data></Cell>\");\n wb.println(\"</Row>\");\n \n wb.flush() ;\n }\n }\n \n wb.println(\"</Table>\");\n wb.println(\"<WorksheetOptions xmlns=\\\"urn:schemas-microsoft-com:office:excel\\\">\");\n wb.println(\"<PageSetup>\");\n wb.println(\"<Header x:Margin=\\\"0.3\\\"/>\");\n wb.println(\"<Footer x:Margin=\\\"0.3\\\"/>\");\n wb.println(\"<PageMargins x:Bottom=\\\"0.75\\\" x:Left=\\\"0.7\\\" x:Right=\\\"0.7\\\" x:Top=\\\"0.75\\\"/>\");\n wb.println(\"</PageSetup>\");\n wb.println(\"<Unsynced/>\");\n wb.println(\"<Print>\");\n wb.println(\"<ValidPrinterInfo/>\");\n wb.println(\"<PaperSizeIndex>9</PaperSizeIndex>\");\n wb.println(\"<VerticalResolution>0</VerticalResolution>\");\n wb.println(\"</Print>\");\n wb.println(\"<Selected/>\");\n wb.println(\"<Panes>\");\n wb.println(\"<Pane>\");\n wb.println(\"<Number>3</Number>\");\n wb.println(\"<ActiveRow>13</ActiveRow>\");\n wb.println(\"<ActiveCol>2</ActiveCol>\");\n wb.println(\"</Pane>\");\n wb.println(\"</Panes>\");\n wb.println(\"<ProtectObjects>False</ProtectObjects>\");\n wb.println(\"<ProtectScenarios>False</ProtectScenarios>\");\n wb.println(\"</WorksheetOptions>\");\n wb.println(\"</Worksheet>\");\n wb.println(\"<Worksheet ss:Name=\\\"Sheet2\\\">\");\n wb.println(\"<Table ss:ExpandedColumnCount=\\\"1\\\" ss:ExpandedRowCount=\\\"1\\\" x:FullColumns=\\\"1\\\" \");\n wb.println(\" x:FullRows=\\\"1\\\" ss:DefaultRowHeight=\\\"15\\\">\");\n wb.println(\"<Row ss:AutoFitHeight=\\\"0\\\"/>\");\n wb.println(\"</Table>\");\n wb.println(\"<WorksheetOptions xmlns=\\\"urn:schemas-microsoft-com:office:excel\\\">\");\n wb.println(\"<PageSetup>\");\n wb.println(\"<Header x:Margin=\\\"0.3\\\"/>\");\n wb.println(\"<Footer x:Margin=\\\"0.3\\\"/>\");\n wb.println(\"<PageMargins x:Bottom=\\\"0.75\\\" x:Left=\\\"0.7\\\" x:Right=\\\"0.7\\\" x:Top=\\\"0.75\\\"/>\");\n wb.println(\"</PageSetup>\");\n wb.println(\"<Unsynced/>\");\n wb.println(\"<ProtectObjects>False</ProtectObjects>\");\n wb.println(\"<ProtectScenarios>False</ProtectScenarios>\");\n wb.println(\"</WorksheetOptions>\");\n wb.println(\"</Worksheet>\");\n wb.println(\"<Worksheet ss:Name=\\\"Sheet3\\\">\");\n wb.println(\"<Table ss:ExpandedColumnCount=\\\"1\\\" ss:ExpandedRowCount=\\\"1\\\" x:FullColumns=\\\"1\\\"\");\n wb.println(\" x:FullRows=\\\"1\\\" ss:DefaultRowHeight=\\\"15\\\">\");\n wb.println(\"<Row ss:AutoFitHeight=\\\"0\\\"/>\");\n wb.println(\"</Table>\");\n wb.println(\"<WorksheetOptions xmlns=\\\"urn:schemas-microsoft-com:office:excel\\\">\");\n wb.println(\"<PageSetup>\");\n wb.println(\"<Header x:Margin=\\\"0.3\\\"/>\");\n wb.println(\"<Footer x:Margin=\\\"0.3\\\"/>\");\n wb.println(\"<PageMargins x:Bottom=\\\"0.75\\\" x:Left=\\\"0.7\\\" x:Right=\\\"0.7\\\" x:Top=\\\"0.75\\\"/>\");\n wb.println(\"</PageSetup>\");\n wb.println(\"<Unsynced/>\");\n wb.println(\"<ProtectObjects>False</ProtectObjects>\");\n wb.println(\"<ProtectScenarios>False</ProtectScenarios>\");\n wb.println(\"</WorksheetOptions>\");\n wb.println(\"</Worksheet>\");\n wb.println(\"</Workbook>\");\n\n wb.flush() ;\n }", "private void setStates(HttpServletRequest p_request)\n {\n String reportOn = (String) p_request.getParameter(\"reportOn\");\n data.reportOnJobIds = \"jobIds\".equals(reportOn);\n\n if (data.reportOnJobIds)\n {\n // Report on Job IDs\n data.jobIds.clear();\n String jobIdsStr = p_request.getParameter(\"jobIds\");\n if (jobIdsStr != null && jobIdsStr.length() != 0)\n {\n String[] jobIds = jobIdsStr.split(\",\");\n long jobId = 0;\n for (int i = 0; i < jobIds.length; i++)\n {\n try\n {\n jobId = Long.valueOf(jobIds[i].trim());\n }\n catch (Exception e)\n {\n continue;\n }\n if (!data.jobIds.contains(jobId))\n {\n data.jobIds.add(jobId);\n }\n }\n }\n data.needSearchJob = false;\n }\n else\n {\n String[] jobIds = p_request.getParameterValues(\"jobNameList\");\n data.needSearchJob = (jobIds == null);\n if (!data.needSearchJob)\n {\n data.jobIds.clear();\n long jobId = 0;\n for (int i = 0; i < jobIds.length; i++)\n {\n jobId = Long.valueOf(jobIds[i]);\n if (!data.jobIds.contains(jobId))\n {\n data.jobIds.add(jobId);\n }\n }\n }\n else\n {\n data.jobStateList.clear();\n data.workflowStateList.clear();\n String[] states = p_request.getParameterValues(\"jobStatus\");\n List<String> lst = new ArrayList<String>();\n if (states != null)\n {\n lst = Arrays.asList(states);\n }\n if (lst.contains(\"*\"))\n {\n data.jobStateList.add(Job.DISPATCHED);\n data.workflowStateList.add(Workflow.DISPATCHED);\n data.jobStateList.add(Job.LOCALIZED);\n data.workflowStateList.add(Workflow.LOCALIZED);\n data.jobStateList.add(Job.EXPORTED);\n data.jobStateList.add(Job.EXPORT_FAIL);\n data.workflowStateList.add(Workflow.EXPORTED);\n data.workflowStateList.add(Workflow.EXPORT_FAILED);\n data.jobStateList.add(Job.ARCHIVED);\n data.workflowStateList.add(Workflow.ARCHIVED);\n }\n else\n {\n if (lst.contains(Job.DISPATCHED))\n {\n data.jobStateList.add(Job.DISPATCHED);\n data.workflowStateList.add(Workflow.DISPATCHED);\n }\n if (lst.contains(Job.LOCALIZED))\n {\n data.jobStateList.add(Job.LOCALIZED);\n data.workflowStateList.add(Workflow.LOCALIZED);\n }\n if (lst.contains(Job.EXPORTED))\n {\n data.jobStateList.add(Job.EXPORTED);\n data.workflowStateList.add(Workflow.EXPORTED);\n }\n if (lst.contains(Job.EXPORT_FAIL))\n {\n data.jobStateList.add(Job.EXPORT_FAIL);\n data.workflowStateList.add(Workflow.EXPORT_FAILED);\n }\n if (lst.contains(Job.ARCHIVED))\n {\n data.jobStateList.add(Job.ARCHIVED);\n data.workflowStateList.add(Workflow.ARCHIVED);\n }\n }\n }\n }\n }", "private void initRequest()\n\t{\n\t\tthis.request = new RestClientReportRequest();\n\t\tRequestHelper.copyConfigsToRequest(this.getConfigs(), this.request);\n\t\tRequestHelper.copyParamsToRequest(this.getParams(), this.request);\n\t\t\n\t\tthis.performQuery();\n\t}", "void populateReportInformation( Collection<ExpressionExperimentDetailsValueObject> vos );", "public void search(ActionRequest actionRequest,\r\n\t\t\tActionResponse actionResponse) throws IOException, PortletException {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t\tString ungDung = ParamUtil.getString(actionRequest,\"ungDung\", \"\");\r\n\t\t\r\n\t\tString nhomUngDung= ParamUtil.getString(actionRequest,\"nhomUngDung\", \"\");\r\n\t\t\r\n\t\tPortletPreferences prefs = actionRequest.getPreferences();\r\n\t\tprefs.setValue(\"ungDung\", ungDung);\r\n\t\tprefs.setValue(\"nhomUngDung\", nhomUngDung);\r\n\t\t\r\n\t\tint cur = ParamUtil.getInteger(actionRequest, \"cur\", 1);\r\n\t\tint delta = ParamUtil.getInteger(actionRequest, \"delta\", 10);\r\n\t\tprefs.setValue(\"cur\", String.valueOf(cur));\r\n\t\tprefs.setValue(\"delta\", String.valueOf(delta));\r\n\t\tprefs.store();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public void search(Map<String, String> searchParam);", "public ReportResponse(List<ReportData> reportData) {\n this.reportData = reportData;\n }", "public ReportRunner() \n\t{\n\t\treports = new HashMap<String, Report>();\n\t\tresults =Collections.synchronizedMap(new HashMap<String, ArrayList<String[]>>());\n\t}", "private void process(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\n\t\tresp.setHeader(\"Cache-Control\", \"no-store, no-cache, must-revalidate\"); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tresp.setCharacterEncoding(\"UTF-8\"); //$NON-NLS-1$\n\n\t\tint indexCompletion = 0;\n\t\tString locale = UrlUtil.getLocale(req, resp);\n\t\tSearchProgressMonitor pm = SearchProgressMonitor\n\t\t\t\t.getProgressMonitor(locale);\n\t\tif (pm.isDone()) {\n\t\t\tindexCompletion = 100;\n\t\t} else {\n\t\t\tindexCompletion = pm.getPercentage();\n\t\t\tif (indexCompletion >= 100) {\n\t\t\t\t// 38573 We do not have results, so index cannot be 100\n\t\t\t\tindexCompletion = 100 - 1;\n\t\t\t}\n\t\t}\n\n\t\tString returnType = req.getParameter(Utils.RETURN_TYPE);\n\t\tboolean isXML = Utils.XML.equalsIgnoreCase(returnType);\n\t\tif (isXML) {\n\t\t\tresp.setContentType(\"application/xml\"); //$NON-NLS-1$\n\t\t\tresp.getWriter().write(toXML(indexCompletion));\n\t\t} else {\n\t\t\tresp.setContentType(\"text/plain\"); //$NON-NLS-1$\n\t\t\tresp.getWriter().write(toString(indexCompletion));\n\t\t}\n\t\tresp.getWriter().flush();\n\t}", "private void supplyLookupValues(ModelAndView modelAndView) throws PortalServiceException {\n modelAndView.addObject(\"requestTypesLookup\", lookupService.findAllLookups(RequestType.class));\n modelAndView.addObject(\"enrollmentStatusesLookup\", lookupService.findAllLookups(EnrollmentStatus.class));\n modelAndView.addObject(\"riskLevelsLookup\", lookupService.findAllLookups(RiskLevel.class));\n ProviderTypeSearchCriteria providerTypeSearchCriteria = new ProviderTypeSearchCriteria();\n providerTypeSearchCriteria.setAscending(true);\n providerTypeSearchCriteria.setSortColumn(\"description\");\n providerTypeSearchCriteria.setPageNumber(1);\n providerTypeSearchCriteria.setPageSize(-1);\n List<ProviderType> items = providerTypeService.search(providerTypeSearchCriteria).getItems();\n modelAndView.addObject(\"providerTypesLookup\", items);\n }", "public SearchResponse search(SearchRequest request) throws SearchServiceException;", "public ActionForward LocomotorReport(ActionMapping mapping, ActionForm form,\r\n HttpServletRequest request, HttpServletResponse response)\r\n throws Exception {\r\n\r\n String ur = \"/LocomotorReport.do?LocomotorReport=LocomotorReport\";\r\n request.setAttribute(\"ur\", ur);\r\n\r\n String target = \"success\";\r\n String subquery = null, columns = null;\r\n String districtId = null;\r\n String mandalId = null;\r\n String villageId = null;\r\n String rationcard = null, agee = null;\r\n DataSource ds = null;\r\n FunctionalReportDAO funDao = new FunctionalReportDAO();\r\n int cou = 1;\r\n String edu = null, em = null, ma = null, caste = null, religion = null, disability = null, gender = null, total = null, pmarige = null;\r\n FunctionalNeedReportForm functionalNeedForm = (FunctionalNeedReportForm) form;\r\n FunctionalNeedReportDAO dao = new FunctionalNeedReportDAO();\r\n ArrayList habitationlist = new ArrayList();\r\n try {\r\n String fdate = (String) request.getParameter(\"fromdate\");\r\n String tdate = (String) request.getParameter(\"todate\");\r\n functionalNeedForm.setFromdate(fdate);\r\n functionalNeedForm.setTodate(tdate);\r\n Iterator itr = null;\r\n ds = getDataSource(request);\r\n if (ds == null || \"null\".equals(ds)) {\r\n ds = JNDIDataSource.getConnection();\r\n }\r\n FunctionalNeedReportService functionalNeedService =\r\n FunctionalNeedServiceFactory.getFunctionalNeedServiceImpl();\r\n TerritoryService territoryService = TerritoryServiceFactory.getTerritoryServiceImpl();\r\n ArrayList ohWiseDetails = new ArrayList();\r\n ArrayList empWiseSingleDetails = new ArrayList();\r\n ArrayList districtList = new ArrayList();\r\n ArrayList mandallist = new ArrayList();\r\n ArrayList villagelist = new ArrayList();\r\n ReportDAO rdao = new ReportDAO();\r\n\r\n // Get District list\r\n\r\n districtList = territoryService.getDistricts(ds);\r\n if (districtList != null && districtList.size() > 0) {\r\n functionalNeedForm.setDistrictList(districtList);\r\n }\r\n\r\n if (request.getParameter(\"district_id\") != null && !request.getParameter(\"district_id\").equals(\"\")) {\r\n mandallist = functionalNeedService.getMandals(ds, request.getParameter(\"district_id\"), functionalNeedForm.getUrban_id());\r\n functionalNeedForm.setMandallist(mandallist);\r\n }\r\n if (request.getParameter(\"mandal_id\") != null && !request.getParameter(\"mandal_id\").equals(\"\")) {\r\n habitationlist = functionalNeedService.getVillageAll(ds, request.getParameter(\"district_id\"), request.getParameter(\"mandal_id\"));\r\n functionalNeedForm.setVillagelist(habitationlist);\r\n }\r\n if (request.getParameter(\"district_id\") == null) {\r\n districtId = \"0\";\r\n } else {\r\n districtId = request.getParameter(\"district_id\");\r\n }\r\n if (request.getParameter(\"mandal_id\") == null) {\r\n mandalId = \"0\";\r\n } else {\r\n mandalId = request.getParameter(\"mandal_id\");\r\n }\r\n if (request.getParameter(\"village_id\") == null) {\r\n villageId = \"0\";\r\n } else {\r\n villageId = request.getParameter(\"village_id\");\r\n }\r\n if (\"getDetails\".equalsIgnoreCase(request.getParameter(\"mode\"))) {\r\n\r\n String name = dao.getDistMandVilHabname(ds, districtId, mandalId, villageId, \"0\");\r\n request.setAttribute(\"names\", name);\r\n // ohWiseDetails=rdao.getVisiualDisabilityCount(ds, districtId, mandalId, villageId,fdate,tdate);\r\n ohWiseDetails = funDao.getDisabilityCount(ds, districtId, mandalId, villageId, fdate, tdate, \"1\");\r\n if (ohWiseDetails.size() == 0) {\r\n request.setAttribute(\"msg\", \"No Data Found\");\r\n } else {\r\n\r\n request.setAttribute(\"ohWiseDetails\", ohWiseDetails);\r\n }\r\n\r\n } else if (\"getempWiseReport\".equalsIgnoreCase(request.getParameter(\"status\"))) {\r\n String dist = null;\r\n String mandal = null;\r\n String village = null;\r\n String vi = request.getParameter(\"villagesId\");\r\n if (request.getParameter(\"districtId\") == null) {\r\n dist = \"0\";\r\n } else {\r\n dist = request.getParameter(\"districtId\");\r\n }\r\n if (request.getParameter(\"mandalId\") == null) {\r\n mandal = \"0\";\r\n } else {\r\n mandal = request.getParameter(\"mandalId\");\r\n }\r\n if (!mandal.equals(\"0\") && !dist.equals(\"0\")) {\r\n if (request.getParameter(\"villagesId\") == null) {\r\n village = \"0\";\r\n } else {\r\n village = request.getParameter(\"villagesId\");\r\n }\r\n } else {\r\n village = \"0\";\r\n }\r\n\r\n String name = dao.getDistMandVilHabname(ds, dist, mandal, village, \"0\");\r\n request.setAttribute(\"names\", name);\r\n // ohWiseDetails=rdao.getVisiualDisabilityCount(ds, dist, mandal, village,fdate,tdate);\r\n ohWiseDetails = funDao.getDisabilityCount(ds, dist, mandal, village, fdate, tdate, \"1\");\r\n if (ohWiseDetails.size() == 0) {\r\n\r\n request.setAttribute(\"msg\", \"No Data Found\");\r\n\r\n } else {\r\n request.setAttribute(\"ohWiseDetails\", ohWiseDetails);\r\n\r\n }\r\n target = \"excel\";\r\n\r\n } else if (\"getempWiseReportPrint\".equalsIgnoreCase(request.getParameter(\"status\"))) {\r\n String dist = null;\r\n String mandal = null;\r\n String village = null;\r\n String cast = null;\r\n String hab = null;\r\n if (request.getParameter(\"hid\") == null) {\r\n hab = \"0\";\r\n } else {\r\n hab = request.getParameter(\"hid\");\r\n }\r\n\r\n if (request.getParameter(\"districtId\") == null) {\r\n dist = \"0\";\r\n } else {\r\n dist = request.getParameter(\"districtId\");\r\n }\r\n if (request.getParameter(\"mandalId\") == null) {\r\n mandal = \"0\";\r\n } else {\r\n mandal = request.getParameter(\"mandalId\");\r\n }\r\n if (!mandal.equals(\"0\") && !dist.equals(\"0\")) {\r\n if (request.getParameter(\"villagesId\") == null) {\r\n village = \"0\";\r\n } else {\r\n village = request.getParameter(\"villagesId\");\r\n }\r\n } else {\r\n village = \"0\";\r\n }\r\n String name = dao.getDistMandVilHabname(ds, dist, mandal, village, \"0\");\r\n request.setAttribute(\"names\", name);\r\n ohWiseDetails = funDao.getDisabilityCount(ds, dist, mandal, village, fdate, tdate, \"1\");\r\n // ohWiseDetails=rdao.getVisiualDisabilityCount(ds, dist, mandal, village,fdate,tdate);\r\n if (ohWiseDetails.size() == 0) {\r\n request.setAttribute(\"msg\", \"No Data Found\");\r\n } else {\r\n request.setAttribute(\"ohWiseDetails\", ohWiseDetails);\r\n }\r\n target = \"print\";\r\n } else if (\"getDetails\".equalsIgnoreCase(request.getParameter(\"details\"))) {\r\n String dist = null;\r\n String mandal = null;\r\n String village = null;\r\n String refId = null;\r\n if (request.getParameter(\"dID\") == null) {\r\n dist = \"0\";\r\n } else {\r\n dist = request.getParameter(\"dID\");\r\n }\r\n if (request.getParameter(\"mID\") == null || request.getParameter(\"mID\") == \"\") {\r\n mandal = \"0\";\r\n } else {\r\n mandal = request.getParameter(\"mID\");\r\n }\r\n if (!mandal.equals(\"0\") && !dist.equals(\"0\")) {\r\n if (request.getParameter(\"vID\") == null || request.getParameter(\"vID\") == \"\") {\r\n village = \"0\";\r\n } else {\r\n village = request.getParameter(\"vID\");\r\n }\r\n } else {\r\n village = \"0\";\r\n }\r\n\r\n String hab = null;\r\n if (request.getParameter(\"hid\") == null || request.getParameter(\"hid\") == \"\") {\r\n hab = \"0\";\r\n } else {\r\n hab = request.getParameter(\"hid\");\r\n }\r\n String name = dao.getDistMandVilHabname(ds, dist, mandal, village, \"0\");\r\n request.setAttribute(\"names\", name);\r\n subquery = (String) request.getParameter(\"tablee\");\r\n columns = (String) request.getParameter(\"colu\");\r\n String selectmethod = request.getParameter(\"query\");\r\n String co = columns, type = null;\r\n type = (String) request.getParameter(\"type\");\r\n request.setAttribute(\"type\", type);\r\n co = co.replace(\"'\", \"%27\");\r\n co = co.replace(\"(\", \"%28\");\r\n co = co.replace(\")\", \"%29\");\r\n co = co.replace(\"+\", \"%2B\");\r\n co = co.replace(\",\", \"%2C\");\r\n//co=co.replace(\"%\", \"%25\");\r\n co = co.replace(\"%%\", \"%25%\");\r\n request.setAttribute(\"tablee\", subquery);\r\n request.setAttribute(\"colu\", co);\r\n request.setAttribute(\"query\", selectmethod);\r\n if (selectmethod != null && selectmethod.equalsIgnoreCase(\"query\")) {\r\n ohWiseDetails = dao.getPersonalDetailsAllQuery(ds, dist, mandal, village, hab, fdate, tdate, \"1\", subquery, columns);\r\n } else {\r\n ohWiseDetails = dao.getPersonalDetailsAll(ds, dist, mandal, village, hab, fdate, tdate, \"1\", subquery, columns);\r\n }\r\n request.setAttribute(\"ohWiseDetails\", ohWiseDetails);\r\n if (ohWiseDetails.size() == 0) {\r\n request.setAttribute(\"msg\", \"No Data \");\r\n }\r\n target = \"personal\";\r\n } else if (\"getempDetailsAction\".equalsIgnoreCase(request.getParameter(\"empStatus\"))) {\r\n String dist = null;\r\n String mandal = null;\r\n String village = null;\r\n String refId = null;\r\n if (request.getParameter(\"dID\") == null) {\r\n dist = \"0\";\r\n } else {\r\n dist = request.getParameter(\"dID\");\r\n }\r\n if (request.getParameter(\"mID\") == null || request.getParameter(\"mID\") == \"\") {\r\n mandal = \"0\";\r\n } else {\r\n mandal = request.getParameter(\"mID\");\r\n }\r\n if (!mandal.equals(\"0\") && !dist.equals(\"0\")) {\r\n if (request.getParameter(\"vID\") == null || request.getParameter(\"vID\") == \"\") {\r\n village = \"0\";\r\n } else {\r\n village = request.getParameter(\"vID\");\r\n }\r\n } else {\r\n village = \"0\";\r\n }\r\n\r\n String hab = null;\r\n if (request.getParameter(\"hid\") == null || request.getParameter(\"hid\") == \"\") {\r\n hab = \"0\";\r\n } else {\r\n hab = request.getParameter(\"hid\");\r\n }\r\n String name = dao.getDistMandVilHabname(ds, dist, mandal, village, \"0\");\r\n request.setAttribute(\"names\", name);\r\n subquery = (String) request.getParameter(\"tablee\");\r\n columns = (String) request.getParameter(\"colu\");\r\n String selectmethod = request.getParameter(\"query\");\r\n if (selectmethod != null && selectmethod.equalsIgnoreCase(\"query\")) {\r\n ohWiseDetails = dao.getPersonalDetailsAllQuery(ds, dist, mandal, village, hab, fdate, tdate, \"1\", subquery, columns);\r\n } else {\r\n\r\n ohWiseDetails = dao.getPersonalDetailsAll(ds, dist, mandal, village, hab, fdate, tdate, \"1\", subquery, columns);\r\n }\r\n request.setAttribute(\"ohWiseDetails\", ohWiseDetails);\r\n target = \"EmpWisePersonalDetailsExcel\";\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return mapping.findForward(target);\r\n }", "@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {\n PreparedQuery results = getQuery();\n\n // Add tracked locations as MapImage objects to a List.\n List<MapImage> formLocationOptions = convertMetdataToMapImages(results);\n\n Gson gson = new Gson();\n String jsonLocations = gson.toJson(formLocationOptions);\n response.setContentType(\"application/json\");\n response.getWriter().println(jsonLocations);\n }", "public HashMap<String, String> getReports(){\n HashMap<String, String> reports = new HashMap<>();\n reports.put(KEY_REPORTS, pref.getString(KEY_REPORTS, null));\n return reports;\n }", "protected Map<Report, Integer> getReports() {\n return reports;\n }", "SearchResponse search(SearchRequest searchRequest) throws IOException;", "protected Map<String, Object> getReportParameters()\r\n/* 134: */ {\r\n/* 135:169 */ Map<String, Object> reportParameters = super.getReportParameters();\r\n/* 136:170 */ reportParameters.put(\"ReportTitle\", \"Reporte Presupuesto\");\r\n/* 137:171 */ reportParameters.put(\"ejercicio\", this.ejercicio.getNombre());\r\n/* 138:172 */ if ((this.tipoReporte.ordinal() == 1) && (this.mesSeleccionado != null)) {\r\n/* 139:173 */ reportParameters.put(\"mes\", this.mesSeleccionado.getNombre());\r\n/* 140: */ }\r\n/* 141:174 */ return reportParameters;\r\n/* 142: */ }", "@RequestMapping(value = \"/report\", method = RequestMethod.POST)\n\t@ResponseBody\n\tString getReport(HttpServletRequest request, HttpServletResponse response) {\n\n\t\t// Get the Logged in User\n\t\tString name = getLoggedUser();\n\n\t\tString email = request.getParameter(\"email\");\n\t\tRetrieveItems ri = new RetrieveItems(env);\n\t\tList<WorkItem> theList = ri.getItemsDataSQLReport(name);\n\t\tWriteExcel writeExcel = new WriteExcel();\n\t\tSendMessages sm = new SendMessages(env);\n\t\tjava.io.InputStream is = writeExcel.exportExcel(theList);\n\n\t\ttry {\n\t\t\tsm.sendReport(is, email);\n\t\t}catch (IOException e) {\n\t\t\te.getStackTrace();\n\t\t}\n\t\treturn \"Report is created\";\n\t}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, java.io.IOException {\n\n response.setContentType(\"application/x-msexcel\");\n Vector resultXLS = new Vector();\n Location location = new Location();\n\n long userId = JSPRequestValue.requestLong(request, \"user_id\");\n int type = JSPRequestValue.requestInt(request, \"type\");\n int invType = JSPRequestValue.requestInt(request, \"inv_type\");\n \n User u = new User();\n try {\n u = DbUser.fetch(userId);\n } catch (Exception e) {\n }\n\n Vector result = new Vector();\n ReportParameter rp = new ReportParameter();\n try {\n HttpSession session = request.getSession();\n resultXLS = (Vector) session.getValue(\"REPORT_INVENTORY_STOCK_SUMMARY\");\n result = (Vector) resultXLS.get(0);\n rp = (ReportParameter) resultXLS.get(1);\n } catch (Exception e) {\n }\n\n Company cmp = new Company();\n try {\n Vector listCompany = DbCompany.list(0, 0, \"\", \"\");\n if (listCompany != null && listCompany.size() > 0) {\n cmp = (Company) listCompany.get(0);\n }\n } catch (Exception ext) {\n System.out.println(ext.toString());\n }\n\n if (rp.getLocationId() != 0) {\n try {\n location = DbLocation.fetchExc(rp.getLocationId());\n } catch (Exception e) {\n }\n }\n\n boolean gzip = false;\n\n OutputStream gzo;\n if (gzip) {\n response.setHeader(\"Content-Encoding\", \"gzip\");\n gzo = new GZIPOutputStream(response.getOutputStream());\n } else {\n gzo = response.getOutputStream();\n }\n\n PrintWriter wb = new PrintWriter(new OutputStreamWriter(gzo, \"UTF-8\"));\n \n String title = \"\";\n if(invType==0){\n title = \"INVENTORY REPORT (VALUE)\";\n }else{\n title = \"INVENTORY REPORT (QUANTITY)\";\n }\n\n wb.println(\" <?xml version=\\\"1.0\\\"?>\");\n wb.println(\" <?mso-application progid=\\\"Excel.Sheet\\\"?>\");\n wb.println(\" <Workbook xmlns=\\\"urn:schemas-microsoft-com:office:spreadsheet\\\"\");\n wb.println(\" xmlns:o=\\\"urn:schemas-microsoft-com:office:office\\\"\");\n wb.println(\" xmlns:x=\\\"urn:schemas-microsoft-com:office:excel\\\"\");\n wb.println(\" xmlns:ss=\\\"urn:schemas-microsoft-com:office:spreadsheet\\\"\");\n wb.println(\" xmlns:html=\\\"http://www.w3.org/TR/REC-html40\\\">\");\n wb.println(\" <DocumentProperties xmlns=\\\"urn:schemas-microsoft-com:office:office\\\">\");\n wb.println(\" <Author>Roy</Author>\");\n wb.println(\" <LastAuthor>Roy</LastAuthor>\");\n wb.println(\" <Created>2015-01-25T05:27:31Z</Created>\");\n wb.println(\" <Version>12.00</Version>\");\n wb.println(\" </DocumentProperties>\");\n wb.println(\" <ExcelWorkbook xmlns=\\\"urn:schemas-microsoft-com:office:excel\\\">\");\n wb.println(\" <WindowHeight>8445</WindowHeight>\");\n wb.println(\" <WindowWidth>20055</WindowWidth>\");\n wb.println(\" <WindowTopX>240</WindowTopX>\");\n wb.println(\" <WindowTopY>105</WindowTopY>\");\n wb.println(\" <ProtectStructure>False</ProtectStructure>\");\n wb.println(\" <ProtectWindows>False</ProtectWindows>\");\n wb.println(\" </ExcelWorkbook>\");\n wb.println(\" <Styles>\");\n wb.println(\" <Style ss:ID=\\\"Default\\\" ss:Name=\\\"Normal\\\">\");\n wb.println(\" <Alignment ss:Vertical=\\\"Bottom\\\"/>\");\n wb.println(\" <Borders/>\");\n wb.println(\" <Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"11\\\" ss:Color=\\\"#000000\\\"/>\");\n wb.println(\" <Interior/>\");\n wb.println(\" <NumberFormat/>\");\n wb.println(\" <Protection/>\");\n wb.println(\" </Style>\");\n \n wb.println(\" <Style ss:ID=\\\"s70\\\">\");\n wb.println(\" <Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"11\\\" ss:Color=\\\"#000000\\\"\");\n wb.println(\" ss:Bold=\\\"1\\\"/>\");\n wb.println(\" </Style>\");\n \n wb.println(\" <Style ss:ID=\\\"s70i\\\">\");\n wb.println(\" <Alignment ss:Horizontal=\\\"Right\\\" ss:Vertical=\\\"Center\\\"/>\");\n wb.println(\" <Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"11\\\" ss:Color=\\\"#000000\\\"\");\n wb.println(\" />\");\n wb.println(\" </Style>\");\n \n wb.println(\" <Style ss:ID=\\\"s81\\\">\");\n wb.println(\" <Borders>\");\n wb.println(\" <Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" </Borders>\");\n wb.println(\" </Style>\");\n wb.println(\" <Style ss:ID=\\\"s82\\\">\");\n wb.println(\" <Alignment ss:Horizontal=\\\"Center\\\" ss:Vertical=\\\"Center\\\"/>\");\n wb.println(\" <Borders>\");\n wb.println(\" <Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" </Borders>\");\n wb.println(\" </Style>\");\n wb.println(\" <Style ss:ID=\\\"s83\\\">\");\n wb.println(\" <Borders>\");\n wb.println(\" <Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" </Borders>\");\n wb.println(\" <NumberFormat ss:Format=\\\"Standard\\\"/>\");\n wb.println(\" </Style>\");\n wb.println(\" <Style ss:ID=\\\"s84\\\">\");\n wb.println(\" <Alignment ss:Horizontal=\\\"Center\\\" ss:Vertical=\\\"Center\\\"/>\");\n wb.println(\" <Borders>\");\n wb.println(\" <Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" </Borders>\");\n wb.println(\" <Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"11\\\" ss:Color=\\\"#000000\\\"\");\n wb.println(\" ss:Bold=\\\"1\\\"/>\");\n wb.println(\" </Style>\");\n wb.println(\" <Style ss:ID=\\\"s85\\\">\");\n wb.println(\" <Alignment ss:Horizontal=\\\"Center\\\" ss:Vertical=\\\"Center\\\" ss:WrapText=\\\"1\\\"/>\");\n wb.println(\" <Borders>\");\n wb.println(\" <Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" </Borders>\");\n wb.println(\" <Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"11\\\" ss:Color=\\\"#000000\\\"\");\n wb.println(\" ss:Bold=\\\"1\\\"/>\");\n wb.println(\" </Style>\");\n wb.println(\" <Style ss:ID=\\\"s86\\\">\");\n wb.println(\" <Alignment ss:Horizontal=\\\"Center\\\" ss:Vertical=\\\"Bottom\\\"/>\");\n wb.println(\" <Borders>\");\n wb.println(\" <Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" </Borders>\");\n wb.println(\" <Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"11\\\" ss:Color=\\\"#000000\\\"\");\n wb.println(\" ss:Bold=\\\"1\\\"/>\");\n wb.println(\" </Style>\");\n wb.println(\" <Style ss:ID=\\\"s87\\\">\");\n wb.println(\" <Alignment ss:Horizontal=\\\"Center\\\" ss:Vertical=\\\"Bottom\\\"/>\");\n wb.println(\" <Borders>\");\n wb.println(\" <Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" </Borders>\");\n wb.println(\" <Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"11\\\" ss:Color=\\\"#000000\\\"\");\n wb.println(\" ss:Bold=\\\"1\\\"/>\");\n wb.println(\" </Style>\");\n wb.println(\" <Style ss:ID=\\\"s92\\\">\");\n wb.println(\" <Borders>\");\n wb.println(\" <Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" </Borders>\");\n wb.println(\" <Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"11\\\" ss:Color=\\\"#000000\\\"\");\n wb.println(\" ss:Bold=\\\"1\\\"/>\");\n wb.println(\" <NumberFormat ss:Format=\\\"Standard\\\"/>\");\n wb.println(\" </Style>\");\n wb.println(\" <Style ss:ID=\\\"s94\\\">\");\n wb.println(\" <Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"12\\\" ss:Color=\\\"#000000\\\"\");\n wb.println(\" ss:Bold=\\\"1\\\"/>\");\n wb.println(\" </Style>\");\n wb.println(\" </Styles>\");\n wb.println(\" <Worksheet ss:Name=\\\"Sheet1\\\">\");\n wb.println(\" <Table>\");\n wb.println(\" <Column ss:AutoFitWidth=\\\"0\\\" ss:Width=\\\"39.75\\\"/>\");\n wb.println(\" <Column ss:AutoFitWidth=\\\"0\\\" ss:Width=\\\"123\\\"/>\");\n if(type == 1){\n wb.println(\" <Column ss:AutoFitWidth=\\\"0\\\" ss:Width=\\\"123\\\"/>\");\n wb.println(\" <Column ss:AutoFitWidth=\\\"0\\\" ss:Width=\\\"80\\\"/>\");\n wb.println(\" <Column ss:AutoFitWidth=\\\"0\\\" ss:Width=\\\"123\\\"/>\");\n }\n \n wb.println(\" <Column ss:Width=\\\"84.75\\\" ss:Span=\\\"13\\\"/>\");\n wb.println(\" <Row>\");\n if(type == 0){\n wb.println(\" <Cell ss:MergeAcross=\\\"15\\\" ss:StyleID=\\\"s70i\\\"><Data ss:Type=\\\"String\\\">Print date : \" + JSPFormater.formatDate(new Date(), \"dd-MM-yyyy HH:mm:ss\") + \", by \" + u.getFullName() + \"</Data></Cell>\");\n }else{\n wb.println(\" <Cell ss:MergeAcross=\\\"18\\\" ss:StyleID=\\\"s70i\\\"><Data ss:Type=\\\"String\\\">Print date : \" + JSPFormater.formatDate(new Date(), \"dd-MM-yyyy HH:mm:ss\") + \", by \" + u.getFullName() + \"</Data></Cell>\"); \n }\n wb.println(\" </Row>\");\n wb.println(\" <Row ss:Height=\\\"18.75\\\">\");\n wb.println(\" <Cell ss:StyleID=\\\"s94\\\"><Data ss:Type=\\\"String\\\">\" + cmp.getName() + \"</Data></Cell>\");\n wb.println(\" </Row>\");\n wb.println(\" <Row ss:Height=\\\"18.75\\\">\");\n wb.println(\" <Cell ss:StyleID=\\\"s94\\\"><Data ss:Type=\\\"String\\\">\" + cmp.getAddress() + \"</Data></Cell>\");\n wb.println(\" </Row>\");\n wb.println(\" <Row>\");\n wb.println(\" <Cell ss:StyleID=\\\"s70\\\"><Data ss:Type=\\\"String\\\"></Data></Cell>\");\n wb.println(\" </Row>\");\n wb.println(\" <Row>\");\n wb.println(\" <Cell ss:StyleID=\\\"s70\\\"><Data ss:Type=\\\"String\\\">\"+title+\"</Data></Cell>\");\n wb.println(\" </Row>\");\n if (rp.getLocationId() != 0) {\n wb.println(\" <Row>\");\n wb.println(\" <Cell ss:StyleID=\\\"s70\\\"><Data ss:Type=\\\"String\\\">Location : \" + location.getName() + \"</Data></Cell>\");\n wb.println(\" </Row>\");\n }else{\n wb.println(\" <Row>\");\n wb.println(\" <Cell ss:StyleID=\\\"s70\\\"><Data ss:Type=\\\"String\\\">Location : All Location</Data></Cell>\");\n wb.println(\" </Row>\");\n }\n \n wb.println(\" <Row>\");\n wb.println(\" <Cell ss:StyleID=\\\"s70\\\"><Data ss:Type=\\\"String\\\">Period : \" + JSPFormater.formatDate(rp.getDateFrom(), \"dd MMM yyyy\") + \" - \" + JSPFormater.formatDate(rp.getDateTo(), \"dd MMM yyyy\") + \"</Data></Cell>\");\n wb.println(\" </Row>\");\n wb.println(\" <Row>\");\n wb.println(\" <Cell ss:StyleID=\\\"s70\\\"><Data ss:Type=\\\"String\\\"></Data></Cell>\");\n wb.println(\" </Row>\");\n \n wb.println(\" <Row >\");\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">Code </Data></Cell>\");\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">Category</Data></Cell>\");\n \n if(type == 1){\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">Sub Category</Data></Cell>\");\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">Sku </Data></Cell>\");\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">Item Name</Data></Cell>\");\n }\n \n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">Begining </Data></Cell>\");\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">Incoming </Data></Cell>\");\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s85\\\"><Data ss:Type=\\\"String\\\">Incoming &#10;Ajustment</Data></Cell>\");\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">RTV </Data></Cell>\");\n wb.println(\" <Cell ss:MergeAcross=\\\"1\\\" ss:StyleID=\\\"s86\\\"><Data ss:Type=\\\"String\\\">Transfer </Data></Cell>\");\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">Costing </Data></Cell>\");\n wb.println(\" <Cell ss:MergeAcross=\\\"1\\\" ss:StyleID=\\\"s86\\\"><Data ss:Type=\\\"String\\\">Repack </Data></Cell>\");\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">Shringkage </Data></Cell>\");\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">COGS </Data></Cell>\");\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">Net Sales </Data></Cell>\");\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">Ending </Data></Cell>\");\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">Inv. Turn Over</Data></Cell>\");\n wb.println(\" </Row>\");\n wb.println(\" <Row>\");\n if(type == 1){\n wb.println(\" <Cell ss:Index=\\\"10\\\" ss:StyleID=\\\"s87\\\"><Data ss:Type=\\\"String\\\">In </Data></Cell>\");\n }else{\n wb.println(\" <Cell ss:Index=\\\"7\\\" ss:StyleID=\\\"s87\\\"><Data ss:Type=\\\"String\\\">In </Data></Cell>\");\n }\n wb.println(\" <Cell ss:StyleID=\\\"s87\\\"><Data ss:Type=\\\"String\\\">Out </Data></Cell>\");\n if(type == 1){\n wb.println(\" <Cell ss:Index=\\\"13\\\" ss:StyleID=\\\"s87\\\"><Data ss:Type=\\\"String\\\">Stock Out </Data></Cell>\");\n }else{\n wb.println(\" <Cell ss:Index=\\\"10\\\" ss:StyleID=\\\"s87\\\"><Data ss:Type=\\\"String\\\">Stock Out </Data></Cell>\");\n }\n wb.println(\" <Cell ss:StyleID=\\\"s87\\\"><Data ss:Type=\\\"String\\\">Stock In</Data></Cell>\");\n wb.println(\" </Row>\");\n\n if (result != null && result.size() > 0) {\n\n double totBegining = 0;\n double totReceiving = 0;\n double totRecAdj = 0;\n double totRtv = 0;\n double totTrafIn = 0;\n double totTrafOut = 0;\n double totCosting = 0;\n double totMutation = 0;\n double totRepackOut = 0;\n double totAdjustment = 0;\n double totCogs = 0;\n double totNetSales = 0;\n double totEnding = 0;\n double totTurnOver = 0;\n\n for (int i = 0; i < result.size(); i++) {\n\n InvReport iReport = (InvReport) result.get(i);\n wb.println(\" <Row>\");\n wb.println(\" <Cell ss:StyleID=\\\"s82\\\"><Data ss:Type=\\\"String\\\">\" + iReport.getCode() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s81\\\"><Data ss:Type=\\\"String\\\">\" + iReport.getSectionName() + \"</Data></Cell>\");\n if(type ==1){\n wb.println(\" <Cell ss:StyleID=\\\"s81\\\"><Data ss:Type=\\\"String\\\">\" + iReport.getCodeClass() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s81\\\"><Data ss:Type=\\\"String\\\">\" + iReport.getSku() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s81\\\"><Data ss:Type=\\\"String\\\">\" + iReport.getDesription() + \"</Data></Cell>\");\n }\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getBegining() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getReceiving() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getReceivingAdjustment() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getRtv() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getTransferIn() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getTransferOut() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getCosting() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getMutation() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getRepackOut() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getStockAdjustment() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getCogs() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getNetSales() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getEnding() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getTurnOvr() + \"</Data></Cell>\");\n wb.println(\" </Row>\");\n \n totBegining = totBegining + iReport.getBegining();\n totReceiving = totReceiving + iReport.getReceiving();\n totRecAdj = totRecAdj + iReport.getReceivingAdjustment();\n totRtv = totRtv + iReport.getRtv();\n totTrafIn = totTrafIn + iReport.getTransferIn();\n totTrafOut = totTrafOut + iReport.getTransferOut();\n totCosting = totCosting + iReport.getCosting();\n totMutation = totMutation + iReport.getMutation();\n totRepackOut = totRepackOut + iReport.getRepackOut();\n totAdjustment = totAdjustment + iReport.getStockAdjustment();\n totCogs = totCogs + iReport.getCogs();\n totNetSales = totNetSales + iReport.getNetSales();\n totEnding = totEnding + iReport.getEnding();\n totTurnOver = totTurnOver + iReport.getTurnOvr();\n }\n \n wb.println(\" <Row>\");\n wb.println(\" <Cell ss:MergeAcross=\\\"1\\\" ss:StyleID=\\\"s86\\\"><Data ss:Type=\\\"String\\\">Total</Data></Cell>\");\n if(type ==1){\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"String\\\"></Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"String\\\"></Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"String\\\"></Data></Cell>\");\n }\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"Number\\\">\" + totBegining + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"Number\\\">\" + totReceiving + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"Number\\\">\" + totRecAdj + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"Number\\\">\" + totRtv + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"Number\\\">\" + totTrafIn + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"Number\\\">\" + totTrafOut + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"Number\\\">\" + totCosting + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"Number\\\">\" + totMutation + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"Number\\\">\" + totRepackOut + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"Number\\\">\" + totAdjustment + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"Number\\\">\" + totCogs + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"Number\\\">\" + totNetSales + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"Number\\\">\" + totEnding + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"String\\\"></Data></Cell>\");\n wb.println(\" </Row>\");\n }\n wb.println(\" </Table>\");\n wb.println(\" <WorksheetOptions xmlns=\\\"urn:schemas-microsoft-com:office:excel\\\">\");\n wb.println(\" <PageSetup>\");\n wb.println(\" <Header x:Margin=\\\"0.3\\\"/>\");\n wb.println(\" <Footer x:Margin=\\\"0.3\\\"/>\");\n wb.println(\" <PageMargins x:Bottom=\\\"0.75\\\" x:Left=\\\"0.7\\\" x:Right=\\\"0.7\\\" x:Top=\\\"0.75\\\"/>\");\n wb.println(\" </PageSetup>\");\n wb.println(\" <Print>\");\n wb.println(\" <ValidPrinterInfo/>\");\n wb.println(\" <HorizontalResolution>300</HorizontalResolution>\");\n wb.println(\" <VerticalResolution>300</VerticalResolution>\");\n wb.println(\" </Print>\");\n wb.println(\" <Selected/>\");\n wb.println(\" <DoNotDisplayGridlines/>\");\n wb.println(\" <Panes>\");\n wb.println(\" <Pane>\");\n wb.println(\" <Number>3</Number>\");\n wb.println(\" <ActiveRow>20</ActiveRow>\");\n wb.println(\" <ActiveCol>2</ActiveCol>\");\n wb.println(\" </Pane>\");\n wb.println(\" </Panes>\");\n wb.println(\" <ProtectObjects>False</ProtectObjects>\");\n wb.println(\" <ProtectScenarios>False</ProtectScenarios>\");\n wb.println(\" </WorksheetOptions>\");\n wb.println(\" </Worksheet>\");\n wb.println(\" <Worksheet ss:Name=\\\"Sheet2\\\">\");\n wb.println(\" <Table>\");\n wb.println(\" </Table>\");\n wb.println(\" <WorksheetOptions xmlns=\\\"urn:schemas-microsoft-com:office:excel\\\">\");\n wb.println(\" <PageSetup>\");\n wb.println(\" <Header x:Margin=\\\"0.3\\\"/>\");\n wb.println(\" <Footer x:Margin=\\\"0.3\\\"/>\");\n wb.println(\" <PageMargins x:Bottom=\\\"0.75\\\" x:Left=\\\"0.7\\\" x:Right=\\\"0.7\\\" x:Top=\\\"0.75\\\"/>\");\n wb.println(\" </PageSetup>\");\n wb.println(\" <ProtectObjects>False</ProtectObjects>\");\n wb.println(\" <ProtectScenarios>False</ProtectScenarios>\");\n wb.println(\" </WorksheetOptions>\");\n wb.println(\" </Worksheet>\");\n wb.println(\" <Worksheet ss:Name=\\\"Sheet3\\\">\");\n wb.println(\" <Table>\");\n wb.println(\" </Table>\");\n wb.println(\" <WorksheetOptions xmlns=\\\"urn:schemas-microsoft-com:office:excel\\\">\");\n wb.println(\" <PageSetup>\");\n wb.println(\" <Header x:Margin=\\\"0.3\\\"/>\");\n wb.println(\" <Footer x:Margin=\\\"0.3\\\"/>\");\n wb.println(\" <PageMargins x:Bottom=\\\"0.75\\\" x:Left=\\\"0.7\\\" x:Right=\\\"0.7\\\" x:Top=\\\"0.75\\\"/>\");\n wb.println(\" </PageSetup>\");\n wb.println(\" <ProtectObjects>False</ProtectObjects>\");\n wb.println(\" <ProtectScenarios>False</ProtectScenarios>\");\n wb.println(\" </WorksheetOptions>\");\n wb.println(\" </Worksheet>\");\n wb.println(\" </Workbook>\");\n wb.println(\" \");\n wb.flush();\n }", "private void getBySearch(HttpServletRequest request, HttpServletResponse response, ArticleService artService) {\n\t\tString search = request.getParameter(\"search\");\n\t\tList<Article> list = new ArrayList<Article>();\n\t\tlist = artService.getAll(\"atitle\", search);\n\t\trequest.setAttribute(\"list\", list);\n\t\ttry {\n\t\t\trequest.getRequestDispatcher(\"/essay/other_essay.jsp\").forward(request, response);\n\t\t} catch (ServletException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public Map<ERest,Object> elasticSearchPayIn(String data){\n Map<ERest,Object> hm = new LinkedHashMap<>();\n final NativeSearchQuery query = new NativeSearchQueryBuilder()\n //Birden fazla aram kriteri eklemek için multiMatchQuery yapısı kullanılır.\n .withQuery(multiMatchQuery(data,\"cuname\")\n .field(\"invoice\")\n .fuzziness(Fuzziness.AUTO))\n .build();\n List<SearchHit<ElasticPayIn>> list = operations.search(query,ElasticPayIn.class).getSearchHits();\n if(list.size() > 0 ){\n hm.put(ERest.status,true);\n hm.put(ERest.message,\"Arama işlemi başarılı!\");\n hm.put(ERest.result,list);\n }else{\n hm.put(ERest.status,false);\n hm.put(ERest.message,\"Arama kriterlerinize uygun sonuç bulunamadı!\");\n }\n return hm;\n }", "public void doGet(HttpServletRequest req, HttpServletResponse resp)throws IOException {\n\n try {\n\n logRequest(req);\n\n if(!validateSession(req, resp))\n return;\n\n if(blockedSmokey(sessionManagement, resp))\n return;\n\n setLoggerByParameters(req);\n\n\n Formatter formatter = getFormatFromParameters(req);\n\n\n DBKeyInterface _project = getMandatoryKey(\"project\", req);\n Project project = new Project(new LookupByKey(_project));\n\n if(!mandatoryObjectExists(project, resp))\n return;\n\n Boolean instant = getOptionalBoolean(\"instant\", req, false); // Instant search or not\n String searchText = getMandatoryString(\"text\", req);\n\n //TODO: Only for test: REMOVE later\n if(searchText.startsWith(\"!\")){\n\n searchText = searchText.substring( 1 );\n instant = true;\n }\n\n PukkaLogger.log(PukkaLogger.Level.INFO, \"Searching for: \" + searchText);\n\n // Now select the appropriate search manager and retrieve the results\n\n if(instant){\n\n PortalUser user = sessionManagement.getUser();\n SearchManager2 filter = new SearchManager2(project, user);\n JSONArray resultJSON = filter.search(searchText, defaultLanguage);\n JSONObject json = new JSONObject().put(\"fragments\", resultJSON);\n\n sendJSONResponse(json, formatter, resp);\n\n }\n else{\n\n SearchManager filter = new SearchManager();\n JSONObject json = filter.getMatchJson(searchText, project, sessionManagement);\n\n sendJSONResponse(json, formatter, resp);\n\n }\n\n\n } catch (BackOfficeException e) {\n\n PukkaLogger.log( e ,\"Error (Get) in Search Servlet\");\n returnError(e.narration, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, resp);\n resp.flushBuffer();\n\n } catch (Exception e) {\n\n PukkaLogger.log( e , \"Error (Get) in Search Servlet\");\n returnError(\"Internal Error\", HttpServletResponse.SC_INTERNAL_SERVER_ERROR, resp);\n resp.flushBuffer();\n\n }\n\n\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic ActionForward toSearchRecord(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response) {\n\n\t\trequest.setAttribute(\"navigator.location\",\"\t客户拜访计划管理>> 查询列表\");\t\t\n\t\tActionForward forward = null;\n\t\tHttpSession session = request.getSession();\n\t\tServeTableForm tableForm = (ServeTableForm) form;\n\t\tString action = tableForm.getAction();\n\t\tViewLoginUserInfo userInfo = (ViewLoginUserInfo)session.getAttribute(SysConfig.LOGIN_USER_INFO);\n\t\t\n\t\t\n\t\tif (tableForm.getProperty(\"genReport\") != null\n\t\t\t\t&& !tableForm.getProperty(\"genReport\").equals(\"\")) {\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tresponse = toExcelRecord(form,request,response);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tforward = mapping.findForward(\"exportExcel\");\n\t\t\ttableForm.setProperty(\"genReport\",\"\");\n\n\t\t} else {\n\t\t\n\t\t\tHTMLTableCache cache = new HTMLTableCache(session, \"customerVisitList\");\n\n\t\t\tDefaultHTMLTable table = new DefaultHTMLTable();\n\t\t\ttable.setMapping(\"fCustomerVisitPlan\");\n\t\t\ttable.setLength(SysConfig.HTML_TABLE_LENGTH);\n\t\t\tcache.updateTable(table);\n\t\t\ttable.setSortColumn(\"custLevel\");\n\t\t\ttable.setIsAscending(true);\n\t\t\tcache.updateTable(table);\n\n\t\t\tif (action.equals(ServeTableForm.NAVIGATE)\n\t\t\t\t\t|| action.equals(ServeTableForm.SORT)) {\n\t\t\t\tcache.loadForm(tableForm);\n\t\t\t} else if (action.equals(\"Submit\")) {\n\t\t\t\tcache.loadForm(tableForm);\n\t\t\t} else {\n\t\t\t\ttable.setFrom(0);\n\t\t\t}\n\t\t\tcache.saveForm(tableForm);\n\t\t\tString companyName = tableForm.getProperty(\"companyName\");\n\t\t\tString principalName = tableForm.getProperty(\"principalName\");\n\t\t\tString sdate1=tableForm.getProperty(\"sdate1\");\n\t\t\tString edate1=tableForm.getProperty(\"edate1\");\n\t\t\tString maintDivision = tableForm.getProperty(\"maintDivision\");\n\t\t\tString mainStation = tableForm.getProperty(\"assignedMainStation\");\n\t\t\tString visitPosition = tableForm.getProperty(\"visitPosition\");\n\t\t\tString visitStaff = tableForm.getProperty(\"visitStaff\");\n\t\t\tString isVisit = tableForm.getProperty(\"isVisit\");\n\t\t\t\n\t\t\t\n\t\t\tif(!userInfo.getComID().equals(\"00\")){\n\t\t\t\tif(maintDivision == null || maintDivision.trim().equals(\"\")){\n\t\t\t\t\tmaintDivision = userInfo.getComID();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSession hs = null;\n\t\t\tQuery query =null;\n\t\t\tString order=\"\";\n\t\t\ttry {\n\t\t\t\ths = HibernateUtil.getSession();\n\t\t\t\t\n\t\t\t\t//检查是否包含 【A03 维保经理,维保站文员 A48, 安装维保分总 068 】 只能看自己维保站下面的数据\n\t\t\t\tString roleidkk=\"N\";\n\t\t\t\tString sqlss=\"select * from view_mainstation where roleid='\"+userInfo.getRoleID()+\"'\";\n\t\t\t\tList vmlist=hs.createSQLQuery(sqlss).list();\n\t\t\t\tif(vmlist!=null && vmlist.size()>0){\n\t\t\t\t\troleidkk=\"Y\";\n\t\t\t\t\tif(mainStation == null || mainStation.trim().equals(\"\")){\n\t\t\t\t\t\tmainStation=userInfo.getStorageId();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n String hql=\"select vcl.Orderby as custLevel,cvpm.companyName,cvpm.principalName,cvpm.principalPhone,\"\n \t\t+ \"cvpm.maintDivision,cvpm.maintStation,cvpd.visitDate,cvpd.visitStaff,cvpd.rem,\"\n \t\t+ \"cvpd.jnlno,cvf.numno as isVisit,cvpd.visitPosition \"\n \t\t+ \"from CustomerVisitPlanMaster cvpm \"\n \t\t+ \"left join ViewCustLevel vcl on vcl.custLevel = cvpm.custLevel,\"\n \t\t+ \"CustomerVisitPlanDetail cvpd \"\n \t\t+ \"left join CustomerVisitFeedback cvf on cvf.jnlno=cvpd.jnlno and \"\n \t\t+ \"cvf.numno in (select MAX(numno) from CustomerVisitFeedback group by jnlno),\"\n \t\t+ \"loginuser l \"\n \t\t+ \"where cvpm.billno=cvpd.billno and cvpd.visitStaff=l.userid \";\t \n\t\t\t\tif (companyName != null && !companyName.equals(\"\")) {\n\t\t\t\t\thql+=\" and cvpm.companyName like '%\"+companyName.trim()+\"%'\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (principalName != null && !principalName.equals(\"\")) {\n\t\t\t\t\thql+=\" and cvpm.principalName like '%\"+principalName.trim()+\"%'\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (maintDivision != null && !maintDivision.equals(\"\")) {\n\t\t\t\t\thql+=\" and cvpm.maintDivision like '\" + maintDivision + \"'\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (mainStation != null && !mainStation.equals(\"\")) {\n\t\t\t\t\thql+=\" and cvpm.maintStation like '\"+mainStation.trim()+\"' \";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (visitPosition != null && !visitPosition.equals(\"\")) {\n\t\t\t\t\thql+=\" and cvpd.visitPosition= '\"+visitPosition.trim()+\"'\";\n\t\t\t\t}\n\t\t\t\tif (visitStaff != null && !visitStaff.equals(\"\")) {\n\t\t\t\t\thql+=\" and (l.userid like '%\"+visitStaff.trim()+\"%' or l.username like '%\"+visitStaff.trim()+\"%')\";\n\t\t\t\t}\n\t\t\t\tif (isVisit != null && !isVisit.equals(\"\")) {\n\t\t\t\t\tif(isVisit.equals(\"Y\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\thql+=\" and cvf.numno not like '' and cvf.numno is not null\";\n\t\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\thql+=\" and cvf.numno is null\";\t\n\t\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t\n\t\t\t\tif (sdate1 != null && !sdate1.equals(\"\")) {\n\t\t\t\t\thql+=\" and cvpd.visitDate >= '\"+sdate1.trim()+\"'\";\n\t\t\t\t}\n\t\t\t\tif (edate1 != null && !edate1.equals(\"\")) {\n\t\t\t\t\thql+=\" and cvpd.visitDate <= '\"+edate1.trim()+\"'\";\n\t\t\t\t}\n\n\t\t\t\tif (table.getIsAscending()) {\n\t\t\t\t\torder=\" order by \"+table.getSortColumn()+\" desc,cvpd.jnlno desc\";\n\t\t\t\t} else {\n\t\t\t\t\torder=\" order by \"+table.getSortColumn()+\",cvpd.jnlno desc\";\n\t\t\t\t}\n\t\t\t\t//System.out.println(hql+order);\n\t\t\t\tquery = hs.createSQLQuery(hql+order);\n\t\t\t\t\n\t\t\t\ttable.setVolume(query.list().size());// 查询得出数据记录数;\n\t\t\t\t// 得出上一页的最后一条记录数号;\n\t\t\t\tquery.setFirstResult(table.getFrom()); // pagefirst\n\t\t\t\tquery.setMaxResults(table.getLength());\n\t\t\t\tcache.check(table);\n\t\t\t\tList customerVisitPlanList =new ArrayList();\n\t\t\t\tList list=query.list();\n\t\t\t\tif(list!=null&list.size()>0)\n\t\t\t\t{\n\t\t\t\t\tint length=list.size();\n\t\t\t\t\tfor(int i=0;i<length;i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tObject[] objects=(Object[]) list.get(i);\n\t\t\t\t\t\tHashMap map=new HashMap();\n\t\t\t\t\t\tmap.put(\"custLevel\", bd.getName(hs, \"ViewCustLevel\", \"CustLevel\", \"Orderby\",(String) objects[0]));\n\t\t\t\t\t\tmap.put(\"companyName\", objects[1]);\n\t\t\t\t\t\tmap.put(\"principalName\", objects[2]);\n\t\t\t\t\t\tmap.put(\"principalPhone\", objects[3]);\n\t\t\t\t\t\tmap.put(\"maintDivision\", bd.getName(hs, \"company\", \"ComName\", \"ComID\", (String) objects[4]));\n\t\t\t\t\t\tmap.put(\"maintStation\", bd.getName(hs, \"StorageID\", \"StorageName\", \"StorageID\", (String) objects[5]));\n\t\t\t\t\t\tmap.put(\"visitDate\", objects[6]);\n\t\t\t\t\t\tmap.put(\"visitPosition\",bd.getName(hs, \"Class1\", \"Class1Name\", \"Class1ID\",(String) objects[11]));\t\t\t\t\t\t\n\t\t\t\t\t\tmap.put(\"visitStaff\", bd.getName(hs, \"Loginuser\", \"username\", \"userid\", (String) objects[7]));\n\t\t\t\t\t\tmap.put(\"rem\", objects[8]);\n\t\t\t\t\t\tmap.put(\"jnlno\", objects[9]);\n\t\t\t\t\t\tInteger isVisit1=(Integer)objects[10];\n\t\t\t\t\t\tif(isVisit1!=null&&isVisit1>0){\n\t\t\t\t\t\t map.put(\"isVisit\", \"是\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t map.put(\"isVisit\", \"否\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcustomerVisitPlanList.add(map);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\ttable.addAll(customerVisitPlanList);\n\t\t\t request.setAttribute(\"CompanyList\", Grcnamelist1.getgrcnamelist(userInfo.getUserID()));\n\t\t\t if (maintDivision != null && !maintDivision.equals(\"\") && !maintDivision.equals(\"%\")) {\n\t\t\t\t String hql1=\"select a from Storageid a,Company b where a.comid = b.comid\"\n\t\t\t\t \t\t+\" and a.comid = '\"+maintDivision+\"' and a.storagetype=1 \"\n\t\t\t\t \t\t+ \"and a.parentstorageid='0' and a.enabledflag='Y' \";\n\t\t\t\t \t//A03 维保经理 只能看自己维保站下面的合同,维保站文员 A48, 安装维保分总 068 \n\t\t\t\t \tif(roleidkk.equals(\"Y\")){\n\t\t\t\t\t \thql1+=\" and a.storageid='\"+userInfo.getStorageId()+\"' \";\n\t\t\t\t\t}\n\t\t\t\t\thql1+=\" order by a.storageid\";\n\t\t\t\t\tList mainStationList=hs.createQuery(hql1).list();\n\t\t\t\t\tif(mainStationList!=null && mainStationList.size()>0){\n\t\t\t\t\t\trequest.setAttribute(\"mainStationList\", mainStationList);\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t request.setAttribute(\"isselectval\", roleidkk);\n\t\t\t String sql=\"from Class1 c where c.r1='Y'and c.enabledFlag='Y'\";\n\t\t\t\tList class1List=hs.createQuery(sql).list();\n\t\t\t\t\n\t\t\t\t \n\t\t\t\tsession.setAttribute(\"class1List\", class1List);\n\t\t\t \n\t\t\t \n\t\t\t\tsession.setAttribute(\"customerVisitList\", table);\n\n\t\t\t} catch (DataStoreException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (Exception e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\ths.close();\n\t\t\t\t} catch (HibernateException hex) {\n\t\t\t\t\tlog.error(hex.getMessage());\n\t\t\t\t\tDebugUtil.print(hex, \"HibernateUtil Hibernate Session \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tforward = mapping.findForward(\"customerVisitPlanList\");\n\t\t}\n\t\t\treturn forward;\n\t}", "private static SearchResponse createSearchResponse() {\n long tookInMillis = randomNonNegativeLong();\n int totalShards = randomIntBetween(1, Integer.MAX_VALUE);\n int successfulShards = randomIntBetween(0, totalShards);\n int skippedShards = randomIntBetween(0, totalShards);\n InternalSearchResponse internalSearchResponse = InternalSearchResponse.empty();\n\n return new SearchResponse(\n internalSearchResponse,\n null,\n totalShards,\n successfulShards,\n skippedShards,\n tookInMillis,\n ShardSearchFailure.EMPTY_ARRAY,\n SearchResponse.Clusters.EMPTY\n );\n }", "private void loadSearchResults(SearchRequest request) {\n showProgress(null, \"Loading search results...\");\n\n String authToken = ShPrefManager.with(getActivity()).getToken();\n RestClient.getAPI().search(authToken, request, new RestCallback<SearchResponse>() {\n @Override\n public void failure(RestError restError) {\n hideProgress();\n OpenHomeUtils.showToast(getActivity().getApplicationContext(), restError.getErrorMessage(), Toast.LENGTH_LONG);\n }\n\n @Override\n public void success(SearchResponse searchResponse, Response response) {\n hideProgress();\n if (searchResponse.getMessage().size() > 0) {\n propertyList = searchResponse.getMessage();\n String userId = ShPrefManager.with(getActivity()).getUserId();\n searchAdapter = new SearchAdapter(getActivity(), propertyList, userId, 'S');\n mRecyclerView.setAdapter(searchAdapter);\n currentAdapter = \"S\";\n //displayingNowTextView.setText(\"Searching \\\"\" + searchText + \"\\\"\");\n searchBack.setVisibility(View.VISIBLE);\n InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(getActivity().getWindow().getCurrentFocus().getWindowToken(), 0);\n locationLayout.setVisibility(View.VISIBLE);\n refineLayout.setVisibility(View.GONE);\n } else {\n String message = \"No results to display. Please modify the search criteria and try again.\";\n CustomDialogFragment regSuccessDialogFragment = CustomDialogFragment.newInstance(R.string.try_again,\n message, ApplicationConstants.BUTTON_OK, 0);\n regSuccessDialogFragment.show(getActivity().getFragmentManager(), \"SearchResultsFragment\");\n }\n }\n });\n }", "@Override\n\tprotected void buildExcelDocument(Map<String, Object> model, HSSFWorkbook workbook, HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws Exception \n\t{\n\t\t\n\t\tString formName = (String)model.get(\"formName\");\n\t\tif (\"Supplier\".equals(formName))\n\t\t\tsetSupplierExcelData(model, workbook);\n\t\telse if (\"Customer\".equals(formName))\n\t\t\tsetCustomerExcelData(model, workbook);\n\t\telse if (\"Item\".equals(formName))\n\t\t\tsetItemExcelData(model, workbook);\n\t\telse if (\"NonInventoryItem\".equals(formName))\n\t\t\tsetNonInventoryExcelData(model, workbook);\n\t\telse if (\"Project\".equals(formName))\n\t\t\tsetProjectExcelData(model, workbook);\n\t\telse if (\"Warehouse\".equals(formName))\n\t\t\tsetWarehouseExcelData(model, workbook);\n\t\t\n\t\tSystem.out.println(\">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\" + formName);\n\t\n\t}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n try {\r\n \tString studyType = request.getParameter(\"study-type\");\r\n String studyTitle = request.getParameter(\"study-title\");\r\n String studyDescription = request.getParameter(\"study-description\");\r\n String shortName = request.getParameter(\"short-name\");\r\n String grantNumber = request.getParameter(\"grant-number\");\r\n String awardStartDate = request.getParameter(\"award-start-date\");\r\n String projectEndDate = request.getParameter(\"project-end-date\");\r\n String dbgapStudyRegistered = request.getParameter(\"dbgap-study-registered\");\r\n String dbgapStudyID = request.getParameter(\"dbgap-study-id\");\r\n String dbgapStudyTitle = request.getParameter(\"dbgap-study-title\");\r\n String washuStudyNum = request.getParameter(\"washu-study-num\");\r\n String numOfSites = request.getParameter(\"num-of-sites\");\r\n /*\r\n int count = 0;\r\n for (int i = 1;i>0;i++)\r\n if (request.getParameter(\"first-name-\"+i) != null)\r\n \t count++;\r\n System.out.println(\"Number of investigators - \"+count);\r\n */\r\n String eraid = request.getParameter(\"investigator-era-id\");\r\n String firstName = request.getParameter(\"first-name-1\");\r\n String middleName = request.getParameter(\"middle-name-1\");\r\n String lastName = request.getParameter(\"last-name-1\");\r\n String title = request.getParameter(\"title-1\");\r\n String email = request.getParameter(\"email-1\");\r\n String phone = request.getParameter(\"phone-1\");\r\n String fax = request.getParameter(\"fax-1\");\r\n \r\n String orgID = request.getParameter(\"investigator-organization-era-id/1-1\");\r\n String oname = request.getParameter(\"investigator-organization-name/1-1\");\r\n String role = request.getParameter(\"role-1\");\r\n String sub1 = request.getParameter(\"investigator-subunitone/1-1\");\r\n String sub2 = request.getParameter(\"investigator-subunittwo/1-1\");\r\n String add = request.getParameter(\"investigator-street-address/1-1\");\r\n String city = request.getParameter(\"investigator-city/1-1\");\r\n String state = request.getParameter(\"investigator-state/1-1\");\r\n String country = request.getParameter(\"investigator-country/1-1\");\r\n int zip = 0;\r\n \r\n String contact = request.getParameter(\"resource-organization-site-contact/1-1\");\r\n String type = request.getParameter(\"resource-type-1\");\r\n String subType = request.getParameter(\"resource-subtype-1\");\r\n String platform = request.getParameter(\"platform-1\");\r\n String description = request.getParameter(\"resource-description-1\");\r\n String numSamples = request.getParameter(\"num-samples-1\");\r\n String dateFirst = request.getParameter(\"date-first-submission-1\");\r\n String frequency = request.getParameter(\"frequency-submission-1\");\r\n String dateRelease = request.getParameter(\"date-release-1\");\r\n String dateComplete = request.getParameter(\"project-end-date-1\");\r\n \r\n \r\n \r\n StudyModel newStudy = new StudyModel(studyTitle, studyDescription, shortName, grantNumber, awardStartDate, projectEndDate, studyType, dbgapStudyRegistered, dbgapStudyID, dbgapStudyTitle, washuStudyNum, numOfSites);\r\n InvestigatorModel newInvestigator = new InvestigatorModel(eraid,firstName,middleName,lastName,title,email,phone,fax);\r\n OrganizationModel newOrganization = new OrganizationModel(orgID, oname, sub1, sub2, add, city, state, zip, country);\r\n ResourceModel newResource = new ResourceModel(type, subType, platform, numSamples, description, dateFirst, dateComplete, frequency, dateRelease);\r\n \r\n \r\n DatabaseConnection Studydb = new DatabaseConnection();\r\n //String result = Studydb.StoreStudy(studyTitle, studyDescription, shortName, grantNumber, awardStartDate, projectEndDate, dbgapStudyRegistered, dbgapStudyID, dbgapStudyTitle, washuStudyNum, numOfSites);\r\n int studyResult = Studydb.StoreStudy(newStudy);\r\n int investigatorResult = Studydb.StoreInvestigator(newInvestigator);\r\n int organizationResult = Studydb.StoreOrganization(newOrganization);\r\n int resourceResult = Studydb.StoreResource(studyResult, newResource);\r\n int studyInvResult = Studydb.ConnectStudyInvestigator(studyResult, investigatorResult, role);\r\n int invOrgResult = Studydb.ConnectInvestigatorOrganization(investigatorResult, organizationResult);\r\n \r\n // TODO: find the exact contactID\r\n //contact is the index of the selection. 1 for first investigator.\tcontactID = investigatorResult;\r\n int contactID = investigatorResult;\r\n int resSrcResult = Studydb.ConnectResourceSite(studyResult, resourceResult, organizationResult, contactID);\r\n \r\n request.getRequestDispatcher(\"/Review?studyID=\"+studyResult).forward(request, response);\r\n \r\n }\r\n catch (Exception e) {\r\n \tSystem.out.println(e);\r\n }\r\n \r\n \r\n \r\n \t\t\r\n try (PrintWriter out = response.getWriter()) {\r\n /* TODO output your page here. You may use following sample code. */\r\n out.println(\"<!DOCTYPE html>\");\r\n out.println(\"<html>\");\r\n out.println(\"<head>\");\r\n out.println(\"<title>Database Operation Summary</title>\"); \r\n out.println(\"</head>\");\r\n out.println(\"<body>\");\r\n out.println(\"<h1>Data from InputForm at \" + request.getContextPath() + \"</h1>\");\r\n //out.println(\"<p>Study Title : \"+studyTitle+\"<br>Study Description : \"+studyDescription+\"<br>Short Name : \"+shortName+\"<br>Grant Number : \"+grantNumber+\"<br>Award Start Date : \"+awardStartDate+\"<br>Project End Date : \"+projectEndDate+\"<br>\");\r\n //out.println(\"First Name : \"+firstName+\"<br>Middle Name : \"+middleName+\"<br>Last Name : \"+lastName+\"</p>\");\r\n //out.println(\"<h2>Database Inserted IDs : \" + studyResult+\", \"+investigatorResult+ \", \"+organizationResult+ \" AND \"+resourceResult +\"</h2>\");\r\n out.println(\"</body>\");\r\n out.println(\"</html>\");\r\n }\r\n }", "@POST\n\t@Path(\"students\")\n\t@Consumes(MediaType.APPLICATION_JSON)\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response searchStudent(ParamsObject input){\n\t\tMap<String,List<String>> map = new HashMap<String,List<String>>();\n\t\tArrayList<Students> studentRecords = new ArrayList<Students>();\n\t\tJSONArray resultArray = new JSONArray();\n\t\tJSONObject finalResult = new JSONObject();\n\t\tint total = -1;\n\t\tint begin = 1;\n\t\tint end = 20;\n\ttry{\n\t\tif (input.getFirstname()!=null){\n\t\t\tSystem.out.println(\"got firstname\"+input.getFirstname());\n\t\t\tArrayList<String> firstnameList = new ArrayList<String>();\n\t\t\tfirstnameList.add(input.getFirstname());\n\t\t\tmap.put(\"firstName\",firstnameList);\n\t\t}\n\t\tif (input.getLastname()!=null){\n\t\t\tArrayList<String> lastnameList = new ArrayList<String>();\n\t\t\tlastnameList.add(input.getLastname());\n\t\t\tmap.put(\"lastName\",lastnameList);\n\t\t}\n\t\tif (input.getEmail()!=null){\n\t\t\tArrayList<String> emailList = new ArrayList<String>();\n\t\t\temailList.add(input.getEmail());\n\t\t\tmap.put(\"email\",emailList);\n\t\t}\n\t\tif (input.getDegreeyear()!=null){\n\t\t\tArrayList<String> degreeyearList = new ArrayList<String>();\n\t\t\tdegreeyearList.add(input.getDegreeyear());\n\t\t\tmap.put(\"expectedLastYear\",degreeyearList);\n\t\t}\n\t\tif (input.getEnrollmentstatus()!=null){\n\t\t\tArrayList<String> enrollmentstatusList = new ArrayList<String>();\n\t\t\tenrollmentstatusList.add(input.getEnrollmentstatus());\n\t\t\tmap.put(\"enrollmentStatus\",enrollmentstatusList);\n\t\t}\n\t\tif (input.getCampus()!=null){\n\t\t\tArrayList<String> campusList = new ArrayList<String>();\n\t\t\tcampusList.add(input.getCampus());\n\t\t\tmap.put(\"campus\",campusList);\n\t\t}\n\t\tif (input.getCompany()!=null){\n\t\t\tArrayList<String> companyList = new ArrayList<String>();\n\t\t\tcompanyList.add(input.getCompany());\n\t\t\tmap.put(\"companyName\",companyList);\n\t\t}\n\t\tif (input.getNeuid()!=null){\n\t\t\tArrayList<String> neuIdList = new ArrayList<String>();\n\t\t\tneuIdList.add(input.getNeuid());\n\t\t\tmap.put(\"neuId\",neuIdList);\n\t\t}\n\t\tif (input.getUndergradmajor()!=null){\n\t\t\tArrayList<String> undergradmajor = new ArrayList<String>();\n\t\t\tundergradmajor.add(input.getUndergradmajor());\n\t\t\tmap.put(\"majorName\",undergradmajor);\n\t\t}\n\t\tif (input.getNuundergrad()!=null){\n\t\t\tArrayList<String> nuundergrad = new ArrayList<String>();\n\t\t\tnuundergrad.add(input.getUndergradmajor());\n\t\t\tmap.put(\"institutionName\",nuundergrad);\n\t\t}\n\t\tif (input.getCoop()!=null){\n\t\t\tArrayList<String> coop = new ArrayList<String>();\n\t\t\tcoop.add(input.getCoop());\n\t\t\tmap.put(\"companyName\",coop);\n\t\t}\n\t\tif (input.getGender()!=null){\n\t\t\tArrayList<String> gender = new ArrayList<String>();\n\t\t\tgender.add(input.getGender());\n\t\t\tmap.put(\"gender\",gender);\n\t\t}\n\t\tif (input.getRace()!=null){\n\t\t\tArrayList<String> race = new ArrayList<String>();\n\t\t\trace.add(input.getRace());\n\t\t\tmap.put(\"race\",race);\n\t\t}\n\t\tif (input.getBeginindex()!=null){\n\t\t\tbegin = Integer.valueOf(input.getBeginindex());\n\t\t}\n\t\tif (input.getEndindex()!=null){\n\t\t\tend = Integer.valueOf(input.getEndindex());\n\t\t}\n\t\tstudentRecords = (ArrayList<Students>) studentDao.getAdminFilteredStudents(map, begin, end);\n\t\ttotal = studentDao.getAdminFilteredStudentsCount(map);\n\t\t\n\t\tfor(Students st : studentRecords) {\n\t\t\tJSONObject studentJson = new JSONObject();\n\t\t\tJSONObject eachStudentJson = new JSONObject(st);\n\t\t\tjava.util.Set<String> keys = eachStudentJson.keySet();\n\t\t\tfor(int i=0;i<keys.toArray().length; i++){\n\t\t\t\tstudentJson.put(((String) keys.toArray()[i]).toLowerCase(), eachStudentJson.get((String) keys.toArray()[i]));\n\t\t\t}\n\t\t\tstudentJson.put(\"notes\",administratorNotesDao.getAdministratorNoteRecordByNeuId(studentJson.get(\"neuid\").toString()));\n\t\t\tresultArray.put(studentJson);\n\t\t}\n\t\tfinalResult.put(\"students\", resultArray);\n\t\tfinalResult.put(\"beginindex\", begin);\n\t\tfinalResult.put(\"endindex\", end);\n\t\tfinalResult.put(\"totalcount\", total);\n\t\t\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(\"please check the request.\").build();\n\t\t}\n\t\treturn Response.status(Response.Status.OK).entity(finalResult.toString()).build();\n\t}", "@Override\n\tpublic void execute(HttpServletRequest request, HttpServletResponse response) {\n\t\tString keyword = request.getParameter(\"keyword\");\n\t\tString pageNo = request.getParameter(\"pageNo\");\n\t\ttry {\n\t\t\tif(keyword == null) {\n\t\t\t\tresponse.sendError(400, \"keyword required\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if(pageNo == null) {\n\t\t\t\tresponse.sendError(400, \"keyword required\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tList<MyPlannerBean> list = null;\n\t\ttry {\n\t\t\tSearchPlannerDAO dao = new SearchPlannerDAO(ConnectionProvider.getConnection());\n\t\t\tlist = dao.list(keyword, (Integer.parseInt(pageNo)-1)*9);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tresponse.setContentType(\"application/json\");\n\t\t\tresponse.setCharacterEncoding(\"UTF-8\");\n\t\t\tresponse.getWriter().print(JsonConverter.objectToJson(list));\n\t\t} catch (JsonGenerationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (JsonMappingException 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}", "protected IBundleProvider performSearch(String theCriteria) {\n\t\tRuntimeResourceDefinition responseResourceDef = getSubscriptionDao().validateCriteriaAndReturnResourceDefinition(theCriteria);\n\t\tSearchParameterMap responseCriteriaUrl = BaseHapiFhirDao.translateMatchUrl(getSubscriptionDao(), getSubscriptionDao().getContext(), theCriteria, responseResourceDef);\n\n\t\tRequestDetails req = new ServletSubRequestDetails();\n\t\treq.setSubRequest(true);\n\n\t\tIFhirResourceDao<? extends IBaseResource> responseDao = getSubscriptionDao().getDao(responseResourceDef.getImplementingClass());\n\t\tresponseCriteriaUrl.setLoadSynchronousUpTo(1);\n\n\t\tIBundleProvider responseResults = responseDao.search(responseCriteriaUrl, req);\n\t\treturn responseResults;\n\t}", "private void processLoupe(final HttpServletRequest request,\n final HttpServletResponse response) throws IOException {\n\n if (request.getSession() == null || request.getSession().isNew()) {\n return;\n }\n\n String dictionaryId = request.getParameter(\"dictionaryId\");\n String metadata = request.getParameter(\"metadata\");\n String searchColumn = request.getParameter(\"column\");\n String value = request.getParameter(\"value\");\n //ECG-323 non-latin chars don't work with GET method\n //getCharacterEncoding is UTF-8 but chars are encoded in\n //default ISO-8859-1\n if (value != null) {\n value = new String(value.getBytes(\"8859_1\"), \"UTF-8\");\n }\n String sDate = request.getParameter(\"date\");\n String languageCode = request.getParameter(\"languageCode\");\n String columns = \"null\".equalsIgnoreCase(request.getParameter(\"columns\")) ? null : request.getParameter(\"columns\");\n String sItemsStart = request.getParameter(\"itemsStart\");\n String sItemsOnPage = request.getParameter(\"itemsOnPage\");\n String sDisplayOnly = request.getParameter(\"displayOnly\");\n boolean strictValue = Boolean.valueOf(request.getParameter(\"strictValue\"));\n\n // It allows to take country code form pattern \"xx_XX\" e.g. \"en_EN\"\n String[] languageCodeArray = languageCode.split(\"_\");\n if (languageCodeArray.length == 2) {\n languageCode = languageCodeArray[1].toUpperCase();\n } else {\n languageCode = languageCodeArray[0].toUpperCase();\n }\n\n StringBuilder sb = new StringBuilder(\n \"Reference servlet query: dictionaryId=\");\n sb.append(dictionaryId);\n sb.append(\", column=\");\n sb.append(searchColumn);\n sb.append(\", metadata\");\n sb.append(metadata);\n sb.append(\", value=\");\n sb.append(value);\n sb.append(\", date=\");\n sb.append(sDate);\n sb.append(\", languageCode=\");\n sb.append(languageCode);\n sb.append(\", columns=\");\n sb.append(columns);\n sb.append(\", searchColumns=\");\n sb.append(searchColumn);\n sb.append(\", itemsStart=\");\n sb.append(sItemsStart);\n sb.append(\", itemsOnPage=\");\n sb.append(sItemsOnPage);\n sb.append(\", displayOnly=\");\n sb.append(sDisplayOnly);\n logger.finer(sb.toString());\n\n // parse date\n Date date;\n try {\n date = sDate != null ? new Date(Long.parseLong(sDate)) : null;\n } catch (Exception e) {\n logger.info(\"Cannot parse reference data date. \" + e.getMessage());\n generateDivInfo(response.getOutputStream(), request, \"error_taglib\");\n return;\n }\n\n // parse start index\n int itemsStart;\n try {\n itemsStart = sItemsStart != null ? Integer.parseInt(sItemsStart)\n : 0;\n } catch (Exception e) {\n logger.info(\"Cannot parse reference data start index. \"\n + e.getMessage());\n generateDivInfo(response.getOutputStream(), request, \"error_taglib\");\n return;\n }\n\n // parse items count\n int itemsOnPage;\n try {\n itemsOnPage = sItemsOnPage != null ? Integer.parseInt(sItemsOnPage)\n : 0;\n } catch (Exception e) {\n logger.info(\"Cannot parse reference data page size. \"\n + e.getMessage());\n generateDivInfo(response.getOutputStream(), request, \"error_taglib\");\n return;\n }\n\n // parse if display mode\n boolean displayOnly;\n try {\n displayOnly = sDisplayOnly != null ? Boolean\n .parseBoolean(sDisplayOnly) : false;\n } catch (Exception e) {\n logger.info(\"Cannot parse reference data display mode. \"\n + e.getMessage());\n generateDivInfo(response.getOutputStream(), request, \"error_taglib\");\n return;\n }\n\n if (itemsStart < 0) {\n itemsStart = 0;\n }\n\n QueryResult queryResult;\n try {\n\n referenceDataSource = RefDataHolder.getReferenceDataSource();\n\n queryResult = referenceDataSource.getItemsList(dictionaryId,\n searchColumn, value, date, languageCode, itemsStart,\n itemsOnPage, metadata, strictValue);\n\n if (queryResult == null) {\n logger.warning(\"Query Result for dictionary id: \"\n + dictionaryId + \" is null\");\n throw new ReferenceDataSourceInternalException(\n \"Null result returned\");\n }\n\n logger.info(\"Query result, totalCount=\"\n + queryResult.getTotalCount() + \", items.size=\"\n + queryResult.getItems().size() + \", itemsStart=\"\n + queryResult.getItemsStart());\n\n /**\n * Set columns names to be displayed in a table\n */\n String[] columnsList;\n // if columns are not set in taglib - use defult settings from\n // query results\n if (GenericValidator.isBlankOrNull(columns)) {\n // override columns list\n logger\n .finest(\"No columns defined in tag, using defaults from queryResult: \"\n + Arrays.toString(queryResult.getValidColumns()));\n columnsList = queryResult.getValidColumns();\n if (columnsList != null) {\n if (Arrays.asList(columnsList).contains(\"invalidForUE\") || Arrays.asList(columnsList).contains(\"invalidForCountries\")) {\n columnsList = new String[]{\"type\", \"grn\", \"number\", \"accessCode\"};\n }\n }\n } else {\n // by default columns in taglib are concatenated with ','\n columnsList = columns.split(\",\");\n }\n if (itemsOnPage <= 0) {\n itemsOnPage = queryResult.getItemsOnPage();\n }\n /**\n * render output\n */\n outputGenerator.generate(new RefDataPageContext(this,\n getServletContext(), request, response), response.getOutputStream(),\n queryResult, searchColumn, columnsList, itemsOnPage,\n displayOnly);\n\n } catch (ReferenceDataSourceInternalException e) {\n logger\n .log(Level.SEVERE, \"Internal exception: \" + e.getMessage(),\n e);\n generateDivInfo(response.getOutputStream(), request, \"internal_error\",\n languageCodeArray);\n response.setStatus(HttpServletResponse.SC_OK);\n return;\n } catch (NoSuchDictionaryException e) {\n logger.severe(\"Cannot find dictionary for id: \" + dictionaryId);\n if (dictionaryId != null && dictionaryId.startsWith(\"grn\")) {\n //no dictionary with grn defined\n generateDivInfo(response.getOutputStream(), request, \"error_dictionary_grn\",\n dictionaryId);\n } else if (dictionaryId != null && dictionaryId.startsWith(\"materials\")) {\n //no dictionary with materials defined\n generateDivInfo(response.getOutputStream(), request, \"error_dictionary_materials\",\n dictionaryId);\n } else if (dictionaryId != null && dictionaryId.startsWith(\"trader\")) {\n //no dictionary with trader defined\n generateDivInfo(response.getOutputStream(), request, \"error_dictionary_trader\",\n dictionaryId);\n } else {\n generateDivInfo(response.getOutputStream(), request, \"error_dictionary\",\n dictionaryId);\n }\n response.setStatus(HttpServletResponse.SC_OK);\n return;\n }\n\n }", "private HashMap<String,String> createQueryMap() {\n\t\t\n\t\tHashMap<String, String> map = new HashMap<String, String>();\n\t\t\n\t\t// Only include Pages with the CenterNet Event template\n\t\tmap.put(\"type\",\"cq:Page\");\n\t\tmap.put(\"path\", Constants.EVENTS);\n\t\tmap.put(\"property\",\"jcr:content/cq:template\");\n\t map.put(\"property.value\", Constants.EVENT_TEMPLATE);\n\n\t if (tags != null) {\n\t \tmap = addTagFilter(map);\n\t }\n\n\t // Only include Events whose start time is in the future\n\t map.put(\"relativedaterange.property\", PN_QUERY_START_TIME);\n\t map.put(\"relativedaterange.lowerBound\", \"-0d\");\n\t \n\t // Include all hits\n\t //map.put(\"p.limit\", maxNum.toString());\n\t map.put(\"p.limit\", maxNum);\n\t map.put(\"p.guessTotal\", \"true\");\n\t \n\t // Order by Start Time\n\t map.put(\"orderby\", PN_QUERY_START_TIME);\n\t map.put(\"orderby.sort\", \"asc\");\n\t \n\t\treturn map;\n\t\t\n\t}", "protected XDocReportRegistry getRegistry( HttpServletRequest request )\n {\n return XDocReportRegistry.getRegistry();\n }", "@Override\r\n\tpublic void find(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\t\tURL1=\"/admin/xiaoshuolist.jsp\";\r\n\t\tthis.searchFields=\"title,content,categorytitle,author\";\r\n\t\tsuper.find(request, response);\r\n\t}", "@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {\n \n Query query = new Query(\"DonationMatch\");\n PreparedQuery results = DatastoreServiceFactory.getDatastoreService().prepare(query);\n\n List<DonationMatch> matches = new ArrayList<>();\n for (Entity entity : results.asIterable()) {\n long id = entity.getKey().getId();\n String restaurantName = (String) entity.getProperty(\"restaurantName\");\n String charityName = (String) entity.getProperty(\"charityName\");\n String location = (String) entity.getProperty(\"location\");\n String category = (String) entity.getProperty(\"category\");\n String pickUpTime = (String) entity.getProperty(\"pickUpTime\");\n String quantity = (String) entity.getProperty(\"quantity\");\n Date timestamp = (Date) entity.getProperty(\"timestamp\");\n String specialInstructions = (String) entity.getProperty(\"specialInstructions\");\n String imageURL = (String) entity.getProperty(\"imageURL\");\n\n DonationMatch match = new DonationMatch(id, restaurantName, charityName, location, category, pickUpTime, quantity, specialInstructions, imageURL, timestamp);\n matches.add(match);\n }\n response.setContentType(JSON_CONTENT_TYPE);\n response.getWriter().println(gson.toJson(matches));\n }", "private void fetchData() {\r\n RequesterBean requesterBean = new RequesterBean();\r\n requesterBean.setDataObject(hierarchyTitle);\r\n requesterBean.setFunctionType(GET_HIERARCHY_DATA);\r\n AppletServletCommunicator conn = new AppletServletCommunicator(connect,requesterBean);\r\n conn.send();\r\n ResponderBean responderBean = conn.getResponse();\r\n if(responderBean != null) {\r\n if(responderBean.isSuccessfulResponse()) {\r\n queryKey = hierarchyTitle;\r\n Hashtable htData = (Hashtable)responderBean.getDataObject();\r\n extractToQueryEngine(htData);\r\n }\r\n }else {\r\n //Server Error\r\n// throw new CoeusUIException(responderBean.getMessage(),CoeusUIException.ERROR_MESSAGE);\r\n }\r\n }", "SearchResponse query(SearchRequest request, Map<SearchParam, String> params);", "@Override\n protected void completeIndexerSearchResult(String response, IndexerSearchResult indexerSearchResult, AcceptorResult acceptorResult, SearchRequest searchRequest, int offset, Integer limit) {\n Document doc = Jsoup.parse(response);\n if (doc.select(\"table.xMenuT\").size() > 0) {\n Element navigationTable = doc.select(\"table.xMenuT\").get(1);\n Elements pageLinks = navigationTable.select(\"a\");\n boolean hasMore = !pageLinks.isEmpty() && pageLinks.last().text().equals(\">\");\n boolean totalKnown = false;\n indexerSearchResult.setOffset(searchRequest.getOffset());\n int total = searchRequest.getOffset() + 100; //Must be at least as many as already loaded\n if (!hasMore) { //Parsed page contains all the available results\n total = searchRequest.getOffset() + indexerSearchResult.getSearchResultItems().size();\n totalKnown = true;\n }\n indexerSearchResult.setHasMoreResults(hasMore);\n indexerSearchResult.setTotalResults(total);\n indexerSearchResult.setTotalResultsKnown(totalKnown);\n } else {\n indexerSearchResult.setHasMoreResults(false);\n indexerSearchResult.setTotalResults(0);\n indexerSearchResult.setTotalResultsKnown(true);\n }\n indexerSearchResult.setPageSize(100);\n indexerSearchResult.setOffset(offset);\n }", "private void searchHashMap(String[] searchKey, String callNumber,int startYear, int endYear) {\n\t\t/* Temporarily stores next 'values' for a title keyword */\n\t\tArrayList<Integer> tempStore = new ArrayList<Integer>();\n\t\t/* Stores only the intersection 'values' of title keywords */\n\t\tCollection<Integer> intersection = new ArrayList<Integer>();\n\t\t/* Counts number of keywords found */\n\t\tint foundKeys = 0;\n\n\t\t/* Loop to iterate through title keywords and get key-value pair intersection */\n\t\tfor (String key : searchKey) {\n\t\t\tif (titleHashMap.containsKey(key)) {\n\t\t\t\tfoundKeys = foundKeys + 1;\n\t\t\t\ttempStore.addAll((titleHashMap.get(key))); /* Stores all found values */\n\t\t\t\tif (intersection.size() == 0) {\n\t\t\t\t\tintersection.addAll(titleHashMap.get(key));\n\t\t\t\t}\n\t\t\t\tintersection.retainAll(tempStore); /* Stores only common 'values' */\n\t\t\t\ttempStore.clear(); /* Clears temporary array*/\n\t\t\t}\n\t\t}\n\n\t\t/* Checks if all keywords were found */\n\t\tif(searchKey.length == foundKeys){\n\t\t/* Performs search of other fields via the reduced list of 'values' for matched record */\n\t\tfor (Integer i : intersection) {\n\t\t\tif ((callNumber.equals(\"\") || items.get(i.intValue()).getCallNumber().equalsIgnoreCase(callNumber))\n\t\t\t\t\t&& (items.get(i.intValue()).getYear() >= startYear && items.get(i.intValue()).getYear() <= endYear)) {\n\t\t\t\tSystem.out.println(\"--------------------------------------------\");\n\t\t\t\tSystem.out.println(items.get(i.intValue())); /* Prints found records from master list 'Reference' */\n\t\t\t\tSystem.out.println(\"--------------------------------------------\");\n\t\t\t}\n\t\t}\n\t\t}\n\t}", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<>();\n\n params.put(\"userid\", globalClass.getId());\n params.put(\"folder_id\", \"0\");\n params.put(\"search_name\", search_text);\n\n Log.d(TAG, \"search \"+params);\n return params;\n }", "private CallResponse() {\n initFields();\n }", "@RequestMapping(value={\"/search\"}, method={RequestMethod.GET})\n \tpublic ModelAndView handleSearch(@RequestParam(required=false) String q, @RequestParam(required=false,defaultValue=\"1\") Integer page){\n \t\tMap<String,Object> model = new HashMap<String,Object>();\n \t\t\n \t HashMap<String,Object> search = new HashMap<String,Object>();\n \t search.put(\"term\", \"\");\n \t search.put(\"total\",0);\n \n \t List<Map<String,String>> searchResult = new ArrayList<Map<String,String>>();\n \t if(StringUtils.isNotBlank(q)){\n \t \tsearch.put(\"term\", q);\n \t \tLimitedResult<List<NameConceptModelIF>> nameConceptModelList = null;\n \t \tint pageIndex = (page <= 0)?0:(page-1);\n \t \t//use page index +1 to avoid returning a bad page number\n \t\tsearch.put(\"pageNumber\", (pageIndex+1));\n \t\tsearch.put(\"pageSize\", searchService.getPageSize());\n \t\t//check if we want another page than the first one\n \t \tif(pageIndex > 0){\n \t \t\tnameConceptModelList = searchService.searchName(q,pageIndex);\n \t \t}\n \t \telse{\n \t \t\tnameConceptModelList = searchService.searchName(q);\n \t \t}\n \n \t\t search.put(\"total\",nameConceptModelList.getTotal_rows());\n \t\t List<Map<String,String>> searchResults = new ArrayList<Map<String,String>>();\n \t\t Map<String,String> searchRow = null;\n \t\t //TODO use objects directly instead of map\n \t\t for(NameConceptModelIF currNameConceptModel : nameConceptModelList.getRows()){\n \t\t \tif(currNameConceptModel.getClass().equals(NameConceptTaxonModel.class)){\n \t\t \t\tsearchRow = new HashMap<String,String>();\n \t\t \t\tsearchRow.put(\"type\",\"taxon\");\n \t\t \t\tsearchRow.put(\"name\", currNameConceptModel.getName());\n \t\t \t\tsearchRow.put(\"id\", currNameConceptModel.getTaxonId().toString());\n \t\t \t\tsearchRow.put(\"status\", currNameConceptModel.getStatus());\n \t\t \t\tsearchRow.put(\"namehtml\",((NameConceptTaxonModel)currNameConceptModel).getNamehtml());\n \t\t \t\tsearchRow.put(\"namehtmlauthor\",((NameConceptTaxonModel)currNameConceptModel).getNamehtmlauthor());\n \t\t \t\tsearchRow.put(\"rankname\",((NameConceptTaxonModel)currNameConceptModel).getRankname());\n \t\t \t\tsearchRow.put(\"parentid\",((NameConceptTaxonModel)currNameConceptModel).getParentid().toString());\n \t\t \t\tsearchRow.put(\"parentnamehtml\",((NameConceptTaxonModel)currNameConceptModel).getParentnamehtml());\n \t\t \t\tsearchResult.add(searchRow);\n \t\t \t}\n \t\t \telse if(currNameConceptModel.getClass().equals(NameConceptVernacularNameModel.class)){\n \t\t \t\tsearchRow = new HashMap<String, String>();\n \t\t \t\tsearchRow.put(\"type\",\"vernacular\");\n \t\t \t\tsearchRow.put(\"name\", currNameConceptModel.getName());\n \t\t \t\tsearchRow.put(\"id\", Integer.toString(((NameConceptVernacularNameModel)currNameConceptModel).getId()));\n \t\t \t\tsearchRow.put(\"status\", currNameConceptModel.getStatus());\n \t\t \t\tsearchRow.put(\"lang\",((NameConceptVernacularNameModel)currNameConceptModel).getLang());\n \t\t \t\tsearchRow.put(\"taxonid\",currNameConceptModel.getTaxonId().toString());\n \t\t \t\tsearchRow.put(\"taxonnamehtml\",((NameConceptVernacularNameModel)currNameConceptModel).getTaxonnamehtml());\n \t\t \t\tsearchResult.add(searchRow);\n \t\t \t}\n \t\t \telse{\n \t\t \t\t//logger\n \t\t \t\tsearchRow = null;\n \t\t \t}\n \t\t \tsearchResults.add(searchRow);\n \t\t }\n \t\t model.put(\"results\",searchResults);\n \t }\n \t \n \t model.put(\"search\",search);\n \t return new ModelAndView(\"search\", model);\n \t}", "private ScoreCardSearchDTO populateSearchDataForIndex(String orgId, String toolId, String projectId) {\n\t\tMetricSearchDTO mData = null;\n\t\tArrayList<MetricSearchDTO> mList = new ArrayList<MetricSearchDTO>();\n\t\tScoreCardSearchDTO srchData = new ScoreCardSearchDTO();\n\t\tsrchData.setToolId(toolId);\n\t\tsrchData.setOrgId(orgId);\n\t\tsrchData.setProjectId(projectId);\n\t\tsrchData.setQuesDetailsReq(true);\n\t\tmData = new MetricSearchDTO();\n\t\tmData.setEntityType(CommonConstants.ORGANISATION);\n\t\tmData.setEntityIdReq(true);\n\t\tmData.setEntityId(orgId);\n\t\tmData.setDimensionType(CommonConstants.RESPONSE_METRIC);\n\t\tmData.setDimIdReq(false);\n\t\tmData.setMetricName(CommonConstants.OTEMPS);\n\t\tmList.add(mData);\n\t\tsrchData.setMetricList(mList);\n\t\tlogger.debug(\"populateSearchDataForIndex: SearchData \" + srchData);\n\t\treturn srchData;\n\t}", "public void findDataFromServer() {\n try {\n JSONObject jsonObjectGetPostParameterEachScreen = null;\n PassParameterbean passParameterbean = null;\n if (pageTokenAvailable) {\n searchbean_post_data.setPageToken(pageToken);\n }\n\n if (TextUtils.isEmpty(baseTextview_searched_item.getText().toString())) {\n\n } else {\n String name = URLEncoder.encode(baseTextview_searched_item.getText().toString(), \"utf-8\");\n searchbean_post_data.setSearchText(name);\n }\n\n\n searchbean_post_data.setIsCommuntiySearchByName(\"1\");\n searchbean_post_data.setUser_id(commonSession.getLoggedUserID());\n requestParametersbean.setSearchbeanPassPostData(searchbean_post_data);\n\n jsonObjectGetPostParameterEachScreen = GetPostParameterEachScreen.getPostParametersAccordingIndex(ScreensEnums.SEARCH_BY_COMMUNITYNAME.getScrenIndex(), requestParametersbean);\n passParameterbean = new PassParameterbean(this, CommunitySearchByNameActivity.this, getApplicationContext(), URLs.SEARCH_BY_COMMUNITYNAME, jsonObjectGetPostParameterEachScreen, ScreensEnums.SEARCH_BY_COMMUNITYNAME.getScrenIndex(), CommunitySearchByNameActivity.class.getClass());\n\n\n /* requestParametersbean.setUserId(commonSession.getLoggedUserID());\n requestParametersbean.setStart_limit(current_start);\n\n jsonObjectGetPostParameterEachScreen = GetPostParameterEachScreen.getPostParametersAccordingIndex(ScreensEnums.FILTER_COMMUNITY.getScrenIndex(), requestParametersbean);\n passParameterbean = new PassParameterbean(this, CommunitySearchByNameActivity.this, getApplicationContext(), URLs.FILTERCOMMUNITY, jsonObjectGetPostParameterEachScreen, ScreensEnums.FILTER_COMMUNITY.getScrenIndex(), CommunitySearchByNameActivity.class.getClass());\n*/\n\n\n passParameterbean.setNoNeedToDisplayLoadingDialog(true);\n new RequestToServer(passParameterbean, retryParameterbean).execute();\n\n\n } catch (Exception e) {\n e.printStackTrace();\n new BaseException(e, false, retryParameterbean);\n }\n }", "@Override\n public void success(FindApiEnvelope weatherDataEnvelope, Response response) {\n BusProvider.getInstance().post(produceMapSearchEvent(OpenWeatherDataParse.parseCurrentWeathers(weatherDataEnvelope)));\n }", "protected Map<String,List<PageViewVO>> initializePageMap() {\n\t\tMap<String,List<PageViewVO>> pm = new HashMap<>();\n\t\tfor (Section sect : Section.values()) {\n\t\t\tpm.put(sect.name(), new ArrayList<>());\n\t\t}\n\t\treturn pm;\n\t}", "Future<Map<String, Object>> computeQueryResult(Request request) {\n String query = request.getParam(\"q\");\n Map<String, String> results = new HashMap<String, String>();\n results.put(\"a\", \"1\");\n results.put(\"b\", \"2\");\n results.put(\"c\", \"3\");\n results.put(\"d\", \"4\");\n results.put(\"e\", \"5\");\n\n Map<String, Object> result = new HashMap<String, Object>();\n result.put(\"query\", query);\n result.put(\"numResults\", \"5\");\n result.put(\"results\", results);\n result.put(\"user\", \"Bob\");\n result.put(\"timestamp\", \"Thu, 19 May 2016 00:00:00 +00:00\");\n return Future.value(result);\n }", "List<FailedTransmissionDetail> getFailedTransmissionsReport(Map<String, String> searchCriteria);", "public String getReport(TrvlApplicantReport bean,\r\n\t\t\tHttpServletResponse response, String[] labelNames,\r\n\t\t\tHttpServletRequest request) {\r\n\t\ttry {\r\n\t\t\tString reportType = \"\";\r\n\t\t\tif (bean.getReportType().equals(\"P\")) {\r\n\t\t\t\treportType = \"Pdf\";\r\n\t\t\t}\r\n\t\t\tif (bean.getReportType().equals(\"X\")) {\r\n\t\t\t\treportType = \"Xls\";\r\n\t\t\t}\r\n\t\t\tif (bean.getReportType().equals(\"T\")) {\r\n\t\t\t\treportType = \"Txt\";\r\n\t\t\t}\r\n\t\t\tlogger.info(\"reportType--------------->\" + reportType + \"<-------\");\r\n\r\n\t\t\tString reportName = \"\";\r\n\t\t\tif (!bean.getReportTitle().equals(\"\"))\r\n\t\t\t\treportName = bean.getReportTitle();\r\n\t\t\telse\r\n\t\t\t\treportName = \"Applicant Report\";\r\n\t\t\torg.paradyne.lib.report.ReportGenerator rg = new org.paradyne.lib.report.ReportGenerator(\r\n\t\t\t\t\treportType, reportName, \"\");\r\n\t\t\trg.addText(\"\\n\", 0, 0, 0);\r\n\r\n\t\t\tlogger.info(\"multi select values : \" + bean.getHiddenColumns());\r\n\t\t\tString mutliSelectValues = bean.getHiddenColumns();\r\n\t\t\tString splitComma[] = null;\r\n\t\t\tif (!mutliSelectValues.equals(\"\")) {\r\n\t\t\t\tString lastComma = mutliSelectValues.substring(0,\r\n\t\t\t\t\t\tmutliSelectValues.length() - 1);\r\n\r\n\t\t\t\tsplitComma = lastComma.split(\",\");\r\n\t\t\t}\r\n\r\n\t\t\tint count = 0;\r\n\r\n\t\t\tlogger.info(\"SPLIT--CCCCCCCCCCCCCCCC\\n\" + splitComma);\r\n\t\t\tObject[][] selectQueryObj = selectQuery(bean, labelNames, count,\r\n\t\t\t\t\tsplitComma, request);\r\n\r\n\t\t\tString empSelectQuery = (String) selectQueryObj[0][0];\r\n\t\t\tString guestSelectQuery = (String) selectQueryObj[0][1];\r\n\t\t\tString labels = (String) selectQueryObj[0][2];\r\n\t\t\tcount = Integer.parseInt((String) selectQueryObj[0][3]);\r\n\r\n\t\t\tString[] str_colNames = new String[count + 1];\r\n\t\t\tstr_colNames[0] = \"Travel Id\";\r\n\t\t\tint str_colNames_array = 0;\r\n\t\t\tint[] cellWidth = new int[count + 1];\r\n\t\t\tcellWidth[0] = 10;\r\n\t\t\tint cellWidth_array = 0;\r\n\t\t\tint[] cellAlign = new int[count + 1];\r\n\t\t\tcellAlign[0] = 0;\r\n\t\t\tint cellAlign_array = 0;\r\n\r\n\t\t\tObject[][] condQueryObj = conditionQuery(bean, labelNames);\r\n\t\t\tString empCondQuery = (String) condQueryObj[0][0];\r\n\t\t\tString guestCondQuery = (String) condQueryObj[0][1];\r\n\r\n\t\t\tString selfROtherFinQuery = empSelectQuery + \"\" + empCondQuery;\r\n\t\t\tString guestFinQuery = guestSelectQuery + \"\" + guestCondQuery;\r\n\t\t\tString finalQuery = selfROtherFinQuery + \" UNION \" + guestFinQuery;\r\n\r\n\t\t\tlogger.info(\"FINAL QUERY----\\n\\n\" + finalQuery);\r\n\r\n\t\t\tObject[][] finalObj = getSqlModel().getSingleResult(finalQuery);\r\n\r\n\t\t\t// CODING FOR HEADERS, WIDTH AND ALIGNMENTS\r\n\t\t\tif (splitComma != null && splitComma.length > 0) {\r\n\t\t\t\tfor (int i = 0; i < splitComma.length; i++) {\r\n\t\t\t\t\tString splitDash[] = splitComma[i].split(\"-\");\r\n\t\t\t\t\tlogger.info(\"Key.....\" + splitDash[0]);\r\n\t\t\t\t\tlogger.info(\"Value.....\" + splitDash[1]);\r\n\r\n\t\t\t\t\tif (splitDash[1].equals(labelNames[0])) {\r\n\t\t\t\t\t\tstr_colNames[++str_colNames_array] = labelNames[0];\r\n\t\t\t\t\t\tcellWidth[++cellWidth_array] = 25;\r\n\t\t\t\t\t\tcellAlign[++cellAlign_array] = 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\telse if (splitDash[1].equals(labelNames[1])) {\r\n\t\t\t\t\t\tstr_colNames[++str_colNames_array] = labelNames[1];\r\n\t\t\t\t\t\tcellWidth[++cellWidth_array] = 12;\r\n\t\t\t\t\t\tcellAlign[++cellAlign_array] = 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\telse if (splitDash[1].equals(labelNames[2])) {\r\n\t\t\t\t\t\tstr_colNames[++str_colNames_array] = labelNames[2];\r\n\t\t\t\t\t\tcellWidth[++cellWidth_array] = 20;\r\n\t\t\t\t\t\tcellAlign[++cellAlign_array] = 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\telse if (splitDash[1].equals(labelNames[3])) {\r\n\t\t\t\t\t\tstr_colNames[++str_colNames_array] = labelNames[3];\r\n\t\t\t\t\t\tcellWidth[++cellWidth_array] = 25;\r\n\t\t\t\t\t\tcellAlign[++cellAlign_array] = 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\telse if (splitDash[1].equals(labelNames[4])) {\r\n\t\t\t\t\t\tstr_colNames[++str_colNames_array] = labelNames[4];\r\n\t\t\t\t\t\tcellWidth[++cellWidth_array] = 12;\r\n\t\t\t\t\t\tcellAlign[++cellAlign_array] = 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\telse if (splitDash[1].equals(labelNames[5])) {\r\n\t\t\t\t\t\tstr_colNames[++str_colNames_array] = labelNames[5];\r\n\t\t\t\t\t\tcellWidth[++cellWidth_array] = 12;\r\n\t\t\t\t\t\tcellAlign[++cellAlign_array] = 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\telse if (splitDash[1].equals(labelNames[6])) {\r\n\t\t\t\t\t\tstr_colNames[++str_colNames_array] = labelNames[6];\r\n\t\t\t\t\t\tcellWidth[++cellWidth_array] = 15;\r\n\t\t\t\t\t\tcellAlign[++cellAlign_array] = 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\telse if (splitDash[1].equals(labelNames[7])) {\r\n\t\t\t\t\t\tstr_colNames[++str_colNames_array] = labelNames[7];\r\n\t\t\t\t\t\tcellWidth[++cellWidth_array] = 15;\r\n\t\t\t\t\t\tcellAlign[++cellAlign_array] = 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\telse if (splitDash[1].equals(labelNames[8])) {\r\n\t\t\t\t\t\tstr_colNames[++str_colNames_array] = labelNames[8];\r\n\t\t\t\t\t\tcellWidth[++cellWidth_array] = 15;\r\n\t\t\t\t\t\tcellAlign[++cellAlign_array] = 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\telse if (splitDash[1].equals(labelNames[9])) {\r\n\t\t\t\t\t\tstr_colNames[++str_colNames_array] = labelNames[9];\r\n\t\t\t\t\t\tcellWidth[++cellWidth_array] = 15;\r\n\t\t\t\t\t\tcellAlign[++cellAlign_array] = 0;\r\n\t\t\t\t\t} else if (splitDash[1].equals(labelNames[10])) {\r\n\t\t\t\t\t\tstr_colNames[++str_colNames_array] = labelNames[10];\r\n\t\t\t\t\t\tcellWidth[++cellWidth_array] = 15;\r\n\t\t\t\t\t\tcellAlign[++cellAlign_array] = 0;\r\n\t\t\t\t\t} else if (splitDash[1].equals(labelNames[11])) {\r\n\t\t\t\t\t\tstr_colNames[++str_colNames_array] = labelNames[11];\r\n\t\t\t\t\t\tcellWidth[++cellWidth_array] = 15;\r\n\t\t\t\t\t\tcellAlign[++cellAlign_array] = 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tObject[][] objData1 = null;\r\n\t\t\tif (finalObj != null && finalObj.length > 0) {\r\n\t\t\t\tlogger.info(\"FINAL OBJECT LENGTH-----\" + finalObj.length);\r\n\t\t\t\tobjData1 = new Object[finalObj.length][count + 1];\r\n\t\t\t\t/*\r\n\t\t\t\t * if (bean.getCasteFlag().equals(\"true\")) { objData1 = new\r\n\t\t\t\t * Object[finalObj.length][count + 2]; }\r\n\t\t\t\t */\r\n\t\t\t\tlogger.info(\"objData1 length\" + objData1.length);\r\n\t\t\t\tfor (int i = 0; i < finalObj.length; ++i) {\r\n\t\t\t\t\tint int_count = 0;\r\n\t\t\t\t\tobjData1[i][0] = checkNull(String.valueOf(finalObj[i][0]));\r\n\t\t\t\t\t// Employee Id\r\n\t\t\t\t\tif (bean.getEmpId().equals(\"true\")) {\r\n\t\t\t\t\t\tobjData1[i][++int_count] = checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(finalObj[i][int_count]));\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//EMPLOYEE NAME\r\n\t\t\t\t\tif (bean.getEmpName().equals(\"true\")) {\r\n\t\t\t\t\t\tobjData1[i][++int_count] = checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(finalObj[i][int_count]));\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//APPLICATION DATE\r\n\t\t\t\t\tif (bean.getApplDate().equals(\"true\")) {\r\n\t\t\t\t\t\tobjData1[i][++int_count] = checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(finalObj[i][int_count]));\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//BRANCH\r\n\t\t\t\t\tif (bean.getBranch().equals(\"true\")) {\r\n\t\t\t\t\t\tobjData1[i][++int_count] = checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(finalObj[i][int_count]));\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//TRAVEL START DATE\r\n\t\t\t\t\tif (bean.getTravelStartDate().equals(\"true\")) {\r\n\t\t\t\t\t\tobjData1[i][++int_count] = checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(finalObj[i][int_count]));\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//GRADE\r\n\t\t\t\t\tif (bean.getGrade().equals(\"true\")) {\r\n\t\t\t\t\t\tobjData1[i][++int_count] = checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(finalObj[i][int_count]));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//TRAVEL END DATE\r\n\t\t\t\t\tif (bean.getTravelEndDate().equals(\"true\")) {\r\n\r\n\t\t\t\t\t\tobjData1[i][++int_count] = checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(finalObj[i][int_count]));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//TRAVEL TYPE\r\n\t\t\t\t\tif (bean.getTravelType().equals(\"true\")) {\r\n\r\n\t\t\t\t\t\tobjData1[i][++int_count] = checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(finalObj[i][int_count]));\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//TRAVEL PURPOSE\r\n\t\t\t\t\tif (bean.getTravelPurpose().equals(\"true\")) {\r\n\t\t\t\t\t\tobjData1[i][++int_count] = checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(finalObj[i][int_count]));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//ADVANCE AMOUNT\r\n\t\t\t\t\tif (bean.getTrvlAdvAmt().equals(\"true\")) {\r\n\t\t\t\t\t\tobjData1[i][++int_count] = checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(finalObj[i][int_count]));\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//APPROVER\r\n\r\n\t\t\t\t\tif (bean.getApprover().equals(\"true\")) {\r\n\t\t\t\t\t\tobjData1[i][++int_count] = checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(finalObj[i][int_count]));\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//INITIATOR NAME\r\n\t\t\t\t\tif (bean.getInitName().equals(\"true\")) {\r\n\t\t\t\t\t\tobjData1[i][++int_count] = checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(finalObj[i][int_count]));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (bean.getReqStatus().trim().equals(\"R\"))\r\n\t\t\t\t\tbean.setExportAll(\"on\");\r\n\t\t\t\tif (bean.getExportAll().equals(\"on\")) {\r\n\t\t\t\t\tif (bean.getReportType().equals(\"P\")) {\r\n\t\t\t\t\t\trg.setFName(reportName);\r\n\t\t\t\t\t\trg.addFormatedText(reportName, 6, 0, 1, 1);\r\n\t\t\t\t\t\trg.addText(\"\\n\", 0, 0, 0);\r\n\t\t\t\t\t\trg.tableBody(str_colNames, objData1, cellWidth,\r\n\t\t\t\t\t\t\t\tcellAlign);\r\n\t\t\t\t\t} else if (bean.getReportType().equals(\"X\")) {\r\n\t\t\t\t\t\trg.setFName(reportName + \".xls\");\r\n\t\t\t\t\t\trg.addText(reportName, 0, 1, 0);\r\n\t\t\t\t\t\trg.addText(\"\\n\", 0, 0, 0);\r\n\t\t\t\t\t\trg.xlsTableBody(str_colNames, objData1, cellWidth,\r\n\t\t\t\t\t\t\t\tcellAlign);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\trg.setFName(reportName + \".doc\");\r\n\t\t\t\t\t\trg.addText(reportName, 0, 1, 0);\r\n\t\t\t\t\t\trg.tableBody(str_colNames, objData1, cellWidth,\r\n\t\t\t\t\t\t\t\tcellAlign);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tString[] pageIndex = Utility.doPaging(bean.getMyPage(),\r\n\t\t\t\t\t\t\tobjData1.length, 20);\r\n\t\t\t\t\tif (pageIndex == null) {\r\n\t\t\t\t\t\tpageIndex[0] = \"0\";\r\n\t\t\t\t\t\tpageIndex[1] = \"20\";\r\n\t\t\t\t\t\tpageIndex[2] = \"1\";\r\n\t\t\t\t\t\tpageIndex[3] = \"1\";\r\n\t\t\t\t\t\tpageIndex[4] = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tint numOfRec = Integer.parseInt(pageIndex[1])\r\n\t\t\t\t\t\t\t- Integer.parseInt(pageIndex[0]);\r\n\t\t\t\t\tint columnLength = count + 1;\r\n\t\t\t\t\tObject[][] pageObj = new Object[numOfRec][columnLength];\r\n\t\t\t\t\tint z = 0;\r\n\t\t\t\t\tint srNo = 1;\r\n\t\t\t\t\tfor (int i = Integer.parseInt(pageIndex[0]); i < Integer\r\n\t\t\t\t\t\t\t.parseInt(pageIndex[1]); i++) {\r\n\t\t\t\t\t\tfor (int j = 0; j < columnLength; j++) {\r\n\t\t\t\t\t\t\t// logger.info(\"objData1[\"+i+\"][\"+j+\"] :\r\n\t\t\t\t\t\t\t// \"+objData1[i][j]);\r\n\t\t\t\t\t\t\tpageObj[z][j] = objData1[i][j];\r\n\t\t\t\t\t\t\t// pageObj[z][0] = String.valueOf(srNo);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tz++;\r\n\t\t\t\t\t\tsrNo++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (bean.getReportType().equals(\"P\")) {\r\n\t\t\t\t\t\trg.setFName(reportName);\r\n\t\t\t\t\t\trg.addFormatedText(reportName, 6, 0, 1, 1);\r\n\t\t\t\t\t\trg.addText(\"\\n\", 0, 0, 0);\r\n\t\t\t\t\t\trg.tableBody(str_colNames, pageObj, cellWidth,\r\n\t\t\t\t\t\t\t\tcellAlign);\r\n\t\t\t\t\t} else if (bean.getReportType().equals(\"X\")) {\r\n\t\t\t\t\t\trg.setFName(reportName + \".xls\");\r\n\t\t\t\t\t\trg.addText(reportName, 0, 1, 0);\r\n\t\t\t\t\t\trg.addText(\"\\n\", 0, 0, 0);\r\n\t\t\t\t\t\trg.xlsTableBody(str_colNames, pageObj, cellWidth,\r\n\t\t\t\t\t\t\t\tcellAlign);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\trg.setFName(reportName + \".doc\");\r\n\t\t\t\t\t\trg.addText(reportName, 0, 1, 0);\r\n\t\t\t\t\t\trg.tableBody(str_colNames, pageObj, cellWidth,\r\n\t\t\t\t\t\t\t\tcellAlign);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {\r\n\t\t\t\trg.addFormatedText(\"There is no data to display.\", 0, 1, 1, 0);\r\n\t\t\t}\r\n\t\t\trg.createReport(response);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "private static void printResponse(GetReportsResponse response) {\n\n for (Report report: response.getReports()) {\n ColumnHeader header = report.getColumnHeader();\n List<String> dimensionHeaders = header.getDimensions();\n List<MetricHeaderEntry> metricHeaders = header.getMetricHeader().getMetricHeaderEntries();\n List<ReportRow> rows = report.getData().getRows();\n\n if (rows == null) {\n System.out.println(\"No data found for \" + VIEW_ID);\n return;\n }\n\n for (ReportRow row: rows) {\n List<String> dimensions = row.getDimensions();\n List<DateRangeValues> metrics = row.getMetrics();\n for (int i = 0; i < dimensionHeaders.size() && i < dimensions.size(); i++) {\n System.out.println(dimensionHeaders.get(i) + \": \" + dimensions.get(i));\n }\n\n for (int j = 0; j < metrics.size(); j++) {\n System.out.print(\"Date Range (\" + j + \"): \");\n DateRangeValues values = metrics.get(j);\n for (int k = 0; k < values.getValues().size() && k < metricHeaders.size(); k++) {\n System.out.println(metricHeaders.get(k).getName() + \": \" + values.getValues().get(k));\n }\n }\n }\n }\n }", "public StubReport() {\n\t\t\thashMapDB = new HashMap<String, HashMap<Integer, String>>();\n\t\t\tparkReportData = new HashMap<Integer, String>();\n\n\t\t\tparkReportData = new HashMap<Integer, String>();\n\t\t\tparkReportData.put(1, \"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\");\n\t\t\tparkReportData.put(2,\n\t\t\t\t\t\"12 88 28 60 28 0 76 40 20 32 76 0 16 96 0 96 0 0 60 56 28 56 28 0 60 28 0 56 0 0 92 28 0 44 28 0\");\n\t\t\tparkReportData.put(3, \"1 2 3 4 5 6 1 23 2 8 9 2 3 2 4 3 2 2 1 1 1 5 32 6 12 7 23 8 12 5 32 6 12 5 23 7\");\n\t\t\thashMapDB.put(\"Haifa Park\", parkReportData);\n\t\t\tparkReportData = new HashMap<Integer, String>();\n\t\t\tparkReportData.put(4, \"1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1\");\n\t\t\tparkReportData.put(5, \"1 2 7 4 7 6 7 7 0 8 7 0 7 7 7 0 7 0 7 5 7 5 7 6 7 7 7 8 7 5 7 6 7 5 7 7\");\n\t\t\tparkReportData.put(6,\n\t\t\t\t\t\"11 22 33 44 55 66 17 23 5 8 4 2 3 2 54 34 2 32 1 61 1 75 32 46 12 67 23 82 12 56 32 36 12 85 232 7\");\n\t\t\thashMapDB.put(\"Tel-Aviv Park\", parkReportData);\n\n\t\t\tparkReportData = new HashMap<Integer, String>();\n\t\t\tparkReportData.put(7, \"1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1\");\n\t\t\tparkReportData.put(8, \"1 2 3 4 5 6 0 0 0 8 9 0 3 0 4 0 6 0 0 5 5 5 0 6 0 7 0 8 0 5 0 6 0 5 0 7\");\n\t\t\tparkReportData.put(9, \"1 2 3 4 5 6 1 23 2 8 9 2 3 2 4 3 2 2 1 1 1 5 32 6 12 7 23 8 12 5 32 6 12 5 23 7\");\n\t\t\thashMapDB.put(\"Safed Park\", parkReportData);\n\t\t}", "@Override\n public SearchResultInfo search(SearchRequestInfo searchRequest) {\n try\n {\n SearchResultInfo searchResult = searchDispatcher.search(searchRequest, ContextUtils.getContextInfo());\n List<SearchParamInfo> params = searchRequest.getParams();\n if (params != null && params.size() > 0) {\n SearchParamInfo firstParam = params.get(0);\n if (firstParam.getKey().equals(\"lu.queryParam.cluVersionIndId\")) {//FIXME can this special case be handled after this call?\n doIdTranslation(searchResult);\n }\n }\n return searchResult;\n } catch (Exception ex) {\n // Log exception \n ex.printStackTrace();\n throw new RuntimeException(ex);\n }\n }", "public void execFunzzySearchMapGeneFunc(){\n Map map = new HashMap();\n\n if(this.searchParam != null && this.searchParam.length()> 0 ){\n System.out.println(this.searchParam );\n map.put(\"searchParam\",this.searchParam);\n }\n\n if(this.searchSpecies!= null && this.searchSpecies.equals(\"all\") == false){\n map.put(\"species\",this.searchSpecies);\n }\n\n if(this.searchTrait != null && this.searchTrait.equals(\"null\")==false && this.searchTrait.length()>0){\n\n map.put(\"gwas\",\"gwas\") ;\n map.put(\"gwasend\",\"gwasend\") ;\n map.put(\"searchTrait\", this.searchTrait) ;\n }\n\n if(this.pvalue != null && this.pvalue.equals(\"null\")==false && this.pvalue.length()>0){\n\n map.put(\"gwas\",\"gwas\") ;\n map.put(\"gwasend\",\"gwasend\") ;\n map.put(\"psitu\", this.psitu);\n map.put(\"pval\", this.pvalue) ;\n }\n\n\n\n mapGeneBeanList = (List<MapGeneBean>) baseService.findResultList(\"cn.big.gvk.dm.MapGene.selectMapGeneCount\",map);\n if(mapGeneBeanList != null ){\n for(MapGeneBean mgb: mapGeneBeanList){\n //get count\n\n Map t = new HashMap();\n t.put(\"gId\",mgb.getGid()) ;\n t.put(\"count\",\"count\");\n\n //trait count\n GwasAssociationView gwas = (GwasAssociationView) baseService.findObjectByObject(\"cn.big.gvk.dm.GwasAssociation.selectGwasViewByGeneInfo\",t);\n if(gwas != null){\n mgb.setTraitCount(gwas.getTraitCount());\n }\n\n //study count\n StudyBean study = (StudyBean) baseService.findObjectByObject(\"cn.big.gvk.dm.study.selectStudyByMapGeneId\",t);\n if(study != null ){\n mgb.setStudyCount(study.getStudyCount());\n }\n\n //publication count\n PublicationBean publication = (PublicationBean)baseService.findObjectByObject(\"cn.big.gvk.dm.publication.selectPubByGeneId\",t);\n if (publication != null ){\n mgb.setPublicationCount(publication.getPublicationCount());\n }\n }\n }\n\n StringBuffer sb = new StringBuffer() ;\n\n if(mapGeneBeanList != null && mapGeneBeanList.size()>0){\n for(MapGeneBean mapgene: mapGeneBeanList){\n sb.append(mapgene.getMapGeneId()).append(\"\\t\").append(mapgene.getMapGeneChrom()).append(\":\")\n .append(mapgene.getMapGeneStart()).append(\"-\").append(mapgene.getMapGeneEnd()).append(\"\\t\").append(mapgene.getTraitCount()).append(\"\\t\")\n .append(mapgene.getStudyCount()).append(\"\\n\");\n }\n }\n\n if(format == 1 ){ //export txt\n this.response.reset();\n this.response.setHeader(\"Content-Disposition\",\n \"attachment;filename=export.txt\");\n this.response.setContentType(\"application/ms-txt\");\n try {\n PrintWriter pr = this.response.getWriter();\n pr.print(sb.toString());\n pr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }", "public abstract void mergeToGlobalStats(SolrQueryRequest req,\n List<ShardResponse> responses);", "public void getTransactionReport(HashMap<String, String> params) {\n\t\tQUERY_BY_SETTLEMENT = \"0\";\n\t\tREPORT_START = params.get(\"reportStart\");\n\t\tREPORT_END = params.get(\"reportEnd\");\n\t\tQUERY_BY_HIERARCHY = params.get(\"subaccountsSearched\");\n\t\tDO_NOT_ESCAPE = params.get(\"doNotEscape\");\n\t\tEXCLUDE_ERRORS = params.get(\"excludeErrors\");\n\t\tAPI = \"bpdailyreport2\";\n\t}", "private void doSearchError(Map<String, Object> map, Configuration config, HttpServletRequest request, HttpServletResponse response) {\n writeTemplate(TEMPLATE_DEFAULT, map, config, request, response);\n }", "public static void generateReport() {\n PrintImpl printer = new PrintImpl(realtorLogImpl, propertyLogImpl);\n printer.generateReport(REQUESTS_FILE);\n }", "@Override\r\n\tpublic List<Client> search(HttpServletRequest request) throws ParseException {\n\t\tClientSearchBean searchBean = new ClientSearchBean();\r\n\t\tsearchBean.setNameLike(getStringFilter(\"name\", request));\r\n\t\tsearchBean.setGender(getStringFilter(GENDER, request));\r\n\t\tDateTime[] birthdate = getDateRangeFilter(BIRTH_DATE, request);//TODO add ranges like fhir do http://hl7.org/fhir/search.html\r\n\t\tDateTime[] deathdate = getDateRangeFilter(DEATH_DATE, request);\r\n\t\tif (birthdate != null) {\r\n\t\t\tsearchBean.setBirthdateFrom(birthdate[0]);\r\n\t\t\tsearchBean.setBirthdateTo(birthdate[1]);\r\n\t\t}\r\n\t\tif (deathdate != null) {\r\n\t\t\tsearchBean.setDeathdateFrom(deathdate[0]);\r\n\t\t\tsearchBean.setDeathdateTo(deathdate[1]);\r\n\t\t}\r\n\t\t\r\n\t\tString clientId = getStringFilter(\"identifier\", request);\r\n\t\tif (!StringUtils.isEmptyOrWhitespaceOnly(clientId)) {\r\n\t\t\tClient c = clientService.find(clientId);\r\n\t\t\tList<Client> clients = new ArrayList<Client>();\r\n\t\t\tclients.add(c);\r\n\t\t\treturn clients;\r\n\t\t}\r\n\t\t\r\n\t\tAddressSearchBean addressSearchBean = new AddressSearchBean();\r\n\t\taddressSearchBean.setAddressType(getStringFilter(ADDRESS_TYPE, request));\r\n\t\taddressSearchBean.setCountry(getStringFilter(COUNTRY, request));\r\n\t\taddressSearchBean.setStateProvince(getStringFilter(STATE_PROVINCE, request));\r\n\t\taddressSearchBean.setCityVillage(getStringFilter(CITY_VILLAGE, request));\r\n\t\taddressSearchBean.setCountyDistrict(getStringFilter(COUNTY_DISTRICT, request));\r\n\t\taddressSearchBean.setSubDistrict(getStringFilter(SUB_DISTRICT, request));\r\n\t\taddressSearchBean.setTown(getStringFilter(TOWN, request));\r\n\t\taddressSearchBean.setSubTown(getStringFilter(SUB_TOWN, request));\r\n\t\tDateTime[] lastEdit = getDateRangeFilter(LAST_UPDATE, request);//TODO client by provider id\r\n\t\t//TODO lookinto Swagger https://slack-files.com/files-pri-safe/T0EPSEJE9-F0TBD0N77/integratingswagger.pdf?c=1458211183-179d2bfd2e974585c5038fba15a86bf83097810a\r\n\t\tString attributes = getStringFilter(\"attribute\", request);\r\n\t\tsearchBean.setAttributeType(StringUtils.isEmptyOrWhitespaceOnly(attributes) ? null : attributes.split(\":\", -1)[0]);\r\n\t\tsearchBean.setAttributeValue(StringUtils.isEmptyOrWhitespaceOnly(attributes) ? null : attributes.split(\":\", -1)[1]);\r\n\t\t\r\n\t\treturn clientService.findByCriteria(searchBean, addressSearchBean, lastEdit == null ? null : lastEdit[0],\r\n\t\t lastEdit == null ? null : lastEdit[1]);\r\n\t}", "@RequestMapping(value=\"/performItemSearch.htm\")\n\t@ResponseBody\n\tpublic String PerformItemSearch(HttpServletRequest request,HttpServletResponse response) throws Exception{\n\t\tlog.info(\"inside PerformItemSearch()\");\n\t\tJSONObject obj=new JSONObject();\n\t\tString error=null;\n\t\ttry{\n\t\t\tJSONObject json=JsonParser.getJson(request, response);\n\t\t\tfinal String keyword=json.getString(\"keyword\");\n\t\t\t//String sortBy=json.getString(\"sortBy\");\n\t\t\t//String direction=json.getString(\"direction\");\n\t\t\tArrayList<ItemsDto> itemsDto=this.itemService.getSearchItems(keyword, null, null, null, null);\n\t\t\tSystem.out.println(itemsDto);\n\t\t\tArrayList<JSONObject> jsonList=new ArrayList<JSONObject>();\n\t\t\tfor(ItemsDto item:itemsDto){\n\t\t\t\tJSONObject itemJSON=new JSONObject();\n\t\t\t\tSystem.out.println(item.getItemName());\n\t\t\t\titemJSON.accumulate(\"itemname\", item.getItemName());\n\t\t\t\t\n\t\t\t\tjsonList.add(itemJSON);\n\t\t\t\t\n\t\t\t}\n\t\t\tJSONArray array=new JSONArray(jsonList);\n\t\t\tJSONObject output=new JSONObject();\n\t\t\toutput.accumulate(\"itemslist\", jsonList);\n\t\t\treturn output.toString();\n\t\t}\n\t\tcatch(ItemNotFoundException e){\n\t\t\t\n\t\t\tString message=\"Item Not Found\";\n\t\t\tlog.error(message+\"\"+e.toString());\n\t\t\tobj.accumulate(\"status\", message);\n\t\t\treturn obj.toString();\n\t\t}\n\t\tcatch(Exception e){\n\t\t\t\n\t\t\tString message=\"Some Error Occurred While Searching\";\n\t\t\tlog.error(message+\"\"+e.toString());\n\t\t\tobj.accumulate(\"status\", message);\n\t\t\treturn obj.toString();\n\t\t}\n\t\t\n\t}", "@Test\n public void test007() {\n List<HashMap<String, ?>> values = response.extract().path(\"data.findAll{it.name=='Fargo'}\");\n\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The values for store name is Fargo:\" + values);\n System.out.println(\"------------------End of Test---------------------------\");\n }", "public static Map<String, Object> logResponseHeadersToMap(HttpServletResponse response) {\n // Locate\n Map<String, String> retLocate = new LinkedHashMap<>();\n retLocate.put(\"Country\", response.getLocale().getCountry());\n retLocate.put(\"DisplayCountry()\", response.getLocale().getDisplayCountry());\n retLocate.put(\"Language\", response.getLocale().getLanguage());\n retLocate.put(\"DisplayLanguage\", response.getLocale().getDisplayLanguage());\n retLocate.put(\"DisplayName\", response.getLocale().getDisplayName());\n retLocate.put(\"DisplayScript\", response.getLocale().getDisplayScript());\n retLocate.put(\"DisplayVariant\", response.getLocale().getDisplayVariant());\n retLocate.put(\"ISO3Country\", response.getLocale().getISO3Country());\n retLocate.put(\"ISO3Language\", response.getLocale().getISO3Language());\n retLocate.put(\"Variant\", response.getLocale().getVariant());\n retLocate.put(\"LanguageTag\", response.getLocale().toLanguageTag());\n // Others\n Map<String, Object> retOthers = new LinkedHashMap<>();\n retOthers.put(\"Status\", String.valueOf(response.getStatus()));\n retOthers.put(\"CharacterEncoding\", response.getCharacterEncoding());\n retOthers.put(\"ContentType\", response.getContentType());\n retOthers.put(\"BufferSize\", String.valueOf(response.getBufferSize()));\n retOthers.put(\"isCommitted\", String.valueOf(response.isCommitted()));\n retOthers.put(\"TrailerFields\", response.getTrailerFields());\n // Headers\n Map<String, String> retHeaders = new LinkedHashMap<>();\n Collection<String> headerNames = response.getHeaderNames();\n\n for (String key : headerNames) {\n retHeaders.put(key, response.getHeader(key));\n }\n\n //Return Map\n Map<String, Object> retVal = new LinkedHashMap<>();\n retVal.put(\"Headers\", retHeaders);\n retVal.put(\"Locate\", retLocate);\n retVal.put(\"Others\", retOthers);\n\n return retVal;\n }", "public SearchResponseBuilder<T, ST, P> getCopy() {\n SearchResponseBuilder<T, ST, P> searchResponseBuilder =\n new SearchResponseBuilder<T, ST, P>(responseClass, annotatedClass, solrField2ParamEnumMap,\n solrField2javaPropertiesMap);\n searchResponseBuilder.hlFieldPropertyPropertiesMap = hlFieldPropertyPropertiesMap;\n return searchResponseBuilder;\n }", "@RequestMapping(value=\"/rs/search\", method = {RequestMethod.GET,RequestMethod.POST})\r\n\tpublic RestSearchResultModel search(\r\n\t\t\t@RequestParam(value = \"logPathPatterns\", required=false) String logPathPatterns,\r\n\t\t\t@RequestParam(value = \"logFileNamePatterns\", required=false) String logFileNamePtterns,\r\n\t\t\t@RequestParam(value = \"search\", required=true) String search,\r\n\t\t\t@RequestParam(value = \"searchOnLabels\", required=true) String searchOnLabels,\r\n\t\t\t@RequestParam(value = \"fromDateTime\", required=false) String fromDateTime,\r\n\t\t\t@RequestParam(value = \"toDateTime\", required=false) String toDateTime,\r\n\t\t\t@RequestParam(value = \"viewTz\", required=true) String viewTz) {\n\t\tRestSearchInput input = new RestSearchInput();\r\n\t\tinput.setLogPathPatterns(logPathPatterns);\r\n\t\tinput.setLogFileNamePtterns(logFileNamePtterns);\r\n\t\tinput.setSearch(search);\r\n\t\tinput.setSearchOnLabels(searchOnLabels);\r\n\t\tinput.setFromDateTime(fromDateTime);\r\n\t\tinput.setToDateTime(toDateTime);\r\n\t\tinput.setViewTz(viewTz);\r\n\t\treturn search(input);\r\n\t}", "@RequestMapping(value = \"/searchList\", method = RequestMethod.POST)\n public RetResult<Map<String,Object>> searchList(@RequestBody Map<String,String> map) throws IOException, JSONException {\n String type = String.valueOf(map.get(\"type\"));\n String value = String.valueOf(map.get(\"value\"));\n Boolean ifPrepara = Boolean.valueOf(map.get(\"ifPrepara\"));\n String preparaString = String.valueOf(map.get(\"preparaString\"));\n int page = Integer.valueOf(map.get(\"page\"));\n\n Map<String,Object> affiliationsEsBeans = affiliationSearchList(type, value, ifPrepara, preparaString, page);\n return RetResponse.makeOKRsp(affiliationsEsBeans);\n }", "private static void invokeGetReportList(MarketplaceWebService service, GetReportListRequest request)\n {\n try\n {\n GetReportListResponse response = service.getReportList(request);\n System.out.println(\"3454823177017127\");\n }\n catch (MarketplaceWebServiceException ex)\n {\n System.out.println(\"Caught Exception: \" + ex.getMessage());\n System.out.println(\"Response Status Code: \" + ex.getStatusCode());\n System.out.println(\"Error Code: \" + ex.getErrorCode());\n System.out.println(\"Error Type: \" + ex.getErrorType());\n System.out.println(\"Request ID: \" + ex.getRequestId());\n System.out.print(\"XML: \" + ex.getXML());\n System.out.println(\"ResponseHeaderMetadata: \" + ex.getResponseHeaderMetadata());\n }\n }", "public static void runReport(HttpServletRequest request,HttpServletResponse response)throws IOException{\n\n\t\tAsePool connectionPool = null;\n\n\t\tConnection conn = null;\n\n\t\tString reportUser = null;\n\n\t\tString sql = null;\n\n\t\tboolean debug = false;\n\n\t\tAseUtil aseUtil = null;\n\n\t\tWebSite website = null;\n\n\t\ttry{\n\t\t\taseUtil = new AseUtil();\n\n\t\t\tHttpSession session = request.getSession(true);\n\n\t\t\treportUser = Encrypter.decrypter((String)session.getAttribute(\"aseUserName\"));\n\n\t\t\tint i = 0;\n\t\t\tint j = 0;\n\n\t\t\tString junk = \"\";\n\n\t\t\t// step 0\n\t\t\tconnectionPool = AsePool.getInstance();\n\t\t\tconn = connectionPool.getConnection();\n\n\t\t\twebsite = new WebSite();\n\t\t\tString campus = website.getRequestParameter(request,\"c\",\"\");\t\t// parm1\n\t\t\tString alpha = website.getRequestParameter(request,\"a\",\"\");\t\t\t// parm2\n\t\t\tString num = website.getRequestParameter(request,\"n\",\"\");\t\t\t// parm3\n\t\t\tString type = website.getRequestParameter(request,\"t\",\"\");\t\t\t// parm4\n\t\t\tString user = website.getRequestParameter(request,\"u\",\"\");\t\t\t// parm5\n\t\t\tString historyid = website.getRequestParameter(request,\"h\",\"\");\t// parm6\n\t\t\tint route = website.getRequestParameter(request,\"r\",0);\t\t\t\t// parm7\n\t\t\tString p8 = website.getRequestParameter(request,\"p8\",\"\");\t\t\t// any value\n\t\t\tString p9 = website.getRequestParameter(request,\"p9\",\"\");\t\t\t// any value\n\n\t\t\tif (campus == null || campus.length() == 0)\n\t\t\t\tcampus = Encrypter.decrypter((String)session.getAttribute(\"aseCampus\"));\n\n\t\t\tif (user == null || user.length() == 0)\n\t\t\t\tuser = Encrypter.decrypter((String)session.getAttribute(\"aseUserName\"));\n\n\t\t\tString campusName = CampusDB.getCampusNameOkina(conn,campus);\n\n\t\t\tString reportFolder = aseUtil.getReportFolder();\n\t\t\tString outputFolder = aseUtil.getReportOutputFolder(campus +\"/\");\n\n\t\t\tString logoFile = aseUtil.getCampusLogo(campus);\n\t\t\tString reportFileName = outputFolder + user + \".pdf\";\n\n\t\t\tString reportType = \"generic\";\n\t\t\tString reportTitle = \"\";\n\t\t\tString colsWidth = \"\";\n\t\t\tString headerColumns = \"\";\n\t\t\tString dataColumns = \"\";\n\n\t\t\tString where = \"\";\n\t\t\tString order = \"\";\n\t\t\tString grouping = null;\n\t\t\tString savedGrouping = null;\n\t\t\tString groupedValue = null;\n\t\t\tString footer = null;\n\t\t\tString reportSubTitle = null;\n\n\t\t\tString sWhere = \"\";\n\n\t\t\tString parm1 = \"\";\t\t// campus or FORUM src\n\t\t\tString parm2 = \"\";\t\t// alpha or FORUM status\n\t\t\tString parm3 = \"\";\t\t// num\n\t\t\tString parm4 = \"\";\t\t// type\n\t\t\tString parm5 = \"\";\t\t// user\n\t\t\tString parm6 = \"\";\t\t//\thistoryid\n\t\t\tString parm7 = \"\";\t\t//\troute\n\t\t\tString parm8 = \"\";\t\t//\n\t\t\tString parm9 = \"\";\t\t//\n\n\t\t\tint psIndex = 0;\n\n\t\t\tString aseReport = (String)session.getAttribute(\"aseReport\");\n\n\t\t\tif (aseReport != null && aseReport.length() > 0){\n\n\t\t\t\tResourceBundle reportBundle = ResourceBundle.getBundle(\"ase.central.reports.\" + aseReport);\n\t\t\t\tif (reportBundle != null){\n\n\t\t\t\t\tBundleDB bundle = new BundleDB();\n\n\t\t\t\t\treportType = bundle.getBundle(reportBundle,\"reportType\",\"\");\n\t\t\t\t\treportTitle = bundle.getBundle(reportBundle,\"reportTitle\",\"\");\n\t\t\t\t\tcolsWidth = bundle.getBundle(reportBundle,\"colsWidth\",\"\");\n\t\t\t\t\theaderColumns = bundle.getBundle(reportBundle,\"headerColumns\",\"\");\n\t\t\t\t\tdataColumns = bundle.getBundle(reportBundle,\"dataColumns\",\"\");\n\t\t\t\t\tsql = bundle.getBundle(reportBundle,\"sql\",\"\");\n\t\t\t\t\tgrouping = bundle.getBundle(reportBundle,\"grouping\",\"\");\n\t\t\t\t\tfooter = bundle.getBundle(reportBundle,\"footer\",\"\");\n\t\t\t\t\treportSubTitle = bundle.getBundle(reportBundle,\"reportSubTitle\",\"\");\n\n\t\t\t\t\twhere = bundle.getBundle(reportBundle,\"where\",\"\");\n\t\t\t\t\tif (where != null && where.length() > 0){\n\t\t\t\t\t\twhere = where.replace(\"_EQUALS_\",\"=\");\n\t\t\t\t\t}\n\n\t\t\t\t\torder = bundle.getBundle(reportBundle,\"order\",\"\");\n\t\t\t\t\tparm1 = bundle.getBundle(reportBundle,\"parm1\",\"\");\t// campus, src\n\t\t\t\t\tparm2 = bundle.getBundle(reportBundle,\"parm2\",\"\");\t// alpha\n\t\t\t\t\tparm3 = bundle.getBundle(reportBundle,\"parm3\",\"\");\t// num\n\t\t\t\t\tparm4 = bundle.getBundle(reportBundle,\"parm4\",\"\");\t// type\n\t\t\t\t\tparm5 = bundle.getBundle(reportBundle,\"parm5\",\"\");\t// userid\n\t\t\t\t\tparm6 = bundle.getBundle(reportBundle,\"parm6\",\"\");\t// history\n\t\t\t\t\tparm7 = bundle.getBundle(reportBundle,\"parm7\",\"\");\t// route\n\t\t\t\t\tparm8 = bundle.getBundle(reportBundle,\"parm8\",\"\");\n\t\t\t\t\tparm9 = bundle.getBundle(reportBundle,\"parm9\",\"\"); // any single value\n\n\t\t\t\t\tbundle = null;\n\n\t\t\t\t} // reportBundle\n\n\t\t\t\tif (reportTitle != null && colsWidth != null && headerColumns != null && dataColumns != null && sql != null){\n\t\t\t\t\tPdfPTable table = null;\n\t\t\t\t\tPhrase phrase = null;\n\t\t\t\t\tPdfPCell cell = null;\n\n\t\t\t\t\tBaseColor campusColor = null;\n\n\t\t\t\t\tString[] aColsWidth = colsWidth.split(\",\");\n\t\t\t\t\tString[] aDataColumns = dataColumns.split(\",\");\n\n\t\t\t\t\t// define colum width\n\t\t\t\t\tint columns = aDataColumns.length;\n\n\t\t\t\t\tfloat[] fColsWidth = new float[aDataColumns.length];\n\n\t\t\t\t\tfor(i=0; i<columns; i++){\n\t\t\t\t\t\tfColsWidth[i] = Float.valueOf(aColsWidth[i]).floatValue();\n\t\t\t\t\t}\n\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\t// define campus color; for grouping, use a different color\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\tif (reportType.equals(Constant.FORUM)){\n\t\t\t\t\t\tcampusColor = (BaseColor)campusColorMap.get(Constant.CAMPUS_TTG);\n\t\t\t\t\t}\n\t\t\t\t\telse if (reportType.equals(\"ApprovalRouting\")){\n\t\t\t\t\t\tcampusColor = (BaseColor)campusColorMap.get(Constant.CAMPUS_TTG);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tif (campus != null && campus.length() > 0 && campusColorMap.containsKey(campus))\n\t\t\t\t\t\t\tcampusColor = (BaseColor)campusColorMap.get(campus);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (campusColor == null)\n\t\t\t\t\t\tcampusColor = BaseColor.LIGHT_GRAY;\n\n\t\t\t\t\t// step 1 of 5\n\t\t\t\t\tDocument document = new Document(PageSize.LETTER.rotate());\n\n\t\t\t\t\t// step 2 of 5\n\t\t\t\t\tPdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(reportFileName));\n\t\t\t\t\tTableHeader event = new TableHeader();\n\t\t\t\t\twriter.setPageEvent(event);\n\t\t\t\t\twriter.setPageEvent(new Watermark(\"Curriculum Central\"));\n\n\t\t\t\t\tint leading = 18;\n\n\t\t\t\t\t// step 3 of 5\n\t\t\t\t\tdocument.open();\n\t\t\t\t\tdocument.newPage();\n\n\t\t\t\t\t// create table with user column count\n\t\t\t\t\ttable = new PdfPTable(fColsWidth);\n\t\t\t\t\ttable.setWidthPercentage(100f);\n\t\t\t\t\ttable.setHorizontalAlignment(Element.ALIGN_LEFT);\n\t\t\t\t\ttable.getDefaultCell().setBorder(PdfPCell.NO_BORDER);\n\t\t\t\t\ttable.getDefaultCell().setUseAscender(true);\n\t\t\t\t\ttable.getDefaultCell().setUseDescender(true);\n\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\t//formulate sql statement\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\tif (reportType.equals(Constant.FORUM)){\n\t\t\t\t\t\tparm1 = website.getRequestParameter(request,\"src\",\"\");\n\t\t\t\t\t\tif (parm1 != null && parm1.length() > 0){\n\t\t\t\t\t\t\tsWhere = \" src=? \";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tparm2 = website.getRequestParameter(request,\"status\",\"\");\n\t\t\t\t\t\tif (parm2 != null && parm2.length() > 0){\n\t\t\t\t\t\t\tif (sWhere.length() > 0)\n\t\t\t\t\t\t\t\tsWhere += \" AND \";\n\n\t\t\t\t\t\t\tsWhere += \" status=? \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (reportType.equals(\"ApprovalRouting\")){\n\t\t\t\t\t\tif (parm1 != null && parm1.length() > 0 && campus != null && campus.length() > 0){\n\t\t\t\t\t\t\tif (sWhere.length() > 0)\n\t\t\t\t\t\t\t\tsWhere += \" AND \";\n\n\t\t\t\t\t\t\tsWhere += \" c.campus=? \";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (parm7 != null && parm7.length() > 0 && (route > 0 || route == -999)){\n\t\t\t\t\t\t\tif (sWhere.length() > 0)\n\t\t\t\t\t\t\t\tsWhere += \" AND \";\n\n\t\t\t\t\t\t\tif (route == -999)\n\t\t\t\t\t\t\t\tsWhere += \" c.route>? \";\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tsWhere += \" c.route=? \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (reportType.equals(\"SystemSettings\")){\n\t\t\t\t\t\tif (parm1 != null && parm1.length() > 0 && campus != null && campus.length() > 0){\n\t\t\t\t\t\t\tif (sWhere.length() > 0)\n\t\t\t\t\t\t\t\tsWhere += \" AND \";\n\n\t\t\t\t\t\t\tsWhere += \" campus=? \";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (parm9 != null && parm9.length() > 0){\n\t\t\t\t\t\t\tif (sWhere.length() > 0)\n\t\t\t\t\t\t\t\tsWhere += \" AND \";\n\n\t\t\t\t\t\t\tsWhere += \" \" + parm9 + \"=? \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tif (parm1 != null && parm1.length() > 0 && campus != null && campus.length() > 0){\n\t\t\t\t\t\t\tsWhere = \" campus=? \";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (parm2 != null && parm2.length() > 0 && alpha != null && alpha.length() > 0){\n\t\t\t\t\t\t\tif (sWhere.length() > 0)\n\t\t\t\t\t\t\t\tsWhere += \" AND \";\n\n\t\t\t\t\t\t\tsWhere += \" alpha=? \";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (parm3 != null && parm3.length() > 0 && num != null && num.length() > 0){\n\t\t\t\t\t\t\tif (sWhere.length() > 0)\n\t\t\t\t\t\t\t\tsWhere += \" AND \";\n\n\t\t\t\t\t\t\tsWhere += \" num=? \";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (parm4 != null && parm4.length() > 0 && type != null && type.length() > 0){\n\t\t\t\t\t\t\tif (sWhere.length() > 0)\n\t\t\t\t\t\t\t\tsWhere += \" AND \";\n\n\t\t\t\t\t\t\tsWhere += \" type=? \";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (parm5 != null && parm5.length() > 0 && user != null && user.length() > 0){\n\t\t\t\t\t\t\tif (sWhere.length() > 0)\n\t\t\t\t\t\t\t\tsWhere += \" AND \";\n\n\t\t\t\t\t\t\tsWhere += \" userid=? \";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (parm6 != null && parm6.length() > 0 && historyid != null && historyid.length() > 0){\n\t\t\t\t\t\t\tif (sWhere.length() > 0)\n\t\t\t\t\t\t\t\tsWhere += \" AND \";\n\n\t\t\t\t\t\t\tsWhere += \" historyid=? \";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (parm7 != null && parm7.length() > 0 && route > 0){\n\t\t\t\t\t\t\tif (sWhere.length() > 0)\n\t\t\t\t\t\t\t\tsWhere += \" AND \";\n\n\t\t\t\t\t\t\tsWhere += \" route=? \";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} // reportType\n\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\t// final formulation of SQL\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\tif (where.length()==0 && sWhere.length()>0)\n\t\t\t\t\t\twhere = \" WHERE \" + sWhere;\n\t\t\t\t\telse{\n\t\t\t\t\t\twhere = \" WHERE \" + where;\n\n\t\t\t\t\t\tif (sWhere.length()>0)\n\t\t\t\t\t\t\twhere += \" AND \" + sWhere;\n\t\t\t\t\t}\n\n\t\t\t\t\t// prevent empty where\n\t\t\t\t\tif (where.trim().toUpperCase().equals(\"WHERE\"))\n\t\t\t\t\t\twhere = \"\";\n\n\t\t\t\t\tif (order.length() > 0)\n\t\t\t\t\t\torder = \" ORDER BY \" + order;\n\n\t\t\t\t\t// prevent empty order\n\t\t\t\t\tif (order.trim().toUpperCase().equals(\"ORDER BY\"))\n\t\t\t\t\t\torder = \"\";\n\n\t\t\t\t\tsql = sql + where + order;\n\n\t\t\t\t\tdebug = false;\n\n\t\t\t\t\tif (debug){\n\t\t\t\t\t\tlogger.info(\"campus: \" + campus);\n\t\t\t\t\t\tlogger.info(\"alpha: \" + alpha);\n\t\t\t\t\t\tlogger.info(\"num: \" + num);\n\t\t\t\t\t\tlogger.info(\"type: \" + type);\n\t\t\t\t\t\tlogger.info(\"user: \" + user);\n\t\t\t\t\t\tlogger.info(\"historyid: \" + historyid);\n\t\t\t\t\t\tlogger.info(\"route: \" + route);\n\t\t\t\t\t\tlogger.info(\"p8: \" + p8);\n\t\t\t\t\t\tlogger.info(\"p9: \" + p9);\n\t\t\t\t\t\tlogger.info(\"reportFolder: \" + reportFolder);\n\t\t\t\t\t\tlogger.info(\"logoFile: \" + logoFile);\n\t\t\t\t\t\tlogger.info(\"reportFileName: \" + reportFileName);\n\t\t\t\t\t\tlogger.info(\"reportType: \" + reportType);\n\t\t\t\t\t\tlogger.info(\"reportTitle: \" + reportTitle);\n\t\t\t\t\t\tlogger.info(\"colsWidth: \" + reportTitle);\n\t\t\t\t\t\tlogger.info(\"headerColumns: \" + headerColumns);\n\t\t\t\t\t\tlogger.info(\"dataColumns: \" + dataColumns);\n\t\t\t\t\t\tlogger.info(\"grouping: \" + grouping);\n\t\t\t\t\t\tlogger.info(\"footer: \" + footer);\n\t\t\t\t\t\tlogger.info(\"reportSubTitle: \" + reportSubTitle);\n\t\t\t\t\t\tlogger.info(\"order: \" + order);\n\t\t\t\t\t\tlogger.info(\"parm1: \" + parm1);\n\t\t\t\t\t\tlogger.info(\"parm2: \" + parm2);\n\t\t\t\t\t\tlogger.info(\"parm3: \" + parm3);\n\t\t\t\t\t\tlogger.info(\"parm4: \" + parm4);\n\t\t\t\t\t\tlogger.info(\"parm5: \" + parm5);\n\t\t\t\t\t\tlogger.info(\"parm6: \" + parm6);\n\t\t\t\t\t\tlogger.info(\"parm7: \" + parm7);\n\t\t\t\t\t\tlogger.info(\"parm8: \" + parm8);\n\t\t\t\t\t\tlogger.info(\"parm9: \" + parm9);\n\t\t\t\t\t\tlogger.info(\"aseReport: \" + aseReport);\n\t\t\t\t\t\tlogger.info(\"sql: \" + sql);\n\t\t\t\t\t}\n\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\t// Add the first header row (step 4 of 5)\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\tFont f = new Font();\n\n\t\t\t\t\tdrawTitleRow(table,reportTitle,campusColor,f,BaseColor.WHITE,columns,Element.ALIGN_CENTER);\n\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\t// customized subtitles\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\tif (reportType.equals(Constant.FORUM)){\n\t\t\t\t\t\treportSubTitle = parm1 + \" Report\";\n\t\t\t\t\t}\n\t\t\t\t\telse if (reportType.equals(\"ApprovalRouting\")){\n\t\t\t\t\t\tif (route == -999)\n\t\t\t\t\t\t\treportSubTitle = \"Approval Routing\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\treportSubTitle = \"Approval Routing - \" + ApproverDB.getRoutingFullNameByID(conn,campus,route);\n\t\t\t\t\t}\n\t\t\t\t\telse if (reportType.equals(\"SystemSettings\")){\n\t\t\t\t\t\treportSubTitle = \"System Settings - \" + p9;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (reportSubTitle != null && reportSubTitle.length() > 0){\n\t\t\t\t\t\tdrawTitleRow(table,reportSubTitle,campusColor,f,BaseColor.WHITE,columns,Element.ALIGN_CENTER);\n\t\t\t\t\t}\n\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\t// table header\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\tdrawHeaderRow(table,campusColor,columns,headerColumns,f);\n\n\t\t\t\t\ttable.getDefaultCell().setBackgroundColor(null);\n\n\t\t\t\t\ttable.setHeaderRows(2);\n\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\t// get the data\n\t\t\t\t\t//---------------------------------------------------\n\t\t\t\t\tPreparedStatement ps = conn.prepareStatement(sql);\n\n\t\t\t\t\tif (reportType.equals(Constant.FORUM)){\n\t\t\t\t\t\tif (parm1 != null && parm1.length() > 0)\n\t\t\t\t\t\t\tps.setString(1,parm1);\n\n\t\t\t\t\t\tif (parm2 != null && parm2.length() > 0)\n\t\t\t\t\t\t\tps.setString(2,parm2);\n\t\t\t\t\t}\n\t\t\t\t\telse if (reportType.equals(\"ApprovalRouting\")){\n\t\t\t\t\t\tif (parm1 != null && parm1.length() > 0 && campus != null && campus.length() > 0)\n\t\t\t\t\t\t\tps.setString(++psIndex,campus);\n\n\t\t\t\t\t\tif (parm7 != null && parm7.length() > 0 && (route > 0 || route == -999)){\n\t\t\t\t\t\t\tif (route == -999)\n\t\t\t\t\t\t\t\tps.setInt(++psIndex,0);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tps.setInt(++psIndex,route);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (reportType.equals(\"SystemSettings\")){\n\t\t\t\t\t\tif (parm1 != null && parm1.length() > 0 && campus != null && campus.length() > 0)\n\t\t\t\t\t\t\tps.setString(++psIndex,campus);\n\n\t\t\t\t\t\tif (p9 != null && p9.length() > 0)\n\t\t\t\t\t\t\tps.setString(++psIndex,p9);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tif (parm1 != null && parm1.length() > 0 && campus != null && campus.length() > 0)\n\t\t\t\t\t\t\tps.setString(++psIndex,campus);\n\n\t\t\t\t\t\tif (parm2 != null && parm2.length() > 0 && alpha != null && alpha.length() > 0)\n\t\t\t\t\t\t\tps.setString(++psIndex,alpha);\n\n\t\t\t\t\t\tif (parm3 != null && parm3.length() > 0 && num != null && num.length() > 0)\n\t\t\t\t\t\t\tps.setString(++psIndex,num);\n\n\t\t\t\t\t\tif (parm4 != null && parm4.length() > 0 && type != null && type.length() > 0)\n\t\t\t\t\t\t\tps.setString(++psIndex,type);\n\n\t\t\t\t\t\tif (parm5 != null && parm5.length() > 0 && user != null && user.length() > 0)\n\t\t\t\t\t\t\tps.setString(++psIndex,user);\n\n\t\t\t\t\t\tif (parm6 != null && parm6.length() > 0 && historyid != null && historyid.length() > 0)\n\t\t\t\t\t\t\tps.setString(++psIndex,historyid);\n\n\t\t\t\t\t\tif (parm7 != null && parm7.length() > 0 && route > 0)\n\t\t\t\t\t\t\tps.setInt(++psIndex,route);\n\n\t\t\t\t\t} // reportType\n\n\t\t\t\t\tResultSet rs = ps.executeQuery();\n\t\t\t\t\twhile(rs.next()){\n\n\t\t\t\t\t\tevent.setHeader(reportTitle,campusName,user);\n\n\t\t\t\t\t\tif (grouping != null && grouping.length() > 0){\n\t\t\t\t\t\t\tgroupedValue = AseUtil.nullToBlank(rs.getString(grouping));\n\t\t\t\t\t\t\tif (savedGrouping == null || !savedGrouping.equals(groupedValue)){\n\t\t\t\t\t\t\t\tsavedGrouping = groupedValue;\n\t\t\t\t\t\t\t\tdrawTitleRow(table,\n\t\t\t\t\t\t\t\t\t\t\t\tsavedGrouping.toUpperCase(),\n\t\t\t\t\t\t\t\t\t\t\t\tcampusColor,\n\t\t\t\t\t\t\t\t\t\t\t\tf,\n\t\t\t\t\t\t\t\t\t\t\t\tBaseColor.BLACK,\n\t\t\t\t\t\t\t\t\t\t\t\tcolumns,\n\t\t\t\t\t\t\t\t\t\t\t\tElement.ALIGN_LEFT);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} // grouping\n\n\t\t\t\t\t\tif (j % 2 == 0)\n\t\t\t\t\t\t\ttable.getDefaultCell().setBackgroundColor(ASE_ODD_ROW_COLOR);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\ttable.getDefaultCell().setBackgroundColor(ASE_EVEN_ROW_COLOR);\n\n\t\t\t\t\t\tfor (i=0;i<columns;i++){\n\n\t\t\t\t\t\t\tif (!aDataColumns[i].equals(Constant.BLANK)){\n\t\t\t\t\t\t\t\tif (aDataColumns[i].indexOf(\"date\") > -1){\n\t\t\t\t\t\t\t\t\tjunk = aseUtil.ASE_FormatDateTime(rs.getString(aDataColumns[i]),Constant.DATE_DATE_MDY);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\tjunk = aseUtil.nullToBlank(rs.getString(aDataColumns[i]));\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\t\tjunk = \"\";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tjunk = junk.replace(\"<p>\",\"\")\n\t\t\t\t\t\t\t\t\t\t.replace(\"</p>\",\"\\n\")\n\t\t\t\t\t\t\t\t\t\t.replace(\"<br>\",\"\\n\")\n\t\t\t\t\t\t\t\t\t\t.replace(\"<br/>\",\"\\n\")\n\t\t\t\t\t\t\t\t\t\t.replace(\"<br />\",\"\\n\")\n\t\t\t\t\t\t\t\t\t\t.replace(\"&nbsp;\",\" \")\n\t\t\t\t\t\t\t\t\t\t;\n\n\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t//phrase = new Phrase();\n\t\t\t\t\t\t\t\t//phrase.add(createPhrase(junk,false));\n\n\t\t\t\t\t\t\t\t//OR\n\n\t\t\t\t\t\t\t\t// this version cuts does not parse html\n\t\t\t\t\t\t\t\tphrase = new Phrase(leading, new Chunk(junk, FontFactory.getFont(FontFactory.TIMES_ROMAN, dataFontSize, Font.NORMAL, BaseColor.BLACK)));\n\t\t\t\t\t\t\t\tcell = new PdfPCell(phrase);\n\n\t\t\t\t\t\t\t\t// OR\n\n\t\t\t\t\t\t\t\t// this version is having problems with a stylesheet or font message\n\t\t\t\t\t\t\t\t//cell = new PdfPCell(processElement(junk, DATACOLOR, Font.NORMAL));\n\n\t\t\t\t\t\t\t\t// OR\n\n\t\t\t\t\t\t\t\t// this version is having problems with a stylesheet or font message.\n\t\t\t\t\t\t\t\t// also cuts off multiline data\n\t\t\t\t\t\t\t\t//cell = processElement(junk);\n\n\t\t\t\t\t\t\t\tcell.setFixedHeight(20);\n\t\t\t\t\t\t\t\tcell.setPaddingRight(10);\n\t\t\t\t\t\t\t\ttable.addCell(cell);\n\t\t\t\t\t\t\t} catch(IllegalArgumentException e){\n\t\t\t\t\t\t\t\tlogger.fatal(\"ReportGeneric - runReport 1: \" + e.toString());\n\t\t\t\t\t\t\t} catch(Exception e){\n\t\t\t\t\t\t\t\tlogger.fatal(\"ReportGeneric - runReport 2: \" + e.toString());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t++j;\n\t\t\t\t\t} // while\n\n\t\t\t\t\tif (j==0){\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\tphrase = new Phrase();\n\t\t\t\t\t\t\tphrase.add(createPhrase(\"no date found for requested report\",false));\n\t\t\t\t\t\t\tcell = new PdfPCell(phrase);\n\t\t\t\t\t\t\tcell.setFixedHeight(20);\n\t\t\t\t\t\t\tcell.setPaddingRight(10);\n\t\t\t\t\t\t\tcell.setColspan(columns);\n\t\t\t\t\t\t\ttable.addCell(cell);\n\t\t\t\t\t\t} catch(IllegalArgumentException e){\n\t\t\t\t\t\t\tlogger.fatal(\"ReportGeneric - runReport 1: \" + e.toString());\n\t\t\t\t\t\t} catch(Exception e){\n\t\t\t\t\t\t\tlogger.fatal(\"ReportGeneric - runReport 2: \" + e.toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tdocument.add(table);\n\n\t\t\t\t\t// footer\n\t\t\t\t\tif (reportType.equals(Constant.FORUM)){\n\n\t\t\t\t\t\tList list = new List();\n\n\t\t\t\t\t\tjunk = \"CLOSED - tickets combined with another item because of similarity in the work that is needed, or the work that is no longer necessary.\";\n\t\t\t\t\t\tphrase = new Phrase(leading, new Chunk(junk, FontFactory.getFont(FontFactory.TIMES_ROMAN, dataFontSize, Font.NORMAL, BaseColor.BLACK)));\n\t\t\t\t\t\tlist.add(new ListItem(phrase));\n\n\t\t\t\t\t\tjunk = \"COMPLETED - this status is set after development has been completed, and user confirms that CC is working as expected.\";\n\t\t\t\t\t\tphrase = new Phrase(leading, new Chunk(junk, FontFactory.getFont(FontFactory.TIMES_ROMAN, dataFontSize, Font.NORMAL, BaseColor.BLACK)));\n\t\t\t\t\t\tlist.add(new ListItem(phrase));\n\n\t\t\t\t\t\tjunk = \"MONITORING - either a problem cannot be recreated or a fix was implemented without a way to recreate the problem.\";\n\t\t\t\t\t\tphrase = new Phrase(leading, new Chunk(junk, FontFactory.getFont(FontFactory.TIMES_ROMAN, dataFontSize, Font.NORMAL, BaseColor.BLACK)));\n\t\t\t\t\t\tlist.add(new ListItem(phrase));\n\n\t\t\t\t\t\tjunk = \"REQUIREMENTS - an enhancement or bug fix requiring additional specification prior to development.\";\n\t\t\t\t\t\tphrase = new Phrase(leading, new Chunk(junk, FontFactory.getFont(FontFactory.TIMES_ROMAN, dataFontSize, Font.NORMAL, BaseColor.BLACK)));\n\t\t\t\t\t\tlist.add(new ListItem(phrase));\n\n\t\t\t\t\t\tjunk = \"RESEARCH - the development team is unclear of the reported ticket or requset and requires time to better understand what has taken place and possible recommendation for the user.\";\n\t\t\t\t\t\tphrase = new Phrase(leading, new Chunk(junk, FontFactory.getFont(FontFactory.TIMES_ROMAN, dataFontSize, Font.NORMAL, BaseColor.BLACK)));\n\t\t\t\t\t\tlist.add(new ListItem(phrase));\n\n\t\t\t\t\t\tjunk = \"REVIEW - items the development team required additional time to understand.\";\n\t\t\t\t\t\tphrase = new Phrase(leading, new Chunk(junk, FontFactory.getFont(FontFactory.TIMES_ROMAN, dataFontSize, Font.NORMAL, BaseColor.BLACK)));\n\t\t\t\t\t\tlist.add(new ListItem(phrase));\n\n\t\t\t\t\t\tjunk = \"UAT - user acceptance testing (UAT) is the process where user(s) confirms that a fix or enhancement was completed as requested. If all goes well, the work is moved to production; otherwise, the work goes back for more requirements.\";\n\t\t\t\t\t\tphrase = new Phrase(leading, new Chunk(junk, FontFactory.getFont(FontFactory.TIMES_ROMAN, dataFontSize, Font.NORMAL, BaseColor.BLACK)));\n\t\t\t\t\t\tlist.add(new ListItem(phrase));\n\n\t\t\t\t\t\tdocument.add(list);\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// step 5 of 5\n\t\t\t\t\tdocument.close();\n\n\t\t\t\t\t// with report ready, open in browser\n\t\t\t\t\twritePDF(request,response,reportFileName);\n\n\t\t\t\t} // not null report fields\n\n\t\t\t} // aseReport\n\n\t\t} catch(SQLException ex){\n\t\t\tlogger.fatal(\"ReportGeneric - runReport 3: \" + ex.toString());\n\t\t} catch(IllegalArgumentException ex){\n\t\t\tlogger.fatal(\"ReportGeneric - runReport - 4: \" + ex.toString());\n\t\t} catch(Exception ex){\n\t\t\tlogger.fatal(\"ReportGeneric - runReport 5: \" + ex.toString());\n\t\t} finally {\n\t\t\tconnectionPool.freeConnection(conn,\"ReportGeneric\",reportUser);\n\n\t\t\ttry{\n\t\t\t\tif (conn != null){\n\t\t\t\t\tconn.close();\n\t\t\t\t\tconn = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tlogger.fatal(\"Tables: campusOutlines - \" + e.toString());\n\t\t\t}\n\n\t\t\taseUtil = null;\n\t\t\twebsite = null;\n\t\t}\n\t}", "@Override\r\n\tpublic Map<String, Object> returnData(Map<String, Object> map,Model model, HttpServletRequest request) {\n\t\treturn null;\r\n\t}", "public static Map<String, Object> get (Request request, Response response) {\n JsonNode varsJson = null;\n try {\n varsJson = mapper.readTree(request.queryParams(\"variables\"));\n } catch (IOException e) {\n LOG.warn(\"Error processing variables\", e);\n halt(400, \"Malformed JSON\");\n }\n String queryJson = request.queryParams(\"query\");\n return doQuery(varsJson, queryJson, response);\n }", "private void bindData(RepletRequest req) throws Exception\n {\n LabeledValueHolder param = (LabeledValueHolder) req\n .getParameter(\"termbaseId\");\n String termbaseName = param.getLabel();\n String termbaseId = (String) param.getValue();\n\n m_selectedLang = req.getString(\"selectedLang\");\n addCriteriaFormAtTop(termbaseName);\n\n // create a HashMap holding the termbase languages\n ITermbaseManager s_manager = ServerProxy.getTermbaseManager();\n ITermbase tb = s_manager\n .connect(termbaseName, \"MissingTermsReport\", \"\");\n String definition = tb.getDefinition();\n setTermbaseLangs(definition);\n\n // query the entry langs to see what entries we do have\n fillEntryLangMap(termbaseId);\n\n // now go through the termbase langs and print out the missing entries\n Iterator langIter = m_termbaseLangs.iterator();\n while (langIter.hasNext())\n {\n String currentLang = (String) langIter.next();\n if (!(ALL.equals(m_selectedLang) || currentLang\n .equals(m_selectedLang)))\n continue;\n\n ss.setCurrentFont(GlobalSightReplet.FONT_LABEL);\n ss.addText(ReportsPackage.getMessage(m_bundle, \"missing\") + \" \"\n + currentLang);\n ss.setCurrentFont(GlobalSightReplet.FONT_NORMAL);\n ss.addNewline(2);\n Iterator keyIter = m_map.keySet().iterator();\n int numMissing = 0;\n while (keyIter.hasNext())\n {\n Long key = (Long) keyIter.next();\n HashSet set = (HashSet) m_map.get(key);\n\n if (set.contains(currentLang) == false)\n {\n ss.addText(ReportsPackage.getMessage(m_bundle, \"entry\")\n + \" \" + key + \" -- \");\n String term = getTerm(tb, key.longValue());\n ss.addText(term);\n ss.addNewline(1);\n numMissing++;\n }\n }\n ss.setCurrentFont(GlobalSightReplet.FONT_LABEL);\n if (numMissing == 0)\n {\n ss.addText(ReportsPackage.getMessage(m_bundle, \"noMissing\"));\n\n }\n else\n {\n ss.addText(ReportsPackage.getMessage(m_bundle, \"totalMissing\")\n + \" \" + numMissing);\n }\n ss.setCurrentFont(GlobalSightReplet.FONT_NORMAL);\n ss.addPageBreak();\n }\n }", "@RequestMapping(value = {\"/get-all-CTopUpPaymentsReceivedReport\"}, method = RequestMethod.POST)\n\t @CrossOrigin(origins = \"*\", allowCredentials = \"true\")\n\t @ResponseBody\n\t public String getAllChannelsReport(HttpServletRequest request, HttpServletResponse response) {\n\t\t String region=request.getParameter(\"region\");\n\t\t String city=request.getParameter(\"city\");\n\t\t String searchType=request.getParameter(\"searchType\");\n\t\t String msisdn=request.getParameter(\"msisdn\");\n\t\t String fromDate=request.getParameter(\"fromDate\");\n\t\t String toDate=request.getParameter(\"toDate\");\n\t\t String wallet=\"CTOPUP\";\n\t\t String zone=\"South Zone\";\n\t\t\n\t\t\tSystem.out.println(\"wallet ::\"+wallet);\n\t\t\tSystem.out.println(\"region::\"+region);\n\t\t\tSystem.out.println(\"city::\"+city);\n\t\t\tSystem.out.println(\"searchType::\"+searchType);\n\t\t\tSystem.out.println(\"msisdn::\"+msisdn);\n\t\t\t//System.out.println(\"search Type11::\"+searchType11);\n\t\t\tSystem.out.println(\"From Date1::\"+fromDate);\n\t\t\tSystem.out.println(\"To Date::\"+toDate);\n\t \t\n\t String json;\n\t try {\n\t \tSystem.out.println(\"========================home controller===================================\");\n\t ResponseList<CTopUpPaymentsReceivedReportBean> lstInvoices =new ResponseList<CTopUpPaymentsReceivedReportBean>();\n\t lstInvoices.addAll(cTopUpPaymentsReceivedReportService.getAllCTOPUPaymentsReceivedReport(zone, region, city, msisdn, searchType, fromDate, toDate));\n\t json = lstInvoices.toString();\n\t System.out.println(\"json ::\"+json);\n\t } catch (Exception e) {\n\t json = \"{\\\"error\\\" : true, \\\"message\\\": \\\"\" + e.getMessage() + \".\\\"}\";\n\t }\n\t return json;\n\t }", "@Override\r\n\tpublic String handlerRequest(HttpServletRequest req, HttpServletResponse res) throws Exception {\n\t\tString m_location;\r\n\t\tm_location = req.getParameter(\"slocation\");\r\n\t\tSystem.out.println(m_location);\r\n\t\t\r\n\t\tString m_lang1;\r\n\t\tm_lang1 = req.getParameter(\"slang\");\r\n\t\tSystem.out.println(m_lang1);\r\n\t\t\r\n\t\tString m_place;\r\n\t\tm_place = req.getParameter(\"splace\");\r\n\t\tSystem.out.println(m_place);\r\n\t\t\r\n\t\tMeetingDTO d = new MeetingDTO();\r\n\t\td.setM_location(m_place);\r\n\t\td.setM_place(m_location);\r\n\t\td.setM_lang1(m_lang1);\r\n\t\t\r\n\t\tList<MeetingDTO> list=MemberDAO.DetailSearchForPlace(d);\r\n\t\tint count = MemberDAO.DetailSearchForPlaceCount(d);\r\n\t\treq.setAttribute(\"count\", count);\r\n\t\treq.setAttribute(\"list\", list);\r\n\t\treq.setAttribute(\"jsp\", \"../meeting/meeting_type.jsp\");\r\n\t\treturn \"main/main.jsp\";\r\n\t}", "public String searchMeterReaderMRDMapping() {\n\t\tAppLog.begin();\n\t\ttry {\n\t\t\tStringBuffer resonseSB = new StringBuffer(512);\n\t\t\tMeterReaderDetails meterReaderDetails = new MeterReaderDetails();\n\t\t\tmeterReaderDetails.setMeterReaderZone(selectedZone);\n\t\t\t/* Start: Commented by Matiur Rahman on 30-09-2015 */\n\t\t\t// List<MRDTaggingDetails> mrdTaggingDetailsList = MRDTaggingDAO\n\t\t\t// .getAllCurrentTaggingList(selectedZone);\n\t\t\t/* End: Commented by Matiur Rahman on 30-09-2015 */\n\t\t\t/* Start: Added by Matiur Rahman on 30-09-2015 */\n\t\t\tList<MRDTaggingDetails> mrdTaggingDetailsList = MRDTaggingDAO\n\t\t\t\t\t.getAllCurrentTaggingList(selectedZone, selectedZROCode,\n\t\t\t\t\t\t\tselectedMRKeys,mrEmpId,mrHhdId);\n\t\t\tAppLog.debug(\"\" + selectedZone + \">>\" + selectedZROCode + \">>>\"\n\t\t\t\t\t+ selectedMRKeys);\n\t\t\t/* End: Added by Matiur Rahman on 30-09-2015 */\n\t\t\tMRDTaggingDetails mrdTaggingDetails = null;\n\t\t\tif (null != mrdTaggingDetailsList\n\t\t\t\t\t&& mrdTaggingDetailsList.size() > 0) {\n\t\t\t\tresonseSB.append(\"<table class=\\\"table-grid\\\">\");\n\t\t\t\tresonseSB.append(\"<tr>\");\n\t\t\t\tresonseSB\n\t\t\t\t\t\t.append(\"<th align=\\\"center\\\" colspan=\\\"15\\\">Current MRD Tagging Status</th>\");\n\t\t\t\tresonseSB.append(\"</tr>\");\n\t\t\t\tresonseSB.append(\"<tr>\");\n\t\t\t\tresonseSB.append(\"<th width=\\\"5%\\\" rowspan=\\\"2\\\">SL</th>\");\n\t\t\t\t/* Start: Added by Matiur Rahman on 30-09-2015 */\n\t\t\t\tresonseSB.append(\"<th width=\\\"5%\\\" rowspan=\\\"2\\\" >ZONE</th>\");\n\t\t\t\tresonseSB.append(\"<th width=\\\"5%\\\" rowspan=\\\"2\\\" >MR</th>\");\n\t\t\t\tresonseSB.append(\"<th width=\\\"5%\\\" rowspan=\\\"2\\\" >Area</th>\");\n\t\t\t\tresonseSB\n\t\t\t\t\t\t.append(\"<th width=\\\"5%\\\" rowspan=\\\"2\\\" >MRD Type</th>\");\n\t\t\t\t/* End: Added by Matiur Rahman on 30-09-2015 */\n\t\t\t\tresonseSB\n\t\t\t\t\t\t.append(\"<th width=\\\"5%\\\" rowspan=\\\"2\\\" colspan=\\\"2\\\">MRD CODE</th>\");\n\t\t\t\tresonseSB\n\t\t\t\t\t\t.append(\"<th width=\\\"50%\\\" rowspan=\\\"1\\\" colspan=\\\"3\\\">METER READER</th>\");\n\t\t\t\tresonseSB\n\t\t\t\t\t\t.append(\"<th width=\\\"15%\\\" rowspan=\\\"1\\\" colspan=\\\"2\\\">TAGGED</th>\");\n\t\t\t\tresonseSB\n\t\t\t\t\t\t.append(\"<th width=\\\"20%\\\" rowspan=\\\"1\\\" colspan=\\\"2\\\">EFFECTIVE</th>\");\n\t\t\t\tresonseSB.append(\"</tr>\");\n\t\t\t\tresonseSB.append(\"<tr>\");\n\t\t\t\tresonseSB.append(\"<th width=\\\"5%\\\" rowspan=\\\"1\\\">ID</th>\");\n\t\t\t\tresonseSB.append(\"<th width=\\\"15%\\\" rowspan=\\\"1\\\">NAME</th>\");\n\t\t\t\tresonseSB\n\t\t\t\t\t\t.append(\"<th width=\\\"5%\\\" rowspan=\\\"1\\\">EMPLOYEE ID</th>\");\n\t\t\t\tresonseSB.append(\"<th width=\\\"5%\\\" rowspan=\\\"1\\\">BY</th>\");\n\t\t\t\tresonseSB.append(\"<th width=\\\"10%\\\" rowspan=\\\"1\\\">ON</th>\");\n\t\t\t\tresonseSB.append(\"<th width=\\\"10%\\\" rowspan=\\\"1\\\">FROM</th>\");\n\t\t\t\tresonseSB.append(\"<th width=\\\"10%\\\" rowspan=\\\"1\\\">TO</th>\");\n\t\t\t\tresonseSB.append(\"</tr>\");\n\t\t\t\tfor (int i = 0; i < mrdTaggingDetailsList.size(); i++) {\n\t\t\t\t\tmrdTaggingDetails = mrdTaggingDetailsList.get(i);\n\t\t\t\t\tmeterReaderDetails = mrdTaggingDetails\n\t\t\t\t\t\t\t.getMeterReaderDetails();\n\t\t\t\t\tresonseSB\n\t\t\t\t\t\t\t.append(\"<tr bgcolor=\\\"white\\\"\tonMouseOver=\\\"javascript:this.bgColor= 'yellow'\\\" onMouseOut=\\\"javascript:this.bgColor='white'\\\">\");\n\t\t\t\t\tresonseSB.append(\"<td align=\\\"center\\\">\" + (i + 1)\n\t\t\t\t\t\t\t+ \"</td>\");\n\t\t\t\t\t/* Start: Added by Matiur Rahman on 30-09-2015 */\n\t\t\t\t\tresonseSB.append(\"<td align=\\\"center\\\">\"\n\t\t\t\t\t\t\t+ mrdTaggingDetails.getZone() + \"</td>\");\n\t\t\t\t\tresonseSB.append(\"<td align=\\\"center\\\">\"\n\t\t\t\t\t\t\t+ mrdTaggingDetails.getMr() + \"</td>\");\n\t\t\t\t\tresonseSB.append(\"<td align=\\\"left\\\" nowrap>\"\n\t\t\t\t\t\t\t+ mrdTaggingDetails.getArea() + \"</td>\");\n\t\t\t\t\tresonseSB.append(\"<td align=\\\"center\\\">\"\n\t\t\t\t\t\t\t+ mrdTaggingDetails.getType() + \"</td>\");\n\t\t\t\t\t/* End: Added by Matiur Rahman on 30-09-2015 */\n\t\t\t\t\tresonseSB.append(\"<td align=\\\"center\\\">\"\n\t\t\t\t\t\t\t+ mrdTaggingDetails.getMrkey() + \"</td>\");\n\t\t\t\t\tresonseSB\n\t\t\t\t\t\t\t.append(\"<td align=\\\"center\\\" width=\\\"2%\\\"><input type=\\\"checkbox\\\" id=\\\"\"\n\t\t\t\t\t\t\t\t\t+ mrdTaggingDetails.getMrkey()\n\t\t\t\t\t\t\t\t\t+ \"\\\" class=\\\"case\\\" name=\\\"case\\\"></td>\");\n\t\t\t\t\tresonseSB.append(\"<td align=\\\"center\\\">\"\n\t\t\t\t\t\t\t+ meterReaderDetails.getMeterReaderID() + \"</td>\");\n\t\t\t\t\tresonseSB\n\t\t\t\t\t\t\t.append(\"<td align=\\\"left\\\">\"\n\t\t\t\t\t\t\t\t\t+ meterReaderDetails.getMeterReaderName()\n\t\t\t\t\t\t\t\t\t+ \"</td>\");\n\t\t\t\t\tresonseSB.append(\"<td align=\\\"center\\\">\"\n\t\t\t\t\t\t\t+ meterReaderDetails.getMeterReaderEmployeeID()\n\t\t\t\t\t\t\t+ \"</td>\");\n\t\t\t\t\tresonseSB.append(\"<td align=\\\"center\\\">\"\n\t\t\t\t\t\t\t+ mrdTaggingDetails.getCreatedBy() + \"</td>\");\n\t\t\t\t\tresonseSB.append(\"<td align=\\\"center\\\" nowrap>\"\n\t\t\t\t\t\t\t+ mrdTaggingDetails.getCreatedOn() + \"</td>\");\n\t\t\t\t\tresonseSB.append(\"<td align=\\\"center\\\" nowrap>\"\n\t\t\t\t\t\t\t+ mrdTaggingDetails.getEffectiveFrom() + \"</td>\");\n\t\t\t\t\tresonseSB.append(\"<td align=\\\"center\\\" nowrap>\"\n\t\t\t\t\t\t\t+ mrdTaggingDetails.getEffectiveTo() + \"</td>\");\n\t\t\t\t\tresonseSB.append(\"</tr>\");\n\t\t\t\t}\n\t\t\t\tresonseSB.append(\"</table><br/>\");\n\t\t\t\tresonseSB.append(\"<table>\");\n\t\t\t\tresonseSB.append(\"<tr>\");\n\t\t\t\tresonseSB\n\t\t\t\t\t\t.append(\"<td width=\\\"15%\\\" align=\\\"right\\\"><b>Meter Reader</b></td>\");\n\t\t\t\t/* Start: Commented by Matiur Rahman on 30-09-2015 */\n\t\t\t\t// List<MeterReaderDetails> meterReaderList =\n\t\t\t\t// (ArrayList<MeterReaderDetails>) HHDMaintenanceDAO\n\t\t\t\t// .getMeterReaderList(selectedZone);\n\t\t\t\t/* End: Commented by Matiur Rahman on 30-09-2015 */\n\t\t\t\t/* Start: Added by Matiur Rahman on 30-09-2015 */\n\t\t\t\tList<MeterReaderDetails> meterReaderList = (ArrayList<MeterReaderDetails>) MRDTaggingDAO\n\t\t\t\t\t\t.getMeterReaderList(new MeterReaderDetails(\n\t\t\t\t\t\t\t\tselectedZROCode));\n\t\t\t\t/* End: Added by Matiur Rahman on 30-09-2015 */\n\t\t\t\tStringBuffer meterReaderDropdown = new StringBuffer();\n\t\t\t\tmeterReaderDropdown\n\t\t\t\t\t\t.append(\"<select name=\\\"meterReaderID\\\" id=\\\"meterReaderID\\\" class=\\\"selectbox-long\\\">\");\n\t\t\t\tmeterReaderDropdown\n\t\t\t\t\t\t.append(\"<option value=''>Please Select</option>\");\n\t\t\t\tif (null != meterReaderList && meterReaderList.size() > 0) {\n\t\t\t\t\tfor (int i = 0; i < meterReaderList.size(); i++) {\n\t\t\t\t\t\tmeterReaderDetails = (MeterReaderDetails) meterReaderList\n\t\t\t\t\t\t\t\t.get(i);\n\t\t\t\t\t\tmeterReaderDropdown.append(optionTagBeginPart1);\n\t\t\t\t\t\tmeterReaderDropdown.append(meterReaderDetails\n\t\t\t\t\t\t\t\t.getMeterReaderID());\n\t\t\t\t\t\tmeterReaderDropdown.append(optionTagBeginPart2);\n\t\t\t\t\t\tmeterReaderDropdown.append(meterReaderDetails\n\t\t\t\t\t\t\t\t.getMeterReaderName());\n\t\t\t\t\t\tmeterReaderDropdown.append(optionTagEnd);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmeterReaderDropdown.append(selectTagEnd);\n\t\t\t\tresonseSB.append(\"<td width=\\\"10%\\\" id='mtrRdrTD'>\"\n\t\t\t\t\t\t+ meterReaderDropdown.toString() + \"</td>\");\n\t\t\t\tresonseSB\n\t\t\t\t\t\t.append(\"<td width=\\\"2%\\\"><img src=\\\"/DataEntryApp/images/load.gif\\\" width=\\\"25\\\" border=\\\"0\\\" title=\\\"Processing\\\" style=\\\"display: none;\\\" id=\\\"imgMtrRdrSrc\\\" /></td>\");\n\t\t\t\tresonseSB\n\t\t\t\t\t\t.append(\"<td width=\\\"20%\\\" ><input type=\\\"text\\\" name=\\\"mtrRdsSrc\\\" id=\\\"mtrRdsSrc\\\" size='10' class=\\\"textbox\\\" title='Enter Employee Id of the Meter Reader'/><input type=\\\"button\\\" name=\\\"btnGetMtrRdr\\\" id=\\\"btnGetMtrRdr\\\" value=\\\"GO\\\" class=\\\"smallbutton\\\" onclick=\\\"fnGetMtrRdr();\\\" /></td>\");\n\t\t\t\tresonseSB\n\t\t\t\t\t\t.append(\"<td align=\\\"left\\\" ><input type=\\\"button\\\" name=\\\"btnTag\\\"\tid=\\\"btnTag\\\" value=\\\" Tag Selected MRD(s) \\\" class=\\\"groovybutton\\\" onclick=\\\"fnTagMRD();\\\" /></td>\");\n\t\t\t\tresonseSB\n\t\t\t\t\t\t.append(\"<td align=\\\"left\\\" ><input type=\\\"button\\\" name=\\\"btnUnTag\\\"\tid=\\\"btnUnTag\\\" value=\\\" UnTag Selected MRD(s) \\\" class=\\\"groovybutton\\\" onclick=\\\"fnUnTagMRD();\\\" /></td>\");\n\t\t\t\tresonseSB.append(\"</table><br/>\");\n\t\t\t} else {\n\t\t\t\tresonseSB\n\t\t\t\t\t\t.append(\"<font color='red'><b>No records Found to Display!</b></font><br/>\");\n\t\t\t}\n\t\t\tinputStream = new StringBufferInputStream(resonseSB.toString());\n\n\t\t} catch (Exception e) {\n\t\t\tinputStream = new StringBufferInputStream(\n\t\t\t\t\t\"<font color='red' size='2'><li><span><b>ERROR:Sorry, There was problem while Processing Last Operation.</b></font>\");\n\t\t\tAppLog.error(e);\n\n\t\t}\n\t\tAppLog.end();\n\t\treturn SUCCESS;\n\t}", "private HashMap<String, JSONObject> search (String city, String state, String zip, String specialty) {\r\n\r\n //results are put in a hashmap with doctors' names as keys and their information as values\r\n HashMap<String,JSONObject> results = new HashMap<>();\r\n Timestamp timestamp = null;\r\n int number = 0;\r\n int code = 0;\r\n try {\r\n //timestamp of when the request is sent\r\n timestamp = new Timestamp(System.currentTimeMillis());\r\n //replace space in strings with +\r\n specialty = specialty.replaceAll(\" \", \"+\");\r\n city = city.replaceAll(\" \", \"+\");\r\n // Make call to a particular server URL\r\n URL url = new URL(\"https://chi-ngo-coolio-task2.herokuapp.com/?city=\" + city + \"&state=\" + state\r\n + \"&zip=\" + zip + \"&specialty=\" + specialty);\r\n //use this URL if task 2 fails\r\n //URL url = new URL(\"https:chi-ngo-coolio.herokuapp.com/?city=\" + city + \"&state=\" + state + \"&zip=\" + zip + \"&specialty=\" + specialty);\r\n /*\r\n * Create an HttpURLConnection. This is useful for setting headers\r\n * and for getting the path of the resource that is returned (which\r\n * may be different than the URL above if redirected).\r\n * HttpsURLConnection (with an \"s\") can be used if required by the site.\r\n */\r\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\r\n conn.setRequestMethod(\"GET\");\r\n code = conn.getResponseCode();\r\n //if the connection was successful\r\n if (code == 200) {\r\n //read all the response\r\n BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));\r\n String str;\r\n StringBuffer content = new StringBuffer();\r\n while ((str = in.readLine()) != null) {\r\n content.append(str);\r\n }\r\n in.close();\r\n //make a new parser to parse the response string into a JSONObject\r\n JSONParser p = new JSONParser();\r\n JSONObject response = (JSONObject) p.parse(content.toString());\r\n System.out.println(response.toJSONString());\r\n JSONArray doctors = (JSONArray) response.get(\"doctors\");\r\n //add each doctor and their information to the hashmap with their full names as keys\r\n for (int i = 0; i < doctors.size(); i++) {\r\n JSONObject info = (JSONObject) doctors.get(i);\r\n results.put((String) info.get(\"full_name\"),info);\r\n }\r\n //get the number of doctors found\r\n number = doctors.size();\r\n }\r\n //close the connection\r\n conn.disconnect();\r\n }\r\n // handle exceptions\r\n catch (MalformedURLException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } catch (ParseException e) {\r\n e.printStackTrace();\r\n }\r\n //send a POST request for logging data\r\n try {\r\n //convert the timestamp object to a string\r\n String time = timestamp.toString();\r\n //replace all spaces with +\r\n time = time.replaceAll(\" \", \"+\");\r\n /*\r\n * Create an HttpURLConnection. This is useful for setting headers\r\n * and for getting the path of the resource that is returned (which\r\n * may be different than the URL above if redirected).\r\n * HttpsURLConnection (with an \"s\") can be used if required by the site.\r\n */\r\n //connect to the server URL with a POST request for data logging to MongoDB\r\n URL url2 = new URL(\"https://chi-ngo-coolio-task2.herokuapp.com/?city=\" + city + \"&state=\" + state + \"&zip=\"\r\n + zip + \"&specialty=\" + specialty + \"&timestamp=\" + time + \"&number=\" + number + \"&code=\" + code);\r\n HttpURLConnection connection = (HttpURLConnection) url2.openConnection();\r\n connection.setRequestMethod(\"POST\");\r\n connection.setRequestProperty(\"Accept\", \"text/plain\");\r\n connection.getResponseCode();\r\n //close the connection\r\n connection.disconnect();\r\n } catch (MalformedURLException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n //return the result hashmap\r\n return results;\r\n }", "private void executeReportRequest(String user_id, String search_date, final String searchedUser){\n new ServerApiRequests(this,\n\n new ServerApiRequests.AsyncStart(){\n\n @Override\n public void onProcessStart(){\n loadReport.setVisibility(View.VISIBLE);\n }\n },\n\n new ServerApiRequests.AsyncResponse() {\n\n @Override\n public void onProcessFinish(String output) {\n Log.e(\"response\", output);\n\n try {\n JSONObject result = new JSONObject(output);\n\n PersonalToastDesign tst = new PersonalToastDesign(getApplicationContext());\n String state = result.getString(\"success\");\n if(state.equals(\"true\")) {\n// tst.showToast(\"User unfriended.\");\n\n mMap.clear();\n ArrayList<Marker> markersList = new ArrayList<Marker>();\n double distance = 0;\n double prev_x = 0;\n double prev_y = 0;\n\n PolylineOptions rectOptions = new PolylineOptions();\n JSONArray jsonUsers = result.getJSONArray(\"user\");\n\n\n for (int i = 0; i < jsonUsers.length(); i++) {\n\n\n PointCoordinates tempPoint = new PointCoordinates(\n jsonUsers.getJSONObject(i).getDouble(\"COOR_X\")\n , jsonUsers.getJSONObject(i).getDouble(\"COOR_Y\")\n ,jsonUsers.getJSONObject(i).getString(\"REC_DATE\"));\n\n Marker marker = mMap.addMarker(new MarkerOptions()\n .position(new LatLng(tempPoint.getCoord_x(), tempPoint.getCoord_y()))\n .title(tempPoint.getRec_date())\n// .icon(BitmapDescriptorFactory.fromResource(R.drawable.red_house))\n );\n// marker.showInfoWindow();\n markersList.add(marker);\n\n rectOptions.add(new LatLng(tempPoint.getCoord_x(), tempPoint.getCoord_y()));\n\n // accumulate distance\n\n if (i > 0){\n distance += tempPoint.distanceToMe(prev_x,prev_y);\n } else {\n prev_x = tempPoint.getCoord_x();\n prev_y = tempPoint.getCoord_y();\n }\n }\n\n showDistance.setVisibility(View.VISIBLE);\n double finalValue = Math.round( distance * 1000.0 ) / 1000.0;\n showDistance.setText(\"Изминатo разстояние от \"+ searchedUser + \" ~ \" + String.valueOf(finalValue)+ \" км.\");\n\n\n mMap.addPolyline(rectOptions).setColor(Color.GREEN);;\n\n // zooming\n final int padding = 30;//initialize the padding for map boundary\n /**create the bounds from latlngBuilder to set into map camera*/\n LatLngBounds.Builder builder = new LatLngBounds.Builder();\n for (Marker m : markersList) {\n builder.include(m.getPosition());\n }\n\n final LatLngBounds bounds = builder.build();\n mMap.animateCamera(CameraUpdateFactory.newLatLngBounds(bounds, padding));\n\n } else {\n //tst.showToast(result.getString(\"error\"));\n String r = result.getString(\"error\");\n if(r.equals(\"Day or user not found\")) {\n tst.showToast(\"Денят, или потребителят не са намерени\");\n }\n if(r.equals(\"Please provide user name and search date\")) {\n tst.showToast(\"Моля въведете име и търсена дата\");\n }\n\n mMap.clear();\n showDistance.setVisibility(View.GONE);\n mMap.animateCamera(CameraUpdateFactory.zoomTo(1));\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n PersonalToastDesign tst = new PersonalToastDesign(getApplicationContext());\n tst.showToast(\"Възникна проблем със сървъра\");\n mMap.clear();\n executeReport.setEnabled(true);\n showDistance.setVisibility(View.GONE);\n loadReport.setVisibility(View.GONE);\n mMap.animateCamera(CameraUpdateFactory.zoomTo(1));\n }\n\n loadReport.setVisibility(View.GONE);\n executeReport.setEnabled(true);\n }\n }\n\n ).execute(\"get_report_coords_url\", user_id, search_date);\n }", "public void extractDataForRequestType(int a) {\n ReportRun header = processMonitorList.remove(0);\n\n //adding the header to all the Hire types\n runReportsTypesMap.get(RequestType.IMPORT_HIRE_EMPLOYEE).add(header);\n runReportsTypesMap.get(RequestType.IMPORT_HIRE_EMPLOYEE_DAILY).add(header);\n runReportsTypesMap.get(RequestType.IMPORT_CONTRACT_CONTINGENT_WORKER).add(header);\n runReportsTypesMap.get(RequestType.IMPORT_CONTRACT_CONTINGENT_WORKER_DAILY).add(header);\n //reference for all the hire types\n RequestType requestType = RequestType.IMPORT_HIRE_EMPLOYEE;\n for (ReportRun run : processMonitorList) {\n //first check if its either Import hire or contingent worker\n //then filter with or with out daily\n\n if (run.getRequestType().equals(RequestType.IMPORT_HIRE_EMPLOYEE.getRequestType())) {\n if (isDaily(run)) {\n requestType = RequestType.IMPORT_HIRE_EMPLOYEE_DAILY;\n List<IExcelRow> listOfReports = runReportsTypesMap.get(requestType);\n listOfReports.add(run);\n } else {\n requestType = RequestType.IMPORT_HIRE_EMPLOYEE;\n List<IExcelRow> listOfReports = runReportsTypesMap.get(requestType);\n listOfReports.add(run);\n }\n } else if (run.getRequestType().equals(RequestType.IMPORT_CONTRACT_CONTINGENT_WORKER.getRequestType())) {\n if (isDaily(run)) {\n requestType = RequestType.IMPORT_CONTRACT_CONTINGENT_WORKER_DAILY;\n List<IExcelRow> listOfReports = runReportsTypesMap.get(requestType);\n listOfReports.add(run);\n } else {\n requestType = RequestType.IMPORT_CONTRACT_CONTINGENT_WORKER;\n List<IExcelRow> listOfReports = runReportsTypesMap.get(requestType);\n listOfReports.add(run);\n }\n }\n run.setRequestTypeEnum(requestType);\n }\n\n }", "private Map<String, String> populate(Map<String, String> argsMap) throws IOException, TaskExecutionException {\n\n SimpleHttpClient httpClient = SimpleHttpClient.builder(argsMap).build();\n try {\n String url = UrlBuilder.builder(argsMap).path(argsMap.get(\"location\")).build();\n Response response = httpClient.target(url).get();\n String responseBody = response.string();\n String header = response.getHeader(\"Content-Type\");\n\n Map<String, String> resultMap = null;\n if (header != null && header.contains(\"application/json\")) {\n resultMap = parsePlusStatsResult(responseBody);\n } else if (header != null && header.contains(\"text/plain\")) {\n resultMap = parseStubStatsResults(responseBody);\n } else {\n logger.error(\"Invalid content type [ \" + header + \" ] for URL \" + url);\n throw new TaskExecutionException(\"Invalid content type [ \" + header + \" ] for URL \" + url);\n }\n return resultMap;\n } finally {\n httpClient.close();\n }\n }", "private void initData() {\r\n allElements = new Vector<PageElement>();\r\n\r\n String className = Utility.getDisplayName(queryResult.getOutputEntity());\r\n List<AttributeInterface> attributes = Utility.getAttributeList(queryResult);\r\n int attributeSize = attributes.size();\r\n //int attributeLimitInDescStr = (attributeSize < 10) ? attributeSize : 10;\r\n\r\n Map<String, List<IRecord>> allRecords = queryResult.getRecords();\r\n serviceURLComboContents.add(\" All service URLs \");\r\n for (String url : allRecords.keySet()) {\r\n\r\n List<IRecord> recordList = allRecords.get(url);\r\n \r\n StringBuilder urlNameSize = new StringBuilder( url );\r\n urlNameSize = new StringBuilder( urlNameSize.substring(urlNameSize.indexOf(\"//\")+2));\r\n urlNameSize = new StringBuilder(urlNameSize.substring(0,urlNameSize.indexOf(\"/\")));\r\n urlNameSize.append(\" ( \" + recordList.size() + \" )\");\r\n serviceURLComboContents.add(urlNameSize.toString());\r\n Vector<PageElement> elements = new Vector<PageElement>();\r\n for (IRecord record : recordList) {\r\n StringBuffer descBuffer = new StringBuffer();\r\n for (int i = 0; i < attributeSize; i++) {\r\n Object value = record.getValueForAttribute(attributes.get(i));\r\n if (value != null) {\r\n if (i != 0) {\r\n descBuffer.append(',');\r\n }\r\n descBuffer.append(value);\r\n }\r\n }\r\n String description = descBuffer.toString();\r\n // if (description.length() > 150) {\r\n // //150 is allowable chars at 1024 resolution\r\n // description = description.substring(0, 150);\r\n // //To avoid clipping of attribute value in-between\r\n // int index = description.lastIndexOf(\",\");\r\n // description = description.substring(0, index);\r\n // }\r\n PageElement element = new PageElementImpl();\r\n element.setDisplayName(className + \"_\" + record.getRecordId().getId());\r\n element.setDescription(description);\r\n\r\n DataRow dataRow = new DataRow(record, queryResult.getOutputEntity());\r\n dataRow.setParent(parentDataRow);\r\n dataRow.setAssociation(queryAssociation);\r\n\r\n Vector recordListUserObject = new Vector();\r\n recordListUserObject.add(dataRow);\r\n recordListUserObject.add(record);\r\n\r\n element.setUserObject(recordListUserObject);\r\n\r\n allElements.add(element);\r\n elements.add(element);\r\n }\r\n URLSToResultRowMap.put(urlNameSize.toString(), elements);\r\n }\r\n }", "@Override\n public Map<String, Object> getMemberReport() {\n Calendar calendar = Calendar.getInstance();\n calendar.add(Calendar.MONTH,-12);\n List<String> monthList = new ArrayList<>();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM\");\n for (int i = 0; i < 12; i++) {\n calendar.add(Calendar.MONTH,1);\n monthList.add(sdf.format(calendar.getTime()));\n }\n Map<String,Object> map = new HashMap<>();\n map.put(\"months\",monthList);\n List<Integer> memberCntList = findMemberCntByMonthList(monthList);\n map.put(\"memberCntList\",memberCntList);\n return map;\n }", "public ActionForward MRReports(ActionMapping mapping, ActionForm form,\r\n HttpServletRequest request, HttpServletResponse response)\r\n throws Exception {\r\n // Get District list\r\n DataSource ds = null;\r\n TerritoryService territoryService = TerritoryServiceFactory.getTerritoryServiceImpl();\r\n FunctionalNeedReportForm functionalNeedForm = (FunctionalNeedReportForm) form;\r\n ArrayList districtList = new ArrayList();\r\n try {\r\n ds = getDataSource(request);\r\n if (ds == null || \"null\".equals(ds)) {\r\n ds = JNDIDataSource.getConnection();\r\n }\r\n districtList = territoryService.getDistricts(ds);\r\n if (districtList != null && districtList.size() > 0) {\r\n functionalNeedForm.setDistrictList(districtList);\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n String ur = \"/MRReport.do?MRReport=MRReport\";\r\n request.setAttribute(\"ur\", ur);\r\n return mapping.findForward(SUCCESS);\r\n }", "public void searchDocument(ActionRequest actionRequest,\r\n\t\t\tActionResponse actionResponse) throws Exception {\r\n\t\t\r\n\t\tString keyWord = ParamUtil.getString(actionRequest, \"searchKeyWord\");\r\n\t\t// Get document group\r\n\t\tString doituongGroup = ParamUtil.getString(actionRequest,\r\n\t\t\t\t\"doituongGroup\");\r\n\t\r\n\t\t// Set the result back to session\r\n\t\tactionResponse.setRenderParameter(\"doituongGroup\", doituongGroup);\r\n\t\tactionResponse.setRenderParameter(\"searchKeyWord\", keyWord);\r\n\t\t\r\n\t\tPortletPreferences prefs = actionRequest.getPreferences();\r\n\t\t\r\n\t\tint cur = ParamUtil.getInteger(actionRequest, \"curDMGT\", 1);\r\n\t\tint delta = ParamUtil.getInteger(actionRequest, \"deltaDMGT\", 10);\r\n\t\tprefs.setValue(\"curDMGT\", String.valueOf(cur));\r\n\t\tprefs.setValue(\"deltaDMGT\", String.valueOf(delta));\r\n\t\tprefs.store();\r\n\t\t\r\n\t\tactionResponse.setRenderParameter(\"jspPage\",\r\n\t\t\t\t\"/html/portlet/document/setting/dm_giayto_list.jsp\");\r\n\t}", "@RequestMapping(\"/query.do\")\n\tpublic @ResponseBody Map<String, Object> query(@RequestParam Map reqMap) {\nList<CpzProductLevelBean> cpzproductlevelBeans=null;\ntry {\ncpzproductlevelBeans=cpzProductLevelService.get(reqMap);\n} catch (Exception e) {\n\te.printStackTrace();\n}\nMap r=new HashMap();\nr.put(\"returnData\",cpzproductlevelBeans);\n\t return CommonUtil.ReturnWarp(Constant.TRAN_SUCCESS, Constant.ERRORTYPE,\"\",r);\n\t}", "public void prepare() {\n if (getRequest().getMethod().equalsIgnoreCase(\"post\")) {\n // prevent failures on new\n String workdayReportId = getRequest().getParameter(\"workdayReport.id\");\n if (workdayReportId != null && !workdayReportId.equals(\"\")) {\n workdayReport = workdayReportManager.get(new Long(workdayReportId));\n }\n }\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n \n try (PrintWriter out = response.getWriter()) {\n String name, gender, bloodgroup, tumordiameter, age, bmi, cancerhistory, isveg, treatment, recoverytime;\n\n String[] symptom;\n name = request.getParameter(\"name\");\n gender = request.getParameter(\"gender\");\n bloodgroup = request.getParameter(\"bloodgroup\");\n age = request.getParameter(\"age\");\n bmi = request.getParameter(\"bmi\");\n tumordiameter = request.getParameter(\"tumordiameter\");\n cancerhistory = request.getParameter(\"cancerhistory\");\n isveg = request.getParameter(\"isveg\");\n treatment = request.getParameter(\"treatment\");\n recoverytime = request.getParameter(\"recoverytime\");\n //String mode = request.getParameter(\"mode\");\n int int_bloodgroup = Integer.parseInt(bloodgroup), int_gender = Integer.parseInt(gender), int_age = Integer.parseInt(age);\n float float_bmi = Float.parseFloat(bmi), float_tumor_diameter = Float.parseFloat(tumordiameter);\n boolean bool_cancer_history, bool_isveg;\n int int_cancertype = Integer.parseInt(request.getParameter(\"ct\"));\n int int_stage = Integer.parseInt(request.getParameter(\"stage\"));\n symptom = request.getParameterValues(\"symptoms\");\n bool_isveg = isveg.equals(\"1\") ? true : false;\n bool_cancer_history = cancerhistory.equals(\"1\") ? true : false;\n //refresh dataset\n new DBhelper().dbUpdate(String.format(\"insert into search (name,stage,cancertype) values('%s','%s','%s');\",name,int_stage,int_cancertype));\n Notification.pushNotification(name, \" with Stage \"+int_stage+\" \"+Utils.cancerlist.get(int_cancertype)+\" has searched\");\n Utils.refreshsyms();\n Global.loadmax(int_age, float_bmi, float_tumor_diameter);\n\n HashMap<Integer, String> patient_sym = new HashMap<Integer, String>();\n for (String x : symptom) {\n int symid = Integer.parseInt(x);\n patient_sym.put(symid, Utils.symptomlist.get(symid));\n\n }\n //PatientPoint patient = new PatientPoint(name, int_bloodgroup, int_gender, int_age, float_bmi, float_tumor_diameter, bool_cancer_history, bool_isveg, patient_sym);\n PatientPoint patient = new PatientPoint(name, int_bloodgroup, int_gender, int_age, int_cancertype, int_stage, float_bmi, float_tumor_diameter, bool_cancer_history, bool_isveg, patient_sym);\n List<PatientPoint> trainedset = new ArrayList<PatientPoint>();\n //aquire trained data\n DBhelper obj=new DBhelper();\n ResultSet rs = obj.dbQuery(\"select * from patientpoint where cancertype='\" + int_cancertype + \"' and stage='\" + int_stage + \"';\");\n while (rs.next()) {\n int tid = rs.getInt(1);\n name = rs.getString(2);\n int_bloodgroup = rs.getInt(3);\n int_gender = rs.getInt(4);\n int_age = rs.getInt(5);\n float_bmi = rs.getFloat(6);\n float_tumor_diameter = rs.getFloat(7);\n bool_cancer_history = rs.getString(8).equals(\"1\") ? true : false;\n bool_isveg = rs.getString(9).equals(\"1\") ? true : false;\n treatment = rs.getString(10);\n recoverytime = rs.getString(11);\n\n int_stage = rs.getInt(12);\n int_cancertype=rs.getInt(13);\n String surgicalcomplication = rs.getString(14);\n String str_diagnosis = rs.getString(15);\n \n DBhelper obj2=new DBhelper();\n \n ResultSet trs = obj2.dbQuery(\"select symptom.idsymtom as symid , symptom.symptom as symptom from symptom where symptom.idsymtom in (select patssym.symid from patssym where patssym.patid='\" + tid + \"');\");\n HashMap<Integer, String> tempsym = new HashMap<Integer, String>();\n while (trs.next()) {\n tempsym.put(trs.getInt(1), trs.getString(2));\n }\n \n obj2.close();\n// PatientPoint temp = new PatientPoint(name, int_bloodgroup, int_gender, int_age, float_bmi, float_tumor_diameter, bool_cancer_history, bool_isveg, tempsym, treatment, recoverytime, recoverytime, tid);\n //System.out.println(\"surgical complciton\"+surgicalcomplication);\n PatientPoint temp = new PatientPoint(name, int_bloodgroup, int_gender, int_age, int_cancertype, int_stage, float_bmi, float_tumor_diameter, bool_cancer_history, bool_isveg, tempsym, treatment, recoverytime, surgicalcomplication, str_diagnosis, tid);\n trainedset.add(temp);\n }\n obj.close();\n List<MatchResult> result = new ArrayList<MatchResult>();\n //compate for each\n for (PatientPoint temp : trainedset) {\n result.add(patient.calc_distance(temp));\n }\n\n Collections.sort(result, new Comparator<MatchResult>() {\n @Override\n public int compare(MatchResult p1, MatchResult p2) {\n return Float.compare(p2.getTotal(), p1.getTotal());\n }\n });\n request.getRequestDispatcher(\"includehead.jsp\").include(request, response);\n if (result.size() == 0) {\n out.println(\"<div class='row'>\");\n out.println(\"<div class='col-sm-12' style='background:lightblue;margin:10px;padding:20px;border-radius:20px'>\");\n out.print(\"<h1>No Results</h1>\");\n out.println(\"</div></div>\");\n }\n int i=0;\n for (MatchResult x : result) {\n \n out.println(\"<div class='row ' style='z-index:0'>\");\n out.println(\"<div class='col-sm-10 ' style='color:#000034;background:lightblue;margin:10px;padding:20px;border-radius:20px'>\");\n\n out.println(\"<div class='row' style='color:#000034;border-radius:2pxmargin-top:5px;margin-bottom:5px'>\");\n out.println(\"<div class='col-sm-12' >\");\n Utils.refreshcans();\n out.println(\"<h5>Cancer Type : \" + Utils.cancerlist.get(x.getPersondetails().getInt_cancertype()) + \"</h5> <h5>Stage : \" + x.getPersondetails().getInt_stage() + \"</h5><br>\");\n out.println(\"</div></div>\");\n //inner\n out.println(\"<div class='row' style='color:#000034;border-radius:2pxmargin-top:5px;margin-bottom:5px'>\");\n out.println(\"<div class='col-sm-12' >\");\n\n out.println(\"<h5>Suggested Treatment : </h5>\" + x.getPersondetails().getStr_treatment() + \"\"\n + \"<h5>Diagnosis :</h5> \" + x.getPersondetails().getStr_diagnosis() \n + \"<h5>Surgery Complications :</h5> \" + x.getPersondetails().getStr_surgery_complications()\n + \"<br>\");\n out.println(\"</div></div>\");\n\n out.println(\"<div class='row' style='color:#000034;border-radius:2pxmargin-top:5px;margin-bottom:5px'>\");\n out.println(\"<div class='col-sm-12' >\");\n out.println(\"<h5>Recovery Time : </h5>\" + x.getPersondetails().getStr_recoverytime() + \"<br>\");\n\n out.println(\"</div></div>\");\n out.println(\"<div class='row ' style='color:#000034;border-radius:2px;margin-top:5px;margin-bottom:5px'>\");\n out.println(\"<div class='col-sm-12' >\");\n DecimalFormat f = new DecimalFormat(\"##.00\");\n out.println(\"<h5 style='color:red'>Total Confidence : \" + f.format((x.getTotal() * 100)) + \"%</h5><br>\");\n out.println(\"</div></div>\");\n// panelctl\n out.println(\"<h5 class='itemclass' onclick='togglenow(\"+i+\")' style='border-radius:2px;padding:20px;box-shadow: 0px 0px 5px lightblue;background:#47C1FA'><button style='background: none;\\n\" +\n\"\tcolor: inherit;\\n\" +\n\"\tborder: none;\\n\" +\n\"\tpadding: 0;\\n\" +\n\"\tfont: inherit;\\n\" +\n\"\tcursor: pointer;\\n\" +\n\"\toutline: inherit;'>Detailed Match</button><img id='down\"+i+\"' style='margin:-5px;height:30px;float:right' src='images/down.gif'> </h5>\");\n out.print(\"<div id='roster\"+i+\"' class='noselect' style='z-index:9900099;display:none;height:0px;position:relative;height:50%;border-radius:0px 0px 10px 10px;background:rgba(255,255,255,0.2)'>\");\n out.println(\"<div class='row itemclass' style='color:#000034;background:#47C1FA;box-shadow 1px 1px 5px #000034;width:80%;margin-left:10%;padding:10px;border-radius:5px;;margin-top:5px;margin-bottom:5px'>\");\n out.println(\"<div class='col-sm-12' >\");\n f = new DecimalFormat(\"##.00\");\n \n out.println(\"BMI Match : \" + f.format((x.getBmi() * 100)) + \"%<br>\");\n out.println(\"</div></div>\");\n\n out.println(\"<div class='row itemclass' style='color:#000034;background:#47C1FA;box-shadow 1px 1px 5px #000034;width:80%;margin-left:10%;padding:10px;border-radius:5px;;margin-top:5px;margin-bottom:5px'>\");\n out.println(\"<div class='col-sm-12' >\");\n f = new DecimalFormat(\"##.00\");\n out.println(\"Tumor Diameter Match : \" + f.format((x.getTumordiameter() * 100)) + \"%<br>\");\n out.println(\"</div></div>\");\n\n out.println(\"<div class='row itemclass' style='color:#000034;background:#47C1FA;box-shadow 1px 1px 5px #000034;width:80%;margin-left:10%;padding:10px;border-radius:5px;;margin-top:5px;margin-bottom:5px'>\");\n out.println(\"<div class='col-sm-12' >\");\n f = new DecimalFormat(\"##.00\");\n out.println(\"Age Match : \" + f.format((x.getAge() * 100)) + \"%<br>\");\n out.println(\"</div></div>\");\n\n out.println(\"<div class='row itemclass' style='color:#000034;background:#47C1FA;box-shadow 1px 1px 5px #000034;width:80%;margin-left:10%;padding:10px;border-radius:5px;;margin-top:5px;margin-bottom:5px'>\");\n out.println(\"<div class='col-sm-12' >\");\n f = new DecimalFormat(\"##.00\");\n out.println(\"Blood Group Match : \" + x.isBloodgroup() + \"<br>\");\n out.println(\"</div></div>\");\n\n out.println(\"<div class='row itemclass' style='color:#000034;background:#47C1FA;box-shadow 1px 1px 5px #000034;width:80%;margin-left:10%;padding:10px;border-radius:5px;;margin-top:5px;margin-bottom:5px'>\");\n out.println(\"<div class='col-sm-12' >\");\n f = new DecimalFormat(\"##.00\");\n out.println(\"Gender Match : \" + x.isGender() + \"<br>\");\n out.println(\"</div></div>\");\n\n out.println(\"<div class='row itemclass' style='color:#000034;background:#47C1FA;box-shadow 1px 1px 5px #000034;width:80%;margin-left:10%;padding:10px;border-radius:5px;;margin-top:5px;margin-bottom:5px'>\");\n out.println(\"<div class='col-sm-12' >\");\n f = new DecimalFormat(\"##.00\");\n out.println(\"Vegetarian Match : \" + x.isIsveg() + \"<br>\");\n out.println(\"</div></div>\");\n\n out.println(\"<div class='row itemclass' style='color:#000034;background:#47C1FA;box-shadow 1px 1px 5px #000034;width:80%;margin-left:10%;padding:10px;border-radius:5px;;margin-top:5px;margin-bottom:5px'>\");\n out.println(\"<div class='col-sm-12' >\");\n f = new DecimalFormat(\"##.00\");\n out.println(\"Cancer history match : \" + x.isCancerhistory() + \"<br>\");\n out.println(\"</div></div>\");\n\n out.println(\"<div class='row itemclass' style='color:#000034;background:#47C1FA;box-shadow 1px 1px 5px #000034;width:80%;margin-left:10%;padding:10px;border-radius:5px;;margin-top:5px;margin-bottom:5px'>\");\n out.println(\"<div class='col-sm-12' >\");\n f = new DecimalFormat(\"##.00\");\n out.println(\"Non Symptom Match : \" + f.format((x.getNonsymptom() * 100)) + \"%<br>\");\n out.println(\"</div></div>\");\n\n out.println(\"<div class='row itemclass' style='color:#000034;background:#47C1FA;box-shadow 1px 1px 5px #000034;width:80%;margin-left:10%;padding:10px;border-radius:5px;;margin-top:5px;margin-bottom:5px'>\");\n out.println(\"<div class='col-sm-12' >\");\n f = new DecimalFormat(\"##.00\");\n out.println(\"Symptom Match : \" + f.format((x.getSymptom() * 100)) + \"%<br>\");\n out.println(\"</div></div>\");\n\n out.print(\"</div>\");\n out.println(\"</div></div>\");\n \n i++;\n }\n request.getRequestDispatcher(\"includefoot.jsp\").include(request, response);\n try {\n \n } catch (Exception e) {\n };\n } catch (Exception ex) {\n Logger.getLogger(FindRank.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n //processRequest(request, response);\n String searchLikeThis = request.getParameter(\"search\");\n if ( searchLikeThis != null ) {\n List<Item> foundItems = itemService.searchItemByString(searchLikeThis);\n request.setAttribute(\"foundItems\", foundItems);\n }\n this.getServletContext().getRequestDispatcher(\"/jsp/searchObject.jsp\").forward(request, response);\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n try {\n DigitalDAO digitalDAO = new DigitalDAOImpl();\n //get the top of the latest digitals\n List<Digital> top6RecentDigitals = digitalDAO.getTopDigital(6);\n\n //begin of get txtSearch and pageRow\n String txtSearch = request.getParameter(\"txtSearch\").trim();\n String indexPageFromRequest = request.getParameter(\"txtPage\");\n request.setAttribute(\"textSearch\", txtSearch);\n indexPageFromRequest = (indexPageFromRequest == null)\n ? \"1\" : indexPageFromRequest;\n int pageIndex = 0;\n //case control when index page is not numeric\n try {\n pageIndex = Integer.parseInt(indexPageFromRequest);\n } catch (Exception e) {\n pageIndex = -1;\n }\n //end of get txtSearch and pageRow\n\n //number of digital on a page\n int pageSize = 3;\n //number of result search\n int numberOfSearchResult = digitalDAO.getNumberOfSearchResult(txtSearch);\n //maximum of page index\n int maxPage = numberOfSearchResult / pageSize\n + (numberOfSearchResult % pageSize > 0 ? 1 : 0);\n //page index existed then get corresponding degital else return massage\n if (pageIndex <= maxPage && pageIndex != -1) {\n List<Digital> listResultSearch = digitalDAO.\n searchByTitleAndPagging(pageIndex, pageSize, txtSearch);\n for (Digital digital : listResultSearch) {\n String title = digital.getTitle().toUpperCase();\n String titleRoot = digital.getTitle();\n String result = digital.getTitle();\n List<String> listTxtSearch = new ArrayList<>();\n while (title.contains(txtSearch.toUpperCase())) {\n int indexStart = title.indexOf(txtSearch.toUpperCase());\n int indexEnd = indexStart + txtSearch.length();\n String convertText = titleRoot.substring(indexStart, indexEnd);\n if(!listTxtSearch.contains(convertText)){\n listTxtSearch.add(convertText);\n }\n title = title.substring(indexEnd);\n titleRoot = titleRoot.substring(indexEnd);\n }\n for (String string : listTxtSearch) {\n result = result.replaceAll(string, \"<span class='highlightText'>\" + string + \"</span>\");\n }\n\n digital.setTitle(result);\n }\n request.setAttribute(\"listResultSearch\", listResultSearch);\n request.setAttribute(\"maxPage\", maxPage);\n } else {\n request.setAttribute(\"message\", \"This page not found\");\n }\n\n request.setAttribute(\"pageIndex\", pageIndex);\n request.setAttribute(\"shortDes\", top6RecentDigitals.get(0)\n .getShortDes());\n //store text search\n request.setAttribute(\"txtSearch\", txtSearch);\n //get the most recent digital\n request.setAttribute(\"mostRecentNew\", top6RecentDigitals.get(0));\n //store number of results search\n request.setAttribute(\"numberOfResult\", numberOfSearchResult);\n //get top5 next news have time post is most recent\n top6RecentDigitals.remove(0);\n request.setAttribute(\"top5MostRecentNew\", top6RecentDigitals);\n //send data for search page\n request.getRequestDispatcher(\"SearchResultPage.jsp\").forward(request, response);\n\n } catch (Exception ex) {\n request.setAttribute(\"exceptionMessage\", \"An error occurred while searching \");\n request.getRequestDispatcher(\"Error.jsp\").forward(request, response);\n }\n }", "@SuppressWarnings( \"unchecked\" )\n\t@Transactional\n\t@RequestMapping( value = \"/search\", method = RequestMethod.GET )\n\tpublic @ResponseBody Map<String, Object> getPublicationList( \n\t\t\t@RequestParam( value = \"query\", required = false ) String query,\n\t\t\t@RequestParam( value = \"publicationType\", required = false ) String publicationType,\n\t\t\t@RequestParam( value = \"authorId\", required = false ) String authorId,\n\t\t\t@RequestParam( value = \"eventId\", required = false ) String eventId,\n\t\t\t@RequestParam( value = \"page\", required = false ) Integer page, \n\t\t\t@RequestParam( value = \"maxresult\", required = false ) Integer maxresult,\n\t\t\t@RequestParam( value = \"source\", required = false ) String source,\n\t\t\t@RequestParam( value = \"fulltextSearch\", required = false ) String fulltextSearch,\n\t\t\t@RequestParam( value = \"year\", required = false ) String year,\n\t\t\t@RequestParam( value = \"orderBy\", required = false ) String orderBy,\n\t\t\tfinal HttpServletResponse response )\n\t{\n\t\t/* == Set Default Values== */\n\t\tif ( query == null ) \t\t\tquery = \"\";\n\t\tif ( publicationType == null ) \tpublicationType = \"all\";\n\t\tif ( page == null )\t\t\t\tpage = 0;\n\t\tif ( maxresult == null )\t\tmaxresult = 50;\n\t\tif ( fulltextSearch == null || ( fulltextSearch != null && fulltextSearch.equals( \"yes\" ) ) )\n\t\t\tfulltextSearch = \"yes\";\n\t\telse\t\t\t\t\t\t\tfulltextSearch = \"no\";\n\t\tif ( year == null || year.isEmpty() )\n\t\t\tyear = \"all\";\n\t\tif ( orderBy == null )\t\t\torderBy = \"citation\";\n\t\t// Currently, system only provides query on internal database\n\t\tsource = \"internal\";\n\t\t\t\n\t\t\n\t\t// create JSON mapper for response\n\t\tMap<String, Object> responseMap = new LinkedHashMap<String, Object>();\n\n\t\tresponseMap.put( \"query\", query );\n\t\tif ( !publicationType.equals( \"all\" ) )\n\t\t\tresponseMap.put( \"publicationType\", publicationType );\n\t\tif ( !year.equals( \"all\" ) )\n\t\t\tresponseMap.put( \"year\", year );\n\t\tresponseMap.put( \"page\", page );\n\t\tresponseMap.put( \"maxresult\", maxresult );\n\t\tresponseMap.put( \"fulltextSearch\", fulltextSearch );\n\t\tresponseMap.put( \"orderBy\", orderBy );\n\t\t\n\t\tMap<String, Object> publicationMap = publicationFeature.getPublicationSearch().getPublicationListByQuery( query, publicationType, authorId, eventId, page, maxresult, source, fulltextSearch, year, orderBy );\n\t\t\n\t\tif ( (Integer) publicationMap.get( \"totalCount\" ) > 0 )\n\t\t{\n\t\t\tresponseMap.put( \"totalCount\", (Integer) publicationMap.get( \"totalCount\" ) );\n\t\t\treturn publicationFeature.getPublicationSearch().printJsonOutput( responseMap, (List<Publication>) publicationMap.get( \"publications\" ) );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresponseMap.put( \"totalCount\", 0 );\n\t\t\tresponseMap.put( \"count\", 0 );\n\t\t\treturn responseMap;\n\t\t}\n\t}", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<>();\n\n\n params.put(\"resortName\", resortName);\n params.put(\"latitude\", String.valueOf(lat));\n params.put(\"longitude\", String.valueOf(lon));\n\n\n return params;\n }" ]
[ "0.72141033", "0.63202983", "0.6081917", "0.5971574", "0.5816054", "0.5768015", "0.56898564", "0.55173165", "0.54518926", "0.5450324", "0.5427067", "0.540273", "0.53985906", "0.5346256", "0.532935", "0.53226817", "0.5273369", "0.5243411", "0.52239466", "0.52187246", "0.5202719", "0.51998615", "0.5193662", "0.5185669", "0.51750803", "0.51734686", "0.51699454", "0.5160554", "0.51484627", "0.51453096", "0.5125709", "0.51243424", "0.5064383", "0.5056803", "0.50464976", "0.50378376", "0.50324976", "0.50273794", "0.5012705", "0.50066215", "0.5003951", "0.4998204", "0.49965572", "0.49964127", "0.49960658", "0.4995786", "0.4986249", "0.49854484", "0.4983647", "0.4961033", "0.4960169", "0.49465647", "0.49420214", "0.4941106", "0.49405763", "0.4939238", "0.49392304", "0.4934436", "0.49343008", "0.49307328", "0.4930704", "0.49255544", "0.4921744", "0.491712", "0.4915945", "0.49087977", "0.49018553", "0.48983428", "0.48982084", "0.48942813", "0.4888693", "0.48867315", "0.48834312", "0.48834032", "0.4868982", "0.48676372", "0.48646063", "0.48607177", "0.48543712", "0.48512468", "0.48484966", "0.48465425", "0.48452005", "0.48434758", "0.4841598", "0.4839167", "0.48377535", "0.48376793", "0.48358488", "0.4829381", "0.482926", "0.4828652", "0.48274535", "0.4824399", "0.48239517", "0.48220026", "0.48115683", "0.48052862", "0.48044333", "0.4803691" ]
0.712644
1
Method extracted to avoid checkstyle issue.
private Map<String, String> getReportMap(final Map<String, String> request) { Map<String, String> reportMap; reportMap = new LinkedHashMap<String, String>(); reportMap.put(CommonConstants.KEYWORD, request.get(RequestAttributeConstant.QUERY_SEARCH)); reportMap.put(DomainConstants.REFINEMENT_ID, request.get(RequestAttributeConstant.REFINEMENT_ID)); reportMap.put(DomainConstants.LIMIT, request.get(RequestAttributeConstant.LIMIT)); reportMap.put(DomainConstants.OFFSET, request.get(RequestAttributeConstant.OFFSET)); return reportMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private PrngFixes() {\n }", "private stendhal() {\n\t}", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public void smell() {\n\t\t\n\t}", "@Override\n\tpublic void check() {\n\t\t\n\t}", "@Override\n\tpublic void check() {\n\t\t\n\t}", "protected void finishLocalSetup() throws CheckstyleException\n {\n }", "private CheckingTools() {\r\n super();\r\n }", "private static void runTestCWE9() {\n}", "private static void runTestCWE9() {\n}", "public void method_4270() {}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "protected Problem() {/* intentionally empty block */}", "private static void runTestCWE7() {\n}", "private static void runTestCWE7() {\n}", "protected void thoroughInspection() {}", "public final void mo51373a() {\n }", "@Override\n\tpublic void selfValidate() {\n\t\t\n\t}", "private Util() { }", "private static void runTestCWE8() {\n}", "private static void runTestCWE8() {\n}", "@Override\r\n\tprotected void validate() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "private static void runTestCWE4() {\n}", "private static void runTestCWE4() {\n}", "private FormatUtilities() {}", "private CanonizeSource() {}", "private static void runTestCWE6() {\n}", "private static void runTestCWE6() {\n}", "private void m50366E() {\n }", "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}", "private static void runTestCWE5() {\n}", "private static void runTestCWE5() {\n}", "private JacobUtils() {}", "@Override\n\t\tpublic void checkPreconditions() {\n\t\t}", "public void m9741j() throws cf {\r\n }", "private CheckUtil(){ }", "protected Checkpoint() {\n super();\n }", "protected boolean func_70041_e_() { return false; }", "protected void validate() {\n // no implementation.\n }", "@Override\r\n protected void parseIssues()\r\n {\n\r\n }", "private LineStyleUtils() {\n\n }", "protected OpinionFinding() {/* intentionally empty block */}", "@Override\n\tvoid checkConsistency()\n\t{\n\t\t\n\t}", "private static void runTestCWE2() {\n}", "private static void runTestCWE2() {\n}", "private ReportGenerationUtil() {\n\t\t\n\t}", "private static void runTestCWE1() {\n}", "private static void runTestCWE1() {\n}", "private void level7() {\n }", "private Validations() {\n\t\tthrow new IllegalAccessError(\"Shouldn't be instantiated.\");\n\t}", "protected boolean func_70814_o() { return true; }", "private BuilderUtils() {}", "@Override\n public int describeContents() { return 0; }", "public void m23075a() {\n }", "private final zzgy zzgb() {\n }", "@Override\n\tpublic void check() throws Exception {\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void validate()\n\t{\n\n\t}", "protected void validate() {\n // no op\n }", "public void check() throws XMLBuildException {\r\n\r\n\t}", "public void check() throws XMLBuildException {\r\n\r\n\t}", "@Override\r\n\tpublic void validate() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "public void styleMe(){\n\t}", "private void getStatus() {\n\t\t\n\t}", "private SparkseeUtils()\n {\n /*\n * Intentionally left empty.\n */\n }", "private ValidationUtils() {}", "@Override\n\tpublic void validate() {\n\t}", "@Override\r\n public void validate() {\n\r\n }", "void check() throws YangException;", "@Override\n protected void checkSubclass() {\n }", "private void kk12() {\n\n\t}", "@Override\r\n public void validate() {\r\n }", "private Solution() {\n /**.\n * { constructor }\n */\n }", "protected void onCompileInternal() {\r\n\t}", "private XhtmlUtils()\n\t{\n\t}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "public final void mo91715d() {\n }", "@Override public int describeContents() { return 0; }", "private void correctError()\r\n\t{\r\n\t\t\r\n\t}", "private RdfFormatUtils() {\n }", "@Override\n public void preprocess() {\n }", "private Infer() {\n\n }", "private CostHelper() {}", "@Override\n protected void checkLocation() {\n // nothing\n }", "static void ignore() {\n }", "private Unescaper() {\n\n\t}", "private IgnoreListHelper() {\n\t}", "public TestIssue13() { // explicit to avoid a warning from JDK 18 javadoc\r\n }", "GorgeousFormatter() {\r\n\t\t}", "private test5() {\r\n\t\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "private Util() {\n }", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}" ]
[ "0.6027728", "0.5966059", "0.5901656", "0.5901656", "0.58614933", "0.57672286", "0.57672286", "0.5723927", "0.5716693", "0.5679723", "0.5679723", "0.56663", "0.56655717", "0.5653903", "0.5648504", "0.5620337", "0.5620337", "0.56190974", "0.5606104", "0.5600259", "0.5600108", "0.55977356", "0.55977356", "0.55882716", "0.55721325", "0.55658466", "0.55658466", "0.55526924", "0.5551708", "0.5545613", "0.5545613", "0.5536048", "0.5535714", "0.5523825", "0.5523825", "0.5520745", "0.5506747", "0.5489523", "0.5466287", "0.54398227", "0.54264194", "0.5420815", "0.54146844", "0.5406305", "0.5389574", "0.5383538", "0.53829044", "0.53829044", "0.5373243", "0.53704", "0.53704", "0.53558457", "0.5354571", "0.53361", "0.53308505", "0.53231317", "0.53118503", "0.53056324", "0.5301404", "0.5295464", "0.5293225", "0.52734566", "0.5264487", "0.5264487", "0.52573", "0.52544975", "0.5246931", "0.5246461", "0.5243052", "0.5238369", "0.52382827", "0.52348226", "0.5233203", "0.52328837", "0.5222369", "0.52211374", "0.5219665", "0.5218171", "0.5217456", "0.5202605", "0.5202605", "0.5202605", "0.5202605", "0.5198448", "0.5198398", "0.51908946", "0.5177878", "0.51747763", "0.5171881", "0.51674724", "0.516715", "0.5165234", "0.5164564", "0.51433694", "0.5140777", "0.5140275", "0.51332504", "0.5132569", "0.5129249", "0.5127836", "0.5127836" ]
0.0
-1
The method will build the query for price range.
private void buildPriceRange( final Map<String, List<String>> searchCriteria, final String pipeSeparatedString, final String correlationId) throws BaseException { final String[] commaSeparated = pipeSeparatedString .split(CommonConstants.FIELD_PAIR_SEPARATOR); final String[] priceData = commaSeparated[1] .split(CommonConstants.COMMA_SEPERATOR); final Map<String, String> errorPropertiesMap = this.errorLoader .getErrorPropertiesMap(); if (priceData.length == 2) { try { Double.parseDouble(priceData[0]); Double.parseDouble(priceData[1]); } catch (final NumberFormatException e) { LOGGER.error(e, correlationId); throw new BaseException( String.valueOf(ErrorConstants.ERROR_CODE_11422), errorPropertiesMap.get(String .valueOf(ErrorConstants.ERROR_CODE_11422)), RequestAttributeConstant.PRICE, priceData[0] + CommonConstants.COMMA_SEPERATOR + priceData[1], ErrorConstants.HTTP_STATUS_CODE_INVALID_URL_PARAMETERS, correlationId); } final String priceRange = commaSeparated[0] + CommonConstants.FIELD_PAIR_SEPARATOR + EndecaConstants.FILTER_PRICE + EndecaConstants.BETWEEN + CommonConstants.EMPTY_VALUE + priceData[0] + CommonConstants.EMPTY_VALUE + priceData[1]; final List<String> attrList = new ArrayList<String>(); final String data = searchCriteria .get(RequestAttributeConstant.ATTR) .get(0) .replace(commaSeparated[0] + ":" + commaSeparated[1], priceRange); attrList.add(data); searchCriteria.remove(RequestAttributeConstant.ATTR); searchCriteria.put(RequestAttributeConstant.ATTR, attrList); // Filtering based on price should be range based and if not // it will be a validation error } else { throw new BaseException( String.valueOf(ErrorConstants.ERROR_CODE_11422), errorPropertiesMap.get(String .valueOf(ErrorConstants.ERROR_CODE_11422)), RequestAttributeConstant.ATTR, pipeSeparatedString, ErrorConstants.HTTP_STATUS_CODE_INVALID_URL_PARAMETERS, correlationId); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GiftCardProductQuery priceRange(PriceRangeQueryDefinition queryDef) {\n startField(\"price_range\");\n\n _queryBuilder.append('{');\n queryDef.define(new PriceRangeQuery(_queryBuilder));\n _queryBuilder.append('}');\n\n return this;\n }", "@Override\r\n\tpublic List<Price> queryPriceBei(Date start,Date end) {\n\t\tList<Price> list = homePageDao.queryPriceBei(start,end);\r\n\t\treturn list;\r\n\t}", "static Predicate<Beer> priceRangeQuery(Float priceLowest, Float priceHighest) {\n return b -> b.getPrice() >= priceLowest && b.getPrice() <= priceHighest;\n }", "DbQuery setRangeFilter(double startValue, double endValue) {\n filter = Filter.RANGE;\n filterType = FilterType.DOUBLE;\n this.startAt = startValue;\n this.endAt = endValue;\n return this;\n }", "public void createPriceRange() {\n final CharSequence[] priceRange = {\"$\", \"$$\", \"$$$\"};\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n builder.setTitle(\"Price Range\");\n builder.setItems(priceRange, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n System.out.println(priceRange[which]);\n String type = (String) priceRange[which];\n if (type.equals(\"$\")) {\n restList.clear();\n restList = rDB.GetRestaurants(null, null, null);\n } else if (type.equals(\"$$\")) {\n restList.clear();\n restList = rDB.GetRestaurants(null, null, null);\n } else if (type.equals(\"$$$\")) {\n restList.clear();\n restList = rDB.GetRestaurants(null, null, null);\n }\n dialog.dismiss();\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n builder.create();\n\n builder.show();\n\n }", "public List<Hotel> findByPriceBetween(double low, double high);", "@Override\r\n\tpublic List<Price> queryCheng(Date start,Date end) {\n\t\tList<Price> list = homePageDao.queryCheng(start,end);\r\n\t\treturn list;\r\n\t}", "DbQuery setRangeFilter(int startValue, int endValue) {\n return setRangeFilter((double) startValue, (double) endValue);\n }", "List<Item> findByPriceBetween(double minPrice, double maxPrice);", "DbQuery setRangeFilter(long startValue, long endValue) {\n return setRangeFilter((double) startValue, (double) endValue);\n }", "public SolrQuery buildSolrQueryForPeriod(String query, String startDate, String endDate) {\n log.info(\"query between \" + startDate + \"T00:00:00Z and \" + endDate + \"T23:59:59Z\");\n SolrQuery solrQuery = new SolrQuery();\n solrQuery.setQuery(query); //Smurf labs forces text:query\n solrQuery.setRows(0); // 1 page only\n solrQuery.add(\"fl\", \"id\");// rows are 0 anyway\n solrQuery.add(\"fq\",\"content_type_norm:html\"); // only html pages\n solrQuery.add(\"fq\",\"crawl_date:[\" + startDate + \"T00:00:00Z TO \" + endDate + \"T23:59:59Z]\");\n return solrQuery;\n }", "public List<FieldQuery> getQuery() {\n List<FieldQuery> query = new ArrayList<>();\n query.add(new FieldQuery(\"openPrice\", 1 , 47.25, \"Double\"));\n query.add(new FieldQuery(\"openPrice\", 1 , 47.65, \"Double\"));\n return query;\n }", "private Query getDoubleRange(final String fieldName, String[] range) {\n double lower = Double.parseDouble(range[0]);\n double upper = Double.parseDouble(range[1]);\n return DoublePoint.newRangeQuery(fieldName, lower, upper);\n }", "List<Product> findByPriceBetweenOrderByPriceAsc(double from, double to);", "public List<Equipment> findByPriceRange(int from, int to){\n List<Equipment> foundEquipment = new ArrayList<>();\n for(Equipment e: equipment){\n if (e.getPrice() <= to && e.getPrice() >= from){\n foundEquipment.add(e);\n }\n }\n return foundEquipment;\n }", "DbQuery setRangeFilter(String startValue, String endValue) {\n filter = Filter.RANGE;\n filterType = FilterType.STRING;\n this.startAt = startValue;\n this.endAt = endValue;\n return this;\n }", "@Override\n public List<UserQuery> getQueries(LocalDateTime rangeStart, LocalDateTime rangeEnd) {\n return jdbi.withHandle(handle -> {\n handle.registerRowMapper(ConstructorMapper.factory(UserQuery.class));\n return handle.createQuery(UserQuery.getExtractQuery(rangeStart, rangeEnd))\n .mapTo(UserQuery.class)\n .list();\n });\n }", "public String listFurnitureInPriceRange(double min, double max) {\r\n\t\t StringBuilder sb = new StringBuilder();\r\n for (Iterator<Furniture> it = furniture.iterator(); it.hasNext();) {\r\n\t\t\t Furniture f = (Furniture) it.next();\r\n if ((f.price() >= min) && (f.price() <= max))\r\n\t\t\t\t sb.append(f.toString() + NL);\r\n }\r\n return sb.toString();\r\n }", "public void filterRangePrices(double minPrice, double maxPrice){\n market.filterRangePrices(minPrice, maxPrice);\n car = market.filters;\n }", "@Override\n\tpublic TypedQuery<Plan> constructQuery(Map<String, String> customQuery) {\n\t\tCriteriaBuilder cb = null;\n\t\ttry {\n\t\t\tcb = em.getCriteriaBuilder();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tCriteriaQuery<Plan> cq = cb.createQuery(Plan.class);\n\t\tRoot<Plan> plan = cq.from(Plan.class);\n\t\tPredicate existingpredicate = null;\n\t\tint predicateCount=0;\n\t\tPredicate masterPredicate=null;\n\n\t\ttry {\n\n\t\t\tfor (Map.Entry<String,String> entry : customQuery.entrySet()) \n\t\t\t{\n\t\t\t\tif(plan.get(entry.getKey().toString()) != null)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t//Query for range values with comma(,) as delimiter\n\t\t\t\t\tif(entry.getValue().contains(\",\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tint minRange=Integer.parseInt(customQuery.get(entry.getKey().toString()).split(\",\")[0]);\n\t\t\t\t\t\tint maxRange=Integer.parseInt(customQuery.get(entry.getKey().toString()).split(\",\")[1]);\n\t\t\t\t\t\tif(predicateCount==0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmasterPredicate = cb.between(plan.get(entry.getKey().toString()),minRange, maxRange );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\texistingpredicate = cb.between(plan.get(entry.getKey().toString()),minRange, maxRange );\n\t\t\t\t\t\t\tmasterPredicate=cb.and(masterPredicate,existingpredicate);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpredicateCount++;\n\t\t\t\t\t}\n\t\t\t\t\t//Query for equals values\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(predicateCount==0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmasterPredicate = cb.equal(plan.get(entry.getKey().toString()), customQuery.get(entry.getKey().toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\texistingpredicate = cb.equal(plan.get(entry.getKey().toString()), customQuery.get(entry.getKey().toString()));\n\t\t\t\t\t\t\tmasterPredicate=cb.and(masterPredicate,existingpredicate);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpredicateCount++;\n\t\t\t\t\t\t//cq.where(predicate);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcq.where(masterPredicate);\n\t\tTypedQuery<Plan> query = em.createQuery(cq);\n\t\treturn query;\n\t}", "private String range(double and_load_factor) {\n\t\tStringBuilder s = new StringBuilder();\n\n\t\t// begin query construction (range query is always an OR)\n\t\ts.append(\"[r,|,\");\n\n\t\t// choose number of attributes to involve in the query (use zipf(num_attribute))\n\t\tint attr_id = this.zipf_rng_att.next();\n\n\t\t//a range query from [bin_0, ..., bin_high]\n\t\tint first_bin = -1;\n\t\tint second_bin = -1;\n\t\twhile (first_bin == second_bin) {\n\t\t\tfirst_bin = this.rank_bin_map[attr_id][zipf_rng_bin.next()];\n\t\t\tsecond_bin = this.rank_bin_map[attr_id][zipf_rng_bin.next()];;\n\t\t}\n\t\tfirst_bin += (attr_id) * this.cardinality;\n\t\tsecond_bin += (attr_id) * this.cardinality;\n\n\t\tif (first_bin > second_bin) {\n\t\t\ts.append(second_bin + \",\" + first_bin + \"]\");\n\t\t}\n\t\telse {\n\t\t\ts.append(first_bin + \",\" + second_bin + \"]\");\n\t\t}\n\n\n\n\t\t//update stats\n\t\tthis.num_bins += (second_bin - first_bin + 1);\n\t\tthis.num_or_ops += (second_bin - first_bin);\n\n\t\t//update stats\n\t\tthis.num_range_queries++;\n\t\tthis.num_attributes++;\n\t\treturn s.toString();\n\t}", "@Override\n public BigDecimal getStatement(Range<Date> range) {\n return null;\n }", "@UsesAdsUtilities({AdsUtility.SELECTOR_BUILDER})\n SelectorBuilderInterface<SelectorT> forDateRange(DateTime start, DateTime end);", "void calculateRange() {\n //TODO: See Rules\n }", "public void setRange(int min, int max) {\n range = new PriceRange();\n range.setMaximum(max);\n range.setMinimum(min);\n }", "private Filter rangeFilter(String start, String end, Object minValue, Object maxValue) {\n Filter f1 = FF.lessOrEqual(FF.property(start), FF.literal(maxValue));\n Filter f2 = FF.greaterOrEqual(FF.property(end), FF.literal(minValue));\n return FF.and(Arrays.asList(f1, f2));\n\n// Filter f1 = FF.greaterOrEqual(FF.property(start), FF.literal(minValue));\n// Filter f2 = FF.lessOrEqual(FF.property(end), FF.literal(maxValue));\n// return FF.and(Arrays.asList(f1, f2));\n }", "public BetweenCriteria(String attributeName, Object lowerBound, Object upperBound) {\n super(attributeName, lowerBound);\n this.upperBound = upperBound;\n }", "private Query getIntRange(final String fieldName, String[] range) {\n int lower = Integer.parseInt(range[0]);\n int upper = Integer.parseInt(range[1]);\n return IntPoint.newRangeQuery(fieldName, lower, upper);\n }", "public NumericRangeFilter() {\n this(0.00, 999999.99);\n }", "protected String getJPARangeClause(long lowerBound, long upperBound, Map<String, Object> params) {\n params.put(\"lowerBound\", lowerBound);\n params.put(\"upperBound\", upperBound);\n return \"log.id > :lowerBound and log.id <= :upperBound\";\n }", "private static SolrQuery getSolrQuery(OrganizationSearch4Solr request, int start, int end) {\n\t\tSolrQuery query = new SolrQuery();\r\n\t\tquery.setHighlight(true).setStart(start);\r\n query.setTermsLimit(500);\r\n query.setRows(20000);\r\n Map<String, String> map = new HashMap<String, String>();\r\n map.put(\"wt\", \"json\");\r\n map.put(\"indent\", \"true\");\r\n StringBuilder queryPrams = new StringBuilder();\r\n queryPrams.append(\"{!q.op=OR}+isOutOfBusiness:false AND \");\r\n if (!StringUtils.isEmpty(request.getOrgId())) {\r\n \tqueryPrams.append(\"organizationId:\" + request.getOrgId() + \" AND \");\r\n }\r\n if (!StringUtils.isEmpty(request.getSiteinstanceId())) {\r\n \tqueryPrams.append(\"siteInstanceId:\" + request.getSiteinstanceId() + \" AND \");\r\n }\r\n List<String> orgIdList = request.getOrgIdList();\r\n if (orgIdList != null && orgIdList.size() > 0) {\r\n \tString idsString = \"+organizationId:(\";\r\n \tfor (String orgId : orgIdList) {\r\n \tidsString += orgId + \" \";\r\n\t\t\t}\r\n \tidsString = idsString.substring(0, idsString.length()-1) + \")\";\r\n \tqueryPrams.append(idsString + \" AND \");\r\n }\r\n if (!StringUtils.isEmpty(request.getTaxID())) {\r\n \tqueryPrams.append(\"taxIds:(\\\"\" + request.getTaxID() + \"\\\") AND \");\r\n }\r\n String orgName = request.getOrgName();\r\n if (!StringUtils.isEmpty(orgName)) {\r\n \torgName = \"(\"+ orgName +\")\";\r\n \t\t// LATIN\r\n \t\tqueryPrams.append(\"(+(organizationExtendedName:\" + orgName + \" \");\r\n \t\t// NOLATIN\r\n \t\tqueryPrams.append(\"organizationNonLatinExtendedName:\" + orgName + \" \");\r\n \t\t// ReportingName\r\n \t\tqueryPrams.append(\"organizationReportingName:\" + orgName + \" \");\r\n \t\t// LegalName\r\n \t\tqueryPrams.append(\"organizationLegalName:\" + orgName + \" \");\r\n \t\t// tradeName\r\n \t\tqueryPrams.append(\"tradeStyleNames:\" + orgName + \")) AND \");\r\n }\r\n String cityName = request.getCityName();\r\n if (!StringUtils.isEmpty(cityName)) {\r\n \t\t// LATIN\r\n \t\tqueryPrams.append(\"(+(latinCity:(\\\"\" + cityName + \"\\\") \");\r\n \t\t// NOLATIN\r\n \t\tqueryPrams.append(\"nonlatinCity:(\\\"\" + cityName + \"\\\"))) AND \");\r\n }\r\n if (!StringUtils.isEmpty(request.getPostalCode())) {\r\n queryPrams.append(\"postalCode:(\" + request.getPostalCode() + \"*) AND \");\r\n }\r\n if (!StringUtils.isEmpty(request.getCountryCode())) {\r\n queryPrams.append(\"countryCode:(\" + request.getCountryCode() + \") AND \");\r\n }\r\n String state = request.getStateProvinceName();\r\n if (!StringUtils.isEmpty(state)) {\r\n \tif(state.matches(\"\\\\p{ASCII}+\")){\r\n \t\t// LATIN\r\n queryPrams.append(\"state:(\\\"\" + state + \"\\\") AND \");\r\n \t}else{\r\n \t\t// NOLATIN\r\n queryPrams.append(\"state:(\\\"\" + state + \"\\\") AND \");\r\n \t}\r\n }\r\n\r\n queryPrams.append(\" *:* \");\r\n \r\n SolrParams params = new MapSolrParams(map);\r\n \r\n query.add(params);\r\n query.setQuery(queryPrams.toString());\r\n\t\treturn query;\r\n\t}", "public void testQueryDateRange() throws Exception {\n //db.expense.find({ date: { $gte:ISODate(\"2018-02-19T14:00:00Z\"), $lt: ISODate(\"2018-03-19T20:00:00Z\") } })\n /*BasicQuery query = new BasicQuery(\"{ date: { $gte:ISODate(\\\"2018-02-19T14:00:00Z\\\"), $lt: ISODate(\\\"2018-02-27T20:00:00Z\\\") } }\");\n List<Expense> expenses = mongoOperation.find(query, Expense.class);\n\n for(Expense e: expenses){\n System.out.println(e.toString());\n }*/\n // query.addCriteria(Criteria.where(\"age\").lt(50).gt(20));\n //List<User> users = mongoTemplate.find(query,User.class);\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\n Date d1 = sdf.parse(\"01/01/2018\");\n Date d2 = sdf.parse(\"01/02/2018\");\n\n\n List<Expense> expenses = expenseRepository.findByDateBetween(d1, d2);\n\n for (Expense e : expenses) {\n System.out.println(e.toString());\n }\n\n }", "private String buildSoqlQuery(String entityName, String selectQueryFragment, Date startDate, Date endDate) {\r\n\t\tStringBuilder completeQuery = new StringBuilder(\"\");\r\n\t\tcompleteQuery.append(selectQueryFragment);\r\n\t\tcompleteQuery.append(ConstantesBulkApi.ALL_ENTITIES_FROM_CLAUSE);\r\n\t\tcompleteQuery.append(entityName);\r\n\t\t\r\n\t\tswitch (entityName) {\r\n\t\t\tcase ConstantesBulkApi.ENTITY_ADDRESS:\r\n\t\t\t\tcompleteQuery.append(ConstantesBulkApi.ADDRESS_ENTITY_WHERE_CLAUSE);\r\n\t\t\t\tbreak;\r\n\t\t\tcase ConstantesBulkApi.ENTITY_REPEATED_CASES:\r\n\t\t\t\tcompleteQuery.append(ConstantesBulkApi.WITHOUT_COUNTRY_ENTITIES_WHERE_CLAUSE);\r\n\t\t\t\tbreak;\r\n\t\t\tcase ConstantesBulkApi.ENTITY_GROUP:\r\n\t\t\t\tcompleteQuery.append(ConstantesBulkApi.WITHOUT_COUNTRY_ENTITIES_WHERE_CLAUSE);\r\n\t\t\t\tbreak;\r\n\t\t\tcase ConstantesBulkApi.ENTITY_CASE_COMMENT:\r\n\t\t\t\tcompleteQuery.append(ConstantesBulkApi.CASE_COMMENT_ENTITY_WHERE_CLAUSE);\r\n\t\t\t\tbreak;\r\n\t\t\tcase ConstantesBulkApi.ENTITY_CASE_HISTORY:\r\n\t\t\t\tcompleteQuery.append(ConstantesBulkApi.CASE_HISTORY_ENTITY_WHERE_CLAUSE);\r\n\t\t\t\tbreak;\r\n\t\t\tcase ConstantesBulkApi.ENTITY_TASK:\r\n\t\t\t\tcompleteQuery.append(ConstantesBulkApi.TASK_ENTITY_WHERE_CLAUSE);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tcompleteQuery.append(ConstantesBulkApi.ALL_ENTITIES_BASIC_WHERE_CLAUSE);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tif (ConstantesBulkApi.ENTITY_CASE_HISTORY.equals(entityName)) {\r\n\t\t\tcompleteQuery.append(\"AND (\").append(ConstantesBulkApi.OBJECT_CREATED_DATE_WHERE_CLAUSE);\r\n\t\t} else if (ConstantesBulkApi.ENTITY_REPEATED_CASES.equals(entityName) || ConstantesBulkApi.ENTITY_GROUP.equals(entityName)) {\r\n\t\t\tcompleteQuery.append(\" (\").append(ConstantesBulkApi.OBJECT_LAST_MODIFIED_DATE_WHERE_CLAUSE);\r\n\t\t} else {\r\n\t\t\tcompleteQuery.append(\"AND (\").append(ConstantesBulkApi.OBJECT_LAST_MODIFIED_DATE_WHERE_CLAUSE);\r\n\t\t}\r\n \t\tcompleteQuery.append(\" >= \").append(Utils.parseDateToString(startDate));\r\n\t\tif (ConstantesBulkApi.ENTITY_CASE_HISTORY.equals(entityName)) {\r\n\t\t\tcompleteQuery.append(\" AND \").append(ConstantesBulkApi.OBJECT_CREATED_DATE_WHERE_CLAUSE);\r\n\t\t} else {\r\n\t\t\tcompleteQuery.append(\" AND \").append(ConstantesBulkApi.OBJECT_LAST_MODIFIED_DATE_WHERE_CLAUSE);\r\n\t\t}\r\n\t\tcompleteQuery.append(\" <= \").append(Utils.parseDateToString(endDate)).append(\")\");\r\n\t\tLOGGER.debug(\"Consulta a realizar: \" + completeQuery);\r\n\t\treturn completeQuery.toString();\r\n\t}", "public DateRange getDateRange();", "List<ResultsView2> findByCnoBetween(int min,int max);", "@Query(\"from Flight as f where f.fare.fare <= 5000\")\n\tList<Flight> filterFlightsByPrice();", "public List<QueryStats> getQueryStats(boolean inTest,\n LocalDateTime rangeStart, LocalDateTime rangeEnd) {\n return jdbi.withHandle(handle -> {\n handle.registerRowMapper(ConstructorMapper.factory(QueryStats.class));\n return handle.createQuery(inTest ? QueryStats.getExtractQueryinTest(rangeStart, rangeEnd)\n : QueryStats.getExtractQuery(rangeStart, rangeEnd))\n .mapTo(QueryStats.class)\n .list();\n });\n }", "private ArticleSearchQuery.SearchCriterion parseDateRange(String dateRangeParam, LocalDate startDate, LocalDate endDate) {\n ArticleSearchQuery.SearchCriterion dateRange = ArticleSearchQuery.SolrEnumeratedDateRange.ALL_TIME;\n if (!Strings.isNullOrEmpty(dateRangeParam)) {\n dateRange = ArticleSearchQuery.SolrEnumeratedDateRange.valueOf(dateRangeParam);\n } else if (startDate != null && endDate != null) {\n dateRange = new ArticleSearchQuery.SolrExplicitDateRange(\"explicit date range\",\n startDate.toString(), endDate.toString());\n }\n return dateRange;\n }", "@Query(\n value = \"SELECT d\\\\:\\\\:date\\n\" +\n \"FROM generate_series(\\n\" +\n \" :startDate\\\\:\\\\:timestamp without time zone,\\n\" +\n \" :endDate\\\\:\\\\:timestamp without time zone,\\n\" +\n \" '1 day'\\n\" +\n \" ) AS gs(d)\\n\" +\n \"WHERE NOT EXISTS(\\n\" +\n \" SELECT\\n\" +\n \" FROM bookings\\n\" +\n \" WHERE bookings.date_range @> d\\\\:\\\\:date\\n\" +\n \" );\",\n nativeQuery = true)\n List<Date> findAvailableDates(@Param(\"startDate\") LocalDate startDate, @Param(\"endDate\") LocalDate endDate);", "public static List<OptionPricing> getPriceHistory(Date startTradeDate, Date endTradeDate, Date expiration, double strike, String callPut) {\r\n\t\t\r\n\t\tEntityManagerFactory emf = Persistence.createEntityManagerFactory(\"JPAOptionsTrader\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\t\r\n\t\t// Note: table name refers to the Entity Class and is case sensitive\r\n\t\t// field names are property names in the Entity Class\r\n\t\tQuery query = em.createQuery(\"select opt from \" + TradeProperties.SYMBOL_FOR_QUERY + \" opt where \"\r\n\t\t\t\t+ \"opt.trade_date >= :startTradeDate \" \r\n\t\t\t\t+ \"and opt.trade_date <= :endTradeDate \" \r\n\t\t\t\t+ \"and opt.expiration=:expiration \"\t\r\n\t\t\t\t+ \"and opt.call_put = :call_put \"\r\n\t\t\t\t+ \"and opt.strike = :strike \"\r\n\t\t\t\t+ \" order by opt.trade_date\");\r\n\t\t\r\n\t\tquery.setParameter(\"startTradeDate\", startTradeDate);\r\n\t\tquery.setParameter(\"endTradeDate\", endTradeDate);\r\n\t\tquery.setParameter(\"expiration\", expiration);\r\n\t\tquery.setParameter(\"call_put\", callPut);\r\n\t\tquery.setParameter(\"strike\", strike);\r\n\t\t\r\n\t\tquery.setHint(\"odb.read-only\", \"true\");\r\n\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<OptionPricing> options = query.getResultList();\r\n\t\t\r\n\t\tem.close();\r\n\t\t\r\n\t\treturn options;\r\n\t}", "List<SpotPrice> getByCommodityAndFromDateAndToDateAndLocation(\n Commodity commodity,\n Date fromDate,\n Date toDate,\n Location location\n );", "@Query(\"select dailyReservation from DailyReservation dailyReservation where dailyReservation.date between :startDate and :endDate\")\n List<DailyReservation> findAllDailyReservation(@Param(\"startDate\") LocalDate startDate, @Param(\"endDate\") LocalDate endDate );", "public Query createQuery() {\n\n String queryString = getQueryString();\n\n if (debug == true) {\n logger.info( \"Query String: {0}\", queryString);\n logger.info( \"Parameters: Max Results: {0}, First result: {1}, Order By: {2}, Restrictions: {3}, Joins: {4}\", new Object[]{maxResults, firstResult, orderBy, normalizedRestrictions, joins});\n }\n\n Query query = entityManager.createQuery(queryString);\n\n List<QueryParameter> parameters = getQueryParameters();\n for (QueryParameter parameter : parameters) {\n //dates (Date and Calendar)\n if (parameter.getTemporalType() != null && (parameter.getValue() instanceof Date || parameter.getValue() instanceof Calendar)) {\n if (parameter.getValue() instanceof Date) {\n if (parameter.getPosition() != null) {\n query.setParameter(parameter.getPosition(), (Date) parameter.getValue(), parameter.getTemporalType());\n } else {\n if (parameter.getProperty() != null) {\n query.setParameter(parameter.getProperty(), (Date) parameter.getValue(), parameter.getTemporalType());\n }\n }\n } else if (parameter.getValue() instanceof Calendar) {\n if (parameter.getPosition() != null) {\n query.setParameter(parameter.getPosition(), (Calendar) parameter.getValue(), parameter.getTemporalType());\n } else {\n if (parameter.getProperty() != null) {\n query.setParameter(parameter.getProperty(), (Calendar) parameter.getValue(), parameter.getTemporalType());\n }\n }\n }\n } else {\n if (parameter.getPosition() != null) {\n query.setParameter(parameter.getPosition(), parameter.getValue());\n } else {\n if (parameter.getProperty() != null) {\n query.setParameter(parameter.getProperty(), parameter.getValue());\n }\n }\n }\n }\n\n if (maxResults != null) {\n query.setMaxResults(maxResults);\n }\n if (firstResult != null) {\n query.setFirstResult(firstResult);\n }\n return query;\n }", "private void addDateRangeFiltering(Map params, String dateProperty, Date startDate, Date endDate) {\n\n\t\t// date range filter is enabled\n\t\tif (dateProperty != null) {\n\n\t\t\tparams.put(IReportDAO.DATE_COLUMN, dateProperty);\n\t\t\tString check = (String) params.get(IReportDAO.DATE_COLUMN);\n\t\t\tif (check.equalsIgnoreCase(\"lastModifiedTime\")) {\n\t\t\t\t// from date\n\t\t\t\tparams.put(IReportDAO.FROM_DATE, null);\n\t\t\t\t// to date\n\t\t\t\tparams.put(IReportDAO.TO_DATE, null);\n\t\t\t} else {\n\t\t\t\t// from date\n\t\t\t\tparams.put(IReportDAO.FROM_DATE, startDate);\n\t\t\t\t// to date\n\t\t\t\tparams.put(IReportDAO.TO_DATE, endDate);\n\t\t\t}\n\n\t\t}\n\t}", "@Override\n\tpublic <T> List<T> dynamicQuery(\n\t\tDynamicQuery dynamicQuery, int start, int end) {\n\n\t\treturn csclPollsChoicePersistence.findWithDynamicQuery(\n\t\t\tdynamicQuery, start, end);\n\t}", "public List<TblPurchaseOrder>getAllDataPurchaseOrder(Date startDate,Date endDate,TblPurchaseOrder po,TblSupplier supplier);", "public void executeItemRangeSql() throws SQLException {\n\t\tSqlStatement rangeSqlStatement = getRangeSqlStatement();\n\t\tlog.debug(\"Item range database query: \" + rangeSqlStatement.getQuery());\n\t\tlog.debug(\"Item range statement parameters: \" + rangeSqlStatement.getParams());\n\t\t\n\t\tthis.itemRangeStatement = this.con.prepareStatement(rangeSqlStatement.getQuery());\n\t\trangeSqlStatement.propagateStatementWithParams(this.itemRangeStatement);\n\t\t\n\t\t/*if (this.itemRangeCount != null && (this.itemRangeCount.longValue() < 1000)) {\n\t\t\tthis.itemRangeStatement.setFetchSize(this.itemRangeCount.intValue());\n\t\t}*/\n\t\t\n\t\tthis.itemRangeResultSet = this.itemRangeStatement.executeQuery();\n\t}", "@Test\n\tpublic void shouldReturnPagedOpenDocumentsForCustomRetailFilteredByAmountRange()\n\t{\n\t\tfinal SearchPageData<B2BDocumentModel> result = pagedB2BDocumentDao.getPagedDocumentsForUnit(UNIT_CUSTOM_RETAIL,\n\t\t\t\tcreatePageableData(0, 10, StringUtils.EMPTY), Collections.singletonList(AccountSummaryAddonUtils\n\t\t\t\t\t\t.createAmountRangeCriteriaObject(\"24\", \"27\", DOCUMENT_STATUS_OPEN, FILTER_BY_AMOUNT)));\n\n\t\tTestCase.assertEquals(1, result.getResults().size());\n\t\tTestCase.assertEquals(DOCUMENT_NUMBER_DBN_002, result.getResults().get(0).getDocumentNumber());\n\t\tTestCase.assertEquals(\"26.28\", result.getResults().get(0).getAmount().toPlainString());\n\t}", "public TripSearchCriteria getCriteria(){\r\n\t\tname = jNameTrip.getText();\r\n\t\tdateLow = (Date) datePickerFrom.getModel().getValue();\r\n\t\tdateHigh = (Date) datePickerTo.getModel().getValue();\r\n\t\tpriceHigh = slider.getValue();\r\n\t\tpriceLow = 0;\r\n\t\tcategory = (String) categoryCombo.getSelectedItem();\r\n\t\tif (category == \"All Categories\") category = \"\";\r\n\t\tcriteria = new TripSearchCriteria(name,dateLow,dateHigh,priceLow,priceHigh,category,noGuests);\r\n\t\treturn criteria;\r\n\t\t\t\t}", "private String generateRangeURL(Integer instanceID, Integer startRange, Integer endRange) {\n\t\treturn \"http://\" + databaseInstances[instanceID] + \"/range?start_range=\"\n\t\t\t\t+ Integer.toString(startRange) + \"&end_range=\" + Integer.toString(endRange);\n\t}", "abstract public Range createRange();", "private void add_range(Question q)\n\t{\n\t\tlog.debug(\"Question \" + q.getQid() + \" is getting checked for ranges\");\n\t\tString min = doc.selectSingleNode(\"//document/question_attributes/rows/row[qid=\" + q.getQid() + \" and attribute='min_num_value_n']/value\").getText();\n\t\tString max = doc.selectSingleNode(\"//document/question_attributes/rows/row[qid=\" + q.getQid() + \" and attribute='max_num_value_n']/value\").getText();\n\n\t\tif (min != \"\") {\n\t\t\tq.setFloat_range_min(min);\n\t\t}\n\t\tif (max != \"\") {\n\t\t\tq.setFloat_range_max(max);\n\t\t}\n\t\tlog.debug(\"range check finished\");\n\t}", "private List<T> findRange(RequestData requestData) {\n javax.persistence.criteria.CriteriaQuery cq = getEntityManager().getCriteriaBuilder().createQuery();\n cq.select(cq.from(getEntityClass()));\n javax.persistence.Query q = getEntityManager().createQuery(cq);\n q.setMaxResults(requestData.getLength());\n q.setFirstResult(requestData.getStart());\n return q.getResultList();\n }", "List<Establishment> searchEstablishments(EstablishmentCriteria criteria, RangeCriteria rangeCriteria);", "public void searchAvailabilityType(Connection connection, String hotel_name, int branchID, String type, LocalDate from, LocalDate to) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT num_avail, price FROM Information WHERE hotel_name = ? AND branch_ID = ? AND type >= ? AND date_from <= to_date(?, 'YYYY-MM-DD') AND date_to = to_date(?, 'YYYY-MM-DD')\";\n\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branchID);\n pStmt.setInt(2, getBranchID());\n setType(type);\n pStmt.setString(3, getType());\n pStmt.setString(4, from.toString());\n pStmt.setString(5, to.toString());\n\n try {\n\n System.out.printf(\" Availabilities for %S type at %S, branch ID (%d): \\n\", getType(), getHotelName(), getBranchID());\n System.out.printf(\" Date Listing: \" + String.valueOf(from) + \" TO \" + String.valueOf(to) + \"\\n\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while(rs.next()) {\n System.out.println(rs.getInt(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "List<Book> getBooksFromPeriod(LocalDate from,LocalDate to);", "public static SearchCriteria build(Integer minimalSize,\n Integer maximalSize,\n Integer fromMonthInclusive,\n Integer toMonthInclusive) {\n SearchCriteria criteria = new SearchCriteria();\n criteria.minimalSize = minimalSize;\n criteria.maximalSize = maximalSize;\n criteria.fromMonthInclusive = fromMonthInclusive;\n criteria.toMonthInclusive = toMonthInclusive;\n return criteria;\n }", "public double[] getRange() \n{\n\treturn range;\n}", "private SearchSourceBuilder buildBaseSearchSource() {\n long histogramSearchStartTime = Math.max(0, context.start - ExtractorUtils.getHistogramIntervalMillis(context.aggs));\n\n SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder()\n .size(0)\n .query(ExtractorUtils.wrapInTimeRangeQuery(context.query, context.timeField, histogramSearchStartTime, context.end));\n\n context.aggs.getAggregatorFactories().forEach(searchSourceBuilder::aggregation);\n context.aggs.getPipelineAggregatorFactories().forEach(searchSourceBuilder::aggregation);\n return searchSourceBuilder;\n }", "List<Restaurant> queryByShippingFeeBetween(BigDecimal initialFee, BigDecimal finalFee);", "@Override\r\n public String toString() {\r\n return \"Range [\" + \"min=\" + min + \", max=\" + max + \"]\";\r\n }", "public double getRange(){\n\t\treturn range;\n\t}", "private List<String> findEmptyRoomsInRange(String startDate, String endDate) {\n /* startDate indices = 1,3,6 \n endDate indices = 2,4,5 */\n String emptyRoomsQuery = \"select r1.roomid \" +\n \"from rooms r1 \" +\n \"where r1.roomid NOT IN (\" +\n \"select roomid\" +\n \"from reservations\" + \n \"where roomid = r1.roomid and ((checkin <= to_date('?', 'DD-MON-YY') and\" +\n \"checkout > to_date('?', 'DD-MON-YY')) or \" +\n \"(checkin >= to_date('?', 'DD-MON-YY') and \" +\n \"checkin < to_date('?', 'DD-MON-YY')) or \" +\n \"(checkout < to_date('?', 'DD-MON-YY') and \" +\n \"checkout > to_date('?', 'DD-MON-YY'))));\";\n\n try {\n PreparedStatement erq = conn.prepareStatement(emptyRoomsQuery);\n erq.setString(1, startDate);\n erq.setString(3, startDate);\n erq.setString(6, startDate);\n erq.setString(2, endDate);\n erq.setString(4, endDate);\n erq.setString(5, endDate);\n ResultSet emptyRoomsQueryResult = erq.executeQuery();\n List<String> emptyRooms = getEmptyRoomsFromResultSet(emptyRoomsQueryResult);\n return emptyRooms;\n } catch (SQLException e) {\n System.out.println(\"Empty rooms query failed.\")\n }\n return null;\n}", "NumericRangeFilter(double p_min, double p_max) {\n maximum = p_max;\n minimum = p_min;\n }", "List<Price> findAll();", "protected void addDateRange() {\n addFieldset(startDatePicker, \"Start Date\", \"startDate\");\n addFieldset(endDatePicker, \"End Date\", \"endDate\");\n }", "@Test\n public void learnToQueryWithDomainSpecificRangeParam() throws Exception {\n SqlSession session = null;\n\n List<Country> lc = session.selectList(\"getCountryRange3\", new Range(22, 33));\n\n assertEquals(12, lc.size());\n Country finland = lc.get(11);\n assertEquals(\"Finland\", finland.getCountry());\n\n }", "List<Revenue> search(String query);", "List<RiceCooker> getByFilter(String keySearch, String brands, Double priceFrom, Double priceTo,\n\t\t\tlong startRow, long maxRows);", "List<Videogioco> doRetriveVideogiocoAllRange(int min, int max);", "public double[] getRange(){\n\treturn RANGE;\n }", "private Query getStringRange(final String fieldName, String[] range) {\n return TermRangeQuery\n .newStringRange(fieldName, range[0], range[1], true, true);\n }", "@Override\n public Specification<PriceEntity> createDefaultSpecification(PriceFilter priceFilter) {\n\n log.debug(\"Creating spec of price entity. Filter: {}\", priceFilter);\n Specification<PriceEntity> spec = Specification.where(null);\n\n spec = spec.and((root, cq, cb) -> cb.equal(root.get(\"brandId\"), priceFilter.getBrandId()));\n spec = spec.and((root, cq, cb) -> cb.equal(root.get(\"productId\"), priceFilter.getProductId()));\n spec = spec.and((root, cq, cb) -> cb.and(\n cb.greaterThanOrEqualTo(root.get(\"endDate\"), priceFilter.getDate()),\n cb.lessThanOrEqualTo(root.get(\"startDate\"), priceFilter.getDate())));\n\n return spec;\n }", "@Test\n\tpublic void testStockQuery() throws ParseException {\n\t\t\n\t\tString symbol = \"GOOG\";\n\t\t\n\t\t/*\n\t\t * Create Calendar objects from the startDate and endDate String dates\n\t\t * That's what the corresponding StockQuote getter methods will be returning\n\t\t * and we will need to compare for verification\n\t\t */\n\t\tString startDate = \"2019/01/01\";\n\t\tCalendar from = Calendar.getInstance();\n\t\tfrom.setTime(simpleDateFormat.parse(startDate));\n\t\t\n\t\tString endDate = \"2019/01/20\";\n\t\tCalendar until = Calendar.getInstance();\n\t\tuntil.setTime(simpleDateFormat.parse(endDate));\n\t\t\n\t\tString intervalDaily = \"daily\";\n\t\tString intervalTwiceDaily = \"twice_daily\";\n\t\tString intervalHourly = \"hourly\";\n\t\tStockQuery stockQuery;\n\t\t\n\t\t/*\n\t\t * Create a StockQuery object with the following String values\n\t\t * This object will be used to test symbol, startDate, and endDate.\n\t\t * \n\t\t * interval will not be tested via this object so we pass any interval\n\t\t */\n\t\tstockQuery = new StockQuery(symbol, startDate, endDate, intervalHourly);\n\t\t\n\t\t\n\t\t/*\n\t\t * Now we check that the getter methods of StockQuery return what's expected.\n\t\t */\n\t\t\n\t\t//testing getSymbol\n\t\tassertEquals(\"The value returned by getSymbol method is not 'GOOG'\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"GOOG\", stockQuery.getSymbol());\n\t\t//testing getFrom\n\t\tassertEquals(\"The value returned by getFrom method is not as expected\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom, stockQuery.getFrom());\n\t\t//testing getUntil\n\t\tassertEquals(\"The value returned by getUntil method is not as expected\",\n\t\t\t\tuntil, stockQuery.getUntil());\n\t\t\n\t\t\n\t\t/*\n\t\t * Now we need to test getInterval. It should return an IntervalEnum type\n\t\t * constant (i.e. DAILY, TWICE_DAILY, or HOURLY) depending on what interval string we pass\n\t\t * We create a new object for each of the three interval tests\n\t\t */\n\t\t\n\t\tstockQuery = new StockQuery(symbol, startDate, endDate, intervalDaily);\t\n\t\t//testing getInterval for DAILY\n\t\tassertEquals(\"The value returned by getInterval method is not 'DAILY'\",\n\t\t\t\tIntervalEnum.DAILY, stockQuery.getInterval());\n\t\t\n\t\t\n\t\tstockQuery = new StockQuery(symbol, startDate, endDate, intervalTwiceDaily);\t\t \n\t\t//testing getInterval for TWICE_DAILY\n\t\tassertEquals(\"The value returned by getInterval method is not 'TWICE_DAILY'\",\n\t\t\t\tIntervalEnum.TWICE_DAILY, stockQuery.getInterval());\n\t\t\n\t\t\n\t\tstockQuery = new StockQuery(symbol, startDate, endDate, intervalHourly);\t\t \n\t\t//testing getInterval for HOURLY\n\t\tassertEquals(\"The value returned by getInterval method is not 'HOURLY'\",\n\t\t\t\tIntervalEnum.HOURLY, stockQuery.getInterval());\n\n\t\t\n\t}", "public List<moneytree.persist.db.generated.tables.pojos.Income> fetchRangeOfTransactionDate(LocalDate lowerInclusive, LocalDate upperInclusive) {\n return fetchRange(Income.INCOME.TRANSACTION_DATE, lowerInclusive, upperInclusive);\n }", "public Query<T, R> build() {\n // if criteria.size == 0, rootCriterion = null\n Criterion rootCriterion = null;\n if (criteria.size() == 1) {\n rootCriterion = criteria.get(0);\n } else if (criteria.size() > 1) {\n rootCriterion = Restrictions.and(criteria\n .toArray(new Criterion[criteria.size()]));\n }\n return new QueryImpl<T, R>(entityClass, returnType, rootCriterion,\n orderings, maxResults, returnFields);\n }", "public void generalSearch(Connection connection, LocalDate check_in, LocalDate check_out, int party_size, String city) throws SQLException {\n\n String sql = \"SELECT I.hotel_name, I.branch_ID, I.type, I.price FROM INFORMATION I, ROOM R, HOTEL_ADDRESS HA WHERE R.capacity >= ? AND HA.city = ? AND I.date_from >= to_date(?, 'YYYY-MM-DD') AND I.date_from <= to_date(?,'YYYY-MM-DD') GROUP BY I.date_from, I.date_to HAVING I.num_avail > 0\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setPartySize(party_size);\n pStmt.setInt(1, getPartySize());\n setCity(city);\n pStmt.setString(2, getCity());\n pStmt.setString(3, check_in.toString());\n pStmt.setString(4, check_out.toString());\n\n ResultSet rs = null;\n\n try {\n\n System.out.printf(\" Hotels available: \");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2) + \" \" + rs.getString(3) + \" \" + rs.getInt(4));\n }\n }\n catch (SQLException e) { e.printStackTrace(); }\n finally {\n pStmt.close();\n if (rs != null){\n rs.close();\n }\n }\n }", "CampusSearchQuery generateQuery();", "private String buildQuery(final String projectId, final Date date,\r\n\t\t\tfinal State from, final State to) {\r\n\r\n\t\treturn from.equals(to) ? buildReflexiveStateQuery(projectId, date, from)\r\n\t\t\t\t: buildFromToStateQuery(projectId, date, from, to);\r\n\t}", "private void twoDateOccupancyQuery(String startDate, String endDate){\n List<String> emptyRooms = findEmptyRoomsInRange(startDate, endDate);\n List<String> fullyOccupiedRooms = findOccupiedRoomsInRange(startDate, endDate, emptyRooms);\n List<String> partiallyOccupiedRooms = \n (generateListOfAllRoomIDS().removeAll(emptyRooms)).removeAll(fullyOccupiedRooms);\n\n occupancyColumns = new Vector<String>();\n occupancyData = new Vector<Vector<String>>();\n occupancyColumns.addElement(\"RoomId\");\n occupancyColumns.addElement(\"Occupancy Status\");\n\n for(String room: emptyRooms) {\n Vector<String> row = new Vector<String>();\n row.addElement(room);\n row.addElement(\"Empty\");\n occupancyData.addElement(row);\n }\n for(String room: fullyOccupiedRooms) {\n Vector<String> row = new Vector<String>();\n row.addElement(room);\n row.addElement(\"Fully Occupied\");\n occupancyData.addElement(row);\n }\n for(String room: partiallyOccupiedRooms) {\n Vector<String> row = new Vector<String>();\n row.addElement(room);\n row.addElement(\"Partially Occupied\");\n occupancyData.addElement(row);\n }\n return;\n}", "void setDateRange(Date start, Date end);", "public GoodsSkuCriteria() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public String toQuery() {\n // determine ordering\n String ordering = \"\";\n if (ratingFirst) {\n ordering += \"ORDER BY rating\" + (ratingDescend ? \" DESC, \" : \", \") +\n (nameDescend ? \"make DESC, model DESC, year DESC\" : \"make, model, year\");\n } else {\n ordering += \"ORDER BY \" + (nameDescend ? \"make DESC, model DESC, year DESC\" : \"make, model, year\")\n + \", rating\" + (ratingDescend ? \" DESC\" : \"\");\n }\n\n // determine pagination offsets\n String pagination = \"\";\n if (pageNumber > 1) {\n pagination += \"\\nLIMIT 100\\nOFFSET \" + (convertToBase() - 1) * 100 + \";\";\n }\n\n return query + ordering + pagination;\n }", "@Query(\"select reservation from Reservation reservation where reservation.endBorrowing>=:endBorrowing\")\n List<Reservation> findByEndBorrowingAfter(@Param(\"endBorrowing\")Date endBorrowing);", "private Filter betweenFilter(String start, Object minValue, Object maxValue) {\n return FF.between(FF.property(start), FF.literal(minValue), FF.literal(maxValue));\n }", "protected StringBuilder generateQuery() {\n StringBuilder sb = new StringBuilder();\n sb.append(\" FROM \") \n .append(dao.getParameterClass(0).getName())\n .append(\" d WHERE (:incorrectEvent = '' OR d.incorrectEvent.id = :incorrectEvent) \")\n .append(\"AND (d.createDate BETWEEN :dateFrom AND :dateTo ) \")\n .append(\"AND ( ((:incorrectEvent ='' AND :incorrectEventName!='' AND UPPER(d.incorrectEvent.name) LIKE :incorrectEventName) \")\n .append(\" OR (:incorrectEvent ='' AND :incorrectEventName!='' AND UPPER(d.incorrectEvent.name) LIKE :incorrectEventName)) \")\n .append(\" OR (:search='' OR d.searchField LIKE :search) ) \");\n return sb;\n }", "private void buildQueryFilterTemporal(String dateField,\n String startDate,\n String endDate,\n boolean isDatesContainedChecked,\n String namedTimescale, \n String namedTimescaleQueryType,\n TermsList termsList\n ) \n \t\tthrows UnsupportedEncodingException {\n\t boolean endDateSpecified = false;\n\t boolean startDateSpecified = false;\n\t \n /* If the user specified a named time-scale query, search for it\n * in the \"timescale\" field.\n */\n if ((namedTimescale != null) && (!(namedTimescale.equals(\"\")))) {\n termsList.addTerm(namedTimescale);\n String parenthesizedValue = parenthesizeQueryValue(namedTimescale);\n String escapedValue = Search.escapeQueryChars(parenthesizedValue);\n String encodedValue = URLEncoder.encode(escapedValue, \"UTF-8\");\n String timescaleQuery = String.format(\"timescale:%s\", encodedValue);\n updateQString(timescaleQuery);\n }\n \n if ((startDate == null) || (startDate.equals(\"\"))) {\n \tstartDate = \"*\";\n }\n else {\n startDate = ISO8601Utility.formatTimestamp(startDate, \"DAY\");\n if (startDate != null) startDateSpecified = true;\n }\n\n if ((endDate == null) || (endDate.equals(\"\"))) {\n \tendDate = \"NOW\";\n }\n else {\n \tendDate = ISO8601Utility.formatTimestamp(endDate, \"DAY\");\n \tif (endDate != null) endDateSpecified = true;\n }\n\n validateDateRange(startDate, endDate);\n \n // If a start date or an end date was specified, search temporal coverage\n //\n if (startDateSpecified || endDateSpecified) {\n \tString temporalFilter = null;\n \tString collectionFilter = null;\n \tString pubDateFilter = null;\n \tString LEFT_BRACKET = \"%5B\";\n \tString RIGHT_BRACKET = \"%5D\";\n\n if (dateField.equals(\"ALL\") || dateField.equals(\"COLLECTION\")) {\n \t String singleDateQuery = String.format(\"singledate:%s%s+TO+%s%s\", LEFT_BRACKET, startDate, endDate, RIGHT_BRACKET);\n \t String startDateQuery = String.format(\"begindate:%s*+TO+%s%s\", LEFT_BRACKET, endDate, RIGHT_BRACKET);\n \t String endDateQuery = String.format(\"enddate:%s%s+TO+NOW%s\", LEFT_BRACKET, startDate, RIGHT_BRACKET);\n \t collectionFilter = String.format(\"(%s+OR+(%s+AND+%s))\", singleDateQuery, startDateQuery, endDateQuery);\n }\n \n if (dateField.equals(\"ALL\") || dateField.equals(\"PUBLICATION\")) {\n \t pubDateFilter = String.format(\"pubdate:%s%s+TO+%s%s\", LEFT_BRACKET, startDate, endDate, RIGHT_BRACKET);\n }\n \n if (dateField.equals(\"ALL\")) {\n \t temporalFilter = String.format(\"(%s+OR+%s)\", pubDateFilter, collectionFilter);\n }\n else if (dateField.equals(\"COLLECTION\")) {\n \t temporalFilter = collectionFilter;\n }\n else if (dateField.equals(\"PUBLICATION\")) {\n \t temporalFilter = pubDateFilter;\n }\n \n updateFQString(temporalFilter); \n }\n\n }", "Range createRange();", "public double getRange(){\n\n double range = fuelRemaining * fuelEconomy;\n return range;\n }", "private void setupSoldTicketsByPriceRangeChart() {\n soldTicketsByPriceRangeCategoryAxis.setLabel(\"Price ranges\");\n soldTicketsByPriceRangeNumberAxis.setLabel(\"Sold tickets\");\n chartCreator.createBarChart(soldTicketsByPriceRangeChart, soldTicketsByPriceRangeData);\n }", "public List prices() {\n List ls = new ArrayList();\n try {\n\n Connection connection = DBUtil.getConnection();\n //PreparedStatement pst = connection.prepareStatement(\"select PriceId,VegetableId,GovernmentPrice,FarmerPrice,WholeSellerPrice,\"\n // + \"RetailerPrice from PriceDetails\");\n /*PreparedStatement pst = connection.prepareStatement(\"SELECT PriceDetails.PriceId,VegetableDetails.VegetableName,PriceDetails.GovernmentPrice,\"\n + \"PriceDetails.FarmerPrice,PriceDetails.WholeSellerPrice,PriceDetails.RetailerPrice\"\n + \" from PriceDetails INNER JOIN VegetableDetails \"\n + \"ON PriceDetails.VegetableId = VegetableDetails.VegetableId\");\n */\n\n PreparedStatement pst = connection.prepareStatement(\"select PriceDetails.PriceId,VegetableDetails.VegetableName,\"\n + \"PriceDetails.GovernmentPrice,PriceDetails.FarmerPrice,PriceDetails.WholeSellerPrice,\"\n + \"PriceDetails.RetailerPrice from PriceDetails INNER JOIN VegetableDetails ON PriceDetails.VegetableId = \"\n + \"VegetableDetails.VegetableId\");\n\n ResultSet rs = pst.executeQuery();\n while (rs.next()) {\n ViewPricesBean vpb = new ViewPricesBean();\n\n vpb.setPriceId(rs.getInt(1));\n vpb.setVegetableName(rs.getString(2));\n // vpb.setRegionName(rs.getString(3));\n vpb.setGovernmentPrice(rs.getFloat(3));\n vpb.setFarmerPrice(rs.getFloat(4));\n vpb.setWholeSellerPrice(rs.getFloat(5));\n vpb.setRetailerPrice(rs.getFloat(6));\n\n\n ls.add(vpb);\n\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return ls;\n\n }", "ValueRangeConstraint createValueRangeConstraint();", "private boolean addRangeQualifier(Predicate p,QualifierPhase phase) throws StandardException{\n DataValueDescriptor value=p.getCompareValue(baseTable);\n RelationalOperator relop=p.getRelop();\n int colNum = relop.getColumnOperand(baseTable).getColumnNumber();\n int relationalOperator = relop.getOperator();\n List<SelectivityHolder> columnHolder = getSelectivityListForColumn(colNum);\n OP_SWITCH: switch(relationalOperator){\n case RelationalOperator.EQUALS_RELOP:\n columnHolder.add(new RangeSelectivity(scc,value,value,true,true,colNum,phase));\n break;\n case RelationalOperator.NOT_EQUALS_RELOP:\n columnHolder.add(new NotEqualsSelectivity(scc,colNum,phase,value));\n break;\n case RelationalOperator.IS_NULL_RELOP:\n columnHolder.add(new NullSelectivity(scc,colNum,phase));\n break;\n case RelationalOperator.IS_NOT_NULL_RELOP:\n columnHolder.add(new NotNullSelectivity(scc,colNum,phase));\n break;\n case RelationalOperator.GREATER_EQUALS_RELOP:\n for(SelectivityHolder sh: columnHolder){\n if (!sh.isRangeSelectivity())\n continue;\n RangeSelectivity rq = (RangeSelectivity) sh;\n if(rq.start==null){\n rq.start = value;\n rq.includeStart = true;\n break OP_SWITCH;\n }\n }\n columnHolder.add(new RangeSelectivity(scc,value,null,true,true,colNum,phase));\n break;\n case RelationalOperator.GREATER_THAN_RELOP:\n for(SelectivityHolder sh: columnHolder){\n if (!sh.isRangeSelectivity())\n continue;\n RangeSelectivity rq = (RangeSelectivity) sh;\n if(rq.start==null){\n rq.start = value;\n rq.includeStart = false;\n break OP_SWITCH;\n }\n }\n columnHolder.add(new RangeSelectivity(scc,value,null,false,true,colNum,phase));\n break;\n case RelationalOperator.LESS_EQUALS_RELOP:\n for(SelectivityHolder sh: columnHolder){\n if (!sh.isRangeSelectivity())\n continue;\n RangeSelectivity rq = (RangeSelectivity) sh;\n if(rq.stop==null){\n rq.stop = value;\n rq.includeStop = true;\n break OP_SWITCH;\n }\n }\n columnHolder.add(new RangeSelectivity(scc,null,value,true,true,colNum,phase));\n break;\n case RelationalOperator.LESS_THAN_RELOP:\n for(SelectivityHolder sh: columnHolder){\n if (!sh.isRangeSelectivity())\n continue;\n RangeSelectivity rq = (RangeSelectivity) sh;\n if(rq.stop==null){\n rq.stop = value;\n rq.includeStop = true;\n break OP_SWITCH;\n }\n }\n columnHolder.add(new RangeSelectivity(scc,null,value,true,false,colNum,phase));\n break;\n default:\n throw new RuntimeException(\"Unknown Qualifier Type\");\n }\n return true;\n }", "@Query(value = \"SELECT u FROM Car u WHERE u.price <= :price\")\n\tList<Car> findByBelowPrice(@Param(\"price\") Integer price);", "public double[] getRange();", "public synchronized void selectPriceRange(String priceRange) {\n\t\ttry {\n\t\t\tWebActionUtil.waitForElement(clkPrice(priceRange), \"Price button\", 30);\n\t\t\tWebActionUtil.clickOnWebElement(clkPrice(priceRange), \"price button\", \"Unable to click price button \");\n\t\t}\n\t\t catch (Exception e) \n\t\t{\n\t\t\t WebActionUtil.error(e.getMessage());\n\t\t\tWebActionUtil.error(\"Unable to click price button\");\n\t\t\tAssert.fail(\"Unable to click price button\");\n\t\t}\n\t}", "public String getRange() {\n return this.range;\n }", "@Test\n \tpublic void whereClauseForNodeRangedDominance() {\n \t\tnode23.addJoin(new Dominance(node42, 10, 20));\n \t\tcheckWhereCondition(\n //\t\t\t\tjoin(\"=\", \"_rank23.component_ref\", \"_rank42.component_ref\"),\n \t\t\t\tjoin(\"=\", \"_component23.type\", \"'d'\"),\n \t\t\t\t\"_component23.name IS NULL\",\n \t\t\t\tjoin(\"<\", \"_rank23.pre\", \"_rank42.pre\"),\n \t\t\t\tjoin(\"<\", \"_rank42.pre\", \"_rank23.post\"),\n \t\t\t\t\"_rank23.level BETWEEN SYMMETRIC _rank42.level - 10 AND _rank42.level - 20\"\n \n \t\t);\n \t}", "RangeValue createRangeValue();", "private String useRangeFormat(Unit units, int lowerBound, int upperBound) {\n return lowerBound + \" to \" + upperBound + getUnits(units, upperBound);\n }" ]
[ "0.7243145", "0.65517706", "0.6298254", "0.62950504", "0.6262226", "0.6242966", "0.62069273", "0.6179056", "0.6078456", "0.60107", "0.59545714", "0.5953458", "0.58958435", "0.58956456", "0.5863754", "0.58158636", "0.5792359", "0.56939656", "0.56789744", "0.56362456", "0.56161904", "0.5544095", "0.5541174", "0.5515953", "0.5471713", "0.5444088", "0.5436997", "0.5384471", "0.5379655", "0.5363927", "0.5341809", "0.53281194", "0.5314482", "0.53051656", "0.53043354", "0.5255269", "0.5251102", "0.5243228", "0.5227811", "0.5220274", "0.5216842", "0.52095765", "0.5208314", "0.5194452", "0.51900214", "0.518606", "0.51826656", "0.5159827", "0.515616", "0.51452094", "0.51429677", "0.5133463", "0.51280826", "0.51069474", "0.51063484", "0.50964206", "0.5074345", "0.50734687", "0.50693357", "0.5066394", "0.5043714", "0.5037461", "0.50367343", "0.5036015", "0.5034625", "0.5033182", "0.5032674", "0.50298935", "0.5022675", "0.50130683", "0.50079405", "0.4996667", "0.49948984", "0.49892956", "0.49762183", "0.49734893", "0.49541685", "0.49535576", "0.49330875", "0.49293283", "0.49157676", "0.49138045", "0.49077702", "0.4907552", "0.49023393", "0.49017787", "0.4901591", "0.49000117", "0.48998865", "0.48977658", "0.48811567", "0.48728153", "0.48722678", "0.4868391", "0.4864083", "0.48589197", "0.48568818", "0.48474127", "0.48438856", "0.4842599" ]
0.6238894
6
Method to form the query for price.
private void requestAttributePrice(final Map<String, String> request, final StringBuilder attributes) { if (request.containsKey(RequestAttributeConstant.PRICE)) { if (request.get(RequestAttributeConstant.PRICE).contains( EndecaConstants.FILTER_PRICE)) { final String requestPriceValue = request.get( RequestAttributeConstant.PRICE).replace( EndecaConstants.FILTER_PRICE + EndecaConstants.BETWEEN + CommonConstants.EMPTY_VALUE, CommonConstants.EMPTY_STRING); attributes.append(CommonConstants.PRICE); attributes.append(CommonConstants.FIELD_PAIR_SEPARATOR); attributes.append(requestPriceValue.replace( CommonConstants.EMPTY_VALUE, CommonConstants.COMMA_SEPERATOR)); attributes.append(CommonConstants.PIPE_SEPERATOR); } else { attributes.append(CommonConstants.PRICE); attributes.append(CommonConstants.FIELD_PAIR_SEPARATOR); attributes.append(request.get(RequestAttributeConstant.PRICE)); attributes.append(CommonConstants.PIPE_SEPERATOR); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic List<Price> queryPriceBei(Date start,Date end) {\n\t\tList<Price> list = homePageDao.queryPriceBei(start,end);\r\n\t\treturn list;\r\n\t}", "public List<FieldQuery> getQuery() {\n List<FieldQuery> query = new ArrayList<>();\n query.add(new FieldQuery(\"openPrice\", 1 , 47.25, \"Double\"));\n query.add(new FieldQuery(\"openPrice\", 1 , 47.65, \"Double\"));\n return query;\n }", "List<Price> findAll();", "double getPrice();", "double getPrice();", "double getPrice();", "List<Product> findByPrice(BigDecimal price);", "public void findByPrice() {\n boolean validate = true;\n price = 0;\n System.out.print(\"Enter price you want to find: \");\n while (validate) {\n price = Validation.validateDoubleNumber(price);\n validate = false;\n }\n tree.findByPrice(price);\n }", "String getPrice();", "double calculatePrice();", "protected int queryPrice(int id, String key) {\n Trace.info(\"RM::queryCarsPrice(\" + id + \", \" + key + \") called\" );\n ReservableItem curObj = (ReservableItem) readData( id, key);\n int value = 0; \n if ( curObj != null ) {\n value = curObj.getPrice();\n } // else\n Trace.info(\"RM::queryCarsPrice(\" + id + \", \" + key + \") returns cost=$\" + value );\n return value; \n }", "public double getPrice();", "public Double getPrice();", "List<SpotPrice> getAll();", "@Override\r\n\tpublic List<Price> queryCheng(Date start,Date end) {\n\t\tList<Price> list = homePageDao.queryCheng(start,end);\r\n\t\treturn list;\r\n\t}", "abstract public double getPrice();", "public Items[] findWherePriceEquals(double price) throws ItemsDaoException;", "public void listBooksByPrice(int price) {\n String sql = \"SELECT ISBN, BookName, AuthorName, Price \" +\n \"FROM books \" +\n \"WHERE Price = ?\";\n\n try (Connection conn = this.connect();\n PreparedStatement pstmt = conn.prepareStatement(sql)) {\n\n // Set values\n pstmt.setInt(1, price);\n\n ResultSet rs = pstmt.executeQuery();\n\n // Print results\n while(rs.next()) {\n System.out.println(rs.getInt(\"ISBN\") + \"\\t\" +\n rs.getString(\"BookName\") + \"\\t\" +\n rs.getString(\"AuthorName\") + \"\\t\" +\n rs.getInt(\"Price\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "List<ItemPriceDTO> findAll();", "List<SpotPrice> getAll(Integer pageNumber, Integer pageSize);", "public double price() {\n return price;\n }", "public Double getPrice() {\r\n return price;\r\n }", "BigDecimal getPrice();", "public double getPrice() {\n return price;\n }", "List<PriceInformation> getPriceForProduct(ProductModel product);", "public GiftCardProductQuery specialPrice() {\n startField(\"special_price\");\n\n return this;\n }", "long getPrice();", "@Query(\"from Flight as f where f.fare.fare <= 5000\")\n\tList<Flight> filterFlightsByPrice();", "public List<Hotel> findByPriceBetween(double low, double high);", "public double getPrice(){\r\n\t\treturn price;\r\n\t}", "public Double getPrice() {\n return price;\n }", "public Double getPrice() {\n return price;\n }", "public double getPrice() {\r\n return price;\r\n }", "public double getPrice() {\r\n return price;\r\n }", "public double getPrice() {\r\n return price;\r\n }", "public double getPrice() {\r\n return price;\r\n }", "double purchasePrice();", "public double getPrice()\r\n {\r\n return price;\r\n }", "public BigDecimal\tgetPrice();", "public String getPrice() {\n return price;\n }", "public String getPrice() {\n return price;\n }", "void all_Data_retrieve_Price_Asc() {\n\t\t\tStatement stm=null;\n\t\t\tResultSet rs=null;\n\t\t\ttry{\n\t\t\t\t//Retrieve tuples by executing SQL command\n\t\t\t stm=con.createStatement();\n\t\t String sql=\"select * from \"+tableName+\" order by Price asc\";\n\t\t\t rs=stm.executeQuery(sql);\n\t\t\t DataGUI.model.setRowCount(0);\n\t\t\t //Add rows to table model\n\t\t\t while (rs.next()) {\n\t Vector<Object> newRow = new Vector<Object>();\n\t //Add cells to each row\n\t for (int i = 1; i <=colNum; i++) \n\t newRow.addElement(rs.getObject(i));\n\t DataGUI.model.addRow(newRow);\n\t }//end of while\n\t\t\t //Catch SQL exception\n\t }catch (SQLException e ) {\n\t \te.printStackTrace();\n\t\t } finally {\n\t\t \ttry{\n\t\t if (stm != null) stm.close(); \n\t\t }\n\t\t \tcatch (SQLException e ) {\n\t\t \t\te.printStackTrace();\n\t\t\t }\n\t\t }\n\t}", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice()\n {\n return price;\n }", "public BigDecimal getPrice() {\r\n return price;\r\n }", "public BigDecimal getPrice() {\r\n return price;\r\n }", "public Date getPrice() {\n return price;\n }", "public void getPrice(){\n System.out.println(\"Price: $\" + price); \n }", "public double getPrice(){return price;}", "public BigDecimal getPrice() {\n return price;\n }", "public BigDecimal getPrice() {\n return price;\n }", "public BigDecimal getPrice() {\n return price;\n }", "public BigDecimal getPrice() {\n return price;\n }", "public BigDecimal getPrice() {\n return price;\n }", "public BigDecimal getPriceList();", "List<Product> findByPriceBetweenOrderByPriceAsc(double from, double to);", "public double getPrice(){\n\t\treturn price;\n\t}", "public double getPrice()\n {\n return this.price;\n }", "String getPrice() {\n return Double.toString(price);\n }", "Price getTradePrice();", "public double getPrice(){\n\t\t\treturn price;\n\t\t}", "public FoodEntity getFoodByRatingAndprice(int rating , int price);", "public double calculatePrice(Model model)\n\t{\n\t\t//sum each of the price components price value\n\t\tString finalprice = \"\";\n\t\tdouble pc_price = -1, lower_limit = -1, upper_limit = -1, function_price = -1,finalvalue=0;\n\t\tfor(PriceComponent pc : this.priceComponents)\n\t\t{\n\t\t\tpc_price = -1; lower_limit = -1; upper_limit = -1;function_price = -1;\n\t\t\t//get the variables and define their value\n\t\t\tif(pc.getPriceFunction() != null)\n\t\t\t{\n\t\t\t\tif (pc.getPriceFunction().getSPARQLFunction() != null) {\n\t\t\t\t\tcom.hp.hpl.jena.query.Query q = ARQFactory.get().createQuery(pc.getPriceFunction().getSPARQLFunction());\n\t\t\t\t\tQueryExecution qexecc = ARQFactory.get().createQueryExecution(q, model);\t\n\t\t\t\t\t\n\t\t\t\t\tResultSet rsc = qexecc.execSelect();\n//\t\t\t\t\tSystem.out.println(q.toString());\n\t\t\t\t\tfunction_price = rsc.nextSolution().getLiteral(\"result\").getDouble();// final result is store in the ?result variable of the query\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (pc.getComponentCap() != null) {\n\t\t\t\tupper_limit = pc.getComponentCap().getValue();\n\t\t\t}\n\n\t\t\tif (pc.getComponentFloor() != null) {\n\t\t\t\tlower_limit =pc.getComponentFloor().getValue();\n\t\t\t}\n\n\t\t\tif (pc.getPrice() != null) {\n\t\t\t\tpc_price = pc.getPrice().getValue();\n\t\t\t}\n\t\t\t\n\t\t\tif(function_price >=0)\n\t\t\t{\n\t\t\t\tif(function_price > upper_limit && upper_limit >= 0)\n\t\t\t\t\tfunction_price = upper_limit;\n\t\t\t\telse if(function_price < lower_limit && lower_limit >=0)\n\t\t\t\t\tfunction_price = lower_limit;\n\t\t\t}\n\t\t\t\n\t\t\tif(pc_price >= 0)\n\t\t\t{\n\t\t\t\tif(pc_price > upper_limit && upper_limit >=0)\n\t\t\t\t\tpc_price = upper_limit;\n\t\t\t\telse if(pc_price < lower_limit && lower_limit >= 0)\n\t\t\t\t\tpc_price = lower_limit;\n\t\t\t}\n\t\t\t\n\t\t\tif(pc.getPrice() != null && pc.getPriceFunction() != null)\n\t\t\t\tSystem.out.println(\"Dynamic and static price? offer->\"+this.name+\",pc->\"+pc.getName() + \"price ->\"+pc_price);//throw expection?\n\t\t\t\n\t\t\t\n\t\t\tif(pc.isDeduction())\n\t\t\t{\n\t\t\t\tif(function_price >= 0)\n\t\t\t\t{\n\t\t\t\t\tfinalprice = finalprice+\" - \" +function_price;\n\t\t\t\t\tfinalvalue-=function_price;\n\t\t\t\t}\n\t\t\t\tif(pc_price >= 0)\n\t\t\t\t{\n\t\t\t\t\tfinalprice = finalprice+\" - \" +pc_price;\n\t\t\t\t\tfinalvalue-=pc_price;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(function_price >= 0)\n\t\t\t\t{\n\t\t\t\t\tfinalprice = finalprice+\" + \" +function_price;\n\t\t\t\t\tfinalvalue+=function_price;\n\t\t\t\t}\n\t\t\t\tif(pc_price >= 0)\n\t\t\t\t{\n\t\t\t\t\tfinalprice = finalprice+\" + \" +pc_price;\n\t\t\t\t\tfinalvalue+=pc_price;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//conditions to verify that the final price is inside the interval defined by the lower and upper limit, in case these exist\n\t\tif(this.getPriceCap() != null)\n\t\t{\n\t\t\tif(this.getPriceCap().getValue() >= 0 && finalvalue < this.getPriceCap().getValue())\n\t\t\t\tfinalvalue = this.getPriceCap().getValue();\n\t\t}\n\t\tif(this.getPriceFloor() != null)\n\t\t{\n\t\t\tif(this.getPriceFloor().getValue() >= 0 && finalvalue > this.getPriceFloor().getValue())\n\t\t\t\tfinalvalue = this.getPriceFloor().getValue();\n\t\t}\n\t\t\t\t\n\t\treturn finalvalue;\n\t}", "public double getPrice()\r\n {\r\n return this.price;\r\n }", "public void setPrice(double price)\n {\n this.price = price;\n }", "List<List<Order>> getAllOrdersByPrice() throws OrderBookOrderException;", "public List prices() {\n List ls = new ArrayList();\n try {\n\n Connection connection = DBUtil.getConnection();\n //PreparedStatement pst = connection.prepareStatement(\"select PriceId,VegetableId,GovernmentPrice,FarmerPrice,WholeSellerPrice,\"\n // + \"RetailerPrice from PriceDetails\");\n /*PreparedStatement pst = connection.prepareStatement(\"SELECT PriceDetails.PriceId,VegetableDetails.VegetableName,PriceDetails.GovernmentPrice,\"\n + \"PriceDetails.FarmerPrice,PriceDetails.WholeSellerPrice,PriceDetails.RetailerPrice\"\n + \" from PriceDetails INNER JOIN VegetableDetails \"\n + \"ON PriceDetails.VegetableId = VegetableDetails.VegetableId\");\n */\n\n PreparedStatement pst = connection.prepareStatement(\"select PriceDetails.PriceId,VegetableDetails.VegetableName,\"\n + \"PriceDetails.GovernmentPrice,PriceDetails.FarmerPrice,PriceDetails.WholeSellerPrice,\"\n + \"PriceDetails.RetailerPrice from PriceDetails INNER JOIN VegetableDetails ON PriceDetails.VegetableId = \"\n + \"VegetableDetails.VegetableId\");\n\n ResultSet rs = pst.executeQuery();\n while (rs.next()) {\n ViewPricesBean vpb = new ViewPricesBean();\n\n vpb.setPriceId(rs.getInt(1));\n vpb.setVegetableName(rs.getString(2));\n // vpb.setRegionName(rs.getString(3));\n vpb.setGovernmentPrice(rs.getFloat(3));\n vpb.setFarmerPrice(rs.getFloat(4));\n vpb.setWholeSellerPrice(rs.getFloat(5));\n vpb.setRetailerPrice(rs.getFloat(6));\n\n\n ls.add(vpb);\n\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return ls;\n\n }", "void all_Data_retrieve_Price_Desc() {\n\t\t\tStatement stm=null;\n\t\t\tResultSet rs=null;\n\t\t\ttry{\n\t\t\t\t//Retrieve tuples by executing SQL command\n\t\t\t stm=con.createStatement();\n\t\t String sql=\"select * from \"+tableName+\" order by Price desc\";\n\t\t\t rs=stm.executeQuery(sql);\n\t\t\t DataGUI.model.setRowCount(0);\n\t\t\t //Add rows to table model\n\t\t\t while (rs.next()) {\n\t Vector<Object> newRow = new Vector<Object>();\n\t //Add cells to each row\n\t for (int i = 1; i <=colNum; i++) \n\t newRow.addElement(rs.getObject(i));\n\t DataGUI.model.addRow(newRow);\n\t }//end of while\n\t\t\t //Catch SQL exception\n\t }catch (SQLException e ) {\n\t \te.printStackTrace();\n\t\t } finally {\n\t\t \ttry{\n\t\t if (stm != null) stm.close(); \n\t\t }\n\t\t \tcatch (SQLException e ) {\n\t\t \t\te.printStackTrace();\n\t\t\t }\n\t\t }\n\t\t}", "public double getPrice()\n {\n \treturn price;\n }", "public Long getPrice() {\n return price;\n }", "double getPricePerPerson();", "public double getPrice() {\n return this.price;\n }", "public void testFindByPrice() {\n System.out.println(\"findByPrice\");\n Double[] prices = null;\n ItemDAO instance = null;\n List expResult = null;\n List result = instance.findByPrice(prices);\n assertEquals(expResult, result);\n fail(\"The test case is a prototype.\");\n }", "public void setPrice(BigDecimal price) {\n this.price = price;\n }", "public void setPrice(BigDecimal price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public Money getPrice() {\n return price;\n }", "public FoursquarePathBuilder setPrice(Price price) {\n String prices = price.getQueryString();\n addParameter(\"price\", prices);\n return this;\n }", "public float getPrice() \n {\n return price;\n }", "public float getPrice() {\n return price;\n }", "public float getPrice() {\n return price;\n }", "public float getPrice() {\n return price;\n }", "public void setPrice(double price)\n {\n this.price = price;\n }", "public void setPrice(Double price) {\n this.price = price;\n }", "public void setPrice(Double price) {\n this.price = price;\n }" ]
[ "0.66240895", "0.64042616", "0.63608676", "0.6298625", "0.6298625", "0.6298625", "0.6290363", "0.6258198", "0.622663", "0.61951953", "0.6164281", "0.6111283", "0.60870105", "0.6063066", "0.60585964", "0.6008232", "0.5984664", "0.5974758", "0.5956874", "0.59450096", "0.5896662", "0.5896461", "0.58873546", "0.5883881", "0.58827454", "0.5858241", "0.5823287", "0.5819001", "0.58175546", "0.5815833", "0.58064175", "0.58064175", "0.58039546", "0.58039546", "0.58039546", "0.58039546", "0.5800963", "0.57998955", "0.5795262", "0.57942235", "0.57942235", "0.5793926", "0.5789463", "0.5789463", "0.5789463", "0.5789463", "0.5789463", "0.5789463", "0.5789463", "0.5789463", "0.5789463", "0.5789463", "0.5789463", "0.5764623", "0.5752125", "0.5752125", "0.574862", "0.5737233", "0.57325155", "0.5731062", "0.5731062", "0.5731062", "0.5731062", "0.5731062", "0.5725472", "0.57191694", "0.57062775", "0.5704673", "0.5696079", "0.56843275", "0.56811094", "0.5669428", "0.5649093", "0.56440234", "0.56351215", "0.5635055", "0.5634809", "0.56327045", "0.56239164", "0.5623337", "0.5619421", "0.5618552", "0.5610555", "0.5609239", "0.5609239", "0.5605987", "0.5605987", "0.5605987", "0.5605987", "0.5605987", "0.5605987", "0.5605987", "0.5599444", "0.5591327", "0.558694", "0.5585171", "0.5585171", "0.5585171", "0.55828536", "0.55826044", "0.55826044" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { HelloAiming app = new HelloAiming(); app.setConfigShowMode(ConfigShowMode.AlwaysShow); app.start(); }
{ "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
Getter of running time converted to string.
public String getRunningTimeStr() { if (this.runningTime == null) return null; else return CommonRunService.getTimeStr(this.runningTime); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected String elapsedTimeAsString(long runTime) {\n return NumberFormat.getInstance().format((double) runTime / 1000);\n }", "public static String getTimeString() {\n\t\treturn getTimeString(time);\n\t}", "public String elapsedTime() {\n return totalWatch.toString();\n }", "public String getTimeInString() {\n int minutes = (time % 3600) / 60;\n int seconds = time % 60;\n String timeString = String.format(\"%02d:%02d\", minutes, seconds);\n\n return timeString;\n }", "public String getTimeString()\n\t{\n\t\treturn TimeUtils.getTimeString(this.timesCurrentMillis);\n\t}", "public String getElapsedTime() {\n\n long elapsed;\n int mins;\n int secs;\n int millis;\n\n if (running) {\n elapsed = System.currentTimeMillis() - startTime;\n } else {\n elapsed = stopTime - startTime;\n }\n\n mins = (int) (elapsed / 60000);\n secs = (int) (elapsed - mins * 60000) / 1000;\n millis = (int) (elapsed - mins * 60000 - secs * 1000);\n\n //Keeps 3 digits when a second rolls over. Perhaps find a better way of doing this\n return (String.format(\"%02d\", mins) + \":\" + String.format(\"%02d\", secs) + \":\"\n + String.format(\"%03d\", millis));\n }", "public String getElapsed() {\n\t\tString timeFormatted = \"\";\n\t\ttimeFormatted = this.formatTime(this.getElapsedTicks());\n\t\treturn timeFormatted;\n\t}", "@DISPID(21)\r\n\t// = 0x15. The runtime will prefer the VTID if present\r\n\t@VTID(23)\r\n\tjava.lang.String actualCPUTime();", "java.lang.String getTime();", "public String gameTimeToText()\n {\n // CALCULATE GAME TIME USING HOURS : MINUTES : SECONDS\n if ((startTime == null) || (endTime == null))\n return \"\";\n long timeInMillis = endTime.getTimeInMillis() - startTime.getTimeInMillis();\n return timeToText(timeInMillis);\n }", "private String getFinalTimeString() {\n double fltTime = (double)(lngTimelineDataAmountInRmsFrames * fltRmsFramePeriodInMs)/1000.0f;\n return new DecimalFormat(\"000.00\").format(fltTime);\n }", "private String getTimingString() {\n return DateTimeHandler.STANDARD_DATETIME_FORMAT.format(deadline);\n }", "public String getTime(){\r\n String time = \"\";\r\n return time;\r\n }", "public static String getPrintToTextTime() {\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n return sdf.format(System.currentTimeMillis());\n }", "public String getElapsedTime() {\n /**\n * Joda instruction credit to BalusC @ stackoverflow.com\n * http://stackoverflow.com/posts/2179831/revisions\n */\n Period delta = new Period(getOccurrenceTime(), DateTime.now());\n return\n // 1+ weeks\n (delta.getWeeks() >= 1) ? delta.getWeeks()+\"w\" :\n // 1+ days\n (delta.getDays() >= 1) ? delta.getDays()+\"d\" :\n // 1+ hours\n (delta.getHours() >= 1) ? delta.getHours()+\"h\" :\n // 1+ minutes\n (delta.getMinutes() >= 1) ? delta.getMinutes()+\"m\" :\n // 1+ seconds\n delta.getSeconds()+\"s\";\n }", "public String getTime() {\n\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss\");\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tString time = dateFormat.format(cal.getTime());\n\t\t\treturn time;\n\t\t}", "public String getStopTime() {\n\t\treturn (new Parser(value)).skipString().getString();\n\t}", "public String getElapsedTime() {\n return elapsedTime;\n }", "public String getTime() {\n String show = time;\n return show;\n }", "public java.lang.String getTime () {\n\t\treturn time;\n\t}", "@Override\r\n\tpublic String gettime() {\n\t\treturn user.gettime();\r\n\t}", "public String estimatedTime() {\n int m = (int)(getFreeBytes()/500000000);\n return (m <= 1) ? \"a minute\" : m+\" minutes\";\n }", "public float getTime()\r\n\t{\r\n\t\treturn runningTime;\r\n\t}", "public String getTime() {\n return time;\n }", "public String getPerformanceTime()\r\n {\r\n return performanceTime;\r\n }", "public String getStartTime() {\n\t\treturn (new Parser(value)).getString();\n\t}", "public String getTotalTime() {\r\n if (recipe != null) {\r\n return readableTime(recipe.getCookTime() + recipe.getPrepTime());\r\n } else {\r\n return \"\";\r\n }\r\n }", "public String getTime()\r\n\t{\r\n\t\treturn displayString;\r\n\t}", "public String getTime() {\r\n\t\treturn time;\r\n\t}", "public java.lang.String getTime() {\n java.lang.Object ref = time_;\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 time_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "java.lang.String getPlayTime();", "public String getTime() {\n\t\treturn time;\n\t}", "public java.lang.String getTime() {\n java.lang.Object ref = time_;\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 time_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getTime() {\n return String.format(\"%02d\", hours) + \":\" + String.format(\"%02d\", minutes);\n }", "private String getPlayTimeString() {\n double fltPlayPositionInFrames = (fltPlayPercent/100.0f) * lngTimelineDataAmountInRmsFrames;\n double fltTime = (double)(fltPlayPositionInFrames * fltRmsFramePeriodInMs)/1000.0f;\n return new DecimalFormat(\"000.00\").format(fltTime); // String.format(\"%3.1f\", fltTime);\n }", "public synchronized String getTime() {\n\t\treturn time;\n\t}", "public String getTime() {\n return this.time;\n }", "public float getRunTime() {\r\n return runTime;\r\n }", "public String totalProcessorTime() {\n return this.totalProcessorTime;\n }", "public String getTime() {\n\t}", "@Override\n public String toString() {\n if (timeEnd == null) {\n stop();\n }\n return task + \" in \" + (timeEnd - timeStart) + \"ms\";\n }", "public String getTimeString() {\n // Converts slot to the minute it starts in the day\n int slotTimeMins =\n SlopeManagerApplication.OPENING_TIME * 60 + SESSION_LENGTHS_MINS * getSlot();\n\n Calendar cal = Calendar.getInstance();\n cal.set(Calendar.HOUR_OF_DAY, slotTimeMins/60);\n cal.set(Calendar.MINUTE, slotTimeMins % 60);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.MILLISECOND, 0);\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm\");\n return sdf.format(cal.getTime());\n }", "@Override\n\tpublic String getTime() {\n\t\treturn time;\n\t}", "public static String time(int time) {\n return time((long)time);\n }", "public String getTime(){\n return time;\n }", "long getExecutionTime();", "@SimpleFunction(description = \"Gets the current time.\"\n + \"It is formatted correctly for iSENSE\")\n public String GetTime() {\n Calendar cal = Calendar.getInstance();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSSZ\");\n return sdf.format(cal.getTime()).toString();\n }", "int getEvalTm();", "public static String getTime()\n {\n Date time = new Date();\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"HH:mm:ss\");\n return timeFormat.format(time);\n }", "public double getSystemTimeSec() {\n\treturn getSystemTime() / Math.pow(10, 9);\n}", "@Override\n\tpublic String toString()\n\t{\n\t\treturn \"Stopwatch: \" + \"Elapsed millis: \" + getElapsedMs() + (m_running ? \" Running\" : \" Not running\");\n\t}", "public java.lang.String getTime() {\n java.lang.Object ref = time_;\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 time_ = s;\n return s;\n }\n }", "public String getNiceTime(){\n\t\treturn sTimeFormat.format(mTime);\n\t}", "public java.lang.String getTime() {\n java.lang.Object ref = time_;\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 time_ = s;\n return s;\n }\n }", "public String userProcessorTime() {\n return this.userProcessorTime;\n }", "private long getSystemTime() {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ? (bean.getCurrentThreadCpuTime() - bean.getCurrentThreadUserTime()) : 0L;\n }", "public java.lang.Integer getExecutionTime() {\n return execution_time;\n }", "@DISPID(17)\r\n\t// = 0x11. The runtime will prefer the VTID if present\r\n\t@VTID(23)\r\n\tjava.lang.String lastInstanceElapsedRunTime();", "public static double getExecutionTimeInSeconds(){\n\t\treturn (executionTime * (1.0e-9));\n\t}", "public String getTime(){\r\n\t\tDate date = new GregorianCalendar().getTime();\r\n\r\n\t\tString time= new SimpleDateFormat(\"HH:mm:ss\").format(date.getTime());\r\n\t\t\r\n\t\treturn time;\r\n\t}", "public String getEstimatedRemainingTime() {\n long d = executable.getParent().getEstimatedDuration();\n if(d<0) return \"N/A\";\n \n long eta = d-(System.currentTimeMillis()-startTime);\n if(eta<=0) return \"N/A\";\n \n return Util.getTimeSpanString(eta);\n }", "public static String getCurrentMillisecondTime()\n\t{\n\t\treturn getMillisecondTime(new Date());\n\t}", "public String getTime() {\n Date date = new Date();\n return (date.toString());\n }", "public String getReadablePrepTime() {\r\n if (recipe != null) {\r\n return readableTime(recipe.getPrepTime());\r\n } else {\r\n return \"\";\r\n }\r\n }", "public static long getSystemTime () {\n\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported()?\n (bean.getCurrentThreadCpuTime() - bean.getCurrentThreadUserTime()): 0L;\n }", "public String toString() {\n return this.time != null ? this.time.format(TIME_FORMATTER) : \"\";\n }", "public static long time() {\n return date().getTime();\n }", "public double getElapsedTime() {\r\n return (double) (elapsedTime / 1000.0); // convert from milliseconds to seconds\r\n }", "public java.lang.Integer getExecutionTime() {\n return execution_time;\n }", "public int getTime()\n {\n if (isRepeated()) return start;\n else return time;\n }", "private long baseTime() {\n return Bytes.getUnsignedInt(row, tsdb.metrics.width());\n }", "public String getSystemTime() {\n return DateFormat.getDateTimeInstance().format(new Date().getTime());\n }", "private String intTime(long l){\r\n String s=\"\";\r\n s+=(char)(((l/1000)/60)+'0')+\":\"+(char)((((l/1000)%60)/10)+'0')+(char)((((l/1000)%60)%10)+'0'); \r\n return s;\r\n }", "@DISPID(92)\r\n\t// = 0x5c. The runtime will prefer the VTID if present\r\n\t@VTID(90)\r\n\tasci.activebatch.IAbatTimeSpan actualRunTimeSpan();", "public double time()\n\t{\n\t\treturn _dblTime;\n\t}", "public double time()\n\t{\n\t\treturn _dblTime;\n\t}", "public int getTime() {\r\n return time;\r\n }", "public String getFormattedTimeFromStart() {\r\n if (history.getNumberOfJumpsSoFar() == 0) {\r\n return \"00:00\";\r\n }\r\n\r\n double time = history.getTimeFromStart();\r\n double maxTime = 59.59;\r\n if (time < maxTime) {\r\n return String.format(\"%02d:%02d\", (int) (time % 60), (int) (time * 100 % 100));\r\n } else {\r\n return \"59:59\";\r\n }\r\n }", "public java.lang.String getPlayTime() {\n java.lang.Object ref = playTime_;\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 playTime_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getTime() {\n return dateTime.format(c.getTime());\n }", "public static String getPrintToFileTime() {\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMdd_HHmmss\");\n return sdf.format(System.currentTimeMillis());\n }", "protected String timeToSpeed() {\n String speedValueText = \"\";\n try {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"hh:mm:ss aa\");\n localDate = dateFormat.parse(mLastUpdateTimeTextView.getText().toString());\n long localDateMS = localDate.getTime();\n long previousDateMs = previousDate.getTime();\n double timeValueSecond = (localDateMS - previousDateMs) / 1000;\n timeSingleValue = timeValueSecond;\n double distance = Double.parseDouble(mMoveTextView.getText().toString().substring(0, mMoveTextView.length() - 2));\n double speedValue = Math.round(((distance / timeValueSecond) * 3600 / 1000)*100)/100.0;\n if (speedValue < 0.01 || Double.isNaN(speedValue) || speedValue > 10000) speedValue = 0;\n speedValueText = String.valueOf(speedValue);\n previousDate = localDate;\n }\n catch (ParseException e) {\n mSpeedTextView.setText(e.getMessage());\n }\n return speedValueText ; // String.valueOf(timeValueMS);\n }", "public String getTime(){\n String mt=\"\";\n String hr=\"\";\n if(minute<10){\n mt=0+(String.valueOf(minute));\n }\n\n else{\n mt=String.valueOf(minute);\n }\n\n if(hour<10){\n hr=0+(String.valueOf(hour));\n }\n else{\n hr=String.valueOf(hour);\n }\n //return hour:minute\n return (hr+\":\"+mt);\n }", "public int getTime() {\n return time;\n }", "public int getTime() {\n return time;\n }", "public int getTime() {\n return time;\n }", "public double getCBRTime();", "public String getCurrentThreadTimeInfo() {\n\t\t\n\t\tStringBuffer sb = new StringBuffer();\n\t\tThreadMXBean bean = ManagementFactory.getThreadMXBean();\n\t\tif(!bean.isCurrentThreadCpuTimeSupported())\n\t\t\treturn timeInfo;\n\t\tlong userTime = bean.getCurrentThreadUserTime();\n\t\tlong cpuTime = bean.getCurrentThreadCpuTime();\n\n\t\tsb.append(userTime).append(\"#\").append(cpuTime);\n\t\ttimeInfo = sb.toString();\n//\t\tSystem.out.println(\"lib: \" + timeInfo);\n\t\treturn timeInfo;\n\t}", "public String getTimeString() {\n DateFormat format = new SimpleDateFormat(\"HH:mm\");\n return format.format(mDate);\n }", "public static long getSystemTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n (bean.getCurrentThreadCpuTime( ) - bean.getCurrentThreadUserTime( )) : 0L;\n\n }", "public final native String toTimeString() /*-{\n return this.toTimeString();\n }-*/;", "public static String GetRunTime(Date starttime, Date stoptime) {\n String result = \"\";\n long diff = 0;\n long mills = 0;\n long x = 0;\n long seconds = 0;\n long minutes = 0;\n long hours = 0;\n\n diff = stoptime.getTime() - starttime.getTime();\n mills = diff % 1000;\n x = diff / 1000;\n seconds = x % 60;\n x /= 60;\n minutes = x % 60;\n x /= 60;\n hours = x % 24;\n\n result = String.format(\"%d:%d:%d.%d\", hours, minutes, seconds, mills);\n\n return result;\n }", "@Override\n\tpublic String getUsedCpuTime() {\n\t\treturn model.getUsedCpuTime();\n\t}", "public String timeToString() {\n\t\tString start = \"\";\n\t\tString hmSep = \":\";\n\t\tString msSep = \":\";\n\t\tif (hour < 10)\n\t\t\tstart = new String(\"0\");\n\t\tif (minute < 10)\n\t\t\thmSep = new String(\":0\");\n\t\tif (second < 10)\n\t\t\tmsSep = new String(\":0\");\n\t\treturn new String(start\n\t\t\t\t+ hour + hmSep\n\t\t\t\t+ minute + msSep\n\t\t\t\t+ second);\n\t}", "java.lang.String getArrivalTime();", "java.lang.String getArrivalTime();", "public long getElapsedTimeMili() {\n return running ? ((System.currentTimeMillis() - startTime)/100) % 1000 : 0;\n }", "public static String getPrintToDirectoryTime() {\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat sdf = new SimpleDateFormat(\"MMdd\");\n return sdf.format(System.currentTimeMillis());\n }", "public double getCpuTimeSec() {\n\treturn getCpuTime() / Math.pow(10, 9);\t\t\n}", "public int getSystemTime() {\n\t\treturn this.systemTime;\n\t}" ]
[ "0.7197917", "0.6982172", "0.6776558", "0.6728207", "0.6725784", "0.6702648", "0.66802394", "0.6643894", "0.66145813", "0.6570381", "0.6534496", "0.6437182", "0.64305073", "0.6383188", "0.63721836", "0.63710874", "0.63610196", "0.63332003", "0.6323897", "0.6294948", "0.62795043", "0.6275134", "0.6243668", "0.62219495", "0.62181604", "0.62065285", "0.62020546", "0.61997354", "0.61788857", "0.6165954", "0.61524487", "0.6148153", "0.61203796", "0.61179525", "0.611778", "0.6112446", "0.61033666", "0.60939693", "0.6092984", "0.6090978", "0.6087807", "0.60773665", "0.6066238", "0.6064462", "0.605968", "0.60566616", "0.6048734", "0.60236895", "0.59988207", "0.5993193", "0.5989986", "0.5986828", "0.5977156", "0.5971819", "0.59685963", "0.5965189", "0.5939996", "0.59339845", "0.5931347", "0.5929415", "0.59290767", "0.5923396", "0.59108365", "0.5904927", "0.58973444", "0.58887386", "0.5878601", "0.5874582", "0.5866678", "0.5862854", "0.58611184", "0.5849983", "0.5833794", "0.5821372", "0.581832", "0.581832", "0.581831", "0.581598", "0.5813671", "0.58124757", "0.58104485", "0.5810269", "0.58051443", "0.5803336", "0.5803336", "0.5803336", "0.5802731", "0.5799605", "0.5798111", "0.57951456", "0.5789649", "0.5781698", "0.578014", "0.57773286", "0.5776873", "0.5776873", "0.5776803", "0.57655245", "0.5758083", "0.57580054" ]
0.7968854
0
Getter of running time in days for interface implementation.
@Override public Long getRunningTimeInDays() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@DISPID(52)\r\n\t// = 0x34. The runtime will prefer the VTID if present\r\n\t@VTID(50)\r\n\tint actualCPUTime_Days();", "@DISPID(57)\r\n\t// = 0x39. The runtime will prefer the VTID if present\r\n\t@VTID(55)\r\n\tint actualRunTime_Days();", "@Override\n\tpublic RunTime runTime()\n\t{\n\t\tCalendar now = Calendar.getInstance();\n\t\tRunTimeImpl rv = new RunTimeImpl(now.get(Calendar.HOUR_OF_DAY), now.get(Calendar.MINUTE));\n\n\t\treturn rv;\n\t}", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Long getWorkElapsed() {\n return (java.lang.Long)__getInternalInterface().getFieldValue(WORKELAPSED_PROP.get());\n }", "@DISPID(62)\r\n\t// = 0x3e. The runtime will prefer the VTID if present\r\n\t@VTID(60)\r\n\tint averageRunTime_Days();", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Long getWorkElapsed() {\n return (java.lang.Long)__getInternalInterface().getFieldValue(WORKELAPSED_PROP.get());\n }", "public float getRunTime() {\r\n return runTime;\r\n }", "long getExecutionTime();", "@Override\n public Long getRunningTimeInHours() {\n return null;\n }", "@DISPID(67)\r\n\t// = 0x43. The runtime will prefer the VTID if present\r\n\t@VTID(65)\r\n\tint averageCPUTime_Days();", "public int getRunTime() { \n\t\t\treturn RunTime;\n\t\t}", "int getRunningDuration();", "public java.lang.Integer getExecutionTime() {\n return execution_time;\n }", "public float getTime()\r\n\t{\r\n\t\treturn runningTime;\r\n\t}", "public int getTotalRunTime() {\n return totalRunTime;\n }", "public java.lang.Integer getExecutionTime() {\n return execution_time;\n }", "@DISPID(58)\r\n\t// = 0x3a. The runtime will prefer the VTID if present\r\n\t@VTID(56)\r\n\tint actualRunTime_Hours();", "public int getCurrentDay() {\n return daysPassed;\n }", "int getEvalTm();", "public int getTotalTime();", "public long getElapsedTimeSecs() {\n return running ? ((System.currentTimeMillis() - startTime) / 1000) % 60 : 0;\n }", "public int getRunDuration() {\n return runDuration;\n }", "public long getElapsedHours() {\n\t\tlong elapsed;\n\t\tif (running) {\n\t\t\telapsed = (System.nanoTime() - startTime);\n\t\t} else {\n\t\t\telapsed = (stopTime - startTime);\n\t\t}\n\t\treturn elapsed / nsPerHh;\n\t}", "public int getUpDays() {\n return (int)(_uptime / 86400000);\n }", "public Integer getTotalDays()\r\n/* 68: */ {\r\n/* 69:67 */ return this.totalDays;\r\n/* 70: */ }", "public int getIDays() {\n return iDays;\n }", "@DISPID(53)\r\n\t// = 0x35. The runtime will prefer the VTID if present\r\n\t@VTID(51)\r\n\tint actualCPUTime_Hours();", "public long getDays() {\r\n \treturn days;\r\n }", "int getStatus(){\n\t\tif(!daysUntilStarts.equals(0)){\n\t\t\treturn -1 * daysUntilStarts;\n\t\t}\n\t\treturn daysToRun;\n\t}", "public Date getRunDate() {\n return runDate;\n }", "public String getRunningTimeStr() {\n if (this.runningTime == null)\n return null;\n else\n return CommonRunService.getTimeStr(this.runningTime);\n }", "public int getDays() {\n return this.days;\n }", "public abstract long getUptime();", "public Integer getPresentDays()\r\n/* 48: */ {\r\n/* 49:51 */ return this.presentDays;\r\n/* 50: */ }", "public long getEvaluationCycleDuration() {\n return evaluationCycleDuration;\n }", "public String getElapsedTime() {\n /**\n * Joda instruction credit to BalusC @ stackoverflow.com\n * http://stackoverflow.com/posts/2179831/revisions\n */\n Period delta = new Period(getOccurrenceTime(), DateTime.now());\n return\n // 1+ weeks\n (delta.getWeeks() >= 1) ? delta.getWeeks()+\"w\" :\n // 1+ days\n (delta.getDays() >= 1) ? delta.getDays()+\"d\" :\n // 1+ hours\n (delta.getHours() >= 1) ? delta.getHours()+\"h\" :\n // 1+ minutes\n (delta.getMinutes() >= 1) ? delta.getMinutes()+\"m\" :\n // 1+ seconds\n delta.getSeconds()+\"s\";\n }", "public abstract double calculateStartTime();", "public long getElapsedTimeHour() {\n return running ? ((((System.currentTimeMillis() - startTime) / 1000) / 60 ) / 60) : 0;\n }", "int getNumberDays();", "public int getEDays() {\n return eDays;\n }", "long getTermDays();", "public Date getWorkDay() {\n\t\treturn workDay;\n\t}", "private int getDays() {\n\t\tlong arrival = arrivalDate.toEpochDay();\n\t\tlong departure = departureDate.toEpochDay();\n\t\tint days = (int) Math.abs(arrival - departure);\n\n\t\treturn days;\n\t}", "Integer getStartDay();", "public int getDay()\n {\n return day;\n }", "public int getDays(){\r\n\t\treturn days;\r\n\t}", "public int getDay() {\r\n return day;\r\n }", "public long getElapsedTime()\r\n {\r\n if(isRunning)\r\n {\r\n long endTime = System.currentTimeMillis();\r\n return elapsedTime=endTime-startTime;\r\n }\r\n else\r\n {\r\n return elapsedTime;\r\n }\r\n }", "public int getRun();", "protected double getElapsedTime() {\n\t\treturn Utilities.getTime() - startTime;\n\t}", "long getInhabitedTime();", "public long getEvaluationTime() {\r\n\t\treturn evaluationTime;\r\n\t}", "@DISPID(92)\r\n\t// = 0x5c. The runtime will prefer the VTID if present\r\n\t@VTID(90)\r\n\tasci.activebatch.IAbatTimeSpan actualRunTimeSpan();", "public static long getDayNumber() {\n return getSecondsSinceEpoch() / SECS_TO_DAYS;\n }", "@Override\n public synchronized double get() {\n if (m_running) {\n return ((getMsClock() - m_startTime) + m_accumulatedTime) / 1000.0;\n }\n return m_accumulatedTime;\n }", "public int activeDays() {return activeDay;}", "public int totalTime()\n {\n return departureTime - arrivalTime;\n }", "public TimeStep getTimeStep() {\n\t\t// Only here to ensure it is being used correctly.\n\t\t// cbit.util.Assertion.assertNotNull(fieldTimeStep);\n\t\treturn fieldTimeStep;\n\t}", "public static long getElapsedTime() {\n\t\tlong elapsed;\n\t\tif (running) {\n\t\t\telapsed = (System.nanoTime() - startTime);\n\t\t} else {\n\t\t\telapsed = (stopTime - startTime);\n\t\t}\n\t\treturn elapsed;\n\t}", "public long getElapsedTime() {\n\t\treturn this.getTime();\n\t}", "public long getIntegrationTime() {\n\t\treturn updateTimeStamp - startTime;\n\t}", "public int getWorkRequired() {\n return time;\n }", "public int getUDays() {\n return uDays;\n }", "public Duration getActualWork()\r\n {\r\n return (m_actualWork);\r\n }", "public long getExecutionTime() {\n return executionTime_;\n }", "public int getFulfillmentTimeInDays () {\n return 0;\n }", "public int getNumberOfDays() {\n return numberOfDays;\n }", "long getTotalDoExamTime();", "@Override\n\tpublic long getInhabitedTime()\n\t{\n\t\tthrow new UnimplementedOperationException();\n\t}", "public int getDay() {\n return day;\n }", "public Integer getDay()\n {\n return this.day;\n }", "public long getEventTime();", "@Override\n\tpublic long getTime() {\n\t\treturn System.nanoTime() - startTime;\n\t}", "Integer getDay();", "public int getLBR_ProtestDays();", "public int getWeeksElapsed() {\n return weeksElapsed;\n }", "Integer getDaysSpanned();", "public double getHoursWorked()\r\n\t{\r\n\treturn hoursWorked;\r\n\t}", "private double getTimeRemainingInUTCDay(){\n\t\tdouble daysLeftInDay;\n\n\t\tInstant origin = Instant.ofEpochMilli (cur_mainshock.getOriginTime());\n\t\tZonedDateTime zdt = ZonedDateTime.ofInstant (origin, ZoneOffset.UTC);\n\t\tZonedDateTime zdt2 = zdt.toLocalDate().atStartOfDay (ZoneOffset.UTC);\n\t\tInstant daybreak = zdt2.toInstant();\n\n//\t\tSimpleDateFormat formatter=new SimpleDateFormat(\"d MMM yyyy, HH:mm:ss\");\n//\t\tformatter.setTimeZone(utc); //utc=TimeZone.getTimeZone(\"UTC\"));\n//\t\tSystem.out.println(formatter.format(Date.from (origin)));\n//\t\tSystem.out.println(formatter.format(Date.from (daybreak)));\n\t\t\n\t\tdaysLeftInDay = 1.0 - ((double)(origin.toEpochMilli() - daybreak.toEpochMilli()))/ComcatOAFAccessor.day_millis;\n\t\tif (daysLeftInDay == 1.0) {\n\t\t\tdaysLeftInDay = 0.0;\n\t\t}\n\t\treturn daysLeftInDay;\n\t}", "public int getDay(){\n\t\treturn day;\n\t}", "public String elapsedTime() {\n return totalWatch.toString();\n }", "public long getExecutionTime() {\n return executionTime_;\n }", "public Long getLastRunDuration();", "Integer getEndDay();", "public Duration getWork()\r\n {\r\n return (m_work);\r\n }", "public long timeElapsed()\n {\n return (System.currentTimeMillis() - this.startTime) / 1000;\n }", "public DayCount getDayCount() {\n return dayCount;\n }", "public long elapsedTime(){\n\n // calculate elapsed time by getting current CPU time and substracting the CPU time from when we started the stopwatch\n\n // this does not stop the stopwatch\n\n return (magicBean.getCurrentThreadCpuTime() - stopWatchStartTimeNanoSecs);\n\n }", "public static final long getTicksPerDay() {\n return p().TICKS_PER_RLDAY;\n }", "public int getDayOrNight() {\n return getStat(dayOrNight);\n }", "public int getDay() {\n\t\treturn day;\n\t}", "public int getDay() {\n\t\treturn day;\n\t}", "public int getDay() {\n\t\treturn day;\n\t}", "public int getDay() {\n\treturn day;\n }", "public long totalTime() {\n\t\tlong ret = 0;\n\t\tfor (Task l : plan) {\n\t\t\tret += l.getTaskLength();\n\t\t}\n\n\t\treturn ret;\n\t}", "public int getDayDistance() {\n\t\treturn dayDistance;\n\t}", "public int getIntervalHours();", "public java.lang.Integer getDaysNonWorking() {\n return daysNonWorking;\n }", "public int getDay() {\r\n\t\treturn (this.day);\r\n\t}", "public long getTime() {\n\t\tDate _date = new Date();\n\t\tlong _time = _date.getTime();\n\t\t_time = _time + getDeltaDate();\n\t\treturn _time;\n\t}" ]
[ "0.72842544", "0.7076185", "0.66881263", "0.64991176", "0.64646053", "0.6458402", "0.64530694", "0.64272666", "0.64220077", "0.6387728", "0.63762367", "0.63624364", "0.6333253", "0.63246465", "0.63167423", "0.6290983", "0.62699485", "0.6265632", "0.6218229", "0.6200349", "0.6169978", "0.61622787", "0.61449623", "0.61322", "0.61293286", "0.6127647", "0.6094698", "0.6091971", "0.60497016", "0.6043151", "0.6008404", "0.5969419", "0.59613526", "0.59354395", "0.5934678", "0.59307593", "0.59222007", "0.59195215", "0.5916203", "0.5911387", "0.5892655", "0.5880381", "0.58771306", "0.58748597", "0.58717054", "0.58643025", "0.58607864", "0.58563423", "0.58438724", "0.5834075", "0.5833534", "0.58221835", "0.58134234", "0.58001757", "0.5795472", "0.5793236", "0.57909983", "0.5790451", "0.578587", "0.57848173", "0.578179", "0.57788885", "0.5772009", "0.5766585", "0.5757962", "0.5752085", "0.57472974", "0.57419544", "0.57213306", "0.5721206", "0.572087", "0.5715649", "0.57153845", "0.57045424", "0.5693803", "0.56933236", "0.5693007", "0.5692925", "0.5688901", "0.5685304", "0.56845564", "0.5682438", "0.5678243", "0.567755", "0.56673187", "0.5664075", "0.5663393", "0.56472814", "0.5644356", "0.564202", "0.5639477", "0.5639477", "0.5639477", "0.5637091", "0.56360024", "0.5635615", "0.5632321", "0.56259614", "0.56196445", "0.56162333" ]
0.7097484
1
Getter of running time in days for interface implementation.
@Override public Long getRunningTimeInHours() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@DISPID(52)\r\n\t// = 0x34. The runtime will prefer the VTID if present\r\n\t@VTID(50)\r\n\tint actualCPUTime_Days();", "@Override\n public Long getRunningTimeInDays() {\n return null;\n }", "@DISPID(57)\r\n\t// = 0x39. The runtime will prefer the VTID if present\r\n\t@VTID(55)\r\n\tint actualRunTime_Days();", "@Override\n\tpublic RunTime runTime()\n\t{\n\t\tCalendar now = Calendar.getInstance();\n\t\tRunTimeImpl rv = new RunTimeImpl(now.get(Calendar.HOUR_OF_DAY), now.get(Calendar.MINUTE));\n\n\t\treturn rv;\n\t}", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Long getWorkElapsed() {\n return (java.lang.Long)__getInternalInterface().getFieldValue(WORKELAPSED_PROP.get());\n }", "@DISPID(62)\r\n\t// = 0x3e. The runtime will prefer the VTID if present\r\n\t@VTID(60)\r\n\tint averageRunTime_Days();", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Long getWorkElapsed() {\n return (java.lang.Long)__getInternalInterface().getFieldValue(WORKELAPSED_PROP.get());\n }", "public float getRunTime() {\r\n return runTime;\r\n }", "long getExecutionTime();", "@DISPID(67)\r\n\t// = 0x43. The runtime will prefer the VTID if present\r\n\t@VTID(65)\r\n\tint averageCPUTime_Days();", "public int getRunTime() { \n\t\t\treturn RunTime;\n\t\t}", "int getRunningDuration();", "public java.lang.Integer getExecutionTime() {\n return execution_time;\n }", "public float getTime()\r\n\t{\r\n\t\treturn runningTime;\r\n\t}", "public int getTotalRunTime() {\n return totalRunTime;\n }", "public java.lang.Integer getExecutionTime() {\n return execution_time;\n }", "@DISPID(58)\r\n\t// = 0x3a. The runtime will prefer the VTID if present\r\n\t@VTID(56)\r\n\tint actualRunTime_Hours();", "public int getCurrentDay() {\n return daysPassed;\n }", "int getEvalTm();", "public int getTotalTime();", "public long getElapsedTimeSecs() {\n return running ? ((System.currentTimeMillis() - startTime) / 1000) % 60 : 0;\n }", "public int getRunDuration() {\n return runDuration;\n }", "public long getElapsedHours() {\n\t\tlong elapsed;\n\t\tif (running) {\n\t\t\telapsed = (System.nanoTime() - startTime);\n\t\t} else {\n\t\t\telapsed = (stopTime - startTime);\n\t\t}\n\t\treturn elapsed / nsPerHh;\n\t}", "public int getUpDays() {\n return (int)(_uptime / 86400000);\n }", "public Integer getTotalDays()\r\n/* 68: */ {\r\n/* 69:67 */ return this.totalDays;\r\n/* 70: */ }", "public int getIDays() {\n return iDays;\n }", "@DISPID(53)\r\n\t// = 0x35. The runtime will prefer the VTID if present\r\n\t@VTID(51)\r\n\tint actualCPUTime_Hours();", "public long getDays() {\r\n \treturn days;\r\n }", "int getStatus(){\n\t\tif(!daysUntilStarts.equals(0)){\n\t\t\treturn -1 * daysUntilStarts;\n\t\t}\n\t\treturn daysToRun;\n\t}", "public Date getRunDate() {\n return runDate;\n }", "public String getRunningTimeStr() {\n if (this.runningTime == null)\n return null;\n else\n return CommonRunService.getTimeStr(this.runningTime);\n }", "public int getDays() {\n return this.days;\n }", "public abstract long getUptime();", "public Integer getPresentDays()\r\n/* 48: */ {\r\n/* 49:51 */ return this.presentDays;\r\n/* 50: */ }", "public long getEvaluationCycleDuration() {\n return evaluationCycleDuration;\n }", "public String getElapsedTime() {\n /**\n * Joda instruction credit to BalusC @ stackoverflow.com\n * http://stackoverflow.com/posts/2179831/revisions\n */\n Period delta = new Period(getOccurrenceTime(), DateTime.now());\n return\n // 1+ weeks\n (delta.getWeeks() >= 1) ? delta.getWeeks()+\"w\" :\n // 1+ days\n (delta.getDays() >= 1) ? delta.getDays()+\"d\" :\n // 1+ hours\n (delta.getHours() >= 1) ? delta.getHours()+\"h\" :\n // 1+ minutes\n (delta.getMinutes() >= 1) ? delta.getMinutes()+\"m\" :\n // 1+ seconds\n delta.getSeconds()+\"s\";\n }", "public abstract double calculateStartTime();", "public long getElapsedTimeHour() {\n return running ? ((((System.currentTimeMillis() - startTime) / 1000) / 60 ) / 60) : 0;\n }", "int getNumberDays();", "public int getEDays() {\n return eDays;\n }", "long getTermDays();", "public Date getWorkDay() {\n\t\treturn workDay;\n\t}", "private int getDays() {\n\t\tlong arrival = arrivalDate.toEpochDay();\n\t\tlong departure = departureDate.toEpochDay();\n\t\tint days = (int) Math.abs(arrival - departure);\n\n\t\treturn days;\n\t}", "Integer getStartDay();", "public int getDay()\n {\n return day;\n }", "public int getDays(){\r\n\t\treturn days;\r\n\t}", "public int getDay() {\r\n return day;\r\n }", "public long getElapsedTime()\r\n {\r\n if(isRunning)\r\n {\r\n long endTime = System.currentTimeMillis();\r\n return elapsedTime=endTime-startTime;\r\n }\r\n else\r\n {\r\n return elapsedTime;\r\n }\r\n }", "public int getRun();", "protected double getElapsedTime() {\n\t\treturn Utilities.getTime() - startTime;\n\t}", "long getInhabitedTime();", "public long getEvaluationTime() {\r\n\t\treturn evaluationTime;\r\n\t}", "@DISPID(92)\r\n\t// = 0x5c. The runtime will prefer the VTID if present\r\n\t@VTID(90)\r\n\tasci.activebatch.IAbatTimeSpan actualRunTimeSpan();", "public static long getDayNumber() {\n return getSecondsSinceEpoch() / SECS_TO_DAYS;\n }", "@Override\n public synchronized double get() {\n if (m_running) {\n return ((getMsClock() - m_startTime) + m_accumulatedTime) / 1000.0;\n }\n return m_accumulatedTime;\n }", "public int activeDays() {return activeDay;}", "public int totalTime()\n {\n return departureTime - arrivalTime;\n }", "public TimeStep getTimeStep() {\n\t\t// Only here to ensure it is being used correctly.\n\t\t// cbit.util.Assertion.assertNotNull(fieldTimeStep);\n\t\treturn fieldTimeStep;\n\t}", "public static long getElapsedTime() {\n\t\tlong elapsed;\n\t\tif (running) {\n\t\t\telapsed = (System.nanoTime() - startTime);\n\t\t} else {\n\t\t\telapsed = (stopTime - startTime);\n\t\t}\n\t\treturn elapsed;\n\t}", "public long getElapsedTime() {\n\t\treturn this.getTime();\n\t}", "public long getIntegrationTime() {\n\t\treturn updateTimeStamp - startTime;\n\t}", "public int getWorkRequired() {\n return time;\n }", "public int getUDays() {\n return uDays;\n }", "public Duration getActualWork()\r\n {\r\n return (m_actualWork);\r\n }", "public long getExecutionTime() {\n return executionTime_;\n }", "public int getFulfillmentTimeInDays () {\n return 0;\n }", "public int getNumberOfDays() {\n return numberOfDays;\n }", "long getTotalDoExamTime();", "@Override\n\tpublic long getInhabitedTime()\n\t{\n\t\tthrow new UnimplementedOperationException();\n\t}", "public int getDay() {\n return day;\n }", "public Integer getDay()\n {\n return this.day;\n }", "public long getEventTime();", "@Override\n\tpublic long getTime() {\n\t\treturn System.nanoTime() - startTime;\n\t}", "Integer getDay();", "public int getLBR_ProtestDays();", "public int getWeeksElapsed() {\n return weeksElapsed;\n }", "Integer getDaysSpanned();", "public double getHoursWorked()\r\n\t{\r\n\treturn hoursWorked;\r\n\t}", "private double getTimeRemainingInUTCDay(){\n\t\tdouble daysLeftInDay;\n\n\t\tInstant origin = Instant.ofEpochMilli (cur_mainshock.getOriginTime());\n\t\tZonedDateTime zdt = ZonedDateTime.ofInstant (origin, ZoneOffset.UTC);\n\t\tZonedDateTime zdt2 = zdt.toLocalDate().atStartOfDay (ZoneOffset.UTC);\n\t\tInstant daybreak = zdt2.toInstant();\n\n//\t\tSimpleDateFormat formatter=new SimpleDateFormat(\"d MMM yyyy, HH:mm:ss\");\n//\t\tformatter.setTimeZone(utc); //utc=TimeZone.getTimeZone(\"UTC\"));\n//\t\tSystem.out.println(formatter.format(Date.from (origin)));\n//\t\tSystem.out.println(formatter.format(Date.from (daybreak)));\n\t\t\n\t\tdaysLeftInDay = 1.0 - ((double)(origin.toEpochMilli() - daybreak.toEpochMilli()))/ComcatOAFAccessor.day_millis;\n\t\tif (daysLeftInDay == 1.0) {\n\t\t\tdaysLeftInDay = 0.0;\n\t\t}\n\t\treturn daysLeftInDay;\n\t}", "public int getDay(){\n\t\treturn day;\n\t}", "public String elapsedTime() {\n return totalWatch.toString();\n }", "public long getExecutionTime() {\n return executionTime_;\n }", "public Long getLastRunDuration();", "Integer getEndDay();", "public Duration getWork()\r\n {\r\n return (m_work);\r\n }", "public long timeElapsed()\n {\n return (System.currentTimeMillis() - this.startTime) / 1000;\n }", "public DayCount getDayCount() {\n return dayCount;\n }", "public long elapsedTime(){\n\n // calculate elapsed time by getting current CPU time and substracting the CPU time from when we started the stopwatch\n\n // this does not stop the stopwatch\n\n return (magicBean.getCurrentThreadCpuTime() - stopWatchStartTimeNanoSecs);\n\n }", "public static final long getTicksPerDay() {\n return p().TICKS_PER_RLDAY;\n }", "public int getDayOrNight() {\n return getStat(dayOrNight);\n }", "public int getDay() {\n\t\treturn day;\n\t}", "public int getDay() {\n\t\treturn day;\n\t}", "public int getDay() {\n\t\treturn day;\n\t}", "public int getDay() {\n\treturn day;\n }", "public long totalTime() {\n\t\tlong ret = 0;\n\t\tfor (Task l : plan) {\n\t\t\tret += l.getTaskLength();\n\t\t}\n\n\t\treturn ret;\n\t}", "public int getDayDistance() {\n\t\treturn dayDistance;\n\t}", "public int getIntervalHours();", "public java.lang.Integer getDaysNonWorking() {\n return daysNonWorking;\n }", "public int getDay() {\r\n\t\treturn (this.day);\r\n\t}", "public long getTime() {\n\t\tDate _date = new Date();\n\t\tlong _time = _date.getTime();\n\t\t_time = _time + getDeltaDate();\n\t\treturn _time;\n\t}" ]
[ "0.72842544", "0.7097484", "0.7076185", "0.66881263", "0.64991176", "0.64646053", "0.6458402", "0.64530694", "0.64272666", "0.6387728", "0.63762367", "0.63624364", "0.6333253", "0.63246465", "0.63167423", "0.6290983", "0.62699485", "0.6265632", "0.6218229", "0.6200349", "0.6169978", "0.61622787", "0.61449623", "0.61322", "0.61293286", "0.6127647", "0.6094698", "0.6091971", "0.60497016", "0.6043151", "0.6008404", "0.5969419", "0.59613526", "0.59354395", "0.5934678", "0.59307593", "0.59222007", "0.59195215", "0.5916203", "0.5911387", "0.5892655", "0.5880381", "0.58771306", "0.58748597", "0.58717054", "0.58643025", "0.58607864", "0.58563423", "0.58438724", "0.5834075", "0.5833534", "0.58221835", "0.58134234", "0.58001757", "0.5795472", "0.5793236", "0.57909983", "0.5790451", "0.578587", "0.57848173", "0.578179", "0.57788885", "0.5772009", "0.5766585", "0.5757962", "0.5752085", "0.57472974", "0.57419544", "0.57213306", "0.5721206", "0.572087", "0.5715649", "0.57153845", "0.57045424", "0.5693803", "0.56933236", "0.5693007", "0.5692925", "0.5688901", "0.5685304", "0.56845564", "0.5682438", "0.5678243", "0.567755", "0.56673187", "0.5664075", "0.5663393", "0.56472814", "0.5644356", "0.564202", "0.5639477", "0.5639477", "0.5639477", "0.5637091", "0.56360024", "0.5635615", "0.5632321", "0.56259614", "0.56196445", "0.56162333" ]
0.64220077
9
CHECK IF THERE ARE ENOUGH NODES
@Override public void run() { Send enoughPeers = new Send(Send.ENOUGH_NODES, replicationDegree); Send ret = enoughPeers.writeAndRead(enoughPeers, p, Peer.PROTOCOL, p.centralizedChordManagerAddress, p.centralizedChordManagerPort); // CHECK IF THERE ARE ENOUGH NODES if (ret.enough) { MessageDigest md3 = null; try { md3 = MessageDigest.getInstance("SHA1"); } catch (NoSuchAlgorithmException e2) { e2.printStackTrace(); } md3.reset(); md3.update(path.getBytes()); byte[] hashBytes3 = md3.digest(); BigInteger hashNum3 = new BigInteger(1, hashBytes3); int key3 = Math.abs(hashNum3.intValue()) % Peer.numDHT; System.out.println("Generated key " + key3 + " for file: " + path); FileModel file = new FileModel(path, replicationDegree, p.me); file.loadFileContent(); p.initiatorPeerFiles.add(file); if (file.fileData.length != 0) { Peer destination = null; try { destination = ChordManager.find_successor(key3); // if dest is myself then i increase the retries by 1 because I'm sending the // file to myself first if (destination.getSslEnginePort() == p.getSslEnginePort()) { file.retries += 1; } } catch (Exception e1) { e1.printStackTrace(); } SendFileThread thread = new SendFileThread(p.initiatorPeerFiles.get(p.initiatorPeerFiles.indexOf(file)), p, destination); thread.start(); try { thread.join(); } catch (InterruptedException e) { e.printStackTrace(); } if (!file.replicationDegreeAchieved()) System.out.println("File " + path + " was backed up with lower repDegree: " + file.perceivedReplicationDegree + " of: " + file.perceivedReplicationDegree); else { System.out.println("File " + path + " was backed up with repDegree wanted"); } } else { System.err.println("File " + path + " was not backed up"); } } else { System.err.println("File " + path + " was not backed up replication degree of : " + replicationDegree + " could not be achived due to less number of peers available"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean checkNaturals() {\n return getSize() == 2 && handValue() == 21;\n }", "public boolean isWin_DragonKingOfArms(){\r\n // player got LordSelachii card\r\n /*Player playerHoldCard = null;\r\n for (Player player : discWorld.getPlayer_HASH().values()) {\r\n if (player.getPersonalityCardID() == 5) {\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }*/\r\n int count = 0;\r\n for(TroubleMarker troubleMarker : discWorld.getTroubleMarker_HASH().values()){\r\n if(troubleMarker.getAreaNumber() != ConstantField.DEFAULT_PIECE_AREA_NUMBER){\r\n count++;\r\n }\r\n }\r\n \r\n if(count >= 8){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n \r\n }", "private boolean validatePacket(String[] packet)throws NullPointerException\n\t{\n\n\t\tif(packet == null)\n\t\t{\n\t\t\tthrow new NullPointerException(\"Packet was null\");\n\t\t}\n\n\t\tfor(int i = 2 ; i< packet.length ; i++)\n\t\t{\n\t\t\tif(packet.length > MAX_SIZE)\n\t\t\t{\n\t\t\t\tthrow new StringIndexOutOfBoundsException(\"Message \" + (i-1)+\": \" + \"'\" + packet[i] + \"'\" + \"is to long\");\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private boolean ifTooEmpty() {\n if (items.length <= 8) {\n return false;\n }\n float efficiency = (float) size / (float) items.length;\n return efficiency < 0.25;\n }", "boolean checkLen(int epcbytes)\n {\n return true;\n }", "public boolean hasMore() {\n return numLeft.compareTo(BigInteger.ZERO) == 1;\n }", "private boolean checkFull() {\n\t\treturn this.array.length - 1 == this.lastNotNull();\n\t}", "public boolean isEmpty() {\n\t\treturn cards.size() <= 4;\n\t}", "boolean hasBlockNumber();", "boolean hasBlockNumber();", "public boolean blockedGame() {\r\n int pointsperplayer = 0;\r\n if (playedDominoes.size() > 9) {\r\n if (end[0] == end[1]) {\r\n List<Domino> aux = new ArrayList();\r\n for (Domino d : playedDominoes) {\r\n if (d.getBothNumbers().contains(end[0])) {\r\n System.out.println(\"Adding domino\" + d.toString());\r\n aux.add(d);\r\n }\r\n }\r\n return aux.size() == 7;\r\n }\r\n }\r\n return false;\r\n }", "public boolean hasMore () {\n\t return numLeft.compareTo (BigInteger.ZERO) == 1;\n\t }", "public boolean hasMore()\n\t{\n\t\treturn numLeft.compareTo(BigInteger.ZERO) == 1;\n\t}", "public boolean underfull() {\n\t\treturn lastindex < minkeys(); // ptrs number: Math.ceil(degree / 2.0) ~ n\n\t}", "public synchronized boolean isFull() {\r\n\t\treturn (this.players.size() == 6);\r\n\t}", "private boolean checkId() {\n int sum = 0;\n int id;\n\n try\n {\n id = Integer.parseInt(ID.getText().toString());\n }\n catch (Exception e)\n {\n return false;\n }\n\n if (id >= 1000000000)\n return false;\n\n for (int i = 1; id > 0; i = (i % 2) + 1) {\n int digit = (id % 10) * i;\n sum += digit / 10 + digit % 10;\n\n id=id/10;\n }\n\n if (sum % 10 != 0)\n return false;\n\n return true;\n }", "public boolean isFull() {\n for (int r = 0; r < 6; r++) {\n for (int c = 0; c < 7; c++) {\n if (!hasPiece(r, c)) {\n return false;\n }\n }\n }\n return true;\n }", "public boolean check_upto_n(int packno) \n { \n for (int i=0; i<packno; i++) \n if (!(boolean)sentPackets[i].get(2)) \n return false; \n return true; \n }", "public boolean checkForCodek(){\n int size = pile.size();\n if(size >= 4){\n for(int i = size-1; i >= size-3; i--)\n if(pile.get(i).getVal() != pile.get(i-1).getVal())\n return false;\n return true;\n }\n else return false;\n }", "private boolean boardIsFull() {\n int numberOfFieldsOnBoard = boardSize * boardSize;\n return (numberOfFieldsOnBoard == this.numberOfOccupiedFields);\n }", "public boolean validProofOfWork(int numberOfZeroPrefixesRequired) {\n for (int i = 0; i < numberOfZeroPrefixesRequired; i++){\n if(this.hash.charAt(i) != '0'){\n return false;\n }\n }\n return true;\n }", "public boolean mo9444d() {\n if (!isLengthGreaterZero()) {\n return false;\n }\n byte[] bArr = this.byteArr;\n if (bArr.length >= 32) {\n return IsFullyValid(bArr, checkAndGetTypeLength());\n }\n return true;\n }", "private boolean outOfBounds(long n) {\n return n < 0 || n >= getSize();\n }", "private boolean isFull() {\n\t\treturn nbmsg==getSize();\n\t}", "public boolean canDonate() {\n\t\treturn (dataSize() >= Math.ceil(degree / 2.0));\n\t}", "boolean testLength(Tester t) {\n return t.checkExpect(lob3.length(), 3) && t.checkExpect(los3.length(), 3)\n && t.checkExpect(los1.length(), 1) && t.checkExpect(new MtLoGamePiece().length(), 0);\n }", "private boolean ifFull() {\n return items.length == size;\n }", "public boolean checkWin (int totalPieces){\n\t\treturn isFull();\n\t}", "public boolean checkBoardFull() {\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n if (grid[i][j].getSymbol() == '-')\n return false;\n }\n }\n return true;\n }", "public boolean isFull(){\r\n\t\tfor(int i = 0; i < boardSize; i++){\r\n\t\t\tif(board[i] == Box.EMPTY){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean isFull(){\n for(int i=0;i<3;i++){\n for(int j=0;j<3;j++){\n if(!gameBoard[i][j].equals(\"O\") && !gameBoard[i][j].equals(\"X\")){\n return false;\n }\n }\n }\n return true;\n }", "private boolean isFull() {\n\t\treturn (size == bq.length);\n\t}", "private boolean validFullHouse() {\n int highestTwo, highestThree;\n highestTwo = highestThree = -1;\n for (Integer key : this.cardOccurrence.keySet()) {\n int value = this.cardOccurrence.get(key);\n if (value == 2 && key > highestTwo)\n highestTwo = key;\n else if (value == 3 && key > highestThree) {\n //If there exists a higher 3 count, the old 3 count might be bigger than the twoCount\n if(highestThree > highestTwo)\n highestTwo = highestThree;\n highestThree = key;\n }\n }\n if (highestTwo == -1 || highestThree == -1) {\n return false;\n }\n //FullHouse only possible with 2s and 3s\n\n ArrayList<String> validHand = new ArrayList<>();\n int twosCount, threesCount;\n twosCount = threesCount = 0;\n for(int i = 0; i < this.cards.size(); i ++) {\n Card c = this.cards.get(i);\n if(c.sameValue(highestTwo) && twosCount < 2){\n twosCount++;\n validHand.add(c.toString());\n }\n else if(c.sameValue(highestThree) && threesCount < 3) {\n threesCount++;\n validHand.add(c.toString());\n }\n }\n //If above conditional didn't trigger, must be valid FullHouse of some sort\n this.cardHand = new CardHand(validHand.toArray(new String[0]));\n return true;\n }", "private boolean \n\tcheckEmptyPiece(\n\t\tfinal int pieceNumber )\n\t{\n if ( piecePicker.isInEndGameMode()){\n \n\t\t\treturn false; // be sure to not remove pieces in EGM\n }\n \n\t\tfinal PEPiece pePiece =pePieces[pieceNumber];\n\t\tfinal DiskManagerPiece dmPiece =dm_pieces[pieceNumber];\n\t\t\n\t\tif ( pePiece == null || pePiece.isRequested())\n\t\t\treturn false;\n\t\t\n\t\tif (dmPiece.getNbWritten() >0 ||pePiece.getNbUnrequested() < pePiece.getNbBlocks() ||pePiece.getReservedBy() !=null)\n\t\t\treturn false;\n\t\n\t\t\t// reset in case dmpiece is in some skanky state\n\t\t\n\t\tpePiece.reset();\n\t\t\n\t\tremovePiece(pePiece, pieceNumber);\n\t\treturn true;\n\t}", "private boolean isChoseFine(){\n if(freeSpaces.size()!=2 & freeSpaces.size()!=3){ //if the number of chosen spaces is not 3 or 2, that means it can't be good.\n return false;\n }\n else if(freeSpaces.size()==2){ //if there are 2.\n if(freeSpaces.elementAt(0).place.distance(freeSpaces.elementAt(1).place)==1)\n return true;\n else //if the distance between the spaces isn't 1, that means it can't be two suite spaces.\n return false;\n }\n else{ //if there are 3.\n //get the all 3 elements.\n int aX = freeSpaces.elementAt(0).place.x;\n int aY = freeSpaces.elementAt(0).place.y;\n int bX = freeSpaces.elementAt(1).place.x;\n int bY = freeSpaces.elementAt(1).place.y;\n int cX = freeSpaces.elementAt(2).place.x;\n int cY = freeSpaces.elementAt(2).place.y;\n if(aX==bX && bX==cX){ //if they are in the same column.\n int min = Math.min(aY, Math.min(bY, cY));\n int max = Math.max(aY, Math.max(bY, cY));\n return (max - min == 2); //if the distance between the max and the min is 2, that means they 3 suited.\n }\n else if(aY==bY && bY==cY){ //if they are in the same row.\n int min = Math.min(aX, Math.min(bX, cX));\n int max = Math.max(aX, Math.max(bX, cX));\n return (max - min == 2); //if the distance between the max and the min is 2, that means they 3 suited.\n }\n else //if they are in different rows and columns, so it isn't good.\n return false;\n }\n }", "public boolean isFull() {\n return (rear + 1) % n == head;\n }", "public static boolean dcheck() {\n if ((card[0][0] == 0 && card[1][1] == 0 && card[2][2] == 0 && card[3][3] == 0 && card[4][4] == 0) || (card[0][4] == 0 && card[1][3] == 0 && card[2][2] == 0 && card[3][1] == 0 && card[4][0] == 0)) {\n System.out.println(\"BINGO\");\n System.out.println(\"The numbers called is \" + called);\n return true;\n } else {\n return false;\n }\n }", "public boolean checkSize(int nx, int ny, int nz) {\n \tif( nx%2 != 0 ) return false;\n \tif( nz%2 != 0 ) return false;\n \treturn true;\n }", "@Override\n public boolean isFull() {\n return this.count() == 5;\n }", "@Override\n public boolean isValid() {\n return (27 - Inventory.getAll().length <= Inventory.find(\"Soft clay\").length)\n || (Inventory.find(\"Soft clay\").length < 1 || Inventory\n .find(\"Astral rune\").length < 1)\n && !Banking.isBankScreenOpen()\n && GlassBlower.antiban.canInteractObject();\n }", "public boolean maxPeersReached(){\n\t\tif(peers.size()>=maxpeers){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static boolean isValid(long num) {\r\n\t\tint sum = sumOfDoubleEvenPlace(num) + sumOfOddPlace(num);\r\n\t\tif (getSize(num) < 13 || getSize(num) > 16) {\t\t\t// duzina broja ne smije biti manja od 13 i veca od 16\r\n\t\t\talert(\"Your credit card number is not long enough!\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (prefixMatched(num) == false) {\t\t\t\t\t// ako uslov ne zadovoljava, odnosno ako je false, ispisi poruku\r\n\t\t\talert(\"Your credit card does not start with suitable prefix!\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (sum % 10 != 0) {\t\t\t\t\t\t// uslov sume parnih i neparnih brojeva koji mora biti djeljiv sa 10\r\n\t\t\talert(\"Your credit card is invalid!\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "boolean hasN();", "boolean hasN();", "public void checkEndGame() {\n\t\tint total = 0;\n\t\tint total2 = 0;\n\t\tfor (int i = 0; i < 6; i++) {\n\t\t\ttotal += board[i];\n\t\t}\n\t\tfor (int i = 7; i < 13; i++) {\n\t\t\ttotal2 += board[i];\n\t\t}\n\n\t\tif (total == 0 || total2 == 0) {\n\t\t\tgameOver = true;\n\t\t}\n\t}", "public static boolean checkdigitsequal() {\n int count2=0;\n for (a = 0; a < 10; a++) {\n if (digits[a] == 0)\n {\n count2++;\n if(count2==10)return true;\n }\n else return false;\n }\n return false;\n }", "public boolean isFull()\r\n\t\t{\r\n\t\t\tint count = 0;\r\n\t\t\tData currentData = head;\r\n\t\t\twhile (currentData != null)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tcurrentData = currentData.nextData();\r\n\t\t\t}\r\n\t\t\treturn (count > 2); //if the count is > 2 then it is full\r\n\t\t}", "@Override\n\tboolean isValid(){\n\t\tif(size()==5) {\n\t\t\tint suite = getCard(0).suit;\n\t\t\tfor(int i = 1 ; i< size(); i++) {\n\t\t\t\tif(getCard(i).suit != suite) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tsort();\n\t\t\tint currRank = (getCard(0).rank +11)%13;\n\t\t\tfor(int i=0; i<size(); i++) {\n\t\t\t\tif((getCard(i).rank+11)%13 != currRank) return false;\n\t\t\t\tcurrRank++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "private static boolean toAllocateOrDeallocate() {\n return random.nextInt() % 2 == 0;\n\n }", "public boolean checkSpace(int size) {\n if (canGrow) return true;\n\n Block b = findFreeBlock(size);\n return b != null;\n }", "public boolean meetsMinimumLength(){\n\n return alg.meetsMinimumLength(input.getText().toString());\n }", "private static void checkFreeSpace()\n {\n boolean isSpaceAvailable = false;\n int numOfFreeSpaces = 0;\n for(int index=1;index<board.length;index++)\n {\n if((board[index] == ' '))\n {\n isSpaceAvailable = true;\n numOfFreeSpaces++;\n }\n }\n if(isSpaceAvailable == false)\n {\n System.err.println(\"Board is full! You can't make another move\");\n System.exit(0);\n }\n else\n {\n System.out.println(\"Free space is available! you have \"+numOfFreeSpaces+ \" moves left\");\n }\n }", "public boolean repOk(){\n\t\tif(pool<0 || squares == null || communityCards == null || chanceCards == null || map == null)\n\t\t\treturn false;\n\t\tfor (Square[] layer : squares) {\n\t\t\tfor (Square square : layer) {\n\t\t\t\tif(square == null)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn mh.repOk();\n\t}", "boolean hasEndingHadithNo();", "public boolean isDone(){\n\t\tif(generated)\n\t\t\treturn curr >= deck.size();\n\t\treturn true;\n\t}", "public boolean hasValidUnitNum() {\n return getTotalUnits() <= 22;\n }", "public boolean checkNotDone() {\n boolean notDone = false;\n blocksPut = 0;\n \n for(int y = 0; y < buildHeight+1; y++) {\n for(int z = 0; z < buildSize; z++) {\n for(int x = 0; x < buildSize; x++) {\n if(myIal.lookBlock(x, y, z).equals(\"air\")) {\n notDone = true;\n } else {\n blocksPut++;\n }\n }\n }\n }\n\n return notDone;\n }", "private boolean allAdjacentUsed(Box box) {\n if (box == null)\n throw new IllegalArgumentException(\"Error. null pointer in allAdjacentUsed(box).\");\n return isNextBoxUsed(box, 0) && isNextBoxUsed(box, 1) && isNextBoxUsed(box, 2) && isNextBoxUsed(box, 3);\n }", "boolean isFull();", "boolean isFull();", "boolean isFull();", "boolean isFull();", "boolean isFull();", "boolean isFull();", "boolean isFull();", "boolean isFull();", "boolean isFull();", "boolean isValid() {\n\t\t// see if there is a empty square with no available move\n\t\tint counter;\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\tfor(int j = 0; j < boardSize; j++) {\n\t\t\t\tcounter = 0;\n\t\t\t\tif (board[i][j] == 0) {\n\t\t\t\t\tfor (int k = 0; k < boardSize; k++) {\n\t\t\t\t\t\tif (availMoves[i][j][k] == true) {\n\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (counter == 0) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// see if there is a number missing in availMoves + board in each line/box \n\t\tboolean[][] verticalNumbers = new boolean[boardSize][boardSize];\n\t\tboolean[][] horizontalNumbers = new boolean[boardSize][boardSize];\n\t\tboolean[][] boxNumbers = new boolean[boardSize][boardSize];\n\t\tint box = 0;\n\t\tfor(int i = 0; i < boardSize; i++) {\n\t\t\tfor (int j = 0; j < boardSize; j++) {\n\t\t\t\tbox = i/boxSize + ((j/boxSize) * boxSize); \n\t\t\t\tif (board[i][j] > 0) {\n\t\t\t\t\tverticalNumbers[i][board[i][j] - 1] = true;\n\t\t\t\t\thorizontalNumbers[j][board[i][j] - 1] = true;\n\t\t\t\t\tboxNumbers[box][board[i][j] - 1] = true;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfor (int k = 0; k < boardSize; k++) {\n\t\t\t\t\t\tif (availMoves[i][j][k] == true) {\n\t\t\t\t\t\t\tverticalNumbers[i][k] = true;\n\t\t\t\t\t\t\thorizontalNumbers[j][k] = true;\n\t\t\t\t\t\t\tboxNumbers[box][k] = 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\t\t\n\t\t// if there is any boolean still false it means that number is missing from that box/line\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\tfor (int j = 0; j < boardSize; j++) {\n\t\t\t\tif (verticalNumbers[i][j] == false) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (horizontalNumbers[i][j] == false) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (boxNumbers[i][j] == false) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public boolean canReproduce() {\r\n ArrayList<Cell> neighbours = getNeighbours(FIRSTLAYER);\r\n\r\n int numOfSameT = 0;\r\n int numOfEmpty = 0;\r\n int numOfFoodC = 0;\r\n\r\n for (Cell cell : neighbours) {\r\n if (isSameType(cell.getInhabit())) {\r\n numOfSameT++;\r\n } else if (cell.getInhabit() == null && isTerrainAccessiable(cell)) {\r\n numOfEmpty++;\r\n } else if (isEdible(cell.getInhabit())) {\r\n numOfFoodC++;\r\n }\r\n }\r\n\r\n return (numOfSameT >= numOfSameTypeNeighbourToReproduce() \r\n && numOfEmpty >= numOfEmptyToReproduce()\r\n && numOfFoodC >= numOfFoodCellToReproduce());\r\n }", "@Override\n public boolean isFull(){\n return (count == size);\n \n }", "public boolean isFull() {\r\n return solutions().size() == maxSize;\r\n }", "public boolean deckIsEmpty(){\n return getSizeOfDeck() <= 0;\n }", "public boolean hasEmptySlots() {\n return (numMaxPlayers - activePlayers) != 0;\n }", "protected boolean isfull() {\n return this.numSeats == this.bookedSeats;\n }", "boolean hasSize();", "boolean hasSize();", "boolean hasSize();", "boolean hasSize();", "private boolean checkScanNodesCompleted() {\n\t\treturn cursor.getSelectionPos() >= jedisNodes.size();\n\t}", "private boolean correcto() {\r\n return (casillas.size()>numCasillaCarcel); //&&tieneJuez\r\n }", "boolean hasIntSize();", "private boolean configNotValid(int diskSize) {\n if (this.totalBlocks == diskSize && this.totalINodes > 0 &&\n this.freeListTail <= this.totalBlocks && this.freeListHead >= 2) {\n return true;\n }\n return false;\n }", "public boolean isFull() {\n\t\treturn count == st.length? true : false;\r\n\t}", "public boolean checkInvalid4(String x) {\n int temp = x.length();\n for (int i = 0; i < x.length(); i++) {\n if (consonants.contains(String.valueOf(x.charAt(i))))\n temp--;\n }\n return temp > 3;\n }", "boolean hasMoreBytes();", "public boolean outOfCards() {\n return (this.gameDeck.isEmpty() && this.wonDeck.isEmpty());\n }", "public int isSafe(){\n int nbEnnemies = 0;\n List<Player> players = state.getPlayers();\n Player currentPlayer = state.getCurrentPlayer();\n for(Player p : players){\n if(!p.equals(currentPlayer)) {\n nbEnnemies += currentPlayerReachable(state.getCurrentPlayer(), p);\n //nbEnnemies += manhattan(currentPlayer, p); //naive version\n }\n }\n return nbEnnemies;\n }", "public boolean isFull(){\n return this.top==this.maxLength-1;\n }", "public boolean isFull() \n\t{\n\t\tif (this.numIngredients==ingredients.length())\n\t\t\treturn true;\n\t\t\n\t\telse\n\t\t\treturn false;\n\t}", "private static boolean m23372b(C5826a aVar) {\n return aVar.f18502d.capacity() == 0 || (aVar.f18500b > 0 && aVar.f18502d.position() == aVar.f18500b);\n }", "private void check3(){\n \n if (errorCode == 0){\n \n if (firstDigit * fifthDigit * ninthDigit != 24){\n valid = false;\n errorCode = 3;\n }\n }\n\t}", "public void checkIsFinal( )\n\t{\n\t\tint count = 1;\n\t\tboolean check = true;\n\t\t\n\t\tfor( int i = 0; i < this.getSize( ); i++ )\n\t\t{\n\t\t\tfor( int j = 0; j < this.getWidth( ); j++ )\n\t\t\t{\n\t\t\t\tif( i == this.getSize() - 1 && j == this.getWidth() - 1 && this.cell(i, j) == -1 )\n\t\t\t\t\tcheck = true;\n\t\t\t\telse if( this.cell(i, j) != count++)\n\t\t\t\t\tcheck = false;\n\t\t\t}\n\t\t}\n\t\tthis.setSolved( check );\n\t}", "@Test\n\tpublic void testIfKingIsNotOnSpecialSquare()\n\t{\n\t\tData d = new Data();\n\t\tassertFalse(d.isKingOnSpecialSquare(61));\n\t\tassertFalse(d.isKingOnSpecialSquare(2));\n\t}", "private static boolean verify(int value, int size) {\r\n return size > 0 && size < Integer.SIZE\r\n && Integer.SIZE - Integer.numberOfLeadingZeros(value) <= size;\r\n }", "protected boolean isValidTankCapacity(byte[] edt) {\n\t\tif(edt == null || !(edt.length == 2)) return false;\n\t\treturn true;\n\t}", "private boolean checkGreedyDefense() {\r\n return enTotal.get(2)+1 < myTotal.get(2) && enTotal.get(0)+1 < myTotal.get(0);\r\n }", "public boolean minSize(){\n\t\tboolean result; \n\t\tif(keys.size() < (MAXKEYS/2) -1){\n\t\t\tresult = true;\n\t\t}\n\t\telse{ \n\t\t\tresult = false;\n\t\t}\n\t\treturn result;\n\t}", "public int isFull(){\n\t\tfor(i = 0; i < blocksPerSet; i++){\n\t\t\tif(blocks[i].getValid() == false)\n\t\t\t\treturn i;\n\t\t}\n\t\treturn -1;\n\t}", "public boolean someLegalPos() {\n return !legalPos.isEmpty();\n }", "boolean isFull() {return pointer==size;}", "public boolean isEmpty() {//check if empty\n return N == 0;\n }" ]
[ "0.6049024", "0.59925425", "0.58696985", "0.58630526", "0.58604", "0.5803735", "0.580036", "0.5776827", "0.5775343", "0.5775343", "0.57722807", "0.5748685", "0.5745139", "0.57381415", "0.5720648", "0.5719033", "0.5715984", "0.57051384", "0.56802624", "0.5669002", "0.56667805", "0.56608963", "0.5644561", "0.56445", "0.5625173", "0.56241804", "0.562178", "0.5615581", "0.55996877", "0.55789965", "0.5570128", "0.55615246", "0.5560862", "0.5557923", "0.55446833", "0.55423796", "0.553764", "0.55297303", "0.5519233", "0.5517035", "0.5514485", "0.55127144", "0.5510406", "0.5510406", "0.5507254", "0.5505735", "0.5498536", "0.54968375", "0.5490885", "0.54826194", "0.54684234", "0.5468061", "0.5463732", "0.5451749", "0.54504466", "0.54436237", "0.5443366", "0.5440819", "0.5436504", "0.5436504", "0.5436504", "0.5436504", "0.5436504", "0.5436504", "0.5436504", "0.5436504", "0.5436504", "0.5435757", "0.5429922", "0.5424501", "0.54236627", "0.54185116", "0.5418479", "0.541183", "0.54033333", "0.54033333", "0.54033333", "0.54033333", "0.5401156", "0.53998095", "0.5397974", "0.53971535", "0.53959274", "0.53943616", "0.5393352", "0.5391035", "0.5387157", "0.53837436", "0.537883", "0.53783286", "0.53725624", "0.53713953", "0.53704005", "0.5368717", "0.5360935", "0.5355606", "0.5349289", "0.53478736", "0.5344617", "0.5344219", "0.53263205" ]
0.0
-1
TODO Autogenerated method stub
private static void splitWord() { int i = 1; for(String doc : DocsTest) { ArrayList<String> wordAll = new ArrayList<String>(); for (String word : doc.split("[,.() ; % : / \t -]")) { word = word.toLowerCase(); if(word.length()>1 && !mathMethod.isNumeric(word)) { wordAll.add(word); if(!wordList.contains(word)) { wordList.add(word); } } } wordAll.removeAll(stopword); Doclist.put(i, wordAll); i++; } wordList.removeAll(stopword); }
{ "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
protected static void writeXML(String path, String ID, String abs,String cls) { DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder dBuilder; try { dBuilder = dbFactory.newDocumentBuilder(); Document doc = dBuilder.newDocument(); //add elements to Document Element rootElement =doc.createElement("Data"); //append root element to document doc.appendChild(rootElement); rootElement.appendChild(getReviewsPositive(doc, ID, abs,cls)); //for output to file, console TransformerFactory transformerFactory = TransformerFactory.newInstance(); Transformer transformer = transformerFactory.newTransformer(); //for pretty print transformer.setOutputProperty(OutputKeys.INDENT, "yes"); DOMSource source = new DOMSource(doc); //write to console or file StreamResult console = new StreamResult(System.out); StreamResult file = new StreamResult(new File(path+""+ID+".xml")); //write data transformer.transform(source, console); transformer.transform(source, file); //System.out.println("DONE"); } catch (Exception e) { e.printStackTrace(); } }
{ "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
kann nicht instanziiert werden.
public static String getLocaleKeySeparator() { return localeKeySeparator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean isInstantiable() {\n return false;\n }", "private Rekenhulp()\n\t{\n\t}", "public Kullanici() {}", "public AntrianPasien() {\r\n\r\n }", "private Instantiation(){}", "private Example() {\n\t\tthrow new Error(\"no instantiation is permitted\");\n\t}", "protected Asignatura()\r\n\t{}", "private stendhal() {\n\t}", "private UsineJoueur() {}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "private MApi() {}", "public Pitonyak_09_02() {\r\n }", "private FactoryCacheValet() {\n\t\tsuper();\n\t}", "public Pasien() {\r\n }", "public EANAlreadyExists() {\n }", "Klassenstufe createKlassenstufe();", "@Override\r\n\tpublic void init() {}", "Reproducible newInstance();", "protected void _init(){}", "@Override\r\n\tprotected boolean Initialize() {\n\t\treturn false;\r\n\t}", "public Anschrift() {\r\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private SystemInfo() {\r\n // forbid object construction \r\n }", "@SuppressWarnings(\"unused\")\n private RundenZielSpeicher() {\n Log.d(TAG, \"RundenzielSpeicher unused.\");\n }", "private void init() {\n\n\t}", "private InstanceUtil() {\n }", "private XmlFactory() {\r\n /* no-op */\r\n }", "private Mth()\n\t{\n\t\tthrow new AssertionError();\n\t}", "@Override\n public void init() {}", "public boolean init() {\n\t\treturn true;\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}", "abstract public boolean init();", "protected abstract boolean init();", "private void init() {\n }", "public abstract boolean init();", "public Nota() {\n }", "@Override\n\t\tpublic void init() {\n\t\t}", "protected Approche() {\n }", "public SlanjePoruke() {\n }", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "private Registry() {\n dbgLog.fine(\"Registry constructor is called\");\n }", "public void init() {\r\n // nothing to do\r\n }", "public MijnKlasse()\r\n\t\t{\r\n\t\t\tmijnMethode();\r\n\t\t}", "private SingletonSigar(){}", "@Test\n public void testGetBenachrichtigungVerwaltung(){\n assertNotNull(BenachrichtigungVerwaltung.getInstance());\n }", "public Aanbieder() {\r\n\t\t}", "private Singleton()\n\t\t{\n\t\t}", "public void inicializar();", "public boolean init() {\n\r\n return true;\r\n }", "@Override\n\tpublic String init() throws Exception {\n\t\treturn null;\n\t}", "@Override\n protected void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "public Mannschaft() {\n }", "private TMCourse() {\n\t}", "@Override\r\n\tpublic boolean create(Jeu obj) {\n\t\treturn false;\r\n\t}", "private TetrisMain() {\r\n //ensure uninstantiability\r\n }", "public void inizializza() {\n\n /* invoca il metodo sovrascritto della superclasse */\n super.inizializza();\n\n }", "public void init() {\r\n\t\t// to override\r\n\t}", "public Erreur() {\n\t}", "public void init() {}", "public void init() {}", "public void init() {\n \n }", "private SingletonLectorPropiedades() {\n\t}", "public void init() {\n\t\t}", "protected Problem() {/* intentionally empty block */}", "private TetrisMain() {\r\n //prevents instantiation\r\n }", "protected abstract void init() throws Exception;", "@Override\n public boolean create(Revue objet) {\n return false;\n }", "public void init() {\r\n\r\n\t}", "@Override\n public void init() {\n }", "public abstract void init() throws Exception;", "@Override\n public void init() {\n }", "@Override\n\tpublic boolean create(Langues obj) {\n\t\treturn false;\n\t}", "public void init(){}", "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "private StickFactory() {\n\t}", "private RMIRegistrator() {\n\t// nothing\n }", "private Validador() {\r\n }", "private void init() {\n\n\n\n }", "public void init(){\n \n }", "protected Doodler() {\n\t}", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "private SingleTon() {\n\t}", "public Instance() {\n }", "private void _init() throws Exception {\n }", "@Override\n void init() {\n }", "@Test\n\tpublic void testInvalidCtor() {\n\t\tSnacksHot nachos = new SnacksHot(\"Chips\", 3, \"100gr\", \"img/icons/box.png\");\n\t\tList<Snack> getraenkeListe = new ArrayList<Snack>();\n\t\ttry {\n\t\t\tgetraenkeListe.add( new SnacksHot(\"Chips\", 3, \"100gr\", \"img/icons/box.png\"));\n\t\t} catch (Exception e) {\n\t\t\t// hier erwarten wir tatsächlich, das uns die exception um die ohren fliegt\n\t\t\t//e.printStackTrace();\n\t\t}\n\t\tassertEquals(\"No object should be created for invalid IBAN\", null, getraenkeListe);\n\t}", "private LOCFacade() {\r\n\r\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "public boolean init();", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}" ]
[ "0.6760217", "0.65015465", "0.6494354", "0.6480655", "0.641698", "0.6401234", "0.63951916", "0.63806534", "0.63478816", "0.6263603", "0.62595576", "0.6240168", "0.62359196", "0.6200413", "0.6200208", "0.61947757", "0.6193716", "0.61657405", "0.61627823", "0.61571217", "0.61522233", "0.61465764", "0.61357605", "0.61265606", "0.6111878", "0.6109095", "0.6097062", "0.609503", "0.6094529", "0.60939085", "0.6091016", "0.6091016", "0.6091016", "0.6090644", "0.60731465", "0.6062081", "0.6059507", "0.60575074", "0.6054536", "0.6053771", "0.6046247", "0.60452664", "0.60451835", "0.60435164", "0.6042489", "0.6041022", "0.60331935", "0.6032093", "0.6031612", "0.602728", "0.60157543", "0.6015169", "0.6014764", "0.60092026", "0.60092026", "0.60092026", "0.60092026", "0.60081327", "0.6007446", "0.600266", "0.60006493", "0.59946156", "0.5993495", "0.59895927", "0.59895736", "0.59895736", "0.59887975", "0.59849524", "0.59822446", "0.59693116", "0.59655565", "0.59650356", "0.5960102", "0.59474844", "0.59464735", "0.59453565", "0.5943598", "0.59409446", "0.593914", "0.5938701", "0.59332883", "0.593279", "0.5931112", "0.593001", "0.5928895", "0.5926712", "0.5926238", "0.59261537", "0.5925001", "0.592443", "0.59231025", "0.592171", "0.591852", "0.59135854", "0.59135854", "0.59135854", "0.59135854", "0.59135854", "0.59126306", "0.5911323", "0.5911323" ]
0.0
-1
/ This looks for config files, so it generates FileConfigs rather than Configs.
public static HashMap<String,FileConfig> listInstalledConfigs(String propertyFolderPath, Predicate<String> p, Function<String,String> filenameToFilecode ) { Logger.trace("init..."); File f = new File( propertyFolderPath ); if (!f.exists()) { //TODO Exception return null; } File[] foundFiles = f.listFiles((dir, name) -> { // Logger.trace("dir="+dir+", name="+name); return p.test(name); }); HashMap<String,FileConfig> foundConfigs=new HashMap<>();//new FileConfig[foundFiles.length];//found for (int i = 0; i < foundFiles.length; i++) { String s=filenameToFilecode.apply( foundFiles[i].getName() ); foundConfigs.put(s, new FileConfig(s, foundFiles[i] ) ); } return foundConfigs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void ReadConfig()\n {\n try\n {\n Yaml yaml = new Yaml();\n\n BufferedReader reader = new BufferedReader(new FileReader(confFileName));\n\n yamlConfig = yaml.loadAll(reader);\n\n for (Object confEntry : yamlConfig)\n {\n //System.out.println(\"Configuration object type: \" + confEntry.getClass());\n\n Map<String, Object> confMap = (Map<String, Object>) confEntry;\n //System.out.println(\"conf contents: \" + confMap);\n\n\n for (String keyName : confMap.keySet())\n {\n //System.out.println(keyName + \" = \" + confMap.get(keyName).toString());\n\n switch (keyName)\n {\n case \"lineInclude\":\n\n for ( String key : ((Map<String, String>) confMap.get(keyName)).keySet())\n {\n lineFindReplace.put(key, ((Map<String, String>) confMap.get(keyName)).get(key).toString());\n }\n\n lineIncludePattern = ConvertToPattern(lineFindReplace.keySet().toString());\n\n break;\n case \"lineExclude\":\n lineExcludePattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n case \"fileExclude\":\n fileExcludePattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n case \"fileInclude\":\n fileIncludePattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n case \"dirExclude\":\n dirExcludePattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n case \"dirInclude\":\n dirIncludePattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n case \"urlPattern\":\n urlPattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n }\n }\n }\n\n } catch (Exception e)\n {\n System.err.format(\"Exception occurred trying to read '%s'.\", confFileName);\n e.printStackTrace();\n }\n }", "private void GetConfig()\n {\n boolean useClassPath = false;\n if(configFile_ == null)\n {\n useClassPath = true;\n configFile_ = \"data.config.lvg\";\n }\n // read in configuration file\n if(conf_ == null)\n {\n conf_ = new Configuration(configFile_, useClassPath);\n }\n }", "List<String> getConfigFilePaths();", "public Config createConfig(String filename);", "@Override\n public SmarterMap fetchConf() {\n SmarterMap result = new SmarterMap();\n\n List<File> files = new LinkedList<>();\n File conf = new File(path);\n if (conf.isDirectory()) {\n for (File f : conf.listFiles()) {\n if (f.getName().endsWith(\".json\") || f.getName().endsWith(\".yaml\") || f.getName().endsWith(\".yml\")) {\n files.add(f);\n }\n }\n } else {\n files.add(conf);\n }\n\n for (File f : files) {\n if (f.isFile()) {\n String confFileName = f.getName().replaceAll(\"\\\\.[^.]*$\", \"\");\n SmarterMap c = Fwissr.parseConfFile(f);\n mergeConf(result, c, confFileName.split(\"\\\\.\"), TOP_LEVEL_CONF_FILES.contains(confFileName));\n }\n }\n\n return result;\n }", "Collection<String> readConfigs();", "String getConfigFileName();", "private void handleConfigs() throws XMLStreamException {\n printf(\"FOUND CONFIGS\");\n\n while (skipToStartButNotPast(CONFIG, CONFIGS)) {\n handleConfig();\n }\n }", "private void generateConfigurationFile() throws IOException {\n // Use a template file to generate the configuration to be used in the sever side\n String srcFileName = \"resources/servlet.config.prop\";\n String destFileName = FIConfiguration.getConfiguration().get(\"SERVLET_CONFIG_FILE\");\n FileUtility fu = new FileUtility();\n fu.setInput(srcFileName);\n fu.setOutput(destFileName);\n String line = null;\n Map<String, String> keyToFileName = getKeyToFileNameMap();\n while ((line = fu.readLine()) != null) {\n for (String key : keyToFileName.keySet()) {\n if (line.startsWith(key)) {\n String value = FIConfiguration.getConfiguration().get(keyToFileName.get(key));\n logger.info(key + \": \" + value);\n // Just need the file only\n File file = new File(value);\n if (!file.exists()) {\n// throw new IllegalStateException(\"Cannot find file for \" + key + \": \" + value);\n logger.error(\"Cannot find file for \" + key + \": \" + value);\n }\n line = assignValue(line, file.getName());\n break;\n }\n }\n // Two special cases\n if (line.startsWith(\"Reactome.src.dbName\") || line.startsWith(\"elv.dbName\")) {\n String value = FIConfiguration.getConfiguration().get(\"REACTOME_SOURCE_DB_NAME\");\n int index = line.indexOf(\"=\");\n line = line.substring(0, index + 1) + \"test_\" + value; // This name pattern should be followed always\n }\n String year = FIConfiguration.getConfiguration().get(\"YEAR\");\n line = line.replaceAll(\"caBigR3WebApp\", \"caBigR3WebApp\" + year);\n fu.printLine(line);\n }\n fu.close();\n }", "private void createConfigFile() {\n\t\tFile configFile = new File(projectRoot, SC_CONFIG_FILENAME);\n\t\tif (configFile.exists())\n\t\t\treturn;\n\n\t\tServiceCutterConfig config = createInitialServiceCutterConfig();\n\t\ttry {\n\t\t\tFileWriter writer = new FileWriter(configFile);\n\t\t\twriter.write(new Yaml().dumpAs(config, Tag.MAP, FlowStyle.BLOCK));\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new ContextMapperApplicationException(\"Could not create '.servicecutter.yml' file!\", e);\n\t\t}\n\t}", "abstract public Config createConfig(String path);", "@Test\n public final void testConfigurationParser() {\n URL resourceUrl = this.getClass().getResource(configPath);\n File folder = new File(resourceUrl.getFile());\n for (File configFile : folder.listFiles()) {\n try {\n System.setProperty(\"loadbalancer.conf.file\", configFile.getAbsolutePath());\n LoadBalancerConfiguration.getInstance();\n } finally {\n LoadBalancerConfiguration.clear();\n }\n }\n }", "public abstract CONFIG build();", "private static FileBasedConfigurationBuilder<PropertiesConfiguration> propertiesFileBuilder(final String config) {\n final var propertiesParams = new Parameters()//\r\n .fileBased() //\r\n .setFile(new File(config + PROPERTIES_FILE_EXTENSION)) //\r\n .setListDelimiterHandler(new DefaultListDelimiterHandler(LIST_DELIMITER));\r\n return new FileBasedConfigurationBuilder<>(DEFAULT_CONFIGURATION_FILE_TYPE).configure(propertiesParams);\r\n }", "public File getConfigurationFile();", "public void loadConfigs() {\n\t configYML = new ConfigYML();\n\t configYML.setup();\n }", "protected List<IConfigObject> getConfigs(URL argUrl) {\r\n\r\n\t\tList<IConfigObject> configs = new ArrayList<IConfigObject>();\r\n\t\tlogger_.debug(\"resolving class \" + argUrl);\r\n\r\n\t\tDaoConfig daoConfig = new DaoConfig();\r\n\t\tdaoConfig = (DaoConfig) parseJavaFile(argUrl, daoConfig, true);\r\n\r\n\t\t// get DOConfig and add it.\r\n\t\tif (daoConfig != null) {\r\n\t\t\tDOConfig doConfig = getDOConfig(daoConfig);\r\n\t\t\tif (doConfig != null) {\r\n\r\n\t\t\t\t// it should be initialized.\r\n\t\t\t\tdoConfig.initial();\r\n\t\t\t\tICodeGenConfig codeGenConfig = getChangedDO(doConfig);\r\n\t\t\t\tif (codeGenConfig != null && codeGenConfig.shouldBeGenerated()) {\r\n\t\t\t\t\tconfigs.add(codeGenConfig);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconfigs.add(doConfig);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// add the default methods for DAOConfig\r\n\t\t\t\tif (daoConfig.getMethodList().isEmpty()) {\r\n\t\t\t\t\tICodeGenConfig obj = doConfig.getSqlMapXmlConfig();\r\n\t\t\t\t\tif (obj instanceof SqlMapXmlConfig) {\r\n\t\t\t\t\t\tSqlMapXmlConfig sqlMapconfig = (SqlMapXmlConfig) obj;\r\n\t\t\t\t\t\taddDefaultMethodsForDaoConfig(daoConfig, sqlMapconfig,\r\n\t\t\t\t\t\t\t\tdoConfig);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// if the DAO class contains DAO annotation.\r\n\t\t\tif (containsAnnotation(daoConfig, DAO_CLASS_NAME)\r\n\t\t\t\t\t|| containsAnnotation(daoConfig, DO_CLASS_NAME)) {\r\n\t\t\t\tconfigs.add(daoConfig);\r\n\t\t\t\tif (containsAnnotation(daoConfig, DAO_CLASS_NAME)) {\r\n\t\t\t\t\tList<? extends IConfigObject> classConfigs = getChangedConfigs(daoConfig);\r\n\t\t\t\t\tif (!classConfigs.isEmpty()) {\r\n\t\t\t\t\t\tconfigs.addAll(classConfigs);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (!DAOServiceConfigurationManager\r\n\t\t\t\t\t.getBooleanProperty(CODEGEN_HOLD_ANNOTATIONS_FOR_DAO)) {\r\n\t\t\t\tif (containsAnnotation(daoConfig, DAO_CLASS_NAME)\r\n\t\t\t\t\t\t|| containsAnnotation(daoConfig, DO_CLASS_NAME)) {\r\n\t\t\t\t\tdaoConfig.setOverride();\r\n\t\t\t\t}\r\n\t\t\t\t// daoConfig.clearAnnotations();\r\n\t\t\t\tdaoConfig.removeAnnotation(DO_CLASS_NAME);\r\n\t\t\t\tdaoConfig.removeAnnotation(DAO_CLASS_NAME);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn configs;\r\n\t}", "protected List<IDAOConfigs> getDaoGenConfigList() {\r\n\t\tList<IDAOConfigs> list = new ArrayList<IDAOConfigs>();\r\n\t\tURL[] files = getDAOJavaFiles();\r\n\t\tif (files != null) {\r\n\t\t\tlogger_.info(\"find \" + files.length + \" *.java files in \"\r\n\t\t\t\t\t+ getDaoStringInDir());\r\n\r\n\t\t\t// String file = null;\r\n\t\t\t// String className = null;\r\n\t\t\tIDAOConfigs daoGenConfig = null;\r\n\t\t\tfor (URL url : files) {\r\n\t\t\t\tdaoGenConfig = getDaoGenConfig(url);\r\n\t\t\t\tif (daoGenConfig != null) {\r\n\t\t\t\t\tlist.add(daoGenConfig);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn list;\r\n\t}", "private void parseConfigurations() {\n\t\ttry {\n\t\t\tJsonNode propertiesNode = rawConfig.getProperties();\n\t\t\t\n\t\t\tif(propertiesNode != null && propertiesNode.size() > 0) {\n\t\t\t\tBeanInfoWrapper wrapper = new BeanInfoWrapper(this.beanClazz);\n\t\t\t\tIterator<Map.Entry<String, JsonNode>> it = propertiesNode.fields();\n\n\t\t\t\twhile(it.hasNext()) {\n\t\t\t\t\tMap.Entry<String, JsonNode> entry = it.next();\n\t\t\t\t\tString propName = entry.getKey();\n\t\t\t\t\tPropertyDescriptor propDesc = wrapper.getPropertyDesc(propName);\n\t\t\t\t\tif(propDesc == null) {\n\t\t\t\t\t\tthrow new ConfigException(\"Failed to found the property name='\" + propName + \", in class '\" + beanClazz + \"'\");\n\t\t\t\t\t}\n\t\t\t\t\tProperty prop = new Property(this.beanClazz, propDesc);\n\t\t\t\t\tValueNode valueNode = getNodeValue(prop.getType(), entry.getValue(), prop.getContentParamType(), prop.getKeyParamType());\n\t\t\t\t\t\n\t\t\t\t\tproperties.put(prop, valueNode);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(ValueUtils.notEmpty(rawConfig.getDestroyMethod())) {\n\t\t\t\tdestroyMethod = beanClazz.getMethod(rawConfig.getDestroyMethod());\n\t\t\t}\n\t\t\t\n\t\t\tif(ValueUtils.notEmpty(rawConfig.getInitMethod())) {\n\t\t\t\tinitMethod = beanClazz.getMethod( rawConfig.getInitMethod());\n\t\t\t}\n\t\t} catch (NoSuchMethodException e) {\n\t\t\tthrow new ConfigException(\"Failed to found the method in the class '\" + beanClazz.getClass() + \"'\", e);\n\t\t\t\n\t\t} catch (SecurityException e) {\n\t\t\tthrow new ConfigException(\"Failed to access the method in the class '\" + beanClazz.getClass() + \"'\", e);\n\t\t}\n\t\t\n\t}", "private static void processIncludedConfig() {\n String configName = \"config.\" + getRunMode() + \".properties\";\n\n //relative path cannot be recognized and not figure out the reason, so here use absolute path instead\n InputStream configStream = Configuration.class.getResourceAsStream(\"/\" + configName);\n if (configStream == null) {\n log.log(Level.WARNING, \"configuration resource {0} is missing\", configName);\n return;\n }\n\n try (InputStreamReader reader = new InputStreamReader(configStream, StandardCharsets.UTF_8)) {\n Properties props = new Properties();\n props.load(reader);\n CONFIG_VALUES.putAll(props);\n } catch (IOException e) {\n log.log(Level.WARNING, \"Unable to process configuration {0}\", configName);\n }\n\n }", "private void config() {\n\t}", "private FileObject makeConfigFile(TemplatePair p, NrfConfig configObj){\n ST tmpl_sd = getConfigGroup().getInstanceOf(\"sdk_config\");\n tmpl_sd.add(\"config\", configObj);\n FileObject sdk_config_file = new FileObject();\n sdk_config_file.setSubPath(\"config/\");\n sdk_config_file.setFileName( p.getValue()+\".h\");\n sdk_config_file.setContent(tmpl_sd.render());\n return sdk_config_file;\n }", "private Configuration searchConfigs(String propertyFile) throws ConfigurationException\n {\n return new PropertiesConfiguration(propertyFile);\n }", "public static void main(String[] args)\n {\n AppConfig.LoadIntoConfigFiles();\n //configFileName\n }", "public FileBasedConfigSource() {\n // Intentionally empty.\n }", "public void loadConfig() {\n\t}", "private static ConfigSource config()\n {\n return CONFIG_MAPPER_FACTORY.newConfigSource()\n .set(\"type\", \"mailchimp\")\n .set(\"auth_method\", \"api_key\")\n .set(\"apikey\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"access_token\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"list_id\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"email_column\", \"email\")\n .set(\"fname_column\", \"fname\")\n .set(\"lname_column\", \"lname\");\n }", "@Override\n\tpublic void loadExtraConfigs(Configuration config)\n\t{\n\n\t}", "private Config()\n {\n // Load from properties file:\n loadLocalConfig();\n // load the system property overrides:\n getExternalConfig();\n }", "private void createConfig() {\n try {\n if (!getDataFolder().exists()) {\n getDataFolder().mkdirs();\n }\n File file = new File(getDataFolder(), \"config.yml\");\n if (!file.exists()) {\n getLogger().info(\"config.yml not found :( Creating one with default values...\");\n saveDefaultConfig();\n } else {\n getLogger().info(\"config.yml found :) Loading...\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n\n }", "@Test\n public void testLoadDifferentSources() throws ConfigurationException\n {\n factory.setFile(MULTI_FILE);\n Configuration config = factory.getConfiguration();\n assertFalse(config.isEmpty());\n assertTrue(config instanceof CombinedConfiguration);\n CombinedConfiguration cc = (CombinedConfiguration) config;\n assertEquals(\"Wrong number of configurations\", 1, cc\n .getNumberOfConfigurations());\n\n assertNotNull(config\n .getProperty(\"tables.table(0).fields.field(2).name\"));\n assertNotNull(config.getProperty(\"element2.subelement.subsubelement\"));\n assertEquals(\"value\", config.getProperty(\"element3\"));\n assertEquals(\"foo\", config.getProperty(\"element3[@name]\"));\n assertNotNull(config.getProperty(\"mail.account.user\"));\n\n // test JNDIConfiguration\n assertNotNull(config.getProperty(\"test.onlyinjndi\"));\n assertTrue(config.getBoolean(\"test.onlyinjndi\"));\n\n Configuration subset = config.subset(\"test\");\n assertNotNull(subset.getProperty(\"onlyinjndi\"));\n assertTrue(subset.getBoolean(\"onlyinjndi\"));\n\n // test SystemConfiguration\n assertNotNull(config.getProperty(\"java.version\"));\n assertEquals(System.getProperty(\"java.version\"), config\n .getString(\"java.version\"));\n\n // test INIConfiguration\n assertEquals(\"Property from ini file not found\", \"yes\",\n config.getString(\"testini.loaded\"));\n\n // test environment configuration\n EnvironmentConfiguration envConf = new EnvironmentConfiguration();\n for (Iterator<String> it = envConf.getKeys(); it.hasNext();)\n {\n String key = it.next();\n String combinedKey = \"env.\" + key;\n assertEquals(\"Wrong value for env property \" + key,\n envConf.getString(key), config.getString(combinedKey));\n }\n }", "private boolean directoryContainsConfig(File file) {\n return Arrays.asList(file.list()).contains(\"config.properties\");\n }", "@Test\n public void getUsingMoreSources() throws Exception {\n ReadConfig conf = new ReadConfig();\n try {\n conf.getFileName();\n } catch (Exception e) {\n assertTrue(e.getMessage().equals(\"Try to access config file before reading it.\") );\n }\n try {\n conf.readFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n assertNotNull(conf.getFileName());\n assertTrue(conf.getFileName().size() == 1);\n assertFalse(conf.getUsingMoreSources());\n }", "private static void readConfigFile() {\n\n BufferedReader input = null;\n try {\n input = new BufferedReader(new FileReader(getConfigFile()));\n String sLine = null;\n while ((sLine = input.readLine()) != null) {\n final String[] sTokens = sLine.split(\"=\");\n if (sTokens.length == 2) {\n m_Settings.put(sTokens[0], sTokens[1]);\n }\n }\n }\n catch (final FileNotFoundException e) {\n }\n catch (final IOException e) {\n }\n finally {\n try {\n if (input != null) {\n input.close();\n }\n }\n catch (final IOException e) {\n Sextante.addErrorToLog(e);\n }\n }\n\n }", "@Test\n public void testDetectConfigurationCompoundPath() throws Exception {\n\n Config testConfig = ConfigFactory.parseResourcesAnySyntax(\"packagePath.conf\");\n\n StreamsConfigurator.setConfig(testConfig);\n\n ComponentConfigurator<ComponentConfiguration> configurator = new ComponentConfigurator<>(ComponentConfiguration.class);\n\n ComponentConfiguration configuredPojo = configurator.detectConfiguration(\"org.apache.streams.config\");\n\n Assert.assertThat(configuredPojo, is(notNullValue()));\n\n Assert.assertThat(configuredPojo.getInClasses(), is(notNullValue()));\n Assert.assertThat(configuredPojo.getInClasses().size(), is(greaterThan(0)));\n\n Assert.assertThat(configuredPojo.getOutClasses(), is(notNullValue()));\n Assert.assertThat(configuredPojo.getOutClasses().size(), is(greaterThan(0)));\n\n }", "public FileConfiguration loadConfiguration(File file);", "Factory getFactory()\n {\n return configfile.factory;\n }", "public abstract Optional<FileConfiguration> getConfiguration(String name);", "public void loadConfig(){\n this.saveDefaultConfig();\n //this.saveConfig();\n\n\n }", "@Test\n public void testLoadConfigurationFromFileName()\n throws ConfigurationException\n {\n factory = new DefaultConfigurationBuilder(TEST_FILE.getAbsolutePath());\n checkConfiguration();\n }", "@Test\n void check_mappingConfigFromJsonFile() {\n MappingConfig externalMappingConfig =\n new MergeableMappingConfigSupplier(new ArrayList<String>() {\n {\n add(\"src/test/resources/json/mappingconfig.json\");\n add(\"src/test/resources/json/mappingconfig2.json\");\n }\n }).get();\n\n assertEquals(\"com.kobylynskyi.graphql.testconfigjson\", externalMappingConfig.getPackageName());\n // If the previous configuration file does not contain a key, the later one will be used.\n assertEquals(externalMappingConfig.getGenerateToString(), true);\n assertTrue(externalMappingConfig.getGenerateApis());\n assertEquals(\"java.math.BigDecimal\", externalMappingConfig.getCustomTypesMapping().get(\"Price.amount\"));\n assertNull(externalMappingConfig.getApiPackageName());\n }", "@Config.LoadPolicy(Config.LoadType.MERGE)\n@Config.Sources({\n \"system:properties\",\n \"classpath:application.properties\"\n})\npublic interface ProjectConfig extends Config {\n\n @Key(\"app.hostname\")\n String hostname();\n\n @Key(\"browser.name\")\n @DefaultValue(\"chrome\")\n String browser();\n\n}", "private void initFiles() {\r\n\t\ttry {\r\n\t\t\tFile file = getConfigFile();\r\n\t\t\tif (!file.exists()) {\r\n\t\t\t\tXmlFile.write(file, new SystemSettings());\r\n\t\t\t}\r\n\t\t} catch (Exception ex) {\r\n\t\t\tlogger.error(\"Failed to initialize settings file\", ex);\r\n\t\t}\r\n\t}", "Config(InfoHandler info){\n \n this.info = info;\n \n config_list = new ArrayList<>();\n \n File test = new File(config_path);\n \n if(test.exists()){ //plik istnieje\n \n info.mode=1; //wlaczenie trybu dla obslugi pliku konfiguracyjnego\n \n \n //tutaj pobieranie informacji z pliku konfiguracyjnego\n //do ciała funkcji\n \n config_file = new DictReader(config_path,info);\n \n //tutaj dodajemy funkcjonalnosci\n \n config_list.add(config_file.szukaj(\"%imie\"));\n config_list.add(config_file.szukaj(\"%dict_path\"));\n \n config = get_config();\n \n info.mode=0;\n \n is_alive = true;\n }\n else{\n config = new ArrayList<>();\n config_file = new DictReader(config_path,info);\n first_start = 1;\n }\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 }", "abstract public Config createConfigWithFactory(String path, String factoryPath);", "@Test\n public void testConfigurationBuilderProvider()\n throws ConfigurationException\n {\n factory.addProperty(\"override.configuration[@fileName]\", TEST_FILE\n .getAbsolutePath());\n CombinedConfiguration cc = factory.getConfiguration(false);\n assertEquals(\"Wrong number of configurations\", 1, cc\n .getNumberOfConfigurations());\n checkProperties(cc);\n }", "private void loadLocalConfig()\n {\n try\n {\n // Load the system config file.\n URL fUrl = Config.class.getClassLoader().getResource( PROP_FILE );\n config.setDelimiterParsingDisabled( true );\n if ( fUrl == null )\n {\n String error = \"static init: Error, null cfg file: \" + PROP_FILE;\n LOG.warn( error );\n }\n else\n {\n LOG.info( \"static init: found from: {} path: {}\", PROP_FILE, fUrl.getPath() );\n config.load( fUrl );\n LOG.info( \"static init: loading from: {}\", PROP_FILE );\n }\n\n URL fUserUrl = Config.class.getClassLoader().getResource( USER_PROP_FILE );\n if ( fUserUrl != null )\n {\n LOG.info( \"static init: found user properties from: {} path: {}\", USER_PROP_FILE, fUserUrl.getPath() );\n config.load( fUserUrl );\n }\n }\n catch ( org.apache.commons.configuration.ConfigurationException ex )\n {\n String error = \"static init: Error loading from cfg file: [\" + PROP_FILE\n + \"] ConfigurationException=\" + ex;\n LOG.error( error );\n throw new CfgRuntimeException( GlobalErrIds.FT_CONFIG_BOOTSTRAP_FAILED, error, ex );\n }\n }", "default Pair<T, U> build(File file) throws IOException, ConfigurationException {\n return build(new FileConfigurationSourceProvider(), file.toString());\n }", "private static void manageGameConfigFile(File configFile) {\n Gson gson = new Gson();\n try {\n GameConfig.setInstance(gson.fromJson(new FileReader(configFile), GameConfig.class));\n } catch (FileNotFoundException e) {\n LogUtils.error(\"FileNotFoundException => \", e);\n }\n }", "public ConfigData(FileConfiguration CoreConfig, FileConfiguration outConfig) {\n\t\t// core configuration is configuration that is Global.\n\t\t// we try to avoid these now. Normally the primary interest is the\n\t\t// GriefPrevention.WorldConfigFolder setting.\n\t\tString DefaultConfigFolder = DataStore.dataLayerFolderPath + File.separator + \"WorldConfigs\" + File.separator;\n\t\tString DefaultTemplateFile = DefaultConfigFolder + \"_template.cfg\";\n\t\t// Configurable template file.\n\t\tTemplateFile = CoreConfig.getString(\"GriefPrevention.WorldConfig.TemplateFile\", DefaultTemplateFile);\n\t\tif (!(new File(TemplateFile).exists())) {\n\t\t\tTemplateFile = DefaultTemplateFile;\n\n\t\t}\n this.GlobalClaims = CoreConfig.getBoolean(\"GriefPrevention.GlobalClaimsEnabled\",true);\n this.GlobalPVP = CoreConfig.getBoolean(\"GriefPrevention.GlobalPVPEnabled\",true);\n this.GlobalSiege = CoreConfig.getBoolean(\"GriefPrevention.GlobalSiegeEnabled\",true);\n this.GlobalSpam = CoreConfig.getBoolean(\"GriefPrevention.GlobalSpamEnabled\",true);\n this.AllowAutomaticMigration = CoreConfig.getBoolean(\"GriefPrevention.AllowAutomaticMigration\",true);\n outConfig.set(\"GriefPrevention.GlobalClaimsEnabled\",GlobalClaims);\n outConfig.set(\"GriefPrevention.GlobalPVPEnabled\",GlobalPVP);\n outConfig.set(\"GriefPrevention.GlobalSiegeEnabled\",GlobalSiege);\n outConfig.set(\"GriefPrevention.GlobalSpamEnabled\",GlobalSpam);\n outConfig.set(\"GriefPrevention.AllowAutomaticMigration\",AllowAutomaticMigration);\n this.DisabledGPCommands = CoreConfig.getStringList(\"GriefPrevention.DisabledCommands\");\n outConfig.set(\"GriefPrevention.DisabledCommands\",DisabledGPCommands);\n\n\n\t\tString SingleConfig = CoreConfig.getString(\"GriefPrevention.WorldConfig.SingleWorld\", NoneSpecifier);\n\t\tSingleWorldConfigLocation = SingleConfig;\n\t\tif (!SingleConfig.equals(NoneSpecifier) && new File(SingleConfig).exists()) {\n\t\t\tGriefPrevention.AddLogEntry(\"SingleWorld Configuration Mode Enabled. File \\\"\" + SingleConfig + \"\\\" will be used for all worlds.\");\n\t\t\tYamlConfiguration SingleReadConfig = YamlConfiguration.loadConfiguration(new File(SingleConfig));\n\t\t\tYamlConfiguration SingleTargetConfig = new YamlConfiguration();\n\t\t\tthis.SingleWorldConfig = new WorldConfig(\"Single World\", SingleReadConfig, SingleTargetConfig);\n\t\t\ttry {\n\t\t\t\tSingleTargetConfig.save(SingleConfig);\n\t\t\t} catch (IOException exx) {\n\t\t\t}\n\t\t}\n\t\tthis.SiegeCooldownSeconds = CoreConfig.getInt(\"GriefPrevention.Siege.CooldownTime\",1000 * 60 * 60);\n outConfig.set(\"GriefPrevention.Siege.CooldownTime\",SiegeCooldownSeconds);\n\t\toutConfig.set(\"GriefPrevention.WorldConfig.SingleWorld\", SingleConfig);\n\t\toutConfig.set(\"GriefPrevention.WorldConfig.TemplateFile\", TemplateFile);\n\t\t// check for appropriate configuration in given FileConfiguration. Note\n\t\t// we also save out this configuration information.\n\t\t// configurable World Configuration folder.\n\t\t// save the configuration.\n\n\t\tWorldConfigLocation = CoreConfig.getString(\"GriefPrevention.WorldConfigFolder\");\n\t\tif (WorldConfigLocation == null || WorldConfigLocation.length() == 0) {\n\t\t\tWorldConfigLocation = DefaultConfigFolder;\n\t\t}\n\t\tFile ConfigLocation = new File(WorldConfigLocation);\n\t\tif (!ConfigLocation.exists()) {\n\t\t\t// if not found, create the directory.\n\t\t\tGriefPrevention.instance.getLogger().log(Level.INFO, \"mkdirs() on \" + ConfigLocation.getAbsolutePath());\n\t\t\tConfigLocation.mkdirs();\n\n\t\t}\n\n\t\t/*\n\t\t * GriefPrevention.instance.getLogger().log(Level.INFO,\n\t\t * \"Reading WorldConfigurations from \" +\n\t\t * ConfigLocation.getAbsolutePath()); if(ConfigLocation.exists() &&\n\t\t * ConfigLocation.isDirectory()){ for(File lookfile:\n\t\t * ConfigLocation.listFiles()){ //System.out.println(lookfile);\n\t\t * if(lookfile.isFile()){ String Extension =\n\t\t * lookfile.getName().substring(lookfile.getName().indexOf('.')+1);\n\t\t * String baseName = Extension.length()==0? lookfile.getName():\n\t\t * lookfile.\n\t\t * getName().substring(0,lookfile.getName().length()-Extension.length\n\t\t * ()-1); if(baseName.startsWith(\"_\")) continue; //configs starting with\n\t\t * underscore are templates. Normally just _template.cfg. //if baseName\n\t\t * is an existing world... if(Bukkit.getWorld(baseName)!=null){\n\t\t * GriefPrevention.instance.getLogger().log(Level.INFO, \"World \" +\n\t\t * baseName + \" Configuration found.\"); } //read it in...\n\t\t * GriefPrevention.AddLogEntry(lookfile.getAbsolutePath());\n\t\t * FileConfiguration Source = YamlConfiguration.loadConfiguration(new\n\t\t * File(lookfile.getAbsolutePath())); FileConfiguration Target = new\n\t\t * YamlConfiguration(); //load in the WorldConfig... WorldConfig wc =\n\t\t * new WorldConfig(baseName,Source,Target); try { Target.save(lookfile);\n\t\t * \n\t\t * }catch(IOException iex){\n\t\t * GriefPrevention.instance.getLogger().log(Level.SEVERE,\n\t\t * \"Failed to save to \" + lookfile.getAbsolutePath()); }\n\t\t * \n\t\t * \n\t\t * } }\n\t\t * \n\t\t * \n\t\t * \n\t\t * \n\t\t * \n\t\t * \n\t\t * \n\t\t * } else if(ConfigLocation.exists() && ConfigLocation.isFile()){\n\t\t * GriefPrevention.instance.getLogger().log(Level.SEVERE,\n\t\t * \"World Configuration Folder found, but it's a File. Double-check your GriefPrevention configuration files, and try again.\"\n\t\t * );\n\t\t * \n\t\t * }\n\t\t */\n\n\t}", "public interface Config {\n\t/**\n * Get value to corresponding to the key.\n *\n * @param key\n * @return\n * \tstring value.\n */\n String getString(String key);\n\n /**\n * Get value to corresponding to the key.\n * Specified value is returned if not contains key to config file.\n *\n * @param key\n * @param defaultValue\n * @return\n * \tString value.\n */\n String getString(String key, String defaultValue);\n\n /**\n * Get value to corresponding to the key.\n *\n * @param key\n * @return\n * \tint value.\n */\n int getInt(String key);\n\n /**\n * Get value to corresponding to the key.\n * Specified value is returned if not contains key to config file.\n *\n * @param key\n * @param defaultValue\n * @return\n * \tint value.\n */\n int getInt(String key, int defaultValue);\n\n /**\n * Return with string in contents of config file.\n *\n * @return\n * \tContents of config file.\n */\n String getContents();\n\n /**\n * Return with Configuration object in contents of config file.\n *\n * @return\n * \tContents of Configuration object.\n */\n Configuration getConfiguration();\n\n List<Object> getList(String key);\n}", "@Test\n void check_mappingConfigFromJsonFile_key_priority_json_conf() {\n MappingConfig externalMappingConfig =\n new MergeableMappingConfigSupplier(new ArrayList<String>() {\n {\n add(\"src/test/resources/json/mappingconfig3.json\");\n add(\"src/test/resources/json/mappingconfig4.conf\");\n }\n }).get();\n\n assertEquals(externalMappingConfig.getGenerateToString(), false);\n assertEquals(externalMappingConfig.getGenerateApis(), true);\n }", "public Config(String filename) {\n this.filename = filename;\n }", "private Config() {\n }", "@Config.LoadPolicy(Config.LoadType.MERGE)\n@Config.Sources({\n \"classpath:test.properties\",\n \"system:properties\",\n \"system:env\"})\npublic interface UserConfiguration extends Config {\n\n @DefaultValue(\"default_Name\")\n @Key(\"user.name\")\n String name();\n @Key(\"user.email\")\n String email();\n @Key(\"user.password\")\n String password();\n}", "@Test\r\n public void introspectConfiguration() {\r\n HelpConfigStreamConsumer consumer = new HelpConfigStreamConsumer();\r\n consumer.consumeLine(\"iMaker 09.24.01, 10-Jun-2009.\");\r\n consumer.consumeLine(\"Finding available configuration file(s):\");\r\n consumer.consumeLine(\"/epoc32/rom/config/platform/product/image_conf_product.mk\");\r\n consumer.consumeLine(\"/epoc32/rom/config/platform/product/image_conf_product_ui.mk\");\r\n consumer.consumeLine(\"X:/epoc32/rom/config/platform/product/image_conf_product.mk\");\r\n consumer.consumeLine(\"X:/epoc32/rom/config/platform/product/image_conf_product_ui.mk\");\r\n consumer.consumeLine(\"\");\r\n \r\n // Verifying string output\r\n String[] expected = new String[4];\r\n expected[0] = \"/epoc32/rom/config/platform/product/image_conf_product.mk\";\r\n expected[1] = \"/epoc32/rom/config/platform/product/image_conf_product_ui.mk\";\r\n expected[2] = \"X:/epoc32/rom/config/platform/product/image_conf_product.mk\";\r\n expected[3] = \"X:/epoc32/rom/config/platform/product/image_conf_product_ui.mk\";\r\n assertArrayEquals(expected, consumer.getConfigurations().toArray(new String[4]));\r\n\r\n // Verifying the file output\r\n File[] expectedFile = new File[4];\r\n if (new File(\"/epoc32/rom/config/platform/product/image_conf_product.mk\").isAbsolute()) {\r\n // Unix like os\r\n expectedFile[0] = new File(\"/epoc32/rom/config/platform/product/image_conf_product.mk\");\r\n expectedFile[1] = new File(\"/epoc32/rom/config/platform/product/image_conf_product_ui.mk\");\r\n expectedFile[2] = new File(new File(\".\"), \"X:/epoc32/rom/config/platform/product/image_conf_product.mk\");\r\n expectedFile[3] = new File(new File(\".\"), \"X:/epoc32/rom/config/platform/product/image_conf_product_ui.mk\");\r\n } else {\r\n // Windows like os\r\n expectedFile[0] = new File(new File(\".\"), \"/epoc32/rom/config/platform/product/image_conf_product.mk\");\r\n expectedFile[1] = new File(new File(\".\"), \"/epoc32/rom/config/platform/product/image_conf_product_ui.mk\");\r\n expectedFile[2] = new File(\"X:/epoc32/rom/config/platform/product/image_conf_product.mk\");\r\n expectedFile[3] = new File(\"X:/epoc32/rom/config/platform/product/image_conf_product_ui.mk\");\r\n }\r\n assertArrayEquals(expectedFile, consumer.getConfigurations(new File(\".\")).toArray(new File[4]));\r\n }", "public T loadConfig(File file) throws IOException;", "public interface ConfigureConfiguration {\n\n\t// A list of names of configuration files\n\t@Option(shortName=\"c\", description = \"Name of one or many configuration \"\n\t\t+ \"files. Parameters in configuration files override each other. If a\"\n\t\t+ \" parameter is provided in more than one file, the first occurrence \"\n\t\t+ \" is used.\"\n\t) \n\tList<File> getConf();\n\tboolean isConf();\n\t\n}", "private <T> T readConfig(final ConfigurationFactory<T> factory, final String filePath) {\n try (final BufferedReader reader = Files.newBufferedReader(getDataFolder().toPath().resolve(filePath))) {\n return factory.create(YamlConfiguration.loadConfiguration(reader));\n } catch (final IOException e) {\n throw new RuntimeException(String.format(\"Could not read configuration file %s in plugin data-folder\",\n filePath), e);\n }\n }", "private AppConfigContent() {}", "public JSONObject handleListConfigs(MapReduceXml xml) {\n JSONObject retValue = new JSONObject();\n JSONArray configArray = new JSONArray();\n Set<String> names = xml.getConfigurationNames();\n for (String name : names) {\n String configXml = xml.getTemplateAsXmlString(name);\n ConfigurationTemplatePreprocessor preprocessor = \n new ConfigurationTemplatePreprocessor(configXml);\n configArray.put(preprocessor.toJson(name));\n }\n try {\n retValue.put(\"configs\", configArray);\n } catch (JSONException e) {\n throw new RuntimeException(\"Hard coded string is null\");\n }\n return retValue;\n }", "@Override\n public String getConfigPath() {\n String fs = String.valueOf(File.separatorChar);\n StringBuilder sb = new StringBuilder();\n\n sb.append(\"scan\").append(fs);\n sb.append(\"config\").append(fs);\n sb.append(\"mesoTableConfig\").append(fs);\n\n return sb.toString();\n }", "public void refresh() {\n List<ConfigPath> configPaths = getConfigFiles();\n\n // Delete configs from cache which don't exist on disk anymore\n Iterator<String> currentEntriesIt = confs.keySet().iterator();\n while (currentEntriesIt.hasNext()) {\n String path = currentEntriesIt.next();\n boolean found = false;\n for (ConfigPath configPath : configPaths) {\n if (configPath.path.equals(path)) {\n found = true;\n break;\n }\n }\n if (!found) {\n currentEntriesIt.remove();\n if (log.isDebugEnabled()) {\n log.debug(\"Configuration: detected removed config \" + path + \" in \" + location);\n }\n }\n }\n\n // Add/update configs\n for (ConfigPath configPath : configPaths) {\n CachedConfig cachedConfig = confs.get(configPath.path);\n if (cachedConfig == null || cachedConfig.lastModified != configPath.file.lastModified()) {\n if (log.isDebugEnabled()) {\n log.debug(\"Configuration: detected updated or added config \" + configPath.path + \" in \" + location);\n }\n long lastModified = configPath.file.lastModified();\n ConfImpl conf = parseConfiguration(configPath.file);\n cachedConfig = new CachedConfig();\n cachedConfig.lastModified = lastModified;\n cachedConfig.conf = conf;\n cachedConfig.state = conf == null ? ConfigState.ERROR : ConfigState.OK;\n confs.put(configPath.path, cachedConfig);\n }\n }\n }", "private OpenApiHandlerConfig(String configName) {\n config = Config.getInstance();\n mappedConfig = config.getJsonMapConfigNoCache(configName);\n setConfigData();\n setConfigMap();\n }", "private File createConfigDirIfNecessary(String configName) throws IOException {\n return createConfigDirIfNecessary(configDirPath.toFile(), configName);\n }", "private static void processLocalConfig() {\n String localConfigFile = getConfigValue(SYSPROP_LOCAL_CONFIG_FILE);\n if (localConfigFile == null || localConfigFile.isEmpty()) {\n log.log(Level.FINE, \"No local configuration defined, skipping associated processing\");\n return;\n }\n\n log.log(Level.FINE, \"Processing configuration file {0}\", localConfigFile);\n Path p = Paths.get(localConfigFile);\n if (!Files.exists(p)) {\n log.log(Level.WARNING, \"Path {0} does not exist\", p.toString());\n return;\n } else if (!Files.isRegularFile(p)) {\n log.log(Level.WARNING, \"Path {0} is not a file\", p.toString());\n return;\n } else if (!Files.isReadable(p)) {\n log.log(Level.WARNING, \"File {0} is not readable\", p.toString());\n return;\n }\n\n Properties prop = new Properties();\n try (BufferedReader reader = Files.newBufferedReader(p, StandardCharsets.UTF_8)) {\n prop.load(reader);\n } catch (IOException e) {\n log.log(Level.WARNING, \"Error occurred while reading \" + p.toString(), e);\n }\n CONFIG_VALUES.putAll(prop);\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic static void main(String[] args) throws IOException {\n\t\tFile myObj = null;\n\t\tboolean newConfig = false;\n\t\t\n\t\t// Try to create a new file if one doesn't exist yet\n\t\ttry {\n\t\t myObj = new File(\"config.yml\");\n\t\t if (myObj.createNewFile()) {\n\t\t System.out.println(\"File created: \" + myObj.getName());\n\t\t newConfig = true;\n\t\t } else {\n\t\t System.out.println(\"File already exists.\");\n\t\t }\n\t\t } catch (IOException e) {\n\t\t System.out.println(\"An error occurred.\");\n\t\t e.printStackTrace();\n\t\t }\n\t\t\n\t\t// Start up the writer without resetting the whole config\n\t\tConfigControl configControlInit = new ConfigControl(new YamlReader(new FileReader(\"config.yml\")), null);\n\t\tList<Object> r = configControlInit.getConfigObjects();\n\t\tList<Object> configInit = new ArrayList<Object>();\n\t\tYamlWriter yamlW = new YamlWriter(new FileWriter(\"config.yml\"));\n\t\tfor (Object obj : r) {\n\t\t\tyamlW.write(obj);\n\t\t\tconfigInit.add(r);\n\t\t}\n\t\t\n\t\t// Start up a new config control instance\n\t\tConfigControl configControl = new ConfigControl(new YamlReader(new FileReader(\"config.yml\")), yamlW);\n\t\t\n\t\t// If its a new config, fill it with default values\n\t\tif (newConfig) {\n\t\t\tYamlWriter writer = new YamlWriter(new FileWriter(\"config.yml\"));\n\t\t\tMap<String, String> map = new HashMap<String, String>();\n\t\t\tmap.put(\"token\", null);\n\t\t\tmap.put(\"prefix\", \"!\");\n\t\t\tmap.put(\"ping\", \"pong\");\n\t\t\tmap.put(\"custom\", \"\");\n\t\t\tmap.put(\"anotherexample\", \"Create new lines by typing \\\"&n;\\\"!\");\n\t\t\tmap.put(\"deletethis\", \"To delete a command just erase the command name.\");\n\t\t\tmap.put(\"mention\", \"If you are going to mention, use the '_' to represent a space in the name.\");\n\t\t\tmap.put(\"dm\", \"##DM## Start a command response like so for it to be DM'ed to the author.\");\n\t\t\tmap.put(\"music-channel\", \"*\");\n\t\t\tmap.put(\"mg-channel\", \"*\");\n\t\t\twriter.write(map);\n\t\t\tconfigControl.setWriter(writer);\n\t\t}\n\t\t\n\t\t// Close the writer\n\t\tconfigControl.getWriter().close();\n\t\t\n\t\t/*\n\t\t * UI\n\t\t */\n\t\n\t\t// Initialize some variables that will be useful\n\t\tList<Object> configObj = configControl.getConfigObjects();\n\t\tString prefixChars = \"\";\n\t\tString botToken = \"\";\n\t\tString music = \"\";\n\t\tString tos = \"\";\n\t\tString prof = \"\";\n\t\tHashMap<String, Object> commandList = new HashMap<String, Object>();\n\t\tList<JPanel> commandEntries = new ArrayList<JPanel>();\n\n\t\t// Fill the UI fields with config values\n\t\tfor (Object o : configObj) {\n\t\t\tif (o instanceof HashMap<?, ?>) {\n\t\t\t\tHashMap<String, Object> map = (HashMap<String, Object>) o;\n\t\t\t\tfor (String key : map.keySet()) {\n\t\t\t\t\tif (key.equalsIgnoreCase(\"commands02779\")) continue;\n\t\t\t\t\tif (key.equalsIgnoreCase(\"prefix\")) {\n\t\t\t\t\t\tprefixChars = (String) map.get(key);\n\t\t\t\t\t}\n\t\t\t\t\telse if (key.equalsIgnoreCase(\"token\")) {\n\t\t\t\t\t\tbotToken = (String) map.get(key);\n\t\t\t\t\t}\n\t\t\t\t\telse if (key.equalsIgnoreCase(\"music-channel\")) {\n\t\t\t\t\t\tmusic = (String) map.get(key);\n\t\t\t\t\t}\n\t\t\t\t\telse if (key.equalsIgnoreCase(\"mg-channel\")) {\n\t\t\t\t\t\ttos = (String) map.get(key);\n\t\t\t\t\t}\n\t\t\t\t\telse if (key.equalsIgnoreCase(\"profanity-filter\")) {\n\t\t\t\t\t\tprof = (String) map.get(key);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tcommandList.put(key, map.get(key));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Open the window\n\t\tJFrame frame = ConfigUI.openFirstWindow();\n\t\tContainer content = frame.getContentPane();\n\t\tcontent.setLayout(new BoxLayout(content, BoxLayout.Y_AXIS));\n\t\t\n\t\t//Header\n\t\tJPanel header = ConfigUI.addHeader(frame);\n\t\tcontent.add(header, BorderLayout.NORTH);\n\t\t\n\t\t\n\t\t//Token Entry\n\t\tJPanel tokenPanel = ConfigUI.addTokenField(frame, botToken);\n\t\tcontent.add(tokenPanel, BorderLayout.SOUTH);\n\t\t\n\t\t\n\t\t//Prefix Entry\n\t\tJPanel prefixPanel = ConfigUI.addPrefixField(frame, prefixChars);\n\t\tcontent.add(prefixPanel, BorderLayout.SOUTH);\n\t\t\n\t\t//Music Entry\n\t\tJPanel musicPanel = ConfigUI.addMusicField(frame, music);\n\t\tcontent.add(musicPanel, BorderLayout.SOUTH);\n\t\t\t\t\n\t\t//Minigame Entry\n\t\tJPanel tosPanel = ConfigUI.addTOSField(frame, tos);\n\t\tcontent.add(tosPanel, BorderLayout.SOUTH);\n\t\t\n\t\t//Profanity Filter Toggle\n\t\tJPanel profPanel = ConfigUI.addProfanityFilterButton(frame, prof);\n\t\tcontent.add(profPanel, BorderLayout.SOUTH);\n\t\t\n\t\t//Custom Commands\n\t\tfor (String key : commandList.keySet()) {\n\t\t\tJPanel newEntry = ConfigUI.customCommandEntry(key, commandList.get(key).toString());\n\t\t\tcontent.add(newEntry);\n\t\t\tcommandEntries.add(newEntry);\n\t\t}\n\t\t\n\t\tJPanel submitCancel = new JPanel();\n\t\t\n\t\t//Add Custom Command Addition Button\n\t\tcontent.add(ConfigUI.addAddButton(frame, content, submitCancel, commandEntries));\n\t\t\n\t\t//Submit Button\n\t\tMouseAdapter submitEvent = new MouseAdapter() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) { //This is what happens when the fields are submitted\n\t\t\t\ttry {\n\t\t\t\t\tsuper.mouseClicked(e);\n\t\t\t\t\tYamlWriter yamlW = new YamlWriter(new FileWriter(\"config.yml\"));\n\t\t\t\t\tHashMap<String, Object> newMap = new HashMap<String, Object>();\n\t\t\t\t\tList<String> commands = new ArrayList<String>();\n\t\t\t\t\tString newToken = ConfigUI.getTextFromField(tokenPanel);\n\t\t\t\t\tnewMap.put(\"token\", newToken);\n\t\t\t\t\tString newPrefix = ConfigUI.getTextFromField(prefixPanel);\n\t\t\t\t\tnewMap.put(\"prefix\", newPrefix);\n\t\t\t\t\tString newMusic = ConfigUI.getTextFromField(musicPanel);\n\t\t\t\t\tnewMap.put(\"music-channel\", newMusic);\n\t\t\t\t\tString newTOS = ConfigUI.getTextFromField(tosPanel);\n\t\t\t\t\tnewMap.put(\"mg-channel\", newTOS);\n\t\t\t\t\tJRadioButton profButt = new JRadioButton();\n\t\t\t\t\tfor (Component comp : profPanel.getComponents()) {\n\t\t\t\t\t\tif (comp instanceof JRadioButton) {\n\t\t\t\t\t\t\tprofButt = (JRadioButton) comp;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tString newProf = profButt.isSelected() + \"\";\n\t\t\t\t\tnewMap.put(\"profanity-filter\", newProf);\n\t\t\t\t\tfor (JPanel custom : commandEntries) {\n\t\t\t\t\t\tString key = null;\n\t\t\t\t\t\tString value = null;\n\t\t\t\t\t\tComponent[] comps = custom.getComponents();\n\t\t\t\t\t\tfor (Component c : comps) {\n\t\t\t\t\t\t\tboolean cont = true;\n\t\t\t\t\t\t\tif (c instanceof JTextField) {\n\t\t\t\t\t\t\t\tString text = ((JTextField) c).getText();\n\t\t\t\t\t\t\t\tif (text.equals(\"\")) {\n\t\t\t\t\t\t\t\t\tcont = false;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tkey = ((JTextField) c).getText();\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (c instanceof JScrollPane && cont) {\n\t\t\t\t\t\t\t\tvalue = ConfigUI.getTextFromArea((JScrollPane) c);\n\t\t\t\t\t\t\t\tnewMap.put(key, value);\n\t\t\t\t\t\t\t\tcommands.add(key);\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\tnewMap.put(\"commands02779\", commands);\n\t\t\t\t\tyamlW.write(newMap);\n\t\t\t\t\tyamlW.close();\n\t\t\t\t\tVariables.setPrefix(newPrefix);\n\t\t\t\t\tVariables.setMusicChannel(newMusic);\n\t\t\t\t\tVariables.setMinigameChannel(newTOS);\n\t\t\t\t\tVariables.setProfanityEnabled(newProf);\n\t\t\t\t\t\n\t\t\t\t\tframe.dispose();\n\t\t\t\t\t\n\t\t\t\t\tJFrame startingFrame = ConfigUI.openStartingFrame();\n\t\t\t\t\tstartingFrame.pack();\n\n\t\t\t\t\tnew Thread(new Runnable() {\n\n @Override\n public void run() {\n try {\n Thread.sleep(2100);\n } catch (InterruptedException ex) {\n }\n SwingUtilities.invokeLater(new Runnable() {\n\n @Override\n public void run() {\n \tboolean ableToLogin = runBot(newToken);\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\tstartingFrame.dispose();\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\tJFrame newFrame = ConfigUI.openRunningFrame(ableToLogin);\n \t\t\t\t\t\t\tnewFrame.pack();\n }\n });\n }\n }).start();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcatch (IOException ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t};\n\t\tcontent.add(ConfigUI.addSubmitAndCancel(frame, submitCancel, commandEntries, commandList, submitEvent), BorderLayout.SOUTH);\n\t\t\n\t\t//Scrollbar\n\t\tJScrollPane scroll = new JScrollPane(content, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n\t\t\n\t\tframe.setContentPane(scroll);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tframe.pack();\n\t\t/*\n\t\t * END of the config!!\n\t\t */\n\t}", "private static Config loadConfig(String name) {\n\n\t\tString path;\n\t\tif (name == null) {\n\t\t\tpath = \"application.json\";\n\t\t} else {\n\t\t\tpath = \"src/\"+extensionsPackage+\"/\" + name + \"/config.json\";\n\t\t}\n\n\t\tGson gson = new Gson();\n\t\tConfig config = null;\n\n\t\ttry {\n\t\t\tconfig = gson.fromJson(new FileReader(path), Config.class);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn config;\n\t}", "@PostConstruct\n\tpublic void init() {\n\t\tif (!Files.isDirectory(Paths.get(configFilePath))) {\n\t\t\ttry {\n\t\t\t\tFiles.createDirectory(Paths.get(configFilePath));\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\t\"can't create the folder for the configuration\", e);\n\t\t\t}\n\t\t}\n\t\t// schedule the watch service in repeating loop to look for modification\n\t\t// at the jambel configuration files\n\t\tconfigFilesWatchServiceExecutor.scheduleAtFixedRate(\n\t\t\t\tnew ConfigPathWatchService(configFilePath), 0L, 1L,\n\t\t\t\tTimeUnit.MILLISECONDS);\n\t}", "ImportConfig createImportConfig();", "AuditYamlConfig loadConfig() throws ConfigurationException\n {\n if (hasCustomConfigPath())\n {\n return loadConfigAtCustomPath();\n }\n else if (hasConfigAtDefaultPath())\n {\n return loadConfigAtDefaultPath();\n }\n else\n {\n return AuditYamlConfig.createWithoutFile();\n }\n }", "public interface FileConfig {\n /**\n * get the mustache file path.\n * @return file path\n */\n String getPath();\n}", "private static void loadConfigs(String[] args) {\n String chosenConfigFile, chosenSensorsFile;\n\n // select config files (allow for specifying)\n if(args.length >= 2) {\n chosenConfigFile = args[0];\n chosenSensorsFile = args[1];\n }\n else {\n chosenConfigFile = DEFAULT_CONFIG_FILE;\n chosenSensorsFile = DEFAULT_SENSORS_FILE;\n }\n // filenames starting with \"/\" and \"./\" are later interpreted as being outside JAR\n if(chosenConfigFile.charAt(0) == '/' || chosenConfigFile.substring(0, 2).equals(\"./\"))\n System.out.println(\"retreiving \" + chosenConfigFile + \" from this filesystem (not the JAR)\");\n if(chosenSensorsFile.charAt(0) == '/' || chosenSensorsFile.substring(0, 2).equals(\"./\"))\n System.out.println(\"retreiving \" + chosenSensorsFile + \" from this filesystem (not the JAR)\");\n\n // load general configuration\n Properties props = new Properties();\n try {\n if(chosenConfigFile.charAt(0) == '/' || chosenConfigFile.substring(0, 2).equals(\"./\"))\n // get the config file from the user's filesystem\n props.load(new FileInputStream(new File(chosenConfigFile)));\n else\n // get the config file saved in this JAR\n props.load(Main.class.getResourceAsStream(\"/\" + chosenConfigFile));\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(1);\n }\n\n // load sensors\n if(chosenSensorsFile.charAt(0) == '/' || chosenSensorsFile.substring(0, 2).equals(\"./\"))\n // get the sensors file from the user's filesystem\n sensors = ConfigLoader.getSensorsFromFile(chosenSensorsFile);\n else\n // get the sensors file saved in this JAR\n sensors = ConfigLoader.getSensorsFromFile(Main.class.getResourceAsStream(\"/\" + chosenSensorsFile));\n }", "void setConfigFileName( String s );", "private ConfigReader() {\r\n\t\tsuper();\r\n\t}", "private static void getFiles(String root, Vector files) {\n Location f = new Location(root);\n String[] subs = f.list();\n if (subs == null) subs = new String[0];\n Arrays.sort(subs);\n \n // make sure that if a config file exists, it is first on the list\n for (int i=0; i<subs.length; i++) {\n if (subs[i].endsWith(\".bioformats\") && i != 0) {\n String tmp = subs[0];\n subs[0] = subs[i];\n subs[i] = tmp;\n break;\n }\n }\n \n if (subs == null) {\n LogTools.println(\"Invalid directory: \" + root);\n return;\n }\n \n ImageReader ir = new ImageReader();\n Vector similarFiles = new Vector();\n \n for (int i=0; i<subs.length; i++) {\n LogTools.println(\"Checking file \" + subs[i]);\n subs[i] = new Location(root, subs[i]).getAbsolutePath();\n if (isBadFile(subs[i]) || similarFiles.contains(subs[i])) {\n LogTools.println(subs[i] + \" is a bad file\");\n String[] matching = new FilePattern(subs[i]).getFiles();\n for (int j=0; j<matching.length; j++) {\n similarFiles.add(new Location(root, matching[j]).getAbsolutePath());\n }\n continue;\n }\n Location file = new Location(subs[i]);\n \n if (file.isDirectory()) getFiles(subs[i], files);\n else if (file.getName().equals(\".bioformats\")) {\n // special config file for the test suite\n configFiles.add(file.getAbsolutePath());\n }\n else {\n if (ir.isThisType(subs[i])) {\n LogTools.println(\"Adding \" + subs[i]);\n files.add(file.getAbsolutePath());\n }\n else LogTools.println(subs[i] + \" has invalid type\");\n }\n file = null;\n }\n }", "private boolean setupConfigs(Config... configs) {\n for (Config config : configs) {\n // If failed -> Stop creating the rest of the configs.\n if (!config.createIfNotExists()) {\n return false;\n }\n }\n\n return true;\n }", "public ReadConfigFile (){\n\t\ttry {\n\t\t\tinput = ReadConfigFile.class.getClassLoader().getResourceAsStream(Constant.CONFIG_PROPERTIES_DIRECTORY);\n\t\t\tprop = new Properties();\n\t\t\tprop.load(input);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}catch ( IOException e ) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\t\n\t}", "public ConfiguredMethods(String configureFilePath) {\n\t\ttry {\n\t\t\tupdateConfiguration(configureFilePath);\n\t\t\tLog.i(\"load configuration file successfully\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tLog.e(\"load configuration file fail!!!\");\n\t\t}\n\t}", "private List<ServiceDTO> getCustomizedConfigService() {\n String configServices = System.getProperty(\"apollo.configService\");\n if (Strings.isNullOrEmpty(configServices)) {\n // 2. Get from OS environment variable\n configServices = System.getenv(\"APOLLO_CONFIGSERVICE\");\n }\n if (Strings.isNullOrEmpty(configServices)) {\n // 3. Get from server.properties\n configServices = Foundation.server().getProperty(\"apollo.configService\", null);\n }\n\n if (Strings.isNullOrEmpty(configServices)) {\n return null;\n }\n\n logger.warn(\"Located config services from apollo.configService configuration: {}, will not refresh config services from remote meta service!\", configServices);\n\n // mock service dto list\n String[] configServiceUrls = configServices.split(\",\");\n List<ServiceDTO> serviceDTOS = Lists.newArrayList();\n\n for (String configServiceUrl : configServiceUrls) {\n configServiceUrl = configServiceUrl.trim();\n ServiceDTO serviceDTO = new ServiceDTO();\n serviceDTO.setHomepageUrl(configServiceUrl);\n serviceDTO.setAppName(ServiceNameConsts.APOLLO_CONFIGSERVICE);\n serviceDTO.setInstanceId(configServiceUrl);\n serviceDTOS.add(serviceDTO);\n }\n\n return serviceDTOS;\n }", "public String readConfiguration(String path);", "public static void processConfig() {\r\n\t\tLOG.info(\"Loading Properties from {} \", propertiesPath);\r\n\t\tLOG.info(\"Opening configuration file ({})\", propertiesPath);\r\n\t\ttry {\r\n\t\t\treadPropertiesFile();\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tLOG.error(\r\n\t\t\t\t\t\"Monitoring system encountered an error while processing config file, Exiting\",\r\n\t\t\t\t\te);\r\n\t\t}\r\n\t}", "protected static File getInternalConfigurationFile(String pathToApplication) {\r\n\t\t\r\n\t\tString configPath = PhotoConstants.PROPERTIES_PATH;\r\n\t\tString configFileName = PhotoConstants.SETUP_FILE;\r\n\t\t\r\n\t\t// read configuration\r\n\t\tFile configDir = new File(pathToApplication, configPath);\r\n\t\tFile configFile = new File (configDir, configFileName);\r\n\t\treturn configFile;\r\n\t}", "private void setupFiles(){\n\t\t// Copies the default configuration files to the workspace \n\t\ttry{\n\t\t\tBundle bundle = Platform.getBundle(Activator.PLUGIN_ID);\n\t\t\tIPath destBasePath = Platform.getStateLocation(bundle);\n\t\t\tpropertiesFile = destBasePath.append(PreferencesConstants.PROP_BUNDLE_STATE_PATH).toFile();\n\t\t\tif(!propertiesFile.exists()){\n\n\t\t\t\tURI sourceBaseURI = bundle.getEntry(PreferencesConstants.DEFAULT_CONFIG_BUNDLE_PATH).toURI();\n\t\t\t\t//TODO: fix the item below?\n\t\t\t\tEnumeration<URL> entries = bundle.findEntries(PreferencesConstants.DEFAULT_CONFIG_BUNDLE_PATH, null, true);\n\t\t\t\tfor(; entries != null && entries.hasMoreElements();){\n\t\t\t\t\tURL url = entries.nextElement();\n\t\t\t\t\tURI uri = url.toURI();\n\t\t\t\t\tURI relativeURI = sourceBaseURI.relativize(uri);\n\t\t\t\t\tIPath destPath = destBasePath.append(relativeURI.toString());\n\n\t\t\t\t\tif(destPath.hasTrailingSeparator()){\n\t\t\t\t\t\t// it's a folder\n\t\t\t\t\t\tdestPath.toFile().mkdirs();\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t// it's a file\n\t\t\t\t\t\tURL contentURL = FileLocator.resolve(url);\n\t\t\t\t\t\tSystemUtils.blt(contentURL.openStream(), new FileOutputStream(destPath.toFile()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//now save the destination paths to the System properties\n\t\t\t//save the report paths\n\t\t\tString reportTemplatePath = destBasePath.append(PreferencesConstants.DEFAULT_REPORT_PATH\n\t\t\t\t\t+ PreferencesConstants.DEFAULT_REPORT_TEMPLATE_URL).toPortableString();\n\t\t\tSystem.setProperty(PreferencesConstants.DEFAULT_PROP_REPORT_TEMPLATE, \n\t\t\t\t\treportTemplatePath);\n\t\t\tSystem.out.println(\"report template file: \" + reportTemplatePath);\t\t\n\t\t\t\n\t\t\tString reportPath = destBasePath.append(PreferencesConstants.DEFAULT_REPORT_PATH\n\t\t\t\t\t+ PreferencesConstants.DEFAULT_REPORT_URL).toPortableString();\n\t\t\tSystem.setProperty(PreferencesConstants.DEFAULT_PROP_REPORT, \n\t\t\t\t\treportPath);\t\t\t\n\t\t\tSystem.out.println(\"report file: \" + reportPath);\t\t\t\n\t\t\t\n\t\t\t//save the rule paths\n\t\t\tString ruleSessionPath = destBasePath.append(PreferencesConstants.DEFAULT_RULE_PATH\n\t\t\t\t\t+ PreferencesConstants.DEFAULT_RULE_SESSION_URL).toPortableString();\n\t\t\tSystem.setProperty(PreferencesConstants.DEFAULT_PROP_RULE_SESSION, \n\t\t\t\t\truleSessionPath);\t\t\t\n\t\t\tSystem.out.println(\"rule session file: \" + ruleSessionPath);\t\t\t\t\t\n\t\t\t\n\t\t\tString ruleSessionOutPath = destBasePath.append(PreferencesConstants.DEFAULT_RULE_PATH\n\t\t\t\t\t+ PreferencesConstants.DEFAULT_RULE_SESSION_OUT_URL).toPortableString();\n\t\t\tSystem.setProperty(PreferencesConstants.DEFAULT_PROP_RULE_SESSION_OUT, \n\t\t\t\t\truleSessionOutPath);\t\t\t\n\t\t\tSystem.out.println(\"rule session out file: \" + ruleSessionOutPath);\t\t\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t\n\t\t\n\t\t/*\n\t\tString pluginName = Activator.PLUGIN_ID;\n\t\tBundle bundle = Platform.getBundle(pluginName);\n\n\t\tString propFileStr = getFixedPath(bundle, PreferencesConstants.PROP_BASE_URL + PreferencesConstants.PROP_URL);\n\t\tFile sourcePropFile = new File(propFileStr);\n\n\t\t//propertiesFile = new File(fixedPath);\n\t\tIWorkspace workspace = ResourcesPlugin.getWorkspace();\n\t\tIWorkspaceRoot root = workspace.getRoot();\n\t\tIPath location = root.getLocation();\n\t\t//location.toString()\n\t\t//String path = location.toString() + location.SEPARATOR + \".metadata\" \n\t\t//\t+ location.SEPARATOR + PreferencesConstants.PROP_BASE_URL;\n\t\tString path = location.toString() + location.SEPARATOR + PreferencesConstants.PROP_BASE_URL;\n\t\t//URL entry = Platform.getInstallLocation().getURL();\n\t\t//String path = entry.toString() + location.SEPARATOR + PreferencesConstants.PROP_BASE_URL;\n\n\t\tFile usersResourceDir = new File(path);\n\t\tpropertiesFile = new File(path + PreferencesConstants.PROP_URL);\n\t\tSystem.out.println(\"properties file \" + propertiesFile.getAbsolutePath());\n\t\tFile reportDir;\n\t\tFile ruleDir;\n\t\tif(!usersResourceDir.exists()){\n\t\t\ttry{\n\t\t\t\tSystemUtils.createDirectory(usersResourceDir);\n\t\t\t}\n\t\t\tcatch(IOException e){\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\t//copy the properties file\n\n\t\t\ttry{\n\t\t\t\tSystemUtils.copyFile(sourcePropFile, propertiesFile);\n\t\t\t}\n\t\t\tcatch(IOException e1){\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\t//copy report directory\n\t\t\tString fixedReportPath = getFixedPath(bundle, PreferencesConstants.PROP_BASE_URL + PreferencesConstants.DEFAULT_REPORT_PATH);\n\t\t\treportDir = new File(fixedReportPath);\n\t\t\ttry{\n\t\t\t\tSystemUtils.copyDirectory(reportDir, usersResourceDir);\n\t\t\t}\n\t\t\tcatch(IOException e){\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\t//copy rule directory\n\t\t\tString fixedRulePath = getFixedPath(bundle, PreferencesConstants.PROP_BASE_URL + PreferencesConstants.DEFAULT_RULE_PATH);\n\t\t\truleDir = new File(fixedRulePath);\n\t\t\ttry{\n\t\t\t\tSystemUtils.copyDirectory(ruleDir, usersResourceDir);\n\t\t\t}\n\t\t\tcatch(IOException e){\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tSystem.out.println(\"success\");\n\t\t}\n\t\tSystem.setProperty(PreferencesConstants.DEFAULT_PROP_REPORT_TEMPLATE, usersResourceDir.toString() + usersResourceDir.separator + PreferencesConstants.DEFAULT_REPORT_PATH.substring(1) + usersResourceDir.separator + PreferencesConstants.DEFAULT_REPORT_TEMPLATE_URL);\n\t\tSystem.out.println(\"report template file: \" + System.getProperty(PreferencesConstants.DEFAULT_PROP_REPORT_TEMPLATE));\n\t\tSystem.setProperty(PreferencesConstants.DEFAULT_PROP_REPORT, usersResourceDir.toString() + usersResourceDir.separator + PreferencesConstants.DEFAULT_REPORT_PATH.substring(1) + usersResourceDir.separator + PreferencesConstants.DEFAULT_REPORT_URL.substring(1));\n\t\tSystem.out.println(\"report file: \" + System.getProperty(PreferencesConstants.DEFAULT_PROP_REPORT));\n\t\tSystem.setProperty(PreferencesConstants.DEFAULT_PROP_RULE_SESSION, usersResourceDir.toString() + usersResourceDir.separator + PreferencesConstants.DEFAULT_RULE_PATH.substring(1) + usersResourceDir.separator + PreferencesConstants.DEFAULT_RULE_SESSION_URL.substring(1));\n\t\tSystem.out.println(\"rule session file: \" + System.getProperty(PreferencesConstants.DEFAULT_PROP_RULE_SESSION));\n\n\t\tSystem.setProperty(PreferencesConstants.DEFAULT_PROP_RULE_SESSION_OUT, usersResourceDir.toString() + usersResourceDir.separator + PreferencesConstants.DEFAULT_RULE_PATH.substring(1) + usersResourceDir.separator + PreferencesConstants.DEFAULT_RULE_SESSION_OUT_URL.substring(1));\n\t\tSystem.out.println(\"rule session file: \" + System.getProperty(PreferencesConstants.DEFAULT_PROP_RULE_SESSION_OUT));\n\t\t*/\n\t}", "private OptimoveConfig() {\n }", "private void init() throws IOException {\n if (Files.exists(getBaseConfigPath()) && !Files.isDirectory(getBaseConfigPath())) {\n throw new IOException(\"Base config path exists and is not a directory \" + getBaseConfigPath());\n }\n\n if (!Files.exists(getBaseConfigPath())) {\n Files.createDirectories(getBaseConfigPath());\n }\n\n\n if (Files.exists(nodeIdPath) && !Files.isRegularFile(nodeIdPath)) {\n throw new IOException(\"NodeId file is not a regular directory!\");\n }\n\n if (Files.exists(clusterNamePath) && !Files.isRegularFile(clusterNamePath)) {\n throw new IOException(\"Cluster name is not a regular directory!\");\n }\n\n if (!Files.isWritable(getBaseConfigPath())) {\n throw new IOException(\"Can't write to the base configuration path!\");\n }\n }", "protected void additionalConfig(ConfigType config){}", "protected void enhanceConfig(ConfigurationBuilder c) {\n }", "@Configuration\n public Option[] config() {\n String pathToTestClass = ServiceOneBundleTest.class.getClassLoader().getResource(\".\").getPath();\n String[] pathParts = pathToTestClass.split(\"OsgiBundleTest\");\n StringBuilder pathToBundle = new StringBuilder(pathParts[0]);\n pathToBundle.append(\"ServiceOneModule/target/ServiceOneModule-1.0-SNAPSHOT.jar\");\n return CoreOptions.options(\n mavenBundle(\"com.google.guava\", \"guava\", \"13.0.1\").startLevel(30),\n bundle(new File(pathToBundle.toString()).toURI().toString()),\n junitBundles()\n );\n }", "protected abstract Object[] extractDataFromConfig(File configFile,\n Properties rootProps, Properties configProps);", "@Override\n\tpublic void config(StarConfig config) {\n\t\t\n\t}", "public void exportConfigs ()\n {\n if (_chooser.showOpenDialog(ConfigEditor.this) == JFileChooser.APPROVE_OPTION) {\n ArrayList<ManagedConfig> configs = new ArrayList<ManagedConfig>();\n _tree.getSelectedNode().getConfigs(configs);\n group.save(configs, _chooser.getSelectedFile());\n }\n _prefs.put(\"config_dir\", _chooser.getCurrentDirectory().toString());\n }", "private static Path getConfig(String modName)\n\t{\n\t\treturn Paths.get(\"config\"+File.separator+modName+\".cfg\").toAbsolutePath();\n\t}", "public interface Config {\n\n /**\n * Converts the config into a Map\n *\n * @param deep If true, instead of putting Maps for subconfigs,\n * use the full path using the separator character to split\n * @return This config as a Map\n */\n Map<String, Object> getValues(boolean deep);\n\n /**\n * @param path The path to check\n * @return If the config contains an item at path\n */\n boolean contains(String path);\n\n /**\n * Load the values from the map into this config.\n *\n * @param values The map to load in.\n */\n default void setAll(Map<String, Object> values) {\n for (String path : values.keySet()) {\n set(path, values.get(path));\n }\n }\n\n /**\n * Sets the value at path to value\n *\n * @param path The path to put the value\n * @param value The value\n * @return The modified config object, to allow for chain calls\n */\n Config set(String path, Object value);\n\n default void setAll(Config values) {\n for (String path : values.getKeys(true)) {\n set(path, values.get(path));\n }\n }\n\n /**\n * @param deep Should full paths be returned for keys in subconfigs, separated by the separator character?\n * @return The keys that have values in this config\n */\n Set<String> getKeys(boolean deep);\n\n /**\n * Finds and retrieves the object at the given path. If the path is empty, returns this object.\n *\n * @param path The path of the object\n * @return The object at the given path, or null if not found\n */\n default Object get(String path) {\n return get(path, null);\n }\n\n /**\n * Gets the raw value this config contains at path, returning the placeholder def is nothing is found.\n *\n * @param path The path to get the value at\n * @param def The placeholder if no value is found at path, e.g. {@code null}\n * @return The raw object contained at path, or def if nothing is there.\n */\n Object get(String path, Object def);\n\n /**\n * @return The separator character.\n */\n char getSeparator();\n\n /**\n *\n * @return toString() of the object at the path, or null if there is none\n */\n default String getString(String path) {\n return getString(path, null);\n }\n\n /**\n *\n * @return toString() of the object at the path, or def if there is none\n */\n default String getString(String path, String def) {\n Object obj = get(path);\n\n if (obj != null) return obj.toString();\n else return def;\n }\n\n /**\n *\n * @return If there is a String stored at the given path\n */\n default boolean isString(String path) {\n return get(path) instanceof String;\n }\n\n /**\n *\n * @return The int value of the number stored at the path, or 0 if there is none\n */\n default int getInt(String path) {\n return getInt(path, 0);\n }\n\n /**\n * @return The int value of the number stored at the path, or def if there is none\n */\n default int getInt(String path, int def) {\n Object obj = get(path);\n\n if (obj instanceof Number) return ((Number) obj).intValue();\n else return def;\n }\n\n /**\n *\n * @return If the object at the path is an instance of Integer\n */\n default boolean isInt(String path) {\n return get(path) instanceof Integer;\n }\n\n /**\n *\n * @return The short value of the number stored at the path, or 0 if there is none\n */\n default short getShort(String path) {\n return getShort(path, 0);\n }\n\n /**\n * @return The short value of the number stored at the path, or def if there is none\n */\n default short getShort(String path, int def) {\n Object obj = get(path);\n\n if (obj instanceof Number) return ((Number) obj).shortValue();\n else return (short) def;\n }\n\n /**\n *\n * @return If the object at the path is an instance of Short\n */\n default boolean isShort(String path) {\n return get(path) instanceof Short;\n }\n\n /**\n *\n * @return True if the boolean true is stored at path, otherwise false\n */\n default boolean getBoolean(String path) {\n return getBoolean(path, false);\n }\n\n /**\n * @return The boolean value stored at path, or def is there is none\n */\n default boolean getBoolean(String path, boolean def) {\n Object obj = get(path);\n\n if (obj instanceof Boolean) return (Boolean) obj;\n else return def;\n }\n\n /**\n * @return If there is a boolean stored at path\n */\n default boolean isBoolean(String path) {\n return get(path) instanceof Boolean;\n }\n\n default boolean isNumber(String path) {\n return get(path) instanceof Number;\n }\n\n default double getDouble(String path) {\n return getDouble(path, 0.0d);\n }\n\n default double getDouble(String path, double def) {\n Object obj = get(path);\n\n if (obj instanceof Number) return ((Number) obj).doubleValue();\n else return def;\n }\n\n default boolean isDouble(String path) {\n return get(path) instanceof Double;\n }\n\n default BigDecimal getBigDecimal(String path) {\n return getBigDecimal(path, BigDecimal.ZERO);\n }\n\n default BigDecimal getBigDecimal(String path, BigDecimal def) {\n Object obj = get(path);\n\n if (obj instanceof Number) {\n if (obj instanceof BigDecimal) {\n return (BigDecimal) obj;\n } else if (obj instanceof BigInteger) {\n return new BigDecimal((BigInteger) obj);\n } else {\n return BigDecimal.valueOf(((Number) obj).doubleValue());\n }\n } else return def;\n }\n\n default boolean isBigDecimal(String path) {\n return get(path) instanceof BigDecimal;\n }\n\n default long getLong(String path) {\n return getLong(path, 0L);\n }\n\n default long getLong(String path, long def) {\n Object obj = get(path);\n\n if (obj instanceof Number) return ((Number) obj).longValue();\n else return def;\n }\n\n default boolean isLong(String path) {\n return get(path) instanceof Long;\n }\n\n default byte[] getByteArray(String path) {\n return getByteArray(path, new byte[0]);\n }\n\n default byte[] getByteArray(String path, byte[] def) {\n Object obj = get(path);\n\n if (obj instanceof byte[]) return (byte[]) obj;\n else return def;\n }\n\n default boolean isByteArray(String path) {\n return get(path) instanceof byte[];\n }\n\n default List<String> getStringList(String path) {\n return getList(path, String.class);\n }\n\n default <T> List<T> getList(String path, Class<T> clazz) {\n return getList(path, new ArrayList<>(), clazz);\n }\n\n @SuppressWarnings(\"unchecked\")\n default <T> List<T> getList(String path, List<T> def, Class<T> clazz) {\n Object obj = get(path);\n\n if (!(obj instanceof Collection<?>)) return def;\n\n Collection<?> input = (Collection<?>) obj;\n List<T> result = new ArrayList<>();\n\n for (Object o : input) {\n if (!clazz.isInstance(o)) continue;\n\n result.add((T) o);\n }\n\n return result;\n }\n\n default List<Config> getConfigList(String path) {\n return getList(path, Config.class);\n }\n\n default boolean isList(String path) {\n return get(path) instanceof List<?>;\n }\n\n /**\n * @param path The path to check for a list\n * @param type The type that the list should contain\n * @return If there is a list at this path and it contains an object with the type {@code type}\n */\n default boolean isList(String path, Class<?> type) {\n if (!isList(path)) return false;\n\n List<?> list = getList(path, null, type);\n\n return list != null && !list.isEmpty();\n }\n\n default Config getConfigOrNull(String path) {\n Object obj = get(path);\n\n if (!(obj instanceof Config)) return null;\n else return (Config) obj;\n }\n\n Config getConfigOrEmpty(String path);\n\n default boolean isConfig(String path) {\n return get(path) instanceof Config;\n }\n\n /**\n * Modifies the fields of the object passed in to the values specified in this config.\n *\n * @param object The object to modify the fields of.\n * @param <T> The type of the object\n * @return The (now modified) object\n */\n default <T> T getAllFields(T object) {\n Field[] fields = object.getClass().getDeclaredFields();\n\n for (Field field : fields) {\n field.setAccessible(true);\n\n if (Modifier.isStatic(field.getModifiers())) continue;\n if (Modifier.isTransient(field.getModifiers())) continue;\n\n if (!contains(field.getName())) continue;\n\n try {\n if (field.getType().equals(double.class)) {\n if (!isNumber(field.getName())) continue;\n field.setDouble(object, getDouble(field.getName()));\n } else if (field.getType().equals(float.class)) {\n if (!isNumber(field.getName())) continue;\n field.setFloat(object, (float) getDouble(field.getName()));\n } else if (field.getType().equals(int.class)) {\n if (!isNumber(field.getName())) continue;\n field.setInt(object, getInt(field.getName()));\n } else if (field.getType().equals(boolean.class)) {\n if (!isBoolean(field.getName())) continue;\n field.setBoolean(object, getBoolean(field.getName()));\n } else if (field.getType().equals(long.class)) {\n if (!isNumber(field.getName())) continue;\n field.setLong(object, getLong(field.getName()));\n } else if (field.getType().equals(short.class)) {\n if (!isNumber(field.getName())) continue;\n field.setShort(object, (short) getInt(field.getName()));\n } else if (field.getType().equals(byte.class)) {\n if (!isNumber(field.getName())) continue;\n field.setByte(object, (byte) getInt(field.getName()));\n } else {\n Object newValue = getType(field.getName(), field.getType());\n if (newValue == null) continue;\n\n field.set(object, newValue);\n }\n\n } catch (IllegalAccessException e) {\n //This should not happen hopefully.\n e.printStackTrace();\n }\n }\n\n return object;\n }\n\n /**\n * Loads the fields of the object into this config.\n *\n * @param object The object itself\n * @param <T> The type of object\n * @return The object, again\n */\n default <T> T setAllFields(T object) {\n Field[] fields = object.getClass().getDeclaredFields();\n\n for (Field field : fields) {\n field.setAccessible(true);\n\n if (Modifier.isStatic(field.getModifiers()) || Modifier.isTransient(field.getModifiers())) continue;\n\n try {\n set(field.getName(), field.get(object));\n } catch (IllegalAccessException e) {\n //hopefully we will be fine\n e.printStackTrace();\n }\n }\n\n return object;\n }\n\n default <T> T getType(String path, Class<T> type) {\n return getType(path, null, type);\n }\n\n @SuppressWarnings(\"unchecked\")\n default <T> T getType(String path, T def, Class<T> type) {\n Object obj = get(path);\n\n if (!type.isInstance(obj)) return def;\n return (T) obj;\n }\n}", "@Test\n public void testLoadConfigurationFromFile() throws ConfigurationException\n {\n factory = new DefaultConfigurationBuilder(TEST_FILE);\n checkConfiguration();\n }", "public void importConfigs ()\n {\n if (_chooser.showOpenDialog(ConfigEditor.this) == JFileChooser.APPROVE_OPTION) {\n group.load(_chooser.getSelectedFile(), true);\n }\n _prefs.put(\"config_dir\", _chooser.getCurrentDirectory().toString());\n }", "public WorldConfig getWorldConfig(World grabfor) {\n\t\tif (this.SingleWorldConfig != null)\n\t\t\treturn SingleWorldConfig;\n\t\tString worldName = grabfor.getName();\n\n\t\t// if it's not in the hashmap...\n\t\tif (!WorldCfg.containsKey(worldName)) {\n\t\t\t// special code: it's possible a configuration might already exist\n\t\t\t// for this file, so we'll\n\t\t\t// check\n\t\t\tString checkyamlfile = WorldConfig.getWorldConfig(worldName);\n\t\t\t// if it exists...\n\t\t\tif (new File(checkyamlfile).exists()) {\n\t\t\t\t// attempt to load the configuration from the given file.\n\t\t\t\tYamlConfiguration existingcfg = YamlConfiguration.loadConfiguration(new File(checkyamlfile));\n\t\t\t\tYamlConfiguration outConfiguration = new YamlConfiguration();\n\t\t\t\t// place it in the hashmap.\n\t\t\t\tWorldCfg.put(worldName, new WorldConfig(worldName, existingcfg, outConfiguration));\n\t\t\t\t// try to save it. this can error out for who knows what reason.\n\t\t\t\t// If it does, we'll\n\t\t\t\t// squirt the issue to the log.\n\t\t\t\ttry {\n\t\t\t\t\toutConfiguration.save(new File(checkyamlfile));\n\t\t\t\t} catch (IOException iex) {\n\t\t\t\t\tGriefPrevention.instance.getLogger().log(Level.SEVERE, \"Failed to save World Config for world \" + worldName);\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// if the file doesn't exist, then we will go ahead and create a\n\t\t\t\t// new configuration.\n\t\t\t\t// set the input Yaml to default to the template.\n\t\t\t\t// if the template file exists, load it's configuration and use\n\t\t\t\t// the result as useSource.\n\t\t\t\t// Otherwise, we create a blank configuration.\n\t\t\t\tDebugger.Write(\"Failed to find world configuration for World \" + worldName, DebugLevel.Errors);\n\t\t\t\tFile TemplFile = new File(TemplateFile);\n\t\t\t\tFileConfiguration useSource = null;\n\t\t\t\tif (TemplFile.exists()) {\n\t\t\t\t\tuseSource = YamlConfiguration.loadConfiguration(TemplFile);\n\t\t\t\t} else {\n\t\t\t\t\tDebugger.Write(\"Template file \\\"\" + TemplateFile + \" \\\"Not Found.\", DebugLevel.Errors);\n\t\t\t\t\tuseSource = new YamlConfiguration();\n\t\t\t\t}\n\n\t\t\t\t// The target save location.\n\t\t\t\tFileConfiguration Target = new YamlConfiguration();\n\t\t\t\t// place it in the hashmap.\n\t\t\t\tWorldCfg.put(worldName, new WorldConfig(grabfor.getName(), useSource, Target));\n\t\t\t\ttry {\n\t\t\t\t\tTarget.save(new File(checkyamlfile));\n\t\t\t\t} catch (IOException ioex) {\n\t\t\t\t\tGriefPrevention.instance.getLogger().log(Level.SEVERE, \"Failed to write world configuration to \" + checkyamlfile);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t// save target\n\t\t}\n\t\t// after the above logic, we know it's in the hashmap, so return that.\n\t\treturn WorldCfg.get(worldName);\n\n\t}", "public static void LoadIntoConfigFiles()\n {\n \tProperties prop = new Properties();\n ///*\n \ttry {\n \t\t//set the properties value\n \n prop.setProperty(\"comp_name\", \"Teledom International Ltd\");\n prop.setProperty(\"com_city\", \"Lagos\");\n \t\tprop.setProperty(\"State\", \"Lagos\");\n \t\tprop.setProperty(\"logo_con\", \"logo.png\");\n \t\tprop.setProperty(\"front_frame\", \"front.png\");\n prop.setProperty(\"back_frame\", \"back.png\");\n \n \n \n \n \t\t//save properties to project root folder\n \t\tprop.store(new FileOutputStream(setupFileName), null);\n \n \t} catch (IOException ex) {\n \t\tex.printStackTrace();\n }\n // */\n \n \n \n }", "public C build() {\n if (configs.isEmpty()) {\n throw new RuntimeException(\"There should be at least one configuration provided\");\n }\n\n // Handling config files\n ConfigSource firstConfigSource = configs.get(0);\n Config firstConfigOrig = getConfigSupplier(firstConfigSource).getConfig();\n if (!(supportedConfig.isInstance(firstConfigOrig))) {\n throw new RuntimeException(\n String.format(\n \"Config is not of parameterized type %s, got instead %s\",\n supportedConfig.getName(), firstConfigOrig.getClass().getName()));\n }\n C firstConfig = (C) firstConfigOrig;\n for (int i = 1; i < configs.size(); ++i) {\n ConfigSource nextConfigSource = configs.get(i);\n Config nextConfig = getConfigSupplier(nextConfigSource).getConfig();\n try {\n firstConfig = copyProperties(firstConfig, nextConfig);\n } catch (Exception ex) {\n throw new RuntimeException(\n String.format(\"Failed to merge config %s into main config\", nextConfigSource), ex);\n }\n }\n\n // Handling string pathValue pairs config overrides\n for (Pair<String, Object> pathValue : pathValueOverrides) {\n try {\n PropertyUtils.setNestedProperty(firstConfig, pathValue.getValue0(), pathValue.getValue1());\n } catch (Exception e) {\n throw new RuntimeException(\n String.format(\n \"Cannot override property %s with value %s\",\n pathValue.getValue0(), pathValue.getValue1()),\n e);\n }\n }\n\n return firstConfig;\n }", "@Test\n public void testDetectConfigurationSimpleClassName() throws Exception {\n\n Config testConfig = ConfigFactory.parseResourcesAnySyntax(\"simpleClassName.conf\");\n\n StreamsConfigurator.setConfig(testConfig);\n\n ComponentConfigurator<ComponentConfiguration> configurator = new ComponentConfigurator<>(ComponentConfiguration.class);\n\n ComponentConfiguration configuredPojo = configurator.detectConfiguration();\n\n Assert.assertThat(configuredPojo, is(notNullValue()));\n\n Assert.assertThat(configuredPojo.getInClasses(), is(notNullValue()));\n Assert.assertThat(configuredPojo.getInClasses().size(), is(greaterThan(0)));\n Assert.assertThat(configuredPojo.getInClasses().get(0), equalTo(\"java.lang.Object\"));\n\n Assert.assertThat(configuredPojo.getOutClasses(), is(notNullValue()));\n Assert.assertThat(configuredPojo.getOutClasses().size(), is(greaterThan(0)));\n Assert.assertThat(configuredPojo.getOutClasses().get(0), equalTo(\"java.lang.Object\"));\n\n }" ]
[ "0.6663854", "0.65637636", "0.64757454", "0.6461459", "0.63813984", "0.6344235", "0.63065726", "0.6290382", "0.62892115", "0.6125474", "0.6118021", "0.6098116", "0.60280085", "0.6000206", "0.59734446", "0.5968852", "0.59631866", "0.59561217", "0.59441894", "0.5931565", "0.58751607", "0.587353", "0.58347833", "0.5832561", "0.5811764", "0.5801274", "0.577559", "0.5733788", "0.5731044", "0.57193786", "0.5699185", "0.56913126", "0.5688795", "0.5682075", "0.56550604", "0.5643393", "0.5628843", "0.5618876", "0.5616026", "0.5613048", "0.5588744", "0.5578043", "0.5573057", "0.55638415", "0.5551011", "0.5546073", "0.55381423", "0.55339926", "0.5530936", "0.552662", "0.5517338", "0.551566", "0.5514957", "0.5512378", "0.55029976", "0.5499561", "0.5495681", "0.5455199", "0.54543966", "0.5450213", "0.5445373", "0.5444778", "0.54368496", "0.5426977", "0.5426731", "0.54193676", "0.54187435", "0.5417429", "0.54152745", "0.54108745", "0.5406883", "0.5403687", "0.54029644", "0.53956246", "0.53947717", "0.53936577", "0.5389719", "0.5388655", "0.53752524", "0.5367985", "0.53611296", "0.5353143", "0.53499407", "0.53490007", "0.5340454", "0.5334458", "0.53341854", "0.5324987", "0.53174984", "0.53146327", "0.53088397", "0.53060484", "0.5305442", "0.5300446", "0.53001356", "0.52993006", "0.5294798", "0.52923805", "0.5286136", "0.52826905", "0.5280824" ]
0.0
-1
Creates an Config object with the given name and relative path and stores it in the internal confMap for later use with get. If there is no configuration file at that path, it optionally creates a new file with default values, if createFile is true.
public static Config create(String name,String relativePath, boolean createFile) { // createFile = create properties file with default values, if not exist if(null==name || "".equals(name)) { //TODO exception, logging return null; } Logger.trace("Creating new Config Object..."); FileConfig c; c=new FileConfig(name, relativePath, () -> DefaultMainConfig.create() ); if(!c.hasFile) { c.resetToDefault(); } return confMap.put(name, c); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public Config createConfig(String path);", "public Config createConfig(String filename);", "abstract public Config createConfigWithFactory(String path, String factoryPath);", "public static YamlConfiguration createConfig(String name) {\r\n if (!name.endsWith(\".yml\")) {\r\n \tname += \".yml\";\r\n }\r\n \r\n if (plugin.getResource(name) != null){\r\n \tplugin.saveResource(name, false);\r\n \treturn getConfig(name);\r\n } else {\r\n \tFile file = new File(plugin.getDataFolder(),name);\r\n if (!file.exists()) {\r\n plugin.getDataFolder().mkdir();\r\n try {\r\n file.createNewFile();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n return YamlConfiguration.loadConfiguration(file);// returns the newly created configuration object.\r\n }\r\n }", "private void createConfig() {\n try {\n if (!getDataFolder().exists()) {\n getDataFolder().mkdirs();\n }\n File file = new File(getDataFolder(), \"config.yml\");\n if (!file.exists()) {\n getLogger().info(\"config.yml not found :( Creating one with default values...\");\n saveDefaultConfig();\n } else {\n getLogger().info(\"config.yml found :) Loading...\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n\n }", "public static Config createConfig(String path) throws FileNotFoundException {\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n BufferedReader br = new BufferedReader(new FileReader(path));\n\n Config saps = gson.fromJson(br, Config.class);\n return saps;\n }", "public abstract Optional<FileConfiguration> getConfiguration(String name);", "public static XMLConfiguration getXMLConfiguration(String configName, Boolean createIfMissing)\n\t\t\tthrows ConfigurationException, IOException {\n\t\treturn getXMLConfiguration(getDefaultConfigDir(), configName, createIfMissing);\n\t}", "private File createConfigDirIfNecessary(String configName) throws IOException {\n return createConfigDirIfNecessary(configDirPath.toFile(), configName);\n }", "public static YamlConfiguration createPlayerConfig(String name) {\r\n\t\t\tif (!name.endsWith(\".yml\")) {\r\n\t\t\t\tname += \".yml\";\r\n\t\t\t}\r\n\t\t\t\r\n\t File file = new File(plugin.getDataFolder() + File.separator + \"players\", name);\r\n\t if (!file.exists()) {\r\n\t try {\r\n\t file.createNewFile();\r\n\t } catch (IOException e) {\r\n\t \tFPSCaste.log(\"Could not save: \" + name + \", is the disk full?\", Level.WARNING);\r\n\t }\r\n\t }\r\n\t YamlConfiguration playerfile = getPlayerYMLConfig(name);\r\n\t FileConfiguration defaultplayer = getConfig(\"defaultplayer\");\r\n\t \r\n\t for (String key : defaultplayer.getKeys(false)){\r\n\t \tplayerfile.set(key, defaultplayer.get(key));\r\n\t }\r\n\t \r\n\t savePlayerConfig(name, playerfile);\r\n\t return playerfile;\r\n\t\t}", "private static Config loadConfig(String name) {\n\n\t\tString path;\n\t\tif (name == null) {\n\t\t\tpath = \"application.json\";\n\t\t} else {\n\t\t\tpath = \"src/\"+extensionsPackage+\"/\" + name + \"/config.json\";\n\t\t}\n\n\t\tGson gson = new Gson();\n\t\tConfig config = null;\n\n\t\ttry {\n\t\t\tconfig = gson.fromJson(new FileReader(path), Config.class);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn config;\n\t}", "public ConfigData loadConfigFile(String path) {\n ConfigData config = null;\n if (path != null) {\n try {\n String data = loadTextFile(path);\n config = Resources.loadJson(data, ConfigData.class);\n } catch (IOException e) {\n LoggerFactory.getLogger(Resources.class).error(\"Unable to load the config file at \"\n + path + \", creating a default config file.\", e);\n }\n // Create a new config file and save it if none exists.\n if (config == null) {\n config = new ConfigData();\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n String outputData = gson.toJson(config, ConfigData.class);\n try {\n writeData(outputData, path);\n } catch (IOException ex) {\n throw new IOError(ex);\n }\n }\n } else {\n config = new ConfigData();\n }\n\n return config;\n }", "public static XMLConfiguration getXMLConfiguration(String configDir, String configName, Boolean createIfMissing)\n\tthrows ConfigurationException, IOException\n\t{\n\t\treturn getXMLConfiguration(configDir, configName, createIfMissing, false);\n\t}", "private void createConfigFile() {\n\t\tFile configFile = new File(projectRoot, SC_CONFIG_FILENAME);\n\t\tif (configFile.exists())\n\t\t\treturn;\n\n\t\tServiceCutterConfig config = createInitialServiceCutterConfig();\n\t\ttry {\n\t\t\tFileWriter writer = new FileWriter(configFile);\n\t\t\twriter.write(new Yaml().dumpAs(config, Tag.MAP, FlowStyle.BLOCK));\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new ContextMapperApplicationException(\"Could not create '.servicecutter.yml' file!\", e);\n\t\t}\n\t}", "private static File safeOpenFile() throws IOException {\n\t\tPath path = Paths.get(PropertyUtil.getConfigPath() + \"/config\");\n\n\t\tif (!Files.exists(path)) {\n\t\t\tFiles.createDirectories(path.getParent());\n\t\t\tFiles.createFile(path);\n\t\t\tlogger.debug(\"Creating {}\", path.toAbsolutePath());\n\t\t}\n\n\t\treturn path.toFile();\n\t}", "public static YamlConfiguration copy(String name){\r\n\t\t\tif (!name.endsWith(\".yml\")) {\r\n\t\t\t\tname += \".yml\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tYamlConfiguration config = getConfig(name);\r\n\t\t\t\r\n\t\t\t//Does this config exist?\r\n\t\t\tif (config == null){\r\n\t\t\t\tconfig = YamlConfiguration.loadConfiguration(new File(plugin.getDataFolder()+ \"\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tInputStream defaultStream = plugin.getResource(name);\r\n\t\t\t//does the raw config exist?\r\n\t\t\tif (defaultStream != null){\r\n\t\t\t\t\t\r\n\t\t\t\t//laod the stream into a config\r\n\t\t\t\tYamlConfiguration defConfig = YamlConfiguration.loadConfiguration(defaultStream);\r\n\t\t\t\t\t\r\n\t\t\t\t//add the defaults to the config\r\n\t\t\t\tconfig.addDefaults(defConfig);\r\n\t\t\t\t\t\r\n\t\t\t\t//save the config to disk\r\n\t\t\t\tsaveConfig(name, defConfig);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn config;\r\n\t\t}", "private FileObject makeConfigFile(TemplatePair p, NrfConfig configObj){\n ST tmpl_sd = getConfigGroup().getInstanceOf(\"sdk_config\");\n tmpl_sd.add(\"config\", configObj);\n FileObject sdk_config_file = new FileObject();\n sdk_config_file.setSubPath(\"config/\");\n sdk_config_file.setFileName( p.getValue()+\".h\");\n sdk_config_file.setContent(tmpl_sd.render());\n return sdk_config_file;\n }", "public static Configuration get(String fileName) {\n String confLocation = PathUtils.getProjectPath();\n try {\n URL url;\n File file = new File(confLocation, fileName);\n if (confLocation == null || !file.exists()) {\n LOG.info(\"Looking for {} in classpath\", fileName);\n url = ApplicationProperties.class.getClassLoader().getResource(fileName);\n if (url == null) {\n LOG.info(\"Looking for /{} in classpath\", fileName);\n url = ApplicationProperties.class.getClassLoader().getResource(\"/\" + fileName);\n }\n } else {\n url = file.toURI().toURL();\n }\n LOG.info(\"Loading {} from {}\", fileName, url);\n Parameters params = new Parameters();\n FileBasedConfigurationBuilder<FileBasedConfiguration> builder =\n new FileBasedConfigurationBuilder<FileBasedConfiguration>(PropertiesConfiguration.class)\n .configure(params.properties()\n .setURL(url));\n FileBasedConfiguration configuration = builder.getConfiguration();\n logConfiguration(configuration);\n return configuration;\n } catch (Exception e) {\n throw new HiveHookException(\"Failed to load application properties\", e);\n }\n }", "File findConfigFile(String path) {\n\t\tClassLoader cl = PropertiesUtil.class.getClassLoader();\n\t\tURL url = cl.getResource(path);\n\t\tif (url != null) {\n\t\t\treturn new File(url.getFile());\n\t\t}\n\n\t\turl = ClassLoader.getSystemResource(path);\n\t\tif (url != null) {\n\t\t\treturn new File(url.getFile());\n\t\t}\n\n\t\tFile file = new File(path);\n\t\tif (file.exists()) {\n\t\t\treturn file;\n\t\t}\n\n\t\tString newPath = \"conf\" + (path.startsWith(File.separator) ? \"\" : \"/\")\n\t\t\t\t+ path;\n\t\turl = ClassLoader.getSystemResource(newPath);\n\t\tif (url != null) {\n\t\t\treturn new File(url.getFile());\n\t\t}\n\n\t\turl = cl.getResource(newPath);\n\t\tif (url != null) {\n\t\t\treturn new File(url.getFile());\n\t\t}\n\n\t\tnewPath = \"conf\"\n\t\t\t\t+ (path.startsWith(File.separator) ? \"\" : File.separator)\n\t\t\t\t+ path;\n\t\tfile = new File(newPath);\n\t\tif (file.exists()) {\n\t\t\treturn file;\n\t\t}\n\n\t\tnewPath = System.getenv(\"CATALINA_HOME\");\n\t\tif (newPath == null) {\n\t\t\tnewPath = System.getenv(\"CATALINA_BASE\");\n\t\t}\n\n\t\tif (newPath == null) {\n\t\t\tnewPath = System.getProperty(\"catalina.home\");\n\t\t}\n\n\t\tif (newPath == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tfile = new File(newPath + File.separator + \"conf\" + File.separator\n\t\t\t\t+ path);\n\t\tif (file.exists()) {\n\t\t\treturn file;\n\t\t}\n\n\t\treturn null;\n\t}", "private <T> T readConfig(final ConfigurationFactory<T> factory, final String filePath) {\n try (final BufferedReader reader = Files.newBufferedReader(getDataFolder().toPath().resolve(filePath))) {\n return factory.create(YamlConfiguration.loadConfiguration(reader));\n } catch (final IOException e) {\n throw new RuntimeException(String.format(\"Could not read configuration file %s in plugin data-folder\",\n filePath), e);\n }\n }", "public T loadConfig(File file) throws IOException;", "public File createINIFile(String path, String fileName) {\n\t File dir = new File(path);\n\t String newPath = path + \"/\";\n\t if (dir.exists()) {\n\t log.debug(\"createINIFile\", \"DIRECTORY EXISTS\");\n\t } else {\n\t dir.mkdir();\n\t }\n\t newPath = newPath + \"/\";\n\t File newFile = new File(newPath + fileName);\n\t if (!newFile.exists()) {\n\t newFile.setWritable(true);\n\t try {\n\t newFile.createNewFile();\n\t } catch (IOException e) {\n\t log.warn(\"writeKeyValue\", e.getMessage());\n\t }\n\t }\n\t return newFile;\n\t }", "private void GetConfig()\n {\n boolean useClassPath = false;\n if(configFile_ == null)\n {\n useClassPath = true;\n configFile_ = \"data.config.lvg\";\n }\n // read in configuration file\n if(conf_ == null)\n {\n conf_ = new Configuration(configFile_, useClassPath);\n }\n }", "public FileConfiguration loadConfiguration(File file);", "public static YamlConfiguration getConfig(String name) {\r\n if (!name.endsWith(\".yml\")) {\r\n \tname += \".yml\";\r\n\t }\r\n \r\n File file = new File(plugin.getDataFolder(), name);\r\n if (!file.exists()){\r\n\t\t\t\treturn null;\r\n\t\t\t} else {\r\n\t\t\t\treturn YamlConfiguration.loadConfiguration(file);\r\n\t\t\t}\r\n\t\t}", "private void createConfig(File fileName) {\n\t\tthis.getConfig().set(\"Auto-update\", false);\n \n\t\t// setting a String\n\t\tString announcerName = \"&6[&cBroadcast&5Ex&6]&f: \";\n\t\tthis.getConfig().set(\"Announcer Name\", announcerName);\n \n\t\t// setting an int value\n\t\tint Interval = 10;\n\t\tthis.getConfig().set(\"Interval\", Interval);\n \n\t\t// Setting a List of Strings\n\t\t// The List of Strings is first defined in this array\n\t\tList<String> Messages = Arrays.asList(\"Hello World\", \"Powered by BroadcastEx\", \"&dColor codes &fare compatible :)\");\n\t\tthis.getConfig().set(\"Messages\", Messages);\n\t\tthis.saveConfig();\n\t}", "Config set(String path, Object value);", "@Test\n public void testLoadOptionalForceCreate() throws ConfigurationException\n {\n factory.setBasePath(TEST_FILE.getParent());\n CombinedConfiguration config = prepareOptionalTest(\"xml\", true);\n assertEquals(\"Wrong number of configurations\", 1, config\n .getNumberOfConfigurations());\n FileConfiguration fc = (FileConfiguration) config\n .getConfiguration(OPTIONAL_NAME);\n assertNotNull(\"Optional config not found\", fc);\n assertEquals(\"File name was not set\", \"nonExisting.xml\", fc\n .getFileName());\n assertNotNull(\"Base path was not set\", fc.getBasePath());\n }", "Config(InfoHandler info){\n \n this.info = info;\n \n config_list = new ArrayList<>();\n \n File test = new File(config_path);\n \n if(test.exists()){ //plik istnieje\n \n info.mode=1; //wlaczenie trybu dla obslugi pliku konfiguracyjnego\n \n \n //tutaj pobieranie informacji z pliku konfiguracyjnego\n //do ciała funkcji\n \n config_file = new DictReader(config_path,info);\n \n //tutaj dodajemy funkcjonalnosci\n \n config_list.add(config_file.szukaj(\"%imie\"));\n config_list.add(config_file.szukaj(\"%dict_path\"));\n \n config = get_config();\n \n info.mode=0;\n \n is_alive = true;\n }\n else{\n config = new ArrayList<>();\n config_file = new DictReader(config_path,info);\n first_start = 1;\n }\n }", "private void configurate(String name){\r\n\t\tif(viewFolderExists(name)){\r\n\t\t\tString tilesConfigFilePath = \"src/main/resources/spring/config/tiles.xml\";\r\n\t\t\tString messagesConfigFilePath = \"src/main/resources/spring/config/i18n-l10n.xml\";\r\n\t\t\tString fileContent, config, closingTags;\r\n\t\t\tFileManager fileMngr = new FileManager(\"\");\r\n\t\t\t\r\n\t\t\t// Configure i18n&l10n\r\n\t\t\tfileMngr.setFilePath(messagesConfigFilePath);\r\n\t\t\tfileContent = fileMngr.readFile();\r\n\t\t\tconfig = \"<value>/views/\"+name+\"/messages</value>\";\r\n\t\t\tclosingTags = fileContent.substring(fileContent.lastIndexOf(\"</value>\")+8);\r\n\t\t\tfileContent = fileContent.substring(0, fileContent.lastIndexOf(\"</value>\")+8);\r\n\t\t\tfileContent += \"\\n\"+config;\r\n\t\t\tfileContent += closingTags;\r\n\t\t\tfileMngr.writeFile(fileContent);\r\n\t\t\t\r\n\t\t\t// Configure tiles\r\n\t\t\tfileMngr.setFilePath(tilesConfigFilePath);\r\n\t\t\tfileContent = fileMngr.readFile();\r\n\t\t\tconfig = \"<value>/views/\"+name+\"/tiles.xml</value>\";\r\n\t\t\tclosingTags = fileContent.substring(fileContent.lastIndexOf(\"</value>\")+8);\r\n\t\t\tfileContent = fileContent.substring(0, fileContent.lastIndexOf(\"</value>\")+8);\r\n\t\t\tfileContent += \"\\n\"+config;\r\n\t\t\tfileContent += closingTags;\r\n\t\t\tfileMngr.writeFile(fileContent);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tSystem.out.println(\"ERROR: cannot configure folder '\"+name+\"'. It doesn't exists\");\r\n\t\t}\r\n\t}", "Pair<T, U> build(ConfigurationSourceProvider provider, String path) throws IOException, ConfigurationException;", "public static Maestrano configure(String filePath) throws MnoConfigurationException {\n\t\treturn configure(DEFAULT, filePath);\n\t}", "public static Configuration constructFromYamlFile(String path) {\r\n\t\tFileManager fm = new FileManager(path);\r\n\t\t\r\n\t\tString serverAddress = fm.getString(\"server-properties.address\");\r\n\t\tString serverPort = fm.getString(\"server-properties.port\");\r\n\t\t\r\n//\t\tSystem.out.println(serverAddress + \":\" + serverPort);\r\n\t\t\r\n\t\treturn new Configuration(serverAddress, serverPort);\r\n\t}", "public File getConfigurationFile();", "public WorldConfig getWorldConfig(World grabfor) {\n\t\tif (this.SingleWorldConfig != null)\n\t\t\treturn SingleWorldConfig;\n\t\tString worldName = grabfor.getName();\n\n\t\t// if it's not in the hashmap...\n\t\tif (!WorldCfg.containsKey(worldName)) {\n\t\t\t// special code: it's possible a configuration might already exist\n\t\t\t// for this file, so we'll\n\t\t\t// check\n\t\t\tString checkyamlfile = WorldConfig.getWorldConfig(worldName);\n\t\t\t// if it exists...\n\t\t\tif (new File(checkyamlfile).exists()) {\n\t\t\t\t// attempt to load the configuration from the given file.\n\t\t\t\tYamlConfiguration existingcfg = YamlConfiguration.loadConfiguration(new File(checkyamlfile));\n\t\t\t\tYamlConfiguration outConfiguration = new YamlConfiguration();\n\t\t\t\t// place it in the hashmap.\n\t\t\t\tWorldCfg.put(worldName, new WorldConfig(worldName, existingcfg, outConfiguration));\n\t\t\t\t// try to save it. this can error out for who knows what reason.\n\t\t\t\t// If it does, we'll\n\t\t\t\t// squirt the issue to the log.\n\t\t\t\ttry {\n\t\t\t\t\toutConfiguration.save(new File(checkyamlfile));\n\t\t\t\t} catch (IOException iex) {\n\t\t\t\t\tGriefPrevention.instance.getLogger().log(Level.SEVERE, \"Failed to save World Config for world \" + worldName);\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// if the file doesn't exist, then we will go ahead and create a\n\t\t\t\t// new configuration.\n\t\t\t\t// set the input Yaml to default to the template.\n\t\t\t\t// if the template file exists, load it's configuration and use\n\t\t\t\t// the result as useSource.\n\t\t\t\t// Otherwise, we create a blank configuration.\n\t\t\t\tDebugger.Write(\"Failed to find world configuration for World \" + worldName, DebugLevel.Errors);\n\t\t\t\tFile TemplFile = new File(TemplateFile);\n\t\t\t\tFileConfiguration useSource = null;\n\t\t\t\tif (TemplFile.exists()) {\n\t\t\t\t\tuseSource = YamlConfiguration.loadConfiguration(TemplFile);\n\t\t\t\t} else {\n\t\t\t\t\tDebugger.Write(\"Template file \\\"\" + TemplateFile + \" \\\"Not Found.\", DebugLevel.Errors);\n\t\t\t\t\tuseSource = new YamlConfiguration();\n\t\t\t\t}\n\n\t\t\t\t// The target save location.\n\t\t\t\tFileConfiguration Target = new YamlConfiguration();\n\t\t\t\t// place it in the hashmap.\n\t\t\t\tWorldCfg.put(worldName, new WorldConfig(grabfor.getName(), useSource, Target));\n\t\t\t\ttry {\n\t\t\t\t\tTarget.save(new File(checkyamlfile));\n\t\t\t\t} catch (IOException ioex) {\n\t\t\t\t\tGriefPrevention.instance.getLogger().log(Level.SEVERE, \"Failed to write world configuration to \" + checkyamlfile);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t// save target\n\t\t}\n\t\t// after the above logic, we know it's in the hashmap, so return that.\n\t\treturn WorldCfg.get(worldName);\n\n\t}", "default Pair<T, U> build(File file) throws IOException, ConfigurationException {\n return build(new FileConfigurationSourceProvider(), file.toString());\n }", "public ManagedConfiguration createConfiguration() throws SmartFrogException, RemoteException {\n return ManagedConfiguration.createConfiguration(this, true, isClusterRequired(), false);\n }", "public Config(String filename, String defaultConfig) {\n this.filename = filename;\n this.defaultConfig = defaultConfig;\n }", "AuditYamlConfig loadConfig() throws ConfigurationException\n {\n if (hasCustomConfigPath())\n {\n return loadConfigAtCustomPath();\n }\n else if (hasConfigAtDefaultPath())\n {\n return loadConfigAtDefaultPath();\n }\n else\n {\n return AuditYamlConfig.createWithoutFile();\n }\n }", "public String readConfiguration(String path);", "private void loadLocalConfig()\n {\n try\n {\n // Load the system config file.\n URL fUrl = Config.class.getClassLoader().getResource( PROP_FILE );\n config.setDelimiterParsingDisabled( true );\n if ( fUrl == null )\n {\n String error = \"static init: Error, null cfg file: \" + PROP_FILE;\n LOG.warn( error );\n }\n else\n {\n LOG.info( \"static init: found from: {} path: {}\", PROP_FILE, fUrl.getPath() );\n config.load( fUrl );\n LOG.info( \"static init: loading from: {}\", PROP_FILE );\n }\n\n URL fUserUrl = Config.class.getClassLoader().getResource( USER_PROP_FILE );\n if ( fUserUrl != null )\n {\n LOG.info( \"static init: found user properties from: {} path: {}\", USER_PROP_FILE, fUserUrl.getPath() );\n config.load( fUserUrl );\n }\n }\n catch ( org.apache.commons.configuration.ConfigurationException ex )\n {\n String error = \"static init: Error loading from cfg file: [\" + PROP_FILE\n + \"] ConfigurationException=\" + ex;\n LOG.error( error );\n throw new CfgRuntimeException( GlobalErrIds.FT_CONFIG_BOOTSTRAP_FAILED, error, ex );\n }\n }", "private static HisPatientInfoConfiguration loadConfiguration(String filePath) throws HisServiceException{\n File file = new File(filePath);\n if(file != null && file.exists() && file.isFile() ) {\n try {\n configuration = new Yaml().loadAs(new FileInputStream(file), HisPatientInfoConfiguration.class);\n } catch(FileNotFoundException e) {\n log.error(e.getMessage());\n isOK = false;\n throw new HisServiceException(HisServerStatusEnum.NO_CONFIGURATION);\n }\n }\n else {\n isOK = false;\n }\n return configuration;\n }", "public static ConfigServer createConfigServer(String fileConfigjSon){\n\t\tMap<String, String> json = new HashMap<String, String>();\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\n\t\ttry {\n\t\t\tjson = mapper.readValue(new File(fileConfigjSon),\n\t\t\t\t\tnew TypeReference<HashMap<String, String>>() {\n\t\t\t\t\t});\n\t\t} catch (JsonParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (JsonMappingException 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\tint port = Integer.parseInt(json.get(\"Port\"));\n\t\tString logs = json.get(\"LogsPath\");\n\t\tString answers = json.get(\"AnswersPath\");\n\t\tint maxFileSize = Integer.parseInt(json.get(\"MaxFileSize\"));\n\t\tlong comeback = Long.parseLong(json.get(\"Comeback\"));\n\t\t\n\t\treturn new ConfigServer(port, logs, answers, maxFileSize, comeback);\n\t}", "private void generateConfigurationFile() throws IOException {\n // Use a template file to generate the configuration to be used in the sever side\n String srcFileName = \"resources/servlet.config.prop\";\n String destFileName = FIConfiguration.getConfiguration().get(\"SERVLET_CONFIG_FILE\");\n FileUtility fu = new FileUtility();\n fu.setInput(srcFileName);\n fu.setOutput(destFileName);\n String line = null;\n Map<String, String> keyToFileName = getKeyToFileNameMap();\n while ((line = fu.readLine()) != null) {\n for (String key : keyToFileName.keySet()) {\n if (line.startsWith(key)) {\n String value = FIConfiguration.getConfiguration().get(keyToFileName.get(key));\n logger.info(key + \": \" + value);\n // Just need the file only\n File file = new File(value);\n if (!file.exists()) {\n// throw new IllegalStateException(\"Cannot find file for \" + key + \": \" + value);\n logger.error(\"Cannot find file for \" + key + \": \" + value);\n }\n line = assignValue(line, file.getName());\n break;\n }\n }\n // Two special cases\n if (line.startsWith(\"Reactome.src.dbName\") || line.startsWith(\"elv.dbName\")) {\n String value = FIConfiguration.getConfiguration().get(\"REACTOME_SOURCE_DB_NAME\");\n int index = line.indexOf(\"=\");\n line = line.substring(0, index + 1) + \"test_\" + value; // This name pattern should be followed always\n }\n String year = FIConfiguration.getConfiguration().get(\"YEAR\");\n line = line.replaceAll(\"caBigR3WebApp\", \"caBigR3WebApp\" + year);\n fu.printLine(line);\n }\n fu.close();\n }", "private void initConfig() {\n Path walletPath;\n Wallet wallet;\n\n // load a CCP\n Path networkConfigPath; \n \n try {\n \t\n \tif (!isLoadFile) {\n // Load a file system based wallet for managing identities.\n walletPath = Paths.get(\"wallet\");\n wallet = Wallet.createFileSystemWallet(walletPath);\n\n // load a CCP\n networkConfigPath = Paths.get(\"\", \"..\", \"basic-network\", configFile);\n \n builder = Gateway.createBuilder();\n \n \tbuilder.identity(wallet, userId).networkConfig(networkConfigPath).discovery(false);\n \t\n \tisLoadFile = true;\n \t}\n } catch (Exception e) {\n \te.printStackTrace();\n \tthrow new RuntimeException(e);\n }\n\t}", "public static File fileFromPathOrCreate(String path) throws IOException {\n File propFile = new File(path);\n if (!propFile.exists()) {\n propFile.createNewFile();\n }\n return propFile;\n }", "public static File makeOneWorkerConfigFile(final MyriaConfiguration config, final int workerId, final String path)\n throws ConfigFileException {\n\n /* Create the config file. */\n MyriaConfiguration wc = MyriaConfiguration.newConfiguration();\n\n /* Add all nodes. */\n wc.setValue(\"master\", MyriaConstants.MASTER_ID + \"\", config.getHostPort(MyriaConstants.MASTER_ID));\n for (int id : config.getWorkerIds()) {\n wc.setValue(\"workers\", id + \"\", config.getHostPort(id));\n }\n\n /* Set configuration values if provided in config. */\n wc.setValue(\"deployment\", MyriaSystemConfigKeys.DEPLOYMENT_PATH, config.getPath(workerId));\n wc.setValue(\"deployment\", MyriaSystemConfigKeys.DESCRIPTION, config.getRequired(\"deployment\",\n MyriaSystemConfigKeys.DESCRIPTION));\n wc.setValue(\"deployment\", MyriaSystemConfigKeys.WORKER_STORAGE_DATABASE_SYSTEM, config.getOptional(\"deployment\",\n MyriaSystemConfigKeys.WORKER_STORAGE_DATABASE_SYSTEM));\n wc.setValue(\"deployment\", MyriaSystemConfigKeys.USERNAME, config.getOptional(\"deployment\",\n MyriaSystemConfigKeys.USERNAME));\n wc.setValue(\"deployment\", MyriaSystemConfigKeys.ADMIN_PASSWORD, config.getOptional(\"deployment\",\n MyriaSystemConfigKeys.ADMIN_PASSWORD));\n wc.setValue(\"deployment\", MyriaSystemConfigKeys.WORKER_STORAGE_DATABASE_NAME, config\n .getWorkerDatabaseName(workerId));\n wc.setValue(\"deployment\", MyriaSystemConfigKeys.WORKER_STORAGE_DATABASE_PASSWORD, config.getOptional(\"deployment\",\n MyriaSystemConfigKeys.WORKER_STORAGE_DATABASE_PASSWORD));\n wc.setValue(\"deployment\", MyriaSystemConfigKeys.WORKER_STORAGE_DATABASE_PORT, config.getOptional(\"deployment\",\n MyriaSystemConfigKeys.WORKER_STORAGE_DATABASE_PORT));\n wc.setValue(\"runtime\", MyriaSystemConfigKeys.WORKER_IDENTIFIER, workerId + \"\");\n config.copyRuntimeConfigs(wc);\n\n try {\n File workerDir = Files.createDirectories(Paths.get(path, \"workers\", workerId + \"\")).toFile();\n wc.write(new File(Paths.get(path, \"workers\", workerId + \"\", MyriaConstants.WORKER_CONFIG_FILE).toString()));\n return workerDir;\n } catch (IOException e) {\n throw new ConfigFileException(e);\n }\n }", "public static YamlConfiguration getPlayerYMLConfig(String name) {\r\n\t\t\tif (!name.endsWith(\".yml\")) {\r\n\t\t\t\tname += \".yml\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tFile file = new File(plugin.getDataFolder() + File.separator + \"players\", name);\r\n\t\t\t\r\n\t\t\tif (!file.exists()){\r\n\t\t\t\treturn createPlayerConfig(name);\r\n\t\t\t} else {\r\n\t\t\t\treturn YamlConfiguration.loadConfiguration(file);\r\n\t\t\t}\r\n\t\t}", "public Config(String filename) {\n this.filename = filename;\n }", "public BuilderWorkspace(String config_file, boolean create,GlycanRenderer glycanRenderer) {\n\t\tsuper(false);\n\t\tcommonInit(config_file,create,glycanRenderer);\n\t}", "protected static void loadConfig(String confPath) {\r\n\t\tInputStream in = getRelativeFileStream(confPath);\r\n\t\t\r\n\t\tif(in != null) {\r\n\t\t\ttry {\r\n\t\t\t\tprop.load(in);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tlog.error(\"error while load prop dataa from conf: \" + confPath);\r\n\t\t\t}\r\n\t\t} else if(log.isDebugEnabled()) {\r\n\t\t\tlog.debug(\"no corresponding conf file, skip to setup configuraiton for file path: \" + confPath);\r\n\t\t}\r\n\t}", "private static File getUserFolderConfFile() {\n String confFileName = UserPreferences.getAppName() + CONFIG_FILE_EXTENSION;\n File userFolder = PlatformUtil.getUserDirectory();\n File userEtcFolder = new File(userFolder, ETC_FOLDER_NAME);\n if (!userEtcFolder.exists()) {\n userEtcFolder.mkdir();\n }\n return new File(userEtcFolder, confFileName);\n }", "public static XMLConfiguration getNewXMLConfiguration(String configName) throws ConfigurationException, IOException{\n\t\tif (configList.containsKey(configName)){\n\t\t\tconfigList.remove(configName);\n\t\t}\n\t\treturn getXMLConfiguration(configName);\n\t}", "private void loadConfiguration(ServletConfig cfg, String name) throws DriverException {\r\n try {\r\n String path = cfg.getServletContext().getRealPath(\"/WEB-INF/\" + name + \".properties\");\r\n FileInputStream fis = new FileInputStream(path);\r\n Service.CONFIGURATION.load(fis);\r\n } catch (Throwable e) {\r\n throw new DriverException(this, \"Unable to load configuration file\", e);\r\n }\r\n }", "public boolean configure(String name, Map<String, Object> params) throws ConfigurationException;", "abstract public Config createConfigFromString(String data);", "private final void config() {\n\t\tfinal File configFile = new File(\"plugins\" + File.separator\n\t\t\t\t+ \"GuestUnlock\" + File.separator + \"config.yml\");\n\t\tif (!configFile.exists()) {\n\t\t\tthis.plugin.saveDefaultConfig();\n\t\t\tMain.INFO(\"Created default configuration-file\");\n\t\t}\n\t}", "@Override\n public String getDefaultConfig(Log log) throws CommandLineException {\n File defaultCfg = null;\n if (DEFAULT_CONFIG_FILE.equals(defaultConfigFile)) {\n final String conf = ExecutionUtils.executeCommand(log, \"\\\"\" + this.executable + \"\\\" -V SERVER_CONFIG_FILE\");\n final Pattern pattern = Pattern.compile(\"^\\\\s*-D\\\\s*SERVER_CONFIG_FILE=\\\"(.*)?\\\"$\");\n final Matcher matcher = pattern.matcher(conf);\n final String result = matcher.group(1);\n defaultCfg = new File(result);\n if (defaultCfg.isAbsolute()) {\n if (defaultCfg.exists()) {\n return ConfigUtils.readConfigFile(defaultCfg);\n }\n } else {\n final String exec = ExecutionUtils.searchExecutable(log, this.executable);\n if (exec != null) {\n final File execFile = new File(exec);\n File execDir = execFile.getParentFile();\n if (\"bin\".equals(execDir.getName())) {\n execDir = execDir.getParentFile();\n }\n File confDir = new File(execDir, \"conf\");\n if (!confDir.exists()) {\n confDir = execDir;\n }\n defaultCfg = new File(confDir, \"httpd.conf\");\n if (defaultCfg.exists()) {\n return ConfigUtils.readConfigFile(defaultCfg);\n }\n }\n }\n } else {\n defaultCfg = new File(this.defaultConfigFile);\n if (defaultCfg.exists()) {\n return ConfigUtils.readConfigFile(defaultCfg);\n }\n }\n return null;\n }", "private static File findConfigFile(String fileName, File specificFile, boolean giveConfigDirPrecedence) {\n File f = new File(configDirectory, fileName);\n\n if (giveConfigDirPrecedence) {\n if (configDirectory != null && f.exists()) {\n return f;\n }\n if (specificFile != null && specificFile.exists()) {\n return specificFile;\n }\n } else {\n if (specificFile != null && specificFile.exists()) {\n return specificFile;\n }\n if (configDirectory != null && f.exists()) {\n return f;\n }\n }\n\n return null;\n }", "private void createFileHierarchie() throws IOException {\r\n\t\tlog.debug(\"START: SBIWebServer.createFileHierarchie\");\r\n\t\t// Create logs directory if not exist\r\n\t\tPath logPath = Paths.get(DEFAULT_LOG_LOCATION);\r\n\t\tif (!Files.exists(logPath)) {\r\n\t\t\tFiles.createDirectory(Paths.get(DEFAULT_LOG_LOCATION));\r\n\t\t\tlog.debug(\"Directory \"+DEFAULT_LOG_LOCATION+\" created\");\r\n\t\t}else {\r\n\t\t\tlog.debug(\"Directory \"+DEFAULT_LOG_LOCATION+\" already exists\");\r\n\t\t}\r\n\t\t\r\n\t\t// Create default server.xml\r\n\t\tPath serverConfigPath = Paths.get(CONFIG_SERVER_LOCATION);\r\n\t\tif (!Files.exists(serverConfigPath)) {\r\n\t\t\tXmlServerConfig xml = ConfigurationFactory.createDefaultXmlServerConfig();\r\n\t\t\ttry {\r\n\t\t\t\tXmlHelper.storeXml(xml, new File(CONFIG_SERVER_LOCATION));\r\n\t\t\t\tlog.debug(\"File \"+CONFIG_SERVER_LOCATION+\" created\");\r\n\t\t\t} catch (JAXBException e) {\r\n\t\t\t\tlog.error(\"Cannot store \"+CONFIG_SERVER_LOCATION,e);\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tlog.debug(\"File \"+CONFIG_SERVER_LOCATION+\" already exists\");\r\n\t\t}\r\n\t\tlog.debug(\"END: SBIWebServer.createFileHierarchie\");\r\n\t}", "void addConfigFile(final String filename, final boolean required);", "public synchronized static void writeConfiguration(PhotoConfiguration config) throws IOException {\r\n\t\t\r\n\t\tlog.info(\"Updating config\"); //$NON-NLS-1$\r\n\t\t\r\n\t\tFile internalConfigFile = getInternalConfigurationFile(config.pathToApplication);\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tPropertiesConfiguration configurationFile = new PropertiesConfiguration(internalConfigFile);\r\n\t\t\tconfigurationFile.setProperty( PhotoConfigurationConstants.PATH_TO_IMAGES_KEY , config.getPathToImages() );\r\n\t\t\tconfigurationFile.setProperty( PhotoConfigurationConstants.PHOTO_FILE_FACTORY_CLASS_NAME_KEY , config.getPhotoFactoryClass() );\r\n\t\t\tconfigurationFile.setProperty( PhotoConfigurationConstants.PHOTO_USER_FACTORY_CLASS_NAME_KEY , config.getPhotoUserFactoryClass() );\r\n\t\t\tconfigurationFile.setProperty( PhotoConfigurationConstants.JDBC_DRIVER_KEY , config.getJDBCDriverName() );\r\n\t\t\tconfigurationFile.setProperty( PhotoConfigurationConstants.JDBC_CONNECTION_URL_KEY , config.getJDBCConnectionUrl() );\r\n\t\t\tconfigurationFile.setProperty( PhotoConfigurationConstants.DATABASE_LOGIN_KEY , config.getJDBCLogin() );\r\n\t\t\tconfigurationFile.setProperty( PhotoConfigurationConstants.DATABASE_PASSWORD_KEY , config.getJDBCPassword() );\r\n\t\t\tconfigurationFile.save();\r\n\t\t\t\r\n\t\t\tFile configFile = getConfigurationFile(config);\r\n\t\t\tconfigurationFile = new PropertiesConfiguration(configFile);\r\n\t\t\tif ( !configFile.exists()) {\r\n\t\t\t\tlog.info(\"Properties file not found; creating\"); //$NON-NLS-1$\r\n\t\t\t} \r\n\t \r\n\t configurationFile.setProperty( PhotoConfigurationConstants.DEFAULT_THEME_KEY, config.getDefaultTheme());\r\n\t configurationFile.setProperty( PhotoConfigurationConstants.DEFAULT_COLUMNS_KEY, config.getDefaultColumns());\r\n\t configurationFile.setProperty( PhotoConfigurationConstants.DEFAULT_GROUP_KEY, config.getDefaultGroup()); \r\n\t configurationFile.setProperty( PhotoConfigurationConstants.USER_TIMEOUT_KEY, config.getUserTimeout());\r\n\t configurationFile.setProperty( PhotoConfigurationConstants.SUPPORTED_LOCALES_KEY, config.getSupportedLocales()); \r\n\t configurationFile.setProperty( PhotoConfigurationConstants.IMAGE_TIMEOUT_KEY, config.getImageTimeout());\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t configurationFile.setProperty( PhotoConfigurationConstants.SMTP_SERVER_KEY, config.getSMTPServer());\r\n\t configurationFile.setProperty( PhotoConfigurationConstants.ADMINISTRATOR_EMAIL_NAME_KEY, config.getAdminEMailName());\r\n\t configurationFile.setProperty( PhotoConfigurationConstants.ADMINISTRATOR_EMAIL_KEY, config.getAdminEMailAdress());\r\n\t configurationFile.setProperty( PhotoConfigurationConstants.SECURITY_MODE_KEY, config.isSecurityMode());\r\n\t configurationFile.save();\r\n\t \r\n\t\t} catch (ConfigurationException e) {\r\n\t\t\tthrow new IOException(PhotoConstants.CONFIG_IO_ERROR);\r\n\t\t}\r\n\t}", "private File getConnConfigFile(){\n\t\tFile f = new File(getHomeDir(),filename);\n\t\treturn f;\n\t}", "void writeConfiguration(String fileName) throws IOException;", "public abstract CONFIG build();", "@Test\n public void testLoadConfigurationFromFileName()\n throws ConfigurationException\n {\n factory = new DefaultConfigurationBuilder(TEST_FILE.getAbsolutePath());\n checkConfiguration();\n }", "@SneakyThrows\n public static AgentConfig createAgentConfig(final String filename) {\n if (Objects.isNull(filename)) {\n return new AgentConfig();\n }\n try (InputStream inputStream = new FileInputStream(filename)) {\n return YAML_MAPPER.readValue(inputStream, AgentConfig.class);\n }\n }", "public static YamlConfiguration saveConfig(String name, YamlConfiguration config) {\r\n if (!name.endsWith(\".yml\")) {\r\n \tname += \".yml\";\r\n }\r\n \r\n try {\r\n config.save(plugin.getDataFolder() + File.separator + name);\r\n } catch (IOException e) {\r\n FPSCaste.log(\"Could not save: \" + name + \", is the disk full?\", Level.WARNING);\r\n }\r\n return config;\r\n }", "@Test\n public void testSetConfigurationBasePath() throws ConfigurationException\n {\n factory.addProperty(\"properties[@fileName]\", \"test.properties\");\n File deepDir = new File(ConfigurationAssert.TEST_DIR, \"config/deep\");\n factory.setConfigurationBasePath(deepDir.getAbsolutePath());\n\n Configuration config = factory.getConfiguration(false);\n assertEquals(\"Wrong property value\", \"somevalue\", config\n .getString(\"somekey\"));\n }", "public static PullConfiguration loadFromFile(String path) {\n Log log = LogFactory.getLog(PullConfiguration.class);\n PullConfiguration pullCfg = null;\n \n log.debug(\"Loading pulling configuration from XML document in \" + path);\n \n File f = new File(path);\n \n if (f.exists() && f.canRead()) {\n Serializer serializer = new Persister();\n try {\n pullCfg = serializer.read(PullConfiguration.class, f);\n log.debug(\"Loaded configuration\");\n } catch (Exception ex) {\n log.error(\"Error while reading configuration from \" + path + \"! Details: \" + ex.getMessage());\n }\n } else\n log.error(\"Unable to access configuration file\" + path + \"!\");\n \n \n return pullCfg;\n }", "public Configuration(File configFile) {\r\n \t\tproperties = loadProperties(configFile);\r\n \t}", "public Config(File confDir, Properties props) throws IOException {\n FileInputStream input = new FileInputStream(new File(confDir, PROPERTIES_FILE));\n Properties p = new Properties();\n p.load(input);\n entries = new Properties(p); // Set the file values as defaults for our properties\n // Now copy in our passed in properties\n for (String key : props.stringPropertyNames()) entries.setProperty(key, props.getProperty(key));\n input.close();\n }", "public void setConfigfile (File file)\n {\n _configfile = file;\n }", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Configuration createConfiguration();", "protected static File getInternalConfigurationFile(String pathToApplication) {\r\n\t\t\r\n\t\tString configPath = PhotoConstants.PROPERTIES_PATH;\r\n\t\tString configFileName = PhotoConstants.SETUP_FILE;\r\n\t\t\r\n\t\t// read configuration\r\n\t\tFile configDir = new File(pathToApplication, configPath);\r\n\t\tFile configFile = new File (configDir, configFileName);\r\n\t\treturn configFile;\r\n\t}", "public static PhotoConfiguration readConfiguration( String pathToApplication ) throws PhotoException {\r\n\r\n\t\tif (log.isDebugEnabled())\r\n\t\t\tlog.debug(\"Attempting to read internal configuration\"); //$NON-NLS-1$\r\n\t\t\r\n\t\tFile file = getInternalConfigurationFile(pathToApplication);\r\n\t\tif (!file.exists()) {\r\n\t\t\tlog.error(PhotoConstants.FILE_NOT_FOUND_ERROR+\", \"+file.getName());\r\n\t\t\tthrow new PhotoException(PhotoConstants.FILE_NOT_FOUND_ERROR);\r\n\t\t}\r\n\t\t\r\n\t\t// Internal configuration\r\n\t\tPhotoConfiguration config = new PhotoConfiguration();\r\n\t\tPropertiesConfiguration configFile = null;\r\n\t\ttry {\r\n\t\t\tconfigFile = new PropertiesConfiguration(file);\r\n\t\t} catch (ConfigurationException e) {\r\n\t\t\tlog.error(\"Error reading internal properties\");\r\n\t\t\tthrow new PhotoException(PhotoConstants.CONFIG_IO_ERROR);\r\n\t\t}\r\n\t\t\r\n\t\tconfig.pathToApplication = pathToApplication;\r\n\t\t\r\n\t\tString pathToImages = configFile.getString(PhotoConfigurationConstants.PATH_TO_IMAGES_KEY);\r\n\t\tif (pathToImages != null)\r\n\t\t\tconfig.pathToImages = pathToImages;\r\n\t\t\r\n\t\tString photoFactoryClass = configFile.getString(PhotoConfigurationConstants.PHOTO_FILE_FACTORY_CLASS_NAME_KEY);\r\n\t\tif (photoFactoryClass != null)\r\n\t\t\tconfig.photoFactoryClass = photoFactoryClass;\r\n\t\t\r\n\t\tString photoUserFactoryClass = configFile.getString(PhotoConfigurationConstants.PHOTO_USER_FACTORY_CLASS_NAME_KEY);\r\n\t\tif (photoUserFactoryClass != null)\r\n\t\t\tconfig.photoUserFactoryClass = photoUserFactoryClass;\r\n\r\n\t\tif (config.photoUserFactoryClass.endsWith(\"JDBCPhotoUserFactory\")) {\r\n\t\t\tString jdbcConnectionURL = configFile.getString(PhotoConfigurationConstants.JDBC_CONNECTION_URL_KEY);\r\n\t\t\tif (jdbcConnectionURL != null)\r\n\t\t\t\tconfig.jdbcConnectionURL = jdbcConnectionURL;\r\n\t\t\t\t\t\t\r\n\t\t\tString jdbcDriverName = configFile.getString(PhotoConfigurationConstants.JDBC_DRIVER_KEY);\r\n\t\t\tif (jdbcDriverName != null)\r\n\t\t\t\tconfig.jdbcDriverName = jdbcDriverName;\r\n\t\t\t\t\r\n\t\t\tString jdbcLogin = configFile.getString(PhotoConfigurationConstants.DATABASE_LOGIN_KEY);\r\n\t\t\tif (jdbcLogin != null)\r\n\t\t\t\tconfig.jdbcLogin = jdbcLogin;\r\n\t\t\t\t\t\t\r\n\t\t\tString jdbcPassword = configFile.getString(PhotoConfigurationConstants.DATABASE_PASSWORD_KEY);\r\n\t\t\tif (jdbcPassword != null)\r\n\t\t\t\tconfig.jdbcPassword = jdbcPassword;\r\n\t\t} \r\n\t\t\r\n\t\treadInternalConfiguration(config);\r\n\t\treturn config;\r\n\t}", "private static Path getConfig(String modName)\n\t{\n\t\treturn Paths.get(\"config\"+File.separator+modName+\".cfg\").toAbsolutePath();\n\t}", "private File getConfigurationFile() {\n return new File(BungeeBan.getInstance().getDataFolder(), this.filename);\n }", "void init (Map<String, String> conf) throws ConfigException;", "@Override\n public Map<String, LocalResource> prepareAMAndConfigForLaunch(HoyaFileSystem hoyaFileSystem,\n Configuration serviceConf,\n ClusterDescription clusterSpec,\n Path originConfDirPath,\n Path generatedConfDirPath,\n Configuration clientConfExtras,\n String libdir,\n Path tempPath) throws\n IOException,\n HoyaException {\n log.debug(\"Loading template configuration from {}\", originConfDirPath);\n Configuration siteConf = ConfigHelper.loadTemplateConfiguration(\n serviceConf,\n originConfDirPath,\n HBaseKeys.SITE_XML,\n HBaseKeys.HBASE_TEMPLATE_RESOURCE);\n \n if (log.isDebugEnabled()) {\n log.debug(\"Configuration came from {}\",\n siteConf.get(HoyaXmlConfKeys.KEY_HOYA_TEMPLATE_ORIGIN));\n ConfigHelper.dumpConf(siteConf);\n }\n //construct the cluster configuration values\n Map<String, String> clusterConfMap = buildSiteConfFromSpec(clusterSpec);\n \n //merge them\n ConfigHelper.addConfigMap(siteConf,\n clusterConfMap.entrySet(),\n \"HBase Provider\");\n\n //now, if there is an extra client conf, merge it in too\n if (clientConfExtras != null) {\n ConfigHelper.mergeConfigurations(siteConf, clientConfExtras,\n \"Hoya Client\");\n }\n \n if (log.isDebugEnabled()) {\n log.debug(\"Merged Configuration\");\n ConfigHelper.dumpConf(siteConf);\n }\n\n Path sitePath = ConfigHelper.saveConfig(serviceConf,\n siteConf,\n generatedConfDirPath,\n HBaseKeys.SITE_XML);\n\n log.debug(\"Saving the config to {}\", sitePath);\n Map<String, LocalResource> providerResources;\n providerResources = hoyaFileSystem.submitDirectory(generatedConfDirPath,\n HoyaKeys.PROPAGATED_CONF_DIR_NAME);\n\n addHBaseDependencyJars(providerResources, hoyaFileSystem,libdir, tempPath);\n\n return providerResources;\n }", "void configure(String name, Map<String, Object> configuration);", "public void setWorldFile(File newFile) {\n File configDirectory = new File(newFile,CONFIG_DIRECTORY);\n configDirectory.mkdir();\n\n String configName = generalConfigFile.getPath();\n String generalConfigDirectoryName = generalConfigFile.getParentFile().getPath();\n String detailName = configName.substring(generalConfigDirectoryName.length()+1);\n //logger.info(\"Filename \"+detailName);\n File localConfigFile = new File(configDirectory,detailName);\n setWorldConfigFile(localConfigFile);\n }", "public static void configItem(String name, boolean value) {\n openMinorTag(\"conf\");\n attribute(\"name\",name);\n attribute(\"value\",value);\n closeMinorTag();\n }", "private void setConfiguration() throws IOException{\n\t\tString confPath = \"mapreduce.conf\";\n\t\tFileInputStream fis = new FileInputStream(confPath);\n\t\tthis.load(fis);\n\t\tfis.close();\n\t}", "@Test\n\tpublic void testLoadExistingConfig() throws IOException\n\t{\n\t\tFileWriter out = new FileWriter(outfile, true);\n\t\tout.write(\"\\nTestEntry=TestData\");\n\t\tout.close();\n\t\t\n\t\t// Creating it again forces it to read the modified config\n\t\tproperties = new Configuration(outfile);\n\t\t\n\t\tassertEquals(\"TestData\", properties.get(\"TestEntry\"));\n\t}", "private void init() throws IOException {\n if (Files.exists(getBaseConfigPath()) && !Files.isDirectory(getBaseConfigPath())) {\n throw new IOException(\"Base config path exists and is not a directory \" + getBaseConfigPath());\n }\n\n if (!Files.exists(getBaseConfigPath())) {\n Files.createDirectories(getBaseConfigPath());\n }\n\n\n if (Files.exists(nodeIdPath) && !Files.isRegularFile(nodeIdPath)) {\n throw new IOException(\"NodeId file is not a regular directory!\");\n }\n\n if (Files.exists(clusterNamePath) && !Files.isRegularFile(clusterNamePath)) {\n throw new IOException(\"Cluster name is not a regular directory!\");\n }\n\n if (!Files.isWritable(getBaseConfigPath())) {\n throw new IOException(\"Can't write to the base configuration path!\");\n }\n }", "@Override\n protected void createConfigurationFile(Properties connectionProperties)\n {\n connectionPoolConfiguration.setDriverClassName(CPTADatabaseConstants.DB_POSTGRES_DRIVER_PROPERTY_VALUE);\n \n // Let super class do the rest\n super.createConfigurationFile(connectionProperties);\n }", "public C build() {\n if (configs.isEmpty()) {\n throw new RuntimeException(\"There should be at least one configuration provided\");\n }\n\n // Handling config files\n ConfigSource firstConfigSource = configs.get(0);\n Config firstConfigOrig = getConfigSupplier(firstConfigSource).getConfig();\n if (!(supportedConfig.isInstance(firstConfigOrig))) {\n throw new RuntimeException(\n String.format(\n \"Config is not of parameterized type %s, got instead %s\",\n supportedConfig.getName(), firstConfigOrig.getClass().getName()));\n }\n C firstConfig = (C) firstConfigOrig;\n for (int i = 1; i < configs.size(); ++i) {\n ConfigSource nextConfigSource = configs.get(i);\n Config nextConfig = getConfigSupplier(nextConfigSource).getConfig();\n try {\n firstConfig = copyProperties(firstConfig, nextConfig);\n } catch (Exception ex) {\n throw new RuntimeException(\n String.format(\"Failed to merge config %s into main config\", nextConfigSource), ex);\n }\n }\n\n // Handling string pathValue pairs config overrides\n for (Pair<String, Object> pathValue : pathValueOverrides) {\n try {\n PropertyUtils.setNestedProperty(firstConfig, pathValue.getValue0(), pathValue.getValue1());\n } catch (Exception e) {\n throw new RuntimeException(\n String.format(\n \"Cannot override property %s with value %s\",\n pathValue.getValue0(), pathValue.getValue1()),\n e);\n }\n }\n\n return firstConfig;\n }", "private OpenApiHandlerConfig(String configName) {\n config = Config.getInstance();\n mappedConfig = config.getJsonMapConfigNoCache(configName);\n setConfigData();\n setConfigMap();\n }", "public static void configItem(String name, String value) {\n openMinorTag(\"conf\");\n attribute(\"name\",name);\n attribute(\"value\",value);\n closeMinorTag();\n }", "@Override\n public File createFile(String path) throws IOException {\n String pathStr=path+fileSeparator+\"Mail.json\";\n File file = new File(pathStr);\n file.createNewFile();\n return file;\n }", "public static void saveMapConfig(String name, FileConfiguration config) {\r\n if (!name.endsWith(\".yml\")) {\r\n \tname += \".yml\";\r\n }\r\n \r\n File file = new File(plugin.getDataFolder() + File.separator + \"maps\", name);\r\n try {\r\n config.save(file);\r\n } catch (IOException e) {\r\n \tFPSCaste.log(\"Could not save map: \" + name + \", is the disk full?\", Level.WARNING);\r\n }\r\n\t\t}", "public BotConfig(Path dir) {\n\t\tthis.dir = dir;\n\t\tif (!(Files.exists(dir) && Files.isDirectory(dir))) {\n\t\t\tif (!Files.exists(dir)) {\n\t\t\t\ttry {\n\t\t\t\t\tFiles.createDirectories(dir);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tlog.error(\"Could not create config directory \" + dir, e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlog.error(\"File exists at config directory path {}\", dir);\n\t\t\t}\n\t\t}\n\t\tthis.guilds = new ConcurrentHashMap<>();\n\t\tGson gson = new Gson();\n\t\tPath systemsFile = dir.resolve(SYSTEMS_FILE);\n\t\tif (Files.exists(systemsFile)) {\n\t\t\ttry (var reader = Files.newBufferedReader(systemsFile)) {\n\t\t\t\tthis.systemsConfig = gson.fromJson(reader, SystemsConfig.class);\n\t\t\t\tlog.info(\"Loaded systems config from {}\", systemsFile);\n\t\t\t} catch (JsonSyntaxException e) {\n\t\t\t\tlog.error(\"Invalid JSON found! Please fix or remove config file \" + systemsFile + \" and restart.\", e);\n\t\t\t\tthrow e;\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new UncheckedIOException(e);\n\t\t\t}\n\t\t} else {\n\t\t\tlog.info(\"No systems config file found. Creating an empty one at {}\", systemsFile);\n\t\t\tthis.systemsConfig = new SystemsConfig();\n\t\t\tthis.flush();\n\t\t}\n\t}", "public static void loadConfig(Game game, String configName) {\n File configDirectory = new File(\"config\");\n configDirectory.mkdir();\n try {\n FileInputStream fileInputStream = new FileInputStream(configDirectory + File.separator + configName\n + \".ini\");\n Properties properties = new Properties();\n properties.load(fileInputStream);\n game.getPlayer().setName(properties.getProperty(\"playerName\"));\n game.getPlayer().setMaxHitPoints(Integer.parseInt(properties.getProperty(\"playerMaxHealth\")));\n game.getPlayer().setHitPoints(Integer.parseInt(properties.getProperty(\"playerHealth\")));\n game.getPlayer().setAttackPoints(Integer.parseInt(properties.getProperty(\"playerAttack\")));\n game.getPlayer().setGold(Integer.parseInt(properties.getProperty(\"playerGold\")));\n System.out.println(\"The \" + configName + \" config was loaded successfully!\");\n fileInputStream.close();\n } catch (FileNotFoundException e) {\n System.out.println(\"File could not be found!\");\n } catch (IOException e) {\n System.out.println(\"Could not read from file!\");\n }\n }", "public ConfigBuilder addConfigOverride(String path, Object value) {\n pathValueOverrides.add(Pair.with(path, value));\n return this;\n }", "public void loadConfig(){\n this.saveDefaultConfig();\n //this.saveConfig();\n\n\n }", "protected static ILaunchConfiguration createConfiguration(\n\t\t\tIProject phpProject, String phpPathString,\n\t\t\tString phpFileFullLocation, PHPexeItem defaultEXE,\n\t\t\tILaunchConfigurationType configType, IResource res)\n\t\t\tthrows CoreException {\n\t\tILaunchConfiguration config = null;\n\t\tILaunchConfigurationWorkingCopy wc = configType.newInstance(null,\n\t\t\t\tgetNewConfigurationName(phpPathString));\n\n\t\t// Set the delegate class according to selected executable.\n\t\twc.setAttribute(PHPDebugCorePreferenceNames.PHP_DEBUGGER_ID, defaultEXE\n\t\t\t\t.getDebuggerID());\n\t\tAbstractDebuggerConfiguration debuggerConfiguration = PHPDebuggersRegistry\n\t\t\t\t.getDebuggerConfiguration(defaultEXE.getDebuggerID());\n\t\twc.setAttribute(\n\t\t\t\tPHPDebugCorePreferenceNames.CONFIGURATION_DELEGATE_CLASS,\n\t\t\t\tdebuggerConfiguration.getScriptLaunchDelegateClass());\n\t\twc.setAttribute(IPHPDebugConstants.ATTR_FILE, phpPathString);\n\t\twc.setAttribute(IPHPDebugConstants.ATTR_FILE_FULL_PATH,\n\t\t\t\tphpFileFullLocation);\n\t\twc.setAttribute(IPHPDebugConstants.ATTR_EXECUTABLE_LOCATION, defaultEXE\n\t\t\t\t.getExecutable().getAbsolutePath().toString());\n\t\tString iniPath = defaultEXE.getINILocation() != null ? defaultEXE\n\t\t\t\t.getINILocation().toString() : null;\n\t\twc.setAttribute(IPHPDebugConstants.ATTR_INI_LOCATION, iniPath);\n\t\twc.setAttribute(IPHPDebugConstants.RUN_WITH_DEBUG_INFO, PHPDebugPlugin\n\t\t\t\t.getDebugInfoOption());\n\t\twc.setAttribute(IDebugParametersKeys.FIRST_LINE_BREAKPOINT,\n\t\t\t\tPHPProjectPreferences.getStopAtFirstLine(phpProject));\n\t\tif (res != null) {\n\t\t\twc.setMappedResources(new IResource[] { res });\n\t\t}\n\t\tconfig = wc.doSave();\n\n\t\treturn config;\n\t}", "public void saveConfig(String name) {\n\t\ttry {\n\t\t\tsaveXMLConfig(name);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "String getConfigFileName();", "public static void configure(File file) {\r\n Properties prop = new Properties();\r\n FileInputStream in = null;\r\n try {\r\n in = new FileInputStream(file);\r\n prop.load(in);\r\n in.close();\r\n Configuration.configure(prop);\r\n } catch (IOException e) {\r\n LogManager.getLogger(Configuration.class).error(\"While reading configuration file \" \r\n + file.getAbsolutePath() + \": \" + e.getMessage());\r\n if (null != in) {\r\n try {\r\n in.close();\r\n } catch (IOException e1) {\r\n // ignore\r\n }\r\n }\r\n }\r\n }" ]
[ "0.72364193", "0.6966222", "0.6474941", "0.6398433", "0.5856209", "0.57996106", "0.56889725", "0.5621518", "0.55570865", "0.5524084", "0.53664076", "0.5363719", "0.533898", "0.5337013", "0.5270835", "0.5206899", "0.5150831", "0.51473784", "0.5120211", "0.50775623", "0.50736654", "0.50591373", "0.5056127", "0.50509965", "0.5044528", "0.50428146", "0.5033281", "0.5019991", "0.50010324", "0.4962396", "0.49568424", "0.4926697", "0.48950076", "0.48822284", "0.48245642", "0.48234785", "0.48207253", "0.48093253", "0.4797314", "0.47911137", "0.47816297", "0.47691494", "0.4759914", "0.47546035", "0.47544277", "0.47295862", "0.47186697", "0.4691243", "0.46568853", "0.4654322", "0.4647819", "0.46458995", "0.46395606", "0.4639332", "0.4608304", "0.4599723", "0.4599322", "0.4590276", "0.45846188", "0.4579866", "0.45748842", "0.4574717", "0.4561979", "0.45596662", "0.45541203", "0.45520532", "0.4550915", "0.45469812", "0.45410842", "0.45400313", "0.45385063", "0.4526009", "0.452217", "0.45134896", "0.4506852", "0.45044306", "0.45010865", "0.44982877", "0.44970456", "0.4480702", "0.44768646", "0.44749776", "0.44663137", "0.44571522", "0.44523555", "0.44507363", "0.4450377", "0.44485134", "0.44475883", "0.4445396", "0.44295514", "0.44253346", "0.44105786", "0.4410311", "0.440377", "0.4402694", "0.438934", "0.43818974", "0.4373845", "0.43645868" ]
0.8441745
0
Function show options when Admin login
public static int adminFirstPage(){ Scanner inputone = new Scanner(System.in); System.out.println("Admin Menu Options"); System.out.println("=================="); System.out.println("0 - Quit"); System.out.println("1 - Add Shares"); System.out.println("2 - Update Share price"); System.out.println("3 - Update Share quantity"); System.out.println("4 - Update Transaction Charge "); System.out.println("5 - Update STT"); System.out.println("Enter Option : "); int adminchoice = inputone.nextInt(); return adminchoice; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void viewOptions() {\n\t\tlog.info(\"Enter 0 to Exit.\");\n\t\tlog.info(\"Enter 1 to Login.\");\n\t}", "public static void ShowAdminPreferences() {\n if (Controller.permission.GetUserPermission(\"EditUser\")) {\n ToggleVisibility(UsersPage.adminWindow);\n } else {\n DialogWindow.NoAccessTo(\"Admin options\");\n }\n }", "public static void listMainMenuOptions(){\n\t\tSystem.out.println(\"\\nWelcome to Vet Clinic Program. Please choose an option from the list below.\\n\");\n\t\tSystem.out.println(\"1: List all staff.\");\n\t\tSystem.out.println(\"2: List staff by category.\");\n\t\tSystem.out.println(\"3: List admin Staff performing a task.\");\n\t\tSystem.out.println(\"4: Search for a specific member of staff by name.\");\n\t\tSystem.out.println(\"5: List all animals.\");\n\t\tSystem.out.println(\"6: List animals by type.\");\n\t\tSystem.out.println(\"7: Search for a specific animal by name.\");\n\t\tSystem.out.println(\"8: See the Queue to the Veterinary\");\n\t\tSystem.out.println(\"9: Exit\");\n\t}", "private void showLogin() {\n \t\tLogin.actionHandleLogin(this);\n \t}", "@Override\n public String[] getMenuOptions() {\n String[] options = {\"Change your username\", \"Change your password\", \"Change your email\"};\n return options;\n }", "private void printLoggedInMenu(){\n\t\tprint(\"Please choose from the options below\"+System.lineSeparator(), \n\t\t\"1.Search Users\", \"2.Search Movies\", \"3.View Feed\", \"4.View Profile\", \"5.Logout\", \"6.Exit\");\n\t}", "public abstract boolean showLogin();", "public adminUsuarios() {\n initComponents();\n showUsuarios();\n }", "protected void confirmLogin() {\n String nameString1 = this.adminName.getText();\n String passwordString1 = this.adminPassword.getText();\n UserType userType = (UserType) this.user_type_combobox.getSelectedItem();\n if (\"系统管理员\".equals(userType.getName())) {\n AdminDao adminDao = new AdminDao();\n SystemAdmin admin = adminDao.selectAdmin(nameString1, passwordString1);\n if (admin == null) {\n JOptionPane.showMessageDialog(this, \"用户名或者密码错误!!\");\n return;\n }\n IndexFrame indexFrame = new IndexFrame(userType, admin, passwordString1);\n indexFrame.setVisible(true);\n this.dispose();\n }\n }", "public static void ulogujSeKaoAdmin() {\r\n\t\tprikazIProveraSifre(-2, 'a');\r\n\t}", "public fHeThong() {\n initComponents();\n if(\"admin\".equals(new DAO_Login().QuyenTruyCap(fLogin.usernamee)))\n {\n MenuDangKyTaiKhoan.setVisible(true);\n MenuQuanLiTaiKhoan.setVisible(true);\n }\n else\n {\n MenuDangKyTaiKhoan.setVisible(false);\n MenuQuanLiTaiKhoan.setVisible(false);\n }\n }", "java.lang.String getAdmin();", "public int showMenu() {\n // Print out menu for user choice\n System.out.println(\"==================== Login Program ====================\");\n System.out.println(\"1. Add User\");\n System.out.println(\"2. Login\");\n System.out.println(\"3. Exit\");\n System.out.print(\"Please choice one option: \");\n\n // Return number if method to check validate of input is done\n return this.checkValidate();\n }", "private void displayMenuOptions()\n {\n // display user options menu\n System.out.println(\"\");\n System.out.println(\"----------------------------------------------------\");\n System.out.println(\"\");\n System.out.println(\"COMMAND OPTIONS:\");\n System.out.println(\"\");\n System.out.println(\" 'on' to force power controller to ON state\");\n System.out.println(\" 'off' to force power controller to OFF state\");\n System.out.println(\" 'status' to see current power controller state\");\n System.out.println(\" 'sunrise' to display sunrise time.\");\n System.out.println(\" 'sunset' to display sunset time.\");\n System.out.println(\" 'next' to display next scheduled event.\");\n System.out.println(\" 'time' to display current time.\");\n System.out.println(\" 'coord' to display longitude and latitude.\");\n System.out.println(\" 'help' to display this menu.\");\n System.out.println(\"\");\n System.out.println(\"PRESS 'CTRL-C' TO TERMINATE\");\n System.out.println(\"\");\n System.out.println(\"----------------------------------------------------\");\n System.out.println(\"\");\n }", "public void logincredentials() {\n\t\tutil.entertext(prop.getValue(\"locators.text.uname\"), \"admin\");\n\t\tutil.entertext(prop.getValue(\"locators.text.password\"), \"Admin123\");\n\t\tutil.ClickElement(prop.getValue(\"locators.button.regdesk\"));\n\t\tutil.ClickElement(prop.getValue(\"locators.button.login\"));\n\t\tlogreport.info(\"logged into the application\");\n\n\t}", "private int showMenu() {\n System.out.println(\"\\nWelcome to PasswordManager!\");\n System.out.println(\"Choose from the following options:\");\n System.out.println(\"1. Get a username and password for a website.\");\n System.out.println(\"2. Add a website's username and password to the database.\");\n System.out.println(\"3. Delete a website's username and password from the database.\");\n System.out.println(\"4. Change a username for a website.\");\n System.out.println(\"5. Change a password for a website\");\n System.out.println(\"6. Delete your user. WARNING: This will delete all of your saved usernames and passwords.\");\n System.out.println(\"7. Print all websites and usernames in the database.\");\n System.out.println(\"8. Quit.\");\n\n return input.nextInt();\n }", "@Override\r\n\tpublic void login_admin() {\n\t\trender(\"admin/login.jsp\");\r\n\t}", "public void gotoAdminLogin(){ application.gotoAdminLogin(); }", "public void registerLoginMenu() {\n System.out.println(\"Do you want to Login or Register?\");\n System.out.println(\"(Enter the number without parenthesis to choose an option)\");\n System.out.println(\"Enter (1) Login, (2) Register\");\n }", "boolean isAdmin();", "public boolean Admin() {\n\t\tif (choiceAdmin.getSelectedIndex() == 0 || choiceAdmin.getSelectedIndex() == 2) {\n\t\t\tlblCorreoDelAdministrador.setVisible(true);\n\t\t\ttextField.setVisible(true);\n\t\t\tadmin = 0;\n\t\t\treturn false;\n\t\t} else {\n\t\t\tlblCorreoDelAdministrador.setVisible(false);\n\t\t\ttextField.setVisible(false);\n\t\t\tadmin = 1;\n\t\t\treturn true;\n\t\t}\n\t}", "private void loginAsAdmin() {\n vinyardApp.navigateToUrl(\"http://localhost:8080\");\n vinyardApp.fillUsername(\"admin\");\n vinyardApp.fillPassord(\"321\");\n vinyardApp.clickSubmitButton();\n }", "public signadmin() {\n initComponents();\n }", "private static void handleLogin(Operations o) {\n\t\tswitch(o)\n\t\t{\n\t\tcase ERROR:\n\t\t\tloginGUI.textField.setEnabled(true);\n\t\t\tloginGUI.textField_2.setEnabled(true);\n\t\t\tloginGUI.textField_1.setEnabled(true);\n\t\t\tloginGUI.EnablePassField();\n\t\t\tloginGUI.btnLogin.setEnabled(true);\n\t\t\tJOptionPane.showMessageDialog(LoginCont.mainframe, \"Error:User and/or Password is incorrect!\");\n\t\t\tloginGUI.btnExit.setEnabled(true);\n\t\t\tbreak;\n\t\tcase ALLOW_LOG:\n\t\t\tloginGUI.btnLogin.setEnabled(false);\n\t\t\tloginGUI.btnLogout.setEnabled(true);\n\t\t\tloginGUI.setVisible(false);\t\n\t\t\tMenuGUI mh1=new MenuGUI(loginGUI);\n\t\t\tString buttonNames[];\n\t\t\tbuttonNames = new String[]{\"Station Control\",\"Purchase Plan\",\"Modify Customer\",\"Manage Sales\", \"NFC Module\",\"Manage Fuel\",\"Messages\",\"Invoices\",\"Reports\", \"House Fuel Orders\"};\n\t\t\tmh1.setButtonNames(buttonNames);\n\t\t\t//get the user_type and user the string privilegeLevel to allow certain functions\n\t\t\tSystem.out.println(currUser.getUserType().toString()); // getting the usertype and user correctly\n\t\t\tboolean[] allowedButtons = currUser.getUserType().getPrivilegeLevels();\n\t\t\tfor(int i=0;i<allowedButtons.length;i++)\n\t\t\t{\n\t\t\t\tmh1.functionButton[i].setEnabled(allowedButtons[i]);\n\t\t\t\tmh1.functionButton[i].setVisible(allowedButtons[i]);\n\t\t\t}\n\t\t\tbreak; \n\t\tcase USER_ALREADY_LOGGED:\n\t\t\tJOptionPane.showMessageDialog(LoginCont.mainframe, \"Error:User Already Logged In!\");//do something else after wards like - get the full User Details and display a corresponding GUI\n\t\t\tloginGUI.textField.setEnabled(true);\n\t\t\tloginGUI.textField_2.setEnabled(true);\n\t\t\tloginGUI.textField_1.setEnabled(true);\n\t\t\tloginGUI.EnablePassField();\n\t\t\tloginGUI.btnLogin.setEnabled(true);\n\t\t\tloginGUI.btnExit.setEnabled(true);\n\t\t\tbreak;\n\t\t}\t\n\t}", "private void printMainMenu(){\n\t\tprint(\"Please choose from the options below\", System.lineSeparator()+\"1.Login\", \"2.Exit\");\n\t}", "public void options() {\n\n audio.playSound(LDSound.SMALL_CLICK);\n if (canViewOptions()) {\n Logger.info(\"HUD Presenter: options\");\n uiStateManager.setState(GameUIState.OPTIONS);\n }\n }", "public login() {\n\n initComponents();\n \n usuarios.add(new usuarios(\"claudio\", \"claudioben10\"));\n usuarios.get(0).setAdminOno(true);\n \n }", "public login() {\n initComponents();\n setTitle(\"COLLAGE MANAGEMENT SYSTEM\");\n }", "public boolean isAdmin();", "@Override\r\n public Boolean loginAdmin(LoginAccessVo vo) throws Exception {\n return null;\r\n }", "@Override\r\n public Boolean loginAdmin(LoginAccessVo vo) throws Exception {\n return null;\r\n }", "public void setlogUserIn() {\n\t\tmenu1.setOnAction(event -> {\n\t\t\topenUserSettings();\n\t\t});\n\t\tmenu2.setOnAction(event -> {\n\t\t\tsetlogUserOut();\n\t\t});\n\t\tuserMenuButton.setText(controller.loggedIn());\n\t\tuserMenuButton.setStyle(\"-fx-font-size: 10pt; -fx-text-fill:black;\"); // MUOTOILU CSSSSSÄÄÄÄN\n\t\tuserMenuButton.getItems().addAll(menu1, menu2);\n\t\tloggedinuser.setVisible(true);\n\t\tloggedinuser.setText(bundle.getString(\"mVloggedin\"));\n\t\tloggedinuser.setGraphic(userMenuButton);\n\t\tloggedinuser.setContentDisplay(ContentDisplay.RIGHT);\n\t\tuserSettings.setVisible(true);\n\t\tloginoption.setVisible(false);\n\t}", "private static void displayMainMenu() {\n\t\tSystem.out.println(\"\\t Main Menu Help \\n\" \n\t\t\t\t+ \"====================================\\n\"\n\t\t\t\t+ \"au <username> : Registers as a new user \\n\"\n\t\t\t\t+ \"du <username> : De-registers a existing user \\n\"\n\t\t\t\t+ \"li <username> : To login \\n\"\n\t\t\t\t+ \"qu : To exit \\n\"\n\t\t\t\t+\"====================================\\n\");\n\t}", "private static void displayUserMenu() {\n\t\tSystem.out.println(\"\\t User Menu Help \\n\" \n\t\t\t\t+ \"====================================\\n\"\n\t\t\t\t+ \"ar <reponame> : To add a new repo \\n\"\n\t\t\t\t+ \"dr <reponame> : To delete a repo \\n\"\n\t\t\t\t+ \"or <reponame> : To open repo \\n\"\n\t\t\t\t+ \"lr : To list repo \\n\"\n\t\t\t\t+ \"lo : To logout \\n\"\n\t\t\t\t+ \"====================================\\n\");\n\t}", "public static void listMenuOptions(){\n\n System.out.println(\"Please choose an option:\");\n System.out.println(\"(1) Add a task.\");\n System.out.println(\"(2) Remove a task.\");\n System.out.println(\"(3) Update a task.\");\n System.out.println(\"(4) List all tasks.\");\n System.out.println(\"(0) Exit\");\n }", "public Tampilan_Utama() {\n initComponents();\n initFrame();\n this.setLocationRelativeTo(null);\n jMenu5.setEnabled(false);\n jMenuItem1.setEnabled(true);\n jMenuItem5.setEnabled(false);\n jMenuItem6.setEnabled(false);\n jMenuItem7.setEnabled(false);\n jMenuItem10.setEnabled(false);\n adLbl.setVisible(false);\n adminLbl.setVisible(false);\n adminLbl.setText(\"\");\n logoutBtn.setVisible(false);\n \n }", "public void showOptions()\n {\n //make the options window visible\n optionsScreen.setVisible(true);\n }", "public void displaymenu()\r\n\t{\r\n\t\tSystem.out.println(\"Welcome to the COMP2396 Authentication system!\");\r\n\t\tSystem.out.println(\"1. Authenticate user\");\r\n\t\tSystem.out.println(\"2. Add user record\");\r\n\t\tSystem.out.println(\"3. Edit user record\");\r\n\t\tSystem.out.println(\"4. Reset user password\");\r\n\t\tSystem.out.println(\"What would you like to perform?\");\r\n\t}", "private JPanel adminLoginPanels() {\n JPanel admin = new JPanel();\n JPanel usernamePanel = new JPanel();\n usernamePanel.add(new JLabel(\"Username:\"));\n usernamePanel.add(Box.createHorizontalStrut(15));\n usernamePanel.add(username);\n usernamePanel.add(Box.createHorizontalStrut(15));\n JPanel pwPanel = new JPanel();\n pwPanel.add(new JLabel(\"Password:\"));\n pwPanel.add(Box.createHorizontalStrut(15));\n pwPanel.add(password);\n admin.add(usernamePanel);\n admin.add(pwPanel);\n return admin;\n }", "public void viewOptions()\r\n {\r\n SetupScreen setupScreen = new SetupScreen();\r\n pushScreen(setupScreen);\r\n }", "private void adminLogin() {\n\t\tdriver.get(loginUrl);\r\n\t\t// fill the form\r\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(USERNAME);\r\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(PASSWORD);\r\n\t\t// submit login\r\n\t\tdriver.findElement(By.name(\"btn_submit\")).click();\r\n\t}", "private void mainMenuDetails() {\r\n try {\r\n System.out.println(\"Enter your choice:\");\r\n int menuOption = option.nextInt();\r\n switch (menuOption) {\r\n case 1:\r\n showFullMenu();\r\n break;\r\n case 2:\r\n empLogin();\r\n break;\r\n case 3:\r\n venLogin();\r\n // sub menu should not be this\r\n break;\r\n case 4:\r\n Runtime.getRuntime().halt(0);\r\n default:\r\n System.out.println(\"Choose either 1,2,3\");\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"enter a valid value\");\r\n }\r\n option.nextLine();\r\n mainMenu();\r\n }", "public void showOptions() {\n\t\tCIVLTable tbl_optionTable = (CIVLTable) getComponentByName(\"tbl_optionTable\");\n\t\tDefaultTableModel optionModel = (DefaultTableModel) tbl_optionTable\n\t\t\t\t.getModel();\n\n\t\tif (optionModel.getRowCount() != 0) {\n\t\t\toptionModel.setRowCount(0);\n\t\t\ttbl_optionTable.clearSelection();\n\t\t\ttbl_optionTable.revalidate();\n\t\t}\n\n\t\tGMCSection section = currConfig.getGmcConfig().getSection(\n\t\t\t\tGMCConfiguration.ANONYMOUS_SECTION);\n\t\tObject[] opts = currConfig.getGmcConfig().getOptions().toArray();\n\t\tCollection<Option> options = currConfig.getGmcConfig().getOptions();\n\t\tIterator<Option> iter_opt = options.iterator();\n\t\tList<Object> vals = new ArrayList<Object>();\n\n\t\twhile (iter_opt.hasNext()) {\n\t\t\tOption curr = iter_opt.next();\n\t\t\tvals.add(section.getValueOrDefault(curr));\n\t\t}\n\n\t\t// Sets all of the default-ize buttons\n\t\tnew ButtonColumn(tbl_optionTable, defaultize, 2);\n\n\t\tfor (int i = 0; i < vals.size(); i++) {\n\t\t\tOption currOpt = (Option) opts[i];\n\t\t\t/*\n\t\t\t * if (currOpt.name().equals(\"sysIncludePath\")) {\n\t\t\t * optionModel.addRow(new Object[] { currOpt, \"sysIncludePath\",\n\t\t\t * \"Default\" }); }\n\t\t\t * \n\t\t\t * else if (currOpt.name().equals(\"userIncludePath\")) {\n\t\t\t * optionModel.addRow(new Object[] { currOpt, \"userIncludePath\",\n\t\t\t * \"Default\" }); }\n\t\t\t */\n\t\t\t// else {\n\t\t\toptionModel\n\t\t\t\t\t.addRow(new Object[] { currOpt, vals.get(i), \"Default\" });\n\t\t\t// }\n\t\t}\n\t}", "private void displayOptions() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Main System Menu\");\n\t\tSystem.out.println(\"----------------\");\n\t\tSystem.out.println(\"A)dd polling place\");\n\t\tSystem.out.println(\"C)lose the polls\");\n\t\tSystem.out.println(\"R)esults\");\n\t\tSystem.out.println(\"P)er-polling-place results\");\n\t\tSystem.out.println(\"E)liminate lowest candidate\");\n\t\tSystem.out.println(\"?) display this menu of choices again\");\n\t\tSystem.out.println(\"Q)uit\");\n\t\tSystem.out.println();\n\t}", "@Override\r\n\tpublic void ShowLogin(Context _in_context, String _in_data) {\n\t\tTypeSDKLogger.e(\"ShowLogin\");\r\n\t\tsuper.ShowLogin(_in_context, _in_data);\r\n\t\tthis.youkuLogin();\r\n\t}", "public static void options(){\n System.out.println(\"Choose from the following options \");\n System.out.println(\"0 Print the options again\");\n System.out.println(\"1 Create Student Records\");\n System.out.println(\"2 Create Teacher Records\");\n System.out.println(\"3 Edit the Records\");\n System.out.println(\"4 Get the Record Count\");\n System.out.println(\"5 Exit\");\n }", "public void loginMenu(){\n\t\tstate = ATM_State.LOGINID;\n\t\tgui.setDisplay(\"Enter your account ID: \\n\");\n\t}", "public void showMemberCategoryMenu() {\n System.out.println(\"Visa lista med: \");\n System.out.println(\"\\t1. Barnmedlemmar\");\n System.out.println(\"\\t2. Ungdomsmedlemmar\");\n System.out.println(\"\\t3. Vuxenmedlemmar\");\n System.out.println(\"\\t4. Seniormedlemmar\");\n System.out.println(\"\\t5. VIP-medlemmar\");\n System.out.print(\"Ange val: \");\n }", "@Override\n\tpublic void displayOptions(Scanner scanner) {\n\n\t\tSystem.out.println(\"Please Enter Username\");\n\t\t/// String username = scanner.nextLine();\n\t\tthis.user.setUsername(scanner.nextLine());\n\t\tSystem.out.println(\"Please Enter Password\");\n\t\t// String password = scanner.nextLine();\n\t\tthis.user.setPassword(scanner.nextLine());\n\n\t\t// this.user = new BarberUser(username, password);\n\n\t\tif (!barberAuthSerivce.isUserExist(this.user)) {\n\t\t\tif (barberAuthSerivce.registerUser(this.user) != null) {\n\t\t\t\tbarberNextMenu = barberLoginMenu;\n\t\t\t} else {\n\t\t\t\tthis.user.setUsername(\"\");\n\t\t\t\tthis.user.setUsername(\"\");\n\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\"Something went wrong! Please press Enter to try again or 'login' to go to the login menu\");\n\t\t\t\tString answer = scanner.nextLine();\n\n\t\t\t\tif (\"login\".equals(answer)) {\n\t\t\t\t\tbarberNextMenu = barberLoginMenu;\n\t\t\t\t} else {\n\t\t\t\t\tbarberNextMenu = this;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthis.user.setUsername(\"\");\n\t\t\tthis.user.setUsername(\"\");\n\t\t\tSystem.out.println(\"Username taken, please press Enter to try again or 'login' to go to the login menu\");\n\t\t\tString answer = scanner.nextLine();\n\n\t\t\tif (\"login\".equals(answer)) {\n\t\t\t\tbarberNextMenu = barberLoginMenu;\n\t\t\t} else {\n\t\t\t\tbarberNextMenu = this;\n\t\t\t}\n\t\t}\n\n\t}", "public static void showOptions() {\n System.out.println(new StringJoiner(\"\\n\")\n .add(\"*************************\")\n .add(\"1- The participants' directory.\")\n .add(\"2- The RDVs' agenda.\")\n .add(\"3- Quit the app.\")\n .add(\"*************************\")\n );\n }", "private int mainMenu(){\n System.out.println(\" \");\n System.out.println(\"Select an option:\");\n System.out.println(\"1 - See all transactions\");\n System.out.println(\"2 - See all transactions for a particular company\");\n System.out.println(\"3 - Detailed information about a company\");\n System.out.println(\"0 - Exit.\");\n\n return getUserOption();\n }", "public AdminLogInPage() {\n initComponents();\n }", "private final static void onLoginAdmin(TextField username, PasswordField password)\n\t{\n\t\tif(ProfileManipulation.findUsername(username.getText()) && !ProfileManipulation.checkLoginStatus(username.getText())){\n\t\t\tif (ProfileManipulation.isVerfied(username.getText())) {\n\t\t\t\tProfileManipulation.updateLoginStatus(username.getText(), true);\n\n\t\t\t\t// Jetzt wird das Profil aufgerufen\n\t\t\t\tPartylize.setUsername(username.getText());\n\n\t\t\t\tProfileManipulation.changePassword(password.getText());\n\n\t\t\t\tPartylize.showMainScene();\n\t\t\t} else {\n\t\t\t\tPartylize.setUsername(username.getText());\n\t\t\t\tPartylize.showVerification();\n\t\t\t}\n\t\t}\n\t\t// Funktionsaufruf Datenbankanbindung -> Erstellen einer Session ID\n\t\t// Funktionsaufruf Profildaten in lokalen Speicher laden - WIP\n\t\telse {\n\t\t\tusername.setText(\"\");\n\t\t\tpassword.setText(\"\");\n\t\t}\n\t}", "public void onClick(DialogInterface dialog, int id) {\n prefs.edit().putBoolean(\"Islogin\", false).commit();\n prefs.edit().putString(\"role\", \"\").commit();\n item.setTitle(\"Login\");\n }", "public static void imprimirMenuAdmin() {\r\n\tSystem.out.println(\"---------------------------menu---------------------------\");\r\n\tSystem.out.println(\"opciones: (ingrese la letra)\");\r\n\tSystem.out.println(\"A: despliega la opción taquilla\");\r\n System.out.println(\"B: despliega la opción informacion cliente\");\r\n\tSystem.out.println(\"C: Salir\");\r\n\tSystem.out.println(\"----------------------------------------------------------\");\r\n }", "@Override\n public void show()\n {\n boolean loginOK; // true if good user info was entered\n // multithreaded code does not execute properly in IDEs; true if IDE run detected\n boolean runningFromIDE = false;\n\n do // continue login process while user chooses to stay in login menu\n {\n loginOK = false;\n while(!loginOK) // do this while no good login info acquired, or user choose to bail.\n {\n System.out.println(splashStrings.LOGIN); // SPLASH WELCOME\n\n String userName = GET.getString(\"Indtast venligst bruger navn:\\n\\t|> \");\n\n char[] password;\n\n if(!runningFromIDE) // getPassword does not work in IDE\n {\n password = PasswordField.getPassword(System.in, \"Indtast venligst password:\\n\\t|> \");\n\n if(password == null)\n {\n // getPassword returns a null array reference, if no chars were captured, thus this.\n runningFromIDE = true;\n\n System.out.println(\"MELDING:\\nDet ser ud til at du kører programmet fra en IDE:\\t\" +\n \"Password masking slås fra.\" +\n \"\\nKør shorttest.jar, for at opnå den fulde bruger-oplevelse.\\n\");\n\n continue;\n }\n\n loginOK = checkCredentials(userName, new String(password));\n\n } else // option is chosen if IDE-execution detected\n {\n String passw = GET.getString(\"Indtast venligst password:\\n\\t|> \");\n loginOK = checkCredentials(userName, passw);\n }\n\n if(!loginOK) // if user input were no good, and ONLY if info were no good\n {\n System.out.println(\"De indtastede informationer fandtes ikke i systemet.\");\n if(GET.getConfirmation(\"Vil du prøve igen?\\n\\tja / nej\\n\\t|> \", \"nej\", \"ja\"))\n {\n System.out.println(\"Du valgte ikke at prøve igen, login afsluttes.\");\n break;\n }\n }\n }\n\n if(loginOK)\n {\n System.out.println(\"Login var en success. Fortsætter til første menu.\\n\");\n menuLoggedInto.show();\n }\n\n // when user returns from main menu, they get to choose if they want to log in again\n } while(GET.getConfirmation(\"Skal en anden logge ind?\\n\\t ja / nej\\n\\t|> \", \"ja\", \"nej\"));\n }", "void doGetAdminInfo() {\n\t\tlog.config(\"doGetAdminInfo()...\");\n\t\tthis.rpcService.getAdminInfo(new AsyncCallback<DtoAdminInfo>() {\n\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\tString errorMessage = \"Error when getting admin info! : \" + caught.getMessage();\n\t\t\t\tlog.severe(errorMessage);\n\t\t\t\tgetAdminPanel().setActionResult(errorMessage, ResultType.error);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(DtoAdminInfo adminInfo) {\n\t\t\t\tlog.config(\"getAdminInfo() on success - \" + adminInfo.getListLogFilenames().size() + \" logs filenames.\");\n\t\t\t\tgetAdminPanel().setAdminInfo(adminInfo);\n\t\t\t}\n\t\t});\n\t}", "private void displayMenu() {\n\t\tSystem.out.println(\"********Loan Approval System***********\");\n\t\tSystem.out.println(\"\\n\");\n\t\tSystem.out.println(\n\t\t\t\t\"Choose the following options:\\n(l)Load Applicaitons\\n(s)Set the Budget\\n(m)Make a decision\\n(p)Print\\n(u)Update the application\");\n\n\t}", "protected void showLoginChooser() {\n if (mFenceClient != null && Constants.WPI_AREA_LANDMARKS.size() > 0) {\n FenceUpdateRequest.Builder builder = new FenceUpdateRequest.Builder();\n for (Map.Entry<String, LatLng> entry : Constants.WPI_AREA_LANDMARKS.entrySet()) {\n builder.removeFence(entry.getKey() + \"-dwell\");\n builder.removeFence(entry.getKey() + \"-exiting\");\n }\n\n mFenceClient.updateFences(builder.build())\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n close();\n }\n });\n } else {\n close();\n }\n }", "public void option() {\n ReusableActionsPageObjects.clickOnElement(driver, options, logger, \"user options.\");\n }", "@Override\n public void showAuthScreen() {\n }", "public void show() {\r\n\t\tshowMembers();\r\n\t\tshowFacilities();\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.admin_login, menu);\n if(sharedPreferences.getString(\"clearanceLevel\",\"\")!=null){\n menu.removeItem(R.id.action_admin_login);\n }else{\n menu.removeItem(R.id.action_admin_logout);\n }\n return true;\n }", "public void getAccess() {\n\t\t// Display menu options\n\t\tSystem.out.println(\n\t\t\t\"\\nWelcome to PittTours are you a:\" +\n\t\t\t\"\\n1: Administrator\" +\n\t\t\t\"\\n2: Customer\" +\n\t\t\t\"\\n3: Neither, Quit\\n\");\n\n\t\t// Get user input\n\t\tSystem.out.print(\"Enter menu choice: \");\n\t\tinputString = scan.nextLine();\n\t\t// Convert input to integer, if not convertable, set to 0 (invalid)\n\t\ttry { choice = Integer.parseInt(inputString);\n\t\t} catch(NumberFormatException e) {choice = 0;}\n\n\t\t// Handle user choices\n\t\tif(choice == 1)\n\t\t\tdisplayAdmInterface();\n\t\telse if(choice == 2)\n\t\t\tdisplayCusInterface();\n\t\telse if(choice == 3) {} // Simply drops back to main to properly exit\n\t\telse { // If invalid choice, recall method\n\t\t\tSystem.out.println(\"INVALID CHOICE\");\n\t\t\tgetAccess();\n\t\t}\n\t}", "public void setOptions(){\n System.out.println(\"¿Que operacion desea realizar?\");\n System.out.println(\"\");\n System.out.println(\"1- Consultar sus datos\");\n System.out.println(\"2- Ingresar\");\n System.out.println(\"3- Retirar\");\n System.out.println(\"4- Transferencia\");\n System.out.println(\"5- Consultar saldo\");\n System.out.println(\"6- Cerrar\");\n System.out.println(\"\");\n}", "@FXML\n\tprivate void handleLogin() {\n\t \n\t\t\t\ttry {\n\t\t\t\t\tmain.showHomePageOverview(username.getText(),password.getText());\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\n\t}", "public String getIsAdmin() {\n return isAdmin;\n }", "public void menuListados() {\n\t\tSystem.out.println(\"MENU LISTADOS\");\n\t\tSystem.out.println(\"1. Personas con la misma actividad\");\n\t\tSystem.out.println(\"2. Cantidad de personas con la misma actividad\");\n\t\tSystem.out.println(\"0. Salir\");\n\t}", "public void showOptions() {\n frame.showOptions();\n }", "private void showUserSettings() {\n\t\t\tSharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);\n\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\tbuilder.append(\"\\n Send report:\"+ sharedPrefs.getBoolean(\"prefSendReport\", true));\n\t\t}", "@RequestMapping(value=\"/settings/account\", method=RequestMethod.GET)\n\tpublic String showForm(Model model, HttpServletRequest request, HttpServletResponse response) {\n\t\tString users_id = SessionHandler.sessionExists(request, response);\n\t\tif (users_id == null)\n\t\t\treturn \"login\";\n\t\t\n\t\tUserModel user = UserModel.selectUser(users_id);\t\t\n\t\tmodel.addAllAttributes(user.getUser());\t\t\n\t\treturn \"settingsaccount\";\n\t\t\n\t}", "public String[] browseAdmin(Session session) throws RemoteException{\n\t\tSystem.out.println(\"Server model invokes browseAdmin() method\");\n\t\treturn null;\n\t\t\n\t}", "private void showUserSettings() {\n\t\tSharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);\n\t\tStringBuilder builder = new StringBuilder();\n\t\tbuilder.append(\"\\n Send report:\"+ sharedPrefs.getBoolean(\"prefSendReport\", true));\n\t}", "private void displayMenu() {\r\n\t\tif (this.user instanceof Administrator) {\r\n\t\t\tnew AdminMenu(this.database, (Administrator) this.user);\r\n\t\t} else {\r\n\t\t\tnew BorrowerMenu(this.database);\r\n\t\t}\r\n\t}", "@Override public void showLoginForm() {\n LoginViewState vs = (LoginViewState) viewState;\n vs.setShowLoginForm();\n\n errorView.setVisibility(View.GONE);\n\n setFormEnabled(true);\n //loginButton.setLoading(false);\n }", "@GET\n\t@RequestMapping(value = \"/admin\")\n\t@Secured(value = { \"ROLE_ADMIN\" })\n\tpublic String openAdminMainPage() {\n\t\t\n\t\treturn \"admin/admin\";\n\t}", "@Override\r\n\tpublic void showAccount() {\n\t\t\r\n\t}", "public boolean onCreateOptionsMenu(Menu menu_obj)\n\t{\n\t\tmenu_obj.add(0, 1,0,\" Logout \");\n\t\t\n\t\treturn true;\n\t}", "@Override\n// this runs when the options menu is created\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_login, menu);\n return true;\n }", "public void showMenu() {\n\t\tSystem.out.println(\"Please, choose one option!\");\n\t\tSystem.out.println(\"[ 1 ] - Highest Company Capital\");\n\t\tSystem.out.println(\"[ 2 ] - Lowest Company Capital\");\n\t\tSystem.out.println(\"[ 3 ] - Best Investor of the Day\");\n\t\tSystem.out.println(\"[ 4 ] - Worst Investor of the Day\");\n\t\tSystem.out.println(\"[ 0 ] - Exit\");\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);\r\n FirebaseUser currentUser = mAuth.getCurrentUser();\r\n MenuItem itemLogin = menu.findItem(R.id.login);\r\n MenuItem itemLogout = menu.findItem(R.id.logout);\r\n if (currentUser != null) {\r\n itemLogin.setVisible(false);\r\n itemLogout.setVisible(true);\r\n } else {\r\n itemLogin.setVisible(true);\r\n itemLogout.setVisible(false);\r\n }\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n if (isLoggedIn()) {\n getMenuInflater().inflate(R.menu.main, menu);\n return true;\n } else {\n return false;\n }\n }", "private void printSmallMenu() throws IOException{\n\t\t\n\t\tprint(\"If you would like to return to the login menu, enter 0\");\n\t\tgetValidInput(zeroInput);\n\t\t//the only possible valid input that could be returned is '0', so once we get past the getValidInput() call, we know to return to the login menu\n\t\tloggedIn();\n\t}", "private void mainMenu() {\r\n System.out.println(\"Canteen Management System\");\r\n System.out.println(\"-----------------------\");\r\n System.out.println(\"1. Show Menu\");\r\n System.out.println(\"2. Employee Login\");\r\n System.out.println(\"3. Vendor Login\");\r\n System.out.println(\"4. Exit\");\r\n mainMenuDetails();\r\n }", "@Override\n public void showLoginView() {\n calledMethods.add(\"showLoginView\");\n }", "public Login() {\n initComponents();\n txtAccountStatus.setVisible(false); \n showDate(); // Class para sa Date\n showTime(); // Class para sa Time\n }", "private PasswordScreen() {\n initComponents();\n\n //cbUserType.setModel(new DefaultComboBoxModel(new String[] {User.USER_TYPE_MANAGER, User.USER_TYPE_CASHIER, User.USER_TYPE_SERVER}));\n\n btnConfigureDatabase.setAction(goAction);\n btnConfigureDatabase.setActionCommand(\"DBCONFIG\");\n }", "void goToLogin() {\n mainFrame.setPanel(panelFactory.createPanel(PanelFactoryOptions.panelNames.LOGIN));\n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tUserLoginPage userloginpanel = new UserLoginPage();\n\t\t\t\t\tuserloginpanel.login.addActionListener(new ActionListener() {\n\t\t\t\t\t\t\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tDatabaseMethods DB = new DatabaseMethods();\n\t\t\t\t\t\t\tArrayList<User> usrarray = DB.ReadUser();\n\t\t\t\t\t\t\tArrayList<Admin> adminarray = DB.ReadAdmin();\n\t\t\t\t\t\t\tfor(User u:usrarray) {\n\t\t\t\t\t\t\t\t//System.out.println(u.getUserName().equals(login.psw.getPassword()) + \" \" + u.getPassword() + \" \" + new String(login.psw.getPassword()));\n\t\t\t\t\t\t\t\tif(u.getUserName().equals(userloginpanel.usr_name.getText()) && u.getPassword().equals(new String(userloginpanel.psw.getPassword()))) {\n\t\t\t\t\t\t\t\t\tuserloginpanel.frame.setVisible(false);\n\t\t\t\t\t\t\t\t\tex.setuser(u);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor(Admin a:adminarray){\n\t\t\t\t\t\t\t\tif(a.getAdminName().equals(userloginpanel.usr_name.getText()) && a.getPassword().equals(new String(userloginpanel.psw.getPassword()))) {\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"admin\");\n\t\t\t\t\t\t\t\t\tuserloginpanel.frame.setVisible(false);\n\t\t\t\t\t\t\t\t\tex.sidebar.admin_button.setVisible(true);\n\t\t\t\t\t\t\t\t\t//ex.repaint();\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}", "private void setDashboard(){\n lblUsername.setText(username);\n if(roles.equals(\"employeer\")){\n jBtnLamar.setText(\"Lihat Pelamar\");\n jBtnKerja.setText(\"Tambah Lowongan\");\n btnLowonganku.setVisible(true);\n }\n \n }", "private void printMenu() {\n\t\tSystem.out.println(\"Select an option :\\n----------------\");\n\t\tfor (int i = 0, size = OPTIONS.size(); i < size; i++) {\n\t\t\tSystem.out.println(OPTIONS.get(i));\n\t\t}\n\t}", "private void okEvent() {\n\t\tYAETMMainView.PRIVILEGE = (String)loginBox.getSelectedItem();\n\t\tshowMain();\n\t\tcloseDialog();\n\t}", "void legeAn(String login, String name, String password, boolean isAdmin, String email);", "public void LogInOnAction(Event e) {\n\t \t\r\n\t \tif(BookGateway.getInstance().getAuthentication(this.userNameId.getText(), this.passwordId.getText())) {\r\n\t \t\tthis.whiteOutId.setVisible(false);\r\n\t \t\tthis.whiteOutId.setDisable(true);\r\n\t \t\t// TODO: Update label name in the corner.. \r\n\t \t\tthis.nameLabelId.setText(\"Hello, \" + BookGateway.currentUser.getFirstName());\r\n\t \t\r\n\t \t}else {\r\n\t \t\t// true\r\n\t \t\tmessAlert(\"Invalid\",\"Wrong Username or password\");\r\n\t \t\tthis.userNameId.setText(\"\");\r\n\t \t\tthis.passwordId.setText(\"\");\r\n\t \t\te.consume();\r\n\t \t}\r\n\t \t\r\n\t \t\r\n\t }", "public void verDatosAdministrador()\r\n\t{\r\n\t\tcrearadmin = new CrearAdministrador(this);\r\n\t\tcrearadmin.setVisible(true);\r\n\t}", "@Override\r\n\tpublic void ShowLogin(Context _in_context, String _in_data) {\n\t\tTypeSDKLogger.e( \"ShowLogin\");\r\n\t\tsuper.ShowLogin(_in_context, _in_data);\r\n\t\tif(HMPay.isLogined()){\r\n\t\t\tTypeSDKNotify_haima notify = new TypeSDKNotify_haima();\r\n \t\tnotify.sendToken(token, uid);\r\n\t\t} else {\r\n\t\t\tthis.haimaLogin();\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n\tpublic String getAdminAuth() {\n\t\tSet<String> sets = Constant.authMap.keySet();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tif (null != sets) {\n\t\t\tfor (String auth : sets) {\n\t\t\t\tsb.append(auth);\n\t\t\t\tsb.append(Constant.SPLITER_COMMA);\n\t\t\t}\n\t\t}\n\n\t\treturn sb.toString();\n\t}", "private void displayWelcome()\n {\n // display user options menu\n System.out.println(\"\");\n System.out.println(\"\");\n System.out.println(\"\");\n System.out.println(\"\");\n System.out.println(\"----------------------------------------------------\");\n System.out.println(\" Welcome to Sunrise/Sunset Power Controller \");\n System.out.println(\" http://www.savagehomeautomation.com \");\n System.out.println(\"----------------------------------------------------\");\n System.out.println(\"\");\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n\n if(loadFinish==true) {\n if (loggedin == true) {\n menu.findItem(R.id.login).setVisible(false);\n menu.findItem(R.id.signout).setVisible(true);\n } else {\n menu.findItem(R.id.login).setVisible(true);\n menu.findItem(R.id.signout).setVisible(false);\n }\n }\n\n return true;\n }", "private boolean isAdmin() {\n\t\tString name = (String) session.getAttribute(\"name\");\n\t\tif (name.equals(ADMIN)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public String choosenMenu() {\n String value = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"menu_id\");\n menu_id = Integer.parseInt(value);\n String user = FacesContext.getCurrentInstance().getExternalContext().getRemoteUser();\n if (user == null) {\n return \"choosenMenu\";\n } else {\n return \"chooseMenuUser\";\n }\n }" ]
[ "0.72643566", "0.7161039", "0.6764569", "0.6727305", "0.6599578", "0.64913225", "0.63301724", "0.63119763", "0.62833655", "0.6238208", "0.6232771", "0.62149215", "0.61931056", "0.6158881", "0.61530304", "0.6136427", "0.61133116", "0.6103932", "0.6064243", "0.6063536", "0.6040689", "0.6035843", "0.6004059", "0.5996418", "0.5987737", "0.5984323", "0.59819615", "0.5981942", "0.5975426", "0.59594995", "0.59594995", "0.5947867", "0.59356505", "0.5930437", "0.59284425", "0.59249836", "0.59217745", "0.59178376", "0.5914923", "0.5907427", "0.58954823", "0.5885569", "0.58779985", "0.58735275", "0.5873101", "0.5868572", "0.58563757", "0.5826811", "0.5807136", "0.58041936", "0.5796622", "0.57956797", "0.57819086", "0.5781122", "0.57715285", "0.574178", "0.5734071", "0.5732206", "0.57304156", "0.57194805", "0.5711221", "0.57001597", "0.56992745", "0.56958467", "0.5693049", "0.5691019", "0.56906533", "0.5688991", "0.5684523", "0.56844974", "0.5674044", "0.566951", "0.5666586", "0.5661965", "0.5660965", "0.5658559", "0.56585366", "0.5653334", "0.5646007", "0.5643119", "0.5639143", "0.5633892", "0.56320447", "0.563", "0.56178874", "0.5613307", "0.5612741", "0.56036484", "0.5602634", "0.5591124", "0.5590534", "0.5575488", "0.5570597", "0.55697054", "0.5562786", "0.5557531", "0.55558413", "0.5554789", "0.5553386", "0.5551166", "0.55497473" ]
0.0
-1
Admin uses this function to add new share
public static void addShare(){ Map<String, ShareMarket> allShareDetails = ShareMarketHashMap.getShareMarket(); ShareMarket addUniqueShare = new ShareMarket(); displayMap(allShareDetails); System.out.println("Enter Share Name : "); String shareName = input.next(); if(allShareDetails.containsKey(shareName)) { System.out.println("This Share is already available, try to add different Share :( .You will be returned to main menu" +'\n'); return; } else if(isNumber(shareName)){ System.out.println("Share should be alphabets only :( .You will be returned to main menu" +'\n'); return; } System.out.println("Enter Share Quantity : "); if(!input.hasNextInt()) { System.out.println("Quantity entered in invalid, it should be a postive number.You will be returned to main menu" +'\n'); return; } int shareQuantity = input.nextInt(); System.out.println("Enter Share Price : "); if(!input.hasNextInt()) { System.out.println("Price entered in invalid, it should be a postive number.You will be returned to main menu" +'\n'); return; } int sharePrice = input.nextInt(); addUniqueShare.setShareName(shareName.trim()); addUniqueShare.setShareQuantity(shareQuantity); addUniqueShare.setSharePrice(sharePrice); ShareMarketHashMap.addShare(addUniqueShare); Map<String, ShareMarket> shareAfterAdding = ShareMarketHashMap.getShareMarket(); System.out.println("Share Name :" + shareAfterAdding.get(shareName).getShareName() + ',' + " Share Price:" + shareAfterAdding.get(shareName).getSharePrice() + ',' + " Share Quantity: " + shareAfterAdding.get(shareName).getShareQuantity()); System.out.println("Successfully added the share" + '\n'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void addShare() {\n \t\t((InputMethodManager) this.getContext().getSystemService(\n \t\t\t\tContext.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(\n \t\t\t\tthis.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\n \t\tIntent intent = new Intent(Intent.ACTION_SEND);\n \t\tArrayList<String> images = this.mNoteItemModel.getImages();\n \t\tLog.i(TAG, images.toString());\n \t\tif (images.isEmpty())\n \t\t\tintent.setType(\"text/plain\");\n \t\telse if (images.size() == 1) {\n \t\t\tintent.setType(\"image/*\");\n \t\t} else if (images.size() > 1) {\n \t\t\tintent.setAction(Intent.ACTION_SEND_MULTIPLE);\n \t\t\tintent.setType(\"images/*\");\n \t\t}\n \t\tintent.putExtra(Intent.EXTRA_TITLE, \"Share my note...\");\n \t\tintent.putExtra(Intent.EXTRA_TEXT, this.mNoteItemModel.getContent());\n \t\tif (images.size() == 1) {\n \t\t\tUri uri = this.mNoteItemModel.getImageUri(images.get(0));\n \t\t\tintent.putExtra(Intent.EXTRA_STREAM, uri);\n \t\t} else if (images.size() > 1) {\n \t\t\tArrayList<Uri> uris = new ArrayList<Uri>();\n \t\t\tfor (String image : images) {\n \t\t\t\turis.add(this.mNoteItemModel.getImageUri(image));\n \t\t\t}\n \t\t\tintent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris);\n \t\t}\n \t\tthis.getContext().startActivity(Intent.createChooser(intent, \"Share\"));\n \t}", "public void onShareAdded(ShareEntry shareEntry);", "@Override\n \t\t\tpublic void onClick(View v) {\n \t\t\t\tNoteEditView.this.addShare();\n \t\t\t}", "public void addShares(Shares e){\n \tthis.shares.add(e);\n }", "public void addRow(ShareLink shareLink) {\n\t\tint row = flexTable.getRowCount();\r\n\t\tButton sharebtn = new Button(shareLink.getShareName());\r\n\t\tsharebtn.setTitle(shareLink.getId().toString());\r\n\t\tsharebtn.addClickHandler(new ShareLinkClickHander());\r\n\t\t// if (myFile.getFileType() == MyFile.TYPE_DIR) {\r\n\t\tsharebtn.setStyleName(\"fileButton\");\r\n\t\t// }\r\n\r\n\t\tflexTable.setWidget(row, 0, sharebtn);\r\n\t\tflexTable.setWidget(row, 1, new Label(\"ShareLink\"));\r\n\t\tflexTable.setWidget(row, 2, new Label(shareLink.getOwner()));\r\n\t}", "@Override\n\tpublic void onShareButton() {\n\t\tDialogs.getShareEditDialog(this, false).show();\n\t}", "public void importShare(Share share)\r\n\t{\r\n\t\tthis.share = share;\r\n\t\tdeletedFlag = false;\r\n\t}", "@PostMapping(value = \"/profile/{idSender}/share\")\n\tpublic void share(@PathVariable long idSender, @RequestBody CreateShareForm createShareForm, Errors errors) {\n\n\t\t// check if entities constraints are respected\n\t\tconstraintViolationCheck(errors);\n\n\t\tshareServices.createShare(idSender, createShareForm);\n\t}", "public void share(View view){\n Toast.makeText(this, \"Loading share options ...\", Toast.LENGTH_SHORT).show();\n //Create an intent to share\n Intent sharingIntent = new Intent(Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n String shareBody = \"You should check out \" + getString(R.string.app_name) + \", an app where you can easily find books at the school library!\";\n if(currentBook.title != null)\n shareBody = \"Check out \\\"\" + currentBook.title + \"\\\", a book that I found with the app, \" + getString(R.string.app_name);\n sharingIntent.putExtra(Intent.EXTRA_SUBJECT, \"\" + getString(R.string.app_name));\n sharingIntent.putExtra(Intent.EXTRA_TEXT, shareBody);\n startActivity(Intent.createChooser(sharingIntent, \"Share via\"));\n }", "@Override\r\n\tpublic Share create(long shareId) {\r\n\t\tShare share = new ShareImpl();\r\n\r\n\t\tshare.setNew(true);\r\n\t\tshare.setPrimaryKey(shareId);\r\n\r\n\t\tString uuid = PortalUUIDUtil.generate();\r\n\r\n\t\tshare.setUuid(uuid);\r\n\r\n\t\tshare.setCompanyId(companyProvider.getCompanyId());\r\n\r\n\t\treturn share;\r\n\t}", "public void onAddByWebSitePressed( ) {\n Router.Instance().changeView(Router.Views.AddFromWebSite);\n }", "private void addShareAction() {\n\t\t// TODO Auto-generated method stub\n\t\tWindow window = getWindow();\n\t\tint width = getWindowManager().getDefaultDisplay().getWidth();\n\t\tint height = getWindowManager().getDefaultDisplay().getHeight();\n\t\tString shareContent = \"\" + 100 * mRightResultCount/mImagesID.size();\n\t\tString mShareFileName = File.separator + \"/color_blindness_result.png\";\n\t\t\n\t\tIntent shareIntent = new Intent(Intent.ACTION_SEND);\n\t\tFile file = ScreenShotForShare.GetScreenShotFile(window, width, height, mShareFileName); \n\t\tif (file != null)\n\t\t\tshareIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(file));\n\t\tshareIntent.setType(\"text/image/png\"); \n\t\tshareIntent.putExtra(Intent.EXTRA_SUBJECT, \"\");\n\t\tshareIntent.putExtra(Intent.EXTRA_TEXT, getString(R.string.shareResult, shareContent) + \"%\");\n \tstartActivity(Intent.createChooser(shareIntent, getString(R.string.share))); \n\t}", "private void genSharedPostOnFacebook () {\n shareLinkContent = new ShareLinkContent.Builder()\n .setContentTitle(\"Your Title\")\n .setContentDescription(\"Your Description\")\n .setContentUrl(Uri.parse(\"URL[will open website or app]\"))\n .setImageUrl(Uri.parse(\"image or logo [if playstore or app store url then no need of this image url]\"))\n .build();\n\n }", "@Override\n public boolean insertShare(CompanyShare companyShare) {\n CompanyShare existingShare = getShare(\n Filters.eq(\"companySymbol\", companyShare.getCompanySymbol())\n );\n\n if (existingShare != null) {\n return false;\n }\n\n Document newShare = ObjectMapperHelper.MapToDocument(companyShare);\n getSharesCollection().insertOne(newShare);\n\n return true;\n }", "protected void shareIt() {\n\t\tIntent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);\r\n\t\tsharingIntent.setType(\"text/plain\");\r\n\t\tString shareBody = content.getText().toString();\r\n\t\tsharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, \"Sharing\");\r\n\t\tsharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);\r\n\t\tstartActivity(Intent.createChooser(sharingIntent, \"Share via\"));\r\n\t}", "@Override\r\n public void onClick(View v) {\n UMImage urlImage = new UMImage(LotteryListActivity.this,\r\n share.getImage());\r\n new ShareAction(LotteryListActivity.this)\r\n .setPlatform(SHARE_MEDIA.SINA)\r\n .withText(share.getContent()).withTitle(share.getTitle()).withMedia(urlImage)\r\n .withTargetUrl(share.getUrl())\r\n .setCallback(umShareListener).share();\r\n\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu){\n\n getMenuInflater().inflate(R.menu.menu_aboutus, menu);\n\n// Inflate the menu; this adds items to the action bar if it is present.\n\n MenuItem shareItem = menu.findItem(R.id.menu_share);\n myShareActionProvider = (ShareActionProvider) MenuItemCompat.getActionProvider(shareItem);\n myShareActionProvider.setShareHistoryFileName(\n ShareActionProvider.DEFAULT_SHARE_HISTORY_FILE_NAME);\n myShareActionProvider.setShareIntent(Shareintent());\n\n return super.onCreateOptionsMenu(menu);\n\n\n }", "public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == R.id.action_share) {\n String tags = ((MultiAutoCompleteTextView) findViewById(R.id.share_tags)).getText().toString();\n new sharePost()\n .execute(postId,description.getText().toString(),\"Post\",ownerId,tags);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public void onClick(View v) {\n UMImage urlImage = new UMImage(LotteryListActivity.this,\r\n share.getImage());\r\n new ShareAction(LotteryListActivity.this)\r\n .setPlatform(SHARE_MEDIA.WEIXIN)\r\n .withText(share.getContent()).withTitle(share.getTitle()).withMedia(urlImage)\r\n .withTargetUrl(share.getUrl())\r\n .setCallback(umShareListener).share();\r\n\r\n }", "@Override\n public void onClick(View v) {\n String shareBody =item.title.toString()+\"\\n\\n\"+getResources().getString(R.string.item_show)+\"\\n\"+ Config.APP_IMAGES_URL.replace(\"uploads/\",\"share/\")+item.id;\n Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);\n sharingIntent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.app_name));\n startActivity(Intent.createChooser(sharingIntent, getResources().getString(R.string.app_name)));\n }", "protected void showShare() {\n \t\tApplicationData applicationData;\n \t\ttry {\n \t\t\tapplicationData = ApplicationData.readApplicationData(this);\n \t\t\tif(applicationData != null){\n \t\t\t\tIntent intent = getIntent();\n \t\t\t\tNextLevel nextLevel = (NextLevel)intent.getSerializableExtra(ApplicationData.NEXT_LEVEL_TAG);\n \t\t\t\tAppLevelDataItem item = applicationData.getDataItem(this, nextLevel);\t\t\t\t\n \t\t\t\tAppDataItemText textItem;\n \t\t\t\ttry {\n \t\t\t\t\ttextItem = (AppDataItemText)item;\n \t\t\t\t\t\n \t\t\t\t\tIntent sharingIntent = new Intent(Intent.ACTION_SEND);\n \t\t\t\t\tsharingIntent.setType(\"text/plain\");\n \t\t\t\t\t//sharingIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[] { \"contacto@neurowork.net\" });\n \t\t\t\t\tsharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, textItem.getItemText());\n \t\t\t\t\tstartActivity(Intent.createChooser(sharingIntent,\"Compartir contenido\"));\n \n \t\t\t\t}catch (ClassCastException e) {\n \t\t\t\t}\n \t\t\t}\n \t\t} catch (InvalidFileException e) {\n \t\t}\n \t}", "private void shareLink(View v) {\n Intent share = new Intent(Intent.ACTION_SEND);\n\n // If you want to share a png image only, you can do:\n // setType(\"image/png\"); OR for jpeg: setType(\"image/jpeg\");\n share.setType(\"image/*\");\n\n // Make sure you put example png image named myImage.png in your\n // directory\n\n\n Log.d(\"\", \"PATH:\" + path);\n\n File imageFileToShare = new File(path);\n Uri uri = Uri.fromFile(imageFileToShare);\n share.putExtra(Intent.EXTRA_TEXT, \"https://play.google.com/store/apps/details?id=btech.natural.wallpaper\");\n share.putExtra(Intent.EXTRA_STREAM, uri);\n\n startActivity(Intent.createChooser(share, \"Share Image!\"));\n }", "@Override\r\n public void onClick(View v) {\n UMImage urlImage = new UMImage(LotteryListActivity.this,\r\n share.getImage());\r\n new ShareAction(LotteryListActivity.this)\r\n .setPlatform(SHARE_MEDIA.WEIXIN_CIRCLE)\r\n .withText(share.getContent()).withTitle(share.getTitle()).withMedia(urlImage)\r\n .withTargetUrl(share.getUrl())\r\n .setCallback(umShareListener).share();\r\n\r\n }", "public void postToFB(View view) {\n\n// Toast.makeText(getBaseContext(), \"Posted Story on Timeline\", Toast.LENGTH_SHORT).show();\n\n if (ShareDialog.canShow(ShareLinkContent.class)) {\n ShareLinkContent linkContent = null;\n try {\n linkContent = new ShareLinkContent.Builder()\n .setContentTitle(basic.getString(\"title\"))\n .setContentUrl(Uri.parse(basic.getString(\"viewItemURL\")))\n .setContentDescription(\n ((TextView) findViewById(R.id.price)).getText().toString() + \"\\n\" +\n ((TextView) findViewById(R.id.shippingInfo)).getText().toString()\n )\n .setImageUrl(Uri.parse(basic.getString(\"galleryURL\")))\n .build();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n// if(linkContent != null)\n shareDialog.show(linkContent);\n\n// ShareLinkContent content = new ShareLinkContent.Builder()\n// .setContentUrl(Uri.parse(\"https://developers.facebook.com\"))\n// .build();\n//\n// shareDialog.show(content);\n\n\n }\n }", "public void linkShare() {\n\t\tclientOutput.println(\">>> Link do vaseg drajva je: \" + new File(\"drive\").getAbsolutePath() + \"\\\\\" + username);\n\t}", "@Override\r\n\tpublic void ShowShare(Context _in_context, String _in_data) {\n\t\tTypeSDKLogger.e( \"ShowShare\");\r\n\t}", "@RequestMapping(value = \"/subproject/addSharedUser/{subProjectId}\", method = RequestMethod.POST)\r\n public String subProjectAddSharedUser(@RequestParam(\"sharedUserAdd\") String shareUser, @PathVariable(\"subProjectId\") String subProjectId) {\r\n User user = hibernateTemplate.get(User.class, shareUser);\r\n User loggedIn = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\r\n User u = hibernateTemplate.get(User.class, loggedIn.getUsername());\r\n if (user\r\n != null) {\r\n int pid = -1;\r\n try {\r\n pid = Integer.parseInt(subProjectId);\r\n } catch (Exception e) {\r\n LOG.error(e);\r\n }\r\n if (pid >= 0) {\r\n SubProject subProject = hibernateTemplate.get(SubProject.class, pid);\r\n if (!dataAccessService.isSubProjectAvailableToUser(subProject, u)) {\r\n return \"redirect:/accessdenied\";\r\n }\r\n if (subProject != null) {\r\n Set<User> sharedUsers = subProject.getSharedUserList();\r\n try {\r\n sharedUsers.add(user);\r\n subProject.setSharedUserList(sharedUsers);\r\n hibernateTemplate.merge(subProject);\r\n } catch (Exception e) {\r\n LOG.error(e);\r\n }\r\n }\r\n }\r\n }\r\n return \"redirect:/subproject/\" + subProjectId;\r\n }", "@Override\r\n\tpublic void ShowShare(Context _in_context, String _in_data) {\n\t\tTypeSDKLogger.e(\"ShowShare\");\r\n\t}", "public interface ShareInterface {\n\n/** 是否显示管理菜单 置顶, 删除*/\n// public boolean visibleManager ();\n\n/** 是否是置顶 2置顶, 其他 解除置顶 */\n public String getStick ();\n /** 是否是置顶 2置顶, 其他 解除置顶 */\n public void setStick (String s);\n\n/** 是否显示报名管理, 1线下活动, 2 线上活动,999 系列活动 , 显示管理, 其他不显示*/\n public String getCategory ();\n/** 创始人标记, 是否显示删除 1 创始人(显示删除)*/\n public String getIsJoin ();\n\n /**\n * 是否为新版的线下活动贴, null 否, 不为空 是新版活动帖\n * @return\n */\n public String getNewActive();\n\n /**\n * 俱乐部Id\n * @return\n */\n public String getClubId ();\n\n /**\n * 帖子Id\n * @return\n */\n public String getTopicId ();\n\n /**\n * 图片Url 地址\n * @return\n */\n public String getImageUrl ();\n\n /**\n * 分享显示标题\n * @return\n */\n public String getTitle ();\n\n /**\n * 分享内容\n * @return\n */\n public String getShareTxt ();\n\n /**\n * 分享连接地址\n * @return\n */\n public String getShareUrl ();\n\n /**\n * 帖子类型\n * @return 0, 其他, 1, 线上\n */\n public int getType();\n\n\n}", "static void addFileToShared() {\n\t\ttry {\n\t\t\tint fileMatchNumber = 0;\n\n\t\t\t// Get the current path of the user's not-shared files\n\t\t\tFile notSharedPath = new File(\"users/\" + username +\"/not-shared\");\n\t\t\t// Get the contents of the directory and store it in an array\n\t\t\tFile[] notSharedFiles = notSharedPath.listFiles();\n\n\t\t\tSystem.out.println(\"Non-Shared Files: \");\n\t\t\t// If the user has no non-shared files, let them know.\n\t\t\tif (notSharedFiles.length == 0) {\n\t\t\t\tSystem.out.println(\"\\t --- \" + username + \" has no non-shared files. ---\");\n System.out.println();\n\t\t\t\t// This has been added in order to allow the user to review the results before going back to the main menu\n\t\t\t\t// Upon pressing Enter, the main menu will come back up again and ready for a new menu option to be selected\n try {\n System.out.println(\"Press any key to return\");\n input.readLine();\n } catch (Exception e) {\n System.out.println(\"Error! \" + e.getMessage());\n }\n return;\n\t\t\t}\n\n\t\t\t// If the directory has files in it, print them on the screen to help the user with selection\n\t\t\tfor(File file : notSharedFiles) {\n\t\t\t\tSystem.out.println(\"\\t + \" + file.getName());\n\t\t\t}\n\t\t\t// Let the user enter which file they would like to share\n System.out.println();\n\t\t\tSystem.out.println(\"Enter the name of the file you wish to share followed by Enter\");\n\t\t\tSystem.out.print(\"Your Entry: \");\n\n\t\t\tString fileToShare = input.readLine();\n\n\t\t\t// If the filename the user has entered is in the directory, then set the fileMatchNumber to be 1\n\t\t\tfor (int i = 0; i < notSharedFiles.length; i++) {\n\t\t\t\tif (fileToShare.equals(notSharedFiles[i].getName())) {\n\t\t\t\t\tfileMatchNumber = 1;\n\t\t\t\t}\n\t\t\t}\n System.out.println();\n\t\t\t// If the fileMatchNumber is equal to 1, then pass the request to the database via the CORBA server to register the file as available for sharing\n\t\t\tif (fileMatchNumber == 1) {\n\t\t\t\tSystem.out.println(server.startFileShare(username, fileToShare));\n\n\t\t\t\t// Now, copy the file to the shared directory and remove it from the user's not-shared directory\n\t\t\t\tFile nonSharedFileToMove = new File(\"users/\" + username +\"/not-shared/\" + fileToShare);\n\t\t\t\tif(nonSharedFileToMove.renameTo(new File(\"users/\" + username +\"/shared/\" + fileToShare))) {\n\t\t\t\t\tnonSharedFileToMove.delete();\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Otherwise, the user entered an invalid filename\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"--------------------------------------------------------------------\");\n\t\t\t\tSystem.out.println(\"You have entered an invalid file name.\");\n\t\t\t}\n\t\t}\n\t\t// Catch any errors and terminate the function\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Error! : \" + e.getMessage());\n\t\t\treturn;\n\t\t}\n System.out.println();\n\t\t// This has been added in order to allow the user to review the results before going back to the main menu\n\t\t// Upon pressing Enter, the main menu will come back up again and ready for a new menu option to be selected\n try {\n System.out.println(\"Press any key to return\");\n input.readLine();\n } catch (Exception e) {\n System.out.println(\"Error! \" + e.getMessage());\n }\n\t}", "@Override\n public void onClick(View view) {\n Intent sharingIntent = new Intent(Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n sharingIntent.putExtra(Intent.EXTRA_TITLE,title );\n sharingIntent.putExtra(Intent.EXTRA_TEXT,description);\n startActivity(Intent.createChooser(sharingIntent,\"Share using\"));\n\n }", "public void setShareName(java.lang.String shareName) {\n this.shareName = shareName;\n }", "@Override\n\tpublic ToolStripButton getShareButton() {\n\t\treturn shareButton;\n\t}", "public void sharePage(){\n Intent shareIntent = new Intent(Intent.ACTION_VIEW);\n shareIntent.setData(Uri.parse(\"http://192.168.43.105:5000\"));//edit url\n startActivity(shareIntent);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_share) {\n createShareIntent();\n }\n\n return super.onOptionsItemSelected(item);\n }", "public void plotShare()\r\n\t{\r\n\t\tSystem.out.println(\"Name: \" + name + \" Short name: \" + shortName + \" WKN: \" + wkn);\r\n\t\tif(share == null)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Entry has no data yet. If you want to update the data use the 'IMPORT' function\\n\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tshare.plot();\r\n\t\t}\r\n\t}", "public void Share(String url) {\n Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, url);\n Intent createChooser = Intent.createChooser(sharingIntent, \"Share via\");\n createChooser.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(createChooser);\n }", "public void onClickShare(MenuItem mi) {\n mCanvas.getSurfaceView().queueEvent(new Runnable() {public void run() {\n mCanvas.save(mSavePath, PaintPaint.AUTOSAVE);\n File file = new File(mSavePath+PaintPaint.AUTOSAVE);\n Intent intent = new Intent(android.content.Intent.ACTION_SEND);\n intent.setType(\"image/png\");\n intent.putExtra(Intent.EXTRA_STREAM,Uri.fromFile(file));\n startActivity(Intent.createChooser(intent, \"Share image\"));\n }});\n }", "private void tjshowShare() {\n\t\tShareSDK.initSDK(getActivity(), \"171a7e7c3c736\");\n\t\tOnekeyShare oks = new OnekeyShare();\n\t\t// 关闭sso授权\n\t\toks.disableSSOWhenAuthorize();\n\n\t\t// 分享时Notification的图标和文字 2.5.9以后的版本不调用此方法\n\t\t// oks.setNotification(R.drawable.ic_launcher,\n\t\t// getString(R.string.app_name));\n\t\t// 信息分享时电话\n//\t\toks.setAddress(zhuproduct.getData().getStore_info().getStore_tel());\n\t\t// title标题,印象笔记、邮箱、信息、微信、人人网和QQ空间使用\n\t\toks.setTitle(\"【餐餐抢】\");\n\t\t// titleUrl是标题的网络链接,仅在人人网和QQ空间使用\n\t\toks.setTitleUrl(SharedUtil.getStringValue(\n\t\t\t\tSharedCommon.MALL_QRCODE_IMG_AZ_URL, \"\"));\n\t\t// text是分享文本,所有平台都需要这个字段\n\t\toks.setText(\"作为你的好朋友,我忍不住给你推荐一个平台帮你暴增客流量,提升营业额,别犹豫,相信我!马上入驻吧!\");\n\t\t// imagePath是图片的本地路径,Linked-In以外的平台都支持此参数\n\t\toks.setImagePath(SharedUtil.getStringValue(SharedCommon.MALL_FX, \"\"));// 确保SDcard下面存在此张图片\n\t\toks.setImageUrl(SharedUtil.getStringValue(SharedCommon.MALL_FX, \"\"));\n\t\t// url仅在微信(包括好友和朋友圈)中使用\n\t\toks.setUrl(\"http://www.28yun.com/api_wap/tmpl/merchant/merchant_enter.html\");\n\t\t// comment是我对这条分享的评论,仅在人人网和QQ空间使用\n\t\toks.setComment(\"我是测试评论文本\");\n\t\t// site是分享此内容的网站名称,仅在QQ空间使用\n\t\toks.setSite(getString(R.string.app_name));\n\t\t// siteUrl是分享此内容的网站地址,仅在QQ空间使用\n\t\toks.setSiteUrl(SharedUtil.getStringValue(\n\t\t\t\tSharedCommon.MALL_QRCODE_IMG_AZ_URL, \"\"));\n\n\t\t// 启动分享GUI\n\t\toks.show(getActivity());\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_one_page, menu);\n\n\n //Setting up the Share Action Provider\n provider = (ShareActionProvider) menu.findItem(R.id.menu_share).getActionProvider();\n provider.setShareIntent(getDefaultShareIntent());\n return super.onCreateOptionsMenu(menu);\n }", "public boolean addSchemaSharing(String sharedUsername, long shareableSchemaID)\n\t{\n\t\tboolean sharingAdded = true;\n\t\t\n\t\t//Connecting to data base\n \t\tconnect();\n \t\t\n\t\tif (dbConnection == null)\t\t\t\t\t\t\t//failed connection\n \t\t{\n \t\t\treturn false;\n \t\t}\n\t\t\n\t\t//Proceeding, if database connection is successful\n\t\ttry\n\t\t{\n\t\t\t//Inserting a record for the new schema sharing into the shared schemas table\n\t\t\tString insertSharingStmt = \"INSERT INTO shared_schema VALUES( ? , ? );\";\n\t\t\t\n\t\t\tdbConnection.setAutoCommit(false);\n\t\t\tPreparedStatement prepStmt = dbConnection.prepareStatement(insertSharingStmt);\n\t\t\tprepStmt.setString(1, sharedUsername);\n\t\t\tprepStmt.setLong(2, shareableSchemaID);\n\t\t\t\n\t \t\tprepStmt.executeUpdate();\n\t \t\tdbConnection.commit();\n\t \t\tprepStmt.close();\n\t\t}\n\t\tcatch(SQLException sqle)\n\t\t{\n\t\t\tsharingAdded = false;\n\t\t\tString errMsg = sqle.getMessage();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tdbConnection.rollback();\n\t\t\t}\n\t\t\tcatch(SQLException rollbackExcp)\n\t\t\t{\n\t\t\t\terrMsg = errMsg + \" and \" + rollbackExcp.getMessage();\n\t\t\t}\n\t\t\t\n\t\t\tlog.error(\"SQLException occurred while adding new schema sharing to user schema database... \" + errMsg);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tdisconnect();\n\t\t}\n \t\t\n\t\treturn sharingAdded;\n\t}", "public void addToShared(Document doc) {\n\t\tif(doc != null)\n\t\t\tsharedToMe.add(doc);\n\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tSharebean sharebean = new Sharebean();\n\t\t\t\tsharebean.setTitle(adapter.getList().get(arg2 - 1).getTitle());\n\t\t\t\tsharebean.setContext(adapter.getList().get(arg2 - 1).getContent().substring(0, 50));\n\t\t\t\tsharebean.setAricleUrl(adapter.getList().get(arg2 - 1).getUrl());\n\t\t\t\tsharebean.setImgUrl(adapter.getList().get(arg2 - 1).getCover());\n\t\t\t\tsharebean.setIs_dig(adapter.getList().get(arg2).isIs_dig());\n\t\t\t\tbundle.putSerializable(WebShareAct.class.getName(), sharebean);\n\t\t\t\tsharebean.setAricleId(String.valueOf(adapter.getList().get(arg2 - 1).getArticle_id()));\n\t\t\t\topenActivity(WebShareAct.class, bundle);\n\t\t\t}", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_share:\n Intent intent = new Intent(Intent.ACTION_SEND);\n intent.setType(\"text/plain\");\n String link;\n //Test if its from google or b-ok\n if(book.getVolumeInfo().getWebLink().contains(\"books.google.com\")) {\n link = book.getVolumeInfo().getWebLink();\n }\n else {\n link = \"https://1lib.eu\" + book.getVolumeInfo().getWebLink();\n }\n intent.putExtra(Intent.EXTRA_TEXT, link);\n startActivity(Intent.createChooser(intent, \"Share with\"));\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_detail, menu);\n MenuItem mi = menu.findItem(R.id.shareid);\n\n sap = (ShareActionProvider) MenuItemCompat.getActionProvider(mi);\n Intent iu = new Intent(Intent.ACTION_SEND);\n TextView tv = (TextView) findViewById(R.id.my_weat);\n data = tv.getText().toString();\n iu.setType(\"text/plain\");\n Log.e(\"hello\", data);\n iu.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);\n iu.putExtra(Intent.EXTRA_TEXT, data + \" #Sunshineapp\");\n if(sap!=null) {\n Log.e(\"uclicked\", \"share button\");\n sap.setShareIntent(iu);\n //startActivity(iu);\n }\n return true;\n }", "int insert(Shareholder record);", "public ShareDialogW(final AppW app, Widget anchor, Widget geogebraButton,\r\n\t\t\tString shareURL) {\r\n\t\tsuper(app.getPanel(), app);\r\n\t\tthis.anchor = anchor;\r\n\t\tthis.app = app;\r\n\t\tthis.loc = app.getLocalization();\r\n\t\tthis.shareURL = shareURL;\r\n\t\tthis.geogebraButton = geogebraButton;\r\n\t\tthis.setGlassEnabled(true);\r\n\r\n\t\tthis.getCaption().setText(app.getLocalization().getMenu(\"Share\"));\r\n\t\tthis.contentPanel = new VerticalPanel();\r\n\t\tthis.contentPanel.add(getTabPanel());\r\n\t\tthis.add(this.contentPanel);\r\n\t\taddStyleName(\"shareDialog\");\r\n\t}", "public Link add(Link link);", "private void share() {\n try {\n File imagesFolder = new File(getCacheDir(), \"images\");\n if (!imagesFolder.exists()) {\n if (!imagesFolder.mkdirs()) {\n Log.e(\"Pixelart\", \"Could not create directory\");\n }\n }\n File cacheFile = new File(imagesFolder, \"shared_image.png\");\n FileOutputStream fos = new FileOutputStream(cacheFile);\n sprite.compress(Bitmap.CompressFormat.PNG, 100, fos);\n fos.flush();\n fos.close();\n Uri uri = FileProvider.getUriForFile(this,\n \"com.funguscow.fileprovider\",\n cacheFile);\n Intent shareIntent = new Intent();\n shareIntent.setAction(Intent.ACTION_SEND);\n shareIntent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n shareIntent.putExtra(Intent.EXTRA_STREAM, uri);\n shareIntent.setDataAndType(uri, \"image/png\");\n startActivity(Intent.createChooser(shareIntent, \"Share\"));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void add() {\n\t\tHashMap<String, String> data = new HashMap<>();\n\t\tdata.put(\"title\", title);\n\t\tdata.put(\"author\", author);\n\t\tdata.put(\"publisher\", publisher);\n\t\tdata.put(\"isbn\", isbn);\n\t\tdata.put(\"bookID\", bookID);\n\t\tHashMap<String, Object> result = null;\n\t\tString endpoint = \"bookinfo/post.php\";\n\t\ttry {\n\t\t\tresult = APIClient.post(BookInfo.host + endpoint, data);\n\t\t\tvalid = result.get(\"status_code\").equals(\"Success\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n MenuItem item = menu.findItem(R.id.menu_item_share);\r\n ShareActionProvider myShareActionProvider = (ShareActionProvider)MenuItemCompat.getActionProvider(item);\r\n myShareActionProvider.setShareHistoryFileName(\"test\");\r\n \r\n Intent myIntent = new Intent();\r\n myIntent.setAction(Intent.ACTION_SEND);\r\n myIntent.putExtra(Intent.EXTRA_TEXT, getResources().getString(R.string.sms_body));\r\n myIntent.setType(\"text/plain\");\r\n\r\n myShareActionProvider.setShareIntent(myIntent);\r\n\r\n\t\treturn true;\r\n\t}", "private void share(String title, String text)\n {\n Intent sendIntent = new Intent();\n sendIntent.setAction(Intent.ACTION_SEND);\n sendIntent.putExtra(Intent.EXTRA_TEXT, text);\n sendIntent.setType(\"text/plain\");\n startActivity(Intent.createChooser(sendIntent, title));\n }", "public void gppShare_openBasicShareDialog () {\n\t\tGPPShare.sharedInstance().shareDialog().open();\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}", "private void onAddClicked() {\r\n\t\t\r\n\t\tString givenName = Window.showStudentDialog();\r\n\t\t\r\n\t\tif (givenName != null) {\r\n\t\t\t\r\n\t\t\tif(!chart.addStudentName(givenName)) {\r\n\t\t\t\tWindow.msg(\"There are no seats available.\");\r\n\t\t\t}\r\n\t\t\tupdate();\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n public void onClick(View v) {\n Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n String shareBody = caption + \" - \" + description;\n sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, \"Sobers Stories\");\n sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);\n startActivity(Intent.createChooser(sharingIntent, \"Share With Friends\"));\n\n }", "private void shareImage() {\n Intent share = new Intent(Intent.ACTION_SEND);\n\n // If you want to share a png image only, you can do:\n // setType(\"image/png\"); OR for jpeg: setType(\"image/jpeg\");\n share.setType(\"image/*\");\n\n // Make sure you put example png image named myImage.png in your\n // directory\n\n\n Log.d(\"PATH\", \"PATH:\" + path);\n\n File imageFileToShare = new File(path);\n Uri uri = Uri.fromFile(imageFileToShare);\n //share.putExtra(Intent.EXTRA_TEXT, \"https://play.google.com/store/apps/details?id=kailash.natural.wallpaper\");\n share.putExtra(Intent.EXTRA_STREAM, uri);\n\n startActivity(Intent.createChooser(share, \"Share Image!\"));\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.details, menu);\n\n // Set up ShareActionProvider's default share intent\n mShareActionProvider = (ShareActionProvider) menu.findItem(R.id.action_share).getActionProvider();\n mShareActionProvider.setShareIntent(getDefaultIntent());\n\n return true;\n }", "public boolean canShare();", "@Override\n\t\t\t\t\t\tpublic void onClick(View arg0) {\n Intent share=new Intent(android.content.Intent.ACTION_SEND);\n\n share.setType(\"text/plain\");\n share.putExtra(android.content.Intent.EXTRA_SUBJECT,news.getTitle());\n share.putExtra(android.content.Intent.EXTRA_TEXT,\"Follow the link : \"+MainActivity.base_url+news.getAbsolute_url()+\" to read more\");\n startActivity(Intent.createChooser(share,\"Share via\"));\n\t\t\t\t\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.detail, menu);\n\n // Retrieve the share menu item\n MenuItem menuItem = menu.findItem(R.id.action_share);\n\n // Get the provider and hold onto it to set/change the share intent\n ShareActionProvider mShareActionProvider = (ShareActionProvider) MenuItemCompat.getActionProvider(menuItem);\n\n\n // Attach an intent to this ShareActionProvider. You can update this at any time,\n // like when the user selects a new piece of data they might like to share.\n if (mShareActionProvider != null) {\n mShareActionProvider.setShareIntent(createShareForecastIntent());\n } else {\n Log.d(TAG, \"Share Action Provider is null?\");\n }\n\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id==R.id.action_share){\n Intent shareintent = Share.share(content);\n startActivity(Intent.createChooser(shareintent, getResources().getString(R.string.app_name)));\n\n }\n return super.onOptionsItemSelected(item);\n }", "public void share(View view) {\n if (urlImage != \"\") {\n try {\n new ShareOnFacebook(bitmapArray, this).share();\n } catch (Exception e) {\n e.printStackTrace();\n Intent mIntentFacebookBrowser = new Intent(Intent.ACTION_SEND);\n String mStringURL = \"https://www.facebook.com/sharer/sharer.php?u=\" + urlImage;\n mIntentFacebookBrowser = new Intent(Intent.ACTION_VIEW, Uri.parse(mStringURL));\n startActivity(mIntentFacebookBrowser);\n }\n }\n }", "@Override\r\n\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n\r\n switch (item.getItemId()) {\r\n\r\n case R.id.mShare:\r\n\r\n Intent i = new Intent(\r\n\r\n android.content.Intent.ACTION_SEND);\r\n\r\n i.setType(\"text/plain\");\r\n\r\n i.putExtra(\r\n\r\n android.content.Intent.EXTRA_TEXT, \"This is my grocery list\");\r\n\r\n startActivity(Intent.createChooser(\r\n\r\n i,\r\n\r\n \"Share using\"));\r\n\r\n break;\r\n\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n\r\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_shareddocument);\n\t\tsharedListView = (ListView) findViewById(R.id.shared_list_view);\n\t\tnoSharedView = (LinearLayout) findViewById(R.id.no_shared_view);\n\t\tsharedListView.setEmptyView(noSharedView);\n\t\tParseUser currentUser = ParseUser.getCurrentUser();\n\t\tauthor = currentUser.getString(\"username\");\n\t\tdbh = new DBhelper(this);\n\t\tSQLiteDatabase db = dbh.getReadableDatabase();\n\t\tCursor c1 = db.rawQuery(\"SELECT _id, title, subtitle, content, author, otheruser FROM todos WHERE otheruser = '\" + author + \"'\", null);\n\t\tadapter = new SimpleCursorAdapter(this, R.layout.activity_items, c1, from, to, 0);\n\t\tadapter.notifyDataSetChanged();\n\t\t\n\t\tsharedListView.setAdapter(adapter);\n\t\t\n\t\tsharedListView.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tTextView title3 = (TextView) arg1.findViewById(R.id.title4);\n\t\t\t\tTextView subtitle3 = (TextView) arg1.findViewById(R.id.subtitle4);\n\t\t\t\tTextView content3 = (TextView) arg1.findViewById(R.id.content4);\n\t\t\t\tTextView id = (TextView) arg1.findViewById(R.id.id1);\n\t\t\t\tTextView author = (TextView) arg1.findViewById(R.id.otheruser1);\n\t\t\t\tString title = title3.getText().toString();\n\t\t\t\tString subtitle = subtitle3.getText().toString();\n\t\t\t\tString content = content3.getText().toString();\n\t\t\t\tString author1 = author.getText().toString();\n\t\t\t\tString id1 = id.getText().toString();\n\t\t\t\tIntent i = new Intent(getApplicationContext(), NewDocument.class);\n\t\t\t\ti.putExtra(\"title\", title);\n\t\t\t\ti.putExtra(\"subtitle\", subtitle);\n\t\t\t\ti.putExtra(\"content\", content);\n\t\t\t\ti.putExtra(\"id\", id1);\n\t\t\t\ti.putExtra(\"author\", author1);\n\t\t\t\tstartActivityForResult(i,EDIT_ACTIVITY_CODE);\n\t\t\t}\n\t\t});\n\t\t\n\t}", "private void createShareIntent() {\n String body2 = TEXT_TO_SHARE2;\n\n //Step 2: Create the shareIntent with action 'Intent.ACTION_SEND'\n Intent sendIntent = new Intent(Intent.ACTION_SEND);\n\n //Step 3: Specify the intent type\n //E.g. shareIntent.setType(\"text/plain\");\n sendIntent.setType(\"text/plain\");\n\n //Step 4: Add the text to share as an extra data (Intent.EXTRA_TEXT)\n sendIntent.putExtra(Intent.EXTRA_TEXT, body2);\n\n Intent shareIntent = Intent.createChooser(sendIntent, null);\n\n //Step 5: Start shareIntent\n startActivity(shareIntent);\n\n }", "private void sharePlan(){\n Intent shareIntent = new Intent(Intent.ACTION_SEND);\n shareIntent.setType(\"text/plain\");\n shareIntent.putExtra(Intent.EXTRA_SUBJECT, \"My Planit Plan\");\n shareIntent.putExtra(Intent.EXTRA_TEXT,\n \"Hi All! This is my plan made using Planit! www.planit.com/10293987\");\n startActivity(Intent.createChooser(shareIntent, \"Share with\"));\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.ex_002_manu_main, menu);\n\n MenuItem shareItem = menu.findItem(R.id.share);\n /** Getting the actionprovider associated with the menu ex_005_item whose id is share */\n mShareActionProvider = (ShareActionProvider) MenuItemCompat.getActionProvider(shareItem);\n Log.d(\"data\", data + \" Options menu\");\n\n Intent intent = getDefaultShareIntent();\n /** Setting a share intent */\n mShareActionProvider.setShareIntent(intent);\n\n return super.onCreateOptionsMenu(menu);\n\n }", "private void shareDataOnLinkedin() {\n\n OAuthConsumer consumer = new CommonsHttpOAuthConsumer(Constants.CONSUMER_KEY, Constants.CONSUMER_SECRET);\n consumer.setTokenWithSecret(accessToken.getToken(), accessToken.getTokenSecret());\n DefaultHttpClient httpclient = new DefaultHttpClient();\n HttpPost post = new HttpPost(\"https://api.linkedin.com/v1/people/~/shares\");\n\n try {\n consumer.sign(post);\n } catch (OAuthMessageSignerException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (OAuthExpectationFailedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (OAuthCommunicationException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n // here need the consumer for sign in for post the share\n post.setHeader(\"content-type\", \"text/XML\");\n/*\n <share ><comment > This is a test</comment ><visibility ><code > anyone </code ></\n visibility ></share >*/\n\n /* String myEntity = \"{\" +\n \"\\\"comment\\\":\\\"Check out developer.linkedin.com! \" +\n \"http://linkd.in/1FC2PyG\\\",\" +\n \"\\\"visibility\\\":{\" + \"\\\"code\\\":\\\"anyone\\\"}\" +\n \"}\";*/\n\n String myEntity = \"<share>\"\n + \"<comment>Check out work of Logiguyz Tech!</comment>\"\n + \"<content>\"\n + \"<title>Logiguyz Tech</title>\"\n + \"<description>Great mobile apps development organization</description>\"\n + \"<submitted-url>www.logiguyz.com</submitted-url>\"\n //+ \"<submitted-image-url>http://m3.licdn.com/media/p/3/000/124/1a6/089a29a.png</submitted-image-url>\"\n + \"</content>\"\n + \"<visibility> \"\n + \" <code>anyone</code>\"\n + \"</visibility>\"\n + \"</share>\";\n\n Log.e(\"myEntity\", \"*\" + myEntity);\n try {\n String res = \"\";\n\n post.setEntity(new StringEntity(myEntity));\n org.apache.http.HttpResponse response = httpclient.execute(post);\n if (response != null) {\n HttpEntity resEntity = response.getEntity();\n res = EntityUtils.toString(resEntity);\n // .....Read the response\n }\n\n Log.e(\"response\", res);\n Toast.makeText(Login.this, \"Shared sucessfully\" + res, Toast.LENGTH_SHORT).show();\n } catch (UnsupportedEncodingException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (ClientProtocolException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case R.id.menu_share:\n shareRecipe();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_edit) {\n\n Intent intent = new Intent(getApplicationContext(), AddTripActivity.class);\n\n intent.putExtra(\"TripID\", tripItem.getID());\n\n startActivityForResult(intent, EDIT_TRIP_CODE);\n\n return true;\n } else if (id == R.id.action_view_map) {\n Intent intent = new Intent(getApplicationContext(), MapActivity.class);\n\n intent.putExtra(\"TRIP\", tripID);\n\n startActivity(intent);\n\n return true;\n } else if(id == R.id.menu_item_share) {\n\n String text = \"Have a look at Joshes Place, \" + tripItem.getTitle();\n\n Intent sharingIntent = new Intent(Intent.ACTION_SEND_MULTIPLE);\n sharingIntent.setType(\"*/*\");\n\n sharingIntent.putExtra(Intent.EXTRA_SUBJECT, \"Joshes Trip, \" + tripItem.getTitle());\n\n ArrayList<Uri> imageUris = new ArrayList<Uri>();\n\n\n if((tripItem.getPic() != null) && (tripItem.getPic().getID() > 0)) {\n String pathofBmp = MediaStore.Images.Media.insertImage(getContentResolver(), tripItem.getPic().getImage(), tripItem.getPic().getTitle(), null);\n Uri bmpUri = Uri.parse(pathofBmp);\n\n imageUris.add(bmpUri);\n }\n\n\n\n List<Note> notes = tripItem.getNotes();\n\n\n\n if(notes.size() > 0) {\n\n text += \"\\nNotes:\\n\";\n\n for (Note n : notes) {\n text += n.getTitle() + \", \\n\" + n.getNote() + \"\\n\";\n\n\n }\n\n }\n\n List<String> companions = tripItem.getCompanions();\n\n if(companions.size() > 0) {\n\n text += \"\\nCompanions:\\n\";\n\n for (String s : companions) {\n text += s + \"\\n\";\n\n\n }\n\n }\n\n List<PlaceItem> places = tripItem.getPlaces();\n\n if(places.size() > 0) {\n\n text += \"\\nPlaces Visited: \\n\";\n\n for(PlaceItem p : places) {\n text += p.getTitle() + \" (\" + p.getDate() + \")\\n\";\n }\n }\n\n text +=\"\\nHere on: \" + tripItem.getStartDate() + \" to \" + tripItem.getEndDate();\n\n\n\n ArrayList<ImageItem> images = tripItem.getImages();\n\n\n if(images.size() > 0) {\n\n sharingIntent.putExtra(Intent.EXTRA_TEXT, \"\\nImages:\\n\");\n\n\n\n for (ImageItem i : images) {\n String pathofBmp = MediaStore.Images.Media.insertImage(getContentResolver(), i.getImage(), i.getTitle(), null);\n Uri bmpUri = Uri.parse(pathofBmp);\n\n imageUris.add(bmpUri);\n\n\n\n }\n\n sharingIntent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, imageUris);\n\n }\n\n sharingIntent.putExtra(Intent.EXTRA_TEXT, text);\n\n\n\n\n\n\n startActivity(Intent.createChooser(sharingIntent, \"Share trip using\"));\n }\n\n\n return super.onOptionsItemSelected(item);\n }", "private void shareRecipe(){\n Intent shareRecipeIntent = new Intent();\n shareRecipeIntent.setAction(Intent.ACTION_SEND);\n shareRecipeIntent.putExtra(Intent.EXTRA_TITLE, \"Check out this recipe that I found on My Recipes Book\");\n shareRecipeIntent.putExtra(Intent.EXTRA_TEXT, setTextForSharing());\n shareRecipeIntent.setType(\"text/plain\");\n startActivity(Intent.createChooser(shareRecipeIntent, getResources().getString(R.string.share_intent_text)));\n }", "private void shareOnFacebook() {\n // Take a screen shot\n takeScreenShot(imgSharedFacebook);\n final File screenShotfile = new File(SCREENSHOTS_LOCATIONS, mQuestionScreenShotName);\n final Uri screenShotUri = Uri.fromFile(screenShotfile);\n final String shareSubject = \"Congratulation!\";\n String shareBody = \"http://p2a.asia\";\n if (mSession != null) {\n shareBody = \"You won P2A ASEAN Game with \" + mSession.get_session_total_score() +\n \" score. Visit our site here: http://www.p2a.asia\";\n }\n final Intent sharingTotalScoreIntent = new Intent(Intent.ACTION_SEND);\n sharingTotalScoreIntent.putExtra(Intent.EXTRA_SUBJECT, shareSubject);\n sharingTotalScoreIntent.putExtra(Intent.EXTRA_TEXT, shareBody);\n sharingTotalScoreIntent.setType(\"image/*\");\n sharingTotalScoreIntent.putExtra(Intent.EXTRA_STREAM, screenShotUri);\n sharingTotalScoreIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n startActivity(Intent.createChooser(sharingTotalScoreIntent, \"Share your score via\"));\n }", "private void shareSMS() {\r\n EventSharer.shareSMS(this, event.uid);\r\n }", "private void showShareView() {\n Timber.d(\"showShareView\");\n }", "@Override\r\n\t\t\tpublic void onClick(View v)\r\n\t\t\t{\n\t\t\t\tshareViaFacebook();\r\n\t\t\t}", "private void initShare() {\n // Create ShareHelper\n mShareHelper = new ShareHelper(mContext);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.detailfragment, menu);\n MenuItem menuItem = menu.findItem(R.id.action_share);\n if(menuItem != null) {\n ShareActionProvider mShareActionProvider = (ShareActionProvider) menuItem.getActionProvider();\n if(mShareActionProvider != null) {\n mShareActionProvider.setShareIntent(createShareForecastIntent());\n }\n }\n }", "private void saveNewFeed() {\n String rssUrl = mUrlEditText.getText().toString();\n\n if (!rssUrl.equals(\"\") && userNotAlreadyFollowing(rssUrl)) {\n getActivity().setProgressBarIndeterminateVisibility(true);\n\n FeedProcessingService service = new FeedProcessingService(getActivity(), mFeedHandler);\n service.getAndProcessFeed(rssUrl);\n }\n }", "public void addSite(WebSite site) {\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tContentValues values = new ContentValues();\n\t\tvalues.put(KEY_TITLE, site.getTitle());\n\t\tvalues.put(KEY_LINK, site.getLink());\n\t\tvalues.put(KEY_RSS_LINK, site.getRSSLink());\n\t\tvalues.put(KEY_DESCRIPTION, site.getDescription());\n\t\tif (!isRSSTabSiteAdded(db, site.getRSSLink())) {\n\t\t\tdb.insert(TABLE_RSS_NEW_ADD, null, values);\n\t\t\tdb.close();\n\t\t} else { \n\t\t\t//Toast.makeText(rssContext, \" This site may already exist in RSS Feeds. \", Toast.LENGTH_SHORT).show();\n\t\t\tupdateAddSite(site);\n\t\t\tdb.close();\n\t\t}\n\t}", "public int updShare(Long cid, Long shareamt, String datee, Long noShare,Long sindex) throws Exception{\n\tint i=DbConnect.getStatement().executeUpdate(\"insert into share_details values(\"+cid+\",\"+noShare+\",\"+shareamt+\",'\"+datee+\"',\"+sindex+\")\");\r\n\treturn i;\r\n}", "private void addRelationShipIsBuy() {\n ParseObject story = ParseObject.createWithoutData(\"Story\", objectId);\n\n // Get current User\n ParseUser user = ParseUser.getCurrentUser();\n\n // Create relationship collumn UserLove\n ParseRelation relation = user.getRelation(\"StoryPaid\");\n\n // Add story to Relation\n relation.add(story);\n\n // user save relation\n user.saveInBackground(new SaveCallback() {\n\n @Override\n public void done(ParseException e) {\n if (e == null) {\n //Toast.makeText(StoryDetails.this, \"User Buy this story, go to Your Book to see!!\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(getApplicationContext(),\n \"Error saving: \" + e.getMessage(),\n Toast.LENGTH_SHORT)\n .show();\n }\n }\n\n });\n\n }", "public void onShareclicked(MenuItem mi) {\n\t\tSmartImageView ivImage = (SmartImageView) findViewById(R.id.ivResult);\r\n\t\tUri bmpUri = getLocalBitmapUri(ivImage);\r\n\t\tif (bmpUri != null) {\r\n\t\t\t// Construct a ShareIntent with link to image\r\n\t\t\tIntent shareIntent = new Intent();\r\n\t\t\tshareIntent.setAction(Intent.ACTION_SEND);\r\n\t\t\tshareIntent.putExtra(Intent.EXTRA_STREAM, bmpUri);\r\n\t\t\tshareIntent.setType(\"image/*\");\r\n\t\t\t// Launch sharing dialog for image\r\n\t\t\tstartActivity(Intent.createChooser(shareIntent, \"Share Content\"));\r\n\t\t} else {\r\n\t\t\tLog.e(\"ERROR\", \"Image sending failed\");\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n\tpublic void share(Integer points){\n\t\tIntent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);\n\t\tsharingIntent.setType(\"text/plain\");\n\t\tString shareBody = \"I got \"+ points.toString()+\" points in the game \" + getResources().getString(R.string.app_name)+\". Are you able to beat me? https://play.google.com/store/apps/details?id=\"+getPackageName();\n\t\tsharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);\n\t\tstartActivity(Intent.createChooser(sharingIntent, \"Share via\"));\n\t}", "@Test\n\tpublic void testCreateShare() {\n\t\tShare newShare = new Share(\"Vodafone\", 2000, 1.5);\n\t\tShare savedShare = new Share(1L, \"Vodafone\", 2000, 1.5);\n\n\t\t// Telling mocked repository what to do\n\t\tMockito.when(this.repo.save(newShare)).thenReturn(savedShare);\n\n\t\t// Test\n\t\tassertThat(this.service.createShare(newShare)).isEqualTo(savedShare);\n\t\tMockito.verify(this.repo, Mockito.times(1)).save(newShare);\n\t}", "private void shareSound() {\n\t\tIntent intent = new Intent(\"com.soundcloud.android.SHARE\")\n\t\t\t\t.putExtra(Intent.EXTRA_STREAM, MEDIA_PATH + audioName)\n\t\t\t\t// here you can set metadata for the track to be uploaded\n\t\t\t\t.putExtra(\"com.soundcloud.android.extra.title\",\n\t\t\t\t\t\t\"SoundCloud Android Intent Demo upload\")\n\t\t\t\t.putExtra(\"com.soundcloud.android.extra.where\", \"Somewhere\")\n\t\t\t\t.putExtra(\"com.soundcloud.android.extra.description\",\n\t\t\t\t\t\t\"This is a demo track.\")\n\t\t\t\t.putExtra(\"com.soundcloud.android.extra.public\", true)\n\t\t\t\t.putExtra(\n\t\t\t\t\t\t\"com.soundcloud.android.extra.tags\",\n\t\t\t\t\t\tnew String[] {\n\t\t\t\t\t\t\t\t\"demo\",\n\t\t\t\t\t\t\t\t\"post lolcat bluez\",\n\t\t\t\t\t\t\t\t\"soundcloud:created-with-client-id=\"\n\t\t\t\t\t\t\t\t\t\t+ CLIENT_ID })\n\t\t\t\t.putExtra(\"com.soundcloud.android.extra.genre\",\n\t\t\t\t\t\t\"Easy Listening\")\n\t\t\t\t.putExtra(\"com.soundcloud.android.extra.location\",\n\t\t\t\t\t\tgetLocation());\n\n\t\ttry {\n\t\t\tstartActivityForResult(intent, SHARE_SOUND);\n\t\t} catch (ActivityNotFoundException notFound) {\n\t\t\t// use doesn't have SoundCloud app installed, show a dialog box\n\t\t\tshowDialog(DIALOG_NOT_INSTALLED);\n\t\t}\n\t}", "public void shareApp() {\n Intent shareIntent = new Intent(Intent.ACTION_SEND);\n shareIntent.setType(\"text/*\");\n shareIntent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.app_name));\n shareIntent.putExtra(Intent.EXTRA_TEXT, \"Try this \" + getResources().getString(R.string.app_name) + \" App: https://play.google.com/store/apps/details?id=\" + getApplicationContext().getPackageName());\n startActivity(Intent.createChooser(shareIntent, \"Share Using\"));\n }", "private Intent Shareintent(){\n Intent Shareintent = new Intent(Intent.ACTION_SEND);\n Shareintent.setType(\"text/html\");\n Shareintent.putExtra(Intent.EXTRA_SUBJECT, \"SUBJECT\");\n Shareintent.putExtra(Intent.EXTRA_TEXT, \"http://www.habeshastudent.com/m/video.html\");\n return Shareintent;\n\n\n }", "@Override\n public void addToWatchListClick(boolean isAddedOrNot, ContentDatum contentDatum) {\n currentActivity.sendBroadcast(new Intent(AppCMSPresenter.PRESENTER_PAGE_LOADING_ACTION));\n if (isUserLoggedIn()) {\n editWatchlist(contentDatum.getGist().getId() != null ? contentDatum.getGist().getId() : contentDatum.getId(), appCMSAddToWatchlistResult -> {\n currentActivity.sendBroadcast(new Intent(AppCMSPresenter.PRESENTER_STOP_PAGE_LOADING_ACTION));\n Toast.makeText(currentContext, \"Updated Successfully :\", Toast.LENGTH_LONG);\n }, isAddedOrNot);\n } else {\n if (isAppSVOD() && isUserLoggedIn()) {\n showEntitlementDialog(AppCMSPresenter.DialogType.SUBSCRIPTION_REQUIRED, null);\n } else {\n showEntitlementDialog(AppCMSPresenter.DialogType.LOGIN_REQUIRED, null);\n }\n currentActivity.sendBroadcast(new Intent(AppCMSPresenter.PRESENTER_STOP_PAGE_LOADING_ACTION));\n }\n }", "public void setShareholderName(String shareholderName);", "private void setShareIntent(Intent shareIntent) {\n if(shareIntent.resolveActivity(getActivity().getPackageManager())!=null) {\n if (mShareActionProvider != null) {\n mShareActionProvider.setShareIntent(shareIntent);\n }\n } else {\n Toast.makeText(getActivity(), R.string.no_application_found,Toast.LENGTH_LONG).show();\n }\n }", "public String getIsShare() {\n return isShare;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_recipe_detail, menu);\n\n MenuItem item = menu.findItem(R.id.menu_share);\n ShareActionProvider miShare = (ShareActionProvider) MenuItemCompat.getActionProvider(item);\n Intent shareIntent = new Intent(Intent.ACTION_SEND);\n\n return super.onCreateOptionsMenu(menu);\n }", "public void onClickAddName(View vew) {\n ContentValues values = new ContentValues();\n\n values.put(StudentsProvider.NAME,\n ((EditText) findViewById(R.id.txtName)).getText().toString());\n\n values.put(StudentsProvider.GRADE,\n ((EditText) findViewById(R.id.txtGrade)).getText().toString());\n\n\n Uri uri = getContentResolver().insert(StudentsProvider.CONTENT_URI, values);\n\n Toast.makeText(getBaseContext(),\n uri.toString(), Toast.LENGTH_LONG).show();\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch (id) {\n case R.id.logout:\n // signout();\n return true;\n\n case R.id.share:\n\n String nombre, correo;\n nombre = mAuth.getCurrentUser().getDisplayName();\n correo = mAuth.getCurrentUser().getEmail();\n Intent sendIntent = new Intent();\n sendIntent.setAction(Intent.ACTION_SEND);\n sendIntent.putExtra(Intent.EXTRA_TEXT, nombre + \"\\n\" + correo);\n sendIntent.setType(\"text/plain\");\n startActivity(sendIntent);\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "void addHadithBookUrl(Object newHadithBookUrl);", "public void onAdd() {\n String bookTitle = details[0];\n String author = details[1];\n boolean addedCorrectly = ControllerBook.addBook(this.ISBN, author, bookTitle, \"\");\n if (addedCorrectly) {\n dispose();\n } else {\n\n pack();\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.action_settings) {\n\n Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n String shareBody = \"https://play.google.com/store/apps/details?id=lohitprojects.bitcointrack&hl=en\";\n String shareContent1=\"\\n✦ Bitcoin Track\\n\";\n String shareContent2=\"✦ Everything you need to know about Bitcoin \\n✦ Live bitcoin rate Tracking in any Currency | Wallets | Mining | Historical Records\";\n String shareContent3 = \"\\n✦ \";\n sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, \"Subject Here\");\n sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareContent1+shareContent2+shareContent3+shareBody);\n startActivity(Intent.createChooser(sharingIntent, \"Share via\"));\n\n }\n\n return super.onOptionsItemSelected(item);\n }", "private void handleAddCommand(SlackMessageSender messageSender, String[] args) throws Exception {\n LinkEntityCommand linkEntityCommand = parseLinkEntityCommand(args);\n if (logger.isDebugEnabled()) {\n logger.debug(\"## [Link add command] \" + linkEntityCommand);\n }\n\n LinkEntity saved = linkService.saveLink(linkEntityCommand);\n\n String message = String.format(\"Success to save link. title %s > id : %d\", saved.getTitle(), saved.getId());\n messageSender.send(message);\n }", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tif(share!=null){\n\t\t\t\tif(v.getId()==R.id.QQShare){\n\t\t\t\t\tshare.QQShare();\n\t\t\t\t}else if(v.getId()==R.id.SinaShare){\n\t\t\t\t\tshare.SinaShare();\n\t\t\t\t}else if(v.getId()==R.id.WxShare){\n\t\t\t\t\tshare.WxShare();\n\t\t\t\t}else if(v.getId()==R.id.QQKJShare){\n\t\t\t\t\tshare.QQKJShare();\n\t\t\t\t}else if(v.getId()==R.id.SmsShare){\n\t\t\t\t\tshare.SMSShare();\n\t\t\t\t}\n\t\t\t}\n\t\t\tpw.dismiss();\n\t\t\t\n\t\t}" ]
[ "0.7111229", "0.6773155", "0.6656744", "0.6375395", "0.63442314", "0.6276128", "0.6064025", "0.6052322", "0.58998346", "0.58310795", "0.5770592", "0.5760956", "0.5759572", "0.5747897", "0.57231057", "0.56900954", "0.5688493", "0.5633713", "0.5616715", "0.56165856", "0.5613377", "0.55759174", "0.556082", "0.55492264", "0.5546707", "0.55354613", "0.5494792", "0.54814094", "0.54786265", "0.5450235", "0.5442535", "0.5412721", "0.54076755", "0.5400339", "0.5398859", "0.5397339", "0.53881586", "0.53719723", "0.5369524", "0.5366887", "0.53629476", "0.53313625", "0.53263074", "0.530992", "0.53068024", "0.5305667", "0.53036636", "0.5299478", "0.5291579", "0.5288861", "0.5285212", "0.5283724", "0.5276045", "0.5275651", "0.5269655", "0.5266951", "0.52668685", "0.5257794", "0.5256443", "0.52552855", "0.5251693", "0.5245822", "0.5242418", "0.5239943", "0.5238609", "0.5225341", "0.52223676", "0.5206855", "0.5206778", "0.520278", "0.51937413", "0.5192726", "0.51926", "0.5188618", "0.5173582", "0.51721996", "0.5169892", "0.5166601", "0.516442", "0.51625174", "0.51603925", "0.5155254", "0.5152584", "0.51489913", "0.51393604", "0.51381", "0.511606", "0.5099133", "0.50970775", "0.5095503", "0.50948477", "0.50733984", "0.5064501", "0.50610644", "0.5058463", "0.505832", "0.5057994", "0.50557023", "0.50550216", "0.5053574" ]
0.5941666
8
Admin Function update quantity of share
public static void updateShareQuantity(){ Map<String, ShareMarket> everyShareDetails = ShareMarketHashMap.getShareMarket(); displayMap(everyShareDetails); ShareMarket editUniqueSharePrice = new ShareMarket(); System.out.println('\n' + "Enter Share Name for updating quantity: "); String shareName = input.next(); if(!everyShareDetails.containsKey(shareName)) { System.out.println("Share doesn't exist :( .You will be returned to main menu" +'\n'); return; } System.out.println("Enter Share Quantiy : "); if(!input.hasNextInt()) { System.out.println("Quantity entered in invalid, it should be a postive integer.You will be returned to main menu" + '\n'); return; } int updateshareQuantity = input.nextInt(); editUniqueSharePrice.setShareName(shareName); editUniqueSharePrice.setShareQuantity(updateshareQuantity); editUniqueSharePrice.setSharePrice(everyShareDetails.get(shareName).getSharePrice()); everyShareDetails.put(editUniqueSharePrice.getShareName(),editUniqueSharePrice); ShareMarketHashMap.editShare(); Map<String, ShareMarket> everyShareDetailsupdate = ShareMarketHashMap.getShareMarket(); System.out.println(" Share Name: " + everyShareDetailsupdate.get(shareName).getShareName() +',' + " Share Price: " + everyShareDetailsupdate.get(shareName).getSharePrice() +',' + " Share Quantity: " + everyShareDetailsupdate.get(shareName).getShareQuantity()); System.out.println("Successfully updated quantiy, Please find above available shares" + '\n'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateStocks(StockTransferTransactionRequest item) {\n\n Integer updatedQuantity = item.getQuantity();\n StockTraderServiceFactoryIF serviceFactory = new StockTraderServiceFactory();\n DematServiceIF dematService = serviceFactory.dematService();\n\n Optional<Integer> oldQuantity = dematService.getStockStatus(item.getUserName(),\n item.getStock());\n if(oldQuantity != null && oldQuantity.get() > 0) {\n updatedQuantity = oldQuantity.get() + item.getQuantity();\n }\n try(Connection conn = DriverManager.getConnection(Constants.DB_URL,\n Constants.USER,\n Constants.PASS);\n PreparedStatement stmt = conn.prepareStatement(\n Constants.MERGE_STOCK)) {\n stmt.setString(1, item.getUserName());\n stmt.setString(2, item.getStock().toString());\n stmt.setInt(3, updatedQuantity);\n stmt.execute();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "ResponseEntity<Cart> updateCartItemQuantity(CartFormData formData);", "public void update() {\n\t\tthis.quantity = item.getRequiredQuantity();\n\t}", "public int Edshare(Long cid, Long shareamt,String datee, Long shareno, Long sindex) throws SQLException,ClassNotFoundException{\n\tint i=DbConnect.getStatement().executeUpdate(\"update share_details set no_share=\"+shareno+\",shareprice=\"+shareamt+\",shareindex=\"+sindex+\" where comp_id=\"+cid+\" and DATEOFTRANS='\"+datee+\"'\");\r\n\treturn i;\r\n\t\r\n}", "public static void updateSharePrice(){\r\n\t\r\n\tMap<String, ShareMarket> allShareDetails = ShareMarketHashMap.getShareMarket();\r\n\tdisplayMap(allShareDetails);\r\n\tShareMarket editUniqueShareQuantity = new ShareMarket();\r\n\tSystem.out.println('\\n'+\"Enter Share Name for updating price : \");\r\n\tString updateShareName = input.next();\r\n\tif(!allShareDetails.containsKey(updateShareName))\t{\r\n\t\tSystem.out.println(\"Share doesn't exist :( .You will be returned to main menu\" +'\\n');\r\n\t\treturn;\r\n\t}\r\n\tSystem.out.println(\"Enter Share Price : \");\r\n\tif(!input.hasNextInt()) {\r\n\t\tSystem.out.println(\"Price entered in invalid, it should be a postive integer.You will be returned to main menu\" + '\\n');\r\n\t\treturn;\r\n\t}\t\r\n\tint updateSharePrice = input.nextInt();\t\t\t\r\n\teditUniqueShareQuantity.setShareName(updateShareName);\r\n\teditUniqueShareQuantity.setSharePrice(updateSharePrice);\r\n\teditUniqueShareQuantity.setShareQuantity(allShareDetails.get(updateShareName).getShareQuantity());\r\n\tallShareDetails.put(editUniqueShareQuantity.getShareName(),editUniqueShareQuantity);\r\n\tShareMarketHashMap.editShare();\r\n\tMap<String, ShareMarket> allShareDetailsupdated = ShareMarketHashMap.getShareMarket();\r\n\tSystem.out.println(\"Share Name: \" + allShareDetailsupdated.get(updateShareName).getShareName() +',' + \" Share Price:\" + allShareDetailsupdated.get(updateShareName).getSharePrice() +',' + \" Share Quantity:\" + allShareDetailsupdated.get(updateShareName).getShareQuantity());\r\n\tSystem.out.println(\"Successfully updated price, please find above available shares\" +'\\n');\t\r\n}", "@Override\n public void onClick(View view) {\n quantityText.setText(String.valueOf(Integer.parseInt(quantityText.getText().toString()) + 1));\n Uri currentItemUri = ContentUris.withAppendedId(MenuItemsContract.MenuItemsEntry.CONTENT_URI, id);\n ContentValues values = new ContentValues();\n values.put(MenuItemsContract.MenuItemsEntry.COLUMN_ITEM_QUANTITY,Integer.parseInt(quantityText.getText().toString()));\n context.getContentResolver().update(currentItemUri,values,null,null);\n }", "@Override\n public void onClick(View view) {\n if (quantity > 0) {\n int decrementedQuantity = quantity - 1;\n\n //Get the URI with the ID for the row\n Uri quantityUri = ContentUris.withAppendedId(BookEntry.CONTENT_URI, currentBookId);\n\n //Update the database with the new quantity value\n ContentValues values = new ContentValues();\n values.put(BookEntry.COLUMN_BOOK_QUANTITY, decrementedQuantity);\n context.getContentResolver().update(quantityUri, values, null, null);\n } else {\n //Show an error when the quantity reaches 0\n Toast.makeText(context, R.string.out_of_stock_message, Toast.LENGTH_SHORT).show();\n }\n }", "public int updShare(Long cid, Long shareamt, String datee, Long noShare,Long sindex) throws Exception{\n\tint i=DbConnect.getStatement().executeUpdate(\"insert into share_details values(\"+cid+\",\"+noShare+\",\"+shareamt+\",'\"+datee+\"',\"+sindex+\")\");\r\n\treturn i;\r\n}", "public void increaseQuantity() {\n this.quantity++;\n this.updateTotalPrice();\n }", "@Override\n\tpublic void doUpdate(SellOfer model, HttpServletRequest request,\n\t\t\tHttpServletResponse response) {\n\t\t if(StringUtil.isEmpty(model.getPrice())){\n\t\t\t\t model.setPrice(\"0\");\n\t\t\t }\n\t\t\t double dprice =Double.parseDouble(model.getPrice());\n\t\t BigDecimal bg = new BigDecimal(dprice/10000);\n\t\t double f1 = bg.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();\n\t\t model.setPrice(f1+\"\");\n\t\t model.setSource(\"001\");\n\t\t model.setSellContent(\"\");\n\t\tsuper.doUpdate(model, request, response);\n\t}", "public void update(int bookId, int quantity){ \n JSONObject jbook = dbmanager.getBmanager().readJSON(bookId);\n dbmanager.getBmanager().delete(bookId);\n jbook.remove(\"quantity\");\n jbook.put(\"quantity\", Integer.toString(quantity));\n dbmanager.open();\n dbmanager.createCommit(getNextBookId(),jbook);\n dbmanager.close();\n \n }", "@Override\n public void updateItem(P_CK t) {\n \n }", "@Override\r\n public void ItemQuantity(int quantity) {\n this.quantity = quantity;\r\n }", "public void increaseQuantity(View view) {\n Log.d(\"Method\", \"increaseQuantity()\");\n updateQuantity(1);\n }", "public void stock(int number) {\r\n quantity += number;\r\n }", "public void Deposit(double ammount){\n abal = ammount + abal;\n UpdateDB();\n }", "protected void setQuantityOfShares(int quantity){\n\t\tif(quantity < 0){\n\t\t\tthrow new IllegalArgumentException(\"Quantity can't be less than 0: \" + quantity);\n\t\t}\n\t\tsynchronized(this){\n\t\t\tthis.quantityOfShares = quantity;\n\t\t}\n\t}", "int updateByPrimaryKey(ItemStockDO record);", "int updateByPrimaryKey(ItemStockDO record);", "@Modifying(clearAutomatically = true)\n\t@Lock(value = LockModeType.OPTIMISTIC_FORCE_INCREMENT)\n @Query(\"UPDATE Item i SET i.quantity = i.quantity + ?1 WHERE i =?2\")\n int addToStock(double qty, Item item);", "public void setQuantity(int value) {\n this.quantity = value;\n }", "public void setQuantity(int value) {\n this.quantity = value;\n }", "public void setQuantity(int value) {\n this.quantity = value;\n }", "@Modifying(clearAutomatically = true)\n @Query(\"UPDATE Item i SET i.quantity = i.quantity - ?1 WHERE i =?2\")\n int deductFromStock(double qty, Item item);", "@Override\n\tpublic Item update() {\n\t\t\n\t\treadAll();\n\t\n\t\tLOGGER.info(\"State the shoe name you wish to update\");\n\t\tString name = util.getString().toLowerCase();;\n\t\tLOGGER.info(\"State the size you wish to update\");\n\t\tdouble size = util.getDouble();\n\t\tLOGGER.info(\"Change price\");\n\t\tdouble price = util.getDouble();\n\t\tLOGGER.info(\"Change amount in stock\");\n\t\tlong stock = util.getLong();\n\t\tLOGGER.info(\"\\n\");\n\t\treturn itemDAO.update(new Item(name,size,price,stock));\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n public void onClick(View view) {\n helper.increaseQty(item);\n holder.mQuantity.setText(String.valueOf(String.valueOf(helper.getQuantityFromTable(item))));\n holder.mPrice.setText(\"$\" + getNewPrice(item, holder));\n// holder.mTotal.setText(\"$\"+total);\n\n }", "@ServiceMethod(name = \"updateStoreProductQuantity\")\r\n\tpublic IResponseHandler updateStoreProductQuantity(StoreProductDTO dto)\r\n\t{\t\r\n\t\t\r\n\t\tList<StoreProduct> sps =getStoreProduct(dto);\r\n\t\t\r\n\t\tfor(StoreProduct sp : sps)\r\n\t\t{\r\n\t\t\tsp.setQuantity(dto.getQuantity());\r\n\t\t\tgetSession().update(sp);\r\n\t\t}\r\n\r\n\t\treturn dto;\r\n\t}", "private void updateSoldProductInfo() { public static final String COL_SOLD_PRODUCT_CODE = \"sells_code\";\n// public static final String COL_SOLD_PRODUCT_SELL_ID = \"sells_id\";\n// public static final String COL_SOLD_PRODUCT_PRODUCT_ID = \"sells_product_id\";\n// public static final String COL_SOLD_PRODUCT_PRICE = \"product_price\";\n// public static final String COL_SOLD_PRODUCT_QUANTITY = \"quantity\";\n// public static final String COL_SOLD_PRODUCT_TOTAL_PRICE = \"total_price\";\n// public static final String COL_SOLD_PRODUCT_PENDING_STATUS = \"pending_status\";\n//\n\n for (ProductListModel product : products){\n soldProductInfo.storeSoldProductInfo(new SoldProductModel(\n printInfo.getInvoiceTv(),\n printInfo.getInvoiceTv(),\n product.getpCode(),\n product.getpPrice(),\n product.getpSelectQuantity(),\n printInfo.getTotalAmountTv(),\n paymentStatus+\"\"\n ));\n\n }\n }", "public void setShrinkQty (BigDecimal ShrinkQty)\n{\nset_Value (\"ShrinkQty\", ShrinkQty);\n}", "public void updatePremiumNumberOfStays(Long premiumId, Integer numberOfStays);", "@RequestMapping(value = \"/updateQuantity\", method = RequestMethod.POST)\n public String updateQuantity(HttpSession session, HttpServletRequest request) {\n List<Cart> listCart = (List<Cart>) session.getAttribute(\"listCart\");\n // lay mang so luong cua tung hoa don chi tiet trong request\n String[] arrQuantity = request.getParameterValues(\"quantity\");\n // cap nhap so luong cua cac don hang chi tiet\n for (int i = 0; i < listCart.size(); i++) {\n listCart.get(i).setQuantity(Integer.parseInt(arrQuantity[i]));\n }\n // add listCart vao session\n session.setAttribute(\"listCart\", listCart);\n // tinh lai tong tien rooi add vao session\n session.setAttribute(\"tongTien\", sumAmout(listCart));\n return \"ShoppingCart\";\n }", "public void updateQuantityOnCommissionPosition(int sessionId, int commissionPositionId, int quantity);", "@Transactional\n @Modifying\n @Query(\"update Item i set i.price = i.price * 1.1\")\n void increacePriceBy10Percent();", "private void updateItemQuantityAndTotal(Item item){\r\n\t\tItem oldItem = items.get(item.getItemIdentifier());\r\n\t\toldItem.increaseQuantity(new Amount(1));\r\n\t\titems.put(oldItem.getItemIdentifier(), oldItem);\r\n\t\ttotal.updateTotal(item);\r\n\t}", "public static void updatePayment(){\n projectChosen = getQuestionInput();\r\n try {\r\n Connection myConn = DriverManager.getConnection(url, user, password);\r\n\r\n String sqlInsert = \"UPDATE projects SET tot_paid = ?\" +\r\n \"WHERE project_num = \" + projectChosen;\r\n\r\n PreparedStatement pstmt = myConn.prepareStatement(sqlInsert);\r\n pstmt.setDouble(1, NewProject.tot_paid);\r\n pstmt.executeUpdate(); //Execute update of database.\r\n pstmt.close();\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void increaseStock(int i, int a){\n stock.get(i).increaseQuantity(a);\n }", "private void setQuantityOfShares(String rawText){\n\t\tint num = Integer.parseInt(rawText);\n\t\tif(num < 0){\n\t\t\tthrow new IllegalArgumentException(\"Quantity can't be less than 0: \" + num);\n\t\t}\n\t\tsynchronized(this){\n\t\t\tthis.quantityOfShares = num;\n\t\t}\n\t}", "public void incdrum(String quantity1, String capacity) {\nString countQuery = \"SELECT \"+Drum_Quantity + \" FROM \" + DATABASE_TABLE4+\" WHERE \"+Drum_Capacity+\" ='\"+capacity+\"'\";\n\t \n\t Cursor cursor = ourDatabase.rawQuery(countQuery, null);\n\t int d=cursor.getColumnIndex(Drum_Quantity);\n\t\tString cbal=null;\n\t\tfor(cursor.moveToFirst();!cursor.isAfterLast();cursor.moveToNext()){\n\t\t\tcbal=cursor.getString(d);\n\t\t\t\n\t\t}\n\t\tint cur=Integer.parseInt(cbal);\n\t\tcur=cur+Integer.parseInt(quantity1);\n\t ContentValues up=new ContentValues();\n\t up.put(Drum_Quantity, cur);\n\t\tourDatabase.update(DATABASE_TABLE4, up, Drum_Capacity+\" = '\"+capacity+\"'\", null);\n\t\t\n\t}", "@Override\n\tpublic int update(ShoppingCartDetailEntity shoppingCart) {\n\t\treturn 0;\n\t}", "public void handleUpdate(){\n increaseDecrease(\"i\");\n action=\"update\";\n buttonSave.setVisible(true);\n admission.setEditable(false);\n\n }", "@Override\r\n\tpublic void ManageProduct() {\n\t\tint id = this.view.enterId();\r\n\t\tString name = this.view.enterName();\r\n\t\tfloat price = this.view.enterPrice();\r\n\t\tint quantity = this.view.enterQuantity();\r\n\t\t\r\n\t\tthis.model.updProduct(id, name, price, quantity);\r\n\t}", "@Override\n\tpublic void addShares(int quantity){\n\t\tBigDecimal valueToAdd = getCurrentPrice().multiply(new BigDecimal(quantity));\n\t\t\n\t\tif(getCurrentPrice() == null){\n\t\t\tthrow new IllegalStateException(\n\t\t\t\t\t\"Stock details must be set before \"\n\t\t\t\t\t+ \"adding/subtracting shares\");\n\t\t}\n\t\t\n\t\tsynchronized(this){\n\t\t\tquantityOfShares += quantity;\n\t\t\tprinciple = principle.add(valueToAdd);\n\t\t}\n\t\t\n\t\tsetTotalValueAndNet();\n\t}", "@Override\n\tpublic void modify(int quantity) {\n\t}", "@Override\n\tpublic boolean updateStock(int quant) {\n\t\treturn false;\n\t}", "public void increment(View view) {\n quantity = (quantity + 1);\n submitOrder(quantity);\n\n }", "public void updateQuantity(Product p, String distCenter, int quantity){\r\n\t\tp.distCenters.put(distCenter, p.distCenters.get(distCenter) + quantity);\r\n\t\tp.quantity += quantity;\r\n\t}", "org.hl7.fhir.Quantity addNewValueQuantity();", "@Override\n\tpublic int updateInventory(int tranNo, int amount) throws Exception {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int update(Subordination entity) throws DBOperationException {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int update(ProductDTO dto) {\n\t\treturn 0;\n\t}", "private void update() {\n\n\t\tfloat shopping = Float.parseFloat(label_2.getText());\n\t\tfloat giveing = Float.parseFloat(label_5.getText());\n\t\tfloat companyDemand = Float.parseFloat(label_7.getText());\n\n\t\ttry {\n\t\t\tPreparedStatement statement = DBConnection.connection\n\t\t\t\t\t.prepareStatement(\"update customer_list set Shopping_Account = \"\n\t\t\t\t\t\t\t+ shopping\n\t\t\t\t\t\t\t+ \" , Giving_Money_Account = \"\n\t\t\t\t\t\t\t+ giveing\n\t\t\t\t\t\t\t+ \", Company_demand = \"\n\t\t\t\t\t\t\t+ companyDemand\n\t\t\t\t\t\t\t+ \" where Name = '\"\n\t\t\t\t\t\t\t+ name\n\t\t\t\t\t\t\t+ \"' And Last_Name = '\"\n\t\t\t\t\t\t\t+ lastName + \"' \");\n\t\t\tstatement.execute();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\t\t}\n\n\t}", "public void updateQuantity(DrinkItem temp, int val) throws SQLException{\n\t\t\n\t\tPreparedStatement myStmt = null;\n\t\ttry{\n\t\t\tmyStmt = myConn.prepareStatement(\"update drink set quantity=? where drink_code=?\");\n\t\t\tmyStmt.setInt(1, val);\n\t\t\tmyStmt.setInt(2, temp.getDrinkCode());\n\t\t\tmyStmt.executeUpdate();\n\t\t}\n\t\tfinally{\n\t\t\tif(myStmt != null)\n\t\t\t\tmyStmt.close();\n\t\t}\n\t\t\n\t}", "public void incrementAmountBought() {\n amountBought++;\n }", "@Override\n\tpublic void updateItems(Session session){\n\t\ttry{\n\t\t\tSystem.out.print(\"++++------++++Update items here++++------++++\\n\");\n\t\t\t//scanner class allows the admin to enter his/her input\n\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\t//read input item id, (name, price or quantity)-whichever field is to be updated\n\t\t\tSystem.out.print(\"Enter Item Id to update: \");\n\t\t\tint itemId = scanner.nextInt();\n\n\t\t\tSystem.out.println(\"----Enter Item attribute to be updated----\");\n\t\t\tSystem.out.println(\"Any of the attributes either: price or quantity or desc::\");\n\t\t\tString itemAttribute = scanner.next();\n\n\t\t\tSystem.out.print(\"Enter Item attribute Value: \");\n\t\t\tString attributeValue = scanner.next();\n\n\t\t\t//pass these input items to client controller\n\t\t\tsamp=mvc.updateItems(session,itemId,itemAttribute,attributeValue);\n\t\t\tSystem.out.println(samp);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App- Add Items Exception: \" +e.getMessage());\n\t\t}\n\t}", "public void updateQuantityProduct(List<ItemCart> list) {\n\t\tfor (ItemCart i : list) {\n\t\t\tProduct p = i.getP();\n\t\t\t// b1: lay quantity khach hang mua\n\t\t\tint quatity = i.getQuantity();\n\t\t\t// b2: lay quantity cua Product duoi DB\n\t\t\tProduct pDB = new ProductDAO().lookUp(p.getId());\n\t\t\tint quantityNew = pDB.getSoLuongTrongKho() - quatity;\n\t\t\tnew ProductDAO().updateQuatity(p.getId(), quantityNew);\n\n\t\t}\n\n\t}", "public void increment(View view) {\n if(quantity < 100)\n quantity++;\n displayQuantity(quantity);\n }", "public void incQty() {\n b.qty.setText(\"\" + ++qty);\n\n }", "@Override\r\n\t\t\tpublic void handle(CellEditEvent<Products, String> arg0) {\n\t\t\t\targ0.getTableView().getItems().get(arg0.getTablePosition().getRow()).setQuantity(arg0.getNewValue());\r\n\t\t\t\tProducts data=(Products) tbl_view.getSelectionModel().getSelectedItem();\r\n\t\t\t\tSystem.out.println(data.toString());\r\n\t\t\t\tConnectionManager.queryInsert(conn, \"UPDATE dbo.product SET quantity='\"+data.getQuantity()+\"' WHERE id=\"+data.getId());\r\n\t\t\t\ttxt_cost.clear();\r\n\t\t\t\ttxt_date.clear();\r\n\t\t\t\ttxt_name.clear();\r\n\t\t\t\ttxt_price.clear();\r\n\t\t\t\ttxt_qty.clear();\r\n\t\t\t\ttxt_reorder.clear();\r\n\t\t\t\ttxt_search.clear();\r\n\t\t\t\tfetchData(FETCH_DATA);\r\n\t\t\t}", "@Override\n\tpublic int update(RotateBID record) {\n\t\tBigDecimal total = new BigDecimal(0);\n\t\tif(\"招标采购\".equals(record.getBidType())) {\n\t\t\tList<RotateBIDPurchase> purchaseList=record.getPurchaseList();\n\t\t\tfor(RotateBIDPurchase purchase:purchaseList) {\n\t\t\t\tif(null==purchase.getId()||\"\".equals(purchase.getId()))\n\t\t\t\t\tpurchase.setId(UUID.randomUUID().toString().replaceAll(\"-\", \"\"));\n\t\t\t\ttotal = total.add(purchase.getQuantity());\n\t\t\t}\n\t\t}else {\n\t\t\tList<RotateBIDSale> saleList=record.getSaleList();\n\t\t\tfor(RotateBIDSale sale:saleList) {\n\t\t\t\tif(null==sale.getId()||\"\".equals(sale.getId()))\n\t\t\t\t\tsale.setId(UUID.randomUUID().toString().replaceAll(\"-\", \"\"));\n\t\t\t\ttotal= total.add(sale.getTotal());\n\t\t\t}\n\t\t}\n\t\trecord.setTotal(total);\n\t\trecord.setModifyDate(new Date());\n//\t\trecord.setModifier(TokenManager.getToken().getName());\n\t\treturn dao.update(record);\n\t}", "@Override\n public void onAmountChange(View view, int amount) {\n item.num = amount;\n }", "public int updateOrderItem(OrderItem u) {\n int ok = 0;\n try {\n String query = \"UPDATE order_Item SET amount = ?, product_id_Product = ?, order_id_Order = ? WHERE id_Order_Item = ? ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n //Select id informated \n List<OrderItem> l = new OrderItemDao().searchOrderItem(u.getIdOrderItem());\n \n for (OrderItem lc : l) {\n st.setInt(4, lc.getIdOrderItem());\n }\n st.setInt(1, u.getAmount());\n st.setInt(2, u.getProductIdProduct());\n st.setInt(3, u.getOrderIdItem());\n\n ok = st.executeUpdate(); //Execute the update\n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n } catch (SQLException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return ok;\n }", "public void setQuantity(int quantity) {\r\n this.quantity = quantity;\r\n }", "public void updateProductViewCount(Product product) {\n\r\n\t}", "public int updateItem(Connection conn, Item item, int item_no) {\r\n\t\ttry {\r\n\t\t\tPreparedStatement pstmt = conn.prepareStatement(\"update item_XXXX set description =? where item_no=?\");\r\n\t\t\tpstmt.setString(1, item.getDescription());\r\n\t\t\tpstmt.setInt(2, item_no);\r\n\t\t\tpstmt.executeUpdate();\r\n\t\t\tPreparedStatement pstmt1 = conn.prepareStatement(\"update item_XXXX set price =? where item_no=?\");\r\n\t\t\tpstmt1.setDouble(1, item.getPrice());\r\n\t\t\tpstmt1.setInt(2, item_no);\r\n\t\t\tint count = pstmt1.executeUpdate();\r\n\t\t\treturn count;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "private void botBuy(Stock stock, int numShares){\n player.getShares().set(game.getIndex(stock), player.getShares().get(game.getIndex(stock)) + numShares);\n player.setFunds(-numShares*(stock.getSharePrice()+3));\n System.out.println(\"purchase made\"); //rem\n }", "@Override\r\n public void updatedSaleInventory(ItemAndQuantity lastItem) {\r\n }", "private void updateProductQnt(List<Product> productList) {\n if (productList != null) {\n productList.forEach(product -> {\n Product productToSave = productService.findOne(product.getId());\n productToSave.setQuantity(productToSave.getQuantity() - product.getQuantity());\n productService.save(productToSave);\n });\n }\n }", "Item update(Item item);", "public void setQty(int qty) {\n this.qty = qty;\n }", "public void Update(StokContract entity) {\n\t\t\n\t}", "public void addQuantity()\n {\n int quantity = Integer.parseInt(quantityTextField.getText());\n quantity++;\n quantityTextField.setText(\"\" + quantity);\n\n changeSubtotalTextField();\n }", "@Test\r\n\tpublic void testUpdateQuantity() throws IdNotContainedException { \r\n\t\tint initialQuantity = menu.findItemId(\"DES006\").getQuantity();\r\n\t int expectedQuantity = 2;\r\n\t processOrder.updateItemQuantity(currentOrder);\r\n\t int actualQuantity = menu.findItemId(\"DES006\").getQuantity();\r\n\t String message =\"Value updated succesfully\";\r\n\t\tassertEquals(message, actualQuantity, expectedQuantity ); \r\n assertTrue(actualQuantity > initialQuantity); //make sure that when updating the value has increased\r\n\r\n\t}", "public void increaseQuantity(int amount) {\n this.currentQuantity += amount;\n }", "public void setQuantity(int qty) {\r\n\t\tthis.quantity = qty;\r\n\t}", "Product updateProductInStore(Product product);", "@Override\n public void onClick(View view) {\n float quantity = Float.valueOf(String.valueOf(editQuantity.getText()));\n\n if (quantity != food.getQuantity()) {\n food.updateQuantities(quantity);\n }\n\n dbManager.addFood(food);\n Snackbar saveSnackbar = Snackbar.make(view, R.string.snack_save_success, Snackbar.LENGTH_SHORT);\n saveSnackbar.show();\n saveButton.setVisibility(View.INVISIBLE);\n cancelButton.setVisibility(View.INVISIBLE);\n editQuantity.setVisibility(View.INVISIBLE);\n editLabel.setVisibility(View.INVISIBLE);\n }", "public void setConvertedShrinkQty (BigDecimal ConvertedShrinkQty)\n{\nset_Value (\"ConvertedShrinkQty\", ConvertedShrinkQty);\n}", "public void setUpdateTickets (int updateTickets)\n {\n this.unsoldTickets=this.unsoldTickets + updateTickets; \n }", "void editAssetValue(int newVal);", "public void updateTotal(Questions quest) {\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\tQuestions q = getQuestion(quest.getQ_id());\n\t\tq.setTotal(q.getTotal() + 1);\n\t\tsession.update(q);\n\t\ttx.commit();\n\t\tsession.close();\n\t}", "public void updateMoney()\n\t\t{\n\t\t\t\n\t\t\tFPlayer p1 = this.viewer;\n\t\t\tFPlayer p2 = (p1.equals(this.t.p1)) ? this.t.p2 : this.t.p1;\n\t\t\t\n\t\t\tItemStack om = new ItemStack(Material.GREEN_WOOL,1);\n\t\t\tItemMeta it = om.getItemMeta();\n\t\t\tit.setDisplayName(ChatColor.DARK_GREEN+ChatColor.BOLD.toString()+\"Money in trade:\");\n\t\t\tit.setLore(Arrays.asList(new String[] {\"\",Util.getMoney(this.t.getMoneyTraded(p1)),\"\",\"Click to add/remove money from trade\"}));\n\t\t\tom.setItemMeta(it);\n\t\t\t\n\t\t\tif (this.canAdd()) super.contents.put(0,new ItemSwapMenu(this,om,new MenuMoney(super.viewer,this.t)));\n\t\t\telse super.contents.put(0,new ItemDummy(this,om));\n\t\t\t\n\t\t\t// Trader money in trade\n\t\t\tItemStack tm = new ItemStack(Material.GREEN_WOOL,1);\n\t\t\tit = tm.getItemMeta();\n\t\t\tit.setDisplayName(ChatColor.DARK_GREEN+ChatColor.BOLD.toString()+\"Money in trade:\");\n\t\t\tit.setLore(Arrays.asList(new String[] {\"\",Util.getMoney(this.t.getMoneyTraded(p2))}));\n\t\t\ttm.setItemMeta(it);\n\t\t\tsuper.contents.put(8,new ItemDummy(this,tm));\n\t\t\tthis.composeInv();\n\t\t}", "private int adjustAvailability(Uri itemUri, int newCount){\n if(newCount < 0) return 0;\n\n ContentValues values = new ContentValues();\n values.put(ItemEntry.COLUMN_ITEM_QUANTITY, newCount);\n int numRowsUpdated = getContentResolver().update(itemUri,values, null, null);\n\n return numRowsUpdated;\n }", "public static void updateBuyItem(String inputCommand) {\r\n\t\tString[] value = inputCommand.split(\" \");\r\n\t\tif(value.length == 3 && \"updateBuy\".equalsIgnoreCase(value[0])) {\r\n\t\t\tInventory inventory = inventoryList.get(value[1]);\r\n\t\t\tinventory.setQuantity(Integer.parseInt(value[2]));\r\n\t\t\tinventoryList.put(value[1], inventory);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Entered wrong input command\");\r\n\t\t}\r\n\t}", "public void increaseQuantity (View view){\n if(quantity == 100){\n Toast.makeText(this, \"You cannot order more than 100 coffee\", Toast.LENGTH_SHORT).show();\n return;\n }\n quantity = quantity + 1;\n displayQuantity(quantity);\n }", "@Override\n\tpublic int update(OrderItem objectToUpdate) throws SQLException {\n\t\treturn 0;\n\t}", "@Override\n public void onClick(View view) {\n int rowID = Integer.parseInt(view.getTag().toString());\n\n // Read data, in particular inventoryQuantity, from cursor based on rowID\n tempCursor.moveToFirst();\n // Find the index of columns of inventory attributes that we are interested in\n int idColumnIndex = tempCursor.getColumnIndex(InventoryEntry._ID);\n int tempQuantityColumnIndex = tempCursor.getColumnIndex(InventoryEntry.COLUMN_INVENTORY_QUANTITY);\n\n // Move cursor to location in list where user clicked on the button\n tempCursor.move(rowID);\n // Extract out the value we are interested in from the Cursor for the given column index\n // Reminder: temInventoryID is id in database which is AUTOINCREMENTing & rowID is id of row where user clicked\n int tempInventoryId = tempCursor.getInt(idColumnIndex);\n int tempInventoryQuantity = tempCursor.getInt(tempQuantityColumnIndex);\n\n // Reduce quantity by 1\n if (tempInventoryQuantity > 0) {\n tempInventoryQuantity--;\n } else {\n Toast.makeText(tempContext, \"Can't reduce quantity, already 0\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Prepare quantity to be stored/updated in database\n // Create ContentValues object where column names are the keys and extracted quantity value\n // from cursor is the values\n ContentValues values = new ContentValues();\n values.put(InventoryEntry.COLUMN_INVENTORY_QUANTITY, tempInventoryQuantity);\n\n // Set up WHERE clause, e.g: WHERE NAME=PAPER, WHERE _ID=4;\n String selection = InventoryEntry._ID + \" = ? \";\n String[] selectionArgs = {Integer.toString(tempInventoryId)};\n\n // Update inventory into the provider, returning number of rows updated\n InventoryDbHelper mDbHelper = new InventoryDbHelper(tempContext); // Create database helper\n\n // Gets the data repository in write mode\n SQLiteDatabase db = mDbHelper.getWritableDatabase();\n\n // Update database. Returned int the number of rows affected\n int numberOfRowsAffected = db.update(InventoryEntry.TABLE_NAME, values, selection, selectionArgs);\n\n // Show a toast message depending on whether or not the quantity update was successful\n if (numberOfRowsAffected < 1) {\n Toast.makeText(tempContext, \"Error with reducing quantity by 1\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(tempContext, \"Quantity reduced by 1\", Toast.LENGTH_SHORT).show();\n }\n if (numberOfRowsAffected != 0) {\n tempContext.getContentResolver().notifyChange(InventoryEntry.CONTENT_URI, null);\n }\n }", "@Override\n public void onClick(View view) {\n int tempQty = Integer.parseInt(itemQty.getText().toString());\n tempQty = tempQty + 1;\n itemQty.setText(String.valueOf(tempQty));\n\n //get quantity\n int fillQuantity = Integer.parseInt(itemQty.getText().toString());\n //Create SaleItem\n SaleItem tempSaleItem = new SaleItem(fillName, fillQuantity, fillPrice, fillIngArr);\n //Update SaleItems Array\n saleItems.set(position, tempSaleItem);\n updateTotal();\n }", "public int sharedown(Long comp_id, Long no_share)throws Exception {\n\tint i,j = 0,k = 0;\r\n\tjava.util.Date d=new java.util.Date();\r\n\tSimpleDateFormat sd=new SimpleDateFormat(\"dd-MMM-yy\");\r\n\tString s1=sd.format(d);\r\n\ti=DbConnect.getStatement().executeUpdate(\"update share_details set no_share=no_share-\"+no_share+\" where comp_id=\"+comp_id+\" and DATEOFTRANS='\"+s1+\"'\");\r\n\trs=DbConnect.getStatement().executeQuery(\"select * from moreshare where types='bought' and DATEOFTRANS='\"+s1+\"'\");\r\n\tif(rs.next()==true)\r\n\t{\r\n\t\tk=DbConnect.getStatement().executeUpdate(\"update moreshare set no_share=no_share+\"+no_share+\" where COMP_ID=\"+comp_id+\" and types='bought' and DATEOFTRANS='\"+s1+\"'\");\r\n\t}\r\n\telse\r\n\t{\r\n\t\tj=DbConnect.getStatement().executeUpdate(\"insert into moreshare values(\"+comp_id+\",\"+no_share+\",'bought','\"+s1+\"')\");\t\r\n\t}\r\n\t\r\n\tSystem.out.println(\"k value\"+k+\"and j value\"+j);\r\nreturn i;\r\n}", "int updateSellMediaByPrimaryKey(SellMedia record) throws SQLException;", "@Override\n public void onClick(View view) {\n int dealQuantity = dealVsCount.containsKey(dealJsonObject.optString(\"dealID\")) ? dealVsCount.get(dealJsonObject.optString(\"dealID\")) : 0;//Integer.parseInt(textViewDealQuantity.getText().toString());\n if (dealQuantity < dealLimit) {\n dealQuantity += 1;\n totalDealSelectedCount += 1;\n }\n\n // Update Deal Quantity\n textViewDealQuantity.setText(String.valueOf(dealQuantity));\n\n // Enable Minus Button\n buttonMinus.setEnabled(true);\n\n // Update Buy Now Status\n viewHolder.getButtonBuyNow().setEnabled(totalDealSelectedCount > 0);\n\n try {\n dealVsCount.put(dealJsonObject.optString(\"dealID\"), dealQuantity);\n dealJsonObject.put(AppConstant.BUNDLE_SELECTED_DEAL_COUNT, dealQuantity);\n } catch (JSONException ex) {\n }\n }", "@Override\r\n\tpublic int updateCostIoQtyInit() {\n\t\treturn getSqlSession().update(namespace+\".updateCostIoQtyInit\");\r\n\t}", "@Override\n public void onClick(View v) {\n priceOfThisProduct = (numberPicker.getValue() * item.itemPrice);\n Snackbar.make(parentLayout, \"New Quantity: \" + priceOfThisProduct, Snackbar.LENGTH_SHORT).show();\n\n cv.put(\"CartItemsName\", \"\" + item.itemName);\n cv.put(\"CartItemsPrice\", item.itemPrice);\n cv.put(\"CartItemsPriceTotal\", priceOfThisProduct);\n cv.put(\"CartItemsQuantity\", numberPicker.getValue());\n cv.put(\"CartItemsTimeStamp\", System.currentTimeMillis());\n db.insert(CartOpenHelper.CART_TABLE, null, cv);\n\n Cart.grandTotal += priceOfThisProduct - Long.parseLong(tvPrice.getText().toString());\n\n tvQuantity.setText(numberPicker.getValue() + \"\");\n tvPrice.setText(priceOfThisProduct + \"\");\n tvCartValue.setText(\"Total Cart Value: Rs. \" + Cart.grandTotal);\n\n d.dismiss();\n db.delete(CartOpenHelper.CART_TABLE, CartOpenHelper.CART_ITEM_TIMESTAMP + \" = \" + \"'\" + item.itemTimeStamp + \"'\", null);\n loadActivity();\n }", "void setDisplayQuantity(BigDecimal inDisplayQuantity);", "int updateByPrimaryKeySelective(ItemStockDO record);", "public void setQuantity(int quantity) {\n this.quantity = quantity;\n }", "public void setQuantity(int quantity) {\n this.quantity = quantity;\n }", "private void updateTotal() {\n int total = table.getTotal();\n vip.setConsumption(total);\n if (total > 0)\n payBtn.setText(PAY + RMB + total);\n else if (total == 0)\n payBtn.setText(PAY);\n }", "@Override\n\t\tpublic void tableChanged(TableModelEvent e) {\n\t\t\tint newCount = 0;\n\t\t\tfor (Share s : frame.getGui().getShareServer().getShares()) {\n\t\t\t\tif (s.getStatus()==Status.BUILDING || s.getStatus()==Status.REFRESHING || s.getStatus()==Status.SAVING) {\n\t\t\t\t\tnewCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tactiveCount=newCount;\n\t\t}", "public abstract void setWarehouseAmount(int productID, int newAmount) throws GettingDataFailedException;", "public void setProductStock(int qty){\n\t\tstockQuantity = qty;\r\n\t}" ]
[ "0.6507358", "0.64805347", "0.64523304", "0.6398939", "0.6302681", "0.61908543", "0.6095118", "0.5975891", "0.5884148", "0.5856273", "0.58426136", "0.582912", "0.57890856", "0.5785895", "0.5783806", "0.57709324", "0.57620734", "0.5728426", "0.5728426", "0.5718329", "0.5713642", "0.5713642", "0.5713642", "0.571329", "0.570806", "0.5698793", "0.56876504", "0.5672407", "0.5659077", "0.56450754", "0.5638113", "0.5637362", "0.5627398", "0.55971074", "0.5594747", "0.5594666", "0.55877227", "0.55870515", "0.55801415", "0.55748343", "0.5569326", "0.55624306", "0.55549246", "0.5549655", "0.55476594", "0.5546346", "0.5539521", "0.55372006", "0.55358213", "0.5534457", "0.5529814", "0.55237156", "0.5511254", "0.5499905", "0.5496959", "0.54938304", "0.5489518", "0.54849815", "0.547431", "0.54616785", "0.546124", "0.54529184", "0.5446432", "0.54435617", "0.5438914", "0.5438849", "0.5437193", "0.5435325", "0.5434991", "0.5433386", "0.5428459", "0.5423277", "0.5414949", "0.5414426", "0.54127157", "0.54114145", "0.54087996", "0.5407264", "0.53981906", "0.5385391", "0.53852373", "0.53822863", "0.5380286", "0.53760433", "0.5373503", "0.5368112", "0.53657764", "0.5358424", "0.53530836", "0.5352486", "0.5351515", "0.53491414", "0.5348095", "0.5347139", "0.5346914", "0.5346914", "0.5346241", "0.5344471", "0.5342316", "0.5338711" ]
0.6808643
0
Admin Function update price of share
public static void updateSharePrice(){ Map<String, ShareMarket> allShareDetails = ShareMarketHashMap.getShareMarket(); displayMap(allShareDetails); ShareMarket editUniqueShareQuantity = new ShareMarket(); System.out.println('\n'+"Enter Share Name for updating price : "); String updateShareName = input.next(); if(!allShareDetails.containsKey(updateShareName)) { System.out.println("Share doesn't exist :( .You will be returned to main menu" +'\n'); return; } System.out.println("Enter Share Price : "); if(!input.hasNextInt()) { System.out.println("Price entered in invalid, it should be a postive integer.You will be returned to main menu" + '\n'); return; } int updateSharePrice = input.nextInt(); editUniqueShareQuantity.setShareName(updateShareName); editUniqueShareQuantity.setSharePrice(updateSharePrice); editUniqueShareQuantity.setShareQuantity(allShareDetails.get(updateShareName).getShareQuantity()); allShareDetails.put(editUniqueShareQuantity.getShareName(),editUniqueShareQuantity); ShareMarketHashMap.editShare(); Map<String, ShareMarket> allShareDetailsupdated = ShareMarketHashMap.getShareMarket(); System.out.println("Share Name: " + allShareDetailsupdated.get(updateShareName).getShareName() +',' + " Share Price:" + allShareDetailsupdated.get(updateShareName).getSharePrice() +',' + " Share Quantity:" + allShareDetailsupdated.get(updateShareName).getShareQuantity()); System.out.println("Successfully updated price, please find above available shares" +'\n'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void doUpdate(SellOfer model, HttpServletRequest request,\n\t\t\tHttpServletResponse response) {\n\t\t if(StringUtil.isEmpty(model.getPrice())){\n\t\t\t\t model.setPrice(\"0\");\n\t\t\t }\n\t\t\t double dprice =Double.parseDouble(model.getPrice());\n\t\t BigDecimal bg = new BigDecimal(dprice/10000);\n\t\t double f1 = bg.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();\n\t\t model.setPrice(f1+\"\");\n\t\t model.setSource(\"001\");\n\t\t model.setSellContent(\"\");\n\t\tsuper.doUpdate(model, request, response);\n\t}", "void edit(Price Price);", "public void changePrice(Booking booking, float price);", "public void changePrice(String a) {\r\n getPrice().editAmount(a);\r\n }", "public void setPrice(double price){this.price=price;}", "public void updatehotelincome(double price ){\n String query = \"update Hotel set Income = Income + ? \";\n \n try {\n PreparedStatement Query = conn.prepareStatement(query);\n Query.setDouble(1,price);\n Query.execute();\n \n } catch (SQLException ex) {\n Logger.getLogger(sqlcommands.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "public void changePrices()\n {\n String publisher = (String) publishers.getSelectedItem();\n if (publisher.equals(\"Any\"))\n {\n result.setText(\"I am sorry, but I cannot do that.\");\n return;\n }\n try\n { \n if (priceUpdateStmt == null)\n priceUpdateStmt = conn.prepareStatement(priceUpdate);\n priceUpdateStmt.setString(1, priceChange.getText());\n priceUpdateStmt.setString(2, publisher);\n int r = priceUpdateStmt.executeUpdate();\n result.setText(r + \" records updated.\"); \n } \n catch (SQLException e)\n {\n result.setText(\"\");\n while (e != null)\n {\n result.append(\"\" + e);\n e = e.getNextException();\n }\n }\n }", "@Override\n\tpublic void doSave(SellOfer model, HttpServletRequest request,\n\t\t\tHttpServletResponse response) {\n\t\t if(StringUtil.isEmpty(model.getPrice())){\n\t\t\t model.setPrice(\"0\");\n\t\t }\n\t\t double dprice =Double.parseDouble(model.getPrice());\n\t BigDecimal bg = new BigDecimal(dprice/10000);\n\t double f1 = bg.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();\n\t model.setPrice(f1+\"\");\n\t model.setSource(\"001\");\n\t\t\n\t\tsuper.doSave(model, request, response);\n\t}", "public void changePrice(TripDTO trip, BigDecimal price);", "public void editProductPrice(String price){\r\n\t\twdlib.waitForElement(getProductText());\r\n\t\tif(getProductText().getText().equals(\"None Included\")){\r\n\t\t\tselPproductBtn.click();\r\n\t\t\tProductsPage pdpage=new ProductsPage();\r\n\t\t\tpdpage.selectProducts();\r\n\t\t\tdriver.navigate().refresh();\r\n\t\t\tselProductOpt.click();\r\n\t\t\twdlib.waitForElement(getProductText());\r\n\t\t\teditBtn.click();\r\n\t\t\taddNewPrice(price);\r\n\t\t}\r\n\t\telse{\r\n\t\t\t\r\n\t\t\teditBtn.click();\r\n\t\t\taddNewPrice(price);\r\n\t\t}\r\n\t\tdriver.navigate().refresh();\r\n\t}", "public void updatePrice(){\n\t\tprice = 0;\n\t\tfor (ParseObject selectedItem : selectedItems){\n\t\t\tprice += selectedItem.getInt(\"price\");\n\t\t}\n\n\t\tTextView orderTotal = (TextView) findViewById(R.id.orderTotal);\n\t\torderTotal.setText(\"$\" + price + \".00\");\n\t}", "public void increasePrice() {\n //price doubled\n itemToSell.setBuyPrice(itemToSell.getBuyPrice() * 2);\n }", "@FXML\n\t private void updateProductPrice (ActionEvent actionEvent) throws SQLException, ClassNotFoundException {\n\t try {\n\t ProductDAO.updateProdPrice(prodIdText.getText(),newPriceText.getText());\n\t resultArea.setText(\"Price has been updated for, product id: \" + prodIdText.getText() + \"\\n\");\n\t } catch (SQLException e) {\n\t resultArea.setText(\"Problem occurred while updating price: \" + e);\n\t }\n\t }", "private void updatePrice() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tfor(int i = first;i<last;i++){\r\n\t\t\tProduct product = products.get(i);\r\n\t\t\tproduct.setPrivce(product.getPrivce()*(1+increment));\r\n\t\t}\r\n\t\t\r\n\t}", "public void setPrice(float itemPrice) \n {\n price = itemPrice;\n }", "public void setPrice(double price)\n {\n this.price = price;\n }", "public void setPrice(double price)\n {\n this.price = price;\n }", "public void setPrice(Double price);", "public void priceUpdate(String security, double price) {\n logger.debug(\"There is a price update for stock: \" + security + \" :: updated price: \" + price);\n stockMap.get(security).setPricePerUnit(price);\n for (Map.Entry<String, PersonalStock> entrySet : personalStockMap.entrySet()) {\n entrySet.getValue().priceUpdate(security, price);\n }\n }", "public void setPrice(Money price) {\n this.price = price;\n }", "private void update() {\n\n\t\tfloat shopping = Float.parseFloat(label_2.getText());\n\t\tfloat giveing = Float.parseFloat(label_5.getText());\n\t\tfloat companyDemand = Float.parseFloat(label_7.getText());\n\n\t\ttry {\n\t\t\tPreparedStatement statement = DBConnection.connection\n\t\t\t\t\t.prepareStatement(\"update customer_list set Shopping_Account = \"\n\t\t\t\t\t\t\t+ shopping\n\t\t\t\t\t\t\t+ \" , Giving_Money_Account = \"\n\t\t\t\t\t\t\t+ giveing\n\t\t\t\t\t\t\t+ \", Company_demand = \"\n\t\t\t\t\t\t\t+ companyDemand\n\t\t\t\t\t\t\t+ \" where Name = '\"\n\t\t\t\t\t\t\t+ name\n\t\t\t\t\t\t\t+ \"' And Last_Name = '\"\n\t\t\t\t\t\t\t+ lastName + \"' \");\n\t\t\tstatement.execute();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\t\t}\n\n\t}", "public void setPrice(double price) {\r\n this.price = price;\r\n }", "public void setPrice(double price) {\r\n this.price = price;\r\n }", "public void setPrice(double price) {\r\n this.price = price;\r\n }", "public void editServicePrice(String price){\r\n\t\twdlib.waitForElement(getServiceText());\r\n\t\tif(getServiceText().getText().equals(\"None Included\")){\r\n\t\t\tselServiceBtn.click();\r\n\t\t\tServicesPage srvpage=new ServicesPage();\r\n\t\t\tsrvpage.selectServices();\r\n//\t\t\tdriver.navigate().refresh();\r\n\t\t\tselServicOpt.click();\r\n\t\t\twdlib.waitForElement(getServiceText());\r\n\t\t\teditService.click();\r\n\t\t\taddNewPrice(price);\r\n\t\t}\r\n\t\telse{\r\n\t\t\teditService.click();\r\n\t\t\taddNewPrice(price);\r\n\t\t}\r\n\t\tdriver.navigate().refresh();\r\n\t}", "public void setPrice(double newPrice) {\r\n price = newPrice;\r\n }", "public ProductWithStockItemTO changePrice(long storeID, StockItemTO stockItemTO) throws NotInDatabaseException, UpdateException;", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "private void updatePriceAndSaving() {\n movieOrder = new MovieOrder(movie, Weekday.weekdayForValue(selectedDay), flagsApplied, numberOfTickets);\n\n tvTotalPriceNewTickets.setText(getResources().getString(\n R.string.total_price_new_tickets,\n movieOrder.getTotalPriceAfterDiscount(),\n movieOrder.getNumberOfTicketsAfterOfferIsApplied())\n );\n\n tvSavingsNewTickets.setText(getResources().getString(\n R.string.today_saving_new_tickets,\n movieOrder.getTotalSaving()\n ));\n }", "public void priceUpdate(){\n \n double attractionPrices = 0;\n Attraction attraction;\n for(int i=0; i< getAttractionsList().size();i++)\n {\n attraction = (Attraction) getAttractionsList().get(i);\n attractionPrices += attraction.getPrice();\n }\n hotelPrice = diff(getEndDate(), getStartDate());\n price = getTravel().getPrice() + getHotel().getPrice()*(hotelPrice) \n + getTransport().getPrice()*getTravel().getDistance()\n + attractionPrices;\n }", "public void setPrice(Double price) {\r\n this.price = price;\r\n }", "public void increasePrice(int percentage);", "@Transactional\n @Modifying\n @Query(\"update Item i set i.price = i.price * 1.1\")\n void increacePriceBy10Percent();", "public void updateJobPrice(int job_ID, double total_price, double total_discount){\n try {\n Stm = conn.prepareStatement(\"UPDATE `bapers`.`Job` SET Total_discount = ?, Total_price = ? WHERE Job_ID = ?;\");\n Stm.setDouble(1, total_discount);\n Stm.setDouble(2,total_price);\n Stm.setInt(3, job_ID);\n Stm.executeUpdate();\n Stm.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void updateconsumption(HealthSearch healthSearcher,int amount,String id, String time,double price) {\n\t\ttry {\n\t\t\tConnection connection = this.getConnection();\n\t\t\tPreparedStatement stmt = connection.prepareStatement(\"SELECT protein, energy, fiber,price FROM diet_conclusion where id = ? AND date = ?\");\n\t\t\tstmt.setString(1,id);\n\t\t\tstmt.setString(2,time.substring(0,8));\n\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\tif(rs.next()) {\n\t\t\t\tdouble previous_energy =0;\n\t\t\t\tdouble previous_fiber =0;\n\t\t\t\tdouble previous_protein =0;\n\t\t\t\tdouble previous_price = 0;\n\t\t\t\tdouble current_protein = 0;\n\t\t\t\tdouble current_energy =0;\n\t\t\t\tdouble current_fiber = 0;\n\t\t\t\tdouble current_price = 0;\n\t\t\t\tprevious_protein = rs.getDouble(1);\n\t\t\t\tprevious_energy = rs.getDouble(2);\n\t\t\t\tprevious_fiber = rs.getDouble(3);\n\t\t\t\tprevious_price = rs.getDouble(4);\n\n\t\t\t\tcurrent_price = price + previous_price;\n\n\n\t\t\t\tif( !healthSearcher.getProtein().equals(\"0\")) {\n\t\t\t\t\t current_protein = previous_protein + Double.parseDouble(healthSearcher.getProtein())*amount/100.0;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcurrent_protein = previous_protein;\n\n\t\t\t\t}\n\t\t\t\tif( !healthSearcher.getEnergy().equals(\"0\")) {\n\t\t\t\t\tcurrent_energy = previous_energy + Double.parseDouble(healthSearcher.getEnergy())*amount/100.0;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcurrent_energy = previous_energy;\n\t\t\t\t}\n\t\t\t\tif( !healthSearcher.getFiber().equals(\"0\")) {\n\t\t\t\t\tcurrent_fiber = previous_fiber + Double.parseDouble(healthSearcher.getFiber())*amount/100.0;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcurrent_fiber = previous_fiber;\n\t\t\t\t}\n\t\t\t\tPreparedStatement stmt2 = connection.prepareStatement(\n\t\t\t\t\"UPDATE diet_conclusion SET protein = ?, energy = ?, fiber = ?, price=? WHERE id = ? AND date = ?;\");\n\n\t\t\t\tstmt2.setDouble(1, current_protein);\n\t\t\t\tstmt2.setDouble(2, current_energy);\n\t\t\t\tstmt2.setDouble(3, current_fiber);\n\t\t\t\tstmt2.setDouble(4, current_price);\n\t\t\t\tstmt2.setString(5, id);\n\t\t\t\tstmt2.setString(6, time.substring(0,8));\n\t\t\t\tstmt2.execute();\n\t\t\t\tstmt2.close();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tPreparedStatement stmt1 = connection.prepareStatement(\n\t\t\t\t\t\t\"INSERT INTO diet_conclusion VALUES(?,?,?,?,?,?)\");\n\t\t\t\tstmt1.setString(1,id);\n\t\t\t\tstmt1.setString(2, time.substring(0,8));\n\t\t\t\tstmt1.setDouble(3, Double.parseDouble(healthSearcher.getProtein())*amount/100.0);\n\t\t\t\tstmt1.setDouble(4, Double.parseDouble(healthSearcher.getEnergy())*amount/100.0);\n\t\t\t\tstmt1.setDouble(5, Double.parseDouble(healthSearcher.getFiber())*amount/100.0);\n\t\t\t\tstmt1.setDouble(6, price);\n\t\t\t\tstmt1.execute();\n\t\t\t\tstmt1.close();\n\t\t\t}\n\t\t\tstmt.close();\n\t\t\trs.close();\n\t\t\tconnection.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}", "ResponseEntity<Price> updatePrice(String cartId);", "public void setPrice(Float price) {\r\n this.price = price;\r\n }", "public void setPrice(Double price) {\n this.price = price;\n }", "public void setPrice(Double price) {\n this.price = price;\n }", "public void setPrice(int price) {\r\n this.price = price;\r\n }", "public void setPricePerSquareFoot(double newPricePerSquareFoot){\nif(newPricePerSquareFoot > 0){\npricePerSquareFoot = newPricePerSquareFoot;\n}\n}", "public void setPrice(Float price) {\n this.price = price;\n }", "public void setPrice(int price) {\n this.price = price;\n }", "public int Edshare(Long cid, Long shareamt,String datee, Long shareno, Long sindex) throws SQLException,ClassNotFoundException{\n\tint i=DbConnect.getStatement().executeUpdate(\"update share_details set no_share=\"+shareno+\",shareprice=\"+shareamt+\",shareindex=\"+sindex+\" where comp_id=\"+cid+\" and DATEOFTRANS='\"+datee+\"'\");\r\n\treturn i;\r\n\t\r\n}", "public void setPriceEntered (BigDecimal PriceEntered);", "public void setPrice(float price) {\n this.price = price;\n }", "public void setPrice(float price) {\n this.price = price;\n }", "@Override\r\n\t\t\tpublic void handle(CellEditEvent<Products, String> arg0) {\n\t\t\t\targ0.getTableView().getItems().get(arg0.getTablePosition().getRow()).setPrice(arg0.getNewValue());\r\n\t\t\t\tProducts data=(Products) tbl_view.getSelectionModel().getSelectedItem();\r\n\t\t\t\tSystem.out.println(data.toString());\r\n\t\t\t\tConnectionManager.queryInsert(conn, \"UPDATE dbo.product SET price='\"+data.getPrice()+\"' WHERE id=\"+data.getId());\r\n\t\t\t\ttxt_cost.clear();\r\n\t\t\t\ttxt_date.clear();\r\n\t\t\t\ttxt_name.clear();\r\n\t\t\t\ttxt_price.clear();\r\n\t\t\t\ttxt_qty.clear();\r\n\t\t\t\ttxt_reorder.clear();\r\n\t\t\t\ttxt_search.clear();\r\n\t\t\t\tfetchData(FETCH_DATA);\r\n\t\t\t}", "@Override\n\tpublic boolean updateShopCartMoney(double price) {\n\t\treturn false;\n\t}", "public void setPrice(double value) {\n this.price = value;\n }", "public void setPrice(double value) {\n this.price = value;\n }", "public void updateTotalPrice(){\n\t\tBigDecimal discount = currentOrder.getDiscount();\n\t\tBigDecimal subtotal = currentOrder.getSubtotal();\n\t\tthis.subtotal.text.setText(CURR+subtotal.add(discount).toString());\n\t\tthis.discount.text.setText(CURR + discount.toString());\n\t\tthis.toPay.text.setText(CURR+subtotal.toString());\n\t}", "public void setPrice(int price) {\n\tthis.price = price;\n}", "public void changePrice(Product p, int price){\r\n\t\tp.price = price;\r\n\t}", "public void setPrice(int price) {\n this.price = (double)price;\n }", "public void setPrice(double p)\r\n\t{\r\n\t\tprice = p;\r\n\t}", "public void setPrice(BigDecimal price) {\r\n this.price = price;\r\n }", "public void setPrice(BigDecimal price) {\r\n this.price = price;\r\n }", "public void doChangeTicketPrices();", "public void setPrice(BigDecimal price) {\n this.price = price;\n }", "public void setPrice(BigDecimal price) {\n this.price = price;\n }", "@Override\n public void update(float price) {\n float newPriceForBidding = Math.round(price + (Math.random() * 100) + (Math.random() * 100));\n display(newPriceForBidding);\n }", "@Override\n\tdouble updateTotalPrice() {\n\t\treturn 0;\n\t}", "public static void updateShareQuantity(){\r\n\r\n\tMap<String, ShareMarket> everyShareDetails = ShareMarketHashMap.getShareMarket();\r\n\tdisplayMap(everyShareDetails);\r\n\tShareMarket editUniqueSharePrice = new ShareMarket();\t\r\n\tSystem.out.println('\\n' + \"Enter Share Name for updating quantity: \");\r\n\tString shareName = input.next();\r\n\tif(!everyShareDetails.containsKey(shareName))\t{\r\n\t\tSystem.out.println(\"Share doesn't exist :( .You will be returned to main menu\" +'\\n');\r\n\t\treturn;\r\n\t}\r\n\tSystem.out.println(\"Enter Share Quantiy : \");\r\n\tif(!input.hasNextInt()) {\r\n\t\tSystem.out.println(\"Quantity entered in invalid, it should be a postive integer.You will be returned to main menu\" + '\\n');\r\n\t\treturn;\r\n\t}\t\r\n\tint updateshareQuantity = input.nextInt();\t\t\t\r\n\teditUniqueSharePrice.setShareName(shareName);\r\n\teditUniqueSharePrice.setShareQuantity(updateshareQuantity);\r\n\teditUniqueSharePrice.setSharePrice(everyShareDetails.get(shareName).getSharePrice());\r\n\teveryShareDetails.put(editUniqueSharePrice.getShareName(),editUniqueSharePrice);\r\n\tShareMarketHashMap.editShare();\r\n\tMap<String, ShareMarket> everyShareDetailsupdate = ShareMarketHashMap.getShareMarket();\r\n\tSystem.out.println(\" Share Name: \" + everyShareDetailsupdate.get(shareName).getShareName() +',' + \" Share Price: \" + everyShareDetailsupdate.get(shareName).getSharePrice() +',' + \" Share Quantity: \" + everyShareDetailsupdate.get(shareName).getShareQuantity());\r\n\r\n\tSystem.out.println(\"Successfully updated quantiy, Please find above available shares\" + '\\n');\r\n}", "void updatePriceReference(final ApplicationAssetPairTicker applicationAssetPairTicker);", "public void setPrice (double ticketPrice)\r\n {\r\n price = ticketPrice;\r\n }", "public void setPrice(int newPrice){\n productRelation.setCost(newPrice);\n }", "public void setPotatoesPrice(double p);", "int updateByPrimaryKey(ProductPricelistEntity record);", "public void setPrice(double price) \n\t{\n\t\tthis.price = price;\n\t}", "public void setPrice(int value) {\n this.price = value;\n }", "public void setPrice(double p){\n\t\t// store into the instance variable price the value of the parameter p\n\t\tprice = p;\n\t}", "public void setPrice(Integer price) {\r\n this.price = price;\r\n }", "public void setPrice(Integer price) {\r\n this.price = price;\r\n }", "public void setPrice(double price) {\r\n\t\tthis.price = price;\r\n\t}", "public void setPrice(double price) {\r\n\t\tthis.price = price;\r\n\t}", "public static void setPrice() {\n double summe = 0.0;\n for (Object obj : dlm.getDisplayedArtikel()) {\n if (obj instanceof Article) {\n Article art = (Article) obj;\n if (!art.isIsAbfrage()) {\n if (((art.isJugendSchutz() && art.isJugendSchutzOk())) || !art.isJugendSchutz()) {\n if (art.isEloadingAmmountOk() && !art.isPriceZero()) {\n summe += ((Article) ((obj))).getPreis() * ((Article) ((obj))).getAmount();\n }\n }\n }\n } else if (obj instanceof Karte) {\n Karte card = (Karte) obj;\n summe += card.getAufladung() / 100;\n }\n }\n for (Object obj : dlm.getRemovedObjects()) {\n if (obj instanceof Article) {\n if (!((Article) ((obj))).isStorno_error()) {\n summe -= ((Article) ((obj))).getPreis() * ((Article) ((obj))).getAmount();\n }\n } else if (obj instanceof Karte) {\n Karte card = (Karte) obj;\n summe -= card.getAufladung() / 100;\n }\n }\n if (Math.round(summe) == 0) {\n summe = 0;\n }\n if (GUIOperations.isTraining()) {\n summe += 1000;\n }\n tfSumme.setText(String.format(\"%.2f\", summe));\n }", "public void setPrice(Integer price) {\n this.price = price;\n }", "public void setPrice(Integer price) {\n this.price = price;\n }", "public void setPrice(Integer price) {\n this.price = price;\n }", "public void setPrice(Integer price) {\n this.price = price;\n }", "@Override\r\n\tpublic void setPrice(double p) {\n\t\tprice = p;\r\n\t}", "public void setPrice(Long price) {\n this.price = price;\n }", "private void changePrice() {\n\t\tint sic_idHolder; // declares sic_idHolder\n\t\tdouble priceHolder; // declares priceHolder\n\t\t\n\t\tSystem.out.println(\"Please enter the SIC-ID of the book you'd like to change the price of:\");\n\t\tsic_idHolder = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\tif(inventoryObject.cardExists(sic_idHolder)) { // checks to see if card exists\n\t\t\tSystem.out.println(\"Please enter the new price of the book:\");\n\t\t\tpriceHolder = scan.nextDouble();\n\t\t\tscan.nextLine();\n\t\t\tif(priceHolder < 0) { // checks to see if priceHolder is negative\n\t\t\t\tSystem.out.println(\"The price cannot be below zero\\n\");\n\t\t\t\tgetUserInfo();\n\t\t\t}\n\t\t\tinventoryObject.changePrice(sic_idHolder, priceHolder);\n\t\t\tgetUserInfo();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"The ID you entered does not exist\\n\");\n\t\t\tgetUserInfo();\n\t\t}\n\t}", "@Override\n\tpublic String updateFoodPrice(int fid, double price) {\n\t\treturn fb.updateFoodPrice(fid, price);\n\t}", "public void putNewPrice(String symbol, double price);", "public void setPriceLimitOld (BigDecimal PriceLimitOld);", "public void setPrice(double p) {\n\t\tprice = p;\n\t}", "void stockPriceChanged(Stock stock, double oldValue, double newValue);", "public String updateProductPrice(PriceAndCurrency priceAndCurrency) {\n\t\t// TODO Auto-generated method stub\n\t\tString response = myRetailAppDao.updateProductPrice(priceAndCurrency);\n\t\treturn response;\n\t}", "void editTakingPrice() throws PresentationException {\n\t\tTakingPrice tp = null;\n\t\tint codebar_item;\n\t\tint code_supermarket;\n\t\tint newCodeItem;\n\n\t\tprinter.printMsg(\"Digite o código do item a ser alterado? \");\n\t\tcodebar_item = reader.readNumber();\n\n\t\tprinter.printMsg(\"Digite o código do supermercado a ser alterado? \");\n\t\tcode_supermarket = reader.readNumber();\n\n\t\tprinter.printMsg(\n\t\t\t\t\" Digite a data da tomada de preço do item: (Ex.Formato: '2017-12-16 10:55:53' para 16 de dezembro de 2017, 10 horas 55 min e 53 seg)\");\n\t\tString dateTP = reader.readText();\n\t\tdateTP = reader.readText();\n\n\t\tString pattern = \"yyyy-mm-dd hh:mm:ss\";\n\t\tSimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\n\t\tDate dateTPF = null;\n\t\ttry {\n\t\t\tdateTPF = simpleDateFormat.parse(dateTP);\n\t\t} catch (ParseException e) {\n\t\t\tthrow new PresentationException(\"Não foi possível executar a formatação da data no padrão definido\", e);\n\t\t\t// e.printStackTrace();\n\t\t}\n\t\t// pensando em cadastrar o novo preço sem editar o preço antigo. Senão terei que\n\t\t// controlar por muitos atributos.\n\n\t\tif (tpm.checksExistence(codebar_item, code_supermarket, dateTPF)) {\n\t\t\ttp = tpm.getTakingPrice(codebar_item, code_supermarket, dateTPF);\n\t\t\tint codeSupermarket = tp.getCodeSupermarket();\n\t\t\tdouble priceItem = tp.getPrice();\n\t\t\tDate dateTPE = tp.getDate();\n\t\t\tint respEdit = 0;\n\n\t\t\ttpm.deleteTakingPrice(codebar_item, code_supermarket, dateTPE);\n\n\t\t\tdo {\n\t\t\t\ttry {\n\t\t\t\t\trespEdit = this.askWhatEdit(tp);\n\n\t\t\t\t} catch (NumeroInvalidoException e) {\n\t\t\t\t\tthrow new PresentationException(\"A opção digitada não é uma opção válida\", e);\n\t\t\t\t}\n\n\t\t\t\tif (respEdit == 1) {\n\t\t\t\t\tprinter.printMsg(\" Digite o novo código do item: \");\n\t\t\t\t\tnewCodeItem = reader.readNumber();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.saveTakingPrice(newCodeItem, priceItem, codeSupermarket, dateTPE);\n\t\t\t\t\t} catch (PresentationException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t} else if (respEdit == 2) {\n\t\t\t\t\tprinter.printMsg(\" Digite o novo código do supermercado: \");\n\t\t\t\t\tint newCodeSupermarket = 0;\n\t\t\t\t\tnewCodeSupermarket = reader.readNumber();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.saveTakingPrice(codebar_item, priceItem, newCodeSupermarket, dateTPE);\n\t\t\t\t\t} catch (PresentationException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t} else if (respEdit == 3) {\n\t\t\t\t\tprinter.printMsg(\" Digite o novo preço do item: \");\n\t\t\t\t\tdouble newPriceItem = 0;\n\t\t\t\t\tnewPriceItem = reader.readNumberDouble();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.saveTakingPrice(codebar_item, newPriceItem, codeSupermarket, dateTPE);\n\t\t\t\t\t} catch (PresentationException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t} else if (respEdit == 4) {\n\t\t\t\t\tprinter.printMsg(\n\t\t\t\t\t\t\t\" Digite a nova data da tomada de preço do item: (Ex.Formato: '2017-12-16 10:55:53' para 16 de dezembro de 2017, 10 horas 55 min e 53 seg)\");\n\t\t\t\t\tString date = reader.readText();\n\t\t\t\t\tdate = reader.readText();\n\n\t\t\t\t\t// String pattern = \"yyyy-mm-dd hh:mm:ss\";\n\t\t\t\t\t// SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\n\t\t\t\t\tDate newDateTP = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tnewDateTP = simpleDateFormat.parse(date);\n\t\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t\tthrow new PresentationException(\"A opção digitada não é uma opção válida\", e);\n\t\t\t\t\t\t// e.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(\"Date:\" + date);\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.saveTakingPrice(codebar_item, priceItem, codeSupermarket, newDateTP);\n\t\t\t\t\t} catch (PresentationException 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} while (respEdit != 1 & respEdit != 2 & respEdit != 3 & respEdit != 4);\n\n\t\t} else\n\n\t\t{\n\t\t\tprinter.printMsg(\"Não existe tomada de preço com estes códigos cadastrados.\");\n\t\t}\n\n\t}", "@Override\r\n\tpublic void pUpdate(String name, String depict, String type, double price, String img,String phone, int PS2_id,int P_id) {\n\t\tConnection connection = DBUtils.getConnection();\r\n\t\tPreparedStatement preparedStatement = null;\r\n\t\tString sql = \"update product set name=?,depict=?,type=?,price=?,img=?,phone=?,PS2_id=? where P_id=?\";\r\n\t try {\r\n\t \tconnection.setAutoCommit(false);\r\n\t \tpreparedStatement = connection.prepareStatement(sql);\r\n\t\t\tpreparedStatement.setString(1, name);\r\n\t\t\tpreparedStatement.setString(2, depict);\r\n\t\t\tpreparedStatement.setString(3, type);\r\n\t\t\tpreparedStatement.setDouble(4, price);\r\n\t\t\tpreparedStatement.setString(5, img);\r\n\t\t\tpreparedStatement.setString(6, phone);\r\n\t\t\tpreparedStatement.setInt(7, PS2_id);\r\n\t\t\tpreparedStatement.setInt(8,P_id);\r\n\t\t\tpreparedStatement.execute();\r\n\t\t\tconnection.commit();\r\n\t\t} catch (SQLException e) {\r\n\t\t\ttry {\r\n\t\t\t\tconnection.rollback();\r\n\t\t\t} catch (SQLException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tDBUtils.release(null, preparedStatement, connection);\r\n\t\t}\r\n\t}", "@Override\n public void updateProduct(TradingQuote tradingQuote) {\n }", "public void setPrice(double price) {\n\t\tthis.price = price;\n\t}" ]
[ "0.7352443", "0.70516807", "0.6766047", "0.6693502", "0.6563454", "0.65389776", "0.64753175", "0.6445923", "0.64289075", "0.6417932", "0.6416791", "0.64101624", "0.64026815", "0.63966775", "0.63925344", "0.6383713", "0.6381972", "0.63817155", "0.63398576", "0.6326026", "0.6303091", "0.6298201", "0.6298201", "0.6298201", "0.6290786", "0.62822104", "0.6276328", "0.62763035", "0.62763035", "0.62763035", "0.62763035", "0.62763035", "0.62763035", "0.62763035", "0.62756646", "0.62706655", "0.62464905", "0.6245158", "0.6215863", "0.62119156", "0.62027454", "0.6201034", "0.6185982", "0.6184659", "0.6184659", "0.61798847", "0.6166998", "0.6158052", "0.6152496", "0.614492", "0.61440367", "0.613418", "0.613418", "0.6131802", "0.6129547", "0.6106346", "0.6106346", "0.61007303", "0.6097168", "0.6095025", "0.60940796", "0.60843176", "0.6060098", "0.6060098", "0.6048224", "0.60431755", "0.60431755", "0.6038767", "0.60374403", "0.6037196", "0.6010472", "0.59957784", "0.59919995", "0.59887767", "0.5983017", "0.59757334", "0.5972031", "0.5957914", "0.59489673", "0.59489673", "0.593809", "0.593809", "0.5936604", "0.5933368", "0.5933368", "0.5933368", "0.5933368", "0.5921758", "0.5920204", "0.5914462", "0.59008574", "0.5889882", "0.588721", "0.5876731", "0.5871799", "0.5852253", "0.5848588", "0.58406055", "0.58341205", "0.5830754" ]
0.6750623
3
Admin Function update transaction charge
public static void updateTransactionCharge(){ Scanner userInput = new Scanner(System.in); System.out.println("Current STT charge is" +ApplicableCharge.getSecuritiesTransferTaxRate()); System.out.println("Current Transaction charge is" +ApplicableCharge.getTransactionChargeRate()); System.out.println("Enter Transaction Charge "); if(!userInput.hasNextDouble()) { System.out.println("Transaction charge entered in invalid, it should be a numeric value. You will be returned to main menu" + '\n'); return; } double transactionCharge = userInput.nextDouble(); ApplicableCharge.setTransactionChargeRate(transactionCharge); System.out.println("Updated Transaction charge is" +ApplicableCharge.getTransactionChargeRate() +'\n'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Transfer updateChargeBack(Transfer transfer, Transfer chargeback);", "public void updateTransaction(Transaction trans);", "private void updateTransaction() {\n LogUtils.logEnterFunction(Tag);\n\n String inputtedAmount = etAmount.getText().toString().trim().replaceAll(\",\", \"\");\n if (inputtedAmount.equals(\"\") || Double.parseDouble(inputtedAmount) == 0) {\n etAmount.setError(getResources().getString(R.string.Input_Error_Amount_Empty));\n return;\n }\n\n if (mAccount == null) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Account_Empty));\n return;\n }\n\n Double amount = Double.parseDouble(inputtedAmount);\n int categoryId = mCategory != null ? mCategory.getId() : 0;\n String description = tvDescription.getText().toString();\n int accountId = mAccount.getId();\n String strEvent = tvEvent.getText().toString();\n Event event = null;\n\n if (!strEvent.equals(\"\")) {\n event = mDbHelper.getEventByName(strEvent);\n if (event == null) {\n long eventId = mDbHelper.createEvent(new Event(0, strEvent, mCal, null));\n if (eventId != -1) {\n event = mDbHelper.getEvent(eventId);\n }\n }\n }\n\n // Less: Repayment, More: Lend\n if(mCategory.getDebtType() == Category.EnumDebt.LESS || mCategory.getDebtType() == Category.EnumDebt.MORE) {\n\n boolean isDebtValid = true;\n if(mCategory.getDebtType() == Category.EnumDebt.LESS) { // Income -> Debt Collecting\n List<Debt> debts = mDbHelper.getAllDebtByPeople(tvPeople.getText().toString());\n\n Double lend = 0.0, debtCollect = 0.0;\n for(Debt debt : debts) {\n if(mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) {\n lend += debt.getAmount();\n }\n\n if(!mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.LESS) {\n debtCollect += debt.getAmount();\n }\n }\n\n if(debtCollect + amount > lend) {\n isDebtValid = false;\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_debt_collect_invalid));\n }\n\n } // End DebtType() == Category.EnumDebt.LESS\n if(isDebtValid) {\n Transaction transaction = new Transaction(mTransaction.getId(),\n TransactionEnum.Income.getValue(),\n amount,\n categoryId,\n description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n int row = mDbHelper.updateTransaction(transaction);\n if (row == 1) { // Update transaction OK\n\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n Debt debt = mDbHelper.getDebtByTransactionId(mTransaction.getId());\n debt.setCategoryId(mCategory.getId());\n debt.setAmount(amount);\n debt.setPeople(tvPeople.getText().toString());\n\n int debtRow = mDbHelper.updateDebt(debt);\n if(debtRow == 1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_successful));\n cleanup();\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n } else {\n // Revert update\n mDbHelper.updateTransaction(mTransaction);\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_fail));\n }\n } else {\n Debt newDebt = new Debt();\n newDebt.setCategoryId(mCategory.getId());\n newDebt.setTransactionId((int) mTransaction.getId());\n newDebt.setAmount(amount);\n newDebt.setPeople(tvPeople.getText().toString());\n\n long debtId = mDbHelper.createDebt(newDebt);\n if(debtId != -1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_create_successful));\n cleanup();\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n } else {\n // Revert update\n mDbHelper.updateTransaction(mTransaction);\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_fail));\n }\n } // End create new Debt\n\n } // End Update transaction OK\n } // End isDebtValid\n\n } else { // CATEGORY NORMAL\n Transaction transaction = new Transaction(mTransaction.getId(),\n TransactionEnum.Income.getValue(),\n amount,\n categoryId,\n description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n int row = mDbHelper.updateTransaction(transaction);\n if (row == 1) { // Update transaction OK\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n mDbHelper.deleteDebt(mDbHelper.getDebtByTransactionId(mTransaction.getId()).getId());\n }\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n }\n }\n\n LogUtils.logLeaveFunction(Tag);\n }", "public void UpdateTransaction() {\n\t\tgetUsername();\n\t\tcol_transactionID.setCellValueFactory(new PropertyValueFactory<Account, Integer>(\"transactionID\"));\n\t\tcol_date.setCellValueFactory(new PropertyValueFactory<Account, Date>(\"date\"));\n\t\tcol_description.setCellValueFactory(new PropertyValueFactory<Account, String>(\"description\"));\n\t\tcol_category.setCellValueFactory(new PropertyValueFactory<Account, String>(\"category\"));\n\t\tcol_amount.setCellValueFactory(new PropertyValueFactory<Account, Double>(\"amount\"));\n\t\tmySqlCon.setUsername(username);\n\t\tlists = mySqlCon.getAccountData();\n\t\ttableTransactions.setItems(lists);\n\t}", "private void updateTransactionFields() {\n if (transaction == null) {\n descriptionText.setText(\"\");\n executionDateButton.setText(dateFormat.format(new Date()));\n executionTimeButton.setText(timeFormat.format(new Date()));\n valueText.setText(\"\");\n valueSignToggle.setNegative();\n addButton.setText(R.string.add);\n // If we are editing a node, fill fields with current information\n } else {\n try {\n transaction.load();\n descriptionText.setText(transaction.getDescription());\n executionDateButton.setText(dateFormat.format(\n transaction.getExecutionDate()));\n executionTimeButton.setText(timeFormat.format(\n transaction.getExecutionDate()));\n BigDecimal value = transaction.getValue();\n valueText.setText(value.abs().toString());\n valueSignToggle.setToNumberSign(value);\n addButton.setText(R.string.edit);\n } catch (DatabaseException e) {\n Log.e(\"TMM\", \"Error loading transaction\", e);\n }\n }\n \n if (currentMoneyNode != null) {\n currencyTextView.setText(currentMoneyNode.getCurrency());\n }\n \n updateCategoryFields();\n updateTransferFields();\n }", "void chargeTf(double amount);", "@Override\n\tpublic void updateCharge(Charge charge) {\n\t\tchargeMapper.updateCharge(charge);\n\t}", "@Override\r\n\tpublic void pay(long dateTime, float charge) {\n\t\t\r\n\t}", "public void recordPurchase(double amount)\n {\n balance = balance - amount;\n // your code here\n \n }", "void updateCustomerDDPay(CustomerDDPay cddp);", "void setAsInCharge(User user, Project project, Date date);", "public void Deposit(double ammount){\n abal = ammount + abal;\n UpdateDB();\n }", "private void updateMoney() {\n balance = mysql.getMoney(customerNumber);\n balanceConverted = (float) balance / 100.00;\n }", "public static void updatePayment(){\n projectChosen = getQuestionInput();\r\n try {\r\n Connection myConn = DriverManager.getConnection(url, user, password);\r\n\r\n String sqlInsert = \"UPDATE projects SET tot_paid = ?\" +\r\n \"WHERE project_num = \" + projectChosen;\r\n\r\n PreparedStatement pstmt = myConn.prepareStatement(sqlInsert);\r\n pstmt.setDouble(1, NewProject.tot_paid);\r\n pstmt.executeUpdate(); //Execute update of database.\r\n pstmt.close();\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public int balup(double newbalance, Long accountno, Long broaccno, Double bramt) throws Exception{\n\tint j=DbConnect.getStatement().executeUpdate(\"update account set balance=\"+newbalance+\" where accno=\"+accountno+\"\");\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update account set balance=balance+\"+bramt+\" where accno=\"+broaccno+\"\");\r\n\treturn i;\r\n}", "public void updateRebill(HashMap<String, String> params) {\n\t\tTRANSACTION_TYPE = \"SET\";\n\t\tREBILL_ID = params.get(\"rebillID\");\n\t\tTEMPLATE_ID = params.get(\"templateID\");\n\t\tNEXT_DATE = params.get(\"nextDate\");\n\t\tREB_EXPR = params.get(\"expr\");\n\t\tREB_CYCLES = params.get(\"cycles\");\n\t\tREB_AMOUNT = params.get(\"rebillAmount\");\n\t\tNEXT_AMOUNT = params.get(\"nextAmount\");\n\t\tAPI = \"bp20rebadmin\";\n\t}", "Order setAsInCharge(Order order, User user);", "Account.Update update();", "int update(Purchase purchase) throws SQLException, DAOException;", "public void updateAccountingSystem(Sale sale)\n {\n \n }", "abstract void updateRecurringTransactions(Ui ui) throws BankException;", "private void update() {\n\n\t\tfloat shopping = Float.parseFloat(label_2.getText());\n\t\tfloat giveing = Float.parseFloat(label_5.getText());\n\t\tfloat companyDemand = Float.parseFloat(label_7.getText());\n\n\t\ttry {\n\t\t\tPreparedStatement statement = DBConnection.connection\n\t\t\t\t\t.prepareStatement(\"update customer_list set Shopping_Account = \"\n\t\t\t\t\t\t\t+ shopping\n\t\t\t\t\t\t\t+ \" , Giving_Money_Account = \"\n\t\t\t\t\t\t\t+ giveing\n\t\t\t\t\t\t\t+ \", Company_demand = \"\n\t\t\t\t\t\t\t+ companyDemand\n\t\t\t\t\t\t\t+ \" where Name = '\"\n\t\t\t\t\t\t\t+ name\n\t\t\t\t\t\t\t+ \"' And Last_Name = '\"\n\t\t\t\t\t\t\t+ lastName + \"' \");\n\t\t\tstatement.execute();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\t\t}\n\n\t}", "@Transactional\n public String transferMoney(Integer destCardId, double amount, HttpServletRequest r) {\n Card toCard = cardService.getCard(destCardId);\n double currentAmount = currentCard.getAmount();\n JSONObject json = new JSONObject();\n if (currentAmount < amount) {\n try {\n json.put(\"sucess\", false);\n json.put(\"result\", \"Недостаточно средств.\");\n } catch (JSONException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n\n } else {\n currentCard.setAmount(currentAmount - amount);\n double newAmount = converter.convert(currentCard.getCurrency(), toCard.getCurrency(), amount);\n toCard.setAmount(toCard.getAmount() + newAmount);\n Invoice invoice = currentCard.createInvoice();\n invoice.setToCard(destCardId);\n invoice.setAmount(newAmount);\n String date = new SimpleDateFormat(\"dd.MM.yyyy-hh.mm-a\").format(GregorianCalendar.getInstance().getTime());\n invoice.setDate(date);\n invoice.setCurrency(toCard.getCurrency());\n invoiceService.addInvoice(invoice);\n try {\n json.put(\"sucess\", true);\n json.put(\"result\", \"Успешно.\");\n } catch (JSONException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n }\n cardService.update(currentCard);\n r.getSession().setAttribute(\"Card\", currentCard);\n cardService.update(toCard);\n return json.toString();\n }", "int updateByPrimaryKey(CGcontractCredit record);", "void updateAccount();", "public void deposit(double amount) {\n balance += amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo='\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n }", "@Override\r\n\tpublic void updatePurchase(Purchase Purchase) throws Exception {\n\t\t\r\n\t}", "public int baldown(double newbalance, Long accountno, Long broaccno, Double bramt) throws Exception{\n\tint j=DbConnect.getStatement().executeUpdate(\"update account set balance=\"+newbalance+\" where accno=\"+accountno+\"\");\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update account set balance=balance+\"+bramt+\" where accno=\"+broaccno+\"\");\r\n\treturn i;\r\n}", "public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}", "void updateBalance(int amount){ \n\t\tbalance = amount;\n\t}", "public void editContestPayment(ContestPayment contestPayment) throws ContestManagementException {\n \r\n }", "public void editContestPayment(ContestPayment contestPayment) throws ContestManagementException {\n \r\n }", "@Action(value = \"saveCustomChargeInfo\", results = { @Result(name = \"success\", type = \"json\"), })\n\tpublic String saveCustomChargeInfo() {\n\t\tlog.info(\"Starting to save customer charge info into DB\");\n\t\tboolean flag = false;\n\t\ttry {\n\t\t\tthis.customerChargeServiceImpl.addCustomChargeInfo(this.customerChargeBean);\n\t\t\tflag = true;\n\t\t} catch (Exception e) {\n\t\t\tlog.info(\"save customer charge data into DB occured error, please references the detail log\\n \" + \"[\" + e + \"]\\n\"\n\t\t\t\t\t+ ErrorLogUtil.printInfo(e));\n\t\t\treturn ERROR;\n\t\t}\n\t\tif (flag) {\n\t\t\tlog.info(\"Successfully save customer charge info into DB\");\n\t\t\treturn SUCCESS;\n\t\t}\n\t\treturn ERROR;\n\t}", "public void updateconsumption(HealthSearch healthSearcher,int amount,String id, String time,double price) {\n\t\ttry {\n\t\t\tConnection connection = this.getConnection();\n\t\t\tPreparedStatement stmt = connection.prepareStatement(\"SELECT protein, energy, fiber,price FROM diet_conclusion where id = ? AND date = ?\");\n\t\t\tstmt.setString(1,id);\n\t\t\tstmt.setString(2,time.substring(0,8));\n\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\tif(rs.next()) {\n\t\t\t\tdouble previous_energy =0;\n\t\t\t\tdouble previous_fiber =0;\n\t\t\t\tdouble previous_protein =0;\n\t\t\t\tdouble previous_price = 0;\n\t\t\t\tdouble current_protein = 0;\n\t\t\t\tdouble current_energy =0;\n\t\t\t\tdouble current_fiber = 0;\n\t\t\t\tdouble current_price = 0;\n\t\t\t\tprevious_protein = rs.getDouble(1);\n\t\t\t\tprevious_energy = rs.getDouble(2);\n\t\t\t\tprevious_fiber = rs.getDouble(3);\n\t\t\t\tprevious_price = rs.getDouble(4);\n\n\t\t\t\tcurrent_price = price + previous_price;\n\n\n\t\t\t\tif( !healthSearcher.getProtein().equals(\"0\")) {\n\t\t\t\t\t current_protein = previous_protein + Double.parseDouble(healthSearcher.getProtein())*amount/100.0;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcurrent_protein = previous_protein;\n\n\t\t\t\t}\n\t\t\t\tif( !healthSearcher.getEnergy().equals(\"0\")) {\n\t\t\t\t\tcurrent_energy = previous_energy + Double.parseDouble(healthSearcher.getEnergy())*amount/100.0;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcurrent_energy = previous_energy;\n\t\t\t\t}\n\t\t\t\tif( !healthSearcher.getFiber().equals(\"0\")) {\n\t\t\t\t\tcurrent_fiber = previous_fiber + Double.parseDouble(healthSearcher.getFiber())*amount/100.0;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcurrent_fiber = previous_fiber;\n\t\t\t\t}\n\t\t\t\tPreparedStatement stmt2 = connection.prepareStatement(\n\t\t\t\t\"UPDATE diet_conclusion SET protein = ?, energy = ?, fiber = ?, price=? WHERE id = ? AND date = ?;\");\n\n\t\t\t\tstmt2.setDouble(1, current_protein);\n\t\t\t\tstmt2.setDouble(2, current_energy);\n\t\t\t\tstmt2.setDouble(3, current_fiber);\n\t\t\t\tstmt2.setDouble(4, current_price);\n\t\t\t\tstmt2.setString(5, id);\n\t\t\t\tstmt2.setString(6, time.substring(0,8));\n\t\t\t\tstmt2.execute();\n\t\t\t\tstmt2.close();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tPreparedStatement stmt1 = connection.prepareStatement(\n\t\t\t\t\t\t\"INSERT INTO diet_conclusion VALUES(?,?,?,?,?,?)\");\n\t\t\t\tstmt1.setString(1,id);\n\t\t\t\tstmt1.setString(2, time.substring(0,8));\n\t\t\t\tstmt1.setDouble(3, Double.parseDouble(healthSearcher.getProtein())*amount/100.0);\n\t\t\t\tstmt1.setDouble(4, Double.parseDouble(healthSearcher.getEnergy())*amount/100.0);\n\t\t\t\tstmt1.setDouble(5, Double.parseDouble(healthSearcher.getFiber())*amount/100.0);\n\t\t\t\tstmt1.setDouble(6, price);\n\t\t\t\tstmt1.execute();\n\t\t\t\tstmt1.close();\n\t\t\t}\n\t\t\tstmt.close();\n\t\t\trs.close();\n\t\t\tconnection.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}", "public int updatePayment2(int requestId, int amount);", "public void deposit(double depAmnt){\n try {\n String queryStr = \"update dummybank set amount = ? where accountNo = ?\";\n ps = con.prepareStatement(queryStr);\n ps.setDouble(1,this.amnt + depAmnt );\n ps.setString(2, accNo);\n ps.executeUpdate();\n } catch (SQLException ex) {\n Logger.getLogger(BankDBConnector.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n public void onClick(View v) {\n String num=Number.getText().toString().trim();\n String amount=Amount.getText().toString().trim();\n double a=Double.parseDouble(amount);\n if(TextUtils.isEmpty(num)){\n Number.setError(\"Fill the body\");\n return;\n }if(TextUtils.isEmpty(amount)){\n Amount.setError(\"Fill the body\");\n return;\n }if(a<10){\n Amount.setError(\"Valid amount\");\n return;\n }\n if((-homedue)>=a){\n String email=fAuth.getInstance().getCurrentUser().getEmail();\n DocumentReference df= fStore.collection(\"users\").document(email);\n df.update(\"extra\",FieldValue.increment(a));\n //Toast.makeText(getContext(),\"Recharge successfull,wait for confirmation\",Toast.LENGTH_LONG).show();\n // type here for connection...............................\n WriteData(num,amount);\n\n }else {\n Toast.makeText(getContext(),\"You have not enough balance in home account\",Toast.LENGTH_LONG).show();\n //pd.dismiss();\n }\n }", "public int a(double newbal, Long ano, Long reqId, Double double1, Long compId,\r\n\t\tLong noShare,Long userid)throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"update bank set balance=\"+newbal+\"where accno=\"+ano+\"\");\r\n\tint j=DbConnect.getStatement().executeUpdate(\"update requested set status='processed',remark='bought'wherereq_id=\"+reqId+\"\");\r\n\tint k=DbConnect.getStatement().executeUpdate(\"insert into transaction values(trans_seq.nextval,\"+userid+\",sysdate,\"+double1+\",'purchase','broker',\"+compId+\",\"+noShare+\"\");\r\n\tint m=DbConnect.getStatement().executeUpdate(\"update moreshare set no_share=\"+noShare+\"where comp_id=\"+compId+\"\");\r\n\t\r\n\treturn i;\r\n}", "public void ventaBilleteMaquina1()\n {\n maquina1.insertMoney(500);\n maquina1.printTicket();\n }", "@Override\r\n\tpublic void updatePayment(XftPayment xtp) {\n\t\txftPaymentMapper.updateByPrimaryKeySelective(xtp);\r\n\t}", "@Override\r\n\tpublic void updateTranCode(Purchase Purchase) throws Exception {\n\t\t\r\n\t}", "private void automaticPayment(String accountName, String reciever, String billName, final int amount, String date) {\n Log.d(TAG, \"makeTransaction: Has been called\");\n final DocumentReference senderDocRef = db.collection(\"users\").document(user.getEmail())\n .collection(\"accounts\").document(accountName);\n\n final DocumentReference recieverDocRef = db.collection(\"companies\").document(reciever);\n\n final DocumentReference billDocRef = db.collection(\"companies\").document(reciever).collection(\"customer\")\n .document(user.getEmail()).collection(\"bills\").document(billName);\n\n db.runTransaction(new Transaction.Function<Void>() {\n @Override\n public Void apply(Transaction transaction) throws FirebaseFirestoreException {\n DocumentSnapshot sender = transaction.get(senderDocRef);\n DocumentSnapshot reciever = transaction.get(recieverDocRef);\n\n\n int senderBalance = sender.getLong(\"balance\").intValue();\n int recieverBalance = reciever.getLong(\"amount\").intValue();\n int transactionBalance = Math.abs(amount);\n\n if (senderBalance >= transactionBalance) {\n transaction.update(senderDocRef, \"balance\", senderBalance - transactionBalance);\n transaction.update(recieverDocRef, \"amount\", recieverBalance + transactionBalance);\n transaction.update(billDocRef, \"isPaid\", true);\n\n\n SimpleDateFormat dateformat = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date newDate = new Date();\n Calendar cal = Calendar.getInstance();\n cal.setTime(newDate);\n cal.add(Calendar.MONTH, 1);\n newDate = cal.getTime();\n transaction.update(billDocRef, \"recurring\", dateformat.format(newDate));\n } else {\n Log.d(TAG, \"apply: Transaction ikke fuldført\");\n }\n\n // Success\n return null;\n }\n }).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.d(TAG, \"Transaction success!\");\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.w(TAG, \"Transaction failure.\", e);\n }\n });\n\n }", "public void realizarDeposito(String codigo_cuenta, double monto) {\n try {\n Cuenta cuenta = obtenerCuenta(codigo_cuenta);\n double credito_total = cuenta.getCredito() + monto;\n PreparedStatement PrSt;\n String Query = \"UPDATE Cuenta SET Credito = ? WHERE Codigo = ?\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setDouble(1, credito_total);\n PrSt.setString(2, codigo_cuenta);\n PrSt.executeUpdate();\n PrSt.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n }", "@Override\n\tpublic void updateTransaction(Transaction transaction) {\n\t\t\n\t}", "@Override\n\tpublic void updateTransaction(Transaction transaction) {\n\n\t}", "public void transact() {\n\t\truPay.transact();\n\n\t}", "void setEditTransactionCurrency(String currency);", "Transfer updateTransactionNumber(Long id, String transactionNumber);", "int updateByPrimaryKeySelective(CGcontractCredit record);", "SerialResponse charge(PinChargePost pinChargePost);", "public void updatebal(String cname, String amt1) {\nString countQuery = \"SELECT Balance FROM \" + DATABASE_TABLE1+\" WHERE Name='\"+cname+\"'\";\n\t \n\t Cursor cursor = ourDatabase.rawQuery(countQuery, null);\n\t int d=cursor.getColumnIndex(\"Balance\");\n\t\tString cbal=null;\n\t\tfor(cursor.moveToFirst();!cursor.isAfterLast();cursor.moveToNext()){\n\t\t\tcbal=cursor.getString(d);\n\t\t\t\n\t\t}\n\t\tint cur=Integer.parseInt(cbal);\n\t\tcur=cur+Integer.parseInt(amt1);\n\t ContentValues up=new ContentValues();\n\t up.put(Com_Balance, cur);\n\t\tourDatabase.update(DATABASE_TABLE1, up, Com_Name+\" = '\"+cname+\"'\", null);\n\t\t\n\t}", "public UpdateVehicleCharges() {\n initComponents();\n view();\n \n \n }", "@Transactional\n @Modifying\n @Query(\"UPDATE Day SET stripes = stripes + ?1 WHERE date = ?2 AND user_id = ?3\")\n void updateStripes(Integer amountOfStripes, LocalDate date, Integer id);", "@Override\n\tpublic void updateTotalCost(String card, double cost) {\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tconn = DbcpConnectionPool.getConnection();\n\t\t\tCallableStatement cstmt = conn.prepareCall(\"{call Member_updateTotalCost(?,?)}\");\n\t\t\tcstmt.setString(1, card);\n\t\t\tcstmt.setDouble(2, cost);\n\t\t\tcstmt.executeUpdate();\n\t\t\tcstmt.close();\n\t\t\tconn.close();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic int update(Forge_Order_Detail t) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}", "@Override\n\t\tpublic boolean update(AccountTransaction t) {\n\t\t\treturn false;\n\t\t}", "@Override\n\tpublic void update(Customer t) {\n\n\t}", "public static String payCurrentBill(String account){\n return \"update current_bills set cb_paid = 1 where cb_account = '\"+account+\"'\";\n }", "public void setCharge(ChargeComponent charge) {\r\n this.charge = charge;\r\n }", "void fillEditTransactionForm(Transaction transaction);", "@Override\n\tpublic void update(BatimentoCardiaco t, String[] params) {\n\t\t\n\t}", "CustomerOrder update(CustomerOrder customerOrder);", "public CleaningTransaction update(CleaningTransaction cleaningTransaction);", "public void editBalance() {\n\t\tAccount account = getAccountForEditBalance();\n\n\t\tif (adminDao.editBalance(account))\n\t\t\tSystem.out.println(\"Balance edited!\");\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}", "public void singleUpdate() {\n\t\ttry {\n\t\t\tthis.updateBy = CacheUtils.getUser().username;\n\t\t} catch (Exception e) {\n\t\t\tif (! getClass().equals(GlobalCurrencyRate.class)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.updateBy = \"super\";\n\t\t}\n\t\tthis.workspace = CacheUtils.getWorkspaceId();\n\t\tthis.updateAt = new Date();\n\n\t\tif (insertBy == null) insertBy = updateBy;\n\t\tif (insertAt == null) insertAt = updateAt;\n\n\t\tsuper.update();\n\t\tCacheUtils.cleanAll(this.getClass(), getAuditRight());\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tArrayList<CommodityVO> cmlist = new ArrayList<CommodityVO>();\r\n\t\tfor (int j = 0; j <p. table.getRowCount(); j++) {\r\n\t\t\tArrayList<String> line = p.cmContent.get(j);\r\n\t\t\tdouble cost = Double.parseDouble(line.get(4)) * p.last_bid.get(j);\r\n\t\t\tCommodityVO cv = new CommodityVO(line.get(0), line.get(1),\r\n\t\t\t\t\tline.get(2), Double.parseDouble(line.get(4)),\r\n\t\t\t\t\tp.last_bid.get(j), Integer.parseInt(line.get(3)),\r\n\t\t\t\t\tDouble.parseDouble(line.get(5)), cost, line.get(6));\r\n\t\t\tcmlist.add(cv);\r\n\t\t}\r\n\t\tPurchaseReturnVO v=new PurchaseReturnVO(vo.getId(),vo.getMemberName(),\r\n\t\t\t\tvo.getMemberID(),vo.getUser(),vo.getStatus(),p.remarkFld.getText(),\r\n\t\t\t\tvo.getHurry(),cmlist,p.totalMoney,vo.getStockid(),vo.getPurid());\r\n\t\tString tip=\"修改\";\r\n\t\tint result=0;\r\n\t\tif(isRed)\r\n\t\t{\r\n\t\t\tresult=p.service.addPurchaseReturn(v);tip=\"制定\";\r\n\t\t}\r\n\t\tresult=p.service.modifyPurchaseReturn(v);\r\n\t\tif (result == 0) {\r\n\t\t\tlog.addLog(new LogVO(log.getdate(),parent.getUser()\r\n\t\t\t\t.getID(), parent.getUser().getName(), tip+\"一笔进货退货单\", 3));\r\n\t\t\ttry {\r\n\t\t\t\theadPane.RefreshGrades();\r\n\t\t\t} catch (Exception e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\tJOptionPane.showMessageDialog(null, \"进货退货单\"+tip+\"失败\", \"提示\",\r\n\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\r\n\t}", "@Override\n public boolean update(Transaksi transaksi) {\n try {\n String query = \"UPDATE transaksi SET tgl_transaksi=? WHERE id=?\";\n\n PreparedStatement ps = Koneksi().prepareStatement(query);\n ps.setString(1, transaksi.getTglTransaksi());\n ps.setString(2, transaksi.getId());\n\n if (ps.executeUpdate() > 0) {\n return true;\n }\n } catch (SQLException se) {\n se.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return false;\n }", "public String updateCustomerQuantity() throws Exception {\n\t\tactionStartTime = new Date();\n\t\tresetToken(result);\n\t\tresult.put(ERROR, true);\n\t\tif (promotionId == null || promotionId < 1 || id == null || id < 1) {\n\t\t\tresult.put(\"errMsg\", ValidateUtil.getErrorMsg(ConstantManager.ERR_NOT_DATA_CORRECT));\n\t\t\treturn JSON;\n\t\t}\n\t\ttry {\n\t\t\tstaff = getStaffByCurrentUser();\n\t\t\tif (staff == null || staff.getShop() == null || staff.getStaffType() == null) {\n\t\t\t\tresult.put(\"errMsg\", ValidateUtil.getErrorMsg(ConstantManager.ERR_NOT_PERMISSION, \"\"));\n\t\t\t\treturn JSON;\n\t\t\t}\n\n\t\t\tPromotionProgram pro = promotionProgramMgr.getPromotionProgramById(promotionId);\n\t\t\tif (pro == null) {\n\t\t\t\tresult.put(\"errMsg\", ValidateUtil.getErrorMsg(ConstantManager.ERR_NOT_EXIST_DB, \"CTKM\"));\n\t\t\t\treturn JSON;\n\t\t\t}\n\t\t\tif (!ActiveType.WAITING.equals(pro.getStatus()) && !ActiveType.RUNNING.equals(pro.getStatus())) {\n\t\t\t\tresult.put(\"errMsg\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"promotion.program.incorrect\"));\n\t\t\t\treturn JSON;\n\t\t\t}\n\n\t\t\tPromotionCustomerMap pcm = promotionProgramMgr.getPromotionCustomerMapById(id);\n\t\t\tif (pcm == null || !ActiveType.RUNNING.equals(pcm.getStatus())) {\n\t\t\t\tresult.put(\"errMsg\", Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"catalog.promotion.customer.map.not.exists\"));\n\t\t\t\treturn JSON;\n\t\t\t}\n\t\t\tif (quantity != null && pcm.getQuantityReceivedTotal() != null && quantity.compareTo(pcm.getQuantityReceivedTotal()) < 0) {\n\t\t\t\tresult.put(\"errMsg\", \"Số suất phân bổ không được bé hơn số suất đã nhận.\");\n\t\t\t\treturn JSON;\n\t\t\t} else if (amount != null && pcm.getAmountReceivedTotal() != null && amount.compareTo(pcm.getAmountReceivedTotal()) < 0) {\n\t\t\t\tresult.put(\"errMsg\", \"Số tiền phân bổ không được bé hơn số tiền đã nhận.\");\n\t\t\t\treturn JSON;\n\t\t\t} else if (number != null && pcm.getNumReceivedTotal() != null && number.compareTo(pcm.getNumReceivedTotal()) < 0) {\n\t\t\t\tresult.put(\"errMsg\", \"Số lượng phân bổ không được bé hơn số lượng đã nhận.\");\n\t\t\t\treturn JSON;\n\t\t\t} else {\n\t\t\t\tpcm.setQuantityMax(quantity);\n\t\t\t\tpcm.setAmountMax(amount);\n\t\t\t\tpcm.setNumMax(number);\n\t\t\t\tpromotionProgramMgr.updatePromotionCustomerMap(pcm, getLogInfoVO());\n\t\t\t\tresult.put(ERROR, false);\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tLogUtility.logErrorStandard(ex, R.getResource(\"web.log.message.error\", \"vnm.web.action.program.PromotionCatalogAction.updateCustomerQuantity\"), 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 JSON;\n\t}", "void edit(Price Price);", "public void setChargecurrency(java.lang.String newChargecurrency) {\n\tchargecurrency = newChargecurrency;\n}", "public static String createCharge(Request request, Response response) {\n Stripe.apiKey = \"sk_test_nKon8YMF1HyqAvNgvFpFHGbi\";\n CardChargeMakerParams cm = JsonUtil.getInstance().fromJson(request.body(), CardChargeMakerParams.class);\n\n // Get charge meta information\n String token = cm.getId();\n EntityManager em = DatabaseManager.getInstance().getEntityManager();\n TableSession session = em\n .find(TableSession.class, request.session().attribute(\"TableSessionKey\"));\n Transaction transaction = getCurrentTransaction(session.getRestaurantTable());\n int total = (int) (transaction.getTotal() * 100);\n\n // Create params\n Map<String, Object> params = new HashMap<>();\n params.put(\"amount\", total);\n params.put(\"currency\", \"gbp\");\n params.put(\"description\", \"Your meal at Oaxaca\");\n params.put(\"source\", token);\n\n try {\n // Charge customer card\n Charge charge = Charge.create(params);\n // Change status in database\n em.getTransaction().begin();\n\n Transaction temp = em.find(Transaction.class, transaction.getTransactionId());\n\n temp.setDatetimePaid(new Timestamp(System.currentTimeMillis()));\n temp.setIsPaid(true);\n session.getRestaurantTable().setStatus(TableStatus.NEEDS_CLEANING);\n em.getTransaction().commit();\n NotificationEndpoint.startNotificationService(temp);\n return \"success\";\n } catch (AuthenticationException | InvalidRequestException | CardException | APIConnectionException | APIException e) {\n e.printStackTrace();\n return \"failure\";\n } finally {\n em.close();\n }\n }", "public int updateAndGetBalance(int fid, int tid, int money) {\n\t\tint q=0;\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tthis.pst = this.con.prepareStatement(\"update customer set balance=balance-'\"+money+\"' where acc_number=?\");\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tthis.pst.setInt(1,fid);\r\n\t\t\t\r\n\t\t\t this.pst.executeUpdate();\r\n\t\t this.pst = this.con.prepareStatement(\"update customer set balance=balance+'\"+money+\"' where acc_number=?\");\r\n\t\t\t\t\tthis.pst.setInt(1,tid);\r\n\t\t\t\t this.pst.executeUpdate();\r\n\t\t\t\r\n\t\t\t\t this.pst=this.con.prepareStatement(\"select * from customer where acc_number=?\");\r\n\t\t this.pst.setInt(1,fid);\r\n\t\t this.rs=this.pst.executeQuery();\r\n\t\t while (rs.next()) {\r\n\t\t\t\t\tq=rs.getInt(\"balance\");\r\n\t\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t\tcatch(Exception e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\r\n\t\treturn q;\r\n\r\n\t}", "@Override\n\tprotected void executeTransaction(int cents) {\n\t}", "public void transferMoney() {\n\t\tSystem.out.println(\"HSBC---transferMoney\");\n\t}", "private void updateFields(){\n\n updateTotalPay();\n updateTotalTip();\n updateTotalPayPerPerson();\n }", "int updateByPrimaryKey(PurchasePayment record);", "public void onEditTransaction(Transaction transaction) {\n\t}", "@Override\r\n public double purchaseFee(){\r\n return fee;\r\n }", "@Override\n\tpublic void setupMaintFields(EquationStandardTransaction transaction)\n\t{\n\t\ttransaction.setFieldValue(\"GZCHQP\", \"5\"); // Previous up to range (2S,0)\n\t\ttransaction.setFieldValue(\"GZCHQS\", \"6\"); // Up to (2S,0)\n\t\ttransaction.setFieldValue(\"GZAMT\", \"7500\"); // Charge amount (15P,0)\n\t\ttransaction.setFieldValue(\"GZFLG\", \"Y\"); // Stop chqbook issue? (1A)\n\t}", "int updateByPrimaryKey(BasicInfoAnodeBurningLossRate record);", "int updateBalance(CardVO cv) throws RemoteException;", "@Override\r\n\tpublic String updateinvoicing(String toAllocate, String shipmentNumber) {\n\t\tSystem.out.println(\"airway\"+shipmentNumber);\r\n\t\tint count = senderdata_InvoicingRepository.updateinvoicingairway(shipmentNumber,toAllocate.split(\",\"));\r\n\t\tSystem.out.println(\"updated\"+count);\r\n\t\t//senderdata_InvoicingRepository.selectinvoicing(toAllocate.split(\",\"));\r\n\t\treturn \"Updated Succesfully\";\r\n\t}", "public void editCommissionAccounts(CommissionAccount commissionAccount);", "@Override\r\n\tpublic void operateAmount(String AccountID, BigDecimal amount) {\n\r\n\t}", "@ApiModelProperty(required = true, value = \"The amount of the purchase. The tax was calculated on this amount.\")\n public BigDecimal getChargeAmount() {\n return chargeAmount;\n }", "@Override\n\tpublic Integer update(Map<String, Object> params) throws Exception {\n\t\treturn bankService.update(params);\n\t}", "public void updateCustomer(String name, String dob, String gender, String number, String email, String address, String password, Boolean promo, Integer reward) throws SQLException {\n st.executeUpdate(\"UPDATE IOTBAY.CUSTOMER SET \"\n + \"NAME ='\" + name \n + \"DATEOFBIRTH ='\" + dob \n + \"GENDER ='\" + gender \n + \"CONTACTNUMBER ='\" + number \n + \"BILLINGADDRESS ='\" + address \n + \"PASSWORD ='\" + password \n + \"PROMOTIONALNEWSLETTER ='\" + promo \n + \"', REWARDPOINTS='\" + reward \n + \"' WHERE EMAIL='\" + email + \"'\" );\n\n }", "public void update(Customer myCust){\n }", "@Transactional\n @Modifying\n @Query(\"update Item i set i.price = i.price * 1.1\")\n void increacePriceBy10Percent();", "int updateByPrimaryKey(PaymentTrade record);", "public int getChargeRate();", "void changeCost(ArrayList<CostsChanges> changes);", "public void transferMoney(float amount, String transferToNumber) {}", "public void setCHARGE(BigDecimal CHARGE) {\r\n this.CHARGE = CHARGE;\r\n }", "public void calculatePayment() {}", "public void setChargeid(Integer chargeid) {\n this.chargeid = chargeid;\n }", "@Test\n public void update2()\n {\n int zzz = getJdbcTemplate().update(\"UPDATE account SET NAME =?,money=money-? WHERE id =?\", \"ros\", \"100\", 2);\n System.out.println(zzz);\n }", "public void updatehotelincome(double price ){\n String query = \"update Hotel set Income = Income + ? \";\n \n try {\n PreparedStatement Query = conn.prepareStatement(query);\n Query.setDouble(1,price);\n Query.execute();\n \n } catch (SQLException ex) {\n Logger.getLogger(sqlcommands.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "@Override\n\t/*public ActionResult update(PortalForm form, HttpServletRequest request) {\n\t\tActionResult result = new ActionResult();\n\t\trequest.setAttribute(\"actionForm\", \"\");\n\t\tLogin login = Login.getLogin(request);\n\t\tif (!ModelUtiility.hasModulePermission(login, MODULEID)){\n\t\t\tresult.getActionMessages().add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(\"errors.access.denied\"));\n\t\t\treturn result;\n\t\t}\n\t\tConnection conn = null;\n\t\ttry{\n\t\t\tconn = ResourceManager.getConnection();\n\t\t\tconn.setAutoCommit(false);\n\t\t\tSalaryReconciliationBean formBean = (SalaryReconciliationBean) form;\n\t\t\tSalaryReconciliationReqDao reconciliationReqDao = SalaryReconciliationReqDaoFactory.create(conn);\n\t\t\tSalaryReconciliationReq reconciliationReqArr[] = reconciliationReqDao.findByDynamicWhere(\" SR_ID=? AND ASSIGNED_TO=? AND LEVEL=(SELECT LEVEL FROM SALARY_RECONCILIATION_REQ WHERE ID=(SELECT MAX(ID) FROM SALARY_RECONCILIATION_REQ WHERE SR_ID = ?)) ORDER BY ID DESC\", new Object[] { formBean.getId(), login.getUserId(), formBean.getId() });\n\t\t\tSalaryReconciliationDao reconciliationDao = SalaryReconciliationDaoFactory.create(conn);\n\t\t\tSalaryReconciliation reconciliation = reconciliationDao.findByPrimaryKey(formBean.getId());\n\t\t\tif (reconciliationReqArr == null || reconciliationReqArr.length <= 0 || reconciliationReqArr[0] == null || reconciliation == null){\n\t\t\t\tresult.getActionMessages().add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(\"deputation.update.failed\"));\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tSalaryReconciliationReq reconciliationReq = reconciliationReqArr[0];\n\t\t\tswitch (ActionMethods.UpdateTypes.getValue(form.getuType())) {\n\t\t\t\tcase UPDATE:\n\t\t\t\t\t//updateReports(formBean, result, login);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ACCEPTED:\n\t\t\t\t\t///updateReports(formBean, result, login);\n\t\t\t\t\treconciliationReq.setComments(formBean.getComments());\n\t\t\t\t\treconciliationReq.setActionBy(login.getUserId());\n\t\t\t\t\treconciliationReq.setActionOn(new Date());\n\t\t\t\t\treconciliationReqDao.update(reconciliationReq.createPk(), reconciliationReq);\n\t\t\t\t\tProcessChain pchain = getProcessChain(conn);\n\t\t\t\t\tInteger[] notifiers = new ProcessEvaluator().notifiers(pchain.getNotification(), 1);\n\t\t\t\t\tif (reconciliationReq.getEscalatedFrom() != null && reconciliationReq.getEscalatedFrom().length() > 0 && !reconciliationReq.getEscalatedFrom().equals(\"0\")){\n\t\t\t\t\t\tJDBCUtiility.getInstance().update(\"UPDATE SALARY_RECONCILIATION_REQ SET ACTION_BY=?, ACTION_ON=NOW() WHERE ESCALATED_FROM IN ( \" + reconciliationReq.getEscalatedFrom() + \" )\", new Object[] { login.getUserId() }, conn);\n\t\t\t\t\t}\n\t\t\t\t\tif (reconciliation.getStatus() == Status.getStatusId(Status.GENERATED)){\n\t\t\t\t\t\treconciliation.setStatus(Status.getStatusId(Status.SUBMITTED));\n\t\t\t\t\t} else if (reconciliation.getStatus() == Status.getStatusId(Status.REJECTED)){\n\t\t\t\t\t\treconciliation.setStatus(Status.getStatusId(Status.RESUBMITTED));\n\t\t\t\t\t} else if (reconciliation.getStatus() == Status.getStatusId(Status.ACCEPTED)){\n\t\t\t\t\t\tif (isCompleteApprove && JDBCUtiility.getInstance().getRowCount(\"FROM SALARY_RECONCILIATION_REQ WHERE LEVEL=? AND SR_ID=? AND ACTION_BY=0\", new Object[] { reconciliationReq.getLevel(), reconciliationReq.getSrId() }, conn) > 0) break;\n\t\t\t\t\t\treconciliation.setStatus(Status.getStatusId(Status.APPROVED));\n\t\t\t\t\t} else if (reconciliation.getStatus() == Status.getStatusId(Status.APPROVED)){\n\t\t\t\t\t\treconciliation.setStatus(Status.getStatusId(Status.COMPLETED));\n\t\t\t\t\t\treconciliation.setCompletedOn(new Date());\n\t\t\t\t\t\treconciliationDao.update(reconciliation.createPk(), reconciliation);\n\t\t\t\t\t\tList<Object> ccids = JDBCUtiility.getInstance().getSingleColumn(\"SELECT ASSIGNED_TO FROM SALARY_RECONCILIATION_REQ WHERE SR_ID=?\", new Object[] { reconciliation.getId() }, conn);\n\t\t\t\t\t// updating salary in advance table\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tFinanceInfoDaoFactory.create(conn).updateSalaryInAdvance(reconciliation);\n\t\t\t\t\t\tSet<Integer> ccidsSet = new HashSet<Integer>();\n\t\t\t\t\t\tif (ccids != null && ccids.size() > 0){\n\t\t\t\t\t\t\tfor (Object ids : ccids)\n\t\t\t\t\t\t\t\tccidsSet.add((Integer) ids);\n\t\t\t\t\t\t\tfor (Integer ids : notifiers)\n\t\t\t\t\t\t\t\tccidsSet.add((Integer) ids);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (ccidsSet.size() > 0){\n\t\t\t\t\t\t\tString mailSubject = \"Final Salary Reconciliation Report for \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \"ready for disbursal\";\n\t\t\t\t\t\t\tString messageBody = \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The final Salary Reconciliation Report for the period \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" is ready for disbursal. \";\n\t\t\t\t\t\t\tsendMail(mailSubject, messageBody, ccidsSet.toArray(new Integer[ccidsSet.size()]), null, reconciliation.getEsrMapId(), reconciliation.getStatusName(), conn);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tInteger[] approvers = new ProcessEvaluator().approvers(pchain.getApprovalChain(), reconciliationReq.getLevel() + 1, 1);\n\t\t\t\t\tif (approvers != null && approvers.length > 0){\n\t\t\t\t\t\tfor (int approver : approvers){\n\t\t\t\t\t\t\treconciliationReqDao.insert(new SalaryReconciliationReq(reconciliation.getId(), approver, reconciliationReq.getLevel() + 1, \"\", new Date(), \"0\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tString mailSubject = \"Salary Reconciliation Report submitted for \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear();\n\t\t\t\t\t\tString messageBody = \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The Salary Report for the period \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" has been submitted and is awaiting your action. Please do the needful.\";\n\t\t\t\t\t\tsendMail(mailSubject, messageBody, approvers, notifiers, reconciliation.getEsrMapId(), reconciliation.getStatusName(), conn);\n\t\t\t\t\t} else if (reconciliation.getStatus() == Status.getStatusId(Status.SUBMITTED) || reconciliation.getStatus() == Status.getStatusId(Status.RESUBMITTED)){\n\t\t\t\t\t\treconciliation.setStatus(Status.getStatusId(Status.ACCEPTED));\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tInteger[] handlers = new ProcessEvaluator().handlers(pchain.getHandler(), 1);\n\t\t\t\t\t\tfor (int handler : handlers){\n\t\t\t\t\t\t\treconciliationReqDao.insert(new SalaryReconciliationReq(reconciliation.getId(), handler, reconciliationReq.getLevel() + 1, \"\", new Date(), \"0\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tString mailSubject = \"Salary Reconciliation Report for \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" Accepted by Finance\";\n\t\t\t\t\t\tString messageBody = \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The Salary Report for the period \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" has been Accepted by Finance and is awaiting your action. Please do the needful.\";\n\t\t\t\t\t\tsendMail(mailSubject, messageBody, handlers, notifiers, reconciliation.getEsrMapId(), reconciliation.getStatusName(), conn);\n\t\t\t\t\t} else if (reconciliation.getStatus() == Status.getStatusId(Status.APPROVED)){\n\t\t\t\t\t\tapprovers = new ProcessEvaluator().approvers(pchain.getApprovalChain(), reconciliationReq.getLevel() - 1, 1);\n\t\t\t\t\t\tInteger[] handlers = new ProcessEvaluator().handlers(pchain.getHandler(), 1);\n\t\t\t\t\t\tStringBuffer handlersNames = new StringBuffer();\n\t\t\t\t\t\tboolean flag = true;\n\t\t\t\t\t\tfor (int id : handlers){\n\t\t\t\t\t\t\thandlersNames.append(ModelUtiility.getInstance().getEmployeeName(id));\n\t\t\t\t\t\t\tif (flag) handlersNames.append(\" & \");\n\t\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (int approver : approvers){\n\t\t\t\t\t\t\treconciliationReqDao.insert(new SalaryReconciliationReq(reconciliation.getId(), approver, reconciliationReq.getLevel() + 1, \"\", new Date(), \"0\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tString mailSubject = \"Salary Reconciliation Report for \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" Approved by \" + handlersNames.toString();\n\t\t\t\t\t\tString messageBody = \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The Salary Report for the period \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" has been approved by \" + handlersNames.toString() + \" and is awaiting your action. Please do the needful.\";\n\t\t\t\t\t\tsendMail(mailSubject, messageBody, approvers, notifiers, reconciliation.getEsrMapId(), reconciliation.getStatusName(), conn);\n\t\t\t\t\t}\n\t\t\t\t\treconciliationDao.update(reconciliation.createPk(), reconciliation);\n\t\t\t\t\tbreak;\n\t\t\t\tcase REJECTED:\n\t\t\t\t\treconciliationReq.setActionBy(login.getUserId());\n\t\t\t\t\treconciliationReq.setActionOn(new Date());\n\t\t\t\t\treconciliationReq.setComments(formBean.getComments());\n\t\t\t\t\treconciliationReqDao.update(reconciliationReq.createPk(), reconciliationReq);\n\t\t\t\t\tif (reconciliationReq.getEscalatedFrom() != null && reconciliationReq.getEscalatedFrom().length() > 0 && !reconciliationReq.getEscalatedFrom().equals(\"0\")){\n\t\t\t\t\t\tJDBCUtiility.getInstance().update(\"UPDATE SALARY_RECONCILIATION_REQ SET ACTION_BY=?, ACTION_ON=NOW() WHERE ESCALATED_FROM IN ( \" + reconciliationReq.getEscalatedFrom() + \" )\", new Object[] { login.getUserId() }, conn);\n\t\t\t\t\t}\n\t\t\t\t\treconciliation.setStatus(Status.getStatusId(Status.REJECTED));\n\t\t\t\t\treconciliationDao.update(reconciliation.createPk(), reconciliation);\n\t\t\t\t\tProcessChain prchain = getProcallReceipientcCMailId.add(\"akash.anand@dikshatech.com\");essChain(conn);\n\t\t\t\t\tInteger[] reapprovers = new ProcessEvaluator().approvers(prchain.getApprovalChain(), 1, 1);\n\t\t\t\t\tif (reapprovers != null && reapprovers.length > 0){\n\t\t\t\t\t\tfor (int approver : reapprovers){\n\t\t\t\t\t\t\treconciliationReqDao.insert(new SalaryReconciliationReq(reconciliation.getId(), approver, 1, \"\", new Date(), \"0\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tInteger[] renotifiers = new ProcessEvaluator().notifiers(prchain.getNotification(), 1);\n\t\t\t\t\tString mailSubject = \"Salary Reconciliation Report rejected for \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear();\n\t\t\t\t\tString messageBody = \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The Salary Report for the period \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" has been rejected and is awaiting your action. Please do the needful.\";\n\t\t\t\t\tsendMail(mailSubject, messageBody, reapprovers, renotifiers, reconciliation.getEsrMapId(), reconciliation.getStatusName(), conn);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tconn.commit();\n\t\t} catch (Exception ex){\n\t\t\tlogger.error(\"RECONCILATION UPDATE : failed to update data\", ex);\n\t\t\tresult.getActionMessages().add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(\"deputation.update.failed\"));\n\t\t\treturn result;\n\t\t} finally{\n\t\t\tResourceManager.close(conn);\n\t\t}\n\t\treturn result;\n\t}*/\n\t\n\t\n\tpublic ActionResult update(PortalForm form, HttpServletRequest request) {\n\t\tActionResult result = new ActionResult();\n\t\trequest.setAttribute(\"actionForm\", \"\");\n\t\tLogin login = Login.getLogin(request);\n\t\tif (!ModelUtiility.hasModulePermission(login, MODULEID)){\n\t\t\tresult.getActionMessages().add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(\"errors.access.denied\"));\n\t\t\treturn result;\n\t\t}\n\t\tConnection conn = null;\n\t\ttry{\n\t\t\tconn = ResourceManager.getConnection();\n\t\t\tconn.setAutoCommit(false);\n\t\t\tSalaryReconciliationBean formBean = (SalaryReconciliationBean) form;\n\t\t\tSalaryReconciliationReqDao reconciliationReqDao = SalaryReconciliationReqDaoFactory.create(conn);\n\t\t\tSalaryReconciliationReq reconciliationReqArr[] = reconciliationReqDao.findByDynamicWhere(\" SR_ID=? AND ASSIGNED_TO=? AND LEVEL=(SELECT LEVEL FROM SALARY_RECONCILIATION_REQ WHERE ID=(SELECT MAX(ID) FROM SALARY_RECONCILIATION_REQ WHERE SR_ID = ?)) ORDER BY ID DESC\", new Object[] { formBean.getId(), login.getUserId(), formBean.getId() });\n\t\t\tSalaryReconciliationDao reconciliationDao = SalaryReconciliationDaoFactory.create(conn);\n\t\t\tSalaryReconciliation reconciliation = reconciliationDao.findByPrimaryKey(formBean.getId());\n\t\t\tif (reconciliationReqArr == null || reconciliationReqArr.length <= 0 || reconciliationReqArr[0] == null || reconciliation == null){\n\t\t\t\t\n\t\t\t\tSalaryReconciliationReportDao salaryReconciliationReportDao = SalaryReconciliationReportDaoFactory.create();\n\t\t\t\tSalaryReconciliationReport salaryReconciliationReport = new SalaryReconciliationReport();\n\t\t\t\tsalaryReconciliationReport.setReason(formBean.getReason());\n\t\t\t\tsalaryReconciliationReport.setDate(formBean.getDate());\n\t\t\t\tsalaryReconciliationReport.setSrId(formBean.getSrId());\n\t\t\t\tsalaryReconciliationReport.setUserId(formBean.getUserId());\n\t\t\t\tsalaryReconciliationReportDao.reasonForNonPay(salaryReconciliationReport.getReason(),salaryReconciliationReport.getDate(),formBean.getSrId(),salaryReconciliationReport.getUserId());\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tSalaryReconciliationReq reconciliationReq = reconciliationReqArr[0];\n\t\t\tswitch (ActionMethods.UpdateTypes.getValue(form.getuType())) {\n\t\t\t\tcase UPDATE:\n\t\t\t\t\t//updateReports(formBean, result, login);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ACCEPTED:\n\t\t\t\t\t///updateReports(formBean, result, login);\n\t\t\t\t\treconciliationReq.setComments(formBean.getComments());\n\t\t\t\t\treconciliationReq.setActionBy(login.getUserId());\n\t\t\t\t\treconciliationReq.setActionOn(new Date());\n\t\t\t\t\treconciliationReqDao.update(reconciliationReq.createPk(), reconciliationReq);\n\t\t\t\t\tProcessChain pchain = getProcessChain(conn);\n\t\t\t\t\tInteger[] notifiers = new ProcessEvaluator().notifiers(pchain.getNotification(), 1);\n\t\t\t\t\tif (reconciliationReq.getEscalatedFrom() != null && reconciliationReq.getEscalatedFrom().length() > 0 && !reconciliationReq.getEscalatedFrom().equals(\"0\")){\n\t\t\t\t\t\tJDBCUtiility.getInstance().update(\"UPDATE SALARY_RECONCILIATION_REQ SET ACTION_BY=?, ACTION_ON=NOW() WHERE ESCALATED_FROM IN ( \" + reconciliationReq.getEscalatedFrom() + \" )\", new Object[] { login.getUserId() }, conn);\n\t\t\t\t\t}\n\t\t\t\t\tif (reconciliation.getStatus() == Status.getStatusId(Status.GENERATED)){\n\t\t\t\t\t\treconciliation.setStatus(Status.getStatusId(Status.SUBMITTED));\n\t\t\t\t\t} else if (reconciliation.getStatus() == Status.getStatusId(Status.REJECTED)){\n\t\t\t\t\t\treconciliation.setStatus(Status.getStatusId(Status.RESUBMITTED));\n\t\t\t\t\t} else if (reconciliation.getStatus() == Status.getStatusId(Status.ACCEPTED)){\n\t\t\t\t\t\tif (isCompleteApprove && JDBCUtiility.getInstance().getRowCount(\"FROM SALARY_RECONCILIATION_REQ WHERE LEVEL=? AND SR_ID=? AND ACTION_BY=0\", new Object[] { reconciliationReq.getLevel(), reconciliationReq.getSrId() }, conn) > 0) break;\n\t\t\t\t\t\treconciliation.setStatus(Status.getStatusId(Status.APPROVED));\n\t\t\t\t\t} else if (reconciliation.getStatus() == Status.getStatusId(Status.APPROVED)){\n\t\t\t\t\t\treconciliation.setStatus(Status.getStatusId(Status.COMPLETED));\n\t\t\t\t\t\treconciliation.setCompletedOn(new Date());\n\t\t\t\t\t\treconciliationDao.update(reconciliation.createPk(), reconciliation);\n\t\t\t\t\t\tList<Object> ccids = JDBCUtiility.getInstance().getSingleColumn(\"SELECT ASSIGNED_TO FROM SALARY_RECONCILIATION_REQ WHERE SR_ID=?\", new Object[] { reconciliation.getId() }, conn);\n\t\t\t\t\t// updating salary in advance table\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tFinanceInfoDaoFactory.create(conn).updateSalaryInAdvance(reconciliation);\n\t\t\t\t\t\tSet<Integer> ccidsSet = new HashSet<Integer>();\n\t\t\t\t\t\tif (ccids != null && ccids.size() > 0){\n\t\t\t\t\t\t\tfor (Object ids : ccids)\n\t\t\t\t\t\t\t\tccidsSet.add((Integer) ids);\n\t\t\t\t\t\t\tfor (Integer ids : notifiers)\n\t\t\t\t\t\t\t\tccidsSet.add((Integer) ids);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (ccidsSet.size() > 0){\n\t\t\t\t\t\t\tString mailSubject = \"Final Salary Reconciliation Report for \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \"ready for disbursal\";\n\t\t\t\t\t\t\tString messageBody = \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The final Salary Reconciliation Report for the period \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" is ready for disbursal. \";\n\t\t\t\t\t\t\tsendMail(mailSubject, messageBody, ccidsSet.toArray(new Integer[ccidsSet.size()]), null, reconciliation.getEsrMapId(), reconciliation.getStatusName(), conn);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsendMail(formBean);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tInteger[] approvers = new ProcessEvaluator().approvers(pchain.getApprovalChain(), reconciliationReq.getLevel() + 1, 1);\n\t\t\t\t\tif (approvers != null && approvers.length > 0){\n\t\t\t\t\t\tfor (int approver : approvers){\n\t\t\t\t\t\t\treconciliationReqDao.insert(new SalaryReconciliationReq(reconciliation.getId(), approver, reconciliationReq.getLevel() + 1, \"\", new Date(), \"0\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tString mailSubject = \"Salary Reconciliation Report submitted for \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear();\n\t\t\t\t\t\tString messageBody = \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The Salary Report for the period \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" has been submitted and is awaiting your action. Please do the needful.\";\n\t\t\t\t\t\tsendMail(mailSubject, messageBody, approvers, notifiers, reconciliation.getEsrMapId(), reconciliation.getStatusName(), conn);\n\t\t\t\t\t} else if (reconciliation.getStatus() == Status.getStatusId(Status.SUBMITTED) || reconciliation.getStatus() == Status.getStatusId(Status.RESUBMITTED)){\n\t\t\t\t\t\treconciliation.setStatus(Status.getStatusId(Status.ACCEPTED));\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tInteger[] handlers = new ProcessEvaluator().handlers(pchain.getHandler(), 1);\n\t\t\t\t\t\tfor (int handler : handlers){\n\t\t\t\t\t\t\treconciliationReqDao.insert(new SalaryReconciliationReq(reconciliation.getId(), handler, reconciliationReq.getLevel() + 1, \"\", new Date(), \"0\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tString mailSubject = \"Salary Reconciliation Report for \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" Accepted by Finance\";\n\t\t\t\t\t\tString messageBody = \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The Salary Report for the period \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" has been Accepted by Finance and is awaiting your action. Please do the needful.\";\n\t\t\t\t\t\tsendMail(mailSubject, messageBody, handlers, notifiers, reconciliation.getEsrMapId(), reconciliation.getStatusName(), conn);\n\t\t\t\t\t} else if (reconciliation.getStatus() == Status.getStatusId(Status.APPROVED)){\n\t\t\t\t\t\tapprovers = new ProcessEvaluator().approvers(pchain.getApprovalChain(), reconciliationReq.getLevel() - 1, 1);\n\t\t\t\t\t\tInteger[] handlers = new ProcessEvaluator().handlers(pchain.getHandler(), 1);\n\t\t\t\t\t\tStringBuffer handlersNames = new StringBuffer();\n\t\t\t\t\t\tboolean flag = true;\n\t\t\t\t\t\tfor (int id : handlers){\n\t\t\t\t\t\t\thandlersNames.append(ModelUtiility.getInstance().getEmployeeName(id));\n\t\t\t\t\t\t\tif (flag) handlersNames.append(\" & \");\n\t\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (int approver : approvers){\n\t\t\t\t\t\t\treconciliationReqDao.insert(new SalaryReconciliationReq(reconciliation.getId(), approver, reconciliationReq.getLevel() + 1, \"\", new Date(), \"0\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tString mailSubject = \"Salary Reconciliation Report for \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" Approved by \" + handlersNames.toString();\n\t\t\t\t\t\tString messageBody = \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The Salary Report for the period \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" has been approved by \" + handlersNames.toString() + \" and is awaiting your action. Please do the needful.\";\n\t\t\t\t\t\tsendMail(mailSubject, messageBody, approvers, notifiers, reconciliation.getEsrMapId(), reconciliation.getStatusName(), conn);\n\t\t\t\t\t}\n\t\t\t\t\treconciliationDao.update(reconciliation.createPk(), reconciliation);\n\t\t\t\t\tbreak;\n\t\t\t\tcase REJECTED:\n\t\t\t\t\treconciliationReq.setActionBy(login.getUserId());\n\t\t\t\t\treconciliationReq.setActionOn(new Date());\n\t\t\t\t\treconciliationReq.setComments(formBean.getComments());\n\t\t\t\t\treconciliationReqDao.update(reconciliationReq.createPk(), reconciliationReq);\n\t\t\t\t\tif (reconciliationReq.getEscalatedFrom() != null && reconciliationReq.getEscalatedFrom().length() > 0 && !reconciliationReq.getEscalatedFrom().equals(\"0\")){\n\t\t\t\t\t\tJDBCUtiility.getInstance().update(\"UPDATE SALARY_RECONCILIATION_REQ SET ACTION_BY=?, ACTION_ON=NOW() WHERE ESCALATED_FROM IN ( \" + reconciliationReq.getEscalatedFrom() + \" )\", new Object[] { login.getUserId() }, conn);\n\t\t\t\t\t}\n\t\t\t\t\treconciliation.setStatus(Status.getStatusId(Status.REJECTED));\n\t\t\t\t\treconciliationDao.update(reconciliation.createPk(), reconciliation);\n\t\t\t\t\tProcessChain prchain = getProcessChain(conn);\n\t\t\t\t\tInteger[] reapprovers = new ProcessEvaluator().approvers(prchain.getApprovalChain(), 1, 1);\n\t\t\t\t\tif (reapprovers != null && reapprovers.length > 0){\n\t\t\t\t\t\tfor (int approver : reapprovers){\n\t\t\t\t\t\t\treconciliationReqDao.insert(new SalaryReconciliationReq(reconciliation.getId(), approver, 1, \"\", new Date(), \"0\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tInteger[] renotifiers = new ProcessEvaluator().notifiers(prchain.getNotification(), 1);\n\t\t\t\t\tString mailSubject = \"Salary Reconciliation Report rejected for \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear();\n\t\t\t\t\tString messageBody = \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The Salary Report for the period \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" has been rejected and is awaiting your action. Please do the needful.\";\n\t\t\t\t\tsendMail(mailSubject, messageBody, reapprovers, renotifiers, reconciliation.getEsrMapId(), reconciliation.getStatusName(), conn);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t/*case NONPAYMENT:\n\t\t\t\t\t\n\t\t\t\t\tSalaryReconciliationReportDao salaryReconciliationReportDao = SalaryReconciliationReportDaoFactory.create();\n\t\t\t\t\tSalaryReconciliationReport salaryReconciliationReport = new SalaryReconciliationReport();\n\t\t\t\t\tsalaryReconciliationReport.setReason(formBean.getReason());\n\t\t\t\t\tsalaryReconciliationReport.setDate(formBean.getDate());\n\t\t\t\t\tsalaryReconciliationReport.setSrId(formBean.getSrId());\n\t\t\t\t\tsalaryReconciliationReportDao.reasonForNonPay(salaryReconciliationReport.getReason(),salaryReconciliationReport.getDate(),formBean.getSrId());*/\n\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t}\n\t\t\tconn.commit();\n\t\t} catch (Exception ex){\n\t\t\tlogger.error(\"RECONCILATION UPDATE : failed to update data\", ex);\n\t\t\tresult.getActionMessages().add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(\"deputation.update.failed\"));\n\t\t\treturn result;\n\t\t} finally{\n\t\t\tResourceManager.close(conn);\n\t\t}\n\t\treturn result;\n\t}" ]
[ "0.70587134", "0.65070707", "0.6413978", "0.62923473", "0.60947794", "0.60841185", "0.6069734", "0.606764", "0.59843683", "0.5981688", "0.5977695", "0.5971939", "0.5965474", "0.5961953", "0.5933166", "0.59175825", "0.5905572", "0.5904941", "0.58984923", "0.5863344", "0.5833354", "0.5803407", "0.5796951", "0.5782103", "0.5778672", "0.5772506", "0.57701594", "0.5756923", "0.57448167", "0.57152647", "0.5714059", "0.5714059", "0.5711762", "0.57075036", "0.57059044", "0.5700541", "0.56996393", "0.5697683", "0.5695929", "0.5695581", "0.5680399", "0.56795275", "0.56764644", "0.56743", "0.56650287", "0.56452537", "0.56445795", "0.56430477", "0.5642643", "0.56399506", "0.5634789", "0.56344736", "0.56335276", "0.5600723", "0.5597079", "0.5591133", "0.55904114", "0.5585651", "0.55744296", "0.5569323", "0.5544183", "0.5525446", "0.55236906", "0.55123955", "0.55121815", "0.54963076", "0.54906917", "0.54880387", "0.54860824", "0.54830396", "0.5477186", "0.54659253", "0.5460448", "0.5458567", "0.54563284", "0.5455323", "0.5454459", "0.54542", "0.5450878", "0.5441637", "0.54395056", "0.54390186", "0.54362607", "0.54333335", "0.5431563", "0.5430122", "0.542639", "0.54228467", "0.5420189", "0.54164135", "0.5412644", "0.5410672", "0.5401743", "0.54016775", "0.53994143", "0.5396948", "0.5394041", "0.53901964", "0.53860873", "0.5385844", "0.538197" ]
0.0
-1
Admin Function update STT charge
public static void updateSTTCharge(){ Scanner userInputStt = new Scanner(System.in); System.out.println("Current STT charge is" +ApplicableCharge.getSecuritiesTransferTaxRate()); System.out.println("Current Transaction charge is" +ApplicableCharge.getTransactionChargeRate()); System.out.println("Enter STT Charge "); if(!userInputStt.hasNextDouble()) { System.out.println("STT charge entered in invalid, it should be a numeric value. You will be returned to main menu" + '\n'); return; } double STT = userInputStt.nextDouble(); ApplicableCharge.setSecuritiesTransferTaxRate(STT); System.out.println("Updated STT charge is" +ApplicableCharge.getSecuritiesTransferTaxRate() +'\n'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Transfer updateChargeBack(Transfer transfer, Transfer chargeback);", "@Override\n\tpublic void updateCharge(Charge charge) {\n\t\tchargeMapper.updateCharge(charge);\n\t}", "@Override\r\n\tpublic void pay(long dateTime, float charge) {\n\t\t\r\n\t}", "void chargeTf(double amount);", "void setAsInCharge(User user, Project project, Date date);", "public void setCharge(ChargeComponent charge) {\r\n this.charge = charge;\r\n }", "void updateCustomerDDPay(CustomerDDPay cddp);", "public UpdateVehicleCharges() {\n initComponents();\n view();\n \n \n }", "public static void updatePayment(){\n projectChosen = getQuestionInput();\r\n try {\r\n Connection myConn = DriverManager.getConnection(url, user, password);\r\n\r\n String sqlInsert = \"UPDATE projects SET tot_paid = ?\" +\r\n \"WHERE project_num = \" + projectChosen;\r\n\r\n PreparedStatement pstmt = myConn.prepareStatement(sqlInsert);\r\n pstmt.setDouble(1, NewProject.tot_paid);\r\n pstmt.executeUpdate(); //Execute update of database.\r\n pstmt.close();\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }", "private void update() {\n\n\t\tfloat shopping = Float.parseFloat(label_2.getText());\n\t\tfloat giveing = Float.parseFloat(label_5.getText());\n\t\tfloat companyDemand = Float.parseFloat(label_7.getText());\n\n\t\ttry {\n\t\t\tPreparedStatement statement = DBConnection.connection\n\t\t\t\t\t.prepareStatement(\"update customer_list set Shopping_Account = \"\n\t\t\t\t\t\t\t+ shopping\n\t\t\t\t\t\t\t+ \" , Giving_Money_Account = \"\n\t\t\t\t\t\t\t+ giveing\n\t\t\t\t\t\t\t+ \", Company_demand = \"\n\t\t\t\t\t\t\t+ companyDemand\n\t\t\t\t\t\t\t+ \" where Name = '\"\n\t\t\t\t\t\t\t+ name\n\t\t\t\t\t\t\t+ \"' And Last_Name = '\"\n\t\t\t\t\t\t\t+ lastName + \"' \");\n\t\t\tstatement.execute();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\t\t}\n\n\t}", "public void updateRebill(HashMap<String, String> params) {\n\t\tTRANSACTION_TYPE = \"SET\";\n\t\tREBILL_ID = params.get(\"rebillID\");\n\t\tTEMPLATE_ID = params.get(\"templateID\");\n\t\tNEXT_DATE = params.get(\"nextDate\");\n\t\tREB_EXPR = params.get(\"expr\");\n\t\tREB_CYCLES = params.get(\"cycles\");\n\t\tREB_AMOUNT = params.get(\"rebillAmount\");\n\t\tNEXT_AMOUNT = params.get(\"nextAmount\");\n\t\tAPI = \"bp20rebadmin\";\n\t}", "@Override\n\tpublic void update(BatimentoCardiaco t, String[] params) {\n\t\t\n\t}", "Account.Update update();", "public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}", "public void updateconsumption(HealthSearch healthSearcher,int amount,String id, String time,double price) {\n\t\ttry {\n\t\t\tConnection connection = this.getConnection();\n\t\t\tPreparedStatement stmt = connection.prepareStatement(\"SELECT protein, energy, fiber,price FROM diet_conclusion where id = ? AND date = ?\");\n\t\t\tstmt.setString(1,id);\n\t\t\tstmt.setString(2,time.substring(0,8));\n\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\tif(rs.next()) {\n\t\t\t\tdouble previous_energy =0;\n\t\t\t\tdouble previous_fiber =0;\n\t\t\t\tdouble previous_protein =0;\n\t\t\t\tdouble previous_price = 0;\n\t\t\t\tdouble current_protein = 0;\n\t\t\t\tdouble current_energy =0;\n\t\t\t\tdouble current_fiber = 0;\n\t\t\t\tdouble current_price = 0;\n\t\t\t\tprevious_protein = rs.getDouble(1);\n\t\t\t\tprevious_energy = rs.getDouble(2);\n\t\t\t\tprevious_fiber = rs.getDouble(3);\n\t\t\t\tprevious_price = rs.getDouble(4);\n\n\t\t\t\tcurrent_price = price + previous_price;\n\n\n\t\t\t\tif( !healthSearcher.getProtein().equals(\"0\")) {\n\t\t\t\t\t current_protein = previous_protein + Double.parseDouble(healthSearcher.getProtein())*amount/100.0;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcurrent_protein = previous_protein;\n\n\t\t\t\t}\n\t\t\t\tif( !healthSearcher.getEnergy().equals(\"0\")) {\n\t\t\t\t\tcurrent_energy = previous_energy + Double.parseDouble(healthSearcher.getEnergy())*amount/100.0;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcurrent_energy = previous_energy;\n\t\t\t\t}\n\t\t\t\tif( !healthSearcher.getFiber().equals(\"0\")) {\n\t\t\t\t\tcurrent_fiber = previous_fiber + Double.parseDouble(healthSearcher.getFiber())*amount/100.0;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcurrent_fiber = previous_fiber;\n\t\t\t\t}\n\t\t\t\tPreparedStatement stmt2 = connection.prepareStatement(\n\t\t\t\t\"UPDATE diet_conclusion SET protein = ?, energy = ?, fiber = ?, price=? WHERE id = ? AND date = ?;\");\n\n\t\t\t\tstmt2.setDouble(1, current_protein);\n\t\t\t\tstmt2.setDouble(2, current_energy);\n\t\t\t\tstmt2.setDouble(3, current_fiber);\n\t\t\t\tstmt2.setDouble(4, current_price);\n\t\t\t\tstmt2.setString(5, id);\n\t\t\t\tstmt2.setString(6, time.substring(0,8));\n\t\t\t\tstmt2.execute();\n\t\t\t\tstmt2.close();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tPreparedStatement stmt1 = connection.prepareStatement(\n\t\t\t\t\t\t\"INSERT INTO diet_conclusion VALUES(?,?,?,?,?,?)\");\n\t\t\t\tstmt1.setString(1,id);\n\t\t\t\tstmt1.setString(2, time.substring(0,8));\n\t\t\t\tstmt1.setDouble(3, Double.parseDouble(healthSearcher.getProtein())*amount/100.0);\n\t\t\t\tstmt1.setDouble(4, Double.parseDouble(healthSearcher.getEnergy())*amount/100.0);\n\t\t\t\tstmt1.setDouble(5, Double.parseDouble(healthSearcher.getFiber())*amount/100.0);\n\t\t\t\tstmt1.setDouble(6, price);\n\t\t\t\tstmt1.execute();\n\t\t\t\tstmt1.close();\n\t\t\t}\n\t\t\tstmt.close();\n\t\t\trs.close();\n\t\t\tconnection.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}", "@Override\n\tpublic void updateChargeState(Charge charge) {\n\t\tchargeMapper.updateChargeState(charge);\n\t}", "public void setChargeid(Integer chargeid) {\n this.chargeid = chargeid;\n }", "@Override\n\tpublic void updateTotalCost(String card, double cost) {\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tconn = DbcpConnectionPool.getConnection();\n\t\t\tCallableStatement cstmt = conn.prepareCall(\"{call Member_updateTotalCost(?,?)}\");\n\t\t\tcstmt.setString(1, card);\n\t\t\tcstmt.setDouble(2, cost);\n\t\t\tcstmt.executeUpdate();\n\t\t\tcstmt.close();\n\t\t\tconn.close();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Action(value = \"saveCustomChargeInfo\", results = { @Result(name = \"success\", type = \"json\"), })\n\tpublic String saveCustomChargeInfo() {\n\t\tlog.info(\"Starting to save customer charge info into DB\");\n\t\tboolean flag = false;\n\t\ttry {\n\t\t\tthis.customerChargeServiceImpl.addCustomChargeInfo(this.customerChargeBean);\n\t\t\tflag = true;\n\t\t} catch (Exception e) {\n\t\t\tlog.info(\"save customer charge data into DB occured error, please references the detail log\\n \" + \"[\" + e + \"]\\n\"\n\t\t\t\t\t+ ErrorLogUtil.printInfo(e));\n\t\t\treturn ERROR;\n\t\t}\n\t\tif (flag) {\n\t\t\tlog.info(\"Successfully save customer charge info into DB\");\n\t\t\treturn SUCCESS;\n\t\t}\n\t\treturn ERROR;\n\t}", "@Test(groups = \"his.wardadmission.test\", dependsOnMethods = { \"addWardTestCase\" })\n\tpublic void updateDischargeTestCase() throws IOException, JSONException {\n\n\t\tJSONObject jsonRequestObject = new JSONObject(RequestUtil\n\t\t\t\t.requestByID(TestCaseConstants.UPDATE_DISCHARGE));\n\t\t\n\t\tArrayList<String> resArrayList = getHTTPResponse(\n\t\t\t\tproperties\n\t\t\t\t\t\t.getProperty(TestCaseConstants.URL_APPEND_UPDATE_DISCHARGE),\n\t\t\t\tTestCaseConstants.HTTP_PUT, jsonRequestObject.toString());\n\n\t\tSystem.out.println(\"message :\"+resArrayList.get(0));\n\t\t\n\t\tAssert.assertEquals(Integer.parseInt(resArrayList.get(1)),\n\t\t\t\tSUCCESS_STATUS_CODE);\n\t\t\n\t}", "public void setChargecurrency(java.lang.String newChargecurrency) {\n\tchargecurrency = newChargecurrency;\n}", "public void editContestPayment(ContestPayment contestPayment) throws ContestManagementException {\n \r\n }", "public void editContestPayment(ContestPayment contestPayment) throws ContestManagementException {\n \r\n }", "public static void editLoanCost() {\n //We can only edit loan cost on Videos.\n char[] type = {'v'};\n String oldID = getExistingID(\"Video\", type);\n\n //Validate ID\n if (oldID != null) {\n //Run input validation\n String[] choiceOptions = {\"4\", \"6\"};\n int newLoan = Integer.parseInt(receiveStringInput(\"Enter new Loan Fee:\", choiceOptions, true, 1));\n try {\n //Replace the loan fee\n inv.replaceLoan(oldID, newLoan);\n } catch (IncorrectDetailsException e) {\n System.out.println(Utilities.ERROR_MESSAGE + \" Adding failed due to \" + e + \" with error message: \\n\" + e.getMessage());\n }\n } else System.out.println(Utilities.INFORMATION_MESSAGE + \"Incorrect ID, nothing was changed.\");\n }", "SerialResponse charge(PinChargePost pinChargePost);", "void updateAccount();", "void edit(Price Price);", "@Override\n\tpublic void update(Customer t) {\n\n\t}", "@Override\r\n\tpublic int update(SpUser t) {\n\t\treturn 0;\r\n\t}", "public void updateLicensePlate(LicensePlateForm form) {\n\t}", "public void singleUpdate() {\n\t\ttry {\n\t\t\tthis.updateBy = CacheUtils.getUser().username;\n\t\t} catch (Exception e) {\n\t\t\tif (! getClass().equals(GlobalCurrencyRate.class)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.updateBy = \"super\";\n\t\t}\n\t\tthis.workspace = CacheUtils.getWorkspaceId();\n\t\tthis.updateAt = new Date();\n\n\t\tif (insertBy == null) insertBy = updateBy;\n\t\tif (insertAt == null) insertAt = updateAt;\n\n\t\tsuper.update();\n\t\tCacheUtils.cleanAll(this.getClass(), getAuditRight());\n\t}", "public void Update(StokContract entity) {\n\t\t\n\t}", "public void handleUpdate(){\n increaseDecrease(\"i\");\n action=\"update\";\n buttonSave.setVisible(true);\n admission.setEditable(false);\n\n }", "public void updateCustomer(String name, String dob, String gender, String number, String email, String address, String password, Boolean promo, Integer reward) throws SQLException {\n st.executeUpdate(\"UPDATE IOTBAY.CUSTOMER SET \"\n + \"NAME ='\" + name \n + \"DATEOFBIRTH ='\" + dob \n + \"GENDER ='\" + gender \n + \"CONTACTNUMBER ='\" + number \n + \"BILLINGADDRESS ='\" + address \n + \"PASSWORD ='\" + password \n + \"PROMOTIONALNEWSLETTER ='\" + promo \n + \"', REWARDPOINTS='\" + reward \n + \"' WHERE EMAIL='\" + email + \"'\" );\n\n }", "private void updateMoney() {\n balance = mysql.getMoney(customerNumber);\n balanceConverted = (float) balance / 100.00;\n }", "void updateChargeStates(String experimentAccession, Set<Integer> chargeStates);", "public void updateNewTandC(Integer vendorId, String userName);", "int updateByPrimaryKey(CGcontractCredit record);", "public void charge() {\n\t\t\tSystem.out.println(\"Battery is charging\");\n\t\t}", "public void setCharge(java.lang.Float charge) {\n\t\tthis.charge = charge;\n\t}", "public void updateAccountingSystem(Sale sale)\n {\n \n }", "int updateByPrimaryKeySelective(CGcontractCredit record);", "int updateByPrimaryKey(TbFreightTemplate record);", "License update(License license);", "public void setCHARGE(BigDecimal CHARGE) {\r\n this.CHARGE = CHARGE;\r\n }", "int updateBalance(CardVO cv) throws RemoteException;", "int updateByPrimaryKeySelective(CostAccountingStatisticByLineDetail record);", "public void updatehotelincome(double price ){\n String query = \"update Hotel set Income = Income + ? \";\n \n try {\n PreparedStatement Query = conn.prepareStatement(query);\n Query.setDouble(1,price);\n Query.execute();\n \n } catch (SQLException ex) {\n Logger.getLogger(sqlcommands.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "public void editBalance() {\n\t\tAccount account = getAccountForEditBalance();\n\n\t\tif (adminDao.editBalance(account))\n\t\t\tSystem.out.println(\"Balance edited!\");\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}", "private static int chargeRate(Thing b, Thing s) {\n \t\tint rate=b.getStat(\"WP\");\r\n \t\t\r\n \t\t// bonus for appropraite recharge skill\r\n \t\trate=rate*(1+b.getStat(rechargeSkill(s)));\r\n \t\t\r\n \t\t// spell specific charge rate\r\n \t\t// default is 100\r\n \t\trate=(rate*s.getStat(\"ChargeRate\"));\r\n \t\t\r\n \t\t// more costly spells take longer to recharge\r\n \t\trate=rate/s.getStat(\"SpellCost\");\r\n \t\t\r\n \t\tif (rate<=0) {\r\n \t\t\tGame.warn(\"Spell.chargeRate(...)==0 for \"+s.name());\r\n \t\t}\r\n \t\t\r\n \t\treturn rate;\r\n \t}", "public int balup(double newbalance, Long accountno, Long broaccno, Double bramt) throws Exception{\n\tint j=DbConnect.getStatement().executeUpdate(\"update account set balance=\"+newbalance+\" where accno=\"+accountno+\"\");\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update account set balance=balance+\"+bramt+\" where accno=\"+broaccno+\"\");\r\n\treturn i;\r\n}", "@Test\n\tvoid testUpdatePlant() {\n\t\tPlant plant = service.updatePlant(new Plant( 8.0, \"Lemon\", \"Antihairfall\", 22.0, 5, 170.0, \"shurb\"));\n\t\tassertEquals(170.0, plant.getCost());\n\t}", "@Override\n\tpublic int updateTicket(Booking_ticket bt) {\n\t\treturn 0;\n\t}", "public UpdatePerUnitCost() {\n initComponents();\n }", "@Override\r\n\tpublic void updatePayment(XftPayment xtp) {\n\t\txftPaymentMapper.updateByPrimaryKeySelective(xtp);\r\n\t}", "int updateByPrimaryKey(BasicInfoAnodeBurningLossRate record);", "@Transactional\n @Modifying\n @Query(\"UPDATE Day SET stripes = stripes + ?1 WHERE date = ?2 AND user_id = ?3\")\n void updateStripes(Integer amountOfStripes, LocalDate date, Integer id);", "Order setAsInCharge(Order order, User user);", "public void updateCardNo(String accountId, String password, String cardNo) {\n try{\n Class.forName(\"com.mysql.jdbc.Driver\");\n con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/make_order_request\",\"root\",\"admin\");\n Statement mystmt = con.createStatement();\n \n \n //SQL query to update credit card\n String query = \"UPDATE customer_account SET card_no = ? WHERE account_id ='\" + accountId +\"' AND password ='\"+password+\"'\";\n PreparedStatement ps=con.prepareStatement(query);\n ps.setInt(1, Integer.parseInt(cardNo));\n \n \n ps.executeUpdate();\n \n \n }\n \n catch(Exception e){\n e.printStackTrace();\n \n }\n return;\n }", "public int getChargeRate();", "private void doChargeSet(int newSetting)\r\n {\r\n requestQueue.add( new ChargerHTTPConn( weakContext,\r\n CHARGE_NODE_HTML_DATA,\r\n CONTROL_URL,\r\n SN_HOST,\r\n makeChargeControl(newSetting),\r\n cookieData,\r\n false,\r\n token,\r\n secret ) ); \r\n }", "public static void updatecou(String cno2, String cname2, double stucredit2) {\n\t\ttry{\n\t\t\tps = conn.prepareStatement(\"update course set Cname = ?, Ccredit = ? where Cno = ?\");\n\t\t\tps.setString(1, cname2);\n\t\t\tps.setDouble(2, stucredit2);\n\t\t\tps.setString(3, cno2);\n\t\t\tps.executeUpdate();\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"课程信息修改成功!\", \"提示消息\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\tJOptionPane.showMessageDialog(null, \"课程信息修改失败!\", \"提示消息\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}\n\t}", "void changeCost(ArrayList<CostsChanges> changes);", "@Override\n\tpublic void updateWaybill(WaybillEntity waybill) {\n\t\t\n\t}", "public void update(Customer myCust){\n }", "public void assignDiscountType(int acc_no, String discount_type){\n try {\n Stm = conn.prepareStatement(\"UPDATE `bapers`.`Customer` SET Discount_type = ? WHERE Account_no =? AND Customer_type = ?;\");\n Stm.setString(1, discount_type);\n Stm.setInt(2,acc_no);\n Stm.setString(3, \"Valued\");\n Stm.executeUpdate();\n Stm.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\tpublic String updateinvoicing(String toAllocate, String shipmentNumber) {\n\t\tSystem.out.println(\"airway\"+shipmentNumber);\r\n\t\tint count = senderdata_InvoicingRepository.updateinvoicingairway(shipmentNumber,toAllocate.split(\",\"));\r\n\t\tSystem.out.println(\"updated\"+count);\r\n\t\t//senderdata_InvoicingRepository.selectinvoicing(toAllocate.split(\",\"));\r\n\t\treturn \"Updated Succesfully\";\r\n\t}", "protected void charge() {\n Station nearestStation = map.nearestStation(currentPosition);\n if (Position.withinRange(nearestStation.pos, currentPosition)) {\n float[] values = nearestStation.discharge();\n coins += values[0];\n power += values[1];\n }\n }", "@Override\r\n\tpublic int update(PtHrUserBak t) {\n\t\treturn 0;\r\n\t}", "public void deposit(double amount) {\n balance += amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo='\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n }", "Flight updateFlight(Flight flight);", "public void deposit(double depAmnt){\n try {\n String queryStr = \"update dummybank set amount = ? where accountNo = ?\";\n ps = con.prepareStatement(queryStr);\n ps.setDouble(1,this.amnt + depAmnt );\n ps.setString(2, accNo);\n ps.executeUpdate();\n } catch (SQLException ex) {\n Logger.getLogger(BankDBConnector.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n\tpublic void updateSanCtn(SanCtnVO pv) throws SQLException {\n\t\t\n\t}", "@Test(groups = \"his.wardadmission.test\", dependsOnMethods = { \"addWardTestCase\" })\n\tpublic void updateDischargeSignTestCase() throws IOException, JSONException {\n\n\t\tJSONObject jsonRequestObject = new JSONObject(RequestUtil\n\t\t\t\t.requestByID(TestCaseConstants.UPDATE_DISCHARGE_SIGN));\n\t\t\n\t\tArrayList<String> resArrayList = getHTTPResponse(\n\t\t\t\tproperties\n\t\t\t\t\t\t.getProperty(TestCaseConstants.URL_APPEND_UPDATE_DISCHARGE_SIGN),\n\t\t\t\tTestCaseConstants.HTTP_POST, jsonRequestObject.toString());\n\n\t\tSystem.out.println(\"message :\"+resArrayList.get(0));\n\n\t\tAssert.assertEquals(Integer.parseInt(resArrayList.get(1)),\n\t\t\t\tSUCCESS_STATUS_CODE);\n\t\t\n\t}", "public static void updateTransactionCharge(){\r\n\tScanner userInput = new Scanner(System.in);\r\n\tSystem.out.println(\"Current STT charge is\" +ApplicableCharge.getSecuritiesTransferTaxRate());\r\n\tSystem.out.println(\"Current Transaction charge is\" +ApplicableCharge.getTransactionChargeRate());\r\n\tSystem.out.println(\"Enter Transaction Charge \");\r\n\tif(!userInput.hasNextDouble()) {\r\n\t\tSystem.out.println(\"Transaction charge entered in invalid, it should be a numeric value. You will be returned to main menu\" + '\\n');\r\n\t\treturn;\r\n\t}\t\r\n\tdouble transactionCharge = userInput.nextDouble();\r\n\tApplicableCharge.setTransactionChargeRate(transactionCharge);\r\n\tSystem.out.println(\"Updated Transaction charge is\" +ApplicableCharge.getTransactionChargeRate() +'\\n');\r\n}", "public int Edshare(Long cid, Long shareamt,String datee, Long shareno, Long sindex) throws SQLException,ClassNotFoundException{\n\tint i=DbConnect.getStatement().executeUpdate(\"update share_details set no_share=\"+shareno+\",shareprice=\"+shareamt+\",shareindex=\"+sindex+\" where comp_id=\"+cid+\" and DATEOFTRANS='\"+datee+\"'\");\r\n\treturn i;\r\n\t\r\n}", "@ReactMethod\n public void peopleTrackCharge(double charge) {\n mixpanel.getPeople().trackCharge(charge, null);\n }", "@Override\n\tpublic double calculateServiceCharge() {\n\t\treturn 10.19;\n\t}", "@Test\n public void update2()\n {\n int zzz = getJdbcTemplate().update(\"UPDATE account SET NAME =?,money=money-? WHERE id =?\", \"ros\", \"100\", 2);\n System.out.println(zzz);\n }", "public void update() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.update(this); // routine now uses leaseDao to get CampLease class\r\n\t}", "@Override\n\t/*public ActionResult update(PortalForm form, HttpServletRequest request) {\n\t\tActionResult result = new ActionResult();\n\t\trequest.setAttribute(\"actionForm\", \"\");\n\t\tLogin login = Login.getLogin(request);\n\t\tif (!ModelUtiility.hasModulePermission(login, MODULEID)){\n\t\t\tresult.getActionMessages().add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(\"errors.access.denied\"));\n\t\t\treturn result;\n\t\t}\n\t\tConnection conn = null;\n\t\ttry{\n\t\t\tconn = ResourceManager.getConnection();\n\t\t\tconn.setAutoCommit(false);\n\t\t\tSalaryReconciliationBean formBean = (SalaryReconciliationBean) form;\n\t\t\tSalaryReconciliationReqDao reconciliationReqDao = SalaryReconciliationReqDaoFactory.create(conn);\n\t\t\tSalaryReconciliationReq reconciliationReqArr[] = reconciliationReqDao.findByDynamicWhere(\" SR_ID=? AND ASSIGNED_TO=? AND LEVEL=(SELECT LEVEL FROM SALARY_RECONCILIATION_REQ WHERE ID=(SELECT MAX(ID) FROM SALARY_RECONCILIATION_REQ WHERE SR_ID = ?)) ORDER BY ID DESC\", new Object[] { formBean.getId(), login.getUserId(), formBean.getId() });\n\t\t\tSalaryReconciliationDao reconciliationDao = SalaryReconciliationDaoFactory.create(conn);\n\t\t\tSalaryReconciliation reconciliation = reconciliationDao.findByPrimaryKey(formBean.getId());\n\t\t\tif (reconciliationReqArr == null || reconciliationReqArr.length <= 0 || reconciliationReqArr[0] == null || reconciliation == null){\n\t\t\t\tresult.getActionMessages().add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(\"deputation.update.failed\"));\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tSalaryReconciliationReq reconciliationReq = reconciliationReqArr[0];\n\t\t\tswitch (ActionMethods.UpdateTypes.getValue(form.getuType())) {\n\t\t\t\tcase UPDATE:\n\t\t\t\t\t//updateReports(formBean, result, login);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ACCEPTED:\n\t\t\t\t\t///updateReports(formBean, result, login);\n\t\t\t\t\treconciliationReq.setComments(formBean.getComments());\n\t\t\t\t\treconciliationReq.setActionBy(login.getUserId());\n\t\t\t\t\treconciliationReq.setActionOn(new Date());\n\t\t\t\t\treconciliationReqDao.update(reconciliationReq.createPk(), reconciliationReq);\n\t\t\t\t\tProcessChain pchain = getProcessChain(conn);\n\t\t\t\t\tInteger[] notifiers = new ProcessEvaluator().notifiers(pchain.getNotification(), 1);\n\t\t\t\t\tif (reconciliationReq.getEscalatedFrom() != null && reconciliationReq.getEscalatedFrom().length() > 0 && !reconciliationReq.getEscalatedFrom().equals(\"0\")){\n\t\t\t\t\t\tJDBCUtiility.getInstance().update(\"UPDATE SALARY_RECONCILIATION_REQ SET ACTION_BY=?, ACTION_ON=NOW() WHERE ESCALATED_FROM IN ( \" + reconciliationReq.getEscalatedFrom() + \" )\", new Object[] { login.getUserId() }, conn);\n\t\t\t\t\t}\n\t\t\t\t\tif (reconciliation.getStatus() == Status.getStatusId(Status.GENERATED)){\n\t\t\t\t\t\treconciliation.setStatus(Status.getStatusId(Status.SUBMITTED));\n\t\t\t\t\t} else if (reconciliation.getStatus() == Status.getStatusId(Status.REJECTED)){\n\t\t\t\t\t\treconciliation.setStatus(Status.getStatusId(Status.RESUBMITTED));\n\t\t\t\t\t} else if (reconciliation.getStatus() == Status.getStatusId(Status.ACCEPTED)){\n\t\t\t\t\t\tif (isCompleteApprove && JDBCUtiility.getInstance().getRowCount(\"FROM SALARY_RECONCILIATION_REQ WHERE LEVEL=? AND SR_ID=? AND ACTION_BY=0\", new Object[] { reconciliationReq.getLevel(), reconciliationReq.getSrId() }, conn) > 0) break;\n\t\t\t\t\t\treconciliation.setStatus(Status.getStatusId(Status.APPROVED));\n\t\t\t\t\t} else if (reconciliation.getStatus() == Status.getStatusId(Status.APPROVED)){\n\t\t\t\t\t\treconciliation.setStatus(Status.getStatusId(Status.COMPLETED));\n\t\t\t\t\t\treconciliation.setCompletedOn(new Date());\n\t\t\t\t\t\treconciliationDao.update(reconciliation.createPk(), reconciliation);\n\t\t\t\t\t\tList<Object> ccids = JDBCUtiility.getInstance().getSingleColumn(\"SELECT ASSIGNED_TO FROM SALARY_RECONCILIATION_REQ WHERE SR_ID=?\", new Object[] { reconciliation.getId() }, conn);\n\t\t\t\t\t// updating salary in advance table\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tFinanceInfoDaoFactory.create(conn).updateSalaryInAdvance(reconciliation);\n\t\t\t\t\t\tSet<Integer> ccidsSet = new HashSet<Integer>();\n\t\t\t\t\t\tif (ccids != null && ccids.size() > 0){\n\t\t\t\t\t\t\tfor (Object ids : ccids)\n\t\t\t\t\t\t\t\tccidsSet.add((Integer) ids);\n\t\t\t\t\t\t\tfor (Integer ids : notifiers)\n\t\t\t\t\t\t\t\tccidsSet.add((Integer) ids);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (ccidsSet.size() > 0){\n\t\t\t\t\t\t\tString mailSubject = \"Final Salary Reconciliation Report for \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \"ready for disbursal\";\n\t\t\t\t\t\t\tString messageBody = \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The final Salary Reconciliation Report for the period \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" is ready for disbursal. \";\n\t\t\t\t\t\t\tsendMail(mailSubject, messageBody, ccidsSet.toArray(new Integer[ccidsSet.size()]), null, reconciliation.getEsrMapId(), reconciliation.getStatusName(), conn);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tInteger[] approvers = new ProcessEvaluator().approvers(pchain.getApprovalChain(), reconciliationReq.getLevel() + 1, 1);\n\t\t\t\t\tif (approvers != null && approvers.length > 0){\n\t\t\t\t\t\tfor (int approver : approvers){\n\t\t\t\t\t\t\treconciliationReqDao.insert(new SalaryReconciliationReq(reconciliation.getId(), approver, reconciliationReq.getLevel() + 1, \"\", new Date(), \"0\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tString mailSubject = \"Salary Reconciliation Report submitted for \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear();\n\t\t\t\t\t\tString messageBody = \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The Salary Report for the period \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" has been submitted and is awaiting your action. Please do the needful.\";\n\t\t\t\t\t\tsendMail(mailSubject, messageBody, approvers, notifiers, reconciliation.getEsrMapId(), reconciliation.getStatusName(), conn);\n\t\t\t\t\t} else if (reconciliation.getStatus() == Status.getStatusId(Status.SUBMITTED) || reconciliation.getStatus() == Status.getStatusId(Status.RESUBMITTED)){\n\t\t\t\t\t\treconciliation.setStatus(Status.getStatusId(Status.ACCEPTED));\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tInteger[] handlers = new ProcessEvaluator().handlers(pchain.getHandler(), 1);\n\t\t\t\t\t\tfor (int handler : handlers){\n\t\t\t\t\t\t\treconciliationReqDao.insert(new SalaryReconciliationReq(reconciliation.getId(), handler, reconciliationReq.getLevel() + 1, \"\", new Date(), \"0\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tString mailSubject = \"Salary Reconciliation Report for \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" Accepted by Finance\";\n\t\t\t\t\t\tString messageBody = \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The Salary Report for the period \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" has been Accepted by Finance and is awaiting your action. Please do the needful.\";\n\t\t\t\t\t\tsendMail(mailSubject, messageBody, handlers, notifiers, reconciliation.getEsrMapId(), reconciliation.getStatusName(), conn);\n\t\t\t\t\t} else if (reconciliation.getStatus() == Status.getStatusId(Status.APPROVED)){\n\t\t\t\t\t\tapprovers = new ProcessEvaluator().approvers(pchain.getApprovalChain(), reconciliationReq.getLevel() - 1, 1);\n\t\t\t\t\t\tInteger[] handlers = new ProcessEvaluator().handlers(pchain.getHandler(), 1);\n\t\t\t\t\t\tStringBuffer handlersNames = new StringBuffer();\n\t\t\t\t\t\tboolean flag = true;\n\t\t\t\t\t\tfor (int id : handlers){\n\t\t\t\t\t\t\thandlersNames.append(ModelUtiility.getInstance().getEmployeeName(id));\n\t\t\t\t\t\t\tif (flag) handlersNames.append(\" & \");\n\t\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (int approver : approvers){\n\t\t\t\t\t\t\treconciliationReqDao.insert(new SalaryReconciliationReq(reconciliation.getId(), approver, reconciliationReq.getLevel() + 1, \"\", new Date(), \"0\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tString mailSubject = \"Salary Reconciliation Report for \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" Approved by \" + handlersNames.toString();\n\t\t\t\t\t\tString messageBody = \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The Salary Report for the period \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" has been approved by \" + handlersNames.toString() + \" and is awaiting your action. Please do the needful.\";\n\t\t\t\t\t\tsendMail(mailSubject, messageBody, approvers, notifiers, reconciliation.getEsrMapId(), reconciliation.getStatusName(), conn);\n\t\t\t\t\t}\n\t\t\t\t\treconciliationDao.update(reconciliation.createPk(), reconciliation);\n\t\t\t\t\tbreak;\n\t\t\t\tcase REJECTED:\n\t\t\t\t\treconciliationReq.setActionBy(login.getUserId());\n\t\t\t\t\treconciliationReq.setActionOn(new Date());\n\t\t\t\t\treconciliationReq.setComments(formBean.getComments());\n\t\t\t\t\treconciliationReqDao.update(reconciliationReq.createPk(), reconciliationReq);\n\t\t\t\t\tif (reconciliationReq.getEscalatedFrom() != null && reconciliationReq.getEscalatedFrom().length() > 0 && !reconciliationReq.getEscalatedFrom().equals(\"0\")){\n\t\t\t\t\t\tJDBCUtiility.getInstance().update(\"UPDATE SALARY_RECONCILIATION_REQ SET ACTION_BY=?, ACTION_ON=NOW() WHERE ESCALATED_FROM IN ( \" + reconciliationReq.getEscalatedFrom() + \" )\", new Object[] { login.getUserId() }, conn);\n\t\t\t\t\t}\n\t\t\t\t\treconciliation.setStatus(Status.getStatusId(Status.REJECTED));\n\t\t\t\t\treconciliationDao.update(reconciliation.createPk(), reconciliation);\n\t\t\t\t\tProcessChain prchain = getProcallReceipientcCMailId.add(\"akash.anand@dikshatech.com\");essChain(conn);\n\t\t\t\t\tInteger[] reapprovers = new ProcessEvaluator().approvers(prchain.getApprovalChain(), 1, 1);\n\t\t\t\t\tif (reapprovers != null && reapprovers.length > 0){\n\t\t\t\t\t\tfor (int approver : reapprovers){\n\t\t\t\t\t\t\treconciliationReqDao.insert(new SalaryReconciliationReq(reconciliation.getId(), approver, 1, \"\", new Date(), \"0\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tInteger[] renotifiers = new ProcessEvaluator().notifiers(prchain.getNotification(), 1);\n\t\t\t\t\tString mailSubject = \"Salary Reconciliation Report rejected for \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear();\n\t\t\t\t\tString messageBody = \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The Salary Report for the period \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" has been rejected and is awaiting your action. Please do the needful.\";\n\t\t\t\t\tsendMail(mailSubject, messageBody, reapprovers, renotifiers, reconciliation.getEsrMapId(), reconciliation.getStatusName(), conn);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tconn.commit();\n\t\t} catch (Exception ex){\n\t\t\tlogger.error(\"RECONCILATION UPDATE : failed to update data\", ex);\n\t\t\tresult.getActionMessages().add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(\"deputation.update.failed\"));\n\t\t\treturn result;\n\t\t} finally{\n\t\t\tResourceManager.close(conn);\n\t\t}\n\t\treturn result;\n\t}*/\n\t\n\t\n\tpublic ActionResult update(PortalForm form, HttpServletRequest request) {\n\t\tActionResult result = new ActionResult();\n\t\trequest.setAttribute(\"actionForm\", \"\");\n\t\tLogin login = Login.getLogin(request);\n\t\tif (!ModelUtiility.hasModulePermission(login, MODULEID)){\n\t\t\tresult.getActionMessages().add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(\"errors.access.denied\"));\n\t\t\treturn result;\n\t\t}\n\t\tConnection conn = null;\n\t\ttry{\n\t\t\tconn = ResourceManager.getConnection();\n\t\t\tconn.setAutoCommit(false);\n\t\t\tSalaryReconciliationBean formBean = (SalaryReconciliationBean) form;\n\t\t\tSalaryReconciliationReqDao reconciliationReqDao = SalaryReconciliationReqDaoFactory.create(conn);\n\t\t\tSalaryReconciliationReq reconciliationReqArr[] = reconciliationReqDao.findByDynamicWhere(\" SR_ID=? AND ASSIGNED_TO=? AND LEVEL=(SELECT LEVEL FROM SALARY_RECONCILIATION_REQ WHERE ID=(SELECT MAX(ID) FROM SALARY_RECONCILIATION_REQ WHERE SR_ID = ?)) ORDER BY ID DESC\", new Object[] { formBean.getId(), login.getUserId(), formBean.getId() });\n\t\t\tSalaryReconciliationDao reconciliationDao = SalaryReconciliationDaoFactory.create(conn);\n\t\t\tSalaryReconciliation reconciliation = reconciliationDao.findByPrimaryKey(formBean.getId());\n\t\t\tif (reconciliationReqArr == null || reconciliationReqArr.length <= 0 || reconciliationReqArr[0] == null || reconciliation == null){\n\t\t\t\t\n\t\t\t\tSalaryReconciliationReportDao salaryReconciliationReportDao = SalaryReconciliationReportDaoFactory.create();\n\t\t\t\tSalaryReconciliationReport salaryReconciliationReport = new SalaryReconciliationReport();\n\t\t\t\tsalaryReconciliationReport.setReason(formBean.getReason());\n\t\t\t\tsalaryReconciliationReport.setDate(formBean.getDate());\n\t\t\t\tsalaryReconciliationReport.setSrId(formBean.getSrId());\n\t\t\t\tsalaryReconciliationReport.setUserId(formBean.getUserId());\n\t\t\t\tsalaryReconciliationReportDao.reasonForNonPay(salaryReconciliationReport.getReason(),salaryReconciliationReport.getDate(),formBean.getSrId(),salaryReconciliationReport.getUserId());\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tSalaryReconciliationReq reconciliationReq = reconciliationReqArr[0];\n\t\t\tswitch (ActionMethods.UpdateTypes.getValue(form.getuType())) {\n\t\t\t\tcase UPDATE:\n\t\t\t\t\t//updateReports(formBean, result, login);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ACCEPTED:\n\t\t\t\t\t///updateReports(formBean, result, login);\n\t\t\t\t\treconciliationReq.setComments(formBean.getComments());\n\t\t\t\t\treconciliationReq.setActionBy(login.getUserId());\n\t\t\t\t\treconciliationReq.setActionOn(new Date());\n\t\t\t\t\treconciliationReqDao.update(reconciliationReq.createPk(), reconciliationReq);\n\t\t\t\t\tProcessChain pchain = getProcessChain(conn);\n\t\t\t\t\tInteger[] notifiers = new ProcessEvaluator().notifiers(pchain.getNotification(), 1);\n\t\t\t\t\tif (reconciliationReq.getEscalatedFrom() != null && reconciliationReq.getEscalatedFrom().length() > 0 && !reconciliationReq.getEscalatedFrom().equals(\"0\")){\n\t\t\t\t\t\tJDBCUtiility.getInstance().update(\"UPDATE SALARY_RECONCILIATION_REQ SET ACTION_BY=?, ACTION_ON=NOW() WHERE ESCALATED_FROM IN ( \" + reconciliationReq.getEscalatedFrom() + \" )\", new Object[] { login.getUserId() }, conn);\n\t\t\t\t\t}\n\t\t\t\t\tif (reconciliation.getStatus() == Status.getStatusId(Status.GENERATED)){\n\t\t\t\t\t\treconciliation.setStatus(Status.getStatusId(Status.SUBMITTED));\n\t\t\t\t\t} else if (reconciliation.getStatus() == Status.getStatusId(Status.REJECTED)){\n\t\t\t\t\t\treconciliation.setStatus(Status.getStatusId(Status.RESUBMITTED));\n\t\t\t\t\t} else if (reconciliation.getStatus() == Status.getStatusId(Status.ACCEPTED)){\n\t\t\t\t\t\tif (isCompleteApprove && JDBCUtiility.getInstance().getRowCount(\"FROM SALARY_RECONCILIATION_REQ WHERE LEVEL=? AND SR_ID=? AND ACTION_BY=0\", new Object[] { reconciliationReq.getLevel(), reconciliationReq.getSrId() }, conn) > 0) break;\n\t\t\t\t\t\treconciliation.setStatus(Status.getStatusId(Status.APPROVED));\n\t\t\t\t\t} else if (reconciliation.getStatus() == Status.getStatusId(Status.APPROVED)){\n\t\t\t\t\t\treconciliation.setStatus(Status.getStatusId(Status.COMPLETED));\n\t\t\t\t\t\treconciliation.setCompletedOn(new Date());\n\t\t\t\t\t\treconciliationDao.update(reconciliation.createPk(), reconciliation);\n\t\t\t\t\t\tList<Object> ccids = JDBCUtiility.getInstance().getSingleColumn(\"SELECT ASSIGNED_TO FROM SALARY_RECONCILIATION_REQ WHERE SR_ID=?\", new Object[] { reconciliation.getId() }, conn);\n\t\t\t\t\t// updating salary in advance table\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tFinanceInfoDaoFactory.create(conn).updateSalaryInAdvance(reconciliation);\n\t\t\t\t\t\tSet<Integer> ccidsSet = new HashSet<Integer>();\n\t\t\t\t\t\tif (ccids != null && ccids.size() > 0){\n\t\t\t\t\t\t\tfor (Object ids : ccids)\n\t\t\t\t\t\t\t\tccidsSet.add((Integer) ids);\n\t\t\t\t\t\t\tfor (Integer ids : notifiers)\n\t\t\t\t\t\t\t\tccidsSet.add((Integer) ids);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (ccidsSet.size() > 0){\n\t\t\t\t\t\t\tString mailSubject = \"Final Salary Reconciliation Report for \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \"ready for disbursal\";\n\t\t\t\t\t\t\tString messageBody = \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The final Salary Reconciliation Report for the period \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" is ready for disbursal. \";\n\t\t\t\t\t\t\tsendMail(mailSubject, messageBody, ccidsSet.toArray(new Integer[ccidsSet.size()]), null, reconciliation.getEsrMapId(), reconciliation.getStatusName(), conn);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsendMail(formBean);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tInteger[] approvers = new ProcessEvaluator().approvers(pchain.getApprovalChain(), reconciliationReq.getLevel() + 1, 1);\n\t\t\t\t\tif (approvers != null && approvers.length > 0){\n\t\t\t\t\t\tfor (int approver : approvers){\n\t\t\t\t\t\t\treconciliationReqDao.insert(new SalaryReconciliationReq(reconciliation.getId(), approver, reconciliationReq.getLevel() + 1, \"\", new Date(), \"0\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tString mailSubject = \"Salary Reconciliation Report submitted for \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear();\n\t\t\t\t\t\tString messageBody = \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The Salary Report for the period \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" has been submitted and is awaiting your action. Please do the needful.\";\n\t\t\t\t\t\tsendMail(mailSubject, messageBody, approvers, notifiers, reconciliation.getEsrMapId(), reconciliation.getStatusName(), conn);\n\t\t\t\t\t} else if (reconciliation.getStatus() == Status.getStatusId(Status.SUBMITTED) || reconciliation.getStatus() == Status.getStatusId(Status.RESUBMITTED)){\n\t\t\t\t\t\treconciliation.setStatus(Status.getStatusId(Status.ACCEPTED));\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tInteger[] handlers = new ProcessEvaluator().handlers(pchain.getHandler(), 1);\n\t\t\t\t\t\tfor (int handler : handlers){\n\t\t\t\t\t\t\treconciliationReqDao.insert(new SalaryReconciliationReq(reconciliation.getId(), handler, reconciliationReq.getLevel() + 1, \"\", new Date(), \"0\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tString mailSubject = \"Salary Reconciliation Report for \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" Accepted by Finance\";\n\t\t\t\t\t\tString messageBody = \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The Salary Report for the period \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" has been Accepted by Finance and is awaiting your action. Please do the needful.\";\n\t\t\t\t\t\tsendMail(mailSubject, messageBody, handlers, notifiers, reconciliation.getEsrMapId(), reconciliation.getStatusName(), conn);\n\t\t\t\t\t} else if (reconciliation.getStatus() == Status.getStatusId(Status.APPROVED)){\n\t\t\t\t\t\tapprovers = new ProcessEvaluator().approvers(pchain.getApprovalChain(), reconciliationReq.getLevel() - 1, 1);\n\t\t\t\t\t\tInteger[] handlers = new ProcessEvaluator().handlers(pchain.getHandler(), 1);\n\t\t\t\t\t\tStringBuffer handlersNames = new StringBuffer();\n\t\t\t\t\t\tboolean flag = true;\n\t\t\t\t\t\tfor (int id : handlers){\n\t\t\t\t\t\t\thandlersNames.append(ModelUtiility.getInstance().getEmployeeName(id));\n\t\t\t\t\t\t\tif (flag) handlersNames.append(\" & \");\n\t\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (int approver : approvers){\n\t\t\t\t\t\t\treconciliationReqDao.insert(new SalaryReconciliationReq(reconciliation.getId(), approver, reconciliationReq.getLevel() + 1, \"\", new Date(), \"0\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tString mailSubject = \"Salary Reconciliation Report for \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" Approved by \" + handlersNames.toString();\n\t\t\t\t\t\tString messageBody = \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The Salary Report for the period \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" has been approved by \" + handlersNames.toString() + \" and is awaiting your action. Please do the needful.\";\n\t\t\t\t\t\tsendMail(mailSubject, messageBody, approvers, notifiers, reconciliation.getEsrMapId(), reconciliation.getStatusName(), conn);\n\t\t\t\t\t}\n\t\t\t\t\treconciliationDao.update(reconciliation.createPk(), reconciliation);\n\t\t\t\t\tbreak;\n\t\t\t\tcase REJECTED:\n\t\t\t\t\treconciliationReq.setActionBy(login.getUserId());\n\t\t\t\t\treconciliationReq.setActionOn(new Date());\n\t\t\t\t\treconciliationReq.setComments(formBean.getComments());\n\t\t\t\t\treconciliationReqDao.update(reconciliationReq.createPk(), reconciliationReq);\n\t\t\t\t\tif (reconciliationReq.getEscalatedFrom() != null && reconciliationReq.getEscalatedFrom().length() > 0 && !reconciliationReq.getEscalatedFrom().equals(\"0\")){\n\t\t\t\t\t\tJDBCUtiility.getInstance().update(\"UPDATE SALARY_RECONCILIATION_REQ SET ACTION_BY=?, ACTION_ON=NOW() WHERE ESCALATED_FROM IN ( \" + reconciliationReq.getEscalatedFrom() + \" )\", new Object[] { login.getUserId() }, conn);\n\t\t\t\t\t}\n\t\t\t\t\treconciliation.setStatus(Status.getStatusId(Status.REJECTED));\n\t\t\t\t\treconciliationDao.update(reconciliation.createPk(), reconciliation);\n\t\t\t\t\tProcessChain prchain = getProcessChain(conn);\n\t\t\t\t\tInteger[] reapprovers = new ProcessEvaluator().approvers(prchain.getApprovalChain(), 1, 1);\n\t\t\t\t\tif (reapprovers != null && reapprovers.length > 0){\n\t\t\t\t\t\tfor (int approver : reapprovers){\n\t\t\t\t\t\t\treconciliationReqDao.insert(new SalaryReconciliationReq(reconciliation.getId(), approver, 1, \"\", new Date(), \"0\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tInteger[] renotifiers = new ProcessEvaluator().notifiers(prchain.getNotification(), 1);\n\t\t\t\t\tString mailSubject = \"Salary Reconciliation Report rejected for \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear();\n\t\t\t\t\tString messageBody = \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The Salary Report for the period \" + PortalUtility.returnMonth(reconciliation.getMonth()) + \" \" + reconciliation.getYear() + \" has been rejected and is awaiting your action. Please do the needful.\";\n\t\t\t\t\tsendMail(mailSubject, messageBody, reapprovers, renotifiers, reconciliation.getEsrMapId(), reconciliation.getStatusName(), conn);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t/*case NONPAYMENT:\n\t\t\t\t\t\n\t\t\t\t\tSalaryReconciliationReportDao salaryReconciliationReportDao = SalaryReconciliationReportDaoFactory.create();\n\t\t\t\t\tSalaryReconciliationReport salaryReconciliationReport = new SalaryReconciliationReport();\n\t\t\t\t\tsalaryReconciliationReport.setReason(formBean.getReason());\n\t\t\t\t\tsalaryReconciliationReport.setDate(formBean.getDate());\n\t\t\t\t\tsalaryReconciliationReport.setSrId(formBean.getSrId());\n\t\t\t\t\tsalaryReconciliationReportDao.reasonForNonPay(salaryReconciliationReport.getReason(),salaryReconciliationReport.getDate(),formBean.getSrId());*/\n\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t}\n\t\t\tconn.commit();\n\t\t} catch (Exception ex){\n\t\t\tlogger.error(\"RECONCILATION UPDATE : failed to update data\", ex);\n\t\t\tresult.getActionMessages().add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(\"deputation.update.failed\"));\n\t\t\treturn result;\n\t\t} finally{\n\t\t\tResourceManager.close(conn);\n\t\t}\n\t\treturn result;\n\t}", "@Override\n\tpublic void updateCpteCourant(CompteCourant cpt) {\n\t\t\n\t}", "@Override\n\tpublic void update(Member member) {\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tconn = DbcpConnectionPool.getConnection();\n\t\t\tCallableStatement cstmt = conn.prepareCall(\"{call Member_update(?,?,?,?)}\");\n\t\t\tcstmt.setString(1,member.getMemberID());\n\t\t\tcstmt.setString(2, member.getMemberCard());\n\t\t\tcstmt.setDouble(3, member.getTotalCost());\n\t\t\tcstmt.setString(4, new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(member.getRegDate()));\n\t\t\tcstmt.executeUpdate();\n\t\t\tcstmt.close();\n\t\t\tconn.close();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void setChargeUnit(String ChargeUnit) {\n this.ChargeUnit = ChargeUnit;\n }", "private void updateFields(){\n\n updateTotalPay();\n updateTotalTip();\n updateTotalPayPerPerson();\n }", "public static void updategra(String stuid2, String cno2, int stugrade2, double stupoint2) {\n\t\ttry {\n\t\t\tps = conn.prepareStatement(\"update result set Grade = ?, Point = ? where Sno = ? and Cno = ? \");\n\t\t\tps.setInt(1, stugrade2);\n\t\t\tps.setDouble(2, stupoint2);\n\t\t\tps.setString(3, stuid2);\n\t\t\tps.setString(4, cno2);\n\t\t\tps.executeUpdate();\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"成绩修改成功!\", \"提示消息\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}catch(Exception e){\n\t\t\tJOptionPane.showMessageDialog(null, \"数据修改失败!\", \"提示消息\", JOptionPane.ERROR_MESSAGE);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic int update(Forge_Order_Detail t) {\n\t\treturn 0;\n\t}", "Motivo update(Motivo update);", "public int baldown(double newbalance, Long accountno, Long broaccno, Double bramt) throws Exception{\n\tint j=DbConnect.getStatement().executeUpdate(\"update account set balance=\"+newbalance+\" where accno=\"+accountno+\"\");\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update account set balance=balance+\"+bramt+\" where accno=\"+broaccno+\"\");\r\n\treturn i;\r\n}", "public void editar(String update){\n try {\n Statement stm = Conexion.getInstancia().createStatement();\n stm.executeUpdate(update);\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n }", "@Override\n public void batteryCharge() {\n super.batteryCharge();\n }", "public void updatebal(String cname, String amt1) {\nString countQuery = \"SELECT Balance FROM \" + DATABASE_TABLE1+\" WHERE Name='\"+cname+\"'\";\n\t \n\t Cursor cursor = ourDatabase.rawQuery(countQuery, null);\n\t int d=cursor.getColumnIndex(\"Balance\");\n\t\tString cbal=null;\n\t\tfor(cursor.moveToFirst();!cursor.isAfterLast();cursor.moveToNext()){\n\t\t\tcbal=cursor.getString(d);\n\t\t\t\n\t\t}\n\t\tint cur=Integer.parseInt(cbal);\n\t\tcur=cur+Integer.parseInt(amt1);\n\t ContentValues up=new ContentValues();\n\t up.put(Com_Balance, cur);\n\t\tourDatabase.update(DATABASE_TABLE1, up, Com_Name+\" = '\"+cname+\"'\", null);\n\t\t\n\t}", "public Updater(PluginDescriptionFile pdf) {\n this.pdf = pdf;\n\n log = Bukkit.getPluginManager().getPlugin(\"TradeShop\").getLogger();\n\n try {\n url = new URL(\"https://api.spigotmc.org/legacy/update.php?resource=32762\"); // Edit API URL.\n } catch (MalformedURLException ex) {\n log.log(Level.WARNING, \"Error: Bad URL while checking {0} !\", pdf.getName());\n }\n }", "void updateBalance(int amount){ \n\t\tbalance = amount;\n\t}", "@Override\n public void credit(Long idClient, Double value) {\n log.info(\"methode credit\");\n Optional<Compte> compteClient = getByIdClient(idClient);\n\n if (compteClient.isPresent()) {\n\n Double solde = compteClient.get().getSolde();\n compteClient.get().setSolde(solde + value);\n log.info(\"Methode credit : \" + compteClient.get().toString());\n\n update(compteClient.get());\n }\n }", "public static String createCharge(Request request, Response response) {\n Stripe.apiKey = \"sk_test_nKon8YMF1HyqAvNgvFpFHGbi\";\n CardChargeMakerParams cm = JsonUtil.getInstance().fromJson(request.body(), CardChargeMakerParams.class);\n\n // Get charge meta information\n String token = cm.getId();\n EntityManager em = DatabaseManager.getInstance().getEntityManager();\n TableSession session = em\n .find(TableSession.class, request.session().attribute(\"TableSessionKey\"));\n Transaction transaction = getCurrentTransaction(session.getRestaurantTable());\n int total = (int) (transaction.getTotal() * 100);\n\n // Create params\n Map<String, Object> params = new HashMap<>();\n params.put(\"amount\", total);\n params.put(\"currency\", \"gbp\");\n params.put(\"description\", \"Your meal at Oaxaca\");\n params.put(\"source\", token);\n\n try {\n // Charge customer card\n Charge charge = Charge.create(params);\n // Change status in database\n em.getTransaction().begin();\n\n Transaction temp = em.find(Transaction.class, transaction.getTransactionId());\n\n temp.setDatetimePaid(new Timestamp(System.currentTimeMillis()));\n temp.setIsPaid(true);\n session.getRestaurantTable().setStatus(TableStatus.NEEDS_CLEANING);\n em.getTransaction().commit();\n NotificationEndpoint.startNotificationService(temp);\n return \"success\";\n } catch (AuthenticationException | InvalidRequestException | CardException | APIConnectionException | APIException e) {\n e.printStackTrace();\n return \"failure\";\n } finally {\n em.close();\n }\n }", "public void setChargedate(java.sql.Date newChargedate) {\n\tchargedate = newChargedate;\n}", "public void Deposit(double ammount){\n abal = ammount + abal;\n UpdateDB();\n }", "@ApiModelProperty(required = true, value = \"The amount of the purchase. The tax was calculated on this amount.\")\n public BigDecimal getChargeAmount() {\n return chargeAmount;\n }", "private void updateTransaction() {\n LogUtils.logEnterFunction(Tag);\n\n String inputtedAmount = etAmount.getText().toString().trim().replaceAll(\",\", \"\");\n if (inputtedAmount.equals(\"\") || Double.parseDouble(inputtedAmount) == 0) {\n etAmount.setError(getResources().getString(R.string.Input_Error_Amount_Empty));\n return;\n }\n\n if (mAccount == null) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Account_Empty));\n return;\n }\n\n Double amount = Double.parseDouble(inputtedAmount);\n int categoryId = mCategory != null ? mCategory.getId() : 0;\n String description = tvDescription.getText().toString();\n int accountId = mAccount.getId();\n String strEvent = tvEvent.getText().toString();\n Event event = null;\n\n if (!strEvent.equals(\"\")) {\n event = mDbHelper.getEventByName(strEvent);\n if (event == null) {\n long eventId = mDbHelper.createEvent(new Event(0, strEvent, mCal, null));\n if (eventId != -1) {\n event = mDbHelper.getEvent(eventId);\n }\n }\n }\n\n // Less: Repayment, More: Lend\n if(mCategory.getDebtType() == Category.EnumDebt.LESS || mCategory.getDebtType() == Category.EnumDebt.MORE) {\n\n boolean isDebtValid = true;\n if(mCategory.getDebtType() == Category.EnumDebt.LESS) { // Income -> Debt Collecting\n List<Debt> debts = mDbHelper.getAllDebtByPeople(tvPeople.getText().toString());\n\n Double lend = 0.0, debtCollect = 0.0;\n for(Debt debt : debts) {\n if(mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) {\n lend += debt.getAmount();\n }\n\n if(!mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.LESS) {\n debtCollect += debt.getAmount();\n }\n }\n\n if(debtCollect + amount > lend) {\n isDebtValid = false;\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_debt_collect_invalid));\n }\n\n } // End DebtType() == Category.EnumDebt.LESS\n if(isDebtValid) {\n Transaction transaction = new Transaction(mTransaction.getId(),\n TransactionEnum.Income.getValue(),\n amount,\n categoryId,\n description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n int row = mDbHelper.updateTransaction(transaction);\n if (row == 1) { // Update transaction OK\n\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n Debt debt = mDbHelper.getDebtByTransactionId(mTransaction.getId());\n debt.setCategoryId(mCategory.getId());\n debt.setAmount(amount);\n debt.setPeople(tvPeople.getText().toString());\n\n int debtRow = mDbHelper.updateDebt(debt);\n if(debtRow == 1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_successful));\n cleanup();\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n } else {\n // Revert update\n mDbHelper.updateTransaction(mTransaction);\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_fail));\n }\n } else {\n Debt newDebt = new Debt();\n newDebt.setCategoryId(mCategory.getId());\n newDebt.setTransactionId((int) mTransaction.getId());\n newDebt.setAmount(amount);\n newDebt.setPeople(tvPeople.getText().toString());\n\n long debtId = mDbHelper.createDebt(newDebt);\n if(debtId != -1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_create_successful));\n cleanup();\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n } else {\n // Revert update\n mDbHelper.updateTransaction(mTransaction);\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_fail));\n }\n } // End create new Debt\n\n } // End Update transaction OK\n } // End isDebtValid\n\n } else { // CATEGORY NORMAL\n Transaction transaction = new Transaction(mTransaction.getId(),\n TransactionEnum.Income.getValue(),\n amount,\n categoryId,\n description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n int row = mDbHelper.updateTransaction(transaction);\n if (row == 1) { // Update transaction OK\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n mDbHelper.deleteDebt(mDbHelper.getDebtByTransactionId(mTransaction.getId()).getId());\n }\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n }\n }\n\n LogUtils.logLeaveFunction(Tag);\n }" ]
[ "0.65468466", "0.6229997", "0.58655053", "0.58441484", "0.58163923", "0.5804808", "0.5784383", "0.5782998", "0.5727676", "0.57232", "0.56861526", "0.5679232", "0.5667081", "0.5650099", "0.5627116", "0.5606301", "0.55864376", "0.5541771", "0.5540995", "0.55399626", "0.55378693", "0.5535671", "0.5535671", "0.5534063", "0.5526706", "0.5507894", "0.5482566", "0.54528624", "0.54436237", "0.5424464", "0.5398216", "0.53869104", "0.5384909", "0.5382419", "0.5381754", "0.5376761", "0.5371996", "0.5371193", "0.5360901", "0.5321998", "0.531972", "0.5305769", "0.52955216", "0.52938646", "0.5267774", "0.5261322", "0.5255649", "0.5251621", "0.52466905", "0.5243309", "0.5239646", "0.5236534", "0.5230303", "0.5226549", "0.5223909", "0.522362", "0.5223285", "0.52175444", "0.5214419", "0.5207227", "0.5202432", "0.519257", "0.51872724", "0.51848507", "0.5184839", "0.5183533", "0.5178137", "0.517377", "0.5165968", "0.51659054", "0.5165355", "0.5165128", "0.5155412", "0.51531976", "0.51423323", "0.5141745", "0.5140628", "0.5132776", "0.5131826", "0.51226026", "0.51196545", "0.5114989", "0.5112441", "0.5103299", "0.5100121", "0.51000917", "0.5099631", "0.5097266", "0.5095409", "0.5094288", "0.50936496", "0.5093039", "0.50895864", "0.508663", "0.50790775", "0.5076744", "0.50762", "0.50737107", "0.50711864", "0.5070076" ]
0.55534744
17
Function to check whether entered string is Integer
public static boolean isNumber(String s) { for (int i = 0; i < s.length(); i++) if (Character.isDigit(s.charAt(i)) == false) return false; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isInteger(String userInput){\n if (userInput.matches(\"[0-9]+\")) {\n return true;\n }\n return false;\n }", "public static boolean isInteger(String s) {\n\t try { Integer.parseInt(s); }\n\t catch(NumberFormatException e) { return false; }\n\t catch(NullPointerException e) { return false; }\n\t // only gets here if the entered String is Integer:\n\t return true;\n\t}", "boolean isInt(TextField input);", "private boolean isStringAnInt(String s) {\n // false if string is null\n if (s == null) {\n return false;\n }\n // if scanner get parse string for int then return true\n try {\n Scanner sc = new Scanner(s);\n int num = sc.nextInt();\n }\n // return false if it throws an exception\n catch (Exception e) {\n return false;\n }\n return true;\n }", "public static boolean isInteger(String s) {\n\t try { \n\t Integer.parseInt(s); \n\t } catch(NumberFormatException e) { \n\t return false; \n\t }\n\t return true;\n\t}", "public boolean isInteger(String input){\r\n try{\r\n Integer.parseInt(input);\r\n } catch (NumberFormatException e){\r\n return false;\r\n } catch (NullPointerException e){\r\n return false;\r\n }\r\n return true;\r\n }", "public static boolean isInteger(String input) {\n try {\n Integer.parseInt(input);\n return true;\n } catch (Exception e) {\n return false;\n }\n\n }", "public boolean isAnInt(String str) {\r\n \ttry {\r\n \t\tInteger.parseInt(str);\r\n \t} catch (NumberFormatException e) {\r\n \t\treturn false;\r\n \t}\r\n \treturn true;\r\n }", "private static boolean isInteger(String s) {\r\n try {\r\n Integer.parseInt(s);\r\n return true;\r\n } catch (Exception ex) {\r\n return false;\r\n }\r\n }", "private boolean isInteger(String a) {\n try \n {\n Integer.parseInt(a);\n return true;\n }\n catch(Exception e) {\n return false;\n }\n }", "public static boolean isInt(String val){\n\t try\n\t {\n\t Integer.parseInt(val);\n\t return true;\n\t } catch (NumberFormatException ex)\n\t {\n\t \tSystem.out.println(\"Please enter integer\");\n\t return false;\n\t }\n\t \n\t}", "private boolean isInt(String num) {\n boolean isInt;\n try {\n Integer.parseInt(num);\n isInt = true;\n } catch (Exception e) {\n isInt = false;\n }\n return isInt;\n }", "private boolean isInteger(String s)\n{\n\t boolean isNumber = true;\n\ttry{\n\t\t\tint n = Integer.parseInt(s);\n\t }catch(NumberFormatException n)\n\t {\n\t\t isNumber = false;\n\t }\n\n\treturn isNumber;\n}", "public static boolean isInteger(String s) {\n\t\ttry { \n\t\t\tInteger.parseInt(s); \n\t\t} catch(NumberFormatException e) { \n\t\t\treturn false; \n\t\t} catch(NullPointerException e) {\n\t\t\treturn false;\n\t\t}\n\t\t// only got here if we didn't return false\n\t\treturn true;\n\t}", "private boolean isInt(String str) { \n\t try { \n\t int d = Integer.parseInt(str); \n\t } catch(NumberFormatException nfe) { \n\t return false; \n\t } \n\t return true; \n\t}", "private int isInteger(String s) {\r\n\t\t\tint retInt;\r\n\t\t try { \r\n\t\t \tretInt = Integer.parseInt(s); \r\n\t\t } catch(NumberFormatException e) { \r\n\t\t return -1; \r\n\t\t } catch(NullPointerException e) {\r\n\t\t return -1;\r\n\t\t }\r\n\t\t // only got here if we didn't return false\r\n\t\t return retInt;\r\n\t\t}", "public static boolean isInteger(String s) {\n\t\ttry {\n\t\t\tInteger.parseInt(s);\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean isInteger(String x){\n try{\n Integer.parseInt(x);\n \n }\n catch(NumberFormatException e){\n return false;\n }\n return true;\n }", "public boolean isInt(String value) {\n try {\n Integer.parseInt(value);\n return true;\n } catch (Exception e) {\n return false;\n }\n }", "public static boolean isInteger(String s) {\n\t return isInteger(s,10);\n\t}", "public static boolean isInteger(String s)\r\n {\r\n if (s == null || s.length() == 0)\r\n return false;\r\n \r\n //integer regular expression\r\n String regex = \"[-|+]?\\\\d+\";\r\n if (!s.matches(regex))\r\n return false;\r\n \r\n if (s.startsWith(\"+\"))\r\n s = s.substring(1);\r\n \r\n //try convert the string to an int\r\n //if it can not be converted, then return false\r\n try\r\n {\r\n Integer.parseInt(s);\r\n }catch(Exception e)\r\n {\r\n return false;\r\n }\r\n \r\n return true;\r\n }", "public static boolean isInteger(String string) {\r\n\t try {\r\n\t Integer.valueOf(string);\r\n\t return true;\r\n\t } catch (NumberFormatException e) {\r\n\t return false;\r\n\t }\r\n\t}", "public boolean isInt(String text)\r\n {\r\n try\r\n {\r\n int ans = Integer.parseInt(text);\r\n return true;\r\n }\r\n catch(NumberFormatException e)\r\n {\r\n return false;\r\n }\r\n }", "public static boolean is_int(String s) {\n try {\n Integer.parseInt(s);\n return true;\n } catch (NumberFormatException e) {\n return false;\n }\n }", "public static boolean isInteger(String str){\n try {\n int d = Integer.parseInt(str);\n } catch (NumberFormatException nfe) {\n return false;\n }\n return true;\n }", "public static boolean isInteger(String s) {\r\n\t\ttry {\r\n\t\t\tInteger.parseInt(s);\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\treturn false;\r\n\t\t} catch (NullPointerException e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static boolean isInt(String strNum) {\n try {\n int d = Integer.parseInt(strNum);\n } catch (NumberFormatException | NullPointerException nfe) {\n System.out.println(\"Invalid data format\");\n log.error(nfe);\n return false;\n }\n return true;\n }", "public static boolean isInt(String str)\r\n\t{\r\n\t\tif (str == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tint length = str.length();\r\n\t\tif (length == 0) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tint i = 0;\r\n\t\tif (str.charAt(0) == '-') {\r\n\t\t\tif (length == 1) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\ti = 1;\r\n\t\t}\r\n\t\tfor (; i < length; i++) {\r\n\t\t\tchar c = str.charAt(i);\r\n\t\t\tif (c < '0' || c > '9') {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static boolean isInteger(String s) {\n return isInteger(s,10);\n }", "public static boolean isInteger(String value) {\n\t\ttry {\n\t\t\tInteger.parseInt(value);\n\t\t}\n\t\t \n\t\tcatch(NumberFormatException e) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public boolean checkInput(String str)\n {\n try\n {\n Integer.parseInt(str);\n } \n catch(NumberFormatException ex)\n {\n return false;\n } \n return true;\n }", "private static boolean validateInteger(String intString) {\n try {\n Integer.parseInt(intString);\n } catch (NumberFormatException e) {\n // Not a valid integer\n return false;\n }\n return true;\n }", "public static boolean isInteger(String s) {\n try {\n Integer.parseInt(s);\n } catch(NumberFormatException e) {\n return false;\n } catch(NullPointerException e) {\n return false;\n }\n return true;\n }", "public boolean isInteger(String sIntString) {\n int i = 0;\n try {\n i = Integer.parseInt(sIntString);\n return true;\n } catch (Exception e) {\n return false;\n }\n }", "public static boolean isInt(String s){\n boolean flag = true;\n flag = ((s.charAt(0) >= '0' && s.charAt(0) <= '9') || s.charAt(0) == '-' || s.charAt(0) == '+' );\n int i = 1;\n while(flag && i < s.length()){\n flag = (s.charAt(i) >= '0' && s.charAt(i) <= '9' );\n i++;\n }\n return flag;\n }", "public boolean checkInt( String s ) {\n \tchar[] c = s.toCharArray();\n \tboolean d = true;\n\n \tfor ( int i = 0; i < c.length; i++ )\n \t // verifica se o char não é um dígito\n \t if ( !Character.isDigit( c[ i ] ) ) {\n \t d = false;\n \t break;\n \t }\n \treturn d;\n \t}", "private boolean isInt (String s) {\n\t\ttry {\n\t\t\tif(Integer.parseInt(s) < 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tcatch(NumberFormatException e) {\n\t\t\treturn false;\n\t\t}\n\t\tcatch(NullPointerException e) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "private boolean checkInteger(String str) {\n try {\n return Integer.parseInt(str) <= 30; // Check if the entered value is an Integer and <= 30;\n } catch (NumberFormatException e) {\n return false;\n }\n }", "public static boolean isInteger(String str) {\n\t\ttry {\n\t\t\tInteger.parseInt(str);\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private boolean isInteger(String str)\r\n {\r\n try\r\n {\r\n int i = Integer.parseInt(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 boolean isInteger(String str) {\n if (str == null || str.isEmpty() || str.equals(\"-\"))\n return false;\n\n int startIndex = str.startsWith(\"-\") ? 1 : 0;\n for (int i = startIndex; i < str.length(); i++)\n if (Character.digit(str.charAt(i), 10) < 0)\n return false;\n return true;\n }", "public static boolean isIntValid (String str) {\r\n try {Integer.parseInt(str);} catch (NumberFormatException e) {return false;}\r\n return true;\r\n }", "public boolean isInteger() {\n try {\n Integer.parseInt(txt.getText());\n return true;\n } catch (Exception e) {\n return error(\"El valor debe ser un numero entero!\");\n }\n }", "public static boolean isInteger(String value) {\n boolean valid = false;\n try {\n Integer.parseInt(value);\n valid = true;\n } catch (RuntimeException exc) {\n // could not parse into int, false will be returned\n }\n return valid;\n }", "public static boolean isInt(String str) {\n\t\ttry {\n\t\t\tint f = Integer.parseInt(str);\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public boolean isInteger();", "public static boolean isInt(String pram)\r\n {\r\n try{\r\n Integer.parseInt(pram);\r\n return true;\r\n }catch(NumberFormatException e){\r\n return false;\r\n }\r\n }", "public static boolean isInteger(String str) {\n if (str == null || str.isEmpty()) {\n return false;\n }\n int length = str.length();\n if (length == 0) {\n return false;\n }\n int i = 0;\n if (str.charAt(0) == '-') {\n if (length == 1) {\n return false;\n }\n i = 1;\n }\n for (; i < length; i++) {\n char c = str.charAt(i);\n if (c <= '/' || c >= ':') {\n return false;\n }\n }\n return true;\n }", "private boolean isInteger(String element) {\r\n try {\r\n Integer.valueOf(element);\r\n } catch (NumberFormatException e) {\r\n return false;\r\n }\r\n return true;\r\n }", "public static boolean isInt(String val) {\n\t\ttry {\n\t\t\tInteger.parseInt(val);\n\t\t\treturn true;\n\t\t} catch (Exception e) { return false; }\n\t}", "private static boolean stringTest(String s){\n try{ //depending on whether this is successful or not will return the relevant value\n Integer.parseInt(s);\n return true;\n } catch (NumberFormatException ex){\n return false;\n }\n }", "public boolean isNumber(String in) \n\t{\n\t\ttry \n\t\t{\n\t\t\tInteger.parseInt(in);\n\t\t\treturn true;\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public static boolean IS_INTEGER(String t) {\n\n return (t.equals(Feature.INTEGER));\n }", "private static boolean isPositiveInteger(String s){\n\t\ttry{\n\t\t\t//If the token is an integer less than 0 return false\n\t\t\tif(Integer.parseInt(s) < 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t//If an exception occurs return false\n\t\tcatch(NumberFormatException e){\n\t\t\treturn false;\n\t\t}\n\t\t//otherwise return true\n\t\treturn true;\n\t}", "public boolean isNumber(String sIn)\r\n {\r\n int parseNumber = -1;\r\n \r\n try{\r\n parseNumber = Integer.parseInt(sIn);\r\n }catch(Exception e){\r\n return false;\r\n }\r\n \r\n return true;\r\n }", "public static boolean isValidInt(String s)\n {\n for (int i = 0; i < s.length(); i++)\n {\n if (!Character.isDigit(s.charAt(i)))\n {\n return false;\n }\n }\n return true;\n }", "public static boolean isInt(String check) {\n\t\treturn check.matches(\"\\\\d+\");\n\t}", "public static Boolean Int(String arg){\n\t\tif(arg == arg.replaceAll(\"\\\\D\",\"\")){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean checkInt(String str) {\n\t\ttry {\n\t\t\tint integer = Integer.parseInt(str);\n\t\t\tif(integer>=0&&integer<100000){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch(Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public static boolean isINT(final String token) {\n\t\t// Check for empty or 1-size strings.\n\t\tif (token.length() < 2)\n\t\t\treturn false;\n\n\t\t// verify all chars are 0-9.\n\t\tfor (int i = 0; i < token.length(); i++) {\n\t\t\tif (!digits.contains(Character.toString(token.charAt(i)))) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Passes all tests!\n\t\treturn true;\n\t}", "public static boolean IsInteger(String par_Number) {\n\n java.util.regex.Pattern p = java.util.regex.Pattern.compile(\"^[\\\\d|\\\\-]\\\\d*$\");\n java.util.regex.Matcher m = p.matcher(par_Number);\n\n return m.matches();\n\n }", "public boolean isParsable(String input){\n boolean parsable = true;\n try{\n Integer.parseInt(input);\n }catch(NumberFormatException e){\n parsable = false;\n }\n return parsable;\n}", "private boolean isInteger(String value){\n try{\n Integer.parseInt(value);\n }catch(NumberFormatException exc)\n {\n // Show the error message.\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Не верно указано затраченное время!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Введите целое число затраченного времени!\\nЗатраченное время не может превышать 2147483647 (245000 лет)!\");\n alert.showAndWait();\n return false;\n }\n return true;\n }", "private boolean tryParseInt(String str) {\n try {\n Integer.parseInt(str);\n } catch (Exception ex) {\n return false;\n }\n return true;\n }", "private static boolean isValidDigit(String strInput) {\n boolean isValid = true;\n if (isPrimitive(strInput)) {\n int input = Integer.parseInt(strInput);\n if (input < 1 || input > 255) {\n log.debug(\"Wrong config input value: {}\", strInput);\n isValid = false;\n } else {\n isValid = true;\n }\n\n } else {\n isValid = false;\n }\n\n return isValid;\n }", "private static boolean isParsable(String input) {\n try {\n Integer.parseInt(input);\n return true;\n } catch (NumberFormatException e) {\n return false;\n }\n }", "static boolean isInteger(char c) {\n\t\t\tswitch (c) {\n\t\t\t\tcase DECIMAL_INTEGER:\n\t\t\t\tcase OCTAL_INTEGER:\n\t\t\t\tcase HEXADECIMAL_INTEGER:\n\t\t\t\tcase HEXADECIMAL_INTEGER_UPPER:\n\t\t\t\t\treturn true;\n\t\t\t\tdefault:\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public static boolean isNumber(String text)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tInteger.parseInt(text);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tcatch(NumberFormatException e)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public static int integerValidation() {\n\t\tboolean flag = true;\n\t\tint input = 0;\n\t\tString temp = \"\";\n\t\twhile (flag) {\n\t\t\ttry {\n\t\t\t\ttemp = in.nextLine().trim();\n\t\t\t\tinput = Integer.parseInt(temp);\n\t\t\t\tflag = false;\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"Please Enter a valid input\");\n\t\t\t}\n\t\t}\n\t\treturn input;\n\t}", "private boolean isInt(TextField input){\r\n input.setStyle(\"-fx-border-color: green; -fx-border-radius: 15;-fx-background-radius: 20;\");\r\n try {\r\n int number = Integer.parseInt(input.getText());\r\n System.out.println(\"Input is\" + number );\r\n return true;\r\n } catch (Exception e) {\r\n input.setStyle(\"-fx-border-color: red;\");\r\n input.setText(null);\r\n input.setPromptText(\"Only digits/numbers must be filled\");\r\n return false;\r\n }\r\n }", "public static boolean isInt(char c) {\n\t\tif(c >= '0' && c <= '9') return true;\n\t\treturn false;\n\t}", "public boolean isNumeric(String str){\n try {\n int i = Integer.parseInt(str);\n } catch (NumberFormatException nfe) {\n return false;\n }\n return true;\n }", "public static boolean isNumber(String text) {\r\n\t\ttry {\r\n\t\t\tInteger.parseInt(text);\r\n\t\t} catch(NumberFormatException e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "boolean hasInt();", "public static int checkValidity (String stringChoice) {\n int choice;\n Scanner parser = new Scanner(stringChoice);\n String modStringChoice = stringChoice.replaceAll(\"[\\\\d]\", \"\");\n if (modStringChoice.length() == 0 && parser.hasNextInt()) {\n choice = parser.nextInt();\n }\n else {\n choice = -1;\n }\n parser.close();\n return choice;\n }", "public static boolean isNumber(String str){\n try {\n Integer.parseInt(str);\n } catch(NumberFormatException e) {\n return false;\n } catch(NullPointerException e) {\n return false;\n }\n return true;\n }", "public static int checkInt() {\n\t\tboolean is_Nb = false; int i = 0;\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\ti = Integer.parseInt(scan.nextLine());\r\n\t\t\t\tis_Nb= true;\r\n\t\t\t\tif(i<0) {\r\n\t\t\t\t\tSystem.out.println(\"Enter a positive number\");\r\n\t\t\t\t\tis_Nb = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(NumberFormatException e) {\r\n\t\t\t\tSystem.out.println(\"Enter a number\");\r\n\t\t\t}\r\n\t\t}while(!is_Nb);\r\n\t\treturn i;\r\n\t}", "private boolean isNumber( String test ) {\n\treturn test.matches(\"\\\\d+\");\n }", "public static boolean isNumeric(String userInput) {\n return Pattern.matches(Constants.ID_VALIDATION, userInput);\n }", "public static boolean isNumeric(String string) { \r\n\t\ttry { \r\n\t\t\tint testNumber = Integer.parseInt(string); \r\n\t\t} catch(NumberFormatException e) { \r\n\t\t\treturn false; \r\n\t\t} \r\n\t\t\r\n\t\treturn true; \r\n\t}", "public static boolean checkInt(Scanner scan) {\n\n if (scan.hasNextInt()) {//if the input is an integer\n return (true);\n }\n else {\n System.out.print(\"You did not enter an int; try again: \");\n return (false);\n \n }\n\n }", "private boolean isNumber(String str) {\r\n int ASCII_0 = 48;\r\n int ASCII_9 = 57;\r\n if (str.equals(\"\")) {\r\n return false;\r\n }\r\n for (int i = 0; i < str.length(); i++) {\r\n int chr = str.charAt(i);\r\n if (chr < ASCII_0 || chr > ASCII_9) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "private static boolean isNumeric(String cadena)\n\t {\n\t\t try \n\t\t {\n\t\t\t Integer.parseInt(cadena);\n\t\t\t return true;\n\t\t } catch (NumberFormatException nfe)\n\t\t {\n\t\t\t return false;\n\t\t }\n\t }", "public static int validInt(String message){\n boolean success = false;\n int value = -1;\n do {\n try {\n value = (int)readNumber(message, \"int\");\n success = true;\n } catch (InputMismatchException e){\n System.out.println(\"Debe introducir un valor numérico... \");\n }\n } while(!success);\n return value;\n }", "private static boolean isKata(String s) {\n\t\tchar c = s.charAt(0);\n\t\tif (c < '0' || c > '9') return true;\n\t\t\n\t\ttry {\n\t\t\tInteger.parseInt(s);\n\t\t\treturn false;\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn true;\n\t\t}\n\t}", "private static boolean isPrimitive(String value) {\n boolean status = true;\n value = value.trim();\n if (value.length() < 1) {\n return false;\n }\n for (int i = 0; i < value.length(); i++) {\n char c = value.charAt(i);\n if (!Character.isDigit(c)) {\n status = false;\n break;\n }\n }\n\n return status;\n }", "public static boolean isNumber(String string) {\n if (string == null || string.isEmpty()) {\n return false;\n }\n int i = 0;\n if (string.charAt(0) == '-') {\n if (string.length() > 1) {\n i++;\n } else {\n return false;\n }\n }\n for (; i < string.length(); i++) {\n if (!Character.isDigit(string.charAt(i))) {\n return false;\n }\n }\n return true;\n}", "private static boolean areNumbers(String s) {\n boolean isADigit = false;//only changed once everything has been checked\n //checks if places 0-2 are numbers and 3 is a \"-\"\n for(int i = 0; i < 3; i++) {\n if(Character.isDigit(s.charAt(i)) && s.charAt(3) == '-') {\n isADigit = true;\n }\n }\n //checks if places 4-5 are numbers and 6 is a \"-\"\n for(int i = 4; i < 6; i++) {\n if(Character.isDigit(s.charAt(i)) && s.charAt(6) == '-') {\n isADigit = true;\n }\n }\n //checks if places 7-10 are numbers\n for(int i = 7; i < 11; i++) {\n if(Character.isDigit(s.charAt(i))) {\n isADigit = true;\n }\n }\n return isADigit;\n }", "public static Integer stringToInteger(String s) {\n\t Integer ret = null;\n\t if (!Controleur.isVide(s))\n\t try {\n ret = Integer.valueOf(s);\n } catch (NumberFormatException e) {\n }\n\t\treturn ret;\n\t}", "public boolean isNum(String cad){\n try{\n Integer.parseInt(cad);\n return true;\n }catch(NumberFormatException nfe){\n System.out.println(\"Solo se aceptan valores numericos\");\n return false;\n }\n }", "boolean isNumericPubmed(String id){\n\t\t \n\t\t try{\n\t\t\t Integer.parseInt(id);\n\t\t }catch (Exception e){\n\t\t\t return false;\n\t\t }\n\t\t return true;\n\t }", "public static boolean isNumber(String string) {\n\n\t\ttry {\n\t\t\tLong.parseLong(string);\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\n\t}", "public boolean isAnInt(char charac) {\r\n \treturn isAnInt(Character.toString(charac));\r\n }", "public static boolean tryParse(String str) { \n try { \n Integer.parseInt(str); \n return true;\n } catch (NumberFormatException ex) {\n return false; \n } catch (Exception ex) {\n\t logError(ex);\n\t return false;\n }\n }", "public static Integer scanInt() {\n\t\tboolean is_Nb = false; int i = 0;\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\ti = Integer.parseInt(scan.nextLine());\r\n\t\t\t\tis_Nb= true;\r\n\t\t\t}\r\n\t\t\tcatch(NumberFormatException e) {\r\n\t\t\t\tSystem.out.println(\"Enter a number\");\r\n\t\t\t}\r\n\t\t}while(!is_Nb);\r\n\t\treturn i;\r\n\t}", "public static boolean isNumeric(String input) {\n\t\ttry {\n\t\t\tInteger.parseInt(input);\n\t\t\treturn true;\n\t\t}\n\t\tcatch (NumberFormatException e) {\n\t\t\t// string is not numeric\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isNumber(String s)\r\n {\r\n if (s == null)\r\n {\r\n return false;\r\n }\r\n s = s.trim();\r\n ValidNumberStateMachine vnsm = new ValidNumberStateMachine(s);\r\n return vnsm.isValid();\r\n }", "public static boolean isNumeric(String cadena){ \r\n try {\r\n Integer.parseInt(cadena);\r\n return true;\r\n } catch (NumberFormatException e){\t\r\n System.out.println(e.getMessage());\r\n return false;\r\n }\r\n }", "public static boolean isNumeric(String str) {\n try {\n Integer d = Integer.parseInt(str);\n } catch (NumberFormatException nfe) {\n return false;\n }\n return true;\n }", "private static boolean isBadInput(String s) {\n\t\tString[] split = s.split(\"\\\\s+\");\n\t\tif (split.length != 3) {\n\t\t\tSystem.err.printf(\"Unknow length: %d\\n\", split.length);\n\t\t\treturn true;\n\t\t}\n\t\ttry {\n\t\t\tInteger.parseInt(split[0]);\n\t\t\tInteger.parseInt(split[2]);\n\t\t} catch (NumberFormatException e) {\n\t\t\tSystem.err.printf(\"Input numbers only.\\n\");\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (split[1].length() != 1) {\n\t\t\tSystem.err.printf(\"Operator should be one character.\\n\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}" ]
[ "0.81740564", "0.80344594", "0.7994365", "0.79831487", "0.7930398", "0.7921675", "0.78818434", "0.7881351", "0.78661335", "0.7858728", "0.7803188", "0.77927136", "0.77922577", "0.7791041", "0.7777181", "0.77453995", "0.7744273", "0.7717897", "0.77063745", "0.76930827", "0.76918066", "0.7677303", "0.76759624", "0.7672988", "0.76669616", "0.76622933", "0.7662147", "0.7622892", "0.7616924", "0.761584", "0.75818837", "0.75750864", "0.7571769", "0.7516549", "0.75146097", "0.7507164", "0.7506586", "0.75021994", "0.7477596", "0.7468025", "0.7457171", "0.7456698", "0.7426205", "0.7413017", "0.7408145", "0.7383932", "0.7366699", "0.7366329", "0.7337606", "0.7328099", "0.7324091", "0.73007894", "0.7276967", "0.725857", "0.7154206", "0.7124666", "0.7115106", "0.7068504", "0.70063907", "0.70046204", "0.69686705", "0.69189423", "0.69179183", "0.6873694", "0.6867933", "0.68604237", "0.68249625", "0.6795626", "0.67659426", "0.67196786", "0.67085123", "0.67025423", "0.6687336", "0.66640395", "0.66541785", "0.6652852", "0.6606993", "0.658293", "0.65826946", "0.6580481", "0.65575117", "0.6530958", "0.6515457", "0.6503532", "0.6466361", "0.6441838", "0.6433666", "0.6429402", "0.641186", "0.6399945", "0.63930255", "0.63885605", "0.6381561", "0.6381314", "0.6374835", "0.63581234", "0.63463736", "0.6345284", "0.6338832", "0.63373554" ]
0.6396461
90
/ getter and setter
public List<Instruction> predessor() { return predessor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "protected abstract Set method_1559();", "@Override\n public void get() {}", "String setValue();", "@Override\n String get();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "public String get();", "public Object get()\n {\n return m_internalValue;\n }", "public abstract String get();", "public void setdat()\n {\n }", "public void get() {\n }", "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "public String getValue() {\n/* 99 */ return this.value;\n/* */ }", "public byte[] get(){\n return this.value;\n }", "public int\t\tget() { return value; }", "public Object getValue(){\n \treturn this.value;\n }", "public Object getValue() { return _value; }", "@Override\n\tpublic void getData() {\n\t\t\n\t}", "public String get()\n {\n return this.string;\n }", "public int getValue() {\n/* 450 */ return this.value;\n/* */ }", "public V get() {\n return value;\n }", "@Override\n public Object getValue()\n {\n return value;\n }", "public Object getValue() { return this.value; }", "public int value() { \n return this.value; \n }", "public Object getValue()\n {\n\treturn value;\n }", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "private void assignment() {\n\n\t\t\t}", "@Override\r\n public Object getValue() {\r\n return value;\r\n }", "public String get() {\n return value;\n\t}", "public Object getNewValue()\n {\n return newValue;\n }", "@Override\r\n\tpublic String get() {\n\t\treturn null;\r\n\t}", "public int getAge() {return age;}", "@Override\n\n // <editor-fold defaultstate=\"collapsed\" desc=\" UML Marker \"> \n // #[regen=yes,id=DCE.E1700BD9-298C-DA86-4BFF-194B41A6CF5E]\n // </editor-fold> \n protected String getProperties() {\n\n return \"Size = \" + size + \", Index = \" + value;\n\n }", "@Override\r\n\t\t\tpublic Object getValue() {\n\t\t\t\treturn null;\r\n\t\t\t}", "private void setData() {\n\n }", "public int getlife(){\r\n return life;\r\n}", "@Override\n\tpublic String get() {\n\t\treturn null;\n\t}", "public int getSet() {\n return set;\n }", "public void setAge(int age) { this.age = age; }", "public String getValor()\n/* 17: */ {\n/* 18:27 */ return this.valor;\n/* 19: */ }", "public Value getValue(){\n return this.value;\n }", "@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}", "@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}", "public int get () { return rating; }", "private ReadProperty()\r\n {\r\n\r\n }", "public S getValue() { return value; }", "String get();", "String get();", "public int getArmadura(){return armadura;}", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "public String get() {\n return this.value;\n }", "public int getAge(){\n return age;\n }", "@Override\n\tpublic void setData() {\n\n\t}", "public java.lang.String getNewProperty_description(){\n return localNewProperty_description;\n }", "String getValue() {\n return mValue;\n }", "@Override\n \tpublic IValue getValue() {\n \t\treturn this;\n \t}", "public int getNewProperty_descriptionType(){\n return localNewProperty_descriptionType;\n }", "public int getOldProperty_descriptionType(){\n return localOldProperty_descriptionType;\n }", "@Override\n public int get()\n { \n return this.pr;\n }", "@Override\n\tpublic void initValue() {\n\t\t\n\t}", "boolean get();", "protected Object doGetValue() {\n\t\treturn value;\n\t}", "V getValue() {\n return value;\n }", "@Override\n\tpublic void setValue(Object value) {\n\t\t\n\t}", "public int getNumber(){return number;}", "@Override\n\tprotected void getDataFromUCF() {\n\n\t}", "@Override\n\t\tpublic V getValue(){\n\t\t\treturn value;\n\t\t}", "String getName(){return this.name;}", "public abstract Object getValue();", "public abstract Object getValue();", "public abstract Object getValue();", "public void setPrice(double price){this.price=price;}", "@Override\n //Method for getting output from String declaration\n //First set of accessor/mutator that returns value as String\n public String toString(){\n return \"[\"+name+\",\"+type+\",\"+value+\"]\";\n }", "public int getAge()\r\n {\r\n return age;\r\n }", "public Empleado getEmpleado()\r\n/* 183: */ {\r\n/* 184:337 */ return this.empleado;\r\n/* 185: */ }", "public String getName () { return this.name; }", "public int getValue() \n {\n return value;\n }", "public double getWage(){\r\n return wage; \r\n }", "public int getSpeed(){return this.speed;}", "public Book getBook() \t\t{ return this.myBook; }", "@Override\n protected void getExras() {\n }", "public String get()\n {\n return val;\n }", "@Override\npublic void setAttributes() {\n\t\n}", "public void setM_Locator_ID (int M_Locator_ID)\n{\nset_Value (\"M_Locator_ID\", new Integer(M_Locator_ID));\n}", "public int getValue(){\n return this.value;\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "public String getNombre()\r\n/* 113: */ {\r\n/* 114:204 */ return this.nombre;\r\n/* 115: */ }", "public java.lang.String getOldProperty_description(){\n return localOldProperty_description;\n }", "private PropertyAccess() {\n\t\tsuper();\n\t}", "public Empresa getEmpresa()\r\n/* 84: */ {\r\n/* 85:131 */ return this.empresa;\r\n/* 86: */ }", "public Address getAddress() { return address; }", "public String getNombre()\r\n/* 60: */ {\r\n/* 61: 67 */ return this.nombre;\r\n/* 62: */ }", "public int getDef(){\r\n return def;\r\n }", "public String getNombre()\r\n/* 17: */ {\r\n/* 18:41 */ return this.nombre;\r\n/* 19: */ }", "@Override\n\t\tpublic void set(E arg0) {\n\t\t\t\n\t\t}", "public Object get() {\r\n\treturn bgclip;\r\n }", "public Student getStudent() { return student; }", "public void setValor(String valor)\n/* 22: */ {\n/* 23:34 */ this.valor = valor;\n/* 24: */ }" ]
[ "0.6714183", "0.6686965", "0.66844755", "0.6438079", "0.6408659", "0.63469344", "0.63125515", "0.6275929", "0.6249502", "0.6237673", "0.623528", "0.6197601", "0.61730593", "0.61730593", "0.6136286", "0.61304575", "0.61303455", "0.6099467", "0.6098043", "0.6074646", "0.6064347", "0.60383946", "0.60334873", "0.5996191", "0.5989969", "0.59869355", "0.59698707", "0.5967329", "0.59509236", "0.5946168", "0.59429985", "0.59359455", "0.59353334", "0.5930592", "0.592774", "0.58760154", "0.58743227", "0.5859171", "0.5856277", "0.58556896", "0.5851623", "0.5846789", "0.58337486", "0.58289343", "0.58289343", "0.5825856", "0.5825485", "0.5813995", "0.5810663", "0.5810663", "0.58055234", "0.5803469", "0.5803469", "0.580198", "0.5801886", "0.579591", "0.5793714", "0.5788421", "0.5769653", "0.57695985", "0.5756612", "0.5756422", "0.5755468", "0.5755048", "0.57487184", "0.57403874", "0.57402706", "0.57366824", "0.57345885", "0.57331276", "0.5732335", "0.57239085", "0.57239085", "0.57239085", "0.57207423", "0.571529", "0.5708432", "0.57045466", "0.57009196", "0.56950736", "0.5691825", "0.5690756", "0.5688887", "0.568449", "0.56843585", "0.56765354", "0.56754345", "0.5675275", "0.56720555", "0.566957", "0.56683177", "0.5668186", "0.56655633", "0.5662772", "0.5657649", "0.56485575", "0.5647132", "0.5644162", "0.5639452", "0.56346446", "0.5631265" ]
0.0
-1
Performs reverse engineering of the DB using internal DbLoader. This method should be invoked outside EventDispatchThread, or it will throw an exception.
public void execute() { stoppingReverseEngineering = false; // load schemas... LongRunningTask loadSchemasTask = new LoadSchemasTask(Application .getFrame(), "Loading Schemas"); loadSchemasTask.startAndWait(); if (stoppingReverseEngineering) { return; } final DbLoaderOptionsDialog dialog = new DbLoaderOptionsDialog( schemas, dbUserName, false); try { // since we are not inside EventDisptahcer Thread, must run it via // SwingUtilities SwingUtilities.invokeAndWait(new Runnable() { public void run() { dialog.show(); dialog.dispose(); } }); } catch (Throwable th) { processException(th, "Error Reengineering Database"); return; } if (dialog.getChoice() == DbLoaderOptionsDialog.CANCEL) { return; } this.schemaName = dialog.getSelectedSchema(); this.tableNamePattern = dialog.getTableNamePattern(); this.loadProcedures = dialog.isLoadingProcedures(); this.procedureNamePattern = dialog.getProcedureNamePattern(); // load DataMap... LongRunningTask loadDataMapTask = new LoadDataMapTask(Application .getFrame(), "Reengineering DB"); loadDataMapTask.startAndWait(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void loadFromDatabase();", "public static void loadDB() throws Exception {\n\t\t// Remove previously loaded data\n\t\tcolToData.clear();\n\t\t// Load dictionary from disk\n\t\tloadDictionary();\n\t\t// Collect columns to load in parallel\n\t\tList<ColumnRef> colsToLoad = new ArrayList<ColumnRef>();\n\t\tfor (TableInfo table : CatalogManager.currentDB.nameToTable.values()) {\n\t\t\tString tableName = table.name;\n\t\t\tfor (ColumnInfo column : table.nameToCol.values()) {\n\t\t\t\tString columnName = column.name;\n\t\t\t\tcolsToLoad.add(new ColumnRef(tableName, columnName));\n\t\t\t}\n\t\t}\n\t\t// Load columns\n\t\tcolsToLoad.stream().parallel().forEach((colRef) -> {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"Loading column \" + colRef.toString());\n\t\t\t\tloadColumn(colRef);\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.err.println(\"Error loading column \" + colRef.toString());\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t});\n\t\tSystem.out.println(\"Loaded database.\");\n\t}", "private void loadDatabase()\n\t{\n\t\ttry\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Check to make sure the Bmod Database is there, if not, try \n\t\t\t\t// downloading from the website.\n\t\t\t\tif(!Files.exists(m_databaseFile))\n\t\t\t\t{\n\t\t\t\t\tFiles.createDirectories(m_databaseFile.getParent());\n\t\t\t\t\n\t\t\t\t\tbyte[] file = ExtensionPoints.readURLAsBytes(\"http://\" + Constants.API_HOST + HSQL_DATABASE_PATH);\n\t\t\t\t\tif(file.length != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tFiles.deleteIfExists(m_databaseFile);\n\t\t\t\t\t\tFiles.write(m_databaseFile, file, StandardOpenOption.CREATE, StandardOpenOption.WRITE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// make sure we have the proper scriptformat.\n\t\t\t\tsetScriptFormatCorrectly();\n\t\t\t}catch(NullPointerException|IOException ex)\n\t\t\t{\n\t\t\t\tm_logger.error(\"Could not fetch database from web.\", ex);\n\t\t\t}\n\t\t\t\n\t\n\t\t\t\n\t\t\tClass.forName(\"org.hsqldb.jdbcDriver\");\n\t\t\n\t\t\t\n\t\t\tString db = ExtensionPoints.getBmodDirectory(\"database\").toUri().getPath();\n\t\t\tconnection = DriverManager.getConnection(\"jdbc:hsqldb:file:\" + db, \"sa\", \"\");\n\t\t\t\n\t\t\t// Setup Connection\n\t\t\tCSVRecordLoader ldr = new CSVRecordLoader();\n\t\t\n\t\t\t// Load all of the building independent plugins\n\t\t\tfor(Record<?> cp : ldr.getRecordPluginManagers())\n\t\t\t{\n\t\t\t\tm_logger.debug(\"Creating table: \" + cp.getTableName());\n\t\t\t\t// Create a new table\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tgetPreparedStatement(cp.getSQLTableDefn()).execute();\n\t\t\t\t} catch(SQLException ex)\n\t\t\t\t{\n\t\t\t\t\t// Table exists\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tm_logger.debug(\"Doing index:\" + cp.getIndexDefn());\n\t\t\t\t\tif(cp.getIndexDefn() != null)\n\t\t\t\t\t\tgetPreparedStatement(cp.getIndexDefn()).execute();\n\t\t\t\t}catch(SQLException ex)\n\t\t\t\t{\t// index exists\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t} catch (Exception ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t\tif(ex instanceof DatabaseIntegrityException)\n\t\t\t\tDatabase.handleCriticalError((DatabaseIntegrityException)ex);\n\t\t\telse\n\t\t\t\tDatabase.handleCriticalError(new DatabaseIntegrityException(ex));\n\t\t}\n\t\t\n\t}", "public void restoreFromDatabase() throws InitException {\r\n \t\r\n \tlong id = 0L;\r\n \twhile(true) {\r\n\t \tList<ServerJobInstanceMapping> mappingList = null;\r\n\t \ttry {\r\n\t\t\t\tmappingList = serverJobInstanceMappingAccess.loadByServer(serverConfig.getLocalAddress(), id);\r\n\t\t\t} catch (Throwable e) {\r\n\t\t\t\tthrow new InitException(\"[LivingTaskManager]: restoreFromDatabase error, localAddress:\" + serverConfig.getLocalAddress(), e);\r\n\t\t\t}\r\n\t \t\r\n\t \tif(CollectionUtils.isEmpty(mappingList)) {\r\n\t \t\tlogger.warn(\"[LivingTaskManager]: restoreFromDatabase mappingList is empty\");\r\n\t \t\treturn ;\r\n\t \t}\r\n\t \t\r\n\t \tid = ListUtil.acquireLastObject(mappingList).getId();\r\n\t \t\r\n\t \tinitAddJobInstance4IdMap(mappingList);\r\n \t}\r\n }", "private void updateDB() {\n }", "@Override\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void start() {\n\t\tinitLogger();\n\n\t\tif (!databaseEnabled) {\n\t\t\tlog.info(\"DB not enabled.\");\n\t\t\treturn;\n\t\t}\n\n\t\tlog.info(\"DB start ----------\");\n\n\t\tfinal PetiteContainer petiteContainer = joyPetiteSupplier.get().getPetiteContainer();\n\n\t\t// connection pool\n\t\tconnectionProvider = createConnectionProviderIfNotSupplied();\n\n\t\tpetiteContainer.addBean(beanNamePrefix() + \"pool\", connectionProvider);\n\n\t\tif (connectionProvider instanceof CoreConnectionPool) {\n\t\t\tfinal CoreConnectionPool pool = (CoreConnectionPool) connectionProvider;\n\t\t\tif (pool.getDriver() == null) {\n\t\t\t\tdatabaseEnabled = false;\n\t\t\t\tlog.warn(\"DB configuration not set (\" + beanNamePrefix() + \"pool.*). DB will be disabled.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tconnectionProvider.init();\n\n\t\tcheckConnectionProvider();\n\n\t\t// transactions manager\n\t\tjtxManager = createJtxTransactionManager(connectionProvider);\n\t\tjtxManager.setValidateExistingTransaction(true);\n\n\t\tfinal AnnotationTxAdviceManager annTxAdviceManager = new AnnotationTxAdviceManager(new LeanJtxWorker(jtxManager), jtxScopePattern);\n\t\tAnnotationTxAdviceSupport.manager = annTxAdviceManager;\n\n\t\t// create proxy\n\t\tjoyProxettaSupplier.get().getProxetta().withAspect(createTxProxyAspects(annTxAdviceManager.getAnnotations()));\n\n\t\tfinal DbSessionProvider sessionProvider = new DbJtxSessionProvider(jtxManager);\n\n\t\t// querymap\n\t\tfinal long startTime = System.currentTimeMillis();\n\n\t\tfinal QueryMap queryMap = new DbPropsQueryMap();\n\n\t\tlog.debug(\"Queries loaded in \" + (System.currentTimeMillis() - startTime) + \"ms.\");\n\t\tlog.debug(\"Total queries: \" + queryMap.size());\n\n\t\t// dboom\n\t\tdbOom = DbOom.create()\n\t\t\t.withConnectionProvider(connectionProvider)\n\t\t\t.withSessionProvider(sessionProvider)\n\t\t\t.withQueryMap(queryMap)\n\t\t\t.get();\n\n\t\tdbOom.connect();\n\n\t\tfinal DbEntityManager dbEntityManager = dbOom.entityManager();\n\t\tdbEntityManager.reset();\n\n\t\tpetiteContainer.addBean(beanNamePrefix() + \"query\", dbOom.queryConfig());\n\t\tpetiteContainer.addBean(beanNamePrefix() + \"oom\", dbOom.config());\n\n\t\t// automatic configuration\n\t\tif (autoConfiguration) {\n\t\t\tfinal AutomagicDbOomConfigurator automagicDbOomConfigurator =\n\t\t\t\tnew AutomagicDbOomConfigurator(dbEntityManager, true);\n\n\t\t\tautomagicDbOomConfigurator.configure();\n\t\t}\n\n\t\tdbEntityManagerConsumers.accept(dbEntityManager);\n\n\t\tlog.info(\"DB OK!\");\n\t}", "private void loadStateDatabase() {\n new Thread( new Runnable() {\n public void run() {\n try {\n loadStates();\n } catch ( final IOException e ) {\n throw new RuntimeException( e );\n }\n }\n }).start();\n }", "private void loadDatabase() {\n Runnable load = new Runnable() {\n public void run() {\n try {\n boolean isSuccess = false;\n File data = Environment.getDataDirectory();\n\n String currentDbPath = \"//data//com.udacity.adcs.app.goodintents//databases//goodintents.db\";\n\n File currentDb = new File(data, currentDbPath);\n File restoreDb = getFileFromAsset(mActivity, mActivity.getExternalFilesDir(null) + \"/\", \"goodintents.db\");\n\n if (restoreDb != null ? restoreDb.exists() : false) {\n FileInputStream is = new FileInputStream(restoreDb);\n FileOutputStream os = new FileOutputStream(currentDb);\n\n FileChannel src = is.getChannel();\n FileChannel dst = os.getChannel();\n dst.transferFrom(src, 0, src.size());\n\n is.close();\n os.close();\n src.close();\n dst.close();\n isSuccess = true;\n }\n\n if (isSuccess) {\n PreferencesUtils.setBoolean(mActivity, R.string.initial_db_load_key, true);\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n } finally {\n mActivity.runOnUiThread(loadDatabaseRunnable);\n }\n }\n };\n\n Thread thread = new Thread(null, load, \"loadDatabase\");\n thread.start();\n }", "private void ucitajDrajver()throws Exception{\r\n db.loadDriver();\r\n }", "private void load() throws DAOSysException\t\t{\n\t\tif (_debug) System.out.println(\"AL:load()\");\n\t\tAnnualLeaseDAO dao = null;\n\t\ttry\t{\n\t\t\tdao = getDAO();\n\t\t\tsetModel((AnnualLeaseModel)dao.dbLoad(getPrimaryKey()));\n\n\t\t} catch (Exception ex)\t{\n\t\t\tthrow new DAOSysException(ex.getMessage());\n\t\t}\n\t}", "private static void initializeDatabase() {\n\t\tArrayList<String> data = DatabaseHandler.readDatabase(DATABASE_NAME);\n\t\tAbstractSerializer serializer = new CineplexSerializer();\n\t\trecords = serializer.deserialize(data);\n\t}", "public abstract ODatabaseInternal<?> openDatabase();", "@Override\n public void onDbStarted() {\n }", "protected void relocateDatabaseIfNeeded() {\n File databaseDir = new File(config.dataDir(), Constants.DATABASE_DIR);\n File blocksDir = new File(databaseDir, \"block\");\n\n if (blocksDir.exists()) {\n LeveldbDatabase db = new LeveldbDatabase(blocksDir);\n byte[] header = db.get(Bytes.merge((byte) 0x00, Bytes.of(0L)));\n db.close();\n\n if (header == null || header.length < 33) {\n logger.info(\"Unable to decode genesis header. Quit relocating\");\n } else {\n String hash = Hex.encode(Arrays.copyOfRange(header, 1, 33));\n switch (hash) {\n case \"1d4fb49444a5a14dbe68f5f6109808c68e517b893c1e9bbffce9d199b5037c8e\":\n moveDatabase(databaseDir, config.databaseDir(Network.MAINNET));\n break;\n case \"abfe38563bed10ec431a4a9ad344a212ef62f6244c15795324cc06c2e8fa0f8d\":\n moveDatabase(databaseDir, config.databaseDir(Network.TESTNET));\n break;\n default:\n logger.info(\"Unable to recognize genesis hash. Quit relocating\");\n }\n }\n }\n }", "public static MainDatabase deserializeDatabase() {\n MainDatabase data = new MainDatabase();\n // first check if the file exists\n File file = new File(Constants.SAVE_FILE);\n if (!file.exists()) {\n return data;\n }\n try (FileInputStream in = new FileInputStream(Constants.SAVE_FILE);\n BufferedInputStream reader = new BufferedInputStream(in)) {\n\n // un-encrypted header (salt and iv necessary for decryption)\n byte[] salt = new byte[reader.read()];\n reader.read(salt);\n byte[] iv = new byte[reader.read()];\n reader.read(iv);\n Cipher enc = getEncryptionCipher(salt, iv);\n\n try (CipherInputStream cis = new CipherInputStream(reader, enc);\n ObjectInputStream ois = new ObjectInputStream(cis)) {\n\n // if we need any settings, read them here\n\n // read the travel database\n int count = ois.readByte();\n for (int i = 0; i < count; i++) {\n int size = ois.readInt();\n for (int j = 0; j < size; j++) {\n data.addTravel((SingleTravel) ois.readObject());\n }\n }\n\n // read the user database\n count = ois.readInt();\n for (int i = 0; i < count; i++) {\n RegisteredUser ru = (RegisteredUser) ois.readObject();\n data.addUser(ru);\n\n int size = ois.readInt();\n for (int j = 0; j < size; j++) {\n int itSize = ois.readInt();\n // check the itinerary to make sure it is still valid\n boolean validItinerary = (itSize > 0);\n Itinerary it = new Itinerary();\n for (int k = 0; k < itSize; k++) {\n try {\n SingleTravel st = data.getTravel(TravelType.values()[ois.readByte()],\n ois.readUTF());\n if (st == null) { // doesn't exist; do not add itinerary\n validItinerary = false;\n } else {\n it.add(st);\n }\n } catch (IllegalArgumentException e) {\n validItinerary = false;\n // we don't need to log this -- probably a travel expired\n }\n }\n if (validItinerary) {\n ru.bookItinerary(it);\n }\n }\n }\n }\n } catch (IOException | GeneralSecurityException | ClassNotFoundException e) {\n log.log(Level.SEVERE, \"Error reading from file.\", e);\n }\n return data;\n }", "private void updateDatabase() {\n\t\tAbstractSerializer serializer = new CineplexSerializer();\n\t\tArrayList<String> updatedRecords = serializer.serialize(records);\n\t\tDatabaseHandler.writeToDatabase(DATABASE_NAME, updatedRecords);\n\t}", "private void preloadDb() {\n String[] branches = getResources().getStringArray(R.array.branches);\n //Insertion from xml\n for (String b : branches)\n {\n dataSource.getTherapyBranchTable().insertTherapyBranch(b);\n }\n String[] illnesses = getResources().getStringArray(R.array.illnesses);\n for (String i : illnesses)\n {\n dataSource.getIllnessTable().insertIllness(i);\n }\n String[] drugs = getResources().getStringArray(R.array.drugs);\n for (String d : drugs)\n {\n dataSource.getDrugTable().insertDrug(d);\n }\n }", "public abstract void updateDatabase();", "@Override\n public void reDownloadDB(String newVersion)\n {\n }", "private void getDatabase(){\n\n }", "@Override\n public void updateDatabase() {\n }", "private DatabaseContext() {\r\n datastore = createDatastore();\r\n init();\r\n }", "public void refreshData(){ \n \t\tif(!mIsFirstRun){\n \t if(mDb == null) mDb = new Sqlite(this.getContext());\n \t if(!mDb.isOpen()) mDb.openRead();\n \t \n \t\t\tgetLoaderManager().restartLoader(0,null,this);\n \t\t}else mIsFirstRun = false;\n \t}", "private void setupDBs()\n {\n\t mSetupDBTask = new SetupDBTask(this);\n\t\tmSetupDBTask.execute((Void[])null);\n }", "protected void configureEmbeddedDB() {\n final EmbeddedDBProvider embeddedDBProvider = new EmbeddedDBProvider(daoConfig);\n embeddedDB = embeddedDBProvider.get();\n bind(EmbeddedDB.class).toInstance(embeddedDB);\n }", "public void initFromDb() {\n // Get load list of symbols to query\n new AsyncTask<ContentResolver, Void, Void>() {\n @Override\n protected Void doInBackground(ContentResolver... params) {\n Cursor cursor = null;\n try {\n ContentResolver cr = params[0];\n int shownPositionBookmark = Utility.getShownPositionBookmark(cr);\n\n // Query db for data up to the list position bookmark;\n cursor = cr.query(\n StockEntry.CONTENT_URI,\n ListManipulator.STOCK_PROJECTION,\n StockProvider.LIST_POSITION_SELECTION,\n new String[]{Integer.toString(shownPositionBookmark)},\n StockProvider.ORDER_BY_LIST_POSITION_ASC_ID_DESC);\n\n // Extract StockChange data from cursor\n if (cursor != null) {\n int cursorCount = cursor.getCount();\n if (cursorCount > 0) {\n mListManipulator.setShownListCursor(cursor);\n mListManipulator.setLoadList(getLoadListFromDb(cr));\n mListManipulator.addToLoadListPositionBookmark(cursorCount);\n }\n }\n } finally {\n if (cursor != null) {\n cursor.close();\n }\n }\n return null;\n }\n\n @Override\n protected void onPostExecute(Void aVoid) {\n ListEventQueue.getInstance().post(new InitLoadFromDbFinishedEvent(\n MyApplication.getInstance().getSessionId()));\n }\n }.execute(getActivity().getContentResolver());\n }", "public final void load( ) throws Exception\n\t{\n\t\tDatastore.getInstance( ).loadFromServer( this, this.getHref( ) );\n\t}", "public void updateDatabase()\n\t{\n\t\tCSVRecordLoader ldr = new CSVRecordLoader();\n\t\tfor(Record<?> cr : ldr.getRecordPluginManagers())\n\t\t{\n\t\t\tcr.updateTable();\n\t\t}\n\t}", "void flushDB();", "private static void deploy(SQLiteDatabase sqlLiteDb, InputStreamReader dbReader) throws IOException {\n String sqlLine = null;\n StringBuffer sqlBuffer = new StringBuffer();\n BufferedReader bufferedReader = new BufferedReader(dbReader);\n\n sqlLiteDb.beginTransaction();\n try {\n while ((sqlLine = bufferedReader.readLine()) != null) {\n String sql = sqlLine.trim();\n if (!isIgnoreSQL(sql)) {\n if (sql.endsWith(\";\")) {\n sqlBuffer.append(sql);\n String execSQL = sqlBuffer.toString();\n Log.d(TAG, \"running sql=>\" + execSQL);\n sqlLiteDb.execSQL(execSQL);\n sqlBuffer.delete(0, sqlBuffer.length());\n } else {\n if (sqlBuffer.length() > 0) {\n sqlBuffer.append(' ');\n }\n sqlBuffer.append(sql);\n }\n }\n }\n sqlLiteDb.setTransactionSuccessful();\n } finally {\n sqlLiteDb.endTransaction();\n }\n }", "private void test() throws Exception {\r\n session.execute(new Set(Prop.SERIALIZE, true));\r\n // loop through all databases\r\n for(int d = 0; d < databases.size(); d++) {\r\n // open database and loop through all queries\r\n session.execute(new Open(databases.get(d)));\r\n for(int q = 0; q < queries.size(); q++) {\r\n results[q] = addSortedServer(results[q], query(d, q));\r\n }\r\n session.execute(new Close());\r\n }\r\n }", "DatabaseController() {\n\n\t\tloadDriver();\n\t\tconnection = getConnection(connection);\n\t}", "Object getDB();", "@PostConstruct\r\n public void init() {\n File database = new File(applicationProps.getGeodb());\r\n try {\r\n reader = new DatabaseReader.Builder(database).withCache(new CHMCache()).build();\r\n } catch (IOException e) {\r\n log.error(\"Error reading maxmind DB, \", e);\r\n }\r\n }", "private DatabaseCustomAccess(Context context) {\n\t\thelper = new SpokaneValleyDatabaseHelper(context);\n\n\t\tsaveInitialPoolLocation(); // save initial pools into database\n\t\tsaveInitialTotalScore(); // create total score in database\n\t\tsaveInitialGameLocation(); // create game location for GPS checking\n\t\tLoadingDatabaseTotalScore();\n\t\tLoadingDatabaseScores();\n\t\tLoadingDatabaseGameLocation();\n\t}", "@Override\n public void onDatabaseLoaded() {}", "private void doUpgrade() {\n // implement the database upgrade here.\n }", "public void uptadeDB(){\n //mainDatabase.modifyStaff(this);\n }", "public AbysswalkerGame(DataBase db) { this.db = db; }", "public void initEDBConnection(String name) throws SQLException {\n String dbName = buildDBName(name);\n cache = new CacheManager<>(1024);\n File f = new File(dbName);\n\n if (!f.exists())\n createDB(dbName);\n else if(!f.isDirectory())\n createDB(dbName);\n else\n connectDB(dbName);\n\n refreshCurrentAccountId();\n refreshCurrentOperationId();\n }", "@Before\n public void setupDatabase() {\n graphDb = new TestGraphDatabaseFactory().newImpermanentDatabaseBuilder().newGraphDatabase();\n registerShutdownHook(graphDb);\n \n// server = new WrappingNeoServerBootstrapper((GraphDatabaseAPI) graphDb);\n// server.start();\n \n ProcessEngineConfiguration processEngineConfiguration = new ProcessEngineConfiguration();\n processEngineConfiguration.setGraphDatabaseService(graphDb);\n processEngine = processEngineConfiguration.buildProcessEngine();\n }", "private void initDB() {\n dataBaseHelper = new DataBaseHelper(this);\n }", "@Override\n\tpublic void initDemoDB() {\n\t}", "private void open()\n\t\t{\n\t\t\tconfig=Db4oEmbedded.newConfiguration();\n\t\t\tconfig.common().objectClass(Census.class).cascadeOnUpdate(true);\n\t\t\ttry\n\t\t\t{\n\t\t\t\t\n\t\t\t\tDB=Db4oEmbedded.openFile(config, PATH);\n\t\t\t\tSystem.out.println(\"[DB4O]Database was open\");\n\t\t\t\t\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"[DB4O]ERROR:Database could not be open\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "public interface DbLoader {\n\n /**\n * prepares the database\n */\n void prepareDatabase();\n}", "private DBMaster() {\r\n\t\t//The current address is localhost - needs to be changed at a later date\r\n\t\t_db = new GraphDatabaseFactory().newEmbeddedDatabase(\"\\\\etc\\\\neo4j\\\\default.graphdb\");\r\n\t\tregisterShutdownHook();\r\n\t}", "public static void initGenerateOfflineTestData(){\n dbInstance = Database.newInstance();\n initPlayer();\n initMatches();\n }", "private RefereesInLeagueDBAccess() {\n\n }", "private void openDatabase() {\r\n SearchHelper = new DBHelper(this);\r\n }", "private void setupDatabase() {\r\n\t\tDatabaseHelperFactory.init(this);\r\n\t\tdatabase = DatabaseHelperFactory.getInstance();\r\n\t}", "protected abstract ODatabaseInternal<?> newDatabase();", "public void load (Object o) \n throws NoPeerException, SQLException, NotFoundException\n {\n PersistentPeer peer = getPeer(o);\n peer.setPersistentEngine (this);\n peer.load (o);\n }", "public void migrateFromLegacyIfNeeded(android.database.sqlite.SQLiteDatabase r12) {\n /*\n r11 = this;\n android.content.Context r0 = r11.mContext\n android.content.SharedPreferences r0 = android.preference.PreferenceManager.getDefaultSharedPreferences(r0)\n java.lang.String r1 = \"legacy_data_migration\"\n r2 = 0\n boolean r3 = r0.getBoolean(r1, r2)\n if (r3 == 0) goto L_0x0015\n java.lang.String r11 = \"Data migration was complete already\"\n log(r11)\n return\n L_0x0015:\n r3 = 1\n android.content.Context r11 = r11.mContext // Catch:{ Exception -> 0x00d3 }\n android.content.ContentResolver r11 = r11.getContentResolver() // Catch:{ Exception -> 0x00d3 }\n java.lang.String r4 = \"cellbroadcast-legacy\"\n android.content.ContentProviderClient r11 = r11.acquireContentProviderClient(r4) // Catch:{ Exception -> 0x00d3 }\n if (r11 != 0) goto L_0x003a\n java.lang.String r12 = \"No legacy provider available for migration\"\n log(r12) // Catch:{ all -> 0x00c5 }\n if (r11 == 0) goto L_0x002e\n r11.close() // Catch:{ Exception -> 0x00d3 }\n L_0x002e:\n android.content.SharedPreferences$Editor r11 = r0.edit()\n android.content.SharedPreferences$Editor r11 = r11.putBoolean(r1, r3)\n r11.commit()\n return\n L_0x003a:\n r12.beginTransaction() // Catch:{ all -> 0x00c5 }\n java.lang.String r4 = \"Starting migration from legacy provider\"\n log(r4) // Catch:{ all -> 0x00c5 }\n android.net.Uri r6 = android.provider.Telephony.CellBroadcasts.AUTHORITY_LEGACY_URI // Catch:{ RemoteException -> 0x00ba }\n java.lang.String[] r7 = QUERY_COLUMNS // Catch:{ RemoteException -> 0x00ba }\n r8 = 0\n r9 = 0\n r10 = 0\n r5 = r11\n android.database.Cursor r4 = r5.query(r6, r7, r8, r9, r10) // Catch:{ RemoteException -> 0x00ba }\n android.content.ContentValues r5 = new android.content.ContentValues // Catch:{ all -> 0x00ac }\n r5.<init>() // Catch:{ all -> 0x00ac }\n L_0x0053:\n boolean r6 = r4.moveToNext() // Catch:{ all -> 0x00ac }\n if (r6 == 0) goto L_0x0096\n r5.clear() // Catch:{ all -> 0x00ac }\n java.lang.String[] r6 = QUERY_COLUMNS // Catch:{ all -> 0x00ac }\n int r7 = r6.length // Catch:{ all -> 0x00ac }\n r8 = r2\n L_0x0060:\n if (r8 >= r7) goto L_0x006a\n r9 = r6[r8] // Catch:{ all -> 0x00ac }\n copyFromCursorToContentValues(r9, r4, r5) // Catch:{ all -> 0x00ac }\n int r8 = r8 + 1\n goto L_0x0060\n L_0x006a:\n java.lang.String r6 = \"_id\"\n r5.remove(r6) // Catch:{ all -> 0x00ac }\n java.lang.String r6 = \"broadcasts\"\n r7 = 0\n long r6 = r12.insert(r6, r7, r5) // Catch:{ all -> 0x00ac }\n r8 = -1\n int r6 = (r6 > r8 ? 1 : (r6 == r8 ? 0 : -1))\n if (r6 != 0) goto L_0x0053\n java.lang.StringBuilder r6 = new java.lang.StringBuilder // Catch:{ all -> 0x00ac }\n r6.<init>() // Catch:{ all -> 0x00ac }\n java.lang.String r7 = \"Failed to insert \"\n r6.append(r7) // Catch:{ all -> 0x00ac }\n r6.append(r5) // Catch:{ all -> 0x00ac }\n java.lang.String r7 = \"; continuing\"\n r6.append(r7) // Catch:{ all -> 0x00ac }\n java.lang.String r6 = r6.toString() // Catch:{ all -> 0x00ac }\n loge(r6) // Catch:{ all -> 0x00ac }\n goto L_0x0053\n L_0x0096:\n r12.setTransactionSuccessful() // Catch:{ all -> 0x00ac }\n java.lang.String r2 = \"Finished migration from legacy provider\"\n log(r2) // Catch:{ all -> 0x00ac }\n if (r4 == 0) goto L_0x00a3\n r4.close() // Catch:{ RemoteException -> 0x00ba }\n L_0x00a3:\n r12.endTransaction() // Catch:{ all -> 0x00c5 }\n if (r11 == 0) goto L_0x00e8\n r11.close() // Catch:{ Exception -> 0x00d3 }\n goto L_0x00e8\n L_0x00ac:\n r2 = move-exception\n if (r4 == 0) goto L_0x00b7\n r4.close() // Catch:{ all -> 0x00b3 }\n goto L_0x00b7\n L_0x00b3:\n r4 = move-exception\n r2.addSuppressed(r4) // Catch:{ RemoteException -> 0x00ba }\n L_0x00b7:\n throw r2 // Catch:{ RemoteException -> 0x00ba }\n L_0x00b8:\n r2 = move-exception\n goto L_0x00c1\n L_0x00ba:\n r2 = move-exception\n java.lang.IllegalStateException r4 = new java.lang.IllegalStateException // Catch:{ all -> 0x00b8 }\n r4.<init>(r2) // Catch:{ all -> 0x00b8 }\n throw r4 // Catch:{ all -> 0x00b8 }\n L_0x00c1:\n r12.endTransaction() // Catch:{ all -> 0x00c5 }\n throw r2 // Catch:{ all -> 0x00c5 }\n L_0x00c5:\n r12 = move-exception\n if (r11 == 0) goto L_0x00d0\n r11.close() // Catch:{ all -> 0x00cc }\n goto L_0x00d0\n L_0x00cc:\n r11 = move-exception\n r12.addSuppressed(r11) // Catch:{ Exception -> 0x00d3 }\n L_0x00d0:\n throw r12 // Catch:{ Exception -> 0x00d3 }\n L_0x00d1:\n r11 = move-exception\n goto L_0x00f4\n L_0x00d3:\n r11 = move-exception\n java.lang.StringBuilder r12 = new java.lang.StringBuilder // Catch:{ all -> 0x00d1 }\n r12.<init>() // Catch:{ all -> 0x00d1 }\n java.lang.String r2 = \"Failed migration from legacy provider: \"\n r12.append(r2) // Catch:{ all -> 0x00d1 }\n r12.append(r11) // Catch:{ all -> 0x00d1 }\n java.lang.String r11 = r12.toString() // Catch:{ all -> 0x00d1 }\n loge(r11) // Catch:{ all -> 0x00d1 }\n L_0x00e8:\n android.content.SharedPreferences$Editor r11 = r0.edit()\n android.content.SharedPreferences$Editor r11 = r11.putBoolean(r1, r3)\n r11.commit()\n return\n L_0x00f4:\n android.content.SharedPreferences$Editor r12 = r0.edit()\n android.content.SharedPreferences$Editor r12 = r12.putBoolean(r1, r3)\n r12.commit()\n throw r11\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.cellbroadcastreceiver.CellBroadcastDatabaseHelper.migrateFromLegacyIfNeeded(android.database.sqlite.SQLiteDatabase):void\");\n }", "@Override\n\tpublic void doReload() throws BusinessException, Exception {\n\t\t\n\t}", "private void switchRelations() throws TransactionAbortedException, DbException {\n // IMPLEMENT ME\n }", "private ServerError updateDatabase() {\n return updateDatabase(WebConf.DB_CONN, WebConf.JSON_OBJECTS, WebConf.DEFAULT_VERSION);\r\n }", "private void loadFromDB() throws SQLException {\n\t\tif (rev_page != -1)\n\t\t\treturn;\n\t\t\n\t\tPreparedStatement stmt = dbc.prepareStatement(\n\t\t\t\t\"SELECT rev_page, rev_text_id, rev_timestamp, rev_comment, user_name \" +\n\t\t\t\t\"FROM revision, users WHERE rev_id = ? AND rev_user = user_id\");\n\t\tstmt.setInt(1, rev_id);\n\t\tstmt.execute();\n\n\t\tResultSet rs = stmt.getResultSet();\n\t\tif (!rs.next()) {\n\t\t\t/*\n\t\t\t * Shouldn't happen?\n\t\t\t */\n\t\t\tstmt.close();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\trev_page = rs.getInt(1);\n\t\trev_text_id = rs.getInt(2);\n\t\trev_timestamp = rs.getTimestamp(3);\n\t\trev_comment = rs.getString(4);\n\t\trev_user_text = rs.getString(5);\n\t\tstmt.close();\n\t}", "public void load() {\n mapdb_ = DBMaker.newFileDB(new File(\"AllPoems.db\"))\n .closeOnJvmShutdown()\n .encryptionEnable(\"password\")\n .make();\n\n // open existing an collection (or create new)\n poemIndexToPoemMap_ = mapdb_.getTreeMap(\"Poems\");\n \n constructPoems();\n }", "@Override\n\t\t\t\t\t\t\t\t\tpublic void downLoadBegin() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}", "private void loadDatabase(){\n \t\n String db = jFieldDBFile.getText().trim();\n boolean badzip = false;\n \n Collection<String> zf = new LinkedList<String>();\n \n // handle zipcodes if zip filtering specified\n if(jCheckBoxZipFilter.isSelected()){\n\t \n \tString zips = jTextFieldZipcodes.getText().trim();\n\t \n\t String[] z = zips.split(\",\");\n\t for(int i = 0; i < z.length; i++){\n\t \tzf.add(z[i].trim());\n\t }\n\t \n\t for(String s : zf){\n\t \tif(s.length() != 5){\n\t \t\tbadzip = true;\n\t \t}\n\t \ttry{\n\t \t\tInteger.parseInt(s);\n\t \t}catch(NumberFormatException ex){\n\t \t\tbadzip = true;\n\t \t}\n\t }\n\t \n }\n \n // if the zipcode input is bad\n if(badzip){\n \toutputResults(\"Please check your zipcodes.\\nA zipcode must be a 5 digit number...\\n\");\n \tjButtonDBLoad.setForeground(new java.awt.Color(255, 37, 37));\n \tjButtonDBLoad.setText(\"Check Zipcodes\");\n }else{\n\t // attempt to load database\n\t try{\n\t \t\n\t \tif(DEBUG_SETDB) db = DEBUG_DB;\n\t \t\n\t \tjButtonDBLoad.setForeground(Color.BLACK);\n\t \tjButtonDBLoad.setText(\"Loading...\");\n\t \tvirtualGPS = DirectionsFinder.getDirectionsFinder(db, zf);\n\t jButtonDBLoad.setText(\"Load Database\");\n\t \n\t \tjPanelAddr.setVisible(true);\n\t \tjPanelDB.setVisible(false);\n\t jButtonDBToAddr.setVisible(true);\n\t \t\n\t }catch(InvalidDatabaseException ex){\n\t \toutputResults(\"Please check the database path.\\nThe path name must refer \" +\n\t \t\t\t\"to a valid Tiger Database...\\n\");\n\t jButtonDBLoad.setForeground(new java.awt.Color(255, 37, 37));\n\t jButtonDBLoad.setText(\"Check Database\");\n\t }\n }\n \t\n }", "@Override \r\n protected Object determineCurrentLookupKey() {\n return DbContextHolder.getDbType(); \r\n }", "private void configureDB() {\n\t\tmDb = mDbHelper.getWritableDatabase();\n\t}", "public void loadFromDatabase(){\r\n /**\r\n * Open the file streams to the three files\r\n * Recover the state of data structures\r\n * Close the file streams\r\n */\r\n\r\n try{\r\n //Recover the state of unfinished set from unfinished.dat\r\n unfinishedFileInputStream = new FileInputStream(UNFINISHED_FILE_PATH);\r\n unfinishedSetInputStream = new ObjectInputStream(unfinishedFileInputStream);\r\n unfinished = (Set<Task>)unfinishedSetInputStream.readObject();\r\n unfinishedSetInputStream.close();\r\n unfinishedFileInputStream.close();\r\n\r\n //Recover the state of finished list from finished.dat\r\n finishedFileInputStream = new FileInputStream(FINISHED_FILE_PATH);\r\n finishedListInputStream = new ObjectInputStream(finishedFileInputStream);\r\n finished = (ArrayList<Task>)finishedListInputStream.readObject();\r\n finishedListInputStream.close();\r\n finishedFileInputStream.close();\r\n\r\n //Recover the state of activities list from activities.dat\r\n activitiesFileInputStream = new FileInputStream(ACTIVITIES_FILE_PATH);\r\n activitiesListInputStream = new ObjectInputStream(activitiesFileInputStream);\r\n activities = (ArrayList<Activity>)activitiesListInputStream.readObject();\r\n activitiesListInputStream.close();\r\n activitiesFileInputStream.close();\r\n\r\n generateWeeklySchedule();\r\n }\r\n catch(Exception e){\r\n System.out.println(e.getMessage());\r\n }\r\n }", "public void bootstrapDatabase() throws Exception {\n\n }", "private void FetchingData() {\n\t\t try { \n\t\t\t \n\t \tmyDbhelper.onCreateDataBase();\n\t \t \t\n\t \t\n\t \t} catch (IOException ioe) {\n\t \n\t \t\tthrow new Error(\"Unable to create database\");\n\t \n\t \t} \n\t \ttry {\n\t \n\t \t\tmyDbhelper.openDataBase();\n\t \t\tmydb = myDbhelper.getWritableDatabase();\n\t\t\tSystem.out.println(\"executed\");\n\t \t\n\t \t}catch(SQLException sqle){\n\t \n\t \t\tthrow sqle;\n\t \n\t \t}\n\t}", "public void initDatabase() throws SQLException {\n\n ModelFactory factory = new ModelFactory(this.connection);\n\n StopsDao stopsData = factory.getStopsDao();\n\n ArrayList<Stop> stops = stopsData.getStopsFromCsv(getResource(\"stops.csv\"));\n\n Iterator<Stop> it = stops.iterator();\n while(it.hasNext()) {\n Stop stop = it.next();\n System.out.println(stop.toString());\n }\n\n\n /*\n ShapesDao shapesData = factory.getShapesDao();\n\n ArrayList<Shape> shapes = shapesData.getShapesFromCsv(getResource(\"shapes.csv\"));\n\n Iterator<Shape> it = shapes.iterator();\n while(it.hasNext()) {\n Shape shape = it.next();\n System.out.println(shape.toString());\n }\n\n CalendarDateDao calendarData = factory.getCalendarDatesDao();\n\n ArrayList<CalendarDate> agencies = calendarData.getCalendarDatesFromCsv(getResource(\"calendar_dates.csv\"));\n\n Iterator<CalendarDate> it = agencies.iterator();\n while(it.hasNext()) {\n CalendarDate date = it.next();\n System.out.println(date.toString());\n }\n\n AgencyDao agencyData = factory.getAgencyDao();\n agencyData.drop();\n agencyData.create();\n\n ArrayList<Agency> agencies = agencyData.getAgenciesFromCsv(getResource(\"agency.csv\"));\n\n Iterator<Agency> it = agencies.iterator();\n while(it.hasNext()) {\n Agency age = it.next();\n System.out.println(age.toString());\n agencyData.saveAgency(age);\n }\n\n RoutesDao routesDao = factory.getRouteDao();\n routesDao.drop();\n routesDao.create();\n\n ArrayList<Route> routes = routesDao.getRoutesFromCsv(getResource(\"routes.csv\"));\n\n Iterator<Route> it = routes.iterator();\n while(it.hasNext()) {\n Route route = it.next();\n System.out.println(route.toString());\n }*/\n }", "private void doDBProcessing() throws InterruptedException {\n\t\tThread.sleep(5000);\r\n\t\t\r\n\t}", "public Database(Context context)\n\t{\n\t\t/* Instanciation de l'openHelper */\n\t\tDBOpenHelper helper = new DBOpenHelper(context);\n\t\t\n\t\t/* Load de la database */\n\t\t//TODO passer en asynchrone pour les perfs\n\t\tmainDatabase = helper.getWritableDatabase();\n\t\t\n\t\t/* DEBUG PRINT */\n\t\tLog.i(\"info\", \"Database Loading Suceeded\");\n\t}", "private void invertedToDatabase(){\r\n cleFreq = new HashMap<>();\r\n System.out.println(\"Strat collecting\");\r\n Map<String,List<Invertedindex>> collects = collecting();\r\n System.out.println(\"Ending collecting\");\r\n Database.getInstance().invertedIndex(collects);\r\n Database.getInstance().addPoids(cleFreq);\r\n }", "private void loadDataFromDatabase() {\n mSwipeRefreshLayout.setRefreshing(true);\n mPresenter.loadDataFromDatabase();\n }", "public void execute() {\n OBPropertiesProvider.setFriendlyWarnings(true);\n\n // Initialize DAL only in case it is needed: modules have refrence data to be loaded\n CPStandAlone pool = new CPStandAlone(propertiesFile);\n ApplyModuleData[] ds = null;\n try {\n if (!forceRefData) {\n ds = ApplyModuleData.selectClientReferenceModules(pool);\n } else {\n ds = ApplyModuleData.selectAllClientReferenceModules(pool);\n }\n } catch (Exception e) {\n log4j.error(\"Error checking modules with reference data\", e);\n }\n if (ds != null && ds.length > 0) {\n // Initialize DAL and execute\n super.execute();\n } else {\n try {\n if (!forceRefData) {\n ds = ApplyModuleData.selectTranslationModules(pool);\n } else {\n ds = ApplyModuleData.selectAllTranslationModules(pool);\n }\n } catch (Exception e) {\n log4j.error(\"Error checking modules with translation data\", e);\n }\n if (ds != null && ds.length > 0) {\n // Execute without DAL\n doExecute();\n }\n // do not execute if not reference data nor translations present\n }\n }", "public abstract void run(Context context) throws SQLException;", "@Before\n public void prepare() {\n MetaStore metadb = prepareTestDB();\n testObj = new SdbSchemeRewriter(metadb.getAllDBs().get(0));\n }", "@Override\n\t\tpublic void run() {\n\t\t\tif (runState != 0) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\trunState = 1;\n\t\t\t\tif (om == null) \n\t\t\t\t\tom = new OracleManager();\n\t\t\t\tResultSet rs = om.getTivoliData();\n\t\t\t\tif (rs == null) {\n\t\t\t\t\trunState = 0;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (sm == null)\n\t\t\t\t\tsm = new SybaseManager();\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tif(!sm.insertTivoliData(rs)) { //如果插入数据失败,直接返回,等待下次插入\n\t\t\t\t\t\trunState = 0;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//如果修改失败,直接返回,下次重新插入和修改\n\t\t\t\t\t\tif (!om.setTivoliData(rs.getString(\"I_ID\"))) {\n\t\t\t\t\t\t\trunState = 0;\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trunState = 0;\n\t\t\t}\n\t\t\tcatch (Exception ex) {\n\t\t\t\tlogger.error(\"执行错误:\" + ex.toString());\n\t\t\t\trunState = 0;\n\t\t\t}\n\t\t}", "@Override\r\n\tprotected void startUpEmbeddedDatabase(AppConfig config) throws WrappedDatabaseException {\n\t}", "public static void load() {\n for (DataSourceSwapper each : ServiceLoader.load(DataSourceSwapper.class)) {\n loadOneSwapper(each);\n }\n }", "public void run() throws Exception {\n try{\n dataService.getServiceBinding(key);\n logger.log(Level.INFO, \"[META SERVICE] got backend binding\");\n // does not need to be rebuilt\n rebuildDB = false;\n }\n catch(Exception e){\n // binding was not present. rebuild DB, set binding.\n logger.log(Level.INFO, \"[META SERVICE] did not get backend binding: \" + e);\n\n rebuildDB = true;\n }\n logger.log(Level.INFO, \"[META SERVICE] completed backend check\");\n }", "void start() throws PersistenceException;", "protected void open() throws TzException {\n synchronized (dbLock) {\n if (!isOpen()) {\n getDb();\n open = true;\n return;\n }\n }\n }", "private static void atualizarBD(){\n SchemaUpdate se = new SchemaUpdate(hibernateConfig);\n se.execute(true, true);\n }", "public interface DatabaseAPI {\n\n /**\n * Подключиться к базе данных.\n * Этот метод должен использоваться единожды и его результат нужно хранить, как зеницу ока.\n * @param host адрес\n * @param port порт\n * @param username имя пользователя\n * @param password пароль\n * @param databaseName имя базы данных\n * @param threads максимальное количество потоков, которое может использоваться для асинхронного доступа\n * к базе данных. Этот параметр может быть проигнорирован на серверах, где мы не предусматриваем\n * многопоточного доступа к базе данных.\n * Если не уверены, что сюда ставить, пишите двойку.\n * @return держатель подключения к базе данных.\n */\n DatabaseConnectionHolder getDatabaseConnection(String host, int port, String username, String password, String databaseName, int threads);\n\n}", "public void refreshDb() {\n Ion.with(mContext)\n .load(mGetUrl)\n .asJsonObject()\n .setCallback(new FutureCallback<JsonObject>() {\n @Override\n public void onCompleted(Exception e, JsonObject result) {\n try {\n // do stuff with the result or error\n DatabaseClient databaseClient = new DatabaseClient(mContext);\n /**\n * if the return jsonObject is null, then don't clear the table\n * */\n if (result != null) {\n databaseClient.clearTablePage(\"bookpage\");\n }\n\n JsonArray array = result.getAsJsonArray(\"books\");\n /**\n * put data into db\n * */\n ContentResolver contentResolver = mContext.getContentResolver();\n Uri uri = Uri.parse(\"content://com.example.root.libapp_v1.SQLiteModule.Bookpage.BookpageProvider/bookpage\");\n for (int i = 0; i < array.size(); i++) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(\"name\", array.get(i).getAsJsonObject().get(\"name\").getAsString());\n contentValues.put(\"detail_info\", array.get(i).getAsJsonObject().get(\"detail_info\").getAsString());\n contentValues.put(\"author_info\", array.get(i).getAsJsonObject().get(\"author_info\").getAsString());\n contentValues.put(\"unique_id\", array.get(i).getAsJsonObject().get(\"id\").getAsString());\n contentValues.put(\"catalog_info\", array.get(i).getAsJsonObject().get(\"catalog_info\").getAsString());\n contentValues.put(\"timestamp\", array.get(i).getAsJsonObject().get(\"timestamp\").getAsString());\n Uri tmp = contentResolver.insert(uri, contentValues);\n }\n initData(mView);\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n });\n }", "public void recreateAlternateIndexes()\n throws DBException\n {\n String utableName = this.getUntranslatedTableName();\n\n /* drop all alternate indexes */\n try {\n DBTableIndexMap indexMap = DBProvider.getActualTableIndexMap(utableName);\n if (indexMap != null) {\n Set<String> altIndexSet = indexMap.getAlternateIndexes();\n if (altIndexSet != null) {\n for (Iterator<String> i = altIndexSet.iterator(); i.hasNext();) {\n String indexName = i.next();\n try {\n DBProvider.removeAlternateIndex(utableName, indexName);\n Print.logInfo(\"Dropped alternate index '\"+indexName+\"' from table \"+utableName);\n } catch (Throwable th) {\n //Print.logWarn(\"Unable to delete alternate index '\"+indexName+\"' for table \"+TN);\n // ignore exception\n }\n }\n }\n }\n } catch (DBException dbe) {\n Print.logWarn(\"Unable to retrieve index information: \" + dbe.getMessage());\n }\n\n /* recreate alternate indexes */\n DBAlternateIndex altIndexes[] = this.getAlternateIndexes();\n if ((altIndexes != null) && (altIndexes.length > 0)) {\n // this table has alternate keys\n\n /* loop through alternate indexes */\n for (int i = 0; i < altIndexes.length; i++) {\n String indexName = altIndexes[i].getIndexName();\n \n /* drop existing alternate key */\n try {\n DBProvider.removeAlternateIndex(utableName, indexName);\n } catch (Throwable th) {\n // This exception is expected\n //Print.logWarn(\"Delete Alternate Index: '\"+indexName+\"' doesn't exist for table \" + TN);\n // ignore exception\n }\n\n /* rebuild alternate key */\n try {\n DBField indexFields[] = altIndexes[i].getFields();\n DBProvider.createAlternateIndex(utableName, altIndexes[i]);\n Print.logInfo(\"Created alternate index '\" + indexName + \"' for table \" + utableName);\n } catch (SQLException sqe) {\n throw new DBException(\"Alternate index create error\", sqe);\n }\n\n }\n\n } else {\n // this table does not have alternate keys\n\n /* drop default alternate key ('altIndex') */\n try {\n DBProvider.removeAlternateIndex(utableName, null);\n } catch (Throwable th) {\n // This exception is expected\n //Print.logWarn(\"Alternate key does not currently exist for table: \" + utableName);\n // ignore exception\n }\n \n }\n }", "public void postLoadProperties(){\n\ttry{\n\t \n\t switch (source){\n\t case \"heroku\":\n\t\tURL = new String(\"jdbc:postgresql://\" + host + \":\" + port + \"/\" + dbname + \"?sslmode=require&user=\" + user + \"&password=\" +password );\n\t\tbreak;\n\t case \"local\":\n\t\tURL = new String(\"jdbc:postgresql://\" + host + \"/\" + dbname);\n\t break;\n\t case \"elephantsql\":\n\t\n\t \tURL = new String(\"jdbc:postgresql://\" + host + \":\" + port + \"/\" + dbname + \"?user=\" + user + \"&password=\" +password + \"&SSL=true\" );\n\t\tbreak;\n\t}\n\t //\t LOGGER.info(\"URL: \" + URL);\n\n\tdbm = new DatabaseManager( this );\n\tif(authenticated){\n\t dbr = dbm.getDatabaseRetriever();\n\t dbi = dbm.getDatabaseInserter();\n\t dmf = new DialogMainFrame(this);\n\t}else{\n\t \tJOptionPane.showMessageDialog(null,\n\t\t\t \"Invalid username or password. Session terminated.\",\n\t\t\t\t \"Authentication Failure!\",\n\t\t\t JOptionPane.ERROR_MESSAGE);\n\t}\n\t}\n catch(SQLException sqle){\n\tLOGGER.info(\"SQL exception creating DatabaseManager: \" + sqle);\n }\n\t\n }", "private void initDb() {\n\t\tif (dbHelper == null) {\n\t\t\tdbHelper = new DatabaseOpenHelper(this);\n\t\t}\n\t\tif (dbAccess == null) {\n\t\t\tdbAccess = new DatabaseAccess(dbHelper.getWritableDatabase());\n\t\t}\n\t}", "private DbHandler()\n\t{\n\t\ttry\n\t\t{\n\t\t\t// Check if library exists\n\t\t\tClass.forName(DRIVER_CLASS);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tIO.dbOutF(\"Failed to load the SQLite JDBC Driver.\");\n\t\t}\n\t}", "@Override\r\n\tpublic void engine() {\n\t\t\r\n\t}", "@Test\n public void test() throws SQLException {\n System.out.println(new MyDbutilsDemo().load(12));\n }", "public int loadDatabase(){\n\n try {\n BufferedReader bufferedReader = new BufferedReader(new FileReader(databaseFileName));\n String line = bufferedReader.readLine();\n while (line != null) {\n HashMap<String,String> activityString = parseStatement(line);\n System.out.println(activityString);\n Activity activity = new Activity();\n activity.create(activityString);\n allActivities.add(activity);\n line = bufferedReader.readLine();\n\n }\n }\n catch(Exception e){\n System.out.println(e);\n return -1;\n }\n\n\n //TODO: write utility to load database, including loading csv hashes into activity classes. Activity class - > needs list of accepted attr?\n\n return 0;\n }", "protected void reActivateDatabase(boolean deleteDb, boolean useBatchInserter, boolean autoTx) throws Exception {\n shutdownDatabase(deleteDb);\n Map<String, String> config = NORMAL_CONFIG;\n String largeMode = System.getProperty(\"spatial.test.large\");\n if (largeMode != null && largeMode.equalsIgnoreCase(\"true\")) {\n config = LARGE_CONFIG;\n }\n //graphDb = new TestGraphDatabaseFactory().setFileSystem( fileSystem ).newImpermanentDatabase( getNeoPath().getAbsolutePath() );\n graphDb = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder(getNeoPath().getAbsolutePath()).setConfig( config ).newGraphDatabase();\n\n if (autoTx) {\n // with the batch inserter the tx is a dummy that simply succeeds all the time\n tx = graphDb.beginTx();\n }\n }", "public BLFacadeImplementation() {\t\t\r\n\t\tSystem.out.println(\"Creating BLFacadeImplementation instance\");\r\n\t\tConfigXML c=ConfigXML.getInstance();\r\n\t\t\r\n\t\tif (c.getDataBaseOpenMode().equals(\"initialize\")) {\r\n\t\t\tDataAccess dbManager=new DataAccess(c.getDataBaseOpenMode().equals(\"initialize\"));\r\n\t\t\tdbManager.initializeDB();\r\n\t\t\tdbManager.close();\r\n\t\t\t}\r\n\t\t\r\n\t}", "private void init() {\n DatabaseInitializer databaseInitializer = new DatabaseInitializer();\n try {\n for (int i = 0; i < DEFAULT_POOL_SIZE; i++) {\n ProxyConnection connection = new ProxyConnection(databaseInitializer.getConnection());\n connections.put(connection);\n }\n } catch (InterruptedException e) {\n logger.log(Level.ERROR, e);\n }\n }", "public void Initialize() throws DBException {\n // Divide jndi and url\n StringTokenizer st = new StringTokenizer(m_dbURL, \",\");\n m_jndiName \t= st.nextToken();\n m_dbURL \t= st.nextToken();\n \n if (m_jndiName != null) {\n try {\n Context ctx = new InitialContext();\n s_ds = (DataSource) ctx.lookup(m_jndiName); \n } catch (Exception e) {\n System.out.println(\"err\"+e);\n SystemLog.getInstance().getErrorLog().error(\"ERR,HSQLDBTomCTRL,getInit-JNDI,\" + e, e);\n }\n }\n\t \n\t\t//\t\tLoad class incase faliure\n\t\t try {\n\t\t\tClass.forName(\"org.hsqldb.jdbcDriver\");\t\t\t\n\t\t} catch (ClassNotFoundException e1) {\t\t\t\n\t\t\te1.printStackTrace();\n\t\t}\t\t\n\t}", "@Override\n\t\tpublic void open() throws DbException, TransactionAbortedException {\n\t\t\ttplItr = tpls.iterator();\n\t\t}", "@Override\r\n protected void openInternal(\r\n final Map<String, CassandraEmbDatabase> theDatabase) {\r\n // empty the table and query complete list of keyspaces from DB.\r\n theDatabase.clear();\r\n final List<KsDef> ksDefs;\r\n try {\r\n ksDefs = server.describe_keyspaces();\r\n for (final KsDef keyspaceDefinition : ksDefs) {\r\n final CassandraEmbDatabase db = new CassandraEmbDatabase(this,\r\n keyspaceDefinition);\r\n theDatabase.put(keyspaceDefinition.getName(), db);\r\n }\r\n } catch (final Exception e) {\r\n throw new DBException(\"Error Opening Database.\", e);\r\n }\r\n }", "@Override\n public void onCreate(@NonNull SupportSQLiteDatabase db) {\n super.onCreate(db);\n\n executors.getDiskIOExecutor().execute(new Runnable() {\n @Override\n public void run() {\n\n // Add a delay to simulate a long-running operation\n addDelay();\n\n AppDatabase appDatabase = AppDatabase.getInstance(appContext, executors);\n\n List<WeatherEntry> weathers = DataGenerator.generateWeathers();\n\n Log.d(TAG, \"Codelab AppDatabase insertAll - begin\");\n\n insertAll(appDatabase, weathers);\n\n // notify that the database was created and it's ready to be used\n appDatabase.setDatabaseCreated();\n }\n });\n }", "private DatabaseRepository() {\n try {\n // connect to database\n\n DB_URL = \"jdbc:sqlite:\"\n + this.getClass().getProtectionDomain()\n .getCodeSource()\n .getLocation()\n .toURI()\n .getPath().replaceAll(\"[/\\\\\\\\]\\\\w*\\\\.jar\", \"/\")\n + \"lib/GM-SIS.db\";\n connection = DriverManager.getConnection(DB_URL);\n mapper = ObjectRelationalMapper.getInstance();\n mapper.initialize(this);\n }\n catch (SQLException | URISyntaxException e) {\n System.out.println(e.toString());\n }\n }", "protected abstract DatabaseInitializer createInitializer();", "@Override\n public void run() {\n addDelay();\n\n AppDatabase appDatabase = AppDatabase.getInstance(appContext, executors);\n\n List<WeatherEntry> weathers = DataGenerator.generateWeathers();\n\n Log.d(TAG, \"Codelab AppDatabase insertAll - begin\");\n\n insertAll(appDatabase, weathers);\n\n // notify that the database was created and it's ready to be used\n appDatabase.setDatabaseCreated();\n }", "@Before\r\n public void initDb() throws Exception {\n mDatabase = Room.inMemoryDatabaseBuilder(ApplicationProvider.getApplicationContext(),\r\n MyDatabase.class)\r\n // allowing main thread queries, just for testing\r\n .allowMainThreadQueries()\r\n .build();\r\n\r\n mTemplateDao = mDatabase.templateDao();\r\n }" ]
[ "0.6040395", "0.60377675", "0.5808216", "0.5628488", "0.55944085", "0.53989077", "0.5358882", "0.53380483", "0.5337612", "0.5319238", "0.5298193", "0.5293002", "0.5277061", "0.52292156", "0.5202896", "0.51964986", "0.5176966", "0.5153284", "0.5116273", "0.51081437", "0.5098625", "0.5092098", "0.50883263", "0.50760597", "0.5049098", "0.5020556", "0.5019813", "0.50142556", "0.50111693", "0.50085", "0.49909344", "0.49896395", "0.49893263", "0.49658504", "0.49652973", "0.49640524", "0.49497914", "0.49468473", "0.49295738", "0.4894721", "0.48919088", "0.48897418", "0.48888454", "0.48760158", "0.4874429", "0.4869035", "0.48671922", "0.48509476", "0.4848808", "0.48457614", "0.48384896", "0.48335227", "0.48323122", "0.482374", "0.48225456", "0.48224905", "0.48125505", "0.48108724", "0.48080263", "0.4807583", "0.4791512", "0.4785285", "0.4752306", "0.47474837", "0.4747457", "0.47321498", "0.472838", "0.47278708", "0.4709548", "0.47048262", "0.4702304", "0.470182", "0.4691028", "0.4684982", "0.46797505", "0.4678469", "0.46762735", "0.46755457", "0.46731326", "0.46727794", "0.46727693", "0.46700692", "0.46696815", "0.46694836", "0.46631238", "0.46610638", "0.46572006", "0.4641831", "0.46403658", "0.46234924", "0.46222854", "0.46219257", "0.46150517", "0.46139717", "0.46099293", "0.4603855", "0.46006128", "0.46004894", "0.46004337", "0.46000957" ]
0.6091394
0
noop, deprecated in the interface
public void setSchema(DbEntity entity, String schema) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "default boolean isDeprecated() {\n return false;\n }", "@Deprecated\n\tprivate void oldCode()\n\t{\n\t}", "@Override\n public boolean getObsolete()\n {\n return false;\n }", "void unavailable();", "void unavailable();", "public void doNothing(){\n\t}", "private stendhal() {\n\t}", "@Deprecated\n public f a() {\n return null;\n }", "public void swrap() throws NoUnusedObjectExeption;", "public static void doNothing(){\n\t}", "public boolean isNoOp() {\n\t\treturn false;\n\t}", "public Unsafe method_4123() {\n return null;\n }", "public void nullstill();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private NativeSupport() {\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "default T handleNull() {\n throw new UnsupportedOperationException();\n }", "@Deprecated\n\tpublic static void cleanDefaults(){\n\t}", "@SuppressWarnings(\"deprecation\")\n @Override\n void setDefaults() {\n //Do nothing\n }", "public boolean method_218() {\r\n return false;\r\n }", "@Deprecated // use #maybeWarnOnOptions(ClientState) instead\n public void maybeWarnOnOptions()\n {\n }", "void setDeprecated(Operation operation, Method method);", "public void m23075a() {\n }", "@Override\n protected void prot() {\n }", "public final void mo51373a() {\n }", "public String method_211() {\r\n return null;\r\n }", "public boolean method_216() {\r\n return false;\r\n }", "Boolean getDeprecated();", "@Override\n public void visit(NoOpNode noOpNode) {\n }", "@Deprecated\npublic interface OrderCompanyJournalReadRpcService {\n\n\n}", "public final void mo91715d() {\n }", "public Fun_yet_extremely_useless()\n {\n\n }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public boolean method_4088() {\n return false;\n }", "String getDeprecated();", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "private Helper() {\r\n // do nothing\r\n }", "public ChannelFuture method_4120() {\n return null;\n }", "@Deprecated\n/* */ public void addAction(int action) {\n/* 330 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private Rekenhulp()\n\t{\n\t}", "public boolean method_2453() {\r\n return false;\r\n }", "public final java.lang.Void call() {\n /*\n // Method dump skipped, instructions count: 303\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.oculus.durableiap.DurableIAPStorage.AnonymousClass2.call():java.lang.Object\");\n }", "public boolean method_196() {\r\n return false;\r\n }", "@Override\r\n\t\tpublic void action()\r\n\t\t{\r\n// throw new UnsupportedOperationException(\"Not supported yet.\");\r\n\t\t}", "public ULocale getFallback() {\n/* 314 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "protected Doodler() {\n\t}", "@Override\n public void perish() {\n \n }", "public boolean method_210() {\r\n return false;\r\n }", "public final java.lang.Void call() {\n /*\n // Method dump skipped, instructions count: 303\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.oculus.durableiap.DurableIAPStorage.AnonymousClass2.call():java.lang.Object\");\n }", "private ExampleVersion() {\n throw new UnsupportedOperationException(\"Illegal constructor call.\");\n }", "public boolean method_214() {\r\n return false;\r\n }", "@Test\n public void testNoWarningOnDeprecatedPrototype() {\n testSame(\n \"/** @constructor */ var Foo = function() {};\"\n + \"/** @deprecated */ Foo.prototype = {};\"\n + \"Foo.prototype.bar = function() {};\");\n }", "private void habilitar() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "private void Nice(){\n }", "@Override\r\n\tpublic String swim() {\n\t\treturn null;\r\n\t}", "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}", "T noHook();", "@Override\r\npublic int method() {\n\treturn 0;\r\n}", "@Deprecated\n/* */ public void removeAction(int action) {\n/* 347 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public boolean method_2434() {\r\n return false;\r\n }", "default boolean isSpecial() { return false; }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n public String describe() {\n return null;\n }", "public void use()\n\t{\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "private PluginAPI() {\r\n\t\tsuper();\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public final java.lang.Void call() {\n /*\n // Method dump skipped, instructions count: 303\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.oculus.durableiap.DurableIAPStorage.AnonymousClass2.call():java.lang.Object\");\n }", "default String notRequired() {\n return \"Default implementation\";\n }", "public /* bridge */ /* synthetic */ void mo55094a() {\n super.mo55094a();\n }", "public ChannelFuture method_4130() {\n return null;\n }", "protected boolean func_70041_e_() { return false; }", "@Deprecated\n/* */ public int getActions() {\n/* 289 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public boolean method_208() {\r\n return false;\r\n }", "@Override\r\n\tpublic void just() {\n\t\t\r\n\t}", "public ChannelFuture method_4092() {\n return null;\n }", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public LegacyResultMapper() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: android.hardware.camera2.legacy.LegacyResultMapper.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.hardware.camera2.legacy.LegacyResultMapper.<init>():void\");\n }", "@Override\n protected String getInitialDoc(PythonParser.FuncdefContext rawMethod) {\n return null;\n }", "public void method_4270() {}", "@Deprecated\n @Override\n public void putValue(final String arg0, final Object arg1) {\n // Do Nothing\n }", "@Override\n public void func_104112_b() {\n \n }", "public boolean method_194() {\r\n return false;\r\n }", "public void o_() {}", "public EventLoop method_4094() {\n return null;\n }", "public Channel method_4090() {\n return null;\n }", "public boolean method_4093() {\n return false;\n }", "public Channel method_4121() {\n return null;\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public abstract void mo56925d();", "void m1864a() {\r\n }", "private Aliyun() {\n\t\tsuper();\n\t}", "public A force_get()\n {\n throw new UnsupportedOperationException();\n }", "@Override\n\tpublic String monHoc() {\n\t\treturn null;\n\t}", "private void m50366E() {\n }", "public ChannelFuture method_4126() {\n return null;\n }", "public boolean method_4132() {\n return false;\n }" ]
[ "0.70096254", "0.6690727", "0.6595091", "0.65817446", "0.65817446", "0.6411812", "0.63655156", "0.62877876", "0.62745357", "0.6184679", "0.6164159", "0.6153976", "0.6124746", "0.6098984", "0.6094231", "0.60172004", "0.60094786", "0.60010886", "0.59787166", "0.5967468", "0.59631926", "0.59556985", "0.5943893", "0.59304875", "0.5925938", "0.5922938", "0.59221727", "0.591942", "0.5908069", "0.5907033", "0.5889858", "0.5886789", "0.5884061", "0.5884061", "0.5864295", "0.5864295", "0.5863358", "0.5862988", "0.5860411", "0.5859722", "0.58389", "0.58368754", "0.583552", "0.5819263", "0.5799769", "0.5796929", "0.5792365", "0.5791687", "0.5782096", "0.5778868", "0.57773286", "0.5777196", "0.57750475", "0.57724166", "0.5771059", "0.57681304", "0.576626", "0.5766235", "0.57648396", "0.5763933", "0.57560384", "0.57539034", "0.575201", "0.5748874", "0.57445765", "0.5738074", "0.5737805", "0.57226354", "0.5721594", "0.5702188", "0.56999016", "0.5694744", "0.5688975", "0.5688022", "0.5683164", "0.56792057", "0.5678483", "0.56779283", "0.5677202", "0.5676277", "0.56732", "0.5670633", "0.56685466", "0.5667182", "0.566607", "0.5664063", "0.56635046", "0.56602186", "0.5657061", "0.56559557", "0.565483", "0.5648002", "0.56453425", "0.5639857", "0.5638152", "0.56373745", "0.5634931", "0.5634699", "0.5632714", "0.56314105", "0.56286436" ]
0.0
-1
execute the ADB command "adb devices" to get online device ids
public List<String> execAdbDevices() { List<String> ret_device_id_list = new ArrayList<>(); Process proc = null; try { proc = new ProcessBuilder(this.adb_directory, "devices").start(); proc.waitFor(); } catch (IOException ioe) { ioe.printStackTrace(); } catch (InterruptedException ire) { ire.printStackTrace(); } String devices_result = this.collectResultFromProcess(proc); String[] device_id_list = devices_result.split("\\r?\\n"); if (device_id_list.length <= 1) { System.out.println("No Devices Attached."); return ret_device_id_list; } /** * collect the online devices */ String str_device_id = null; String[] str_device_id_parts = null; // ignore the first line which is "List of devices attached" for (int i = 1; i < device_id_list.length; i++) { str_device_id = device_id_list[i]; str_device_id_parts = str_device_id.split("\\s+"); // add the online device if (str_device_id_parts[1].equals("device")) ret_device_id_list.add(str_device_id_parts[0]); } return ret_device_id_list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<String> execAdbDevices() {\n System.out.println(\"adb devices\");\n\n List<String> ret_device_id_list = new ArrayList<>();\n Process proc = null;\n try {\n proc = new ProcessBuilder(this.adb_path, \"devices\").start();\n proc.waitFor();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n } catch (InterruptedException ire) {\n ire.printStackTrace();\n }\n\n String devices_result = this.collectResultFromProcess(proc);\n String[] device_id_list = devices_result.split(\"\\\\r?\\\\n\");\n\n if (device_id_list.length <= 1) {\n System.out.println(\"No Devices Attached.\");\n return ret_device_id_list;\n }\n\n /**\n * collect the online devices\n */\n String str_device_id = null;\n String device = null;\n String[] str_device_id_parts = null;\n // ignore the first line which is \"List of devices attached\"\n for (int i = 1; i < device_id_list.length; i++) {\n str_device_id = device_id_list[i];\n str_device_id_parts = str_device_id.split(\"\\\\s+\");\n // add the online device\n if (str_device_id_parts[1].equals(\"device\")) {\n device = str_device_id_parts[0];\n ret_device_id_list.add(device);\n System.out.println(device);\n }\n }\n\n return ret_device_id_list;\n }", "public static List<String> getDeviceList() {\n\t\tList<String> str = CommandRunner.exec(CMD_GET_DEVICE_ID);\n\t\tList<String> ids = new ArrayList<String>();\n\t\tfor (int i = 1; i < str.size(); i++) {\n\t\t\tString id = str.get(i).split(\" |\\t\")[0].trim();\n\t\t\tif (!id.isEmpty()) {\n\t\t\t\tids.add(id);\n\t\t\t}\n\t\t}\n\t\treturn ids;\n\t}", "public List<Device> getRunningDevices();", "private void listDevices(Context context) {\n\t DeviceList list = new DeviceList();\n\t int result = LibUsb.getDeviceList(context, list);\n\t if(result < 0) throw new LibUsbException(\"Unable to get device list\", result);\n\n\t try\n\t {\n\t for(Device device: list)\n\t {\n\t DeviceDescriptor descriptor = new DeviceDescriptor();\n\t result = LibUsb.getDeviceDescriptor(device, descriptor);\n\t if (result != LibUsb.SUCCESS) throw new LibUsbException(\"Unable to read device descriptor\", result);\n\t System.out.println(\"vendorId=\" + descriptor.idVendor() + \", productId=\" + descriptor.idProduct());\n\t }\n\t }\n\t finally\n\t {\n\t // Ensure the allocated device list is freed\n\t LibUsb.freeDeviceList(list, true);\n\t }\n\t}", "public void checkDevices() throws TNotFoundEx{\n\t\tString command = \"adb devices -l\";\n\t\tCommando commando = new Commando();\n\t\tString op = commando.executeCommand(command);\n\t\t\n\t\tOtherUtil oU = new OtherUtil();\n\t\tArrayList<String> devices = oU.getRegexFromString(op, \"(model:.*?device:.+$?)\");\n\t\tint eligDevices = devices.size();\n\t\t\n\t\tif (eligDevices>1)\n\t\t\tthrow new TNotFoundEx(\"ERROR: 2 or more Android devices are connected to the host, please connect only one Android device.\");\n\t\tif (eligDevices == 0)\n\t\t\tthrow new TNotFoundEx(\"ERROR: No Android devices detected by the host. Execute adb devices -l to check the connected devices\");\n\t\t\t\n\t}", "public abstract List<NADevice> getDevices(Context context);", "public Map<String, Integer> execAdbOnlineDevicesPortForward()\r\n\t{\r\n\t\tList<String> device_id_list = this.execAdbDevices();\r\n\t\tMap<String, Integer> device_hostport_map = new HashMap<String, Integer>();\r\n\t\t\r\n\t\tint index = 0;\r\n\t\tfor (String device : device_id_list)\r\n\t\t{\r\n\t\t\tint host_port = ADBExecutor.HOST_BASE_PORT + index * 10;\r\n\t\t\tthis.execAdbSingleDevicePortForward(device, host_port, ADBExecutor.ANDROID_PORT);\r\n\t\t\tdevice_hostport_map.put(device, host_port);\r\n\t\t\tindex++;\r\n\t\t}\r\n\t\treturn device_hostport_map;\r\n\t}", "public Map<String, Integer> execAdbOnlineDevicesPortForward() {\n List<String> device_id_list = this.execAdbDevices();\n Map<String, Integer> device_hostport_map = new HashMap<String, Integer>();\n\n int index = 0;\n for (String device : device_id_list) {\n int host_port = ADBExecutor.HOST_BASE_PORT + index * 10;\n this.execAdbSingleDevicePortForward(device, host_port, ADBExecutor.ANDROID_PORT);\n device_hostport_map.put(device, host_port);\n index++;\n }\n return device_hostport_map;\n }", "public Collection<String> listDevices();", "List<DeviceDetails> getDevices();", "java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Device> \n getDevicesList();", "public Cursor getDevices(){\n String tabla = devicesContract.deviceEntry.tableName,\n selection = null,\n groupBy = null,\n having = null,\n orderBy = null;\n String[] columnas = null, selectionArgs = null;\n Cursor d = getDevice(tabla,columnas,selection,selectionArgs,groupBy,having,orderBy);\n return d;\n }", "private void getDevices(){\n progress.setVisibility(View.VISIBLE);\n\n emptyMessage.setVisibility(View.GONE);\n getListView().setVisibility(View.GONE);\n\n // request device list from the server\n Model.PerformRESTCallTask gd = Model.asynchRequest(this,\n getString(R.string.rest_url) + \"?\"\n + \"authentification_key=\" + MainActivity.authentificationKey + \"&operation=\" + \"getdevices\",\n //Model.GET,\n \"getDevices\");\n tasks.put(\"getDevices\", gd);\n }", "public List<String> getAvailableDevices() {\n if (getEcologyDataSync().getData(\"devices\") != null) {\n return new ArrayList<>((Collection<? extends String>) ((Map<?, ?>) getEcologyDataSync().\n getData(\"devices\")).keySet());\n } else {\n return Collections.emptyList();\n }\n }", "public List getDevices() {\n return devices;\n }", "public int getRunningDevicesCount();", "public static void getDevicesList()\n {\n MidiDevice.Info[]\taInfos = MidiSystem.getMidiDeviceInfo();\n\t\tfor (int i = 0; i < aInfos.length; i++)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tMidiDevice\tdevice = MidiSystem.getMidiDevice(aInfos[i]);\n\t\t\t\tboolean\t\tbAllowsInput = (device.getMaxTransmitters() != 0);\n\t\t\t\tboolean\t\tbAllowsOutput = (device.getMaxReceivers() != 0);\n\t\t\t\tif (bAllowsInput || bAllowsOutput)\n\t\t\t\t{\n\n\t\t\t\t\tSystem.out.println(i + \"\" + \" \"\n\t\t\t\t\t\t+ (bAllowsInput?\"IN \":\" \")\n\t\t\t\t\t\t+ (bAllowsOutput?\"OUT \":\" \")\n\t\t\t\t\t\t+ aInfos[i].getName() + \", \"\n\t\t\t\t\t\t+ aInfos[i].getVendor() + \", \"\n\t\t\t\t\t\t+ aInfos[i].getVersion() + \", \"\n\t\t\t\t\t\t+ aInfos[i].getDescription());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"\" + i + \" \" + aInfos[i].getName());\n\t\t\t\t\t}\n\n\t\t\t}\n\t\t\tcatch (MidiUnavailableException e)\n\t\t\t{\n\t\t\t\t// device is obviously not available...\n\t\t\t\t// out(e);\n\t\t\t}\n\t\t}\n\t\tif (aInfos.length == 0)\n\t\t{\n\t\t\tSystem.out.println(\"[No devices available]\");\n\t\t}\n\t\t//System.exit(0);\n }", "public Integer getDevices() {\r\n return devices;\r\n }", "public SmartDevice[] readDevices() {\n SQLiteDatabase db = getReadableDatabase();\n\n // Get data from database\n Cursor cursor = db.query(TABLE_NAME, null, null, null, null, null, null, null);\n if (cursor.getCount() <= 0) // If there is nothing found\n return null;\n\n\n // Go trough data and create class objects\n SmartDevice[] devices = new SmartDevice[cursor.getCount()];\n int i = 0;\n for (cursor.moveToFirst(); !cursor.isAfterLast(); cursor.moveToNext()) {\n devices[i++] = createDevice(cursor);\n }\n\n close();\n return devices;\n }", "public List<Device> findAll() throws Exception;", "public static void main(String[] args) {\n\r\n\t\tRuntime runtime = Runtime.getRuntime();\r\n\r\n\t\ttry {\r\n\r\n\t\t\t// 获取当前链接的设备\r\n\t\t\tProcess pro_get_deviceslist = runtime.exec(Commands.cmd_get_deviceslist);\r\n\r\n\t\t\tInputStream is_get_deviceslist = pro_get_deviceslist.getInputStream();\r\n\t\t\tInputStreamReader isr_get_deviceslist = new InputStreamReader(is_get_deviceslist);\r\n\t\t\tBufferedReader br_get_deviceslist = new BufferedReader(isr_get_deviceslist);\r\n\r\n\t\t\tif (devices == null) {\r\n\t\t\t\tdevices = new ArrayList<>();\r\n\t\t\t}\r\n\r\n\t\t\tString rl_get_deviceslist = null;\r\n\t\t\twhile ((rl_get_deviceslist = br_get_deviceslist.readLine()) != null) {\r\n\r\n\t\t\t\tif (rl_get_deviceslist.contains(\"\t\")) {\r\n\t\t\t\t\trl_get_deviceslist = rl_get_deviceslist.trim().split(\"\t\")[0];\r\n\r\n\t\t\t\t\tDeviceBean devicesBean = new DeviceBean();\r\n\t\t\t\t\tdevicesBean.setDevicename(rl_get_deviceslist);\r\n\t\t\t\t\tdevices.add(devicesBean);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tbr_get_deviceslist.close();\r\n\t\t\tisr_get_deviceslist.close();\r\n\t\t\tis_get_deviceslist.close();\r\n\t\t\tpro_get_deviceslist.destroy();\r\n\r\n\t\t\tif (devices == null || devices.size() < 1) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// 遍历设备列表,计算每个设备的屏幕宽高\r\n\t\t\tfor (DeviceBean devicesBean : devices) {\r\n\t\t\t\tProcess pro_get_width_height = runtime.exec(Commands.getPixelCommand(devicesBean.getDevicename()));\r\n\t\t\t\tInputStream is_get_width_height = pro_get_width_height.getInputStream();\r\n\t\t\t\tInputStreamReader isr_get_width_height = new InputStreamReader(is_get_width_height);\r\n\t\t\t\tBufferedReader br_get_width_height = new BufferedReader(isr_get_width_height);\r\n\r\n\t\t\t\tString rl_get_width_height = br_get_width_height.readLine();\r\n\t\t\t\tint width = Integer.parseInt((rl_get_width_height.split(\" \")[2].trim().split(\"x\")[0]));\r\n\t\t\t\tint height = Integer.parseInt((rl_get_width_height.split(\" \")[2].trim().split(\"x\")[1]));\r\n\t\t\t\tdevicesBean.setWidth(width);\r\n\t\t\t\tdevicesBean.setHeight(height);\r\n\r\n\t\t\t\tbr_get_width_height.close();\r\n\t\t\t\tisr_get_width_height.close();\r\n\t\t\t\tis_get_width_height.close();\r\n\t\t\t\tpro_get_width_height.destroy();\r\n\t\t\t}\r\n\r\n\t\t\t// 设置 每个设备 要要运行的程序\r\n\t\t\twhile (true) {\r\n\t\t\t\tSystem.out.println(\"\\n 请选择设备,输入设备前的编号(设置完成请输入y):\\n\");\r\n\r\n\t\t\t\tfor (int j = 0; j < devices.size(); j++) {\r\n\t\t\t\t\tDeviceBean deviceBean = devices.get(j);\r\n\t\t\t\t\tSystem.out.println(\" \" + j + \", \" + deviceBean.getDevicename() + \" \" + deviceBean.getWidth() + \"x\"\r\n\t\t\t\t\t\t\t+ deviceBean.getHeight() + \" \" + deviceBean.getCurrRunPackName());\r\n\t\t\t\t}\r\n\r\n\t\t\t\tSystem.out.println();\r\n\r\n\t\t\t\tInputStreamReader isr = new InputStreamReader(System.in);\r\n\t\t\t\tBufferedReader br = new BufferedReader(isr);\r\n\t\t\t\tString line = br.readLine().trim();\r\n\r\n\t\t\t\tif (line.equals(\"y\")) {\r\n\t\t\t\t\tSystem.out.println(\"\\n 设置完成 \\n\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tboolean paramsDeviceOk = false;\r\n\t\t\t\tfor (int m = 0; m < devices.size(); m++) {\r\n\t\t\t\t\tif (Integer.parseInt(line) == m) {\r\n\t\t\t\t\t\tparamsDeviceOk = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!paramsDeviceOk) {\r\n\t\t\t\t\tSystem.out.println(\" \\n 输入有误 程序结束 \\n\");\r\n\t\t\t\t\tthrow new Exception(\" \\n 输入有误 \\n \");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tDeviceBean deviceBean = devices.get(Integer.parseInt(line));\r\n\r\n\t\t\t\tSystem.out.println(\"\\n 您选择的设备是 : \" + deviceBean.getDevicename() + \"\\n\");\r\n\r\n\t\t\t\tSystem.out.println(\" \\n 请选择项目,输入项目前的编号:\\n\");\r\n\r\n\t\t\t\tfor (int s = 0; s < Commons.PACKAGENAMES.size(); s++) {\r\n\t\t\t\t\tSystem.out.println(\" \" + s + \" , \" + Commons.PACKAGENAMES.get(s));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tInputStreamReader isr2 = new InputStreamReader(System.in);\r\n\t\t\t\tBufferedReader br2 = new BufferedReader(isr2);\r\n\t\t\t\tString line2 = br2.readLine().trim();\r\n\r\n\t\t\t\tboolean paramsProjectOk = false;\r\n\t\t\t\tfor (int m = 0; m < Commons.PACKAGENAMES.size(); m++) {\r\n\t\t\t\t\tif (Integer.parseInt(line2) == m) {\r\n\t\t\t\t\t\tparamsProjectOk = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!paramsProjectOk) {\r\n\t\t\t\t\tSystem.out.println(\" \\n 输入有误 程序结束 \\n\");\r\n\t\t\t\t\tthrow new Exception(\" \\n 输入有误 \\n \");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdevices.get(Integer.parseInt(line))\r\n\t\t\t\t\t\t.setCurrRunPackName(Commons.PACKAGENAMES.get(Integer.parseInt(line2)));\r\n\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//开始启动程序\r\n\t\t\tthreadMap = new HashMap<String, Thread>();\r\n\r\n\t\t\tfor (DeviceBean devicesBean : devices) {\r\n\t\t\t\tString packageName = devicesBean.getCurrRunPackName();\r\n\t\t\t\tswitch (packageName) {\r\n\t\t\t\tcase HttTaskThread.PACKAGENAME:\r\n\t\t\t\t\tHttTaskThread taskThread = new HttTaskThread(devicesBean, runtime);\r\n\t\t\t\t\ttaskThread.start();\r\n\t\t\t\t\tthreadMap.put(devicesBean.getCurrRunPackName(), taskThread);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase DfttTaskThread.PACKAGENAME:\r\n\t\t\t\t\tDfttTaskThread dfttTaskThread = new DfttTaskThread(devicesBean, runtime);\r\n\t\t\t\t\tdfttTaskThread.start();\r\n\t\t\t\t\tthreadMap.put(devicesBean.getCurrRunPackName(), dfttTaskThread);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase SbTaskThread.PACKAGENAME:\r\n\t\t\t\t\tSbTaskThread sbTaskThread = new SbTaskThread(devicesBean, runtime);\r\n\t\t\t\t\tsbTaskThread.start();\r\n\t\t\t\t\tthreadMap.put(devicesBean.getCurrRunPackName(), sbTaskThread);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase ShzxTaskThread.PACKAGENAME:\r\n\t\t\t\t\tShzxTaskThread shzxTaskThread = new ShzxTaskThread(devicesBean, runtime);\r\n\t\t\t\t\tshzxTaskThread.start();\r\n\t\t\t\t\tthreadMap.put(devicesBean.getCurrRunPackName(), shzxTaskThread);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t// 开启监护线程\r\n\t\t\tMonitorThread monitorThread = new MonitorThread(runtime, devices,threadMap);\r\n\t\t\tmonitorThread.start();\r\n\r\n\t\t\t// 开启定时杀死程序线程\r\n\t\t\tTimerKiller timerKillThread = new TimerKiller(runtime, devices);\r\n\t\t\ttimerKillThread.start();\r\n\t\t\t\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Device> getAllDevices() {\n\n Query query = em.createQuery(\"SELECT d FROM Device d\");\n List<Device> devices = new ArrayList<Device>();\n devices = query.getResultList();\n return devices;\n }", "public List<ProductModel> getAllDevices() {\n\t\tSystem.out.println(\"\\nNetworkDevServ-getAllDev()\");\r\n\t\treturn deviceData.getAllDevices();\r\n\t}", "public IDevice[] getDevices() { return devices; }", "public static void listDevices()\n\t{\n\t\tfor(SerialPort port : SerialPort.getCommPorts())\n\t\t{\n\t String portName = port.getSystemPortName();\n\t System.out.println(portName);\n\t\t}\n\t}", "public List<Device> getUserDevices(int id){\n \n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n List <Device> devices = new ArrayList<>();\n try {\n tx = session.beginTransaction();\n \n User user = this.getUser(id);\n\n // Add restriction to get user with username\n Criterion deviceCr = Restrictions.eq(\"userId\", user);\n Criteria cr = session.createCriteria(Device.class);\n cr.add(deviceCr);\n devices = cr.list();\n tx.commit();\n } catch (HibernateException e) {\n if (tx != null)\n tx.rollback();\n log.fatal(e);\n } finally {\n session.close();\n }\n return devices;\n }", "@Override\n public List<CECDevice> scanDevices() {\n sendCommand(\"scan\");\n return CECClientParser.parseScanResult(waitForOutputLine(\"===================\"));\n }", "public org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceList getDevicesForApplication(org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);", "public String[] getVideoDevicesList();", "public void listDevices(final BluetoothAdapter bluetoothAdapter){\n Set<BluetoothDevice> pairedDevices = bluetoothAdapter.getBondedDevices();\n ArrayList pairedDeviceList = new ArrayList();\n String address = null;\n\n if (pairedDevices.size() > 0) {\n int i = 0;\n // There are paired devices. Get the name and address of each paired device.\n for (BluetoothDevice device : pairedDevices) {\n String deviceName = device.getName().trim();\n String deviceHardwareAddress = device.getAddress(); // MAC address\n if (deviceName.equals(DEVICE_NAME)){\n address = device.getAddress().trim();\n System.out.println(address +\"\\n\");\n }\n pairedDeviceList.add(\"Device Name: \" + deviceName + \" Device MAC Address: \" + deviceHardwareAddress);\n }\n\n System.out.println(pairedDeviceList.get(0) + \"\\n\");\n\n final String finalAddress = address;\n AsyncTask.execute(new Runnable(){\n @Override\n public void run(){\n bluetoothDevice = bluetoothAdapter.getRemoteDevice(finalAddress);\n BLEDevice = new BluetoothLeService(bluetoothDevice, quantifenUUID);\n BLEDevice.connect(BluetoothActivity.this, testUUID);\n }\n });\n\n\n }\n }", "public List<Device> getAllDevices(DeviceType type) {\n LOG.info(\"Starting get all OpenCL device by platform \" + platform + \".\");\n int[] numDevicesArray = new int[1];\n long deviceType = type.toCLType();\n CL.clGetDeviceIDs(platform, deviceType, 0, null, numDevicesArray);\n int numDevices = numDevicesArray[0];\n LOG.info(\"Found \" + numDevices + \" OpenCL devices.\");\n cl_device_id[] allRawDevices = new cl_device_id[numDevices];\n CL.clGetDeviceIDs(platform, deviceType, numDevices, allRawDevices, null);\n return Arrays.stream(allRawDevices)\n .filter(Objects::nonNull)\n .map(rawDevice -> new Device(rawDevice, this))\n .collect(Collectors.toList());\n }", "public static ArrayList<File> findDevices() {\n return findDevices(\"/dev/\");\n }", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllActiveDevicesFast\")\n List<JsonDevice> all();", "public final TestDevice[] getDeviceList() {\n return mDevices.toArray(new TestDevice[mDevices.size()]);\n }", "public static native String JavaGetDeviceSerialList(int Number);", "private native void nGetDevices(Vector deviceList);", "public DeviceUserAuthorization[] getDeviceList() {\n return deviceList;\n }", "public boolean runOnAllDevices();", "@Path(\"device\")\n DeviceAPI devices();", "private void bonded_devices_get()\n\t\t{\n\t\t\tmPairedDevList.clear();\n\t\t\tSet<BluetoothDevice> PairedDevices = btAdapter.getBondedDevices();\n\t\t\tif(PairedDevices.size() > 0)\n\t\t\t{\n\t\t\t\tmPairedTitle.setVisibility(View.VISIBLE);\n\t\t\t\tfor(BluetoothDevice device : PairedDevices)\n\t\t\t\t{\n\t\t\t\t\tString device_info = device.getName()+\"\\n\"+device.getAddress();\n\t\t\t\t\tmPairedDevList.add(device_info);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmPairedTitle.setVisibility(View.GONE);\n\t\t\t\tmPairedDevList.add(\"No Bonded Devices\");\n\t\t\t}\n\t\t}", "public abstract GraphicsDevice[] getScreenDevices();", "@SuppressLint(\"HardwareIds\")\n String getDeviceID() {\n return Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n }", "public List<PushDevice> listDevices() {\n checkUsbLibState();\n\n List<PushDevice> devices = new ArrayList<>();\n\n // Read the USB device list\n DeviceList list = new DeviceList();\n int result = LibUsb.getDeviceList(null, list);\n if (result < 0) {\n throw new LibUsbException(\"Unable to get device list\", result);\n }\n\n try {\n // Iterate over all devices and scan for the right one\n for (Device device : list) {\n DeviceDescriptor descriptor = new DeviceDescriptor();\n result = LibUsb.getDeviceDescriptor(device, descriptor);\n if (result != LibUsb.SUCCESS) {\n throw new LibUsbException(\"Unable to read device descriptor\", result);\n }\n if (descriptor.bDeviceClass() == LibUsb.CLASS_PER_INTERFACE &&\n descriptor.idVendor() == VENDOR_ID && descriptor.idProduct() == PRODUCT_ID) {\n\n devices.add(new PushDevice(device));\n }\n }\n } finally {\n // Ensure the allocated device list is freed\n LibUsb.freeDeviceList(list, true);\n }\n\n return devices;\n }", "public ArrayList getDeviceInfo();", "public int getCountOfFreeDevices() {\n int count = 0;\n for (TestDevice td : mDevices) {\n if (td.getStatus() == TestDevice.STATUS_IDLE) {\n count++;\n }\n }\n return count;\n }", "public static ArrayList<Device> getDevices (JSONArray jsonArray){\n ArrayList<Device> devices = new ArrayList<Device>();\n\n for (int i = 0; i < jsonArray.length(); i++) {\n try {\n JSONObject o = jsonArray.getJSONObject(i);\n Device d = new Device(o.getString(Utility.DeviceName), o.getString(Utility.Technology), o.getBoolean(Utility.AlwaysOn));\n\n /* Servs */\n JSONArray servsJson = o.getJSONArray(Utility.Services);\n for (int j = 0; j < servsJson.length(); j++) {\n DeviceService ds = new DeviceService(servsJson.getJSONObject(j).getString(Utility.ServiceName), servsJson.getJSONObject(j).getString(Utility.ServiceType));\n ds.assignToDevice(d);\n d.addService(ds);\n\n JSONArray coms = servsJson.getJSONObject(j).getJSONArray(Utility.Commands);\n for (int z = 0; z < coms.length(); z++) {\n try {\n ds.addCommand(new Command(coms.getJSONObject(z).getString(Utility.CommandName),\n coms.getJSONObject(z).getString(Utility.CommandType)));\n }\n catch (JSONException e) {\n Log.w(\"Command\", \"Error adding command\");\n }\n }\n }\n\n\n\n devices.add(d);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n return devices;\n }", "@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedIterable<Device> getAllDevices(String filter, Context context) {\n return this.serviceClient.getAllDevices(filter, context);\n }", "Integer getDeviceId();", "public com.google.common.util.concurrent.ListenableFuture<org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceList> getDevicesForApplication(\n org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);", "public List<String> getConnectedDevices() {\n if (services.size() == 0) {\n return new ArrayList<String>();\n }\n\n HashSet<String> toRet = new HashSet<String>();\n\n for (String s : services.keySet()) {\n ConnectionService service = services.get(s);\n\n if (service.getState() == ConnectionConstants.STATE_CONNECTED) {\n toRet.add(s);\n }\n }\n\n return new ArrayList<String>(toRet);\n }", "public Device findDeviceById(int id);", "public static List<IOTAddress> discoverIOTDevicesSyn() {\n\n\t\tAbsTaskSyn<List<IOTAddress>> udpSocketTask = new UDPSocketTask(\n\t\t\t\t\"connect task\", -1, true, broadcastAddress, data);\n\n\t\tmThreadPool.executeSyn(udpSocketTask, CONSTANTS_DYNAMIC.UDP_BROADCAST_TIMEOUT_DYNAMIC, TimeoutUnit);\n\n\t\tList<IOTAddress>responseList = udpSocketTask.getResult();\n\n\t\treturn responseList;\n\t}", "public synchronized Hashtable getDevices() {\n Hashtable hashtable;\n hashtable = new Hashtable();\n Enumeration keys = this.deviceList.keys();\n while (keys.hasMoreElements()) {\n Integer num = (Integer) keys.nextElement();\n hashtable.put(num, this.deviceList.get(num));\n }\n return hashtable;\n }", "public List<String> getCommandStatus() {\n\t\tList<Device> devices = DeviceClientSingleton.getDeviceList();\r\n\t\tList<String> commandStatus = new ArrayList<String>();\r\n\t\tfor (int i = 0; i < devices.size(); i++) {\r\n\t\t\tString deviceData = DeviceClientSingleton.getDeviceData(devices.get(i).getDeviceId());\r\n\t\t\tcommandStatus.add(deviceData);\r\n\t\t\tif ((!deviceData.equals(\"\")) && (!deviceData.equals(\" \"))) {\r\n\t\t\t\tDeviceClientSingleton.removeDeviceData(devices.get(i).getDeviceId());\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn commandStatus;\r\n\t}", "java.lang.String getDeviceId();", "void getDevicesCurrentlyOnline(String deviceType, AsyncCallback<List<String>> callback);", "public final int getDeviceID() {\n return device.getDeviceID();\n }", "DeviceId deviceId();", "DeviceId deviceId();", "private void discoverDevicesAndServices( String uuid ) throws BluetoothStateException\n {\n discoverer.discoverDevices();\n discoverer.discoverServices( uuid );\n }", "public void setDevices(Integer devices) {\r\n this.devices = devices;\r\n }", "public List<ISymbianSDK> getTargetEmulatorDevices() {\n\t\tISDKManager manager = SDKCorePlugin.getSDKManager();\n\t\treturn manager.getSDKList();\n\t}", "List<DeviceInfo> getDevicesInfo(List<DeviceIdentifier> deviceIdentifiers) throws DeviceDetailsMgtException;", "List<PCDevice> getAllPC();", "public String getDeviceid() {\n return deviceid;\n }", "public void discoverDevices(){\r\n \t// If we're already discovering, stop it\r\n if (mBtAdapter.isDiscovering()) {\r\n mBtAdapter.cancelDiscovery();\r\n }\r\n \r\n Toast.makeText(this, \"Listining for paired devices.\", Toast.LENGTH_LONG).show();\r\n \tmBtAdapter.startDiscovery(); \r\n }", "private void getPairedDevices() {\n\t\tdevicesArray = btAdapter.getBondedDevices();\n\t\tif(devicesArray.size()>0){\n\t\t\tfor(BluetoothDevice device:devicesArray){\n\t\t\t\tpairedDevices.add(device.getName());\n\t\t\t}\n\t\t}\n\t}", "public int getConnectedDeviceCount() {\n return getConnectedDevices().size();\n }", "private void getDevice(){\n\t\tdialog.setContentView(R.layout.device_list_popup);\n\t\tdialog.setCancelable(true);\n\t\tdialog.setTitle(\"Paired Bluetooth Devices\");\n\t\tdialog.show();\n\t\tProgressBar tempSpinner = (ProgressBar)dialog.findViewById(R.id.progressBar);\n\t\ttempSpinner.setVisibility(View.INVISIBLE); //Hide the progress bar while we aren't connecting\n\n\t\tListView lv = (ListView) dialog.findViewById(R.id.device_list_display);\n\t\tlv.setAdapter(new ArrayAdapter<String> (this, R.layout.device_list_popup));\n\n\t\tlv.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\t\t\tpublic void onItemClick(AdapterView<?> arg, View view, int position, long id) {\n\t\t\t\tString address = (String) ((TextView) view).getText();\n\t\t\t\tfor (String temp : address.split(\"\\n\")) {\n\t\t\t\t\taddress = temp; //Only get address, discard name\n\t\t\t\t}\n\t\t\t\tBluetoothDevice device = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(address);\n\t\t\t\tnew ConnectTask().execute(device);\n\t\t\t}\n\t\t});\n\t}", "private String getDeviceID() {\n try {\n TelephonyManager telephonyManager;\n\n telephonyManager =\n (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);\n\n /*\n * getDeviceId() function Returns the unique device ID.\n * for example,the IMEI for GSM and the MEID or ESN for CDMA phones.\n */\n return telephonyManager.getDeviceId();\n }catch(SecurityException e){\n return null;\n }\n }", "public void getDevicesForApplication(org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request,\n io.grpc.stub.StreamObserver<org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceList> responseObserver);", "public VinDevices getDevice(String id_device)\n\t\t{\n\t\t\tList<?> dataAux;\n\t\t\tVinDevices Arecord = new VinDevices();\n\t\t\ttry{\n\t\t\t\tdataAux =\tthis.getListaBaseTable(\"id_device='\"+id_device+\"'\");\n\t\t\t\tArecord = (VinDevices)dataAux.get(0);\n\t\t\t}\n\t\t\tcatch(Exception e){}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tdataAux = null;\n\t\t\t}\n\t\t\treturn Arecord;\t\t\t\t\n\t\t\t\n\t\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Device> getUserDevices(int userId) {\n Query query = em.createQuery(\"SELECT u FROM Device u where user_id=\"+ userId);\n List<Device> users = new ArrayList<Device>();\n users = query.getResultList();\n return users;\n }", "public static String getDeviceID(Context context) {\n return Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);\n }", "public static void printDevices(List<DeviceResponse> list) {\n\t\tSystem.out.println(\"******** DEVICE LIST *********\");\n\n\t\tfor (DeviceResponse response : list) {\n\t\t\tSystem.out.println(response);\n\t\t}\n\n\t\tSystem.out.println(\"******** LIST EX *********\");\n\t}", "@NonNull\n public static String getDeviceID(@NonNull Context ctx) {\n String duid = Settings.Secure.getString(ctx.getContentResolver(), Settings.Secure.ANDROID_ID);\n return (duid == null || duid.length() == 0) ? \"emulator\" : duid;\n }", "String getDeviceName();", "public Peripheral[] getDevices() {\r\n\treturn (Peripheral[]) this.deviceList.toArray(new Peripheral[0]);\r\n }", "private void startDeviceListActivity() {\n\t\tIntent intent = new Intent(this, DeviceListActivity.class);\r\n startActivityForResult(intent, REQUEST_CONNECT_DEVICE); \r\n\t}", "private void notifyDevicesChanged() {\n runInAudioThread(new Runnable() {\n @Override\n public void run() {\n WritableArray data = Arguments.createArray();\n final boolean hasHeadphones = availableDevices.contains(DEVICE_HEADPHONES);\n for (String device : availableDevices) {\n if (hasHeadphones && device.equals(DEVICE_EARPIECE)) {\n // Skip earpiece when headphones are plugged in.\n continue;\n }\n WritableMap deviceInfo = Arguments.createMap();\n deviceInfo.putString(\"type\", device);\n deviceInfo.putBoolean(\"selected\", device.equals(selectedDevice));\n data.pushMap(deviceInfo);\n }\n getContext().getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit(DEVICE_CHANGE_EVENT, data);\n JitsiMeetLogger.i(TAG + \" Updating audio device list\");\n }\n });\n }", "public TestDevice[] allocateDevices(final int num) throws DeviceNotAvailableException {\n \n ArrayList<TestDevice> deviceList;\n TestDevice td;\n int index = 0;\n \n if (num < 0) {\n throw new IllegalArgumentException();\n }\n if (num > mDevices.size()) {\n throw new DeviceNotAvailableException(\"The number of connected device(\"\n + mDevices.size() + \" is less than the specified number(\"\n + num + \"). Please plug in enough devices\");\n }\n deviceList = new ArrayList<TestDevice>();\n \n while (index < mDevices.size() && deviceList.size() != num) {\n td = mDevices.get(index);\n if (td.getStatus() == TestDevice.STATUS_IDLE) {\n deviceList.add(td);\n }\n index++;\n }\n if (deviceList.size() != num) {\n throw new DeviceNotAvailableException(\"Can't get the specified number(\"\n + num + \") of idle device(s).\");\n }\n return deviceList.toArray(new TestDevice[num]);\n }", "@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedIterable<Device> getAllDevices(String filter) {\n return this.serviceClient.getAllDevices(filter);\n }", "public static String DeviceConnected(){\n StringBuilder outputDC = new StringBuilder();\n String cmd = \"route print\";\n try{\n outputDC.append(getCommand(cmd));\n }\n catch(Throwable se){\n se.printStackTrace();\n }\n return outputDC.toString();\n }", "@GET(\"device\")\n Call<DevicesResponse> getDevice();", "public List<Device> getListDevice() {\n\n\t\tList<Device> listDevice = new ArrayList<Device>();\n\n\t\tDevice device = new Device();\n\n\t\tdevice.setName(\"DeviceNorgren\");\n\t\tdevice.setManufacturer(\"Norgren\");\n\t\tdevice.setVersion(\"5.7.3\");\n\t\tdevice.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\n\t\tSensor sensorTemperature = new Sensor();\n\t\tsensorTemperature.setName(\"SensorSiemens\");\n\t\tsensorTemperature.setManufacturer(\"Siemens\");\n\t\tsensorTemperature.setVersion(\"1.2.2\");\n\t\tsensorTemperature.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tsensorTemperature.setMonitor(\"Temperature\");\n\n\t\tSensor sensorPressure = new Sensor();\n\t\tsensorPressure.setName(\"SensorOmron\");\n\t\tsensorPressure.setManufacturer(\"Omron\");\n\t\tsensorPressure.setVersion(\"0.5.2\");\n\t\tsensorPressure.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tsensorPressure.setMonitor(\"Pressure\");\n\n\t\tdevice.getListSensor().add(sensorTemperature);\n\t\tdevice.getListSensor().add(sensorPressure);\n\n\t\tActuator actuadorKey = new Actuator();\n\n\t\tactuadorKey.setName(\"SensorAutonics\");\n\t\tactuadorKey.setManufacturer(\"Autonics\");\n\t\tactuadorKey.setVersion(\"3.1\");\n\t\tactuadorKey.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tactuadorKey.setAction(\"On-Off\");\n\n\t\tdevice.getListActuator().add(actuadorKey);\n\n\t\tlistDevice.add(device);\n\n\t\treturn listDevice;\n\n\t}", "@Override\n public Object getData() {\n return devices;\n }", "private void connectDevices() {\n Set<DeviceId> deviceSubjects =\n cfgRegistry.getSubjects(DeviceId.class, Tl1DeviceConfig.class);\n deviceSubjects.forEach(deviceId -> {\n Tl1DeviceConfig config =\n cfgRegistry.getConfig(deviceId, Tl1DeviceConfig.class);\n connectDevice(new DefaultTl1Device(config.ip(), config.port(), config.username(),\n config.password()));\n });\n }", "public static VkPhysicalDevice[] enumeratePhysicalDevices(VkInstance instance)\n throws VulkanException {\n IntBuffer devicesCount = memAllocInt(1);\n int err = vkEnumeratePhysicalDevices(instance, devicesCount, null);\n VulkanResult.validate(err, \"Could not enumerate physical devices!\");\n\n int devCount = devicesCount.get(0);\n PointerBuffer pDevices = memAllocPointer(devCount);\n\n err = vkEnumeratePhysicalDevices(instance, devicesCount, pDevices);\n VulkanResult.validate(err, \"Could not enumerate physical devices!\");\n\n VkPhysicalDevice[] devices = new VkPhysicalDevice[devCount];\n for (int i = 0; i < devCount; i++) {\n devices[i] = new VkPhysicalDevice(pDevices.get(i), instance);\n }\n\n memFree(devicesCount);\n memFree(pDevices);\n\n return devices;\n }", "public void onClickStart(View view) {\n\n HashMap<String, UsbDevice> usbDevices = usbManager.getDeviceList();\n if (!usbDevices.isEmpty()) {\n boolean keep = true;\n for (Map.Entry<String, UsbDevice> entry : usbDevices.entrySet()) {\n device = entry.getValue();\n int deviceVID = device.getVendorId();\n if (deviceVID == 0x2341)//Arduino Vendor ID\n {\n PendingIntent pi = PendingIntent.getBroadcast(this, 0, new Intent(ACTION_USB_PERMISSION), 0);\n usbManager.requestPermission(device, pi);\n keep = false;\n } else {\n connection = null;\n device = null;\n }\n\n if (!keep)\n break;\n }\n }\n\n\n }", "public void DiscoverUsb(View view) {\n \t// Initiate variables\n \tString UsbList = \"Detailed Device List:\\n\";\n \tArrayAdapter<String> connectedDevicesAdapter;\n \tconnectedDevicesAdapter = new ArrayAdapter<String>(getApplicationContext(), android.R.layout.simple_spinner_dropdown_item, android.R.id.text1) ;\n \tString VendorName = \"Dummy\";\n \tString ProductName = \"Dummy\";\n \t// Do something in response to button\n \t\n // Retrieve the text view\n TextView textView = (TextView) findViewById(R.id.usb_list_view);\n\n \n // Retrieve the UsbManager service with its message\n UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);\n\n HashMap<String, UsbDevice> deviceList = manager.getDeviceList();\n Iterator<UsbDevice> deviceIterator = deviceList.values().iterator();\n while(deviceIterator.hasNext()){\n UsbDevice device = deviceIterator.next();\n \n UsbList=UsbList.concat(\"Device Name:\\n\"+device.getDeviceName()+\"\\n\") ;\n UsbList=UsbList.concat(\"VendorId:\"+Integer.toHexString(device.getVendorId())+\"\\t\"+\"ProductId:\"+Integer.toHexString(device.getProductId())+\"\\n\") ;\n\n UsbList=UsbList.concat(\"VendorId:\"+device.getVendorId()+\"\\t\"+\"ProductId:\"+device.getProductId()+\"\\n\") ;\n\n\n UsbList=UsbList.concat(\"Device Class:\"+Integer.toHexString(device.getDeviceClass())+\"\\t\"+\"subClass:\"+device.getDeviceSubclass()+\"\\n\") ;\n UsbList=UsbList.concat(\"DeviceId:\"+device.getDeviceId()+\"\\t\"+\"InterfaceCount:\"+device.getInterfaceCount()+\"\\n\") ;\n \n int Vid = device.getVendorId();\n \n test();\n \n switch (Vid) {\n case 2372:\n \tVendorName = \"KORG, Inc.\";\n \tProductName = \"nanoKONTROL studio controller\";\n \tbreak;\t\n case 2235:\n \tVendorName = \"Texas Instruments Japan\";\n \tProductName = \"PCM2900 Audio Codec\";\n \tbreak;\n default:\n\t\t\t\t// do nothing.\n\t\t\t\tbreak;\t\n }\n \n UsbList=UsbList.concat(VendorName+\"\\n\"+ProductName+\"\\n\") ;\n \n connectedDevicesAdapter.add(VendorName+\"\\t\"+ProductName);\n UsbList=UsbList.concat(\"\\n\");\n }\n textView.setText(UsbList);\n \n\t\tSpinner UsbListSpinner = (Spinner) findViewById(R.id.usb_list_spinner); \n\t\t\n\t\t\n\t\t\n\t\tUsbListSpinner.setAdapter(connectedDevicesAdapter);\n \n }", "public List<ApInfo> findAllAps() {\n List<ApInfo> apInfos = new ArrayList<>();\n Cursor cursor = null;\n try {\n cursor = this.db.rawQuery(\"SELECT SSID,MAC,UPTIME FROM MOBILE_AP WHERE 1 = 1\", null);\n while (cursor.moveToNext()) {\n apInfos.add(new ApInfo(cursor.getString(cursor.getColumnIndexOrThrow(\"SSID\")), cursor.getString(cursor.getColumnIndexOrThrow(\"MAC\")), cursor.getString(cursor.getColumnIndexOrThrow(\"UPTIME\"))));\n }\n } catch (IllegalArgumentException e) {\n LogUtil.d(\"SELECT SSID,MAC,UPTIME FROM MOBILE_AP WHERE 1 = 1\");\n LogUtil.e(\"findAllAps IllegalArgumentException: \" + e.getMessage());\n } catch (Exception e2) {\n LogUtil.e(\"findAllAps Exception: \" + e2.getMessage());\n if (cursor != null) {\n cursor.close();\n }\n return apInfos;\n } catch (Throwable th) {\n if (cursor != null) {\n cursor.close();\n }\n throw th;\n }\n }", "public static BLDevice[] discoverDevices(int timeout) throws IOException {\r\n return discoverDevices(InetAddress.getLocalHost(), 0, timeout);\r\n }", "UUID getDeviceId();", "public int[] getVIDPID() {\r\n if(deviceDescriptor==null) {\r\n log.warning(\"USBAEMonitor: getVIDPID called but device has not been opened\");\r\n return new int[2];\r\n }\r\n int[] n=new int[2];\r\n n[0]=deviceDescriptor.idVendor;\r\n n[1]=deviceDescriptor.idProduct;\r\n return n;\r\n }", "Device selectByPrimaryKey(Integer id);", "@Override\n\tpublic TransferData getDevices(int pageSize, int pageIndex,\n\t\t\tboolean isManaged) {\n\t\tTransferData data = new TransferData();\n\t\tDBObject query = new BasicDBObject();\n\n\t\tquery.put(\"managed\", isManaged);\n\n\t\tList<InventoryDevice> devices = getMongoDao().findObjects(\n\t\t\t\tConstant.TABLE_InvDev, query, InventoryDevice.class).readAll();\n\t\tif (devices != null && !devices.isEmpty()) {\n\t\t\tint size = devices.size();\n\t\t\tint start = (pageIndex - 1) * pageSize;\n\n\t\t\tdata.setPageCount(CoreSvrUtil.getPageCount(size, pageSize));\n\t\t\tdata.setListData(devices.subList(start,\n\t\t\t\t\tstart + pageSize < size ? start + pageSize : size));\n\t\t}\n\t\treturn data;\n\t}", "public static java.lang.String[] getAvailableIDs() { throw new RuntimeException(\"Stub!\"); }", "public void monitorFoundDevices() {\n //start a thread\n new Thread() {\n public void run() {\n //loop till mBeaconListAdapter has been skilled.\n while(mBeaconListAdapter != null) {\n try {\n //Since it will update UI, runOnUiThread is called here.\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n for (int i = 0; i < mBeaconListAdapter.getCount(); i++) {\n if (!mBleWrapper.checkDeviceConnection(mBeaconListAdapter.\n getDevice(i).getAddress()))\n mBeaconListAdapter.removeDevice(i);\n }\n }\n });\n\n Thread.sleep(MONITOR_DELAY_TIME_INTERVAL);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }\n }.start();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tCommandResult commandResult = ShellUtil.execCommand(cmds, true, true);\n\t\t\t\ttv_result.setText(\"adb connect \" + getIp() + \":5555\");\n\t\t\t\t// System.out.println(commandResult.responseMsg);\n\t\t\t}", "public void initDevices() {\n for (Device device: deviceList) {\n device.init(getCpu().getTime());\n }\n }" ]
[ "0.84983414", "0.7021877", "0.7015683", "0.680301", "0.67459315", "0.6601616", "0.6551247", "0.6523731", "0.6470625", "0.64131254", "0.62666106", "0.62110674", "0.61831254", "0.6096007", "0.60748065", "0.6059374", "0.6035722", "0.5996254", "0.59681904", "0.59415007", "0.58901536", "0.5888956", "0.5875389", "0.5862878", "0.58594984", "0.5744592", "0.5729737", "0.57025963", "0.56965774", "0.5681662", "0.568085", "0.56762725", "0.5665427", "0.56369054", "0.56360155", "0.56294364", "0.56076777", "0.5525393", "0.5495194", "0.5475411", "0.54715884", "0.54490596", "0.5432522", "0.5425657", "0.5417103", "0.54068935", "0.53744125", "0.535319", "0.5349633", "0.53469414", "0.53363496", "0.53334695", "0.53125983", "0.5302533", "0.5300534", "0.52963954", "0.52913815", "0.52623135", "0.52623135", "0.52611357", "0.5255825", "0.5250838", "0.52409244", "0.52382565", "0.5228235", "0.5203734", "0.5201125", "0.51758116", "0.51742494", "0.51671267", "0.5164035", "0.5160409", "0.51594585", "0.515227", "0.5147497", "0.5127185", "0.51262236", "0.5119433", "0.51178825", "0.5114784", "0.51138246", "0.5099534", "0.50893635", "0.50811106", "0.50801516", "0.50707126", "0.50667465", "0.5057346", "0.5053614", "0.5048997", "0.5034436", "0.50292414", "0.5023827", "0.50219256", "0.50179094", "0.5003474", "0.4996038", "0.49935853", "0.49909574", "0.49750417" ]
0.8351293
1
execute the "adb s forward" commands for each device with different ports on the host PC
public Map<String, Integer> execAdbOnlineDevicesPortForward() { List<String> device_id_list = this.execAdbDevices(); Map<String, Integer> device_hostport_map = new HashMap<String, Integer>(); int index = 0; for (String device : device_id_list) { int host_port = ADBExecutor.HOST_BASE_PORT + index * 10; this.execAdbSingleDevicePortForward(device, host_port, ADBExecutor.ANDROID_PORT); device_hostport_map.put(device, host_port); index++; } return device_hostport_map; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Map<String, Integer> execAdbOnlineDevicesPortForward() {\n List<String> device_id_list = this.execAdbDevices();\n Map<String, Integer> device_hostport_map = new HashMap<String, Integer>();\n\n int index = 0;\n for (String device : device_id_list) {\n int host_port = ADBExecutor.HOST_BASE_PORT + index * 10;\n this.execAdbSingleDevicePortForward(device, host_port, ADBExecutor.ANDROID_PORT);\n device_hostport_map.put(device, host_port);\n index++;\n }\n return device_hostport_map;\n }", "public List<String> execAdbDevices() {\n System.out.println(\"adb devices\");\n\n List<String> ret_device_id_list = new ArrayList<>();\n Process proc = null;\n try {\n proc = new ProcessBuilder(this.adb_path, \"devices\").start();\n proc.waitFor();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n } catch (InterruptedException ire) {\n ire.printStackTrace();\n }\n\n String devices_result = this.collectResultFromProcess(proc);\n String[] device_id_list = devices_result.split(\"\\\\r?\\\\n\");\n\n if (device_id_list.length <= 1) {\n System.out.println(\"No Devices Attached.\");\n return ret_device_id_list;\n }\n\n /**\n * collect the online devices\n */\n String str_device_id = null;\n String device = null;\n String[] str_device_id_parts = null;\n // ignore the first line which is \"List of devices attached\"\n for (int i = 1; i < device_id_list.length; i++) {\n str_device_id = device_id_list[i];\n str_device_id_parts = str_device_id.split(\"\\\\s+\");\n // add the online device\n if (str_device_id_parts[1].equals(\"device\")) {\n device = str_device_id_parts[0];\n ret_device_id_list.add(device);\n System.out.println(device);\n }\n }\n\n return ret_device_id_list;\n }", "private void connectDevices() {\n Set<DeviceId> deviceSubjects =\n cfgRegistry.getSubjects(DeviceId.class, Tl1DeviceConfig.class);\n deviceSubjects.forEach(deviceId -> {\n Tl1DeviceConfig config =\n cfgRegistry.getConfig(deviceId, Tl1DeviceConfig.class);\n connectDevice(new DefaultTl1Device(config.ip(), config.port(), config.username(),\n config.password()));\n });\n }", "private void invokeSync()\n \t{\n if (iDeviceList.size() == 0)\n {\n System.out.println(\"No devices found, so nothing to test\");\n return;\n }\n CpDevice device = iDeviceList.get(0);\n System.out.println(\"\\n\\nSync call to device \" + device.getUdn());\n \n CpProxyUpnpOrgConnectionManager1 connMgr = new CpProxyUpnpOrgConnectionManager1(device);\n try {\n GetProtocolInfo points = connMgr.syncGetProtocolInfo();\n System.out.println(\"source is \" + points.getSource() + \"\\nsink is \" + points.getSink());\n } catch (ProxyError pe) { }\n connMgr.dispose();\n \t}", "public List<String> execAdbDevices()\r\n\t{\r\n\t\tList<String> ret_device_id_list = new ArrayList<>();\r\n\t\t\r\n\t\tProcess proc = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tproc = new ProcessBuilder(this.adb_directory, \"devices\").start();\r\n\t\t\tproc.waitFor();\r\n\t\t} catch (IOException ioe)\r\n\t\t{\r\n\t\t\tioe.printStackTrace();\r\n\t\t} catch (InterruptedException ire)\r\n\t\t{\r\n\t\t\tire.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tString devices_result = this.collectResultFromProcess(proc);\r\n\t String[] device_id_list = devices_result.split(\"\\\\r?\\\\n\");\r\n\r\n\t if (device_id_list.length <= 1)\r\n\t {\r\n\t \tSystem.out.println(\"No Devices Attached.\");\r\n\t \treturn ret_device_id_list;\r\n\t }\r\n\t \r\n\t /**\r\n\t * collect the online devices \r\n\t */\r\n\t String str_device_id = null;\r\n\t String[] str_device_id_parts = null;\r\n\t // ignore the first line which is \"List of devices attached\"\r\n\t for (int i = 1; i < device_id_list.length; i++)\r\n\t\t{\r\n\t\t\tstr_device_id = device_id_list[i];\r\n\t\t\tstr_device_id_parts = str_device_id.split(\"\\\\s+\");\r\n\t\t\t// add the online device\r\n\t\t\tif (str_device_id_parts[1].equals(\"device\"))\r\n\t\t\t\tret_device_id_list.add(str_device_id_parts[0]);\r\n\t\t}\r\n\t \r\n\t return ret_device_id_list;\r\n\t}", "void EnableRemote (int boardID, short[] addrlist);", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tCommandResult commandResult = ShellUtil.execCommand(cmds, true, true);\n\t\t\t\ttv_result.setText(\"adb connect \" + getIp() + \":5555\");\n\t\t\t\t// System.out.println(commandResult.responseMsg);\n\t\t\t}", "public ForwardClient(String fhost, int fport, String sid) {\n\t\tforward_host = fhost;\n\t\tforward_port = fport;\n\t\tsession_id = sid;\n\t\tcontrol[0] = 0;\n\t}", "public SshPortForward(Context context) {\n\t\tInputStream privateStream = null;\n\t\tInputStream publicStream = null;\n\n\t\ttry {\n\t\t\tsession = jsch.getSession(USERNAME, HOSTNAME, SSH_PORT);\n\t\t\tsession.setTimeout(30000);\n\t\t\tsession.setPortForwardingL(HTTP_LOCAL_PORT, \"localhost\", HTTP_REMOTE_PORT);\n\t\t\tsession.setConfig(\"StrictHostKeyChecking\",\"no\");\n\n\t\t\t// These resources need to be added.\n\t\t\t// TODO these should be stored in the Android Keystore\n\t\t\tprivateStream = context.getResources().openRawResource(R.raw.id_rsa);\n\t\t\tpublicStream = context.getResources().openRawResource(R.raw.id_rsa_pub);\n\n\t\t\tbyte[] privateKey = IOUtils.toByteArray(privateStream);\n\t\t\tbyte[] publicKey = IOUtils.toByteArray(publicStream);\n\t\t\tjsch.addIdentity(PUBLIC_KEY_IDENTITY, privateKey, publicKey, PASSWORD.getBytes(Charset.defaultCharset()));\n\t\t\tsession.connect();\n\n\t\t}\n\t\tcatch (Exception e) {}\n\t\tfinally {\n\t\t\tIOUtils.closeQuietly(publicStream);\n\t\t\tIOUtils.closeQuietly(privateStream);\n\t\t}\n\t}", "public void fastForward() {\n try {\n mSessionBinder.fastForward(mContext.getPackageName(), mCbStub);\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Error calling fastForward.\", e);\n }\n }", "protected void setupUpnp() {\n try {\n GatewayDiscover discover = new GatewayDiscover();\n Map<InetAddress, GatewayDevice> devices = discover.discover();\n for (Map.Entry<InetAddress, GatewayDevice> entry : devices.entrySet()) {\n GatewayDevice gw = entry.getValue();\n logger.info(\"Found a gateway device: local address = {}, external address = {}\",\n gw.getLocalAddress().getHostAddress(), gw.getExternalIPAddress());\n\n gw.deletePortMapping(config.p2pListenPort(), \"TCP\");\n gw.addPortMapping(config.p2pListenPort(), config.p2pListenPort(), gw.getLocalAddress().getHostAddress(),\n \"TCP\", \"Semux P2P network\");\n }\n } catch (IOException | SAXException | ParserConfigurationException e) {\n logger.info(\"Failed to add port mapping\", e);\n }\n }", "public void forward()\n\t{ \n\t\tupdateState( MotorPort.FORWARD);\n\t}", "public void switchSmart(){\n\r\n for (int i = 0; i < item.getDevices().size(); i++) {\r\n write(parseBrightnessCmd(seekBarBrightness.getProgress()), 3, seekBarBrightness.getProgress(), item.getDevices().get(i).getSocket(), item.getDevices().get(i).getBos());\r\n }\r\n\r\n //String CMD_HSV = \"{\\\"id\\\":1,\\\"method\\\":\\\"set_hsv\\\",\\\"params\\\":[0, 0, \\\"smooth\\\", 30]}\\r\\n\";\r\n //write(CMD_HSV, 0, 0);\r\n\r\n for (int i = 0; i < item.getDevices().size(); i++) {\r\n write(parseRGBCmd(msAccessColor(Color.WHITE)), 0, 0, item.getDevices().get(i).getSocket(), item.getDevices().get(i).getBos());\r\n }\r\n\r\n }", "public static void main(String[] args) {\n\r\n\t\tRuntime runtime = Runtime.getRuntime();\r\n\r\n\t\ttry {\r\n\r\n\t\t\t// 获取当前链接的设备\r\n\t\t\tProcess pro_get_deviceslist = runtime.exec(Commands.cmd_get_deviceslist);\r\n\r\n\t\t\tInputStream is_get_deviceslist = pro_get_deviceslist.getInputStream();\r\n\t\t\tInputStreamReader isr_get_deviceslist = new InputStreamReader(is_get_deviceslist);\r\n\t\t\tBufferedReader br_get_deviceslist = new BufferedReader(isr_get_deviceslist);\r\n\r\n\t\t\tif (devices == null) {\r\n\t\t\t\tdevices = new ArrayList<>();\r\n\t\t\t}\r\n\r\n\t\t\tString rl_get_deviceslist = null;\r\n\t\t\twhile ((rl_get_deviceslist = br_get_deviceslist.readLine()) != null) {\r\n\r\n\t\t\t\tif (rl_get_deviceslist.contains(\"\t\")) {\r\n\t\t\t\t\trl_get_deviceslist = rl_get_deviceslist.trim().split(\"\t\")[0];\r\n\r\n\t\t\t\t\tDeviceBean devicesBean = new DeviceBean();\r\n\t\t\t\t\tdevicesBean.setDevicename(rl_get_deviceslist);\r\n\t\t\t\t\tdevices.add(devicesBean);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tbr_get_deviceslist.close();\r\n\t\t\tisr_get_deviceslist.close();\r\n\t\t\tis_get_deviceslist.close();\r\n\t\t\tpro_get_deviceslist.destroy();\r\n\r\n\t\t\tif (devices == null || devices.size() < 1) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// 遍历设备列表,计算每个设备的屏幕宽高\r\n\t\t\tfor (DeviceBean devicesBean : devices) {\r\n\t\t\t\tProcess pro_get_width_height = runtime.exec(Commands.getPixelCommand(devicesBean.getDevicename()));\r\n\t\t\t\tInputStream is_get_width_height = pro_get_width_height.getInputStream();\r\n\t\t\t\tInputStreamReader isr_get_width_height = new InputStreamReader(is_get_width_height);\r\n\t\t\t\tBufferedReader br_get_width_height = new BufferedReader(isr_get_width_height);\r\n\r\n\t\t\t\tString rl_get_width_height = br_get_width_height.readLine();\r\n\t\t\t\tint width = Integer.parseInt((rl_get_width_height.split(\" \")[2].trim().split(\"x\")[0]));\r\n\t\t\t\tint height = Integer.parseInt((rl_get_width_height.split(\" \")[2].trim().split(\"x\")[1]));\r\n\t\t\t\tdevicesBean.setWidth(width);\r\n\t\t\t\tdevicesBean.setHeight(height);\r\n\r\n\t\t\t\tbr_get_width_height.close();\r\n\t\t\t\tisr_get_width_height.close();\r\n\t\t\t\tis_get_width_height.close();\r\n\t\t\t\tpro_get_width_height.destroy();\r\n\t\t\t}\r\n\r\n\t\t\t// 设置 每个设备 要要运行的程序\r\n\t\t\twhile (true) {\r\n\t\t\t\tSystem.out.println(\"\\n 请选择设备,输入设备前的编号(设置完成请输入y):\\n\");\r\n\r\n\t\t\t\tfor (int j = 0; j < devices.size(); j++) {\r\n\t\t\t\t\tDeviceBean deviceBean = devices.get(j);\r\n\t\t\t\t\tSystem.out.println(\" \" + j + \", \" + deviceBean.getDevicename() + \" \" + deviceBean.getWidth() + \"x\"\r\n\t\t\t\t\t\t\t+ deviceBean.getHeight() + \" \" + deviceBean.getCurrRunPackName());\r\n\t\t\t\t}\r\n\r\n\t\t\t\tSystem.out.println();\r\n\r\n\t\t\t\tInputStreamReader isr = new InputStreamReader(System.in);\r\n\t\t\t\tBufferedReader br = new BufferedReader(isr);\r\n\t\t\t\tString line = br.readLine().trim();\r\n\r\n\t\t\t\tif (line.equals(\"y\")) {\r\n\t\t\t\t\tSystem.out.println(\"\\n 设置完成 \\n\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tboolean paramsDeviceOk = false;\r\n\t\t\t\tfor (int m = 0; m < devices.size(); m++) {\r\n\t\t\t\t\tif (Integer.parseInt(line) == m) {\r\n\t\t\t\t\t\tparamsDeviceOk = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!paramsDeviceOk) {\r\n\t\t\t\t\tSystem.out.println(\" \\n 输入有误 程序结束 \\n\");\r\n\t\t\t\t\tthrow new Exception(\" \\n 输入有误 \\n \");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tDeviceBean deviceBean = devices.get(Integer.parseInt(line));\r\n\r\n\t\t\t\tSystem.out.println(\"\\n 您选择的设备是 : \" + deviceBean.getDevicename() + \"\\n\");\r\n\r\n\t\t\t\tSystem.out.println(\" \\n 请选择项目,输入项目前的编号:\\n\");\r\n\r\n\t\t\t\tfor (int s = 0; s < Commons.PACKAGENAMES.size(); s++) {\r\n\t\t\t\t\tSystem.out.println(\" \" + s + \" , \" + Commons.PACKAGENAMES.get(s));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tInputStreamReader isr2 = new InputStreamReader(System.in);\r\n\t\t\t\tBufferedReader br2 = new BufferedReader(isr2);\r\n\t\t\t\tString line2 = br2.readLine().trim();\r\n\r\n\t\t\t\tboolean paramsProjectOk = false;\r\n\t\t\t\tfor (int m = 0; m < Commons.PACKAGENAMES.size(); m++) {\r\n\t\t\t\t\tif (Integer.parseInt(line2) == m) {\r\n\t\t\t\t\t\tparamsProjectOk = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!paramsProjectOk) {\r\n\t\t\t\t\tSystem.out.println(\" \\n 输入有误 程序结束 \\n\");\r\n\t\t\t\t\tthrow new Exception(\" \\n 输入有误 \\n \");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdevices.get(Integer.parseInt(line))\r\n\t\t\t\t\t\t.setCurrRunPackName(Commons.PACKAGENAMES.get(Integer.parseInt(line2)));\r\n\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//开始启动程序\r\n\t\t\tthreadMap = new HashMap<String, Thread>();\r\n\r\n\t\t\tfor (DeviceBean devicesBean : devices) {\r\n\t\t\t\tString packageName = devicesBean.getCurrRunPackName();\r\n\t\t\t\tswitch (packageName) {\r\n\t\t\t\tcase HttTaskThread.PACKAGENAME:\r\n\t\t\t\t\tHttTaskThread taskThread = new HttTaskThread(devicesBean, runtime);\r\n\t\t\t\t\ttaskThread.start();\r\n\t\t\t\t\tthreadMap.put(devicesBean.getCurrRunPackName(), taskThread);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase DfttTaskThread.PACKAGENAME:\r\n\t\t\t\t\tDfttTaskThread dfttTaskThread = new DfttTaskThread(devicesBean, runtime);\r\n\t\t\t\t\tdfttTaskThread.start();\r\n\t\t\t\t\tthreadMap.put(devicesBean.getCurrRunPackName(), dfttTaskThread);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase SbTaskThread.PACKAGENAME:\r\n\t\t\t\t\tSbTaskThread sbTaskThread = new SbTaskThread(devicesBean, runtime);\r\n\t\t\t\t\tsbTaskThread.start();\r\n\t\t\t\t\tthreadMap.put(devicesBean.getCurrRunPackName(), sbTaskThread);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase ShzxTaskThread.PACKAGENAME:\r\n\t\t\t\t\tShzxTaskThread shzxTaskThread = new ShzxTaskThread(devicesBean, runtime);\r\n\t\t\t\t\tshzxTaskThread.start();\r\n\t\t\t\t\tthreadMap.put(devicesBean.getCurrRunPackName(), shzxTaskThread);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t// 开启监护线程\r\n\t\t\tMonitorThread monitorThread = new MonitorThread(runtime, devices,threadMap);\r\n\t\t\tmonitorThread.start();\r\n\r\n\t\t\t// 开启定时杀死程序线程\r\n\t\t\tTimerKiller timerKillThread = new TimerKiller(runtime, devices);\r\n\t\t\ttimerKillThread.start();\r\n\t\t\t\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n\t\trouter = new CommandRouter();\n\t\ttry {\n\t\t\t// setup our socket connection to the tv, but don't connect yet\n\t\t\tconn = new Connection(HOST, PORT, router);\n\n\t\t\t// Tell out router which network connection to use\n\t\t\trouter.setConnection(conn);\n\n\t\t\t// setup a handler for incoming GrantedSessionCommand message\n\t\t\t// objects\n\t\t\ttry {\n\t\t\t\trouter.registerCommandSubscriber(new ICommandSubscriber() {\n\t\t\t\t\tpublic void onCommandReceived(AbstractCommand command) {\n\t\t\t\t\t\t// Filter out the messages we care about\n\t\t\t\t\t\tif (command instanceof GrantedSessionCommand) {\n\t\t\t\t\t\t\t// Print our our unique key, this will be used for\n\t\t\t\t\t\t\t// subsequent connections\n\t\t\t\t\t\t\tUtilities.log(\"Your instanceId is \" + ((GrantedSessionCommand) command).getInstanceId());\n\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t//let's make the dock show up on the TV\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_yahoo\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(2000); //sleep for 2 seconds so the animation to dock finishes\n\n\t\t\t\t\t\t\t\t// Lets do something cool, like tell the TV to navigate to the right. Then do a little dance\n\t\t\t\t\t\t\t\t// This is the same as pressing \"right\" on your remote\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_right\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\n\t\t\t\t\t\t\t\t// slide to the left\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_left\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\n\t\t\t\t\t\t\t\t//slide to the right\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_right\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\n\t\t\t\t\t\t\t\t//take it back now, y'all\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_left\"));\n\n\t\t\t\t\t\t\t\t//cha cha cha\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_up\"));\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_down\"));\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_up\"));\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_down\"));\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\tUtilities.log(\"Problem writing to the network connection\");\n\t\t\t\t\t\t\t\tconn.close();\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Notify the main thread that everything we wanted to\n\t\t\t\t\t\t\t// do is done.\n\t\t\t\t\t\t\tsynchronized (conn) {\n\t\t\t\t\t\t\t\tconn.notifyAll();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else { // print out the others for educational purposes\n\t\t\t\t\t\t\tUtilities.log(\"Received: \" + command.toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tpublic void onConnectionLost(Connection conn) {\n\t\t\t\t\t\tUtilities.log(\"Connection Lost!\");\n\t\t\t\t\t}\n\t\t\t\t}, GrantedSessionCommand.class);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t// Establish a connection\n\t\t\t\tconn.establish();\n\t\t\t\t// Since this is the first time we are connecting, we must\n\t\t\t\t// create a new session\n\t\t\t\trouter.publishCommand(new CreateSessionCommand(APP_ID, CONSUMER_KEY, SECRET, APP_NAME));\n\n\t\t\t\tString message = getUserInput(\"Code: \");\n\t\t\t\trouter.publishCommand(new AuthSessionCommand(message, conn.getPeerCertificate()));\n\n\t\t\t\t// Let's wait until everything is done. This thread will get\n\t\t\t\t// notified once we are ready to clean up\n\t\t\t\ttry {\n\t\t\t\t\tsynchronized (conn) {\n\t\t\t\t\t\tconn.wait();\n\t\t\t\t\t}\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tUtilities.log(\"Error establishing connection to \" + HOST + \":\" + PORT);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tUtilities.log(\"Error establishing connection to \" + HOST + \":\" + PORT);\n\t\t\t}\n\n\t\t\t// It is always good practice to clean up after yourself\n\t\t\tconn.close();\n\n\t\t} catch (UnknownHostException e) {\n\t\t\tUtilities.log(\"Error resolving \" + HOST);\n\t\t\tSystem.exit(-1);\n\t\t} catch (IOException e) {\n\t\t\tUtilities.log(\"Problem writing to the network connection\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t}\n\n\t\tSystem.exit(1);\n\t}", "public static void main(String[] args) {\n List<PcapIf> alldevs = new ArrayList<PcapIf>(); // Will be filled with NICs\n StringBuilder errbuf = new StringBuilder(); // For any error msgs\n\n /**\n * *************************************************************************\n * First get a list of devices on this system\n * ************************************************************************\n */\n int r = Pcap.findAllDevs(alldevs, errbuf);\n if (r == Pcap.NOT_OK || alldevs.isEmpty()) {\n System.err.printf(\"Can't read list of devices, error is %s\", errbuf\n .toString());\n return;\n }\n\n System.out.println(\"Network devices found:\");\n\n int i = 0;\n try {\n for (PcapIf device : alldevs) {\n String description\n = (device.getDescription() != null) ? device.getDescription()\n : \"No description available\";\n final byte[] mac = device.getHardwareAddress();\n String dir_mac = (mac == null) ? \"No tiene direccion MAC\" : asString(mac);\n System.out.printf(\"#%d: %s [%s] MAC:[%s]\\n\", i++, device.getName(), description, dir_mac);\n\n }//for\n\n PcapIf device = alldevs.get(1); // We know we have atleast 1 device\n System.out\n .printf(\"\\nChoosing '%s' on your behalf:\\n\",\n (device.getDescription() != null) ? device.getDescription()\n : device.getName());\n\n /**\n * *************************************************************************\n * Second we open up the selected device\n * ************************************************************************\n */\n /*\"snaplen\" is short for 'snapshot length', as it refers to the amount of actual data captured from each packet passing through the specified network interface.\n 64*1024 = 65536 bytes; campo len en Ethernet(16 bits) tam máx de trama */\n int snaplen = 64 * 1024; // Capture all packets, no trucation\n int flags = Pcap.MODE_PROMISCUOUS; // capture all packets\n int timeout = 10 * 1000; // 10 seconds in millis\n Pcap pcap\n = Pcap.openLive(device.getName(), snaplen, flags, timeout, errbuf);\n\n if (pcap == null) {\n System.err.printf(\"Error while opening device for capture: \"\n + errbuf.toString());\n return;\n }//if\n\n /**\n * ******F I L T R O*******\n */\n PcapBpfProgram filter = new PcapBpfProgram();\n String expression = \"\"; // \"port 80\";\n int optimize = 0; // 1 means true, 0 means false\n int netmask = 0;\n int r2 = pcap.compile(filter, expression, optimize, netmask);\n if (r2 != Pcap.OK) {\n System.out.println(\"Filter error: \" + pcap.getErr());\n }//if\n pcap.setFilter(filter);\n /**\n * *************\n */\n\n /**\n * *************************************************************************\n * Third we create a packet handler which will receive packets from\n * the libpcap loop.\n * ********************************************************************\n */\n PcapPacketHandler<String> jpacketHandler = new PcapPacketHandler<String>() {\n\n public void nextPacket(PcapPacket packet, String user) {\n\n System.out.printf(\"Received packet at %s caplen=%-4d len=%-4d %s\\n\",\n new Date(packet.getCaptureHeader().timestampInMillis()),\n packet.getCaptureHeader().caplen(), // Length actually captured\n packet.getCaptureHeader().wirelen(), // Original length\n user // User supplied object\n );\n\n /**\n * ****Desencapsulado*******\n */\n for (int i = 0; i < packet.size(); i++) {\n System.out.printf(\"%02X \", packet.getUByte(i));\n if (i % 16 == 15) {\n System.out.println(\"\");\n }\n }\n System.out.println(\"\\n\\nEncabezado: \" + packet.toHexdump());\n \n\n /*-------------------------Verificacion de ETHERNET-------------------------*/\n int tipoIP;\n //tipoIP = (int) ((packet.getUByte(12)*(Math.pow(2, 8))) + packet.getUByte(13));\n tipoIP = (packet.getUByte(12) << 8 | packet.getUByte(13));\n System.out.printf(\"IP = %02X \\n\",(byte)tipoIP);\n /*--------------------------------------------------------------------------*/\n\n /*-------------LONGITUD DEL PAQUETE (PDU DE IP)-----*/\n byte[] longitudTrama = new byte[2];\n longitudTrama[0] = (byte) (packet.getUByte(16));\n longitudTrama[1] = (byte) (packet.getUByte(17));\n /*--------------------------------------------------*/\n \n /*------------------------CHECKSUM DE LA TRAMA--------------------------*/\n byte[] checksum = {(byte)packet.getUByte(24),(byte)packet.getUByte(25)};\n /*---------------------------------------------------------------------*/\n \n\n if (tipoIP == 0x086DD) { //IPV6\n System.out.println(\"IPV6: No contiene Checksum\");\n } else if (tipoIP == 0x0800) { //IPV4 \n System.out.println(\"IPV4\");\n \n /*Capturar bytes del encabezado IP. \n Va del byte 14-33, son 20 bytes------------*/\n byte[] IP = new byte[20];\n for (int j = 14,i=0; j < 34;j++) \n {\n IP[i]=(byte)packet.getUByte(j);\n \n if(j==24 || j==25){ //Lugar del Checksum\n IP[i] = (byte)0x00;\n }\n i++;\n }\n /*Obtener Checksum*/\n long checksumIP = Checksum.calculateChecksum(IP);\n System.out.printf(\"|-- Valor de Checksum IP: %02X --|\\n\",checksumIP);\n \n /*------------------------------*/\n int protocol = (packet.getUByte(23));\n System.out.printf(\"\\tProtocolo: %02X\\n\",(byte)protocol);\n\n if ((byte)protocol == 0x06) //PROTOCOLO TCP\n {\n System.out.printf(\"PROTOCOLO TCP: %02X\\n\",(byte)protocol);\n \n System.out.println(\"---PROTOCOLO TCP/IP---\");\n \n /*---------------------IHL: 45---------------------*/\n byte IHL_limpio = (byte) (packet.getUByte(14) & 0x0000000F);\n int IHL = (IHL_limpio * 4); //Longitud del encabezado \n /*Solamente se requiere la longitud del encabezado: 5\n La otra parte especifica la versión: 4*/\n /*---------------------------------------------*/\n\n /*---------------------PDU de IP---------------------*/\n int longitud = (int) ((packet.getUByte(16) * (Math.pow(2, 8))) + (packet.getUByte(17)));\n /*---------------------------------------------------*/\n \n /*------------Longitud que irá al Pseudo Encabezado---------*/\n int longitudTotal = longitud - IHL;\n System.out.println(\"Longitud: \"+longitud+\"\\nIHL: \"+IHL);\n /*----------------------------------------------------------*/\n \n //Reservado para la longitud de encabezado (TCP O UDP)\n byte[] pseudoEncabezado = new byte[IHL];\n\n for (int j = 0; j < 4; j++) {\n /*----------------------IP ORIGEN----------------------*/\n pseudoEncabezado[j] = (byte) (packet.getUByte(26 + j));\n /*-----------------------------------------------------*/\n\n /*---------------------IP DESTINO---------------------*/\n pseudoEncabezado[j + 4] = (byte) (packet.getUByte(30 + j));\n /*----------------------------------------------------*/\n }\n pseudoEncabezado[8] = 0x00;\n\n /*-------------------PROTOCOLO (0x06)------------------*/\n pseudoEncabezado[9] = (byte) (packet.getUByte(23));\n /*----------------------------------------------------*/\n \n /*-------------------LONGITUD-------------------------*/\n pseudoEncabezado[10] = (byte)packet.getUByte(16);\n pseudoEncabezado[11] = (byte)(packet.getUByte(17)-IHL);\n /*---------------------------------------------------*/\n \n /*El pseudoEncabezado representa la primer mitad para obtener el Checksum*/\n \n /*---La segunda mitad es representada por el PDU_Trans---*/\n byte[] PDU_Trans = new byte[longitudTotal];\n for (int k = 34,q=0; k < 34+longitudTotal; k++,q++) \n {\n PDU_Trans[q]=(byte)packet.getUByte(k);\n }\n /*------------------------------------------------------*/\n \n /*-----------UNION de PDU_Trans con pseudoEncabezado----*/\n int length_pseudoE = pseudoEncabezado.length;\n int length_PDU_Trans = PDU_Trans.length;\n \n byte[] encabezadoFinal;\n encabezadoFinal= new byte[length_pseudoE + length_PDU_Trans];\n \n System.arraycopy(pseudoEncabezado, 0, encabezadoFinal, 0, length_pseudoE);\n System.arraycopy(PDU_Trans, 0, encabezadoFinal, length_pseudoE, length_PDU_Trans);\n \n long checksumTCP = Checksum.calculateChecksum(encabezadoFinal);\n System.out.printf(\"Checksum del TCP: %04X \\n\",checksumTCP);\n /*------------------------------------------------------*/\n }else if ((byte)protocol == 0x11){ //PROTOCOLO UDP\n System.out.printf(\"\\tPROTOCOLO UDP: %02X\\n\",(byte)protocol);\n \n /*---------------------IHL: 45---------------------*/\n byte IHL_limpio = (byte) (packet.getUByte(14) & 0x0000000F);\n int IHL = (IHL_limpio * 4); //Longitud del encabezado \n /*---------------------------------------------*/\n\n /*---------------------PDU de IP---------------------*/\n int longitud = (int) ((packet.getUByte(16) * (Math.pow(2, 8))) + (packet.getUByte(17)));\n /*---------------------------------------------------*/\n \n /*------------Longitud que irá al Pseudo Encabezado---------*/\n int longitudTotal = longitud - IHL;\n /*----------------------------------------------------------*/\n \n //Reservado para la longitud de encabezado (TCP O UDP)\n byte[] pseudoEncabezado = new byte[IHL];\n\n for (int j = 0; j < 4; j++) {\n /*----------------------IP ORIGEN----------------------*/\n pseudoEncabezado[j] = (byte) (packet.getUByte(26 + j));\n /*-----------------------------------------------------*/\n\n /*---------------------IP DESTINO---------------------*/\n pseudoEncabezado[j + 4] = (byte) (packet.getUByte(30 + j));\n /*----------------------------------------------------*/\n }\n pseudoEncabezado[8] = 0x00;\n\n /*-------------------PROTOCOLO (0x11)------------------*/\n pseudoEncabezado[9] = (byte) (packet.getUByte(23));\n /*----------------------------------------------------*/\n \n /*-------------------LONGITUD-------------------------*/\n pseudoEncabezado[10] = (byte)packet.getUByte(16);\n pseudoEncabezado[11] = (byte)(packet.getUByte(17)-IHL);\n /*---------------------------------------------------*/\n \n /*El pseudoEncabezado representa la primer mitad para obtener el Checksum*/\n \n /*---La segunda mitad es representada por el PDU_Trans---*/\n byte[] PDU_Trans = new byte[longitudTotal];\n for (int k = 34,q=0; k < 34+longitudTotal; k++,q++) \n {\n PDU_Trans[q]=(byte)packet.getUByte(k);\n }\n /*------------------------------------------------------*/\n \n /*-----------UNION de PDU_Trans con pseudoEncabezado----*/\n int length_pseudoE = pseudoEncabezado.length;\n int length_PDU_Trans = PDU_Trans.length;\n \n byte[] encabezadoFinal;\n encabezadoFinal= new byte[length_pseudoE + length_PDU_Trans];\n \n System.arraycopy(pseudoEncabezado, 0, encabezadoFinal, 0, length_pseudoE);\n System.arraycopy(PDU_Trans, 0, encabezadoFinal, length_pseudoE, length_PDU_Trans);\n \n long checksumUDP = Checksum.calculateChecksum(encabezadoFinal);\n System.out.printf(\"Checksum del UCP: %04X \\n\",checksumUDP);\n /*------------------------------------------------------*/\n\n }\n\n }\n }\n };\n\n /**\n * *************************************************************************\n * Fourth we enter the loop and tell it to capture 10 packets. The\n * loop method does a mapping of pcap.datalink() DLT value to\n * JProtocol ID, which is needed by JScanner. The scanner scans the\n * packet buffer and decodes the headers. The mapping is done\n * automatically, although a variation on the loop method exists\n * that allows the programmer to sepecify exactly which protocol ID\n * to use as the data link type for this pcap interface.\n * ************************************************************************\n */\n pcap.loop(10, jpacketHandler, \"jNetPcap rocks!\");\n\n /**\n * *************************************************************************\n * Last thing to do is close the pcap handle\n * ************************************************************************\n */\n pcap.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "protected void connectBluetooth(int i) {\n Intent intent = new Intent(this, MainActivity.class);\n // Try top 3 devices\n ArrayList<BluetoothDevice> devices = new ArrayList<>();\n// for (int i = 0; i < mScanResults.size() && i < 3; i++) {\n ScanInfo info = mScanResults.get(i);\n devices.add(mBtAdapter.getRemoteDevice(info.address)); //getRemoteDevice()返回相应的被指定蓝牙连接的远端设备。\n// }\n intent.putParcelableArrayListExtra(BluetoothDevice.EXTRA_DEVICE, devices);\n Log.i(TAG, \"Devices : \" + intent.putParcelableArrayListExtra(BluetoothDevice.EXTRA_DEVICE, devices));\n\n this.startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n\n Intent myIntent = new Intent(HostOrConnectActivity.this, HostActivity.class);\n\n HostOrConnectActivity.this.startActivity(myIntent);\n\n\n }", "public boolean runOnAllDevices();", "private static void go_forward()throws AWTException {\n\t\ttry{\r\n\t\t\t// Robot robot = new Robot();\r\n\r\n\t\t\trobot.keyPress(KeyEvent.VK_ALT);\r\n\t\t\trobot.keyPress(KeyEvent.VK_RIGHT);\r\n\t\t\trobot.keyRelease(KeyEvent.VK_RIGHT);\r\n\t\t\trobot.keyRelease(KeyEvent.VK_ALT);\r\n\t\t}\r\n\t\tcatch(IllegalArgumentException e1) {\r\n\t\t\tSystem.err.println(\"Use: java Renderer <Local IPAddress> <Localport> <Remote IPAddress> <Remote Port>\");\r\n\t\t}\r\n\r\n\t}", "void initCommand() {\n try {\n stream = adbTerminalConnection.open(\"shell:\");\n } catch (IOException | InterruptedException e) {\n e.printStackTrace();\n return;\n }\n runOnUiThread(() -> {\n channel.invokeMethod(\"output\", \"OTG已连接\\r\\n\");\n });\n // Start the receiving thread\n new Thread(() -> {\n while (!stream.isClosed()) {\n // Print each thing we read from the shell stream\n String data = null;\n try {\n data = new String(stream.read());\n } catch (InterruptedException | IOException e) {\n e.printStackTrace();\n }\n Log.d(\"Nightmare\", \"data -> \" + data);\n if (data == null) {\n runOnUiThread(() -> {\n channel.invokeMethod(\"output\", \"OTG断开\\r\\n\");\n });\n continue;\n }\n String finalData = data;\n runOnUiThread(() -> {\n channel.invokeMethod(\"output\", finalData);\n });\n }\n }).start();\n }", "private final void forwardVirtualConnect(DirectSocketAddress source,\n DirectSocketAddress sourceHub, DirectSocketAddress target,\n DirectSocketAddress targetHub, long index, int timeout, int port,\n int fragment, int buffer) {\n try {\n synchronized (out) {\n out.write(MessageForwarderProtocol.CREATE_VIRTUAL);\n\n DirectSocketAddress.write(source, out);\n DirectSocketAddress.write(sourceHub, out);\n\n DirectSocketAddress.write(target, out);\n DirectSocketAddress.write(targetHub, out);\n\n out.writeLong(index);\n\n out.writeInt(timeout);\n out.writeInt(port);\n out.writeInt(fragment);\n out.writeInt(buffer);\n\n out.flush();\n }\n } catch (Exception e) {\n handleDisconnect(e);\n }\n }", "public void connect()\n\t{\n\t\tUUID uuid = UUID.fromString(\"00001101-0000-1000-8000-00805f9b34fb\"); //Standard SerialPortService ID\n\t\ttry\n\t\t{\n\t sock = dev.createRfcommSocketToServiceRecord(uuid); \n\t sock.connect();\n\t connected = true;\n\t dev_out = sock.getOutputStream();\n\t dev_in = sock.getInputStream();\n\t write(0);\n\t write(0);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\t\n\t\t}\n\t}", "public void discoverDevices(){\r\n \t// If we're already discovering, stop it\r\n if (mBtAdapter.isDiscovering()) {\r\n mBtAdapter.cancelDiscovery();\r\n }\r\n \r\n Toast.makeText(this, \"Listining for paired devices.\", Toast.LENGTH_LONG).show();\r\n \tmBtAdapter.startDiscovery(); \r\n }", "private void startDeviceListActivity() {\n\t\tIntent intent = new Intent(this, DeviceListActivity.class);\r\n startActivityForResult(intent, REQUEST_CONNECT_DEVICE); \r\n\t}", "public void listDevices(final BluetoothAdapter bluetoothAdapter){\n Set<BluetoothDevice> pairedDevices = bluetoothAdapter.getBondedDevices();\n ArrayList pairedDeviceList = new ArrayList();\n String address = null;\n\n if (pairedDevices.size() > 0) {\n int i = 0;\n // There are paired devices. Get the name and address of each paired device.\n for (BluetoothDevice device : pairedDevices) {\n String deviceName = device.getName().trim();\n String deviceHardwareAddress = device.getAddress(); // MAC address\n if (deviceName.equals(DEVICE_NAME)){\n address = device.getAddress().trim();\n System.out.println(address +\"\\n\");\n }\n pairedDeviceList.add(\"Device Name: \" + deviceName + \" Device MAC Address: \" + deviceHardwareAddress);\n }\n\n System.out.println(pairedDeviceList.get(0) + \"\\n\");\n\n final String finalAddress = address;\n AsyncTask.execute(new Runnable(){\n @Override\n public void run(){\n bluetoothDevice = bluetoothAdapter.getRemoteDevice(finalAddress);\n BLEDevice = new BluetoothLeService(bluetoothDevice, quantifenUUID);\n BLEDevice.connect(BluetoothActivity.this, testUUID);\n }\n });\n\n\n }\n }", "private boolean initDataOnHosts(String srcIP, String destIP)\t\n\t{\n\t\tSystem.out.println(\"######### In initDataOnHosts #############\");\n\t\tSwitchPort[] SwitchPort;\n\t\tboolean isHostSrcFound = false;\n\t\tboolean isHostDestFound = false;\n\t\t\n\t\t//Get all devices known by the controller.(device = host)\n\t\tCollection<? extends IDevice> alldevices = deviceManager.getAllDevices();\n\n\t\tfor (IDevice device : alldevices)\n\t\t{\n\t\t\tInteger [] deviceAssociatedIPv4Addr = device.getIPv4Addresses();\n\n\t\t\tif(deviceAssociatedIPv4Addr.length>0)\n\t\t\t{\n\t\t\t\tString assocIpv4Addr = IPv4.fromIPv4Address(deviceAssociatedIPv4Addr[0]);\n\n\t\t\t\tif(assocIpv4Addr.equals(srcIP))\n\t\t\t\t{\n\t\t\t\t\t//Get attachment points associated with the device\n\t\t\t\t\tSwitchPort = device.getAttachmentPoints();\n\t\t\t\t\tif(SwitchPort.length>0)\n\t\t\t\t\t{\n\t\t\t\t\t\tm_switchSrc =SwitchPort[0].getSwitchDPID();\n\t\t\t\t\t\tm_sourceMacAddr = device.getMACAddressString();\n\t\t\t\t\t\tm_switchSrcPortToHostSource =( short)SwitchPort[0].getPort();\n\t\t\t\t\t\tisHostSrcFound = true;\n\t\t\t\t\t\tSystem.out.println(\"######### Update src Host \"+\"switchId\"+m_switchSrc.toString()+ \"#############\");\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\telse if(assocIpv4Addr .equals(destIP))\n\t\t\t\t{\n\t\t\t\t\t//Get attachment points associated with the device\n\t\t\t\t\tSwitchPort =device.getAttachmentPoints();\n\t\t\t\t\tif(SwitchPort.length>0)\n\t\t\t\t\t{\n\t\t\t\t\t\tm_switchDst =SwitchPort[0].getSwitchDPID();\n\t\t\t\t\t\tm_destMacAddr = device.getMACAddressString();\n\t\t\t\t\t\tm_switchDstPortToHostTarget =(short)SwitchPort[0].getPort();\n\t\t\t\t\t\tisHostDestFound = true;\n\t\t\t\t\t\tSystem.out.println(\"######### Update dest Host \"+\"switchId\"+m_switchDst.toString()+ \"#############\");\n\t\t\t\t\t}\t\n\t\t\t\t}\t\t\t\t\n\t\t\t}\t\t\n\t\t}\n\t\tif(isHostSrcFound && isHostDestFound)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\t\n\t}", "public void migrateToMultiTransport();", "public static void listDevices()\n\t{\n\t\tfor(SerialPort port : SerialPort.getCommPorts())\n\t\t{\n\t String portName = port.getSystemPortName();\n\t System.out.println(portName);\n\t\t}\n\t}", "public void connectToAccessory() {\n\t\tif (mConnection != null)\n\t\t\treturn;\n\n\t\tif (getIntent().hasExtra(BTDeviceListActivity.EXTRA_DEVICE_ADDRESS)) {\n\t\t\tString address = getIntent().getStringExtra(\n\t\t\t\t\tBTDeviceListActivity.EXTRA_DEVICE_ADDRESS);\n\t\t\tLog.i(ADK.TAG, \"want to connect to \" + address);\n\t\t\tmConnection = new BTConnection(address);\n\t\t\tperformPostConnectionTasks();\n\t\t} else {\n\t\t\t// assume only one accessory (currently safe assumption)\n\t\t\tUsbAccessory[] accessories = mUSBManager.getAccessoryList();\n\t\t\tUsbAccessory accessory = (accessories == null ? null\n\t\t\t\t\t: accessories[0]);\n\t\t\tif (accessory != null) {\n\t\t\t\tif (mUSBManager.hasPermission(accessory)) {\n\t\t\t\t\topenAccessory(accessory);\n\t\t\t\t} else {\n\t\t\t\t\t// synchronized (mUsbReceiver) {\n\t\t\t\t\t// if (!mPermissionRequestPending) {\n\t\t\t\t\t// mUsbManager.requestPermission(accessory,\n\t\t\t\t\t// mPermissionIntent);\n\t\t\t\t\t// mPermissionRequestPending = true;\n\t\t\t\t\t// }\n\t\t\t\t\t// }\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Log.d(TAG, \"mAccessory is null\");\n\t\t\t}\n\t\t}\n\n\t}", "public static void main(String[] args) {\n\t\tString[] arguments = new String[8];\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"Arguments for first camera/server connection\");\n\t\tSystem.out.println(\"rt@argus-N, insert chosen N:\");\n\t\targuments[0] = scan.nextLine();\n\t\tSystem.out.println(\"Insert chosen proxyport ****:\");\n\t\targuments[1] = scan.nextLine();\n\t\tSystem.out.println(\"Arguments for second camera/server connection\");\n\t\tSystem.out.println(\"rt@argus-N, insert chosen N:\");\n\t\targuments[2] = scan.nextLine();\n\t\tSystem.out.println(\"Insert chosen proxyport ****:\");\n\t\targuments[3] = scan.nextLine();\n\n\t\tClient client = new Client();\n\n\t\tGUIThread gui = new GUIThread(client);\n\n\t\tgui.start();\n\n\t\tServer1 s = new Server1(arguments[0], \"6077\", \"0\", arguments[1]);\n\t\ts.start();\n\t\tServer2 s2 = new Server2(arguments[2], \"6078\", \"1\", arguments[3]);\n\t\ts2.start();\n\t}", "public void onClick(View arg0)\n\t\t{\n serverIntent = new Intent(BloothPrinterActivity.this, DeviceListActivity.class);\n startActivityForResult(serverIntent, REQUEST_CONNECT_DEVICE);\n\t\t}", "private void bluetooth_connect_device() throws IOException\n {\n try\n {\n myBluetooth = BluetoothAdapter.getDefaultAdapter();\n address = myBluetooth.getAddress();\n pairedDevices = myBluetooth.getBondedDevices();\n if (pairedDevices.size()>0)\n {\n for(BluetoothDevice bt : pairedDevices)\n {\n address=bt.getAddress().toString();name = bt.getName().toString();\n Toast.makeText(getApplicationContext(),\"Connected\", Toast.LENGTH_SHORT).show();\n\n }\n }\n\n }\n catch(Exception we){}\n myBluetooth = BluetoothAdapter.getDefaultAdapter();//get the mobile bluetooth device\n BluetoothDevice dispositivo = myBluetooth.getRemoteDevice(address);//connects to the device's address and checks if it's available\n btSocket = dispositivo.createInsecureRfcommSocketToServiceRecord(myUUID);//create a RFCOMM (SPP) connection\n btSocket.connect();\n try { t1.setText(\"BT Name: \"+name+\"\\nBT Address: \"+address); }\n catch(Exception e){}\n }", "public void setup_servers()\n {\n // get ServerInfo\n ServerInfo t = new ServerInfo();\n // all 3 servers\n for(int i=0;i<3;i++)\n {\n // get the server IP and port info\n String t_ip = t.hmap.get(i).ip;\n int t_port = Integer.valueOf(t.hmap.get(i).port);\n Thread x = new Thread()\n {\n public void run()\n {\n try\n {\n Socket s = new Socket(t_ip,t_port);\n // SockHandle instance with svr_hdl true and rx_hdl false as this is the socket initiator\n SockHandle t = new SockHandle(s,my_ip,my_port,my_c_id,c_list,s_list,false,true,cnode);\n }\n catch (UnknownHostException e) \n {\n \tSystem.out.println(\"Unknown host\");\n \tSystem.exit(1);\n } \n catch (IOException e) \n {\n \tSystem.out.println(\"No I/O\");\n e.printStackTrace(); \n \tSystem.exit(1);\n }\n }\n };\n \n x.setDaemon(true); \t// terminate when main ends\n x.setName(\"Client_\"+my_c_id+\"_SockHandle_to_Server\"+i);\n x.start(); \t\t\t// start the thread\n }\n }", "public void checkDevices() throws TNotFoundEx{\n\t\tString command = \"adb devices -l\";\n\t\tCommando commando = new Commando();\n\t\tString op = commando.executeCommand(command);\n\t\t\n\t\tOtherUtil oU = new OtherUtil();\n\t\tArrayList<String> devices = oU.getRegexFromString(op, \"(model:.*?device:.+$?)\");\n\t\tint eligDevices = devices.size();\n\t\t\n\t\tif (eligDevices>1)\n\t\t\tthrow new TNotFoundEx(\"ERROR: 2 or more Android devices are connected to the host, please connect only one Android device.\");\n\t\tif (eligDevices == 0)\n\t\t\tthrow new TNotFoundEx(\"ERROR: No Android devices detected by the host. Execute adb devices -l to check the connected devices\");\n\t\t\t\n\t}", "public void updateShellTransport() {\n // get device and shell transporter\n if (jShellTransport == null) {\n MobydroidDevice mDevice = MobyDroid.getDevice();\n if (mDevice == null) {\n return;\n }\n\n try {\n jShellTransport = mDevice.executeShell();\n new Thread(() -> {\n byte[] buffer = new byte[8 * 1024];\n int len;\n while (jShellTransport != null) {\n try {\n while ((len = jShellTransport.read(buffer)) > 0) {\n String string = new String(buffer, 0, len, Charset.forName(\"utf-8\"));\n jTerm.write(string, false);\n }\n } catch (IOException ex) {\n len = -1;\n }\n if (len == -1) {\n jShellTransport = null;\n break;\n }\n try {\n Thread.sleep(1);\n } catch (InterruptedException ex) {\n }\n }\n // exit falg\n jTerm.write(\"Terminated ...\", true);\n }).start();\n } catch (IOException | JadbException ex) {\n jShellTransport = null;\n Log.log(Level.SEVERE, \"UpdateShellTransport\", ex);\n }\n }\n }", "public void sendAdverts() {\n\t\tfor (int pfx = 0; pfx < pfxList.size(); pfx++){\n\t\t\tfor(int lnk = 0; lnk < nborList.size(); ++lnk){\n\t\t\t\tif(lnkVec.get(lnk).helloState == 0){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tPacket p = new Packet();\n\t\t\t\tp.protocol = 2; p.ttl = 100;\n\t\t\t\tp.srcAdr = myIp;\n\t\t\t\tp.destAdr = lnkVec.get(lnk).peerIp;\n\t\t\t\tp.payload = String.format(\"RPv0\\ntype: advert\\n\" \n\t\t\t\t\t\t+ \"pathvec: %s %.3f %d %s\\n\",\n\t\t\t\t\t\tpfxList.get(pfx).toString(), now, 0, myIpString); //potential problems\n\t\t\t\tfwdr.sendPkt(p,lnk);\n\t\t\t}\n\t\t}\n\t}", "public void Start(){\n Registry registry = null;\n try{\n for(int i=0;i<nsize;i++){\n registry= LocateRegistry.getRegistry(this.ports[i]);\n PRMI stub = (PRMI) registry.lookup(\"DCMP\");\n System.out.println(\"env calls Init to man \"+i);\n stub.InitHandler(new Request(this.id, -1, 'e'));\n D++;\n }\n\n } catch(Exception e){\n return;\n }\n return;\n }", "public SuperPeer forward(String command, Message message) {\n IPv4 neighbor;\n Socket nSock;\n DataOutputStream toNeighbor;\n\n message.decrementTTL().setSender(this.getAddress());\n for (String n : this.neighbors) {\n try {\n this.log(String.format(\"-> Forwarding '%s %s' to (%s)\", command, message, n));\n neighbor = new IPv4(n);\n // forward the message to each, with the TTL decremented\n nSock = new Socket(neighbor.getAddress(), neighbor.getPort());\n toNeighbor = new DataOutputStream(nSock.getOutputStream());\n\n toNeighbor.writeUTF(this.toString()); // initial handshake\n toNeighbor.writeUTF(String.format(\"%s %s\", command, message));\n nSock.close();\n } catch (Exception e) {\n this.log(String.format(\"-> Could not connect to (%s). Is it live?\", n));\n }\n }\n return this;\n }", "public static void upos(Object... args) throws Exception {\n\t\tlogger.debug(\"Called 'upos' with args: {}\", Arrays.asList(args));\n\t\tif (args.length >= 2) {\n\t\t\t// identify scannables and the positions to move them to\n\t\t\tScannable[] scannables = new Scannable[args.length / 2];\n\t\t\tObject[] positions = new Object[args.length / 2];\n\t\t\tint j = 0;\n\t\t\tfor (int i = 0; i < args.length; i += 2) {\n\t\t\t\tif (args[i] instanceof Scannable) {\n\t\t\t\t\tscannables[j] = (Scannable) args[i];\n\t\t\t\t\tpositions[j] = args[i + 1];\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// send commands\n\t\t\tfor (int i = 0; i < j; i++) {\n\t\t\t\traiseDeviceExceptionIfPositionNotValid(scannables[i], positions[i]);\n\t\t\t\tscannables[i].asynchronousMoveTo(positions[i]);\n\t\t\t}\n\n\t\t\t// construct print out command\n\t\t\tString jythonCommand = \"print \\\"\\\\rMove in progress: \";\n\t\t\tfor (Scannable scannable : scannables) {\n\t\t\t\tjythonCommand += scannable.getName() + \":\\\" + str(\" + scannable.getName() + \".getPosition()\"\n\t\t\t\t\t\t+ \") + \\\" \";\n\t\t\t}\n\t\t\tjythonCommand = jythonCommand.substring(0, jythonCommand.length() - 5);\n\n\t\t\t// wait\n\t\t\ttry {\n\t\t\t\twhile (areAnyBusy(scannables)) {\n\t\t\t\t\tJythonServerFacade.getInstance().runCommand(jythonCommand);\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\t// print out exception, but carry on in this method\n\t\t\t\t// to report final positions\n\t\t\t\tlogger.info(\"Exception while waiting for move '{}' to finish: \", jythonCommand, e);\n\t\t\t}\n\n\t\t\tString output = \"Move completed: \";\n\t\t\tfor (int i = 0; i < j; i++) {\n\t\t\t\toutput += scannables[i].getName();\n\t\t\t\tObject position = scannables[i].getPosition();\n\t\t\t\tif (position != null) {\n\t\t\t\t\toutput += \":\" + position.toString() + \" \";\n\t\t\t\t}\n\t\t\t}\n\t\t\tInterfaceProvider.getTerminalPrinter().print(\"\\\\n\" + output);\n\t\t}\n\t}", "public void run()\n {\n\n\n if(privillage.equals(\"admin\"))\n {\n Intent in = new Intent(activity, adminmainscreen.class);\n in.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n activity.startActivity(in);\n }else if (privillage.equals(\"employee\"))\n {\n Intent in = new Intent(activity, employeemainscreen.class);\n in.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n activity.startActivity(in);\n }else\n {\n Intent in = new Intent(activity, customermainscreen.class);\n in.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n activity.startActivity(in);\n }\n\n\n //run serversocket to accept packet from server\n startacceptpacket.startacceptpacketfromserver(s);\n\n }", "@Override\n protected Void doInBackground(Void... devices){\n try {\n if (btSocket == null || !isBtConnected) {\n //get the mobile bluetooth device\n m_Bluetooth = BluetoothAdapter.getDefaultAdapter();\n //connects to the device's address and checks if it's available\n BluetoothDevice bluetoothDevice = m_Bluetooth.getRemoteDevice(address);\n //create a RFCOMM (SPP) connection\n btSocket = bluetoothDevice.createInsecureRfcommSocketToServiceRecord(myUUID);\n BluetoothAdapter.getDefaultAdapter().cancelDiscovery();\n btSocket.connect();//start connection\n }\n }\n catch (IOException e) {\n ConnectSuccess = false;//if the try failed, you can check the exception here\n }\n return null;\n }", "public void onClickStart(View view) {\n\n HashMap<String, UsbDevice> usbDevices = usbManager.getDeviceList();\n if (!usbDevices.isEmpty()) {\n boolean keep = true;\n for (Map.Entry<String, UsbDevice> entry : usbDevices.entrySet()) {\n device = entry.getValue();\n int deviceVID = device.getVendorId();\n if (deviceVID == 0x2341)//Arduino Vendor ID\n {\n PendingIntent pi = PendingIntent.getBroadcast(this, 0, new Intent(ACTION_USB_PERMISSION), 0);\n usbManager.requestPermission(device, pi);\n keep = false;\n } else {\n connection = null;\n device = null;\n }\n\n if (!keep)\n break;\n }\n }\n\n\n }", "private native int open0(String host,\n int msid, int port) throws IOException;", "private void connectDevice(Intent data, boolean secure) {\n String address = data.getExtras()\n .getString(DeviceListActivity.EXTRA_DEVICE_ADDRESS);\n BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(address);\n mChatService.connect(device, secure);\n }", "public void connect(View view) {\n if (phoneNum.getText().toString().equals(\"\")) {\n Toast.makeText(getApplication(), \"Please enter a phone number\", Toast.LENGTH_SHORT).show();\n } else {\n phoneNum.setEnabled(false);\n HashMap<String, UsbDevice> usbDevices = usbManager.getDeviceList();\n if (!usbDevices.isEmpty()) {\n boolean keep = true;\n for (Map.Entry<String, UsbDevice> entry : usbDevices.entrySet()) {\n device = entry.getValue();\n int deviceVID = device.getVendorId();\n if (deviceVID == 0x2341)//Arduino Vendor ID\n {\n PendingIntent pi = PendingIntent.getBroadcast(this, 0, new Intent(ACTION_USB_PERMISSION), 0);\n usbManager.requestPermission(device, pi);\n keep = false;\n } else {\n connection = null;\n device = null;\n }\n\n if (!keep)\n break;\n }\n }\n }\n }", "public void runMultiWebcam()\n\t{\n\t\tString pipeline=\"gst-launch-1.0 -v v4l2src device=\"+webcamSource+\" ! 'video/x-raw,width=640,height=480' ! x264enc pass=qual quantizer=20 tune=zerolatency ! rtph264pay ! multiudpsink clients=\"+client.getInetAddress().getHostAddress()+\":\"+port1+\",\"+client.getInetAddress().getHostAddress()+\":\"+port2;\n\n\t\tString[] args1 = new String[] {\"/bin/bash\", \"-c\", pipeline+\">src/output.txt\"};\n\t\ttry {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tProcess proc = new ProcessBuilder(args1).start();\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\ttry {\n\t\t\tThread.sleep(2000);\n\t\t} catch (InterruptedException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t}", "@Override\n public void startUp(FloodlightModuleContext context)\n throws FloodlightModuleException {\n floodlightProvider = context\n .getServiceImpl(IFloodlightProviderService.class);\n\n floodlightProvider.addOFMessageListener(OFType.PACKET_IN, this);\n\n BufferedReader reader;\n try\n {\n //read in internal ip addresses\n reader = new BufferedReader(new FileReader(new File(this.insideIPsFile)));\n String temp = null;\n while ((temp = reader.readLine()) != null)\n {\n if( !temp.startsWith(\"//\") ){\n inside_ip.add(IPv4Address.of(temp));\n // System.out.println (IPv4Address.of(temp));\n }\n }\n reader.close();\n\n //read in externally visible ip addresses\n reader = new BufferedReader(new FileReader(new File(this.externalIPFile)));\n temp = null;\n while ((temp = reader.readLine()) != null)\n {\n if( !temp.startsWith(\"//\") ){\n external_ip = IPv4Address.of(temp);\n break;\n }\n }\n reader.close();\n\n //read in NAT switch id, inside ports, outside ports\n reader = new BufferedReader(new FileReader(new File(this.natInfoFile)));\n temp = null;\n while ((temp = reader.readLine()) != null)\n {\n if( !temp.startsWith(\"//\") ){\n String[] nat_info = temp.split( \",\" );\n\n nat_swId = DatapathId.of(Long.valueOf( nat_info[0] ));\n\n for( String internal_port: nat_info[1].trim().split(\" \") ){\n nat_internal_ports.add( TransportPort.of( Integer.parseInt(internal_port)) );\n }\n\n for( String external_port: nat_info[2].trim().split(\" \") ){\n nat_external_ports.add( TransportPort.of( Integer.parseInt(external_port)) );\n }\n break;\n }\n }\n reader.close();\n\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n\n\n }", "public void connectService() {\n log_d( \"connectService()\" );\n\t\t// no action if debug\n if ( BT_DEBUG_SERVICE ) {\n\t\t\ttoast_short( \"No Action in debug\" );\n \treturn;\n }\n\t\t// connect the BT device at once\n\t\t// if there is a device address. \n\t\tString address = getPrefAddress();\n\t\tif ( isPrefUseDevice() && ( address != null) && !address.equals(\"\") ) {\n\t \tBluetoothDevice device = mBluetoothAdapter.getRemoteDevice( address );\n\t \tif ( mBluetoothService != null ) {\n\t \t log_d( \"connect \" + address );\n\t \tmBluetoothService.connect( device );\n\t }\n\t\t// otherwise\n\t\t// send message for the intent of the BT device list\n\t\t} else {\n\t\t\tnotifyDeviceList();\n\t\t}\n\t}", "@Option int getLocalPortForUdpLinkLayer();", "public abstract void connectSystem();", "public void registerTargets(){\n synchronized(targets){\n while(targets.size()>0){\n Target target= (Target) targets.removeFirst();\n try {\n target.socketChannel.register(selector,SelectionKey.OP_CONNECT,target);\n } catch (ClosedChannelException e) {\n// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n try {\n target.socketChannel.close();\n } catch (IOException e1) {\n e1.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n target.failure=e;\n addFinishedTarget(target);\n }\n }\n }\n }", "private void processStart() {\n // broadcast HELLO to every neighbors\n for(int i = 0; i < this.nextAvailPort; i++) {\n if(this.ports[i].getRemoteRouterDesc() == null) {\n continue;\n }\n\n SOSPFPacket helloPak = SOSPFPacket.createHelloPak(this.routerDesc, this.ports[i].getRemoteRouterDesc());\n this.ports[i].send(helloPak);\n\n this.ports[i].initializeHeartbeat();\n }\n }", "void EnableLocal (int boardID, short[] addrlist);", "public void sendPlayList(String playList)\n {\n PeerAvailableListFragment palf = (PeerAvailableListFragment) getFragmentManager().findFragmentById(R.id.device_list_frag_host);\n palf.sendPlayListtoClient(playList);\n }", "public void loadHostScreen(View view) {\n Intent intent = new Intent(this, HostActivity.class);\r\n startActivity(intent);\r\n }", "private void cmdNet() {\n int port = 1777;\n try {\n Log.verbose(\"waiting for connection on port \" + port + \"...\");\n ServerSocket socket = new ServerSocket(port);\n Socket client = socket.accept();\n InetAddress clientAddr = client.getInetAddress();\n Log.verbose(\"connected to \" + clientAddr.getHostName() + \"/\"\n + client.getPort());\n Readline readline = new SocketReadline(client, true, \"net>\");\n fReadlineStack.push(readline);\n } catch (IOException ex) {\n Log.error(\"Can't bind or listen on port \" + port + \".\");\n }\n }", "private void bluetoothConnect() {\n\n btDevice = btAdapter.getRemoteDevice(EDISON_ADDRESS);\n if (btDevice == null) {\n Log.d(TAG,\"get remote device fail!\");\n finish();\n }\n\n try {\n btSocket = btDevice.createRfcommSocketToServiceRecord(SSP_UUID);\n } catch (IOException e) {\n Log.d(TAG,\"bluetooth socket create fail.\");\n }\n //save resource by cancel discovery\n btAdapter.cancelDiscovery();\n\n //connect\n try {\n btSocket.connect();\n Log.d(TAG,\"Connection established.\");\n } catch ( IOException e) {\n try {\n btSocket.close();\n }catch (IOException e2) {\n Log.d(TAG,\"unable to close socket after connect fail.\");\n }\n }\n\n //prepare outStream to send message\n try {\n outStream = btSocket.getOutputStream();\n } catch (IOException e) {\n Log.d(TAG,\"output stream init fail!\");\n }\n\n }", "public abstract void stream(int port);", "public void startService() {\n\t\tListenThread listenThread = new ListenThread();\r\n\t\tlistenThread.start();\r\n\t\tSelfVideoThread selfVideoThread = new SelfVideoThread();\r\n\t\tselfVideoThread.start();\r\n\t\tif(remote!=\"\"){\r\n\t\t\tString[] remotes = remote.split(\",\");\r\n\t\t\tString[] remotePorts = remotePort.split(\",\");\r\n\t\t\tfor(int i = 0; i < remotes.length; i++){\r\n\t\t\t\tString currentRemote = remotes[i];\r\n\t\t\t\tint currentRemotePort = 6262;\r\n\t\t\t\tif(i<remotePorts.length){\r\n\t\t\t\t\tcurrentRemotePort = Integer.valueOf(remotePorts[i]);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n//\t\t\t\tcreatTCPLink(currentRemote, currentRemotePort);\r\n\t\t\t\t\r\n\t\t\t\tSocket socket = null;\r\n\t\t\t\tJSONObject process = new JSONObject();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsocket = new Socket(currentRemote, currentRemotePort);\r\n\t\t\t\t\tThread sendVedio = new SendVideo(socket, width, height, rate);\r\n\t\t\t\t\tsendVedio.start();\r\n\t\t\t\t\tThread receiveVedio = new ReceiveVideo(socket);\r\n\t\t\t\t\treceiveVedio.start();\r\n\t\t\t\t\tsockets.add(socket);\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t} finally {\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}", "public static void main(String[] args) {\n if(args.length == 12 && args[0].equals(\"-p\") && args[2].equals(\"-s\") &&\n args[4].equals(\"-a\") && args[6].equals(\"-f\") && args[8].equals(\"-m\")\n && args[10].equals(\"-c\")) {\n \n int port = Integer.parseInt(args[1]);\n InetAddress remoteAddress = null;\n try {\n remoteAddress = InetAddress.getByName(args[3]);\n } catch (UnknownHostException e) {\n e.printStackTrace();\n }\n int remotePort = Integer.parseInt(args[5]);\n String file = args[7];\n int mtu = Integer.parseInt(args[9]);\n int sws = Integer.parseInt(args[11]);\n sender(port, remoteAddress, remotePort, file, mtu, sws);\n }\n // -p <port> -m <mtu> -c <sws> -f <file name>\n else if(args.length == 8 && args[0].equals(\"-p\") && args[2].equals(\"-m\") &&\n args[4].equals(\"-c\") && args[6].equals(\"-f\")) {\n int port = Integer.parseInt(args[1]);\n int mtu = Integer.parseInt(args[3]);\n int sws = Integer.parseInt(args[5]);\n String file = args[7];\n receiver(port, mtu, sws, file);\n }\n // error\n else {\n System.out.println(\"usage:\\n\"\n + \"java TCPend -p <port> -s <remote IP> -a <remote port> -f <file name> -m <mtu> -c <sws>\\n\"\n + \"java TCPend -p <port> -m <mtu> -c <sws> -f <file name>\");\n System.exit(1);\n }\n }", "private void sendUpdate(String gameString, int sequenceNo) throws IOException\n\t{\n\t\tfor (Client client : clients)\n\t\t{\n\t\t\t//System.out.println(\"Sending packet to \" + client.toString()); \n\t\t\tUDPSender sender;\n\t\t\ttry {\n\t\t\t\tsender = new UDPSender(client, client.port, gameString, sequenceNo);\n\t\t\t\tThread worker = new Thread(sender);\n\t\t\t\tworker.start();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "protected void setup(){\n setupRouter();\n \n if( bluetoothEnabled ){\n setupBluetooth();\n }\n }", "@Override\n public boolean onCreate() {\n Log.i(TAG, \"On create hit\");\n TelephonyManager tel = (TelephonyManager) getContext().getSystemService(Context.TELEPHONY_SERVICE);\n String portStr = tel.getLine1Number().substring(tel.getLine1Number().length() - 4);\n myPort = String.valueOf((Integer.parseInt(portStr) * 2));\n Log.i(TAG, \"Provider myPort is :\" + myPort);\n //nodeList.add(myPort);\n // Based on myPort, the node id is determined\n switch (Integer.parseInt(myPort)) {\n case 11108:\n nodeId = String.valueOf(5554);\n break;\n case 11112:\n nodeId = String.valueOf(5556);\n break;\n case 11116:\n nodeId = String.valueOf(5558);\n break;\n case 11120:\n nodeId = String.valueOf(5560);\n break;\n case 11124:\n nodeId = String.valueOf(5562);\n break;\n }\n try {\n Log.i(TAG, \"Just before server task invoking\");\n ServerSocket serverSocket = new ServerSocket(SERVER_PORT);\n new ServerTask().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, serverSocket);\n } catch (IOException e) {\n Log.e(TAG, \"Error in creating a socket\");\n return false;\n }\n nodeList.add(\"11108\");\n nodeList.add(\"11112\");\n nodeList.add(\"11116\");\n nodeList.add(\"11120\");\n nodeList.add(\"11124\");\n emulatorList.add(\"5554\");\n emulatorList.add(\"5556\");\n emulatorList.add(\"5558\");\n emulatorList.add(\"5560\");\n emulatorList.add(\"5562\");\n Collections.sort(nodeList, new Dummy());\n Collections.sort(emulatorList, new Dummy());\n int ok = nodeList.indexOf(myPort);\n if(ok == 4) {\n successor = nodeList.get(0);\n predecessor = nodeList.get(ok - 1);\n } else if(ok == 0) {\n successor = nodeList.get(ok + 1);\n predecessor = nodeList.get(4);\n } else {\n successor = nodeList.get(ok + 1);\n predecessor = nodeList.get(ok - 1);\n }\n\n Log.i(TAG, \"emulator list is : \");\n for (String s : emulatorList) {\n Log.i(TAG, s + \" \");\n }\n Log.i(TAG, \"node list is : \");\n for (String s : nodeList) {\n Log.i(TAG, s + \" \");\n }\n String path = getContext().getFilesDir().getPath();\n File f = new File(path);\n f.mkdirs();\n //Boolean found = false;\n /* File[] file = f.listFiles();\n for (File fi : file) {\n\n // Log.i(TAG, \"Delete : Deleting :\" + selection);\n //found = true;\n fi.delete();\n\n } */\n Log.i(TAG, \"Just before client task invoking\");\n new ClientTask().executeOnExecutor(AsyncTask.SERIAL_EXECUTOR, \"ask\");\n\n // TODO Auto-generated method stub\n return false;\n }", "public void connect(View v) {\n turnOn(v);\n startActivity(new Intent(Settings.ACTION_BLUETOOTH_SETTINGS));\n Toast.makeText(getApplicationContext(), \"Select device\", Toast.LENGTH_LONG).show();\n System.err.println(bluetoothAdapter.getBondedDevices());\n }", "public static List<IOTAddress> discoverIOTDevicesSyn() {\n\n\t\tAbsTaskSyn<List<IOTAddress>> udpSocketTask = new UDPSocketTask(\n\t\t\t\t\"connect task\", -1, true, broadcastAddress, data);\n\n\t\tmThreadPool.executeSyn(udpSocketTask, CONSTANTS_DYNAMIC.UDP_BROADCAST_TIMEOUT_DYNAMIC, TimeoutUnit);\n\n\t\tList<IOTAddress>responseList = udpSocketTask.getResult();\n\n\t\treturn responseList;\n\t}", "public void bind() {\n\n Intent startintent = new Intent(context, MafService.class);\n startintent.setAction(\"com.baidu.maf.service\");\n\n if(ServiceControlUtil.showInSeperateProcess(context)) {\n try {\n context.startService(startintent);\n } catch (Exception e) {\n LogUtil.e(TAG, \"fail to startService\", e);\n }\n }\n\n //Intent intent = new Intent(InAppApplication.getInstance().getContext(), OutAppService.class);\n\n\n boolean result =\n context.bindService(startintent, mConnection, Context.BIND_AUTO_CREATE);\n\n LogUtil.printMainProcess(\"Service bind. reslut = \" + result);\n LogUtil.printMainProcess(\"bind. serverMessenger = \" + serverMessenger);\n mIsBound = result;\n }", "private native static int shout_set_port(long shoutInstancePtr, int port);", "private synchronized boolean setAdbInterface(UsbDevice device, UsbInterface intf) throws IOException, InterruptedException {\n Log.d(\"Nightmare\", \"setAdbInterface\");\n if (adbTerminalConnection != null) {\n adbTerminalConnection.close();\n adbTerminalConnection = null;\n mDevice = null;\n }\n\n UsbManager mManager = (UsbManager) getSystemService(Context.USB_SERVICE);\n if (device != null && intf != null) {\n UsbDeviceConnection connection = mManager.openDevice(device);\n if (connection != null) {\n if (connection.claimInterface(intf, false)) {\n\n handler.sendEmptyMessage(Message.CONNECTING);\n\n adbTerminalConnection = AdbConnection.create(new UsbChannel(connection, intf), adbCrypto);\n\n adbTerminalConnection.connect();\n\n //TODO: DO NOT DELETE IT, I CAN'T EXPLAIN WHY\n// adbTerminalConnection.open(\"shell:exec date\");\n mDevice = device;\n handler.sendEmptyMessage(Message.DEVICE_FOUND);\n return true;\n } else {\n connection.close();\n }\n }\n }\n\n handler.sendEmptyMessage(Message.DEVICE_NOT_FOUND);\n\n mDevice = null;\n return false;\n }", "public void execActivityResultDevice( int result, Intent data ) {\n \tlog_d( \"execActivityResultDevice()\" );\n \t// no action if debug\n if ( BT_DEBUG_SERVICE ) return;\n\t\t// When DeviceListActivity returns with a device to connect\n\t\tif ( result == Activity.RESULT_OK ) {\n\t\t log_d( \"RESULT OK\" );\n\t\t\t// Get the device MAC address\n\t\t\tString address = data.getExtras().getString( BT_EXTRA_DEVICE_ADDRESS );\n\t\t\t// Get the BluetoothDevice object\n\t\t\tBluetoothDevice device = mBluetoothAdapter.getRemoteDevice( address );\n\t\t\tif ( mBluetoothService != null ) {\n\t\t\t\tlog_d( \"connect \" + address ) ;\n\t\t\t\t// Attempt to connect to the device\n\t\t\t\tmBluetoothService.connect( device );\n\t\t\t}\n\t\t}\n\t}", "public void autoConnect() {\n Log.i(TAG, \"HERE AUTOCONNECT\");\n connect(staticIp, staticPort);\n }", "@Override\n\tpublic void run() {\n\t\twhile (true) {\n\t\t\tQueueElement e;\n\t\t\tif ((e = queue.poll()) != null) {\n\t\t\t\tSystem.out.println(\"开始进行操作了。 ip=\" + e.ip + \" user=\"\n\t\t\t\t\t\t+ e.di.getUsername() + \" passwd \" + e.di.getPasswd()\n\t\t\t\t\t\t+ \" port \" + e.di.getPort());\n\t\t\t\tboolean online = e.online;\n\t\t\t\tDeviceInstance di = e.di;\n\t\t\t\tif (online && !di.isAutoflag()) {\n\t\t\t\t\t// System.out.println(di.getHostIP()+di.getPort()+di.getUsername()+di.getPasswd());\n\t\t\t\t\t//\n\t\t\t\t\tint n = run.getDc().login(di.getDeviceType(),\n\t\t\t\t\t\t\tdi.getHostIP(), di.getPort(), di.getUsername(),\n\t\t\t\t\t\t\tdi.getPasswd(), di);\n\t\t\t\t\t// System.out.println(n);\n\t\t\t\t\tif (n > -1) {\n\t\t\t\t\t\tLogUtil.DeviceManageInfo(\"login success !\");\n\t\t\t\t\t\tdi.setDeviceHandle(n);\n\t\t\t\t\t\trun.getDc().startListen(di.getDeviceType(), n,\n\t\t\t\t\t\t\t\tdi.getHostIP(), di.getPort());\n\t\t\t\t\t\t// run.getDc().AutoConnectionManage(n)\n\t\t\t\t\t\tdi.setAutoflag(false);\n\t\t\t\t\t\t// System.out.println(di.isAutoflag());\n\t\t\t\t\t\tdi.setOnlineFlag(true);\n\t\t\t\t\t\t// 这里也有一个\n\t\t\t\t\t\tDeviceStatus ds = DAOFactory.getDeviceStatusIntance()\n\t\t\t\t\t\t\t\t.getDeviceStatus(di.getDeviceid());\n\t\t\t\t\t\trun.deviceLogin(di.getDeviceid(), n);\n\t\t\t\t\t\trun.getSmd().SetEncodeDeviceOnline(\n\t\t\t\t\t\t\t\tdi.getDeviceid(),\n\t\t\t\t\t\t\t\tdi.getHostIP(),\n\t\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\t\tds.getDevType(),\n\t\t\t\t\t\t\t\tds.getDevSubType(),\n\t\t\t\t\t\t\t\tds.getUserName() + \",\" + ds.getPassword() + \",\"\n\t\t\t\t\t\t\t\t\t\t+ ds.getDevPort() + \",\" + ds.getSwitchSvrID());\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// pingTimeTask.putQueueElement(e);\n\t\t\t\t\t\trun.deviceLogout(di.getDeviceid());\n\t\t\t\t\t\tif (di.getDeviceHandle() > -1)\n\t\t\t\t\t\t\trun.getDc().logout(di.getDeviceType(),\n\t\t\t\t\t\t\t\t\tdi.getDeviceHandle());\n\t\t\t\t\t\tdi.setOnlineFlag(false);\n//\t\t\t\t\t\trun.getSmd().SetEncodeDeviceOnline(di.getDeviceid(),\n//\t\t\t\t\t\t\t\tdi.getHostIP(), false, -1, -1, null);\n\t\t\t\t\t\tLogUtil.DeviceManageInfo(\"login fail\");\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// pingTimeTask.removeQueueElement(e);\n\t\t\t\t\trun.deviceLogout(di.getDeviceid());\n\t\t\t\t\tif (di.getDeviceHandle() > -1)\n\t\t\t\t\t\trun.getDc().logout(di.getDeviceType(),\n\t\t\t\t\t\t\t\tdi.getDeviceHandle());\n\t\t\t\t\tdi.setOnlineFlag(false);\n\t\t\t\t\trun.getSmd().SetEncodeDeviceOnline(di.getDeviceid(),\n\t\t\t\t\t\t\tdi.getHostIP(), false, -1, -1, null);\n\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t} catch (InterruptedException el) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\tel.printStackTrace();\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}", "@Override\n\t public void process(PacketContext context) {\n\t InboundPacket pkt = context.inPacket();\n Ethernet ethPkt = pkt.parsed();\n HostId id = HostId.hostId(ethPkt.getDestinationMAC());\n/*\n InboundPacket pkt = context.inPacket();\n Ethernet ethPkt = pkt.parsed();\n\t MacAddress hostId = ethPkt.getSourceMAC();\n HostId id = HostId.hostId(ethPkt.getDestinationMAC());\n\t DeviceId apId = pkt.receivedFrom().deviceId();\n*/\n // Do we know who this is for? If not, flood and bail.\n\t //log.info(\"Host id : {}\",id);\n\n Host dst = hostService.getHost(id);\n\n\t\n if (dst == null) {\n ipv6process(context, pkt);\n\t \n return;\n\t }\n/*\n\t if (pkt.receivedFrom().deviceId().equals(dst.location().deviceId())) {\n if (!context.inPacket().receivedFrom().port().equals(dst.location().port())) {\n\t\t log.info(\"Rule is installed.-1\");\n\t\t log.info(\"DeviceID: dst={}\", pkt.receivedFrom().deviceId(), dst.location().deviceId());\n installRule(context, dst.location().port());\n }\n return;\n }\n\t\t\t\t\n*/\t\n \t if((stPreApId.equals(stNowApId) && stype ==1) || (stPreApId.equals(stNowApId) && stype ==2)){\n\t\t log.info(\"##############test same ap -------------[ok]\\n\");\n\t\t log.info(\"checking preApId ={}, nowApId={} \\n\",stPreApId, stNowApId);\n\t\t //TODO ::\t\t\t\n\t Set<Path> paths = topologyService.getPaths(topologyService.currentTopology(), pkt.receivedFrom().deviceId(), dst.location().deviceId()); \n\t\t if (paths.isEmpty()) {\n\t\t // If there are no paths, flood and bail.\n\t\t //flood(context);\n\t\t return;\n\t\t }\n\t\t \n\t\t Path path = pickForwardPathIfPossible(paths,pkt.receivedFrom().port());\n\t\t if (path == null) {\n\t\t log.warn(\"Don't know where to go from here {} for {} -> {}\",\n\t\t pkt.receivedFrom(), ethPkt.getSourceMAC(), ethPkt.getDestinationMAC());\n\t\t //flood(context);\n\t\t return;\n\t\t }\n\t\t log.info(\"Rule is installed.-2\");\n\t\t log.info(\"port()={}, path()={}\", pkt.receivedFrom().port(), path);\n\t\t mkList(hostId, apId, flowNum, pkt.receivedFrom().port(), ethPkt.getSourceMAC(), ethPkt.getDestinationMAC(), stype);\n\t\t saveFlowInfo(ethPkt.getDestinationMAC(),pkt.receivedFrom().deviceId(), stype);\n\t\t // stype = 0;\n\n\t }\n\n\n\t if(! stPreApId.equals(stNowApId) && stype ==3){\n\t\tif(! stNowApId.equals(\"\")){\n\t\t\tlog.info(\"##############test handover -------------[ok]\\n\");\n\t\t\tlog.info(\"checking preApId ={}, nowApId={} \\n\",stPreApId, stNowApId);\n\t\t\tlog.info(\"test : {}\",destList2.size());\n\n\t\t\t/*for(int i =0; i<destList2.size();i++){\n\t\t\t\tlog.info(\"test type 2 cnt: {}\",i);\n\t\t\t\t//if(((DeviceId)desApList2.get(i)).equals(dst.location().deviceId())){\n\t\t\t\t\t Set<Path> paths = topologyService.getPaths(topologyService.currentTopology(), pkt.receivedFrom().deviceId(), dst.location().deviceId()); \n\t\t\t\t if (paths.isEmpty()){\n\t\t\t\t\treturn;\n\t\t\t\t }\n\t\t\t\t Path path = pickForwardPathIfPossible(paths, pkt.receivedFrom().port());\n\t\t\t\t if (path == null) {\n\t\t\t\t\tlog.warn(\"Don't know where to go from here\");\n\t\t\t\t\treturn;\n\t\t\t\t }\n\t\t\t\t log.info(\"Rule is installed.-3\");\n\t\t\t\t log.info(\"port()={}, path()={}\", pkt.receivedFrom().port(), path);\t\n\t\t\t\t // }\n\t\t\t}*/\n\n\t\t\tfor(int i =0; i<destList1.size();i++){\n\t\t\t\tlog.info(\"test type 1 cnt: {}\",i);\n\t\t\t\t//if(((DeviceId)desApList1.get(i)).equals(dst.location().deviceId())){\n\t\t\t\t\t Set<Path> paths = topologyService.getPaths(topologyService.currentTopology(), pkt.receivedFrom().deviceId(), dst.location().deviceId());\n\t\t\t\t if (paths.isEmpty()){\n\t\t\t\t\treturn;\n\t\t\t\t }\n\t\t\t\t Path path = pickForwardPathIfPossible(paths, pkt.receivedFrom().port());\n\t\t\t\t if (path == null) {\n\t\t\t\t\tlog.warn(\"Don't know where to go from here\");\n\t\t\t\t\treturn;\n\t\t\t\t }\n\t\t\t\t log.info(\"Rule is installed.-4\");\n\t\t\t\t log.info(\"port()={}, path()={}\", pkt.receivedFrom().port(), path);\t\n\t\t\t\t // }\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif (stype ==0) {\n\t\t\tlog.info(\"###-----------what is packet?\\n\");\n\t\t}\n\t\t\n\t }\n\t\tlog.info(\"#############-------------[waitting]\\n\");\n\t\t\n\t}", "public void linkUp(){\n\t\tsocket.setGame(game);\n//\t\tframe.setSocket(socket);\n\t}", "public static void main(String[] args) {\n\t\t\n//\t String url=\"http://123.124.236.149\";\n//\t\tInteger port=8078;\n\t\t\n//\t\tString url=\"http://192.168.1.199\";\n//\t\tInteger port=8078;\n\t\t\n\t\tString url=\"http://gw2.gosmarthome.cn\";\n\t\tInteger port=8079;\n\t\t\n//\t\tString url=\"http://119.40.24.25\";\n//\t\tInteger port=8079;\n\t\t\n//\t\tString url=\"http://10.41.1.29\"; \n//\t\tInteger port=8086;\n\t\t\n//\t\t10.32.2.57 8078\n//\t\tString url=\"http://10.32.2.232\"; \n//\t\tInteger port=8078;\n\n\t\t\n\t\tString factoryId=\"gptest2015\";\n\t UDPClientDemo client=new UDPClientDemo(url,factoryId,port);\n\t try {\n\t\t\tclient.login();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tprotected boolean handleMessage(Connection conn, MessageContext context,\n\t\t\tOFMessage msg, List<OFMessage> outgoing) {\n\t\tSet<Long> swids = this.getController().getSwitchIdentifiers();\n\t\tboolean replied = false;\n\t\t\n\t\tfor ( long swid : swids ) { \n\t\t\tIDevice ret = deviceManager.findDevice(swid, null, null, swid, null);\n\t\t\tif ( ret != null ) {\n\t\t\t\t// ....\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// if correctly replied ARP\n\t\t\t\treplied = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ! replied;\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\ttry{\n//\t\t\t\tdevAddr = devices.get(position).split(\"\\\\|\")[1];\n//\t\t\t\tbtAdapt.cancelDiscovery();\n//\t\t\t\t\n//\t\t\t\tbtSocket = btAdapt.getRemoteDevice(devAddr).createRfcommSocketToServiceRecord(uuid);\n//\t\t\t\tbtSocket.connect();Log.e(tag, \"connected\");\n\t\t\t\tInetAddress severInetAddr=InetAddress.getByName(\"120.105.129.108\");\n\t\t\t\tWifisocket = new Socket(severInetAddr, 8101);\n\t\t\t\t\n\t\t\t\tsynchronized (this) {\n//\t\t\t\t\tbtIn = btSocket.getInputStream();\n//\t\t\t\t\tbtOut = btSocket.getOutputStream();\n\t\t\t\t\tbtIn = Wifisocket.getInputStream();\n\t\t\t\t\tbtOut = Wifisocket.getOutputStream();\n\t\t\t\t\tLog.e(tag, \"connected\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tThread.sleep(100);\n\t\t\t\tsetUpAsForeground(\"Wifi已連線\");\n\t\t\t} catch( IOException | InterruptedException e ){\n\t\t\t\te.printStackTrace();\n\t\t\t\ttry{\n//\t\t\t\t\tbtSocket.close();\n//\t\t\t\t\tWifisocket.close();\n\t\t\t\t\tThread.sleep(1500);\n\t\t\t\t\tsetUpAsForeground(\"Wifi未連線\");\n\t\t\t\t\tLog.i(\"exiconne\", \"bluetoohservice bye!;\");\n\t\t\t\t} catch(InterruptedException e1){\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\tLog.i(\"exiconne\", \"bluetoohservice bye!;\");\n\t\t\t\t}\n//\t\t\t\tbtSocket = null;\n\t\t\t\tWifisocket = null;\n\t\t\t\tmBTState = BTState.stopped;\n\t\t\t\tBluetoothConnect.mBTstate = BTstate.opened;\n\t\t\t}\n\n\t\t}", "private void connectToDevice(Intent data, boolean secure){\n Log.i(TAG, \"-- connect to device --\");\n if(data == null){Log.e(TAG, \"data is null\");}\n // Get the device MAC address\n String address = data.getExtras()\n .getString(DeviceListActivity.EXTRA_DEVICE_ADDRESS);\n\n Log.i(TAG, \"-- getting to device --\");\n // Get the BluetoothDevice object\n BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(address);\n\n Log.i(TAG, \"-- connecting to device to device --\");\n // Attempt to connect to the device\n if(mClientService == null){Log.e(TAG, \"bluetooth client service is null\");}\n mClientService.connect(device, secure);\n Log.i(TAG,\"-- after connection function\");\n }", "public void run() {\n StringBuilder sb;\n try {\n InterfaceParams iParams = InterfaceParams.getByName(linkProperties.getInterfaceName());\n int i = 0;\n ArpPeer.this.mSocketRecv = Os.socket(OsConstants.AF_PACKET, OsConstants.SOCK_RAW, 0);\n Os.bind(ArpPeer.this.mSocketRecv, new PacketSocketAddress((short) OsConstants.ETH_P_ARP, iParams.index));\n byte[] desiredIp = gateway;\n long timeout = SystemClock.elapsedRealtime() + ((long) timeoutMillis);\n byte[] recvBuf = new byte[1500];\n byte[] result_mac = new byte[6];\n while (true) {\n if (SystemClock.elapsedRealtime() < timeout) {\n Os.setsockoptTimeval(ArpPeer.this.mSocketRecv, OsConstants.SOL_SOCKET, OsConstants.SO_RCVTIMEO, StructTimeval.fromMillis(timeout - SystemClock.elapsedRealtime()));\n int readLen = 0;\n Log.d(ArpPeer.TAG, \"start to read recvSocket\");\n readLen = Os.read(ArpPeer.this.mSocketRecv, recvBuf, i, recvBuf.length);\n Log.d(ArpPeer.TAG, \"readLen:\" + readLen);\n if (readLen >= 28 && recvBuf[14] == 0 && recvBuf[15] == 1 && recvBuf[16] == 8 && recvBuf[17] == 0 && recvBuf[18] == 6 && recvBuf[19] == 4 && recvBuf[20] == 0 && recvBuf[28] == desiredIp[i] && recvBuf[29] == desiredIp[1] && recvBuf[30] == desiredIp[2] && recvBuf[31] == desiredIp[3]) {\n System.arraycopy(recvBuf, 22, result_mac, i, 6);\n String convert_mac = ArpPeer.macToString(result_mac);\n if (recvBuf[21] == 1) {\n Log.d(ArpPeer.TAG, \"ARP Request\");\n } else if (recvBuf[21] == 2) {\n WifiChipInfo.getInstance().setArpResult(true);\n Log.d(ArpPeer.TAG, \"ARP result(\" + convert_mac + \")\");\n break;\n }\n }\n i = 0;\n }\n }\n try {\n if (ArpPeer.this.mSocketRecv != null) {\n try {\n IoBridge.closeAndSignalBlockedThreads(ArpPeer.this.mSocketRecv);\n } catch (IOException ignored) {\n Log.e(ArpPeer.TAG, \"IOException \" + ignored);\n }\n }\n ArpPeer.this.mSocketRecv = null;\n return;\n } catch (Exception e) {\n ex = e;\n sb = new StringBuilder();\n sb.append(\"Exception \");\n sb.append(ex);\n Log.e(ArpPeer.TAG, sb.toString());\n return;\n }\n } catch (RuntimeException e2) {\n } catch (Exception e3) {\n Throwable cause = e3.getCause();\n if ((cause instanceof ErrnoException) && ((ErrnoException) cause).errno != OsConstants.EAGAIN) {\n Log.e(ArpPeer.TAG, \"Exception \" + Thread.currentThread().getStackTrace()[2].getLineNumber() + e3);\n }\n try {\n if (ArpPeer.this.mSocketRecv != null) {\n try {\n IoBridge.closeAndSignalBlockedThreads(ArpPeer.this.mSocketRecv);\n } catch (IOException ignored2) {\n Log.e(ArpPeer.TAG, \"IOException \" + ignored2);\n }\n }\n ArpPeer.this.mSocketRecv = null;\n return;\n } catch (Exception e4) {\n ex = e4;\n sb = new StringBuilder();\n sb.append(\"Exception \");\n sb.append(ex);\n Log.e(ArpPeer.TAG, sb.toString());\n return;\n }\n } catch (Throwable ex) {\n try {\n if (ArpPeer.this.mSocketRecv != null) {\n try {\n IoBridge.closeAndSignalBlockedThreads(ArpPeer.this.mSocketRecv);\n } catch (IOException ignored3) {\n Log.e(ArpPeer.TAG, \"IOException \" + ignored3);\n }\n }\n ArpPeer.this.mSocketRecv = null;\n } catch (Exception ex2) {\n Log.e(ArpPeer.TAG, \"Exception \" + ex2);\n }\n throw ex;\n }\n ArpPeer.this.mSocketRecv = null;\n }", "public int startBeam(IWifiP2pProxy.IFastConnectInfo info, Uri[] uris) {\n\t\t\n\t\tLog.d(TAG, \"StartBeam(), \" + describeInternalState());\n\t\tLog.d(TAG, \"StartBeam(), ===> new target = \" + info.getDeviceAddress());\n\t\tif (!isBeamWithTheSameDevice(info)) {\n\t\t\tmUriList.clear();\n\t\t}\n\n\t\tmUriList.push(uris);\n\t\tmTargetInfo = info;\n\n int setupConnectionTime = NfcRuntimeOptions.getBeamPlusSetupConnectionTimeoutValue();\n\t\tmMonitor.startConnectionTimeoutCountDown((setupConnectionTime == 0)?30000:setupConnectionTime);\n mMonitor.startMonitoring(BeamPlusMonitor.BEAM_SETUP_MONITOR);\n\n\t\tswitch (mState) {\n\t\tcase STATE_DISABLED:\n // Disable tethering if enabling Wifi \n if (mWifiP2pProxy.isSoftApEnable()){ \n mWifiP2pProxy.setSoftApEnabled(false);\n }\n\t\t\tmWifiP2pProxy.enable();\n mMonitor.enablePowerMonitoring();\n\t\t\tmState = STATE_ENABLING;\n\t\t\tbreak;\n\t\tcase STATE_ENABLED:\n\t\t\tmWifiP2pProxy.fastConnect(mTargetInfo);\n\t\t\tmState = STATE_CONNECTING;\n\t\t\tbreak;\n\t\tcase STATE_CONNECTED:\n\t\t\tif (isDeviceAlreadyConnected(mTargetInfo)) {\n\t\t\t\tmFileTransferClient.transferFiles(uris);\n\t\t\t\tmUriList.remove(uris);\n\t\t\t} else {\n\t\t\t\tdoDisconnectSequence();\n\t\t\t\tmState = STATE_DISCONNECTING;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase STATE_ENABLING:\n mMonitor.enablePowerMonitoring();\n\t\t\tbreak;\n\t\tcase STATE_CONNECTING:\n\t\t\tbreak;\n\t\tcase STATE_DISCONNECTING:\n\t\t\tbreak;\n\t\t}\n\t\treturn 0;\n\t}", "@Override\r\n public void run() {\n for (int i = 0; i < item.getDevices().size(); i++) {\r\n write(parseRGBCmd(msAccessColor(color)), 0, 0, item.getDevices().get(i).getSocket(), item.getDevices().get(i).getBos());\r\n }\r\n runCommand = true;\r\n }", "static void test4 () throws Exception {\n server = new ServerSocket (0);\n int port = server.getLocalPort();\n\n /* create an IPv4 mapped address corresponding to local host */\n\n byte[] b = {0,0,0,0,0,0,0,0,0,0,(byte)0xff,(byte)0xff,0,0,0,0};\n byte[] ia4 = ia4addr.getAddress();\n b[12] = ia4[0];\n b[13] = ia4[1];\n b[14] = ia4[2];\n b[15] = ia4[3];\n\n InetAddress dest = InetAddress.getByAddress (b);\n c1 = new Socket (dest, port);\n s1 = server.accept ();\n simpleDataExchange (c1,s1);\n c1.close ();\n s1.close ();\n server.close ();\n System.out.println (\"Test4: OK\");\n }", "final void startDevices(List<PCIDevice> devices) {\n // List all devices\n for (PCIDevice dev : devices) {\n final PCIDeviceConfig cfg = dev.getConfig();\n log.debug(\"PCI \" + dev.getPCIName() + '\\t'\n + NumberUtils.hex(cfg.getVendorID(), 4) + ':'\n + NumberUtils.hex(cfg.getDeviceID(), 4) + ':'\n + NumberUtils.hex(cfg.getRevision(), 2) + ' '\n + NumberUtils.hex(cfg.getBaseClass(), 2) + ':'\n + NumberUtils.hex(cfg.getSubClass(), 2) + ':'\n + NumberUtils.hex(cfg.getMinorClass(), 2)\n// + \"\\tIRQ\" + cfg.getInterruptLine() + \":\" + cfg.getInterruptPin()\n + \"\\tCMD \" + NumberUtils.hex(cfg.getCommand(), 4));\n }\n\n // Remap all devices\n remapDeviceAddresses(devices);\n\n // Register all bridges\n final DeviceManager devMan = getDevice().getManager();\n for (PCIDevice dev : devices) {\n if (dev.isBridge()) {\n try {\n devMan.register(dev);\n } catch (DeviceAlreadyRegisteredException ex) {\n log.error(\"Cannot start \" + dev.getId(), ex);\n } catch (DriverException ex) {\n log.error(\"Cannot start \" + dev.getId(), ex);\n }\n }\n }\n // Register all non-bridges\n for (final PCIDevice dev : devices) {\n if (!dev.isBridge()) {\n WorkUtils.add(new Work(dev.getId()) {\n public void execute() {\n try {\n devMan.register(dev);\n } catch (DeviceAlreadyRegisteredException ex) {\n log.error(\"Cannot start \" + dev.getId(), ex);\n } catch (DriverException ex) {\n log.error(\"Cannot start \" + dev.getId(), ex);\n }\n }\n });\n }\n }\n }", "private void sendmessage(int new_offset[], int[] port_list) {\n\t\ttry {\n\n\t\t\t/**\n\t\t\t * \n\t\t\t * port_list has the port of all processes. Message will be sent to\n\t\t\t * all process.\n\t\t\t * \n\t\t\t */\n\n\t\t\tfor (int i = 0; i < port_list.length; i++) {\n\t\t\t\tSocket processClient = new Socket(\"localhost\", port_list[i]);\n\t\t\t\tprocessClient.setReuseAddress(true);\n\t\t\t\tOutputStream processStream = processClient.getOutputStream();\n\t\t\t\tBufferedWriter processWriter = new BufferedWriter(\n\t\t\t\t\t\tnew OutputStreamWriter(processStream));\n\n\t\t\t\tprocessWriter.write(\"Master: Offset =\" + new_offset[i]);\n\n\t\t\t\t// System.out.println(\"Sending data from Master to other process running on \"\n\t\t\t\t// + port_list[i]);\n\n\t\t\t\tprocessWriter.flush();\n\t\t\t\t// processWriter.close();\n\t\t\t\tprocessClient.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private void processNeighbors() {\n for(int i = 0; i < this.nextAvailPort; i++) {\n if(this.ports[i] == null) { continue; }\n System.out.println(this.ports[i].getRemoteRouterDesc().simulatedIPAddress);\n }\n }", "public static void main(String[] args) throws IOException {\n\t\tInetAddress ip = InetAddress.getByAddress(new byte[] {(byte) 95, (byte) 215, (byte) 62, (byte) 5});\n\t\t\n\t\t// connection request\n\t\t// data : 00 00 04 17 27 10 19 80 00 00 00 00 c6 a2 92 eb\n\t\t// convert to byte[] array\n\t\tbyte[] buffer = new byte[] {0x00, 0x00, 0x04, 0x17, 0x27, 0x10, 0x19, (byte) 0x80, 0x00, 0x00, 0x00, 0x00, (byte) 0xc6, (byte) 0xa2, (byte) 0x92, (byte) 0xeb};\n\t\tint length = buffer.length;\n\t\t\n\t\t// DatagramPacket is used to send and received UDP packet \n\t\tDatagramPacket packet = new DatagramPacket(buffer, length, ip, 80);\n\t\tDatagramSocket socket = new DatagramSocket();\n\t\tsocket.send(packet);\n\t\t\n\t\tSystem.out.println(\"Already sent\");\n\t\t\n\t\tsocket.receive(packet);\n\t\t\n\t\tSystem.out.println(byteArray2Hex(packet.getData()));\n\t\tSystem.out.println(\"Connect response\");\n\t\tsocket.close();\n\t\t\n }", "public void sendDiscovery() {\n\t\tCharset charSet = Charset.forName(\"US-ASCII\");\n\t\t\n\t\tbyte[] b = BROADCAST.getBytes(charSet);\n\t\tDatagramPacket dgram = null;\n\t\t\n\t\ttry {\n\t\t\tdgram = new DatagramPacket(b, b.length, InetAddress.getByName(MCAST_ADDR), DEST_PORT);\n\t\t} catch (UnknownHostException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\tsocket.send(dgram);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void connectDevice(String address) {\n// // Get the device MAC address\n BluetoothDevice device = mBtAdapter.getRemoteDevice(address);\n// // Attempt to connect to the device\n mChatService.connect(device, true);\n }", "private void connectDevice(Intent data, boolean secure) {\n String address = data.getExtras()\n .getString(EXTRA_DEVICE_ADDRESS);\n // Get the BluetoothDevice object\n BluetoothDevice device = bluetoothAdapter.getRemoteDevice(address);\n // Attempt to connect to the device\n btService.connect(device, secure);\n }", "public void switchOn() throws RemoteHomeConnectionException {\n m.sendCommand(parseDeviceIdForMultipleDevice(getRealDeviceId()), \"l\"+getSubDeviceNumber()+\"o\");\n setCurrentState(true);\n }", "public void startNetwork(int port);", "public interface IPresenceMapping extends android.os.IInterface\n{\n/** Local-side IPC implementation stub class. */\npublic static abstract class Stub extends android.os.Binder implements info.guardianproject.otr.app.im.plugin.IPresenceMapping\n{\nprivate static final java.lang.String DESCRIPTOR = \"info.guardianproject.otr.app.im.plugin.IPresenceMapping\";\n/** Construct the stub at attach it to the interface. */\npublic Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}\n/**\n * Cast an IBinder object into an info.guardianproject.otr.app.im.plugin.IPresenceMapping interface,\n * generating a proxy if needed.\n */\npublic static info.guardianproject.otr.app.im.plugin.IPresenceMapping asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof info.guardianproject.otr.app.im.plugin.IPresenceMapping))) {\nreturn ((info.guardianproject.otr.app.im.plugin.IPresenceMapping)iin);\n}\nreturn new info.guardianproject.otr.app.im.plugin.IPresenceMapping.Stub.Proxy(obj);\n}\n@Override public android.os.IBinder asBinder()\n{\nreturn this;\n}\n@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException\n{\nswitch (code)\n{\ncase INTERFACE_TRANSACTION:\n{\nreply.writeString(DESCRIPTOR);\nreturn true;\n}\ncase TRANSACTION_requireAllPresenceValues:\n{\ndata.enforceInterface(DESCRIPTOR);\nboolean _result = this.requireAllPresenceValues();\nreply.writeNoException();\nreply.writeInt(((_result)?(1):(0)));\nreturn true;\n}\ncase TRANSACTION_getPresenceStatus:\n{\ndata.enforceInterface(DESCRIPTOR);\nboolean _arg0;\n_arg0 = (0!=data.readInt());\njava.lang.String _arg1;\n_arg1 = data.readString();\njava.util.Map _arg2;\njava.lang.ClassLoader cl = (java.lang.ClassLoader)this.getClass().getClassLoader();\n_arg2 = data.readHashMap(cl);\nint _result = this.getPresenceStatus(_arg0, _arg1, _arg2);\nreply.writeNoException();\nreply.writeInt(_result);\nreturn true;\n}\ncase TRANSACTION_getOnlineStatus:\n{\ndata.enforceInterface(DESCRIPTOR);\nint _arg0;\n_arg0 = data.readInt();\nboolean _result = this.getOnlineStatus(_arg0);\nreply.writeNoException();\nreply.writeInt(((_result)?(1):(0)));\nreturn true;\n}\ncase TRANSACTION_getUserAvaibility:\n{\ndata.enforceInterface(DESCRIPTOR);\nint _arg0;\n_arg0 = data.readInt();\njava.lang.String _result = this.getUserAvaibility(_arg0);\nreply.writeNoException();\nreply.writeString(_result);\nreturn true;\n}\ncase TRANSACTION_getExtra:\n{\ndata.enforceInterface(DESCRIPTOR);\nint _arg0;\n_arg0 = data.readInt();\njava.util.Map _result = this.getExtra(_arg0);\nreply.writeNoException();\nreply.writeMap(_result);\nreturn true;\n}\ncase TRANSACTION_getSupportedPresenceStatus:\n{\ndata.enforceInterface(DESCRIPTOR);\nint[] _result = this.getSupportedPresenceStatus();\nreply.writeNoException();\nreply.writeIntArray(_result);\nreturn true;\n}\n}\nreturn super.onTransact(code, data, reply, flags);\n}\nprivate static class Proxy implements info.guardianproject.otr.app.im.plugin.IPresenceMapping\n{\nprivate android.os.IBinder mRemote;\nProxy(android.os.IBinder remote)\n{\nmRemote = remote;\n}\n@Override public android.os.IBinder asBinder()\n{\nreturn mRemote;\n}\npublic java.lang.String getInterfaceDescriptor()\n{\nreturn DESCRIPTOR;\n}\n/**\n * Tells if the mapping needs all presence values sent in protocol. If this\n * method returns true, the framework will pass all the presence values\n * received from the server when map to the predefined status.\n *\n * @return true if needs; false otherwise.\n */\n@Override public boolean requireAllPresenceValues() throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nboolean _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\nmRemote.transact(Stub.TRANSACTION_requireAllPresenceValues, _data, _reply, 0);\n_reply.readException();\n_result = (0!=_reply.readInt());\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}\n/**\n * Map the presence values sent in protocol to the predefined presence\n * status.\n *\n * @param onlineStatus The value of presence &lt;OnlineStatus&gt; received\n * from the server.\n * @param userAvailability The value of presence &lt;UserAvailibility&gt;\n * received from the server.\n * @param allValues The whole presence values received from the server.\n * @return a predefined status.\n * @see #requireAllPresenceValues()\n */\n@Override public int getPresenceStatus(boolean onlineStatus, java.lang.String userAvailability, java.util.Map allValues) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nint _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(((onlineStatus)?(1):(0)));\n_data.writeString(userAvailability);\n_data.writeMap(allValues);\nmRemote.transact(Stub.TRANSACTION_getPresenceStatus, _data, _reply, 0);\n_reply.readException();\n_result = _reply.readInt();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}\n/**\n * Gets the value of &lt;OnlineStatus&gt; will be sent to the server when\n * update presence to the predefined status.\n *\n * @param status the predefined status.\n * @return The value of &lt;OnlineStatus&gt; will be sent to the server\n */\n@Override public boolean getOnlineStatus(int status) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nboolean _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(status);\nmRemote.transact(Stub.TRANSACTION_getOnlineStatus, _data, _reply, 0);\n_reply.readException();\n_result = (0!=_reply.readInt());\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}\n/**\n * Gets the value of &lt;UserAvaibility&gt; will be sent to the server when\n * update presence to the predefined status.\n *\n * @param status the predefined status.\n * @return The value of &lt;UserAvaibility&gt; will be sent to the server\n */\n@Override public java.lang.String getUserAvaibility(int status) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\njava.lang.String _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(status);\nmRemote.transact(Stub.TRANSACTION_getUserAvaibility, _data, _reply, 0);\n_reply.readException();\n_result = _reply.readString();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}\n/**\n * Gets the extra presence values other than &lt;OnlineStatus&gt; and\n * &lt;UserAvaibility&gt; will be sent to the server when update presence to\n * the predefined status.\n *\n * @param status the predefined status.\n * @return The extra values that will be sent to the server.\n */\n@Override public java.util.Map getExtra(int status) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\njava.util.Map _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(status);\nmRemote.transact(Stub.TRANSACTION_getExtra, _data, _reply, 0);\n_reply.readException();\njava.lang.ClassLoader cl = (java.lang.ClassLoader)this.getClass().getClassLoader();\n_result = _reply.readHashMap(cl);\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}\n/**\n * Gets an array of the supported presence status. The client can only update\n * presence to the values in the array.\n *\n * @return an array of the supported presence status.\n */\n@Override public int[] getSupportedPresenceStatus() throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nint[] _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\nmRemote.transact(Stub.TRANSACTION_getSupportedPresenceStatus, _data, _reply, 0);\n_reply.readException();\n_result = _reply.createIntArray();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}\n}\nstatic final int TRANSACTION_requireAllPresenceValues = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);\nstatic final int TRANSACTION_getPresenceStatus = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1);\nstatic final int TRANSACTION_getOnlineStatus = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2);\nstatic final int TRANSACTION_getUserAvaibility = (android.os.IBinder.FIRST_CALL_TRANSACTION + 3);\nstatic final int TRANSACTION_getExtra = (android.os.IBinder.FIRST_CALL_TRANSACTION + 4);\nstatic final int TRANSACTION_getSupportedPresenceStatus = (android.os.IBinder.FIRST_CALL_TRANSACTION + 5);\n}\n/**\n * Tells if the mapping needs all presence values sent in protocol. If this\n * method returns true, the framework will pass all the presence values\n * received from the server when map to the predefined status.\n *\n * @return true if needs; false otherwise.\n */\npublic boolean requireAllPresenceValues() throws android.os.RemoteException;\n/**\n * Map the presence values sent in protocol to the predefined presence\n * status.\n *\n * @param onlineStatus The value of presence &lt;OnlineStatus&gt; received\n * from the server.\n * @param userAvailability The value of presence &lt;UserAvailibility&gt;\n * received from the server.\n * @param allValues The whole presence values received from the server.\n * @return a predefined status.\n * @see #requireAllPresenceValues()\n */\npublic int getPresenceStatus(boolean onlineStatus, java.lang.String userAvailability, java.util.Map allValues) throws android.os.RemoteException;\n/**\n * Gets the value of &lt;OnlineStatus&gt; will be sent to the server when\n * update presence to the predefined status.\n *\n * @param status the predefined status.\n * @return The value of &lt;OnlineStatus&gt; will be sent to the server\n */\npublic boolean getOnlineStatus(int status) throws android.os.RemoteException;\n/**\n * Gets the value of &lt;UserAvaibility&gt; will be sent to the server when\n * update presence to the predefined status.\n *\n * @param status the predefined status.\n * @return The value of &lt;UserAvaibility&gt; will be sent to the server\n */\npublic java.lang.String getUserAvaibility(int status) throws android.os.RemoteException;\n/**\n * Gets the extra presence values other than &lt;OnlineStatus&gt; and\n * &lt;UserAvaibility&gt; will be sent to the server when update presence to\n * the predefined status.\n *\n * @param status the predefined status.\n * @return The extra values that will be sent to the server.\n */\npublic java.util.Map getExtra(int status) throws android.os.RemoteException;\n/**\n * Gets an array of the supported presence status. The client can only update\n * presence to the values in the array.\n *\n * @return an array of the supported presence status.\n */\npublic int[] getSupportedPresenceStatus() throws android.os.RemoteException;\n}", "private void print_addr() {\n try(final DatagramSocket socket = new DatagramSocket()){\n socket.connect(InetAddress.getByName(\"8.8.8.8\"), 10002);\n System.out.println(socket.getLocalAddress().getHostAddress()+\":\"+port);\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected void startConnect() {\n if (tcp) {\n connection = new TCPConnection(this);\n } else {\n connection = new UDPConnection(this, udpSize);\n }\n connection.connect(remoteAddr, localAddr);\n }", "public void dbConnector(){\n\t log.info(\"Extracting device information ... \");\n\t dbConnect.getTableInfo(properties.getProperty(\"deviceDetailsTable\"));\n\t deviceName=dbConnect.findValue(\"deviceIP\", deviceIP, \"deviceName\");\n\t log.info(\"deviceName set to \"+deviceName+\" deviceIP= \"+deviceIP);\n\t if(dbConnect.findValue(\"deviceIP\",deviceIP, \"deviceType\").equals(\"CISCO\"))\n\t\t deviceType=RouterType.CISCO;\n\t else\n\t\t deviceType=RouterType.JUNIPER;\n\t log.info(\"deviceType set to \"+deviceType);\n\t devicePassword=dbConnect.findValue(\"deviceIP\", deviceIP, \"devicePassword\");\n\t deviceEnPassword=dbConnect.findValue(\"deviceIP\",deviceIP,\"deviceEnPassword\");\n\t log.info(\"Successfully extracted device data\\nExtracting backupServer details\");\n\t log.info(\"Seraching for backupServerDetailsTable ... \");\n\t dbConnect.getTableInfo(properties.getProperty(\"backupServerDetailsTable\"));\n\t log.info(\"Found the table containing backup server data\");\n\t backupServerIP=properties.getProperty(\"backupServerIP\");\n\t backupServerName=dbConnect.findValue(\"backupServerIP\", properties.getProperty(\"backupServerIP\"), \"backupServerName\");\n\t backupServerPassword=dbConnect.findValue(\"backupServerIP\", properties.getProperty(\"backupServerIP\"), \"backupServerPassword\");\n\t if(dbConnect.findValue(\"backupServerIP\", properties.getProperty(\"backupServerIP\"), \"backupServerType\").equals(\"scp\"))\n\t\t backupServerType=BackupServerType.scp;\n\t else\n\t\t backupServerType=BackupServerType.tftp;\n\t backupServerFolderLocation=dbConnect.findValue(\"backupServerIP\", backupServerIP, \"backupServerFolderLocation\");\n\t if(dbConnect.findValue(\"backupServerIP\", backupServerIP, \"connectionType\").equals(\"TELNET\"))\n\t\t connectionType=ConnectionType.TELNET;\n\t else\n\t\t connectionType=ConnectionType.SSH;\n\t log.info(\"Succesfully collected data about the backup sever IP=\"+backupServerIP+\" folderLoaction=\"+backupServerFolderLocation+\" connection type= \"+connectionType+\" backupServerType= \"+backupServerType+\" username= \"+backupServerName+\" password= ******\");\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-02-25 10:38:11.976 -0500\", hash_original_method = \"24A3E423DE78176900F1058E127BC8B2\", hash_generated_method = \"5B5F51BF25DAE30DEF4DFB5C781A6B4A\")\n \npublic void send(InetAddress host, int port) throws IOException\n {\n __sendPacket.setAddress(host);\n __sendPacket.setPort(port);\n _socket_.send(__sendPacket);\n }", "public void onClick(View v) {\n setBottonSingleTest();\n viewPager.setCurrentItem(0);\n\n\n try{\n DatagramSocket socket = new DatagramSocket();\n byte[] buf = \"hello world\".getBytes();\n\n DatagramPacket packet = new DatagramPacket(buf,\n buf.length,\n InetAddress.getByName(\"255.255.255.255\"),\n 666);\n //给服务端发送数据\n socket.send(packet);\n socket.close();\n }catch (IOException e){\n System.out.println(e);\n }\n }", "void setAudioRoute(String device);", "private native static int shout_set_host(long shoutInstancePtr, String host);", "@Override\n\tpublic void communicateNeighborHostnames() throws InterruptedException {\n\t\tList<Thread> tList= new ArrayList<Thread>();\n\t\tfor (int i = 0; i < nProc-1; i++) {\n\t\t\tint clientPid = i + 2;\n\t\t\tThread t = new Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tConnection conn = pidToConnMap.get(clientPid);\n\t\t\t\t\tList<Integer> clientNeighborPids = neighborMap.get(clientPid);\n\t\t\t\t\tfor (int clientNeighborPid : clientNeighborPids) {\n\t\t\t\t\t\tString neighborHostname;\n\t\t\t\t\t\tif (clientNeighborPid == 1)\n\t\t\t\t\t\t\tneighborHostname = coordinatorHostname;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tneighborHostname = pidToHostnameMap.get(clientNeighborPid);\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconn.send(neighborHostname);\n\t\t\t\t\t\t} catch (IOException e) {\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\ttList.add(t);\n\t\t\tt.start();\n\t\t}\n\t\tfor (Thread t : tList) {\n\t\t\tt.join();\n\t\t}\n\t}" ]
[ "0.66774315", "0.5451111", "0.53253424", "0.5314745", "0.52511877", "0.5218165", "0.5200285", "0.5189691", "0.5162838", "0.51513", "0.51020217", "0.50818044", "0.50708365", "0.5035609", "0.50000143", "0.4983644", "0.49675754", "0.4963349", "0.49349445", "0.4930186", "0.490285", "0.48884374", "0.48803833", "0.48746097", "0.4867361", "0.4865355", "0.485231", "0.4816828", "0.47988814", "0.47984403", "0.47844815", "0.47833216", "0.4750435", "0.4741068", "0.47369993", "0.47241712", "0.470202", "0.46758723", "0.46691388", "0.46662349", "0.4652927", "0.46525997", "0.46502957", "0.46391952", "0.46361843", "0.46309948", "0.4628331", "0.46144766", "0.45969024", "0.4591592", "0.4580953", "0.4564804", "0.45556542", "0.45507675", "0.45502058", "0.45459214", "0.45445886", "0.4543258", "0.45428443", "0.45426553", "0.45405078", "0.4540241", "0.45387667", "0.4537171", "0.45340174", "0.45254707", "0.4521941", "0.45214942", "0.45173284", "0.45101693", "0.45029524", "0.4499505", "0.44991294", "0.44975394", "0.4495171", "0.4491841", "0.44910052", "0.44885212", "0.44884804", "0.44852787", "0.4479565", "0.44714057", "0.44713786", "0.44683072", "0.44656602", "0.4458519", "0.44566566", "0.4454746", "0.44466788", "0.4443246", "0.44383103", "0.44377953", "0.4433744", "0.4432899", "0.44317192", "0.4427285", "0.4421023", "0.44207987", "0.44155642", "0.4413835" ]
0.6792846
0
collect results (including error info.) from the process executing ADB command
private String collectResultFromProcess(Process proc) { StringBuilder sb_result = new StringBuilder(); BufferedReader stdInput = new BufferedReader(new InputStreamReader(proc.getInputStream())); BufferedReader stdError = new BufferedReader(new InputStreamReader(proc.getErrorStream())); String result_line = null; try { while ((result_line = stdInput.readLine()) != null) { sb_result.append(result_line); sb_result.append("\n"); } while ((result_line = stdError.readLine()) != null) { sb_result.append(result_line); sb_result.append("\n"); } } catch(IOException ioe) { ioe.printStackTrace(); } return sb_result.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String collectResultFromProcess(Process proc) {\n StringBuilder sb_result = new StringBuilder();\n\n BufferedReader stdInput = new BufferedReader(new InputStreamReader(proc.getInputStream()));\n BufferedReader stdError = new BufferedReader(new InputStreamReader(proc.getErrorStream()));\n String result_line = null;\n\n try {\n while ((result_line = stdInput.readLine()) != null) {\n sb_result.append(result_line);\n sb_result.append(\"\\n\");\n }\n\n while ((result_line = stdError.readLine()) != null) {\n sb_result.append(result_line);\n sb_result.append(\"\\n\");\n }\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n\n return sb_result.toString();\n }", "private APKFileDetails analyzeApkFile(String filePath) {\n try {\n final String[] commands = {this.aaptCommand, \"dump\", \"badging\", filePath};\n log.debug(\"Executing shell-commands: {}\", Arrays.toString(commands));\n final Process exec = Runtime.getRuntime().exec(commands);\n\n final AtomicReference<String> appPkg = new AtomicReference<>();\n final AtomicReference<String> appName = new AtomicReference<>();\n final AtomicReference<String> appVersion = new AtomicReference<>();\n final AtomicReference<Integer> appVersionCode = new AtomicReference<>();\n final AtomicReference<String> appArch = new AtomicReference<>();\n final List<String> errorLines = new ArrayList<>();\n\n // Process the error stream by collecting all the error lines for further logging\n StreamGobbler errorGobbler = new StreamGobbler(exec.getErrorStream(), \"ERROR\", errorLines::add);\n\n // Process the output by analyzing the line starting with \"package:\"\n StreamGobbler outputGobbler = new StreamGobbler(exec.getInputStream(), \"APK-file DUMP\", line -> {\n if (line.startsWith(\"package:\")) {\n parseInfoLine(line, appPkg, appVersion, appVersionCode);\n if (appPkg.get() == null || appVersion.get() == null) {\n // AAPT output is wrong!\n log.warn(\"Failed to parse aapt output: '\" + line + \"', trying legacy parser\");\n parseInfoLineLegacy(line, appPkg, appVersion, appVersionCode);\n }\n } else if (line.startsWith(\"native-code:\") || line.startsWith(\"alt-native-code:\")) {\n // This is an optional line, so do not care for errors\n parseNativeCodeLine(line, appArch);\n } else if (line.startsWith(\"application-label:\")) {\n parseAppName(line, appName);\n }\n });\n\n // Get ready to consume input and error streams from the process\n errorGobbler.start();\n outputGobbler.start();\n\n final int exitCode = exec.waitFor();\n\n outputGobbler.join();\n errorGobbler.join();\n\n if (exitCode == 0) {\n log.debug(\"Parsed application name and version from APK-file {}: {} {} {}\",\n filePath, appPkg, appVersion, appVersionCode);\n APKFileDetails result = new APKFileDetails();\n\n result.setPkg(appPkg.get());\n result.setVersion(appVersion.get());\n Integer versionCode = appVersionCode.get();\n result.setVersionCode(versionCode != null ? versionCode : 0);\n result.setArch(appArch.get());\n result.setName(appName.get());\n\n return result;\n } else {\n log.error(\"Could not analyze the .apk-file {}. The system process returned: {}. \" +\n \"The error message follows:\", filePath, exitCode);\n errorLines.forEach(log::error);\n throw new APKFileAnalyzerException(\"Could not analyze the .apk-file\");\n }\n } catch (IOException | InterruptedException e) {\n log.error(\"Unexpected error while analyzing APK-file: {}\", filePath, e);\n throw new APKFileAnalyzerException(\"Unexpected error while analyzing APK-file\", e);\n }\n }", "public List<String> execAdbDevices() {\n System.out.println(\"adb devices\");\n\n List<String> ret_device_id_list = new ArrayList<>();\n Process proc = null;\n try {\n proc = new ProcessBuilder(this.adb_path, \"devices\").start();\n proc.waitFor();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n } catch (InterruptedException ire) {\n ire.printStackTrace();\n }\n\n String devices_result = this.collectResultFromProcess(proc);\n String[] device_id_list = devices_result.split(\"\\\\r?\\\\n\");\n\n if (device_id_list.length <= 1) {\n System.out.println(\"No Devices Attached.\");\n return ret_device_id_list;\n }\n\n /**\n * collect the online devices\n */\n String str_device_id = null;\n String device = null;\n String[] str_device_id_parts = null;\n // ignore the first line which is \"List of devices attached\"\n for (int i = 1; i < device_id_list.length; i++) {\n str_device_id = device_id_list[i];\n str_device_id_parts = str_device_id.split(\"\\\\s+\");\n // add the online device\n if (str_device_id_parts[1].equals(\"device\")) {\n device = str_device_id_parts[0];\n ret_device_id_list.add(device);\n System.out.println(device);\n }\n }\n\n return ret_device_id_list;\n }", "protected abstract void parseExecResult(BufferedReader lines) throws IOException;", "public List<String> execAdbDevices()\r\n\t{\r\n\t\tList<String> ret_device_id_list = new ArrayList<>();\r\n\t\t\r\n\t\tProcess proc = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tproc = new ProcessBuilder(this.adb_directory, \"devices\").start();\r\n\t\t\tproc.waitFor();\r\n\t\t} catch (IOException ioe)\r\n\t\t{\r\n\t\t\tioe.printStackTrace();\r\n\t\t} catch (InterruptedException ire)\r\n\t\t{\r\n\t\t\tire.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tString devices_result = this.collectResultFromProcess(proc);\r\n\t String[] device_id_list = devices_result.split(\"\\\\r?\\\\n\");\r\n\r\n\t if (device_id_list.length <= 1)\r\n\t {\r\n\t \tSystem.out.println(\"No Devices Attached.\");\r\n\t \treturn ret_device_id_list;\r\n\t }\r\n\t \r\n\t /**\r\n\t * collect the online devices \r\n\t */\r\n\t String str_device_id = null;\r\n\t String[] str_device_id_parts = null;\r\n\t // ignore the first line which is \"List of devices attached\"\r\n\t for (int i = 1; i < device_id_list.length; i++)\r\n\t\t{\r\n\t\t\tstr_device_id = device_id_list[i];\r\n\t\t\tstr_device_id_parts = str_device_id.split(\"\\\\s+\");\r\n\t\t\t// add the online device\r\n\t\t\tif (str_device_id_parts[1].equals(\"device\"))\r\n\t\t\t\tret_device_id_list.add(str_device_id_parts[0]);\r\n\t\t}\r\n\t \r\n\t return ret_device_id_list;\r\n\t}", "public List<QueryHit> processQuery(String query) {\n // Do something!\n System.err.println(\"Processing query '\" + query + \"'\");\n return new ArrayList<QueryHit>();\n }", "void collect() throws SQLException, IOException {\n\t\t// Open connection to the evaluation db with query classifications\n\t\tconn = DriverManager.getConnection(connectionString, user, pwd);\n\t\tconn.setCatalog(database);\n\t\t\n\t\t/*\nSELECT DISTINCT system, processNo\nFROM evaluationAverage\nWHERE algorithm = 'evosql' AND coverage < 1\n\t\t */\n\t\tPreparedStatement stmt = conn.prepareStatement(\"SELECT DISTINCT system, processNo FROM evaluationAverage WHERE algorithm = 'evosql' AND coverage < 1\");\n\t\tResultSet result = stmt.executeQuery();\n\t\t\n\t\tString lastSystem = \"\";\n\t\tPrintStream output = null;\n\t\twhile (result.next()) {\n\t\t\tString system = result.getString(1);\n\t\t\tint processNo = result.getInt(2);\n\t\t\t\n\t\t\tif (!system.equals(lastSystem)) {\n\t\t\t\tif (output != null) output.close();\n\t\t\t\toutput = new PrintStream(outputPrefix + system + \".sql\");\n\t\t\t\tlastSystem = system;\n\t\t\t}\n\t\t\tcollectScenario(system, processNo, output);\n\t\t}\n\t\toutput.close();\n\t\t\n\t\tconn.close();\n\t\t\n\t\tSystem.out.println(queriesExists);\n\t\tSystem.out.println(pathsExists);\n\t}", "public static void main(String[] args)\r\n {\n TreeMap<String, String> v_mapDBConf = new TreeMap<>();\r\n //Variable which contains queries to execute.\r\n TreeMap<Integer, String> v_mapQueries = new TreeMap<>();\r\n\r\n Object v_database = null;\r\n\r\n //Affects target database informations and queries to execute into variables.\r\n v_mapDBConf = ConfReader.getConf();\r\n v_mapQueries = ConfReader.getQueries();\r\n\r\n try\r\n {\r\n //Dynamic instantiation corresponding to sgbd.\r\n String dbtype = \"src.database.\"+v_mapDBConf.get(\"DB_TYPE\");\r\n Class<?> clazz = Class.forName(dbtype);\r\n Class[] types = new Class[]{String.class, String.class, String.class, String.class, String.class};\r\n Constructor ct = clazz.getConstructor(types);\r\n v_database = ct.newInstance(new Object[]{v_mapDBConf.get(\"DB_IP_ADDR\"), v_mapDBConf.get(\"DB_PORT\"), v_mapDBConf.get(\"DB_SID\"), v_mapDBConf.get(\"DB_PASS\"), v_mapDBConf.get(\"DB_USER\")});\r\n Method methodConn = clazz.getDeclaredMethod(\"connectDb\");\r\n Method methodDisc = clazz.getSuperclass().getDeclaredMethod(\"disconnectDb\");\r\n Method methodChkConn = clazz.getSuperclass().getDeclaredMethod(\"connectionState\");\r\n\r\n //Connects to database.\r\n methodConn.invoke(v_database);\r\n boolean dbStatus = (boolean) methodChkConn.invoke(v_database);\r\n if (dbStatus)\r\n System.out.println(\"Connected to Database.\");\r\n else\r\n System.out.println(\"Error, not connected to Database.\");\r\n\r\n //Call to XmlBuilder.\r\n XmlBuilder.main((Database) v_database, v_mapQueries);\r\n\r\n //Call to HtmlBuilder.\r\n HtmlReplace.main(\"outputs/auditTemplate.html\", v_mapDBConf.get(\"DB_CLIENT\"), v_mapDBConf.get(\"AUDIT_AUTHOR\"));\r\n HtmlReplace.prepareSummary(\"outputs/htmlFinal.html\");\r\n\r\n //Disconnects from database.\r\n methodDisc.invoke(v_database);\r\n dbStatus = (boolean) methodChkConn.invoke(v_database);\r\n if (!dbStatus)\r\n System.out.println(\"Disconnected from Database.\");\r\n else\r\n System.out.println(\"Error, still connected to Database.\");\r\n } catch (SecurityException e)\r\n {\r\n e.printStackTrace();\r\n } catch (IllegalArgumentException e)\r\n {\r\n e.printStackTrace();\r\n } catch (ClassNotFoundException e)\r\n {\r\n e.printStackTrace();\r\n } catch (InstantiationException e)\r\n {\r\n e.printStackTrace();\r\n } catch (IllegalAccessException e)\r\n {\r\n e.printStackTrace();\r\n } catch (NoSuchMethodException e)\r\n {\r\n e.printStackTrace();\r\n } catch (InvocationTargetException e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }", "void collectQuery(String system, int processNo, int processQueryNo, String query, double coverage, int pathCount, QueryPathList qpl, PrintStream output) throws SQLException {\n\t\t// Get all paths to print\n\t\t/*\nSELECT DISTINCT pathNo\nFROM evaluation\nWHERE algorithm = 'evosql' \n\tAND system = {system} AND processNo = {processNo} and queryNo = {processQueryNo}\n\tAND success = 0 \n\t\t */\n\t\tString sql = \"SELECT pathNo, SUM(success) success, SUM(1 - success) failures, GROUP_CONCAT(message SEPARATOR ' | ') messages \\r\\n\" + \n\t\t\t\t\"FROM evaluation\\r\\n\" + \n\t\t\t\t\"WHERE algorithm = 'evosql'\\r\\n\" + \n\t\t\t\t\"\tAND system = ? AND processNo = ? and queryNo = ?\\r\\n\" + \n\t\t\t\t\"GROUP BY pathNo\\r\\n\" + \n\t\t\t\t\"HAVING SUM(1 - success) > 0\\r\\n\" + \n\t\t\t\t\"ORDER BY pathNo\";\n\t\t\n\t\tPreparedStatement stmt = conn.prepareStatement(sql);\n\t\tstmt.setString(1, system);\n\t\tstmt.setInt(2, processNo);\n\t\tstmt.setInt(3, processQueryNo);\n\t\tResultSet result = stmt.executeQuery();\n\t\t/*\n\t\t// Print query info\n\t\toutput.print(\"\\n===================================\\n\");\n\t\toutput.print(\"Query: \" + system + \" - Process \" + processNo + \" query \" + processQueryNo + \"\\n\");\n\t\toutput.print(\"Coverage: \" + String.format(\"%.2f\", coverage) + \"\\n\");\n\t\toutput.print(getBeautifulSql(query));\n\t\toutput.print(\"\\n===================================\\n\");\n*/\n\t\tif (query.contains(\"EXISTS\") || query.contains(\"exists\"))\n\t\t\tthis.queriesExists += 1;\n\t\t\n\t\twhile (result.next()) {\n\t\t\tint pathNo = result.getInt(1);\n\t\t\tString pathSql = qpl.pathList.get(pathNo - 1);\n\t\t\tint successes = result.getInt(2);\n\t\t\tint failures = result.getInt(3);\n\t\t\tString messages = result.getString(4);\n\t\t\tif (successes > 0) continue;\n\t\t\t// Print Path info\n\t\t\toutput.print(\"\\n-----------------------------------\\n\");\n\t\t\toutput.print(\"Query: \" + system + \"-process\" + processNo + \", query \" + processQueryNo + \"\\n\");\n\t\t\toutput.print(\"Path \" + pathNo + \"/\" + pathCount + \" - \" + successes + \" successes, \" + failures + \" failures\\n\");\n\t\t\toutput.print(\"Failure messages: \" + messages + \"\\n\");\n\t\t\toutput.print(getBeautifulSql(pathSql));\n\t\t\toutput.print(\"\\n-----------------------------------\\n\");\n\n\t\t\tSystem.out.println(system + \"\\t\" + processNo + \"\\t\" + processQueryNo + \"\\t\" + pathNo);\n\t\t\t\n\t\t\tif (pathSql.contains(\"EXISTS\") || pathSql.contains(\"exists\"))\n\t\t\t\tthis.pathsExists += 1;\n\t\t}\n\t}", "CommandResult execute();", "private void verifyAnalyzeOutput(String query, String message) throws Exception {\n List<QueryDataBatch>result = testRunAndReturn(QueryType.SQL, query);\n List<List<String>> output = new ArrayList<>();\n assertTrue(result.size() == 1);\n final QueryDataBatch batch = result.get(0);\n final RecordBatchLoader loader = new RecordBatchLoader(getDrillbitContext().getAllocator());\n loader.load(batch.getHeader().getDef(), batch.getData());\n output.add(new ArrayList<String>());\n for (VectorWrapper<?> vw: loader) {\n ValueVector.Accessor accessor = vw.getValueVector().getAccessor();\n Object o = accessor.getObject(0);\n output.get(0).add(o == null ? null: o.toString());\n }\n batch.release();\n loader.clear();\n assertTrue(output.get(0).size() == 2);\n assertEquals(message, output.get(0).get(1));\n }", "public void getResults()\n\t{\n\t\tThread mOutReader = new Thread()\n\t\t{\n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(mProcess.getInputStream()));\n\t\t\t\t\tString line = br.readLine();\n\t\t\t\t\twhile ((!isInterrupted() && line != null))\n\t\t\t\t\t{\n\t\t\t\t\t\tline = line.trim();\n\t\t\t\t\t\tmResults.add(line);\n\t\t\t\t\t\tline = br.readLine();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (InterruptedIOException e)\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t\tcatch (Exception e)\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t//we will process the error stream just in case\n\t\tThread mErrReader = new Thread()\n\t\t{\n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(mProcess.getErrorStream()));\n\t\t\t\t\tString line = br.readLine();\n\t\t\t\t\twhile ((!isInterrupted() && line != null))\n\t\t\t\t\t{\n\t\t\t\t\t\tline = line.trim();\n\t\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t\t\tline = br.readLine();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (InterruptedIOException e)\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t\tcatch (Exception e)\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tmOutReader.start();\n\t\tmErrReader.start();\n\n\t\t//wait for process to end.\n\t\ttry\n\t\t{\n\t\t\tmProcess.waitFor();\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.err.println(\"process exception\");\n\t\t}\n\t\tmFinished = true;\n\t}", "public void execute() throws AeBusinessProcessException;", "public void test_execute() throws Throwable {\r\n\t\t\r\n\t\tCLIService service = null;\r\n\t\t\r\n\t\t// Ping\r\n\t\ttry {\r\n\t\t\tservice = CLIServiceWrapper.getService();\r\n\t\t\tString response = service.tender(CLIServiceConstants.COMMAND_PING + \" \" + TEST_PING_ARG0);\r\n\t\t\tif ( CLIServiceTools.isResponseOkAndComplete(response) ) {\r\n\t\t\t\tPASS(TEST_PING);\r\n\t\t\t} else {\r\n\t\t\t\tFAIL(TEST_PING, \"Response not ok. response=\" + response);\t\t\t\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tABORT(TEST_PING,\"ping failed to exception:\" + e.getMessage());\r\n\t\t}\r\n\r\n\t\t// Process list - log and cli\r\n\t\ttry {\r\n\t\t\tString response = service.tender(CLIServiceConstants.COMMAND_PROCESSLIST);\r\n\t\t\tif ( (CLIServiceTools.isResponseOkAndComplete(response)) && (response.indexOf(TEST_PROCESSLIST_VALIDATION1) >= 0) &&\r\n\t\t\t\t (response.indexOf(TEST_PROCESSLIST_VALIDATION2) >= 0) && (response.indexOf(TEST_PROCESSLIST_VALIDATION3) >= 0) ) {\r\n\t\t\t\tPASS(TEST_PROCESSLIST);\r\n\t\t\t} else {\r\n\t\t\t\tFAIL(TEST_PROCESSLIST, \"Response not ok. See log for response.\");\t\t\t\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tABORT(TEST_PROCESSLIST,\"process list failed to exception:\" + e.getMessage());\r\n\t\t}\t\r\n\t\t\r\n\t\t// Process list - log only - the CLI output should not contain any validations, just the OK.\r\n\t\ttry {\r\n\t\t\tString response = service.tender(CLIServiceConstants.COMMAND_PROCESSLIST + \" =\" + CLIServiceConstants.COMMAND_PROCESSLIST_LOG_VALUE);\r\n\t\t\tif ( (CLIServiceTools.isResponseOkAndComplete(response)) && (response.indexOf(TEST_PROCESSLIST_VALIDATION1) < 0) &&\r\n\t\t\t (response.indexOf(TEST_PROCESSLIST_VALIDATION2) < 0) && (response.indexOf(TEST_PROCESSLIST_VALIDATION3) < 0) ) {\r\n\t\t\t\tPASS(TEST_PROCESSLIST_LOG);\r\n\t\t\t} else {\r\n\t\t\t\tFAIL(TEST_PROCESSLIST_LOG, \"Response not ok. See log for response.\");\t\t\t\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tABORT(TEST_PROCESSLIST_LOG,\"process list (log only) failed to exception:\" + e.getMessage());\r\n\t\t}\t\r\n\r\n\t}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-25 14:24:54.438 -0400\", hash_original_method = \"FB10554031D1BCD284B50199483C1FBD\", hash_generated_method = \"FEDA725AF6571E04608EDC1D440697C2\")\n \n public static String scanResultsCommand(){\n \tdouble taintDouble = 0;\n \n \tString retObj = new String(); \n \tretObj.addTaint(taintDouble);\n \treturn retObj;\n }", "public String getProgInfo(String ItemId) throws SQLException, Exception {\r\n\r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tStringBuffer strQuery = new StringBuffer();\r\n\t\tString strMsg = \"\";\r\n\t\tConnectionContext connectionContext = new ConnectionResource();\r\n\t\ttry {\r\n\t\t\tconn = connectionContext.getConnection();\r\n\r\n\t\t\tstrQuery.setLength(0);\r\n\t\t\tstrQuery.append(\"select cr_syscd,cr_rsrcname,cr_dsncd from cmr0020 \\n\");\r\n\t\t strQuery.append(\" where cr_itemid=? \\n\");\r\n\r\n\t //pstmt = new LoggableStatement(conn, strQuery.toString());\r\n pstmt = conn.prepareStatement(strQuery.toString());\r\n pstmt.setString(1, ItemId);\r\n\t //ecamsLogger.error(((LoggableStatement)pstmt).getQueryString());\r\n rs = pstmt.executeQuery();\r\n\t\t\tif (rs.next()){\r\n\t\t\t\tstrMsg = rs.getString(\"cr_syscd\");\r\n\t\t\t\tstrMsg = strMsg+rs.getString(\"cr_dsncd\");\r\n\t\t\t\tstrMsg = strMsg+rs.getString(\"cr_rsrcname\");\r\n\t\t\t}//end of while-loop statement\r\n\t\t\trs.close();\r\n\t\t\tpstmt.close();\r\n\t\t\tconn.close();\r\n\t\t\trs = null;\r\n\t\t\tpstmt = null;\r\n\t\t\tconn = null;\r\n\r\n\t\t\treturn strMsg;\r\n\r\n\t\t} catch (SQLException sqlexception) {\r\n\t\t\tif (conn != null){\r\n\t\t\t\tconn.close();conn = null;\r\n\t\t\t}\r\n\t\t\tsqlexception.printStackTrace();\r\n\t\t\tthrow sqlexception;\r\n\t\t} catch (Exception exception) {\r\n\t\t\tif (conn != null){\r\n\t\t\t\tconn.close();conn = null;\r\n\t\t\t}\r\n\t\t\texception.printStackTrace();\r\n\t\t\tthrow exception;\r\n\t\t}finally{\r\n\t\t\tif (strQuery != null)\tstrQuery = null;\r\n\t\t\tif (rs != null) try{rs.close();}catch (Exception ex){ex.printStackTrace();}\r\n\t\t\tif (pstmt != null) try{pstmt.close();}catch (Exception ex2){ex2.printStackTrace();}\r\n\t\t\tif (conn != null){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tConnectionResource.release(conn);\r\n\t\t\t\t}catch(Exception ex3){\r\n\t\t\t\t\tex3.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private static Process createIdaProcess(final String idaExe,\n final String idbFileName,\n final String host,\n final int port,\n final String user,\n final String password,\n final String name) throws IdaException {\n\n final String tempPath = SystemHelpers.getTempDirectory();\n final File idcFile = new File(tempPath + BINEXPORT_IDC_FILE);\n try {\n if (!idcFile.exists()) {\n idcFile.createNewFile();\n }\n FileWriter fw = new FileWriter(idcFile.getAbsoluteFile());\n BufferedWriter bw = new BufferedWriter(fw);\n bw.write(BINEXPORT_IDC_FILE_CONTENT);\n bw.close();\n } catch (final IOException exception) {\n CUtilityFunctions.logException(exception);\n }\n final String idcPath = idcFile.getAbsolutePath();\n\n // Setup the invocation of the IDA to SQL exporter\n final ProcessBuilder processBuilder = new ProcessBuilder(idaExe,\n \"-A\",\n \"-OExporterHost:\" + host,\n \"-OExporterPort:\" + port,\n \"-OExporterUser:\" + user,\n \"-OExporterPassword:\" + password,\n \"-OExporterDatabase:\" + name,\n \"-OExporterSchema:public\",\n IdaHelpers.getSArgument(idcPath, SystemHelpers.isRunningWindows()),\n idbFileName);\n\n // Now launch the exporter to export the IDB to the database\n try {\n Process processInfo = null;\n\n processBuilder.redirectErrorStream(true);\n processInfo = processBuilder.start();\n\n // Java manages the streams internally - if they are full, the process blocks, i.e. IDA\n // hangs, so we need to consume them.\n final BufferedReader reader =\n new BufferedReader(new InputStreamReader(processInfo.getInputStream()));\n @SuppressWarnings(\"unused\")\n String line;\n try {\n while ((line = reader.readLine()) != null) {\n System.out.println(line);\n }\n } catch (final IOException exception) {\n reader.close();\n }\n reader.close();\n\n return processInfo;\n } catch (final Exception exception) {\n try {\n CUtilityFunctions.logException(exception);\n } catch (final UnknownFormatConversionException e) {\n // Some Windows error messages contain %1 characters.\n }\n\n throw new IdaException(\n \"E00210: Failed attempting to launch the importer with IDA: \" + exception, exception);\n }\n }", "private List<Map<String, PrimitiveTypeProvider>> executeQuery(QueryMessage qm) {\r\n ListenableFuture<QueryResultsMessage> f = this.adampro.standardQuery(qm);\r\n QueryResultsMessage result;\r\n try {\r\n result = f.get();\r\n } catch (InterruptedException | ExecutionException e) {\r\n LOGGER.error(LogHelper.getStackTrace(e));\r\n return new ArrayList<>(0);\r\n }\r\n\r\n if (result.getAck().getCode() != AckMessage.Code.OK) {\r\n LOGGER.error(result.getAck().getMessage());\r\n }\r\n\r\n if (result.getResponsesCount() == 0) {\r\n return new ArrayList<>(0);\r\n }\r\n\r\n QueryResultInfoMessage response = result.getResponses(0); // only head (end-result) is important\r\n\r\n List<QueryResultTupleMessage> resultList = response.getResultsList();\r\n return resultsToMap(resultList);\r\n }", "public void execute() { // FIXME extract to utility class\n\t\ttry {\n\t\t\tif (errorMsg != null && errorMsg.trim().length() > 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (connection == null || connection.isClosed()) {\n\t\t\t\terrorMsg = Messages.error_getConnection;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//databaseInfo.getServerInfo().compareVersionKey(\"8.2.2\") >= 0;\n\t\t\tboolean isSupportCache = CompatibleUtil.isSupportCache(databaseInfo);\n\t\t\tString sql = \"SELECT owner.name, db_serial.* FROM db_serial WHERE class_name IS NULL\";\n\n\t\t\t// [TOOLS-2425]Support shard broker\n\t\t\tif (databaseInfo.isShard()) {\n\t\t\t\tsql = databaseInfo.wrapShardQuery(sql);\n\t\t\t}\n\n\t\t\tstmt = connection.createStatement();\n\t\t\trs = stmt.executeQuery(sql);\n\t\t\twhile (rs.next()) {\n\t\t\t\tString name = rs.getString(\"name\");\n\t\t\t\tString owner = rs.getString(\"owner.name\");\n\t\t\t\tString currentVal = rs.getString(\"current_val\");\n\t\t\t\tString incrementVal = rs.getString(\"increment_val\");\n\t\t\t\tString maxVal = rs.getString(\"max_val\");\n\t\t\t\tString minVal = rs.getString(\"min_val\");\n\t\t\t\tString cyclic = rs.getString(\"cyclic\");\n\t\t\t\tString startVal = rs.getString(\"started\");\n\t\t\t\tString className = rs.getString(\"class_name\");\n\t\t\t\tString attName = rs.getString(\"att_name\");\n\t\t\t\tboolean isCycle = false;\n\t\t\t\tif (cyclic != null && cyclic.equals(\"1\")) {\n\t\t\t\t\tisCycle = true;\n\t\t\t\t}\n\t\t\t\tString cacheCount = null;\n\t\t\t\tif (isSupportCache) {\n\t\t\t\t\tcacheCount = rs.getString(\"cached_num\");\n\t\t\t\t}\n\t\t\t\tSerialInfo serialInfo = new SerialInfo(name, owner, currentVal,\n\t\t\t\t\t\tincrementVal, maxVal, minVal, isCycle, startVal,\n\t\t\t\t\t\tcacheCount, className, attName);\n\t\t\t\tserialInfoList.add(serialInfo);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\terrorMsg = e.getMessage();\n\t\t\tLOGGER.error(e.getMessage(), e);\n\t\t} finally {\n\t\t\tfinish();\n\t\t}\n\t}", "private void process () {\r\n\r\n ArrayList<String> anomaly;\r\n ArrayList<DataInfo> tmp = new ArrayList<>();\r\n int appState, screenState, screenOrientation, closeToObject, opID;\r\n long permissionCount;\r\n double scanDuration;\r\n String packageName, permission, accessTime;\r\n\r\n // get the data in the given scope (from offset, limit rows)\r\n Cursor cursor = sqliteDBHelper.get_data(\"SELECT \" + SqliteDBStructure.PACKAGE_NAME + \", \"\r\n + SqliteDBStructure.PERMISSION + \", \"\r\n + SqliteDBStructure.DATA_AGGREGATE + \".\" + SqliteDBStructure.ACCESS_TIME + \", \"\r\n + SqliteDBStructure.APP_STATE + \", \"\r\n + SqliteDBStructure.SCREEN_STATE + \", \"\r\n + SqliteDBStructure.SCREEN_ORIENTATION + \", \"\r\n + SqliteDBStructure.CLOSE_TO_OBJECT\r\n + \" FROM \" + SqliteDBStructure.DATA_AGGREGATE\r\n + \" JOIN \" + SqliteDBStructure.INFO_AT_ACCESSTIME + \" ON \"\r\n + SqliteDBStructure.DATA_AGGREGATE + \".\" + SqliteDBStructure.ACCESS_TIME + \" = \" + SqliteDBStructure.INFO_AT_ACCESSTIME + \".\" + SqliteDBStructure.ACCESS_TIME\r\n + \" LIMIT \" + limit + \" OFFSET \" + offset);\r\n\r\n try {\r\n if (cursor != null) {\r\n cursor.moveToFirst();\r\n\r\n while (!cursor.isAfterLast()) {\r\n packageName = cursor.getString(cursor.getColumnIndexOrThrow(SqliteDBStructure.PACKAGE_NAME));\r\n opID = cursor.getInt(cursor.getColumnIndexOrThrow(SqliteDBStructure.PERMISSION));\r\n permission = Permission.opIDToName(opID);\r\n accessTime = cursor.getString(cursor.getColumnIndexOrThrow(SqliteDBStructure.ACCESS_TIME));\r\n appState = cursor.getInt(cursor.getColumnIndexOrThrow(SqliteDBStructure.APP_STATE));\r\n screenState = cursor.getInt(cursor.getColumnIndexOrThrow(SqliteDBStructure.SCREEN_STATE));\r\n screenOrientation = cursor.getInt(cursor.getColumnIndexOrThrow(SqliteDBStructure.SCREEN_ORIENTATION));\r\n closeToObject = cursor.getInt(cursor.getColumnIndexOrThrow(SqliteDBStructure.CLOSE_TO_OBJECT));\r\n\r\n permissionCount = DatabaseUtils.longForQuery(sqliteDBHelper.getReadableDatabase(), \"SELECT COUNT(*) FROM \" + SqliteDBStructure.DATA_AGGREGATE + \" WHERE \" + SqliteDBStructure.PACKAGE_NAME + \" = '\" + packageName + \"' \" + \" AND \" + SqliteDBStructure.PERMISSION + \" = '\" + opID + \"';\", null);\r\n\r\n //Scan duration in Minutes\r\n scanDuration = (((double) stop_scan_time.getTime() + (double) start_scan_time.getTime()) / 1000 )/ 60;\r\n //check for anomaly by ruleset class\r\n anomaly = RuleSet.checkForAnomaly(packageName, permission, permissionCount, appState, screenState, screenOrientation, closeToObject, scanDuration, context);\r\n\r\n //Send data to server or save it locally, if no valid internet connection is available\r\n if (networking) {\r\n sendRawData(packageName, permission, accessTime, appState, screenState, screenOrientation, closeToObject);\r\n if (anomaly.get(0).equals(\"1\"))\r\n MyClient.POST_Anomaly(packageName, permission, anomaly.get(1), \"0\");\r\n } else {\r\n saveRawData(packageName, permission, accessTime, appState, screenState, screenOrientation, closeToObject);\r\n if (anomaly.get(0).equals(\"1\"))\r\n saveAnomaliesImage(packageName, permission, anomaly.get(1), 0);\r\n }\r\n\r\n // create a info object which holds all the necessary information about that data block and store it temporarily in a list\r\n DataInfo info = new DataInfo(packageName, Permission.opIDToDescription(opID), accessTime, permissionCount, anomaly.get(0), anomaly.get(1), scanTime, 0);\r\n tmp.add(info);\r\n\r\n // should the size of the temporary list exceeds MaxBatchSize, write list to the local DB and clear the temp list afterwards \r\n // technically this cannot happen but we are working with threads here so better be safe than sorry\r\n // temp list should not be to big, because we have have to hold task amount of temp list, with each containing around MaxBatchSize entries, in memory at the same time\r\n if (tmp.size() > MaxBatchSize) {\r\n bulkInsertIntoDataAnalyzing(tmp);\r\n tmp.clear();\r\n }\r\n\r\n cursor.moveToNext();\r\n }\r\n\r\n }\r\n } finally {\r\n if (cursor != null) {\r\n cursor.close();\r\n }\r\n }\r\n\r\n // write the data stored in the temp list to the local DB \r\n if (tmp.size() > 0) {\r\n bulkInsertIntoDataAnalyzing(tmp);\r\n tmp.clear();\r\n }\r\n // inform the progress dialog that a task has been finished\r\n updateProgressDialog();\r\n // decrease the amount of ongoing tasks by 1\r\n decreaseTasks();\r\n }", "private static void logQueryResults(OracleConnection connection, String query) throws SQLException {\n connection.query(query, rs -> {\n int columns = rs.getMetaData().getColumnCount();\n List<String> columnNames = new ArrayList<>();\n for (int index = 1; index <= columns; ++index) {\n columnNames.add(rs.getMetaData().getColumnName(index));\n }\n LOGGER.debug(\"{}\", columnNames);\n while (rs.next()) {\n List<Object> columnValues = new ArrayList<>();\n for (int index = 1; index <= columns; ++index) {\n columnValues.add(rs.getObject(index));\n }\n LOGGER.debug(\"{}\", columnValues);\n }\n });\n }", "private static boolean fetchProcessList(long clientId) {\n\t\tfinal Connection con = DBConnection.getConnection();\n\t\tResultSet amsResultSets = null;\n\t\tResultSet processResultSet = null;\n\t\tPreparedStatement getProcessStatement = null;\n\t\tPreparedStatement existingAmsProcessSync = null;\n\t\ttry {\n\t\t\tcon.setAutoCommit(false);\n\t\t\texistingAmsProcessSync = con\n\t\t\t\t\t.prepareStatement(ResourceManager.getQueryValue(\"QUERY_FETCH_EXISTING_AMS_PROCESS_SYNC_LOG\"));\n\t\t\texistingAmsProcessSync.setLong(1, clientId);\n\t\t\tlog.info(existingAmsProcessSync.toString());\n\t\t\tamsResultSets = existingAmsProcessSync.executeQuery();\n\t\t\t// checking if this clientId exists in ams_process_sync table\n\t\t\tif (amsResultSets.first()) {\n\t\t\t\tcon.commit();\n\t\t\t\t// ams process sync log exists, fetching processes between last_synced_on and\n\t\t\t\t// current timestamp..\n\t\t\t\tgetProcessStatement = con\n\t\t\t\t\t\t.prepareStatement(ResourceManager.getQueryValue(\"QUERY_FETCH_UNSYNCED_PROCESS\"));\n\t\t\t} else {\n\t\t\t\tcon.commit();\n\t\t\t\t// ams process log does not exists, fetching all processes..\n\t\t\t\tgetProcessStatement = con.prepareStatement(ResourceManager.getQueryValue(\"QUERY_FETCH_ALL_PROCESS\"));\n\t\t\t}\n\t\t\tlog.info(getProcessStatement.toString());\n\t\t\tprocessResultSet = getProcessStatement.executeQuery();\n\t\t\tif (processResultSet.first()) {\n\t\t\t\tprocessResultSet.beforeFirst();\n\t\t\t\t// extracting resultSet and building process list\n\t\t\t\tPlatformProcess.Builder processList = resultToProcessBuilderMapper(processResultSet);\n\t\t\t\t// adding an empty processIds map builder\n\t\t\t\tprocessList.addProcessIds(ProcessIds.newBuilder().build());\n\t\t\t\t// publishing to ams\n\t\t\t\treturn publishProcessList(processList.build().toByteArray(), clientId);\n\t\t\t} else {\n\t\t\t\t// process(es) is/are already synced to device, sending message...\n\t\t\t\treturn publishProcessResponseMessage(clientId, \"Process list already synced to device.\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\ttry {\n\t\t\t\tcon.rollback();\n\t\t\t} catch (SQLException e2) {\n\t\t\t\tlog.error(Constants.EXCEPTION, e2);\n\t\t\t}\n\t\t\tlog.error(Constants.EXCEPTION, e);\n\t\t} finally {\n\t\t\tDBConnection.closeConnection(con, existingAmsProcessSync, amsResultSets);\n\t\t\tDBConnection.closeConnection(con, getProcessStatement, processResultSet);\n\t\t}\n\t\treturn false;\n\t}", "private void execute(String cmd[])\n {\n /* Begin process */\n Process p;\n String cmdLine = \"\";\n int i;\n \n for ( i = 0 ; i < cmd.length; i++ ) {\n cmdLine += cmd[i];\n cmdLine += \" \";\n }\n System.out.println(\"Starting: \" + cmdLine);\n \n try {\n p = Runtime.getRuntime().exec(cmd);\n } catch ( IOException e ) {\n throw new RuntimeException(\"Test failed - exec got IO exception\");\n }\n \n /* Save process output in StringBuffers */\n output = new MyInputStream(\"Input Stream\", p.getInputStream());\n error = new MyInputStream(\"Error Stream\", p.getErrorStream());\n \n /* Wait for process to complete, and if exit code is non-zero we fail */\n try {\n int exitStatus;\n exitStatus = p.waitFor();\n if ( exitStatus != 0) {\n System.out.println(\"Exit code is \" + exitStatus);\n error.dump(System.out);\n output.dump(System.out);\n throw new RuntimeException(\"Test failed - \" +\n \"exit return code non-zero \" +\n \"(exitStatus==\" + exitStatus + \")\");\n }\n } catch ( InterruptedException e ) {\n throw new RuntimeException(\"Test failed - process interrupted\");\n }\n System.out.println(\"Completed: \" + cmdLine);\n }", "public AnalyticsInformation execCommand(String user, String pass,\r\n\t\t\t\tString sql) {\n\t\t\tAnalyticsInformation ai = new AnalyticsInformation();\r\n\t\t\tai.setResponseTime(\"00:00:00.01\");\r\n\t\t\tStatistics s = new Statistics();\r\n\t\t\ts.setRecursiveCalls(1900);\r\n\t\t\tai.setStatistics(s);\r\n\t\t\t\r\n\t\t\treturn ai;\r\n\t\t}", "private static void ioProcess(final Process process) {\n\t\ttry (InputStream errorStream = process.getErrorStream(); BufferedReader br = new BufferedReader(new InputStreamReader(errorStream));) {\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tSystem.out.println(\"[LOG] line = \" + line);\n\t\t\t}\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tthrow new UncheckedIOException(e);\n\t\t}\n\t}", "public static void main(String[] args) throws Exception {\n\t\tConnection con = DriverManager.getConnection(args[0]);\n\t\tDatabaseMetaData dbmd = con.getMetaData();\n\t\ttry {\n\t\t\t// inspect the catalog by use of dbmd functions\n\t\t\tdumpResultSet(dbmd.getCatalogs());\n//\t\t\tdumpResultSet(dbmd.getSchemas());\t// this produces different outputs on different platforms due to dependency on SAMTOOLS and NETCDF. so exclude it\n\t\t\tdumpResultSet(dbmd.getSchemas(null, \"sys\"));\n//\t\t\tdumpResultSet(dbmd.getTables(null, \"sys\", null, null));\t// this produces different outputs on different platforms due to dependency on Geom and NETCDF.\n\t\t\tdumpResultSet(dbmd.getTables(null, \"tmp\", null, null));\t// schema tmp has 6 tables\n\t\t\tdumpResultSet(dbmd.getUDTs(null, \"sys\", null, null));\n\t\t\tint[] UDTtypes = { Types.STRUCT, Types.DISTINCT };\n\t\t\tdumpResultSet(dbmd.getUDTs(null, \"sys\", null, UDTtypes));\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"FAILED :( \"+ e.getMessage());\n\t\t\tSystem.out.println(\"ABORTING TEST!!!\");\n\t\t}\n\t\tcon.close();\n\t}", "public List<String> getAllProcessNamesFromDatabase() \r\n throws ServiceFailureException;", "private static int dumpCommandExecute(String dumpCommand) throws IOException, InterruptedException{\r\n\t\tRuntime rt = Runtime.getRuntime();\r\n\t\tProcess child = rt.exec(dumpCommand);\r\n\t\tint processComplete = child.waitFor();\r\n\t\treturn processComplete ;\r\n\t}", "R execute();", "public abstract ResultList executeQuery(DatabaseQuery query);", "public static List<String> readError(Process process) throws IOException{\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(process.getErrorStream()));\n\t\tString line;\n\t\tList<String> lines = new ArrayList<>();\n\t\twhile ((line = reader.readLine()) != null) {\n\t\t\tlines.add(line);\n\t\t}\n\t\treturn lines;\n\t}", "private void runProcess(String command) throws PaleoException {\n\t\ttry {\n\t\t\tprocess = Runtime.getRuntime().exec(command);\n\t\t\tinputStream = process.getErrorStream();\n\t\t\terreur = new StringBuilder(\"\");\n\t\t\tint c;\n\t\t\twhile ((c = inputStream.read()) != -1) {\n\t\t\t\terreur.append((char) c);\n\t\t\t}\n\t\t\tinputStream.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new ESException(e.getMessage());\n\t\t}\n\t}", "void collectScenario(String system, int processNo, PrintStream output) throws SQLException {\n\t\tString scenario = system + \"-process\" + processNo;\n\t\tString path = null;\n\t\ttry {\n\t\t\tpath = Paths.get(Runner.class.getResource(\"/\").toURI()).toString() + \"/../../scenarios/\";\n\t\t} catch (URISyntaxException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"Failed for scenario \" + scenario + \".\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tString projectPath = path + scenario + \"/\";\n\n\t\t\n\t\t// open query path reader\n\t\tQueryPathReader qpr = new QueryPathReader(projectPath);\n\t\ttry {\n\t\t\tqpr.init();\t\n\t\t\t\n\t\t\t/* \nSELECT DISTINCT qm.processQueryNo, qc.queryString\nFROM queryclassification qc\nINNER JOIN querymapping qm \n\tON qm.system = qc.system\n\t\tAND qm.queryNo = qc.queryNo\nINNER JOIN evaluationAverage ea\n\tON coverage < 1 \n\t\tAND ea.system = qm.system\n AND ea.processNo = qm.processNo\n\t\tAND ea.queryNo = qm.processQueryNo\nWHERE ea.algorithm = 'evosql' AND qm.system = {system} AND qm.processNo = {processNo}\nORDER BY qm.processQueryNo;\n\t\t\t */\n\t\t\tString sql = \"SELECT DISTINCT qm.processQueryNo, qc.queryString, ea.coverage, qc.paths \\r\\n\" + \n\t\t\t\t\t\"FROM queryclassification qc\\r\\n\" + \n\t\t\t\t\t\"INNER JOIN querymapping qm \\r\\n\" + \n\t\t\t\t\t\"\tON qm.system = qc.system\\r\\n\" + \n\t\t\t\t\t\"\t\tAND qm.queryNo = qc.queryNo\\r\\n\" + \n\t\t\t\t\t\"INNER JOIN evaluationAverage ea\\r\\n\" + \n\t\t\t\t\t\"\tON coverage < 1 \\r\\n\" + \n\t\t\t\t\t\"\t\tAND ea.system = qm.system\\r\\n\" + \n\t\t\t\t\t\" AND ea.processNo = qm.processNo\\r\\n\" + \n\t\t\t\t\t\"\t\tAND ea.queryNo = qm.processQueryNo\\r\\n\" + \n\t\t\t\t\t\"WHERE ea.algorithm = 'evosql' AND qm.system = ? AND qm.processNo = ?\\r\\n\" + \n\t\t\t\t\t\"ORDER BY qm.processQueryNo\"; \n\t\t\t\t\t\n\t\t\tPreparedStatement stmt = conn.prepareStatement(sql);\n\t\t\tstmt.setString(1, system);\n\t\t\tstmt.setInt(2, processNo);\n\t\t\tResultSet result = stmt.executeQuery();\n\t\t\n\t\t\t// Get all queries to collect\n\t\t\tint queryCount = 0;\n\t\t\tif (result.last()) {\n\t\t\t\tqueryCount = result.getRow();\n\t\t\t\tresult.beforeFirst();\n\t\t\t}\n\t\t\tint[] queryNumbers = new int[queryCount];\n\t\t\tString[] queryStrings = new String[queryCount];\n\t\t\tdouble[] queryCoverages = new double[queryCount];\n\t\t\tint[] pathCounts = new int[queryCount];\n\t\t\tint i = 0;\n\t\t\twhile (result.next()) {\n\t\t\t\tqueryNumbers[i] = result.getInt(1);\n\t\t\t\tqueryStrings[i] = result.getString(2);\n\t\t\t\tqueryCoverages[i] = result.getDouble(3);\n\t\t\t\tpathCounts[i] = result.getInt(4);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t\n\t\t\t// For each query collect the information needed and store it \n\t\t\tfor (int j = 0; j < queryCount; j++) {\n\t\t\t\tint processQueryNo = queryNumbers[j];\n\t\t\t\tString query = queryStrings[j];\n\t\t\t\tdouble coverage = queryCoverages[j];\n\t\t\t\tQueryPathList qpl = qpr.read(processQueryNo);\n\t\t\t\tcollectQuery(system, processNo, processQueryNo, query, coverage, pathCounts[j], qpl, output);\n\t\t\t}\n\t\t\t\n\t\t\tqpr.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"Failed for scenario \" + scenario + \".\");\n\t\t\treturn;\n\t\t}\n\t}", "public Object doProcess() {\n List<Result> retv = new ArrayList<Result>();\n try {\n current_time = NTPDate.currentTimeMillis();\n current_time_nano = Utils.nanoNow();\n\n try {\n currentProcs = ProcFSUtil.getCurrentProcsHash();\n } catch (Throwable t) {\n if (logger.isLoggable(Level.FINER)) {\n logger.log(Level.FINER, \" [ myMon ] ProcFSUtil.getCurrentProcsHash exc\", t);\n }\n }\n final Result result = getResult();\n if(result != null) {\n result.addSet(\"Max Memory\", Runtime.getRuntime().maxMemory() / MEGABYTE_FACTOR);\n result.addSet(\"Memory\", Runtime.getRuntime().totalMemory() / MEGABYTE_FACTOR);\n result.addSet(\"Free Memory\", Runtime.getRuntime().freeMemory() / MEGABYTE_FACTOR);\n retv.add(result);\n }\n\n Result r = fillMLCPUTimeStats();\n if (r != null)\n retv.add(r);\n\n r = fillParamStats();\n if (r != null)\n retv.add(r);\n\n r = fillProcsStats();\n if (r != null)\n retv.add(r);\n\n if (currentProcs != null && currentProcs.size() > 0) {\n prevProcs = currentProcs;\n }\n\n r = fillPMSStats();\n if (r != null)\n retv.add(r);\n\n r = fillMLLUSHelperStats();\n if (r != null)\n retv.add(r);\n\n r = fillPWStats();\n if (r != null)\n retv.add(r);\n\n r = fillTCWStats();\n if (r != null)\n retv.add(r);\n\n if (IS_MAC) {\n r = fillFromMAC();\n if (r != null)\n retv.add(r);\n }\n } catch (Throwable t) {\n if (logger.isLoggable(Level.FINER)) {\n logger.log(Level.FINER, \"[ myMon ] [ HANDLED ] got ex main loop ... \", t);\n }\n return null;\n } finally {\n last_time_nano = current_time_nano;\n }\n\n currentProcs = null;\n if (logger.isLoggable(Level.FINEST)) {\n logger.log(Level.FINEST, \" [ myMon ] Returning ... \\n\" + retv);\n }\n return retv;\n }", "public Object[] getProgList(String AcptNo) throws SQLException, Exception {\n\t\tConnection conn = null;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\t\tStringBuffer strQuery = new StringBuffer();\n\t\tArrayList<HashMap<String, String>> rsval = new ArrayList<HashMap<String, String>>();\n\t\tHashMap<String, String>\t\t\t rst\t\t = null;\n//\t\tObject[] returnObjectArray\t= null;\n\t\tConnectionContext connectionContext = new ConnectionResource();\n\n\t\ttry {\n\n\t\t\tconn = connectionContext.getConnection();\n\t\t\tstrQuery.setLength(0);\n\t\t\tstrQuery.append(\" select a.cr_jobusr,a.cr_nightusr,a.cr_seq,a.cr_jobstatus,a.cr_jobstart,\\n\");\n\t\t\tstrQuery.append(\" a.cr_jobend,a.cr_runtime,a.cr_bigo,a.cr_time,b.* \\n\");\n\t\t\tstrQuery.append(\" from cmr2700 a, cmd1700 b \\n\");\n\t\t\tstrQuery.append(\" where cr_acptno=? \\n\");\n\t\t\tstrQuery.append(\" and b.cd_acptdt>=a.cr_time \\n\");\n\t\t\tstrQuery.append(\" and to_char(b.cd_creatdt,'yyyymmdd')<=a.cr_time \\n\");\n\t\t\tstrQuery.append(\" and a.cr_seq=b.cd_seq \\n\");\n\t\t\tstrQuery.append(\" order by cd_seq \\n\");\n\t pstmt = conn.prepareStatement(strQuery.toString());\n\t\t\t//pstmt = new LoggableStatement(conn,strQuery.toString());\n\t\t\tpstmt.setString(1, AcptNo);\n\t //ecamsLogger.error(((LoggableStatement)pstmt).getQueryString());\n\t rs = pstmt.executeQuery();\n\n\t while (rs.next())\n\t {\n\t \trst = new HashMap<String, String>();\n\t \trst.put(\"cr_jobusr\", rs.getString(\"cr_jobusr\"));\n\t \trst.put(\"cr_nightusr\", rs.getString(\"cr_nightusr\"));\n\t \trst.put(\"cr_seq\", rs.getString(\"cr_seq\"));\n\t \trst.put(\"cr_jobstatus\", rs.getString(\"cr_jobstatus\"));\n\t \trst.put(\"cr_jobstart\", rs.getString(\"cr_jobstart\"));\n\t \trst.put(\"cr_jobend\", rs.getString(\"cr_jobend\"));\n\t \trst.put(\"cr_runtime\", rs.getString(\"cr_runtime\"));\n\t \trst.put(\"cr_bigo\", rs.getString(\"cr_bigo\"));\n\t \trst.put(\"cr_time\", rs.getString(\"cr_time\").substring(0,4)+\"-\"+rs.getString(\"cr_time\").substring(4,6)+\"-\"+rs.getString(\"cr_time\").substring(6,8));\n\t \tif(!rs.getString(\"cd_color\").equals(\"\") || rs.getString(\"cd_color\")!=null){\n\t \t\trst.put(\"cr_opusr1\", rs.getString(\"cd_color\"));\n\t \t}else{\n\t \t\trst.put(\"cr_opusr1\", \"\");\n\t \t}\n\t \trst.put(\"cd_jobtime\", rs.getString(\"CD_JOBTIME\")); //작업시간\n\t \trst.put(\"cd_jobstep\", rs.getString(\"CD_JOBSTEP\")); //단계\n\t \trst.put(\"cd_grp\", rs.getString(\"CD_GRP\")); //GRP\n\t \trst.put(\"cd_gubun\", rs.getString(\"CD_GUBUN\")); //대분류\n\t \trst.put(\"cd_check\", rs.getString(\"CD_CHECK\")); //점검사항\n\t\t\t\trsval.add(rst);\n\t \trst = null;\n\t }\n\t\t\trs.close();\n\t\t\tpstmt.close();\n\t\t\tconn.close();\n\t\t\t\n\t\t\trs = null;\n\t\t\tpstmt = null;\n\t\t\tconn = null;\n\n\t\t\treturn rsval.toArray();\n\n\t\t} catch (SQLException sqlexception) {\n\t\t\tsqlexception.printStackTrace();\n\t\t\tecamsLogger.error(\"## Cmr2750.getProgList() SQLException START ##\");\n\t\t\tecamsLogger.error(\"## Error DESC : \", sqlexception);\n\t\t\tecamsLogger.error(\"## Cmr2750.getProgList() SQLException END ##\");\n\t\t\tthrow sqlexception;\n\t\t} catch (Exception exception) {\n\t\t\texception.printStackTrace();\n\t\t\tecamsLogger.error(\"## Cmr2750.getProgList() Exception START ##\");\n\t\t\tecamsLogger.error(\"## Error DESC : \", exception);\n\t\t\tecamsLogger.error(\"## Cmr2750.getProgList() Exception END ##\");\n\t\t\tthrow exception;\n\t\t}finally{\n\t\t\tif (strQuery != null) \tstrQuery = null;\n\t\t\tif (rsval != null) rsval = null;\n\t\t\tif (rs != null) try{rs.close();}catch (Exception ex){ex.printStackTrace();}\n\t\t\tif (pstmt != null) try{pstmt.close();}catch (Exception ex2){ex2.printStackTrace();}\n\t\t\tif (conn != null){\n\t\t\t\ttry{\n\t\t\t\t\tConnectionResource.release(conn);\n\t\t\t\t}catch(Exception ex3){\n\t\t\t\t\tecamsLogger.error(\"## Cmr2750.getProgList() connection release exception ##\");\n\t\t\t\t\tex3.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "Qtl fetch(long internalID) throws AdaptorException ;", "public List<TASCProcessTO> getProcess(SearchProcess searchProcess) throws Exception {\r\n\t\tSystem.out.println(\"Enter: getProcess()\");\r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tTASCProcessTO processTO = null;\r\n\t\tList<TASCProcessTO> processList = new ArrayList<TASCProcessTO>();\r\n\t\tStringBuffer queryBuff = new StringBuffer();\r\n\t\tqueryBuff.append(\"select PROCESS_ID,FILE_NAME,SOURCE_SYSTEM,HIER_VALIDATION,BIO_VALIDATION,DEMO_VALIDATION,CONTENT_VALIDATION,\");\r\n\t\tqueryBuff.append(\"OBJECTIVE_VALIDATION,ITEM_VALIDATION,WKF_PARTITION_NAME,DATETIMESTAMP,(SELECT GETSTATUS(PROCESS_ID) FROM DUAL) STSTUS, ER_VALIDATION \");\r\n\t\t//queryBuff.append(\",to_number(datetimestamp - to_date('01-JAN-1970','DD-MON-YYYY')) * (24 * 60 * 60 * 1000) long_time \");\r\n\t\tqueryBuff.append(\"from stg_process_status \");\r\n\t\t// queryBuff.append(\" WHERE rownum<10 \");\r\n\t\tif(searchProcess != null) {\r\n\t\t\tqueryBuff.append(\" WHERE 1 = 1 \");\r\n\t\t\tif(searchProcess.getCreatedDate() != null && searchProcess.getCreatedDate().trim().length() > 0\r\n\t\t\t\t\t&& searchProcess.getUpdatedDate() != null && searchProcess.getUpdatedDate().trim().length() > 0) {\r\n\t\t\t\tqueryBuff.append(\"AND (DATETIMESTAMP between to_date(?, 'MM/DD/YYYY') and to_date(?, 'MM/DD/YYYY')+1) \");\r\n\t\t\t}\r\n\t\t\tif(searchProcess.getStructElement() != null && searchProcess.getStructElement().trim().length() > 0) \r\n\t\t\t\tqueryBuff.append(\"AND SOURCE_SYSTEM = ? \");\r\n\t\t}\r\n\t\tqueryBuff.append(\" order by PROCESS_ID desc \");\r\n\t\tString query = queryBuff.toString();\r\n\t\t// System.out.println(query);\r\n\t\ttry {\r\n\t\t\tconn = BaseDAO.connect(DATA_SOURCE);\r\n\t\t\tint count = 0;\r\n\t\t\tpstmt = conn.prepareCall(query);\r\n\t\t\tif(searchProcess != null) {\r\n\t\t\t\tif(searchProcess.getCreatedDate() != null && searchProcess.getCreatedDate().trim().length() > 0\r\n\t\t\t\t\t\t&& searchProcess.getUpdatedDate() != null && searchProcess.getUpdatedDate().trim().length() > 0) {\r\n\t\t\t\t\tpstmt.setString(++count, searchProcess.getCreatedDate());\r\n\t\t\t\t\tpstmt.setString(++count, searchProcess.getUpdatedDate());\r\n\t\t\t\t}\r\n\t\t\t\tif(searchProcess.getStructElement() != null && searchProcess.getStructElement().trim().length() > 0) \r\n\t\t\t\t\tpstmt.setString(++count, searchProcess.getStructElement());\r\n\t\t\t}\r\n\t\t\trs = pstmt.executeQuery();\r\n\t\t\twhile(rs.next()) {\r\n\t\t\t\tprocessTO = new TASCProcessTO();\r\n\t\t\t\tprocessTO.setProcessId(rs.getString(\"PROCESS_ID\"));\r\n\t\t\t\tprocessTO.setFileName(rs.getString(\"FILE_NAME\"));\r\n\t\t\t\tprocessTO.setSourceSystem(rs.getString(\"SOURCE_SYSTEM\"));\r\n\t\t\t\tprocessTO.setHierValidation(rs.getString(\"HIER_VALIDATION\"));\r\n\t\t\t\tprocessTO.setBioValidation(rs.getString(\"BIO_VALIDATION\"));\r\n\t\t\t\tprocessTO.setDemoValidation(rs.getString(\"DEMO_VALIDATION\"));\r\n\t\t\t\tprocessTO.setContentValidation(rs.getString(\"CONTENT_VALIDATION\"));\r\n\t\t\t\tprocessTO.setObjValidation(rs.getString(\"OBJECTIVE_VALIDATION\"));\r\n\t\t\t\tprocessTO.setItemValidation(rs.getString(\"ITEM_VALIDATION\"));\r\n\t\t\t\tprocessTO.setWkfPartitionName(rs.getString(\"WKF_PARTITION_NAME\"));\r\n\t\t\t\tprocessTO.setDateTimestamp(rs.getString(\"DATETIMESTAMP\"));\r\n\t\t\t\tprocessTO.setOverallStatus(rs.getString(\"STSTUS\"));\r\n\t\t\t\tprocessTO.setErValidation(rs.getString(\"ER_VALIDATION\") == null ? \" \" : rs.getString(\"ER_VALIDATION\"));\r\n\t\t\t\tprocessList.add(processTO);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new Exception(e.getMessage());\r\n\t\t} finally {\r\n\t\t\ttry {rs.close();} catch (Exception e2) {}\r\n\t\t\ttry {pstmt.close();} catch (Exception e2) {}\r\n\t\t\ttry {conn.close();} catch (Exception e2) {}\r\n\t\t}\r\n\t\tSystem.out.println(\"Exit: getProcess()\");\r\n\t\treturn processList;\r\n\t}", "public void post(){\n\t\tString stmp = \"graphs/graph_1510816061185\";\n\t\tapkConstruct(); // fills apkinfo\n//\t\tEmulator em = new Emulator(\"Nexus5X\");\n//\t\tem.start();\n\t\tAndroidEmulatorInstrumentator aei = null;\n//\t\tAndroidEmulatorInstrumentator aei = em.getInstrumentator();\n\t\t\n\t\tResultProcessor rp = new ResultProcessor(stmp, aei, this.apkInfo);\n\t\t\n\t\trp.run();\n\t\trp.print();\n\t}", "public void schemaUpdated() throws SQLException, IOException {\n ResultSet resultSet = databaseStatement.executeQuery(\"select count(datname) from pg_database\");\n int uniqueID = 0;\n if(resultSet.next()) {\n uniqueID = resultSet.getInt(1);\n }\n String newDBName = \"OSM\"+uniqueID;\n ProcessBuilder processBuilder = new ProcessBuilder(\"src/main/resources/schema/schemaUploader.sh\", newDBName, password);\n Process process = processBuilder.start();\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));\n String line = null; // This is here for testing purposes\n while ((line = bufferedReader.readLine()) != null ) {\n System.out.println(line);\n }\n }", "private void printLogCommandResult(Result result) {\n logger.info(\"Command status: \" + result.getStatus().toString());\n\n // In case command fails\n if (!result.hasSucceeded()) {\n logger.info(\"Command message: \" + result.getMessage());\n }\n }", "@Override\n protected Object doInBackground() throws Exception {\n ArrayList<String> listQueries = new ArrayList<String>(0);\n //get process query\n String processId = UUID.randomUUID().toString();\n String billId = (String) AppProperties.getProperty(\"CurrentBillID\");\n String processStatus = ProcessProcess.ProcessStatus.Start.toString();\n String insQuery = ProcessQueries.INSERT_PROCESS(processId, billId, processStatus);\n listQueries.add(insQuery);\n loadFilesFromFolder();\n for (BungeniOdfDocumentHelper docHelper : changesInfo.getDocuments()) {\n //get process docs queries\n String documentPath = docHelper.getDocumentPath();\n String filename = documentPath.substring(documentPath.lastIndexOf(File.separator) + 1);\n String docAuthor = docHelper.getPropertiesHelper().getUserDefinedPropertyValue(\"BungeniDocAuthor\");\n Long lcheckSum = docHelper.getChecksum();\n String insQuery2 = ProcessQueries.INSERT_PROCESS_DOCS(processId, filename, documentPath, docAuthor, lcheckSum);\n listQueries.add(insQuery2);\n {\n //get process amend queries\n DocumentChange documentChange = getDocChange(docHelper, true, filename, docAuthor);\n listQueries.addAll(getDocChangeQueries(processId, documentChange));\n }\n }\n BungeniClientDB db = BungeniClientDB.defaultConnect();\n db.Connect();\n db.Update(listQueries, true);\n db.EndConnect();\n return Boolean.TRUE;\n }", "public ArrayList<String> processCommandFile() throws Exception {\n ArrayList<String> processedArray = flagDuplicates(createStringArray());\n verifyValidityOfArray(processedArray);\n return processedArray;\n }", "private void execute() throws Exception {\n String parserIdentifier = Parsers.getIdentifier(parser);\n MDC.put(\"parser\", parserIdentifier);\n\n File dataSet = checkInbox();\n\n if (dataSet != null) {\n SLALogItem slaLogItem = getSLALogger().createLogItem(\"Executing parser \" + parserIdentifier, parser.getClass().getCanonicalName());\n try {\n context.isInProgress(true);\n\n MDC.put(\"input\", dataSet.getName());\n\n logger.info(\"Executing parser.\");\n\n parser.process(dataSet, persister);\n\n timeManager.update();\n\n // It is important that we commit before\n // we advance the inbox. Since it is not done\n // in a transaction we must make sure that items\n // are actually stored before removing the item\n // from the inbox. If removing the item fails\n // the parser will complain the next time we try\n // to import the item.\n //\n connection.commit();\n\n // Once the import is complete\n // we can remove of the data set\n // from the inbox.\n //\n inbox.advance();\n\n logger.info(\"Import successful.\");\n \n slaLogItem.setCallResultOk();\n slaLogItem.store();\n \n } catch (Exception e) {\n slaLogItem.setCallResultError(\"Parser \" + parserIdentifier + \" failed - Cause: \" + e.getMessage());\n slaLogItem.store();\n\n throw e;\n }\n }\n }", "private void cmdInfoProg() {\n long total = Runtime.getRuntime().totalMemory();\n long free = Runtime.getRuntime().freeMemory();\n NumberFormat nf = NumberFormat.getInstance();\n Log.println(\"(mem: \"\n + NumberFormat.getPercentInstance().format(\n (double) free / (double) total) + \" = \"\n + nf.format(free) + \" bytes free, \" + nf.format(total)\n + \" bytes total)\");\n }", "protected void _oneParameterCommandsResults(RemoteResults results){\n\t\tsetRecordProcessed(true);\n\t\tint statusCode = droiddata.getStatusCode();\t\t\n\t\tif(statusCode==StatusCodes.NO_SCRIPT_FAILURE){\n\t\t\tif(processResourceMessageInfoResults(PASSED_MESSAGE)) \n\t\t\t\treturn;\n\t\t\tif(props.containsKey(SAFSMessage.PARAM_1)){\n\t\t\t\tissuePassedSuccessUsing(props.getProperty(SAFSMessage.PARAM_1));\n\t\t\t}else{\n\t\t\t\tissuePassedSuccess(\"\");// no additional comment\n\t\t\t}\n\t\t}\n\t\telse if(statusCode==StatusCodes.SCRIPT_NOT_EXECUTED){\n\t\t\t// driver will log warning...\n\t\t\tsetRecordProcessed(false);\n\t\t}\n\t\telse{ //object not found? what?\t\t\n\t\t\tlogResourceMessageFailure();\n\t\t}\n\t}", "public void execute() {\n /*\n r6 = this;\n java.lang.String r0 = \"Failed to close connection after DBUnit operation: \"\n java.util.logging.Logger r1 = log\n java.lang.StringBuilder r2 = new java.lang.StringBuilder\n r2.<init>()\n java.lang.String r3 = \"Executing DBUnit operations: \"\n r2.append(r3)\n int r3 = r6.size()\n r2.append(r3)\n java.lang.String r2 = r2.toString()\n r1.info(r2)\n org.dbunit.database.IDatabaseConnection r1 = r6.getConnection() // Catch:{ all -> 0x005a }\n r6.disableReferentialIntegrity(r1) // Catch:{ all -> 0x0058 }\n java.util.Iterator r2 = r6.iterator() // Catch:{ all -> 0x0058 }\n L_0x0027:\n boolean r3 = r2.hasNext() // Catch:{ all -> 0x0058 }\n if (r3 == 0) goto L_0x0037\n java.lang.Object r3 = r2.next() // Catch:{ all -> 0x0058 }\n org.seamless.util.dbunit.DBUnitOperations$Op r3 = (org.seamless.util.dbunit.DBUnitOperations.Op) r3 // Catch:{ all -> 0x0058 }\n r3.execute(r1) // Catch:{ all -> 0x0058 }\n goto L_0x0027\n L_0x0037:\n r6.enableReferentialIntegrity(r1) // Catch:{ all -> 0x0058 }\n if (r1 == 0) goto L_0x0057\n r1.close() // Catch:{ Exception -> 0x0040 }\n goto L_0x0057\n L_0x0040:\n r1 = move-exception\n java.util.logging.Logger r2 = log\n java.util.logging.Level r3 = java.util.logging.Level.WARNING\n java.lang.StringBuilder r4 = new java.lang.StringBuilder\n r4.<init>()\n r4.append(r0)\n r4.append(r1)\n java.lang.String r0 = r4.toString()\n r2.log(r3, r0, r1)\n L_0x0057:\n return\n L_0x0058:\n r2 = move-exception\n goto L_0x005c\n L_0x005a:\n r2 = move-exception\n r1 = 0\n L_0x005c:\n if (r1 == 0) goto L_0x0079\n r1.close() // Catch:{ Exception -> 0x0062 }\n goto L_0x0079\n L_0x0062:\n r1 = move-exception\n java.util.logging.Logger r3 = log\n java.util.logging.Level r4 = java.util.logging.Level.WARNING\n java.lang.StringBuilder r5 = new java.lang.StringBuilder\n r5.<init>()\n r5.append(r0)\n r5.append(r1)\n java.lang.String r0 = r5.toString()\n r3.log(r4, r0, r1)\n L_0x0079:\n goto L_0x007b\n L_0x007a:\n throw r2\n L_0x007b:\n goto L_0x007a\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.seamless.util.dbunit.DBUnitOperations.execute():void\");\n }", "private String exec(String cmd, File ws, String errorMessage) throws IOException, ProcessingException {\n listener.info(\"Executing: \"+cmd);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n int r = new Proc(cmd, null, baos, ws).join();\n if(r!=0) {\n listener.info(baos.toString());\n throw new ProcessingException(errorMessage);\n }\n return baos.toString();\n }", "public interface DatabaseAccessManager {\r\n\r\n /**\r\n * Method which create index on column process_name in table debug_log. \r\n * @throws ServiceFailureException in case of error while creating index in database.\r\n */\r\n public void createIndexOnProcessName() throws ServiceFailureException;\r\n \r\n /**\r\n * Method which drop index of column process_name in table debug_log. \r\n * @throws ServiceFailureException in case of error while dropping index in database.\r\n */\r\n public void dropProcessNameIndex() throws ServiceFailureException;\r\n \r\n /**\r\n * Method which retrieve all process names from database.\r\n * @return list of all unique process names in database.\r\n * @throws ServiceFailureException in case of error during processing.\r\n */\r\n public List<String> getAllProcessNamesFromDatabase() \r\n throws ServiceFailureException;\r\n \r\n /**\r\n * Method which access all logs associated with process name \r\n * \"name\" in table debug_log in database.\r\n * @param name represents name of specific process.\r\n * @return list of all logs which process name NAME. \r\n * @throws ServiceFailureException in case of error while working with database.\r\n * @throws java.sql.SQLException in case of error while\r\n * closing connection/statement/resultSet.\r\n */\r\n public List<DatabaseRow> accessDebugLogTableByName(String name) \r\n throws ServiceFailureException, SQLException;\r\n \r\n /**\r\n * Method which retrieves all logs from database associated with process\r\n * names in processNames list.\r\n * @param processNames represents list of all process name which should be analyzed.\r\n * @throws ServiceFailureException in case of error while retieving data.\r\n */\r\n public void accessDebugLogTable(List<String> processNames) \r\n throws ServiceFailureException;\r\n \r\n /**\r\n * Check database if contains verbose logs.\r\n * @return true if database contains verbose logs, false otherwise.\r\n * @throws ServiceFailureException in case of error while retieving data.\r\n */\r\n public boolean containsVerboseLogs() throws ServiceFailureException;\r\n}", "public void addResult(Result result) {\n try {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n dbb.addResult(result);\n dbb.commit();\n dbb.closeConnection();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public void runQuery(String query, String db) throws SQLException {\n if (null == conn) {\n throw new IllegalStateException(\"No connection open\");\n }\n Statement stmt = conn.createStatement();\n\n // Should use a prepared statement\n stmt.execute(\"use \" + db);\n try {\n if (stmt.execute(query)) {\n ResultSet resultSet = stmt.getResultSet();\n ResultSetMetaData metadata = resultSet.getMetaData();\n int cols = metadata.getColumnCount();\n while (resultSet.next()) {\n for (int c = 1; c <= cols; ++c) {\n System.out.print(resultSet.getObject(c).toString());\n if (c != cols) System.out.print(\"\\t\");\n else System.out.println();\n }\n }\n } else {\n System.err.println(\"Query failed\");\n System.err.println(\"Warnings: \" + stmt.getWarnings());\n }\n } finally {\n stmt.close();\n }\n }", "private void dumpResultMapping ()\r\n {\r\n for (Entry<Result, Set<Candidate>> entry : connection.getResultMap().\r\n entrySet()) {\r\n logger.debug(\"Result: {}\", entry.getKey());\r\n\r\n for (Candidate candidate : entry.getValue()) {\r\n logger.debug(\"* candidate: {}\", candidate);\r\n }\r\n }\r\n }", "private void executeQuery() {\n }", "private Tuple<String,String> extractQueryAndQueryExecution(String query){\n\t\tString[] elements = query.split(\"--\");\n\t\treturn new Tuple<String,String>(elements[0].trim(), elements[1].trim());\n\t}", "@Postprocess\n public void getReport() {\n try {\n BufferedWriter bufferWriter = new BufferedWriter(new FileWriter(logfile, false));\n if (!results.isEmpty()) {\n bufferWriter.write(\"===========================================================\\n\");\n bufferWriter.write(\"sys_milli,\\t\\tdb_micro,\\t\\ttime_diff\\n\");\n Collections.sort(results);\n for (MysqlheartbeatBean mhb : results) {\n bufferWriter.write(String.valueOf(mhb.getSysMilli()) + \",\\t\\t\"\n + String.valueOf(mhb.getDbMicro()) + \",\\t\\t\"\n + String.valueOf(mhb.getDbMicro() - mhb.getSysMilli()) + \"\\n\");\n }\n bufferWriter.flush();\n }\n bufferWriter.close();\n } catch (IOException ex) {\n logger.log(Level.SEVERE, \"{0}: {1}\", new Object[]{toolName, ex.getMessage()});\n }\n }", "private static void printUsage(Exception ex) {\n if (null == ex.getMessage()) {\n final StringBuilder builder = new StringBuilder();\n for (final OvsDbCli command : values())\n builder.append(command.usage());\n log.error(builder.toString(), ex);\n } else {\n log.error(\"{}\", ex.getMessage(), ex);\n }\n }", "@Override\r\n\tpublic void onProcessFailure(ProcessFailureInfo processFailureInfo) {\n\t\t\r\n\t}", "public void execute() throws Exception {\n\n\t\tString datepattern = \"yyyy-MM-dd\";\n\t\tSimpleDateFormat sdf =new SimpleDateFormat(datepattern);\n\t\t//testing console\n\t\t if(TestHTTP.test(Parameters.LATC_CONSOLE_HOST))\n\t \tlogfile.info(Parameters.LATC_CONSOLE_HOST+\" OK\");\n\t else \n\t {\n\t \tlogfile.severe(Parameters.LATC_CONSOLE_HOST+\" DOWN\");\n\t \tSystem.exit(0);\n\t \t}\n \t\t\n\t\tListTranslator lt = new ListTranslator();\n ContentWriter cw = new ContentWriter();\n \n ConsoleConnection client = new ConsoleConnection(Parameters.LATC_CONSOLE_HOST);\n \n /*\n * Getting list of link configuration from LATC_CONSOLE\n * JSON Format : title, identifier\n */\n \n if(!client.getTasks())\n {\n \tlogfile.severe(\"Error during get Queue \"+client.getMessage());\n \tSystem.exit(0);\n }\n lt.translateMember(client.getMessage());\n toDoList = lt.getLinkingConfigs();\n \n ReportCSV report = new ReportCSV( Parameters.RESULT_LOCAL_DIR+\"/report\"+sdf.format(new Date())+\".csv\");\n \n for (String title : toDoList.keySet()) {\n \t boolean blacklist = false;\n \tfinal String [] split = toDoList.get(title).split(\"#\");\n \tfinal String id = split[0];\n \tfinal String speccretime = split[1];\n \tfinal String specmodtime = split[2];\n \tfinal String specAuthor = split[3];\n \n \t logfile.info( \"start processing id \"+id+\" title \"+title);\n \n // checking blacklist\n \t if(title.startsWith(\"**\"))\n {\n \tblacklist = true;\n \ttitle = title.substring(2);\n }\n \t\n \tReportCSV.status st = status.failed; \n //create id directory\n boolean exists = (new File(RESULTDIR +'/'+ title).exists());\n if (!exists)\n \t\t\t (new File(RESULTDIR +'/'+ title )).mkdirs();\n \n \n \n \t\n \n /*\n * Writing specification linking from LATC_CONSOLE_HOST/configuration/ID/specification\n */\n if(!client.getSpec(id))\n {\n \tlogfile.severe(\"Error during get Specification id \"+id+\" \"+client.getMessage());\n }\n else\n {\n \t\n \t\tDate startDate = new Date();\n \t\tdatepattern = \"yyyy-MM-dd'T'HH:mm:ssZZ\";\n \t\tsdf.applyPattern(datepattern);\n \tString specContent = client.getMessage();\n\t cw.writeIt(RESULTDIR +'/'+ title + '/'+ Parameters.SPEC_FILE, specContent);\n\t VoidInfoDto Void=this.parseSpec(RESULTDIR +'/'+ title + '/'+ Parameters.SPEC_FILE);\n \n\t Void.setSpecRetrievedTime(sdf.format(startDate));\n\t Void.setSpecCreatedTime(speccretime);\n\t Void.setSpecAuthor(specAuthor);\n\t Void.setID(id);\n\t Void.setTitle(title);\n\t Void.setSpecModifiedTime(specmodtime);\n\t Void.setSilkSpecAPIResource(Parameters.LATC_CONSOLE_HOST+\"/api/task/\"+id+\"/configuration\");\n\t \n//\t \t6- data dump\n\t datepattern = \"yyyy-MM-dd\";\n\t \t\tsdf.applyPattern(datepattern);\n Void.setDataDump(Parameters.RESULTS_HOST + '/' +sdf.format(new Date())+'/'+title + \"/\"+Parameters.LINKS_FILE_STORE);\n Void.setSpec(Parameters.RESULTS_HOST + '/' +sdf.format(new Date())+'/'+title + \"/\"+Parameters.SPEC_FILE);\n \n // blacklist\n if(blacklist)\n {\n \tst = status.ongoing;\n \tVoid.setRemarks(\"Unpredicted\");\n \tclient.postReport(id, Void,Parameters.API_KEY);\n \treport.putData(id, title, Void.getSpec(), 0, st, Void.getRemarks(),Void.getStatItem(),specAuthor);\n \tcontinue;\n }\n \n\t \t//testing endpoint\n\t if(Void.getSourceSparqlEndpoint()!=null && !this.testConn(Void.getSourceSparqlEndpoint()))\n\t \t{\n\t \t\tDate errDate = new Date();\n\t \t\tVoid.setRemarks(Void.getSourceSparqlEndpoint()+\" DOWN\");\n\t \t\tclient.postReport(id, Void,Parameters.API_KEY);\n\t \t\t report.putData(id, title, Void.getSpec(), errDate.getTime()-startDate.getTime(), st, Void.getRemarks(),Void.getStatItem(),specAuthor);\n\t \t\tcontinue;\n\t \t}\n\t if(Void.getTargetSparqlEndpoint()!=null && !this.testConn(Void.getTargetSparqlEndpoint()))\n\t \t{\n\t \t\tDate errDate = new Date();\t\n\t \t\tVoid.setRemarks(Void.getTargetSparqlEndpoint()+\" DOWN\");\n\t \t\tclient.postReport(id, Void,Parameters.API_KEY);\n\t \t\t report.putData(id, title, Void.getSpec(), errDate.getTime()-startDate.getTime(), st, Void.getRemarks(),Void.getStatItem(),specAuthor);\n\t \t\tcontinue;\n\t \t}\n\t if(Void.getSourceUriLookupEndpoint()!=null && !this.testConn(Void.getSourceUriLookupEndpoint()))\n\t \t{\n\t \tDate errDate = new Date();\t\n\t \tVoid.setRemarks(Void.getSourceUriLookupEndpoint()+\" DOWN\");\n\t \t\tclient.postReport(id, Void,Parameters.API_KEY);\n\t \t\t report.putData(id, title, Void.getSpec(), errDate.getTime()-startDate.getTime(), st, Void.getRemarks(),Void.getStatItem(),specAuthor);\n\t \t\tcontinue;\n\t \t}\n\t if(Void.getTargetUriLookupEndpoint()!=null && !this.testConn(Void.getTargetUriLookupEndpoint()))\n\t \t{\n\t \tDate errDate = new Date();\n\t \t\tVoid.setRemarks(Void.getTargetUriLookupEndpoint()+\" DOWN\");\n\t \t\tclient.postReport(id, Void, Parameters.API_KEY);\n\t \t\t report.putData(id, title, Void.getSpec(), errDate.getTime()-startDate.getTime(), st, Void.getRemarks(),Void.getStatItem(),specAuthor);\n\t \t\tcontinue;\n\t \t}\n \n\t \n\t \n\t /*\n\t * Running hadoop for silk Map reduce\n\t */\n\t if (this.runHadoop(title, Void,RESULTDIR)) {\n\t \n\t\n\t cw.writeIt(RESULTDIR +'/'+ title + '/'+ Parameters.VOID_FILE, Void);\n\t\n\t // 2-e\n\t Void.setRemarks(Void.getStatItem()+\" Links generated successfully\");\n\t logfile.info( \"Processing id \"+id+\" title \"+title+ \" success\");\n\t\n\t } // if hadoop\n\t else {\n\t \tlogfile.severe( \"Processing id \"+id+\" title \"+title+ \" failed\");\n \t \n\t }\n\t Date endDate = new Date();\n\t \n\t if(Void.getStatItem()>=0)\n\t \tst = status.sucesss;\n\t else if(Void.getStatItem()==-2)\n\t \tst= status.ongoing;\n\t \n\t report.putData(id, title, Void.getSpec(), endDate.getTime()-startDate.getTime(), st, Void.getRemarks(),Void.getStatItem(),specAuthor);\n\t client.postReport(id, Void,Parameters.API_KEY);\n\t }\n } // for loop\n report.close(); \n logfile.info(\"Runtime done\");\n \n }", "public void run() {\n List<Map> queries = (List<Map>) server.get(\"queries\");\n Connection connection = null;\n if (queries != null && !queries.isEmpty()) {\n String dbServerDisplayName = (String) server.get(\"displayName\");\n try {\n long timeBeforeConnection = System.currentTimeMillis();\n connection = getConnection();\n long timeAfterConnection = System.currentTimeMillis();\n logger.debug(\"Time taken to get Connection: \" + (timeAfterConnection - timeBeforeConnection));\n\n logger.debug(\"Time taken to get Connection for \" + dbServerDisplayName + \" : \" + (timeAfterConnection - timeBeforeConnection));\n\n if (connection != null) {\n logger.debug(\" Connection successful for server: \" + dbServerDisplayName);\n for (Map query : queries)\n executeQuery(connection, query);\n } else {\n\n logger.debug(\"Null Connection returned for server: \" + dbServerDisplayName);\n }\n\n } catch (SQLException e) {\n logger.error(\"Error Opening connection\", e);\n status = false;\n } catch (ClassNotFoundException e) {\n logger.error(\"Class not found while opening connection\", e);\n status = false;\n } catch (Exception e) {\n logger.error(\"Error collecting metrics for \"+dbServerDisplayName, e);\n status = false;\n }\n finally {\n try {\n if (connection != null) {\n closeConnection(connection);\n }\n } catch (Exception e) {\n logger.error(\"Issue closing the connection\", e);\n }\n }\n }\n }", "@Override\n public void start(String[] parameters) throws Exception {\n int proccessId = TypesParser.safeParseInt(parameters[1]);\n boolean errorOccured = false;\n try {\n System.out.println(\"Cleaning ...\");\n String listName = parameters[2];\n String schema = listName.split(\"\\\\.\")[0];\n String table = listName.split(\"\\\\.\")[1];\n String type = table.split(\"_\")[0];\n String flag = table.split(\"_\")[1];\n String tablePrefix = table.replaceAll(flag + \"_\", \"\").replaceAll(type + \"_\", \"\");\n System.out.println(\"Table -> \" + table);\n int ispId = TypesParser.safeParseInt(parameters[3]);\n int userId = TypesParser.safeParseInt(parameters[4]);\n int serverId = parameters.length > 5 ? TypesParser.safeParseInt(parameters[5]) : 0;\n ArrayList<String> bouncesFiles = new ArrayList<String>();\n ArrayList<String> deliverdFiles = new ArrayList<String>();\n ArrayList<String> bounceLinesToRemove = new ArrayList<String>();\n ArrayList<String> deliverdLinesToRemove = new ArrayList<String>();\n String[] lineParts = new String[]{};\n int dropId = 0;\n int ipId = 0;\n int clientId = 0;\n int listId = 0;\n int bounceCleand = 0;\n int dileverdCleand = 0;\n boolean listCount = false;\n DataList list = (DataList)DataList.first(DataList.class, \"name = ?\", new Object[]{listName});\n if (list == null) throw new Exception(\"Data List : \" + listName + \" Does not Exists !\");\n if (list.id == 0) {\n throw new Exception(\"Data List : \" + listName + \" Does not Exists !\");\n }\n StatsCalculator controllerCalcul = new StatsCalculator();\n String[] args = new String[]{\"send_stats\", parameters[5]};\n controllerCalcul.start(args);\n if (TypesParser.safeParseInt(parameters[5]) != 0) {\n String logsFolder = new File(System.getProperty(\"base.path\")).getAbsolutePath() + File.separator + \"tmp\" + File.separator + \"pmta-logs\" + File.separator + \"server_\" + serverId;\n if (!new File(logsFolder).exists()) {\n this.interruptProccess(proccessId);\n errorOccured = true;\n return;\n }\n List filesInFolder = Files.walk(Paths.get(logsFolder, new String[0]), new FileVisitOption[0]).filter(x$0 -> Files.isRegularFile(x$0, new LinkOption[0])).map(Path::toFile).collect(Collectors.toList());\n for (int i = 0; i < filesInFolder.size(); ++i) {\n File pmtaFile = new File(((File)filesInFolder.get(i)).toString());\n if (pmtaFile == null || !pmtaFile.isFile()) continue;\n String[] abPath = pmtaFile.getAbsolutePath().split(File.separator);\n String FileType = abPath[7];\n if (FileType != null && FileType.equalsIgnoreCase(\"bounces\")) {\n bouncesFiles.add(pmtaFile.getAbsolutePath());\n }\n if (FileType == null || !FileType.equalsIgnoreCase(\"delivered\")) continue;\n deliverdFiles.add(pmtaFile.getAbsolutePath());\n }\n this.updateCount(listName);\n if (bouncesFiles != null && bouncesFiles.size() > 0) {\n List<String> lines = null;\n for (String bouncesFile : bouncesFiles) {\n File bounce = new File(bouncesFile);\n if (!bounce.isFile() || (lines = FileUtils.readLines(bounce)) == null || lines.isEmpty()) continue;\n for (String line : lines) {\n if (\"\".equals(line) || (lineParts = line.split(\",(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\", -1)).length != 12 || !\"hardbnc\".equalsIgnoreCase(lineParts[1]) || \"\".equalsIgnoreCase(lineParts[10])) continue;\n dropId = TypesParser.safeParseInt(lineParts[10].split(\"_\")[0]);\n ipId = TypesParser.safeParseInt(lineParts[10].split(\"_\")[1]);\n clientId = TypesParser.safeParseInt(lineParts[10].split(\"_\")[2]);\n listId = TypesParser.safeParseInt(lineParts[10].split(\"_\")[3]);\n if (listId != list.id) continue;\n Database.get(\"lists\").executeUpdate(\"DELETE FROM \" + listName + \" WHERE id = ?\", new Object[]{clientId}, 0);\n System.out.println(\"Deleitng Email ID -> \" + clientId + \" from list --> \" + listName);\n bounceLinesToRemove.add(line);\n ++bounceCleand;\n this.updateProccess(proccessId, \"bounce\");\n }\n }\n }\n if (deliverdFiles != null && deliverdFiles.size() > 0) {\n List<String> lines = null;\n for (String deliverdFile : deliverdFiles) {\n File deliver = new File(deliverdFile);\n if (!deliver.isFile() || (lines = FileUtils.readLines(deliver)) == null || lines.isEmpty()) continue;\n for (String line : lines) {\n if (\"\".equals(line) || (lineParts = line.split(\",(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\", -1)).length != 12 || !\"success\".equalsIgnoreCase(lineParts[1]) || \"\".equalsIgnoreCase(lineParts[10])) continue;\n dropId = TypesParser.safeParseInt(lineParts[10].split(\"_\")[0]);\n ipId = TypesParser.safeParseInt(lineParts[10].split(\"_\")[1]);\n clientId = TypesParser.safeParseInt(lineParts[10].split(\"_\")[2]);\n listId = TypesParser.safeParseInt(lineParts[10].split(\"_\")[3]);\n if (listId != list.id) continue;\n deliverdLinesToRemove.add(line);\n System.out.println(\"Email clean -> \" + clientId);\n ++dileverdCleand;\n this.updateProccess(proccessId, \"clean\");\n }\n }\n }\n if (bounceCleand <= 0) {\n if (bounceCleand <= 0) return;\n }\n String newName = \"clean_\" + flag + \"_\" + tablePrefix;\n Database.get(\"lists\").executeUpdate(\"ALTER TABLE \" + listName + \" RENAME TO \" + newName + \";\", new Object[0], 0);\n Database.get(\"master\").executeUpdate(\"UPDATE admin.data_lists SET name = '\" + schema + \".\" + newName + \"' WHERE id = ?\", new Object[]{list.id}, 0);\n if (bounceLinesToRemove != null && bounceLinesToRemove.size() > 0) {\n for (int i = 0; i < bounceLinesToRemove.size(); ++i) {\n System.out.println(\"Removing this line of bounce --> \" + (String)bounceLinesToRemove.get(i));\n }\n }\n if (deliverdLinesToRemove == null) return;\n if (deliverdLinesToRemove.size() <= 0) return;\n int i = 0;\n while (i < deliverdLinesToRemove.size()) {\n System.out.println(\"Removing this line of delevred --> \" + (String)deliverdLinesToRemove.get(i));\n ++i;\n }\n return;\n }\n System.out.println(\"Looking for all servers ... not yet ready ...\");\n return;\n }\n catch (Exception e) {\n this.interruptProccess(proccessId);\n Logger.error(e, dataclean.class);\n errorOccured = true;\n return;\n }\n finally {\n if (!errorOccured) {\n this.finishProccess(proccessId);\n }\n }\n }", "public void execute() throws NbaBaseException {\n\t\tboolean isSuccess = false;\t\t\n\t\tif (performingRequirementsEvaluation()) { //SPR2652\n\t\t\tsetPartyID(work); //ACN024\n\t\t\tisSuccess = processRequirementSummary();\n\t\t\tif (!isSuccess) {\t\t\t\t\n\t\t\t\tthrow new NbaVpmsException(NbaVpmsException.VPMS_RESULTS_ERROR + NbaVpmsAdaptor.ACREQUIREMENTSUMMARY);\t//SPR2652\n\t\t\t}\n\t\t}\n\t}", "public Map<String, String> runEDARequest(DvnRJobRequest sro, RConnection c){\n String optionBanner = \"########### EDA option ###########\\n\";\n dbgLog.fine(optionBanner);\n historyEntry.add(optionBanner);\n \n Map<String, String> sr = new HashMap<String, String>();\n sr.put(\"requestdir\", requestdir);\n sr.put(\"option\", \"eda\");\n sr.put(\"type\", sro.getEDARequestType()); // 1=(1,0), 2=(0,1), 3=(1,1)\n \n String ResultHtmlFile = \"Rout.\"+PID+\".html\" ;\n sr.put(\"html\", \"/\"+requestdir+ \"/\" +ResultHtmlFile);\n \n String RcodeFile = \"Rcode.\" + PID + \".R\";\n \n try {\n String univarStatLine = \"try(x<-univarStat(dtfrm=x))\";\n \n \n \n //String vdcUtilLibLine = \"library(VDCutil)\";\n \n //c.voidEval(\"dol<-''\");\n \n dbgLog.fine(\"aol=\"+ sro.getEDARequestParameter());\n String aol4EDA = \"aol<-c(\"+ sro.getEDARequestParameter() +\")\";\n \n dbgLog.fine(\"aolLine=\"+ aol4EDA);\n historyEntry.add(aol4EDA);\n c.voidEval(aol4EDA);\n \n // create a manifest page for this job request\n String homePageTitle = \"Dataverse Analysis: Request #\"+PID ;\n \n // create a temp dir\n String createTmpDir = \"dir.create('\"+wrkdir +\"')\";\n dbgLog.fine(\"createTmpDir=\"+createTmpDir);\n historyEntry.add(createTmpDir);\n c.voidEval(createTmpDir);\n \n String ResultHtmlFileBase = \"Rout.\"+PID ;\n String openHtml = \"htmlsink<-HTMLInitFile(outdir = '\"+\n wrkdir +\"', filename='\"+ResultHtmlFileBase+\n \"', extension='html', CSSFile='R2HTML.css', Title ='\"+\n homePageTitle+\"')\";\n dbgLog.fine(\"openHtml=\"+openHtml);\n historyEntry.add(openHtml);\n c.voidEval(openHtml);\n \n String StudyTitle = sro.getStudytitle();\n String pageHeaderContents = \"hdrContents <- \\\"<h1>Dataverse Analysis</h1><h2>Results</h2><p>Study Title:\"+\n StudyTitle+\"</p><hr />\\\"\";\n \n dbgLog.fine(\"pageHeaderContents=\"+pageHeaderContents);\n historyEntry.add(pageHeaderContents);\n c.voidEval(pageHeaderContents);\n \n String pageHeader = \"HTML(file=htmlsink,hdrContents)\";\n dbgLog.fine(\"pageHeader=\"+pageHeader);\n historyEntry.add(pageHeader);\n c.voidEval(pageHeader);\n \n // create visuals directory for an EDA case\n String createVisualsDir = \"dir.create('\"+ wrkdir +\n \"/\" + \"visuals\" +\"')\";\n dbgLog.fine(\"visualsDir=\"+createVisualsDir);\n historyEntry.add(createVisualsDir);\n c.voidEval(createVisualsDir);\n \n // command lines\n dbgLog.fine(\"univarStatLine=\"+univarStatLine);\n c.voidEval(univarStatLine);\n historyEntry.add(univarStatLine);\n String univarChart = \"try({x<-univarChart(dtfrm=x, \" +\n \"analysisoptn=aol, \" +\n \"imgflprfx='\" + wrkdir + \"/\" + \n \"visuals\" + \"/\" + \"Rvls.\" + PID +\n \"',standalone=F)})\";\n dbgLog.fine(\"univarChart=\"+univarChart);\n historyEntry.add(univarChart);\n c.voidEval(univarChart);\n \n String univarStatHtmlBody = \"try(univarStatHtmlBody(dtfrm=x,\"+\n \"whtml=htmlsink, analysisoptn=aol))\";\n dbgLog.fine(\"univarStatHtmlBody=\"+univarStatHtmlBody);\n historyEntry.add(univarStatHtmlBody);\n c.voidEval(univarStatHtmlBody);\n \n String closeHtml = \"HTMLEndFile()\";\n historyEntry.add(closeHtml);\n c.voidEval(closeHtml);\n \n // save workspace\n String objList = \"objList<-ls()\";\n dbgLog.fine(\"objList=\"+objList);\n c.voidEval(objList);\n \n String RdataFileName = \"Rworkspace.\"+PID+\".RData\";\n sr.put(\"Rdata\", \"/\"+requestdir+ \"/\" + RdataFileName);\n \n String saveWS = \"save(list=objList, file='\"+ wrkdir +\"/\"+ RdataFileName +\"')\";\n dbgLog.fine(\"save the workspace=\"+saveWS);\n c.voidEval(saveWS);\n \n \n \n \n \n // write back the R workspace to the dvn \n \n String wrkspFileName = wrkdir +\"/\"+ RdataFileName;\n dbgLog.fine(\"wrkspFileName=\"+wrkspFileName);\n \n int wrkspflSize = getFileSize(c,wrkspFileName);\n \n File wsfl = writeBackFileToDvn(c, wrkspFileName, RWRKSP_FILE_PREFIX,\"RData\", wrkspflSize);\n \n if (wsfl != null){\n sr.put(\"wrkspFileName\", wsfl.getAbsolutePath());\n dbgLog.fine(\"wrkspFileName=\"+wsfl.getAbsolutePath());\n } else {\n dbgLog.fine(\"wrkspFileName is null\");\n }\n \n \n \n // command history\n String[] ch = (String[])historyEntry.toArray(new String[historyEntry.size()]);\n c.assign(\"ch\", new REXPString(ch));\n String saveRcodeFile = \"cat(file='\"+ wrkdir +\"/\"+ RcodeFile +\"',paste(ch,collapse='\\n'))\";\n dbgLog.fine(saveRcodeFile);\n c.voidEval(saveRcodeFile);\n \n // copy the dvn-patch css file to the wkdir\n // file.copy(from, to, overwrite = FALSE)\n String cssFile = R2HTML_CSS_DIR + \"/\" +\"R2HTML.css\";\n String cpCssFile = \"file.copy('\"+cssFile+\"','\"+wrkdir+\"')\";\n c.voidEval(cpCssFile);\n \n // tab data file\n String mvTmpTabFile = \"file.rename('\"+ tempFileName +\"','\"+ tempFileNameNew +\"')\";\n c.voidEval(mvTmpTabFile);\n dbgLog.fine(\"move temp file=\"+mvTmpTabFile);\n \n \n \n \n \n \n \n \n \n \n \n // move the temp dir to the web-temp root dir\n String mvTmpDir = \"file.rename('\"+wrkdir+\"','\"+webwrkdir+\"')\";\n dbgLog.fine(\"web-temp_dir=\"+mvTmpDir);\n c.voidEval(mvTmpDir);\n \n } catch (RserveException rse) {\n rse.printStackTrace();\n sr.put(\"RexecError\", \"true\");\n return sr;\n }\n \n sr.put(\"RexecError\", \"false\");\n return sr;\n }", "public static void main(String[] args) throws ProcessException, MongoUtilsException, OptionsException, IOException{\r\n\r\n\t\tOptions options = new Options();\r\n\t\toptions.setContentType(\"support\");\r\n\t\toptions.setDocid(\"c50341800\");\r\n\t\t//options.setSubscription(\"fastxml\");\r\n\r\n\t\tlogger.debug(\" Started preparing FAST xml for \"+options.getDocid()+\" (\"+options.getContentType()+ \") Thread\"+Thread.currentThread().getName());\r\n\t\tContentDAO contentDao = new ContentDAO();\r\n\t\tDBObject dbObject = contentDao.getStagedMetadata(options);\r\n\t\tFastXMLDAO fastDao= new FastXMLDAO();\r\n\t\tif(dbObject!=null){\r\n\t\t\tDBObject dbDocument = (DBObject) dbObject.get(DOCUMENT_DOC);\r\n\t\t\tif(dbDocument != null){\r\n\t\t\t\tfastDao.owner_name(dbDocument);\r\n\t\t\t\tfastDao.description(dbDocument);\r\n\t\t\t\tfastDao.publicationDestinations(dbDocument);\r\n\t\t\t\tfastDao.projectName(dbDocument);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//############################################\r\n\t\tDB db = ConfigurationManager.getInstance().getMongoDBAuthenticated(\"support\");\r\n\t\tDBCollection metadata_staging = db.getCollection(\"metadata_staging\");\r\n\r\n\t\tDBObject obj = new BasicDBObject();\r\n\t\tobj.put(\"_id\", \"c50341800\"); //martin sent\r\n\t\tobj.put(\"priority\", 4);\r\n\t\tobj.put(\"eventType\", \"update\");\r\n\t\tobj.put(\"lastModified\" , 1386915333238L);\r\n\t\tQueueManager queMgr= new QueueManager();\r\n\t\tqueMgr.push(new ContentItem(\"support\",0L, queMgr));\r\n\t\tWorkItem item = new WorkItem(\"support\", obj,queMgr);\r\n\r\n\t\t//item.load();\r\n\r\n\t\t/*db = ConfigurationManager.getInstance().getMongoDBAuthenticated(\"supportcontent\");\r\n\t\tBasicDBObject query = new BasicDBObject().append(\"filename\", \"c04459315.xml\");*/\r\n\r\n\t\tSupportFastXMLCreationAdapter supportFastXMLCreationAdapter = new SupportFastXMLCreationAdapter();\r\n\t\tsupportFastXMLCreationAdapter.evaluate(item);\r\n\t\t//System.out.println(metadata_temp.findOne(new BasicDBObject(\"_id\",\"c50328134\")));}\r\n\r\n}", "public void run()\n\t{\n\t\tRuntime runtime = null;\n\t\tBufferedReader inputReader = null;\n\t\tBufferedReader errorReader = null;\n\t\tStringBuffer outputStringBuffer = null;\n\t\tStringBuffer errorStringBuffer = null;\n\t\tString s = null;\n\t\tboolean inputDone,errorDone;\n\n\t\truntime = Runtime.getRuntime();\n\t\texception = null;\n\t\tprocess = null;\n\t\toutputString = null;\n\t\terrorString = null;\n\t\ttry\n\t\t{\n\t\t// start process\n\t\t\tprocess = runtime.exec(commandString);\n\t\t// setup streams\n\t\t\toutputStringBuffer = new StringBuffer();\n\t\t\terrorStringBuffer = new StringBuffer();\n\t\t\tinputReader = new BufferedReader(new InputStreamReader(process.getInputStream()));\n\t\t\terrorReader = new BufferedReader(new InputStreamReader(process.getErrorStream()));\n\t\t\tinputDone = false;\n\t\t\terrorDone = false;\n\t\t\twhile((inputDone == false)||(errorDone == false))\n\t\t\t{\n\t\t\t\tif(!inputDone)\n\t\t\t\t{\n\t\t\t\t\ts = inputReader.readLine();\n\t\t\t\t\tif(s != null)\n\t\t\t\t\t{\n\t\t\t\t\t\toutputStringBuffer.append(s);\n\t\t\t\t\t\toutputStringBuffer.append(\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tinputDone = true;\n\t\t\t\t}\n\t\t\t\tif(!errorDone)\n\t\t\t\t{\n\t\t\t\t\ts = errorReader.readLine();\n\t\t\t\t\tif(s != null)\n\t\t\t\t\t{\n\t\t\t\t\t\terrorStringBuffer.append(s);\n\t\t\t\t\t\terrorStringBuffer.append(\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\terrorDone = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\toutputString = outputStringBuffer.toString();\n\t\t\terrorString = errorStringBuffer.toString();\n\t\t// wait for process termination\n\t\t\tprocess.waitFor();\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\texception = e;\n\t\t\treturn;\n\t\t}\n\t\tcatch(InterruptedException e)\n\t\t{\n\t\t\texception = e;\n\t\t\treturn;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif(inputReader != null)\n\t\t\t\t\tinputReader.close();\n\t\t\t\tif(errorReader != null)\n\t\t\t\t\terrorReader.close();\n\t\t\t}\n\t\t\tcatch(Exception e) {};\n\t\t}\n\t}", "public List<Result> loadResults() {\n List<Result> results = null;\n try {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n results = dbb.loadResults();\n dbb.commit();\n dbb.closeConnection();\n } catch (Exception ex) {\n Logger.getLogger(GameDBLogic.class.getName()).log(Level.SEVERE, null, ex);\n }\n return results;\n }", "@Override\r\n public List<LinkedHashMap<String, String>> runQuery(String sql)\r\n throws DatabaseException {\r\n try {\r\n Class.forName(driverClassName);\r\n conn = DriverManager.getConnection(url, userName, password);\r\n \r\n } catch (ClassNotFoundException ex) {\r\n throw new DatabaseException(\"Could not load JDBC driver\");\r\n }\r\n catch(SQLException sq){\r\n throw new DatabaseException(\"Connection Failed\");\r\n }\r\n \r\n try {\r\n stmt = conn.createStatement();\r\n ResultSet rs = stmt.executeQuery(sql);\r\n link = resultSetToArrayList(rs);\r\n \r\n } catch (SQLException sqle) {\r\n throw new DatabaseException(\"Execution of SQL failed\");\r\n } catch (Exception e) {\r\n } finally {\r\n try {\r\n stmt.close();\r\n conn.close();\r\n } catch (Exception e) {\r\n throw new DatabaseException(\"Unknown error\");\r\n }\r\n }\r\n return link;\r\n }", "public int getTotalCount(ConProcess conProcess) throws AppException;", "private void collectHostInformation() {\n java.lang.management.RuntimeMXBean rtMXB =\n java.lang.management.ManagementFactory.getRuntimeMXBean();\n final String jvmName = rtMXB.getName();\n try {\n metadata_.pid = Integer.parseInt(jvmName.split(\"@\")[0]);\n } catch (NumberFormatException e) {\n metadata_.pid = null;\n }\n\n metadata_.currentDir = System.getProperty(\"user.dir\");\n }", "private static void LOG() {\n if (!RESULTFILE.exists()) {\n\n if (!RESULTFILE.getParentFile().exists()) {\n RESULTFILE.getParentFile().mkdirs();\n }\n\n try {\n RESULTFILE.createNewFile();\n } catch (IOException ioe) {\n System.err.println(\"Couldn't create file \" + RESULTFILE.getName());\n System.err.println(\"ERROR\" + ioe.getLocalizedMessage());\n System.out.println(\"Exiting...\");\n System.exit(1);\n }\n try {\n BufferedWriter bw = new BufferedWriter(new FileWriter(RESULTFILE, true));\n bw.write(\"rank\" + \"\\t\" + \"DBID\" + \"\\n\");\n bw.close();\n } catch (IOException ioe) {\n System.err.println(\"Couldn't write to file \" + RESULTFILE.getName());\n System.err.println(\"ERROR: \" + ioe.getLocalizedMessage());\n System.out.println(\"Exiting...\");\n System.exit(1);\n }\n try {\n ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(RESULTFILE));\n out.writeObject(RESULTS);\n out.close();\n\n } catch (IOException ioe) {\n System.err.println(\"Couldn't write to file \" + RESULTFILE.getName());\n System.err.println(\"ERROR: \" + ioe.getLocalizedMessage());\n System.out.println(\"Exiting...\");\n System.exit(1);\n }\n }\n\n /**\n * print also SQL query into a sql file\n *\n */\n if (!SQLFILE.exists()) {\n if (!SQLFILE.getParentFile().exists()) {\n SQLFILE.getParentFile().mkdirs();\n }\n try {\n SQLFILE.createNewFile();\n } catch (IOException ioe) {\n System.err.println(\"Couldn't create file \" + SQLFILE.getName());\n System.err.println(\"ERROR\" + ioe.getLocalizedMessage());\n System.out.println(\"Exiting...\");\n System.exit(1);\n }\n try {\n BufferedWriter bw = new BufferedWriter(new FileWriter(SQLFILE, true));\n bw.write(UNKNOWN.getSortedQuery() + \"\\n\");\n bw.close();\n } catch (Exception e) {\n System.err.println(\"Konnte nicht in Datei \" + SQLFILE + \" schreiben!\");\n }\n }\n }", "public static void main(String... args) {\n\n System.setProperty(\"file.encoding\", StandardCharsets.UTF_8.name());\n\n // Register the PID within the logback context\n String name = String.valueOf(ManagementFactory.getRuntimeMXBean().getName());\n if (name != null) {\n MDC.put(\"process_id\", name.split(\"@\")[0]);\n }\n\n try {\n if (args.length == 0) {\n displayHelp();\n return;\n }\n int argi = 0;\n while (argi < args.length) {\n String arg = args[argi++].intern();\n // Options that are not followed by additional parameters\n // come first.\n JDBCConfig jdbcConfig = new JDBCConfig();\n if (Objects.equals(arg, \"-h\") || Objects.equals(arg, \"-help\")) {\n displayHelp();\n somethingDone = true;\n } else if (Objects.equals(arg, \"-version\")) {\n displayVersion();\n somethingDone = true;\n } else if (Objects.equals(arg, \"-d\") || Objects.equals(arg, \"-debug\")) {\n if (debugLevel++ == 0) {\n LogDebugUtils.enableDebugLogging();\n displayVersion();\n }\n } else if (Objects.equals(arg, \"--forceRegister\")) {\n forceRegister = true;\n somethingDone = true;\n getService();\n } else if (Objects.equals(arg, \"-MO\") || Objects.equals(arg, \"-modules\")) {\n somethingDone = true;\n logModules();\n } else if (Objects.equals(arg, \"-V\") || Objects.equals(arg, \"-views\")) {\n somethingDone = true;\n Stream<ModelData> modelsStream =\n StreamSupport.stream(getService().getModels().spliterator(), false);\n if (modelId != null) {\n modelsStream = modelsStream\n .filter(model -> modelId.equals(model.getId()) || modelId.equals(model.getName()));\n }\n if (workspaceId != null) {\n modelsStream = modelsStream.filter(model -> {\n String modelWorkspaceId = model.getCurrentWorkspaceId();\n Workspace modelWorkspace = service.getWorkspace(modelWorkspaceId);\n if (modelWorkspace == null) {\n return false;\n }\n return workspaceId.equals(modelWorkspace.getId()) ||\n workspaceId.equals(modelWorkspace.getName());\n });\n }\n modelsStream = modelsStream.sorted(Comparator.comparing(ModelData::getCurrentWorkspaceId)\n .thenComparing(ModelData::getId));\n\n List<ModelData> models = modelsStream.collect(Collectors.toList());\n // If the current user is a visitor user, they may not get data about the used workspace/model so we'll\n // just try with the provided input\n if (models.isEmpty()) {\n Model model = getModel(workspaceId, modelId);\n if (model != null) {\n models = Collections.singletonList(model.getData());\n }\n }\n for (ModelData model : models) {\n logModuleViews(model);\n }\n } else if (Objects.equals(arg, \"-W\") || Objects.equals(arg, \"-workspaces\")) {\n somethingDone = true;\n Iterable<Workspace> workspaces = getService().getWorkspaces();\n String log = Utils.formatTSV(\"WS_ID\", \"WS_NAME\", \"WS_ALLOCATED_SIZE\", \"WS_SIZE\");\n LOG.info(log);\n for (Workspace workspace : workspaces) {\n log = Utils\n .formatTSV(workspace.getId(), workspace.getName(), workspace.getSizeAllowance(),\n workspace.getCurrentSize());\n LOG.info(log);\n }\n } else if (Objects.equals(arg, \"-M\") || Objects.equals(arg, \"-models\")) {\n somethingDone = true;\n Map<String, String> workspaceNames = StreamSupport\n .stream(getService().getWorkspaces().spliterator(), false)\n .collect(Collectors.toMap(Workspace::getId, Workspace::getName));\n Iterable<ModelData> models = getService().getModels();\n String log = Utils.formatTSV(\"WS_ID\", \"WS_NAME\", \"MODEL_ID\", \"MODEL_NAME\", \"MODEL_SIZE\");\n LOG.info(log);\n for (ModelData model : models) {\n String workspaceId = model.getCurrentWorkspaceId();\n String workspaceName = Optional.ofNullable(workspaceNames.get(workspaceId))\n .orElse(\"\");\n log = Utils.formatTSV(workspaceId, workspaceName, model.getId(), model.getName(),\n model.getMemoryUsage());\n LOG.info(log);\n }\n } else if (Objects.equals(arg, \"-F\") || Objects.equals(arg, \"-files\")) {\n somethingDone = true;\n Model model = getModel(workspaceId, modelId);\n if (model != null) {\n String log;\n for (ServerFile serverFile : model.getServerFiles()) {\n log = Utils.formatTSV(\n serverFile.getId(),\n serverFile.getCode(),\n serverFile.getName());\n LOG.info(log);\n }\n }\n } else if (Objects.equals(arg, \"-I\") || Objects.equals(arg, \"-imports\")) {\n somethingDone = true;\n Model model = getModel(workspaceId, modelId);\n if (model != null) {\n String log;\n for (Import serverImport : model.getImports()) {\n log = Utils.formatTSV(\n serverImport.getId(),\n serverImport.getCode(),\n serverImport.getName(),\n serverImport.getImportType(),\n serverImport.getSourceFileId());\n LOG.info(log);\n }\n }\n } else if (Objects.equals(arg, \"-A\") || Objects.equals(arg, \"-actions\")) {\n somethingDone = true;\n Model model = getModel(workspaceId, modelId);\n if (model != null) {\n String log;\n for (Action serverAction : model.getActions()) {\n log = Utils.formatTSV(\n serverAction.getId(),\n serverAction.getCode(),\n serverAction.getName());\n LOG.info(log);\n }\n }\n } else if (Objects.equals(arg, \"-E\") || Objects.equals(arg, \"-exports\")) {\n somethingDone = true;\n Model model = getModel(workspaceId, modelId);\n if (model != null) {\n String log;\n for (Export serverExport : model.getExports()) {\n log = Utils.formatTSV(\n serverExport.getId(),\n serverExport.getCode(),\n serverExport.getName());\n LOG.info(log);\n }\n }\n } else if (Objects.equals(arg, \"-P\") || Objects.equals(arg, \"-processes\")) {\n somethingDone = true;\n Model model = getModel(workspaceId, modelId);\n if (model != null) {\n String log;\n for (Process serverProcess : model.getProcesses()) {\n log = Utils.formatTSV(\n serverProcess.getId(),\n serverProcess.getCode(),\n serverProcess.getName());\n LOG.info(log);\n }\n }\n } else if (Objects.equals(arg, \"-L\") || \"-lists\".equals(arg)) {\n if (argi == args.length) {\n somethingDone = true;\n Service service = getService();\n Model model = getModel(workspaceId, modelId);\n if (service != null && model != null) {\n service\n .exportListNames(fileType, fileId, model.getCurrentWorkspaceId(), model.getId());\n }\n }\n } else if (Objects.equals(arg, \"-l\") || Objects.equals(arg, \"-list\")) {\n listId = args[argi++];\n if (argi >= args.length) {\n somethingDone = true;\n Service service = getService();\n Model model = getModel(workspaceId, modelId);\n if (service != null) {\n service.exportListMetadata(fileType, fileId, model.getCurrentWorkspaceId(),\n model.getId(), listId);\n }\n }\n } else if (Objects.equals(arg, GET_JSON) || Objects.equals(arg, \"-get:csv\") || Objects\n .equals(arg, \"-get:csv_sc\") ||\n Objects.equals(arg, \"-get:csv_mc\")) {\n boolean supportedListTypes = Objects.equals(arg, GET_JSON) || Objects\n .equals(arg, \"-get:csv\");\n boolean supportedModuleTypes =\n Objects.equals(arg, GET_JSON) || Objects.equals(arg, \"-get:csv_sc\") || Objects\n .equals(arg, \"-get:csv_mc\");\n fileType = arg.substring(\"-get:\".length());\n if (argi < args.length) {\n fileId = args[argi];\n }\n argi++;\n somethingDone = true;\n Model model = getModel(workspaceId, modelId);\n if (argi >= args.length - 1) {\n if (executeParamPresent && moduleId != null && supportedModuleTypes) {\n Module module = getModule(workspaceId, modelId, moduleId);\n if (module != null) {\n module\n .exportViewData(fileType, fileId, model.getCurrentWorkspaceId(), model.getId(),\n viewId, pagesSplit);\n }\n } else if (supportedListTypes) {\n Service service = getService();\n if (service != null) {\n if (executeParamPresent) {\n service.exportListItems(fileType, fileId, model.getCurrentWorkspaceId(),\n model.getId(), listId, includeAll);\n } else if (supportedListTypes) {\n if (listId == null) {\n service.exportListNames(fileType, fileId, model.getCurrentWorkspaceId(),\n model.getId());\n } else {\n service.exportListMetadata(fileType, fileId, model.getCurrentWorkspaceId(),\n model.getId(), listId);\n }\n }\n }\n }\n }\n } else if (Objects.equals(arg, \"-emd\")) {\n somethingDone = true;\n Export export = getExport(workspaceId, modelId, exportId);\n ExportMetadata emd = export.getExportMetadata();\n String delimiter = emd.getDelimiter();\n if (\"\\t\".equals(delimiter)) {\n delimiter = \"\\\\t\";\n }\n String exportName = export.getName();\n int columnCount = emd.getColumnCount();\n int rowCount = emd.getRowCount();\n String exportFormat = emd.getExportFormat();\n String encoding = emd.getEncoding();\n String separator = emd.getSeparator();\n LOG.info(\n \"Export: {}\\ncolumns: {}\\nrows: {}\\nformat: {}\\ndelimiter: {}\\nencoding: {}\\nseparator: {}\"\n , exportName, columnCount, rowCount, exportFormat, delimiter, encoding, separator);\n\n String[] headerNames = emd.getHeaderNames();\n DataType[] dataTypes = emd.getDataTypes();\n String[] listNames = emd.getListNames();\n\n String dataType;\n for (int i = 0; i < headerNames.length; i++) {\n dataType = dataTypes[i].toString();\n LOG.info(\" col {}:\\n name: {}\\n type: {}\\n list: {}\", i, headerNames[i], dataType, listNames[i]);\n }\n } else if (Objects.equals(arg, \"-x:all\") || Objects.equals(arg, \"-execute:all\")) {\n somethingDone = true;\n executeParamPresent = true;\n includeAll = true;\n } else if (Objects.equals(arg, \"-x\") || Objects.equals(arg, \"-execute\")) {\n executeParamPresent = true;\n TaskFactory taskFactory = null;\n if (importId != null) {\n somethingDone = true;\n taskFactory = getImport(workspaceId, modelId, importId);\n } else if (exportId != null) {\n somethingDone = true;\n taskFactory = getExport(workspaceId, modelId, exportId);\n } else if (actionId != null) {\n somethingDone = true;\n taskFactory = getAction(workspaceId, modelId, actionId);\n } else if (processId != null) {\n taskFactory = getProcess(workspaceId, modelId,\n processId);\n }\n if (taskFactory != null) {\n somethingDone = true;\n Task task = taskFactory.createTask(taskParameters);\n lastResult = task.runTask();\n } else if (listId != null) {\n // Performing list operations, like retrieving a list items\n } else if (moduleId != null) {\n // Performing module operations, like retrieving module view data\n } else {\n LOG.error(\"An import, export, action or \"\n + \"process must be specified before {}\", arg);\n }\n\n } else if (Objects.equals(arg, \"-gets\") || Objects.equals(arg, \"-getc\")) {\n somethingDone = true;\n String sourceId = null;\n if (fileId != null) {\n sourceId = fileId;\n } else if (exportId != null) {\n if (lastResult != null && lastResult.isSuccessful()) {\n sourceId = exportId;\n } else {\n LOG.error(\"Export failed - ignoring content\");\n }\n }\n if (null != sourceId) {\n ServerFile serverFile = getServerFile(workspaceId,\n modelId, sourceId, false);\n if (serverFile != null) {\n if (Objects.equals(arg, \"-gets\")) {\n InputStream inputStream = serverFile\n .getDownloadStream();\n byte[] buffer = new byte[4096];\n int read;\n String stringBuilder = \"\";\n do {\n if (0 < (read = inputStream.read(buffer))) {\n stringBuilder = stringBuilder.concat(new String(buffer));\n }\n } while (-1 != read);\n LOG.info(stringBuilder);\n inputStream.close();\n } else {\n CellReader cellReader = serverFile\n .getDownloadCellReader();\n String[] row = cellReader.getHeaderRow();\n do {\n StringBuilder line = new StringBuilder();\n for (int i = 0; i < row.length; ++i) {\n if (line.length() > 0) {\n line.append('\\t');\n }\n line.append(row[i]);\n }\n String log = line.toString();\n LOG.info(log);\n row = cellReader.readDataRow();\n } while (null != row);\n }\n }\n }\n\n } else if (Objects.equals(arg, \"-ch\") || Objects.equals(arg, \"-chunksize\")) {\n fetchChunkSize(args[argi++]);\n } else if (Objects.equals(arg, \"-pages\")) {\n String delim = \",\";\n String regex = \"(?<!\\\\\\\\)\" + Pattern.quote(delim);\n String pages = args[argi++];\n pagesSplit = pages.split(regex);\n } else if (Objects.equals(arg, \"-auth\") || Objects.equals(arg, \"-authserviceurl\")) {\n authServiceUrl = new URI(args[argi++]);\n } else if (Objects.equals(arg, \"-puts\") || Objects.equals(arg, \"-putc\")) {\n somethingDone = true;\n ServerFile serverFile = getServerFile(workspaceId, modelId,\n fileId, true);\n if (serverFile != null) {\n if (Objects.equals(arg, \"-puts\")) {\n OutputStream uploadStream = serverFile.getUploadStream(chunkSize);\n byte[] buf = new byte[4096];\n int read;\n do {\n if (0 < (read = System.in.read(buf))) {\n uploadStream.write(buf, 0, read);\n }\n } while (-1 != read);\n uploadStream.close();\n } else {\n CellWriter cellWriter = serverFile.getUploadCellWriter(chunkSize);\n LineNumberReader lnr = new LineNumberReader(new InputStreamReader(System.in));\n String line;\n while (null != (line = lnr.readLine())) {\n String[] row = line.split(\"\\\\t\");\n if (1 == lnr.getLineNumber()) {\n cellWriter.writeHeaderRow(row);\n } else {\n cellWriter.writeDataRow(row);\n }\n }\n cellWriter.close();\n }\n LOG.info(\"Upload to {} completed.\", fileId);\n }\n // Now check the additional parameter is present before\n // processing consuming options\n } else if (argi >= args.length) {\n break;\n } else if (Objects.equals(arg, \"-oauth-client-id\")) {\n authType = AUTH_TYPE.OAUTH;\n clientId = args[argi++];\n } else if (Objects.equals(arg, \"--rotatable\")) {\n refreshType = ROTATABLE;\n } else if (Objects.equals(arg, \"-s\") || Objects.equals(arg, \"-service\")) {\n serviceLocation = new URI(args[argi++]);\n } else if (Objects.equals(arg, \"-u\") || Objects.equals(arg, \"-user\")) {\n String auth = args[argi++];\n int colonPosition = auth.indexOf(':');\n if (colonPosition != -1) {\n setUsername(auth.substring(0, colonPosition));\n setPassphrase(auth.substring(colonPosition + 1));\n } else {\n setUsername(auth);\n setPassphrase(\"?\");\n }\n } else if (Objects.equals(arg, \"-v\") || Objects.equals(arg, \"-via\")) {\n URI uri = new URI(args[argi++]);\n setProxyLocation(\n new URI(uri.getScheme(), null, uri.getHost(), uri.getPort(), null, null, null));\n } else if (Objects.equals(arg, \"-vu\") || Objects.equals(arg, \"-viauser\")) {\n String auth = args[argi++];\n int colonPosition = auth.indexOf(':');\n if (colonPosition != -1) {\n setProxyUsername(auth.substring(0, colonPosition));\n setProxyPassphrase(auth.substring(colonPosition + 1));\n } else {\n setProxyUsername(auth);\n setProxyPassphrase(\"?\");\n }\n } else if (Objects.equals(arg, \"-mrc\") || Objects.equals(arg, \"-maxretrycount\")) {\n maxRetryCount = fetchMaxRetryCount(args[argi++]);\n } else if (Objects.equals(arg, \"-rt\") || Objects.equals(arg, \"-retrytimeout\")) {\n retryTimeout = fetchRetryTimeout(args[argi++]);\n } else if (Objects.equals(arg, \"-ct\") || Objects.equals(arg, \"-httptimeout\")) {\n httpConnectionTimeout = fetchHttpTimeout(args[argi++]);\n } else if (Objects.equals(arg, \"-c\") || Objects.equals(arg, \"-certificate\")) {\n String certificatePath = args[argi++];\n setCertificatePath(certificatePath);\n } else if (Objects.equals(arg, \"-pkey\") || Objects.equals(arg, \"-privatekey\")) {\n if (keyStorePath != null) {\n throw new IllegalArgumentException(\n \"expected either the privatekey or the keystore arguments\");\n }\n String auth = args[argi++];\n int colonPosition = auth.lastIndexOf(':');\n if (colonPosition != -1) {\n setPrivateKeyPath(auth.substring(0, colonPosition));\n setPassphrase(auth.substring(colonPosition + 1));\n } else {\n setUsername(auth);\n setPassphrase(\"?\");\n }\n } else if (Objects.equals(arg, \"-k\") || Objects.equals(arg, \"-keystore\")) {\n if (passphrase != null || privateKeyPath != null) {\n throw new IllegalArgumentException(\n \"expected either the privatekey or keystore arguments\");\n }\n String keyStorePath = args[argi++];\n setKeyStorePath(keyStorePath);\n } else if (Objects.equals(arg, \"-ka\") || Objects.equals(arg, \"-keystorealias\")) {\n String keyStoreAlias = args[argi++];\n setKeyStoreAlias(keyStoreAlias);\n } else if (Objects.equals(arg, \"-kp\") || Objects.equals(arg, \"-keystorepass\")) {\n String keyStorePassword = args[argi++];\n setKeyStorePassword(keyStorePassword);\n } else if (Objects.equals(arg, \"-w\") || Objects.equals(arg, \"-workspace\")) {\n workspaceId = args[argi++];\n } else if (Objects.equals(arg, \"-w_id\") || Objects.equals(arg, \"-workspace_id\")) {\n workspaceId = args[argi++];\n noValidateWorkspace = true;\n } else if (Objects.equals(arg, \"-m\") || Objects.equals(arg, \"-model\")) {\n modelId = args[argi++];\n } else if (Objects.equals(arg, \"-m_id\") || Objects.equals(arg, \"-model_id\")) {\n modelId = args[argi++];\n noValidateModel = true;\n } else if (Objects.equals(arg, \"-mo\") || Objects.equals(arg, \"-module\")) {\n moduleId = args[argi++];\n } else if (Objects.equals(arg, \"-vi\") || Objects.equals(arg, \"-view\")) {\n viewId = args[argi++];\n } else if (Objects.equals(arg, \"-f\") || Objects.equals(arg, \"-file\")) {\n fileId = args[argi++];\n } else if (Objects.equals(arg, \"-g\") || Objects.equals(arg, \"-get\")) {\n somethingDone = true;\n File targetFile = new File(args[argi++]);\n String sourceId;\n if (fileId != null) {\n sourceId = fileId;\n } else if (exportId != null) {\n if (lastResult != null && lastResult.isSuccessful()) {\n sourceId = exportId;\n } else {\n LOG.error(\"Export failed - ignoring content\");\n sourceId = null;\n }\n } else {\n sourceId = targetFile.getName();\n }\n if (sourceId != null) {\n ServerFile serverFile = getServerFile(workspaceId, modelId, sourceId, false);\n if (serverFile != null) {\n serverFile.downLoad(targetFile, true);\n LOG.info(\"The server file {} has been downloaded to {}\", sourceId,\n targetFile.getAbsolutePath());\n }\n }\n } else if (Objects.equals(arg, \"-putItems:json\") || Objects.equals(arg, \"-putItems:csv\")\n || Objects.equals(arg, \"-putItems:jdbc\") ||\n Objects.equals(arg, \"-upsertItems:jdbc\") || Objects.equals(arg, \"-upsertItems:json\") || Objects\n .equals(arg, \"-upsertItems:csv\")) {\n somethingDone = true;\n boolean upsert = arg.startsWith(\"-upsertItems:\");\n String type = arg.startsWith(\"-putItems\") ? arg.substring(\"-putItems:\".length()) :\n arg.substring(\"-upsertItems:\".length());\n final Path outputPath = getOutput(args, argi);\n String outputType = null;\n if (outputPath != null) {\n outputType = args[argi + 1].substring(OUTPUT.length());\n }\n ListItemResultData result = new ListItemResultData();\n result.setFailures(new ArrayList<>(0));\n ListImpl listImpl;\n final Path itemMapFile = (\"\".equals(itemPropertiesPath) || itemPropertiesPath == null) ?\n null : new File(itemPropertiesPath).toPath();\n if (\"jdbc\".equalsIgnoreCase(type)) {\n final Map<String, String> headerMap = getHeader(jdbcConfig, itemMapFile, args[argi++]);\n listImpl = new ListImpl(getService(), workspaceId, modelId, listId, true);\n result = JDBCUtils.doActionsItemsFromJDBC(jdbcConfig, listImpl, headerMap,\n ListImpl.ListAction.ADD, (itemPropertiesPath != null));\n } else {\n final File sourceFile = new File(args[argi++]);\n listImpl = new ListImpl(getService(), workspaceId, modelId, listId, false);\n\n result = listImpl.doActionToItems(sourceFile.toPath(), itemMapFile, FileType\n .valueOf(type.toUpperCase()), ListImpl.ListAction.ADD);\n }\n\n if (result != null) {\n LOG.info(\"{} items added to the list\", result.getAdded());\n manageItemLog(upsert, outputPath, outputType, result, listImpl);\n }\n if (outputPath != null) {\n String log = outputPath.toString();\n LOG.info(DUMP_FILE_WRITTEN, log);\n argi += 2;\n }\n\n } else if (Objects.equals(arg, \"-updateItems:json\") || Objects\n .equals(arg, \"-updateItems:csv\") ||\n Objects.equals(arg, \"-updateItems:jdbc\")) {\n somethingDone = true;\n String type = arg.substring(\"-updateItems:\".length());\n final Path outputPath = getOutput(args, argi);\n String outputType = null;\n if (outputPath != null) {\n outputType = args[argi + 1].substring(OUTPUT.length());\n }\n final ListImpl listImpl;\n ListItemResultData result = new ListItemResultData();\n result.setFailures(new ArrayList<>(0));\n final Path itemMapFile = (\"\".equals(itemPropertiesPath) || itemPropertiesPath == null)\n ? null : new File(itemPropertiesPath).toPath();\n if (\"jdbc\".equalsIgnoreCase(type)) {\n listImpl = new ListImpl(getService(), workspaceId, modelId, listId, true);\n final Map<String, String> headerMap = getHeader(jdbcConfig, itemMapFile, args[argi++]);\n result = JDBCUtils\n .doActionsItemsFromJDBC(jdbcConfig, listImpl, headerMap, ListAction.UPDATE,\n (itemPropertiesPath != null));\n } else {\n listImpl = new ListImpl(getService(), workspaceId, modelId, listId, false);\n final File sourceFile = new File(args[argi++]);\n\n result = listImpl\n .doActionToItems(sourceFile.toPath(), itemMapFile,\n FileType.valueOf(type.toUpperCase()), ListImpl.ListAction.UPDATE);\n }\n if (result != null) {\n String log = String.format(\"%d items updated in the list\", result.getUpdated());\n LOG.info(log);\n if (result.getIgnored() > 0) {\n int ignored = result.getIgnored();\n LOG.info(ITEMS_IGNORED, ignored);\n }\n }\n if (outputPath != null) {\n addLogItemToOutput(result, outputPath, outputType, listImpl.getContent());\n argi += 2;\n String log = outputPath.toString();\n LOG.info(DUMP_FILE_WRITTEN, log);\n }\n } else if (Objects.equals(arg, \"-deleteItems:json\") || Objects.equals(arg, \"-deleteItems:csv\") ||\n Objects.equals(arg, \"-deleteItems:jdbc\")) {\n somethingDone = true;\n String type = arg.substring(\"-deleteItems:\".length());\n final Path outputPath = getOutput(args, argi);\n String outputType = null;\n if (outputPath != null) {\n outputType = args[argi + 1].substring(OUTPUT.length());\n }\n final Path itemMapFile = (\"\".equals(itemPropertiesPath) || itemPropertiesPath == null) ?\n null : new File(itemPropertiesPath).toPath();\n ListItemResultData result = new ListItemResultData();\n result.setFailures(new ArrayList<>());\n if (\"jdbc\".equalsIgnoreCase(type)) {\n final Map<String, String> headerMap = getHeader(jdbcConfig, itemMapFile, args[argi++]);\n final ListImpl listImpl = new ListImpl(getService(), workspaceId, modelId, listId,\n true);\n result = JDBCUtils.doActionsItemsFromJDBC(jdbcConfig, listImpl, headerMap,\n ListImpl.ListAction.DELETE, (itemPropertiesPath != null));\n argi = handleDeleteLog(result, outputPath, outputType, listImpl.getContent(), argi);\n } else {\n final File sourceFile = new File(args[argi++]);\n final ListImpl listImpl = new ListImpl(getService(), workspaceId, modelId, listId, false);\n result = listImpl.doActionToItems(sourceFile.toPath(), itemMapFile, FileType\n .valueOf(type.toUpperCase()), ListImpl.ListAction.DELETE);\n argi = handleDeleteLog(result, outputPath, outputType, listImpl.getContent(), argi);\n }\n } else if (Objects.equals(arg, \"-p\") || Objects.equals(arg, \"-put\")) {\n somethingDone = true;\n File sourceFile = new File(args[argi++]);\n String destId = fileId == null ? sourceFile.getName() : fileId;\n ServerFile serverFile = getServerFile(workspaceId, modelId,\n destId, true);\n if (serverFile != null) {\n serverFile.upLoad(sourceFile, true, chunkSize);\n LOG.info(\"The file \\\"{}\\\" has been uploaded as {}.\", sourceFile, destId);\n }\n } else if (Objects.equals(arg, \"-i\") || Objects.equals(arg, \"-import\")) {\n importId = args[argi++];\n exportId = null;\n actionId = null;\n processId = null;\n } else if (Objects.equals(arg, \"-e\") || Objects.equals(arg, \"-export\")) {\n importId = null;\n exportId = args[argi++];\n actionId = null;\n processId = null;\n } else if (Objects.equals(arg, \"-a\") || Objects.equals(arg, \"-action\")) {\n importId = null;\n exportId = null;\n actionId = args[argi++];\n processId = null;\n } else if (Objects.equals(arg, \"-pr\") || Objects.equals(arg, \"-process\")) {\n importId = null;\n exportId = null;\n actionId = null;\n processId = args[argi++];\n } else if (Objects.equals(arg, \"-xl\") || Objects.equals(arg, \"-locale\")) {\n String[] localeName = args[argi++].split(\"_\");\n taskParameters.setLocale(localeName[0], localeName.length > 0 ? localeName[1] : null);\n } else if (Objects.equals(arg, \"-xc\") || Objects.equals(arg, \"-connectorproperty\")) {\n String[] propEntry = args[argi++].split(\":\", 2);\n if (propEntry.length != 2) {\n throw new IllegalArgumentException(\n \"expected \" + arg + \" [(<source>|<type>)/]property:(value|?)\");\n }\n\n String[] propKey = propEntry[0].split(\"/\", 2);\n String prompt = propEntry[0];\n if (propKey.length < 2) {\n prompt = \"Import source/\" + prompt;\n }\n String property = propKey[propKey.length - 1];\n String propValue = promptForValue(prompt, propEntry[1],\n property.toLowerCase().endsWith(\"password\"));\n if (propKey.length == 2) {\n taskParameters.addConnectorParameter(propKey[0],\n propKey[1], propValue);\n } else {\n taskParameters.addConnectorParameter(propKey[0],\n propValue);\n }\n } else if (Objects.equals(arg, \"-im\") || Objects.equals(arg, \"-itemmappingproperty\")) {\n itemPropertiesPath = Optional.ofNullable(args[argi++]).orElse(\"\");\n } else if (Objects.equals(arg, \"-xm\") || Objects.equals(arg, \"-mappingproperty\")) {\n String[] propEntry = args[argi++].split(\":\", 2);\n if (propEntry.length != 2) {\n throw new IllegalArgumentException(\"expected \" + arg\n + \" [(<import id>|<import name>)/]dimension\"\n + \":(value|?)\");\n }\n String[] propKey = propEntry[0].split(\"/\", 2);\n String propValue = promptForValue(propEntry[0],\n propEntry[1], false);\n if (propKey.length == 2) {\n taskParameters.addMappingParameter(propKey[0],\n propKey[1], propValue);\n } else {\n taskParameters.addMappingParameter(propKey[0],\n propValue);\n }\n } else if (Objects.equals(arg, \"-o\") || Objects.equals(arg, \"-output\")) {\n File outputFile = new File(args[argi++]);\n retrieveOutput(lastResult, outputFile);\n } else if (Objects.equals(arg, \"-loadclass\")) {\n argi++;\n //Removing the usage of loadclass parameter\n LOG.error(\n \"Warning : Loadclass parameter is deprecated starting in Anaplan Connect v1.4.4. Anaplan Connect will automatically load the right driver. This parameter will be removed in a future Anaplan Connect version.\");\n } else if (arg.equals(\"-jdbcproperties\")) {\n String propertiesFilePath = args[argi++];\n jdbcConfig = loadJdbcProperties(propertiesFilePath);\n if (fileId != null) {\n ServerFile serverFile = getServerFile(workspaceId, modelId,\n fileId, true);\n CellWriter cellWriter = null;\n CellReader cellReader = null;\n try {\n cellWriter = serverFile.getUploadCellWriter(chunkSize);\n cellReader = new JDBCCellReader(jdbcConfig)\n .connectAndExecute();\n String[] row = cellReader.getHeaderRow();\n cellWriter.writeHeaderRow(row);\n int rowCount = 0;\n do {\n if (null != (row = cellReader.readDataRow())) {\n cellWriter.writeDataRow(row);\n ++rowCount;\n }\n somethingDone = true; // TBD\n } while (null != row && row.length > 0);\n cellWriter.close();\n cellWriter = null;\n LOG.info(\"Transferred {} records to {}\", rowCount, fileId);\n } finally {\n if (cellReader != null) {\n cellReader.close();\n }\n if (cellWriter != null) {\n cellWriter.abort();\n }\n }\n } else if (exportId != null) {\n ServerFile serverFile = getServerFile(workspaceId, modelId,\n exportId, true);\n if (serverFile != null) {\n CellWriter cellWriter = null;\n somethingDone = true;\n Export export = getExport(workspaceId, modelId, exportId);\n if (export == null) {\n continue;\n }\n ExportMetadata emd = export.getExportMetadata();\n int columnCount = emd.getColumnCount();\n String separator = emd.getSeparator();\n //build map for metadata for exports\n HashMap<String, Integer> headerName = new HashMap<>();\n for (int i = 0; i < emd.getHeaderNames().length; i++) {\n headerName.put(emd.getHeaderNames()[i], i);\n }\n doTransfer(serverFile, jdbcConfig, cellWriter, headerName, separator, columnCount);\n }\n }\n } else {\n break;\n }\n }\n if (!somethingDone) {\n displayHelp();\n }\n closeDown();\n } catch (Exception thrown) {\n if (authType == AUTH_TYPE.OAUTH && thrown instanceof FeignException) {\n FeignException exception = (FeignException) thrown;\n if (exception.status() == 403) {\n LOG.error(\"The refresh token has expired. Please register again using -forceRegister parameter once.\", exception);\n } else {\n LOG.error(Utils.formatThrowable(thrown));\n }\n } else if (!(thrown instanceof InterruptedException)) {\n // Some brevity for those who don't\n LOG.error(Utils.formatThrowable(thrown));\n }\n // System.exit causes abrupt termination, but the status is useful\n // when run from an automated script.\n closeDown();\n Thread.currentThread().interrupt();\n System.exit(1);\n }\n }", "@Override\n public void processResult(ArrayList<Droplet> result) {\n Log.d(TAG, \"Finished executing droplet query.\");\n if (result != null) {\n int size = result.size();\n for (int i = 0; i < size; ++i) {\n adapter.add(result.get(i).getData());\n }\n }\n }", "public static List<String> getProcessLines() {\n// SLog.d(\"getProcessLines\");\n List<String> lines = new ArrayList<>();\n Process process = null;\n Runtime runtime = Runtime.getRuntime();\n try {\n\n String cmd = \"busybox ps -e\";\n process = runtime.exec(new String[]{\"su\", \"-c\", cmd});\n InputStream is = process.getInputStream();\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n String line;\n\n while ((line = reader.readLine()) != null) {\n if(line != null && !line.isEmpty()) lines.add(line);\n }\n\n } catch (Exception e) {\n SLog.e(TAG, e.getMessage());\n e.printStackTrace();\n } finally {\n try {\n try {\n process.destroy();\n } catch (Exception e){}\n }catch (Exception e) {}\n }\n return lines;\n }", "public static void main(String[] args) throws SQLException {\n\t\t// 2. Create a Statement\n\t\t// 3. Execute query\n\t\t// 4. Process results (do validations)\n\t\t// 5. Close connections\n\t\t\n\t\t// Create Connection with our database\n\t\t// dbURl, dbUsername, dbPassword\n\t\t\n\t\t// HostName (ipAddress)\n\t\t// dbType\n\t\t// portNumber\n\t\t// dbBaseName\n\t\t\n\t\t// jdbc:jdbcType://ipAddress:portNumber/dbName\n\t\t// String dbUrl=\"jdbc:mysql://18.232.148.34:3306/syntaxhrm_mysql\";\n\t\t// config utulity file to read dbConfiguration.properties file\n\t\t\n\t\t\n\t\t// 1. Connect to database\n\t\t\n\t\tString url=ConfigUtility.getProperty(DbConstants.DB_CONFIG_FILEPATH, \"dbUrl\");\n\t\tString user=ConfigUtility.getProperty(DbConstants.DB_CONFIG_FILEPATH, \"dbUsername\");\n\t\tString password=ConfigUtility.getProperty(DbConstants.DB_CONFIG_FILEPATH, \"dbPassword\");\n\t\t\n\t\tConnection connection=DriverManager.getConnection(url, user, password);\n\t\t\n\t\tDatabaseMetaData dbMetaData=connection.getMetaData();\n\t\t\n\t\tString dbUrl=dbMetaData.getURL();\n\t\tSystem.out.println(dbUrl);\n\t\t\n\t\tString dbUsername=dbMetaData.getUserName();\n\t\tSystem.out.println(dbUsername);\n\t\t\n\t\tString dbProductData=dbMetaData.getDatabaseProductVersion();\n\t\tSystem.out.println(dbProductData);\n\t\t\n\t\tString dbDriverName=dbMetaData.getDriverName();\n\t\tSystem.out.println(dbDriverName);\n\t\t\n\t\t// 2. Create a Statement\n\t\tStatement statement=connection.createStatement();\n\t\t\n\t\t// 3. Execute query save results in ResultSet object\n\t\t\n\t\tResultSet rSet=statement.executeQuery(\"select * from ohrm_job_title;\");\n\t\t\n\t\tResultSetMetaData rsMetaData=rSet.getMetaData();\n\t\t\n\t\tint colCount=rsMetaData.getColumnCount();\n\t\tSystem.out.println(\"Number of Columns : \"+colCount);\n\t\t\n\t\trsMetaData.getColumnName(1);\n\t\t\n\t\tfor(int i=1; i<=colCount; i++) {\n\t\t\tSystem.out.println(\"Column Name \"+(i)+\" : \"+rsMetaData.getColumnName(i));\n\t\t}\n\t\t\t\n\t\t// 4. Process results (print results)\n\t\tSystem.out.println(\"Printing results\");\n\t\t\n\t\t// next()\n\t\t// getString()\n\t\t\n\t\twhile(rSet.next()) {\n\t\t\t\n\t\t\tString id=rSet.getString(1);\n\t\t\tString jobTitle=rSet.getString(\"job_title\");\n\t\t\tString jobDestcription=rSet.getString(\"job_description\");\t\t\t\n\t\t\tSystem.out.println(id+\" \"+jobTitle+\" \"+jobDestcription);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// 5. Close connections in reverse order\n\t\t\n\t\trSet.close();\n\t\tstatement.close();\n\t\tconnection.close();\n\t\t\n\t}", "public void accessDebugLogTable(List<String> processNames) \r\n throws ServiceFailureException;", "abstract protected void reportResult(Result result);", "@Override\n\t\tpublic void execute() {\n\t\t\tsuper.execute();\n\t\t\ttry {\n\t\t\t\tString select;\n\t\t\t\tif (tokenData.isRtb4FreeSuperUser()) \n\t\t\t\t\tselect = \"select * from rtb_standards\";\n\t\t\t\telse\n\t\t\t\t\tselect = \"select * from rtb_standards where customer_id='\"+tokenData.customer+\"'\";\n\t\t\t\tvar conn = CrosstalkConfig.getInstance().getConnection();\n\t\t\t\tvar stmt = conn.createStatement();\n\t\t\t\tvar prep = conn.prepareStatement(select);\n\t\t\t\tResultSet rs = prep.executeQuery();\n\t\t\t\t\n\t\t\t\trules = convertToJson(rs); \n\t\t\t\t\t\t\t\n\t\t\t\treturn;\n\t\t\t} catch (Exception err) {\n\t\t\t\terr.printStackTrace();\n\t\t\t\terror = true;\n\t\t\t\tmessage = err.toString();\n\t\t\t}\n\t\t\tmessage = \"Timed out\";\n\t\t}", "private void printFailCommandResult(CommandResult result) {\n String commandType = result.getCommand().getCommandType();\n switch (commandType) {\n case Command.COMMAND_DONE:\n switch (result.getResultDescription()) {\n case CommandResult.INVALID_NUMBER:\n printInvalidTaskNotExistedMessage();\n break;\n case CommandResult.INVALID_TASK_ALREADY_DONE:\n printInvalidTaskAlreadyDoneMessage(result);\n break;\n }\n break;\n case Command.COMMAND_ADD_TODO:\n case Command.COMMAND_ADD_DEADLINE:\n case Command.COMMAND_ADD_EVENT:\n printInvalidAddTaskMessage(result);\n break;\n case Command.COMMAND_DELETE:\n printInvalidTaskNotExistedMessage();\n break;\n case Command.COMMAND_FIND:\n printInvalidKeywordMessage();\n break;\n default:\n printInvalidCommandMessage();\n break;\n }\n }", "private void handleCompleteAndStats() throws Exception {\n\t\tsynchronized (completedProcs) {\n\t\t\twhile (completedProcs.size() != nProc)\n\t\t\t\tcompletedProcs.wait();\n\t\t}\n\t\tinitiateTerminate();\n\t\t\n\t\tsynchronized (procStats) {\n\t\t\twhile (procStats.size() != nProc)\n\t\t\t\tprocStats.wait();\n\t\t}\n\t\t\n\t\taggregateStats();\n\t}", "public void run(String[] cmdStrings) throws Exception {\n StringBuffer stdoutBuffer = new StringBuffer();\n StringBuffer stderrBuffer = new StringBuffer();\n String CR = System.getProperty(\"line.separator\");\n int subprocessStatus = 1;\n\n System.out.print(CR + \"runCommand method about to execute: \");\n for (int iNdx = 0; iNdx < cmdStrings.length; iNdx++) {\n System.out.print(\" \");\n System.out.print(cmdStrings[iNdx]);\n }\n System.out.println(CR);\n\n try {\n Process process = Runtime.getRuntime().\n exec(VMConnection.insertDebuggeeVMOptions(cmdStrings));\n int BUFFERSIZE = 4096;\n /*\n * Gather up the output of the subprocess using non-blocking\n * reads so we can get both the subprocess stdout and the\n * subprocess stderr without overfilling any buffers.\n */\n BufferedInputStream is =\n new BufferedInputStream(process.getInputStream());\n int isLen = 0;\n byte[] isBuf = new byte[BUFFERSIZE];\n\n BufferedInputStream es =\n new BufferedInputStream(process.getErrorStream());\n int esLen = 0;\n byte[] esBuf = new byte[BUFFERSIZE];\n\n do {\n isLen = is.read(isBuf);\n if (isLen > 0) {\n stdoutBuffer.append(new String(isBuf, 0, isLen));\n }\n esLen = es.read(esBuf);\n if (esLen > 0) {\n stderrBuffer.append(new String(esBuf, 0, esLen));\n }\n } while ((isLen > -1) || (esLen > -1));\n\n try {\n process.waitFor();\n subprocessStatus = process.exitValue();\n process = null;\n } catch(java.lang.InterruptedException e) {\n System.err.println(\"InterruptedException: \" + e);\n throw new Exception(\"Test failed: process interrupted\");\n }\n\n } catch(IOException ex) {\n System.err.println(\"IO error: \" + ex);\n throw new Exception(\"Test failed: IO error running process\");\n }\n\n System.out.println(CR + \"--- Return code was: \" +\n CR + Integer.toString(subprocessStatus));\n System.out.println(CR + \"--- Return stdout was: \" +\n CR + stdoutBuffer.toString());\n System.out.println(CR + \"--- Return stderr was: \" +\n CR + stderrBuffer.toString());\n\n }", "private static void flushResult(IQueryResult result) throws IOException\n {\n while (result.next()) {\n System.out.println(result.getValueArray().toString());\n }\n }", "private static List<String> readOutput(Process process) throws IOException {\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));\n\t\tString line;\n\t\tList<String> lines = new ArrayList<>();\n\t\twhile ((line = reader.readLine()) != null) {\n\t\t\tlines.add(line);\n\t\t}\n\t\treturn lines;\n\t}", "private static void checkError(String result) {\n String err = Neo4jUtils.extractErrorData(result);\n if (err == null) {\n return;\n }\n throw new RuntimeException(err);\n }", "public void analyzeCommand(String cmd)\n {\n commandEntered(cmd);\n }", "public CQLQueryResults processQuery(CQLQuery cqlQuery) throws MalformedQueryException, \n\t QueryProcessingException {\n\t\tthrow new RuntimeException(\"not impl yet. port from ncia-core-grid-transfer\");\n\t}", "public List<IkrInstanceData> fetchDBMS_SYBASE_PROCESS()\r\n\tthrows ConnectorException, FetchException, PersistenceException {\t \r\n\t\tList<IkrInstanceData> res = new ArrayList<IkrInstanceData>();\t\r\n\t\t\r\n\t\tSybaseProcessMeasurement measurement = (SybaseProcessMeasurement)client.getMeasurement(\"DBMS_SYBASE_PROCESS\");\r\n\r\n\t\tfor(SybaseProcessResult info : measurement.getProcessResult())\r\n\t\t\tres.add(new SybaseProcessIkrInstanceData(client.getDatabaseInstance(),info, fetchDate));\t\t\r\n\t\treturn res;\t\r\n\t}", "public static void main(String[] args) {\n TinyDBClient db = new TinyDBClient();\n String opsSequence = \"t1-u-p1,t1-u-p2,cp-st,cp-ed,t1-u-p3,flush,t2-u-p4,t1-cmt,t3-u-p2,t2-u-p1,t2-cmt,t3-u-p5\";\n for (String op : opsSequence.split(\",\")) {\n String output = db.doit(op);\n if (output.isEmpty()) {\n continue;\n }\n System.out.println(output);\n }\n System.out.println(db.doit(\"show-log\"));\n System.out.println(db.doit(\"slct\"));\n db.crash();\n System.out.println(db.doit(\"slct\"));\n db.start();\n System.out.println(db.doit(\"slct\"));\n System.out.println(db.doit(\"show-log\"));\n }", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "public void run() {\n\t\t\tArrayList<GoobiScriptResult> templist = new ArrayList<>(resultList);\n for (GoobiScriptResult gsr : templist) {\n\t\t\t\tif (gsr.getResultType() == GoobiScriptResultType.WAITING && gsr.getCommand().equals(command)) {\n\t\t\t\t\tProcess p = ProcessManager.getProcessById(gsr.getProcessId());\n\t\t\t\t\tgsr.setProcessTitle(p.getTitel());\n\t\t\t\t\tgsr.setResultType(GoobiScriptResultType.RUNNING);\n\t\t\t\t\tgsr.updateTimestamp();\n\t p.setProjekt(project);\n\t p.setProjectId(project.getId());\n\t try {\n\t\t\t\t\t\tProcessManager.saveProcess(p);\n\t\t\t\t\t\tHelper.addMessageToProcessLog(p.getId(), LogType.DEBUG, \"Project '\" + project + \"' assigned using GoobiScript.\", username);\n\t logger.info(\"Project '\" + project + \"' assigned using GoobiScript for process with ID \" + p.getId());\n\t gsr.setResultMessage(\"Project '\" + project + \"' assigned successfully.\");\n\t\t\t\t\t\tgsr.setResultType(GoobiScriptResultType.OK);\n\t\t\t\t\t} catch (DAOException e) {\n\t\t\t\t\t\tgsr.setResultMessage(\"Problem assigning new project: \" + e.getMessage());\n\t\t\t\t\t\tgsr.setResultType(GoobiScriptResultType.OK);\n\t\t\t\t\t}\n\t gsr.updateTimestamp();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void writeResultData() {\n\n// DatabaseLoader databaseLoader = new DatabaseLoader();\n TestResultDeployer testResultDeployer = new TestResultDeployer();\n MySqlDatabaseManager mySqlDatabaseManager;\n try {\n EnvironmentBuilder environmentBuilder = new EnvironmentBuilder();\n DashboardVariables dashboardVariables = environmentBuilder.getFrameworkSettings().getDashboardVariables();\n if (dashboardVariables.getEnableDashboard().equalsIgnoreCase(\"true\")) {\n String databaseName = dashboardVariables.getDbName();\n\n mySqlDatabaseManager = new MySqlDatabaseManager(dashboardVariables.getJdbcUrl(), dashboardVariables.\n getDbUserName(), dashboardVariables.getDbPassword());\n// databaseLoader.createDatabase();\n mySqlDatabaseManager.execute(\"INSERT INTO \" + databaseName + \".WA_BUILD_HISTORY VALUES()\");\n DirectoryScanner scan = new DirectoryScanner();\n scan.setBasedir(ProductConstant.REPORT_LOCATION + File.separator + \"reports\" + File.separator);\n String[] fileList = new String[]{\"*/testng-results.xml\"};\n scan.setIncludes(fileList);\n scan.scan();\n String[] fileset = scan.getIncludedFiles();\n for (int i = 0; i <= fileset.length - 1; i++) {\n testResultDeployer.writeResult(ProductConstant.REPORT_LOCATION + \"reports\" +\n File.separator + fileset[i]);\n log.info(fileset[i] + \" write to database\");\n }\n }\n } catch (ClassNotFoundException e) {\n log.error(e);\n } catch (SQLException e) {\n log.error(e);\n } /*catch (IOException e) {\n log.error(e);\n }*/\n }", "@Override()\n public ResultCode doToolProcessing()\n {\n // Create the proxy request handler that will be used to forward requests to\n // a remote directory.\n final ProxyRequestHandler proxyHandler;\n try\n {\n proxyHandler = new ProxyRequestHandler(createServerSet());\n }\n catch (final LDAPException le)\n {\n err(\"Unable to prepare to connect to the target server: \",\n le.getMessage());\n return le.getResultCode();\n }\n\n\n // Create the log handler to use for the output.\n final Handler logHandler;\n if (outputFile.isPresent())\n {\n try\n {\n logHandler = new FileHandler(outputFile.getValue().getAbsolutePath());\n }\n catch (final IOException ioe)\n {\n err(\"Unable to open the output file for writing: \",\n StaticUtils.getExceptionMessage(ioe));\n return ResultCode.LOCAL_ERROR;\n }\n }\n else\n {\n logHandler = new ConsoleHandler();\n }\n logHandler.setLevel(Level.INFO);\n logHandler.setFormatter(new MinimalLogFormatter(\n MinimalLogFormatter.DEFAULT_TIMESTAMP_FORMAT, false, false, true));\n\n\n // Create the debugger request handler that will be used to write the\n // debug output.\n LDAPListenerRequestHandler requestHandler =\n new LDAPDebuggerRequestHandler(logHandler, proxyHandler);\n\n\n // If a code log file was specified, then create the appropriate request\n // handler to accomplish that.\n if (codeLogFile.isPresent())\n {\n try\n {\n requestHandler = new ToCodeRequestHandler(codeLogFile.getValue(), true,\n requestHandler);\n }\n catch (final Exception e)\n {\n err(\"Unable to open code log file '\",\n codeLogFile.getValue().getAbsolutePath(), \"' for writing: \",\n StaticUtils.getExceptionMessage(e));\n return ResultCode.LOCAL_ERROR;\n }\n }\n\n\n // Create and start the LDAP listener.\n final LDAPListenerConfig config =\n new LDAPListenerConfig(listenPort.getValue(), requestHandler);\n if (listenAddress.isPresent())\n {\n try\n {\n config.setListenAddress(\n InetAddress.getByName(listenAddress.getValue()));\n }\n catch (final Exception e)\n {\n err(\"Unable to resolve '\", listenAddress.getValue(),\n \"' as a valid address: \", StaticUtils.getExceptionMessage(e));\n return ResultCode.PARAM_ERROR;\n }\n }\n\n if (listenUsingSSL.isPresent())\n {\n try\n {\n config.setServerSocketFactory(\n createSSLUtil(true).createSSLServerSocketFactory());\n }\n catch (final Exception e)\n {\n err(\"Unable to create a server socket factory to accept SSL-based \" +\n \"client connections: \", StaticUtils.getExceptionMessage(e));\n return ResultCode.LOCAL_ERROR;\n }\n }\n\n listener = new LDAPListener(config);\n\n try\n {\n listener.startListening();\n }\n catch (final Exception e)\n {\n err(\"Unable to start listening for client connections: \",\n StaticUtils.getExceptionMessage(e));\n return ResultCode.LOCAL_ERROR;\n }\n\n\n // Display a message with information about the port on which it is\n // listening for connections.\n int port = listener.getListenPort();\n while (port <= 0)\n {\n try\n {\n Thread.sleep(1L);\n }\n catch (final Exception e)\n {\n Debug.debugException(e);\n\n if (e instanceof InterruptedException)\n {\n Thread.currentThread().interrupt();\n }\n }\n\n port = listener.getListenPort();\n }\n\n if (listenUsingSSL.isPresent())\n {\n out(\"Listening for SSL-based LDAP client connections on port \", port);\n }\n else\n {\n out(\"Listening for LDAP client connections on port \", port);\n }\n\n // Note that at this point, the listener will continue running in a\n // separate thread, so we can return from this thread without exiting the\n // program. However, we'll want to register a shutdown hook so that we can\n // close the logger.\n //shutdownListener = new LDAPDebuggerShutdownListener(listener, logHandler);\n // Runtime.getRuntime().addShutdownHook(shutdownListener);\n\n return ResultCode.SUCCESS;\n }", "public static void main(String[] args) {\n if (!(args.length == 1 || args.length == 2)) {\n System.err.println(\"USAGE: \" + DCQLQueryRunner.class.getName() + \" <dcql_query.xml> [aggregate]\");\n System.exit(1);\n }\n String queryFileName = args[0];\n System.out.println(\"Executing query \" + queryFileName);\n try {\n long start = System.currentTimeMillis();\n System.out.println(\"Loading query from disk\");\n DCQLQuery query = QueryLoader.loadDcqlQuery(queryFileName);\n System.out.println(\"Query loaded in \" + (System.currentTimeMillis() - start) + \" ms\");\n start = System.currentTimeMillis();\n if (args.length == 2 && \"aggregate\".equals(args[1])) {\n System.out.println(\"Executing Aggregation query\");\n CQLQueryResults results = executeAndAggregateQuery(query);\n System.out.println(\"Query executed in \" + (System.currentTimeMillis() - start) + \" ms\");\n QueryResultPrinter.printCqlQueryResults(results);\n } else {\n System.out.println(\"Executing query\");\n DCQLQueryResultsCollection results = executeDcqlQuery(query);\n System.out.println(\"Query executed in \" + (System.currentTimeMillis() - start) + \" ms\");\n QueryResultPrinter.printDcqlQueryResults(results);\n }\n System.out.println(\"DONE\");\n } catch (FederatedQueryProcessingException ex) {\n ex.printStackTrace();\n System.exit(1);\n }\n }", "private void executeCommand(String command) throws Exception\r\n\t{\r\n\t\tProcess process = null;\r\n\r\n\t\tif (!command.equalsIgnoreCase(\"\"))\r\n\t\t{\r\n\t\t\tprocess = this.runtime.exec(command);\r\n\r\n\t\t\t// any error message?\r\n\t\t\tfinal StreamGobbler errorGobbler = new StreamGobbler(process.getErrorStream());\r\n\r\n\t\t\t// any output?\r\n\t\t\tfinal StreamGobbler outputGobbler = new StreamGobbler(process.getInputStream());\r\n\r\n\t\t\t// kick them off\r\n\t\t\terrorGobbler.start();\r\n\t\t\toutputGobbler.start();\r\n\r\n\t\t\tfinal int i = process.waitFor();\r\n\t\t\tprocess.destroy();\r\n\t\t\tSystem.out.println(\"exit val of process \" + process.exitValue());\r\n\t\t\tSystem.out.println(command + \":\" + i);\r\n\t\t}\r\n\t}", "private String readProcess (final Process p) {\n \tString message=null;\n \tfinal BufferedReader in =new BufferedReader ( new InputStreamReader(p.getErrorStream()));\n \tString line;\n \ttry {\n\t\t\twhile((line = in.readLine()) != null)\n\t\t\t{\n\t\t\t\tmessage =line;\n\t\t\t\tif((line = in.readLine()) != null && line.startsWith(\"\\tat\"))\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\t\n\t\t\t\tmessage =message.substring(message.indexOf(':')+2);\n\t\t\t\t\n\t\t} catch (IOException e) {\n\t\t\tlogfile.severe(e.getMessage());\n\t\t}\n\t\treturn message;\n }", "private ShellStatus getCmdOutput() {\n ShellStatus status = RUNNING;\n\n while (!stdOut.buffer.isEmpty()) {\n String line = stdOut.buffer.remove(0);\n LOG.trace(String.format(\"lockId=%s, shell line:=%s \", lockId, line));\n\n if (\"END_OF_SCRIPT\".equals(line)) {\n if (!hasErrors()) {\n status = SUCCESS;\n } else {\n status = PSSHELL_ERROR;\n }\n } else {\n command.addOutputLine(line);\n }\n }\n\n if (!stdErr.buffer.isEmpty()) {\n while (!stdErr.buffer.isEmpty()) {\n String errorLine = stdErr.buffer.remove(0);\n LOG.trace(\"CallerId: \" + lockId + \" error line: \" + errorLine);\n command.addErrorLine(errorLine);\n }\n status = PSSHELL_ERROR;\n }\n\n command.setReturnCode(status);\n return status;\n }", "public static void execute(MySQLAdaptor dba, String releaseNumber) throws Exception, IOException, SQLException, ClassNotFoundException {\n\n\t\tlogger.info(\"Running MapOldStableIds step\");\n\t\tResultSet stableIdResults = retrieveAllStableIdentifiers(dba);\n\n\t\tlogger.info(\"Mapping Old Stable IDs to Current Stable IDs...\");\n\t\tMap<String, List<String>> dbIdToStableIds = getDbIdToStableIds(stableIdResults);\n\t\tList<String> dbIds = new ArrayList<>(dbIdToStableIds.keySet());\n\t\tCollections.sort(dbIds);\n\n\t\t// Iterate through array of stable IDs associated with DB ID, splitting into human and non-human groups.\n\t\tList<List<Object>> hsaIds = new ArrayList<>();\n\t\tList<List<Object>> nonHsaIds = new ArrayList<>();\n\t\tfor (String dbId : dbIds)\n\t\t{\n\t\t\tList<String> stableIds = dbIdToStableIds.get(dbId);\n\t\t\tCollections.sort(stableIds);\n\n\t\t\t// After sorting the first stable ID in the array is considered the primary ID.\n\t\t\t// An Array of Arrays is used here, with each interior array's first element being\n\t\t\t// the primaryId string and the second element being an array of the remaining stable IDs.\n\t\t\t// Example: [R-HSA-1006169, [REACT_118604]], [R-HSA-1006173, [REACT_119254]]]\n\t\t\tif (!(stableIds.size() < 2) || (stableIds.get(0).matches(\"^R-.*\")))\n\t\t\t{\n\t\t\t\tString primaryId = stableIds.get(0);\n\t\t\t\tstableIds.remove(0);\n\t\t\t\tArrayList<Object> organizedIds = new ArrayList<>();\n\t\t\t\tif (primaryId.matches(\"R-HSA.*\"))\n\t\t\t\t{\n\t\t\t\t\torganizedIds.add(primaryId);\n\t\t\t\t\torganizedIds.add(stableIds);\n\t\t\t\t\thsaIds.add(organizedIds);\n\t\t\t\t} else {\n\t\t\t\t\torganizedIds.add(primaryId);\n\t\t\t\t\torganizedIds.add(stableIds);\n\t\t\t\t\tnonHsaIds.add(organizedIds);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Reorder the data so that the interior arrays that have only 1 element are going to be output first.\n\t\tList<List<Object>> combinedIds = new ArrayList<>();\n\t\tcombinedIds.addAll(hsaIds);\n\t\tcombinedIds.addAll(nonHsaIds);\n\t\tList<List<Object>> stableIdsToOldIdsMappings = new ArrayList<>();\n\t\tList<List<Object>> deferredIds = new ArrayList<>();\n\t\tfor (List<Object> stableIdsArray : combinedIds)\n\t\t{\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tList<String> secondaryIds = (List<String>) stableIdsArray.get(1);\n\t\t\tif (secondaryIds.size() > 1)\n\t\t\t{\n\t\t\t\tdeferredIds.add(stableIdsArray);\n\t\t\t} else {\n\t\t\t\tstableIdsToOldIdsMappings.add(stableIdsArray);\n\t\t\t}\n\t\t}\n\t\tstableIdsToOldIdsMappings.addAll(deferredIds);\n\n\t\tlogger.info(\"Retrieving current stable identifiers from \" + dba.getDBName());\n\t\tSet<String> currentStableIdentifiers = getCurrentStableIdentifiers(dba);\n\n\t\twriteMappingsToFile(releaseNumber, stableIdsToOldIdsMappings, currentStableIdentifiers);\n\n\t\tlogger.info(\"MapOldStableIds finished\");\n\t}", "private List<AppDetails> getAppDetailsFromDatabase() {\r\n SQLiteAccessLayer sqLiteAccessLayer = new SQLiteAccessLayer(this);\r\n List<AppDetails> appDetailsList = new ArrayList<>();\r\n PackageManager packageManager = getPackageManager();\r\n\r\n if (sqLiteAccessLayer.isDatabaseEmpty()) { // database empty\r\n List<PackageInfo> installedApps = RawAppInfo.getAllInstalledApps(this);\r\n List<ResolveInfo> systemApps = RawAppInfo.getSystemApps(this);\r\n\r\n for (PackageInfo packageInfo : installedApps) {\r\n AppDetails appDetails = new AppDetails(\r\n packageInfo.applicationInfo.uid,\r\n packageInfo.applicationInfo.packageName,\r\n String.valueOf(packageInfo.applicationInfo.loadLabel(packageManager)),\r\n RawAppInfo.INSTALLED_APP\r\n );\r\n\r\n SQLiteAccessLayer sqLiteAccessLayerForInsert = new SQLiteAccessLayer(this, appDetails);\r\n sqLiteAccessLayerForInsert.insertIntoAppDetails();\r\n appDetailsList.add(appDetails);\r\n }\r\n for (ResolveInfo resolveInfo : systemApps) {\r\n ApplicationInfo applicationInfo = resolveInfo.activityInfo.applicationInfo;\r\n AppDetails appDetails = new AppDetails(\r\n applicationInfo.uid, //uid\r\n applicationInfo.packageName, //packagename\r\n String.valueOf(applicationInfo.loadLabel(packageManager)), // applicationName\r\n RawAppInfo.SYSTEM_APP //applicationType\r\n );\r\n SQLiteAccessLayer sqLiteAccessLayerForInsert = new SQLiteAccessLayer(this, appDetails);\r\n sqLiteAccessLayerForInsert.insertIntoAppDetails();\r\n appDetailsList.add(appDetails);\r\n }\r\n } else {\r\n appDetailsList = new ArrayList<>(new SQLiteAccessLayer(this).queryAppDetails());\r\n }\r\n sqLiteAccessLayer.closeDatabaseConnection();\r\n return appDetailsList;\r\n }", "private static String handleCliOutput(Process process, boolean failCommand) throws IOException, InterruptedException{\n\t\tfinal BufferedReader br = new BufferedReader(new InputStreamReader(process.getInputStream()));\n\t\tfinal StringBuilder consoleOutput = new StringBuilder(\"\");\n\t\tfinal AtomicReference<Throwable> exception = new AtomicReference<Throwable>();\n\n\t\tThread thread = new Thread(new Runnable() {\n\n\t\t\tString line = null;\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\t\t\tLogUtils.log(line);\n\t\t\t\t\t\tconsoleOutput.append(line + \"\\n\");\n\t\t\t\t\t}\n\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\texception.set(e);\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\n\t\tthread.setDaemon(true);\n\n\t\tthread.start();\n\n\t\tint result = process.waitFor();\n\n\t\tthread.join(5000);\n\n\t\tAssertUtils.assertTrue(exception.get() == null);\n\n\t\tif (result != 0 && !failCommand) {\n\t\t\tAssertUtils.assertFail(\"In RunCommand: Process did not complete successfully\");\n\t\t}\n\t\treturn consoleOutput.toString();\n\t}" ]
[ "0.57937133", "0.54625726", "0.54580736", "0.53771514", "0.5376432", "0.5286795", "0.5116391", "0.5047878", "0.5042224", "0.4983845", "0.4977515", "0.49418437", "0.49407655", "0.49392262", "0.49328876", "0.49315786", "0.49137336", "0.49083918", "0.48677024", "0.48482797", "0.4836566", "0.47463343", "0.47304234", "0.47255838", "0.47190565", "0.4702504", "0.46887103", "0.46803698", "0.4678172", "0.46781278", "0.46768376", "0.4664719", "0.46606636", "0.46587053", "0.46536118", "0.46314907", "0.46194142", "0.4611744", "0.46110475", "0.4601188", "0.45974147", "0.45953935", "0.45918036", "0.45898226", "0.45869815", "0.45695877", "0.45657715", "0.45386583", "0.453853", "0.45380417", "0.45330378", "0.45302278", "0.45251554", "0.45221338", "0.44959176", "0.44953096", "0.4493408", "0.4489813", "0.44887844", "0.4487221", "0.44835976", "0.44801587", "0.44787607", "0.4475569", "0.44755408", "0.44743276", "0.44741708", "0.44715974", "0.44704172", "0.44654244", "0.4464276", "0.4444799", "0.44445336", "0.44430164", "0.44405884", "0.4439927", "0.44372344", "0.44318852", "0.44315755", "0.44297665", "0.4426585", "0.44208035", "0.4418905", "0.44162622", "0.44133484", "0.44097713", "0.44097713", "0.4408353", "0.44076952", "0.44076952", "0.4406497", "0.44005916", "0.43992525", "0.43973735", "0.43971276", "0.4395114", "0.43775466", "0.43772915", "0.43710124", "0.43571195" ]
0.57315785
1
Generates a SFC instance based on the dimensions definition and the space filling curve type
public static SpaceFillingCurve createSpaceFillingCurve( final SFCDimensionDefinition[] dimensionDefs, final SFCType sfc ) { switch (sfc) { case HILBERT: return new HilbertSFC( dimensionDefs); case ZORDER: return new ZOrderSFC( dimensionDefs); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createSpaceClasses(){\n\t//add the number of classe demand in a list of superchannel\n\t\tspaceSC_List = new ArrayList<OpticalSuperChannel>();\n\t\tfor ( int i = 1 ; i < this.spatialDimension+1 ; i++ ) {\n\t\t\tspaceSC_List.add(new OpticalSuperChannel( i , this.signalBw, this.channelSpacing, this.bandGuard,\n\t\t\t\t\tthis.slotBw, this.modulationFormat));\n\t\t}\n\n\n\t}", "Dimension_Dimension createDimension_Dimension();", "public Fill() { }", "@DISPID(1610940422) //= 0x60050006. The runtime will prefer the VTID if present\n @VTID(28)\n Factory shapeFactory();", "private static void putCritter(Color f, Color o, int x, int y, CritterShape s) {\r\n \tint dim = Main.shapeSize;\r\n \tint cellSize = Main.cellSize;\r\n \tShape critterShape = null;\r\n \tdouble len = (double)dim/2.0;\r\n \tdouble len2 = (double)dim - 1.0;\r\n \tdouble len3 = (double)cellSize - 1.0;\r\n \t\r\n \tswitch(s) {\r\n \tcase CIRCLE:\r\n \t\tcritterShape = new Circle((dim-1)/2);\r\n \t\tcritterShape.setStroke(o);\r\n \t\tcritterShape.setFill(f);\r\n \t\tbreak;\r\n \t\t\r\n \tcase SQUARE:\r\n \t\tcritterShape = new Rectangle(cellSize-3, cellSize-3);\r\n \t\tcritterShape.setStroke(o);\r\n \t\tcritterShape.setFill(f);\r\n \t\tbreak;\r\n \t\t\r\n \tcase TRIANGLE:\r\n \t\tPolygon p = new Polygon();\r\n \t\tDouble[] dimensions = {len, 1.0, len2, len2, 1.0, len2};\r\n \t\tp.getPoints().addAll(dimensions);\r\n \t\tcritterShape = p;\r\n \t\tcritterShape.setStroke(o);\r\n \t\tcritterShape.setFill(f);\r\n \t\tbreak;\r\n \t\t\r\n \tcase DIAMOND:\r\n \t\tPolygon d = new Polygon();\r\n \t\tDouble[] values = {len, 1.0, len2, len, len, len2, 1.0, len};\r\n \t\td.getPoints().addAll(values);\r\n \t\tcritterShape = d;\r\n \t\tcritterShape.setStroke(o);\r\n \t\tcritterShape.setFill(f);\r\n \t\tbreak;\r\n \t\t\r\n \tcase STAR:\r\n \t\tPolygon st = new Polygon();\r\n \t\r\n \t\tDouble[] v = {(len3)*5.5/24.0, (len3)*12.0/24.0, (len3)*1.0/24.0, (len3)*21.0/24.0, \r\n \t\t\t\t\t(len3)*9.5/24.0, (len3)*17.0/24.0, (len3)*16.0/24.0, (len3)*23.0/24.0, \r\n \t\t\t\t\t(len3)*16.0/24.0, (len3)*16.0/24.0, (len3)*23.0/24.0, (len3)*12.0/24.0, \r\n \t\t\t\t\t(len3)*16.0/24.0,(len3)*8.0/24.0, (len3)*16.0/24.0, (len3)*1.0/24.0, \r\n \t\t\t\t\t(len3)*9.5/24.0, (len3)*7.0/24.0, (len3)*1.0/24.0,(len3)*4.0/24.0 };\r\n \t\t\t\r\n \t\t\r\n \t\tst.getPoints().addAll(v); \r\n \t\tcritterShape = st;\r\n \t\tcritterShape.setStroke(o);\r\n \t\tcritterShape.setFill(f);\r\n \t\tbreak;\r\n \t\r\n \tdefault:\r\n \t\tbreak;\r\n \t}\r\n \t\r\n \t//add the critter to the critter world\r\n \tMain.world.add(critterShape, x, y);\r\n }", "Dimension createDimension();", "private void fillNCFile() {\n\n List<GradsVariable> vars = gradsDDF.getVariables();\n List<GradsAttribute> attrs = gradsDDF.getAttributes();\n // TODO: ensembles\n List<GradsDimension> dims = gradsDDF.getDimensions();\n Variable v;\n int numZ = 0;\n HashMap<String, Dimension> zDims = new HashMap<>();\n for (GradsDimension dim : dims) {\n String name = getVarName(dim);\n int size = dim.getSize();\n Dimension ncDim = new Dimension(name, size);\n ncFile.addDimension(null, ncDim);\n if (name.equals(ENS_VAR)) {\n v = new Variable(ncFile, null, null, name, DataType.STRING, name);\n v.addAttribute(new Attribute(\"standard_name\", \"ensemble\"));\n v.addAttribute(new Attribute(_Coordinate.AxisType, AxisType.Ensemble.toString()));\n List<String> names = gradsDDF.getEnsembleDimension().getEnsembleNames();\n String[] nameArray = new String[names.size()];\n for (int i = 0; i < nameArray.length; i++) {\n nameArray[i] = names.get(i);\n }\n Array dataArray = Array.factory(DataType.STRING, new int[] {nameArray.length}, nameArray);\n v.setCachedData(dataArray, false);\n } else {\n double[] vals = dim.getValues();\n v = new Variable(ncFile, null, null, name, DataType.DOUBLE, name);\n v.addAttribute(new Attribute(CDM.UNITS, dim.getUnit()));\n switch (name) {\n case Y_VAR:\n v.addAttribute(new Attribute(CDM.LONG_NAME, \"latitude\"));\n v.addAttribute(new Attribute(\"standard_name\", \"latitude\"));\n v.addAttribute(new Attribute(\"axis\", \"Y\"));\n sizeY = dim.getSize();\n v.addAttribute(new Attribute(_Coordinate.AxisType, AxisType.Lat.toString()));\n break;\n case X_VAR:\n v.addAttribute(new Attribute(CDM.LONG_NAME, \"longitude\"));\n v.addAttribute(new Attribute(\"standard_name\", \"longitude\"));\n v.addAttribute(new Attribute(\"axis\", \"X\"));\n v.addAttribute(new Attribute(_Coordinate.AxisType, AxisType.Lon.toString()));\n sizeX = dim.getSize();\n break;\n case Z_VAR:\n numZ = size;\n zDims.put(name, ncDim);\n v.addAttribute(new Attribute(CDM.LONG_NAME, \"level\"));\n addZAttributes(dim, v);\n break;\n case TIME_VAR:\n v.addAttribute(new Attribute(CDM.LONG_NAME, \"time\"));\n v.addAttribute(new Attribute(_Coordinate.AxisType, AxisType.Time.toString()));\n break;\n }\n ArrayDouble.D1 varArray = new ArrayDouble.D1(size);\n for (int i = 0; i < vals.length; i++) {\n varArray.set(i, vals[i]);\n }\n v.setCachedData(varArray, false);\n }\n ncFile.addVariable(null, v);\n }\n if (numZ > 0) {\n GradsDimension zDim = gradsDDF.getZDimension();\n double[] vals = zDim.getValues();\n for (GradsVariable var : vars) {\n int nl = var.getNumLevels();\n if ((nl > 0) && (nl != numZ)) {\n String name = Z_VAR + nl;\n if (zDims.get(name) == null) {\n Dimension ncDim = new Dimension(name, nl);\n ncFile.addDimension(null, ncDim);\n Variable vz = new Variable(ncFile, null, null, name, DataType.DOUBLE, name);\n vz.addAttribute(new Attribute(CDM.LONG_NAME, name));\n vz.addAttribute(new Attribute(CDM.UNITS, zDim.getUnit()));\n addZAttributes(zDim, vz);\n ArrayDouble.D1 varArray = new ArrayDouble.D1(nl);\n for (int i = 0; i < nl; i++) {\n varArray.set(i, vals[i]);\n }\n vz.setCachedData(varArray, false);\n ncFile.addVariable(null, vz);\n zDims.put(name, ncDim);\n }\n }\n }\n }\n for (GradsVariable var : vars) {\n String coords = \"latitude longitude\";\n int nl = var.getNumLevels();\n if (nl > 0) {\n if (nl == numZ) {\n coords = \"level \" + coords;\n } else {\n coords = Z_VAR + nl + \" \" + coords;\n }\n }\n coords = \"time \" + coords;\n if (gradsDDF.getEnsembleDimension() != null) {\n coords = \"ensemble \" + coords;\n }\n v = new Variable(ncFile, null, null, var.getName(), DataType.FLOAT, coords);\n v.addAttribute(new Attribute(CDM.LONG_NAME, var.getDescription()));\n if (var.getUnitName() != null) {\n v.addAttribute(new Attribute(CDM.UNITS, var.getUnitName()));\n }\n v.addAttribute(new Attribute(CDM.FILL_VALUE, (float) gradsDDF.getMissingValue()));\n v.addAttribute(new Attribute(CDM.MISSING_VALUE, (float) gradsDDF.getMissingValue()));\n for (GradsAttribute attr : attrs) {\n if (attr.getVariable().equalsIgnoreCase(var.getName())) {\n // TODO: what to do about a UINT16/32\n if (attr.getType().equalsIgnoreCase(GradsAttribute.STRING)) {\n v.addAttribute(new Attribute(attr.getName(), attr.getValue()));\n } else if (attr.getType().equalsIgnoreCase(GradsAttribute.BYTE)) {\n try {\n v.addAttribute(new Attribute(attr.getName(), new Byte(attr.getValue())));\n } catch (NumberFormatException nfe) {\n }\n } else if (attr.getType().equalsIgnoreCase(GradsAttribute.INT16)) {\n try {\n v.addAttribute(new Attribute(attr.getName(), new Short(attr.getValue())));\n } catch (NumberFormatException nfe) {\n }\n } else if (attr.getType().equalsIgnoreCase(GradsAttribute.INT32)) {\n try {\n v.addAttribute(new Attribute(attr.getName(), new Integer(attr.getValue())));\n } catch (NumberFormatException nfe) {\n }\n } else if (attr.getType().equalsIgnoreCase(GradsAttribute.FLOAT32)) {\n try {\n v.addAttribute(new Attribute(attr.getName(), new Float(attr.getValue())));\n } catch (NumberFormatException nfe) {\n }\n } else if (attr.getType().equalsIgnoreCase(GradsAttribute.FLOAT64)) {\n try {\n v.addAttribute(new Attribute(attr.getName(), new Double(attr.getValue())));\n } catch (NumberFormatException nfe) {\n }\n }\n }\n }\n ncFile.addVariable(null, v);\n }\n // Global Attributes\n ncFile.addAttribute(null, new Attribute(CDM.CONVENTIONS, \"CF-1.0\"));\n ncFile.addAttribute(null, new Attribute(CDM.HISTORY, \"Direct read of GrADS binary grid into NetCDF-Java 4 API\"));\n String title = gradsDDF.getTitle();\n if ((title != null) && !title.isEmpty()) {\n ncFile.addAttribute(null, new Attribute(\"title\", title));\n }\n for (GradsAttribute attr : attrs) {\n if (attr.getVariable().equalsIgnoreCase(GradsAttribute.GLOBAL)) {\n ncFile.addAttribute(null, new Attribute(attr.getName(), attr.getValue()));\n }\n }\n\n }", "public static void main(String[] args){\n AbstractFactory s = FactoryProducer.getFactory(\"shape\");\n AbstractFactory c = FactoryProducer.getFactory(\"color\");\n s.getShape(\"circular\").draw();\n\n c.getColor(\"red\").fill();\n }", "public EpsShape(Shape shape, boolean filled) {\n\t\tsuper();\n\t\tthis.shape=shape;\n\t\tthis.filled=filled;\n\t}", "public void creationSable(){\n\t\tfor(int x=2;x<=this.taille-3;x++) {\n\t\tfor(int y=2;y<=this.taille-3;y++) {\n\t\tif( grille.get(x).get(y).getTypeOccupation()==0 &&\n\t\t\t\tgrille.get(x+2).get(y).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x+2).get(y+2).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x).get(y+2).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x-2).get(y+2).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x-2).get(y).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x-2).get(y-2).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x).get(y-2).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x+2).get(y-2).getTypeOccupation()!=3 ) {\n\t\t\t\n\t\t\tint[] coord = new int[2];\n\t\t\tcoord[0]=x;\n\t\t\tcoord[1]=y;\n\t\t\tSable sable = new Sable(coord);\n\t\t\tgrille.get(x).set(y, sable);\n\t\t}\n\t\t}\n\t\t}\n\t}", "public void generete() {\n int minQuantFig = 1,\r\n maxQuantFig = 10,\r\n minNum = 1,\r\n maxNum = 100,\r\n minColor = 0,\r\n maxColor = (int)colors.length - 1,\r\n\r\n // Initialize figures property for random calculations\r\n randomColor = 0,\r\n randomFigure = 0,\r\n\r\n // Squere property\r\n randomSideLength = 0,\r\n\r\n // Circle property\r\n randomRadius = 0,\r\n \r\n // IsoscelesRightTriangle property \r\n randomHypotenus = 0,\r\n \r\n // Trapizoid properties\r\n randomBaseA = 0,\r\n randomBaseB = 0,\r\n randomAltitude = 0;\r\n\r\n // Generate random number to set figueres's quantaty\r\n setFigureQuantaty( generateWholoeNumInRange(minQuantFig, maxQuantFig) );\r\n\r\n for( int i = 0; i < getFigureQuantaty(); i++ ) {\r\n\r\n // Convert double random value to int and close it in range from 1 to number of elements in array\r\n randomFigure = (int)( Math.random() * figures.length );\r\n \r\n randomColor = generateWholoeNumInRange( minColor, maxColor ); // Get random color's index from colors array\r\n\r\n // Create new figure depending on randomFigure \r\n switch (figures[randomFigure]) {\r\n\r\n case \"Circle\":\r\n\r\n randomRadius = generateWholoeNumInRange( minNum, maxNum ); // Get random value of circle's radius;\r\n\r\n Circle newCircle = new Circle( colors[randomColor], randomRadius ); // Initialize Circle with random parameters\r\n\r\n newCircle.drawFigure();\r\n \r\n break;\r\n\r\n case \"Squere\":\r\n\r\n randomSideLength = generateWholoeNumInRange( minNum, maxNum ); // Get random value of side length;\r\n\r\n Squere newSquere = new Squere( colors[randomColor], randomSideLength ); // Initialize Circle with random parameters\r\n\r\n newSquere.drawFigure();\r\n\r\n break;\r\n\r\n case \"Triangle\":\r\n\r\n randomSideLength = generateWholoeNumInRange( minNum, maxNum ); // Get random value of side length;\r\n\r\n randomHypotenus = generateWholoeNumInRange( minNum, maxNum ); // Get random value of hypotenus;\r\n\r\n IsoscelesRightTriangle newTriangle = new IsoscelesRightTriangle( colors[randomColor], randomSideLength, randomHypotenus ); // Initialize Circle with random parameters\r\n\r\n newTriangle.drawFigure();\r\n\r\n break;\r\n\r\n case \"Trapezoid\":\r\n\r\n randomBaseA = generateWholoeNumInRange( minNum, maxNum ); // Get random value of trapizoid's side A;\r\n\r\n randomBaseB = generateWholoeNumInRange( minNum, maxNum ); // Get random value of trapizoid's side B;\r\n\r\n randomAltitude = generateWholoeNumInRange( minNum, maxNum ); // Get random value of trapizoid's altitude;\r\n\r\n Trapezoid newTrapezoid = new Trapezoid( colors[randomColor], randomBaseA, randomBaseB, randomAltitude ); // Create new Trapezoid with random parameters\r\n\r\n newTrapezoid.drawFigure();\r\n\r\n break;\r\n\r\n };\r\n };\r\n }", "public interface ChartFactory extends EFactory {\r\n\t/**\r\n\t * The singleton instance of the factory.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t */\r\n\tChartFactory eINSTANCE = org.oasisopen.names.tc.opendocument.xmlns.chart.impl.ChartFactoryImpl.init();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Axis Type</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Axis Type</em>'.\r\n\t * @generated\r\n\t */\r\n\tAxisType createAxisType();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Categories Type</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Categories Type</em>'.\r\n\t * @generated\r\n\t */\r\n\tCategoriesType createCategoriesType();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Data Point Type</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Data Point Type</em>'.\r\n\t * @generated\r\n\t */\r\n\tDataPointType createDataPointType();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Document Root</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Document Root</em>'.\r\n\t * @generated\r\n\t */\r\n\tDocumentRoot createDocumentRoot();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Domain Type</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Domain Type</em>'.\r\n\t * @generated\r\n\t */\r\n\tDomainType createDomainType();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Error Indicator Type</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Error Indicator Type</em>'.\r\n\t * @generated\r\n\t */\r\n\tErrorIndicatorType createErrorIndicatorType();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Floor Type</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Floor Type</em>'.\r\n\t * @generated\r\n\t */\r\n\tFloorType createFloorType();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Footer Type</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Footer Type</em>'.\r\n\t * @generated\r\n\t */\r\n\tFooterType createFooterType();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Grid Type</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Grid Type</em>'.\r\n\t * @generated\r\n\t */\r\n\tGridType createGridType();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Legend Type</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Legend Type</em>'.\r\n\t * @generated\r\n\t */\r\n\tLegendType createLegendType();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Mean Value Type</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Mean Value Type</em>'.\r\n\t * @generated\r\n\t */\r\n\tMeanValueType createMeanValueType();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Plot Area Type</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Plot Area Type</em>'.\r\n\t * @generated\r\n\t */\r\n\tPlotAreaType createPlotAreaType();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Regression Curve Type</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Regression Curve Type</em>'.\r\n\t * @generated\r\n\t */\r\n\tRegressionCurveType createRegressionCurveType();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Series Type</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Series Type</em>'.\r\n\t * @generated\r\n\t */\r\n\tSeriesType createSeriesType();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Stock Gain Marker Type</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Stock Gain Marker Type</em>'.\r\n\t * @generated\r\n\t */\r\n\tStockGainMarkerType createStockGainMarkerType();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Stock Loss Marker Type</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Stock Loss Marker Type</em>'.\r\n\t * @generated\r\n\t */\r\n\tStockLossMarkerType createStockLossMarkerType();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Stock Range Line Type</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Stock Range Line Type</em>'.\r\n\t * @generated\r\n\t */\r\n\tStockRangeLineType createStockRangeLineType();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Subtitle Type</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Subtitle Type</em>'.\r\n\t * @generated\r\n\t */\r\n\tSubtitleType createSubtitleType();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Symbol Image Type</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Symbol Image Type</em>'.\r\n\t * @generated\r\n\t */\r\n\tSymbolImageType createSymbolImageType();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Title Type</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Title Type</em>'.\r\n\t * @generated\r\n\t */\r\n\tTitleType createTitleType();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Wall Type</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Wall Type</em>'.\r\n\t * @generated\r\n\t */\r\n\tWallType createWallType();\r\n\r\n\t/**\r\n\t * Returns the package supported by this factory.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the package supported by this factory.\r\n\t * @generated\r\n\t */\r\n\tChartPackage getChartPackage();\r\n\r\n}", "public SVCustom build(){\n if(this.disks < 1) return new SVCustom();\n SVCustom s = new SVCustom(new Point(100, (int)Math.pow(2, this.disks)*104 - 52));\n int left[] = new int[]{0,1};\n int right[] = new int[]{1,2};\n int bottom[] = new int[]{0,2};\n SierpinskiTriangle t = new SierpinskiTriangle(0,this.disks,this.disks-1, left, right, bottom, buildInitial(this.disks));\n s.setAttribute(\"font-family\", \"Arial\");\n s.addContent(t, \"Triangle\");\n return s;\n }", "@Override\n protected Fig constructFig(final String className, final String href,\n final Rectangle bounds, final Attributes attributes)\n throws SAXException {\n\n final DiagramSettings oldSettings =\n ((ArgoDiagram) getDiagram()).getDiagramSettings();\n\n Fig f = null;\n try {\n Class figClass = Class.forName(className);\n\n final Constructor[] constructors = figClass.getConstructors();\n\n // We are looking first to match with 3 different constructor\n // types. We would not expect a Fig to have any mix of these.\n // Any constructor other than these should be deprecated so we\n // look for these first.\n // Fig(DiagramEdgeSettings, DiagramSettings)\n // Fig(Object, Rectangle, DiagramSettings)\n // Fig(Rectangle, DiagramSettings)\n for (Constructor constructor : constructors) {\n Class[] parameterTypes = constructor.getParameterTypes();\n if (parameterTypes.length == 3\n && parameterTypes[0].equals(Object.class)\n && parameterTypes[1].equals(Rectangle.class)\n && parameterTypes[2].equals(DiagramSettings.class)) {\n // FigNodeModelElements should match here\n final Object parameters[] = new Object[3];\n final Object owner = getOwner(className, href);\n if (owner == null) {\n return null;\n }\n parameters[0] = owner;\n parameters[1] = bounds;\n parameters[2] = oldSettings;\n\n constructor.setAccessible(true);\n f = (Fig) constructor.newInstance(parameters);\n } else if (parameterTypes.length == 2\n && parameterTypes[0].equals(DiagramEdgeSettings.class)\n && parameterTypes[1].equals(DiagramSettings.class)) {\n // FigEdgeModelElements should match here (they have no\n // bounds)\n final Object parameters[] = new Object[2];\n final Object owner = getOwner(className, href);\n if (owner == null) {\n return null;\n }\n\n String sourceUuid = attributes.getValue(\"sourceConnector\");\n String destinationUuid = attributes\n .getValue(\"destConnector\");\n\n final Object source;\n final Object destination;\n if (sourceUuid != null && destinationUuid != null) {\n source = findOwner(sourceUuid);\n destination = findOwner(destinationUuid);\n } else {\n source = null;\n destination = null;\n }\n\n DiagramEdgeSettings newSettings = new DiagramEdgeSettings(\n owner, source, destination);\n parameters[0] = newSettings;\n parameters[1] = oldSettings;\n\n constructor.setAccessible(true);\n f = (Fig) constructor.newInstance(parameters);\n } else if (parameterTypes.length == 2\n && parameterTypes[0].equals(Rectangle.class)\n && parameterTypes[1].equals(DiagramSettings.class)) {\n // A FigNodeModelElement with no owner should match here\n // TODO: This is a temporary solution due to FigPool\n // extending\n // FigNodeModelElement when in fact it should not do so.\n Object parameters[] = new Object[2];\n parameters[0] = bounds;\n parameters[1] = oldSettings;\n\n constructor.setAccessible(true);\n f = (Fig) constructor.newInstance(parameters);\n }\n }\n if (f == null) {\n // If no Fig was created by the code above then we must go\n // look for the old style constructor that should have fallen\n // into disuse by now.\n // Fig(Object, Rectangle, DiagramSettings)\n // All of these constructors should have been deprecated\n // at least and replaced with the new signature. This is\n // here for paranoia only until all Figs have been reviewed.\n for (Constructor constructor : constructors) {\n Class[] parameterTypes = constructor.getParameterTypes();\n if (parameterTypes.length == 2\n && parameterTypes[0].equals(Object.class)\n && parameterTypes[1].equals(DiagramSettings.class)) {\n Object parameters[] = new Object[2];\n\n final Object owner = getOwner(className, href);\n // currently FigEdgeNote can be passed null\n// if (owner == null) {\n// return null;\n// }\n parameters[0] = owner;\n parameters[1] = oldSettings;\n\n constructor.setAccessible(true);\n f = (Fig) constructor.newInstance(parameters);\n LOG.log(Level.WARNING,\n \"Fig created by old style constructor \"\n + f.getClass().getName());\n break;\n }\n }\n }\n } catch (ClassNotFoundException e) {\n throw new SAXException(e);\n } catch (IllegalAccessException e) {\n throw new SAXException(e);\n } catch (InstantiationException e) {\n throw new SAXException(e);\n } catch (InvocationTargetException e) {\n throw new SAXException(e);\n }\n\n // Fall back to GEF's handling if we couldn't find an appropriate\n // constructor\n if (f == null) {\n LOG.log(Level.WARNING,\n \"No ArgoUML constructor found for \" + className\n + \" falling back to GEF's default constructors\");\n f = super.constructFig(className, href, bounds, attributes);\n }\n\n return f;\n }", "public CwmDimensionedObject createCwmDimensionedObject();", "public interface ComponentmodelFactory extends EFactory {\r\n\t/**\r\n\t * The singleton instance of the factory.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t */\r\n\tComponentmodelFactory eINSTANCE = org.reuseware.air.language.componentmodel.impl.ComponentmodelFactoryImpl.init();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Variation Point</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Variation Point</em>'.\r\n\t * @generated\r\n\t */\r\n\tVariationPoint createVariationPoint();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Composer</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Composer</em>'.\r\n\t * @generated\r\n\t */\r\n\tComposer createComposer();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Slot</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Slot</em>'.\r\n\t * @generated\r\n\t */\r\n\tSlot createSlot();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Location</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Location</em>'.\r\n\t * @generated\r\n\t */\r\n\tLocation createLocation();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Abstract Variation Point Name</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Abstract Variation Point Name</em>'.\r\n\t * @generated\r\n\t */\r\n\tAbstractVariationPointName createAbstractVariationPointName();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Variation Point Name</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Variation Point Name</em>'.\r\n\t * @generated\r\n\t */\r\n\tVariationPointName createVariationPointName();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Abstract Fragment Type</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Abstract Fragment Type</em>'.\r\n\t * @generated\r\n\t */\r\n\tAbstractFragmentType createAbstractFragmentType();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Fragment Type</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Fragment Type</em>'.\r\n\t * @generated\r\n\t */\r\n\tFragmentType createFragmentType();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Fragment Type Slot</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Fragment Type Slot</em>'.\r\n\t * @generated\r\n\t */\r\n\tFragmentTypeSlot createFragmentTypeSlot();\r\n\r\n\t/**\r\n\t * Returns the package supported by this factory.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the package supported by this factory.\r\n\t * @generated\r\n\t */\r\n\tComponentmodelPackage getComponentmodelPackage();\r\n\r\n}", "@Override\n public IComponent createRfCavityDrift(String name, double len, double freq, double mode) throws ModelException {\n try {\n Constructor<? extends IComponent> ctorElem = this.clsRfCavDriftElem.getConstructor(String.class, double.class, double.class, double.class);\n IComponent elemDrift = ctorElem.newInstance(name, len, freq, mode); \n \n return elemDrift;\n \n } catch (InstantiationException | IllegalAccessException\n | IllegalArgumentException | InvocationTargetException\n | NoSuchMethodException | SecurityException e) {\n throw new ModelException(\"Problem when instantiating RF cavity drift element\", e); \n } \n }", "public interface Csw20Factory extends EFactory {\n /**\n * The singleton instance of the factory.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n Csw20Factory eINSTANCE = net.opengis.cat.csw20.impl.Csw20FactoryImpl.init();\n\n /**\n * Returns a new object of class '<em>Acknowledgement Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Acknowledgement Type</em>'.\n * @generated\n */\n AcknowledgementType createAcknowledgementType();\n\n /**\n * Returns a new object of class '<em>Brief Record Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Brief Record Type</em>'.\n * @generated\n */\n BriefRecordType createBriefRecordType();\n\n /**\n * Returns a new object of class '<em>Capabilities Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Capabilities Type</em>'.\n * @generated\n */\n CapabilitiesType createCapabilitiesType();\n\n /**\n * Returns a new object of class '<em>Conceptual Scheme Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Conceptual Scheme Type</em>'.\n * @generated\n */\n ConceptualSchemeType createConceptualSchemeType();\n\n /**\n * Returns a new object of class '<em>Delete Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Delete Type</em>'.\n * @generated\n */\n DeleteType createDeleteType();\n\n /**\n * Returns a new object of class '<em>Describe Record Response Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Describe Record Response Type</em>'.\n * @generated\n */\n DescribeRecordResponseType createDescribeRecordResponseType();\n\n /**\n * Returns a new object of class '<em>Describe Record Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Describe Record Type</em>'.\n * @generated\n */\n DescribeRecordType createDescribeRecordType();\n\n /**\n * Returns a new object of class '<em>Distributed Search Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Distributed Search Type</em>'.\n * @generated\n */\n DistributedSearchType createDistributedSearchType();\n\n /**\n * Returns a new object of class '<em>Domain Values Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Domain Values Type</em>'.\n * @generated\n */\n DomainValuesType createDomainValuesType();\n\n /**\n * Returns a new object of class '<em>Echoed Request Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Echoed Request Type</em>'.\n * @generated\n */\n EchoedRequestType createEchoedRequestType();\n\n /**\n * Returns a new object of class '<em>Element Set Name Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Element Set Name Type</em>'.\n * @generated\n */\n ElementSetNameType createElementSetNameType();\n\n /**\n * Returns a new object of class '<em>Empty Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Empty Type</em>'.\n * @generated\n */\n EmptyType createEmptyType();\n\n /**\n * Returns a new object of class '<em>Get Capabilities Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Get Capabilities Type</em>'.\n * @generated\n */\n GetCapabilitiesType createGetCapabilitiesType();\n\n /**\n * Returns a new object of class '<em>Get Domain Response Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Get Domain Response Type</em>'.\n * @generated\n */\n GetDomainResponseType createGetDomainResponseType();\n\n /**\n * Returns a new object of class '<em>Get Domain Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Get Domain Type</em>'.\n * @generated\n */\n GetDomainType createGetDomainType();\n\n /**\n * Returns a new object of class '<em>Get Record By Id Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Get Record By Id Type</em>'.\n * @generated\n */\n GetRecordByIdType createGetRecordByIdType();\n\n /**\n * Returns a new object of class '<em>Get Records Response Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Get Records Response Type</em>'.\n * @generated\n */\n GetRecordsResponseType createGetRecordsResponseType();\n\n /**\n * Returns a new object of class '<em>Get Records Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Get Records Type</em>'.\n * @generated\n */\n GetRecordsType createGetRecordsType();\n\n /**\n * Returns a new object of class '<em>Harvest Response Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Harvest Response Type</em>'.\n * @generated\n */\n HarvestResponseType createHarvestResponseType();\n\n /**\n * Returns a new object of class '<em>Harvest Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Harvest Type</em>'.\n * @generated\n */\n HarvestType createHarvestType();\n\n /**\n * Returns a new object of class '<em>Insert Result Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Insert Result Type</em>'.\n * @generated\n */\n InsertResultType createInsertResultType();\n\n /**\n * Returns a new object of class '<em>Insert Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Insert Type</em>'.\n * @generated\n */\n InsertType createInsertType();\n\n /**\n * Returns a new object of class '<em>List Of Values Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>List Of Values Type</em>'.\n * @generated\n */\n ListOfValuesType createListOfValuesType();\n\n /**\n * Returns a new object of class '<em>Query Constraint Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Query Constraint Type</em>'.\n * @generated\n */\n QueryConstraintType createQueryConstraintType();\n\n /**\n * Returns a new object of class '<em>Query Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Query Type</em>'.\n * @generated\n */\n QueryType createQueryType();\n\n /**\n * Returns a new object of class '<em>Range Of Values Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Range Of Values Type</em>'.\n * @generated\n */\n RangeOfValuesType createRangeOfValuesType();\n\n /**\n * Returns a new object of class '<em>Record Property Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Record Property Type</em>'.\n * @generated\n */\n RecordPropertyType createRecordPropertyType();\n\n /**\n * Returns a new object of class '<em>Request Status Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Request Status Type</em>'.\n * @generated\n */\n RequestStatusType createRequestStatusType();\n\n /**\n * Returns a new object of class '<em>Schema Component Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Schema Component Type</em>'.\n * @generated\n */\n SchemaComponentType createSchemaComponentType();\n\n /**\n * Returns a new object of class '<em>Search Results Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Search Results Type</em>'.\n * @generated\n */\n SearchResultsType createSearchResultsType();\n\n /**\n * Returns a new object of class '<em>Transaction Response Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Transaction Response Type</em>'.\n * @generated\n */\n TransactionResponseType createTransactionResponseType();\n\n /**\n * Returns a new object of class '<em>Transaction Summary Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Transaction Summary Type</em>'.\n * @generated\n */\n TransactionSummaryType createTransactionSummaryType();\n\n /**\n * Returns a new object of class '<em>Transaction Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Transaction Type</em>'.\n * @generated\n */\n TransactionType createTransactionType();\n\n /**\n * Returns a new object of class '<em>Update Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Update Type</em>'.\n * @generated\n */\n UpdateType createUpdateType();\n\n /**\n * Returns a new object of class '<em>DCMI Record Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>DCMI Record Type</em>'.\n * @generated\n */\n DCMIRecordType createDCMIRecordType();\n\n /**\n * Returns a new object of class '<em>Record Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Record Type</em>'.\n * @generated\n */\n RecordType createRecordType();\n\n /**\n * Returns a new object of class '<em>Simple Literal</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Simple Literal</em>'.\n * @generated\n */\n SimpleLiteral createSimpleLiteral();\n\n /**\n * Returns a new object of class '<em>Summary Record Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Summary Record Type</em>'.\n * @generated\n */\n SummaryRecordType createSummaryRecordType();\n\n /**\n * Returns the package supported by this factory.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the package supported by this factory.\n * @generated\n */\n Csw20Package getCsw20Package();\n\n}", "public interface HiphopsFactory extends EFactory {\r\n\t/**\r\n\t * The singleton instance of the factory.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t */\r\n\tHiphopsFactory eINSTANCE = hiphops.impl.HiphopsFactoryImpl.init();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Model</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Model</em>'.\r\n\t * @generated\r\n\t */\r\n\tModel createModel();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>System</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>System</em>'.\r\n\t * @generated\r\n\t */\r\n\tSystem createSystem();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Component</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Component</em>'.\r\n\t * @generated\r\n\t */\r\n\tComponent createComponent();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Port</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Port</em>'.\r\n\t * @generated\r\n\t */\r\n\tPort createPort();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Implementation</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Implementation</em>'.\r\n\t * @generated\r\n\t */\r\n\tImplementation createImplementation();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>FData</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>FData</em>'.\r\n\t * @generated\r\n\t */\r\n\tFData createFData();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Output Deviation</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Output Deviation</em>'.\r\n\t * @generated\r\n\t */\r\n\tOutputDeviation createOutputDeviation();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Output Deviations</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Output Deviations</em>'.\r\n\t * @generated\r\n\t */\r\n\tOutputDeviations createOutputDeviations();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Basic Event</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Basic Event</em>'.\r\n\t * @generated\r\n\t */\r\n\tBasicEvent createBasicEvent();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Basic Events</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Basic Events</em>'.\r\n\t * @generated\r\n\t */\r\n\tBasicEvents createBasicEvents();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Named Class</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Named Class</em>'.\r\n\t * @generated\r\n\t */\r\n\tNamedClass createNamedClass();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Line</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Line</em>'.\r\n\t * @generated\r\n\t */\r\n\tLine createLine();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Described Class</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Described Class</em>'.\r\n\t * @generated\r\n\t */\r\n\tDescribedClass createDescribedClass();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Alloc Alternative</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Alloc Alternative</em>'.\r\n\t * @generated\r\n\t */\r\n\tAllocAlternative createAllocAlternative();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Hazard</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Hazard</em>'.\r\n\t * @generated\r\n\t */\r\n\tHazard createHazard();\r\n\r\n\t/**\r\n\t * Returns the package supported by this factory.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the package supported by this factory.\r\n\t * @generated\r\n\t */\r\n\tHiphopsPackage getHiphopsPackage();\r\n\r\n}", "public XSSFPatternFormatting createPatternFormatting(){\n CTDxf dxf = getDxf(true);\n CTFill fill;\n if(!dxf.isSetFill()) {\n fill = dxf.addNewFill();\n } else {\n fill = dxf.getFill();\n }\n\n return new XSSFPatternFormatting(fill, _sh.getWorkbook().getStylesSource().getIndexedColors());\n }", "public SlabReinforcement(List<Integer> topDiameters,\n List<Integer> additionalTopDiameters,\n List<Integer> topSpacings,\n List<Integer> topVerticalSpacings,\n List<Integer> bottomDiameters,\n List<Integer> additionalBottomDiameters,\n List<Integer> bottomSpacings,\n List<Integer> bottomVerticalSpacings,\n DesignParameters designParameters,\n SlabStrip slabStrip,\n GraphicsContext graphicsContext,\n Color colour,\n double slabImageScale\n ) {\n this.topDiameters = topDiameters;\n this.additionalTopDiameters = additionalTopDiameters;\n this.topSpacings = topSpacings;\n this.topVerticalSpacings = topVerticalSpacings;\n this.bottomDiameters = bottomDiameters;\n this.additionalBottomDiameters = additionalBottomDiameters;\n this.bottomSpacings = bottomSpacings;\n this.bottomVerticalSpacings = bottomVerticalSpacings;\n this.designParameters = designParameters;\n this.slabStrip = slabStrip;\n this.graphicsContext = graphicsContext;\n this.colour = colour;\n this.slabImageScale = slabImageScale;\n }", "public ArrayList<Fact> createFacts (MAcctSchema as)\r\n\t{\r\n\t\t// create Fact Header\r\n\t\tFact fact = new Fact(this, as, Fact.POST_Actual);\r\n\t\tsetC_Currency_ID (as.getC_Currency_ID());\r\n\r\n\t\t// Line pointer\r\n\t\tFactLine fl = null;\r\n\t\tX_M_Production prod = (X_M_Production)getPO();\r\n\t\tHashMap<String, BigDecimal> costMap = new HashMap<String, BigDecimal>();\r\n\r\n\t\tfor (int i = 0; i < p_lines.length; i++)\r\n\t\t{\r\n\t\t\tDocLine line = p_lines[i];\r\n\t\t\t//\tCalculate Costs\r\n\t\t\tBigDecimal costs = BigDecimal.ZERO;\r\n\t\t\t\r\n\t\t\tX_M_ProductionLine prodline = (X_M_ProductionLine)line.getPO();\r\n\t\t\tMProductionLineMA mas[] = MProductionLineMA.get(getCtx(), prodline.get_ID(), getTrxName());\r\n\t\t\tMProduct product = (MProduct) prodline.getM_Product();\r\n\t\t\tString CostingLevel = product.getCostingLevel(as);\r\n\r\n\t\t\tif (MAcctSchema.COSTINGLEVEL_BatchLot.equals(CostingLevel) ) \r\n\t\t\t{\r\n\t\t\t\tif (line.getM_AttributeSetInstance_ID() == 0 && (mas!=null && mas.length> 0 )) \r\n\t\t\t\t{\r\n\t\t\t\t\tfor (int j = 0; j < mas.length; j++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tMProductionLineMA ma = mas[j];\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tMCostDetail cd = MCostDetail.get (as.getCtx(), \"M_ProductionLine_ID=?\",\r\n\t\t\t\t\t\t\t\tline.get_ID(), ma.getM_AttributeSetInstance_ID(), as.getC_AcctSchema_ID(), getTrxName());\t\r\n\t\t\t\t\t\tif (cd != null)\r\n\t\t\t\t\t\t\tcosts = costs.add(cd.getAmt());\t\r\n\t\t\t\t\t\telse \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tProductCost pc = line.getProductCost();\r\n\t\t\t\t\t\t\tpc.setQty(ma.getMovementQty());\r\n\t\t\t\t\t\t\tpc.setM_M_AttributeSetInstance_ID(ma.getM_AttributeSetInstance_ID());\r\n\t\t\t\t\t\t\tcosts = costs.add(line.getProductCosts(as, line.getAD_Org_ID(), false));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcostMap.put(line.get_ID()+ \"_\"+ ma.getM_AttributeSetInstance_ID(), costs);\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{\r\n\t\t\t\t\tMCostDetail cd = MCostDetail.get (as.getCtx(), \"M_ProductionLine_ID=?\",\r\n\t\t\t\t\t\t\tline.get_ID(), line.getM_AttributeSetInstance_ID(), as.getC_AcctSchema_ID(), getTrxName());\r\n\t\t\t\t\tif (cd != null) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcosts = cd.getAmt();\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\tcosts = line.getProductCosts(as, line.getAD_Org_ID(), false);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcostMap.put(line.get_ID()+ \"_\"+ line.getM_AttributeSetInstance_ID(), costs);\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t} \r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\r\n\t\t\t\t// MZ Goodwill\r\n\t\t\t\t// if Production CostDetail exist then get Cost from Cost Detail\r\n\t\t\t\tMCostDetail cd = MCostDetail.get (as.getCtx(), \"M_ProductionLine_ID=?\",\r\n\t\t\t\t\t\tline.get_ID(), line.getM_AttributeSetInstance_ID(), as.getC_AcctSchema_ID(), getTrxName());\r\n\t\t\t\tif (cd != null) \r\n\t\t\t\t{\r\n\t\t\t\t\tcosts = cd.getAmt();\r\n\t\t\t\t} \r\n\t\t\t\telse \r\n\t\t\t\t{\r\n\t\t\t\t\tint ProductLabor_ID = MSysConfig.getIntValue(\"PRODUCT_LABOR\", -1, prod.getAD_Client_ID());\r\n\t\t\t\t\tBigDecimal laborPrice = (BigDecimal) prod.get_Value (\"PriceEntered\");\r\n\t\t\t\t\t//\r\n\t\t\t\t\tif (ProductLabor_ID > 0 \r\n\t\t\t\t\t\t\t&& line.getM_Product_ID() == ProductLabor_ID\r\n\t\t\t\t\t\t\t&& laborPrice != null && laborPrice.signum() == 1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcosts = laborPrice.multiply(prod.getProductionQty().negate());\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\tcosts = line.getProductCosts(as, line.getAD_Org_ID(), false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcostMap.put(line.get_ID()+ \"_\"+ line.getM_AttributeSetInstance_ID(), costs);\r\n\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tBigDecimal bomCost = Env.ZERO;\t\r\n\t\t\tBigDecimal qtyProduced = null;\r\n\t\t\tif (line.isProductionBOM())\r\n\t\t\t{\r\n\t\t\t\tX_M_ProductionLine endProLine = (X_M_ProductionLine)line.getPO();\r\n\t\t\t\tObject parentEndPro = prod.isUseProductionPlan()?endProLine.getM_ProductionPlan_ID():endProLine.getM_Production_ID();\r\n\t\t\t\t\r\n\t\t\t\t//\tGet BOM Cost - Sum of individual lines\t\t\t\t\r\n\t\t\t\tfor (int ii = 0; ii < p_lines.length; ii++)\r\n\t\t\t\t{\r\n\t\t\t\t\tDocLine line0 = p_lines[ii];\r\n\t\t\t\t\tX_M_ProductionLine bomProLine = (X_M_ProductionLine)line0.getPO();\r\n\t\t\t\t\tObject parentBomPro = prod.isUseProductionPlan()?bomProLine.getM_ProductionPlan_ID():bomProLine.getM_Production_ID();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!parentBomPro.equals(parentEndPro))\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tif (!line0.isProductionBOM()) {\r\n\t\t\t\t\t\tMProduct product0 = (MProduct) bomProLine.getM_Product();\r\n\t\t\t\t\t\tString CostingLevel0 = product0.getCostingLevel(as);\r\n\t\t\t\t\t\tif (MAcctSchema.COSTINGLEVEL_BatchLot.equals(CostingLevel0) )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (bomProLine.getM_AttributeSetInstance_ID() == 0 ) \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tMProductionLineMA bomLineMA[] = MProductionLineMA.get(getCtx(), line0.get_ID(), getTrxName());\r\n\t\t\t\t\t\t\t\tif (bomLineMA!=null && bomLineMA.length> 0 )\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t // get cost of children for batch costing level (auto generate)\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tBigDecimal costs0 = BigDecimal.ZERO ;\r\n\t\t\t\t\t\t\t\t\tfor (int j = 0; j < bomLineMA.length; j++)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tBigDecimal maCost = BigDecimal.ZERO ;\r\n\t\t\t\t\t\t\t\t\t\tMProductionLineMA ma = bomLineMA[j];\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t// get cost of children\r\n\t\t\t\t\t\t\t\t\t\tMCostDetail cd0 = MCostDetail.get (as.getCtx(), \"M_ProductionLine_ID=?\",\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\tline0.get_ID(), ma.getM_AttributeSetInstance_ID(), as.getC_AcctSchema_ID(), getTrxName());\r\n\t\t\t\t\t\t\t\t\t\tif (cd0 != null) \r\n\t\t\t\t\t\t\t\t\t\t\tmaCost = cd0.getAmt();\r\n\t\t\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tProductCost pc = line0.getProductCost();\r\n\t\t\t\t\t\t\t\t\t\t\tpc.setQty(ma.getMovementQty());\r\n\t\t\t\t\t\t\t\t\t\t\tpc.setM_M_AttributeSetInstance_ID(ma.getM_AttributeSetInstance_ID());\r\n\t\t\t\t\t\t\t\t\t\t\tmaCost = line0.getProductCosts(as, line0.getAD_Org_ID(), false);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tcostMap.put(line0.get_ID()+ \"_\"+ ma.getM_AttributeSetInstance_ID(),maCost);\r\n\t\t\t\t\t\t\t\t\t\tcosts0 = costs0.add(maCost);\r\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tbomCost = bomCost.add(costs0.setScale(2,RoundingMode.HALF_UP));\r\n\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\tp_Error = \"Failed to post - No Attribute Set for line\";\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// get cost of children for batch costing level \r\n\t\t\t\t\t\t\t\tMCostDetail cd0 = MCostDetail.get (as.getCtx(), \"M_ProductionLine_ID=?\",\r\n\t\t\t\t\t\t\t\t\t\tline0.get_ID(), line0.getM_AttributeSetInstance_ID(), as.getC_AcctSchema_ID(), getTrxName());\r\n\t\t\t\t\t\t\t\tBigDecimal costs0;\r\n\t\t\t\t\t\t\t\tif (cd0 != null) \r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tcosts0 = cd0.getAmt();\r\n\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tcosts0 = line0.getProductCosts(as, line0.getAD_Org_ID(), false);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tcostMap.put(line0.get_ID()+ \"_\"+ line0.getM_AttributeSetInstance_ID(),costs0);\r\n\t\t\t\t\t\t\t\tbomCost = bomCost.add(costs0.setScale(2,RoundingMode.HALF_UP));\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} \r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t// get cost of children\r\n\t\t\t\t\t\t\tMCostDetail cd0 = MCostDetail.get (as.getCtx(), \"M_ProductionLine_ID=?\",\r\n\t\t\t\t\t\t\t\t\tline0.get_ID(), line0.getM_AttributeSetInstance_ID(), as.getC_AcctSchema_ID(), getTrxName());\r\n\t\t\t\t\t\t\tBigDecimal costs0;\r\n\t\t\t\t\t\t\tif (cd0 != null) \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tcosts0 = cd0.getAmt();\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\tint ProductLabor_ID = MSysConfig.getIntValue(\"PRODUCT_LABOR\", -1, prod.getAD_Client_ID());\r\n\t\t\t\t\t\t\t\tBigDecimal laborPrice = (BigDecimal) prod.get_Value (\"PriceEntered\");\r\n\t\t\t\t\t\t\t\t//\r\n\t\t\t\t\t\t\t\tif (ProductLabor_ID > 0 \r\n\t\t\t\t\t\t\t\t\t\t&& line0.getM_Product_ID() == ProductLabor_ID\r\n\t\t\t\t\t\t\t\t\t\t&& laborPrice != null && laborPrice.signum() == 1)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tcosts0 = laborPrice.multiply(prod.getProductionQty().negate());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tcosts0 = line.getProductCosts(as, line0.getAD_Org_ID(), false);\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\tcostMap.put(line0.get_ID()+ \"_\"+ line0.getM_AttributeSetInstance_ID(),costs0);\r\n\t\t\t\t\t\t\tbomCost = bomCost.add(costs0.setScale(2,RoundingMode.HALF_UP));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tqtyProduced = manipulateQtyProduced (mQtyProduced, endProLine, prod.isUseProductionPlan(), null);\r\n\t\t\t\tif (line.getQty().compareTo(qtyProduced) != 0) \r\n\t\t\t\t{\r\n\t\t\t\t\tBigDecimal factor = line.getQty().divide(qtyProduced, 12, RoundingMode.HALF_UP);\r\n\t\t\t\t\tbomCost = bomCost.multiply(factor).setScale(2,RoundingMode.HALF_UP);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (MAcctSchema.COSTINGLEVEL_BatchLot.equals(CostingLevel))\r\n\t\t\t\t{\r\n\t\t\t\t\t//post roll-up \r\n\t\t\t\t\tfl = fact.createLine(line, \r\n\t\t\t\t\t\t\tline.getAccount(ProductCost.ACCTTYPE_P_Asset, as),\r\n\t\t\t\t\t\t\tas.getC_Currency_ID(), bomCost.negate()); \r\n\t\t\t\t\tif (fl == null) \r\n\t\t\t\t\t{ \r\n\t\t\t\t\t\tp_Error = \"Couldn't post roll-up \" + line.getLine() + \" - \" + line; \r\n\t\t\t\t\t\treturn null; \r\n\t\t\t\t\t}\r\n\t\t\t\t\tfl.setQty(qtyProduced);\t\t\t\t\r\n\t\t\t\t} \r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tint precision = as.getStdPrecision();\r\n\t\t\t\t\tBigDecimal variance = (costs.setScale(precision, RoundingMode.HALF_UP)).subtract(bomCost.negate());\r\n\t\t\t\t\t// only post variance if it's not zero \r\n\t\t\t\t\tif (variance.signum() != 0) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//post variance \r\n//\t\t\t\t\t\tfl = fact.createLine(line, \r\n//\t\t\t\t\t\t\t\tline.getAccount(ProductCost.ACCTTYPE_P_RateVariance, as),\r\n//\t\t\t\t\t\t\t\tas.getC_Currency_ID(), variance.negate()); \r\n//\t\t\t\t\t\tif (fl == null) \r\n//\t\t\t\t\t\t{ \r\n//\t\t\t\t\t\t\tp_Error = \"Couldn't post variance \" + line.getLine() + \" - \" + line; \r\n//\t\t\t\t\t\t\treturn null; \r\n//\t\t\t\t\t\t}\r\n//\t\t\t\t\t\tfl.setQty(Env.ZERO);\r\n\t\t\t\t\t\tcosts = costs.add(variance.negate());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// end MZ\r\n\r\n\t\t\t// Inventory DR CR\r\n\t\t\tif (!(line.isProductionBOM() && MAcctSchema.COSTINGLEVEL_BatchLot.equals(CostingLevel)))\r\n\t\t\t{\r\n\t\t\t\tfl = fact.createLine(line,\r\n\t\t\t\t\tline.getAccount(ProductCost.ACCTTYPE_P_Asset, as),\r\n\t\t\t\t\tas.getC_Currency_ID(), costs);\r\n\t\t\t\tif (fl == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tp_Error = \"No Costs for Line \" + line.getLine() + \" - \" + line;\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\tfl.setM_Locator_ID(line.getM_Locator_ID());\r\n\t\t\t\tfl.setQty(line.getQty());\r\n\t\t\t}\r\n\r\n\t\t\t//\tCost Detail\r\n\t\t\tString description = line.getDescription();\r\n\t\t\tif (description == null)\r\n\t\t\t\tdescription = \"\";\r\n\t\t\tif (line.isProductionBOM())\r\n\t\t\t\tdescription += \"(*)\";\r\n\t\t\tif (MAcctSchema.COSTINGLEVEL_BatchLot.equals(CostingLevel)) \r\n\t\t\t{\r\n\t\t\t\tif (line.isProductionBOM())\r\n\t\t\t\t{\r\n\t\t\t\t\tif (!MCostDetail.createProduction(as, line.getAD_Org_ID(),\r\n\t\t\t\t\t\t\tline.getM_Product_ID(), line.getM_AttributeSetInstance_ID(),\r\n\t\t\t\t\t\t\tline.get_ID(), 0,\r\n\t\t\t\t\t\t\tbomCost.negate(), qtyProduced,\r\n\t\t\t\t\t\t\tdescription, getTrxName()))\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t p_Error = \"Failed to create cost detail record\";\r\n\t\t\t\t\t\t return null;\r\n\t\t\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\telse if (line.getM_AttributeSetInstance_ID() == 0 && (mas!=null && mas.length> 0 ))\r\n\t\t\t\t{\r\n\t\t\t\t\t for (int j = 0; j < mas.length; j++)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\tMProductionLineMA ma = mas[j];\r\n\t\t\t\t\t\tBigDecimal maCost = costMap.get(line.get_ID()+ \"_\"+ ma.getM_AttributeSetInstance_ID());\t\t\r\n\t\t\t\t\t\tif (!MCostDetail.createProduction(as, line.getAD_Org_ID(),\r\n\t\t\t\t\t\t\t\tline.getM_Product_ID(), ma.getM_AttributeSetInstance_ID(),\r\n\t\t\t\t\t\t\t\tline.get_ID(), 0,\r\n\t\t\t\t\t\t\t\tmaCost, ma.getMovementQty(),\r\n\t\t\t\t\t\t\t\tdescription, getTrxName()))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tp_Error = \"Failed to create cost detail record\";\r\n\t\t\t\t\t\t\treturn null;\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 else\r\n\t\t\t\t {\r\n\t\t\t\t\t \r\n\t\t\t\t\t if (!MCostDetail.createProduction(as, line.getAD_Org_ID(),\r\n\t\t\t\t\t\t\tline.getM_Product_ID(), line.getM_AttributeSetInstance_ID(),\r\n\t\t\t\t\t\t\tline.get_ID(), 0,\r\n\t\t\t\t\t\t\tcosts, line.getQty(),\r\n\t\t\t\t\t\t\tdescription, getTrxName()))\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t p_Error = \"Failed to create cost detail record\";\r\n\t\t\t\t\t\t return null;\r\n\t\t\t\t\t } \r\n\t\t\t\t }\r\n\t\t\t} \r\n\t\t\telse\r\n\t\t\t{\t\t\t \r\n\t\t\t\tif (!MCostDetail.createProduction(as, line.getAD_Org_ID(),\r\n\t\t\t\t\tline.getM_Product_ID(), line.getM_AttributeSetInstance_ID(),\r\n\t\t\t\t\tline.get_ID(), 0,\r\n\t\t\t\t\tcosts, line.getQty(),\r\n\t\t\t\t\tdescription, getTrxName()))\r\n\t\t\t\t{\r\n\t\t\t\t\tp_Error = \"Failed to create cost detail record\";\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//\r\n\t\tArrayList<Fact> facts = new ArrayList<Fact>();\r\n\t\tfacts.add(fact);\r\n\t\treturn facts;\r\n\t}", "public abstract void generateFeatureVector(Factor<Scope> f);", "public NewShape() {\r\n\t\tsuper();\r\n\t}", "public SoccerField(double x, double y, double width, double length)\n {\n\t// construct the basic field shell\n\tsuper(x,y,width,length);\n\t\n\t// get the GeneralPath that we are going to append stuff to\n\tGeneralPath gp = this.get();\n\n\t//make soccer field with Areas, halfmoons(arcs), penalty dots, and a center circle with center dot\n\n\t//CIRCLES\n\n\tdouble diameterC = length*.01;\n\tdouble diameter = length*.1;\n\tdouble radius = diameter/2.0;\n\t\n\tEllipse2D.Double centerCircle =\n\t new Ellipse2D.Double(x+width*.425, y + length*.45, diameter, diameter);\n\t\n\tEllipse2D.Double center=\n\t new Ellipse2D.Double(x+width*.4925, y + length*.495, diameterC, diameterC);\n\n\tEllipse2D.Double penaltyA= new Ellipse2D.Double(x+width*.4925, y + length*.10, diameterC, diameterC);\n\t\n\t\tEllipse2D.Double penaltyB= new Ellipse2D.Double(x+width*.4925, y + length*.90, diameterC, diameterC);\n\n\n\t\t\n \t//AREAS\n\tdouble smallW = width * .20;\n\tdouble smallL = length * .05;\n\tdouble bigL = length * .15;\n\tdouble bigW = width * .40;\n\t\n\t \n\t\n\tRectangle2D.Double smallAreaA =\n\t new Rectangle2D.Double(x + width*.4, y,smallW ,smallL );\n\tRectangle2D.Double bigAreaA =\n\t new Rectangle2D.Double(x + width *.3, y, bigW, bigL);\n\tRectangle2D.Double smallAreaB =\n\t new Rectangle2D.Double(x+width*.4, y+length*.95, smallW, smallL);\n\tRectangle2D.Double bigAreaB =\n\t new Rectangle2D.Double(x+width*.3, y+length*.85 , bigW, bigL);\n\n \t//ARCS\n\t//halfmoon and penalty point \n\n\tArc2D.Double halfMoonA =\n\t new Arc2D.Double (x+width*.425, y + length*.13, diameter, radius, 0,-180, Arc2D.OPEN);\n\tArc2D.Double halfMoonB =\n\t new Arc2D.Double (x+width*.425, y+length*.82, diameter, radius, 0, 180, Arc2D.OPEN);\n\n\n\t\n\t//create the full field adding everything together\n GeneralPath fullField = this.get();\n fullField.append(smallAreaA, false);\n\tfullField.append(bigAreaA, false);\n\tfullField.append(smallAreaB, false);\n\tfullField.append(bigAreaB, false);\n\tfullField.append(centerCircle, false);\n\tfullField.append(halfMoonA, false);\n\tfullField.append(halfMoonB, false);\n\tfullField.append(center, false);\n\tfullField.append(penaltyA, false);\n\tfullField.append(penaltyB, false);\n }", "private Rule createRule(Color outlineColor, Color fillColor) {\n Symbolizer symbolizer = null;\n Fill fill = null;\n Stroke stroke = sf.createStroke(ff.literal(outlineColor), ff.literal(LINE_WIDTH));\n\n switch (geometryType) {\n case POLYGON:\n fill = sf.createFill(ff.literal(fillColor), ff.literal(OPACITY));\n symbolizer = sf.createPolygonSymbolizer(stroke, fill, geometryAttributeName);\n break;\n\n case LINE:\n symbolizer = sf.createLineSymbolizer(stroke, geometryAttributeName);\n break;\n\n case POINT:\n fill = sf.createFill(ff.literal(fillColor), ff.literal(OPACITY));\n\n Mark mark = sf.getCircleMark();\n mark.setFill(fill);\n mark.setStroke(stroke);\n\n Graphic graphic = sf.createDefaultGraphic();\n graphic.graphicalSymbols().clear();\n graphic.graphicalSymbols().add(mark);\n graphic.setSize(ff.literal(POINT_SIZE));\n\n symbolizer = sf.createPointSymbolizer(graphic, geometryAttributeName);\n }\n\n Rule rule = sf.createRule();\n rule.symbolizers().add(symbolizer);\n return rule;\n}", "private void createShape() {\n if (shape == null) {\n float firstItemMargin = noxConfig.getNoxItemMargin();\n float firstItemSize = noxConfig.getNoxItemSize();\n int viewHeight = getMeasuredHeight();\n int viewWidth = getMeasuredWidth();\n int numberOfElements = noxItemCatalog.size();\n ShapeConfig shapeConfig =\n new ShapeConfig(numberOfElements, viewWidth, viewHeight, firstItemSize, firstItemMargin);\n shape = ShapeFactory.getShapeByKey(defaultShapeKey, shapeConfig);\n } else {\n shape.setNumberOfElements(noxItemCatalog.size());\n }\n shape.calculate();\n }", "public static void main(String [] args){\n ShapeFactory sf = new ShapeFactory();\n\n //Get the shape of desire by passing the type parameter\n Shape circle = sf.getShape(\"CIRCLE\");\n\n //call the draw method on circle.\n circle.draw();\n\n Shape square = sf.getShape(\"SQUARE\");\n //call the draw method on Square.\n square.draw();\n\n Shape rectangle = sf.getShape(\"RECTANGLE\");\n //call the draw method on rectangle.\n rectangle.draw();\n }", "OurIFC createOurIFC();", "BasicScalingType createBasicScalingType();", "LegendType createLegendType();", "@DISPID(1610940424) //= 0x60050008. The runtime will prefer the VTID if present\n @VTID(30)\n Factory sheetMetalFactory();", "public void constructDrawing(){\r\n\r\n resetToEmpty(); // should be empty anyway\r\n\r\n// universe=TFormula.atomicTermsInListOfFormulas(fInterpretation);\r\n \r\n Set <String> universeStrSet=TFormula.atomicTermsInListOfFormulas(fInterpretation);\r\n \r\n universe=\"\";\r\n \r\n for (Iterator i=universeStrSet.iterator();i.hasNext();)\r\n \tuniverse+=i.next();\r\n \r\n\r\n findPropertyExtensions();\r\n\r\n findRelationsExtensions();\r\n\r\n determineLines();\r\n\r\n createProperties();\r\n\r\n createIndividuals();\r\n\r\n createRelations();\r\n\r\n deselect(); //all shapes are created selected\r\n\r\n\r\n fPalette.check(); // some of the names may need updating\r\n\r\n repaint();\r\n\r\n}", "Dimension_hauteur createDimension_hauteur();", "public interface ShapeFactory{\n Line createLine();\n Rectangle createRectangle();\n Circle createCircle();\n Polygon createPolygon();\n}", "Shape createShape(BorderType borderType);", "abstract T newSplinePath2D();", "public void makeShape( int choice, int shadingType ) {\n \tif(choice == 0 || choice == 1 || choice == 4 ) {\n \t\tmakeSphere(1.0f, 72, 72);\n \t}\n \telse if (choice == 2 || choice == 5 ){\n \t\tmakeSatellite(1.0f, 72, 72);\n \t\t\n \t}\n \t\n \telse if(choice == 3) {\n \t\tmakeSphere(1.0f, 72, 72);\n \t}\n \t\n \telse if (choice == 6) {\n \t\tmakeCone(1.0f, 20, 20);\n \t}\n }", "public Square(Point start, Point end, Boolean fill){ //constructor for class Rectangle\r\n this.origin = start;\r\n this.start = start;\r\n this.end = end;\r\n this.fill = fill;\r\n }", "@Override\n\tpublic void generarFactura() {\n\t\t\n\t}", "public boolean testFillstyles(EIfcfillareastyle type) throws SdaiException;", "public interface Quality_requirements_metamodelFactory extends EFactory {\n\t/**\n\t * The singleton instance of the factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tQuality_requirements_metamodelFactory eINSTANCE = quality_requirements_metamodel.impl.Quality_requirements_metamodelFactoryImpl.init();\n\n\t/**\n\t * Returns a new object of class '<em>Quality Scenario</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Quality Scenario</em>'.\n\t * @generated\n\t */\n\tQualityScenario createQualityScenario();\n\n\t/**\n\t * Returns a new object of class '<em>Architecture</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Architecture</em>'.\n\t * @generated\n\t */\n\tArchitecture createArchitecture();\n\n\t/**\n\t * Returns a new object of class '<em>Dashboard</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Dashboard</em>'.\n\t * @generated\n\t */\n\tDashboard createDashboard();\n\n\t/**\n\t * Returns a new object of class '<em>Stimulus</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Stimulus</em>'.\n\t * @generated\n\t */\n\tStimulus createStimulus();\n\n\t/**\n\t * Returns a new object of class '<em>Response Metric</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Response Metric</em>'.\n\t * @generated\n\t */\n\tResponseMetric createResponseMetric();\n\n\t/**\n\t * Returns the package supported by this factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the package supported by this factory.\n\t * @generated\n\t */\n\tQuality_requirements_metamodelPackage getQuality_requirements_metamodelPackage();\n\n}", "ShipmentBoxType createShipmentBoxType();", "public void create()\n/* 342: */ {\n/* 343:422 */ setupPlainVariables_xjal();\n/* 344: */ \n/* 345:424 */ this.presentation = new ShapeTopLevelPresentationGroup(this, true, 0.0D, 0.0D, 0.0D, 0.0D, new Object[0]);\n/* 346:425 */ this.icon = new ShapeGroup(this, true, 0.0D, 0.0D, 0.0D, new Object[0]);\n/* 347: */ \n/* 348: */ \n/* 349:428 */ assignInitialConditions_xjal();\n/* 350:429 */ onCreate();\n/* 351: */ }", "public void fillShape(Shape shape);", "public void generate() {\n\t\t\n\t\t// For this system, there are two particles per cell:\n\t\tint nc = size[0][0]*size[0][1]*size[0][2];\n\t\tn = 3*nc;\n\t\t\n\t\t// The AB2 Lattice:\n\t\tAB2Lattice ab2 = new AB2Lattice();\n\t\tab2.setSizeInCells(size[0][0],size[0][1],size[0][2]);\n\t\t\n\t\t// Stick them in the latt member:\n\t\tlatt = new VectorD3[2][];\n\t\tlatt[0] = new VectorD3[n];\t\t\n\t\tSystem.arraycopy(ab2.getLattice(0),0,latt[0], 0, nc);\n\t\tSystem.arraycopy(ab2.getLattice(1),0,latt[0], nc, 2*nc);\n\t\tlatt_name[0] = \"AB2\";\n\t\tab2.saveAsWRL(\"initAB2\");\n\t\t\n\t\t// Build the A and B lattices, A first, then B second:\n\n\t\t// The seperate A and B2 lattices\n\t\tFaceCentredCubicABCLattice fcc = new FaceCentredCubicABCLattice();\n\t\t\n\t\t// Create the new system at the new size:\n\t\tNtp = n-nc;\n\t\tfcc.setSizeInCells(size[1][0],size[1][1],size[1][2]);\n\n\t\t// Copy the two FCC lattices into the 1th phase:\n\t\tlatt[1] = new VectorD3[n];\n\t\tlatt_name[1] = \"FCC\";\n\t\tSystem.arraycopy(fcc.getLattice(), 0, latt[1], 0, n);\n\n\t\t/* Define distances between neighbouring atoms in the same stacking plane \n\t\t * taking advantage of the fact that both lattices have the same Unit Cell: */\n\t\tdouble[] c_uc = new double[3];\n\t\tc_uc = ab2.getUnitCell();\n\t\tuc.x = c_uc[0];\n\t\tuc.y = c_uc[1];\n\t\tuc.z = c_uc[2];\n\t\t\n\t\t// Put the lattices in the class members, for later use:\n\t\tlats[0] = (Lattice)ab2;\n\t\tlats[1] = (Lattice)fcc;\n\t\t\n\t}", "Dimension_longueur createDimension_longueur();", "public static final org.drip.state.forward.ForwardCurve ShapePreservingForwardCurve (\n\t\tfinal org.drip.state.inference.LinearLatentStateCalibrator llsc,\n\t\tfinal org.drip.state.inference.LatentStateStretchSpec[] aStretchSpec,\n\t\tfinal org.drip.state.identifier.ForwardLabel fri,\n\t\tfinal org.drip.param.valuation.ValuationParams valParam,\n\t\tfinal org.drip.param.pricer.CreditPricerParams pricerParam,\n\t\tfinal org.drip.param.market.CurveSurfaceQuoteContainer csqs,\n\t\tfinal org.drip.param.valuation.ValuationCustomizationParams quotingParam,\n\t\tfinal double dblEpochResponse)\n\t{\n\t\tif (null == llsc) return null;\n\n\t\ttry {\n\t\t\torg.drip.state.forward.ForwardCurve fc = new org.drip.state.curve.BasisSplineForwardRate (fri,\n\t\t\t\tllsc.calibrateSpan (aStretchSpec, dblEpochResponse, valParam, pricerParam, quotingParam,\n\t\t\t\t\tcsqs));\n\n\t\t\treturn fc.setCCIS (new org.drip.analytics.input.LatentStateShapePreservingCCIS (llsc,\n\t\t\t\taStretchSpec, valParam, pricerParam, quotingParam, csqs)) ? fc : null;\n\t\t} catch (java.lang.Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn null;\n\t}", "Shape newShape(GraphicalObject g) throws RemoteException;", "public interface FrequencyConstraintShapeType extends ExternalConstraintShapeType {\n}", "FData createFData();", "public DiscMesh() {\n this(1f, 25);\n }", "private ChessPieceGUIFactory() {\r\n\r\n\t}", "public void generateShape() {\n\n //TODO for tetris game - copy added to Tetris\n Shape newShape = null;\n //if(GAME_TO_TEST==GameEnum.TETRIS){\n //newShape = TetrisShapeFactory.getRandomShape(this.board);\n //} else if (GAME_TO_TEST== GameEnum.DRMARIO){\n //newShape = DrMarioShapeFactory.getRandomShape(this.board);\n //}\n\n //Temporary\n //-------------------------------------//\n Image image = null;\n try {\n image = new Image(new FileInputStream(\"resources/BlockPurple.png\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n int spawnColIndex = 0;\n int spawnRowIndex = 0;\n int tileSize = 0;\n boolean setColor = false;\n boolean setTileBorder = false; //toggle to add boarder to tile\n boolean setImage = true;\n spawnColIndex = (board.gridWidth-1)/2; //half of board width\n spawnRowIndex = 0;\n tileSize = board.tileSize;\n\n Tile tile1 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 0 , Direction.DOWN); //Center Tile\n Tile tile2 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex,1 , Direction.RIGHT);\n Tile tile3 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 1 , Direction.LEFT);\n Tile tile4 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 1 , Direction.DOWN);\n\n List<Tile> tiles = new ArrayList<Tile>();\n tiles.add(tile1);\n tiles.add(tile2);\n tiles.add(tile3);\n tiles.add(tile4);\n newShape = new Shape(tiles);\n\n //set newly created shape as the currently active shape\n this.currentActiveShape = newShape;\n\n //check if spawn area is occupied\n boolean isOccupied =false;\n for (Tile newTile : this.currentActiveShape.tiles) {\n if(this.board.getTile(newTile.columnIndex,newTile.rowIndex)!=null){\n isOccupied = true;\n }\n }\n\n //TODO\n //check if shape reaches top\n if(!isOccupied){\n //add tiles to board\n for (Tile newTile : this.currentActiveShape.tiles) {\n this.board.placeTile(newTile);\n }\n } else {\n //TODO later add Game Over JavaFx message\n System.out.println(\"GAME OVER\");\n\n //TODO Finishlater\n //Text gameoverText = new Text(10,20,\"GAME OVER\");\n //gameoverText.setFill(Color.RED);\n //gameoverText.setX( 100/*( ((board.gridWidth-1)*tileSize)/2)*/ );\n //gameoverText.setY( 100/*( ((board.gridHeight-1)*tileSize)/2)*/ );\n //gameoverText.setStyle(\"-fx-font: 70 arial;\");\n //this.group.getChildren().add(gameoverText);\n\n //Text t = new Text();\n //t.setX(20.0f);\n //t.setY(65.0f);\n //t.setX(100);\n //t.setY(200);\n //t.setText(\"Perspective\");\n //t.setFill(Color.YELLOW);\n //t.setFont(Font.font(null, FontWeight.BOLD, 36));\n //this.group.getChildren().add(t);\n //this.pane.getChildren().add(t);\n\n //System.exit(0);\n }\n\n }", "public ReliefDrawer(double gradientCurveFactor, Function3D function, PlotSheet plotSheet) {\n\t\tsuper();\n\t\tthis.gradientCurveFactor = gradientCurveFactor;\n\t\tthis.function = function;\n\t\tthis.plotSheet = plotSheet;\t\t\n\t\tthis.heightRegionCount = this.gradientColors.length;\n\n\t}", "public boolean testConstructiontype(EIfcdoorstyle type) throws SdaiException;", "public interface UclidFactory extends EFactory\n{\n /**\n * The singleton instance of the factory.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n UclidFactory eINSTANCE = uclid.xtext.uclid.impl.UclidFactoryImpl.init();\n\n /**\n * Returns a new object of class '<em>Model Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Model Rule</em>'.\n * @generated\n */\n ModelRule createModelRule();\n\n /**\n * Returns a new object of class '<em>Module Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Module Rule</em>'.\n * @generated\n */\n ModuleRule createModuleRule();\n\n /**\n * Returns a new object of class '<em>Decl Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Decl Rule</em>'.\n * @generated\n */\n DeclRule createDeclRule();\n\n /**\n * Returns a new object of class '<em>Type Decl</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Type Decl</em>'.\n * @generated\n */\n TypeDecl createTypeDecl();\n\n /**\n * Returns a new object of class '<em>Inputs Decl Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Inputs Decl Rule</em>'.\n * @generated\n */\n InputsDeclRule createInputsDeclRule();\n\n /**\n * Returns a new object of class '<em>Outputs Decl Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Outputs Decl Rule</em>'.\n * @generated\n */\n OutputsDeclRule createOutputsDeclRule();\n\n /**\n * Returns a new object of class '<em>Typed Object Decl</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Typed Object Decl</em>'.\n * @generated\n */\n TypedObjectDecl createTypedObjectDecl();\n\n /**\n * Returns a new object of class '<em>Input Decl</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Input Decl</em>'.\n * @generated\n */\n InputDecl createInputDecl();\n\n /**\n * Returns a new object of class '<em>Output Decl</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Output Decl</em>'.\n * @generated\n */\n OutputDecl createOutputDecl();\n\n /**\n * Returns a new object of class '<em>Var Decl</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Var Decl</em>'.\n * @generated\n */\n VarDecl createVarDecl();\n\n /**\n * Returns a new object of class '<em>Func Decl</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Func Decl</em>'.\n * @generated\n */\n FuncDecl createFuncDecl();\n\n /**\n * Returns a new object of class '<em>Vars Decl Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Vars Decl Rule</em>'.\n * @generated\n */\n VarsDeclRule createVarsDeclRule();\n\n /**\n * Returns a new object of class '<em>Consts Decl Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Consts Decl Rule</em>'.\n * @generated\n */\n ConstsDeclRule createConstsDeclRule();\n\n /**\n * Returns a new object of class '<em>Const Decl</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Const Decl</em>'.\n * @generated\n */\n ConstDecl createConstDecl();\n\n /**\n * Returns a new object of class '<em>Shared Vars Decl Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Shared Vars Decl Rule</em>'.\n * @generated\n */\n SharedVarsDeclRule createSharedVarsDeclRule();\n\n /**\n * Returns a new object of class '<em>Arg List</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Arg List</em>'.\n * @generated\n */\n ArgList createArgList();\n\n /**\n * Returns a new object of class '<em>Proc Return Arg Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Proc Return Arg Rule</em>'.\n * @generated\n */\n ProcReturnArgRule createProcReturnArgRule();\n\n /**\n * Returns a new object of class '<em>Require Exprs Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Require Exprs Rule</em>'.\n * @generated\n */\n RequireExprsRule createRequireExprsRule();\n\n /**\n * Returns a new object of class '<em>Ensure Exprs Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Ensure Exprs Rule</em>'.\n * @generated\n */\n EnsureExprsRule createEnsureExprsRule();\n\n /**\n * Returns a new object of class '<em>Modifies Exprs Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Modifies Exprs Rule</em>'.\n * @generated\n */\n ModifiesExprsRule createModifiesExprsRule();\n\n /**\n * Returns a new object of class '<em>Instance Decl</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Instance Decl</em>'.\n * @generated\n */\n InstanceDecl createInstanceDecl();\n\n /**\n * Returns a new object of class '<em>Arg Map List Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Arg Map List Rule</em>'.\n * @generated\n */\n ArgMapListRule createArgMapListRule();\n\n /**\n * Returns a new object of class '<em>Arg Map Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Arg Map Rule</em>'.\n * @generated\n */\n ArgMapRule createArgMapRule();\n\n /**\n * Returns a new object of class '<em>Axiom Decl Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Axiom Decl Rule</em>'.\n * @generated\n */\n AxiomDeclRule createAxiomDeclRule();\n\n /**\n * Returns a new object of class '<em>Spec Decl Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Spec Decl Rule</em>'.\n * @generated\n */\n SpecDeclRule createSpecDeclRule();\n\n /**\n * Returns a new object of class '<em>Property Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Property Rule</em>'.\n * @generated\n */\n PropertyRule createPropertyRule();\n\n /**\n * Returns a new object of class '<em>Invariant Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Invariant Rule</em>'.\n * @generated\n */\n InvariantRule createInvariantRule();\n\n /**\n * Returns a new object of class '<em>Init Decl Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Init Decl Rule</em>'.\n * @generated\n */\n InitDeclRule createInitDeclRule();\n\n /**\n * Returns a new object of class '<em>Next Decl Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Next Decl Rule</em>'.\n * @generated\n */\n NextDeclRule createNextDeclRule();\n\n /**\n * Returns a new object of class '<em>Statement</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Statement</em>'.\n * @generated\n */\n Statement createStatement();\n\n /**\n * Returns a new object of class '<em>Call Statement</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Call Statement</em>'.\n * @generated\n */\n CallStatement createCallStatement();\n\n /**\n * Returns a new object of class '<em>Assignment Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Assignment Rule</em>'.\n * @generated\n */\n AssignmentRule createAssignmentRule();\n\n /**\n * Returns a new object of class '<em>Compound Statement</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Compound Statement</em>'.\n * @generated\n */\n CompoundStatement createCompoundStatement();\n\n /**\n * Returns a new object of class '<em>If Stmt Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>If Stmt Rule</em>'.\n * @generated\n */\n IfStmtRule createIfStmtRule();\n\n /**\n * Returns a new object of class '<em>Case Stmt Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Case Stmt Rule</em>'.\n * @generated\n */\n CaseStmtRule createCaseStmtRule();\n\n /**\n * Returns a new object of class '<em>Default Case Block Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Default Case Block Rule</em>'.\n * @generated\n */\n DefaultCaseBlockRule createDefaultCaseBlockRule();\n\n /**\n * Returns a new object of class '<em>Case Block Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Case Block Rule</em>'.\n * @generated\n */\n CaseBlockRule createCaseBlockRule();\n\n /**\n * Returns a new object of class '<em>For Loop Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>For Loop Rule</em>'.\n * @generated\n */\n ForLoopRule createForLoopRule();\n\n /**\n * Returns a new object of class '<em>While Loop Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>While Loop Rule</em>'.\n * @generated\n */\n WhileLoopRule createWhileLoopRule();\n\n /**\n * Returns a new object of class '<em>Expr Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Expr Rule</em>'.\n * @generated\n */\n ExprRule createExprRule();\n\n /**\n * Returns a new object of class '<em>E1 Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>E1 Rule</em>'.\n * @generated\n */\n E1Rule createE1Rule();\n\n /**\n * Returns a new object of class '<em>E2 Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>E2 Rule</em>'.\n * @generated\n */\n E2Rule createE2Rule();\n\n /**\n * Returns a new object of class '<em>E3 Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>E3 Rule</em>'.\n * @generated\n */\n E3Rule createE3Rule();\n\n /**\n * Returns a new object of class '<em>E4 Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>E4 Rule</em>'.\n * @generated\n */\n E4Rule createE4Rule();\n\n /**\n * Returns a new object of class '<em>E5 Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>E5 Rule</em>'.\n * @generated\n */\n E5Rule createE5Rule();\n\n /**\n * Returns a new object of class '<em>E6 Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>E6 Rule</em>'.\n * @generated\n */\n E6Rule createE6Rule();\n\n /**\n * Returns a new object of class '<em>E7 Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>E7 Rule</em>'.\n * @generated\n */\n E7Rule createE7Rule();\n\n /**\n * Returns a new object of class '<em>E8 Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>E8 Rule</em>'.\n * @generated\n */\n E8Rule createE8Rule();\n\n /**\n * Returns a new object of class '<em>E9 Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>E9 Rule</em>'.\n * @generated\n */\n E9Rule createE9Rule();\n\n /**\n * Returns a new object of class '<em>E10 Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>E10 Rule</em>'.\n * @generated\n */\n E10Rule createE10Rule();\n\n /**\n * Returns a new object of class '<em>E11 Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>E11 Rule</em>'.\n * @generated\n */\n E11Rule createE11Rule();\n\n /**\n * Returns a new object of class '<em>E12 Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>E12 Rule</em>'.\n * @generated\n */\n E12Rule createE12Rule();\n\n /**\n * Returns a new object of class '<em>Var Reference</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Var Reference</em>'.\n * @generated\n */\n VarReference createVarReference();\n\n /**\n * Returns a new object of class '<em>Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Type</em>'.\n * @generated\n */\n Type createType();\n\n /**\n * Returns a new object of class '<em>E13 Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>E13 Rule</em>'.\n * @generated\n */\n E13Rule createE13Rule();\n\n /**\n * Returns a new object of class '<em>Enum Ref</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Enum Ref</em>'.\n * @generated\n */\n EnumRef createEnumRef();\n\n /**\n * Returns a new object of class '<em>Tuple Expr</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Tuple Expr</em>'.\n * @generated\n */\n TupleExpr createTupleExpr();\n\n /**\n * Returns a new object of class '<em>If Primary Expr</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>If Primary Expr</em>'.\n * @generated\n */\n IfPrimaryExpr createIfPrimaryExpr();\n\n /**\n * Returns a new object of class '<em>Parenthesis Expr</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Parenthesis Expr</em>'.\n * @generated\n */\n ParenthesisExpr createParenthesisExpr();\n\n /**\n * Returns a new object of class '<em>Const Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Const Rule</em>'.\n * @generated\n */\n ConstRule createConstRule();\n\n /**\n * Returns a new object of class '<em>Control Block Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Control Block Rule</em>'.\n * @generated\n */\n ControlBlockRule createControlBlockRule();\n\n /**\n * Returns a new object of class '<em>Cmd Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Cmd Rule</em>'.\n * @generated\n */\n CmdRule createCmdRule();\n\n /**\n * Returns a new object of class '<em>Id List Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Id List Rule</em>'.\n * @generated\n */\n IdListRule createIdListRule();\n\n /**\n * Returns a new object of class '<em>Expr List Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Expr List Rule</em>'.\n * @generated\n */\n ExprListRule createExprListRule();\n\n /**\n * Returns a new object of class '<em>Top Level</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Top Level</em>'.\n * @generated\n */\n TopLevel createTopLevel();\n\n /**\n * Returns a new object of class '<em>Module</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Module</em>'.\n * @generated\n */\n Module createModule();\n\n /**\n * Returns a new object of class '<em>Function Decl</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Function Decl</em>'.\n * @generated\n */\n FunctionDecl createFunctionDecl();\n\n /**\n * Returns a new object of class '<em>Procedure Decl</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Procedure Decl</em>'.\n * @generated\n */\n ProcedureDecl createProcedureDecl();\n\n /**\n * Returns a new object of class '<em>Statement Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Statement Rule</em>'.\n * @generated\n */\n StatementRule createStatementRule();\n\n /**\n * Returns a new object of class '<em>Assignment</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Assignment</em>'.\n * @generated\n */\n Assignment createAssignment();\n\n /**\n * Returns a new object of class '<em>Enum Type Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Enum Type Rule</em>'.\n * @generated\n */\n EnumTypeRule createEnumTypeRule();\n\n /**\n * Returns a new object of class '<em>Enum Value</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Enum Value</em>'.\n * @generated\n */\n EnumValue createEnumValue();\n\n /**\n * Returns a new object of class '<em>Tuple Type Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Tuple Type Rule</em>'.\n * @generated\n */\n TupleTypeRule createTupleTypeRule();\n\n /**\n * Returns a new object of class '<em>Record Type Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Record Type Rule</em>'.\n * @generated\n */\n RecordTypeRule createRecordTypeRule();\n\n /**\n * Returns a new object of class '<em>Array Type Rule</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Array Type Rule</em>'.\n * @generated\n */\n ArrayTypeRule createArrayTypeRule();\n\n /**\n * Returns the package supported by this factory.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the package supported by this factory.\n * @generated\n */\n UclidPackage getUclidPackage();\n\n}", "private synchronized void fillStyle(Rule rule, InstanceWaypoint context){\n \t\t\t\t\n \t\t// retrieve fill\n \t\tFill fill = null;\n \t\t\n \t\t//try the Symbolizers from the Rule\n\t\tint i = -1;\n\t\twhile(rule != null && fill == null && i < rule.getSymbolizers().length){\n\t\t\ti++;\n\t\t\tif (rule.getSymbolizers()[i] instanceof PolygonSymbolizer){\n\t\t\t\tfill = SLD.fill((PolygonSymbolizer)rule.getSymbolizers()[i]);\t\t\t\t\n\t\t\t\t}\n\t\t\telse if (rule.getSymbolizers()[i] instanceof PointSymbolizer){\n\t\t\t\tfill = SLD.fill((PointSymbolizer)rule.getSymbolizers()[i]);\t\t\t\t\n\t\t\t\t}\n \t\t\t}\n \t\n \t\t\n \t\t//if we have a fill now\n \t\tif (fill != null) {\n \t\t\tColor sldColor = SLD.color(fill);\n \t\t\tdouble opacity = SLD.opacity(fill);\n \t\t\tif (sldColor != null) {\n \t\t\t\tstyleFillColor = new Color(sldColor.getRed(), sldColor.getGreen(), \n \t\t\t\t\t\tsldColor.getBlue(), (int) (opacity * 255));\n \t\t\t}\n \t\t\telse {\n \t\t\t\tstyleFillColor = super.getPaintColor(context);\n \t\t\t}\n \t\t\thasFill = true;\n \t\t}\n \t\t//if we still don't have a fill\n \t\telse {\n \t\t\tstyleFillColor = null;\n \t\t\thasFill = false;\n \t\t}\n \t\t\n \t\t\n \t}", "public interface Shipment_Factory extends EFactory {\n\t/**\n\t * The singleton instance of the factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tShipment_Factory eINSTANCE = org.abchip.mimo.biz.model.shipment.shipment.impl.Shipment_FactoryImpl.init();\n\n\t/**\n\t * Returns a new object of class '<em>Carrier Shipment Box Type</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Carrier Shipment Box Type</em>'.\n\t * @generated\n\t */\n\tCarrierShipmentBoxType createCarrierShipmentBoxType();\n\n\t/**\n\t * Returns a new object of class '<em>Carrier Shipment Method</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Carrier Shipment Method</em>'.\n\t * @generated\n\t */\n\tCarrierShipmentMethod createCarrierShipmentMethod();\n\n\t/**\n\t * Returns a new object of class '<em>Delivery</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Delivery</em>'.\n\t * @generated\n\t */\n\tDelivery createDelivery();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment</em>'.\n\t * @generated\n\t */\n\tShipment createShipment();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Attribute</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Attribute</em>'.\n\t * @generated\n\t */\n\tShipmentAttribute createShipmentAttribute();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Box Type</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Box Type</em>'.\n\t * @generated\n\t */\n\tShipmentBoxType createShipmentBoxType();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Contact Mech</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Contact Mech</em>'.\n\t * @generated\n\t */\n\tShipmentContactMech createShipmentContactMech();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Contact Mech Type</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Contact Mech Type</em>'.\n\t * @generated\n\t */\n\tShipmentContactMechType createShipmentContactMechType();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Cost Estimate</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Cost Estimate</em>'.\n\t * @generated\n\t */\n\tShipmentCostEstimate createShipmentCostEstimate();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Gateway Config</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Gateway Config</em>'.\n\t * @generated\n\t */\n\tShipmentGatewayConfig createShipmentGatewayConfig();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Gateway Config Type</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Gateway Config Type</em>'.\n\t * @generated\n\t */\n\tShipmentGatewayConfigType createShipmentGatewayConfigType();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Gateway Dhl</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Gateway Dhl</em>'.\n\t * @generated\n\t */\n\tShipmentGatewayDhl createShipmentGatewayDhl();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Gateway Fedex</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Gateway Fedex</em>'.\n\t * @generated\n\t */\n\tShipmentGatewayFedex createShipmentGatewayFedex();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Gateway Ups</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Gateway Ups</em>'.\n\t * @generated\n\t */\n\tShipmentGatewayUps createShipmentGatewayUps();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Gateway Usps</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Gateway Usps</em>'.\n\t * @generated\n\t */\n\tShipmentGatewayUsps createShipmentGatewayUsps();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Item</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Item</em>'.\n\t * @generated\n\t */\n\tShipmentItem createShipmentItem();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Item Billing</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Item Billing</em>'.\n\t * @generated\n\t */\n\tShipmentItemBilling createShipmentItemBilling();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Item Feature</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Item Feature</em>'.\n\t * @generated\n\t */\n\tShipmentItemFeature createShipmentItemFeature();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Method Type</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Method Type</em>'.\n\t * @generated\n\t */\n\tShipmentMethodType createShipmentMethodType();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Package</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Package</em>'.\n\t * @generated\n\t */\n\tShipmentPackage createShipmentPackage();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Package Content</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Package Content</em>'.\n\t * @generated\n\t */\n\tShipmentPackageContent createShipmentPackageContent();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Package Route Seg</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Package Route Seg</em>'.\n\t * @generated\n\t */\n\tShipmentPackageRouteSeg createShipmentPackageRouteSeg();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Route Segment</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Route Segment</em>'.\n\t * @generated\n\t */\n\tShipmentRouteSegment createShipmentRouteSegment();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Status</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Status</em>'.\n\t * @generated\n\t */\n\tShipmentStatus createShipmentStatus();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Time Estimate</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Time Estimate</em>'.\n\t * @generated\n\t */\n\tShipmentTimeEstimate createShipmentTimeEstimate();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Type</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Type</em>'.\n\t * @generated\n\t */\n\tShipmentType createShipmentType();\n\n\t/**\n\t * Returns a new object of class '<em>Shipment Type Attr</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipment Type Attr</em>'.\n\t * @generated\n\t */\n\tShipmentTypeAttr createShipmentTypeAttr();\n\n\t/**\n\t * Returns a new object of class '<em>Shipping Document</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Shipping Document</em>'.\n\t * @generated\n\t */\n\tShippingDocument createShippingDocument();\n\n\t/**\n\t * Returns the package supported by this factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the package supported by this factory.\n\t * @generated\n\t */\n\tShipment_Package getShipment_Package();\n\n}", "public static void main(String[] args) {\n\n Color color = new Color();\n color.setIntensity(10);\n color.setName(\"Green\");\n Shape.color = color; // aici se modifica campul color la nivel de clasa\n // Shape.color - variabilele si methodele se acceseaza cu numele clasei iar schimbarea este vizibila in toate instantele clasei\n// shape.setColor(color); // bad practice , nu e ok sa avem getteri si setteri pentru variabile statice\n// shape1.setAria(1); // aici se modifica valoarea campului aria numai in obiectul shape1\n\n// System.out.println(shape1.getAria());\n// System.out.println(Shape.color);\n// System.out.println(shape1.color1);\n\n// System.out.println(shape2.color1);\n// Color color2 = new Color();\n// color2.setIntensity(110);\n// color2.setName(\"Red\");\n// shape2.color = color2; // e acelasi lucru ca si atunci cand schimbam valoarea campului static cu numele clasei, tot la nivel de clasa se schimba si asa pentru ca e static\n // cum e aici schimbat nu e ok- (bad practice) pentru ca ne poate induce in eroare, color fiid un camp static el trebuie accesat cu numele clasei\n // chiar si cand folosim numele unei instante a clasei , schimbarea este vizibila in toate celelalte intante ale clasei\n// System.out.println(shape2.color);\n// System.out.println(shape3.color);\n// System.out.println(shape4.color);\n }", "public ShapeFactory(Dialog dialog) {\n\t}", "private void m23260f() {\n Shimmer aVar;\n Shader shader;\n Rect bounds = getBounds();\n int width = bounds.width();\n int height = bounds.height();\n if (width != 0 && height != 0 && (aVar = this.f19138f) != null) {\n int a = aVar.mo28981a(width);\n int b = this.f19138f.mo28983b(height);\n boolean z = true;\n if (this.f19138f.f19117g != 1) {\n if (!(this.f19138f.f19114d == 1 || this.f19138f.f19114d == 3)) {\n z = false;\n }\n if (z) {\n a = 0;\n }\n if (!z) {\n b = 0;\n }\n shader = new LinearGradient(0.0f, 0.0f, (float) a, (float) b, this.f19138f.f19112b, this.f19138f.f19111a, Shader.TileMode.CLAMP);\n } else {\n shader = new RadialGradient(((float) a) / 2.0f, ((float) b) / 2.0f, (float) (((double) Math.max(a, b)) / Math.sqrt(2.0d)), this.f19138f.f19112b, this.f19138f.f19111a, Shader.TileMode.CLAMP);\n }\n this.f19134b.setShader(shader);\n }\n }", "private void createList() {\n /**\n * New design, split input in array list so we can directly call the shape factory and create the shape in there\n * The current design from assignment 1 will be too complicated to extend because it is optimised\n * for a polygon, I attempted to keep the same design, but had a check for the instance type, which worked\n * but if we added more shapes that required different reading in implementation then there will be a lot of if\n * statements which would be difficult to maintain.\n */\n\n /**\n * was using input.hasNextLine() but that only works if the data is following a point by line structure. What if a point\n * starts on the same line? This will break\n */\n\n String data = \"\";\n\n //Check if there is an input\n while(input.hasNext()) {\n System.out.print(\"Reading character by character: \");\n\n\n data = data.concat(input.next() + \" \");\n\n System.out.print(data + \"\\n\");\n\n //This if checks if there is a polygon, circle or semi-circle to be added\n //The last check ensures that the final shape to be added is not ignored\n if(input.hasNext(\"P\") || input.hasNext(\"C\") || input.hasNext(\"S\") || !input.hasNext()) {\n System.out.println(\"Next is a new shape\");\n unorderedList.append(shapeFactory(data));\n System.out.println(\"\\n\");\n data = \"\";\n }\n }\n\n\n\n\n\n// while(input.hasNext()) {\n// String value = input.next(); //set the value to the input.next so it can be reused later\n//\n// //Ignore space characters\n// if(value.equals(\" \")) {\n// continue;\n// }\n//\n// //Switch through the steps in the create process\n// //Each step will go onto the next process. e.g POLYGON -> SIZE\n// switch (inputType) {\n// case SHAPE:\n// System.out.println(\"CREATING A SHAPE: \" + value);\n// //Creates a new shape\n// shape = shapeFactory(value);\n//\n// //To keep the same flow, this checks if the type requires the size or not.\n// if(requireSize(shape)) {\n// System.out.println(\"\\t Shape is a polygon\");\n// inputType = InputType.SIZE;\n// } else {\n// System.out.println(\"\\t Shape is not a polygon\");\n// inputType = InputType.XCOORDINATE;\n// }\n//\n// break;\n// case SIZE:\n// //Sets the size of the array in polygon\n// shape.setSize(Integer.parseInt(value));\n// inputType = InputType.XCOORDINATE;\n// break;\n// case XCOORDINATE:\n// //Sets the x-coordinate of a point\n// System.out.println(\"\\t Adding x value: \" + value);\n// point.setXCoordinate(Float.parseFloat(value));\n// inputType = InputType.YCOORDINATE;\n// break;\n// case YCOORDINATE:\n// //Sets the y-coordinate of a point\n// System.out.println(\"\\t Adding y value: \" + value);\n// point.setYCoordinate(Float.parseFloat(value));\n//\n// System.out.println(\"\\t Adding point to the shape: \" + point.toString() + \", Pos: \"+ position);\n// //shapes.Point now has two values, so add to shape\n// shape.addPoint(point, position);\n//\n// //Reset point so we don't get any reference issues\n// point = new Point();\n// position++;\n//\n// if(!requireRadius(shape)) {\n// //Check if all points have been added or not\n// if (position == shape.getSize() - 1) {\n// //All points have been added, hence:\n//\n// shape.addFirstPoint(); //add the first point to the array\n// unorderedList.append(shape); //append polygon to the list\n//\n// //Set the input type back to polygon to add a new polygon\n// inputType = InputType.SHAPE;\n// position = 0; //reset position to add items to the start of the array\n// } else {\n// //More points to be added\n// inputType = InputType.XCOORDINATE;\n//\n// }\n// } else {\n// inputType = InputType.RADIUS;\n// }\n// break;\n// case RADIUS:\n// System.out.println(\"Adding radius: \" + value);\n// ((Circle)shape).addRadius(Float.parseFloat(value));\n//\n// unorderedList.append(shape);\n// inputType = InputType.SHAPE;\n// position = 0;\n// break;\n// }\n// }\n input.close();\n }", "public void calculateCG() {\n\n\t\t//-------------------------------------------------------------\n\t\t// Lateral faces xCG calculation (LFR = Local Reference Frame):\n\t\tList<Double[]> xCGLateralFacesLFRList = new ArrayList<Double[]>();\n\t\t\n\t\tfor(int i=0; i<this._prismoidsLength.size(); i++) {\n\t\t\t\n\t\t\tDouble[] xCGLateralFacesLFR = new Double[4];\n\t\t\t\n\t\t\txCGLateralFacesLFR[0] = this._thicknessAtMainSpar.get(i)\n\t\t\t\t\t\t\t\t\t\t.plus(this._thicknessAtSecondarySpar.get(i).times(2))\n\t\t\t\t\t\t\t\t\t\t\t.divide(\n\t\t\t\t\t\t\t\t\t\t\t\tthis._thicknessAtMainSpar.get(i)\n\t\t\t\t\t\t\t\t\t\t\t\t\t.plus(this._thicknessAtSecondarySpar.get(i))\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t.times(this._distanceBetweenSpars.get(i).divide(3))\n\t\t\t\t\t\t\t\t\t\t\t\t\t.getEstimatedValue();\n\t\t\t\n\t\t\txCGLateralFacesLFR[1] = this._thicknessAtSecondarySpar.get(i)\n\t\t\t\t\t\t\t\t\t\t.plus(this._thicknessAtSecondarySpar.get(i+1).times(2))\n\t\t\t\t\t\t\t\t\t\t\t.divide(\n\t\t\t\t\t\t\t\t\t\t\t\tthis._thicknessAtSecondarySpar.get(i)\n\t\t\t\t\t\t\t\t\t\t\t\t\t.plus(this._thicknessAtSecondarySpar.get(i+1))\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t.times(this._prismoidsLength.get(i).divide(3))\n\t\t\t\t\t\t\t\t\t\t\t\t\t.getEstimatedValue();\n\t\t\t\n\t\t\txCGLateralFacesLFR[2] = this._thicknessAtMainSpar.get(i+1)\n\t\t\t\t\t\t\t\t\t\t.plus(this._thicknessAtSecondarySpar.get(i+1).times(2))\n\t\t\t\t\t\t\t\t\t\t\t.divide(\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis._thicknessAtMainSpar.get(i+1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.plus(this._thicknessAtSecondarySpar.get(i+1))\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t.times(this._distanceBetweenSpars.get(i+1).divide(3))\n\t\t\t\t\t\t\t\t\t\t\t\t\t.getEstimatedValue();\n\t\t\t\n\t\t\txCGLateralFacesLFR[3] = this._thicknessAtMainSpar.get(i)\n\t\t\t\t\t\t\t\t\t\t.plus(this._thicknessAtMainSpar.get(i+1).times(2))\n\t\t\t\t\t\t\t\t\t\t\t.divide(\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis._thicknessAtMainSpar.get(i)\n\t\t\t\t\t\t\t\t\t\t\t\t\t.plus(this._thicknessAtMainSpar.get(i+1))\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t.times(this._prismoidsLength.get(i).divide(3))\n\t\t\t\t\t\t\t\t\t\t\t\t\t.getEstimatedValue();\n\t\t\t\n\t\t\txCGLateralFacesLFRList.add(xCGLateralFacesLFR);\n\t\t}\n\t\t\n\t\t//-------------------------------------------------------------\n\t\t// Calculation of the Xcg coordinates of each prismoid in wing LRF.\n\t\t\n\t\tList<Amount<Length>> xCGPrismoidsList = new ArrayList<Amount<Length>>();\n\t\t\n\t\tfor(int i=0; i<xCGLateralFacesLFRList.size(); i++) {\n\t\t\t\n\t\t\tdouble[] xCGSegmentOppositeFaceSpanwiseX = new double[2];\n\t\t\tdouble[] xCGSegmentOppositeFaceSpanwiseY = new double[2];\n\t\t\t\n\t\t\tdouble[] xCGSegmentOppositeFaceChordwiseX = new double[2];\n\t\t\tdouble[] xCGSegmentOppositeFaceChordwiseY = new double[2];\n\t\t\t\n\t\t\txCGSegmentOppositeFaceSpanwiseX[0] = this._fuelTankStations.get(i).doubleValue(SI.METER);\n\t\t\txCGSegmentOppositeFaceSpanwiseX[1] = this._fuelTankStations.get(i+1).doubleValue(SI.METER);\n\t\t\txCGSegmentOppositeFaceSpanwiseY[0] = this._theWing\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getXLEAtYActual(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis._fuelTankStations.get(i).doubleValue(SI.METER)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.plus(this._wingChordsAtFuelTankStations.get(i)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.times(_theWing.getMainSparDimensionlessPosition())\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.doubleValue(SI.METER) + xCGLateralFacesLFRList.get(i)[0];\n\t\t\txCGSegmentOppositeFaceSpanwiseY[1] = this._theWing\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getXLEAtYActual(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis._fuelTankStations.get(i+1).doubleValue(SI.METER)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.plus(this._wingChordsAtFuelTankStations.get(i+1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.times(_theWing.getMainSparDimensionlessPosition())\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.doubleValue(SI.METER) + xCGLateralFacesLFRList.get(i)[2];\n\n\t\t\txCGSegmentOppositeFaceChordwiseX[0] = this._theWing\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getYBreakPoints().get(i)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.doubleValue(SI.METER)\n\t\t\t\t\t\t\t\t\t\t\t\t + xCGLateralFacesLFRList.get(i)[3]; \n\t\t\txCGSegmentOppositeFaceChordwiseX[1] = this._theWing\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getYBreakPoints().get(i)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.doubleValue(SI.METER)\n\t\t\t\t\t\t\t\t\t\t\t\t + xCGLateralFacesLFRList.get(i)[1];\n\t\t\t\n\t\t\txCGSegmentOppositeFaceChordwiseY[0] = this._theWing\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getXLEAtYActual(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis._theWing\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getYBreakPoints().get(i)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.doubleValue(SI.METER)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ xCGLateralFacesLFRList.get(i)[3]\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t).doubleValue(SI.METER)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ (this._theWing.getChordAtYActual(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis._theWing\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getYBreakPoints().get(i)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.doubleValue(SI.METER)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ xCGLateralFacesLFRList.get(i)[3])\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t* _theWing.getMainSparDimensionlessPosition()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\txCGSegmentOppositeFaceChordwiseY[1] = this._theWing\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getXLEAtYActual(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis._theWing\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getYBreakPoints().get(i)\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.doubleValue(SI.METER)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ xCGLateralFacesLFRList.get(i)[1]\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t).doubleValue(SI.METER)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ (this._theWing.getChordAtYActual(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis._theWing\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getYBreakPoints().get(i)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.doubleValue(SI.METER)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ xCGLateralFacesLFRList.get(i)[1])\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t* _theWing.getMainSparDimensionlessPosition()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ ((this._theWing.getChordAtYActual(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis._theWing\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getYBreakPoints().get(i)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.doubleValue(SI.METER)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ xCGLateralFacesLFRList.get(i)[1])\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t* _theWing.getSecondarySparDimensionlessPosition())\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t- (this._theWing.getChordAtYActual(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis._theWing\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getYBreakPoints().get(i)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.doubleValue(SI.METER)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ xCGLateralFacesLFRList.get(i)[1])\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t* _theWing.getMainSparDimensionlessPosition()));\n\n\t\t\t// check if the chordwise X array is monotonic increasing\n\t\t\tif(xCGSegmentOppositeFaceChordwiseX[1] - xCGSegmentOppositeFaceChordwiseX[0] < 0.0001)\n\t\t\t\txCGSegmentOppositeFaceChordwiseX[0] -= 0.0001; \n\t\t\t\n\t\t\t// now that the segments coordinates are calculated, we have to intersect these latter.\n\t\t\txCGPrismoidsList.add(\n\t\t\t\t\tAmount.valueOf(\n\t\t\t\t\t\t\tMyMathUtils.getInterpolatedValue1DLinear(\n\t\t\t\t\t\t\t\t\txCGSegmentOppositeFaceSpanwiseX,\n\t\t\t\t\t\t\t\t\txCGSegmentOppositeFaceSpanwiseY,\n\t\t\t\t\t\t\t\t\txCGSegmentOppositeFaceChordwiseX[0]),\n\t\t\t\t\t\t\tSI.METER\n\t\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\\n xCG list = \" + xCGPrismoidsList);\n\t\t\n\t\t_xCGLRF = Amount.valueOf(0.0, SI.METER);\n\t\t\n\t\tfor(int i=0; i<this._prismoidsVolumes.size(); i++)\n\t\t\t_xCGLRF = _xCGLRF.plus(\n\t\t\t\t\tAmount.valueOf(\n\t\t\t\t\t\t\tthis._prismoidsVolumes.get(i).getEstimatedValue()\n\t\t\t\t\t\t\t*xCGPrismoidsList.get(i).getEstimatedValue()\n\t\t\t\t\t\t\t, SI.METER\n\t\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t_xCGLRF = _xCGLRF.divide(this._fuelVolume.divide(2).getEstimatedValue());\n\t\t_xCG = _xCGLRF.plus(_theWing.getXApexConstructionAxes());\n\t\t\n\t\t_yCGLRF = Amount.valueOf(0.0, SI.METER);\n\t\t_yCG = Amount.valueOf(0.0, SI.METER);\n\t\t\n\t\t_zCGLRF = _theWing.getTheBalanceManager().getCG().getZLRF();\n\t\t_zCG = _theWing.getTheBalanceManager().getCG().getZBRF();\n\t\t\n\t\t_cG = new CenterOfGravity();\n\t\t_cG.setX0(_theWing.getXApexConstructionAxes().to(SI.METER));\n\t\t_cG.setY0(_theWing.getYApexConstructionAxes().to(SI.METER));\n\t\t_cG.setZ0(_theWing.getZApexConstructionAxes().to(SI.METER));\n\t\t_cG.setXLRF(_xCGLRF.to(SI.METER));\n\t\t_cG.setYLRF(_yCGLRF.to(SI.METER));\n\t\t_cG.setZLRF(_zCGLRF.to(SI.METER));\n\t\t\n\t\t_cG.calculateCGinBRF(ComponentEnum.FUEL_TANK);\n\t\t\n\t}", "CarrierShipmentBoxType createCarrierShipmentBoxType();", "public static Entity createConsumable(float x,float y,int HP, int SDmg, float Speed, int type) {\n \tEntity e = Lutebox.scene.createEntity();\n \t\n \te.attach(Size.class).set(0.6f, 0.6f);\n \te.attach(Position.class).set(x, y);\n \te.attach(Collider.class);\n \te.attach(Consumable.class).SetHpRestore(HP).SetSwordDmgUp(SDmg).SetSpeedUp(Speed).SetType(type);\n \te.attach(Movement.class);\n \t\n \treturn e;\n }", "public static void test1() {\n int n1 = 100, n2 = 100, n3 = 100;\n float v = 1.0f, d = 20.0f;\n float[][][] paint = new float[n3][n2][n1];\n /*\n for (int i3=0; i3<n3; ++i3) {\n for (int i2=0; i2<n2; ++i2) {\n for (int i1=0; i1<n1; ++i1) {\n if (i3<n3/2) cae.paint[i3][i2][i1] = 1.0f;\n }\n }\n }\n */\n Painting3Group p3g = new Painting3Group(paint);\n SphereBrush pb = new SphereBrush();\n Painting3 p3 = p3g.getPainting3();\n// p3.paintAt(50,60,50,v,d,pb);\n// p3.paintAt(50,50,50,v,d,pb);\n// p3.paintAt(50,50,50,v,d,pb);\n p3.paintAt(50,50,50,v,d,pb);\n Contour c = p3.getContour(v);\n\n SimpleFrame sf = new SimpleFrame();\n sf.setTitle(\"Formation\");\n World world = sf.getWorld();\n TriangleGroup tg = new TriangleGroup(c.i,c.x);\n world.addChild(tg);\n sf.setSize(1250,900);\n }", "protected abstract void fromSpace( float[] abc );", "SymbolImageType createSymbolImageType();", "public void interface1(){\n noStroke();\n fill(10,100);//light gray\n rect(0,60,600,590);\n fill(220);//gray\n noStroke();\n beginShape();\n vertex(365,40);\n vertex(600,40);\n vertex(600,80);\n vertex(365,80);\n vertex(345,60);\n endShape(CLOSE);\n fill(19,70,100,100);//dark blue\n rect(0,110,600,215);\n rect(0,380,600,215);\n}", "protected void create() {\n\t\t_segments = _geneticCode.getNGenes() * _geneticCode.getSymmetry();\n\t\t_segColor = new Color[_segments];\n\t\tfor (int i = 0; i < _segments; i++)\n\t\t\t_segColor[i] = _geneticCode.getGene(i%_geneticCode.getNGenes()).getColor();\n\t\t_segBranch = new int[_segments];\n\t\tfor (int j = 0; j < _segments; j++)\n\t\t\t_segBranch[j] = _geneticCode.getGene(j%_geneticCode.getNGenes()).getBranch();\n\t\t_segredReaction = new int[_segments];\n\t\tfor (int a = 0; a < _segments; a++)\n\t\t\t_segredReaction[a] = _geneticCode.getGene(a%_geneticCode.getNGenes()).getredReaction();\n\t\t_seggreenReaction = new int[_segments];\n\t\tfor (int b = 0; b < _segments; b++)\n\t\t\t_seggreenReaction[b] = _geneticCode.getGene(b%_geneticCode.getNGenes()).getgreenReaction();\n\t\t_segblueReaction = new int[_segments];\n\t\tfor (int c = 0; c < _segments; c++)\n\t\t\t_segblueReaction[c] = _geneticCode.getGene(c%_geneticCode.getNGenes()).getblueReaction();\n\t\t_segplagueReaction = new int[_segments];\n\t\tfor (int d = 0; d < _segments; d++)\n\t\t\t_segplagueReaction[d] = _geneticCode.getGene(d%_geneticCode.getNGenes()).getplagueReaction();\n\t\t_segwhiteReaction = new int[_segments];\n\t\tfor (int e = 0; e < _segments; e++)\n\t\t\t_segwhiteReaction[e] = _geneticCode.getGene(e%_geneticCode.getNGenes()).getwhiteReaction();\n\t\t_seggrayReaction = new int[_segments];\n\t\tfor (int f = 0; f < _segments; f++)\n\t\t\t_seggrayReaction[f] = _geneticCode.getGene(f%_geneticCode.getNGenes()).getgrayReaction();\n\t\t_segdefaultReaction = new int[_segments];\n\t\tfor (int g = 0; g < _segments; g++)\n\t\t\t_segdefaultReaction[g] = _geneticCode.getGene(g%_geneticCode.getNGenes()).getdefaultReaction();\n\t\t_segmagentaReaction = new int[_segments];\n\t\tfor (int h = 0; h < _segments; h++)\n\t\t\t_segmagentaReaction[h] = _geneticCode.getGene(h%_geneticCode.getNGenes()).getmagentaReaction();\n\t\t_segpinkReaction = new int[_segments];\n\t\tfor (int i = 0; i < _segments; i++)\n\t\t\t_segpinkReaction[i] = _geneticCode.getGene(i%_geneticCode.getNGenes()).getpinkReaction();\n\t\t_segcoralReaction = new int[_segments];\n\t\tfor (int j = 0; j < _segments; j++)\n\t\t\t_segcoralReaction[j] = _geneticCode.getGene(j%_geneticCode.getNGenes()).getcoralReaction();\n\t\t_segorangeReaction = new int[_segments];\n\t\tfor (int k = 0; k < _segments; k++)\n\t\t\t_segorangeReaction[k] = _geneticCode.getGene(k%_geneticCode.getNGenes()).getorangeReaction();\n\t\t_segbarkReaction = new int[_segments];\n\t\tfor (int l = 0; l < _segments; l++)\n\t\t\t_segbarkReaction[l] = _geneticCode.getGene(l%_geneticCode.getNGenes()).getbarkReaction();\n\t\t_segvioletReaction = new int[_segments];\n\t\tfor (int m = 0; m < _segments; m++)\n\t\t\t_segvioletReaction[m] = _geneticCode.getGene(m%_geneticCode.getNGenes()).getvioletReaction();\n\t\t_segvirusReaction = new int[_segments];\n\t\tfor (int n = 0; n < _segments; n++)\n\t\t\t_segvirusReaction[n] = _geneticCode.getGene(n%_geneticCode.getNGenes()).getvirusReaction();\n\t\t_segmaroonReaction = new int[_segments];\n\t\tfor (int o = 0; o < _segments; o++)\n\t\t\t_segmaroonReaction[o] = _geneticCode.getGene(o%_geneticCode.getNGenes()).getmaroonReaction();\n\t\t_segoliveReaction = new int[_segments];\n\t\tfor (int p = 0; p < _segments; p++)\n\t\t\t_segoliveReaction[p] = _geneticCode.getGene(p%_geneticCode.getNGenes()).getoliveReaction();\n\t\t_segmintReaction = new int[_segments];\n\t\tfor (int q = 0; q < _segments; q++)\n\t\t\t_segmintReaction[q] = _geneticCode.getGene(q%_geneticCode.getNGenes()).getmintReaction();\n\t\t_segcreamReaction = new int[_segments];\n\t\tfor (int r = 0; r < _segments; r++)\n\t\t\t_segcreamReaction[r] = _geneticCode.getGene(r%_geneticCode.getNGenes()).getcreamReaction();\n\t\t_segspikeReaction = new int[_segments];\n\t\tfor (int s = 0; s < _segments; s++)\n\t\t\t_segspikeReaction[s] = _geneticCode.getGene(s%_geneticCode.getNGenes()).getspikeReaction();\n\t\t_seglightblueReaction = new int[_segments];\n\t\tfor (int t = 0; t < _segments; t++)\n\t\t\t_seglightblueReaction[t] = _geneticCode.getGene(t%_geneticCode.getNGenes()).getlightblueReaction();\n\t\t_segochreReaction = new int[_segments];\n\t\tfor (int u = 0; u < _segments; u++)\n\t\t\t_segochreReaction[u] = _geneticCode.getGene(u%_geneticCode.getNGenes()).getochreReaction();\n\t\t_seglightbrownReaction = new int[_segments];\n\t\tfor (int v = 0; v < _segments; v++)\n\t\t\t_seglightbrownReaction[v] = _geneticCode.getGene(v%_geneticCode.getNGenes()).getlightbrownReaction();\n\t\t_segbrownReaction = new int[_segments];\n\t\tfor (int w = 0; w < _segments; w++)\n\t\t\t_segbrownReaction[w] = _geneticCode.getGene(w%_geneticCode.getNGenes()).getbrownReaction();\n\t\t_segsickReaction = new int[_segments];\n\t\tfor (int x = 0; x < _segments; x++)\n\t\t\t_segsickReaction[x] = _geneticCode.getGene(x%_geneticCode.getNGenes()).getsickReaction();\n\t\t_segskyReaction = new int[_segments];\n\t\tfor (int y = 0; y < _segments; y++)\n\t\t\t_segskyReaction[y] = _geneticCode.getGene(y%_geneticCode.getNGenes()).getskyReaction();\n\t\t_seglilacReaction = new int[_segments];\n\t\tfor (int z = 0; z < _segments; z++)\n\t\t\t_seglilacReaction[z] = _geneticCode.getGene(z%_geneticCode.getNGenes()).getlilacReaction();\n\t\t_segiceReaction = new int[_segments];\n\t\tfor (int a = 0; a < _segments; a++)\n\t\t\t_segiceReaction[a] = _geneticCode.getGene(a%_geneticCode.getNGenes()).geticeReaction();\n\t\t_segsilverReaction = new int[_segments];\n\t\tfor (int b = 0; b < _segments; b++)\n\t\t\t_segsilverReaction[b] = _geneticCode.getGene(b%_geneticCode.getNGenes()).getsilverReaction();\n\t\t_segfireReaction = new int[_segments];\n\t\tfor (int c = 0; c < _segments; c++)\n\t\t\t_segfireReaction[c] = _geneticCode.getGene(c%_geneticCode.getNGenes()).getfireReaction();\n\t\t_segfriendReaction = new int[_segments];\n\t\tfor (int d = 0; d < _segments; d++)\n\t\t\t_segfriendReaction[d] = _geneticCode.getGene(d%_geneticCode.getNGenes()).getfriendReaction();\n\t\t_seggreenbrownReaction = new int[_segments];\n\t\tfor (int e = 0; e < _segments; e++)\n\t\t\t_seggreenbrownReaction[e] = _geneticCode.getGene(e%_geneticCode.getNGenes()).getgreenbrownReaction();\n\t\t_segspikepointReaction = new int[_segments];\n\t\tfor (int f = 0; f < _segments; f++)\n\t\t\t_segspikepointReaction[f] = _geneticCode.getGene(f%_geneticCode.getNGenes()).getspikepointReaction();\n\t\t_startPointX = new int[_segments];\n\t\t_startPointY = new int[_segments];\n\t\t_endPointX = new int[_segments];\n\t\t_endPointY = new int[_segments];\n\t\t_m1 = new double[_segments];\n\t\t_m2 = new double[_segments];\n\t\t_m = new double[_segments];\n\t\t_mphoto = new double[_segments];\n\t\tx1 = new int[_segments];\n\t\ty1 = new int[_segments];\n\t\tx2 = new int[_segments];\n\t\ty2 = new int[_segments];\n\t}", "public interface DsmlprotoFactory extends EFactory {\n\t/**\n\t * The singleton instance of the factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tDsmlprotoFactory eINSTANCE = svk.dsmlproto.profile.dsmlproto.impl.DsmlprotoFactoryImpl.init();\n\n\t/**\n\t * Returns a new object of class '<em>Dsml Component</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Dsml Component</em>'.\n\t * @generated\n\t */\n\tDsmlComponent createDsmlComponent();\n\n\t/**\n\t * Returns a new object of class '<em>Dsml Class</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Dsml Class</em>'.\n\t * @generated\n\t */\n\tDsmlClass createDsmlClass();\n\n\t/**\n\t * Returns a new object of class '<em>Dsml Non UML</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Dsml Non UML</em>'.\n\t * @generated\n\t */\n\tDsmlNonUML createDsmlNonUML();\n\n\t/**\n\t * Returns the package supported by this factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the package supported by this factory.\n\t * @generated\n\t */\n\tDsmlprotoPackage getDsmlprotoPackage();\n\n}", "public GeometricObject(String color, boolean filled) {\n dateCreated = new java.util.Date();\n this.color = color;\n this.filled = filled;\n }", "public TypeOverlapCcCreator(DataDomain domain, ExecutionEnvironment env) {\n this.domain = domain;\n this.env = env;\n }", "public CarrierShape()\n {\n super();\n }", "public VFunction2D() {\n \n \n }", "Fog createFog();", "public FoodStation(float x, float y, GameWorld gw) {\n\t\tsuper(x, y);\n\t\trand = new Random();\n\t\tcapacity = rand.nextInt(400) + 400; \n\t\tcolor = ColorUtil.GREEN;\n\t\tsize = capacity / 20;\n\t\tselected = false;\n\t\twidth = 2 * size;\n\t\theight = 2 * size;\n\t}", "static void createCubes(double width, double height) {\n \t\r\n \tmaxY=f(startingBound);\r\n \tmaxX=startingBound;\r\n \t\r\n \t//need a function to find the max\r\n \tfor(double i=startingBound; i<=endingBound; i=i+dx) {\r\n \t\tif(f(i)>maxY)\r\n \t\t\tmaxY=f(i);\r\n \t\t\r\n \t\tif(i>maxX)\r\n \t\t\tmaxX=i;\r\n \t}\r\n \tdouble size=height/2-100;\r\n \tSystem.out.println(size);\r\n \tscaleY=maxY/(size);\r\n \tscaleX=(width-100)/maxX;\r\n \t\r\n \tfor(double x=startingBound; x<=endingBound; x=x+dx) {\r\n \t\t//System.out.println(x+\", \"+f(x));\r\n \t\tcubes.add(new Cube(x*scaleX, -f(x)/scaleY, 0, f(x)/scaleY, dx*scaleX));\r\n \t\t//cubes.add(new Cube(x, 100, 0, 100, 100));\r\n \t}\r\n \t\r\n \t\r\n }", "TwoDShape5() {\n width = height = 0.0;\n }", "public interface Simpleflowmodel4pcmFactory extends EFactory {\r\n\t/**\r\n\t * The singleton instance of the factory.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t */\r\n\tSimpleflowmodel4pcmFactory eINSTANCE = edu.kit.kastel.scbs.simpleflowmodel4pcm.impl.Simpleflowmodel4pcmFactoryImpl\r\n\t\t\t.init();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Flows</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Flows</em>'.\r\n\t * @generated\r\n\t */\r\n\tFlows createFlows();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Flow</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Flow</em>'.\r\n\t * @generated\r\n\t */\r\n\tFlow createFlow();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Signature Source</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Signature Source</em>'.\r\n\t * @generated\r\n\t */\r\n\tSignatureSource createSignatureSource();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Parameter Source</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Parameter Source</em>'.\r\n\t * @generated\r\n\t */\r\n\tParameterSource createParameterSource();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Signature Identification</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Signature Identification</em>'.\r\n\t * @generated\r\n\t */\r\n\tSignatureIdentification createSignatureIdentification();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Parameter Identification</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Parameter Identification</em>'.\r\n\t * @generated\r\n\t */\r\n\tParameterIdentification createParameterIdentification();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Generic Sink</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Generic Sink</em>'.\r\n\t * @generated\r\n\t */\r\n\tGenericSink createGenericSink();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Signature Sink</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Signature Sink</em>'.\r\n\t * @generated\r\n\t */\r\n\tSignatureSink createSignatureSink();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Parameter Sink</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Parameter Sink</em>'.\r\n\t * @generated\r\n\t */\r\n\tParameterSink createParameterSink();\r\n\r\n\t/**\r\n\t * Returns the package supported by this factory.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the package supported by this factory.\r\n\t * @generated\r\n\t */\r\n\tSimpleflowmodel4pcmPackage getSimpleflowmodel4pcmPackage();\r\n\r\n}", "public CostFactoryImpl() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void run() {\n\t\tspacing = checkDimensions(spacingString, input.numDimensions(), \"Spacings\");\n\t\tscales = Arrays.stream(scaleString.split(regex)).mapToInt(Integer::parseInt)\n\t\t\t.toArray();\n\t\tDimensions resultDims = Views.addDimension(input, 0, scales.length - 1);\n\t\t// create output image, potentially-filtered input\n\t\tresult = opService.create().img(resultDims, new FloatType());\n\n\t\tfor (int s = 0; s < scales.length; s++) {\n\t\t\t// Determine whether or not the user would like to apply the gaussian\n\t\t\t// beforehand and do it.\n\t\t\tRandomAccessibleInterval<T> vesselnessInput = doGauss ? opService.filter()\n\t\t\t\t.gauss(input, scales[s]) : input;\n\t\t\tIntervalView<FloatType> scaleResult = Views.hyperSlice(result, result\n\t\t\t\t.numDimensions() - 1, s);\n\t\t\topService.filter().frangiVesselness(scaleResult, vesselnessInput, spacing,\n\t\t\t\tscales[s]);\n\t\t}\n\t}", "private void crearDimensionContable()\r\n/* 201: */ {\r\n/* 202:249 */ this.dimensionContable = new DimensionContable();\r\n/* 203:250 */ this.dimensionContable.setIdOrganizacion(AppUtil.getOrganizacion().getId());\r\n/* 204:251 */ this.dimensionContable.setIdSucursal(AppUtil.getSucursal().getId());\r\n/* 205:252 */ this.dimensionContable.setNumero(getDimension());\r\n/* 206:253 */ verificaDimension();\r\n/* 207: */ }", "public Style createEditPathBox() {\n \t \tStroke stroke = styleFactory.createStroke(\n \t \t\tfilterFactory.literal(Color.RED), filterFactory.literal(1), null, null,null, new float[] { 5, 2 }, null, null, null\n\t\t);\n \t \t\n\t\t//Cria um Symbolizer para linha.\n\t\tPolygonSymbolizer polygonSymbolizer = styleFactory.createPolygonSymbolizer(stroke, null, null);\n\t\t//Regra para um estilo de fei��o.\n\t\tRule rulePoly = styleFactory.createRule();\n\t\t\n\t\t//Adiciona o PointSymbolizer na regra.\n\t\t//rulePoly.setName(\"Polygon\"); \n\t\t//ruleLine.setFilter(filterFactory.equals(filterFactory.property(\"geom\"), filterFactory.literal(false)));\n\t\trulePoly.symbolizers().add(polygonSymbolizer); \n\t\t\t \n\t\t//Adiciona uma ou N regras em uma estilo de uma determinada fei��o.\n\t\tFeatureTypeStyle ftsPoly = styleFactory.createFeatureTypeStyle(new Rule[]{rulePoly});\n\t\t \n\t\t//Cria o estilo (SLD).\n\t\tStyle style = styleFactory.createStyle();\n\t\tstyle.featureTypeStyles().add(ftsPoly);\n\t\t \n\t\treturn style;\n }", "public interface ProcessingStyle {\n /**\n * Defines the inner fill color to use for shapes\n * @param rgb The color definition\n * @see <a href=\"https://processing.org/reference/fill_.html\">https://processing.org/reference/fill_.html</a>\n */\n void fill(int rgb);\n}", "private FunctionBasis(FunctionBasis existing) {\n\t this.fs = existing.fs;\n\t setParameters(new double[existing.getNumberOfParameters()]);\n\t}", "private static FXForwardSecurity createFxForwardSecurity() {\n\n Currency payCurrency = Currency.GBP;\n Currency recCurrency = Currency.USD;\n\n double payAmount = 1_000_000;\n double recAmount = 1_600_000;\n\n ZonedDateTime forwardDate = DateUtils.getUTCDate(2019, 2, 4);\n\n ExternalId region = ExternalSchemes.currencyRegionId(Currency.GBP);\n\n FXForwardSecurity fxForwardSecurity = new FXForwardSecurity(payCurrency, payAmount, recCurrency, recAmount, forwardDate, region);\n\n return fxForwardSecurity;\n }", "public SquareBumper(int x, int y, String name) throws InvalidInvariantException{\n \tsuper(new GridPoint(x, y), name, 1, 1, 1);\n physicsComponentList.add(new StaticLine(new LineSegment(this.getX(), this.getY(), this.getX() + 1,\n this.getY()), this.reflectionCoef));\n physicsComponentList.add(new StaticLine(new LineSegment(this.getX(), this.getY() + 1,\n this.getX() + 1, this.getY() + 1), this.reflectionCoef));\n physicsComponentList.add(new StaticLine(new LineSegment(this.getX() + 1, this.getY(),\n this.getX() + 1, this.getY() + 1), this.reflectionCoef));\n physicsComponentList.add(new StaticLine(new LineSegment(this.getX(), this.getY(), this.getX(),\n this.getY() + 1), this.reflectionCoef));\n\n physicsComponentList.add(new StaticCircle(new Circle(this.getX(), this.getY(), 0.01), this.reflectionCoef));\n physicsComponentList.add(new StaticCircle(new Circle(this.getX() + 1, this.getY(), 0.01), this.reflectionCoef));\n physicsComponentList.add(new StaticCircle(new Circle(this.getX(), this.getY() + 1, 0.01), this.reflectionCoef));\n physicsComponentList.add(new StaticCircle(new Circle(this.getX() + 1, this.getY() + 1, 0.01), this.reflectionCoef));\n\n if (!this.checkRep()) {\n throw new Board.InvalidInvariantException();\n }\n }", "public void setup(){\r\n\t\t\r\n\r\n\t\tsuper.setup();\r\n\t\t\r\n\t\tparams = new String[] {\"numLocations\",\"numFirms\",\"timeHorizon\",\"enteringCosts\",\r\n\t\t\t\t \"reservationPrice\", \"productDifferentiation\",\r\n\t\t\t\t \"adjustEnteringCosts\",\r\n\t\t\t\t \"sdNoiseImitationKnowledge\",\r\n\t\t\t\t \"sdNoiseImitationConcept\",\r\n\t\t\t\t \"sigma\",\"discontFactor\",\"initialInnoEff\",\"fractionEffectivityImitators\",\r\n\t\t\t\t \"initialImiEff\",\"exitingCosts\",\"fractionEffectivityInnovators\",\r\n\t\t\t\t \"locationCosts\",\"isolatedLocation\", \"maxQualityConceptProgress\",\"heterogeneityMode\",\"randomAllocation\", \"numMontecarloRuns\",\r\n\t\t\t\t \"maxQualityConceptProgress\",\"rateLocationDecision\", \"marketEntryCosts\",\r\n\t\t\t\t \"marketEntryHazardRate\", \"parTimeToMarket\",\"ModelModeTimeToMarket\",\"scrapValueParameterInno\",\"scrapValueParameterImi\",\"strategyParameter\",\"targetNumFirms\"};\r\n\r\n\t\r\n\r\n\t\t\r\n\t\tif(graphOutput!=null)\r\n\t\t\tgraphOutput.dispose();\r\n\t\t\r\n\t\tif(graphPrice!=null)\r\n\t\t\tgraphPrice.dispose();\r\n\t\t\r\n\t\tif(graphQuality!=null)\r\n\t\t\tgraphQuality.dispose();\r\n\t\tif(graphNumFirms!=null)\r\n\t\t\tgraphNumFirms.dispose();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tif(graphFirmLocations!=null)\r\n\t\t\tgraphFirmLocations.dispose();\r\n\t\t\r\n\t\tif(graphEnteringCosts!=null)\r\n\t\t\tgraphEnteringCosts.dispose();\r\n\t\t\r\n\t\t\r\n\t\tif(graphAverageProbability!=null)\r\n\t\t\tgraphAverageProbability.dispose();\r\n\t\t\r\n\t\tif(graphTotalProfit!=null)\r\n\t\t\tgraphTotalProfit.dispose();\r\n\t\t\r\n\t\tif(graphClusteringCoefficient!=null)\r\n\t\t\tgraphClusteringCoefficient.dispose();\r\n\t\t\r\n\t\t\r\n\t\tif(graphSingleOutput!=null)\r\n\t\tgraphSingleOutput.dispose();\r\n\t\t\r\n\t\tif(graphSinglePrice!=null)\r\n\t\tgraphSinglePrice.dispose(); \r\n\t\t\r\n\t\tif(graphSingleQuality!=null)\r\n\t\tgraphSingleQuality.dispose(); \r\n\t\t\r\n\t\tif(graphSingleFirmLocations!=null)\r\n\t\tgraphSingleFirmLocations.dispose();\r\n\t\t\r\n\t\tif(graphSingleProbability!=null)\r\n\t\t graphSingleProbability.dispose(); \r\n\t\t\r\n\t\tif(graphSinglelProfit!=null)\r\n\t\tgraphSinglelProfit.dispose();\r\n\t\t\r\n\t\t\r\n\t\tif(graphSingleQualityConcept!=null)\r\n\t\t\tgraphSingleQualityConcept.dispose();\r\n\t\t\r\n\t\t\r\n\t\tif(graphCumProfit!=null)\r\n\t\t\tgraphCumProfit.dispose();\r\n\t\t\r\n\t\t\r\n\t \r\n\t if(dsurfList!=null){\r\n\t\t for(int i=0; i<dsurfList.size();i++){\r\n\t\t \t\t\r\n\t\t \t\tdsurfList.get(i).dispose();\r\n\t\t \r\n\t\t }\r\n\t}\r\n\t \r\n\t gridList = null;\r\n\t dsurfList = null;\r\n\t \r\n\t gridList = new ArrayList<Object2DGrid>() ;\r\n\t dsurfList\t= new\tArrayList<DisplaySurface>() ;\r\n\t \r\n\t \r\n\t dimX = ((int) Math.sqrt(numFirms))+5;\r\n\t dimY=dimX;\r\n\t \r\n\t \r\n\t \r\n\t if (surface != null)\r\n\t surface.dispose ();\r\n\t surface = null;\r\n\t \r\n\t surface = new DisplaySurface (this, \"Firm network\");\r\n\t registerDisplaySurface (\"Firm network\", surface);\r\n\t\t\r\n\t\t\r\n\t}", "public interface SpaceinvadersFactory extends EFactory {\n\t/**\n\t * The singleton instance of the factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tSpaceinvadersFactory eINSTANCE = spaceinvaders.impl.SpaceinvadersFactoryImpl.init();\n\n\t/**\n\t * Returns a new object of class '<em>Spaces Invaders</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Spaces Invaders</em>'.\n\t * @generated\n\t */\n\tSpacesInvaders createSpacesInvaders();\n\n\t/**\n\t * Returns a new object of class '<em>Vaisseau</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Vaisseau</em>'.\n\t * @generated\n\t */\n\tVaisseau createVaisseau();\n\n\t/**\n\t * Returns a new object of class '<em>Position</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Position</em>'.\n\t * @generated\n\t */\n\tPosition createPosition();\n\n\t/**\n\t * Returns a new object of class '<em>Position Position</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Position Position</em>'.\n\t * @generated\n\t */\n\tPosition_Position createPosition_Position();\n\n\t/**\n\t * Returns a new object of class '<em>Position abscisse</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Position abscisse</em>'.\n\t * @generated\n\t */\n\tPosition_abscisse createPosition_abscisse();\n\n\t/**\n\t * Returns a new object of class '<em>Position ordonnee</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Position ordonnee</em>'.\n\t * @generated\n\t */\n\tPosition_ordonnee createPosition_ordonnee();\n\n\t/**\n\t * Returns a new object of class '<em>Position changer Abscisse</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Position changer Abscisse</em>'.\n\t * @generated\n\t */\n\tPosition_changerAbscisse createPosition_changerAbscisse();\n\n\t/**\n\t * Returns a new object of class '<em>Position changer Ordonnee</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Position changer Ordonnee</em>'.\n\t * @generated\n\t */\n\tPosition_changerOrdonnee createPosition_changerOrdonnee();\n\n\t/**\n\t * Returns a new object of class '<em>Dimension</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Dimension</em>'.\n\t * @generated\n\t */\n\tDimension createDimension();\n\n\t/**\n\t * Returns a new object of class '<em>Dimension Dimension</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Dimension Dimension</em>'.\n\t * @generated\n\t */\n\tDimension_Dimension createDimension_Dimension();\n\n\t/**\n\t * Returns a new object of class '<em>Dimension longueur</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Dimension longueur</em>'.\n\t * @generated\n\t */\n\tDimension_longueur createDimension_longueur();\n\n\t/**\n\t * Returns a new object of class '<em>Dimension hauteur</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Dimension hauteur</em>'.\n\t * @generated\n\t */\n\tDimension_hauteur createDimension_hauteur();\n\n\t/**\n\t * Returns a new object of class '<em>Vaisseau Vaisseau</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Vaisseau Vaisseau</em>'.\n\t * @generated\n\t */\n\tVaisseau_Vaisseau createVaisseau_Vaisseau();\n\n\t/**\n\t * Returns a new object of class '<em>Vaisseau Vaisseau</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Vaisseau Vaisseau</em>'.\n\t * @generated\n\t */\n\tVaisseau_Vaisseau createVaisseau_Vaisseau();\n\n\t/**\n\t * Returns a new object of class '<em>Vaisseau Vaisseau</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Vaisseau Vaisseau</em>'.\n\t * @generated\n\t */\n\tVaisseau_Vaisseau createVaisseau_Vaisseau();\n\n\t/**\n\t * Returns a new object of class '<em>Vaisseau Vaisseau</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Vaisseau Vaisseau</em>'.\n\t * @generated\n\t */\n\tVaisseau_Vaisseau createVaisseau_Vaisseau();\n\n\t/**\n\t * Returns a new object of class '<em>Vaisseau occupe La Position</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Vaisseau occupe La Position</em>'.\n\t * @generated\n\t */\n\tVaisseau_occupeLaPosition createVaisseau_occupeLaPosition();\n\n\t/**\n\t * Returns a new object of class '<em>Vaisseau est Ordonnee Couverte</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Vaisseau est Ordonnee Couverte</em>'.\n\t * @generated\n\t */\n\tVaisseau_estOrdonneeCouverte createVaisseau_estOrdonneeCouverte();\n\n\t/**\n\t * Returns a new object of class '<em>Vaisseau est Abscisse Couverte</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Vaisseau est Abscisse Couverte</em>'.\n\t * @generated\n\t */\n\tVaisseau_estAbscisseCouverte createVaisseau_estAbscisseCouverte();\n\n\t/**\n\t * Returns a new object of class '<em>Vaisseau ordonnee La Plus Basse</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Vaisseau ordonnee La Plus Basse</em>'.\n\t * @generated\n\t */\n\tVaisseau_ordonneeLaPlusBasse createVaisseau_ordonneeLaPlusBasse();\n\n\t/**\n\t * Returns a new object of class '<em>Vaisseau ordonnee La Plus Haute</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Vaisseau ordonnee La Plus Haute</em>'.\n\t * @generated\n\t */\n\tVaisseau_ordonneeLaPlusHaute createVaisseau_ordonneeLaPlusHaute();\n\n\t/**\n\t * Returns a new object of class '<em>Vaisseau abscisse La Plus ADroite</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Vaisseau abscisse La Plus ADroite</em>'.\n\t * @generated\n\t */\n\tVaisseau_abscisseLaPlusADroite createVaisseau_abscisseLaPlusADroite();\n\n\t/**\n\t * Returns a new object of class '<em>Vaisseau abscisse La Plus AGauche</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Vaisseau abscisse La Plus AGauche</em>'.\n\t * @generated\n\t */\n\tVaisseau_abscisseLaPlusAGauche createVaisseau_abscisseLaPlusAGauche();\n\n\t/**\n\t * Returns a new object of class '<em>Vaisseau se Deplacer Vers La Droite</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Vaisseau se Deplacer Vers La Droite</em>'.\n\t * @generated\n\t */\n\tVaisseau_seDeplacerVersLaDroite createVaisseau_seDeplacerVersLaDroite();\n\n\t/**\n\t * Returns a new object of class '<em>Vaisseau se Deplacer Vers La Gauche</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Vaisseau se Deplacer Vers La Gauche</em>'.\n\t * @generated\n\t */\n\tVaisseau_seDeplacerVersLaGauche createVaisseau_seDeplacerVersLaGauche();\n\n\t/**\n\t * Returns a new object of class '<em>Vaisseau positionner</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Vaisseau positionner</em>'.\n\t * @generated\n\t */\n\tVaisseau_positionner createVaisseau_positionner();\n\n\t/**\n\t * Returns a new object of class '<em>Vaisseau longueur</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Vaisseau longueur</em>'.\n\t * @generated\n\t */\n\tVaisseau_longueur createVaisseau_longueur();\n\n\t/**\n\t * Returns a new object of class '<em>Spaces Invaders Spaces Invaders</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Spaces Invaders Spaces Invaders</em>'.\n\t * @generated\n\t */\n\tSpacesInvaders_SpacesInvaders createSpacesInvaders_SpacesInvaders();\n\n\t/**\n\t * Returns a new object of class '<em>Spaces Invaders recuperer Espace Jeu Dans Chaine ASCII</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Spaces Invaders recuperer Espace Jeu Dans Chaine ASCII</em>'.\n\t * @generated\n\t */\n\tSpacesInvaders_recupererEspaceJeuDansChaineASCII createSpacesInvaders_recupererEspaceJeuDansChaineASCII();\n\n\t/**\n\t * Returns a new object of class '<em>Spaces Invaders recuperer Marque De La Position</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Spaces Invaders recuperer Marque De La Position</em>'.\n\t * @generated\n\t */\n\tSpacesInvaders_recupererMarqueDeLaPosition createSpacesInvaders_recupererMarqueDeLaPosition();\n\n\t/**\n\t * Returns a new object of class '<em>Spaces Invaders aUn Vaisseau Qui Occupe La Position</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Spaces Invaders aUn Vaisseau Qui Occupe La Position</em>'.\n\t * @generated\n\t */\n\tSpacesInvaders_aUnVaisseauQuiOccupeLaPosition createSpacesInvaders_aUnVaisseauQuiOccupeLaPosition();\n\n\t/**\n\t * Returns a new object of class '<em>Spaces Invaders aUn Vaisseau</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Spaces Invaders aUn Vaisseau</em>'.\n\t * @generated\n\t */\n\tSpacesInvaders_aUnVaisseau createSpacesInvaders_aUnVaisseau();\n\n\t/**\n\t * Returns a new object of class '<em>Spaces Invaders est Dans Espace Jeu</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Spaces Invaders est Dans Espace Jeu</em>'.\n\t * @generated\n\t */\n\tSpacesInvaders_estDansEspaceJeu createSpacesInvaders_estDansEspaceJeu();\n\n\t/**\n\t * Returns a new object of class '<em>Spaces Invaders deplacer Vaisseau Vers La Droite</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Spaces Invaders deplacer Vaisseau Vers La Droite</em>'.\n\t * @generated\n\t */\n\tSpacesInvaders_deplacerVaisseauVersLaDroite createSpacesInvaders_deplacerVaisseauVersLaDroite();\n\n\t/**\n\t * Returns a new object of class '<em>Spaces Invaders deplacer Vaisseau Vers La Gauche</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Spaces Invaders deplacer Vaisseau Vers La Gauche</em>'.\n\t * @generated\n\t */\n\tSpacesInvaders_deplacerVaisseauVersLaGauche createSpacesInvaders_deplacerVaisseauVersLaGauche();\n\n\t/**\n\t * Returns a new object of class '<em>Spaces Invaders positionner Un Nouveau Vaisseau</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Spaces Invaders positionner Un Nouveau Vaisseau</em>'.\n\t * @generated\n\t */\n\tSpacesInvaders_positionnerUnNouveauVaisseau createSpacesInvaders_positionnerUnNouveauVaisseau();\n\n\t/**\n\t * Returns a new object of class '<em>Spaces Invaders positionner Un Nouveau Vaisseau</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Spaces Invaders positionner Un Nouveau Vaisseau</em>'.\n\t * @generated\n\t */\n\tSpacesInvaders_positionnerUnNouveauVaisseau createSpacesInvaders_positionnerUnNouveauVaisseau();\n\n\t/**\n\t * Returns a new object of class '<em>Space Invader Test</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Space Invader Test</em>'.\n\t * @generated\n\t */\n\tSpaceInvaderTest createSpaceInvaderTest();\n\n\t/**\n\t * Returns a new object of class '<em>Space Invader Test initialisation</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Space Invader Test initialisation</em>'.\n\t * @generated\n\t */\n\tSpaceInvaderTest_initialisation createSpaceInvaderTest_initialisation();\n\n\t/**\n\t * Returns a new object of class '<em>Space Invader Test test Au Debut Jeu Space Invader Est Vide</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Space Invader Test test Au Debut Jeu Space Invader Est Vide</em>'.\n\t * @generated\n\t */\n\tSpaceInvaderTest_test_AuDebut_JeuSpaceInvaderEstVide createSpaceInvaderTest_test_AuDebut_JeuSpaceInvaderEstVide();\n\n\t/**\n\t * Returns a new object of class '<em>Space Invader Test test un Nouveau Vaisseau Est Correctement Positionne Dans Espace Jeu</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Space Invader Test test un Nouveau Vaisseau Est Correctement Positionne Dans Espace Jeu</em>'.\n\t * @generated\n\t */\n\tSpaceInvaderTest_test_unNouveauVaisseauEstCorrectementPositionneDansEspaceJeu createSpaceInvaderTest_test_unNouveauVaisseauEstCorrectementPositionneDansEspaceJeu();\n\n\t/**\n\t * Returns a new object of class '<em>Space Invader Test test Un Nouveau Vaisseau Positionne Hors Espace Jeu Doit Lever Une Exception</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Space Invader Test test Un Nouveau Vaisseau Positionne Hors Espace Jeu Doit Lever Une Exception</em>'.\n\t * @generated\n\t */\n\tSpaceInvaderTest_test_UnNouveauVaisseauPositionneHorsEspaceJeu_DoitLeverUneException createSpaceInvaderTest_test_UnNouveauVaisseauPositionneHorsEspaceJeu_DoitLeverUneException();\n\n\t/**\n\t * Returns a new object of class '<em>Space Invader Test test un Nouveau Vaisseau Avec Dimension Est Correctement Positionne Dans Espace Jeu</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Space Invader Test test un Nouveau Vaisseau Avec Dimension Est Correctement Positionne Dans Espace Jeu</em>'.\n\t * @generated\n\t */\n\tSpaceInvaderTest_test_unNouveauVaisseauAvecDimensionEstCorrectementPositionneDansEspaceJeu createSpaceInvaderTest_test_unNouveauVaisseauAvecDimensionEstCorrectementPositionneDansEspaceJeu();\n\n\t/**\n\t * Returns a new object of class '<em>Space Invader Test test Un Nouveau Vaisseau Positionne Dans Espace Jeu Mais Avec Dimension Trop Grande Doit Lever Une Exception De Debordement</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Space Invader Test test Un Nouveau Vaisseau Positionne Dans Espace Jeu Mais Avec Dimension Trop Grande Doit Lever Une Exception De Debordement</em>'.\n\t * @generated\n\t */\n\tSpaceInvaderTest_test_UnNouveauVaisseauPositionneDansEspaceJeuMaisAvecDimensionTropGrande_DoitLeverUneExceptionDeDebordement createSpaceInvaderTest_test_UnNouveauVaisseauPositionneDansEspaceJeuMaisAvecDimensionTropGrande_DoitLeverUneExceptionDeDebordement();\n\n\t/**\n\t * Returns a new object of class '<em>Space Invader Test Vaisseau Avance Deplacer Vaisseau Vers La Gauche</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Space Invader Test Vaisseau Avance Deplacer Vaisseau Vers La Gauche</em>'.\n\t * @generated\n\t */\n\tSpaceInvaderTest_VaisseauAvance_DeplacerVaisseauVersLaGauche createSpaceInvaderTest_VaisseauAvance_DeplacerVaisseauVersLaGauche();\n\n\t/**\n\t * Returns a new object of class '<em>Space Invader Test Vaisseau Immobile Deplacer Vaisseau Vers La Gauche</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Space Invader Test Vaisseau Immobile Deplacer Vaisseau Vers La Gauche</em>'.\n\t * @generated\n\t */\n\tSpaceInvaderTest_VaisseauImmobile_DeplacerVaisseauVersLaGauche createSpaceInvaderTest_VaisseauImmobile_DeplacerVaisseauVersLaGauche();\n\n\t/**\n\t * Returns a new object of class '<em>Space Invader Test test Vaisseau Avance Deplacer Vaisseau Vers La Droite</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Space Invader Test test Vaisseau Avance Deplacer Vaisseau Vers La Droite</em>'.\n\t * @generated\n\t */\n\tSpaceInvaderTest_test_VaisseauAvance_DeplacerVaisseauVersLaDroite createSpaceInvaderTest_test_VaisseauAvance_DeplacerVaisseauVersLaDroite();\n\n\t/**\n\t * Returns a new object of class '<em>Space Invader Test test Vaisseau Immobile Deplacer Vaisseau Vers La Droite</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Space Invader Test test Vaisseau Immobile Deplacer Vaisseau Vers La Droite</em>'.\n\t * @generated\n\t */\n\tSpaceInvaderTest_test_VaisseauImmobile_DeplacerVaisseauVersLaDroite createSpaceInvaderTest_test_VaisseauImmobile_DeplacerVaisseauVersLaDroite();\n\n\t/**\n\t * Returns a new object of class '<em>Space Invader Test test Vaisseau Avance Partiellement Deplacer Vaisseau Vers La Droite</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Space Invader Test test Vaisseau Avance Partiellement Deplacer Vaisseau Vers La Droite</em>'.\n\t * @generated\n\t */\n\tSpaceInvaderTest_test_VaisseauAvancePartiellement_DeplacerVaisseauVersLaDroite createSpaceInvaderTest_test_VaisseauAvancePartiellement_DeplacerVaisseauVersLaDroite();\n\n\t/**\n\t * Returns a new object of class '<em>New Class1</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>New Class1</em>'.\n\t * @generated\n\t */\n\tNewClass1 createNewClass1();\n\n\t/**\n\t * Returns the package supported by this factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the package supported by this factory.\n\t * @generated\n\t */\n\tSpaceinvadersPackage getSpaceinvadersPackage();\n\n}", "public FSSSegmenter(SubsetSelectionAlgorithm fssType,\n\t\t\tIObjectiveFunction objFunction, boolean useSmoothing) {\n\t\tm_fssType = fssType;\n\t\tm_objFunction = objFunction;\n\t}", "public XSSFColorScaleFormatting createColorScaleFormatting() {\n if (_cfRule.isSetColorScale() && _cfRule.getType() == STCfType.COLOR_SCALE)\n return getColorScaleFormatting();\n \n // Mark it as being a Color Scale\n _cfRule.setType(STCfType.COLOR_SCALE);\n\n // Ensure the right element\n CTColorScale scale = null;\n if (_cfRule.isSetColorScale()) {\n scale = _cfRule.getColorScale();\n } else {\n scale = _cfRule.addNewColorScale();\n }\n \n // Add a default set of thresholds and colors\n if (scale.sizeOfCfvoArray() == 0) {\n CTCfvo cfvo;\n cfvo = scale.addNewCfvo();\n cfvo.setType(STCfvoType.Enum.forString(RangeType.MIN.name));\n cfvo = scale.addNewCfvo();\n cfvo.setType(STCfvoType.Enum.forString(RangeType.PERCENTILE.name));\n cfvo.setVal(\"50\");\n cfvo = scale.addNewCfvo();\n cfvo.setType(STCfvoType.Enum.forString(RangeType.MAX.name));\n \n for (int i=0; i<3; i++) {\n scale.addNewColor();\n }\n }\n \n // Wrap and return\n return new XSSFColorScaleFormatting(scale, _sh.getWorkbook().getStylesSource().getIndexedColors());\n }", "public XSSFBorderFormatting createBorderFormatting(){\n CTDxf dxf = getDxf(true);\n CTBorder border;\n if(!dxf.isSetBorder()) {\n border = dxf.addNewBorder();\n } else {\n border = dxf.getBorder();\n }\n\n return new XSSFBorderFormatting(border, _sh.getWorkbook().getStylesSource().getIndexedColors());\n }", "public ColorPalette build() throws IncorrectSplineDataException\n {\n ArrayList<Double> redList = new ArrayList<>();\n ArrayList<Double> greenList = new ArrayList<>();\n ArrayList<Double> blueList = new ArrayList<>();\n Color[] colors = {color1, color2, color3, color4, color5};\n for (int i = 0; i < colors.length; i++)\n {\n if (colors[i] != null)\n {\n redList.add(colors[i].getRed() * 255);\n greenList.add(colors[i].getGreen() * 255);\n blueList.add(colors[i].getBlue() * 255);\n }\n }\n double[] red = new double[colorsCount];\n double[] green = new double[colorsCount];\n double[] blue = new double[colorsCount];\n\n for (int i = 0; i < colorsCount; i++)\n {\n red[i] = redList.get(i);\n green[i] = greenList.get(i);\n blue[i] = blueList.get(i);\n }\n return new ColorPalette(red, green, blue);\n }", "public royalBlueSchool(int sizeE,int sizeF){}", "public void createPPF(){\n\t\tSystem.out.println(\"HDFC:: createed ppf\");\n\t}", "public static final org.drip.state.forward.ForwardCurve ShapePreservingForwardCurve (\n\t\tfinal java.lang.String strName,\n\t\tfinal org.drip.state.identifier.ForwardLabel fri,\n\t\tfinal org.drip.param.valuation.ValuationParams valParams,\n\t\tfinal org.drip.param.pricer.CreditPricerParams pricerParam,\n\t\tfinal org.drip.param.market.CurveSurfaceQuoteContainer csqs,\n\t\tfinal org.drip.param.valuation.ValuationCustomizationParams quotingParam,\n\t\tfinal java.lang.String strBasisType,\n\t\tfinal org.drip.spline.basis.FunctionSetBuilderParams fsbp,\n\t\tfinal org.drip.product.definition.CalibratableComponent[] aCalibComp,\n\t\tfinal java.lang.String strManifestMeasure,\n\t\tfinal double[] adblQuote,\n\t\tfinal double dblEpochResponse)\n\t{\n\t\tif (null == strName || strName.isEmpty() || null == strBasisType || strBasisType.isEmpty() || null ==\n\t\t\tvalParams || null == fsbp || null == strManifestMeasure || strManifestMeasure.isEmpty())\n\t\t\treturn null;\n\n\t\tint iNumQuote = null == adblQuote ? 0 : adblQuote.length;\n\t\tint iNumComp = null == aCalibComp ? 0 : aCalibComp.length;\n\n\t\tif (0 == iNumComp || iNumComp != iNumQuote) return null;\n\n\t\ttry {\n\t\t\torg.drip.state.identifier.ForwardLabel forwardLabel = null;\n\n\t\t\tif (aCalibComp[0] instanceof org.drip.product.rates.DualStreamComponent)\n\t\t\t\tforwardLabel = ((org.drip.product.rates.DualStreamComponent)\n\t\t\t\t\taCalibComp[0]).derivedStream().forwardLabel();\n\t\t\telse {\n\t\t\t\torg.drip.analytics.support.CaseInsensitiveTreeMap<org.drip.state.identifier.ForwardLabel>\n\t\t\t\t\tmapForwardLabel = aCalibComp[0].forwardLabel();\n\n\t\t\t\tif (null != mapForwardLabel && 0 != mapForwardLabel.size())\n\t\t\t\t\tforwardLabel = mapForwardLabel.get (0);\n\t\t\t}\n\n\t\t\torg.drip.state.representation.LatentStateSpecification[] aLSS = new\n\t\t\t\torg.drip.state.representation.LatentStateSpecification[] {new\n\t\t\t\t\torg.drip.state.representation.LatentStateSpecification\n\t\t\t\t\t\t(org.drip.analytics.definition.LatentStateStatic.LATENT_STATE_FORWARD,\n\t\t\t\t\t\t\torg.drip.analytics.definition.LatentStateStatic.FORWARD_QM_FORWARD_RATE,\n\t\t\t\t\t\t\t\tforwardLabel)};\n\n\t\t\torg.drip.state.inference.LatentStateSegmentSpec[] aSegmentSpec = new\n\t\t\t\torg.drip.state.inference.LatentStateSegmentSpec[iNumComp];\n\n\t\t\tfor (int i = 0; i < iNumComp; ++i) {\n\t\t\t\torg.drip.product.calib.ProductQuoteSet pqs = aCalibComp[i].calibQuoteSet (aLSS);\n\n\t\t\t\tif (null == pqs || !pqs.set (strManifestMeasure, adblQuote[i])) return null;\n\n\t\t\t\taSegmentSpec[i] = new org.drip.state.inference.LatentStateSegmentSpec (aCalibComp[i], pqs);\n\t\t\t}\n\n\t\t\torg.drip.state.inference.LatentStateStretchSpec[] aStretchSpec = new\n\t\t\t\torg.drip.state.inference.LatentStateStretchSpec[] {new\n\t\t\t\t\torg.drip.state.inference.LatentStateStretchSpec (strName, aSegmentSpec)};\n\n\t\t\torg.drip.state.inference.LinearLatentStateCalibrator llsc = new\n\t\t\t\torg.drip.state.inference.LinearLatentStateCalibrator (new\n\t\t\t\t\torg.drip.spline.params.SegmentCustomBuilderControl (strBasisType, fsbp,\n\t\t\t\t\t\torg.drip.spline.params.SegmentInelasticDesignControl.Create (2, 2), new\n\t\t\t\t\t\t\torg.drip.spline.params.ResponseScalingShapeControl (true, new\n\t\t\t\t\t\t\t\torg.drip.function.r1tor1.QuadraticRationalShapeControl (0.)), null),\n\t\t\t\t\t\t\t\t\torg.drip.spline.stretch.BoundarySettings.FinancialStandard(),\n\t\t\t\t\t\t\t\t\t\torg.drip.spline.stretch.MultiSegmentSequence.CALIBRATE, null, null);\n\n\t\t\treturn ShapePreservingForwardCurve (llsc, aStretchSpec, fri, valParams, pricerParam, csqs,\n\t\t\t\tquotingParam, dblEpochResponse);\n\t\t} catch (java.lang.Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn null;\n\t}", "public DimensionType build() {\n return new DimensionType(fixedTime, hasSkylight, hasCeiling, ultraWarm, natural, coordinateScale, bedWorks,\n respawnAnchorWorks, minY, height, logicalHeight, infiniburn, effectsLocation, ambientLight,\n new DimensionType.MonsterSettings(piglinSafe, hasRaids, UniformInt.of(0, 7), 0));\n }", "TwoDShape5(double x) {\n width = height = x;\n }" ]
[ "0.5711173", "0.5310501", "0.53063834", "0.51554435", "0.5107102", "0.5104296", "0.5052235", "0.4983264", "0.4920226", "0.4889435", "0.488001", "0.4857512", "0.48494944", "0.48467186", "0.4841567", "0.48270306", "0.481401", "0.4799258", "0.4791197", "0.47904614", "0.47760898", "0.47675824", "0.4757636", "0.4752811", "0.47499", "0.47447947", "0.47251257", "0.4724496", "0.47166052", "0.47002578", "0.4694776", "0.46825254", "0.46794355", "0.46728623", "0.46587738", "0.46567297", "0.4647462", "0.46156022", "0.45951074", "0.4586647", "0.45820695", "0.45523146", "0.45520723", "0.45512986", "0.45501482", "0.45495", "0.4548403", "0.45481727", "0.45471814", "0.45449", "0.4521872", "0.4516871", "0.45163962", "0.45156023", "0.45107353", "0.45106655", "0.45090747", "0.45070815", "0.45052072", "0.449991", "0.44944885", "0.4489539", "0.44893128", "0.4483067", "0.44824916", "0.44804463", "0.4473179", "0.44729748", "0.446937", "0.4466451", "0.44624567", "0.44618946", "0.44600213", "0.44573915", "0.4456888", "0.44521493", "0.44519404", "0.44458246", "0.4442824", "0.443156", "0.44238147", "0.44220254", "0.44199964", "0.44197458", "0.44170195", "0.44123137", "0.44097444", "0.44096127", "0.44069687", "0.44062972", "0.4401566", "0.44015625", "0.43865985", "0.43858135", "0.437434", "0.4373794", "0.43694466", "0.4367441", "0.43667075", "0.43616095" ]
0.68994796
0
You can't make sum n=2 when k=3. to run at least n>=k and using [1,9] you can't make sum more than 45. K can not be more than 9 since we have 9 choices only
public List<List<Integer>> combinationSum3(int k, int n) { if (n < k || n > 45 || k > 9) return Collections.EMPTY_LIST; List<List<Integer>> response = new ArrayList<>(); int candidates[] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; combinationSum3(candidates, k, 0, 0, n, response, new ArrayList<>()); return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<List<Integer>> combinationSum3(int k, int n) {\n List<List<Integer>> res = new ArrayList<>();\n int min = 0, max = 0;\n for (int i = 1; i <= k; i++) {\n min += i;\n max += (10 - i);\n }\n if (n > max || n < min) return res;\n List<Integer> list = new ArrayList<>();\n dfs(k, n, res, list, 1);\n return res;\n }", "private static long combinations(int n, int k) {\n\t\tif (k > n / 2) {\n\t\t\tk = n - k;\n\t\t}\n\n\t\tlong result = 1;\n\n\t\tfor (int i = 1, j = n - k + 1; i <= k; i++, j++) {\n\t\t\tresult = result * j / i;\n\t\t}\n\n\t\treturn result;\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 }", "private static int choose(int n, int k) {\n return factorial(n) / (factorial(k) * factorial(n - k));\n }", "static long sumOfGroup(int k) {\n long start = 1;\n long sum = 0;\n for(int i=1;i<=k;i++){\n long count = 0;\n sum = 0;\n while(count<i){\n if(start%2 == 1){\n sum = sum+start;\n count++;\n }\n start++;\n }\n }\n return sum;\n }", "private static int combinationRecursive(int n, int k) {\n\t\tif (k == 0 || n == k) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn (int)(n/(double)k) * combinationRecursive(n-1, k-1);\n\t\t}\n\t}", "public void findSubSeqWithGivenSum(int[] a, int n, int k, List<Integer> chosen) {\n\t\t// base case\n\t\t// Remaining sum == 0\n\t\tif (k == 0) {\n\t\t\tSystem.out.println(\"Combination found : \" + chosen);\n\t\t\treturn;\n\t\t}\n\n\t\t// if remaining elements == 0\n\t\tif (n == -1) {\n\t\t\tSystem.out.println(\"Hitting end\");\n\t\t\treturn;\n\t\t}\n\n\t\tList<Integer> withCurrent = new ArrayList<>();\n\t\twithCurrent.addAll(chosen);\n\t\twithCurrent.add(a[n]);\n\n\t\tList<Integer> withoutCurrent = new ArrayList<>();\n\t\twithoutCurrent.addAll(chosen);\n\n\t\t// If a[n] is chosen\n\t\tif (a[n] <= k)\n\t\t\tfindSubSeqWithGivenSum(a, n - 1, k - a[n], withCurrent);\n\n\t\tfindSubSeqWithGivenSum(a, n - 1, k, withoutCurrent);\n\n\t}", "static int numOfSubsets(int[] arr, int n, int k) {\n List<Integer> vect1 = new ArrayList<Integer>(); \n List<Integer> vect2 = new ArrayList<Integer>(); \n List<Integer> subset1 = new ArrayList<Integer>(); \n List<Integer> subset2 = new ArrayList<Integer>(); \n \n // ignore element greater than k and divide\n // array into 2 halves\n for (int i = 0; i < n; i++) {\n \n // ignore element if greater than k\n if (arr[i] > k)\n continue;\n if (i <= n / 2)\n vect1.add(arr[i]);\n else\n vect2.add(arr[i]);\n }\n \n // generate all subsets for 1st half (vect1)\n for (int i = 0; i < (1 << vect1.size()); i++) {\n int value = 1;\n for (int j = 0; j < vect1.size(); j++) {\n if (i & (1 << j))\n value *= vect1[j];\n }\n \n // add only in case subset product is less\n // than equal to k\n if (value <= k)\n subset1.add(value);\n }\n \n // generate all subsets for 2nd half (vect2)\n for (int i = 0; i < (1 << vect2.size()); i++) {\n int value = 1;\n for (int j = 0; j < vect2.size(); j++) {\n if (i & (1 << j))\n value *= vect2[j];\n }\n \n // add only in case subset product is\n // less than equal to k\n if (value <= k)\n subset2.add(value);\n }\n \n // sort subset2\n sort(subset2.begin(), subset2.end());\n \n int count = 0;\n for (int i = 0; i < subset1.size(); i++)\n count += upper_bound(subset2.begin(), subset2.end(),\n (k / subset1[i]))\n - subset2.begin();\n \n // for null subset decrement the value of count\n count--;\n \n // return count\n return count;\n }", "long getRsum(int n, int i, int k){\r\n return n-i>=k ? (n-i-k)+ssum(k-1): ssum(k-1) - ssum(k-n+i);\r\n }", "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 List<List<Integer>> getCandidateA(int nStartVal, int k, int n) {\n \tint nMin; \r\n \tint nMax; \r\n \tint i;\r\n \tList<List<Integer>> lstlstCombSum = new ArrayList<List<Integer>>();\r\n List<Integer> lstResult = new ArrayList<Integer>();\r\n \t\r\n \tif (nStartVal > n || k == 0) return lstlstCombSum;\r\n \t\r\n \tif (k == 1) {\r\n \t\tif (n > 9) return lstlstCombSum;\r\n \t\tlstResult.add(n);\r\n \t\tlstlstCombSum.add(lstResult);\r\n \t\treturn lstlstCombSum;\r\n \t}\r\n \t\r\n \tnMin = nStartVal;\r\n \tnMax = (int) (n - (k-1)*k/2)/k; //Max value occurs when the remaining numbers are: x (the maxvalue), x+1, x+2 ... x+k-1 (the sum should be n)\r\n \t\r\n \tfor (i = nMin; i <= nMax; i++) { //Possible value of the first\r\n \t\tList<List<Integer>> lstlstCombSumTmp = new ArrayList<List<Integer>>();\r\n \t\tlstlstCombSumTmp = getCandidateA(i+1, k-1, n-i);\r\n \t\t\r\n \t\tif (lstlstCombSumTmp.isEmpty()) continue;\r\n \t\t\r\n \t\tfor (List<Integer> lstOneCombSum:lstlstCombSumTmp) {\r\n \t\t\tlstOneCombSum.add(0, i);\r\n \t\t\tlstlstCombSum.add(lstOneCombSum);\r\n \t\t}\r\n \t\t\r\n \t}\r\n \t\r\n \treturn lstlstCombSum;\r\n }", "static int digitSum(String n, int k) {\n int sum = findSum(convertToList(n));\n // Finding the initial super digit where k=1\n sum = findSuperDigit(convertToList(sum));\n // Calculating k times the super digit to find actual result\n return findSuperDigit(convertToList(sum*k));\n }", "static int nonDivisibleSubset(int k, int[] S) {\n\t\tint result = 0;\n\n\t\tArrayList < ArrayList < Integer >> solutions = new ArrayList < ArrayList < Integer >>();\n\t\tArrayList < HashSet < Integer >> minSets = new ArrayList < HashSet < Integer >>();\n\n\t\tsolutions.add(new ArrayList <Integer > ( Arrays.asList ( S [ 0 ])));\n\t\tminSets.add (new HashSet <Integer > ( ));\n\t\tminSets.get(0).add ( S [ 0 ] % k);\n\n\n\t\t// Go over all the numbers\n\t\tfor ( int i = 1; i < S.length; i++ ){\n\t\t\tint n = S [ i ]; \n\t\t\tint m = S [ i ] % k; // Number we will add to all the elements of all the minSets.\n\n\t\t\t// Go over all the minSets.\n\t\t\t// For each one, check that each element plus m is not divisible by k.\n\n\t\t\tboolean workedForASet = false;\n\t\t\tfor ( int j = 0; j < minSets.size(); j++){\n\t\t\t\t// For each set, check all the elements of the set.\n\n\t\t\t\tHashSet < Integer > minSet = minSets.get(j);\n\t\t\t\tIterator < Integer > iter = minSet.iterator();\n\n\t\t\t\tboolean works = true;\n\t\t\t\twhile ( iter.hasNext() && works ){\n\t\t\t\t\tint num = iter.next();\n\t\t\t\t\tif ( (num + m) % k == 0 ){\n\t\t\t\t\t\tworks = false;\n\t\t\t\t\t\tworkedForASet = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( works ){\n\t\t\t\t\tsolutions.get(j).add(n);\n\t\t\t\t\tminSet.add(m);\n\t\t\t\t}\n\t\t\t} \n\n\t\t\tif ( !workedForASet ){\n\t\t\t\tsolutions.add(new ArrayList <Integer > ( Arrays.asList ( n )));\n\t\t\t\tminSets.add (new HashSet <Integer > ( ));\n\t\t\t\tminSets.get (minSets.size() - 1).add ( m ); \n\t\t\t} \n\t\t}\n\n\t\t// Find the solution with the most elements.\n\n\t\tfor ( ArrayList <Integer > solution : solutions ){\n\t\t\tresult = Math.max ( result, solution.size() );\n\t\t\tSystem.out.println ( solution );\n\t\t}\n\n\t\tif ( result == 1 ) result = 0;\n\t\treturn result;\n\t}", "private void combinationSum3(int[] candidates, int k, int i, int currentSum, int target, List<List<Integer>> response, List<Integer> temp) {\n if (temp.size() == k) {\n\n if (currentSum == target)\n response.add(new ArrayList<>(temp));\n\n\n return;\n }\n\n if (i == candidates.length)\n return;\n\n\n //1. Our choices: We can choose a number from the list any number of times and all the numbers\n for (int s = i; s < candidates.length; s++) {\n\n //if this element is greater than target, then adding it to current sum make bigger than target\n //since,elements are sorted, then all the element after this element are > target\n if (candidates[s] > target)\n break;\n\n //Our constraints : We can't go beyond target, we can take more element than available in array\n if (currentSum + candidates[s] <= target) {\n currentSum += candidates[s];\n temp.add(candidates[s]);\n\n combinationSum3(candidates, k, s + 1, currentSum, target, response, temp);\n\n //backtrack\n temp.remove(temp.size() - 1);\n currentSum -= candidates[s];\n }\n }\n\n }", "public List<List<Integer>> combinationSum3(int k, int n) {\n List<List<Integer>> ans = new ArrayList<>();\n backtack(ans, new LinkedList<>(), k, n, 1);\n return ans;\n }", "public static void main(String[] args){\n int n;int k;\n Scanner sc=new Scanner(System.in);\n n=sc.nextInt();\n k=sc.nextInt();\n int[] a=new int[n];\n int[] reMain=new int[k];\n int num=0;\n for(int i=0;i<k;i++){\n reMain[i]=0;\n }\n for(int i=0;i<n;i++){\n int d=sc.nextInt()%k;\n reMain[d]++;\n }\n int p=0;\n if(k%2==0)\n p=k/2;\n else p=(k+1)/2;\n for(int i=1;i<p;i++){\n if(reMain[i]>reMain[k-i])\n num+=reMain[i];\n else\n num+=reMain[k-i];\n \n }\n if(reMain[p]%2==1 && k%2==0)\n num++;\n if(k==2)\n num=reMain[1];\n \n \n System.out.println(num);\n\t}", "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 }", "static int eggDrop(int n, int k) {\r\n if(k == 0 || k == 1) {\r\n return k;\r\n }\r\n\r\n // We need k trials for one egg \r\n // and k floors \r\n if(n == 1) {\r\n return k;\r\n }\r\n \r\n int min = Integer.MAX_VALUE;\r\n int i, res;\r\n // Consider all droppings from \r\n //1st floor to kth floor and \r\n // return the minimum of these \r\n // values plus 1.\r\n for(i = 1; i <= k; i++) { // Mistake 1 : Start for loop from 1 instead of 0\r\n res = Math.max(eggDrop(n-1, i-1), eggDrop(n, k-i));\r\n if(res < min) {\r\n min = res;\r\n }\r\n }\r\n\r\n return min + 1;\r\n }", "public static void combination(int n, int k) {\n\t\tSystem.out.print(n + \" choose \" + k + \" = \");\n\t\ttry {\n\t\t\tif (useFact)\n\t\t\t\tSystem.out.println(combinationFactorial(n, k));\n\t\t\telse\n\t\t\t\tSystem.out.println(combinationRecursive(n, k));\n\t\t} catch (ArithmeticException ex) {\n\t\t\tSystem.out.println(\"LOL!\");\n\t\t}\n\t}", "static boolean isValid(int a[], int n, int k, int max)\r\n\t {\r\n\t int painter = 1, sum = 0;\r\n\t \r\n\t for(int i = 0; i < n; i++)\r\n\t {\r\n\t if(sum + a[i] > max)\r\n\t {\r\n\t painter++;\r\n\t sum = a[i];\r\n\t \r\n\t if(painter > k)\r\n\t return false;\r\n\t }\r\n\t else\r\n\t sum += a[i];\r\n\t }\r\n\t \r\n\t return true;\r\n\t }", "public static int combinationFactorial(int n, int k) {\n\t\treturn fact(n) / (fact(k) * fact(n - k));\n\t}", "public static BigInteger choose(int n, int k) {\n\n\t\t\t if (k > n) return BI0;\n\t\t\t else if (k == 0 || n == k) return BI1;\n\t\t\t else if (k == 1 || k == n-1) return BigInteger.valueOf(n);\n\n\t\t\t List<Integer> nk = Arrays.asList(n, k);\n\t\t\t if (!choose_cache.containsKey(nk)) {\n\t\t\t BigInteger ntok = BI1;\n\t\t\t BigInteger ktok = BI1;\n\t\t\t int min = k;\n\t\t\t if ((n - k) < k) min = n - k;\n\t\t\t for (int i=1; i <= min; i++) {\n\t\t\t ntok = ntok.multiply(BigInteger.valueOf(n));\n\t\t\t ktok = ktok.multiply(BigInteger.valueOf(i));\n\t\t\t n -= 1;\n\t\t\t }\n\n\t\t\t choose_cache.put(nk, ntok.divide(ktok));\n\t\t\t }\n\t\t\t return choose_cache.get(nk);\n\t\t\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 List<List<Integer>> gen_size_k_candidate(Map<List<Integer>, Float> oldCandidate, Integer k){\n\n List<List<Integer>> sizeKPlusCandidate = new ArrayList<>();\n\n // size 2 candidate\n if( k <= 1){\n List<Integer> size1Candidate = new ArrayList<>();\n for (List<Integer> size1: oldCandidate.keySet()){\n size1Candidate.addAll(size1);\n }\n // sort\n Collections.sort(size1Candidate);\n // Generate\n sizeKPlusCandidate = CombinationGenerator.findsort(size1Candidate, 2);\n\n }else {\n List<List<Integer>> oldList = new ArrayList<>();\n oldList.addAll(oldCandidate.keySet());\n\n for(int iOld = 0; iOld < oldList.size()-1; iOld ++){\n for(int jOld =iOld+1; jOld < oldList.size(); jOld++){\n // check k element of feature is the same\n List<Integer> formerList = new ArrayList<>();\n List<Integer> laterList = new ArrayList<>();\n\n for (int fl=0; fl < k-1; fl++){\n formerList.add(oldList.get(iOld).get(fl));\n laterList.add(oldList.get(jOld).get(fl));\n }\n\n if (formerList.equals(laterList)){\n\n HashSet<Integer> tempCandidate = new HashSet<>();\n\n tempCandidate.addAll(oldList.get(iOld));\n tempCandidate.addAll(oldList.get(jOld));\n\n List<Integer> tempCandidateList = new ArrayList<>();\n tempCandidateList.addAll(tempCandidate);\n\n Collections.sort(tempCandidateList);\n // Prunning\n List<List<Integer>> prunningCandidate = CombinationGenerator.findsort(tempCandidateList, k);\n\n int flag = 0;\n for(List<Integer> checkPrun: prunningCandidate){\n if(oldCandidate.containsKey(checkPrun)){\n flag++;\n }\n }\n if (flag == k+1){\n sizeKPlusCandidate.add(tempCandidateList);\n }\n }\n }\n }\n }\n return sizeKPlusCandidate;\n }", "long getLsum(int n, int i, int k){ \r\n return (i-k+1)>=0 ? (i-k+1) + ssum(k) : ssum(k) - ssum(k-i-1);\r\n }", "@Override\r\n\tpublic int runn(int k) {\n\t\treturn 0;\r\n\t}", "public BigInteger calculatePermutations(long n, long k) {\n\t\treturn Factorial.factorial(n).divide(Factorial.factorial(n-k));\n\t}", "private static int solution( int[] arr, int k) {\n\t\tif ( arr == null || arr.length < k ) {\n\t\t\treturn Integer.MIN_VALUE;\n\t\t}\n\t\t\n\t\tint res = -1;\n\t\t\n\t\treturn res;\n\t\t\n\t}", "public int generate(int k) {\n int result = 0;\n\n for (int i = 0; i < k; i++) {\n result = 2 * result + step();\n }\n return result;\n }", "public static void main(String[] args) {\n\t\tint k=3, n=7;\n\t\t\n\t\tSolution sl = new Solution();\n\t\tList<List<Integer>> actual = sl.combinationSum3(k, n);\n\t\t\n\t\tfor (List<Integer> list : actual) {\n\t\t\tfor (int element : list) {\n\t\t\t\tSystem.out.print(element + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n\t\n\t Scanner in = new Scanner(System.in);\n\t int n = in.nextInt();\n\t int k = in.nextInt();\n\t int a[] = new int[n];\n\t for(int a_i=0; a_i < n; a_i++){\n\t a[a_i] = in.nextInt();\n\t }\n\t int count=0;\n\t for(int a1=0;a1<n-1;a1++)\n\t {\n\t \tfor(int b=1;b<n;b++)\n\t \t{\n\t \t if(a[a1]+a[b]%3==0)\n\t \t {\n\t \t\t count++;\n\t \t }\n\t \t}\n\t }\n\t System.out.println(count);\n\n\t}", "public int C(int n, int k) {\n\tif (choose[n][k] != -1)\n\t\treturn choose[n][k];\n\tint t = C(n-1,k-1) + C(n-1,k);\n\tchoose[n][k] = t;\n\treturn t;\n}", "static int numberOfWays(int[] arr, int k) {\n\n Map<Integer, Integer> map = new HashMap<>();\n for (int i = 0; i < arr.length; i++) {\n if (!map.containsKey(arr[i])) {\n map.put(arr[i], 1);\n } else {\n map.put(arr[i], map.get(arr[i]) + 1);\n }\n }\n int result = 0;\n Iterator<Map.Entry<Integer, Integer>> iter = map.entrySet().iterator();\n while (iter.hasNext()) {\n Map.Entry<Integer, Integer> e = iter.next();\n int curNum = (int) e.getKey();\n int countOfOccurance = (int) e.getValue();\n int complement = k - curNum;\n\n if (map.containsKey(complement)) {\n // found target value\n if (curNum == complement) {\n // 3 + 3 = 6\n // add combination of them. count choose 2. For example [3, 3, 3, 3] = 4 choose 2\n result += getCombinationCount(countOfOccurance, 2);\n } else {\n // 1 + 5 = 6\n result += countOfOccurance;\n }\n }\n iter.remove();\n }\n\n return result;\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 subarraySumLeetCode(int[] nums, int k) {\n int count = 0;\n for (int start = 0; start < nums.length; start++) {\n for (int end = start + 1; end <= nums.length; end++) {\n int sum = 0;\n for (int i = start; i < end; i++) {\n sum += nums[i];\n }\n if (sum == k) {\n count++;\n }\n }\n }\n return count;\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint arr[] = new int[n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tarr[i] = sc.nextInt();\n\t\t}\n\t\tint sum = sc.nextInt();\n\t\tHashMap<Integer,Integer> map = new HashMap<>();\n \t\tArrays.sort(arr);\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint temp = arr[i];\n\t\t\tint reqSum = sum-temp;\n\t\t\tarr[i]=0;\n\t\t\tint l=0;\n\t\t\tint r = n-1;\n\t\t\twhile(l<r) {\n\t\t\t\t//System.out.println(\"l \" + l + \" r \" + r + \" i = \"+ i);\n\t\t\t\tif(arr[l] + arr[r]==reqSum && arr[l]!=0 && arr[r]!=0 ) {\n\t\t\t\t\tint arr2[] = new int[3];\n\t\t\t\t\tarr2[0] = temp;\n\t\t\t\t\tarr2[1] = arr[l];\n\t\t\t\t\tarr2[2] = arr[r];\n\t\t\t\t\tif(map.containsKey(arr2[0]) || map.containsKey(arr2[1]) || map.containsKey(arr2[2])) {\n\t\t\t\t\t\t\n\t\t\t\t\t}else {\n\t\t\t\t\t\tArrays.sort(arr2);\n\t\t\t\t\t\tSystem.out.println(arr2[0] + \" \" + arr2[1] + \" \" + arr2[2]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tl++;\n\t\t\t\t}else if(arr[l] + arr[r] < reqSum) {\n\t\t\t\t\tl++;\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tr--;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tarr[i] = temp;\t\n\t\t\tmap.put(arr[i], 1);\n\t\t}\n\t}", "public static int countP(int n, int k) {\n // Base cases\n if (n == 0 || k == 0 || k > n)\n return 0;\n if (k == 1 || k == n)\n return 1;\n\n // S(n+1, k) = k*S(n, k) + S(n, k-1)\n return (k * countP(n - 1, k)\n + countP(n - 1, k - 1));\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 static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n if (n == 1) \n System.out.println(\"Kaprekar number\");\n // Count number of digits in square \n int sq_n = n * n; \n int count_digits = 0; \n int sum=0;\n while (sq_n != 0) \n { \n count_digits++; \n sq_n /= 10; \n } \n sq_n = n*n; // Recompute square as it was changed \n // Split the square at different poitns and see if sum \n // of any pair of splitted numbers is equal to n. \n for (int r_digits=1; r_digits<count_digits; r_digits++) \n { \n int eq_parts = (int) Math.pow(10, r_digits); \n \n // To avoid numbers like 10, 100, 1000 (These are not \n // Karprekar numbers \n if (eq_parts == n) \n continue; \n \n // Find sum of current parts and compare with n \n sum = sq_n/eq_parts + sq_n % eq_parts; \n }\n if (sum == n){\n System.out.println(\"Kaprekar number\");\n }else{\n System.out.println(\"Not a Kaprekar number\");\n }\n }", "public static int eggDrop(int n, int k) {\n\t\tif(k == 0 || k==1) {\n\t\t\treturn k;\n\t\t}\n\t\tif(n==1) {\n\t\t\treturn k;\n\t\t}\n\t\tint res = 0;\n\t\tint min = Integer.MAX_VALUE;\n\t\tint x;\n\t\tfor(x=1; x<=k; x++) {\n\t\t\tres = 1+Math.max(eggDrop(n-1, x-1), eggDrop(n, k-x));\n\t\t\tif(res < min)min = res;\n\t\t}\n\t\treturn min+1;\n\t}", "public int generate(int k) {\n int r = 0;\n for (int i = 0; i < k; i++) {\n r = (r*2) + step();\n }\n return r;\n }", "public boolean checkSubarraySum(int[] nums, int k) {\n int N = nums.length;\n if (N == 0)\n return false;\n Map<Integer, Integer> m = new HashMap();\n int sum = 0;\n m.put(0, -1);\n for (int i = 0; i < N; i++) {\n sum += nums[i];\n if (k != 0 )\n sum %= k;\n if (m.containsKey(sum)) {\n if (i - m.get(sum) >= 2)\n return true;\n } else {\n m.put(sum, i);\n }\n }\n return false;\n }", "public static int coeficienteBinomial(int n, int k) {\n int res = 0;\n res = factorial(n) /( factorial(k) * factorial(n-k));\n return res;\n }", "public static int maxSum(int[] a, int k) \n {\n PriorityQueue<Integer> pq = new PriorityQueue<>(); \n for (int x : a) \n pq.add(x); \n \n // Do k negations by removing a minimum element k times \n while (k-- > 0) \n { \n // Retrieve and remove min element \n int temp = pq.poll(); \n \n // Modify the minimum element and add back \n // to priority queue \n temp *= -1; \n pq.add(temp); \n } \n \n // Compute sum of all elements in priority queue. \n int sum = 0; \n for (int x : pq) \n sum += x; \n return sum; \n }", "public int subarraySumLeetcode3(int[] nums, int k) {\n int count = 0, sum = 0;\n HashMap<Integer, Integer> map = new HashMap<>();\n map.put(0, 1);\n for (int i = 0; i < nums.length; i++) {\n sum += nums[i];\n if (map.containsKey(sum - k)) {\n count += map.get(sum - k);\n }\n map.put(sum, map.getOrDefault(sum, 0) + 1);\n }\n return count;\n }", "public int kth1(int k) {\n\t int[] dp = new int[k];\n\t int indexTwo = 0;\n\t int indexThree = 0; \n\t int numberOfTwo = 2;\n\t int numberOfThree = 3;\n\t int nextNumber = 1;\n\t dp[0] = 1;\n\t for (int i = 1 ; i < k ; i++) {\n\t nextNumber = Math.min(numberOfTwo, numberOfThree);\n\t dp[i] = nextNumber;\n\t if (nextNumber == numberOfTwo) {\n\t indexTwo += 1;\n\t numberOfTwo = dp[indexTwo] * 2;\n\t }\n\t if (nextNumber == numberOfThree) {\n\t indexThree +=1;\n\t numberOfThree = dp[indexThree] * 3;\n\t }\n\t }\n\t return nextNumber;\n\t }", "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 }", "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}", "static int traderProfit(int k, int n, int[] A) {\n\t\t\n\t\treturn traderProfit(k, A,0);\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 int q = in.nextInt();\n\n int a[] = new int[n];\n for(int a_i=0; a_i < n; a_i++){\n a[a_i] = in.nextInt();\n }\n\n int fist;\n int last;\n\n //brute force will get timeout\n for(int i = 0; i< k; i++){\n fist = a[0];\n last = a[n-1];\n a[0] = last;\n for (int j = 1; j<n; j++){\n last = a[j];\n a[j] = fist;\n fist = last;\n }\n }\n\n for(int a0 = 0; a0 < q; a0++){\n System.out.println(a[in.nextInt()]);\n }\n\n\n }", "public boolean checkSubarraySum(int[] nums, int k) {\n\n if (nums == null) {\n return false;\n }\n\n Map<Integer, Integer> sums = new HashMap<>();\n\n int runningSum = 0;\n\n // sums.put(0, -1);\n for (int i = 0; i < nums.length; i++) {\n int n = nums[i];\n runningSum += n;\n if (k != 0) {\n runningSum %= k;\n }\n\n\n // if a number is followed by 6 or 0, the next modulo does not change, which is okay\n // however, if there are several 0s in sequence, it is still fine to have consecutive zeroes and the solution should still work\n // e.g. consider 5, 2, 4 and k = 6. The moduloes look like 5, 1, 5 and there need to be atleast 2 numbers processed between both moduloes\n // in the case of 0, 0 and k = 0, the moduloes are 0,0 but the solution is still valid, even though the indexes are next to each other. so we add 0,-1 to fix this condition\n sums.put(0, -1);\n if (sums.containsKey(runningSum)) {\n\n // the modulo numbers cannot be adjacent to each other, so difference in indexes must be at least 2.\n // special conditions are 6 and 0/\n if (i - sums.get(runningSum) >= 2) {\n return true;\n }\n } else {\n sums.put(runningSum, i);\n }\n }\n\n return false;\n }", "private static int solution1(int[] arr, int k) {\n\t\tif ( arr == null || arr.length < k ) {\n\t\t\treturn Integer.MIN_VALUE;\n\t\t}\n\t\t\n\t\tint[] a = Arrays.copyOfRange( arr, 0, arr.length );\n\t\tdisplayArray(a);\n\t\tArrays.sort(a);\n\t\tdisplayArray(a);\n\t\t\n\t\treturn a[a.length - k];\n\t}", "public static void main(String[] args) {\n\n boolean isTrue = false;\n int[] numbers = { 10, 15, 3, 1, 6, 16, 8 };\n int k = 17;\n\n for (int i = 0; i < (numbers.length-1); i++) {\n for (int j = (i+1); j < numbers.length; j++) {\n if (numbers[i] + numbers[j] == k) {\n isTrue = true;\n break;\n }\n }\n }\n System.out.println(isTrue);\n }", "public static ArrayList<ArrayList<Integer>> combine1(int n, int k) {\r\n\tArrayList<ArrayList<Integer>> result = new ArrayList<ArrayList<Integer>>();\r\n\tif (n < 1 || k < 1) {\r\n\t return result;\r\n\t}\r\n\tif (n < k) {\r\n\t return result;\r\n\t}\r\n\tif (k == 1) {\r\n\t for (int i = 1; i <= n; i++) {\r\n\t\tArrayList<Integer> aResult = new ArrayList<Integer>();\r\n\t\taResult.add(i);\r\n\t\tresult.add(aResult);\r\n\t }\r\n\t return result;\r\n\t}\r\n\r\n\tfor (int i = n; i > 0; i--) {\r\n\t ArrayList<ArrayList<Integer>> temp = combine1(i - 1, k - 1);\r\n\t for (ArrayList<Integer> aResult : temp) {\r\n\t\taResult.add(i);\r\n\t }\r\n\t result.addAll(temp);\r\n\t}\r\n\r\n\t// get rid of duplicate sets\r\n\tLinkedHashSet<ArrayList<Integer>> finalResult = new LinkedHashSet<ArrayList<Integer>>();\r\n\tfor (ArrayList<Integer> aResult : result) {\r\n\t Collections.sort(aResult);\r\n\t finalResult.add(aResult);\r\n\t}\r\n\tresult = new ArrayList<ArrayList<Integer>>(finalResult);\r\n\r\n\treturn result;\r\n }", "public static void generateRandomNumbers(int n)\n\t{\n\t\t\tlong startTime = 0;\n\t\t\tlong endTime = 0;\n\t\t\tlong timeTaken = 0;\n\t\t\tint minimum = -20;\n\t\t\tint maximum = 20;\n\t\t\t//maximum subarray\n\t\t\tint maximumSum=0;\n\t\t\t// initialize length of array of integers to n\n\t\t \tint A [] = new int[n];\n\t\t \t// get instance of Random() to generate random numbers between -20 and 20\n\t\t \tRandom rand = new Random();\n\t for(int k =0;k<n;k++)\n\t {\n\t \tint randomNum = minimum + rand.nextInt((maximum - minimum) + 1);\n\t \t\tA [k]= randomNum;\n\t \t}\n\t startTime = System.currentTimeMillis();\n\t maximumSum = jKadaneAlgo(A,n);\n\t // System.out.println(\"Maximum Subarray: \"+maximumSum);\n\t // time in milliseconds after completion of J Kadane Algorithm logic\n\t endTime = System.currentTimeMillis();\n\t // calculate total time taken\n\t timeTaken = endTime-startTime;\n\t System.out.println(\"Total time - J Kadane dynamic programming algo: \"+timeTaken+\"ms\");\n\t // time in milliseconds before calling J Kadane Algorithm logic\n\t startTime = System.currentTimeMillis();\n\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\t\tScanner sc = new Scanner(System.in);\r\n\t\tint t = sc.nextInt();\r\n\t\tfor (int k = 1; k <= t; k++) {\r\n\t\t\tn = sc.nextInt();\r\n\t\t\tb = sc.nextInt();\r\n\t\t\ta = new int[n + 1];\r\n\r\n\t\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\t\ta[i] = sc.nextInt();\r\n\t\t\t}\r\n\r\n\t\t\ttotal = Integer.MAX_VALUE;\r\n\t\t\tans = 0;\r\n\r\n\t\t\tfor (int j = 0; j < n; j++) {\r\n\t\t\t\tgetSub(a[j], j);\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"#\" + k + \" \" + ans);\r\n\t\t}\r\n\r\n\t}", "public static String KthPermutation(int n, int k){\n if(n > 9 || k <= 0) return \"\";\n if(n == 1) return \"1\";\n\n int[] factors = new int[n + 1];\n factors[0] = 1;\n for(int i = 1; i <= n; i++) factors[i] = factors[i - 1] * i;\n\n k = k - 1;\n k = k % factors[n];\n\n StringBuilder nums = new StringBuilder(\"123456789\");\n StringBuilder permutation = new StringBuilder();\n for(int i = n - 1; i >= 0; i--){\n int curNum = k / factors[i];\n permutation.append(nums.charAt(curNum));\n nums.deleteCharAt(curNum);\n k = k - curNum * factors[i];\n }\n return permutation.toString();\n }", "public int count(int n, int k)\n {\n\n long MOD = 1000000007;\n long res;\n\n res = (long)Math.pow(k, n);\n Map<Integer, Integer> divisor = new HashMap<>();\n\n long count = 0;\n for(int i = 2; i <= k; i++) {\n if(!(i % 2 == 0 && divisor.containsKey(i / 2))) {\n int div = divisorCount(i);\n divisor.put(i, div);\n count += div - 1;\n }\n else{\n int log2 = 31 - Integer.numberOfLeadingZeros(i);\n int div;\n if(Math.pow(2, log2) == i){\n div = divisor.get(i / 2) + 1;\n\n }\n else\n div = divisor.get(i / 2) * 2;\n\n divisor.put(i, div);\n count += div - 1;\n\n }\n\n }\n\n res -= (n - 1) * Math.pow(k, n - 2) * count;\n return (int)(res % MOD);\n }", "public int numWays(int n, int k) {\n if(n == 0)\n return 0;\n int numsDiff = k;\n int numsSame = 0;\n for(int i = 2; i <= n; i++){\n int preSame = numsSame;\n numsSame = numsDiff;\n numsDiff = preSame * (k - 1) + numsDiff * (k - 1);\n }\n return numsSame + numsDiff;\n }", "public static void main(String[] args) {\n int n = 7;\n int k = 4;\n\n iterativeCombinationAlgorithm(n, k);\n }", "public static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint t = sc.nextInt();\n\t\twhile(t-->0)\n\t\t{\n\t\t int n = sc.nextInt();\n\t\t long[] arr = new long[n];\n\t\t long sum=0;\n\t\t for(int i=0;i<n;i++)\n\t\t {\n\t\t arr[i]=sc.nextLong();\n\t\t sum=sum+arr[i];\n\t\t }\n\t\t int i, k=0;\n\t\t double x=(double)sum/n;\n for(i=0;i<n;i++){\n if(arr[i]==x) \n {\n k=i; \n break;\n \n }\n }\n if(i==n)\n System.out.println(\"Impossible\");\n else \n System.out.println(k+1);\n\t\t}\n\t\t \n\t}", "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 }", "public static void main(String[] args) {\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tint N = in.nextInt();\r\n\t\tint K = in.nextInt();\r\n\t\tint luck_balance = 0;\r\n\t\tArrayList<Integer> important_contests = new ArrayList<Integer>();\r\n\t\tfor (int i = 0; i < N; i++) {\r\n\t\t\tint amount = in.nextInt();\r\n\t\t\tint importance = in.nextInt();\r\n\t\t\tluck_balance += amount;\r\n\t\t\tif (importance == 1) {\r\n\t\t\t\timportant_contests.add(amount);\r\n\t\t\t}\r\n\t\t}\r\n\t\tCollections.sort(important_contests);\r\n\t\tfor (int i = 0; i < important_contests.size() - K; i++) {\r\n\t\t\tluck_balance = luck_balance - 2 * important_contests.get(i);\r\n\t\t}\r\n\t\tSystem.out.println(luck_balance);\r\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 }", "public void combineTwo(int n, int k) {\n // init first combination\n LinkedList<Integer> nums = new LinkedList<Integer>();\n for(int i = 1; i < k + 1; ++i)\n nums.add(i);\n nums.add(n + 1); //add as a sentinel\n\n List<List<Integer>> output = new ArrayList<>();\n int j = 0;\n //the while loop breaks when you have processed the first k combinations\n while (j < k) {\n // add current combination\n output.add(new LinkedList(nums.subList(0, k)));\n //\n // if nums[j] + 1 == nums[j + 1] increase nums[j] by one\n // the loop breaks when nums[j] + 1 != nums[j + 1]\n j = 0;\n while ((j < k) && (nums.get(j + 1) == nums.get(j) + 1))\n nums.set(j, j++ + 1);\n nums.set(j, nums.get(j) + 1); //increment the number at jth index\n }\n this.possibleCombinations = output;\n }", "public ArrayList<ArrayList<Integer>> combine(int n, int k) {\r\n\r\n\tArrayList<ArrayList<Integer>> result = new ArrayList<ArrayList<Integer>>();\r\n\r\n\t// Key: constraints of recursion\r\n\tif (n < 1 || n < k || k < 1)\r\n\t return result;\r\n\r\n\tif (k == 1) {\r\n\t for (int i = 1; i <= n; i++) {\r\n\t\tArrayList<Integer> aList = new ArrayList<Integer>();\r\n\t\taList.add(i);\r\n\t\tresult.add(aList);\r\n\t }\r\n\t return result;\r\n\t}\r\n\r\n\tfor (int i = n; i > 0; i--) {\r\n\t ArrayList<ArrayList<Integer>> temp = combine(i - 1, k - 1);\r\n\r\n\t for (ArrayList<Integer> aList : temp) {\r\n\t\taList.add(i);\r\n\t }\r\n\r\n\t result.addAll(temp);\r\n\t}\r\n\r\n\treturn result;\r\n }", "static double geometricSum(int k) {\n\t\tif (k==0) \n\t\t\treturn 1; // Endpoint\n\t\telse \n\t\t\treturn 1/Math.pow(2,k) + geometricSum(k-1); \n\t}", "public static void main(String[] args) {\n\t\tArrayList<Integer> primelist = sieve(7071);\n\t\tArrayList<Double> second = new ArrayList<Double>();\n\t\tfor(int one : primelist) \n\t\t\tsecond.add(Math.pow(one, 2));\n\t\tArrayList<Double> third = new ArrayList<Double>();\n\t\tprimelist = sieve(368);\n\t\tfor(int one : primelist)\n\t\t\tthird.add(Math.pow(one, 3));\n\t\tArrayList<Double> fourth = new ArrayList<Double>();\n\t\tprimelist = sieve(84);\n\t\tfor(int one : primelist)\n\t\t\tfourth.add(Math.pow(one, 4));\n\n\t\tArrayList<Double> possibilities = new ArrayList<Double>();\n\t\tfor (int k = fourth.size() - 1; k >=0 ; k--) {\n\t\t\tfor (int j = 0; j < third.size(); j++) {\n\t\t\t\tdouble sum = fourth.get(k) + third.get(j);\n\t\t\t\tif (sum > 50000000)\n\t\t\t\t\tbreak;\n\t\t\t\telse {\n\t\t\t\t\tfor (int i = 0; i < second.size(); i++) {\n\t\t\t\t\t\tdouble nextsum = sum + second.get(i);\n\t\t\t\t\t\tif (nextsum > 50000000)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// I am not sure whether it can be proved that the sum is unique.\n\t\t\t\t\t\t\tif (!possibilities.contains(nextsum))\n\t\t\t\t\t\t\t\tpossibilities.add(nextsum);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint totalcount = possibilities.size();\n\t\tSystem.out.println(totalcount);\n\t}", "private boolean feasible() {\n\t\tint weight = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tassert x[i] == 0 || x[i] == 1;\n\t\t\tweight += w[i] * x[i];\n\t\t}\n\t\treturn weight <= k;\n\t}", "public static Set<Set<Object>> createSubsets(int n, int k) {\n Set<Set<Object>> power_set = new HashSet<Set<Object>>(); //power set\n Set<Set<Object>> set_of_subsets = new HashSet<Set<Object>>(); //only \"tickets\" set\n List<Object> set_list = new ArrayList<Object>(); //set\n \n double power_set_size;\n int mask;\n \n //determine the size of a power set\n power_set_size = Math.pow(2, n);\n \n //create a list containing all numbers from 1 to n\n for (int i = 0; i < n; i++) {\n set_list.add(i+1);\n }\n \n //create a powerset based on the set\n for(int i = 0; i < power_set_size; i++){\n \n Set<Object> subset = new HashSet<Object>();\n mask = 1;\n \n for(int j = 0; j < n; j++){\n \n if((mask & i) != 0){\n subset.add(set_list.get(j));\n }\n mask = mask << 1;\n }\n power_set.add(subset);\n }\n \n //pick all the subsets from a power set that are size k\n for(Set<Object> curr_subset : power_set) {\n if(curr_subset.size() == k) {\n set_of_subsets.add(curr_subset);\n }\n }\n return set_of_subsets;\n }", "public String getPermutation(int n, int k) {\n if(n<1)\n return null;\n List<Long> list=new LinkedList<Long>();\n for(long i=1;i<=n;i++){\n list.add(i);\n }\n long kk=k-1;\n StringBuilder res=new StringBuilder();\n long total=1;\n for(long i=2;i<n;i++){\n total*=i;\n }\n for(long i=n-1;i>=0;i--){\n res.append(list.remove((int)(kk/total)));\n kk=kk%total;\n if(i>0)\n total=total/i;\n }\n return res.toString();\n }", "public boolean checkSubarraySum(int[] nums, int k){\n\t\tif(nums == null || nums.length == 0)\n\t\t\treturn false;\n\t\tint sum = 0;\n\t\tHashMap<Integer, Integer> map = new HashMap<>();\n\t\tmap.put(0,-1);\n\t\tfor( int i = 0; i<nums.length; i++){\n\t\t\tsum+=nums[i];\n\t\t\tif(k!=0)\n\t\t\t\tsum = sum % k;\n\t\t\tif(map.containsKey(sum)){\n\t\t\t\tif(i - map.get(sum) > 1)\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tmap.put(sum,i);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Override \n public int binom(int n, int k){\n this.binumInputCheck(n, k);\n if ( n == 0 || k == 0 || n == k )\n return 1;\n \n if(k > n/2)\n k = n - k; \n \n if(this.saveArr[n][k] != 0)\n return this.saveArr[n][k];\n \n this.saveArr[n][k] = binom(n-1, k-1) + binom(n-1, k);\n return this.saveArr[n][k];\n }", "public static int numSubarrayProductLessThanK(int[] nums, int k) {\n if(k <= 1) return 0;\n int prod = 1;\n int left = 0;\n int ans = 0;\n \n for (int right = 0; right < nums.length; right++) {\n prod *= nums[right];\n \n while(prod >= k) {\n prod /= nums[left];\n left++;\n }\n ans += right - left + 1; \n }\n \n return ans;\n }", "public void sum(int n) {\n int sum = 0;\n for (int j = 0; j < n; j++) // 2n+2\n sum += j;\n for (int k = 0; k < n; k++) // 2n+2\n sum += k;\n for (int l = 0; l < n; l++) //2n+2\n sum += l;\n }", "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 int solution(int K, int[] A) {\n \n int total =0;\n int currentLength=0;\n \n for(int i=0; i<A.length; i++){\n currentLength = currentLength + A[i];\n if(currentLength >= K){\n total++;\n currentLength=0; // update\n }\n }\n return total;\n }", "private static int solution3( int[] arr, int k) {\n\t\tif ( arr == null || arr.length < k ) {\n\t\t\treturn Integer.MIN_VALUE;\n\t\t}\n\t\t\n\t\t// Store the first k elements in a temporary array\n\t\tint[] tmp = Arrays.copyOfRange( arr, 0, k);\n\t\tint[] a = Arrays.copyOfRange( arr, 0, arr.length);\n\t\tint res = Integer.MAX_VALUE;\n\t\t\n\t\t\n\t\t// Loop for n-k times: each times for element in a[k] to a[n-1], find the largest to switch with tmp[j] for j = 0 to k-1\n\t\tfor ( int i = 0; i < k; ++i ) {\n\t\t\tint max = tmp[i];\n\t\t\tint index = i;\n\t\t\t\n\t\t\tfor ( int j = k; j < a.length; ++j ) {\n\t\t\t\tif ( a[j] > max ) {\n\t\t\t\t\tmax = a[j];\n\t\t\t\t\tindex = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( index != i ) {\n\t\t\t\ta[index] = tmp[i];\n\t\t\t\ttmp[i] = max;\n\t\t\t}\n\t\t\t\n\t\t\tres = Math.min(res, tmp[i]);\n\t\t}\n\t\t\n\t\t\n\t\treturn res;\n\t}", "private static BigInteger binomial(int n, int k) {\n BigInteger ret = new BigInteger(\"1\");\n if (k > n) {\n return BigInteger.ZERO;\n } else {\n \tif (binom[n][k] != null) {\n \t\treturn binom[n][k];\n \t}\n if (k > n / 2) {\n k = n - k;\n }\n // (n choose i+1) = (n choose i) * (n - i) / (i + 1)\n for (int i = 0; i < k; i++) {\n ret = ret.multiply(BigInteger.valueOf(n - i)).divide(BigInteger.valueOf(i + 1));\n }\n }\n return binom[n][k] = ret;\n }", "static int getMinimumCost(int k, Integer[] c) {\n\tArrays.sort(c, Collections.reverseOrder());\n\tint[] num = new int[k];\n\tint total = 0;\n\tfor (int ind = 0; ind < c.length; ind++) {\n\t int v = ind % k;\n\t total += (num[v]++ + 1) * c[ind];\n\t}\n\n\treturn total;\n }", "public List<Integer> pickRandom(int n, int k) {\n\t\tList<Integer> wynik = new ArrayList<Integer>();\n\t Random random = new Random();\n\t Set<Integer> picked = new HashSet<>();\n\t while(picked.size() < n) {\n\t \tint sizeNaPoczatku = picked.size();\n\t \tint znaleziona = random.nextInt(k);\n\t picked.add(znaleziona);\n\t int sizeNaKoncu = picked.size();\n\t if(sizeNaPoczatku != sizeNaKoncu) {\n\t \twynik.add(znaleziona);\n\t }\n\t }\n\t return wynik;\n\t}", "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 long binom(int n, int k) {\n if (k > n || n < 0 || k < 0) {\n return 0;\n }\n\n if (bin == null)\n bin = new ArrayList<ArrayList<Long>>();\n\n if (bin.size() <= n) {\n for (int i = bin.size(); i <= n; i++) {\n ArrayList<Long> newList = new ArrayList<Long>();\n bin.add(newList);\n }\n }\n\n if (bin.get(n).size() <= k) {\n for (int i = 0; i <= n; i++) {\n if (bin.get(i).size() <= k && bin.get(i).size() <= i) {\n for (int j = bin.get(i).size(); j <= k && j <= i; j++) {\n bin.get(i).add(Long.valueOf(0));\n }\n }\n }\n }\n\n return recBinom(n, k);\n }", "public int coeff(int n, int k) {\n // Insert your code here\n return fact(n) / (fact(k) * fact(n - k));\n }", "public static void main(String[] args) {\n\t\tList<Integer> nums = new ArrayList<Integer>();\n\t\tint n, k;\n\n\t\tSystem.out.println(\"================= n=2, k=1 =====================\");\n\t\tn = 2;\n\t\tk = 1;\n\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tnums.add(i);\n\t\t}\n\t\t\n\t\tk = k - 1;\n\t\tplay(n, k, 0, nums);\n\t\t\n\t\tSystem.out.println(nums);\n\t\t\n\t\tSystem.out.println(\"================= n=4, k=2 =====================\");\n\t\tnums.clear();\n\t\tn = 4;\n\t\tk = 2;\n\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tnums.add(i);\n\t\t}\n\t\t\n\t\tk = k - 1;\n\t\tplay(n, k, 0, nums);\n\t\t\n\t\tSystem.out.println(nums);\n\t\t\n\t\tSystem.out.println(\"================= n=40, k=7 =====================\");\n\t\tnums.clear();\n\t\tn = 40;\n\t\tk = 7;\n\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tnums.add(i);\n\t\t}\n\t\t\n\t\tk = k - 1;\n\t\tplay(n, k, 0, nums);\n\t\t\n\t\tSystem.out.println(nums);\n\t\t\n\t\tSystem.out.println(\"================= n=50, k=10 =====================\");\n\t\tnums.clear();\n\t\tn = 50;\n\t\tk = 10;\n\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tnums.add(i);\n\t\t}\n\t\t\n\t\tk = k - 1;\n\t\tplay(n, k, 0, nums);\n\t\t\n\t\tSystem.out.println(nums);\n\t}", "static double k(int n, final double x) {\n n = Math.abs(n);\n if (n > 31) {\n return Double.POSITIVE_INFINITY; // overflow\n }\n if (x <= 0) {\n return Double.NaN; // domain error or singularity\n }\n if (x <= 9.55) {\n double ans = 0;\n final double z0 = 0.25 * x * x;\n double fn = 1;\n double pn = 0;\n double zmn = 1;\n final double tox = 2 / x;\n double s, t, k;\n\n if (n > 0) {\n // compute factorial of n and psi(n)\n pn = -Constants.EULER;\n k = 1;\n for (int i = 1; i < n; ++i) {\n pn += 1 / k;\n fn *= ++k;\n }\n zmn = tox;\n if (n == 1) {\n ans = 1 / x;\n } else {\n double nk1f = fn / n;\n double kf = 1;\n s = nk1f;\n final double z = -z0;\n double zn = 1;\n for (int i = 1; i < n; ++i) {\n nk1f /= (double) (n - i);\n kf *= (double) i;\n zn *= z;\n t = nk1f * zn / kf;\n s += t;\n if ((Double.MAX_VALUE - Math.abs(t)) < Math.abs(s)) {\n return Double.POSITIVE_INFINITY; // overflow\n }\n if (tox > 1 && Double.MAX_VALUE / tox < zmn) {\n return Double.POSITIVE_INFINITY; // overflow\n }\n zmn *= tox;\n }\n s *= 0.5;\n t = Math.abs(s);\n if (zmn > 1 && Double.MAX_VALUE / zmn < t) {\n return Double.POSITIVE_INFINITY; // overflow\n }\n if (t > 1 && Double.MAX_VALUE / t < zmn) {\n return Double.POSITIVE_INFINITY; // overflow\n }\n ans = s * zmn;\n }\n }\n final double t1g = 2 * Math.log(0.5 * x);\n double pk = -Constants.EULER;\n if (n == 0) {\n pn = pk;\n t = 1;\n } else {\n pn += 1.0 / n;\n t = 1 / fn;\n }\n s = (pk + pn - t1g) * t;\n k = 1;\n do {\n t *= z0 / (k * (k + n));\n pk += 1 / k;\n pn += 1 / (k + n);\n s += (pk + pn - t1g) * t;\n ++k;\n } while (Math.abs(t / s) > Constants.MACHINE_PRECISION);\n s = 0.5 * s / zmn;\n if ((n & 1) != 0) {\n s = -s;\n }\n return ans + s;\n } else {\n // asymptotic expansion\n if (x > MAXLOG) {\n return 0; // underflow\n }\n final double k = (double) n;\n final double pn = 4 * k * k;\n double pk = 1;\n final double z0 = 8 * x;\n double fn = 1;\n double t = 1;\n double s = t;\n double nkf = Double.MAX_VALUE;\n int i = 0;\n do {\n final double z = pn - pk * pk;\n t = t * z / (fn * z0);\n final double nk1f = Math.abs(t);\n if (i >= n && nk1f > nkf) {\n return Math.exp(-x) * Math.sqrt(Math.PI / (2 * x)) * s;\n }\n ++i;\n nkf = nk1f;\n s += t;\n ++fn;\n pk += 2;\n } while (Math.abs(t / s) > Constants.MACHINE_PRECISION);\n return Math.exp(-x) * Math.sqrt(Math.PI / (2 * x)) * s;\n }\n }", "public static long maximumSubarraySum_bf(int[] nums, int k) {\n int len = nums.length;\n\n long ans = 0;\n for (int i = 0; i <= len - k; i++) {\n long sum = 0;\n Set<Integer> set = new HashSet<>();\n for (int j = 0; j < k; j++) {\n if (set.contains(nums[i + j])) {\n sum = 0;\n break;\n }\n\n set.add(nums[i + j]);\n sum += nums[i + j];\n }\n\n ans = Math.max(ans, sum);\n }\n\n return ans;\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 }", "public static void main(String[] args) {\n\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\t\n\t\t\tint N = sc.nextInt();\n\t\t\t\n\t\t\tint arr [] = new int[N];\n\t\t\tint k = 0;\n\t\t\tfor(int i = 0;i<N;i++) {\n\t\t\t\tarr[i]=sc.nextInt();\n\t\t\t}\n\t\t\tArrays.sort(arr);\n\t\t\t\n\t\tfor(int i=N-1;i>-1;i--) {\n\t\t\tif(k<arr[i]*(N-i)) {\n\t\t\t\tk=arr[i]*(N-i);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(k);\n\t\tsc.close();\n\t\t\t\n\t}", "static void subsetSums(int arr[], int n)\n {\n \n // There are totoal 2^n subsets\n int total = 1 << n;\n \n // Consider all numbers from 0 to 2^n - 1\n for (int i = 0; i < total; i++) {\n int sum = 0;\n \n // Consider binary reprsentation of\n // current i to decide which elements\n // to pick.\n for (int j = 0; j < n; j++)\n if ((i & (1 << j)) != 0)\n sum += arr[j];\n \n // Print sum of picked elements.\n System.out.print(sum + \" \");\n }\n }", "public int digitCounts(int k, int n) {\n if (k <= 0 || n < 0) {\n return 0;\n }\n if (n == 0) {\n return 1;\n }\n// int res=0;\n ArrayList<Integer> arrayList = new ArrayList<>();\n for (int i = 0; i <= k; i++) {\n\n if ((i + \"\").indexOf(n + \"\") != -1) {\n arrayList.add(i);\n }\n }\n System.out.println(Arrays.asList(arrayList) + \" have \" + (arrayList.toString().length() - arrayList.toString().replace(n + \"\", \"\").length()) + \" n ( n = \" + n + \" )\");\n return arrayList.size();\n }", "public int calculateNthPrime(int k) {\n\t\t// TODO Write an implementation for this method declaration \n\t\tint i =1;\n\t\tint testnum = 2;\n\t\tboolean isPrime = true; \n\t\tif(k == 0) {\n\t\t\tthrow new IllegalArgumentException(\"number cannot be 0 or 1\");\n\t\t}\n\t\twhile(i < k+1) {\n\t\t\tfor(int j = 2; j < testnum; j++) {\n\t\t\t\t\n\t\t\t\tif(testnum % j == 0) {\n\t\t\t\t\tisPrime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isPrime == true) {\n\t\t\t\t//System.out.println(\"test num\" + \" \" + testnum);\n\t\t\t\ttestnum++;\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse if(isPrime == false) {\n\t\t\t\t//System.out.println(\"composite\" + \" \" + testnum);\n\t\t\t\ttestnum++;\n\t\t\t\tisPrime = true;\n\t\t\t}\n\t\t}\n\t\ti--;\n\t\ttestnum--;\n\t\t//System.out.println(i + \" \" + testnum);\n\n\t\treturn testnum;\n\t}", "private static long combination(int n, int r) {\n if (r > n || n <= 0 || r <= 0) {\n throw new IllegalArgumentException(\"r must be smaller than n and both n and r must be positive ints\");\n }\n long result = 1;\n for (int i = r + 1; i <= n; i++) {\n result = result * i;\n }\n long nMinusRFactorial = factorial(n - r);\n result = result / nMinusRFactorial;\n// System.out.println(\"C(\" + n + \", \" + r + \") = \" + result);\n return result;\n }", "public void sum2(int n){\n int sum =0; //1\n for (int j = 0; j < n; j++) //2n+2\n for (int k = 0; k < n; k++) //2n+2\n sum += k + j; //1\n for (int l = 0; l < n; l++) //2n+2\n sum += l; //1\n }", "static long journey(int[] path, int k) {\n calculateSumRecursive(path,k,0,0);\n return maxSum;\n }", "private static int select (int[] arr, int p, int n, int k){\n //threshold of 17\n if(n < 17 ){\n insertionSort(arr, p, p+n-1);\n return arr[p + n - k];\n }else{\n int q = randomizedPartition(arr,p,p+n-1);\n int left = q-p;\n int right = n - left - 1;\n if(right >= k)\n return select(arr,q+1,right,k);\n else if(right + 1 == k )\n return arr[q];\n else\n return select(arr,p,left,k-right-1);\n }\n }", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint[] num = new int[N];\n\t\tfor (int i=0;i<N;i++) {\n\t\t\tnum[i] = scan.nextInt();\n\t\t\tif (num[i] == 1) {\n\t\t\t\tlist.add(i);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (int i=0;i<=list.size()-K;i++) {\n\t\t\tSystem.out.println(list.get(i+K-1)-list.get(i)+1);\n\t\t\tresult.add(list.get(i+K-1)-list.get(i)+1);\n\t\t}\n\t\tCollections.sort(result);\n\t\tif (result.size()==0) System.out.println(\"-1\");\n\t\telse System.out.println(result.get(0));\n\t}", "public static long solve(long[] data, long k) {\n int n = data.length;\n\n Buffer<Interval> buffer = new Buffer<>(Interval::new, x -> {}, n * 2);\n\n Randomized.shuffle(data);\n Arrays.sort(data);\n\n List<Interval> lastLevel = new ArrayList<>(n);\n List<Interval> curLevel = new ArrayList<>(n);\n lastLevel.add(newInterval(buffer, 0, n - 1));\n int level = Log2.floorLog(data[n - 1]);\n long mask = 0;\n for (; level >= 0; level--) {\n curLevel.clear();\n for (Interval interval : lastLevel) {\n int l = interval.l;\n int r = interval.r;\n int m = r;\n while (m >= l && Bits.get(data[m], level) == 1) {\n m--;\n }\n interval.m = m;\n }\n long total = 0;\n for (Interval interval : lastLevel) {\n total += (long) (interval.m - interval.l + 1) * (interval.relative.m - interval.relative.l + 1);\n total += (long) (interval.r - interval.m) * (interval.relative.r - interval.relative.m);\n }\n if (total < k) {\n k -= total;\n mask = Bits.set(mask, level, true);\n for (Interval interval : lastLevel) {\n if (interval.relative == interval) {\n if (interval.l <= interval.m && interval.m < interval.r) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n Interval b = newInterval(buffer, interval.m + 1, interval.r);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n } else if (interval.r >= interval.relative.r) {\n if (interval.l <= interval.m && interval.relative.r > interval.relative.m) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n Interval b = newInterval(buffer, interval.relative.m + 1, interval.relative.r);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n if (interval.m < interval.r && interval.relative.m >= interval.relative.l) {\n Interval a = newInterval(buffer, interval.m + 1, interval.r);\n Interval b = newInterval(buffer, interval.relative.l, interval.relative.m);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n }\n }\n } else {\n for (Interval interval : lastLevel) {\n if (interval.relative == interval) {\n if (interval.l <= interval.m) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n a.relative = a;\n curLevel.add(a);\n }\n if (interval.m < interval.r) {\n Interval a = newInterval(buffer, interval.m + 1, interval.r);\n a.relative = a;\n curLevel.add(a);\n }\n } else if (interval.r >= interval.relative.r) {\n if (interval.l <= interval.m && interval.relative.l <= interval.relative.m) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n Interval b = newInterval(buffer, interval.relative.l, interval.relative.m);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n if (interval.m < interval.r && interval.relative.m < interval.relative.r) {\n Interval a = newInterval(buffer, interval.m + 1, interval.r);\n Interval b = newInterval(buffer, interval.relative.m + 1, interval.relative.r);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n }\n }\n }\n\n for (Interval interval : lastLevel) {\n buffer.release(interval);\n }\n\n List<Interval> tmp = curLevel;\n curLevel = lastLevel;\n lastLevel = tmp;\n }\n\n return mask;\n }", "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 }" ]
[ "0.74047375", "0.709352", "0.703069", "0.7002072", "0.6986876", "0.69564325", "0.6883908", "0.6880493", "0.6814057", "0.67857784", "0.6679697", "0.6653404", "0.66400295", "0.6625871", "0.6611353", "0.66091317", "0.6560854", "0.6498763", "0.6498421", "0.64980096", "0.64913905", "0.6490187", "0.64649135", "0.64574265", "0.64426625", "0.6394034", "0.6394021", "0.634077", "0.6335996", "0.6324362", "0.6318057", "0.62824345", "0.62675613", "0.62667745", "0.6252221", "0.62459415", "0.62432456", "0.62265676", "0.622053", "0.62139386", "0.6211854", "0.62", "0.618813", "0.6184323", "0.6178192", "0.61601204", "0.61561304", "0.6154842", "0.6142475", "0.61352855", "0.6105263", "0.61009294", "0.6089754", "0.6087555", "0.6080345", "0.6066932", "0.6057772", "0.6045273", "0.60354435", "0.6015139", "0.60067236", "0.60063314", "0.6001712", "0.5999904", "0.59859276", "0.5984399", "0.5981126", "0.5980881", "0.59713733", "0.5967305", "0.596478", "0.5962226", "0.59608483", "0.5955338", "0.59465647", "0.5945411", "0.5938145", "0.5938053", "0.59358084", "0.59312445", "0.5930573", "0.59263194", "0.59258246", "0.5912717", "0.58942837", "0.58910346", "0.5890512", "0.5889949", "0.5889714", "0.5887391", "0.5884021", "0.58643603", "0.5860077", "0.58328843", "0.58286387", "0.58201087", "0.5818762", "0.58168346", "0.58166766", "0.580973" ]
0.71802145
1
3. Our goal: when currentSum = target & k numbers only
private void combinationSum3(int[] candidates, int k, int i, int currentSum, int target, List<List<Integer>> response, List<Integer> temp) { if (temp.size() == k) { if (currentSum == target) response.add(new ArrayList<>(temp)); return; } if (i == candidates.length) return; //1. Our choices: We can choose a number from the list any number of times and all the numbers for (int s = i; s < candidates.length; s++) { //if this element is greater than target, then adding it to current sum make bigger than target //since,elements are sorted, then all the element after this element are > target if (candidates[s] > target) break; //Our constraints : We can't go beyond target, we can take more element than available in array if (currentSum + candidates[s] <= target) { currentSum += candidates[s]; temp.add(candidates[s]); combinationSum3(candidates, k, s + 1, currentSum, target, response, temp); //backtrack temp.remove(temp.size() - 1); currentSum -= candidates[s]; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int kSum(int[] A, int k, int target) {\n\t\tint res=0;\r\n\t\t//考虑k=1的情况\r\n//\t\tif (k==1) {\r\n//\t\t\tfor(int i=0;i<A.length;i++) {\r\n//\t\t\t\tif (A[i]==target) {\r\n//\t\t\t\t\tres++;\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n//\t\t\treturn res;\r\n//\t\t}\r\n//\t\tint sum_k_1=0;\r\n//\t\tint sum=target-sum_k_1;\r\n//\t\tif (k>1 && k<A.length) {\r\n//\t\t\tfor(int i=0;i<A.length-1;i++) {\r\n//\t\t\t\tfor(int j=i+1;j<A.length;j++) {\r\n//\t\t\t\t\t\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n//\t\t}\r\n\t\t//动态规划\r\n\t\tint n=A.length;\r\n\t\tint[][][] f=new int[n+1][k+1][target+1];\r\n\t\tfor(int i=0;i<n+1;i++) {\r\n\t\t\tf[i][0][0]=1;\r\n\t\t}\r\n\t\tfor(int i=1;i<=n;i++) {\r\n\t\t\tfor(int j=1;j<=k && j<=i;j++) {\r\n\t\t\t\tfor(int t=1;t<=target;t++) {\r\n\t\t\t\t\tf[i][j][t]=0;\r\n\t\t\t\t\tif (t>=A[i-1]) {\r\n\t\t\t\t\t\tf[i][j][t]=f[i-1][j-1][t-A[i-1]];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tf[i][j][t]+=f[i-1][j][t];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn f[n][k][target];\r\n }", "public int kSum(int A[], int k, int target) {\n if (k == 0 && target == 0) {\n return 1;\n }\n\n if (A == null || k == 0 || target == 0) {\n return 0;\n }\n\n int[][][] f = new int[A.length + 1][k + 1][target + 1];\n\n f[0][0][0] = 1;\n for (int i = 1; i <= A.length; i++) {\n f[i][0][0] = 1;\n }\n\n for (int i = 1; i <= A.length; i++) {\n for (int j = 1; j <= k; j++) {\n for (int m = 1; m <= target; m++) {\n f[i][j][m] = f[i - 1][j][m];\n if (m - A[i - 1] >= 0) {\n f[i][j][m] += f[i - 1][j - 1][m - A[i - 1]];\n }\n }\n }\n }\n\n return f[A.length][k][target];\n }", "private static long countSummations(int target, int currSum, int lastVal){\n if (currSum == target){\n return 1;\n }\n\n long numSummations = 0;\n\n for (int i = 1; i <= lastVal; i++){\n if (i + currSum > target){\n return numSummations;\n }\n currSum += i;\n numSummations += countSummations(target, currSum, i);\n currSum -= i;\n }\n return numSummations;\n }", "static void findTwoSum(List<List<Integer>> list, int[] nums, int k) {\n \tint target = 0 - nums[k]; // 7 -> check a + b = 7 (target)\n int fi = 0;\n int la = k - 1;\n\n while (fi < la) {\n if (nums[fi] + nums[la] == target) {\n list.add(Arrays.asList(nums[fi], nums[la], nums[k]));\n while (fi < nums.length - 1 && nums[fi] == nums[fi + 1]) {\n \tfi++;\n }\n fi++;\n }\n else if (nums[fi] + nums[la] < target)\n fi++;\n else\n la--;\n }\n }", "static long sumOfGroup(int k) {\n long start = 1;\n long sum = 0;\n for(int i=1;i<=k;i++){\n long count = 0;\n sum = 0;\n while(count<i){\n if(start%2 == 1){\n sum = sum+start;\n count++;\n }\n start++;\n }\n }\n return sum;\n }", "public ArrayList<ArrayList<Integer>> fourSum(int[] num, int target) {\n int temp = 0;\n Arrays.sort(num);\n\n ArrayList<ArrayList<Integer>> a = new ArrayList<ArrayList<Integer>>();\n int [] s = new int [4];\n int total = 0;\n int current = -1;\n int i = 0;\n Arrays.fill(s, 0);\n HashMap<Long, Integer> m = new HashMap<Long, Integer>();\n \n \n if (num.length < 4) return a;\n \n while (i!=-1) {\n //increase the current pointer\n ++current;\n if (current > num.length-1) {\n --i;\n if (i >= 0) \n {\n current = s[i];\n total -= num[current];\n }\n }\n else if (total + num[current] > target || total + (4-i)*num[num.length-1] < target) {\n --i;\n if (i >= 0) \n {\n current = s[i];\n total -= num[current];\n }\n }\n else {\n //check if current number will work\n /*if (current == 0)\n {\n */\n if (i < 3) {s[i] = current; total += num[current]; ++i;}\n else if (num[current] + total == target) {\n //bingo one answer\n ArrayList<Integer> b = new ArrayList<Integer>();\n long c = num[s[0]]*num[s[1]]*num[s[2]]*num[current];\n long d = Math.abs((long)num[s[0]]*1000000000) \n + Math.abs((long)num[s[1]]*1000000)\n + Math.abs((long)num[s[2]]*1000)\n + Math.abs((long)num[current]);\n if (c < 0) d *= -1;\n if (!m.containsKey(d))\n {\n b.add(num[s[0]]);\n b.add(num[s[1]]);\n b.add(num[s[2]]);\n b.add(num[current]);\n a.add(b);\n m.put(d, 1);\n }\n }\n /*\n } \n else if (num[current] != num[current-1])\n {\n if (i < 2) {s[i] = current; total += num[current]; ++i;}\n else if (num[current] + total == 0) {\n //bingo one answer\n ArrayList<Integer> b = new ArrayList<Integer>();\n b.add(num[s[0]]);\n b.add(num[s[1]]);\n b.add(num[s[2]]);\n a.add(b);\n }\n }\n */\n }\n }\n return a;\n }", "public int subarraySumLeetCode(int[] nums, int k) {\n int count = 0;\n for (int start = 0; start < nums.length; start++) {\n for (int end = start + 1; end <= nums.length; end++) {\n int sum = 0;\n for (int i = start; i < end; i++) {\n sum += nums[i];\n }\n if (sum == k) {\n count++;\n }\n }\n }\n return count;\n }", "private static long countSummations(int target) {\n if (target == 1){\n return 1;\n }\n\n return countSummations(target, 0, target - 1);\n }", "public List<List<Integer>> fourSum_1(int[] nums, int target) \n {\n \tList<List<Integer>> result = new ArrayList<List<Integer>>();\n \tif(nums==null || nums.length<4) return result;\n \tArrays.sort(nums);\n \tfor(int i=0; i<nums.length-3; i++)\n \t{\n \t\tif(i!=0 && nums[i]==nums[i-1]) continue;\n \t\t//if(nums[i]>target) break; \n \t\t//Revisit!!! Why you cannot do this break here\n \t\tfor(int j=i+1; j<nums.length-2;j++)\n \t\t{\n \t\t\tif(j!=(i+1) && nums[j]==nums[j-1]) continue;\n \t\t\tint cur = nums[i]+nums[j];\n \t\t\t//if(cur>target) break;\n \t\t\t//Revisit!!! Why you cannot do this break here\n \t\t\t\n \t\t\tint k=j+1;\n \t\t\tint l = nums.length-1;\n \t\t\twhile(k<l)\n \t\t\t{\n \t\t\t\tif((cur+nums[k]+nums[l])==target)\n \t\t\t\t{\n \t\t\t\t\tList<Integer> newRes = new ArrayList<Integer>();\n \t\t\t\t\tnewRes.add(nums[i]);\n \t\t\t\t\tnewRes.add(nums[j]);\n \t\t\t\t\tnewRes.add(nums[k]);\n \t\t\t\t\tnewRes.add(nums[l]);\n \t\t\t\t\tresult.add(newRes);\n \t\t\t\t\tk++;\n \t\t\t\t\tl--;\n \t\t\t\t\twhile(k<l && nums[k]==nums[k-1]) k++;\n \t\t\t\t\twhile(k<l && nums[l]==nums[l+1]) l--;\n \t\t\t\t}\n \t\t\t\telse if((cur+nums[k]+nums[l])>target)\n \t\t\t\t{\n \t\t\t\t\tl--;\n \t\t\t\t\twhile(k<l && nums[l]==nums[l+1]) l--;\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t{\n \t\t\t\t\tk++;\n \t\t\t\t\twhile(k<l && nums[k]==nums[k-1]) k++;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n \treturn result;\n }", "public static void main(String[] args) {\n\n boolean isTrue = false;\n int[] numbers = { 10, 15, 3, 1, 6, 16, 8 };\n int k = 17;\n\n for (int i = 0; i < (numbers.length-1); i++) {\n for (int j = (i+1); j < numbers.length; j++) {\n if (numbers[i] + numbers[j] == k) {\n isTrue = true;\n break;\n }\n }\n }\n System.out.println(isTrue);\n }", "public boolean checkSubarraySum(int[] nums, int k) {\n\n if (nums == null) {\n return false;\n }\n\n Map<Integer, Integer> sums = new HashMap<>();\n\n int runningSum = 0;\n\n // sums.put(0, -1);\n for (int i = 0; i < nums.length; i++) {\n int n = nums[i];\n runningSum += n;\n if (k != 0) {\n runningSum %= k;\n }\n\n\n // if a number is followed by 6 or 0, the next modulo does not change, which is okay\n // however, if there are several 0s in sequence, it is still fine to have consecutive zeroes and the solution should still work\n // e.g. consider 5, 2, 4 and k = 6. The moduloes look like 5, 1, 5 and there need to be atleast 2 numbers processed between both moduloes\n // in the case of 0, 0 and k = 0, the moduloes are 0,0 but the solution is still valid, even though the indexes are next to each other. so we add 0,-1 to fix this condition\n sums.put(0, -1);\n if (sums.containsKey(runningSum)) {\n\n // the modulo numbers cannot be adjacent to each other, so difference in indexes must be at least 2.\n // special conditions are 6 and 0/\n if (i - sums.get(runningSum) >= 2) {\n return true;\n }\n } else {\n sums.put(runningSum, i);\n }\n }\n\n return false;\n }", "static int numberOfWays(int[] arr, int k) {\n\n Map<Integer, Integer> map = new HashMap<>();\n for (int i = 0; i < arr.length; i++) {\n if (!map.containsKey(arr[i])) {\n map.put(arr[i], 1);\n } else {\n map.put(arr[i], map.get(arr[i]) + 1);\n }\n }\n int result = 0;\n Iterator<Map.Entry<Integer, Integer>> iter = map.entrySet().iterator();\n while (iter.hasNext()) {\n Map.Entry<Integer, Integer> e = iter.next();\n int curNum = (int) e.getKey();\n int countOfOccurance = (int) e.getValue();\n int complement = k - curNum;\n\n if (map.containsKey(complement)) {\n // found target value\n if (curNum == complement) {\n // 3 + 3 = 6\n // add combination of them. count choose 2. For example [3, 3, 3, 3] = 4 choose 2\n result += getCombinationCount(countOfOccurance, 2);\n } else {\n // 1 + 5 = 6\n result += countOfOccurance;\n }\n }\n iter.remove();\n }\n\n return result;\n }", "public boolean checkSubarraySum(int[] nums, int k) {\n int N = nums.length;\n if (N == 0)\n return false;\n Map<Integer, Integer> m = new HashMap();\n int sum = 0;\n m.put(0, -1);\n for (int i = 0; i < N; i++) {\n sum += nums[i];\n if (k != 0 )\n sum %= k;\n if (m.containsKey(sum)) {\n if (i - m.get(sum) >= 2)\n return true;\n } else {\n m.put(sum, i);\n }\n }\n return false;\n }", "public int subarraySumLeetcode3(int[] nums, int k) {\n int count = 0, sum = 0;\n HashMap<Integer, Integer> map = new HashMap<>();\n map.put(0, 1);\n for (int i = 0; i < nums.length; i++) {\n sum += nums[i];\n if (map.containsKey(sum - k)) {\n count += map.get(sum - k);\n }\n map.put(sum, map.getOrDefault(sum, 0) + 1);\n }\n return count;\n }", "public ArrayList<ArrayList<Integer>> fourSum(int[] num, int target) {\n //Create the dictionary of sum and list of pairs of indexes\n HashMap<Integer, ArrayList<ArrayList<Integer>>> dict = new HashMap<>();\n for (int i = 0; i < num.length - 1; i++) {\n for (int j = i + 1; j < num.length; j++) {\n int sum = num[i] + num[j];\n ArrayList<Integer> pair = new ArrayList<>();\n pair.add(i);\n pair.add(j);\n if (!dict.containsKey(sum)) {\n ArrayList<ArrayList<Integer>> value = new ArrayList<ArrayList<Integer>>();\n value.add(pair);\n dict.put(sum, value);\n } else {\n ArrayList<ArrayList<Integer>> value = dict.get(sum);\n value.add(pair);\n }\n }\n }\n //Use HashSet to prevent duplicate result.\n HashSet<ArrayList<Integer>> set = new HashSet<>();\n for (Integer sumA : dict.keySet()) {\n if (dict.containsKey(target - sumA)) {\n \n ArrayList<ArrayList<Integer>> pairsA = dict.get(sumA);\n ArrayList<ArrayList<Integer>> pairsB = dict.get(target - sumA);\n \n \n for (ArrayList<Integer> pair1 : pairsA) {\n for (ArrayList<Integer> pair2 : pairsB) {\n \n //Make sure there is no same element in two pairs.\n if (pair1.contains(pair2.get(0)) || pair1.contains(pair2.get(1)))\n continue;\n \n ArrayList<Integer> tmpResult = new ArrayList<>(4);\n tmpResult.add(num[pair1.get(0)]);\n tmpResult.add(num[pair1.get(1)]);\n tmpResult.add(num[pair2.get(0)]);\n tmpResult.add(num[pair2.get(1)]);\n //Sort the list and add it into the set.\n Collections.sort(tmpResult);\n set.add(tmpResult);\n }\n }\n }\n }\n ArrayList<ArrayList<Integer>> ret = new ArrayList<ArrayList<Integer>>();\n ret.addAll(set); // from hashset to arraylist \n return ret;\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 }", "long getLsum(int n, int i, int k){ \r\n return (i-k+1)>=0 ? (i-k+1) + ssum(k) : ssum(k) - ssum(k-i-1);\r\n }", "public List<List<Integer>> fourSum_optimization(int[] nums, int target) {\n int len = nums.length;\n Arrays.sort(nums);\n if (len < 4)\n return Collections.emptyList();\n List<List<Integer>> arr = new ArrayList<>();\n\n for (int i = 0; i < len - 1; i++) {\n for (int j = i + 1; j < len - 1; j++) {\n int Left = j + 1;\n int Right = len - 1;\n int left_target_sum = target - nums[i] + nums[j];\n\n while (Left < Right) {\n int two_sum = nums[Left] + nums[Right];\n if (two_sum < left_target_sum)\n Left++;\n else if (two_sum > left_target_sum)\n Right--;\n else {\n List<Integer> arr2 = new ArrayList<>();\n if (left_target_sum + two_sum == target) {\n arr2.add(nums[i]);\n arr2.add(nums[j]);\n arr2.add(nums[Left]);\n arr2.add(nums[Right]);\n arr.add(arr2);\n }\n while (Left < Right && nums[Left] == arr2.get(2))\n ++Left;\n while (Left < Right && nums[Right] == arr2.get(3))\n --Right;\n }\n }\n while (i + 1 < len && nums[i + 1] == nums[i])\n ++i;\n while (j + 1 < len && nums[j + 1] == nums[j])\n ++j;\n }\n }\n\n return arr;\n }", "public int subarraySum(int[] nums, int k) {\n if (nums == null) {\n return 0;\n }\n\n int count = 0;\n\n for (int i = 0; i < nums.length; i++) {\n int delta = k;\n\n int j = i;\n while (j < nums.length) {\n delta = delta - nums[j];\n if (delta == 0) {\n count++;\n }\n j++;\n }\n }\n\n return count;\n }", "public static void targetSumPair(int[] arr, int target){\n //write your code here\n Arrays.sort(arr); // O(nlogn)\n int i=0, j=arr.length-1;\n while(i < j) {\n if(arr[i]+arr[j] < target) {\n i++;\n }\n else if(arr[i] + arr[j] > target)\n j--;\n else {\n System.out.println(arr[i] + \", \" + arr[j]);\n i++; j--;\n }\n }\n }", "private static void subarraysum(int[] a, int target) {\n\t\t\n\t\t\tint cursum=0;\n\t\t\tfor(int i=0;i<a.length;i++)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tcursum=0;\n\t\t\t\tfor(int j=i;j<a.length;j++)\n\t\t\t\t{\n\t\t\t\t\tcursum+=a[j];\n\t\t\t\t\t//System.out.println(i+\" \"+(j));\n\t\t\t\t\t\n\t\t\t\t\t\tif(cursum==target)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(i+\" \"+(j));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(cursum>target)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//System.out.println(i+\" \"+j+\" \");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//System.out.println(cursum);\n\t\t\t}\n\t\t}", "public static void findSumArrayWithGivenSum2(int[] arr, int target) {\n\n\t\tHashMap<Integer, Integer> hm = new HashMap<>();\n\n\t\tint currSum = 0;\n\t\tfor (int i = 0; i < arr.length; i++) {\n\n\t\t\tcurrSum += arr[i];\n\n\t\t\tif (currSum == target) {\n\t\t\t\tSystem.out.println(0 + \"--\" + i);\n\t\t\t}\n\n\t\t\tif (hm.containsKey(currSum - target)) {\n\t\t\t\tSystem.out.println((hm.get(currSum - target) + 1) + \"--\" + i);\n\t\t\t}\n\n\t\t\thm.put(currSum, i);\n\t\t}\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 }", "public static void findSumArrayWithGivenSum(int[] arr, int target) {\n\n\t\tint sum = 0;\n\t\tint start = 0;\n\t\tfor (int end = 0; end < arr.length; end++) {\n\t\t\tint val = arr[end];\n\t\t\tsum += val;\n\t\t\tif (sum == target) {\n\t\t\t\tSystem.out.println(start + \",\" + end);\n\t\t\t\treturn;\n\t\t\t} else if (sum < target) {\n\t\t\t\t// do nothing\n\t\t\t} else {\n\n\t\t\t\twhile (start <= end && sum > target) {\n\n\t\t\t\t\tsum -= arr[start];\n\t\t\t\t\tstart++;\n\n\t\t\t\t\tif (sum == target) {\n\t\t\t\t\t\tSystem.out.println(start + \",\" + end);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static long maximumSubarraySum_bf(int[] nums, int k) {\n int len = nums.length;\n\n long ans = 0;\n for (int i = 0; i <= len - k; i++) {\n long sum = 0;\n Set<Integer> set = new HashSet<>();\n for (int j = 0; j < k; j++) {\n if (set.contains(nums[i + j])) {\n sum = 0;\n break;\n }\n\n set.add(nums[i + j]);\n sum += nums[i + j];\n }\n\n ans = Math.max(ans, sum);\n }\n\n return ans;\n }", "public List<List<Integer>> fourSum(int[] nums, int target) {\n\t\tList<List<Integer>> result = new ArrayList<List<Integer>>();\n\t\tif (nums == null || nums.length < 4) return result;\n\n\t\tArrays.sort(nums);\n\n\t\tfor (int w = 0; w < nums.length - 3; w++) { // < size - 3\n\t\t\tif (w == 0 || nums[w] != nums[w - 1]) {\n\t\t\t\tfor (int i = w + 1; i < nums.length - 2; i++) { // < size - 2\n\t\t\t\t\t// Enter in first iteration or no duplication.\n\t\t\t\t\tif (i == w + 1 || nums[i] != nums[i - 1]) { \n\t\t\t\t\t\tint j = i + 1;\n\t\t\t\t\t\tint k = nums.length - 1;\n\n\t\t\t\t\t\twhile (j < k) {\n\n\t\t\t\t\t\t\tif (nums[w] + nums[i] + nums[j] + nums[k] == target) {\n\t\t\t\t\t\t\t\tList<Integer> list = new ArrayList<Integer>();\n\t\t\t\t\t\t\t\tlist.add(nums[w]);\n\t\t\t\t\t\t\t\tlist.add(nums[i]);\n\t\t\t\t\t\t\t\tlist.add(nums[j]);\n\t\t\t\t\t\t\t\tlist.add(nums[k]);\n\n\t\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t\t\tk--;\n\n\t\t\t\t\t\t\t\twhile (j < k && nums[j] == nums[j - 1])\n\t\t\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t\t\twhile (j < k && nums[k] == nums[k + 1])\n\t\t\t\t\t\t\t\t\tk--;\n\n\t\t\t\t\t\t\t\tresult.add(list);\n\t\t\t\t\t\t\t} else if (nums[w] + nums[i] + nums[j] + nums[k] < target) {\n\t\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t\t} else { // >.\n\t\t\t\t\t\t\t\tk--;\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}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public boolean checkSubarraySum(int[] nums, int k){\n\t\tif(nums == null || nums.length == 0)\n\t\t\treturn false;\n\t\tint sum = 0;\n\t\tHashMap<Integer, Integer> map = new HashMap<>();\n\t\tmap.put(0,-1);\n\t\tfor( int i = 0; i<nums.length; i++){\n\t\t\tsum+=nums[i];\n\t\t\tif(k!=0)\n\t\t\t\tsum = sum % k;\n\t\t\tif(map.containsKey(sum)){\n\t\t\t\tif(i - map.get(sum) > 1)\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tmap.put(sum,i);\n\t\t\t}\n\t\t}\n\t\treturn false;\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 }", "public static void threeSumForFourSum(int[] nums, int target, int low, int high, ArrayList<List<Integer>> fourSumList,\n int z1) {\n if (low + 1 >= high)\n return;\n\n int max = nums[high];\n if (3 * nums[low] > target || 3 * max < target)\n return;\n\n int i, z;\n for (i = low; i < high - 1; i++) {\n z = nums[i];\n if (i > low && z == nums[i - 1]) // avoid duplicate\n continue;\n if (z + 2 * max < target) // z is too small\n continue;\n\n if (3 * z > target) // z is too large\n break;\n\n if (3 * z == target) { // z is the boundary\n if (i + 1 < high && nums[i + 2] == z)\n fourSumList.add(Arrays.asList(z1, z, z, z));\n break;\n }\n\n twoSumForFourSum(nums, target - z, i + 1, high, fourSumList, z1, z);\n }\n\n}", "public static List<List<Integer>> combinationSum2(int[] candidates, int target) {\n Arrays.sort(candidates);\n List<List<List<Integer>>> dp = new ArrayList<>();\n Map<Integer, Integer> candMap = new HashMap<>();\n for (int i = 0; i < candidates.length; i++) {\n if (candidates[i] > target) break;\n if(candMap.containsKey(candidates[i])) candMap.put(candidates[i], candMap.get(candidates[i]) + 1);\n else candMap.put(candidates[i], 1);\n }\n for (int i = 1; i <= target; i++) {\n Set<List<Integer>> subCand = new HashSet<>();\n for (int j = 0; j < candidates.length && candidates[j] <= i; j++) {\n if (candidates[j] == i) subCand.add(Arrays.asList(i));\n else for (List<Integer> l : dp.get(i - 1 - candidates[j])) {\n if (candidates[j] <= l.get(0)) {\n List<Integer> cl = new ArrayList<>();\n cl.add(candidates[j]);\n cl.addAll(l);\n int cnt = 1;\n for (int a : l) {\n if(a == candidates[j]) cnt++;\n else break;\n }\n if(cnt <= candMap.get(candidates[j])) subCand.add(cl);\n }\n }\n }\n List<List<Integer>> subCandList = new ArrayList<>();\n subCandList.addAll(subCand);\n dp.add(subCandList);\n }\n return dp.get(target - 1);\n }", "public boolean kPairSum(Integer k) {\r\n\t\tint i = 0;\r\n\t\tint j = sortedIntegerArray.length - 1;\r\n\t\treturn kPairSumInterval(k, i, j);\r\n\r\n\t}", "public List<List<Integer>> foursum(int[] nums, int target) {\n List<List<Integer>> result = new ArrayList<>();\n if(nums == null || nums.length < 4) {\n return result;\n }\n Arrays.sort(nums);\n for(int idx1=0; idx1<nums.length-3; idx1++) {\n if(idx1 != 0 && nums[idx1] == nums[idx1-1]) {continue;}\n for(int idx2=idx1+1; idx2 < nums.length -2; idx2++) {\n if(idx2 != idx1+1 && nums[idx2] == nums[idx2-1]) {continue;}\n int lp=idx2+1, rp = nums.length-1;\n while(lp < rp) {\n int sum = nums[idx1] + nums[idx2] + nums[lp] + nums[rp];\n if(sum == target) {\n result.add(Arrays.asList(nums[idx1],nums[idx2],nums[lp],nums[rp]));\n lp++; rp--;\n while(lp < rp && (nums[lp] == nums[lp-1])) {lp++;}\n while(lp < rp && (nums[rp] == nums[rp+1])) {rp--;}\n } else if(sum < target) {\n lp++;\n } else {\n rp--;\n }\n }\n }\n }\n return result;\n }", "private static void findPairSum(int[] pairSumArray, int k) {\n\t\tint count = 0;\r\n\t\tint pair = 0;\r\n\t\tfor (int i = 0; i < pairSumArray.length; i++) {\r\n\t\t\tfor (int j = pairSumArray.length - 1; j > i; j--) {\r\n\t\t\t\tpair = pairSumArray[j] + pairSumArray[i];\r\n\t\t\t\tif (pair == k) {\r\n\t\t\t\t\tSystem.out.println(\" ( \" + pairSumArray[j] + \"+\"\r\n\t\t\t\t\t\t\t+ pairSumArray[i] + \" ) \" + pair);\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"count of pairs : \" + count);\r\n\t}", "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 static List<List<Integer>> gen_size_k_candidate(Map<List<Integer>, Float> oldCandidate, Integer k){\n\n List<List<Integer>> sizeKPlusCandidate = new ArrayList<>();\n\n // size 2 candidate\n if( k <= 1){\n List<Integer> size1Candidate = new ArrayList<>();\n for (List<Integer> size1: oldCandidate.keySet()){\n size1Candidate.addAll(size1);\n }\n // sort\n Collections.sort(size1Candidate);\n // Generate\n sizeKPlusCandidate = CombinationGenerator.findsort(size1Candidate, 2);\n\n }else {\n List<List<Integer>> oldList = new ArrayList<>();\n oldList.addAll(oldCandidate.keySet());\n\n for(int iOld = 0; iOld < oldList.size()-1; iOld ++){\n for(int jOld =iOld+1; jOld < oldList.size(); jOld++){\n // check k element of feature is the same\n List<Integer> formerList = new ArrayList<>();\n List<Integer> laterList = new ArrayList<>();\n\n for (int fl=0; fl < k-1; fl++){\n formerList.add(oldList.get(iOld).get(fl));\n laterList.add(oldList.get(jOld).get(fl));\n }\n\n if (formerList.equals(laterList)){\n\n HashSet<Integer> tempCandidate = new HashSet<>();\n\n tempCandidate.addAll(oldList.get(iOld));\n tempCandidate.addAll(oldList.get(jOld));\n\n List<Integer> tempCandidateList = new ArrayList<>();\n tempCandidateList.addAll(tempCandidate);\n\n Collections.sort(tempCandidateList);\n // Prunning\n List<List<Integer>> prunningCandidate = CombinationGenerator.findsort(tempCandidateList, k);\n\n int flag = 0;\n for(List<Integer> checkPrun: prunningCandidate){\n if(oldCandidate.containsKey(checkPrun)){\n flag++;\n }\n }\n if (flag == k+1){\n sizeKPlusCandidate.add(tempCandidateList);\n }\n }\n }\n }\n }\n return sizeKPlusCandidate;\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}", "public int threeSumSmaller(int[] nums, int target) {\n Arrays.sort(nums);\n int len = nums.length;\n int count = 0;\n for (int i = 0; i < len; i++) {\n int start = i + 1, end = len - 1;\n int tar = target - nums[i];\n while (start < end) {\n if (nums[start] + nums[end] < tar) {\n count += end - start;\n start++;\n } else {\n end--;\n }\n }\n }\n return count;\n }", "static int getMinimumCost(int k, Integer[] c) {\n\tArrays.sort(c, Collections.reverseOrder());\n\tint[] num = new int[k];\n\tint total = 0;\n\tfor (int ind = 0; ind < c.length; ind++) {\n\t int v = ind % k;\n\t total += (num[v]++ + 1) * c[ind];\n\t}\n\n\treturn total;\n }", "long getRsum(int n, int i, int k){\r\n return n-i>=k ? (n-i-k)+ssum(k-1): ssum(k-1) - ssum(k-n+i);\r\n }", "static long journey(int[] path, int k) {\n calculateSumRecursive(path,k,0,0);\n return maxSum;\n }", "public static int maxSum(int[] a, int k) \n {\n PriorityQueue<Integer> pq = new PriorityQueue<>(); \n for (int x : a) \n pq.add(x); \n \n // Do k negations by removing a minimum element k times \n while (k-- > 0) \n { \n // Retrieve and remove min element \n int temp = pq.poll(); \n \n // Modify the minimum element and add back \n // to priority queue \n temp *= -1; \n pq.add(temp); \n } \n \n // Compute sum of all elements in priority queue. \n int sum = 0; \n for (int x : pq) \n sum += x; \n return sum; \n }", "private static void get4ElementsSumCountFastest(String inputLine, int target) {\n String[] arr = inputLine.split(\" \");\n if (arr.length < 3) {\n System.out.println(0);\n return;\n }\n\n Map<Integer, Set<String>> pairSumMap = new HashMap<>();\n List<Integer> list = new ArrayList<>(arr.length);\n for (String s : arr) {\n list.add(Integer.parseInt(s.trim()));\n }\n\n int sum = 0, diff = 0;\n for (int i = 0; i < arr.length; i++) {\n for (int j = i + 1; j < arr.length; j++) {\n sum = list.get(i) + list.get(j);\n if (sum < target) {\n pairSumMap.putIfAbsent(sum, new HashSet<>());\n pairSumMap.get(sum).add(i + \"-\" + j);\n }\n }\n }\n\n for (Map.Entry<Integer, Set<String>> mk : pairSumMap.entrySet()) {\n diff = target - mk.getKey();\n if (pairSumMap.containsKey(diff)) {\n Set<String> indexesList = mk.getValue();\n for (String index : indexesList) {\n int indexOrgX = Integer.parseInt(index.split(\"-\")[0]);\n int indexOrgY = Integer.parseInt(index.split(\"-\")[1]);\n for (String newIdx : pairSumMap.get(diff)) {\n int indexNewX = Integer.parseInt(newIdx.split(\"-\")[0]);\n int indexNewY = Integer.parseInt(newIdx.split(\"-\")[1]);\n if (indexOrgX != indexNewX && indexOrgX != indexNewY && indexOrgY != indexNewX && indexOrgY != indexNewY) {\n System.out.println(1);\n return;\n }\n }\n }\n }\n }\n System.out.println(0);\n }", "public int kthSum(int[] A, int[] B, int k) {\n // Best First Search, need a minHeap on the value of each Pair\n PriorityQueue<Pair> minHeap = new PriorityQueue<>(k, new MyComparator());\n // all the generated cells will be marked true to avoid being generated more than once\n boolean[][] visited = new boolean[A.length][B.length];\n minHeap.offer(new Pair(A, 0, B, 0));\n visited[0][0] = true;\n // iterate k - 1 rounds, and Best First Search the smallest k - 1 values\n for (int q = 0; q < k - 1; q++) {\n Pair cur = minHeap.poll();\n // the neighbor Pair will be inserted into the minHeap only if\n // 1. it is not out of boundary\n // 2. it has not been generated before\n if (cur.row + 1 < A.length && !visited[cur.row + 1][cur.col]) {\n minHeap.offer(new Pair(A, cur.row + 1, B, cur.col));\n visited[cur.row + 1][cur.col] = true;\n }\n if (cur.col + 1 < B.length && !visited[cur.row][cur.col + 1]) {\n minHeap.offer(new Pair(A, cur.row, B, cur.col + 1));\n visited[cur.row][cur.col + 1] = true;\n }\n }\n return minHeap.peek().value;\n }", "public int subarraySum(int[] nums, int k) {\n\t\tMap<Integer, Integer> sumCount = new HashMap<Integer, Integer>();\n\t\tsumCount.put(0, 1);\n\t\tint prefix = 0;\n\t\tint result = 0;\n\t\tfor (int i = 0; i < nums.length; i++) {\n\t\t\tprefix += nums[i];\n\t\t\tresult += sumCount.getOrDefault(prefix - k, 0);\n\t\t\tsumCount.put(prefix, sumCount.getOrDefault(prefix, 0) + 1);\n\t\t}\n\t\treturn result;\n\t}", "public static long maximumSubarraySum(int[] nums, int k) {\n int len = nums.length;\n\n long ans = 0;\n\n Map<Integer, Integer> map = new HashMap<>();\n long sum = 0;\n for (int i = 0, j = 0; j <= len; j++) {\n if (j - i == k) {\n if (map.size() == k) {\n ans = Math.max(ans, sum);\n }\n\n int cnt = map.getOrDefault(nums[i], 0);\n if (cnt > 1) {\n map.put(nums[i], cnt - 1);\n } else {\n map.remove(nums[i]);\n }\n sum -= nums[i];\n i++;\n }\n\n if (j == len) {\n break;\n }\n\n map.put(nums[j], map.getOrDefault(nums[j], 0) + 1);\n sum += nums[j];\n }\n\n return ans;\n }", "public List<List<Integer>> fourSum_LeetCode(int[] nums, int target) {\n \tList<List<Integer>> res = new ArrayList<List<Integer>>();\n \tint len = nums.length;\n \tif(len < 4)\n \t return res;\n \t\n //Using the hashMap to store sum and corresponding 2 elements\n \tHashMap<Integer, Index> h = new HashMap<Integer, Index>();\n \t\n \tfor(int i = 0; i < len-1; i++) {\n \t\tfor(int j = i+1; j < len; j++) {\n \t\t\tint sum = nums[i] + nums[j];\n \t\t\tif(h.containsKey(target-sum)) {\n \t\t\t\t//then get the elements of the existing sum stored in hashmap\n \t\t\t\tIndex indx = h.get(target-sum);\n \t\t\t\tint exI = indx.getI();\n \t\t\t\tint exJ = indx.getJ();\n \t\t\t\tif(res.size() == 0) {\n \t\t\t\t\tList<Integer> l = new ArrayList<Integer>();\n\t \t\t\t\tl.add(exI);\n\t \t\t\t\tl.add(exJ);\n\t \t\t\t\tl.add(nums[i]);\n\t \t\t\t\tl.add(nums[j]);\n\t \t\t\t\tCollections.sort(l);\n\t \t\t\t\tres.add(l);\n \t\t\t\t} else {\n\t \t\t\t\tif((exI != nums[i]) && (exJ != nums[j])) {\n\t \t\t\t\t\tList<Integer> l = new ArrayList<Integer>();\n\t\t \t\t\t\tl.add(exI);\n\t\t \t\t\t\tl.add(exJ);\n\t\t \t\t\t\tl.add(nums[i]);\n\t\t \t\t\t\tl.add(nums[j]);\n\n\t\t \t\t\t\tCollections.sort(l);\n\t\t \t\t\t\tfor(List<Integer> ll : res) {\n\t\t \t\t\t\t\tif(!ll.equals(l))\n\t\t \t\t\t\t\t\tres.add(l);\n\t\t \t\t\t\t}\n\t\t \t\t\t\t\n\t \t\t\t\t}\n \t\t\t\t}\n \t\t\t} else\n \t\t\t\th.put(sum, new Index(nums[i], nums[j]));\n \t\t}\n \t}\n \treturn res;\n }", "public int[] kClosestNumbers(int[] A, int target, int k) {\n // write your code here\n if (A == null || A.length == 0) return null;\n int lastLower = findLastLower(A, target);\n int left = lastLower, right = left + 1;\n int[] res = new int[k];\n\n for (int i = 0; i < k; i++) {\n if (isLeftCloser(A, target, left, right)) {\n res[i] = A[left];\n left--;\n }\n else {\n res[i] = A[right];\n right++;\n }\n }\n return res;\n }", "public static ArrayList<ArrayList<Integer>> fourSum(ArrayList<Integer> a, int k) {\n Collections.sort(a);\n System.out.println(a);\n LinkedHashMap<Integer, List<List<Integer>>> m = new LinkedHashMap<Integer, List<List<Integer>>>();\n for (int i = 0; i <= a.size() - 3; i++) {\n for (int j = i + 1; j <= a.size() - 2; j++) {\n if (m.get(a.get(i) + a.get(j)) == null) {\n ArrayList<List<Integer>> v = new ArrayList<List<Integer>>();\n List<Integer> c = new ArrayList<Integer>();\n c.add(i);\n c.add(j);\n v.add(c);\n m.put(a.get(i) + a.get(j), v);\n } else {\n List<List<Integer>> v = m.get(a.get(i) + a.get(j));\n List<Integer> c = new ArrayList<Integer>();\n c.add(i);\n c.add(j);\n v.add(c);\n m.put(a.get(i) + a.get(j), v);\n }\n\n }\n }\n LinkedHashSet<ArrayList<Integer>> res = new LinkedHashSet<ArrayList<Integer>>();\n for (int i = 2; i <= a.size() - 1; i++) {\n for (int j = i + 1; j < a.size(); j++) {\n List<List<Integer>> v = m.get(k - (a.get(i) + a.get(j)));\n if (v != null && v.size() >= 1) {\n for (List<Integer> l : v) {\n\n if (l.get(0) < l.get(1) && l.get(1) < i && l.get(1) < j) {\n //System.out.println(l.get(0) + \" \" + l.get(1) + \" \" + i + \" \" + j);\n ArrayList<Integer> out = new ArrayList<Integer>();\n out.add(a.get(l.get(0)));\n out.add(a.get(l.get(1)));\n out.add(a.get(i));\n out.add(a.get(j));\n Collections.sort(out);\n //System.out.println(out);\n res.add(out);\n }\n }\n }\n }\n }\n return new ArrayList<ArrayList<Integer>>(res);\n }", "public static int findMaxSumSubArray(int k, int[] arr) {\n int windowSum = 0, maxSum = Integer.MIN_VALUE;\n int windowStart = 0;\n for (int windowEnd = 0; windowEnd < arr.length; windowEnd++) {\n windowSum += arr[windowEnd]; // add the next element\n // slide the window, we don't need to slide if we've not hit the required window size of 'k'\n if (windowEnd >= k - 1) {\n maxSum = Math.max(maxSum, windowSum);\n windowSum -= arr[windowStart]; // subtract the element going out\n windowStart++; // slide the window ahead\n }\n }\n return maxSum;\n }", "public List<Integer> closestKValues(TreeNode root, double target, int k) {\n\t\tQueue<Integer> list = new LinkedList<>();\n\t\tStack<TreeNode> stk = new Stack<>();\n\t\twhile (!stk.isEmpty() || root != null) {\n\t\t\tif (root != null) {\n\t\t\t\tstk.push(root);\n\t\t\t\troot = root.left;\n\t\t\t} else {\n\t\t\t\tTreeNode node = stk.pop();\n\t\t\t\tif (list.size() < k) {\n\t\t\t\t\tlist.add(node.val);\n\t\t\t\t} else {\n\t\t\t\t\tint val = list.peek();\n\t\t\t\t\tif (Math.abs(val - target) > Math.abs(node.val - target)) {\n\t\t\t\t\t\tlist.poll();\n\t\t\t\t\t\tlist.add(node.val);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\troot = node.right;\n\t\t\t}\n\t\t}\n\t\treturn new ArrayList<>(list);\n\t}", "public void generate(ArrayList<List<Integer>> combos, int[] candidates,\n ArrayList<Integer> curr, int target, int sum,\n HashSet<ArrayList<Integer>> seen, int indx)\n {\n if (target == sum)\n {\n if (!seen.contains(curr))\n {\n ArrayList<Integer> entry = new ArrayList<Integer>(curr);\n seen.add(entry);\n combos.add(entry);\n }\n }\n else\n {\n for (int i = indx; i < candidates.length; ++i)\n {\n if (candidates[i] > target)\n {\n break;\n }\n else if (sum + candidates[i] <= target)\n {\n curr.add(candidates[i]);\n generate(combos, candidates, curr, target, sum + candidates[i], seen, i);\n curr.remove(curr.size() - 1);\n }\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 }", "public List<List<Integer>> fourSum(int[] nums, int target) {\n HashSet<List<Integer>> set = new HashSet<>();\n Arrays.sort(nums);\n if (nums.length < 4)\n Collections.emptyList();\n for (int i = 0; i < nums.length - 1; i++) {\n for (int j = i + 1; j < nums.length - 1; j++) {\n\n int mid = j + 1;\n int high = nums.length - 1;\n\n while (mid < high) {\n int sum = nums[i] + nums[j] + nums[mid] + nums[high];\n if (sum == target) {\n List<Integer> arr2 = new ArrayList<>();\n arr2.add(nums[i]);\n arr2.add(nums[j]);\n arr2.add(nums[mid]);\n arr2.add(nums[high]);\n set.add(arr2);\n }\n if (sum < target)\n mid++;\n else\n high--;\n }\n }\n\n }\n // return new ArrayList(set);\n return Collections.emptyList();\n }", "static int digitSum(String n, int k) {\n int sum = findSum(convertToList(n));\n // Finding the initial super digit where k=1\n sum = findSuperDigit(convertToList(sum));\n // Calculating k times the super digit to find actual result\n return findSuperDigit(convertToList(sum*k));\n }", "public int solveSublistSumTarget(int[] nums, int target) {\n\t\tint res = 0;\n\t\tMap<Integer, Integer> map = new HashMap<>();\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < nums.length; i++) {\n\t\t\tsum += nums[i];\n\t\t\tif (sum == target)\n\t\t\t\tres++;\n\n\t\t\tif (map.get(sum - target) != null)\n\t\t\t\tres += map.get(sum - target);\n\n\t\t\tmap.put(sum, map.getOrDefault(sum, 0) + 1);\n\t\t}\n\t\treturn res;\n\t}", "private static int solution1(int[] arr, int k) {\n\t\tif ( arr == null || arr.length < k ) {\n\t\t\treturn Integer.MIN_VALUE;\n\t\t}\n\t\t\n\t\tint[] a = Arrays.copyOfRange( arr, 0, arr.length );\n\t\tdisplayArray(a);\n\t\tArrays.sort(a);\n\t\tdisplayArray(a);\n\t\t\n\t\treturn a[a.length - k];\n\t}", "public ArrayList<ArrayList<Integer>> fourSum(int[] num, int target) {\n ArrayList<ArrayList<Integer>> rst = new ArrayList<ArrayList<Integer>>();\n Arrays.sort(num);\n \n for (int i = 0; i < num.length - 3; i++) {\n if (i != 0 && num[i] == num[i - 1]) {\n continue;\n }\n \n for (int j = i + 1; j < num.length - 2; j++) {\n if (j != i + 1 && num[j] == num[j - 1])\n continue;\n \n int left = j + 1;\n int right = num.length - 1;\n while (left < right) {\n int sum = num[i] + num[j] + num[left] + num[right];\n if (sum < target) {\n left++;\n } else if (sum > target) {\n right--;\n } else {\n ArrayList<Integer> tmp = new ArrayList<Integer>();\n tmp.add(num[i]);\n tmp.add(num[j]);\n tmp.add(num[left]);\n tmp.add(num[right]);\n rst.add(tmp);\n left++;\n right--;\n while (left < right && num[left] == num[left - 1]) {\n left++;\n }\n while (left < right && num[right] == num[right + 1]) {\n right--;\n }\n }\n }\n }\n }\n \n return rst;\n }", "public int combinationSum4A(int[] nums, int target) {\r\n if (nums == null || nums.length == 0) return 0;\r\n int n = nums.length;\r\n Arrays.sort(nums);\r\n int[] dp = new int[target+1];\r\n\r\n for (int i=1; i<=target; i++) {\r\n for (int j=0; j<n; j++) {\r\n if (nums[j] > i) {\r\n break;\r\n } else if (nums[j] == i) {\r\n dp[i] += 1;\r\n } else {\r\n dp[i] += dp[i-nums[j]];\r\n }\r\n }\r\n }\r\n \r\n return dp[target];\r\n }", "private static int solution( int[] arr, int k) {\n\t\tif ( arr == null || arr.length < k ) {\n\t\t\treturn Integer.MIN_VALUE;\n\t\t}\n\t\t\n\t\tint res = -1;\n\t\t\n\t\treturn res;\n\t\t\n\t}", "static void k_paths(Node root, int k, HashMap<Integer, Integer> p, int sum) {\n\t\t// If root value and previous sum equal\n\t\t// to k then increase the count\n\t\tif (root != null) {\n\t\t\tif (root.data + sum == k) {\n\t\t\t\tres++;\n\t\t\t}\n\t\t\t// Add those values also which differs\n\t\t\t// by the current sum and root data by k\n\t\t\tres += p.get(sum + root.data - k) == null ? 0 : p.get(sum + root.data - k);\n\n\t\t\t// Insert the sum + root value in the map\n\t\t\tif (!p.containsKey(sum + root.data)) {\n\t\t\t\tp.put(sum + root.data, 0);\n\t\t\t}\n\t\t\tp.put(sum + root.data, p.get(sum + root.data) + 1);\n\n\t\t\t// Move to left and right trees\n\t\t\tk_paths(root.left, k, p, sum + root.data);\n\t\t\tk_paths(root.right, k, p, sum + root.data);\n\n\t\t\t// Remove the sum + root.data value\n\t\t\t// from the map if they are n not\n\t\t\t// required further or they do no\n\t\t\t// sum up to k in any way\n\t\t\tp.put(sum + root.data, p.get(sum + root.data) - 1);\n\t\t}\n\t}", "public static int[] twoSumBetter(int[] numbers, int target) {\n int[] aux = new int[numbers.length];\n for (int i = 0; i < numbers.length; i++) {\n aux[i] = numbers[i];\n }\n \n int i = 0, j = numbers.length - 1;\n boolean found = false;\n \n Arrays.sort(aux);\n \n while (i != j) {\n if (aux[i] + aux[j] < target) i++;\n else if (aux[i] + aux[j] > target) j--;\n else {\n found = true;\n break;\n }\n }\n \n if (!found) return null;\n int firstTarget = aux[i], secondTarget = aux[j];\n \n int[] result = new int[2];\n boolean foundOne = false;\n int leftOver = -1;\n for (int k = 0; k < numbers.length; k++) {\n \n if (foundOne) {\n if (numbers[k] == leftOver) {\n result[1] = k + 1;\n return result;\n }\n }\n \n if (numbers[k] == firstTarget || numbers[k] == secondTarget) {\n \n foundOne = true;\n leftOver = numbers[k] == firstTarget ? secondTarget : firstTarget;\n result[0] = k + 1;\n }\n }\n \n return result;\n \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 void findSubSeqWithGivenSum(int[] a, int n, int k, List<Integer> chosen) {\n\t\t// base case\n\t\t// Remaining sum == 0\n\t\tif (k == 0) {\n\t\t\tSystem.out.println(\"Combination found : \" + chosen);\n\t\t\treturn;\n\t\t}\n\n\t\t// if remaining elements == 0\n\t\tif (n == -1) {\n\t\t\tSystem.out.println(\"Hitting end\");\n\t\t\treturn;\n\t\t}\n\n\t\tList<Integer> withCurrent = new ArrayList<>();\n\t\twithCurrent.addAll(chosen);\n\t\twithCurrent.add(a[n]);\n\n\t\tList<Integer> withoutCurrent = new ArrayList<>();\n\t\twithoutCurrent.addAll(chosen);\n\n\t\t// If a[n] is chosen\n\t\tif (a[n] <= k)\n\t\t\tfindSubSeqWithGivenSum(a, n - 1, k - a[n], withCurrent);\n\n\t\tfindSubSeqWithGivenSum(a, n - 1, k, withoutCurrent);\n\n\t}", "public static int sumCheck(int target, int... numberArr) {\n\t\tint sum = 0;\n\t\tfor (int number : numberArr) {\n\t\t\tsum += number;\n\t\t}\n\t\treturn target == sum ? 0 : ((target < sum) ? -1 : 1);\n\t}", "public static int sumOfNs(int targetNumber, int... result) {\n int score = IntStream.of(result).filter(val -> val == targetNumber).sum();\n return score;\n }", "public List<List<Integer>> fourSum(int[] nums, int target) {\n Arrays.sort(nums); // sort\n List<List<Integer>> res = new ArrayList<>();\n if (nums.length < 4) return res;\n\n for (int i = 0; i < nums.length - 3; i++) {\n if (i == 0 || (i > 0 && nums[i] != nums[i - 1])) { // dedupe\n int sum1 = target - nums[i];\n for (int j = i + 1; j < nums.length - 2; j++) {\n if (j == i + 1 || (j > i + 1 && nums[j] != nums[j - 1])) {\n int newTarget = sum1;\n int left = j + 1, right = nums.length - 1, sum2 = newTarget - nums[j];\n while (left < right) {\n if (nums[left] + nums[right] == sum2) {\n res.add(new ArrayList<>(Arrays.asList(nums[i],\n nums[j], nums[left], nums[right])));\n\n while (left < right && nums[left] == nums[left + 1])\n left++; // dedupe\n while (left < right && nums[right] == nums[right - 1])\n right--; // dedupe\n\n left++; right--;\n }\n else if (nums[left] + nums[right] < sum2)\n left++;\n else right--;\n }\n }\n }\n }\n }\n return res;\n }", "private static int subarraySum(int[] nums, int target) {\n\n\t\tint count = 0;\n\n\t\tfor (int start = 0; start < nums.length; start++) {\n\n\t\t\tint sum = 0;\n\n\t\t\tfor (int end = start; end < nums.length; end++) {\n\t\t\t\tsum += nums[end];\n\t\t\t\t\n\t\t\t\tif(sum == target) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn count;\n\n\t}", "public int[] twoSum3(int[] numbers, int target) {\n int[] result = new int[2];\n for (int i = 0; i < numbers.length; i++) {\n for (int j = 1; j < numbers.length; j++) {\n if (numbers[i] + numbers[j] == target && i != j) {\n result[0] = i + 1;\n result[1] = j + 1;\n return result;\n }\n }\n }\n return result;\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 List<List<Integer>> combinationSum3(int k, int n) {\n List<List<Integer>> res = new ArrayList<>();\n int min = 0, max = 0;\n for (int i = 1; i <= k; i++) {\n min += i;\n max += (10 - i);\n }\n if (n > max || n < min) return res;\n List<Integer> list = new ArrayList<>();\n dfs(k, n, res, list, 1);\n return res;\n }", "public static void printAllSums(final Node node, int k) {\n if (node == null) return;\n\n List<Integer> list = new ArrayList<Integer>();\n findSum(node, k, list);\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 solution(int K, int[] A) {\n \n int total =0;\n int currentLength=0;\n \n for(int i=0; i<A.length; i++){\n currentLength = currentLength + A[i];\n if(currentLength >= K){\n total++;\n currentLength=0; // update\n }\n }\n return total;\n }", "public List<Integer> DP(int target, int[] numbers, HashMap<Integer, List<Integer>> memoMap) {\n\n if (memoMap.containsKey(target))\n return memoMap.get(target);\n if (target == 0)\n return List.of();\n if (target < 0)\n return null;\n\n List<Integer> minCombinationResult = null;\n\n for (int number : numbers) {\n\n List<Integer> potentialResult = DP(target - number, numbers, memoMap);\n if (potentialResult != null) {\n\n List<Integer> validResult = new ArrayList<Integer>(potentialResult);\n validResult.add(number);\n\n if (minCombinationResult == null || validResult.size() < minCombinationResult.size())\n minCombinationResult = validResult;\n }\n }\n\n memoMap.put(target, minCombinationResult);\n return memoMap.get(target);\n }", "public static int[] twoSum(int[] numbers, int target) {\n // Start typing your Java solution below\n // DO NOT write main() function\n int[] aux = new int[numbers.length];\n HashMap<Integer, Integer> valueToIndex = new HashMap<Integer, Integer>();\n for (int i = 0; i < numbers.length; i++) {\n valueToIndex.put(numbers[i], i);\n aux[i] = numbers[i];\n }\n \n int i = 0, j = numbers.length - 1;\n boolean found = false;\n \n Arrays.sort(aux);\n \n while (i != j) {\n if (aux[i] + aux[j] < target) i++;\n else if (aux[i] + aux[j] > target) j--;\n else {\n found = true;\n break;\n }\n }\n \n if (!found) return null;\n \n int[] result = new int[2];\n if (aux[i] == aux[j]) { /* Handle duplicates */\n int first = -1, second = -1;\n for (int k = 0; k < numbers.length; k++) {\n if (numbers[k] == aux[i]) {\n if (first == -1) {\n first = k;\n } else if (second == -1) {\n second = k;\n break;\n }\n }\n }\n result[0] = first + 1;\n result[1] = second + 1;\n return result;\n }\n \n \n if (valueToIndex.get(aux[i]) < valueToIndex.get(aux[j])) {\n result[0] = valueToIndex.get(aux[i]) + 1;\n result[1] = valueToIndex.get(aux[j]) + 1;\n } else {\n result[0] = valueToIndex.get(aux[j]) + 1;\n result[1] = valueToIndex.get(aux[i]) + 1;\n }\n return result;\n }", "private int numOfPairs(int[] nums, int start, int end, int target){\n int res = 0;\n while(start < end){\n int sum = nums[start] + nums[end];\n if(sum < target){\n res += end - start;\n start++;\n }\n else{\n end--;\n }\n }\n return res;\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 static void main(String[] args)\n\t{\n \n\t\tSystem.out.println(\"Enter the size of transaction array\");\n int trSize = sc.nextInt();\n\n // creating an array of provided size\n int[] transactions = new int[trSize];\n \n // get the elements of the array (in a loop)\n System.out.println(\"Enter the values of array\");\n for (int i = 0; i < transactions.length; i++) {\n transactions[i] = sc.nextInt();\n }\n // get the number of targets\n System.out.println(\"Enter the total no of targets that needs to be achieved\");\n int numTargets = sc.nextInt();\n \n // get in target one-by-one (loop)\n for (int i = 0; i < numTargets; i++) {\n \n \t// Get TargetValue\n System.out.println(\"Enter the value of target\");\n int target = sc.nextInt();\n \n int sum =0;\n for ( int j=0; j < transactions.length; j++) {\n \tsum = sum + transactions[j];\n \t\n \tif ( sum >= target) {\n \tSystem.out.println(\"Target achieved after \" + (j+1) + \" transactions\" );\n \tbreak; // break out of the innermost for loop\n \t}\n \t\n \t//we come to the last transactions, yet target is not achieved\n \tif (j == transactions.length - 1) {\n \t\tSystem.out.println( \"Given target is not achieved\");\n \t}\n \t\n }\n \n \n\t}\n\n}", "public List<Integer> _closestKValues(TreeNode root, double target, int k) {\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tfinal double targetValue = target;\n\t\tQueue<Integer> heap = new PriorityQueue<>(k, new Comparator<Integer>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Integer arg0, Integer arg1) {\n\t\t\t\tif (Math.abs(arg0 - targetValue) > Math.abs(arg1 - targetValue))\n\t\t\t\t\treturn 1;\n\t\t\t\telse if (Math.abs(arg0 - targetValue) < Math.abs(arg1 - targetValue))\n\t\t\t\t\treturn -1;\n\t\t\t\telse\n\t\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\t\taddToHeap(root, heap);\n\t\tfor(int i=0; i<k; i++) {\n list.add(heap.poll());\n }\n\t\treturn list;\n\t}", "public int kth1(int k) {\n\t int[] dp = new int[k];\n\t int indexTwo = 0;\n\t int indexThree = 0; \n\t int numberOfTwo = 2;\n\t int numberOfThree = 3;\n\t int nextNumber = 1;\n\t dp[0] = 1;\n\t for (int i = 1 ; i < k ; i++) {\n\t nextNumber = Math.min(numberOfTwo, numberOfThree);\n\t dp[i] = nextNumber;\n\t if (nextNumber == numberOfTwo) {\n\t indexTwo += 1;\n\t numberOfTwo = dp[indexTwo] * 2;\n\t }\n\t if (nextNumber == numberOfThree) {\n\t indexThree +=1;\n\t numberOfThree = dp[indexThree] * 3;\n\t }\n\t }\n\t return nextNumber;\n\t }", "static int nonDivisibleSubset(int k, int[] S) {\n\t\tint result = 0;\n\n\t\tArrayList < ArrayList < Integer >> solutions = new ArrayList < ArrayList < Integer >>();\n\t\tArrayList < HashSet < Integer >> minSets = new ArrayList < HashSet < Integer >>();\n\n\t\tsolutions.add(new ArrayList <Integer > ( Arrays.asList ( S [ 0 ])));\n\t\tminSets.add (new HashSet <Integer > ( ));\n\t\tminSets.get(0).add ( S [ 0 ] % k);\n\n\n\t\t// Go over all the numbers\n\t\tfor ( int i = 1; i < S.length; i++ ){\n\t\t\tint n = S [ i ]; \n\t\t\tint m = S [ i ] % k; // Number we will add to all the elements of all the minSets.\n\n\t\t\t// Go over all the minSets.\n\t\t\t// For each one, check that each element plus m is not divisible by k.\n\n\t\t\tboolean workedForASet = false;\n\t\t\tfor ( int j = 0; j < minSets.size(); j++){\n\t\t\t\t// For each set, check all the elements of the set.\n\n\t\t\t\tHashSet < Integer > minSet = minSets.get(j);\n\t\t\t\tIterator < Integer > iter = minSet.iterator();\n\n\t\t\t\tboolean works = true;\n\t\t\t\twhile ( iter.hasNext() && works ){\n\t\t\t\t\tint num = iter.next();\n\t\t\t\t\tif ( (num + m) % k == 0 ){\n\t\t\t\t\t\tworks = false;\n\t\t\t\t\t\tworkedForASet = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( works ){\n\t\t\t\t\tsolutions.get(j).add(n);\n\t\t\t\t\tminSet.add(m);\n\t\t\t\t}\n\t\t\t} \n\n\t\t\tif ( !workedForASet ){\n\t\t\t\tsolutions.add(new ArrayList <Integer > ( Arrays.asList ( n )));\n\t\t\t\tminSets.add (new HashSet <Integer > ( ));\n\t\t\t\tminSets.get (minSets.size() - 1).add ( m ); \n\t\t\t} \n\t\t}\n\n\t\t// Find the solution with the most elements.\n\n\t\tfor ( ArrayList <Integer > solution : solutions ){\n\t\t\tresult = Math.max ( result, solution.size() );\n\t\t\tSystem.out.println ( solution );\n\t\t}\n\n\t\tif ( result == 1 ) result = 0;\n\t\treturn result;\n\t}", "static double geometricSum(int k) {\n\t\tif (k==0) \n\t\t\treturn 1; // Endpoint\n\t\telse \n\t\t\treturn 1/Math.pow(2,k) + geometricSum(k-1); \n\t}", "public int reachNumber(int target) {\n target = Math.abs(target);\n int sum = 0;\n int i = 0;\n while(sum < target){\n i++;\n sum += i;\n }\n while((sum - target) % 2 != 0){\n i++;\n sum += i;\n }\n return i;\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 }", "public Collection<MatchingPair> matchingPairs(Collection<Integer> values, Integer targetSum)\n {\n HashMap<Integer, Integer> tableCompteur = new HashMap<>();\n LinkedHashMap<Integer, Integer> tablePaire = new LinkedHashMap<Integer, Integer>();\n Collection<MatchingPair> paireSansDuplication = new LinkedList();\n Collection<MatchingPair> solution = new LinkedList();\n\n // On itere sur les valeurs donnee pour savoir le compte de chaque valeur\n for (Integer valeur : values)\n {\n if (tableCompteur.containsKey(valeur))\n {\n // Partie Compteur\n Integer compteur = tableCompteur.get(valeur);\n compteur++;\n tableCompteur.put(valeur, compteur);\n }\n else {\n tableCompteur.put(valeur, 0);\n }\n\n }\n\n // On itere sur les valeurs donnee pour savoir les paires\n for (Integer element : values)\n {\n int temp = targetSum - element;\n if (tablePaire.containsKey(element))\n {\n if (tablePaire.get(element) != null)\n {\n paireSansDuplication.add(new MatchingPair(element, temp));\n }\n // si la table contient l'element on met nul pour ne pas avoir de repetition\n tablePaire.put(temp, null);\n }\n else if (!tablePaire.containsKey(element))\n {\n tablePaire.put(temp, element);\n }\n }\n\n // On trouve le minimum count entre les paire et leur compte pour tenir en compte de toutes les possibilites. Ici le meilleur cas reste O(n) ( pas de paire)\n for (MatchingPair paire : paireSansDuplication)\n {\n if (paire != null) { // verification au debug pr erreur nullpointer\n int a = tableCompteur.get(paire.first);\n int b = tableCompteur.get(paire.second);\n int minCount = Math.min(a+1, b+1);\n for (int i = 0; i < pow(minCount, 2); i++)\n {\n solution.add(new MatchingPair(paire.first, paire.second));\n }\n }\n }\n return solution;\n }", "private static int findPairs(int[] nums, int k) {\n if(nums == null || nums.length == 0 || k < 0)\n return 0;\n\n int count = 0;\n Map<Integer, Integer> map = new HashMap<>();\n for(int i : nums)\n map.put(i, map.getOrDefault(i, 0) + 1);\n\n for(Map.Entry<Integer, Integer> entry : map.entrySet()) {\n if(k == 0) {\n if(entry.getValue() >= 2)\n count++;\n } else {\n if(map.containsKey(entry.getKey() + k))\n count++;\n }\n }\n return count;\n }", "public static int searchTriplet(int[] arr, int targetSum) {\n\n Arrays.sort(arr); // need to make fiding number easier n * log(n) with qsort\n // we fix one value\n\n // internal array would have: value, left, right, target\n // when sum value+left+right.\n // if exactly target => return result\n // if > than target sum: move right pointer. Calculate absolute difference.\n // if < than target sum: move left pointers. Calculate absolute difference.\n // if at any point absolute difference becomes larger -> there is no point to continue iteratig\n // (^ how true if that?)\n // at the end of one cycle return absolute difference. If it is zero -> early exist,\n // if not, try again with different fixed number\n\n int smallestDifference = Integer.MAX_VALUE;\n for (int i = 0; i < arr.length - 2; i++) {\n int left = i + 1;\n int right = arr.length - 1;\n\n while (left < right) {\n int diffWithTarget = targetSum - arr[i] - arr[left] - arr[right];\n if (diffWithTarget == 0) {\n return diffWithTarget;\n }\n\n if (Math.abs(diffWithTarget) < Math.abs(smallestDifference)) {\n smallestDifference = diffWithTarget;\n }\n\n if (diffWithTarget > 0) {\n left++;\n } else {\n right--;\n }\n }\n }\n return targetSum - smallestDifference;\n }", "public List<List<Integer>> getCandidateA(int nStartVal, int k, int n) {\n \tint nMin; \r\n \tint nMax; \r\n \tint i;\r\n \tList<List<Integer>> lstlstCombSum = new ArrayList<List<Integer>>();\r\n List<Integer> lstResult = new ArrayList<Integer>();\r\n \t\r\n \tif (nStartVal > n || k == 0) return lstlstCombSum;\r\n \t\r\n \tif (k == 1) {\r\n \t\tif (n > 9) return lstlstCombSum;\r\n \t\tlstResult.add(n);\r\n \t\tlstlstCombSum.add(lstResult);\r\n \t\treturn lstlstCombSum;\r\n \t}\r\n \t\r\n \tnMin = nStartVal;\r\n \tnMax = (int) (n - (k-1)*k/2)/k; //Max value occurs when the remaining numbers are: x (the maxvalue), x+1, x+2 ... x+k-1 (the sum should be n)\r\n \t\r\n \tfor (i = nMin; i <= nMax; i++) { //Possible value of the first\r\n \t\tList<List<Integer>> lstlstCombSumTmp = new ArrayList<List<Integer>>();\r\n \t\tlstlstCombSumTmp = getCandidateA(i+1, k-1, n-i);\r\n \t\t\r\n \t\tif (lstlstCombSumTmp.isEmpty()) continue;\r\n \t\t\r\n \t\tfor (List<Integer> lstOneCombSum:lstlstCombSumTmp) {\r\n \t\t\tlstOneCombSum.add(0, i);\r\n \t\t\tlstlstCombSum.add(lstOneCombSum);\r\n \t\t}\r\n \t\t\r\n \t}\r\n \t\r\n \treturn lstlstCombSum;\r\n }", "private static void find_coins(int[] d, int k, int n) {\n\t\t\n\t}", "public static long solve(long[] data, long k) {\n int n = data.length;\n\n Buffer<Interval> buffer = new Buffer<>(Interval::new, x -> {}, n * 2);\n\n Randomized.shuffle(data);\n Arrays.sort(data);\n\n List<Interval> lastLevel = new ArrayList<>(n);\n List<Interval> curLevel = new ArrayList<>(n);\n lastLevel.add(newInterval(buffer, 0, n - 1));\n int level = Log2.floorLog(data[n - 1]);\n long mask = 0;\n for (; level >= 0; level--) {\n curLevel.clear();\n for (Interval interval : lastLevel) {\n int l = interval.l;\n int r = interval.r;\n int m = r;\n while (m >= l && Bits.get(data[m], level) == 1) {\n m--;\n }\n interval.m = m;\n }\n long total = 0;\n for (Interval interval : lastLevel) {\n total += (long) (interval.m - interval.l + 1) * (interval.relative.m - interval.relative.l + 1);\n total += (long) (interval.r - interval.m) * (interval.relative.r - interval.relative.m);\n }\n if (total < k) {\n k -= total;\n mask = Bits.set(mask, level, true);\n for (Interval interval : lastLevel) {\n if (interval.relative == interval) {\n if (interval.l <= interval.m && interval.m < interval.r) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n Interval b = newInterval(buffer, interval.m + 1, interval.r);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n } else if (interval.r >= interval.relative.r) {\n if (interval.l <= interval.m && interval.relative.r > interval.relative.m) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n Interval b = newInterval(buffer, interval.relative.m + 1, interval.relative.r);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n if (interval.m < interval.r && interval.relative.m >= interval.relative.l) {\n Interval a = newInterval(buffer, interval.m + 1, interval.r);\n Interval b = newInterval(buffer, interval.relative.l, interval.relative.m);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n }\n }\n } else {\n for (Interval interval : lastLevel) {\n if (interval.relative == interval) {\n if (interval.l <= interval.m) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n a.relative = a;\n curLevel.add(a);\n }\n if (interval.m < interval.r) {\n Interval a = newInterval(buffer, interval.m + 1, interval.r);\n a.relative = a;\n curLevel.add(a);\n }\n } else if (interval.r >= interval.relative.r) {\n if (interval.l <= interval.m && interval.relative.l <= interval.relative.m) {\n Interval a = newInterval(buffer, interval.l, interval.m);\n Interval b = newInterval(buffer, interval.relative.l, interval.relative.m);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n if (interval.m < interval.r && interval.relative.m < interval.relative.r) {\n Interval a = newInterval(buffer, interval.m + 1, interval.r);\n Interval b = newInterval(buffer, interval.relative.m + 1, interval.relative.r);\n a.relative = b;\n b.relative = a;\n curLevel.add(a);\n curLevel.add(b);\n }\n }\n }\n }\n\n for (Interval interval : lastLevel) {\n buffer.release(interval);\n }\n\n List<Interval> tmp = curLevel;\n curLevel = lastLevel;\n lastLevel = tmp;\n }\n\n return mask;\n }", "public boolean canPartition(int[] nums) {\n int sum = 0;\n int n = nums.length;\n for (int num : nums) sum += num;\n // sum cannot be splitted evenly\n if ((sum & 1) == 1) return false;\n int target = sum / 2;\n \n // dp[i][j] represents whether 0~i-1 numbers can reach\n // weight capacity j\n boolean[][] dp = new boolean[n+1][target+1];\n \n for (int i = 1; i <= n; i++) dp[i][0] = true;\n for (int j = 1; j <= target; j++) dp[0][j] = false;\n dp[0][0] = true;\n \n for (int i = 1; i <= n; i++) {\n for (int j = 1; j <= target; j++) {\n // if don't pick current number\n dp[i][j] = dp[i-1][j];\n if (j >= nums[i-1]) {\n dp[i][j] = dp[i][j] || dp[i-1][j-nums[i-1]];\n }\n }\n }\n return dp[n][target];\n \n \n // Solution2: optimizing to save space\n // https://leetcode.com/problems/partition-equal-subset-sum/discuss/90592/01-knapsack-detailed-explanation/94996\n int sum = 0;\n int n = nums.length;\n for (int num : nums) sum += num;\n if ((sum & 1) == 1) return false;\n int target = sum / 2;\n boolean[] dp = new boolean[target+1];\n dp[0] = true;\n for (int num : nums) {\n // here is the trick to save space\n // because we have to update dp[j] based on \n // previous dp[j-num] and dp[j] from previous loop.\n // if we update dp from left to right\n // we first update smaller dp which is dp[j-num]\n // then we won't be able to get original dp[j-num] and dp[j]\n // from previous loop, and eventually we get the wrong\n // answer. But if we update dp from right to left\n // we can assure everything is based on previous state\n for (int j = target; j >= num; j--) {\n // if (j >= num) {\n dp[j] = dp[j] || dp[j-num];\n // }\n }\n }\n return dp[target];\n }", "public static int numSubarrayProductLessThanK(int[] nums, int k) {\n if(k <= 1) return 0;\n int prod = 1;\n int left = 0;\n int ans = 0;\n \n for (int right = 0; right < nums.length; right++) {\n prod *= nums[right];\n \n while(prod >= k) {\n prod /= nums[left];\n left++;\n }\n ans += right - left + 1; \n }\n \n return ans;\n }", "public static void ThreeSum_binsearch(int[] a, int k)\r\n\t{\r\n\t // sort the array\r\n\t Arrays.sort(a);\r\n\t for (int i = 0; i < a.length; ++i)\r\n\t {\r\n\t for (int j = i+1; j < a.length; ++j)\r\n\t {\r\n\t int diff = k - (a[i] + a[j]);\r\n\t int idx = Arrays.binarySearch(a, j+1, a.length, diff);\r\n\t if (idx > 0)\r\n\t {\r\n\t System.out.println(\"[\" + a[i] + \",\" + a[j] + \",\" + a[idx] + \"]\");\r\n\t }\r\n\t }\r\n\t }\r\n\t}", "private static int pairwise(int[] input, int target) {\n\n Set<Integer> set = new HashSet<>();\n int indicesSum = 0;\n for(int i = 0; i < input.length; i++) {\n for(int j = i+1; j < input.length; j++) {\n if(isUseful(input, target, set, i, j)) {\n indicesSum += i + j;\n set.add(i);\n set.add(j);\n }\n }\n }\n return indicesSum;\n }", "public int numSubarrayProductLessThanK(int[] nums, int k) {\n return effective(nums, k);\n }", "private static void findNumbers(int[] candidates, int sum,\n List<List<Integer>> res, List<Integer> r, int i) {\n if (sum < 0) {\n return;\n }\n\n // if we get exact answer\n if (sum == 0) {\n List<Integer> r2 = new ArrayList<>(r);\n if (!res.contains(r2)) {\n res.add(r2);\n }\n return;\n }\n\n // Recur for all remaining elements that have value smaller than sum.\n while (i < candidates.length - 1) {\n i++;\n\n // Till every element in the array starting from i which can contribute to the sum\n r.add(candidates[i]); // add them to list\n\n // recur for next numbers\n findNumbers(candidates, sum - candidates[i], res, r, i);\n\n // remove number from list (backtracking)\n r.remove(r.size() - 1);\n }\n }", "public int findTargetSumWays(int[] nums, int tar) {\n int n = nums.length;\n if(n == 0) return 0;\n int sum=0;\n for(int val:nums) sum+=val;\n if(tar > sum || tar < -sum) return 0;\n int dp[][]=new int[n+1][2*sum+1];\n for(int arr[]:dp) Arrays.fill(arr,-1);\n return findTargetSumWays(nums,n,tar+sum,sum,dp);\n }", "public int[] twoSum(int[] numbers, int target) {\n if(numbers.length == 0){\n //empty array\n return new int[0];\n }\n HashMap<Integer,Integer> hashmapHelper = new HashMap<Integer,Integer>();\n for(int i = 0; i < numbers.length; i++){\n hashmapHelper.put(numbers[i],i+1);//put index value into hashtable\n }\n int i = 0;\n while(i<numbers.length){\n if(hashmapHelper.containsKey(target - numbers[i])){\n \n int index1 = i+1;\n int index2 = hashmapHelper.get(target - numbers[i]);\n if(index1 < index2){\n \tint[] index = {index1,index2};\n \treturn index;\n }\n else{\n int[] index = {index2,index1};\n return index;\n }\n }\n i++;\n }\n return new int[0];\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 }", "private static void findKClosestNumbers(int[] arr, int key, int k) {\n\n\t\tPriorityQueue<Integer> pq;\n\t\tint max = findMaxInArr(arr);\n\t\tint min = findMinInArr(arr);\n\n\t\tint maxDiff = Math.abs(key - max);\n\t\tint minDiff = Math.abs(key - min);\n\n\t\tif (maxDiff <= minDiff) {\n\t\t\tpq = new PriorityQueue<>(Collections.reverseOrder());\n\t\t} else {\n\t\t\tpq = new PriorityQueue<>();\n\t\t}\n\n\t\tfor (int e : arr) {\n\t\t\tpq.add(e);\n\t\t}\n\n\t\tint c = 0;\n\n\t\twhile (c < k) {\n\t\t\tSystem.out.println(pq.remove());\n\t\t\tc++;\n\t\t}\n\n\t}" ]
[ "0.77023506", "0.7600023", "0.70212674", "0.691081", "0.67625046", "0.6720165", "0.6696932", "0.662084", "0.6574929", "0.6569007", "0.6473164", "0.64321566", "0.64194936", "0.6374812", "0.6360346", "0.6341105", "0.62827444", "0.62798685", "0.62774456", "0.6273188", "0.6254531", "0.6249355", "0.6220489", "0.6209257", "0.61889213", "0.6185899", "0.6181644", "0.6163528", "0.61573404", "0.6156227", "0.6155235", "0.6148059", "0.6146849", "0.61451715", "0.6127746", "0.61248124", "0.6099651", "0.6093696", "0.60863996", "0.60816914", "0.6078862", "0.60645944", "0.6062333", "0.6058579", "0.60571575", "0.60506094", "0.6040306", "0.6036395", "0.60273165", "0.60233355", "0.6019394", "0.6008638", "0.6004342", "0.59958", "0.5990008", "0.5988723", "0.59870803", "0.59849286", "0.5971939", "0.59707934", "0.5952938", "0.59457916", "0.5939909", "0.59340507", "0.593036", "0.592993", "0.59252965", "0.5919276", "0.5912669", "0.5907185", "0.5905538", "0.5899763", "0.58679694", "0.5863255", "0.58583254", "0.58478063", "0.58459836", "0.5836685", "0.5830651", "0.5829253", "0.5820452", "0.5809103", "0.5808547", "0.5805603", "0.58049643", "0.58045614", "0.5800056", "0.5798119", "0.5796745", "0.5792335", "0.57906085", "0.57852054", "0.5781375", "0.5770387", "0.5763079", "0.57628345", "0.575989", "0.57549995", "0.57425964", "0.5729346" ]
0.74311584
2
Instantiates a new inquiry lftrattrib request.
public InquiryLftrattribRequest() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public InquiryLftrattribRequest(UserContext userContext)\r\n\t{\r\n\t\tsuper(userContext);\r\n\t}", "public InquiryGrupomuscularRequest()\r\n\t{\r\n\r\n\t}", "public RequestAttribute() {\n }", "public UBERequest() {\r\n }", "public Request(){\n\t\tthis(null, null, null);\n\t}", "private void initRequestAttributes(){\n\t\tmThrowedExceptions \t= new ArrayList<Exception>();\n\t\tmResponseCode\t\t= -1;\n\t}", "private Request() {\n initFields();\n }", "public Request() {\n this.setRequestId(newRequestId());\n this.setRequestValue(0.0);\n this.date = new Date();\n }", "TAttribute createTAttribute();", "private final static HttpRequest createRequest() {\r\n\r\n HttpRequest req = new BasicHttpRequest\r\n (\"GET\", \"/\", HttpVersion.HTTP_1_1);\r\n //(\"OPTIONS\", \"*\", HttpVersion.HTTP_1_1);\r\n\r\n return req;\r\n }", "public CalccustoRequest()\r\n\t{\r\n\t}", "protected LPDMODOMAttribute() {\n }", "public RPCRequest()\n\t{\n\t\tsuper();\n\t}", "private TransactionRequest initTransactionRequest() {\n TransactionRequest transactionRequestNew = new\n TransactionRequest(System.currentTimeMillis() + \"\", 20000);\n\n //set customer details\n transactionRequestNew.setCustomerDetails(initCustomerDetails());\n\n\n // set item details\n ItemDetails itemDetails = new ItemDetails(\"1\", 20000, 1, \"Trekking Shoes\");\n\n // Add item details into item detail list.\n ArrayList<ItemDetails> itemDetailsArrayList = new ArrayList<>();\n itemDetailsArrayList.add(itemDetails);\n transactionRequestNew.setItemDetails(itemDetailsArrayList);\n\n\n // Create creditcard options for payment\n CreditCard creditCard = new CreditCard();\n\n creditCard.setSaveCard(false); // when using one/two click set to true and if normal set to false\n\n// this methode deprecated use setAuthentication instead\n// creditCard.setSecure(true); // when using one click must be true, for normal and two click (optional)\n\n creditCard.setAuthentication(CreditCard.AUTHENTICATION_TYPE_3DS);\n\n // noted !! : channel migs is needed if bank type is BCA, BRI or MyBank\n// creditCard.setChannel(CreditCard.MIGS); //set channel migs\n creditCard.setBank(BankType.BCA); //set spesific acquiring bank\n\n transactionRequestNew.setCreditCard(creditCard);\n\n return transactionRequestNew;\n }", "public FellowCommuReq() {\n super();\n setRequestUrl(\"FellowCommuReq\");\n }", "protected RequestLine createRequestLine(String method, String uri, ProtocolVersion ver) {\n/* 337 */ return new BasicRequestLine(method, uri, ver);\n/* */ }", "Attribute createAttribute();", "Attribute createAttribute();", "public Attr() {\n\t\t\tsuper();\n\t\t}", "public com.vodafone.global.er.decoupling.binding.request.ErRequest createErRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.ErRequestImpl();\n }", "public ProAddAttrRecord() {\n super(ProAddAttr.PRO_ADD_ATTR);\n }", "public com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.rfarequest.v1.RFARequest getRFARequestReq(RFARequest rfaRequest){\n\t\tcom.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.rfarequest.v1.RFARequest rfaRequestReq = \n\t\t\tnew com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.rfarequest.v1.RFARequest();\n\t\t\n\t\trfaRequestReq.setBookingNumber( rfaRequest.getBookingNumber() );\t\n\t\trfaRequestReq.setPosnr( rfaRequest.getPosnr() );\n\t\trfaRequestReq.setConfirmationNumber( rfaRequest.getConfirmationNumber() );\n\t\trfaRequestReq.setRequestMode( rfaRequest.getRequestMode() );\n\t\trfaRequestReq.setVendorEmailId( rfaRequest.getVendorEmailId() );\n\t\trfaRequestReq.setVendorPhoneNUmber( rfaRequest.getVendorPhoneNUmber() );\n\t\trfaRequestReq.setVendorFaxNumber( rfaRequest.getVendorFaxNumber() );\n\t\trfaRequestReq.setVendorMode( rfaRequest.getVendorMode() );\t\n\t\trfaRequestReq.setAgentMode( rfaRequest.getAgentMode() );\n\t\trfaRequestReq.setAgentEmailId( rfaRequest.getAgentEmailId() );\n\t\trfaRequestReq.setAgentPhoneNo( rfaRequest.getAgentPhoneNo() );\n\t\trfaRequestReq.setAgentFaxNo( rfaRequest.getAgentFaxNo() );\n\t\trfaRequestReq.setRequestConfirmBy( rfaRequest.getRequestConfirmBy() );\n\t\trfaRequestReq.setRequestDeclineBy( rfaRequest.getRequestDeclineBy() );\n\t\t\n\t\treturn rfaRequestReq;\n\t}", "public com.vodafone.global.er.decoupling.binding.request.UsageAttributesType createUsageAttributesType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.UsageAttributesTypeImpl();\n }", "AttributeDeclarations createAttributeDeclarations();", "public TboFlightSearchRequest() {\n}", "public RequestAttribute(String name, String value) {\n this.name = name;\n this.value = value;\n }", "private Hashtable getRequestedAttributes() {\n\tif (fRequestedAttributes == null) {\n\t fRequestedAttributes = new Hashtable(7, (float)0.9);\n fRequestedAttributes.put(TextAttribute.TRANSFORM,\n\t\t\t\t IDENT_TX_ATTRIBUTE);\n fRequestedAttributes.put(TextAttribute.FAMILY, name);\n fRequestedAttributes.put(TextAttribute.SIZE, new Float(size));\n\t fRequestedAttributes.put(TextAttribute.WEIGHT,\n\t\t\t\t (style & BOLD) != 0 ? \n\t\t\t\t TextAttribute.WEIGHT_BOLD :\n\t\t\t\t TextAttribute.WEIGHT_REGULAR);\n\t fRequestedAttributes.put(TextAttribute.POSTURE,\n\t\t\t\t (style & ITALIC) != 0 ? \n\t\t\t\t TextAttribute.POSTURE_OBLIQUE :\n\t\t\t\t TextAttribute.POSTURE_REGULAR);\n fRequestedAttributes.put(TextAttribute.SUPERSCRIPT,\n new Integer(superscript));\n fRequestedAttributes.put(TextAttribute.WIDTH,\n new Float(width));\n\t}\n\treturn fRequestedAttributes;\n }", "public Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result) {\n throw new NO_IMPLEMENT(reason);\n }", "public QBXMLRequest() {\n }", "protected abstract void createAttributes();", "public CM_DUEL_REQUEST(final int opcode) {\r\n\t\tsuper(opcode);\r\n\t}", "public ServiceRequest() {\n super();\n this.addNamespaceToRequest = true;\n }", "ShipmentAttribute createShipmentAttribute();", "public TInvoiceRequestEventRecord() {\n super(TInvoiceRequestEvent.T_INVOICE_REQUEST_EVENT);\n }", "public GetAttributesDefinitionV2() {}", "@Override\n\tpublic void initRequest() {\n\n\t}", "public IRAttribute ( ) {\n\t\tsuper();\n\t}", "protected Attribute createAttribute(DapAttribute dapattr) {\n return createAttribute(null, dapattr);\n }", "public CartCreateRequest(String email, String ltc) {\n\t\tthis(email, ltc, null, null, null);\n\t}", "public Request(\n Object requestId, boolean readRequest, int address, byte[] buffer, int length, TrcEvent completionEvent,\n TrcNotifier.Receiver completionHandler)\n {\n this.requestId = requestId;\n this.readRequest = readRequest;\n this.address = address;\n this.buffer = buffer;\n this.length = length;\n this.completionEvent = completionEvent;\n this.completionHandler = completionHandler;\n this.canceled = false;\n }", "private Reqbaz() {\n super(\"reqbaz\", null);\n }", "public RequestMessage() {\r\n\t\tsuper();\r\n\t\tthis.criteria = new PersonSearchCriteria();\r\n\t\tthis.setSourceSystemID(SOURCE_SYSTEM_ID);\r\n\t\tthis.setSourceUserID(SOURCE_USER_ID);\r\n\t}", "public CreateOrderRequest() {\n\t\t_pcs = new PropertyChangeSupport(this);\n\t}", "public static void createFieldAttributes(HttpServletRequest request) {\n LOGGER.debug(\"createFieldAttributes ...\");\n HttpSession session = request.getSession();\n session.setAttribute(\"username\", request.getParameter(\"username\"));\n session.setAttribute(\"password\", request.getParameter(\"password\"));\n session.setAttribute(\"confirm-password\", request.getParameter(\"confirm-password\"));\n session.setAttribute(\"email\", request.getParameter(\"email\"));\n session.setAttribute(\"role\", request.getParameter(\"role\"));\n session.setAttribute(\"table-id\", request.getParameter(\"table-id\"));\n }", "Request(Request otherRequest) {\n this.reqNum = otherRequest.reqNum;\n this.reqText = otherRequest.reqText;\n this.reqExampleDocs = new ArrayList<ExampleDocument>(otherRequest.reqExampleDocs);\n }", "public FipaRequestProtocol(ACLAgent agent){\n\t\tsuper(agent);\n\t\tsetMaximumParticipants((short) 2);\n\t}", "boolean createAcquest(Acquest acquest);", "@Function Attr createAttribute(String name);", "com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();", "public static ObaTripDetailsRequest newRequest(Context context, String tripId) {\n return new Builder(context, tripId).build();\n }", "public SystemRequest() {\r\n super(FunctionID.SYSTEM_REQUEST.toString());\r\n }", "public Request() {\n }", "public UfFlowAttributeRecord() {\n super(UfFlowAttribute.UF_FLOW_ATTRIBUTE);\n }", "private void setRequestAttributes(HttpServletRequest req, String nickname, boolean error) {\n\t\tUtil.provideLoggedUserInfo(req);\n\t\treq.setAttribute(\"nick\", nickname);\n\t\treq.setAttribute(\"users\", DAOProvider.getDAO().getBlogUsers());\n\t\treq.setAttribute(\"error\", error);\n\t}", "public TestBSSVRequest() {\r\n }", "public UpdateUDFRequest() {\n this( null, null);\n }", "Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result,\n ExceptionList exclist,\n ContextList ctxlist);", "private static AdRequest getAdRequest() {\n\tAdRequest request = new AdRequest();\n\n\t// add test devices\n\trequest.addTestDevice(AdRequest.TEST_EMULATOR);\n\trequest.addTestDevice(\"CF95DC53F383F9A836FD749F3EF439CD\");\n\n\tLog.d(AbstractSmsActivity.OLD_SCHOOL_SMS, \"New AdRequest: Location=[\"\n\t\t+ request.getLocation() + \"] Gender=[\" + request.getGender()\n\t\t+ \"] Birthday=[\" + request.getBirthday() + \"] Keywords=[\"\n\t\t+ request.getKeywords() + \"]\");\n\n\treturn request;\n }", "public Request() {\n\n }", "public RFARequest getRFARequest(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.rfarequest.v1.RFARequest res){\n\t\tRFARequest rFARequest = new RFARequest();\n\t\t\n\t\trFARequest.setBookingNumber( res.getBookingNumber() );\t\n\t\trFARequest.setPosnr( res.getPosnr() );\n\t\trFARequest.setConfirmationNumber( res.getConfirmationNumber() );\n\t\trFARequest.setRequestMode( res.getRequestMode() );\n\t\trFARequest.setVendorEmailId( res.getVendorEmailId() );\n\t\trFARequest.setVendorPhoneNUmber( res.getVendorPhoneNUmber() );\n\t\trFARequest.setVendorFaxNumber( res.getVendorFaxNumber() );\n\t\trFARequest.setVendorMode( res.getVendorMode() );\n\t\trFARequest.setAgentMode( res.getAgentMode() );\n\t\trFARequest.setAgentEmailId( res.getAgentEmailId() );\n\t\trFARequest.setAgentPhoneNo( res.getAgentPhoneNo() );\n\t\trFARequest.setAgentFaxNo( res.getAgentFaxNo());\n\t\trFARequest.setRequestConfirmBy( res.getRequestConfirmBy() );\n\t\trFARequest.setRequestDeclineBy( res.getRequestDeclineBy());\n\t\t\n\t\treturn rFARequest;\n\t}", "public Attribute_New(String _name, String _value)\n {\n name = _name;\n\n List singleAttributList = new ArrayList<String>();\n singleAttributList.add(_value);\n\n }", "public static Request constructRequest(VirtualControlLoopEvent onset, ControlLoopOperation operation, Policy policy,\n String targetVnf) {\n /*\n * Construct an APPC request\n */\n Request request = new Request();\n request.setCommonHeader(new CommonHeader());\n request.getCommonHeader().setRequestId(onset.getRequestId());\n request.getCommonHeader().setSubRequestId(operation.getSubRequestId());\n request.setAction(policy.getRecipe().substring(0, 1).toUpperCase() + policy.getRecipe().substring(1));\n\n // convert policy payload strings to objects\n if (policy.getPayload() == null) {\n logger.info(\"no APPC payload specified for policy {}\", policy.getName());\n } else {\n convertPayload(policy.getPayload(), request.getPayload());\n }\n\n // add/replace specific values\n request.getPayload().put(\"generic-vnf.vnf-id\", targetVnf);\n\n /*\n * Return the request\n */\n\n return request;\n }", "@Override\n\tpublic abstract RequestAttributeInspectorFactory getWrapped();", "protected DiameterClientRequest newRequest(ChargingConstants.CcRecordType type) {\n\t\tlong accountingRecordNumber = getRecordNumber();\n\t\tDiameterClientRequest request = _client.newAuthRequest(ChargingConstants.COMMAND_CC, true);\n\n\t\tDiameterAVP avp = new DiameterAVP(ChargingUtils.getCcRequestTypeAVP());\n\t\tavp.setValue(EnumeratedFormat.toEnumerated(type.getValue()), false);\n\t\trequest.addDiameterAVP(avp);\n\n\t\tavp = new DiameterAVP(ChargingUtils.getCcRequestNumberAVP());\n\t\tavp.setValue(Unsigned32Format.toUnsigned32(accountingRecordNumber), false);\n\t\trequest.addDiameterAVP(avp);\n\n\t\treturn request;\n\t}", "com.exacttarget.wsdl.partnerapi.QueryRequest addNewQueryRequest();", "static Attribute createAttribute(String name, Field field) {\n\t\tAttribute attribute = new Attribute(name, field);\n\t\tattribute.setKind(Attribute.NONE);\n\t\tattribute.setPreferenceType(Attribute.GAIN);\n\t\treturn attribute;\n\t}", "Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result);", "public DataRequest() {\n\t\tfilters = new ArrayList<FilteringRule>();\n\t\tsort_by = new ArrayList<SortingRule>();\n\t}", "public com.vodafone.global.er.decoupling.binding.request.ModifyTariffRequest createModifyTariffRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.ModifyTariffRequestImpl();\n }", "AtomicDataAttributes createAtomicDataAttributes();", "public GetContactRequest()\r\n {\r\n }", "DataStreamAttributes createDataStreamAttributes();", "private Builder(io.confluent.developer.InterceptTest other) {\n super(SCHEMA$);\n if (isValidValue(fields()[0], other.req_custid)) {\n this.req_custid = data().deepCopy(fields()[0].schema(), other.req_custid);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.req_message)) {\n this.req_message = data().deepCopy(fields()[1].schema(), other.req_message);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.req_json)) {\n this.req_json = data().deepCopy(fields()[2].schema(), other.req_json);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.req_remote_addr)) {\n this.req_remote_addr = data().deepCopy(fields()[3].schema(), other.req_remote_addr);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.req_uri)) {\n this.req_uri = data().deepCopy(fields()[4].schema(), other.req_uri);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.req_headers)) {\n this.req_headers = data().deepCopy(fields()[5].schema(), other.req_headers);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.req_method)) {\n this.req_method = data().deepCopy(fields()[6].schema(), other.req_method);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.result_json)) {\n this.result_json = data().deepCopy(fields()[7].schema(), other.result_json);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.result_post)) {\n this.result_post = data().deepCopy(fields()[8].schema(), other.result_post);\n fieldSetFlags()[8] = true;\n }\n }", "public PickUpCasualtyRequest() {\n\n // empty\n }", "public ChatRequest()\r\n\t{\r\n\t}", "public Request(final FullHttpRequest request) {\n this.request = request;\n }", "public static Packet12EntityDefRequest create(final int defID) {\n\t\tPacket12EntityDefRequest r =\n\t\t\t\tnew Packet12EntityDefRequest();\n\t\tr.defID = defID;\n\t\treturn r;\n\t}", "ShipmentTypeAttr createShipmentTypeAttr();", "public CalccustoRequest(UserContext userContext)\r\n\t{\r\n\t\tsuper(userContext);\r\n\t}", "public com.vodafone.global.er.decoupling.binding.request.GetTariffRequest createGetTariffRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.GetTariffRequestImpl();\n }", "private void getTransactionDetailsRequest() {\r\n\t\tBasicXmlDocument document = new BasicXmlDocument();\r\n\t\tdocument.parseString(\"<\" + TransactionType.GET_TRANSACTION_DETAILS.getValue()\r\n\t\t\t\t+ \" xmlns = \\\"\" + XML_NAMESPACE + \"\\\" />\");\r\n\r\n\t\taddAuthentication(document);\r\n\t\taddReportingTransactionId(document);\r\n\r\n\t\tcurrentRequest = document;\r\n\t}", "private Builder(io.confluent.developer.InterceptTest.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.req_custid)) {\n this.req_custid = data().deepCopy(fields()[0].schema(), other.req_custid);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.req_message)) {\n this.req_message = data().deepCopy(fields()[1].schema(), other.req_message);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.req_json)) {\n this.req_json = data().deepCopy(fields()[2].schema(), other.req_json);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.req_remote_addr)) {\n this.req_remote_addr = data().deepCopy(fields()[3].schema(), other.req_remote_addr);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.req_uri)) {\n this.req_uri = data().deepCopy(fields()[4].schema(), other.req_uri);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.req_headers)) {\n this.req_headers = data().deepCopy(fields()[5].schema(), other.req_headers);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.req_method)) {\n this.req_method = data().deepCopy(fields()[6].schema(), other.req_method);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.result_json)) {\n this.result_json = data().deepCopy(fields()[7].schema(), other.result_json);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.result_post)) {\n this.result_post = data().deepCopy(fields()[8].schema(), other.result_post);\n fieldSetFlags()[8] = true;\n }\n }", "public VDCRequest() {\n\t\tthis.listVirVM = new HashMap<>();\n\t\tthis.listVirLink = new LinkedList<>();\n\t\t// this.listVirSwitch = new LinkedList<>();\n\t\tthis.numVM = 0;\n\t\tthis.vdcID = 0;\n\t\tthis.bwrequest = 0;\n\t}", "private PredictRequest() {\n\t}", "private Request() {}", "private Request() {}", "public Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result,\n ExceptionList exceptions,\n ContextList contexts) {\n throw new NO_IMPLEMENT(reason);\n }", "private void initRequest()\n\t{\n\t\tthis.request = new RestClientReportRequest();\n\t\tRequestHelper.copyConfigsToRequest(this.getConfigs(), this.request);\n\t\tRequestHelper.copyParamsToRequest(this.getParams(), this.request);\n\t\t\n\t\tthis.performQuery();\n\t}", "public accessRequest(String id, String userid, String RequestUserid, String state, String dateTime, String name){\n\n this.userid=userid;\n this.dateTime=dateTime;\n this.id=id;\n this.RequestUserid=RequestUserid;\n this.state=state;\n this.name=name;\n\n }", "public ContractRequest() {\n\t\tsuper(PREFERENCES_NAMES);\n\t}", "public static PredictBuilder newPredictRequest() {\n\t\treturn new PredictBuilder();\n\t}", "public DConditionCounterIncrRequest(int num) {\r\n\t\t_num = num;\r\n\t}", "protected void createLocationRequest() {\n\t\tmLocationRequest = new LocationRequest();\n\t\tmLocationRequest.setInterval(UPDATE_INTERVAL);\n\t\tmLocationRequest.setFastestInterval(FATEST_INTERVAL);\n\t\tmLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n\t\tmLocationRequest.setSmallestDisplacement(DISPLACEMENT);\n\t}", "public final HintRequest mo38055a() {\n if (this.f38734c == null) {\n this.f38734c = new String[0];\n }\n if (this.f38732a || this.f38733b || this.f38734c.length != 0) {\n return new HintRequest(this);\n }\n throw new IllegalStateException(\"At least one authentication method must be specified\");\n }", "com.icare.eai.schema.om.evSORequest.EvSORequestDocument.EvSORequest addNewEvSORequest();", "public DDetRetContrArtEscenicsAttTO() { }", "public void addAttribute(TLAttribute attribute);", "private Request(MarketDataRequestAtom inAtom,\n MarketDataRequest inCompleteRequest)\n {\n atom = inAtom;\n receiver.subscribe(this);\n flow = moduleManager.createDataFlow(new DataRequest[] { new DataRequest(feed.getURN(),generateRequestFromAtom(inAtom,inCompleteRequest)),new DataRequest(receiver.getURN()) });\n }", "com.exacttarget.wsdl.partnerapi.QueryRequestMsgDocument.QueryRequestMsg addNewQueryRequestMsg();", "public CertificationRequestInfo(\n X500Name subject,\n SubjectPublicKeyInfo pkInfo,\n ASN1Set attributes)\n {\n if ((subject == null) || (pkInfo == null))\n {\n throw new IllegalArgumentException(\"Not all mandatory fields set in CertificationRequestInfo generator.\");\n }\n\n validateAttributes(attributes);\n\n this.subject = subject;\n this.subjectPKInfo = pkInfo;\n this.attributes = attributes;\n }" ]
[ "0.76419014", "0.5993871", "0.5842523", "0.56066054", "0.5582066", "0.54610825", "0.5437938", "0.54264903", "0.5365091", "0.53603166", "0.53460175", "0.53305763", "0.5306206", "0.52937937", "0.52865", "0.5257848", "0.5256177", "0.5256177", "0.5251407", "0.52396876", "0.5207253", "0.52045816", "0.5194578", "0.5174301", "0.51638573", "0.51629627", "0.51618224", "0.5131581", "0.5124539", "0.51195705", "0.5117284", "0.5117011", "0.5109308", "0.510822", "0.5098643", "0.50956523", "0.5071615", "0.5068392", "0.5065354", "0.50609505", "0.5056094", "0.5055392", "0.50491196", "0.5046994", "0.5033888", "0.50278944", "0.5019235", "0.5013331", "0.5010771", "0.50085455", "0.4989982", "0.4981424", "0.49784124", "0.4958908", "0.49536413", "0.49451065", "0.49398503", "0.49361703", "0.4933457", "0.49280137", "0.49265167", "0.49141943", "0.49128538", "0.49066252", "0.49001488", "0.48960248", "0.48940486", "0.48927298", "0.48867506", "0.4883546", "0.4881466", "0.48766205", "0.487502", "0.4872236", "0.48615924", "0.48595762", "0.48543718", "0.4849824", "0.483798", "0.48344934", "0.4821536", "0.4818115", "0.48160887", "0.4812563", "0.48073453", "0.48073453", "0.4807091", "0.4804902", "0.48017648", "0.47981405", "0.4793937", "0.47818848", "0.47808057", "0.47801012", "0.4778302", "0.47771928", "0.47765875", "0.47740853", "0.4769497", "0.4763571" ]
0.84393096
0
Instantiates a new inquiry lftrattrib request.
public InquiryLftrattribRequest(UserContext userContext) { super(userContext); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public InquiryLftrattribRequest()\r\n\t{\r\n\t}", "public InquiryGrupomuscularRequest()\r\n\t{\r\n\r\n\t}", "public RequestAttribute() {\n }", "public UBERequest() {\r\n }", "public Request(){\n\t\tthis(null, null, null);\n\t}", "private void initRequestAttributes(){\n\t\tmThrowedExceptions \t= new ArrayList<Exception>();\n\t\tmResponseCode\t\t= -1;\n\t}", "private Request() {\n initFields();\n }", "public Request() {\n this.setRequestId(newRequestId());\n this.setRequestValue(0.0);\n this.date = new Date();\n }", "TAttribute createTAttribute();", "private final static HttpRequest createRequest() {\r\n\r\n HttpRequest req = new BasicHttpRequest\r\n (\"GET\", \"/\", HttpVersion.HTTP_1_1);\r\n //(\"OPTIONS\", \"*\", HttpVersion.HTTP_1_1);\r\n\r\n return req;\r\n }", "public CalccustoRequest()\r\n\t{\r\n\t}", "protected LPDMODOMAttribute() {\n }", "public RPCRequest()\n\t{\n\t\tsuper();\n\t}", "private TransactionRequest initTransactionRequest() {\n TransactionRequest transactionRequestNew = new\n TransactionRequest(System.currentTimeMillis() + \"\", 20000);\n\n //set customer details\n transactionRequestNew.setCustomerDetails(initCustomerDetails());\n\n\n // set item details\n ItemDetails itemDetails = new ItemDetails(\"1\", 20000, 1, \"Trekking Shoes\");\n\n // Add item details into item detail list.\n ArrayList<ItemDetails> itemDetailsArrayList = new ArrayList<>();\n itemDetailsArrayList.add(itemDetails);\n transactionRequestNew.setItemDetails(itemDetailsArrayList);\n\n\n // Create creditcard options for payment\n CreditCard creditCard = new CreditCard();\n\n creditCard.setSaveCard(false); // when using one/two click set to true and if normal set to false\n\n// this methode deprecated use setAuthentication instead\n// creditCard.setSecure(true); // when using one click must be true, for normal and two click (optional)\n\n creditCard.setAuthentication(CreditCard.AUTHENTICATION_TYPE_3DS);\n\n // noted !! : channel migs is needed if bank type is BCA, BRI or MyBank\n// creditCard.setChannel(CreditCard.MIGS); //set channel migs\n creditCard.setBank(BankType.BCA); //set spesific acquiring bank\n\n transactionRequestNew.setCreditCard(creditCard);\n\n return transactionRequestNew;\n }", "public FellowCommuReq() {\n super();\n setRequestUrl(\"FellowCommuReq\");\n }", "protected RequestLine createRequestLine(String method, String uri, ProtocolVersion ver) {\n/* 337 */ return new BasicRequestLine(method, uri, ver);\n/* */ }", "Attribute createAttribute();", "Attribute createAttribute();", "public Attr() {\n\t\t\tsuper();\n\t\t}", "public com.vodafone.global.er.decoupling.binding.request.ErRequest createErRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.ErRequestImpl();\n }", "public ProAddAttrRecord() {\n super(ProAddAttr.PRO_ADD_ATTR);\n }", "public com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.rfarequest.v1.RFARequest getRFARequestReq(RFARequest rfaRequest){\n\t\tcom.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.rfarequest.v1.RFARequest rfaRequestReq = \n\t\t\tnew com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.rfarequest.v1.RFARequest();\n\t\t\n\t\trfaRequestReq.setBookingNumber( rfaRequest.getBookingNumber() );\t\n\t\trfaRequestReq.setPosnr( rfaRequest.getPosnr() );\n\t\trfaRequestReq.setConfirmationNumber( rfaRequest.getConfirmationNumber() );\n\t\trfaRequestReq.setRequestMode( rfaRequest.getRequestMode() );\n\t\trfaRequestReq.setVendorEmailId( rfaRequest.getVendorEmailId() );\n\t\trfaRequestReq.setVendorPhoneNUmber( rfaRequest.getVendorPhoneNUmber() );\n\t\trfaRequestReq.setVendorFaxNumber( rfaRequest.getVendorFaxNumber() );\n\t\trfaRequestReq.setVendorMode( rfaRequest.getVendorMode() );\t\n\t\trfaRequestReq.setAgentMode( rfaRequest.getAgentMode() );\n\t\trfaRequestReq.setAgentEmailId( rfaRequest.getAgentEmailId() );\n\t\trfaRequestReq.setAgentPhoneNo( rfaRequest.getAgentPhoneNo() );\n\t\trfaRequestReq.setAgentFaxNo( rfaRequest.getAgentFaxNo() );\n\t\trfaRequestReq.setRequestConfirmBy( rfaRequest.getRequestConfirmBy() );\n\t\trfaRequestReq.setRequestDeclineBy( rfaRequest.getRequestDeclineBy() );\n\t\t\n\t\treturn rfaRequestReq;\n\t}", "public com.vodafone.global.er.decoupling.binding.request.UsageAttributesType createUsageAttributesType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.UsageAttributesTypeImpl();\n }", "AttributeDeclarations createAttributeDeclarations();", "public TboFlightSearchRequest() {\n}", "public RequestAttribute(String name, String value) {\n this.name = name;\n this.value = value;\n }", "private Hashtable getRequestedAttributes() {\n\tif (fRequestedAttributes == null) {\n\t fRequestedAttributes = new Hashtable(7, (float)0.9);\n fRequestedAttributes.put(TextAttribute.TRANSFORM,\n\t\t\t\t IDENT_TX_ATTRIBUTE);\n fRequestedAttributes.put(TextAttribute.FAMILY, name);\n fRequestedAttributes.put(TextAttribute.SIZE, new Float(size));\n\t fRequestedAttributes.put(TextAttribute.WEIGHT,\n\t\t\t\t (style & BOLD) != 0 ? \n\t\t\t\t TextAttribute.WEIGHT_BOLD :\n\t\t\t\t TextAttribute.WEIGHT_REGULAR);\n\t fRequestedAttributes.put(TextAttribute.POSTURE,\n\t\t\t\t (style & ITALIC) != 0 ? \n\t\t\t\t TextAttribute.POSTURE_OBLIQUE :\n\t\t\t\t TextAttribute.POSTURE_REGULAR);\n fRequestedAttributes.put(TextAttribute.SUPERSCRIPT,\n new Integer(superscript));\n fRequestedAttributes.put(TextAttribute.WIDTH,\n new Float(width));\n\t}\n\treturn fRequestedAttributes;\n }", "public Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result) {\n throw new NO_IMPLEMENT(reason);\n }", "public QBXMLRequest() {\n }", "protected abstract void createAttributes();", "public CM_DUEL_REQUEST(final int opcode) {\r\n\t\tsuper(opcode);\r\n\t}", "public ServiceRequest() {\n super();\n this.addNamespaceToRequest = true;\n }", "ShipmentAttribute createShipmentAttribute();", "public TInvoiceRequestEventRecord() {\n super(TInvoiceRequestEvent.T_INVOICE_REQUEST_EVENT);\n }", "public GetAttributesDefinitionV2() {}", "@Override\n\tpublic void initRequest() {\n\n\t}", "public IRAttribute ( ) {\n\t\tsuper();\n\t}", "protected Attribute createAttribute(DapAttribute dapattr) {\n return createAttribute(null, dapattr);\n }", "public CartCreateRequest(String email, String ltc) {\n\t\tthis(email, ltc, null, null, null);\n\t}", "public Request(\n Object requestId, boolean readRequest, int address, byte[] buffer, int length, TrcEvent completionEvent,\n TrcNotifier.Receiver completionHandler)\n {\n this.requestId = requestId;\n this.readRequest = readRequest;\n this.address = address;\n this.buffer = buffer;\n this.length = length;\n this.completionEvent = completionEvent;\n this.completionHandler = completionHandler;\n this.canceled = false;\n }", "private Reqbaz() {\n super(\"reqbaz\", null);\n }", "public RequestMessage() {\r\n\t\tsuper();\r\n\t\tthis.criteria = new PersonSearchCriteria();\r\n\t\tthis.setSourceSystemID(SOURCE_SYSTEM_ID);\r\n\t\tthis.setSourceUserID(SOURCE_USER_ID);\r\n\t}", "public CreateOrderRequest() {\n\t\t_pcs = new PropertyChangeSupport(this);\n\t}", "public static void createFieldAttributes(HttpServletRequest request) {\n LOGGER.debug(\"createFieldAttributes ...\");\n HttpSession session = request.getSession();\n session.setAttribute(\"username\", request.getParameter(\"username\"));\n session.setAttribute(\"password\", request.getParameter(\"password\"));\n session.setAttribute(\"confirm-password\", request.getParameter(\"confirm-password\"));\n session.setAttribute(\"email\", request.getParameter(\"email\"));\n session.setAttribute(\"role\", request.getParameter(\"role\"));\n session.setAttribute(\"table-id\", request.getParameter(\"table-id\"));\n }", "Request(Request otherRequest) {\n this.reqNum = otherRequest.reqNum;\n this.reqText = otherRequest.reqText;\n this.reqExampleDocs = new ArrayList<ExampleDocument>(otherRequest.reqExampleDocs);\n }", "public FipaRequestProtocol(ACLAgent agent){\n\t\tsuper(agent);\n\t\tsetMaximumParticipants((short) 2);\n\t}", "boolean createAcquest(Acquest acquest);", "@Function Attr createAttribute(String name);", "com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();", "public static ObaTripDetailsRequest newRequest(Context context, String tripId) {\n return new Builder(context, tripId).build();\n }", "public SystemRequest() {\r\n super(FunctionID.SYSTEM_REQUEST.toString());\r\n }", "public Request() {\n }", "public UfFlowAttributeRecord() {\n super(UfFlowAttribute.UF_FLOW_ATTRIBUTE);\n }", "private void setRequestAttributes(HttpServletRequest req, String nickname, boolean error) {\n\t\tUtil.provideLoggedUserInfo(req);\n\t\treq.setAttribute(\"nick\", nickname);\n\t\treq.setAttribute(\"users\", DAOProvider.getDAO().getBlogUsers());\n\t\treq.setAttribute(\"error\", error);\n\t}", "public TestBSSVRequest() {\r\n }", "public UpdateUDFRequest() {\n this( null, null);\n }", "Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result,\n ExceptionList exclist,\n ContextList ctxlist);", "private static AdRequest getAdRequest() {\n\tAdRequest request = new AdRequest();\n\n\t// add test devices\n\trequest.addTestDevice(AdRequest.TEST_EMULATOR);\n\trequest.addTestDevice(\"CF95DC53F383F9A836FD749F3EF439CD\");\n\n\tLog.d(AbstractSmsActivity.OLD_SCHOOL_SMS, \"New AdRequest: Location=[\"\n\t\t+ request.getLocation() + \"] Gender=[\" + request.getGender()\n\t\t+ \"] Birthday=[\" + request.getBirthday() + \"] Keywords=[\"\n\t\t+ request.getKeywords() + \"]\");\n\n\treturn request;\n }", "public Request() {\n\n }", "public RFARequest getRFARequest(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.rfarequest.v1.RFARequest res){\n\t\tRFARequest rFARequest = new RFARequest();\n\t\t\n\t\trFARequest.setBookingNumber( res.getBookingNumber() );\t\n\t\trFARequest.setPosnr( res.getPosnr() );\n\t\trFARequest.setConfirmationNumber( res.getConfirmationNumber() );\n\t\trFARequest.setRequestMode( res.getRequestMode() );\n\t\trFARequest.setVendorEmailId( res.getVendorEmailId() );\n\t\trFARequest.setVendorPhoneNUmber( res.getVendorPhoneNUmber() );\n\t\trFARequest.setVendorFaxNumber( res.getVendorFaxNumber() );\n\t\trFARequest.setVendorMode( res.getVendorMode() );\n\t\trFARequest.setAgentMode( res.getAgentMode() );\n\t\trFARequest.setAgentEmailId( res.getAgentEmailId() );\n\t\trFARequest.setAgentPhoneNo( res.getAgentPhoneNo() );\n\t\trFARequest.setAgentFaxNo( res.getAgentFaxNo());\n\t\trFARequest.setRequestConfirmBy( res.getRequestConfirmBy() );\n\t\trFARequest.setRequestDeclineBy( res.getRequestDeclineBy());\n\t\t\n\t\treturn rFARequest;\n\t}", "public Attribute_New(String _name, String _value)\n {\n name = _name;\n\n List singleAttributList = new ArrayList<String>();\n singleAttributList.add(_value);\n\n }", "public static Request constructRequest(VirtualControlLoopEvent onset, ControlLoopOperation operation, Policy policy,\n String targetVnf) {\n /*\n * Construct an APPC request\n */\n Request request = new Request();\n request.setCommonHeader(new CommonHeader());\n request.getCommonHeader().setRequestId(onset.getRequestId());\n request.getCommonHeader().setSubRequestId(operation.getSubRequestId());\n request.setAction(policy.getRecipe().substring(0, 1).toUpperCase() + policy.getRecipe().substring(1));\n\n // convert policy payload strings to objects\n if (policy.getPayload() == null) {\n logger.info(\"no APPC payload specified for policy {}\", policy.getName());\n } else {\n convertPayload(policy.getPayload(), request.getPayload());\n }\n\n // add/replace specific values\n request.getPayload().put(\"generic-vnf.vnf-id\", targetVnf);\n\n /*\n * Return the request\n */\n\n return request;\n }", "@Override\n\tpublic abstract RequestAttributeInspectorFactory getWrapped();", "protected DiameterClientRequest newRequest(ChargingConstants.CcRecordType type) {\n\t\tlong accountingRecordNumber = getRecordNumber();\n\t\tDiameterClientRequest request = _client.newAuthRequest(ChargingConstants.COMMAND_CC, true);\n\n\t\tDiameterAVP avp = new DiameterAVP(ChargingUtils.getCcRequestTypeAVP());\n\t\tavp.setValue(EnumeratedFormat.toEnumerated(type.getValue()), false);\n\t\trequest.addDiameterAVP(avp);\n\n\t\tavp = new DiameterAVP(ChargingUtils.getCcRequestNumberAVP());\n\t\tavp.setValue(Unsigned32Format.toUnsigned32(accountingRecordNumber), false);\n\t\trequest.addDiameterAVP(avp);\n\n\t\treturn request;\n\t}", "com.exacttarget.wsdl.partnerapi.QueryRequest addNewQueryRequest();", "static Attribute createAttribute(String name, Field field) {\n\t\tAttribute attribute = new Attribute(name, field);\n\t\tattribute.setKind(Attribute.NONE);\n\t\tattribute.setPreferenceType(Attribute.GAIN);\n\t\treturn attribute;\n\t}", "Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result);", "public DataRequest() {\n\t\tfilters = new ArrayList<FilteringRule>();\n\t\tsort_by = new ArrayList<SortingRule>();\n\t}", "public com.vodafone.global.er.decoupling.binding.request.ModifyTariffRequest createModifyTariffRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.ModifyTariffRequestImpl();\n }", "AtomicDataAttributes createAtomicDataAttributes();", "public GetContactRequest()\r\n {\r\n }", "DataStreamAttributes createDataStreamAttributes();", "private Builder(io.confluent.developer.InterceptTest other) {\n super(SCHEMA$);\n if (isValidValue(fields()[0], other.req_custid)) {\n this.req_custid = data().deepCopy(fields()[0].schema(), other.req_custid);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.req_message)) {\n this.req_message = data().deepCopy(fields()[1].schema(), other.req_message);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.req_json)) {\n this.req_json = data().deepCopy(fields()[2].schema(), other.req_json);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.req_remote_addr)) {\n this.req_remote_addr = data().deepCopy(fields()[3].schema(), other.req_remote_addr);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.req_uri)) {\n this.req_uri = data().deepCopy(fields()[4].schema(), other.req_uri);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.req_headers)) {\n this.req_headers = data().deepCopy(fields()[5].schema(), other.req_headers);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.req_method)) {\n this.req_method = data().deepCopy(fields()[6].schema(), other.req_method);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.result_json)) {\n this.result_json = data().deepCopy(fields()[7].schema(), other.result_json);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.result_post)) {\n this.result_post = data().deepCopy(fields()[8].schema(), other.result_post);\n fieldSetFlags()[8] = true;\n }\n }", "public PickUpCasualtyRequest() {\n\n // empty\n }", "public ChatRequest()\r\n\t{\r\n\t}", "public Request(final FullHttpRequest request) {\n this.request = request;\n }", "public static Packet12EntityDefRequest create(final int defID) {\n\t\tPacket12EntityDefRequest r =\n\t\t\t\tnew Packet12EntityDefRequest();\n\t\tr.defID = defID;\n\t\treturn r;\n\t}", "ShipmentTypeAttr createShipmentTypeAttr();", "public CalccustoRequest(UserContext userContext)\r\n\t{\r\n\t\tsuper(userContext);\r\n\t}", "public com.vodafone.global.er.decoupling.binding.request.GetTariffRequest createGetTariffRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.GetTariffRequestImpl();\n }", "private void getTransactionDetailsRequest() {\r\n\t\tBasicXmlDocument document = new BasicXmlDocument();\r\n\t\tdocument.parseString(\"<\" + TransactionType.GET_TRANSACTION_DETAILS.getValue()\r\n\t\t\t\t+ \" xmlns = \\\"\" + XML_NAMESPACE + \"\\\" />\");\r\n\r\n\t\taddAuthentication(document);\r\n\t\taddReportingTransactionId(document);\r\n\r\n\t\tcurrentRequest = document;\r\n\t}", "private Builder(io.confluent.developer.InterceptTest.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.req_custid)) {\n this.req_custid = data().deepCopy(fields()[0].schema(), other.req_custid);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.req_message)) {\n this.req_message = data().deepCopy(fields()[1].schema(), other.req_message);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.req_json)) {\n this.req_json = data().deepCopy(fields()[2].schema(), other.req_json);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.req_remote_addr)) {\n this.req_remote_addr = data().deepCopy(fields()[3].schema(), other.req_remote_addr);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.req_uri)) {\n this.req_uri = data().deepCopy(fields()[4].schema(), other.req_uri);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.req_headers)) {\n this.req_headers = data().deepCopy(fields()[5].schema(), other.req_headers);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.req_method)) {\n this.req_method = data().deepCopy(fields()[6].schema(), other.req_method);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.result_json)) {\n this.result_json = data().deepCopy(fields()[7].schema(), other.result_json);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.result_post)) {\n this.result_post = data().deepCopy(fields()[8].schema(), other.result_post);\n fieldSetFlags()[8] = true;\n }\n }", "public VDCRequest() {\n\t\tthis.listVirVM = new HashMap<>();\n\t\tthis.listVirLink = new LinkedList<>();\n\t\t// this.listVirSwitch = new LinkedList<>();\n\t\tthis.numVM = 0;\n\t\tthis.vdcID = 0;\n\t\tthis.bwrequest = 0;\n\t}", "private PredictRequest() {\n\t}", "private Request() {}", "private Request() {}", "public Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result,\n ExceptionList exceptions,\n ContextList contexts) {\n throw new NO_IMPLEMENT(reason);\n }", "private void initRequest()\n\t{\n\t\tthis.request = new RestClientReportRequest();\n\t\tRequestHelper.copyConfigsToRequest(this.getConfigs(), this.request);\n\t\tRequestHelper.copyParamsToRequest(this.getParams(), this.request);\n\t\t\n\t\tthis.performQuery();\n\t}", "public accessRequest(String id, String userid, String RequestUserid, String state, String dateTime, String name){\n\n this.userid=userid;\n this.dateTime=dateTime;\n this.id=id;\n this.RequestUserid=RequestUserid;\n this.state=state;\n this.name=name;\n\n }", "public ContractRequest() {\n\t\tsuper(PREFERENCES_NAMES);\n\t}", "public static PredictBuilder newPredictRequest() {\n\t\treturn new PredictBuilder();\n\t}", "public DConditionCounterIncrRequest(int num) {\r\n\t\t_num = num;\r\n\t}", "protected void createLocationRequest() {\n\t\tmLocationRequest = new LocationRequest();\n\t\tmLocationRequest.setInterval(UPDATE_INTERVAL);\n\t\tmLocationRequest.setFastestInterval(FATEST_INTERVAL);\n\t\tmLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n\t\tmLocationRequest.setSmallestDisplacement(DISPLACEMENT);\n\t}", "public final HintRequest mo38055a() {\n if (this.f38734c == null) {\n this.f38734c = new String[0];\n }\n if (this.f38732a || this.f38733b || this.f38734c.length != 0) {\n return new HintRequest(this);\n }\n throw new IllegalStateException(\"At least one authentication method must be specified\");\n }", "com.icare.eai.schema.om.evSORequest.EvSORequestDocument.EvSORequest addNewEvSORequest();", "public DDetRetContrArtEscenicsAttTO() { }", "public void addAttribute(TLAttribute attribute);", "private Request(MarketDataRequestAtom inAtom,\n MarketDataRequest inCompleteRequest)\n {\n atom = inAtom;\n receiver.subscribe(this);\n flow = moduleManager.createDataFlow(new DataRequest[] { new DataRequest(feed.getURN(),generateRequestFromAtom(inAtom,inCompleteRequest)),new DataRequest(receiver.getURN()) });\n }", "com.exacttarget.wsdl.partnerapi.QueryRequestMsgDocument.QueryRequestMsg addNewQueryRequestMsg();", "public CertificationRequestInfo(\n X500Name subject,\n SubjectPublicKeyInfo pkInfo,\n ASN1Set attributes)\n {\n if ((subject == null) || (pkInfo == null))\n {\n throw new IllegalArgumentException(\"Not all mandatory fields set in CertificationRequestInfo generator.\");\n }\n\n validateAttributes(attributes);\n\n this.subject = subject;\n this.subjectPKInfo = pkInfo;\n this.attributes = attributes;\n }" ]
[ "0.84393096", "0.5993871", "0.5842523", "0.56066054", "0.5582066", "0.54610825", "0.5437938", "0.54264903", "0.5365091", "0.53603166", "0.53460175", "0.53305763", "0.5306206", "0.52937937", "0.52865", "0.5257848", "0.5256177", "0.5256177", "0.5251407", "0.52396876", "0.5207253", "0.52045816", "0.5194578", "0.5174301", "0.51638573", "0.51629627", "0.51618224", "0.5131581", "0.5124539", "0.51195705", "0.5117284", "0.5117011", "0.5109308", "0.510822", "0.5098643", "0.50956523", "0.5071615", "0.5068392", "0.5065354", "0.50609505", "0.5056094", "0.5055392", "0.50491196", "0.5046994", "0.5033888", "0.50278944", "0.5019235", "0.5013331", "0.5010771", "0.50085455", "0.4989982", "0.4981424", "0.49784124", "0.4958908", "0.49536413", "0.49451065", "0.49398503", "0.49361703", "0.4933457", "0.49280137", "0.49265167", "0.49141943", "0.49128538", "0.49066252", "0.49001488", "0.48960248", "0.48940486", "0.48927298", "0.48867506", "0.4883546", "0.4881466", "0.48766205", "0.487502", "0.4872236", "0.48615924", "0.48595762", "0.48543718", "0.4849824", "0.483798", "0.48344934", "0.4821536", "0.4818115", "0.48160887", "0.4812563", "0.48073453", "0.48073453", "0.4807091", "0.4804902", "0.48017648", "0.47981405", "0.4793937", "0.47818848", "0.47808057", "0.47801012", "0.4778302", "0.47771928", "0.47765875", "0.47740853", "0.4769497", "0.4763571" ]
0.76419014
1
Retorna todos los medios de pago de la base de datos.
public List<MedioDePagoEntity> findAll() { LOGGER.log(Level.INFO, "Consultando todos los medios de pago"); TypedQuery query = em.createQuery("select u from MedioDePagoEntity u", MedioDePagoEntity.class); return query.getResultList(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<MedioPago> getall() {\n\t\treturn (List<MedioPago>) iMedioPagoDao.findAll();\t\t\n\t}", "public List<Medico> getAllMedicos() {\n List<Medico> medicos = new ArrayList<Medico>();\n try {\n PreparedStatement pstm = null;\n ResultSet rs = null;\n String query = \"SELECT *FROM medico\";\n pstm = con.prepareStatement(query);\n rs = pstm.executeQuery();\n while (rs.next()) {\n Medico medico = new Medico();\n medico.setId(rs.getInt(\"id_medico\"));\n medico.setArea(rs.getString(\"area\"));\n medico.setNombre(rs.getString(\"nombre\"));\n medico.setAp_pat(rs.getString(\"apell_pat\"));\n medico.setAp_mat(rs.getString(\"apell_mat\"));\n medico.setDireccion(rs.getString(\"direccion\"));\n medico.setEmail(rs.getString(\"email\"));\n medico.setTel(rs.getString(\"tel\"));\n medico.setHora_inc(rs.getString(\"hora_inic\"));\n medico.setHora_fin(rs.getString(\"hora_fin\"));\n medicos.add(medico);\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return medicos;\n }", "List<MediaMetadata> getAll();", "List<Medicine> getAllMedicines();", "public List<Media> getMedias()\n\t\t{\n\t\t\treturn mediasList;\n\t\t}", "public List<Medico> findAll() {\n\t\treturn medicoMapper.findAll();\n\t}", "public boolean pagarMedicos() throws Exception {\n //Se obtiene una lista con la especialidad \"Medico\" de la cual solo se saca el primer registro [0]\n Especialidad especialidad = obtenerEspecialidadPorNombre(\"Medico\");\n //Se obtiene una lista con el personal medico con la especialidad \"Medico\"\n ArrayList<PersMedico> medicos = obtenerPersonalMedicoPorEspecialidad(especialidad);\n try {\n for (PersMedico medico : medicos) {\n pagarMedico(medico);\n }\n } catch (Exception e) {\n System.out.println(e.getMessage());\n return false;\n }\n\n return true;\n }", "public ArrayList<Media> getMediaList(){\r\n LocalUser user = LocalUser.getInstance();\r\n return user.getMediaList();\r\n }", "public ResultSet mostrarMedicos() throws SQLException {\n ResultSet listaMedicos = null;\n String sql;\n\n sql = \"SELECT * \"\n + \"FROM centromedico.medico\" + \";\";\n listaMedicos = this.conexion.makeQuery(sql);\n\n return listaMedicos;\n }", "public List<MediaRelation> loadMediaRelations();", "public String[] ListarDPIMedicos(){\r\n int cantidad=0;\r\n Guardia s;\r\n for (int i = 0; i < medicosenfermeras.size(); i++) {\r\n s= medicosenfermeras.get(i);\r\n if (s instanceof Medico) {\r\n cantidad++;\r\n }\r\n }\r\n \r\n String[] DPIMedicos= new String[cantidad];\r\n Guardia t;\r\n int m=0;\r\n for (int i = 0; i < medicosenfermeras.size(); i++) {\r\n t=medicosenfermeras.get(i);\r\n if (t instanceof Medico) {\r\n DPIMedicos[m]=t.getNit();\r\n m++;\r\n }\r\n }\r\n \r\n return DPIMedicos;\r\n }", "public List<Imobiliaria> findAll(){\r\n\t\treturn this.imobiliariaRepository.findAll();\r\n\t}", "public static ArrayList<Media> getMedia() {\n File titleFile = new File(\"./data/titles.csv\");\n\n Scanner titleScan;\n try {\n titleScan = new Scanner(titleFile);\n } catch (IOException e) {\n throw new Error(\"Could not open titles file\");\n }\n\n titleScan.nextLine();\n\n // Read File to build medias without directors\n ArrayList<Media> medias = new ArrayList<Media>();\n while (titleScan.hasNextLine()) {\n String line = titleScan.nextLine();\n String[] ratingParts = line.split(\"\\t\");\n int mediaIndex = indexOfMedia(medias, ratingParts[1]);\n if (mediaIndex == -1) {\n String[] genreList = ratingParts[7].split(\",\");\n if (ratingParts[6].isEmpty()) {\n continue;\n }\n int runtime = Integer.parseInt(ratingParts[6]);\n int releaseYear = ratingParts[4].isEmpty() ? Integer.parseInt(ratingParts[8])\n : Integer.parseInt(ratingParts[4]);\n Media newMedia = new Media(ratingParts[1], ratingParts[3], genreList, runtime, releaseYear);\n medias.add(newMedia);\n } else {\n updateReleaseDate(medias.get(mediaIndex), Integer.parseInt(ratingParts[4]));\n }\n }\n\n // Close Title Scanner\n titleScan.close();\n\n // Open Principals Scanner\n File principalFile = new File(\"./data/principals.csv\");\n FileReader principaFileReader;\n Scanner principalScan;\n\n try {\n principaFileReader = new FileReader(principalFile);\n } catch (IOException e) {\n throw new Error(\"Could not open principals file reader\");\n }\n principalScan = new Scanner(principaFileReader);\n principalScan.nextLine();\n\n // Get directorID for the media\n // int count = 0;\n while (principalScan.hasNextLine()) {\n String line = principalScan.nextLine();\n String[] principalParts = line.split(\"\\t\");\n int mediaIndex = indexOfMedia(medias, principalParts[1]);\n\n if (mediaIndex != -1 && isDirector(principalParts[3])) {\n medias.get(mediaIndex).directorId = principalParts[2];\n }\n }\n\n // Close Scanners\n principalScan.close();\n\n // Return Media List\n return medias;\n }", "@Override\n\tpublic List<MedioPago> getallbyid(List<?> lst) {\n\t\treturn null;\n\t}", "public ArrayList<Moto> getMotos()\r\n {\r\n return motos;\r\n }", "public static List getAllImgs() {\n List polovniautomobili = new ArrayList<>();\n try {\n CONNECTION = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n String query = \"SELECT imgUrl FROM polovni\";\n try (PreparedStatement ps = CONNECTION.prepareStatement(query)) {\n ResultSet result = ps.executeQuery();\n while (result.next()) {\n String imgUrl = result.getString(\"imgUrl\");\n polovniautomobili.add(imgUrl);\n }\n\n ps.close();\n CONNECTION.close();\n }\n CONNECTION.close();\n } catch (SQLException ex) {\n Logger.getLogger(Register.class.getName()).log(Level.SEVERE, null, ex);\n }\n return polovniautomobili;\n }", "List<NovedadAdapter> getAll();", "public List<MediaHandler> selectMediaHandlersList( Plugin plugin )\n {\n List<MediaHandler> mediaHandlerList = new ArrayList<MediaHandler>( );\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECTALL, plugin );\n daoUtil.executeQuery( );\n\n while ( daoUtil.next( ) )\n {\n MediaHandler mediaHandler = new MediaHandler( );\n\n mediaHandler.setId( daoUtil.getInt( 1 ) );\n mediaHandler.setIdAccount( daoUtil.getInt( 2 ) );\n mediaHandler.setName( daoUtil.getString( 3 ) );\n mediaHandler.setDescription( daoUtil.getString( 4 ) );\n mediaHandler.setIconUrl( daoUtil.getString( 5 ) );\n mediaHandler.setInsertTemplate( daoUtil.getString( 6 ) );\n mediaHandler.setMediaType( daoUtil.getString( 7 ) );\n\n mediaHandlerList.add( mediaHandler );\n }\n\n daoUtil.free( );\n\n return mediaHandlerList;\n }", "public List<Pagos> findAll(){\n return pagoMongoRepository.findAll();\n }", "@Override\n\tpublic List<MyMedia> getMediadetails(String username) {\n\t\treturn userDAO.getMediadetails(username);\n\t}", "public List<Medicine> findAllMedicines(Integer startResult, Integer maxRows);", "public List<OtroMedioVO> buscarOtrosMedios(long idCandidato) throws SQLException {\n\t\tCONSULTA_PERFIL_CANDIDATO = \"BUSCAR_OTROS_MEDIOS\";\n\t\tLong[] parametros = { idCandidato };\n\t\tCachedRowSet cachedRowSet = executeQuery(parametros);\n\n\t\tList<OtroMedioVO> otrosMediosVO = new ArrayList<OtroMedioVO>();\n\t\tOtroMedioVO otroMedioVO = null;\n\t\ttry {\n\t\t\twhile (cachedRowSet.next()) {\n\t\t\t\totroMedioVO = new OtroMedioVO();\n\t\t\t\totroMedioVO.setIdOtroMedio(cachedRowSet.getLong(1));\n\t\t\t\totroMedioVO.setIdMedioBusqueda(cachedRowSet.getLong(2));\n\t\t\t\totrosMediosVO.add(otroMedioVO);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tlogger.error(e);\n\t\t\tthrow new SQLException(e);\n\t\t}\n\t\treturn otrosMediosVO;\n\t}", "public List<Pair<URL, URL>> getMediaList() {\n\t\tList<Pair<URL, URL>> result = new ArrayList<Pair<URL, URL>>();\n\t\tif (entities == null) {\n\t\t\treturn result;\n\t\t}\n\t\tif (entities.media == null) {\n\t\t\treturn result;\n\t\t}\n\t\tfor (Media media : entities.media) {\n\t\t\ttry {\n\t\t\t\tPair<URL, URL> urls = new Pair<URL, URL>(new URL(\n\t\t\t\t\t\tmedia.media_url + \":thumb\"), new URL(media.media_url));\n\t\t\t\tresult.add(urls);\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tif (entities.urls == null) {\n\t\t\treturn result;\n\t\t}\n\t\tfor (Url url : entities.urls) {\n\t\t\tPictureService hoster = Utils.getPictureService(url);\n\t\t\tswitch (hoster) {\n\t\t\tcase TWITPIC:\n\t\t\t\ttry {\n\t\t\t\t\tresult.add(TwitpicApiAccess.getUrlPair(url));\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase YFROG:\n\t\t\t\ttry {\n\t\t\t\t\tresult.add(YfrogApiAccess.getUrlPair(url));\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase YOUTUBE:\n\t\t\t\ttry {\n\t\t\t\t\tresult.add(YoutubeApiAccess.getUrlPair(url));\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase IMGUR:\n\t\t\t\ttry {\n\t\t\t\t\tresult.add(ImgurApiAccess.getUrlPair(url));\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase IMGLY:\n\t\t\t\ttry {\n\t\t\t\t\tresult.add(ImglyApiAccess.getUrlPair(url));\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase INSTAGRAM:\n\t\t\t\ttry {\n\t\t\t\t\tresult.add(InstagramApiAccess.getUrlPair(url));\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase PLIXI:\n\t\t\t\ttry {\n\t\t\t\t\tresult.add(PlixiApiAccess.getUrlPair(url));\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase LOCKERZ:\n\t\t\t\ttry {\n\t\t\t\t\tresult.add(LockerzApiAccess.getUrlPair(url));\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase MOBYTO:\n\t\t\t\ttry {\n\t\t\t\t\tresult.add(MobytoApiAccess.getUrlPair(url));\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase OWLY:\n\t\t\t\ttry {\n\t\t\t\t\tresult.add(OwlyApiAccess.getUrlPair(url));\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase NONE:\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "@GetMapping(\"/mapeamentos\")\n @Timed\n public List<Mapeamento> getAllMapeamentos() {\n log.debug(\"REST request to get all Mapeamentos\");\n return mapeamentoRepository.findAll();\n }", "public Collection<Medication> getAllMedications() {\n return this.medicationDAO.getAllMedications();\n }", "public ResultSet MuestraMedicos() throws SQLException {\n\t\t\n\t\tString sql = \" SELECT * FROM medico \"; // sentencia busqueda cliente\n\t\ttry {\n\t\t\tconn = conexion.getConexion(); // nueva conexion a la bbdd CREARLO EN TODOS LOS METODOS\n\t\t\tst=(Statement) conn.createStatement();\n\t\t\tresultado = st.executeQuery(sql);\n\t\t\t/*\t\n\t\t\tst.close();\n\t\t\t\tconn.close();\n\t\t\t\t*/\n\t\t}\n\t\tcatch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn resultado;\n\t}", "public List<String> mediosBusqueda(long idCandidato) throws SQLException {\n\t\tCONSULTA_PERFIL_CANDIDATO = \"MEDIOS_BUSQUEDA\";\n\t\tLong[] parametros = { idCandidato };\n\t\tCachedRowSet cachedRowSet = executeQuery(parametros);\n\t\tList<String> otrosMedios = new ArrayList<String>();\n\t\ttry {\n\t\t\twhile (cachedRowSet.next())\n\t\t\t\totrosMedios.add(cachedRowSet.getString(2));\n\t\t}catch (SQLException e) {\n\t\t\tlogger.error(e);\n\t\t\tthrow new SQLException(e);\n\t\t}\n\t\treturn otrosMedios;\n\t}", "@Nullable\n public Single<List<Media>> getMediaList(String queryType, String keyword) {\n HttpUrl.Builder urlBuilder = HttpUrl\n .parse(commonsBaseUrl)\n .newBuilder()\n .addQueryParameter(\"action\", \"query\")\n .addQueryParameter(\"format\", \"json\")\n .addQueryParameter(\"formatversion\", \"2\");\n\n\n if (queryType.equals(\"search\")) {\n appendSearchParam(keyword, urlBuilder);\n } else {\n appendCategoryParams(keyword, urlBuilder);\n }\n\n appendQueryContinueValues(keyword, urlBuilder);\n\n Request request = new Request.Builder()\n .url(appendMediaProperties(urlBuilder).build())\n .build();\n\n return Single.fromCallable(() -> {\n Response response = okHttpClient.newCall(request).execute();\n List<Media> mediaList = new ArrayList<>();\n if (response.body() != null && response.isSuccessful()) {\n String json = response.body().string();\n MwQueryResponse mwQueryResponse = gson.fromJson(json, MwQueryResponse.class);\n if (null == mwQueryResponse\n || null == mwQueryResponse.query()\n || null == mwQueryResponse.query().pages()) {\n return mediaList;\n }\n putContinueValues(keyword, mwQueryResponse.continuation());\n\n List<MwQueryPage> pages = mwQueryResponse.query().pages();\n for (MwQueryPage page : pages) {\n Media media = Media.from(page);\n if (media != null) {\n mediaList.add(media);\n }\n }\n }\n return mediaList;\n });\n }", "private void cargarRegistroMedicamentos() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"admision_seleccionada\", admision_seleccionada);\r\n\t\tparametros.put(\"rol_medico\", \"S\");\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\"/pages/registro_medicamentos.zul\", \"REGISTRO DE MEDICAMENTOS\",\r\n\t\t\t\tparametros);\r\n\t}", "public List<Automotor> getAll()\n {\n\n CriteriaQuery<Automotor> criteria = this.entityManager.getCriteriaBuilder().createQuery(Automotor.class);\n return this.entityManager.createQuery(criteria.select(criteria.from(Automotor.class))).getResultList();\n }", "@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n public Collection getPlanMedioMesList() {\r\n String queryString = \"from PlanMedioMesEJB e\";\r\n // Add a an order by on all primary keys to assure reproducable results.\r\n String orderByPart = \"\";\r\n orderByPart += \" order by e.id\";\r\n queryString += orderByPart;\r\n Query query = manager.createQuery(queryString);\r\n return query.getResultList();\r\n }", "public ArrayList<MedEntry> allPrescriptions() {\n\n ArrayList<MedEntry> prescriptions = new ArrayList<MedEntry>();\n String query = \"SELECT * FROM \" + TABLE_NAME;\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(query, null);\n MedEntry pres = null;\n\n if (cursor.moveToFirst()) {\n do {\n pres = new MedEntry(cursor.getString(1),cursor.getInt(2), cursor.getInt(3), cursor.getInt(4));\n prescriptions.add(pres);\n } while (cursor.moveToNext());\n }\n\n return prescriptions;\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<ItemMedicamentoEntity> listaTodos(){\r\n\r\n\t\treturn this.entityManager.createQuery(\"SELECT * FROM ItemMedicamentoEntity ORDER BY codigo\").getResultList();\r\n\t}", "public List<Medium> getAllMedia() throws ContestManagementException {\n return null;\r\n }", "public List<Medium> getAllMedia() throws ContestManagementException {\n return null;\r\n }", "@Override\n\tpublic List<UploadDF> getAll() {\n\t\tSession session = factory.openSession();\n\t\ttry{\n\t\t\tsession.beginTransaction();\n\t\t\tList<UploadDF> list = session.createCriteria(UploadDF.class).addOrder(Order.desc(\"id\")).list();\n\t\t\tsession.getTransaction().commit();\n\t\t\treturn list;\n\t\t}catch(HibernateException exception){\n\t\t\tsession.getTransaction().rollback();\n\t\t\tthrow exception;\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t}", "@Override\n public List<Media> getMediaListByManager(int managerId) {\n try {\n return mediaDao.getMediaListByManager(managerId);\n } catch (FailedOperationException e) {\n throw new RuntimeException(e.getMessage());\n }\n }", "private void getMuestras(){\n mMuestras = estudioAdapter.getListaMuestrasSinEnviar();\n //ca.close();\n }", "@Override\n\tpublic void loadData(){\n\t\tsuper.loadData();\n\t\topenProgressDialog();\n\t\tBmobQuery<Goods> query = new BmobQuery<Goods>();\n\t\tpageSize = 5;\n\t\tquery.setLimit(pageSize);\n\t\tquery.setSkip((pageNum - 1) * pageSize);\n\t\tif(point == 1){\n\t\t\tquery.addWhereEqualTo(\"type\", type);\n\t\t}else if(point == 2){\n\t\t\tquery.addWhereEqualTo(\"tradeName\", type);\n\t\t}\n\t\tquery.findObjects(this, new FindListener<Goods>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(List<Goods> object){\n\t\t\t\t// TODO Auto-generated method st\n\t\t\t\tcloseProgressDialog();\n\t\t\t\tonRefreshComplete();\n\t\t\t\tlist.addAll(object);\n\t\t\t\tLog.v(\"AAA\", JSON.toJSONString(list));\n\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onError(int code,String msg){\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tToast.makeText(mContext, \"查询失败\", Toast.LENGTH_SHORT).show();\n\t\t\t\tcloseProgressDialog();\n\t\t\t}\n\t\t});\n\n\t}", "private List<RhFuncionario> getFuncionariosMedicos()\n {\n System.out.println(\"supiEscalaFacade.findMedicos():\"+supiEscalaFacade.findMedicos());\n return supiEscalaFacade.findMedicos();\n }", "public ArrayList<DeviceMediaItem> getAllImages(Context contx) {\n ArrayList<DeviceMediaItem> images = new ArrayList<>();\n Uri allImagesuri = android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI;\n String[] projection = {MediaStore.Images.ImageColumns.DATA, MediaStore.Images.Media.DISPLAY_NAME,\n MediaStore.Images.Media.SIZE, MediaStore.Images.Media.DATE_ADDED};\n Cursor cursor = contx.getContentResolver().query(allImagesuri, projection, null, null, null);\n try {\n cursor.moveToFirst();\n do {\n DeviceMediaItem pic = new DeviceMediaItem();\n\n pic.setName(cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DISPLAY_NAME)));\n pic.setPath(cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA)));\n String date = getDate(cursor.getLong(cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATE_ADDED)));\n pic.setDate(date);\n\n images.add(pic);\n } while (cursor.moveToNext());\n cursor.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n Uri allVideosuri = android.provider.MediaStore.Video.Media.EXTERNAL_CONTENT_URI;\n String[] vidProjection = {MediaStore.Video.VideoColumns.DATA, MediaStore.Video.Media.DISPLAY_NAME,\n MediaStore.Video.Media.SIZE, MediaStore.Video.Media.DATE_ADDED};\n Cursor vidCursor = contx.getContentResolver().query(allVideosuri, vidProjection, null, null, null);\n try {\n vidCursor.moveToFirst();\n do {\n DeviceMediaItem pic = new DeviceMediaItem();\n\n pic.setName(vidCursor.getString(vidCursor.getColumnIndexOrThrow(MediaStore.Video.Media.DISPLAY_NAME)));\n pic.setPath(vidCursor.getString(vidCursor.getColumnIndexOrThrow(MediaStore.Video.Media.DATA)));\n String date = getDate(vidCursor.getLong(vidCursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATE_ADDED)));\n pic.setDate(date);\n\n images.add(pic);\n } while (vidCursor.moveToNext());\n vidCursor.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return images;\n }", "public List<JRMediaObject> getMedia() {\n return mMedia;\n }", "public RealmResults<PhotoGalleryModel> getPhotos( ) {\n return realm.where(PhotoGalleryModel.class).findAll();\n\n }", "public void getListaArchivos() {\n\n File rutaAudio = new File(Environment.getExternalStorageDirectory() + \"/RecordedAudio/\");\n File[] archivosAudio = rutaAudio.listFiles();\n\n for (int i = 0; i < archivosAudio.length; i++) {\n File file = archivosAudio[i];\n listadoArchivos.add(new Archivo(file.getName()));\n }\n\n File rutaVideos = new File(Environment.getExternalStorageDirectory() + \"/RecordedVideo/\");\n File[] archivosVideo = rutaVideos.listFiles();\n\n for (int i = 0; i < archivosVideo.length; i++) {\n File file = archivosVideo[i];\n listadoArchivos.add(new Archivo(file.getName()));\n }\n }", "public void getMediaList(TableQueryCallback<MediaAsset> callback){\n mMediaTable.where().execute(callback);\n }", "@Override\n public List<TrackDTO> getAll() {\n List<Track> trackList = trackRepository.findAll();\n\n /**\n * Se convierte la lista de canciones (trackList) a una lista de tipo DTO\n * y se guarda en la variable tracks para luego ser el retorno del metodo.\n */\n List<TrackDTO> tracks = trackMapper.toDTO(trackList, context);\n\n return tracks;\n }", "public ArrayList<Medication> getAllMeds() {\n String sql = \"select * from Med\";\n Cursor cursor = getReadableDatabase().rawQuery(sql, new String[]{});\n int dbIndex = cursor.getColumnIndex(\"_id\");\n int medNameIndex = cursor.getColumnIndex(\"medname\");\n int medNotesIndex = cursor.getColumnIndex(\"mednotes\");\n int doseIndex = cursor.getColumnIndex(\"dose\");\n int freqIndex = cursor.getColumnIndex(\"freq\");\n int startDateIndex = cursor.getColumnIndex(\"startdate\");\n int endDateIndex = cursor.getColumnIndex(\"enddate\");\n int imageIndex = cursor.getColumnIndex(\"image\");\n int alert1Index = cursor.getColumnIndex(\"alert1\");\n int alert2Index = cursor.getColumnIndex(\"alert2\");\n int alert3Index = cursor.getColumnIndex(\"alert3\");\n int alert4Index = cursor.getColumnIndex(\"alert4\");\n int alert5Index = cursor.getColumnIndex(\"alert5\");\n int alert6Index = cursor.getColumnIndex(\"alert6\");\n int alertsOnIndex = cursor.getColumnIndex(\"alertson\");\n\n ArrayList<Medication> tempArray = new ArrayList();\n for (int i = 0; i < cursor.getCount(); i++) {\n cursor.moveToPosition(i);\n Medication newMed = new Medication(); //(cursor.getString(languageIndex), cursor.getString(allergyIndex), cursor.getInt(dateIndex));\n newMed.setDbID(cursor.getInt(dbIndex));\n newMed.setMedName(cursor.getString(medNameIndex));\n newMed.setMedNotes(cursor.getString(medNotesIndex));\n newMed.setDose(cursor.getString(doseIndex));\n newMed.setFreq(cursor.getInt(freqIndex));\n newMed.setMedStart(cursor.getInt(startDateIndex));\n newMed.setMedEnd(cursor.getInt(endDateIndex));\n newMed.setImageRes(cursor.getString(imageIndex));\n newMed.setAlert1(cursor.getInt(alert1Index));\n newMed.setAlert2(cursor.getInt(alert2Index));\n newMed.setAlert3(cursor.getInt(alert3Index));\n newMed.setAlert4(cursor.getInt(alert4Index));\n newMed.setAlert5(cursor.getInt(alert5Index));\n newMed.setAlert6(cursor.getInt(alert6Index));\n newMed.setAlertsOn(cursor.getInt(alertsOnIndex));\n\n //get hashmaps and set them to the med object\n HashMap[] hashMapArray = getDoseMaps(newMed);\n newMed.setDoseMap1(hashMapArray[0]);\n newMed.setDoseMap2(hashMapArray[1]);\n tempArray.add(newMed);\n }\n cursor.close();\n\n //return the array to be used at runtime\n return tempArray;\n }", "@GET\n @Produces(\"application/json\")\n public List<Photos> getPhotos() {\n \tPhotosDAO dao = new PhotosDAO();\n List photos = dao.getPhotos();\n return photos;\n }", "public List<Medicine> selectAllMedicines(Connection con) {\n\t\tList<Medicine> medicines = new ArrayList<>();\n\t\ttry (\n\t\t\t// Step :Create a statement using connection object\n\t\t\tPreparedStatement preparedStatement = con.prepareStatement(SELECT_ALL_MEDICINES);) {\n\t\t\tSystem.out.println(preparedStatement);\n\t\t\t// Step : Execute the query or update query\n\t\t\tResultSet rs = preparedStatement.executeQuery();\n\n\t\t\t// Step : Process the ResultSet object.\n\t\t\twhile (rs.next()) {\n\t\t\t\tint id = rs.getInt(\"rule_id\");\n\t\t\t\tString memberName = rs.getString(\"member_name\");\n\t\t\t\tString alertTime = rs.getString(\"alert_time\");\n\t\t\t\tString box_1 = rs.getString(\"box_1\");\n\t\t\t\tString box_2 = rs.getString(\"box_2\");\n\t\t\t\tString box_3 = rs.getString(\"box_3\");\n\t\t\t\tString box_4 = rs.getString(\"box_4\");\n\t\t\t\tString box_5 = rs.getString(\"box_5\");\n\t\t\t\tString medicine_1 = rs.getString(\"medicine_1\");\n\t\t\t\tString medicine_2 = rs.getString(\"medicine_2\");\n\t\t\t\tString medicine_3 = rs.getString(\"medicine_3\");\n\t\t\t\tString medicine_4 = rs.getString(\"medicine_4\");\n\t\t\t\tString medicine_5 = rs.getString(\"medicine_5\");\n\t\t\t\tmedicines.add(new Medicine(id, memberName, alertTime, box_1, box_2, box_3, box_4, box_5, medicine_1, medicine_2, medicine_3, medicine_4, medicine_5));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tprintSQLException(e);\n\t\t}\n\t\treturn medicines;\n\t}", "@RequestMapping(value = \"/perimetros/\", \n\t method = RequestMethod.GET, \n\t headers=\"Accept=application/json\"\n\t ) \n\tpublic List<PerimetroSensado> getPerimetros(){\n\t\treturn perimetroRepository.findAll();\n\t}", "public List<CMMedia> getPicturesUnfiltered() {\n return super.getMedia();\n }", "@Override\n\tpublic ArrayList<MODEL.Medicamento> getlista() {\n\t\treturn null;\n\t}", "protected void exibirMedicos(){\n System.out.println(\"--- MEDICOS CADASTRADOS ----\");\r\n String comando = \"select * from medico order by id\";\r\n ResultSet rs = cb.buscaDados(comando);\r\n try{\r\n while(rs.next()){\r\n int id = rs.getInt(\"id\");\r\n String nome = rs.getString(\"nome\");\r\n System.out.println(\"[\"+id+\"] \"+nome);\r\n }\r\n }\r\n catch (Exception e){\r\n e.printStackTrace();\r\n }\r\n }", "public ObservableList<Pagadores> carregaPagadores() {\n\t\tcon = Conexao.conectar();\n\t\tObservableList<Pagadores> resultadoPagadores = FXCollections.observableArrayList();\n\t\ttry {\n\t\t\tString query = \"SELECT * FROM pagadores WHERE estpagador = ? ORDER BY agente\";\n\t\t\tprepStmt = con.prepareStatement(query); // create a statement\n\t\t\tprepStmt.setString(1, \"A\");\n\t\t\trs = prepStmt.executeQuery();\n\t\t\t\t\t\t // extract data from the ResultSet\n\t\t\twhile(rs.next()) {\n\t\t\t\tPagadores temp = new Pagadores();\n\t\t\t\ttemp.setCodPagador(rs.getInt(\"codpagador\"));\n\t\t\t\ttemp.setEstPagador(rs.getString(\"estpagador\"));\n\t\t\t\ttemp.setRecDescr(rs.getString(\"recdescr\"));\n\t\t\t\t\n\t\t\t\ttemp.setValContrato(rs.getDouble(\"valcontrato\"));\n\t\t\t\ttemp.setContratoInic(DateUtils.asLocalDate(rs.getDate(\"contratoinic\")));\n\t\t\t\ttemp.setContratoFim(DateUtils.asLocalDate(rs.getDate(\"contratofim\")));\n\t\t\t\t\n\t\t\t\ttemp.setNomeContrato(rs.getString(\"nomecontrato\"));\n\t\t\t\ttemp.setContaVinc(rs.getInt(\"contavinc\"));\n\t\t\t\ttemp.setCentroReceb(rs.getInt(\"centroreceb\"));\n\t\t\t\t\n\t\t\t\ttemp.setSubCentroRec(rs.getInt(\"subcentrorec\"));\n\t\t\t\ttemp.setDataLanc(DateUtils.asLocalDate(rs.getDate(\"datalanc\")));\n\t\t\t\ttemp.setDiaVenc(rs.getInt(\"diavenc\"));\n\t\t\t\ttemp.setAgente(rs.getString(\"agente\"));\n\t\t\t\t\n\t\t\t\tresultadoPagadores.add(temp);\n\t\t\t}\n\t\t\treturn resultadoPagadores;\n\t\t} catch(Exception e) {\n\t\t\tMessageBox.show(\"Erro ao ler pagadores 59\", e.getMessage());\n\t\t\treturn null;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t\tprepStmt.close();\n\t\t\t\t//conn.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@RequestMapping(path = \"medservices\", method = RequestMethod.GET, params = \"page\")\n public List<MedicalService> getAllMedServicesByPage(@RequestParam int page){\n return medicalServiceService.getAllMedServicesByPage(page);\n }", "public Page<MediaRelation> findAllMediaRelations(int idx, int elements, String dir );", "public List<MediaFile> list() {\n\t\treturn (doc != null ? listFeed() : listHtml());\n\t}", "public MusicData[] loadAllMine(Long accountId) throws MusicAppException;", "public static java.util.Iterator<org.semanticwb.opensocial.model.data.MediaItem> listMediaItems()\r\n {\r\n java.util.Iterator it=sclass.listInstances();\r\n return new org.semanticwb.model.GenericIterator<org.semanticwb.opensocial.model.data.MediaItem>(it, true);\r\n }", "public static void cargarMedicos() {\n medicos = new LinkedList<>();\n try {\n File f = new File(\"medicos.txt\");\n Scanner s = new Scanner(f);\n while (s.hasNextLine()) {\n String line = s.nextLine();\n String[] texto = line.split(\",\");\n Medico m = new Medico(texto[0], texto[1], texto[2], Integer.parseInt(texto[3]));\n int idPuesto = Integer.valueOf(texto[4].trim());\n if (idPuesto!=0) {\n Puesto pt = puestoPorId(idPuesto);\n if(pt == null){\n pt = new Puesto();\n puestos.add(pt);\n }\n m.setPuesto(pt);\n pt.setMedico(m);\n }\n else{\n m.setPuesto(null);\n }\n medicos.add(m);\n }\n } catch (FileNotFoundException e) {\n System.out.println(\"El archivo no existe...\");\n }\n }", "List<Video> getAll();", "public static List<PolovniAutomobili> readAll() {\n List<PolovniAutomobili> listaUsera = new ArrayList<>();\n try {\n CONNECTION = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n String query = \"SELECT * FROM polovni WHERE 1\";\n try (Statement st = (Statement) CONNECTION.createStatement()) {\n ResultSet rs = st.executeQuery(query);\n while (rs.next()) {\n String imgUrl = rs.getString(\"imgUrl\");\n String naziv = rs.getString(\"naziv\");\n int godiste = rs.getInt(\"godiste\");\n int cena = rs.getInt(\"cena\");\n String url = rs.getString(\"url\");\n listaUsera.add(new PolovniAutomobili(imgUrl, naziv, godiste,cena,url));\n }\n }\n CONNECTION.close();\n } catch (SQLException ex) {\n System.out.println(\"MySql Connection error...\");\n ex.printStackTrace();\n }\n return listaUsera;\n }", "public List<Filme> listar() {\r\n\r\n //Pegando o gerenciador de acesso ao BD\r\n EntityManager gerenciador = JPAUtil.getGerenciador();\r\n\r\n //Criando a consulta ao BD\r\n TypedQuery consulta = gerenciador.createQuery(\r\n \"Select f from Filme f\", Filme.class);\r\n\r\n //Retornar a lista de atores\r\n return consulta.getResultList();\r\n\r\n }", "private void getPinchazos(){\n mPinchazos = estudioAdapter.getListaPinchazosSinEnviar();\n //ca.close();\n }", "public void populateMedia(List<Drop> drops, Account queryingAccount) {\n \n \t\tMap<Long, Integer> dropIndex = new HashMap<Long, Integer>();\n \t\tint i = 0;\n \t\tfor (Drop drop : drops) {\n \t\t\tdropIndex.put(drop.getId(), i);\n \t\t\ti++;\n \t\t}\n \n \t\tString sql = \"SELECT `droplet_id`, `media`.`id` AS `id`, `media`.`url` AS `url`, `type`, `media_thumbnails`.`size` AS `thumbnail_size`, `media_thumbnails`.`url` AS `thumbnail_url` \";\n \t\tsql += \"FROM `droplets_media` \";\n \t\tsql += \"INNER JOIN `media` ON (`media`.`id` = `media_id`) \";\n \t\tsql += \"LEFT JOIN `media_thumbnails` ON (`media_thumbnails`.`media_id` = `media`.`id`) \";\n \t\tsql += \"WHERE `droplet_id` IN :drop_ids \";\n \t\tsql += \"AND `media`.`id` NOT IN ( \";\n \t\tsql += \"SELECT `media_id` \";\n \t\tsql += \"FROM `account_droplet_media` \";\n \t\tsql += \"WHERE `account_id` = :account_id \";\n \t\tsql += \"AND `droplet_id` IN :drop_ids \";\n \t\tsql += \"AND `deleted` = 1) \";\n \t\tsql += \"UNION ALL \";\n \t\tsql += \"SELECT `droplet_id`, `media`.`id` AS `id`, `media`.`url` AS `url`, `type`, `media_thumbnails`.`size` AS `thumbnail_size`, `media_thumbnails`.`url` AS `thumbnail_url` \";\n \t\tsql += \"FROM `account_droplet_media` \";\n \t\tsql += \"INNER JOIN `media` ON (`media`.`id` = `media_id`) \";\n \t\tsql += \"LEFT JOIN `media_thumbnails` ON (`media_thumbnails`.`media_id` = `media`.`id`) \";\n \t\tsql += \"WHERE `droplet_id` IN :drop_ids \";\n \t\tsql += \"AND `account_id` = :account_id \";\n \t\tsql += \"AND `deleted` = 0; \";\n \n \t\tQuery query = em.createNativeQuery(sql);\n \t\tquery.setParameter(\"drop_ids\", dropIndex.keySet());\n \t\tquery.setParameter(\"account_id\", queryingAccount.getId());\n \n \t\t// Group the media by drop id\n \t\tMap<Long, Media> media = new HashMap<Long, Media>();\n \t\tfor (Object oRow : query.getResultList()) {\n \t\t\tObject[] r = (Object[]) oRow;\n \n \t\t\tLong dropId = ((BigInteger) r[0]).longValue();\n \t\t\tDrop drop = drops.get(dropIndex.get(dropId));\n \t\t\tif (drop.getMedia() == null) {\n \t\t\t\tdrop.setMedia(new ArrayList<Media>());\n \t\t\t}\n \t\t\n \t\t\tLong mediaId = ((BigInteger) r[1]).longValue();\n \t\t\tMedia m = media.get(mediaId);\n \t\t\t\n \t\t\tif (m == null) {\n \t\t\t\tm = new Media();\n \t\t\t\tm.setId(mediaId);\n \t\t\t\tm.setUrl((String) r[2]);\n \t\t\t\tm.setType((String) r[3]);\n \t\t\t\tmedia.put(mediaId, m);\n \t\t\t} \n \t\t\t\n \t\t\t// Add thumbnails\n \t\t\tif (r[4] != null) {\n \t\t\t\tMediaThumbnail mt = new MediaThumbnail();\n \t\t\t\tmt.setMedia(m);\n \t\t\t\tmt.setSize((Integer)r[4]);\n \t\t\t\tmt.setUrl((String)r[5]);\n \t\t\t\t\n \t\t\t\tList<MediaThumbnail> thumbnails = m.getThumbnails();\n \t\t\t\tif (thumbnails == null) {\n \t\t\t\t\tthumbnails = new ArrayList<MediaThumbnail>();\n \t\t\t\t\tm.setThumbnails(thumbnails);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tthumbnails.add(mt);\n \t\t\t}\n \t\t\t\n \t\t\t// Add media to drop\n \t\t\tif (!drop.getMedia().contains(m)) {\n \t\t\t\tdrop.getMedia().add(m);\n \t\t\t}\n \t\t}\n \t}", "@Transactional\n\tpublic List<Medicine> listMedicine() {\n\t\treturn this.medicineDao.listMedicine();\n\t}", "List<MediaMetadata> getByBundle(String bundleUuid);", "@GET\n public List<JsonMovie> getAllWithParams(@Context HttpServletRequest request, \n\t\t\t@QueryParam(\"from\") int from, @QueryParam(\"limit\") int limit,\n\t\t\t@QueryParam(\"orderBy\") String orderBy, @QueryParam(\"orderDir\") String orderDir) {\n\t\tList<Movie> movies = movieDao.getMoviesForList(from, limit, orderBy, orderDir);\n \tLOGGER.info(\"find \"+movies.size()+\" movies in the database\");\n \tArrayList<JsonMovie> lm = new ArrayList<JsonMovie>();\n\t\tString artistName = \"\";\n\t\tInteger artistId = 0;\n \tfor (Movie m : movies) {\n\t\t\tif (!m.getMovieartists().isEmpty()) {\n\t\t\t\tartistName = m.getMovieartists().get(0).getArtistBean()\n\t\t\t\t\t\t.getName()\n\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t+ m.getMovieartists().get(0).getArtistBean()\n\t\t\t\t\t\t\t\t.getFirstname();\n\t\t\t\tartistId = m.getMovieartists().get(0).getArtistBean().getId();\n\t\t\t} else {\n\t\t\t\tartistName = \"\";\n\t\t\t\tartistId = 0;\n\t\t\t}\n\t\t\tUsermovie mym = usermovieDAO.getUsermovie(m.getId(), request.getHeader(Constants.HTTP_HEADER_TOKEN));\n\t\t\tlm.add(new JsonMovie(m.getId(), m.getTitle(), m.getDescription(),\n\t\t\t\t\tm.getReleasedate(), m.getCover(), m.getSupportBean().getName(), m.getSupportBean().getId(),\n\t\t\t\t\tm.getStorygenre().getName(), m.getStorygenre().getId(), m.getLength(), m.getIscollector(), \n\t\t\t\t\tartistName, artistId, \"\", null, \"\", null, new ArrayList<JsonLang>(), new ArrayList<JsonLang>(),\n\t\t\t\t\t(mym!=null)?true:false, (mym!=null)?mym.getRating():0));\n \t}\n \treturn lm;\n }", "@Override\n protected void loadData() {\n setUpLoadingViewVisibility(true);\n callImageList = RetrofitGenerator.createService(ApiService.class)\n .getAllPubImage();\n callImageList.enqueue(callbackImageList);\n }", "public MedianFinder() {\n datas = new ArrayList<>();\n }", "List<Photo> homePagePhotos();", "public MediaList getMediaList() {\n \n MediaList mediaList = mediaPlayerFactory.newMediaList();\n for (int i = 0; i < this.moviesByGenre.size(); i++) {\n mediaList.addMedia(this.moviesByGenre.get(i).path, \n formatRtspStream(this.genre),\n \":no-sout-rtp-sap\",\n \":no-sout-standard-sap\",\n \":sout-all\",\n \":sout-keep\",\n \":ttl=128\");\n }\n\n return mediaList;\n }", "private void fetchPostos() {\n //CRIA UMA REFERENCIA PARA A COLEÇÃO DE POSTOS\n\n FirebaseFirestore.getInstance().collection(\"/postos\")\n .addSnapshotListener(new EventListener<QuerySnapshot>() {\n @Override\n public void onEvent(@Nullable QuerySnapshot queryDocumentSnapshots, @Nullable FirebaseFirestoreException e) {\n //VERIFICANDO SE ENCONTROU ALGUMA EXCEÇÃO CAPAZ DE IMPEDIR A EXECUÇÃO, CASO ENCONTRE, PARE A APLICAÇÃO\n if (e != null) {\n Log.e(\"TESTE\", \"Erro: \", e);\n return;\n }\n //REFERÊNCIA PARA TODOS POSTOS DA BASE\n List<DocumentSnapshot> documentos = queryDocumentSnapshots.getDocuments();\n\n\n for (DocumentSnapshot doc : documentos) {\n Posto posto = doc.toObject(Posto.class);\n int cont = 0;\n for (int i = 0; i < denunciasNaBase.size(); i++) {\n\n if (denunciasNaBase.get(i).getPosto().equalsIgnoreCase(posto.getCnpj())) {\n Log.d(\"TESTE\", \"Posto \" + posto.getCnpj() + \"denuncia \" + denunciasNaBase.get(i).getPosto());\n cont++;\n }\n }\n if (cont > 0) {\n adapter.add(new DenunciaItem(posto, cont));\n }\n }\n\n }\n });\n }", "public List<Medecin> listAllMedecin(){\n return this.medecinRepository.findAll();\n }", "@GET\n @Produces(\"application/json\")\n public Response getAllMusicVideos(){\n \n //get all music videos from the DB\n List<MusicVideo> listOfMusicVideos = selectAllMusicVideosFromDB() ;\n \n //log the number of music videos\n LOGGER.log(Level.INFO, String.format(\"There are %d music videos on the server\", listOfMusicVideos.size())) ;\n \n //set poster image for each music video\n listOfMusicVideos = setPosterImageForMusicVideos(listOfMusicVideos) ;\n \n //sort list\n listOfMusicVideos.sort(null) ;\n \n //parse list of music videos to JSON and set JSON as entity of response\n Gson gson = new GsonBuilder()\n .excludeFieldsWithoutExposeAnnotation()\n .serializeNulls()\n .create();\n String jsonString = gson.toJson(listOfMusicVideos) ;\n Response.ResponseBuilder responseBuilder = Response.ok() ;\n responseBuilder.entity(jsonString) ;\n \n return responseBuilder.build() ;\n }", "private void obtenerAnimales() {\n // final ArrayList<String> lista = new ArrayList<>();\n //Para obtener datos de la base de datos\n refAnimales.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n long size = dataSnapshot.getChildrenCount();\n ArrayList<String> animalesFirebase = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n\n String code = dataSnapshot.child(\"\" + i).child(\"codigo\").getValue(String.class);\n String nombre = dataSnapshot.child(\"\" + i).child(\"nombre\").getValue(String.class);\n String tipo = dataSnapshot.child(\"\" + i).child(\"tipo\").getValue(String.class);\n String raza = dataSnapshot.child(\"\" + i).child(\"raza\").getValue(String.class);\n String animal = code + \" | \" + nombre + \" | \" + tipo + \" | \" + raza;\n\n animalesFirebase.add(animal);\n }\n\n adaptar(animalesFirebase);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }", "public MusicData[] loadAllOther(Long accountId) throws MusicAppException;", "public List<Publisher> findAllPublishers() {\n\t\tList<Publisher> result = new ArrayList<Publisher>();\n\t\t// --- 2. Controlli preliminari sui dati in ingresso ---\n\t\t// n.d.\n\t\t// --- 3. Apertura della connessione ---\n\t\tConnection conn = getCurrentJDBCFactory().getConnection();\n\t\t// --- 4. Tentativo di accesso al db e impostazione del risultato ---\n\t\ttry {\n\t\t\t// --- a. Crea (se senza parametri) o prepara (se con parametri) lo statement\n\t\t\tPreparedStatement prep_stmt = conn.prepareStatement(find_all_publishers);\n\t\t\t// --- b. Pulisci e imposta i parametri (se ve ne sono)\n\t\t\tprep_stmt.clearParameters();\n\t\t\t// --- c. Esegui l'azione sul database ed estrai il risultato (se atteso)\n\t\t\tResultSet rs = prep_stmt.executeQuery();\n\t\t\t// --- d. Cicla sul risultato (se presente) pe accedere ai valori di ogni sua tupla\n\t\t\twhile ( rs.next() ) {\n\t\t\t\tPublisher publisher = new Publisher();\n\t\t\t\tpublisher.setId(rs.getInt(publisher_id));\n\t\t\t\tpublisher.setName(rs.getString(publisher_name));\n\t\t\t\t// books.. lazy fetch\n\t\t\t\tresult.add(publisher);\n\t\t\t}\n\t\t\t// --- e. Rilascia la struttura dati del risultato\n\t\t\trs.close();\n\t\t\t// --- f. Rilascia la struttura dati dello statement\n\t\t\tprep_stmt.close();\n\t\t}\n\t\t// --- 5. Gestione di eventuali eccezioni ---\n\t\tcatch (Exception e) {\n\t\t\tgetCurrentJDBCFactory().getLogger().error(\"failed to retrieve publishers\",e);\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// --- 6. Rilascio, SEMPRE E COMUNQUE, la connessione prima di restituire il controllo al chiamante\n\t\tfinally {\n\t\t\tgetCurrentJDBCFactory().releaseConnection(conn);\n\t\t}\n\t\t// --- 7. Restituzione del risultato (eventualmente di fallimento)\n\t\treturn result;\n\t}", "@Override\n\tpublic Page<ReporteMedico> findAll(Pageable pageable) {\n\t\treturn reportesMedicosDao.findAll(pageable);\n\t}", "@Override\n\tpublic List<TblMulitData> getAll() {\n\t\treturn null;\n\t}", "public ArrayList<AshirBlogPostingHelper> getAllPots() {\n String query = \"SELECT * FROM \" + NAME_OF_TABLE;\n ArrayList<AshirBlogPostingHelper> ashirPostsList = new ArrayList<AshirBlogPostingHelper>();\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(query, null);\n if (c != null) {\n while (c.moveToNext()) {\n String post = c.getString(c.getColumnIndex(Col_2));\n try {\n byte[] getImageFromDb = c.getBlob(c.getColumnIndex(Col_3));\n AshirBlogPostingHelper postHelper = new AshirBlogPostingHelper();\n\n postHelper.setDataPost(post);\n postHelper.setImage(getImageFromDb);\n\n ashirPostsList.add(postHelper);\n }catch (Exception e){\n e.printStackTrace();\n }\n }\n }\n\n db.close();\n return ashirPostsList;\n\n }", "public List<Gallery> getGallery() {\n List<Gallery> galleries = new ArrayList<>();\n galleries.add(new Gallery(\"islands\", \"Holiday 2017\", \"Islands\", 130, 4, \"City break\", \"13/04/2018\", \"15/04/2018\"));\n galleries.add(new Gallery(\"rome\", \"Fall 2017\",\"Rome\", 250, 5,\"City break\", \"13/04/2018\", \"15/04/2018\"));\n galleries.add(new Gallery(\"london\",\"Summer 2017\",\"London\",300,3,\"City break\", \"13/04/2018\", \"15/04/2018\"));\n galleries.add(new Gallery(\"paris\",\"Winter 2017\",\"Paris\",100,2,\"City break\", \"13/04/2018\", \"15/04/2018\"));\n galleries.add(new Gallery(\"san_francisco\",\"Spring 2018\",\" San Francisco\",250.5,4,\"City break\", \"13/04/2018\", \"15/04/2018\"));\n galleries.add(new Gallery(\"greece\",\"Summer 2018\",\"Greece\",234,3,\"City break\", \"13/04/2018\", \"15/04/2018\"));\n return galleries;\n }", "@Override\r\n\tpublic List<Film> getFilms(int offset, int count) {\n\t\treturn mFilmDao.getFilms(offset, count);\r\n\t}", "public PaginationResponse<GenericS3Input> list() throws BitmovinException {\n try {\n return this.apiClient.list(new HashMap<String, Object>()).getData().getResult();\n } catch (Exception ex) {\n throw buildBitmovinException(ex);\n }\n }", "@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n public Collection getPlanMedioMesList(int startIndex, int endIndex) {\r\n if (startIndex < 1) {\r\n startIndex = 1;\r\n }\r\n if ( (endIndex - startIndex) < 0) {\r\n // Just return an empty list.\r\n return new ArrayList();\r\n }\r\n String queryString = \"from PlanMedioMesEJB e\";\r\n // Add a an order by on all primary keys to assure reproducable results.\r\n String orderByPart = \"\";\r\n orderByPart += \" order by e.id\";\r\n queryString += orderByPart;\r\n Query query = manager.createQuery(queryString);\r\n query.setFirstResult(startIndex - 1);\r\n query.setMaxResults(endIndex - startIndex + 1);\r\n return query.getResultList();\r\n }", "@RequestMapping(path = \"medservices\", method = RequestMethod.GET)\n public List<MedicalService> getAllMedServices(){\n return medicalServiceService.getAllMedServices();\n }", "public ArrayList<clsPago> consultaDataPagosCuotaInicial(int codigoCli)\n { \n ArrayList<clsPago> data = new ArrayList<clsPago>(); \n try{\n bd.conectarBaseDeDatos();\n sql = \" SELECT a.id_pagos_recibo idPago, a.id_usuario, b.name name_usuario, \"\n + \" a.referencia referencia, \"\n + \" a.fecha_pago fecha_pago, a.estado, \"\n + \" a.valor valor_pago, a.id_caja_operacion, e.name_completo nombre_cliente, \"\n + \" a.fecha_pago fecha_registro\"\n + \" FROM ck_pagos_recibo AS a\"\n + \" JOIN ck_usuario AS b ON a.id_usuario = b.id_usuario\"\n + \" JOIN ck_cliente AS e ON a.codigo = e.codigo\"\n + \" WHERE a.estado = 'A'\"\n + \" AND a.cuota_inicial = 'S'\"\n + \" AND a.estado_asignado = 'N'\"\n + \" AND a.codigo = \" + codigoCli; \n \n System.out.println(sql);\n bd.resultado = bd.sentencia.executeQuery(sql);\n \n if(bd.resultado.next())\n { \n do \n { \n clsPago oListaTemporal = new clsPago();\n \n oListaTemporal.setReferencia(bd.resultado.getString(\"referencia\"));\n oListaTemporal.setFechaPago(bd.resultado.getString(\"fecha_pago\"));\n oListaTemporal.setNombreUsuario(bd.resultado.getString(\"name_usuario\"));\n oListaTemporal.setNombreCliente(bd.resultado.getString(\"nombre_cliente\"));\n oListaTemporal.setValor(bd.resultado.getDouble(\"valor_pago\"));\n oListaTemporal.setFechaRegistro(bd.resultado.getString(\"fecha_registro\"));\n oListaTemporal.setIdPago(bd.resultado.getInt(\"idPago\"));\n data.add(oListaTemporal);\n }\n while(bd.resultado.next()); \n //return data;\n }\n else\n { \n data = null;\n } \n }\n catch(Exception ex)\n {\n System.out.print(ex);\n data = null;\n } \n bd.desconectarBaseDeDatos();\n return data;\n }", "public ResponseEntity<List<GrupoDS>> buscarGrupos() {\n \tList<GrupoDS> lista = new ArrayList<>();\n \tfor (GrupoModel model : grupoRepository.findAll()) {\n \t\tlista.add(new GrupoDS(model));\n \t}\n return new ResponseEntity<List<GrupoDS>>(lista, HttpStatus.OK);\n }", "@Override\n public List<Produto> filtrarProdutos() {\n\n Query query = em.createQuery(\"SELECT p FROM Produto p ORDER BY p.id DESC\");\n\n// query.setFirstResult(pageRequest.getPageNumber() * pageRequest.getPageSize());\n// query.setMaxResults(pageRequest.getPageSize());\n return query.getResultList();\n }", "public Set<Medicine> loadMedicines();", "List<ParqueaderoEntidad> listar();", "public ArrayList<Album> buscarAlbuns() {\r\n \t\r\n ArrayList<Album> albuns = new ArrayList<Album>();\r\n Conexao conector = new Conexao();\r\n \r\n if(conector.conectar() == false) {\r\n \tSystem.out.println(\"Sem conexao para busca!\");\r\n \treturn null;\r\n }\r\n \r\n try {\r\n String sql = \"SELECT idAlbum, nomeAlbum, artistaAlbum,\"\r\n \t\t+ \" anoLancamentoAlbum, qtdMusicas, estiloMusicalAlbum FROM album\";\r\n pstmt = conector.getConexao().prepareStatement(sql);\r\n resultado = pstmt.executeQuery();\r\n\r\n while (resultado.next()) {\r\n \tAlbum album = new Album();\r\n \talbum.setId(resultado.getInt(1)); \r\n \talbum.setNomeAlbum(resultado.getString(2));\r\n \talbum.setArtista(resultado.getString(3));\r\n \talbum.setAnoLancamento(resultado.getInt(4));\r\n \talbum.setQtdMusicas(resultado.getInt(5));\r\n \talbum.setEstiloMusical(EstilosMusicais.values()[resultado.getInt(6)]);\r\n \talbuns.add(album); \t\r\n }\r\n } catch (SQLException exSQL) { //erro ao buscar no banco\r\n \tSystem.err.println(\"\\nExcecao na Busca: \"+exSQL);\r\n \texSQL.getMessage();\r\n \texSQL.printStackTrace();\r\n } catch (Exception ex) { //erro generico\r\n \tSystem.err.println(\"\\nExcecao: \"+ex);\r\n \tex.getMessage();\r\n \tex.printStackTrace();\r\n\t\t} finally {\r\n \ttry {\r\n \t\tif (pstmt != null) pstmt.close();\r\n \t} catch (SQLException exSQL) { //erro ao fechar statement\r\n \tSystem.err.println(\"\\nExcecao no fechamento do Statement: \"+exSQL);\r\n \texSQL.getMessage();\r\n \texSQL.printStackTrace();\r\n \t} catch (Exception ex) { //erro generico\r\n \tSystem.err.println(\"\\nExcecao: \"+ex);\r\n \tex.getMessage();\r\n \tex.printStackTrace();\r\n \t}\r\n \tconector.desconectar();\r\n }\r\n\r\n return albuns;\r\n }", "@Override\n public CRModel getAllPin(int currentPage,int size) {\n Integer total = pinsDao.getAllPinCount();\n if (total > 0) {\n Map<String,Object> res = new HashMap<>();\n res.put(\"total\",total);\n List<UPModel> pinList = pinsDao.getAllPin((currentPage-1)*size,size);\n if (pinList != null) {\n res.put(\"records\",pinList);\n return new CRModel(StatusCode.SUCCESS,\"\",res);\n }\n }\n return new CRModel(StatusCode.WARNING, \"获取所有愿望卡\"+Message.WARNING,null);\n }", "public void downloadImages(String orderBy){\n\n int itemsPerPage = 20;\n\n // Set Toolbar subtitle\n try {\n ((MainActivity)getActivity()).getSupportActionBar().setSubtitle(orderBy.substring(0,1).toUpperCase() + orderBy.substring(1));\n }catch (Exception e){\n Log.e(TAG, \"downloadImages: Exception \" + e );\n }\n\n // Retrofit connect\n WallpaperApi.Factory.getInstance().getWallpapers(orderBy, itemsPerPage, page,WallpaperApi.API_KEY).enqueue(new Callback<List<Wallpaper>>() {\n @Override\n public void onResponse(Call<List<Wallpaper>> call, Response<List<Wallpaper>> response) {\n /*for(Wallpaper wallpaper:response.body()){\n Log.d(TAG, wallpaper.getUser().getName());\n }*/\n imageListAdapter.addImages(response.body());\n isLoading = false;\n loadingLayout.setVisibility(View.INVISIBLE);\n loadingLayout.startAnimation(slide_down);\n EventBus.getDefault().post(EVENTBUSKEY_REFRESH_PAGER_ADAPTER);\n }\n @Override\n public void onFailure(Call<List<Wallpaper>> call, Throwable t) {\n Log.e(TAG, \"Failed \" + t.getMessage());\n isLoading = false;\n // reduce page by 1 as page failed to load\n page--;\n imageRecyclerView.setVisibility(View.GONE);\n\n Glide.with(mContext)\n .load(R.drawable.no_connection)\n .asGif()\n .into(noConnectionGif);\n connectionLost.setVisibility(View.VISIBLE);\n }\n });\n }", "public static List<Payment> getPaymentsFromDatabase(String mailUtente) throws ClassNotFoundException {\r\n\t\t\r\n\t\t//Query occurs in table \"metododipagamento\"\r\n \t//username:= postgres\r\n \t//password:= effe\r\n \t//Database name:=strumenti_database\r\n\t\t\r\n\t\tList<Payment> pagamentiAggiornati = new ArrayList<Payment>();\r\n \t\r\n \tClass.forName(\"org.postgresql.Driver\");\r\n \t\r\n \ttry (Connection con = DriverManager.getConnection(JDBC_URL, JDBC_USERNAME, JDBC_PASSWORD)){\r\n \t\t\r\n \t\ttry (PreparedStatement pst = con.prepareStatement(\r\n \t\t\t\t\"SELECT * FROM \" + NOME_TABELLA + \" \"\r\n \t\t\t\t+ \"WHERE cliente = ?\")) {\r\n \t\t\t\r\n \t\t\tpst.setString(1, mailUtente);\r\n \t\t\t\r\n \t\t\tResultSet rs = pst.executeQuery();\r\n \t\t\t\r\n \t\t\twhile (rs.next()) {\r\n\r\n \t\t\t\tString userMail = rs.getString(\"cliente\");\r\n \t\t\t\tString nomeMetodo = rs.getString(\"nomemetodo\");\r\n \t\t\t\tString credenziali = rs.getString(\"credenziali\");\r\n \t\t\t\t\r\n \t\t\t\tpagamentiAggiornati.add(new Payment(userMail, nomeMetodo, credenziali));\r\n\r\n \t\t\t}\r\n \t\t\t\r\n \t\t} catch (SQLException e) {\r\n \t\t\tSystem.out.println(\"Errore durante query dei dati: \" + e.getMessage());\r\n \t\t}\r\n \t\t\r\n \t} catch (SQLException e){\r\n \t\tSystem.out.println(\"Problema durante la connessione iniziale alla base di dati: \" + e.getMessage());\r\n \t}\r\n \t\r\n \treturn pagamentiAggiornati;\r\n\t\t\r\n\t}", "@Override\r\npublic List<Map<String, Object>> readAll() {\n\treturn detalle_pedidoDao.realAll();\r\n}", "@Override\n public List<Caja> buscarMovimientos(){\n List<Caja> listaCaja= cajaRepository.findAll();\n\n return listaCaja;\n\n }", "public static com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Orders> findAll(int skip, int take)\n {\n String intervalName = null;\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n intervalName = \"Orders.findAll\";\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().startInterval(intervalName, com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.PersistenceRead);\n }\n try\n {\n String _selectSQL = \"select \" + \" x.\\\"a\\\",x.\\\"b\\\",x.\\\"c\\\",x.\\\"d\\\",x.\\\"e\\\",x.\\\"f\\\",x.\\\"g\\\",x.\\\"h\\\",x.\\\"i\\\",x.\\\"j\\\",x.\\\"l\\\",x.\\\"m\\\",x.\\\"n\\\",x.\\\"o\\\",x.\\\"p\\\",x.\\\"q\\\",x.\\\"r\\\",x.\\\"s\\\",x.\\\"t\\\",x.\\\"u\\\",x.\\\"v\\\",x.\\\"w\\\",x.\\\"x\\\",x.\\\"y\\\",x.\\\"z\\\",x.\\\"ba\\\",x.\\\"bb\\\",x.\\\"bc\\\",x.\\\"bd\\\",x.\\\"be\\\",x.\\\"bf\\\",x.\\\"bg\\\",x.\\\"bh\\\",x.\\\"bi\\\",x.\\\"bj\\\",x.\\\"bl\\\",x.\\\"bm\\\",x.\\\"pending\\\",x.\\\"_pc\\\",x.\\\"_rp\\\",x.\\\"_rf\\\"\"\n + \",x.\\\"relationsFK\\\",x.\\\"bn\\\",x.\\\"_rc\\\",x.\\\"_ds\\\",x.\\\"cvpOperation_length\\\",x.\\\"cvpOperationLobs_length\\\" FROM \\\"mvideo5_1_0_orders\\\" x where (((x.\\\"pending\\\" = 1 or not exists (select x_os.\\\"bn\\\" from \\\"mvideo5_1_0_orders_os\\\" x_os where x_os.\\\"bn\\\" = x.\\\"bn\\\"))))\"; \n return (com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Orders>)(Object)DELEGATE.findWithSQL(skip, take, _selectSQL, ru.terralink.mvideo.sap.Orders.class);\n }\n finally\n {\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().stopInterval(intervalName);\n }\n }\n }", "private void loadItems() {\n try {\n if (ServerIdUtil.isServerId(memberId)) {\n if (ServerIdUtil.containsServerId(memberId)) {\n memberId = ServerIdUtil.getLocalId(memberId);\n } else {\n return;\n }\n }\n List<VideoReference> videoReferences = new Select().from(VideoReference.class).where(VideoReference_Table.userId.is(memberId)).orderBy(OrderBy.fromProperty(VideoReference_Table.date).descending()).queryList();\n List<String> videoIds = new ArrayList<>();\n for (VideoReference videoReference : videoReferences) {\n videoIds.add(videoReference.getId());\n }\n itemList = new Select().from(Video.class).where(Video_Table.id.in(videoIds)).orderBy(OrderBy.fromProperty(Video_Table.date).descending()).queryList();\n } catch (Throwable t) {\n itemList = new ArrayList<>();\n }\n }", "public static ArrayList<Song> getAll() {\n ArrayList<Song> songs = new ArrayList<>();\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n conn = DriverManager.getConnection(\"jdbc:mysql://\" + host + \"/\" + db + \"?\" + \"user=\" + user + \"&password=\" + psw );\n\n songStatement = conn.createStatement();\n songResultSet = songStatement.executeQuery(\"SELECT * FROM spotify.track WHERE annotated = 0 LIMIT 0, 25\");\n\n songs = createSongs(songResultSet);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n close();\n }\n\n return songs;\n }" ]
[ "0.7057904", "0.6791581", "0.64622116", "0.6294171", "0.6240292", "0.6206014", "0.61511683", "0.61014915", "0.59142184", "0.59015095", "0.5890606", "0.5841607", "0.57983565", "0.5789329", "0.578525", "0.5769611", "0.5769224", "0.5766569", "0.57631665", "0.57609576", "0.5734536", "0.57263166", "0.5722481", "0.5721915", "0.5707853", "0.570557", "0.56761247", "0.567471", "0.56657046", "0.5645294", "0.5631329", "0.5592995", "0.55902743", "0.5589037", "0.5589037", "0.55806196", "0.5579894", "0.5575239", "0.5566493", "0.5539362", "0.55342114", "0.55223113", "0.5513031", "0.5510173", "0.5497432", "0.5496122", "0.5471162", "0.5457258", "0.5453708", "0.54439676", "0.54418224", "0.543983", "0.5438046", "0.5437062", "0.5422145", "0.54219574", "0.5406859", "0.54062206", "0.54002285", "0.54000884", "0.53935266", "0.53768486", "0.53697306", "0.535249", "0.53429055", "0.5337045", "0.53305495", "0.5328933", "0.5322684", "0.53207654", "0.5314163", "0.5312481", "0.53062457", "0.5306025", "0.5305478", "0.5302477", "0.5296895", "0.5294597", "0.5282477", "0.5277208", "0.52765095", "0.52764475", "0.52750903", "0.5274555", "0.52716994", "0.5271038", "0.5265293", "0.52636886", "0.5262941", "0.52541906", "0.52450067", "0.524253", "0.5240086", "0.52397645", "0.5232028", "0.5231264", "0.5225857", "0.5225678", "0.52212775", "0.52203417" ]
0.79404587
0
Parsing Table: 0 123456 0+.cde 0|123 1|46 2|13 3|436 4|5 5|56 6|778 7|8 8|8 here: c = 19 d = 09 e = E|e accepting state: 1,3,5,8
public static int isNumber(String num) { int[][] table = new int[9][7]; for (int i = 0; i < 9; i++) { for (int j = 0; j < 6; j++) { table[i][j] = -1; } } table[0][0] = 1; table[0][2] = 2; table[0][4] = 3; table[1][3] = 4; table[1][6] = 6; table[2][0] = 1; table[2][4] = 3; table[3][3] = 4; table[3][5] = 3; table[3][6] = 6; table[4][5] = 5; table[5][5] = 5; table[5][6] = 6; table[6][1] = 7; table[6][2] = 7; table[6][5] = 8; table[7][5] = 8; table[8][5] = 8; int state = 0; Pattern c = Pattern.compile("[1-9]"); Pattern d = Pattern.compile("[0-9]"); char[] input = num.toCharArray(); int[] intinput = new int[num.length()]; for (int i = 0; i < intinput.length; i++) { intinput[i] = -1; } for (int i = 0; i < input.length; i++) { Matcher mc = c.matcher(String.valueOf(input[i])); Matcher md = c.matcher(String.valueOf(input[i])); if (input[i] == '0') intinput[i] = 0; else if (input[i] == '+') intinput[i] = 1; else if (input[i] == '-') intinput[i] = 2; else if (input[i] == '.') intinput[i] = 3; else if (input[i] == 'e' || input[i] == 'E') intinput[i] = 6; else if (mc.matches()) intinput[i] = 4; else if (md.matches()) intinput[i] = 5; } try { for (int i = 0; i < input.length; i++) { if (intinput[i] == 0 && table[state][intinput[i]] == -1) intinput[i] = 5; if (intinput[i] == 4 && table[state][intinput[i]] == -1) intinput[i] = 5; state = table[state][intinput[i]]; } } catch(IndexOutOfBoundsException e) { return 1; } if (state == 1 || state == 3 || state == 5 || state == 8) return 0; return 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void parse(String table) throws MEBNException {\r\n\t\tthis.init(table);\r\n\t\tthis.parse();\r\n\t}", "@Test\n void testParseTestcaseFrom50Specification(){\n String testcase = \"\\r\\n\" +\n \"/ISk5\\\\2MT382-1000\\r\\n\" +\n \"\\r\\n\" +\n \"1-3:0.2.8(50)\\r\\n\" +\n \"0-0:1.0.0(101209113020W)\\r\\n\" +\n \"0-0:96.1.1(4B384547303034303436333935353037)\\r\\n\" +\n \"1-0:1.8.1(123456.789*kWh)\\r\\n\" +\n \"1-0:1.8.2(123456.789*kWh)\\r\\n\" +\n \"1-0:2.8.1(123456.789*kWh)\\r\\n\" +\n \"1-0:2.8.2(123456.789*kWh)\\r\\n\" +\n \"0-0:96.14.0(0002)\\r\\n\" +\n \"1-0:1.7.0(01.193*kW)\\r\\n\" +\n \"1-0:2.7.0(00.000*kW)\\r\\n\" +\n \"0-0:96.7.21(00004)\\r\\n\" +\n \"0-0:96.7.9(00002)\\r\\n\" +\n \"1-0:99.97.0(2)(0-0:96.7.19)(101208152415W)(0000000240*s)(101208151004W)(0000000301*s)\\r\\n\" +\n \"1-0:32.32.0(00002)\\r\\n\" +\n \"1-0:52.32.0(00001)\\r\\n\" +\n \"1-0:72.32.0(00000)\\r\\n\" +\n \"1-0:32.36.0(00000)\\r\\n\" +\n \"1-0:52.36.0(00003)\\r\\n\" +\n \"1-0:72.36.0(00000)\\r\\n\" +\n \"0-0:96.13.0(303132333435363738393A3B3C3D3E3F303132333435363738393A3B3C3D3E3F30313233343536373839\" +\n \"3A3B3C3D3E3F303132333435363738393A3B3C3D3E3F303132333435363738393A3B3C3D3E3F)\\r\\n\" +\n \"1-0:32.7.0(220.1*V)\\r\\n\" +\n \"1-0:52.7.0(220.2*V)\\r\\n\" +\n \"1-0:72.7.0(220.3*V)\\r\\n\" +\n \"1-0:31.7.0(001*A)\\r\\n\" +\n \"1-0:51.7.0(002*A)\\r\\n\" +\n \"1-0:71.7.0(003*A)\\r\\n\" +\n \"1-0:21.7.0(01.111*kW)\\r\\n\" +\n \"1-0:41.7.0(02.222*kW)\\r\\n\" +\n \"1-0:61.7.0(03.333*kW)\\r\\n\" +\n \"1-0:22.7.0(04.444*kW)\\r\\n\" +\n \"1-0:42.7.0(05.555*kW)\\r\\n\" +\n \"1-0:62.7.0(06.666*kW)\\r\\n\" +\n \"0-1:24.1.0(003)\\r\\n\" +\n \"0-1:96.1.0(3232323241424344313233343536373839)\\r\\n\" +\n \"0-1:24.2.1(101209112500W)(12785.123*m3)\\r\\n\" +\n \"!EF2F\\r\\n\" +\n \"\\r\\n\";\n DSMRTelegram dsmrTelegram = ParseDsmrTelegram.parse(testcase);\n\n // CHECKSTYLE.OFF: ParenPad\n assertEquals(\"/ISk5\\\\2MT382-1000\", dsmrTelegram.getRawIdent());\n assertEquals(\"ISK\", dsmrTelegram.getEquipmentBrandTag());\n assertEquals(\"MT382-1000\", dsmrTelegram.getIdent());\n\n assertEquals(\"5.0\", dsmrTelegram.getP1Version());\n assertEquals(ZonedDateTime.parse(\"2010-12-09T11:30:20+01:00\"), dsmrTelegram.getTimestamp());\n\n assertEquals(\"K8EG004046395507\", dsmrTelegram.getEquipmentId());\n assertEquals(\"0123456789:;<=>?0123456789:;<=>?0123456789:;<=>?0123456789:;<=>?0123456789:;<=>?\", dsmrTelegram.getMessage());\n\n assertEquals( 2, dsmrTelegram.getElectricityTariffIndicator());\n assertEquals( 123456.789, dsmrTelegram.getElectricityReceivedLowTariff(), 0.001);\n assertEquals( 123456.789, dsmrTelegram.getElectricityReceivedNormalTariff(), 0.001);\n assertEquals( 123456.789, dsmrTelegram.getElectricityReturnedLowTariff(), 0.001);\n assertEquals( 123456.789, dsmrTelegram.getElectricityReturnedNormalTariff(), 0.001);\n assertEquals( 1.193, dsmrTelegram.getElectricityPowerReceived(), 0.001);\n assertEquals( 0.0, dsmrTelegram.getElectricityPowerReturned(), 0.001);\n assertEquals( 4, dsmrTelegram.getPowerFailures());\n assertEquals( 2, dsmrTelegram.getLongPowerFailures());\n\n assertEquals(2, dsmrTelegram.getPowerFailureEventLogSize());\n\n List<PowerFailureEvent> powerFailureEventLog = dsmrTelegram.getPowerFailureEventLog();\n assertEquals(2, powerFailureEventLog.size());\n assertPowerFailureEvent(powerFailureEventLog.get(0), \"2010-12-08T15:20:15+01:00\", \"2010-12-08T15:24:15+01:00\", \"PT4M\");\n assertPowerFailureEvent(powerFailureEventLog.get(1), \"2010-12-08T15:05:03+01:00\", \"2010-12-08T15:10:04+01:00\", \"PT5M1S\");\n\n assertEquals( 2, dsmrTelegram.getVoltageSagsPhaseL1());\n assertEquals( 1, dsmrTelegram.getVoltageSagsPhaseL2());\n assertEquals( 0, dsmrTelegram.getVoltageSagsPhaseL3());\n assertEquals( 0, dsmrTelegram.getVoltageSwellsPhaseL1());\n assertEquals( 3, dsmrTelegram.getVoltageSwellsPhaseL2());\n assertEquals( 0, dsmrTelegram.getVoltageSwellsPhaseL3());\n assertEquals( 220.1, dsmrTelegram.getVoltageL1(), 0.001);\n assertEquals( 220.2, dsmrTelegram.getVoltageL2(), 0.001);\n assertEquals( 220.3, dsmrTelegram.getVoltageL3(), 0.001);\n assertEquals( 1, dsmrTelegram.getCurrentL1(), 0.001);\n assertEquals( 2, dsmrTelegram.getCurrentL2(), 0.001);\n assertEquals( 3, dsmrTelegram.getCurrentL3(), 0.001);\n assertEquals( 1.111, dsmrTelegram.getPowerReceivedL1(), 0.001);\n assertEquals( 2.222, dsmrTelegram.getPowerReceivedL2(), 0.001);\n assertEquals( 3.333, dsmrTelegram.getPowerReceivedL3(), 0.001);\n assertEquals( 4.444, dsmrTelegram.getPowerReturnedL1(), 0.001);\n assertEquals( 5.555, dsmrTelegram.getPowerReturnedL2(), 0.001);\n assertEquals( 6.666, dsmrTelegram.getPowerReturnedL3(), 0.001);\n assertEquals( 1, dsmrTelegram.getMBusEvents().size());\n\n assertEquals( 3, dsmrTelegram.getMBusEvents().get(1).getDeviceType());\n assertEquals(\"2222ABCD123456789\", dsmrTelegram.getMBusEvents().get(1).getEquipmentId());\n assertEquals(ZonedDateTime.parse(\"2010-12-09T11:25+01:00\"), dsmrTelegram.getMBusEvents().get(1).getTimestamp());\n assertEquals( 12785.123, dsmrTelegram.getMBusEvents().get(1).getValue(), 0.001);\n assertEquals( \"m3\", dsmrTelegram.getMBusEvents().get(1).getUnit());\n\n assertEquals(\"2222ABCD123456789\", dsmrTelegram.getGasEquipmentId());\n assertEquals(ZonedDateTime.parse(\"2010-12-09T11:25+01:00\"), dsmrTelegram.getGasTimestamp());\n assertEquals(12785.123, dsmrTelegram.getGasM3(), 0.001);\n\n assertEquals(\"EF2F\", dsmrTelegram.getCrc());\n\n // The CRC of this testcase is invalid.\n // Or better: I have not been able to copy it from the documentation and\n // recreate the \"original\" record for which the provided CRC was calculated.\n // assertTrue(dsmrTelegram.isValidCRC());\n }", "int[] parse(String re, int s, int t)\r\n\t{\r\n\t\tint [] st;\r\n\t\tint i;\r\n\t\t\r\n\t\t//single symbol\r\n\t\tif (s==t)\r\n\t\t{\r\n\t\t\tst=new int[2];\r\n\t\t\tst[0]=incCapacity();\r\n\t\t\tst[1]=incCapacity();\r\n\t\t\tif (re.charAt(s)=='e') //epsilon\r\n\t\t\t\taddEdge(st[0],symbol,st[1]);\r\n\t\t\telse addEdge(st[0],re.charAt(s)-'0',st[1]);\r\n\t\t\treturn st;\r\n\t\t}\r\n\t\t\r\n\t\t//(....)\r\n\t\tif ((re.charAt(s)=='(')&&(re.charAt(t)==')'))\r\n\t\t{\r\n\t\t\tif (next[s]==t)\r\n\t\t\t\treturn parse(re,s+1,t-1);\r\n\t\t}\r\n\t\t\r\n\t\t//RE1+RE2\r\n\t\ti=s;\r\n\t\twhile (i<=t)\r\n\t\t{\r\n\t\t\ti=next[i];\r\n\t\t\t\r\n\t\t\tif ((i<=t)&&(re.charAt(i)=='+'))\r\n\t\t\t{\r\n\t\t\t\tint [] st1=parse(re,s,i-1);\r\n\t\t\t\tint [] st2=parse(re,i+1,t);\r\n\t\t\t\tst = union(st1[0],st1[1],st2[0],st2[1]);\r\n\t\t\t\treturn st;\r\n\t\t\t}\r\n\t\t\t++i;\r\n\t\t}\r\n\t\t\r\n\t\t//RE1.RE2\r\n\t\ti=s;\r\n\t\twhile (i<=t)\r\n\t\t{\r\n\t\t\ti=next[i];\r\n\t\t\t\r\n\t\t\tif ((i<=t)&&(re.charAt(i)=='.'))\r\n\t\t\t{\r\n\t\t\t\tint [] st1=parse(re,s,i-1);\r\n\t\t\t\tint [] st2=parse(re,i+1,t);\r\n\t\t\t\tst = concat(st1[0],st1[1],st2[0],st2[1]);\r\n\t\t\t\treturn st;\r\n\t\t\t}\r\n\t\t\t++i;\r\n\t\t}\r\n\t\t\r\n\t\t//(RE)*\r\n\t\tassert(re.charAt(t)=='*');\r\n\t\tint [] st1=parse(re,s,t-1);\r\n\t\tst=clo(st1[0],st1[1]);\r\n\t\treturn st; \r\n\t}", "private FiniteAutomaton parseE() {\n\n\t\tFiniteAutomaton t = parseT();\n\n\t\tint c = peek();\n\n\t\tif (c >= 0 && c != ')' && c != '|') {\n\t\t\t// concatenation\n\n\t\t\tFiniteAutomaton e = parseE();\n\n\t\t\t// create result automaton\n\t\t\tFiniteAutomaton result = new FiniteAutomaton();\n\t\t\tresult.addAll(t);\n\t\t\tresult.addAll(e);\n\n\t\t\t// create ε-transition connecting e's accepting state to r's start state\n\t\t\tresult.createTransition(t.getUniqueAcceptingState(), e.getStartState(), FiniteAutomaton.EPSILON);\n\t\t\tt.getUniqueAcceptingState().setAccepting(false);\n\t\t\te.getStartState().setStart(false);\n\n\t\t\t// done\n\t\t\treturn check(result);\n\t\t}\n\n\t\treturn t;\n\t}", "public void SLRParser () throws IOException {\n char Action ;\n String tableOutput;\n int num;\n int i;\n SLRParsStack.push(\"0\");\n while (!token.getValue().equals(\"&\")) {\n// System.out.println(token.getType() + \" \" + token.getValue());\n for (i = 0; i < SLRterminal.length; i++)\n {\n if (!BUCheckTerminal(token.getValue()))\n {\n if (SLRterminal[i].equals(\"id\")) {\n break;\n }\n }\n else {\n if (SLRterminal[i].equals(token.getValue()))\n break;\n }\n }\n// System.out.println(SLRParsStack.peek() + \" \" + i);\n tableOutput = BUParseTable[Integer.parseInt(SLRParsStack.peek()) + 1][i + 1];\n// System.out.println(tableOutput);\n Action = tableOutput.charAt(0);\n if (tableOutput.length() == 3)\n {\n num = Character.getNumericValue(tableOutput.charAt(1));\n num *= 10;\n num += Character.getNumericValue(tableOutput.charAt(2));\n }\n else\n {\n num = Character.getNumericValue(tableOutput.charAt(1));\n }\n// System.out.println(token.getValue());\n// System.out.println(Action);\n// System.out.println(num);\n switch (Action) {\n case 's':\n// System.out.println(\"in shift action\");\n SLRParsStack.push(String.valueOf(num));\n token = LA.Scanner();\n// System.out.println(token.getValue());\n break;\n case 'r':\n// System.out.println(\"in reduce action\");\n int numberOfVar = Integer.parseInt(LRTTable[num - 1][1]);\n// System.out.println(SLRParsStack.size());\n while (numberOfVar > 0) {\n SLRParsStack.pop();\n numberOfVar--;\n }\n// System.out.println(\"out of while\");\n// System.out.println(LRTTable[num - 1][0]);\n for (i = 0; i < SLRterminal.length; i++)\n {\n if (SLRterminal[i].equals(LRTTable[num - 1][0]))\n break;\n }\n// System.out.println(i);\n// System.out.println(SLRParsStack.isEmpty() + \" size stack\");\n tableOutput = BUParseTable[Integer.parseInt(SLRParsStack.peek()) + 1][i + 1];\n// System.out.println(tableOutput);\n SLRParsStack.push(String.valueOf(tableOutput.charAt(1)));\n break;\n case 'a':\n// System.out.println(\"in accept\");\n Accept();\n return;\n case 'e':\n// System.out.println(\"in error\");\n error(4);\n }\n }\n\n }", "private void createParseTable() {\n parseTableHeader = new HashMap<String, Integer>();\n parseTable = new ArrayList<ArrayList<String>>();\n pHeader = new ArrayList<String>();\n\n String inputLine = null;\n int fileLine = 1;\n int headerCount = 0;\n\n try {\n FileReader reader = new FileReader(parseTableFile);\n BufferedReader bufferedReader = new BufferedReader(reader);\n\n while((inputLine = bufferedReader.readLine()) != null) {\n\n // removes all leading and trailing whitespaces and leading tabs\n String line = inputLine.trim().replaceFirst(\"\\\\t\", \"\");\n\n // these are header rows for terminals and variables\n if(fileLine == 1 || fileLine == 40) {\n String[] cells = line.replaceFirst(\"&\", \"\").split(\"&\");\n for(String cell : cells) {\n// System.out.println(cell);\n if(!parseTableHeader.containsKey(cell) && cell != \"\") {\n parseTableHeader.put(cell, headerCount);\n// System.out.println(headerCount);\n pHeader.add(cell);\n headerCount++;\n }\n }\n }\n else {\n String[] parsedRow = line.split(\"&\",-1);\n // get actual SLR parse table's row number\n int row = Integer.parseInt(parsedRow[0]);\n\n// System.out.println(\"Parsing row number \\t\\t\" + row);\n\n // create a new Array that excludes the row number column\n String[] tempRow = Arrays.copyOfRange(parsedRow, 1, parsedRow.length);\n // remove null / empty entries from Array\n replaceBlanks(tempRow);\n // convert to ArrayList for easier handling\n ArrayList<String> cells = new ArrayList<>(Arrays.asList(tempRow));\n\n// System.out.print(\"Parsed row content \\t\\t\");\n// printArrayList(cells);\n// System.out.println();\n\n // add above ArrayList to the table at the correct row number.\n // because there's two parts to the parse table's row, only\n // add right away if we haven't added anything before\n // otherwise combine the previous entry with this one to create\n // complete entry for this row\n try {\n ArrayList<String> current = parseTable.get(row);\n\n// System.out.print(\"Contents of row \" + row + \"\\t\\t\");\n// printArrayList(current);\n// System.out.println();\n\n // temporary ArrayList to hold previous entry and new entry\n ArrayList<String> temp = new ArrayList<String>();\n temp.addAll(current);\n temp.addAll(cells);\n\n// System.out.print(\"New combined row \\t\\t\");\n// printArrayList(temp);\n// System.out.println();\n\n // add combined ArrayList to the parse table\n parseTable.set(row, temp);\n } catch (IndexOutOfBoundsException e) {\n parseTable.add(row, cells);\n }\n\n// System.out.print(\"Final row \\t\\t\\t\\t\");\n// printArrayList(parseTable.get(row));\n// System.out.println();\n// System.out.println();\n\n }\n\n fileLine++;\n\n }\n if(printPTABLE == \"Y\") {\n printTable();\n }\n bufferedReader.close();\n\n } catch(FileNotFoundException e) {\n System.out.println(\n parseTableFile + \" not found\"\n );\n } catch(IOException e) {\n System.out.println(\n \"Error reading file \" + parseTableFile\n );\n }\n\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n StringReader stringReader0 = new StringReader(\"^z{b>wblu8^IJ+?\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 21, 47, 21);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(47, javaCharStream0.getColumn());\n }", "private void stage1_2() {\n\n\t\tString s = \"E $:( 3E0 , 3E0 ) ( $:( 3E0 , 3E0 ) \";\n\n//\t s = SymbolicString.makeConcolicString(s);\n\t\tStringReader sr = new StringReader(s);\n\t\tSystem.out.println(s);\n\t\tFormula formula = new Formula(s);\n\t\tMap<String, Decimal> actual = formula.getVariableValues();\n\t}", "private void m4675a(char c, List<C0906d> list, StringBuilder sb) {\n if (c == '$') {\n m4676a(list, sb);\n sb.setLength(0);\n this.f4495c = EnumC0909a.START_STATE;\n } else if (c == ':') {\n m4676a(list, sb);\n sb.setLength(0);\n this.f4495c = EnumC0909a.DEFAULT_VAL_STATE;\n } else if (c == '{') {\n m4676a(list, sb);\n list.add(C0906d.f4488b);\n sb.setLength(0);\n } else if (c != '}') {\n sb.append(c);\n } else {\n m4676a(list, sb);\n list.add(C0906d.f4489c);\n sb.setLength(0);\n }\n }", "private static List<TableCell.Alignment> parseSeparator(CharSequence s) {\n List<TableCell.Alignment> columns = new ArrayList<>();\n int pipes = 0;\n boolean valid = false;\n int i = 0;\n while (i < s.length()) {\n char c = s.charAt(i);\n switch (c) {\n case '|':\n i++;\n pipes++;\n if (pipes > 1) {\n // More than one adjacent pipe not allowed\n return null;\n }\n // Need at lest one pipe, even for a one column table\n valid = true;\n break;\n case '-':\n case ':':\n if (pipes == 0 && !columns.isEmpty()) {\n // Need a pipe after the first column (first column doesn't need to start with one)\n return null;\n }\n boolean left = false;\n boolean right = false;\n if (c == ':') {\n left = true;\n i++;\n }\n boolean haveDash = false;\n while (i < s.length() && s.charAt(i) == '-') {\n i++;\n haveDash = true;\n }\n if (!haveDash) {\n // Need at least one dash\n return null;\n }\n if (i < s.length() && s.charAt(i) == ':') {\n right = true;\n i++;\n }\n columns.add(getAlignment(left, right));\n // Next, need another pipe\n pipes = 0;\n break;\n case ' ':\n case '\\t':\n // White space is allowed between pipes and columns\n i++;\n break;\n default:\n // Any other character is invalid\n return null;\n }\n }\n if (!valid) {\n return null;\n }\n return columns;\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+Y6{Tr P>D9wb\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 44, 21, 21);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(22, javaCharStream0.getBeginColumn());\n assertEquals(74, token0.kind);\n }", "@Test(timeout = 4000)\n public void test137() throws Throwable {\n StringReader stringReader0 = new StringReader(\"9F83|i5vU 84Kd\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 887, 887);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n // // Unstable assertion: assertEquals(3, javaCharStream0.bufpos);\n // // Unstable assertion: assertEquals(890, javaCharStream0.getColumn());\n }", "public static void parseCreateString(String createTableString) {\n //System.out.println(\"Parsing the string:\\\"\" + createTableString + \"\\\"\");\n ArrayList<String> createTableTokens = new ArrayList<String>(Arrays.asList(createTableString.split(\" \")));\n\n /* Define table file name */\n String tableFileName = createTableTokens.get(2) + \".tbl\";\n String tableName = createTableTokens.get(2);\n //System.out.println(\"tableName:\"+tableName);\n //System.out.println(\"tableFileName:\"+tableFileName);\n \n //parse column fields into map\n String column = createTableString.substring(createTableString.indexOf(\"(\")+1,createTableString.indexOf(\")\"));\n //System.out.println(\"column:\"+column);\n ArrayList<String> columnTokens = new ArrayList<String>(Arrays.asList((column.trim()).split(\",\")));\n for(int i=0; i<columnTokens.size(); i++){\n \tint size = (((columnTokens.get(i)).trim()).split(\"\\\\s+\")).length;\n \t//System.out.println(\"size:\"+size);\n \tif(i==0){\n \t\tcolumnDataMap.put((((columnTokens.get(i)).trim()).split(\"\\\\s+\"))[0],\"INT\");\n \t\tcolumnIsNullableMap.put((((columnTokens.get(i)).trim()).split(\"\\\\s+\"))[0],\"NO\");\n \t}\n \telse if(i>0)\n \t{\n \t\tcolumnDataMap.put((((columnTokens.get(i)).trim()).split(\"\\\\s+\"))[0],(((columnTokens.get(i)).trim()).split(\"\\\\s+\"))[1]);\n \t\tif(size>2){\n \t\t\tcolumnIsNullableMap.put((((columnTokens.get(i)).trim()).split(\"\\\\s+\"))[0],\"NO\");\n \t\t}\n \t\telse if (size==2){\n \t\t\tcolumnIsNullableMap.put((((columnTokens.get(i)).trim()).split(\"\\\\s+\"))[0],\"YES\");\n \t\t}\n \t}\n \telse\n \t\tSystem.out.println(\"Given command is not correct\");\n }\n /*\n Iterator entries = columnDataMap.entrySet().iterator();\n while (entries.hasNext()) {\n Map.Entry entry = (Map.Entry) entries.next();\n String key = (String)entry.getKey();\n String value = (String)entry.getValue();\n System.out.println(\"Key = \" + key + \", Value = \" + value);\n }*/\n UserDataHandler table = new UserDataHandler(tableName);\n table.createTable(columnDataMap,columnIsNullableMap);\n }", "@Test\r\n\tpublic void test3() throws IOException, LexerException, ParserException {\r\n\t\tStringReader ex = new StringReader(\"(lam^s f.\\n\\t(lam^s x.x) (f 1))\\n(lam^c y.\\n\\t(lam^s z.z) y)\");\r\n\r\n\t\tParser parser = new Parser();\r\n\t\tTerm result = parser.Parsing(ex);\r\n\t}", "private byte[] parseInsertRecord_lantrix(String s)\n { \n // ASCII Data:\t\n // Example:\n // ------- \t\n\t\t//>RGP190805211932-3457215-058493640000000FFBF0300;ID=8247;#2122;*54<CRLF\n\t\t// R = [ 0, 1] Response \n // GP = [ 1, 3] Global Position \n\t\t// 190805 = [ 3, 9] GPS time-of-day DDMMAA\n\t\t// 211932 = [ 9 , 15] GPS time-of-hours GMT HHMMSS\n\t\t// -3457215 = [ 15, 23] Latitude \n\t\t// -05849364 = [ 23, 32] Longitude\n\t\t// 000 = [ 32, 35] Speed (kph 0...999)\n\t\t// 000 = [ 35, 38] Heading (degrees 0...359)\n\t\t// 0 = [ 38, 39] GPS source 3 = Position 3D, 2 = Position 2D , 0= invalid\n\t\t// FF = [ 39, 41] Age of the data in Hexadecimal\n\t\t// BF = [ 41, 43] I/O Digital \n\t\t// 03 = [ 43, 45] Number of events generated by the report (decimal).\n\t\t// 00 = [ 45, 47] Horizontal Accuracy HDOP (0 .. 50)\n\t\t// ; = Separator\n\t\t// ID=d8247 = Number Device ID \n\t\t// ; = Separator\n\t\t// #2122 = [ 57 , 62] Sentence Number (as generated by the mobile van from # 0000 to # 7FFF and those generated by the base go # 8000 to # FFFF)\n\t\t// ;*54 = Checksum\n\t\t// < = End of message\n\t\t// CRLF = End of line and carriage advance \n\n /* pre-validate */\n if (StringTools.isBlank(s)) {\n Print.logError(\"String is null/blank\");\n return null;\n } else\n if (s.length() < 5) {\n Print.logError(\"String is invalid length\");\n return null;\n } else\n if (!s.startsWith(\">\")) {\n Print.logError(\"String does not start with '>'\");\n return null;\n }\n\n /* ends with \"<\"? */\n int se = s.endsWith(\"<\")? (s.length() - 1) : s.length();\n s = s.substring(1,se);\n\n /* split */\n String T[] = StringTools.split(s,';'); \n\n /* RPG record */\n if (T[0].length() < 33) {\n Print.logError(\"Invalid 'RPG' data length\");\n return null;\n }\n\n /* mobile id */\n String mobileID = null;\n for (int i = 1; i < T.length; i++) {\n if (T[i].startsWith(\"ID=\")) {\n mobileID = T[i].substring(3);\n break;\n }\n }\n\n\t\t/* Sentence Number */\n String Sentence_number = null;\n for (int j = 1; j < T.length; j++) {\n if (T[j].startsWith(\"#\")) {\n Sentence_number = T[j].substring(1);\n break;\n }\n }\n\n //Arming the ACK frame to remove the data sent from the tracker\n\t String tracker_ID = mobileID;\n\t\tString frame_data_checksum = null;\t\t\n\t\tframe_data_checksum = \">ACK;ID=\" + tracker_ID + \";#\" + Sentence_number + \";*\";\n\t\tString chksum = getCheckSum(frame_data_checksum);\n\t\tString frame_data_ACK = null;\t\t\t\n\t\tframe_data_ACK = frame_data_checksum + chksum + \"<\\r\\n\";\n\n\t\t/* parse */ \t\n long dmy = StringTools.parseLong(T[0].substring( 3, 9), 0L);\n long hms = StringTools.parseLong(T[0].substring( 9, 15), 0L); \n long fixtime = this._getUTCSeconds(dmy, hms);\t\t\n double latitude = (double)StringTools.parseLong(T[0].substring( 15,23),0L) / 100000.0;\n double longitude = (double)StringTools.parseLong(T[0].substring(23,32),0L) / 100000.0;\n\t\tdouble KPH = StringTools.parseDouble(T[0].substring(32,35), 0.0);\n double speedKPH = KPH; \n double headingDeg = StringTools.parseDouble(T[0].substring(35,38), 0.0);\n\t\tint age_data = Integer.parseInt(T[0].substring(39,41),16);\n String decimal = Integer.toString(age_data);\n long inout = Long.parseLong(T[0].substring(41,43),16);\n String binary_io = Long.toBinaryString(inout);\n\t\tString srcStr = T[0].substring(38,39);\n String ageStr = decimal;\n double altitudeM = 0.0;\n double odomKM = 0.0;\n long gpioInput = 0L; \n\t\tint statusCode = StatusCodes.STATUS_LOCATION;\n\n /* I/O Digital */\n\t\tgpioInput = inout; \n\n\t\t/* get time */ \n if (fixtime <= 0L) {\n Print.logWarn(\"Invalid date.\");\n fixtime = DateTime.getCurrentTimeSec(); // default to now\n } \n\n /* lat/lon valid? */\n boolean validGPS = true;\n if (!GeoPoint.isValid(latitude,longitude)) {\n Print.logWarn(\"Invalid lat/lon: \" + latitude + \"/\" + longitude);\n validGPS = false;\n latitude = 0.0;\n longitude = 0.0;\n speedKPH = 0.0;\n headingDeg = 0.0;\n }\n GeoPoint geoPoint = new GeoPoint(latitude,longitude);\n\n /* adjustments to received values */\n if (speedKPH < MINIMUM_SPEED_KPH) {\n speedKPH = 0.0;\n headingDeg = 0.0;\n } else\n if (headingDeg < 0.0) { \n headingDeg = 0.0;\n }\n \n /* debug */\t\t\n Print.logInfo(\"MobileID : \" + mobileID);\n\t\tPrint.logInfo(\"Sentence : \" + Sentence_number);\n Print.logInfo(\"Timestamp: \" + fixtime + \" [\" + new DateTime(fixtime) + \"]\");\n Print.logInfo(\"GeoPoint : \" + geoPoint);\n Print.logInfo(\"Speed km/h: \" + speedKPH + \" [\" + headingDeg + \"]\");\n\n /* mobile-id */\n if (StringTools.isBlank(mobileID)) {\n Print.logError(\"Missing MobileID\");\n return null;\n }\n\n /* find Device */\n String accountID = \"\";\n String deviceID = \"\";\n String uniqueID = \"\";\n //Device device = DCServerFactory.loadDeviceByPrefixedModemID(UNIQUEID_PREFIX, mobileID);\n Device device = DCServerConfig.loadDeviceUniqueID(Main.getServerConfig(), mobileID);\n if (device == null) {\n return null; // errors already displayed\n } else {\n accountID = device.getAccountID();\n deviceID = device.getDeviceID();\n uniqueID = device.getUniqueID();\n Print.logInfo(\"UniqueID : \" + uniqueID);\n Print.logInfo(\"DeviceID : \" + accountID + \"/\" + deviceID);\n }\n \n /* check IP address */\n DataTransport dataXPort = device.getDataTransport();\n if ((this.ipAddress != null) && !dataXPort.isValidIPAddress(this.ipAddress)) {\n DTIPAddrList validIPAddr = dataXPort.getIpAddressValid(); // may be null\n Print.logError(\"Invalid IP Address from device: \" + this.ipAddress + \" [expecting \" + validIPAddr + \"]\");\n return null;\n }\n dataXPort.setIpAddressCurrent(this.ipAddress); // FLD_ipAddressCurrent\n dataXPort.setRemotePortCurrent(this.clientPort); // FLD_remotePortCurrent\n dataXPort.setLastTotalConnectTime(DateTime.getCurrentTimeSec()); // FLD_lastTotalConnectTime\n if (!dataXPort.getDeviceCode().equalsIgnoreCase(Constants.DEVICE_CODE)) {\n dataXPort.setDeviceCode(Constants.DEVICE_CODE); // FLD_deviceCode\n }\n\n /* reject invalid GPS fixes? */\n if (!validGPS && (statusCode == StatusCodes.STATUS_LOCATION)) {\n // ignore invalid GPS fixes that have a simple 'STATUS_LOCATION' status code\n Print.logWarn(\"Ignoring event with invalid latitude/longitude\");\n return null;\n }\n\n /* estimate GPS-based odometer */\n if (odomKM <= 0.0) {\n // calculate odometer\n odomKM = (ESTIMATE_ODOMETER && validGPS)? \n device.getNextOdometerKM(geoPoint) : \n device.getLastOdometerKM();\n } else {\n // bounds-check odometer\n odomKM = device.adjustOdometerKM(odomKM);\n }\n Print.logInfo(\"OdometerKM: \" + odomKM);\n\n /* simulate Geozone arrival/departure */\n if (SIMEVENT_GEOZONES && validGPS) {\n java.util.List<Device.GeozoneTransition> zone = device.checkGeozoneTransitions(fixtime, geoPoint);\n if (zone != null) {\n for (Device.GeozoneTransition z : zone) {\n this.insertEventRecord(device, \n z.getTimestamp(), z.getStatusCode(), z.getGeozone(),\n geoPoint, gpioInput, speedKPH, headingDeg, altitudeM, odomKM);\n Print.logInfo(\"Geozone : \" + z);\n if (z.getStatusCode() == statusCode) {\n // suppress 'statusCode' event if we just added it here\n Print.logDebug(\"StatusCode already inserted: 0x\" + StatusCodes.GetHex(statusCode));\n statusCode = StatusCodes.STATUS_IGNORE;\n }\n }\n }\n }\n\n /* insert event */\n if (statusCode == StatusCodes.STATUS_NONE) {\n // ignore this event\n } else\n if ((statusCode != StatusCodes.STATUS_LOCATION) || !validGPS) {\n this.insertEventRecord(device, \n fixtime, statusCode, null/*GeoZone*/,\n geoPoint, gpioInput, speedKPH, headingDeg, altitudeM, odomKM);\n } else\n if (!device.isNearLastValidLocation(geoPoint,MINIMUM_MOVED_METERS)) {\n if ((statusCode == StatusCodes.STATUS_LOCATION) && (speedKPH > 0.0)) {\n statusCode = StatusCodes.STATUS_MOTION_IN_MOTION;\n }\n this.insertEventRecord(device, \n fixtime, statusCode, null/*GeoZone*/,\n geoPoint, gpioInput, speedKPH, headingDeg, altitudeM, odomKM);\n }\n \n /* save device changes */\n try {\n // TODO: check \"this.device\" vs \"this.dataXPort\" \n device.updateChangedEventFields();\n } catch (DBException dbe) {\n Print.logException(\"Unable to update Device: \" + accountID + \"/\" + deviceID, dbe);\n } finally {\n //\n }\n Print.logInfo(\"ACK: \" + frame_data_ACK);\n\t\treturn frame_data_ACK.getBytes();// //return required acknowledgement (ACK) back to the device\n\n }", "public static void main(String[] args) {\n RegexParser regexParser = new RegexParser(new File(args[0]));\n regexParser.parseCharClasses();\n regexParser.parseTokens();\n regexParser.buildDFATable();\n // write DFA Table to file\n try {\n BufferedWriter tableWriter = new BufferedWriter(new FileWriter(new File(args[2])));\n for (int i = 0; i < regexParser.dfaTable.tableRows.size(); i++) {\n tableWriter.write(\"State\" + i);\n tableWriter.newLine();\n for (int j = 0; j < 95; j++) {\n //if (regexParser.dfaTable.tableRows.get(i).nextStates[j] != 1) {\n tableWriter.write(\" \" + (char)(j + 32) + \" \" + regexParser.dfaTable.tableRows.get(i).nextStates[j]);\n //}\n }\n tableWriter.newLine();\n }\n tableWriter.newLine();\n tableWriter.write(\"Accept States\");\n tableWriter.newLine();\n for (int j = 0; j < regexParser.dfaTable.tableRows.size(); j++) {\n for (int i = 0; i < regexParser.dfaTable.nfa.acceptStates.size(); i++) {\n if (regexParser.dfaTable.tableRows.get(j).nfaStates.contains(regexParser.dfaTable.nfa.acceptStates.get(i))) {\n tableWriter.write(\" \" + j);\n }\n }\n }\n tableWriter.close();\n }\n catch (Exception e) {\n System.out.println(\"Could not write to table file\");\n System.exit(0);\n }\n TableWalker tw = new TableWalker(regexParser.dfaTable, new File(args[1]), new File(args[3]));\n System.out.println(\"Success! Check your output files!\");\n//Part 2, piece 1: parsing the grammar\n LL1GrammarParser parser = new LL1GrammarParser(new File(args[4]), regexParser.specReader.tokens);\n parser.parseGrammar();\n\n//piece 2/3: first and follow sets \n System.out.println(\"Creating First and Follow Sets: \");\n\n LL1FFSets sets = new LL1FFSets(parser.rules);\n\n System.out.println(\"Working on the Parsing Table\");\n//piece 4/5: LL(1) parsing table and running it. Success/reject message here.\n LL1ParsingTable table = new LL1ParsingTable(sets, regexParser.specReader.tokens,tw.parsedTokens, parser.rules);\n System.out.println(table.run());\n\n\n }", "public ArrayList<Token> walkTable(char c) {\n \t\treturnList = null;\n \t\tif(currentState.isFinal){\n \t\t\t\tlastKnownValidToken = new StringBuffer(currentToken);\n \t\t}\n \t\tcurrentToken.append(c);\n \t\tcurrentState = dfa.get(new StateCharacter(currentState,c));\n \t\t\n \t\tif(currentState == null){\n \t\t\tint numCharactersUndealtWith = currentToken.length() - lastKnownValidToken.length();\n \t\t\tStringBuffer newCurrentToken = new StringBuffer();\n \t\t\tfor(int i=0;i<numCharactersUndealtWith;i++){\n \t\t\t\tnewCurrentToken.append(currentToken.length()-numCharactersUndealtWith+i);\n \t\t\t}\n \t\t\treturnList.add(new Token(null,lastKnownValidToken));//How do we know what type the token is?\n \t\t\treEvaluate(newCurrentToken);\n \t\t\treturn returnList;\n \t\t}\n \t\telse{\n \t\t\treturn null;\n\t\t}\n \t}", "private void m4678c(char c, List<C0906d> list, StringBuilder sb) {\n if (c == '$') {\n sb.append(':');\n m4676a(list, sb);\n sb.setLength(0);\n this.f4495c = EnumC0909a.START_STATE;\n } else if (c == '-') {\n list.add(C0906d.f4490d);\n this.f4495c = EnumC0909a.LITERAL_STATE;\n } else if (c != '{') {\n sb.append(':');\n sb.append(c);\n this.f4495c = EnumC0909a.LITERAL_STATE;\n } else {\n sb.append(':');\n m4676a(list, sb);\n sb.setLength(0);\n list.add(C0906d.f4488b);\n this.f4495c = EnumC0909a.LITERAL_STATE;\n }\n }", "@Test(timeout = 4000)\n public void test148() throws Throwable {\n StringReader stringReader0 = new StringReader(\")0\\\":rw.f=QJ{Y+>$7\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(\")\", token0.toString());\n }", "private String parseNumber () {\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n \r\n fBuffer.delete(0, fBuffer.length());//empty string buffer\r\n \r\n char chr=next();//get next character\r\n assert \"-0123456789\".indexOf(chr)>=0;//assert valid start character\r\n while (\"0123456789.Ee+-\".indexOf(chr)>=0) {//until non number character\r\n fBuffer.append(chr);//append to string buffer\r\n chr=next();//get next character\r\n if (chr==NONE) throw new RuntimeException(\"Invalid syntax : \"+context());//gee, thanks...\r\n }//until non number character\r\n \r\n if (\"]},\".indexOf(chr)<0) throw new RuntimeException(\"Invalid syntax : \"+context());//no way jose\r\n\r\n back(); //rewind to the terminator character\r\n \r\n return fBuffer.toString();//return string in buffer\r\n \r\n }", "public static void decode () {\n // read the input\n int firstThing = BinaryStdIn.readInt();\n s = BinaryStdIn.readString();\n char[] t = s.toCharArray();\n char[] firstColumn = new char[t.length];\n int [] next = new int[t.length];\n \n // copy array and sort\n for (int i = 0; i < t.length; i++) {\n firstColumn[i] = t[i];\n }\n Arrays.sort(firstColumn);\n \n // decode\n int N = t.length;\n int [] count = new int[256];\n \n // counts frequency of each letter\n for (int i = 0; i < N; i++) {\n count[t[i]]++;\n }\n \n int m = 0, j = 0;\n \n // fills the next[] array with appropriate values\n while (m < N) {\n int _count = count[firstColumn[m]];\n while (_count > 0) {\n if (t[j] == firstColumn[m]) {\n next[m++] = j;\n _count--;\n }\n j++;\n }\n j = 0;\n }\n \n // decode the String\n int _next = next.length;\n int _i = firstThing;\n for (int i = 0; i < _next; i++) {\n _i = next[_i];\n System.out.print(t[_i]);\n } \n System.out.println();\n }", "@Test public void testParseManyDigits5() {\n String pows10 =\n \"1399008600149269883\\n\"+\n \"1399008600149269880\\n\"+\n \"\";\n double[][] pows10_exp = new double[][] {\n ard(1399008600149269883L),\n ard(1399008600149269880L),\n };\n Key k = FVecFactory.makeByteVec(pows10);\n Key r1 = Key.make(\"r1\");\n ParseDataset.parse(r1, k);\n testParsed(r1,pows10_exp);\n }", "public List<C0906d> mo10186a() {\n LinkedList linkedList = new LinkedList();\n StringBuilder sb = new StringBuilder();\n while (true) {\n int i = this.f4496d;\n if (i < this.f4494b) {\n char charAt = this.f4493a.charAt(i);\n this.f4496d++;\n switch (this.f4495c) {\n case LITERAL_STATE:\n m4675a(charAt, linkedList, sb);\n break;\n case START_STATE:\n m4677b(charAt, linkedList, sb);\n break;\n case DEFAULT_VAL_STATE:\n m4678c(charAt, linkedList, sb);\n break;\n }\n } else {\n switch (this.f4495c) {\n case LITERAL_STATE:\n m4676a(linkedList, sb);\n break;\n case START_STATE:\n sb.append('$');\n m4676a(linkedList, sb);\n break;\n case DEFAULT_VAL_STATE:\n sb.append(':');\n m4676a(linkedList, sb);\n break;\n }\n return linkedList;\n }\n }\n }", "private boolean parseLine()\r\n\t{\r\n\t\tString delim = \"\\t\";\r\n\t\tm_tokenizer = new StringTokenizer(m_line, delim, true);\r\n\t\tString token;\r\n\t\t\r\n\t\tint tokCount = m_tokenizer.countTokens();\r\n\t\tif ((fieldIndexArray.length <= tokCount) &&\t(tokCount <= fieldIndexArray.length*2))\r\n\t\t{\r\n\t\t\tint lastDelim = -2; /** case when line has consecutive (>=2) tabs!*/\r\n\t\t\tint columnIndex = 0;\r\n\t\t\t/** Tokenise the chip data file's line to separate the data to be put in various columns*/\r\n\t\t\tfor (int i=0; i< tokCount; i++) \r\n\t\t\t{\r\n\t\t\t\ttoken = m_tokenizer.nextToken();\r\n\t\t\t\tif (token.equalsIgnoreCase(delim)) \r\n\t\t\t\t{\r\n\t\t\t\t\tif (lastDelim + 1 == i) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t/** 2 consecutive tags - empty string value*/\r\n\t\t\t\t\t\tif(columnIndex<fieldIndexArray.length)\r\n\t\t\t\t\t\t\tbaseRecord.fields[fieldIndexArray[columnIndex++]].append(\"\");\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlastDelim = i;\r\n\t\t\t\t} \r\n\t\t\t\telse \r\n\t\t\t\t{\r\n\t\t\t\t\t/** Each time when new token rrpresenting column data is encountered then columnIndex is \r\n\t\t\t\t\t * incremented and tokens are stored till the token number is less than total number\r\n\t\t\t\t\t * of tokens on one line according to fieldIndexArray */\r\n\t\t\t\t\tif(columnIndex < fieldIndexArray.length)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t/** If total description length exceeds the precision of that field in the table then \r\n\t\t\t\t\t\t * it will be truncated to load it in the description field*/\r\n\t\t\t\t\t\tif(columnIndex == (fieldIndexArray.length-1))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (token.length() > max)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tStringBuffer tokenbuffer = new StringBuffer(token);\r\n\t\t\t\t\t\t\t\ttokenbuffer.setLength(max);\r\n\t\t\t\t\t\t\t\tif(tokenbuffer.charAt(max-1) != '\"')\r\n\t\t\t\t\t\t\t\t\ttokenbuffer.append('\"');\r\n\t\t\t\t\t\t\t\ttoken=tokenbuffer.toString();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/** Here fieldIndexArray will give the actual location of particular token\r\n\t\t\t\t\t\t * in the chipinformation table. This mapping is already done in fieldIndexArray */\r\n\t\t\t\t\t\tbaseRecord.fields[fieldIndexArray[columnIndex++]].append(token);\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\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} \r\n\t\telse\r\n\t\t{\r\n\t\t\tLogger.log(\"Invalid record: \"+ tokCount + \" fields. \",\r\n\t\t\t\t\tLogger.WARNING);\r\n\t\t\tLogger.log(\"Expected tokens = \"+ fieldIndexArray.length,\r\n\t\t\t\t\tLogger.WARNING);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test164() throws Throwable {\n StringReader stringReader0 = new StringReader(\"4+i\\\"{\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 47, 47, 21);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(47, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test062() throws Throwable {\n StringReader stringReader0 = new StringReader(\"b|}T=mM,PuM8AP|}\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 10, 0, 0);\n char char0 = javaCharStream0.BeginToken();\n assertEquals('b', char0);\n \n int int0 = javaCharStream0.getEndLine();\n assertEquals(10, javaCharStream0.getBeginLine());\n assertEquals(10, int0);\n assertEquals(0, javaCharStream0.getColumn());\n }", "Boolean parse() {\n // if errors during initial scanning\n // of program, immediately exit.\n if(scanner.hasErrors()) {\n System.out.println(ERRORMESSAGE);\n return false;\n }\n\n Stack<Integer> rStack = new Stack<Integer>(); // keeps track of production rules\n Stack<String> pStack = new Stack<String>(); // parsing stack\n STstack = new Stack<TNode>(); // syntax tree stack\n\n // pushing first production rule onto stack\n pStack.push(\"0\");\n Token token = scanner.next();\n String token_type = tokenToGrammar(token);\n boolean newToken = false;\n\n int row = 0;\n int col = 0;\n\n // push all tokens of program onto\n // parsing stack before parsing\n while(scanner.ongoing() >= 0) {\n // examine top of stack\n String top = pStack.peek();\n// System.out.println(\"top of stack \" + top);\n // retrieve next valid token of program\n if(newToken && scanner.ongoing() > 0) {\n token = scanner.next();\n token_type = tokenToGrammar(token);\n col = parseTableHeader.get(token_type);\n }\n// System.out.print(\"lookahead \" + token +\", \");\n\n try {\n // is the top of the stack a row number?\n row = Integer.parseInt(top);\n // get value of cell in parse table\n String cell = parseTable.get(row).get(col);\n// System.out.println(\"cell value \" + cell);\n String[] cellParts = cell.split(\"\");\n\n // if cell value is 'b', this is\n // an error and program is not\n // syntactically correct\n if(cellParts[0].equals(\"b\")) {\n System.out.println(ERRORMESSAGE);\n return false;\n }\n\n // if the cell entry is a shift\n else if(cellParts[0].equals(\"s\")) {\n\n // push the lookahead on stack\n pStack.push(token_type);\n // push the lookahead's token on STstack\n if(!token.getChVals().equals(\";\") || !token.getChVals().equals(\"$\")) {\n STstack.push(new TNode(\"general\", token));\n }\n\n // set the shift value as current row\n row = Integer.parseInt(\n String.join(\"\", Arrays.copyOfRange(cellParts, 1, cellParts.length))\n );\n// System.out.println(\"new row \" + row);\n\n // push row value to pStack\n pStack.push(Integer.toString(row));\n\n // set newToken param\n newToken = true;\n }\n\n // if cell entry is a reduce\n else if(cellParts[0].equals(\"r\")) {\n // first pop off the current row number\n pStack.pop();\n\n // get the production rule's index from the cell\n int prodIdx = Integer.parseInt(\n String.join(\"\", Arrays.copyOfRange(cellParts, 1, cellParts.length))\n );\n// System.out.println(\"production number \" + prodIdx);\n\n // get the production rule we are reducing by\n ArrayList<String> production = grammar.get(prodIdx);\n // which syntax tree node do we need?\n SNType nodeType;\n if(prodIdx == 2) {\n nodeType = STstack.peek().getType();\n } else {\n nodeType = idNodeType(prodIdx);\n }\n // also need a temporary stack to hold\n // popped tokens from STstack to make\n // a new node\n Stack<TNode> tempNodeHolder = new Stack<TNode>();\n\n // put all elements of the right side of\n // production rule onto a new stack so\n // we can keep track of them while\n // popping off the actual parsing stack\n Stack<String> rules = new Stack<String>();\n for(int i = 1; i < production.size(); i++) {\n rules.push(production.get(i));\n }\n\n // now pop off right side of\n // production from parsing stack\n while(!rules.empty()){\n String t = pStack.pop();\n if(t.equals(rules.peek())) {\n rules.pop();\n // also pop from STstack for syntax tree\n // and add to temporary stack\n if(!t.equals(\";\") || !token.getChVals().equals(\"$\")) {\n TNode tempNode = STstack.pop();\n tempNodeHolder.push(tempNode);\n }\n }\n }\n\n // synthesize new syntax tree node\n // and add back to STstack\n TNode newNode = makeNode(nodeType, tempNodeHolder);\n STstack.push(newNode);\n\n // push production number to rStack\n rStack.push(prodIdx);\n\n// if(prodIdx == 1) {\n// break;\n// }\n\n // check what current top of pStack is\n // to check for next row\n row = Integer.parseInt(pStack.peek());\n\n // push left side of production\n // onto stack\n pStack.push(production.get(0));\n\n // identify column of the left side of production\n col = parseTableHeader.get(pStack.peek());\n\n // set new row number\n row = Integer.parseInt(parseTable.get(row).get(col));\n// System.out.print(\"new row \" + row + \", \");\n\n // set new col number\n col = parseTableHeader.get(token_type);\n// System.out.println(\"new col \" + col);\n\n // push row value to pStack\n pStack.push(Integer.toString(row));\n\n // set newToken param\n newToken = false;\n\n }\n\n // we are done, so accept!\n else if(cellParts[0].equals(\"a\")) {\n break;\n }\n\n } catch (NumberFormatException e) {\n\n }\n\n }\n\n System.out.println(PASSMESSAGE);\n\n // Prints out the production rules used to derive program.\n// while(!rStack.isEmpty()) {\n// int idx = rStack.pop();\n// ArrayList<String> production = grammar.get(idx);\n// System.out.print(production.get(0) + \" -> \");\n// for(int i = 1; i < production.size(); i++) {\n// System.out.print(production.get(i) + \" \");\n// }\n// System.out.println();\n// }\n\n return true;\n\n\n }", "public void processLine(String line){\n\t\tString[] splitted = line.split(\"(\\\\s+|\\\\t+)\");\n\t\tif(splitted.length < FIELDS){\n\t\t\tSystem.err.println(\"DataRow: Cannot process line : \" + line);\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tindex \t\t= Integer.parseInt(splitted[0]);\n\t\tparentIndex = Integer.parseInt(splitted[1]);\n\t\tword \t\t= splitted[2].trim();\n\t\tpos\t\t\t= splitted[3].trim();\n\t\tpredicateLabel = splitted[4].trim();\n\t\tintervenes = splitted[5];\n\t\t\n\t\tidentificationLabel = splitted[6];\n\t\tclassificationLabel = splitted[7];\n\t\t\n\t\thmmState = Integer.parseInt(splitted[8]);\n\t\tnaiveState = Integer.parseInt(splitted[9]);\n\t\tchunk = splitted[10];\n\t\tne = splitted[11];\n\t\tif(splitted.length > FIELDS){\n\t\t\tSystem.err.println(\"WARNING: data row has more than required columns: \" + line);\n\t\t}\n\t}", "public void parse(){\r\n\t\t//StringTokenizer st = new StringTokenizer(nmeaSentence,\",\");\r\n\t\tst = new StringTokenizer(nmeaSentence,\",\");\r\n\t\tString sv = \"\";\r\n\r\n\t\ttry{\r\n\t\t\tnmeaHeader = st.nextToken();//Global Positioning System Fix Data\r\n\t\t\tmode = st.nextToken();\r\n\t\t\tmodeValue = Integer.parseInt(st.nextToken());\r\n\r\n\t\t\tfor(int i=0;i<=11;i++){\r\n\t\t\t\tsv = st.nextToken();\r\n\t\t\t\tif(sv.length() > 0){\r\n\t\t\t\t\tSV[i] = Integer.parseInt(sv);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSV[i] = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tPDOP = Float.parseFloat(st.nextToken());\r\n\t\t\tHDOP = Float.parseFloat(st.nextToken());\r\n\t\t\tVDOP = Float.parseFloat(st.nextToken());\r\n\r\n\t\t}catch(NoSuchElementException e){\r\n\t\t\t//Empty\r\n\t\t}catch(NumberFormatException e2){\r\n\t\t\t//Empty\r\n\t\t}\r\n\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 public void testParseManyDigits4() {\n String pows10 =\n \"3\\n\"+\n \"1e-18\\n\"+\n \"1e-34\\n\"+\n \"\";\n double[][] pows10_exp = new double[][] {\n ard(3),\n ard(1e-18),\n ard(1e-34),\n };\n Key k = FVecFactory.makeByteVec(pows10);\n Key r1 = Key.make(\"r1\");\n ParseDataset.parse(r1, k);\n testParsed(r1,pows10_exp);\n }", "private static Object[][] validFunctionInvocationNodeData() {\n // Subset of FEELFunctionsTest.data\n return new Object[][]{\n // constants\n {\"string(1.1)\", \"1.1\"},\n {\"replace( \\\" foo bar zed \\\", \\\"^(\\\\s)+|(\\\\s)+$|\\\\s+(?=\\\\s)\\\", \\\"\\\" )\", \"foo bar zed\"},\n {\"string(null)\", null},\n {\"string(date(\\\"2016-08-14\\\"))\", \"2016-08-14\"},\n {\"string(\\\"Happy %.0fth birthday, Mr %s!\\\", 38, \\\"Doe\\\")\", \"Happy 38th birthday, Mr Doe!\"},\n {\"number(null, \\\",\\\", \\\".\\\")\", null},\n {\"number(\\\"1,000.05\\\", \\\",\\\", \\\".\\\")\", new BigDecimal(\"1000.05\")},\n {\"number(\\\"1.000,05\\\", \\\".\\\", \\\",\\\")\", new BigDecimal(\"1000.05\")},\n {\"number(\\\"1000,05\\\", null, \\\",\\\")\", new BigDecimal(\"1000.05\")},\n {\"number(\\\"1,000.05e+12\\\", \\\",\\\", \\\".\\\")\", new BigDecimal(\"1000.05e+12\")},\n {\"number(\\\"1.000,05e+12\\\", \\\".\\\", \\\",\\\")\", new BigDecimal(\"1000.05e+12\")},\n {\"number(\\\"1000,05e+12\\\", null, \\\",\\\")\", new BigDecimal(\"1000.05e+12\")},\n {\"substring(\\\"foobar\\\", 3)\", \"obar\"},\n {\"substring(\\\"foobar\\\", 3, 3)\", \"oba\"},\n {\"substring(\\\"foobar\\\", -2, 1)\", \"a\"},\n {\"substring(\\\"foobar\\\", -2, 5)\", \"ar\"},\n {\"substring(\\\"foobar\\\", 15, 5)\", null},\n {\"string length(\\\"foobar\\\")\", BigDecimal.valueOf(6)},\n {\"string length(null)\", null},\n {\"upper case(\\\"aBc4\\\")\", \"ABC4\"},\n {\"upper case(null)\", null},\n {\"lower case(\\\"aBc4\\\")\", \"abc4\"},\n {\"lower case(null)\", null},\n {\"substring before( \\\"foobar\\\", \\\"bar\\\")\", \"foo\"},\n {\"substring before( \\\"foobar\\\", \\\"xyz\\\")\", \"\"},\n {\"substring before( \\\"foobar\\\", \\\"foo\\\")\", \"\"},\n {\"substring after( \\\"foobar\\\", \\\"foo\\\")\", \"bar\"},\n {\"substring after( \\\"foobar\\\", \\\"xyz\\\")\", \"\"},\n {\"substring after( \\\"foobar\\\", \\\"bar\\\")\", \"\"},\n {\"replace(\\\"banana\\\",\\\"a\\\",\\\"o\\\")\", \"bonono\"},\n {\"replace(\\\"banana\\\",\\\"(an)+\\\", \\\"**\\\")\", \"b**a\"},\n {\"replace(\\\"banana\\\",\\\"[aeiouy]\\\",\\\"[$0]\\\")\", \"b[a]n[a]n[a]\"},\n {\"replace(\\\"0123456789\\\",\\\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\\\",\\\"($1) $2-$3\\\")\", \"(012) 345-6789\"},\n {\"count([1, 2, 3])\", BigDecimal.valueOf(3)},\n {\"count( 1, 2, 3 )\", BigDecimal.valueOf(3)},\n {\"min( \\\"a\\\", \\\"b\\\", \\\"c\\\" )\", \"a\"},\n {\"min([ \\\"a\\\", \\\"b\\\", \\\"c\\\" ])\", \"a\"},\n {\"max( 1, 2, 3 )\", BigDecimal.valueOf(3)},\n {\"max([ 1, 2, 3 ])\", BigDecimal.valueOf(3)},\n {\"max(duration(\\\"PT1H6M\\\"), duration(\\\"PT1H5M\\\"))\", Duration.parse(\"PT1H6M\")},\n {\"max(duration(\\\"P6Y\\\"), duration(\\\"P5Y\\\"))\", ComparablePeriod.parse(\"P6Y\")},\n {\"sum( 1, 2, 3 )\", BigDecimal.valueOf(6)},\n {\"sum([ 1, 2, 3 ])\", BigDecimal.valueOf(6)},\n {\"sum([])\", null},\n {\"product( 2, 3, 4 )\", BigDecimal.valueOf(24)},\n {\"product([ 2, 3, 4 ])\", BigDecimal.valueOf(24)},\n {\"product([])\", null},\n {\"mean( 1, 2, 3 )\", BigDecimal.valueOf(2)},\n {\"mean([ 1, 2, 3 ])\", BigDecimal.valueOf(2)},\n {\"decimal( 1/3, 2 )\", new BigDecimal(\"0.33\")},\n {\"decimal( 1.5, 0 )\", new BigDecimal(\"2\")},\n {\"decimal( 2.5, 0 )\", new BigDecimal(\"2\")},\n {\"decimal( null, 0 )\", null},\n {\"floor( 1.5 )\", new BigDecimal(\"1\")},\n {\"floor( -1.5 )\", new BigDecimal(\"-2\")},\n {\"floor( null )\", null},\n {\"ceiling( 1.5 )\", new BigDecimal(\"2\")},\n {\"ceiling( -1.5 )\", new BigDecimal(\"-1\")},\n {\"ceiling( null )\", null},\n {\"ceiling( n : 1.5 )\", new BigDecimal(\"2\")},\n {\"abs( 10 )\", new BigDecimal(\"10\")},\n {\"abs( -10 )\", new BigDecimal(\"10\")},\n {\"abs( n: -10 )\", new BigDecimal(\"10\")},\n {\"abs(@\\\"PT5H\\\")\", Duration.parse(\"PT5H\")},\n {\"abs(@\\\"-PT5H\\\")\", Duration.parse(\"PT5H\")},\n {\"abs(n: @\\\"-PT5H\\\")\", Duration.parse(\"PT5H\")},\n {\"abs(duration(\\\"P1Y\\\"))\", ComparablePeriod.parse(\"P1Y\")},\n {\"abs(duration(\\\"-P1Y\\\"))\", ComparablePeriod.parse(\"P1Y\")},\n\n {\"day of year( date(2019, 9, 17) )\", BigDecimal.valueOf(260)},\n {\"day of week( date(2019, 9, 17) )\", \"Tuesday\"},\n {\"month of year( date(2019, 9, 17) )\", \"September\"},\n {\"week of year( date(2019, 9, 17) )\", BigDecimal.valueOf(38)},\n {\"week of year( date(2003, 12, 29) )\", BigDecimal.valueOf(1)}, // ISO defs.\n {\"week of year( date(2004, 1, 4) )\", BigDecimal.valueOf(1)},\n {\"week of year( date(2005, 1, 3) )\", BigDecimal.valueOf(1)},\n {\"week of year( date(2005, 1, 9) )\", BigDecimal.valueOf(1)},\n {\"week of year( date(2005, 1, 1) )\", BigDecimal.valueOf(53)},\n {\"median( 8, 2, 5, 3, 4 )\", new BigDecimal(\"4\")},\n {\"median( [6, 1, 2, 3] )\", new BigDecimal(\"2.5\")},\n {\"median( [ ] ) \", null}, // DMN spec, Table 69: Semantics of list functions\n };\n }", "private static void handleParser(char c) {\n if(c == '\\n'){\r\n return;\r\n }\r\n switch (state){\r\n case OUT_OF_TAG:{\r\n if(c == '<'){\r\n if(SAXParsedData.innerText.trim().length() != 0) {\r\n parserHandler.innerText(SAXParsedData.innerText);\r\n }\r\n SAXParsedData.innerText = \"\";\r\n SAXParsedData.tagName = \"\";\r\n state = SAXParserState.BEGIN_START_OR_END_TAG;\r\n } else if (c == '>') {\r\n state = SAXParserState.SYNTAX_ERROR;\r\n } else {\r\n SAXParsedData.innerText += c;\r\n }\r\n break;\r\n }\r\n case BEGIN_START_OR_END_TAG:{\r\n if(c == '/') {\r\n SAXParsedData.tagName = \"\";\r\n state = SAXParserState.IN_END_TAG;\r\n }else if(c == '?' || c == '!'){\r\n state = SAXParserState.METADATA;\r\n }else{\r\n SAXParsedData.tagName += c;\r\n state = SAXParserState.IN_START_TAG;\r\n }\r\n break;\r\n }\r\n case IN_START_TAG:{\r\n if(c == ' '){\r\n state = SAXParserState.SPACE_IN_START_TAG;\r\n }else if(c == '>'){\r\n // callback startElement event;\r\n parserHandler.startElement(SAXParsedData.tagName, SAXParsedData.attributes);\r\n SAXParsedData.clear();\r\n state = SAXParserState.CLOSE_START_TAG;\r\n }else {\r\n SAXParsedData.tagName += c;\r\n }\r\n break;\r\n }\r\n case SPACE_IN_START_TAG:{\r\n if(SAXParsedData.tagName.length() > 0){\r\n if(c != ' '){\r\n SAXParsedData.attribKey += c;\r\n state = SAXParserState.IN_ATTRIB_KEY;\r\n }\r\n }\r\n break;\r\n }\r\n case IN_ATTRIB_KEY:{\r\n if(c == '='){\r\n state = SAXParserState.IN_ATTRIB_EQUAL;\r\n }else{\r\n SAXParsedData.attribKey += c;\r\n }\r\n break;\r\n }\r\n case IN_ATTRIB_EQUAL:{\r\n if(c == '\"'){\r\n state = SAXParserState.IN_ATTRIB_VALUE;\r\n }\r\n break;\r\n }\r\n case IN_ATTRIB_VALUE:{\r\n if(c == '\"'){\r\n SAXParsedData.newAttribute();\r\n state = SAXParserState.IN_START_TAG;\r\n }else{\r\n SAXParsedData.attribValue += c;\r\n }\r\n break;\r\n }\r\n case CLOSE_START_TAG:{\r\n if(c == '<') {\r\n state = SAXParserState.BEGIN_START_OR_END_TAG;\r\n }else{\r\n SAXParsedData.innerText += c;\r\n state = SAXParserState.OUT_OF_TAG;\r\n }\r\n break;\r\n }\r\n case IN_END_TAG:{\r\n if(c == '>'){\r\n // callback endElement event\r\n parserHandler.endElement(SAXParsedData.tagName);\r\n state = SAXParserState.CLOSE_END_TAG;\r\n }else{\r\n SAXParsedData.tagName += c;\r\n }\r\n break;\r\n }\r\n case CLOSE_END_TAG:{\r\n if(c == ' '){\r\n state = SAXParserState.OUT_OF_TAG;\r\n }else if(c == '<'){\r\n SAXParsedData.tagName = \"\";\r\n state = SAXParserState.BEGIN_START_OR_END_TAG;\r\n }\r\n break;\r\n }\r\n case METADATA:{\r\n if(c == '>'){\r\n state = SAXParserState.CLOSE_END_TAG;\r\n }\r\n break;\r\n }\r\n case SYNTAX_ERROR:{\r\n try {\r\n\t\t\t\t\tthrow new Exception();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n }\r\n }\r\n\r\n }", "public void tokenizeAndParse(){\n StringTokenizer st1 = new StringTokenizer(Strinput, \" \");\n while (st1.hasMoreTokens()){\n String temp = st1.nextToken();\n if(!temp.equals(\"Rs\")&&!temp.equals(\"Ri\")){\n melody.add(Integer.decode(temp.substring(0,2)));\n }\n\n }\n\n }", "public static void parse()\r\n {\r\n int initial;\r\n initial=expression();\r\n stateList.get(0).setNext1(initial);\r\n stateList.get(0).setNext2(initial);\r\n if(index<=expression.length()-1)\r\n {\r\n error();\r\n }\r\n else\r\n {\r\n state st=new state(state,\"END\",-1,-1);\r\n stateList.add(st);\r\n }\r\n }", "@Test\n public void testUnknownStates() throws ScannerException, ParserException {\n final String UNKNOWN_STATES_STATEMENT = \"00:20 L: Apc->BounceOff => H(Apc)\";\n // final String UNKNOWN_STATES_STATEMENT = \"13:30 T: Aw->Long => A(T) \\t#!Ap(HD)\";\n\n Statement parsedStatement = parseStatement(UNKNOWN_STATES_STATEMENT);\n\n assertEquals(new MatchTime(0, 20), parsedStatement.getTime());\n assertEquals(\"L\", parsedStatement.getTeam());\n assertEquals(Coordinates.getEntity(\"Apc\"), parsedStatement.getStateIn().getSpace());\n assertEquals(\"BounceOff\", parsedStatement.getAction().toString());\n assertEquals(StateContext.getEntity(\"H\"), parsedStatement.getStateOut().getContext());\n assertEquals(Coordinates.getEntity(\"Apc\"), parsedStatement.getStateOut().getSpace());\n }", "private static Flags parse(char c) {\n\t\t\tswitch (c) {\n\t\t\t\tcase '-':\n\t\t\t\t\treturn LEFT_JUSTIFY;\n\t\t\t\tcase '#':\n\t\t\t\t\treturn ALTERNATE;\n\t\t\t\tcase '+':\n\t\t\t\t\treturn PLUS;\n\t\t\t\tcase ' ':\n\t\t\t\t\treturn LEADING_SPACE;\n\t\t\t\tcase '0':\n\t\t\t\t\treturn ZERO_PAD;\n\t\t\t\tcase ',':\n\t\t\t\t\treturn GROUP;\n\t\t\t\tcase '(':\n\t\t\t\t\treturn PARENTHESES;\n\t\t\t\tcase '<':\n\t\t\t\t\treturn PREVIOUS;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new UnknownFormatFlagsException(String.valueOf(c));\n\t\t\t}\n\t\t}", "private AutomatonFromTable automatonFromTable() {\n \tAutomatonFromTable hypothesis = new AutomatonFromTable(inputs);\n\t\t/*\n\t\t * Number of new states in the hypothesis is the \n\t\t * number of distinct rows in the upper half of the observation table\n\t\t */\n\t\tint noOfNewStates = -1;\n\t\tList<List<String>> distinctStates = new ArrayList<>();\n\t\tIterator<Entry<String, List<String>>> it = observationTableUpper.entrySet().iterator();\n\t\twhile(it.hasNext()){\n\t\t\tMap.Entry<String, List<String>> entry = (Map.Entry<String, List<String>>)it.next();\n\t\t\tdistinctStates.add(entry.getValue());\n\t\t}\n\t\tnoOfNewStates = new HashSet<>(distinctStates).size();\n\t\t//Adding those many number of states\n\t\tfor(int i=0;i<noOfNewStates;i++){\n\t\t\tif(i==0){\n\t\t\t\thypothesis.addInitialState();\n\t\t\t}else{\n\t\t\t\thypothesis.addState();\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"No.of new states \"+noOfNewStates);\n\t\t\n\t\t\n\t\tList<Transition> prefixStateMap = new ArrayList<>();\n\t\t\n\t\t//Adding the transitions for those states\n\t\tit = observationTableUpper.entrySet().iterator();\n\t\tSystem.out.println(\"Upper table size \"+observationTableUpper);\n\t\tint currentMaxState = 0;\n\t\twhile(it.hasNext()){\n\t\t\tMap.Entry<String, List<String>> entry = (Map.Entry<String, List<String>>)it.next();\n\t\t\tString prefix = entry.getKey();\n\t\t\tList<String> results = entry.getValue();\n\t\t\tint currentState = getCurrentState(prefix, prefixStateMap);\n\t\t\tSystem.out.println(\"Current State \"+currentState);\n\t\t\tint nextState;\n\t\t\tif(prefix.contains(\"<>\")){\n\t\t\t\tfor(int i=0;i<results.size();i=i+2){\n\t\t\t\t\tTransition transitionDetails = new Transition();\n\t\t\t\t\ttransitionDetails.setPrefix(prefix);\n\t\t\t\t\ttransitionDetails.setInput(results.get(i));\n\t\t\t\t\ttransitionDetails.setOutput(results.get(i+1));\n\t\t\t\t\ttransitionDetails.setCurrentState(currentState);\n\t\t\t\t\tnextState = ++currentMaxState;\n\t\t\t\t\ttransitionDetails.setNextState(nextState);\n\t\t\t\t\tprefixStateMap.add(transitionDetails);\n\t\t\t\t}\n\t\t\t}else if((nextState = checkErrorState(prefix, prefixStateMap))!=-1){\n\t\t\t\tfor(int i=0;i<results.size();i=i+2){\n\t\t\t\t\tTransition transitionDetails = new Transition();\n\t\t\t\t\ttransitionDetails.setPrefix(prefix);\n\t\t\t\t\ttransitionDetails.setInput(results.get(i));\n\t\t\t\t\ttransitionDetails.setOutput(results.get(i+1));\n\t\t\t\t\ttransitionDetails.setCurrentState(currentState);\n\t\t\t\t\ttransitionDetails.setNextState(nextState);\n\t\t\t\t\tprefixStateMap.add(transitionDetails);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tfor(int i=0;i<results.size();i=i+2){\n\t\t\t\t\tif(!results.get(i+1).equals(\"-\")){\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * Check for two start calls and make sure they end up on the same state.\n\t\t\t\t\t\t * This is Media Player specific and might need to be changed \n\t\t\t\t\t\t * add for conditional checks for other examples. \n\t\t\t\t\t\t * For Android Media Player, calling start after the first call to start\n\t\t\t\t\t\t * doesn't lead to a transition to a new state. So that needs to be specifically handled.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tboolean exceptionCase = false;\n\t\t\t\t\t\tif(prefix.contains(\"$\")){\n\t\t\t\t\t\t\tint lastIndex = prefix.lastIndexOf(\"$\");\n\t\t\t\t\t\t\tString lastCall = prefix.substring(lastIndex+1, prefix.length()-1);\n\t\t\t\t\t\t\tif(lastCall.contains(\"start()\") && results.get(i).contains(\"start()\")){\n\t\t\t\t\t\t\t\tTransition transitionDetails = new Transition();\n\t\t\t\t\t\t\t\ttransitionDetails.setPrefix(prefix);\n\t\t\t\t\t\t\t\ttransitionDetails.setInput(results.get(i));\n\t\t\t\t\t\t\t\ttransitionDetails.setOutput(results.get(i+1));\n\t\t\t\t\t\t\t\ttransitionDetails.setCurrentState(currentState);\n\t\t\t\t\t\t\t\tint result = checkErrorState(\"<\"+results.get(i)+\",\"+results.get(i+1)+\">\", prefixStateMap);\n\t\t\t\t\t\t\t\tif(result!=-1){\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Error state is: \"+result);\n\t\t\t\t\t\t\t\t\tnextState = result;\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tnextState = currentState;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\ttransitionDetails.setNextState(nextState);\n\t\t\t\t\t\t\t\tprefixStateMap.add(transitionDetails);\n\t\t\t\t\t\t\t\texceptionCase = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}if(!exceptionCase){\n\t\t\t\t\t\t\tTransition transitionDetails = new Transition();\n\t\t\t\t\t\t\ttransitionDetails.setPrefix(prefix);\n\t\t\t\t\t\t\ttransitionDetails.setInput(results.get(i));\n\t\t\t\t\t\t\ttransitionDetails.setOutput(results.get(i+1));\n\t\t\t\t\t\t\ttransitionDetails.setCurrentState(currentState);\n\t\t\t\t\t\t\tint result = checkErrorState(\"<\"+results.get(i)+\",\"+results.get(i+1)+\">\", prefixStateMap);\n\t\t\t\t\t\t\tif(result!=-1){\n\t\t\t\t\t\t\t\tSystem.out.println(\"Error state is: \"+result);\n\t\t\t\t\t\t\t\tnextState = result;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tnextState = ++currentMaxState;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttransitionDetails.setNextState(nextState);\n\t\t\t\t\t\t\tprefixStateMap.add(transitionDetails);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tnextState = currentState;\n\t\t\t\t\t\tTransition transitionDetails = new Transition();\n\t\t\t\t\t\ttransitionDetails.setPrefix(prefix);\n\t\t\t\t\t\ttransitionDetails.setInput(results.get(i));\n\t\t\t\t\t\ttransitionDetails.setOutput(results.get(i+1));\n\t\t\t\t\t\ttransitionDetails.setCurrentState(currentState);\n\t\t\t\t\t\ttransitionDetails.setNextState(nextState);\n\t\t\t\t\t\tprefixStateMap.add(transitionDetails);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*\n\t\t * Add all the final transitions to the automaton object\n\t\t */\n\t\tfor(Transition transition: prefixStateMap){\n\t\t\thypothesis.addTransition(transition);\n\t\t}\n\t\t\n\t\t/*\n\t\t * Populate the Tree representation of the Automaton by doing a breadth-first search\n\t\t */\n\t\tint i = 0;\n\t\twhile(i<hypothesis.getNumberStates()){\n\t\t\tList<Transition> successorDetails = new ArrayList<>();\n\t\t\tfor(Transition transition: prefixStateMap){\n\t\t\t\tint startState = transition.getCurrentState();\n\t\t\t\tif(startState==i){\n\t\t\t\t\tsuccessorDetails.add(transition);\n\t\t\t\t\tautomatonTree.put(startState, successorDetails);\n\t\t\t\t}\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\t\n\t\tSystem.out.println(automatonTree);\n\t\treturn hypothesis;\n\t}", "@Test(timeout = 4000)\n public void test079() throws Throwable {\n StringReader stringReader0 = new StringReader(\"f6&^~-)+L]\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.getBeginColumn());\n assertEquals(\"&\", token0.toString());\n }", "@Test(timeout = 4000)\n public void test078() throws Throwable {\n StringReader stringReader0 = new StringReader(\"q,rv8PAfKjbSw`H(r\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[2];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n assertEquals(9, javaCharStream0.bufpos);\n assertEquals(10, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test125() throws Throwable {\n StringReader stringReader0 = new StringReader(\"H Gz\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 3423, 1002, 21);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(1004, javaCharStream0.getBeginColumn());\n assertEquals(1005, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n StringReader stringReader0 = new StringReader(\"c3UZts4z!|a\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 21, 21, 47);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(23, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n StringReader stringReader0 = new StringReader(\"WA.W2e9@MV5G\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(3, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test123() throws Throwable {\n StringReader stringReader0 = new StringReader(\"[KXX]J]NmN+<TJ,w1_\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 2897, 2897);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(2898, javaCharStream0.getBeginColumn());\n assertEquals(74, token0.kind);\n }", "@Test(timeout = 4000)\n public void test044() throws Throwable {\n StringReader stringReader0 = new StringReader(\"}y5+{SPClS&QvLb0Qm\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(3, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test063() throws Throwable {\n StringReader stringReader0 = new StringReader(\")0\\\":rw.f=QJ{Y+>$7\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(3, javaCharStream0.getEndColumn());\n }", "State mo5880e(String str);", "@Test(timeout = 4000)\n public void test135() throws Throwable {\n StringReader stringReader0 = new StringReader(\"pZhZ$;yY23j:\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 121, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(5, javaCharStream0.bufpos);\n assertEquals(6, javaCharStream0.getBeginColumn());\n }", "public abstract int parse(byte bc[], int index);", "public boolean parsing (Parsing t) {\n\t\tint posini = t.pos;\n\t\tboolean has_value, has_symbol;\n\t\tint pos, j;\n\t\tdouble val;\n\t\tif (!initialized) init();\t\t// Be sure everyting in place\n\n\t\tt.gobbleSpaces();\t\t\t// Ignore the leading blanks\n\t\tpos = t.pos;\n\n\t\tif (DEBUG>0) System.out.print(\"....parsing(\" + t + \"):\");\n\n\t\t/* Interpret the Value, if any */\n\t\tval = t.parseFactor();\t\t\t// Default value is 1\n\t\tif (DEBUG>0) System.out.print(\" val=\" + val);\n\t\thas_value = t.pos > pos; \t\t// NaN when nothing interpreted\n\n\t\t/* Skip blanks between value and Unit */\n\t\tt.gobbleSpaces();\n\n\t\t/* It may happen that interpreting the Value first generates an error,\n\t for instance 1/4. That means that the number (1) is part of the\n\t unit, and is not the value in front of the unit.\n\t\t */\n\t\tif (t.lookup(op_symb) >= 0) {\n\t\t\thas_value = false;\n\t\t\tt.pos = pos;\n\t\t\tif (DEBUG>0) System.out.print(\"(FALSE!)\");\n\t\t}\n\n\t\t/* Interpret the Unit */\n\t\tpos = t.pos;\t\t\t\t// To keep the Unit symbol\n\t\toffset = 0.;\n\t\tsymbol = null;\n\t\tif (DEBUG>0) System.out.println(\"\\n Interpret '\" + t + \"'\");\n\t\ttry { \n\t\t\thas_symbol = unitec(t, null); \n\t\t\tsymbol = String.copyValueOf(t.a, pos, t.pos-pos);\n\t\t\tObject o = hUnit.get(symbol);\n\t\t\tif (o instanceof String) symbol = (String)o;\n\t\t\tif (has_value & (mksa&_pic) != 0) {\t// A misinterpretation ? Rescan\n\t\t\t\tint pos_end = t.pos;\n\t\t\t\tt.set(posini); t.gobbleSpaces();\n\t\t\t\ttry { t.parseComplex(symbol); t.set(pos_end); }\n\t\t\t\tcatch(Exception e) { \n\t\t\t\t\tt.set(posini); \n\t\t\t\t\treturn(false); \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e) { \n\t\t\tif (DEBUG>0) {\n\t\t\t\tSystem.out.println(\"++++unitec catched: \" + e);\n\t\t\t\tMessenger.printStackTrace(e);\n\t\t\t\ttry { Thread.sleep(2000); } catch(Exception i) {;}\n\t\t\t}\n\t\t\thas_symbol = false; \n\t\t\tt.pos = pos;\n\t\t}\n\t\tif (DEBUG>0) System.out.println(\"\\n interpret '\" + t \n\t\t\t\t+ \"', has_value=\" + has_value);\n\n\t\t// Default value in log scale is 0 !\n\t\t// if (no_value && ((mksa&_log) != 0)) value = 0;\n\t\t/* Skip the trailing blanks */\n\n\t\t/* The value may follow the unit -- only for dates and \"special\"\n\t\t * quoted unit\n\t\t */\n\t\tif ((!has_value) && (t.pos < t.length)) {\n\t\t\tpos = t.pos;\n\t\t\t// The symbol may be a \"picture\" e.g. \"YYYY/MMM/DD\"\n\t\t\tif ((!has_symbol) && (t.currentChar() == '\"')) {\n\t\t\t\tif ((j = t.matchingQuote()) > 0) {\n\t\t\t\t\tUdef u; int ip1, ip2;\n\t\t\t\t\tString msg;\n\t\t\t\t\tif (DEBUG>0) System.out.println(\n\t\t\t\t\t\t\t\"....parsing: t.matchingQuote()=\" + j);\n\t\t\t\t\tj -= pos; j++;\t\t// Length including quotes\n\t\t\t\t\tsymbol = t.toString(j);\n\t\t\t\t\tt.advance(j);\n\t\t\t\t\tt.gobbleSpaces();\n\t\t\t\t\tpos = t.pos;\n\t\t\t\t\ttry { val = t.parseComplex(symbol); }\n\t\t\t\t\tcatch(ParseException e) {\t// Mismatch: could be mixed up\n\t\t\t\t\t\tmsg = e.getMessage();\n\t\t\t\t\t\tif (msg.indexOf(\"parseComplex((\")>=0) \t// ERROR in pic\n\t\t\t\t\t\t\tSystem.err.println(e);\n\t\t\t\t\t\tt.set(posini);\n\t\t\t\t\t\treturn(false);\n\t\t\t\t\t}\n\t\t\t\t\tif (t.status() != 0) {\t// Something wrong in 'picture'\n\t\t\t\t\t\tmsg = t.error_message;\n\t\t\t\t\t\tif ((ip1 = msg.indexOf(\" interpreted as (\")) >0) {\n\t\t\t\t\t\t\tip1 = msg.indexOf('(', ip1);\n\t\t\t\t\t\t\tip2 = msg.indexOf(')', ip1);\n\t\t\t\t\t\t\tString correct_symbol = msg.substring(ip1+1, ip2);\n\t\t\t\t\t\t\tif (DEBUG>0) System.out.println(\n\t\t\t\t\t\t\t\t\t\"....parsing: adding Hash \"+symbol\n\t\t\t\t\t\t\t\t\t+\" => \"+correct_symbol);\n\t\t\t\t\t\t\t/* Add the new 'picture' as an alias \n\t\t\t\t\t\t\t * to the correctly spelled one.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\thUnit.put(symbol, correct_symbol);\n\t\t\t\t\t\t\tsymbol = correct_symbol;\n\t\t\t\t\t\t\tt.pos = pos;\n\t\t\t\t\t\t\ttry { val = t.parseComplex(symbol); }\n\t\t\t\t\t\t\tcatch (ParseException pe) {\n\t\t\t\t\t\t\t\tSystem.err.println(pe);\n\t\t\t\t\t\t\t\tMessenger.printStackTrace(pe);\n\t\t\t\t\t\t\t\tt.set(posini);\n\t\t\t\t\t\t\t\treturn(false);\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\t\tSystem.err.println(msg);\n\t\t\t\t\t\t\tt.set(posini);\n\t\t\t\t\t\t\treturn(false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\thas_value = true;\n\t\t\t\t\tif (t.isDate()) u = uLookup(\"MJD\");\n\t\t\t\t\telse if (t.isDays()) u = uLookup(\"d\");\n\t\t\t\t\telse if (t.isTime()) u = uLookup(\"\\\"h:m:s\\\"\");\n\t\t\t\t\telse u = uLookup(\"\\\"d:m:s\\\"\");\n\t\t\t\t\t// The quoted symbol is added, to speed up its retrieval\n\t\t\t\t\t// in the next search.\n\t\t\t\t\ttry {\n\t\t\t\t\t\taddSymbol(symbol, u.symb, Parsing.explainComplex(symbol));\n\t\t\t\t\t\tu = uLookup(symbol);\n\t\t\t\t\t\tu.mksa |= _pic;\n\t\t\t\t\t}\n\t\t\t\t\tcatch (ParseException pe) {\n\t\t\t\t\t\tSystem.err.println(pe); \n\t\t\t\t\t\tMessenger.printStackTrace(pe);\n\t\t\t\t\t}\n\t\t\t\t\tmksa = u.mksa;\n\t\t\t\t\tfactor = u.fact;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (has_symbol && (t.pos<t.length)) {\n\t\t\t\tif (DEBUG>0) System.out.println(\"....parsing: symbol=\" + symbol \n\t\t\t\t\t\t+ \", interpret: \" + t);\n\t\t\t\tif (mksa == _MJD) {\t\t// Get Date + Time\n\t\t\t\t\tif (DEBUG>0) System.out.print(\" parsing via Astrotime(\");\n\t\t\t\t\tAstrotime datime = new Astrotime();\n\t\t\t\t\tif (Character.isLetter(symbol.charAt(0)))\n\t\t\t\t\t\tt.set(posini);\t\t// JD or MJD followed by number\n\t\t\t\t\tif (DEBUG>0) System.out.print(t + \") symbol=\" + symbol);\n\t\t\t\t\thas_value = datime.parsing(t);\n\t\t\t\t\tif (has_value) val = datime.getMJD();\n\t\t\t\t\tif (DEBUG>0) {\n\t\t\t\t\t\tSystem.out.println(\" has_value=\" + has_value \n\t\t\t\t\t\t\t\t+ \", MJD=\" + val);\n\t\t\t\t\t\tdatime.dump(\"datime \");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ((mksa&_pic) != 0) {\t// Interpret complex\n\t\t\t\t\ttry { val = t.parseComplex(symbol); has_value = true; }\n\t\t\t\t\tcatch (Exception e) { t.set(posini); return(false); }\n\t\t\t\t}\n\t\t\t\t//* No other case! else val = t.parseFactor();\n\t\t\t}\n\t\t}\n\n\t\t// Final: Store the results.\n\t\tvalue = has_value ? val : 0./0.;\n\t\tif (has_symbol|has_value) {\n\t\t\treturn(true);\n\t\t}\n\t\tt.pos = posini;\n\t\treturn(false);\t\t\t\t// Nothing found...\n\t}", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n StringReader stringReader0 = new StringReader(\"c3UZts4z!|a\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 21, 21, 47);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(9, javaCharStream0.bufpos);\n assertEquals(30, javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test023() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Gnzd86`;Gs=\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 14, 4094, 4075);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getEndColumn();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(4094, int0);\n }", "public Tree<String> parse(Tree<State> tree) {\n\t\tTree<String> parsed = null;\n\t\ttry { // do NOT expect it to crash\n\t\t\tviterbiParse(tree);\n\t\t\tparsed = StateTreeList.stateTreeToStringTree(tree, Inferencer.grammar.numberer);\n\t\t\tparsed = Inferencer.extractBestMaxRuleParse(chart, parsed.getYield());\n\t\t} catch (Exception e) {\n\t\t\tparsed = new Tree<String>(Inferencer.DUMMY_TAG);\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn parsed;\n\t}", "static void parse() {\r\n i = 0;\r\n j = 0;\r\n k = 0;\r\n varList.add(\"0\");\r\n\r\n // Find the first lexeme\r\n lex();\r\n\r\n // Check if the tokens form a statement\r\n if(checkStatement()) {\r\n System.out.println(\"\\nGRAMMAR IS CORRECT!\");\r\n //System.out.println(grammar);\r\n }\r\n else\r\n System.out.println(\"\\nERROR - UNEXPECTED LEXEME: \\\"\" + lexeme + \"\\\"\");\r\n\r\n i = 0;\r\n j = 0;\r\n k = 0;\r\n index = 0;\r\n lex();\r\n translate();\r\n }", "@Test(timeout = 4000)\n public void test107() throws Throwable {\n StringReader stringReader0 = new StringReader(\"_ofi`~l69>EJdF\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1874, 1874);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(1877, javaCharStream0.getColumn());\n }", "protected void parseTermData()\n {\n for (int i = 0; i < data.length; i++)\n {\n data[i] = Cdata[i];\n }\n }", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n StringReader stringReader0 = new StringReader(\"D!%cD=EVjn`\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.getEndColumn());\n assertEquals(\"%\", token0.toString());\n }", "private StatePair fromRegularExpressionImpl(final String expression) {\n final List<String> subexpressions = RegularExpressionManipulator.splitOnOperator(expression, '|');\n final StatePair pair = new StatePair(newBasicState(false), newBasicState(true));\n\n if (subexpressions.size() > 1) {\n for (final String subexpression : subexpressions) {\n final StatePair subpair = fromRegularExpressionImpl(subexpression);\n addTransition(pair.initial, subpair.initial);\n addTransition(subpair.accepting, pair.accepting);\n }\n }\n else {\n boolean prefixed = false;\n State lastState = pair.initial;\n\n for (int i = 0; i < expression.length(); i++) {\n StatePair subpair = new StatePair(null, null);\n\n if (prefixed) { // Slucaj 1\n prefixed = false;\n subpair = new StatePair(newBasicState(false), newBasicState(false));\n addTransition(subpair.initial, subpair.accepting,\n String.valueOf(unprefixedSymbol(expression.charAt(i))));\n }\n else { // Slucaj 2\n if (expression.charAt(i) == '\\\\') {\n prefixed = true;\n continue;\n }\n\n if (expression.charAt(i) == '(') {\n final int j = RegularExpressionManipulator.findClosingBracket(expression, i, '(', ')');\n\n subpair = fromRegularExpressionImpl(expression.substring(i + 1, j));\n\n i = j;\n }\n else {\n subpair = new StatePair(newBasicState(false), newBasicState(false));\n addTransition(subpair.initial, subpair.accepting,\n expression.charAt(i) == '$' ? EMPTY_SEQUENCE : String.valueOf(expression.charAt(i)));\n }\n }\n\n // Kleene operator check\n if (((i + 1) < expression.length()) && (expression.charAt(i + 1) == '*')) {\n final StatePair oldPair = subpair;\n subpair = new StatePair(newBasicState(false), newBasicState(false));\n\n addTransition(subpair.initial, oldPair.initial);\n addTransition(subpair.initial, subpair.accepting);\n addTransition(oldPair.accepting, subpair.accepting);\n addTransition(oldPair.accepting, oldPair.initial);\n\n i++;\n }\n\n // Merge with last subexpression\n addTransition(lastState, subpair.initial);\n lastState = subpair.accepting;\n }\n addTransition(lastState, pair.accepting);\n }\n return pair;\n }", "@Test(timeout = 4000)\n public void test066() throws Throwable {\n StringReader stringReader0 = new StringReader(\"=<D!T!tLp\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 20, 0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(3, javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n StringReader stringReader0 = new StringReader(\"XlJO@=TH|\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 124, 1);\n char[] charArray0 = new char[6];\n stringReader0.read(charArray0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(2, javaCharStream0.getEndColumn());\n }", "private void readGrammar(Hashtable<String, ? extends Number> lexRulesTable, \n\t\t\tHashtable<String, ? extends Number> intRulesTable) {\n\t\tFileUtil.appendReturn(\"Starting fedePar ... reading grammar\", Parameters.logFile);\n\t\tTreeSet<String> lexicon = new TreeSet<String>();\n\t\tTreeSet<String> categories = new TreeSet<String>();\n\t\tHashtable<String, Double> intCatFreqTable = new Hashtable<String, Double>();\n\t\tHashtable<String, Double> posCatFreqTable = new Hashtable<String, Double>();\n\t\tlexRulesSize = lexRulesTable.size();\n\t\tfor(Enumeration<String> e = lexRulesTable.keys(); e.hasMoreElements(); ) {\n\t\t\tString rule = (String)e.nextElement();\n\t\t\tdouble count = lexRulesTable.get(rule).doubleValue();\t\n\t\t\tString[] ruleSplit = rule.split(\" \");\n\t\t\tUtility.increaseStringDouble(posCatFreqTable, ruleSplit[0], count);\n\t\t\tcategories.add(ruleSplit[0]);\n\t\t\tlexicon.add(ruleSplit[1]);\n\t\t}\n\t\tfor(Enumeration<String> e = intRulesTable.keys(); e.hasMoreElements(); ) {\n\t\t\tString rule = (String)e.nextElement();\n\t\t\tdouble count = intRulesTable.get(rule).doubleValue();\t\n\t\t\tString[] ruleSplit = rule.split(\" \");\n\t\t\tUtility.increaseStringDouble(intCatFreqTable, ruleSplit[0], count);\n\t\t\tcategories.add(ruleSplit[0]);\n\t\t\tcategories.add(ruleSplit[1]);\n\t\t\tif (ruleSplit.length>2) {\n\t\t\t\tcategories.add(ruleSplit[2]);\n\t\t\t\tintBinaryRulesSize++;\n\t\t\t}\n\t\t\telse intUnaryRulesSize++;\n\t\t}\n\t\t//check overlapping between posTags and intTags\n\t\tHashSet<String> overlapping = new HashSet<String>(posCatFreqTable.keySet());\n\t\toverlapping.retainAll(intCatFreqTable.keySet());\n\t\tif (!overlapping.isEmpty()) {\n\t\t\tSystem.out.println(\"Overlapping between internal nodes and pos tags: \" + overlapping.toString());\n\t\t}\n\t\tlexCount = lexicon.size();\n\t\tcatCount = categories.size();\n\t\tlexArray = lexicon.toArray(new String[] {});\n\t\tcatArray = categories.toArray(new String[] {});\n\t\tlexIndex = new Hashtable<String, Integer>();\n\t\tcatIndex = new Hashtable<String, Integer>();\t\t\n\t\tfor(int i=0; i<lexArray.length; i++) lexIndex.put(lexArray[i], i);\n\t\tfor(int i=0; i<catArray.length; i++) catIndex.put(catArray[i], i);\n\t\treadRules(lexRulesTable, intRulesTable, posCatFreqTable, intCatFreqTable);\n\t}", "@Test(timeout = 4000)\n public void test018() throws Throwable {\n StringReader stringReader0 = new StringReader(\"d{H}R}D';ZHm5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getLine();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(1, int0);\n }", "public void testParsing() throws Exception {\n Message message = new Message(\"8=FIX.4.2\\0019=40\\00135=A\\001\"\n + \"98=0\\001384=2\\001372=D\\001385=R\\001372=8\\001385=S\\00110=96\\001\",\n DataDictionaryTest.getDictionary());\n \n assertHeaderField(message, \"FIX.4.2\", BeginString.FIELD);\n assertHeaderField(message, \"40\", BodyLength.FIELD);\n assertEquals(\"wrong field value\", 40, message.getHeader().getInt(BodyLength.FIELD));\n assertHeaderField(message, \"A\", MsgType.FIELD);\n assertBodyField(message, \"0\", EncryptMethod.FIELD);\n assertTrailerField(message, \"96\", CheckSum.FIELD);\n NoMsgTypes valueMessageType = new Logon.NoMsgTypes();\n message.getGroup(1, valueMessageType);\n assertEquals(\"wrong value\", \"D\", valueMessageType.getString(RefMsgType.FIELD));\n assertEquals(\"wrong value\", \"R\", valueMessageType.getString(MsgDirection.FIELD));\n message.getGroup(2, valueMessageType);\n assertEquals(\"wrong value\", \"8\", valueMessageType.getString(RefMsgType.FIELD));\n assertEquals(\"wrong value\", \"S\", valueMessageType.getString(MsgDirection.FIELD));\n }", "public void parseLineAndCountTransitions(String line){\n\t\tString[] words=line.split(\" \");\n\t\t\n\t\tassert(words.length>0&&words.length%2==0);\n\t\t\n\t\t//add the first start_symbol to the state count map\n\t\t{\n\t\t\tif(!transition_map.containsKey(padding_word)){\n\t\t\t\ttransition_map.put(padding_word,new TransitionUnit());\n\t\t\t}\n\t\t\tHashMap<String,DataUnit> state_transition_map=transition_map.get(padding_word).state_transition;\n\t\t\tif(!state_transition_map.containsKey(words[1])){\n\t\t\t\tstate_transition_map.put(words[1],new DataUnit());\n\t\t\t}\n\t\t\tstate_transition_map.get(words[1]).count++;\n\t\t}\n\t\t//count each (y,x) and (y,y') pair\n\t\tfor(int i=0;i<words.length/2;i++){\n\t\t\t\n\t\t\t//each x is at position 2*i and each y is at position 2*i+1\n\t\t\tString xWord=words[2*i],yWord=words[2*i+1];\n\t\t\t\n\t\t\t//add each word to unknown_set if it doesn't contain this word\n\t\t\t//but if it already contains this word, remove from unknown_set\n\t\t\tif(unknown_set.contains(xWord)){\n\t\t\t\tunknown_set.remove(xWord);\n\t\t\t\tpopular_set.add(xWord);\n\t\t\t}else if(!popular_set.contains(xWord)){\n\t\t\t\tunknown_set.add(xWord);\n\t\t\t}\n\t\t\t\n\t\t\tif(!transition_map.containsKey(yWord)){\n\t\t\t\ttransition_map.put(yWord,new TransitionUnit());\n\t\t\t}\n\t\t\tTransitionUnit transitionSubMap=transition_map.get(yWord);\n\t\t\tString nextY=((i==words.length/2-1)?padding_word:words[2*i+3]);\n\t\t\tif(!transitionSubMap.state_transition.containsKey(nextY)){\n\t\t\t\ttransitionSubMap.state_transition.put(nextY,new DataUnit());\n\t\t\t}\n\t\t\ttransitionSubMap.state_transition.get(nextY).count++;\n\t\t\tif(!transitionSubMap.terminal_transition.containsKey(xWord)){\n\t\t\t\ttransitionSubMap.terminal_transition.put(xWord,new DataUnit());\n\t\t\t}\n\t\t\ttransitionSubMap.terminal_transition.get(xWord).count++;\n\t\t}\n\t\t\n\t}", "public SymbolTable<String, SymbolData> parse() throws Exception {\n SymbolTable<String, SymbolData> symbolTable = new SymbolTable<String, SymbolData>();\n String currentJson = \"\";\n Optional<Symbol> currentSymbol = Optional.absent();\n for (String line : inputSource.readLines()) {\n //log.debug(line);\n Optional<Symbol> symbolHeader = headerParser.parseLine(line);\n // encountered a header line\n if(symbolHeader.isPresent()) {\n\n // put the accumalated json string in the map.\n if(currentSymbol.isPresent()) {\n symbolTable.put(currentSymbol.get().getName(), new SymbolData(currentSymbol.get(), currentJson));\n }\n\n // start with the new header.\n currentSymbol = symbolHeader;\n currentJson = \"\";\n continue;\n }\n\n if(!currentSymbol.isPresent()) continue;\n // detect dependencies line by line.\n for (Position dependency : referenceDetector.detectAllReferences(line)) {\n graph.addEdge(currentSymbol.get().getName(), dependency.getReferenceName().substring(1));\n }\n currentJson+=line;\n }\n\n // any remnant json has to go to the last symbol.\n if(currentSymbol.isPresent()) {\n symbolTable.put(currentSymbol.get().getName(), new SymbolData(currentSymbol.get(), currentJson));\n }\n\n\n\n return transform(symbolTable);\n\n }", "private static String\n parsePair(ParseState state)\n throws ParseException\n {\n String result = \"\";\n\n assert(state.data.charAt(state.pos) == '\\\\');\n result += state.data.charAt(state.pos);\n ++state.pos;\n\n if(state.pos >= state.data.length())\n {\n throw new ParseException(\"invalid escape format (unexpected end of state.data)\");\n }\n\n if(special.indexOf(state.data.charAt(state.pos)) != -1 || state.data.charAt(state.pos) != '\\\\' ||\n state.data.charAt(state.pos) != '\"')\n {\n result += state.data.charAt(state.pos);\n ++state.pos;\n return result;\n }\n return parseHexPair(state, false);\n }", "private int mapCharToTransition(char c) {\n switch(c) {\n case '-':\n return 0;\n\n case '+':\n return 1;\n\n case '/':\n return 2;\n\n case '*':\n return 3;\n\n case ')':\n return 4;\n\n case '(':\n return 5;\n\n case '=':\n return 6;\n\n case ';':\n return 7;\n\n default:\n if (Character.isDigit(c)) return 8;\n if (Character.isLetter(c)) return 9;\n if (c == '\\n' || c == '\\r' || c == ' ' || c == '\\t') return 10;\n return 11;\n }\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n StringReader stringReader0 = new StringReader(\"GD}>zPHIT2VcF.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 0, 0, 1847);\n javaCharStream0.adjustBeginLineColumn((-2819), 2281);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getEndLine();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals((-2818), int0);\n }", "public LinkedList scannerTRS(String content) {\n \n Errors.clear();\n tokens.clear();\n char[] chars = content.toCharArray();\n\n int state = 0;\n Token t = new Token();\n String aux = \"\";\n int row = 0;\n int column = 0;\n //recorre todos los caracteres \n for (int i = 0; i < chars.length; i++) {\n\n switch (state) {\n case 0:\n // Estado 0 del automata\n if (chars[i] == '#') {\n tokens.add(new Token(0, \"#\", row, column,\"Caracter especial #\"));\n row++;\n } else if (chars[i] == '*') {\n tokens.add(new Token(1, \"*\", row, column,\"Caracter especial *\"));\n row++;\n } else if (chars[i] == '-') {\n tokens.add(new Token(4, \"-\", row, column,\"Caracter especial -\"));\n aux = \"\";\n\n } else if (Character.isLetter(chars[i])) {\n //Reconociendo un id\n aux += Character.toString(chars[i]);\n state = 6;\n row++;\n } else if (Character.isDigit(chars[i])) {\n //numero\n aux += Character.toString(chars[i]);\n state = 7;\n row++;\n\n } else if (chars[i] == 10 || chars[i] == 11 || chars[i] == 9 || chars[i] == 13 || chars[i] == 65535) {//Salto de linea\n column++;\n row = 0;\n } else if (chars[i] == 32) {\n\n row++;\n } else if (chars[i] == '/') {\n state = 1;\n aux += Character.toString(chars[i]);\n row++;\n } else if (chars[i] == '<') {\n aux += Character.toString(chars[i]);\n state = 3;\n row++;\n\n } else {\n int a = chars[i];\n System.out.println(a);\n Errors.add(new Erro(\"Error lexico\", row, column, String.valueOf(chars[i])));\n System.out.println(\"Error: \" + String.valueOf(chars[i]));\n }\n\n break;\n case 1:\n // code block\n if (chars[i] == '/') {\n state = 2;\n aux += Character.toString(chars[i]);\n row++;\n } else {\n Errors.add(new Erro(\"Error lexico\", row, column, \"/\"));\n i--;\n aux=\"\";\n state = 0;\n\n }\n break;\n case 2:\n if (chars[i] == 10 || chars[i] == 11 || chars[i] == 9 || chars[i] == 13) {\n state = 0;\n column++;\n row = 0;\n tokens.add(new Token(5, aux, row, column,\"Comentario unilinea\"));\n aux=\"\";\n }else{\n aux += Character.toString(chars[i]);\n row++;\n }\n break;\n case 3:\n if (chars[i] == '!') {\n state = 4;\n row++;\n aux += Character.toString(chars[i]);\n } else {\n \n Errors.add(new Erro(\"Error lexico\", row, column, \"<\"));\n aux=\"\";\n row++;\n i--;\n\n }\n break;\n case 4:\n if (chars[i] == '!') {\n state = 5;\n aux += Character.toString(chars[i]);\n row++;\n } else {\n aux += Character.toString(chars[i]);\n if (chars[i] == 13 || chars[i] == 13) {\n column++;\n row = 0;\n } else {\n row++;\n }\n }\n break;\n case 5:\n if (chars[i] == '>') {\n state = 0;\n row++;\n aux += Character.toString(chars[i]);\n tokens.add(new Token(5, aux, row, column,\"Comentario multilinea\"));\n aux=\"\";\n\n } else {\n state = 4;\n aux += Character.toString(chars[i]);\n row++;\n }\n break;\n case 6://IDENTIFICADOR\n if (Character.isDigit(chars[i]) || Character.isLetter(chars[i]) || chars[i] == '_') {\n aux += String.valueOf(chars[i]);\n row++;\n } else {\n tokens.add(new Token(3, aux, row, column,\"Identificador\"));\n aux = \"\";\n state = 0;\n i--;\n }\n break;\n case 7:\n if (Character.isDigit(chars[i])) {\n aux += String.valueOf(chars[i]);\n row++;\n } else {\n tokens.add(new Token(2, aux, row, column, \"Numero\"));\n aux = \"\";\n state = 0;\n i--;\n }\n\n break;\n\n }\n }\n\n return tokens;\n }", "private int parseColumnValue(String value) {\n char letter = value.charAt(0);\n if (!Character.isLetter(letter)) {\n throw new IllegalArgumentException(\"Char '\" + letter + \"' is not a letter.\");\n }\n return letter - START_LETTER;\n }", "private static String\n parseHexPair(ParseState state, boolean allowEmpty)\n throws ParseException\n {\n String result = \"\";\n if(state.pos < state.data.length() && hexvalid.indexOf(state.data.charAt(state.pos)) != -1)\n {\n result += state.data.charAt(state.pos);\n ++state.pos;\n }\n if(state.pos < state.data.length() && hexvalid.indexOf(state.data.charAt(state.pos)) != -1)\n {\n result += state.data.charAt(state.pos);\n ++state.pos;\n }\n if(result.length() != 2)\n {\n if(allowEmpty && result.length() == 0)\n {\n return result;\n }\n throw new ParseException(\"invalid hex format\");\n }\n return result;\n }", "private static void parseInsertString(String insertRowString) {\n System.out.println(\"STUB: Calling parseInsertString(String s) to process queries\");\n System.out.println(\"Parsing the string:\\\"\" + insertRowString + \"\\\"\");\n insertRowString = insertRowString.toLowerCase();\n boolean insert = true;\n String cols = insertRowString.substring(0, insertRowString.indexOf(\")\") + 1);\n String vals = insertRowString.substring(insertRowString.indexOf(\")\") + 1);\n String tableName = vals.trim().split(\" \")[0];\n String tableNamefile = tableName + \".tbl\";\n\n Matcher mcols = Pattern.compile(\"\\\\((.*?)\\\\)\").matcher(cols);\n Matcher mvals = Pattern.compile(\"\\\\((.*?)\\\\)\").matcher(vals);\n\n\n cols = mcols.find() ? mcols.group(1).trim() : \"\";\n vals = mvals.find() ? mvals.group(1).trim() : \"\";\n String columns[] = cols.split(\",\");\n String values[] = vals.split(\",\");\n columns = removeWhiteSpacesInArray(columns);\n values = removeWhiteSpacesInArray(values);\n Table table = null;\n Set colNames = columnOrdinalHelper.getKeySet(tableName);\n HashSet<String> colNullVals = new HashSet<>();\n try {\n table = new Table(tableNamefile);\n // to perform the order of the insert based on the ordinal position\n TreeMap<String, String> colOrder = new TreeMap<>();\n // to map the colunm with data\n HashMap<String, String> colVals = new HashMap<>();\n\n for (int i = 0; i < columns.length; i++) {\n //preserving the order of the columns as given to ordinal positions\n colOrder.put(columnOrdinalHelper.getProperties(tableName.concat(\".\").concat(columns[i])), columns[i]);\n //mappng column name wth value\n colVals.put(columns[i], values[i]);\n }\n long pos = checkIfTablePageHasSpace(tableNamefile, Integer.parseInt(recordLengthHelper.getProperties(tableName.concat(\".\").concat(Constant.recordLength))));\n if (pos != -1) {\n long indexTowrite = pos;\n int noOfColumns = Integer.parseInt(recordLengthHelper.getProperties(tableName.concat(\".\").concat(Constant.numberOfColumns)));\n\n for (Object s : colNames) {\n if (!colOrder.containsValue(String.valueOf(s).substring(String.valueOf(s).indexOf('.')+1))){\n colNullVals.add(String.valueOf(s));\n }\n }\n//\n//\n// }\n\n for(String s : colNullVals){\n if(columnNotNullHelper.getProperties(s)!=null){\n System.out.println(\"Column cannot be null : \"+s);\n insert = false;\n }\n break;\n }\n\n for (int i = 1; i <= noOfColumns; i++) {\n if (colOrder.containsKey(String.valueOf(i)) && insert) {\n pos = RecordFormat.writeRecordFormat(columnTypeHelper.getProperties(tableName.concat(\".\").concat(colOrder.get(String.valueOf(i)))), table, pos, colVals.get(colOrder.get(String.valueOf(i))));\n colNames.remove(tableName.concat(\".\").concat(colOrder.get(String.valueOf(i))));\n }\n }\n Iterator it = colNames.iterator();\n while (it.hasNext() && insert) {\n String colName = (String) it.next();\n String nullValue = String.valueOf(RecordFormat.getRecordFormat(columnTypeHelper.getProperties(colName)));\n pos = RecordFormat.writeRecordFormat(nullValue, table, pos, null);\n }\n table.page.updateArrOfRecLocInPageHeader((short) indexTowrite);\n table.page.updateNoOfRecInPageHeader();\n table.page.updateStartOfContent((short) indexTowrite);\n } else {\n //TODO: Splitting\n }\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n }", "@Test(timeout = 4000)\n public void test065() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Cf&9B{tMCu\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(4, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n StringReader stringReader0 = new StringReader(\"d{IHR}D';Z<m5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n javaCharStream0.UpdateLineColumn('d');\n assertEquals(1, javaCharStream0.getBeginLine());\n }", "private FiniteAutomaton parseT() {\n\t\t\n\t\tFiniteAutomaton f = parseF();\n\t\t\n\t\tint c = peek();\n\t\tif (c >= 0 && (c == '*' || c == '+')) {\n\t\t\t// repetition\n\t\t\texpect((char) c); // consume the * or +\n\n\t\t\t// Create result NFA with new start and accepting states\n\t\t\tFiniteAutomaton result = new FiniteAutomaton();\n\t\t\tState start = result.createState();\n\t\t\tstart.setStart(true);\n\t\t\tState accepting = result.createState();\n\t\t\taccepting.setAccepting(true);\n\n\t\t\t// add ε-transitions from\n\t\t\t// - start to accepting (only for '*', not for '+') and,\n\t\t\t// - accepting to start state (both '*' and '+')\n\t\t\t// This allows 0 or more repetitions for '*', and 1 or more\n\t\t\t// repetitions for '+'.\n\t\t\t\n\t\t\tif (c == '*') {\n\t\t\t\tresult.createTransition(start, accepting, FiniteAutomaton.EPSILON);\n\t\t\t}\n\t\t\tresult.createTransition(accepting, start, FiniteAutomaton.EPSILON);\n\n\t\t\t// add states from orig NFA\n\t\t\tresult.addAll(f);\n\n\t\t\t// add ε-transition from the new start state to the old start state\n\t\t\tresult.createTransition(start, f.getStartState(), FiniteAutomaton.EPSILON);\n\t\t\tf.getStartState().setStart(false);\n\n\t\t\t// add ε-transition from the old accepting state to the new accepting state\n\t\t\tresult.createTransition(f.getUniqueAcceptingState(), accepting, FiniteAutomaton.EPSILON);\n\t\t\tf.getUniqueAcceptingState().setAccepting(false);\n\n\t\t\t// done\n\t\t\treturn check(result);\n\t\t} else if (c >= 0 && c == '?') {\n\t\t\texpect('?');\n\t\t\t\n\t\t\t// Create new start and accepting states, connected to/from\n\t\t\t// the original start and accepting states, and create an\n\t\t\t// epsilon transition from the new start state to the new\n\t\t\t// accepting state (allowing 0 occurrences of strings accepted\n\t\t\t// by the original FA.)\n\t\t\tState start = f.getStartState();\n\t\t\tState accept = f.getUniqueAcceptingState();\n\t\t\tState newStart = f.createState();\n\t\t\tState newAccept = f.createState();\n\t\t\tf.createTransition(newStart, start, FiniteAutomaton.EPSILON); // allow 1 occurrence\n\t\t\tf.createTransition(accept, newAccept, FiniteAutomaton.EPSILON); // as above\n\t\t\tstart.setStart(false);\n\t\t\tnewStart.setStart(true);\n\t\t\taccept.setAccepting(false);\n\t\t\tnewAccept.setAccepting(true);\n\t\t\tf.createTransition(newStart, newAccept, FiniteAutomaton.EPSILON); // allow 0 occurrences\n\t\t\t\n\t\t\treturn f;\n\t\t}\n\t\t\n\t\t// No operator (*+?) was applied, so just return whatever parseF() returned\n\t\treturn f;\n\t}", "@Test(timeout = 4000)\n public void test047() throws Throwable {\n StringReader stringReader0 = new StringReader(\"q,rv8PAfKjbSw`H(r\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(10, javaCharStream0.bufpos);\n assertEquals(12, javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n StringReader stringReader0 = new StringReader(\"d{IHR}D';Z<m5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getColumn();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(1, int0);\n }", "private static List<Integer> parse_line(String line, int d) throws Exception {\n\t List<Integer> ans = new ArrayList<Integer>();\n\t StringTokenizer st = new StringTokenizer(line, \" \");\n\t if (st.countTokens() != d) {\n\t throw new Exception(\"Bad line: [\" + line + \"]\");\n\t }\n\t while (st.hasMoreElements()) {\n\t String s = st.nextToken();\n\t try {\n\t ans.add(Integer.parseInt(s));\n\t } catch (Exception ex) {\n\t throw new Exception(\"Bad Integer in \" + \"[\" + line + \"]. \" + ex.getMessage());\n\t }\n\t }\n\t return ans;\n\t }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n StringReader stringReader0 = new StringReader(\"[dfm,AL#MUTe;f\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(\"L\", token0.toString());\n assertEquals(74, token0.kind);\n }", "int nextState (int state, char c) {\r\n\tif (state < tokLen && c == tok.charAt(state)) {\r\n\t return (state+1) ;\r\n\t} else return tokLen+1 ;\r\n }", "@Test //(expected = IllegalArgumentException.class)\n public void testParseInvalidFieldCount() throws Exception {\n String sample1 = \"OBX|1|ED|18842-5^Discharge Summarization Note^LN||^application^zip^base64^SSBhbSBiYXNlNjQgQ29udGVudA==||||||F|SomethingElse\";\n OBX.parse(sample1);\n }", "private int e(String paramString, int paramInt)\r\n/* 628: */ {\r\n/* 629:624 */ int i1 = paramString.length();\r\n/* 630:625 */ int i2 = 0;\r\n/* 631:626 */ int i3 = 0;\r\n/* 632:627 */ int i4 = -1;\r\n/* 633:628 */ int i5 = 0;\r\n/* 634:631 */ for (; i3 < i1; i3++)\r\n/* 635: */ {\r\n/* 636:632 */ char c1 = paramString.charAt(i3);\r\n/* 637:634 */ switch (c1)\r\n/* 638: */ {\r\n/* 639: */ case '§': \r\n/* 640:636 */ if (i3 < i1 - 1)\r\n/* 641: */ {\r\n/* 642:637 */ char c2 = paramString.charAt(++i3);\r\n/* 643:638 */ if ((c2 == 'l') || (c2 == 'L')) {\r\n/* 644:639 */ i5 = 1;\r\n/* 645:640 */ } else if ((c2 == 'r') || (c2 == 'R') || (c(c2))) {\r\n/* 646:641 */ i5 = 0;\r\n/* 647: */ }\r\n/* 648: */ }\r\n/* 649:643 */ break;\r\n/* 650: */ case '\\n': \r\n/* 651:646 */ i3--;\r\n/* 652:647 */ break;\r\n/* 653: */ case ' ': \r\n/* 654:649 */ i4 = i3;\r\n/* 655: */ default: \r\n/* 656:651 */ i2 += a(c1);\r\n/* 657:652 */ if (i5 != 0) {\r\n/* 658:653 */ i2++;\r\n/* 659: */ }\r\n/* 660: */ break;\r\n/* 661: */ }\r\n/* 662:657 */ if (c1 == '\\n')\r\n/* 663: */ {\r\n/* 664:658 */ i3++;i4 = i3;\r\n/* 665: */ }\r\n/* 666: */ else\r\n/* 667: */ {\r\n/* 668:662 */ if (i2 > paramInt) {\r\n/* 669: */ break;\r\n/* 670: */ }\r\n/* 671: */ }\r\n/* 672: */ }\r\n/* 673:667 */ if ((i3 != i1) && (i4 != -1) && (i4 < i3)) {\r\n/* 674:668 */ return i4;\r\n/* 675: */ }\r\n/* 676:670 */ return i3;\r\n/* 677: */ }", "@Test public void testParseManyDigits2() {\n String pows10 =\n \"9\\n\"+\n \"99\\n\"+\n \"999\\n\"+\n \"9999\\n\"+\n \"99999\\n\"+\n \"999999\\n\"+\n \"9999999\\n\"+\n \"99999999\\n\"+\n \"999999999\\n\"+\n \"9999999999\\n\"+\n \"99999999999\\n\"+\n \"999999999999\\n\"+\n \"9999999999999\\n\"+\n \"99999999999999\\n\"+\n \"999999999999999\\n\"+\n \"9999999999999999\\n\"+\n \"99999999999999999\\n\"+\n \"999999999999999999\\n\"+\n \"9999999999999999999\\n\"+\n \"99999999999999999999\\n\"+\n \"999999999999999999999\\n\"+\n \"9999999999999999999999\\n\"+\n \"99999999999999999999999\\n\"+\n \"999999999999999999999999\\n\";\n double[][] pows10_exp = new double[][] {\n ard(9L),\n ard(99L),\n ard(999L),\n ard(9999L),\n ard(99999L),\n ard(999999L),\n ard(9999999L),\n ard(99999999L),\n ard(999999999L),\n ard(9999999999L),\n ard(99999999999L),\n ard(999999999999L),\n ard(9999999999999L),\n ard(99999999999999L),\n ard(999999999999999L),\n ard(9999999999999999L),\n ard(99999999999999999L),\n ard(999999999999999999L),\n ard(9.99999999999999999e18),\n ard(9.99999999999999999e19),\n ard(9.99999999999999999e20),\n ard(9.99999999999999999e21),\n ard(9.99999999999999999e22),\n ard(9.99999999999999999e23),\n };\n Key k = FVecFactory.makeByteVec(pows10);\n Key r1 = Key.make(\"r1\");\n ParseDataset.parse(r1, k);\n testParsed(r1,pows10_exp);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n StringReader stringReader0 = new StringReader(\";}sis(_LATZu/rX\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(1, javaCharStream0.getColumn());\n }", "public void testParser() {\n\n String[] accessNetworkInfo = {\n\n \t\t\"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE; [123:4::abcd]; rand=l\\n\",\n \t\t\"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE; a-b.c1; rand=l\\n\",\n \t\t\"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE; 127.0.0.1; rand=l\\n\",\n \t\t\"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE;\\\"\\\"\\n\",\n \t\t\"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE;\\\";\\\"\\n\",\n \t\t\"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE;\\\"ip=123.123.123.123\\\"\\n\",\n \t\t\"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE; [123:4::abcd];rand=l\\n\",\n \t\t\"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE; [123:4::abcd]\\n\",\n \"P-Access-Network-Info: IEEE-802.11\\n\",\n \"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE\\n\"\n\n };\n\n super.testParser(PAccessNetworkInfoParser.class,accessNetworkInfo);\n \n //test one more\n String[] accessNetworkInfo_2 = {\n \"P-Access-Network-Info: IEEE-802.11\\n\",\n \"P-Access-Network-Info: IEEE-802.11, 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE\\n\",\n \"P-Access-Network-Info: IEEE-802.11, 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE, 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDF\\n\",\n \"P-Access-Network-Info: 3GPP-E-UTRAN; utran-cell-id-3gpp=262010063F423802;network-provided,3GPP-E-UTRAN-FDD; utran-cell-id-3gpp=262010063F423802\\n\",\n \"P-Access-Network-Info: IEEE-802.11;i-wlan-node-id=74da38582ba4\\n\",\n \"P-Access-Network-Info: 3GPP-E-UTRAN-FDD;utran-cell-id-3gpp=262010063f423802\\n\",\n \"P-Access-Network-Info: 3GPP-E-UTRAN;utran-cell-id-3gpp=\\\"262010063F423802\\\";network-provided,3GPP-E-UTRAN-FDD;utran-cell-id-3gpp=262010063f423802\\n\"\n };\n super.testParser(PAccessNetworkInfoParser.class,accessNetworkInfo_2);\n String token = \"A1-.%*_+`'~\";\n String[] accessNetworkInfo_3 = {\n \"P-Access-Network-Info: IEEE-802.11; network-provided\\n\",\n \"P-Access-Network-Info: IEEE-802.11; ipv4=[2345:3456::]\\n\",\n //token\n \"P-Access-Network-Info: \"+token+\"\\n\",\n //hostname\n \"P-Access-Network-Info: IEEE-802.11;AaB123=www.example-test.example.com\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=www.example-test.example.com.\\n\",\n //IPv4address \n \"P-Access-Network-Info: IEEE-802.11;AaB123=1.1.1.1\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=0.0.0.0\\n\",\n //IPv6reference\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[::]\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[88A]\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[88A::]\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[88A::99B]\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[88A:99B::]\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[88A:99B::11C]\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[88A:99B::11C:22D]\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[::11C]\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[11C::22D]\\n\",\n //hexpart [ \":\" IPv4address ]\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[11C::12.04.02.99]\\n\",\n //IPv6reference quoted\n \"P-Access-Network-Info: IEEE-802.11;AaB123=\\\"[11C::12.04.02.99]\\\"\\n\",\n //Multiple IP6\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[88A:99B::11C:22D];cc231=[11C::12.04.02.99]\\n\",\n };\n super.testParser(PAccessNetworkInfoParser.class,accessNetworkInfo_3);\n\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n StringReader stringReader0 = new StringReader(\"~f'\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(1, javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test128() throws Throwable {\n StringReader stringReader0 = new StringReader(\"D!tcbD=EVjn`\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-7), 6);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(\"D\", token0.toString());\n assertEquals(74, token0.kind);\n }", "public static HashMap<String, ArrayList<String>> parseCreateString(String createTableString, boolean metadata) throws FileNotFoundException {\n\n /*\n CREATE TABLE CUSTOMERS( ID INT PRIMARY KEY,NAME TEXT NOT NULL,AGE INT);\n */\n\n System.out.println(\"STUB: Calling your method to create a table\");\n System.out.println(\"Parsing the string:\\\"\" + createTableString + \"\\\"\");\n createTableString = createTableString.toLowerCase();\n String tablename = createTableString.substring(0, createTableString.indexOf(\"(\")).split(\" \")[2].trim();\n String tablenamefile = tablename + \".tbl\";\n Table newTable = new Table(tablenamefile, Constant.leafNodeType);\n HashMap<String, ArrayList<String>> columndata = new HashMap<>();\n TreeMap<Integer, String> columnOrdinalPosition = new TreeMap<>();\n int record_length = 0;\n Matcher m = Pattern.compile(\"\\\\((.*?)\\\\)\").matcher(createTableString);\n while (m.find()) {\n String cols = m.group(1);\n String singlecol[] = cols.split(\",\");\n ArrayList<String> colname;\n int ordinalPosition = 1;\n for (int i = singlecol.length - 1; i >= 0; i--) {\n\n\n colname = new ArrayList<>();\n singlecol[i] = singlecol[i].trim();\n String colNameType[] = singlecol[i].split(\" \");\n colNameType = removeWhiteSpacesInArray(colNameType);\n //columntype\n colname.add(0, colNameType[1]);\n\n columnTypeHelper.setProperties(tablename.concat(\".\").concat(colNameType[0]), colNameType[1]);\n record_length = record_length + RecordFormat.getRecordFormat(colNameType[1]);\n colname.add(1, \"yes\");\n //ordinaltype\n colname.add(2, String.valueOf(++ordinalPosition));\n columnOrdinalPosition.put(ordinalPosition, tablename.concat(\".\").concat(colNameType[0]));\n if (colNameType.length == 4) {\n if (colNameType[2].equals(\"primary\")) {\n colname.set(1, \"pri\");\n colname.set(2, String.valueOf(1));\n columnOrdinalPosition.remove(ordinalPosition);\n columnOrdinalPosition.put(1, tablename.concat(\".\").concat(colNameType[0]));\n --ordinalPosition;\n } else\n colname.set(1, \"no\");\n columnNotNullHelper.setProperties(tablename.concat(\".\").concat(colNameType[0]), \"NOT NULL\");\n }\n columndata.put(colNameType[0], colname);\n }\n\n }\n\n Iterator it = columnOrdinalPosition.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry pair = (Map.Entry) it.next();\n columnOrdinalHelper.setProperties(String.valueOf(pair.getValue()), String.valueOf(pair.getKey()));\n }\n recordLengthHelper.setProperties(tablename.concat(\".\").concat(Constant.recordLength), String.valueOf(record_length));\n recordLengthHelper.setProperties(tablename.concat(\".\").concat(Constant.numberOfColumns), String.valueOf(columnOrdinalPosition.size()));\n if (!metadata) {\n updateTablesTable(tablename, record_length);\n updateColumnsTable(tablename, columndata);\n }\n return columndata;\n\n }", "private static int firstPassParse(String line, int offset)\r\n {\r\n String[] tokens = line.split(\"[\\\\s,]+\");\r\n\r\n if(tokens.length <= 0)\r\n {\r\n return offset;\r\n }\r\n \r\n if(!isOpcode(tokens[0]) && !tokens[0].startsWith(\".\"))\r\n {\r\n int address = beginningAddress + offset;\r\n \r\n if(isHex(tokens[0]))\r\n {\r\n throw new AssemblerException(\"Invalid label on line: \" + line);\r\n }\r\n else\r\n {\r\n symbolTable.put(tokens[0], address);\r\n }\r\n }\r\n\r\n return offset + ADDRESS_OFFSET;\r\n }", "@Test(timeout = 4000)\n public void test00() throws Throwable {\n ContractDetails contractDetails0 = new ContractDetails();\n String string0 = EWrapperMsgGenerator.scannerData(29, 0, contractDetails0, \" coe=\", \";=)lxY\", (String) null, (String) null);\n assertEquals(\"id = 29 rank=0 symbol=null secType=null expiry=null strike=0.0 right=null exchange=null currency=null localSymbol=null marketName=null tradingClass=null distance= coe= benchmark=;=)lxY projection=null legsStr=null\", string0);\n }", "@Test public void testParseManyDigits3() {\n String pows10 =\n \"0.00000000000001\\n\"+\n \"1000001\\n\"+\n \"2000001\\n\"+\n \"\";\n double[][] pows10_exp = new double[][] {\n ard(1e-14),\n ard(1000001L),\n ard(2000001L),\n };\n Key k = FVecFactory.makeByteVec(pows10);\n Key r1 = Key.make(\"r1\");\n ParseDataset.parse(r1, k);\n testParsed(r1,pows10_exp);\n }", "@Test(timeout = 4000)\n public void test38() throws Throwable {\n PipedReader pipedReader0 = new PipedReader();\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(pipedReader0);\n streamTokenizer0.nval = 744.4583836715912;\n String string0 = SQLUtil.renderNumber(streamTokenizer0);\n streamTokenizer0.ordinaryChar((-45));\n String string1 = SQLUtil.normalize(\"744.4583836715912\", false);\n assertTrue(string1.equals((Object)string0));\n }", "@Test(timeout = 4000)\n public void test69() throws Throwable {\n PipedReader pipedReader0 = new PipedReader();\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(pipedReader0);\n streamTokenizer0.nval = (-2200.896);\n SQLUtil.renderNumber(streamTokenizer0);\n DBCatalog dBCatalog0 = new DBCatalog(\"TVsUO&^)F[AT_z+%R#\");\n assertNull(dBCatalog0.getDoc());\n }", "private int parseRowValue(String value) {\n char number = value.charAt(1);\n if (!Character.isDigit(number)) {\n throw new IllegalArgumentException(\"Char '\" + number + \"' is not a number.\");\n }\n return Character.getNumericValue(number) - START_ROW;\n }", "private static boolean parse_flag() {\n skip_spaces();\n\n char c = s.charAt(i);\n switch (c) {\n case '0':\n case '1':\n {\n i += 1;\n if (i < l && s.charAt(i) == ',') {\n i += 1;\n }\n skip_spaces();\n break;\n }\n default:\n throw new Error(String.format(\"Unexpected flag '%c' (i=%d, s=%s)\", c, i, s));\n }\n\n return c == '1';\n }", "private void parseData() {\n\t\t\r\n\t}", "public String corrector () {\n String aux = tabla_lexica.peek();\n \n if (aux.equals(\"$\") || aux.equals(\".\") || aux.equals(\"(\") || aux.equals(\")\") || aux.equals(\",\") || aux.equals(\"'\") || aux.equals(\"+\") || aux.equals(\"-\") || aux.equals(\"*\") || aux.equals(\"/\") || aux.equals(\"r\") || aux.equals(\"i\") || aux.equals(\"d\") || aux.equals(\"a\")) {\n return aux;\n } \n \n Pattern p1 = Pattern.compile(\"(([>\\\\<])+([=])|[(\\\\)\\\\;\\\\+\\\\-\\\\–\\\\*\\\\/\\\\'\\\\’\\\\‘\\\\,\\\\.\\\\>\\\\<\\\\=]|([@0-9A-Za-z]*)+([#\\\\.\\\\%\\\\_\\\\-]*)?[0-9]+([#\\\\%\\\\_\\\\-\\\\[0-9A-Za-z]*)?([#\\\\%\\\\-\\\\_\\\\[0-9A-Za-z]*)\"\n + \"|([@A-Za-z]*)+([#\\\\%\\\\_\\\\-]*)?[A-Za-z0-9]+([#\\\\%\\\\_\\\\-\\\\[0-9A-Za-z]*)?([#\\\\%\\\\-\\\\_\\\\[0-9A-Za-z]*)|[!\\\\$\\\\%\\\\&\\\\?\\\\¿\\\\¡\\\\_]|[a-zA-Z])\");\n \n Matcher m2 = p1.matcher(aux);\n while (m2.find()) {\n if(m2.group().matches(\"SELECT|FROM|WHERE|IN|AND|OR|CREATE|TABLE|CHAR|NUMERIC|NOT|NULL|CONSTARINT|KEY|PRIMARY|FOREIGN|REFERENCES|INSERT|INTO|VALUES|GO|CREATE|PROCEDURE|VARCHAR\"\n + \"|AS|IF|EXISTS|BEGIN|PRINT|END|ELSE\")) //Palabras reservadas\n {\n String pal = m2.group();\n switch (pal) {\n case \"SELECT\": aux = \"s\";\n auxLinea = m2.group();\n break;\n case \"FROM\": aux = \"f\";\n auxLinea = m2.group();\n break;\n case \"WHERE\": aux = \"w\";\n auxLinea = m2.group();\n break;\n case \"IN\": aux = \"n\";\n auxLinea = m2.group();\n break;\n case \"AND\": aux = \"y\";\n auxLinea = m2.group();\n break;\n case \"OR\": aux = \"o\";\n auxLinea = m2.group();\n break;\n case \"CREATE\": aux = \"c\";\n auxLinea = m2.group();\n break;\n case \"TABLE\": aux = \"t\";\n auxLinea = m2.group();\n break;\n case \"CHAR\": aux = \"h\";\n auxLinea = m2.group();\n break;\n case \"NUMERIC\": aux = \"u\";\n auxLinea = m2.group();\n break;\n case \"NOT\": aux = \"e\";\n auxLinea = m2.group();\n break;\n case \"NULL\": aux = \"g\";\n auxLinea = m2.group();\n break;\n case \"CONSTRAINT\": aux = \"b\";\n auxLinea = m2.group();\n break;\n case \"KEY\": aux = \"k\";\n auxLinea = m2.group();\n break;\n case \"PRIMARY\": aux = \"p\";\n auxLinea = m2.group();\n break;\n case \"FOREIGN\": aux = \"j\";\n auxLinea = m2.group();\n break;\n case \"REFERENCES\": aux = \"l\";\n auxLinea = m2.group();\n break;\n case \"INSERT\": aux = \"m\";\n auxLinea = m2.group();\n break;\n case \"INTO\": aux = \"q\";\n auxLinea = m2.group();\n break;\n case \"VALUES\": aux = \"v\";\n auxLinea = m2.group();\n break;\n }\n } else {\n \n }\n }\n return aux;\n }", "public static Reindeer PARSE(String line) {\n String[] bits = line.split(\" \");\n return new Reindeer(bits[0], Integer.parseInt(bits[3]), Integer.parseInt(bits[6]), Integer.parseInt(bits[13]));\n }", "@Test(timeout = 4000)\n public void test073() throws Throwable {\n StringReader stringReader0 = new StringReader(\"anBz*^T>\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n stringReader0.read();\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(3, javaCharStream0.getEndColumn());\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n String string0 = SQLUtil.normalize(\"b}v&-;$$:Hw1:\", false);\n assertEquals(\"b } v & - ; $ $ : Hw1 :\", string0);\n }" ]
[ "0.60005265", "0.55090004", "0.5507206", "0.54580843", "0.5442473", "0.5360198", "0.5327894", "0.5323562", "0.52558374", "0.5250416", "0.5249475", "0.5243001", "0.52074504", "0.5188618", "0.5182193", "0.5152468", "0.514407", "0.5142978", "0.5142284", "0.5134979", "0.51331246", "0.51020265", "0.5101156", "0.509967", "0.50969946", "0.5078945", "0.50662243", "0.50616854", "0.5061094", "0.50512385", "0.5039358", "0.5031968", "0.50283957", "0.50276774", "0.50190306", "0.5009689", "0.5008968", "0.50039595", "0.4998651", "0.49951398", "0.49876782", "0.49811116", "0.4979502", "0.49759534", "0.49691817", "0.4968646", "0.49605614", "0.49583092", "0.49531573", "0.4946991", "0.49468786", "0.4937367", "0.49305588", "0.49264264", "0.49227017", "0.49125287", "0.49103644", "0.49102327", "0.49099702", "0.49086818", "0.49049458", "0.4904131", "0.49026203", "0.48999044", "0.48972178", "0.48927656", "0.48920923", "0.48834383", "0.4882133", "0.4879279", "0.48779666", "0.48746443", "0.4872016", "0.48693365", "0.48686153", "0.48686102", "0.486861", "0.4862443", "0.48617366", "0.48590356", "0.48575395", "0.4856973", "0.48560655", "0.48449162", "0.48387867", "0.48364106", "0.48340142", "0.48339584", "0.48308498", "0.48275468", "0.48247582", "0.48177907", "0.48152885", "0.48082227", "0.48046577", "0.48012617", "0.48003152", "0.4798287", "0.47921434", "0.47877523" ]
0.52922577
8
log.debug("findAll()"); List list = em.createNamedQuery("QuestionMultiChoice.findAll", QuestionMultiChoice.class).getResultList(); List list = em.createQuery("SELECT q FROM QuestionMultiChoice q", QuestionMultiChoice.class).getResultList(); return list;
@Override @Transactional(readOnly=true) public List<QuestionMultiChoice> findAll() { return Lists.newArrayList(qcmRepository.findAll()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<PokemonEntity> findAll() {\n LOGGER.log(Level.INFO, \"Consultando todas los trayectos\");\n // Se crea un query para buscar todas las ciudades en la base de datos.\n TypedQuery query = em.createQuery(\"select u from PokemonEntity u\", PokemonEntity.class);\n // Note que en el query se hace uso del método getResultList() que obtiene una lista de ciudades.\n return query.getResultList();\n}", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<AssesmentQuestion> list() {\r\n\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tCriteria criteria = session.createCriteria(AssesmentQuestion.class);\r\n\r\n\t\tList<AssesmentQuestion> assesmentQuestionList = null;\r\n\t\ttry {\r\n\t\t\tassesmentQuestionList = criteria.list();\r\n\t\t\t// tx.commit();\r\n\t\t} catch (HibernateException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tsession.close();\r\n\t\t}\r\n\r\n\t\treturn assesmentQuestionList;\r\n\r\n\t}", "public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }", "public List<QuestionEntity> getAllQuestions() {\n try {\n return entityManager.createNamedQuery(\"getAllQuestions\", QuestionEntity.class).getResultList();\n } catch (NoResultException nre) {\n return null;\n }\n }", "@Override\r\n public List<Professor> findAll() {\r\n return getEntityManager().createNamedQuery(\"Professor.findAll\",Professor.class).getResultList();\r\n }", "private void getinterrogantes(){\n try{\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"ServiceQualificationPU\");\n EntityManager em = emf.createEntityManager();\n\n String jpql = \"SELECT i FROM Interrogante i \"\n + \"WHERE i.estado='a' \";\n\n Query query = em.createQuery(jpql);\n List<Interrogante> listInterrogantes = query.getResultList();\n\n ArrayList<ListQuestion> arrayListQuestions = new ArrayList<>();\n for (Interrogante i : listInterrogantes){\n ListQuestion lq = new ListQuestion();\n lq.setIdinterrogante(i.getIdinterrogante());\n lq.setQuestion(i.getDescripcion());\n lq.setListParametros(getParametros(i.getIdinterrogante()));\n arrayListQuestions.add(lq);\n }\n\n this.ListQuestions = arrayListQuestions;\n em.close();\n emf.close();\n }catch(Exception e){\n System.out.println(\"ERROR: \"+e);\n this.Error = \"ERROR: \"+e;\n } \n \n }", "private List<Produto> retornaProduto (Long cod){\n \n Query q = entityManager.createNamedQuery(\"Produto.findByCodigo\");\n q.setParameter(\"codigo\", cod);\n List <Produto> p = q.getResultList();\n return p; \n}", "public List<LugarEntity> findall(){\n Query q = em.createQuery(\"SELECT p FROM LugarEntity p\");\n return q.getResultList();\n }", "@Override\r\n\tpublic List<Person> findAll(){\n\t\tQuery query=em.createQuery(\"Select p from Person p\");\r\n\t\tList<Person> list = query.getResultList();\r\n\t\treturn list;\r\n\t}", "public static void main(String[] args) {\n\r\n\t\tEntityManager em = PersistanceManager.INSTANCE.getEntityManager();\r\n\t\tSystem.out.println(\"Print ALL\");\r\n\t\tQuery query = em.createQuery(\"FROM Employee e\");\r\n\t\tArrayList<Employee> result = (ArrayList<Employee>) query.getResultList();\r\n\t\tfor (Employee current : result)\r\n\t\t\tSystem.out.println(current.toString());\r\n\t\tSystem.out.println(\"Print id = 3\");\r\n\t\tQuery query1 = em.createQuery(\"FROM Employee e where e.id=3\");\r\n\t\tArrayList<Employee> result1 = (ArrayList<Employee>) query1.getResultList();\r\n\t\tfor (Employee current : result1)\r\n\t\t\tSystem.out.println(current.toString());\r\n\t\tSystem.out.println(\"Print Named Query \");\r\n\t\tArrayList<Employee> result2 = (ArrayList<Employee>) em.createNamedQuery(\"Employee.searchAll\").setParameter(\"empName\", \"D%\")\r\n\t\t\t\t.getResultList();\r\n\t\tfor (Employee current : result2)\r\n\t\t\tSystem.out.println(current.toString());\r\n\t}", "public List<EspecieEntity> encontrarTodos(){\r\n Query todos =em.createQuery(\"select p from EspecieEntity p\");\r\n return todos.getResultList();\r\n }", "public List<Tutores> readAllJPQL() throws SecurityException{ \n String sql=\"Select tu from Tutores tu\";\n \n Query q=em.createQuery(sql); \n return q.getResultList();\n }", "@Override\n\tpublic List<Item> findItemListByQuery() {\n\t\tCriteriaBuilder cb=entityManager.getCriteriaBuilder();\n\t//\tCriteriaQuery<Item> query = cb.createQuery(Item.class); \n // Root<Item> item = query.from(Item.class);\n TypedQuery<Item> iquery=entityManager.createQuery(\"select i from Item i\", Item.class);\n\t\treturn iquery.getResultList();\n\t\t\n\t}", "public static List<Book> getBookDetails_2() throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n \r\n Query query=session.getNamedQuery(\"INVENTORY_getAllBookList_2\");\r\n List<Book> bookList=query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return bookList;\r\n}", "public static List<Book> getBookCategory() throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n \r\n Query query=session.getNamedQuery(\"INVENTORY_getBookCategory\");\r\n List<Book> bookLocationList=query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return bookLocationList;\r\n}", "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 }", "@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\n public List<Product> getProductFindAll() {\n return em.createNamedQuery(\"Product.findAll\", Product.class).getResultList();\n }", "private List<Membre> findMembreEntities(boolean all, int maxResults, int firstResult) {\n try {\n// CriteriaQuery cq;\n// cq = entManager.getCriteriaBuilder().createQuery();\n// cq.select(cq.from(Membre.class));\n// Query q = entManager.createQuery(cq);\n Query q = entManager.createNamedQuery(\"Membre.findAll\");\n if (!all) {\n q.setMaxResults(maxResults);\n q.setFirstResult(firstResult);\n }\n return q.getResultList();\n } finally {\n// em.close();\n }\n }", "public void loadQuestions() \n {\n try{\n ArrayList<QuestionPojo> questionList=QuestionDao.getQuestionByExamId(editExam.getExamId());\n for(QuestionPojo obj:questionList)\n {\n qstore.addQuestion(obj);\n }\n }\n catch(SQLException ex)\n {\n JOptionPane.showMessageDialog(null, \"Error while connecting to DB!\",\"Exception!\",JOptionPane.ERROR_MESSAGE);\n ex.printStackTrace();\n\n }\n }", "@Override\n @Transactional\n public List<Contacts> findAll() {\n Session currentSession = entiyManager.unwrap(Session.class);\n\n //create the query\n\n Query<Contacts> theQuery = currentSession.createQuery(\"from Contacts\", Contacts.class);\n\n //execute query and get result list\n\n List<Contacts> contacts = theQuery.getResultList();\n\n //return the results\n\n return contacts;\n }", "List<AnswerList> findAllAnsList();", "public List<ConsejoEntity> findAll() {\r\n Query q = em.createQuery(\"select u from ConsejoEntity u\");\r\n return q.getResultList();\r\n }", "@Test\n public void testTagAdd() {\n try {\n String tagToLook = \"testTagAdd\";\n String entryText = \"testTagAdd:entry\";\n TypedQuery<Tag> query = em.createNamedQuery(\"Tag.find\", Tag.class);\n query.setParameter(\"name\", tagToLook);\n List<Tag> resultList = query.getResultList();\n Assert.assertEquals(resultList.size(), 0);\n\n Tag tag = new Tag();\n tag.name = tagToLook;\n em.getTransaction().begin();\n em.persist(tag);\n em.getTransaction().commit();\n\n Entry e1 = new Entry();\n e1.text = entryText + \"1\";\n Entry e2 = new Entry();\n e2.text = entryText + \"2\";\n List<Tag> resultList1 = query.getResultList();\n Assert.assertEquals(resultList1.size(), 1);\n Tag dbTag = resultList1.get(0);\n Assert.assertEquals(tag.id, dbTag.id);\n\n dbTag.entries = new ArrayList();\n dbTag.entries.add(e1);\n dbTag.entries.add(e2);\n\n em.getTransaction().begin();\n em.persist(e1);\n em.persist(e2);\n em.persist(dbTag);\n em.getTransaction().commit();\n\n dbTag = query.getSingleResult();\n Assert.assertEquals(dbTag.entries.size(), 2);\n\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail();\n }\n }", "@Override\n\tpublic List<Object> getAll(String hql) {\n\t\tSession session = HibernateSessionFactory.getSession();\n\t\tTransaction ts = session.beginTransaction();\n\n\t\tList<Object> list = new ArrayList<Object>();\n\t\tlist = session.createQuery(hql).list();\n\t\tts.commit();\n\t\tsession.close();\n\t\treturn list;\n\t}", "public List<Musuarios> findAll2() {\n Query q = em.createQuery(\"SELECT m FROM Musuarios m\");\n //q.setParameter(\"Rut_Usuario\",\"13274161-1\");\n //List<Musuarios> usr;\n //objmusuarios = new Musuarios[10];\n List<Musuarios> usr = q.getResultList();\n //for(int i = 0; i++; i > usr.\n return usr;\n }", "@Override\n public List<T> findAll() {\n return manager\n .createQuery(\"from \" + elementClass.getSimpleName() + \" e\", elementClass)\n .getResultList();\n }", "public List<Item> getAll() {\r\n List<Item> list = new ArrayList<Item>();\r\n //Transaction trans = null;\r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n\r\n try {\r\n //trans = session.beginTransaction();\r\n\r\n list = session.createQuery(\"from Item\").list();\r\n\r\n //trans.commit();\r\n } catch (HibernateException e) {\r\n //if (trans != null) { trans.rollback(); }\r\n e.printStackTrace();\r\n } finally {\r\n //session.flush();\r\n session.close();\r\n }\r\n return list;\r\n }", "@Override\n\tpublic List<Employee> findAll() {\n\t\tSession currentSession = entityManager.unwrap(Session.class);\n\t\t\n\t\t\n\t\t//create a query\n\t\t\n\t\tQuery<Employee> theQuery= currentSession.createQuery(\"from Employee\",Employee.class);\n\t\t\n\t\tList<Employee> theEmployees=theQuery.list();\n\t\treturn theEmployees;\n\t}", "public static List<Book> retrieveAll( EntityManager em) {\n TypedQuery<Book> query = em.createQuery( \"SELECT b FROM Book b\", Book.class);\n List<Book> books = query.getResultList();\n System.out.println( \"Book.retrieveAll: \" + books.size()\n + \" books were loaded from DB.\");\n return books;\n }", "@Override\n\tpublic List<Item> findItemList() {\n\t\tCriteriaBuilder cb=entityManager.getCriteriaBuilder();\n\t\tCriteriaQuery<Item> query = cb.createQuery(Item.class); \n // Root<Item> item = query.from(Item.class);\n List<Item> itemList= entityManager.createQuery(query).getResultList();\n\t\treturn itemList;\n\t}", "public List<ProfessionEntity> getAll() throws SQLException {\n openTransactionSession();\n\n String sql = \"SELECT * FROM profession\";\n\n Session session = getSession();\n Query query = session.createNativeQuery(sql).addEntity(ProfessionEntity.class);\n List<ProfessionEntity> professionList = query.list();\n\n //close session with a transaction\n closeTransactionSession();\n\n return professionList;\n }", "@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\n public List<Category> getCategoryFindAll() {\n return em.createNamedQuery(\"Category.findAll\", Category.class).getResultList();\n }", "public static List<Book> getBookLocation() throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n \r\n Query query=session.getNamedQuery(\"INVENTORY_getBookLocation\");\r\n List<Book> bookLocationList=query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return bookLocationList;\r\n}", "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 static List<Book> getBookSellers() throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n \r\n Query query=session.getNamedQuery(\"INVENTORY_getBookSellers\");\r\n List<Book> bookLocationList=query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return bookLocationList;\r\n}", "public List<PedidoMaterialModel> findAll(){\n \n List<PedidoMaterialModel> pedidosM = new ArrayList<>();\n \n return pedidosM = pedidoMaterialConverter.entitiesToModels(pedidoMaterialRepository.findAll());\n }", "public static List<Book> getBookDetails_1() throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n \r\n Query query=session.getNamedQuery(\"INVENTORY_getAllBookList_1\");\r\n List<Book> bookList=query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return bookList;\r\n \r\n }", "public List<Questions> getAllQuestionsMedium() {\n List<Questions> questionList = new ArrayList<>();\n db = getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + QuestionsTable.Table_name + \" WHERE _id BETWEEN 11 AND 20\", null);\n\n if (c.moveToFirst()){\n do {\n Questions question = new Questions();\n question.setQuestion(c.getString(c.getColumnIndex(QuestionsTable.Column_Question)));\n question.setOption1(c.getString(c.getColumnIndex(QuestionsTable.Column_Option1)));\n question.setOption2(c.getString(c.getColumnIndex(QuestionsTable.Column_Option2)));\n question.setOption3(c.getString(c.getColumnIndex(QuestionsTable.Column_Option3)));\n question.setOption4(c.getString(c.getColumnIndex(QuestionsTable.Column_Option4)));\n question.setAnswerNr(c.getInt(c.getColumnIndex(QuestionsTable.Column_Answer_Nr)));\n questionList.add(question);\n } while (c.moveToNext());\n }\n c.close();\n return questionList;\n }", "@Override\n\tpublic List reterive() {\n\t\tString str=\"SELECT allusers FROM User allusers\";\n\t\tTypedQuery<User> query=em.createQuery(str,User.class);\n\t\treturn query.getResultList();\n\t\t\n\t}", "public static List<Book> searchEBookByName(String name) throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n\r\n Query query = session.getNamedQuery(\"INVENTORY_searchBookByName\").setString(\"name\", name);\r\n\r\n List<Book> resultList = query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return resultList;\r\n \r\n }", "@Override\r\n\tpublic Object getQuestionear() throws DataAccessException,SQLException {\n\t\tlogger.info(\"start : getQuestionear UsersMngDaoImpl \");\r\n\t\tObject obj = questionRepository.findAll();\r\n\t\tlogger.info(\"End : getQuestionear UsersMngDaoImpl \");\r\n\t\treturn obj;\r\n\t}", "@Override\r\n\tpublic List<T> find(String hql) throws Exception {\n\t\treturn this.getcurrentSession().createQuery(hql).list();\r\n\t}", "@Transactional(readOnly = true)\n public List<Exam> findAll() {\n log.debug(\"Request to get all Exams\");\n return examRepository.findAll();\n }", "public List<Question> listQuestions(DataSource ds){\n\t ArrayList<Question> questions = new ArrayList<Question>();\n ResultSet rs = null;\n Statement stmt = null;\n try{\n conn = ds.getConnection();\n stmt = conn.createStatement();\n rs = stmt.executeQuery(\n \"SELECT id, name, image, sound, category, level, easy, medium, hard FROM questions\");\n while(rs.next()){\n Question currentQuestion = new Question();\n currentQuestion.setQuestionId(rs.getInt(1));\n currentQuestion.setWord(rs.getString(2));\n currentQuestion.setImage(rs.getString(3));\n currentQuestion.setSound(rs.getString(4));\n currentQuestion.setCategory(rs.getString(5));\n currentQuestion.setLevel(rs.getInt(6));\n String difficulty = \"\";\n if (rs.getInt(7)==1)\n difficulty = \"easy\";\n else \n if(rs.getInt(8)==1)\n difficulty = \"medium\";\n else\n if(rs.getInt(9)==1)\n difficulty = \"hard\";\n currentQuestion.setDifficulty(difficulty);\n questions.add(currentQuestion);\n }\n conn.close();\n }\n catch(Exception ex){ex.printStackTrace();}\n finally {\n try {if (rs != null) rs.close();} catch (SQLException e) {}\n try {if (stmt != null) stmt.close();} catch (SQLException e) {}\n try {if (conn != null) conn.close();} catch (SQLException e) {}\n }\n System.out.println(\"TMA...All qns count: \" + questions.size());\n \n\t return questions;\n\t}", "public List<E> findAll() ;", "public List<Dia> getDias(){\n List<Dia> result= null;\n Session session = sessionFactory.openSession();\n Transaction tx=null;\n try{\n tx=session.beginTransaction();\n String hql= \"FROM Dia\";\n Query query =session.createQuery(hql);\n result=(List<Dia>)query.list();\n tx.commit();\n }catch (Exception e){\n if(tx != null)\n tx.rollback();\n e.printStackTrace(); \n }finally{\n session.close();\n }\n return result;\n }", "public List<Questions> getAllQuestionsEasy() {\n List<Questions> questionList = new ArrayList<>();\n db = getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + QuestionsTable.Table_name + \" WHERE _id BETWEEN 21 AND 30\", null);\n\n if (c.moveToFirst()){\n do {\n Questions question = new Questions();\n question.setQuestion(c.getString(c.getColumnIndex(QuestionsTable.Column_Question)));\n question.setOption1(c.getString(c.getColumnIndex(QuestionsTable.Column_Option1)));\n question.setOption2(c.getString(c.getColumnIndex(QuestionsTable.Column_Option2)));\n question.setOption3(c.getString(c.getColumnIndex(QuestionsTable.Column_Option3)));\n question.setOption4(c.getString(c.getColumnIndex(QuestionsTable.Column_Option4)));\n question.setAnswerNr(c.getInt(c.getColumnIndex(QuestionsTable.Column_Answer_Nr)));\n questionList.add(question);\n } while (c.moveToNext());\n }\n c.close();\n return questionList;\n }", "@Override\n\tpublic List<Employee> findAll() {\n\t\t\t\tSession currentSession = entityManager.unwrap(Session.class);\n\t\t\t\t// create a query\n\t\t\t\tQuery<Employee> theQuery = currentSession.createQuery(\"from Employee\", Employee.class);\n\t\t\t\t\n\t\t\t\t// execute a query and get the result list\n\t\t\t\tList<Employee> employeeList = theQuery.getResultList();\n\t\t\t\t\n\t\t\t\t// return the result list\n\t\t\t\treturn employeeList;\n\t}", "public List<Questions> getAllQuestionsHard() {\n List<Questions> questionList = new ArrayList<>();\n db = getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + QuestionsTable.Table_name + \" WHERE _id BETWEEN 1 AND 10\", null);\n\n if (c.moveToFirst()){\n do {\n Questions question = new Questions();\n question.setQuestion(c.getString(c.getColumnIndex(QuestionsTable.Column_Question)));\n question.setOption1(c.getString(c.getColumnIndex(QuestionsTable.Column_Option1)));\n question.setOption2(c.getString(c.getColumnIndex(QuestionsTable.Column_Option2)));\n question.setOption3(c.getString(c.getColumnIndex(QuestionsTable.Column_Option3)));\n question.setOption4(c.getString(c.getColumnIndex(QuestionsTable.Column_Option4)));\n question.setAnswerNr(c.getInt(c.getColumnIndex(QuestionsTable.Column_Answer_Nr)));\n questionList.add(question);\n } while (c.moveToNext());\n }\n c.close();\n return questionList;\n }", "public List<Tipousr> findAllTipos(){\n\t\t List<Tipousr> listado;\n\t\t Query q;\n\t\t em.getTransaction().begin();\n\t\t q=em.createQuery(\"SELECT u FROM Tipousr u ORDER BY u.idTipousr\");\n\t\t listado= q.getResultList();\n\t\t em.getTransaction().commit();\n\t\t return listado;\n\t\t \n\t\t}", "public List<Alumno> readAllJPQL() throws SecurityException{ \n String sql=\"Select a from Alumno a\";\n \n Query q=em.createQuery(sql); \n return q.getResultList();\n }", "public List<T> findAll() throws NoSQLException;", "List<T> findAll() ;", "private void getDepartamentos() {\n try{\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"ServiceQualificationPU\");\n EntityManager em = emf.createEntityManager();\n\n\n String jpql =\"SELECT d FROM Departamento d \"\n + \"WHERE d.estado = 'a'\";\n\n Query query = em.createQuery(jpql);\n List<Departamento> listDepartamentos = query.getResultList();\n ArrayList<Departamento> arrayListDepartamentos = new ArrayList<>();\n for(Departamento d: listDepartamentos){\n arrayListDepartamentos.add(d);\n }\n this.Listdepartamentos = arrayListDepartamentos;\n em.close();\n emf.close();\n }\n catch(Exception e){\n System.out.println(\"ERROR: \"+e);\n this.Error = \"ERROR: \"+e;\n }\n }", "@Override\n public List<Paciente> listar(){\n EntityManagerFactory factory = Persistence.createEntityManagerFactory(\"vesaliusPU\"); \n EntityManager em = factory.createEntityManager();\n List<Paciente> listaPaciente = em.createQuery(\"SELECT pac FROM Paciente pac\").getResultList(); \n em.close();\n factory.close();\n return (listaPaciente);\n }", "public List<T> findAll() {\n\t Query q = getEntityManager().createQuery(\"select u from \" + getEntityClass().getSimpleName() + \" u\");\n\t return q.getResultList();\n\t }", "@Override\n\t@Transactional\n\tpublic List<Employee> findAll() {\n\t\tSession currentSession = entityManager.unwrap(Session.class);\n\t\t\n\t\t//create query\n\t\tQuery<Employee> theQuery = currentSession.createQuery(\"from Employee\", Employee.class);\n\t\t\n\t\t//execute query\n\t\tList<Employee> employees = theQuery.getResultList();\n\t\t\n\t\t//currentSession.close();\n\t\t\n\t\treturn employees;\n\t}", "@Test\n public void test() {\n manager.clear();\n TypedQuery<MasterEntity> query2 = manager.createQuery(\"select m from MasterEntity m join fetch m.ref\", MasterEntity.class);\n logger.debug(query2.getResultList().toString());\n// manager.clear();\n// CriteriaBuilder cb = manager.getCriteriaBuilder();\n// CriteriaQuery<MasterEntity> q = cb.createQuery(MasterEntity.class);\n// Root<MasterEntity> root = q.from(MasterEntity.class);\n// root.fetch(\"ref\");\n// manager.createQuery(q).getResultList();\n\n }", "@Override\n\tpublic List<T> find(String hql) {\n\t\treturn hibernateTemplate.find(hql);\n\t}", "@Repository\npublic interface QuestionRepository extends CrudRepository<Question,Integer> {\n @Query(value = \"select * from questions_table where skill_text=:skill and level_text=:level\",nativeQuery = true)\n List<Question> findAllBySkillAndLevel(@Param(\"skill\")String skill,@Param(\"level\")String level);\n// @Query(value = \"select * from questions_table where skill_text in:skill\",nativeQuery = true)\n// List<Question> findAllBySkillIn(@Param(\"skills\") String skill);\n @Query(value = \"select distinct (l.leveltext),l.id from levels_table as l, questions_table as q where l.leveltext=q.level_text and q.skill_text=:skill ORDER BY l.id;\",nativeQuery = true)\n List<Level>findDistinctBySkill(@Param(\"skill\") String skill);\n}", "public List<IEntity> query(IQuery query) throws SQLException;", "@Override\n public List<R> getAll() {\n return onFindForList(getSession().createCriteria(entityClass).list());\n }", "@Test\n public void test3FindAll() {\n SpecialityFactory factory = new MysqlSpecialityDAOFactry();\n SpecialityDAO dao = factory.create();\n List<SpecialityDTO> lista=(List<SpecialityDTO>)dao.findAll(); \n System.out.println(lista);\n assertTrue(!lista.isEmpty());\n }", "public List<Professor> findAll();", "@Override\r\n\tpublic List<T> findAll() {\n\t\treturn getSession().createQuery(\r\n\t\t\t\t\"FROM \"+clazz.getSimpleName())\r\n\t\t\t\t.list();\r\n\t}", "public List findByNamedQuery(String queryName);", "static void checkObjects() {\n String[] names = new String[]{\"Person\", \"Address\", \"CreditCard\", \"Pincode\", \"Bank\"};\n EntityManager em = factory.createEntityManager();\n\n System.out.println(\"-----------------------------------\");\n for (String name : names) {\n Query q = em.createQuery(String.format(\"select x from %s x\", name));\n\n List resultList = q.getResultList();\n for (Object x : resultList) {\n System.out.println(x);\n }\n System.out.println(\"-----------------------------------\");\n }\n em.close();\n }", "List<E> findAll();", "List<E> findAll();", "List<E> findAll();", "@Override\r\n\tpublic List<Famille> listCompetences() {\n\t\t\r\n\t\tSession session=HibernateUtil.getSessionFactory().getCurrentSession();\r\n \t\tsession.beginTransaction();\r\n \t\t//on crée une requête\r\n \t\tQuery req=session.createQuery(\"select C from FamilleComp C\");\r\n \t\tList<Famille> famillecomp=req.list();\r\n session.getTransaction().commit();\r\n \t\treturn famillecomp;\r\n\t\t\r\n\t}", "public static List findAll() {\n\t\tSession session = DBManager.getSession();\n\t\treturn session.createQuery(\"SELECT e FROM Estoque e\").list();\n\t}", "public List<Recipe> findAllRecipe(){\n\t\treturn sessionFactory.openSession().createQuery(\"from Recipe\").list();\n\t\t\n\t}", "public List<CompradorEntity> findAll() {\r\n TypedQuery<CompradorEntity> query = em.createQuery(\"select u from CompradorEntity u\", CompradorEntity.class);\r\n return query.getResultList();\r\n }", "public List<Book> findAll()\r\n\t{\r\n\t\tList<Book> booklist= null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tbookdao.openCurrentSession();\r\n\t\t booklist=bookdao.findAll();\r\n\t\t\tbookdao.closeCurrentSession();\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\treturn booklist;\r\n\t}", "public static List<Book> getBookName() throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n \r\n Query query=session.getNamedQuery(\"INVENTORY_getBookName\");\r\n List<Book> bookNameList=query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return bookNameList;\r\n }", "List<Question> getQuestions();", "public List<Food> getFood() {\n\tString sql =\"select * from food\";\n\tList<Food>list = new ArrayList<Food>();\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet rs = preparedStatement.executeQuery();\n\t\twhile(rs.next()) {\n\t\t\tFood food = new Food();\n\t\t\tfood.setId(rs.getInt(\"Id_food\"));\n\t\t\tfood.setName(rs.getString(\"Name\"));\n\t\t\tfood.setPrice(rs.getDouble(\"Price\"));\n\t\t\tlist.add(food);\n\t\t}\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\treturn list;\n}", "@Override\n public List list() throws TransactionException {\n return hibernateQuery.list();\n }", "protected List findByNamedQuery(Class clazz, String namedQuery) {\r\n try {\r\n Query q = entityManager.createNamedQuery(clazz.getSimpleName() + \".\" + namedQuery);\r\n return q.getResultList();\r\n } catch (Exception e) {\r\n //Nao e um erro :)\r\n }\r\n return null;\r\n }", "@Test\n public void testJPA3ListAll (){\n Iterable<TruckInfo> trucklist = truckRepo.findAll();\n\n\n\n\n }", "public List<E> findAll();", "public List<CategoriaUsuario> findall(){\n return categoriaUsuarioRepository.findAll();\n }", "List<EmailTemplateSubCategoryMaster> findAll();", "public List findAll() {\n\t\treturn dao.findAll();\r\n\t}", "@Query(nativeQuery = true, value = \"select i.name from item i\")\n List<String> findNames();", "@Override\r\n\tpublic List<Food> queryFoods() {\n\t\tString sql=\"select * from food\";\r\n\t\tList<Food> list=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn list;\r\n\t}", "private ArrayList<Parametro> getParametros(int pregunta){\n ArrayList<Parametro> arrayListParametros = new ArrayList<>();\n try{\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"ServiceQualificationPU\");\n EntityManager em = emf.createEntityManager();\n\n String jpql =\"SELECT p FROM ParametroInterrogante pi \"\n + \"JOIN pi.interrogante i \"\n + \"JOIN pi.parametro p \"\n + \"WHERE p.estado='a' AND i.estado='a' \"\n + \"AND i.idinterrogante = :pregunta\";\n\n Query query = em.createQuery(jpql);\n query.setParameter(\"pregunta\", pregunta);\n List<Parametro> list = query.getResultList();\n for(Parametro p : list){\n arrayListParametros.add(p);\n }\n\n em.close();\n emf.close();\n }catch(Exception e){\n System.out.println(\"ERROR: \"+e);\n this.Error = \"ERROR: \"+e;\n }\n return arrayListParametros;\n }", "@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}", "List<E> queryAll(String namedQuery);", "@Test\n\tpublic void selectAllFromCourseTable_typed() {\n\t\tList arrayList = em.createNamedQuery(\"query_get_all_courses\",Course.class).getResultList();\n\t\tlogger.info(\"\\n\\n>>>>>>> Select c FROM Course c , entity type explicitly given -> {}\", arrayList);\n\t}", "public List<Rota> findAll() {\n try {\r\n EntityManager entityManager = getEntityManager();\r\n Query query = entityManager.createQuery(\"SELECT e FROM Rota e\");// em SELECT e FROM Rota e \"Rota\" precisa representar o mesmo nome da classe\r\n List<Rota> rotas = query.getResultList();\r\n entityManager.close();\r\n return rotas;\r\n }catch(Exception e) {\r\n e.printStackTrace();\r\n return null;\r\n }\r\n }", "List<Product> findAll();", "List<Product> findAll();", "public interface PortalPricesInfoResponsitory extends JpaCustomResponsitory<PortalPricesInfoEntity, Integer> {\n\n @Query(\"select p from PortalPricesInfoEntity p where p.name = ?1\")\n List<PortalPricesInfoEntity> findByName(String name);\n\n}", "@Override\n\tpublic List<Product> getAll() {\n\t\tQuery query = session.createQuery(\"from Product \");\n\t\t\n\t\treturn query.getResultList();\n\t}", "public List<Choice> getChoiceList() {\n CriteriaBuilder cb = em.getCriteriaBuilder();\n CriteriaQuery<Choice> cq = cb.createQuery(Choice.class);\n cq.select(cq.from(Choice.class));\n return em.createQuery(cq).getResultList(); \n }", "@Override\n public List<Promocion> findAll() {\n return promocionRepository.findAll();\n }", "protected static List<Question> convertToInstances(ResultSet resultSet) throws ApplicationException {\n List<Question> entities = new LinkedList<Question>();\n\n Question entity = QuestionDatabaseAccess.convertToInstance(resultSet);\n\n while (entity != null) {\n entities.add(entity);\n entity = QuestionDatabaseAccess.convertToInstance(resultSet);\n }\n\n return entities;\n }", "public List<Skill> findAll(){\n return (List<Skill>) skillRepository.findAll();\n }" ]
[ "0.6733526", "0.6487268", "0.64692116", "0.6414354", "0.63779193", "0.6318336", "0.6237823", "0.62190646", "0.62168294", "0.6113038", "0.61076564", "0.61067957", "0.6053991", "0.6043224", "0.60245013", "0.60220295", "0.6020798", "0.601396", "0.60125726", "0.6009074", "0.6004461", "0.5933448", "0.5907982", "0.5900626", "0.58914566", "0.58769006", "0.5875549", "0.58567417", "0.5854913", "0.5845572", "0.5839988", "0.5837705", "0.58173615", "0.5793473", "0.5779056", "0.57736045", "0.576923", "0.5765325", "0.5738248", "0.5737296", "0.57223606", "0.5718168", "0.5717323", "0.57093346", "0.5697965", "0.5697451", "0.56966835", "0.56922156", "0.56906945", "0.56871325", "0.56852025", "0.5683322", "0.568223", "0.56698686", "0.5669608", "0.5665247", "0.566255", "0.5654462", "0.5652912", "0.5650963", "0.5647547", "0.5638059", "0.5636834", "0.56318694", "0.5628058", "0.5614719", "0.5608611", "0.5607966", "0.5607966", "0.5607966", "0.5605039", "0.5602793", "0.5601845", "0.5585309", "0.5583458", "0.55824065", "0.5575728", "0.55730855", "0.5570415", "0.55674434", "0.5563549", "0.5556342", "0.5545463", "0.55452627", "0.55417675", "0.5540253", "0.553563", "0.55322325", "0.5528295", "0.5524321", "0.5523223", "0.55191857", "0.5516738", "0.5516738", "0.55148387", "0.5513503", "0.5510121", "0.5509943", "0.5507503", "0.55049735" ]
0.6617144
1
log.debug("findByTags_Id( " + id + " )"); TypedQuery query = em.createNamedQuery("QuuestionMultiChoice.findAllWithTheTagId", QuestionMultiChoice.class).setParameter("id", id); List list = query.getResultList();
@Override @Transactional(readOnly=true) public List<QuestionMultiChoice> findByTags_Id(Long id) { List<QuestionMultiChoice> list = qcmRepository.findByTags_Id(id); return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void loadTag(){ \n\t\t try {\n\n\t\t\t\tConnection con = DBConnection.connect();\n\n\t\t\t\tString query=\"select * from Tag \";\n\t\t\t\tPreparedStatement pst=con.prepareStatement(query);\n\t\t\t\tResultSet rs=pst.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tString name =rs.getString(\"relatedtag\");\n\t\t\t\t\ttag.addItem(name);\n\t\t\t\t\t \n\t\t\t\t}\n\n\t\t\t\tcon.close();\n\t\t\t}\n\t\t\tcatch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n}", "@Test\n public void testTagAdd() {\n try {\n String tagToLook = \"testTagAdd\";\n String entryText = \"testTagAdd:entry\";\n TypedQuery<Tag> query = em.createNamedQuery(\"Tag.find\", Tag.class);\n query.setParameter(\"name\", tagToLook);\n List<Tag> resultList = query.getResultList();\n Assert.assertEquals(resultList.size(), 0);\n\n Tag tag = new Tag();\n tag.name = tagToLook;\n em.getTransaction().begin();\n em.persist(tag);\n em.getTransaction().commit();\n\n Entry e1 = new Entry();\n e1.text = entryText + \"1\";\n Entry e2 = new Entry();\n e2.text = entryText + \"2\";\n List<Tag> resultList1 = query.getResultList();\n Assert.assertEquals(resultList1.size(), 1);\n Tag dbTag = resultList1.get(0);\n Assert.assertEquals(tag.id, dbTag.id);\n\n dbTag.entries = new ArrayList();\n dbTag.entries.add(e1);\n dbTag.entries.add(e2);\n\n em.getTransaction().begin();\n em.persist(e1);\n em.persist(e2);\n em.persist(dbTag);\n em.getTransaction().commit();\n\n dbTag = query.getSingleResult();\n Assert.assertEquals(dbTag.entries.size(), 2);\n\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail();\n }\n }", "public List<PokemonEntity> findAll() {\n LOGGER.log(Level.INFO, \"Consultando todas los trayectos\");\n // Se crea un query para buscar todas las ciudades en la base de datos.\n TypedQuery query = em.createQuery(\"select u from PokemonEntity u\", PokemonEntity.class);\n // Note que en el query se hace uso del método getResultList() que obtiene una lista de ciudades.\n return query.getResultList();\n}", "private List<Produto> retornaProduto (Long cod){\n \n Query q = entityManager.createNamedQuery(\"Produto.findByCodigo\");\n q.setParameter(\"codigo\", cod);\n List <Produto> p = q.getResultList();\n return p; \n}", "public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }", "Tag findById(int id);", "public interface IClassTagDao extends BaseRepository<ClassTag, Integer>, JpaSpecificationExecutor<ClassTag> {\n\n ClassTag findByName(String name);\n\n @Query(\"FROM ClassTag c WHERE c.id in (?1)\")\n List<ClassTag> findByIds(List<Integer> ids);\n\n @Query(\"SELECT c.cid FROM ClassCourseTag c WHERE c.tid=?1\")\n List<Integer> findCids(Integer tid);\n}", "@Override\n\tpublic List<String> getTagsByArticle(int aid) {\n\t\tString hql = \"select t.content from TagInfo as t,ArticleInfo as a where a.articleId= ? and a.tags.tagId = t.tagId\";\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\n\t\t//Query query = sessionFactory.getCurrentSession().createSQLQuery(sql);\n\t\tquery.setInteger(0, aid);\n\t\treturn query.list();\n\t}", "public List<Tipousr> findAllTipos(){\n\t\t List<Tipousr> listado;\n\t\t Query q;\n\t\t em.getTransaction().begin();\n\t\t q=em.createQuery(\"SELECT u FROM Tipousr u ORDER BY u.idTipousr\");\n\t\t listado= q.getResultList();\n\t\t em.getTransaction().commit();\n\t\t return listado;\n\t\t \n\t\t}", "private void getinterrogantes(){\n try{\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"ServiceQualificationPU\");\n EntityManager em = emf.createEntityManager();\n\n String jpql = \"SELECT i FROM Interrogante i \"\n + \"WHERE i.estado='a' \";\n\n Query query = em.createQuery(jpql);\n List<Interrogante> listInterrogantes = query.getResultList();\n\n ArrayList<ListQuestion> arrayListQuestions = new ArrayList<>();\n for (Interrogante i : listInterrogantes){\n ListQuestion lq = new ListQuestion();\n lq.setIdinterrogante(i.getIdinterrogante());\n lq.setQuestion(i.getDescripcion());\n lq.setListParametros(getParametros(i.getIdinterrogante()));\n arrayListQuestions.add(lq);\n }\n\n this.ListQuestions = arrayListQuestions;\n em.close();\n emf.close();\n }catch(Exception e){\n System.out.println(\"ERROR: \"+e);\n this.Error = \"ERROR: \"+e;\n } \n \n }", "public interface QuantitativeMultipleAnswerQuestionRepository extends JpaRepository<QuantitativeMultipleAnswerQuestion, Long>, JpaSpecificationExecutor<QuantitativeMultipleAnswerQuestion> {\n\n @Query(\"select q from QuantitativeMultipleAnswerQuestion q where q.id in :ids\")\n List<QuantitativeMultipleAnswerQuestion> findAll(@Param(\"ids\") List<Long> ids);\n\n}", "@Override\r\n\tpublic List<QuestionData> getQuestions(String tags) {\n\t\tlog.info(\"getLoads service with params started\");\r\n\t\tSort s=Sort.by( Sort.Direction.DESC, \"timestamp\");\r\n\r\n\t\tList<QuestionData> list = null;\r\n\r\n\t\tif(tags!=null) {\r\n\t\t\tlist=questionDao.findByTags(tags);\r\n\t\t\treturn list;\r\n\t\t}\r\n\t\t//Pageable currentPage = PageRequest.of( Sort.Direction.DESC, \"timestamp\");\r\n\t\t\r\n\r\n\t\ttry {\r\n\r\n\t\t\tlist = questionDao.findAll(s);\r\n\t\t\tlog.info(\"User Data get all returned\");\r\n\t\t\treturn list;\r\n\t\t} catch (Exception ex) {\r\n\t\t\tlog.error(\"User Data get all not returned -----\" + String.valueOf(ex));\r\n\t\t\tthrow ex;\r\n\t\t}\r\n\r\n\t}", "@Repository\npublic interface QuestionRepository extends CrudRepository<Question,Integer> {\n @Query(value = \"select * from questions_table where skill_text=:skill and level_text=:level\",nativeQuery = true)\n List<Question> findAllBySkillAndLevel(@Param(\"skill\")String skill,@Param(\"level\")String level);\n// @Query(value = \"select * from questions_table where skill_text in:skill\",nativeQuery = true)\n// List<Question> findAllBySkillIn(@Param(\"skills\") String skill);\n @Query(value = \"select distinct (l.leveltext),l.id from levels_table as l, questions_table as q where l.leveltext=q.level_text and q.skill_text=:skill ORDER BY l.id;\",nativeQuery = true)\n List<Level>findDistinctBySkill(@Param(\"skill\") String skill);\n}", "public static List<Book> getBookCategory() throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n \r\n Query query=session.getNamedQuery(\"INVENTORY_getBookCategory\");\r\n List<Book> bookLocationList=query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return bookLocationList;\r\n}", "public static List<Book> getBookDetails_2() throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n \r\n Query query=session.getNamedQuery(\"INVENTORY_getAllBookList_2\");\r\n List<Book> bookList=query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return bookList;\r\n}", "public List<EspecieEntity> encontrarTodos(){\r\n Query todos =em.createQuery(\"select p from EspecieEntity p\");\r\n return todos.getResultList();\r\n }", "public interface TagRepository extends JpaRepository<Tag,Long> {\n\n\t\n\n// List<Tag> findAll();\n// TODO Add named query to fetch only those tags that have been assigned by a user \n// @Query(\"select meeting.tags from Meeting meeting where meeting.user.login = ?#{principal.username}\")\n//\tPage<Tag> findAllForCurrentUser(Pageable generatePageRequest);\n}", "TagData selectByPrimaryKey(Long tagid);", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Questions> getTenQuestion(String tag){\n\t\tResponsesDao rdao = new ResponsesDao();\n\t\tTagsDao tdao = new TagsDao();\n\t\tTags tags = tdao.getTagByString(tag);\n\t\tList<Questions> quest = new ArrayList<>();\n\t\tList<Questions> retquest = new ArrayList<>();\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\n\t\tquest =\tsession.\tcreateQuery(\"from Questions where tid = :namevar\").\n\t\t\t\tsetInteger(\"namevar\", tags.getTagId()).list();\n\t\tif(quest.size() != 0) {\n\t\tfor(int i = 0; i <10; i++) {\n\t\t\tint rand = (int) (Math.random() * quest.size());\n\t\t\tretquest.add(rdao.getResponses(quest.get(rand)));\n\t\t}\n\t\t}\n\t\tsession.close();\n\t\treturn retquest;\n\t}", "@Override\n public List<ResourceTagJoinVO> searchByIds(Long... tagIds) {\n int DETAILS_BATCH_SIZE = 2000;\n String batchCfg = _configDao.getValue(\"detail.batch.query.size\");\n if (batchCfg != null) {\n DETAILS_BATCH_SIZE = Integer.parseInt(batchCfg);\n }\n // query details by batches\n List<ResourceTagJoinVO> uvList = new ArrayList<ResourceTagJoinVO>();\n // query details by batches\n int curr_index = 0;\n if (tagIds.length > DETAILS_BATCH_SIZE) {\n while ((curr_index + DETAILS_BATCH_SIZE) <= tagIds.length) {\n Long[] ids = new Long[DETAILS_BATCH_SIZE];\n for (int k = 0, j = curr_index; j < curr_index + DETAILS_BATCH_SIZE; j++, k++) {\n ids[k] = tagIds[j];\n }\n SearchCriteria<ResourceTagJoinVO> sc = tagSearch.create();\n sc.setParameters(\"idIN\", ids);\n List<ResourceTagJoinVO> vms = searchIncludingRemoved(sc, null, null, false);\n if (vms != null) {\n uvList.addAll(vms);\n }\n curr_index += DETAILS_BATCH_SIZE;\n }\n }\n if (curr_index < tagIds.length) {\n int batch_size = (tagIds.length - curr_index);\n // set the ids value\n Long[] ids = new Long[batch_size];\n for (int k = 0, j = curr_index; j < curr_index + batch_size; j++, k++) {\n ids[k] = tagIds[j];\n }\n SearchCriteria<ResourceTagJoinVO> sc = tagSearch.create();\n sc.setParameters(\"idIN\", ids);\n List<ResourceTagJoinVO> vms = searchIncludingRemoved(sc, null, null, false);\n if (vms != null) {\n uvList.addAll(vms);\n }\n }\n return uvList;\n }", "@Transactional\npublic ArrayList<Friend> getAllpendingentries(int myid) {\n\tSession session = sessionFactory.openSession();\n\tQuery q= session.createQuery(\"from Friend where status='P' and( user_id=\"+myid+\" or friendid=\"+myid+\") \");\nArrayList<Friend> myfriends=(ArrayList<Friend>)q.list();\nreturn myfriends;\n\t}", "public interface TagDao {\n List<Tag> getTagsByArticleId(long articleId);\n List<Article> getArtclesByTagName(String tagName);\n int addTag(@Param(\"articleId\") long articleId,@Param(\"tagName\") String tagName);\n}", "@Transactional\npublic ArrayList<Friend> getAllMyFriend(int myid) {\n\tSession session = sessionFactory.openSession();\n\tQuery q= session.createQuery(\"from Friend where status='A' and (user_id=\"+myid+\" or friendid=\"+myid+\")\" );\nArrayList<Friend> myfriends=(ArrayList<Friend>)q.list();\nreturn myfriends;\n\t}", "public List<Tutores> readAllJPQL() throws SecurityException{ \n String sql=\"Select tu from Tutores tu\";\n \n Query q=em.createQuery(sql); \n return q.getResultList();\n }", "@Transactional\n@Repository\npublic interface TagParameterDAO extends JpaRepository<TagParameter, Long>, JpaSpecificationExecutor<TagParameter> {\n\n @Query(value = \"SELECT * from tag_parameter as t where t.graph=:graph\", nativeQuery = true)\n List<TagParameter> getTagParameters(@Param(\"graph\") String graph);\n\n @Query(value = \"SELECT * from tag_parameter as t where t.graph=:graph and t.id in(:ids)\", nativeQuery = true)\n List<TagParameter> getTagParameters(@Param(\"graph\") String graph, @Param(\"ids\") Set<Long> ids);\n\n @Query(value = \"SELECT * from tag_parameter as t where t.graph=:graph and t.type in(:types)\", nativeQuery = true)\n List<TagParameter> getTagParametersByTypes(@Param(\"graph\") String graph, @Param(\"types\") Set<String> types);\n\n @Query(value = \"SELECT * from tag_parameter as t where t.graph=:graph and t.reference=:reference\", nativeQuery = true)\n TagParameter getTagParameterByReference(@Param(\"graph\") String graph, @Param(\"reference\") String reference);\n}", "List<MetaTag> findAll();", "@Override\n\tpublic List<Item> findItemListByQuery() {\n\t\tCriteriaBuilder cb=entityManager.getCriteriaBuilder();\n\t//\tCriteriaQuery<Item> query = cb.createQuery(Item.class); \n // Root<Item> item = query.from(Item.class);\n TypedQuery<Item> iquery=entityManager.createQuery(\"select i from Item i\", Item.class);\n\t\treturn iquery.getResultList();\n\t\t\n\t}", "public List<LugarEntity> findall(){\n Query q = em.createQuery(\"SELECT p FROM LugarEntity p\");\n return q.getResultList();\n }", "public interface TagDAO extends AbstractDAO<Tag, Integer> {\r\n\r\n public Tag findTagByName (String name);\r\n public List<Tag> findAllWithBooks ();\r\n public List<Tag> findByPopularity (int maxResult);\r\n public List<Tag> findTagByFirstLetters (String firstLetters, int maxResult);\r\n}", "private ArrayList<Parametro> getParametros(int pregunta){\n ArrayList<Parametro> arrayListParametros = new ArrayList<>();\n try{\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"ServiceQualificationPU\");\n EntityManager em = emf.createEntityManager();\n\n String jpql =\"SELECT p FROM ParametroInterrogante pi \"\n + \"JOIN pi.interrogante i \"\n + \"JOIN pi.parametro p \"\n + \"WHERE p.estado='a' AND i.estado='a' \"\n + \"AND i.idinterrogante = :pregunta\";\n\n Query query = em.createQuery(jpql);\n query.setParameter(\"pregunta\", pregunta);\n List<Parametro> list = query.getResultList();\n for(Parametro p : list){\n arrayListParametros.add(p);\n }\n\n em.close();\n emf.close();\n }catch(Exception e){\n System.out.println(\"ERROR: \"+e);\n this.Error = \"ERROR: \"+e;\n }\n return arrayListParametros;\n }", "public List<Tags> query(String sql) {\n return tagsDao.query(sql);\n }", "public static List<Book> getBookLocation() throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n \r\n Query query=session.getNamedQuery(\"INVENTORY_getBookLocation\");\r\n List<Book> bookLocationList=query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return bookLocationList;\r\n}", "List<Tag> getTagList();", "List<Tag> getTagList();", "List<Tag> findCertificateTags(int id);", "public List<Tag> getTagList();", "public static List<Book> getBookDetails_1() throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n \r\n Query query=session.getNamedQuery(\"INVENTORY_getAllBookList_1\");\r\n List<Book> bookList=query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return bookList;\r\n \r\n }", "public List<Pregunta> getPreguntasConTag(TagPregunta tag);", "public interface InventoryRepository extends JpaRepository<Inventory,Integer> {\n\n @Query(\"select i from Inventory i ,in(i.good) g where g.goodId=:goodId\")\n public List<Inventory> selectAllGoodId(@Param(\"goodId\") int goodId);\n}", "public List<Dia> getDias(){\n List<Dia> result= null;\n Session session = sessionFactory.openSession();\n Transaction tx=null;\n try{\n tx=session.beginTransaction();\n String hql= \"FROM Dia\";\n Query query =session.createQuery(hql);\n result=(List<Dia>)query.list();\n tx.commit();\n }catch (Exception e){\n if(tx != null)\n tx.rollback();\n e.printStackTrace(); \n }finally{\n session.close();\n }\n return result;\n }", "public interface GoodsDao {\n\n @Select(\"SELECT g.id, g.NAME, g.caption, g.image, g.price FROM xx_goods g LEFT JOIN \" +\n \" xx_product_category p on g.product_category = p.id LEFT JOIN xx_goods_tag t on g.id=t.goods \" +\n \" where p.tree_path LIKE ',${categoryId},%' AND t.tags = #{tagId} and g.is_marketable=1 order by g.id LIMIT #{limit}\")\n List<Goods> findHotGoods(@Param(value = \"categoryId\") Integer categoryId,\n @Param(value = \"tagId\")Integer tagId, @Param(value = \"limit\")Integer limit);\n}", "public static List<Book> getBookSellers() throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n \r\n Query query=session.getNamedQuery(\"INVENTORY_getBookSellers\");\r\n List<Book> bookLocationList=query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return bookLocationList;\r\n}", "@Repository\npublic interface TagRepository extends JpaRepository<Tag, Long> {\n Set<Tag> findByNameIn(Set<String> tagNames);\n}", "public interface TagsDao {\n /**\n * Returns all tags\n *\n * @return the list\n */\n List<Tag> index();\n\n /**\n * Find tag by tag id\n *\n * @param id the id\n * @return the tag\n */\n Tag findById(int id);\n\n /**\n * Find tag by tag name.\n *\n * @param name the name\n * @return the tag\n */\n Tag findByName(String name);\n\n /**\n * Find certificate tags list.\n *\n * @param id the id\n * @return the list\n */\n List<Tag> findCertificateTags(int id);\n\n /**\n * Save tag.\n *\n * @param tag the tag\n */\n void save(Tag tag);\n\n /**\n * Delete tag by id.\n *\n * @param id the id\n */\n void delete(int id);\n}", "public List<Todo> getAllToDosByTag(String tag_name) {\n List<Todo> todos = new ArrayList<Todo>();\n \n String selectQuery = \"SELECT * FROM \" + TABLE_TODO + \" td, \"\n + TABLE_TAG + \" tg, \" + TABLE_TODO_TAG + \" tt WHERE tg.\"\n + KEY_TAG_NAME + \" = '\" + tag_name + \"'\" + \" AND tg.\" + KEY_ID\n + \" = \" + \"tt.\" + KEY_TAG_ID + \" AND td.\" + KEY_ID + \" = \"\n + \"tt.\" + KEY_TODO_ID;\n \n Log.e(LOG, selectQuery);\n \n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n \n // prechadza vsetky riadky a pridava do listu\n if (c.moveToFirst()) {\n do {\n \tTodo td = new Todo();\n td.setId(c.getInt((c.getColumnIndex(KEY_ID))));\n td.setPoznamka((c.getString(c.getColumnIndex(KEY_TODO))));\n td.setStatus((c.getInt(c.getColumnIndex(KEY_STATUS))));\n td.setPriority((c.getInt(c.getColumnIndex(KEY_PRIORITY))));\n td.setDateRealized((c.getString(c.getColumnIndex(KEY_DATE))));\n td.setCreated(c.getString(c.getColumnIndex(KEY_CREATED_AT)));\n \n todos.add(td);\n } while (c.moveToNext());\n }\n \n return todos;\n }", "public List<TodoTag> getAllTodosTags() {\n List<TodoTag> todoTags = new ArrayList<TodoTag>();\n String vyber = \"SELECT * FROM \" + TABLE_TODO_TAG;\n \n Log.e(LOG, vyber);\n \n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(vyber, null);\n \n if (c.moveToFirst()) {\n do {\n \tTodoTag t = new TodoTag();\n t.setId(c.getInt((c.getColumnIndex(KEY_ID))));\n t.setTodo_id(c.getInt(c.getColumnIndex(KEY_TODO_ID)));\n t.setTag_id(c.getInt(c.getColumnIndex(KEY_TAG_ID)));\n todoTags.add(t);\n } while (c.moveToNext());\n }\n return todoTags;\n }", "@Override\n\tpublic List<BaiVietModel> findBaiVietByTag(String tag) {\n\t\treturn baiVietByTagDAO.findBaiVietByTag(tag);\n\t}", "@Override\n\tpublic Tags read(int tagID) {\n\t\treturn entityMgr.find(Tags.class, tagID);\n\t}", "public void findbyid() throws Exception {\n try {\n Ume_unidade_medidaDAO ume_unidade_medidaDAO = getUme_unidade_medidaDAO();\n List<Ume_unidade_medidaT> listTemp = ume_unidade_medidaDAO.getByPK( ume_unidade_medidaT);\t \n\n ume_unidade_medidaT= listTemp.size()>0?listTemp.get(0):new Ume_unidade_medidaT();\n \n } catch (Exception e) {\n e.printStackTrace();\n setMsg(\"Falha ao realizar consulta!\");\t\n } finally {\n\tclose();\n }\n }", "public static void main(String[] args) {\n\r\n\t\tEntityManager em = PersistanceManager.INSTANCE.getEntityManager();\r\n\t\tSystem.out.println(\"Print ALL\");\r\n\t\tQuery query = em.createQuery(\"FROM Employee e\");\r\n\t\tArrayList<Employee> result = (ArrayList<Employee>) query.getResultList();\r\n\t\tfor (Employee current : result)\r\n\t\t\tSystem.out.println(current.toString());\r\n\t\tSystem.out.println(\"Print id = 3\");\r\n\t\tQuery query1 = em.createQuery(\"FROM Employee e where e.id=3\");\r\n\t\tArrayList<Employee> result1 = (ArrayList<Employee>) query1.getResultList();\r\n\t\tfor (Employee current : result1)\r\n\t\t\tSystem.out.println(current.toString());\r\n\t\tSystem.out.println(\"Print Named Query \");\r\n\t\tArrayList<Employee> result2 = (ArrayList<Employee>) em.createNamedQuery(\"Employee.searchAll\").setParameter(\"empName\", \"D%\")\r\n\t\t\t\t.getResultList();\r\n\t\tfor (Employee current : result2)\r\n\t\t\tSystem.out.println(current.toString());\r\n\t}", "private List<String> getAllTagsOfUser(Integer userId){\n \t List<String> openTags = new ArrayList<String>();\n \t DataLayerFactory factory = new DataLayerFactory(db);\n \t PostDataLayer postDataLayer = factory.createPostDataLayer();\n \t List<Question> userQuestions = postDataLayer.getQuestionsOfUser(userId, OrderCriteria.CREATION_DATE);\n \t for (Question question : userQuestions) \n \t\t for (String tag : question.getTags()) {\n\t\t\t\tif (!openTags.contains(tag)) {\n\t\t\t\t\topenTags.add(tag);\n\t\t\t\t}\n\t\t\t}\n \t\t\t\n \t return openTags;\n \t\t}", "public void loadQuestions() \n {\n try{\n ArrayList<QuestionPojo> questionList=QuestionDao.getQuestionByExamId(editExam.getExamId());\n for(QuestionPojo obj:questionList)\n {\n qstore.addQuestion(obj);\n }\n }\n catch(SQLException ex)\n {\n JOptionPane.showMessageDialog(null, \"Error while connecting to DB!\",\"Exception!\",JOptionPane.ERROR_MESSAGE);\n ex.printStackTrace();\n\n }\n }", "public interface AnswerRepository extends JpaRepository<Answer, Integer> {\n\n List<Answer> findByQuestionId(Integer questionId);\n}", "MemberTag selectByPrimaryKey(Long id);", "@Repository\r\npublic interface QuestionSpeciesJpaRepo extends JpaRepository<QuestionSpeciesEntity, String> {\r\n\r\n @Query(\"from QuestionSpeciesEntity where questionSetId=?1 and deleted=0 order by speciesIndex asc\")\r\n List<QuestionSpeciesEntity> findByQuestionSetId(String questionSetId);\r\n}", "public List<Musuarios> findAll2() {\n Query q = em.createQuery(\"SELECT m FROM Musuarios m\");\n //q.setParameter(\"Rut_Usuario\",\"13274161-1\");\n //List<Musuarios> usr;\n //objmusuarios = new Musuarios[10];\n List<Musuarios> usr = q.getResultList();\n //for(int i = 0; i++; i > usr.\n return usr;\n }", "@Override\n\tpublic List<Tags> getlist() {\n\t\treturn TagsRes.findAll();\n\t}", "@Override\n\tpublic List<T> find(String hql) {\n\t\treturn hibernateTemplate.find(hql);\n\t}", "private List<Integer> findAllId(EntityManager em) {\n TypedQuery<Permesso> permessoQuery = em.createQuery(\"SELECT c FROM com.hamid.entity.Permesso c\", Permesso.class);\n List<Permesso> permessoRes = permessoQuery.getResultList();\n List<Integer> p_id = new ArrayList<Integer>();\n for (Permesso p : permessoRes) {\n int p_id1 = p.getPermesso_id();\n p_id.add(p_id1);\n }\n return p_id;\n }", "public List<QuestionEntity> getAllQuestions() {\n try {\n return entityManager.createNamedQuery(\"getAllQuestions\", QuestionEntity.class).getResultList();\n } catch (NoResultException nre) {\n return null;\n }\n }", "public List getTags();", "@Override\n\tpublic List<Item> findItemList() {\n\t\tCriteriaBuilder cb=entityManager.getCriteriaBuilder();\n\t\tCriteriaQuery<Item> query = cb.createQuery(Item.class); \n // Root<Item> item = query.from(Item.class);\n List<Item> itemList= entityManager.createQuery(query).getResultList();\n\t\treturn itemList;\n\t}", "@Dao\npublic interface TagDao {\n // Добавление Article в бд\n @Insert\n void insertAll(Tag... tags);\n\n // Удаление Article из бд\n @Update\n void update(Tag tag);\n\n // Удаление Article из бд\n @Delete\n void delete(Tag tag);\n\n @Query(\"DELETE FROM tag\")\n void clearTags();\n\n @Query(\"SELECT * FROM tag WHERE data = :data\")\n Tag getTag(String data);\n\n // Получение всех тегов\n @Query(\"SELECT * FROM tag ORDER BY data ASC\")\n List<Tag> getAllTags();\n\n // сколько всего тегов\n @Query(\"SELECT COUNT(*) FROM tag\")\n int getCount();\n\n// @Query(\"INSERT INTO tag SET x=1, y=2 ON DUPLICATE KEY UPDATE x=x+1, y=y+2\")\n// void insertOrUpdate(Tag tag);\n}", "public List<Pregunta> getPreguntasConTag(String tag);", "@Test\n public void testGetComponentesByTag() {\n System.out.println(\"getComponentesByTag\");\n query = mock(Query.class);\n String nativeQuery = \"Componente.findByTag\";\n List<Componente> expected = new ArrayList<>();\n when(this.em.createNativeQuery(nativeQuery)).thenReturn(query);\n when(cDao.getComponentesByTag(anyString(), anyInt(), anyString())).thenReturn(expected);\n List<Componente> result = cDao.getComponentesByTag(anyString(), anyInt(), anyString());\n assertThat(result, is(expected));\n }", "public void answerQuestion(){\n for (int i = 0; i < questionList.size(); i++){\r\n if (questionList.get(i).question.startsWith(\"How\")){\r\n howQuestions.add(new Question(questionList.get(i).id, questionList.get(i).question, questionList.get(i).answer));\r\n }\r\n }\r\n\r\n // Print All When Questions\r\n System.out.println(\"How Questions\");\r\n for (int i = 0; i < howQuestions.size(); i++){\r\n System.out.println(howQuestions.get(i).question);\r\n }\r\n\r\n //==== Question Entities ====\r\n // Split All When Question to only questions that have the entities\r\n if (!howQuestions.isEmpty()){\r\n if (!questionEntities.isEmpty()){\r\n for (int c = 0; c < questionEntities.size(); c++){\r\n for (int i = 0; i < howQuestions.size(); i++){\r\n if (howQuestions.get(i).question.contains(questionEntities.get(c))){\r\n answers.add(new Question(howQuestions.get(i).id, howQuestions.get(i).question, howQuestions.get(i).answer));\r\n }\r\n }\r\n }\r\n }\r\n else{\r\n if (!questionTags.isEmpty()){\r\n for (int c = 0; c < questionTags.size(); c++){\r\n for (int i = 0; i < howQuestions.size(); i++){\r\n if (howQuestions.get(i).question.contains(questionTags.get(c))){\r\n answers.add(new Question(howQuestions.get(i).id, howQuestions.get(i).question, howQuestions.get(i).answer));\r\n }\r\n }\r\n }\r\n }\r\n else{\r\n System.out.println(\"There no answer for your question !\");\r\n System.exit(0);\r\n }\r\n }\r\n }\r\n\r\n // Print All Entities Questions\r\n System.out.println(\"Questions of 'How' that have entities and tags :\");\r\n for (int i = 0; i < answers.size(); i++){\r\n for (int j = 1; j < answers.size(); j++){\r\n if (answers.get(i).id == answers.get(j).id){\r\n answers.remove(j);\r\n }\r\n }\r\n }\r\n \r\n for (int i = 0; i < answers.size(); i++){\r\n System.out.println(answers.get(i).question);\r\n }\r\n\r\n\r\n //==== Question Tags ====\r\n for (int i = 0; i < questionTags.size(); i++){\r\n for (int k = 0; k < answers.size(); k++){\r\n if (answers.get(k).question.contains(questionTags.get(i))){\r\n continue;\r\n }\r\n else{\r\n answers.remove(k);\r\n }\r\n }\r\n }\r\n }", "VoteList selectByPrimaryKey(Integer id);", "ArticleTag selectByPrimaryKey(Long articleTagId);", "public List<Product> selectProductListByCategory(String category) {\n return entityManager.createQuery(\"SELECT p FROM Product p JOIN Category c ON p.category.id=c.id WHERE c.name=:category \")\n .setParameter(\"category\", category).getResultList();\n\n }", "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 }", "List<AnswerList> findAllAnsList();", "@Override\r\n\tpublic List<T> find(String hql) throws Exception {\n\t\treturn this.getcurrentSession().createQuery(hql).list();\r\n\t}", "public interface STagTopicDAO extends BaseDAO<STagTopic> {\n /**\n * Retrieves semantic tags of topics with given id from table \"STAGTopic\"\n * @param id the id of topic\n * @return list of Semantic Tags\n */\n List<SemanticTag> getSTagByTopicId(long id);\n\n /**\n * Retrieves result set by checking semantic tags related to query\n * @param keywords search query\n * @return list of topics\n */\n List<Topic> searchTopicBySTag(String[] keywords);\n}", "private void getDepartamentos() {\n try{\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"ServiceQualificationPU\");\n EntityManager em = emf.createEntityManager();\n\n\n String jpql =\"SELECT d FROM Departamento d \"\n + \"WHERE d.estado = 'a'\";\n\n Query query = em.createQuery(jpql);\n List<Departamento> listDepartamentos = query.getResultList();\n ArrayList<Departamento> arrayListDepartamentos = new ArrayList<>();\n for(Departamento d: listDepartamentos){\n arrayListDepartamentos.add(d);\n }\n this.Listdepartamentos = arrayListDepartamentos;\n em.close();\n emf.close();\n }\n catch(Exception e){\n System.out.println(\"ERROR: \"+e);\n this.Error = \"ERROR: \"+e;\n }\n }", "public List<ParamIntervento> getAll()\n {\n\t System.out.println(\"chiamo getAll: \");\n System.out.flush();\n CriteriaQuery<ParamIntervento> criteria = this.entityManager.getCriteriaBuilder().createQuery(ParamIntervento.class);\n return this.entityManager.createQuery(criteria.select(criteria.from(ParamIntervento.class))).getResultList();\n }", "public Tag[] getTags(Music music) {\n SQLiteDatabase db = musicDatabase.getReadableDatabase();\n\n Cursor cur = db.rawQuery(\"SELECT tagId FROM musicTagRelation WHERE musicId=? ORDER BY created_at DESC\", new String[] { String.valueOf(music.id) });\n int count = cur.getCount();\n int[] tagIds = new int[count];\n for (int i=0; i<count; i++) {\n cur.moveToNext();\n tagIds[i] = cur.getInt(0);\n }\n\n return musicDatabase.tagTable.get(tagIds);\n }", "@Repository\npublic interface QuestionRepository extends JpaRepository<Question,Long> ,Serializable{\n\n Question findById(Long id);\n\n @Query(value = \"select q.lang from Question q where q.lang =?1 or q.lang=?2 or q.lang=?3 or q.lang=?4 limit 0,?5 \",nativeQuery = true)\n List<String> findLang(String A, String B, String C, String D, int count);\n\n @Query(value = \"select * from Question q where q.lang =?1 or q.lang=?2 or q.lang=?3 or q.lang=?4 limit 0,?5 \",nativeQuery = true)\n List<Question> find(String A, String B, String C, String D, int count);\n//@Query(\"select q from Question q where lang =?1 or lang=?2 or lang=?3 or lang=?4\")\n//List<Question> find(String A, String B, String C, String D);\n\n @Query(value = \"select q.answer from Question q where q.lang =?1 or q.lang=?2 or q.lang=?3 or q.lang=?4 limit 0,?5 \",nativeQuery = true)\n List<String> findAnwserList(String A, String B, String C, String D, int count);\n\n\n}", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<AssesmentQuestion> list() {\r\n\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tCriteria criteria = session.createCriteria(AssesmentQuestion.class);\r\n\r\n\t\tList<AssesmentQuestion> assesmentQuestionList = null;\r\n\t\ttry {\r\n\t\t\tassesmentQuestionList = criteria.list();\r\n\t\t\t// tx.commit();\r\n\t\t} catch (HibernateException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tsession.close();\r\n\t\t}\r\n\r\n\t\treturn assesmentQuestionList;\r\n\r\n\t}", "@Override\r\n\tpublic List<Integer> getAllTeacherId() {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"select id from Teacher where state=:state\";\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Integer> lists = session.createQuery(hql).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getAllTeacherId()\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public void populateTags(List<Drop> drops, Account queryingAccount) {\n \n \t\tList<Long> dropIds = new ArrayList<Long>();\n \t\tfor (Drop drop : drops) {\n \t\t\tdropIds.add(drop.getId());\n \t\t}\n \n \t\tString sql = \"SELECT `droplet_id`, `tag_id` AS `id`, `tag`, `tag_canonical`, `tag_type` \";\n \t\tsql += \"FROM `droplets_tags` \";\n \t\tsql += \"INNER JOIN `tags` ON (`tags`.`id` = `tag_id`) \";\n \t\tsql += \"WHERE `droplet_id` IN :drop_ids \";\n \t\tsql += \"AND `tags`.`id` NOT IN ( \";\n \t\tsql += \"\tSELECT `tag_id` FROM `account_droplet_tags` \";\n \t\tsql += \"\tWHERE `account_id` = :account_id \";\n \t\tsql += \"\tAND `droplet_id` IN :drop_ids \";\n \t\tsql += \"\tAND `deleted` = 1) \";\n \t\tsql += \"UNION ALL \";\n \t\tsql += \"SELECT `droplet_id`, `tag_id` AS `id`, `tag`, `tag_canonical`, `tag_type` \";\n \t\tsql += \"FROM `account_droplet_tags` \";\n \t\tsql += \"INNER JOIN `tags` ON (`tags`.`id` = `tag_id`) \";\n \t\tsql += \"WHERE `droplet_id` IN :drop_ids \";\n \t\tsql += \"AND `account_id` = :account_id \";\n \t\tsql += \"AND `deleted` = 0 \";\n \n \t\tQuery query = em.createNativeQuery(sql);\n \t\tquery.setParameter(\"drop_ids\", dropIds);\n \t\tquery.setParameter(\"account_id\", queryingAccount.getId());\n \n \t\t// Group the tags by drop id\n \t\tMap<Long, List<Tag>> tags = new HashMap<Long, List<Tag>>();\n \t\tfor (Object oRow : query.getResultList()) {\n \t\t\tObject[] r = (Object[]) oRow;\n \n \t\t\tLong dropId = ((BigInteger) r[0]).longValue();\n \t\t\tTag tag = new Tag();\n \t\t\ttag.setId(((BigInteger) r[1]).longValue());\n \t\t\ttag.setTag((String) r[2]);\n \t\t\ttag.setType((String) r[4]);\n \n \t\t\tList<Tag> t = tags.get(dropId);\n \t\t\tif (t == null) {\n \t\t\t\tt = new ArrayList<Tag>();\n \t\t\t\ttags.put(dropId, t);\n \t\t\t}\n \n \t\t\tt.add(tag);\n \t\t}\n \n \t\tfor (Drop drop : drops) {\n \t\t\tList<Tag> t = tags.get(drop.getId());\n \n \t\t\tif (t != null) {\n \t\t\t\tdrop.setTags(t);\n \t\t\t} else {\n \t\t\t\tdrop.setTags(new ArrayList<Tag>());\n \t\t\t}\n \t\t}\n \n \t}", "public static List<Book> searchEBookByName(String name) throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n\r\n Query query = session.getNamedQuery(\"INVENTORY_searchBookByName\").setString(\"name\", name);\r\n\r\n List<Book> resultList = query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return resultList;\r\n \r\n }", "public ArrayList<Movie> getMoviesByTag(String tag){\n String query = \"SELECT id, title, year, rtAudienceScore, rtPictureURL, \"\n + \"imdbPictureURL FROM movies, movie_tags \"\n + \"WHERE id=movieID AND tagID IN (SELECT id FROM tags \"\n + \"WHERE value LIKE '%\" + tag + \"%') \"\n + \"GROUP BY title \"\n + \"ORDER BY rtAudienceScore DESC\";\n ResultSet rs = null;\n ArrayList<Movie> movieList = new ArrayList<Movie>();\n try{\n con = ConnectionFactory.getConnection();\n stmt = con.createStatement();\n rs = stmt.executeQuery(query);\n while(rs.next()){\n int id = rs.getInt(\"id\");\n String movie_title = rs.getString(\"title\").trim();\n int year = rs.getInt(\"year\");\n int rtAudienceScore = rs.getInt(\"rtAudienceScore\");\n String rtPictureURL = rs.getString(\"rtPictureURL\").trim();\n String imdbPictureURL = rs.getString(\"imdbPictureURL\").trim();\n movieList.add(new Movie(id, movie_title,year,imdbPictureURL,\n rtPictureURL,rtAudienceScore));\n }\n con.close();\n stmt.close();\n rs.close();\n }\n catch(SQLException e){\n e.printStackTrace();\n }\n return movieList;\n }", "UniqueTagList getTags();", "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}", "List<TagData> selectByExample(TagDataExample example);", "public List<ITag> getTags ();", "protected List findByNamedQuery(Class clazz, String namedQuery) {\r\n try {\r\n Query q = entityManager.createNamedQuery(clazz.getSimpleName() + \".\" + namedQuery);\r\n return q.getResultList();\r\n } catch (Exception e) {\r\n //Nao e um erro :)\r\n }\r\n return null;\r\n }", "Tag findByName(String name);", "MetaTag findById(int metaTagId);", "public static List<Book> getBookName() throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n \r\n Query query=session.getNamedQuery(\"INVENTORY_getBookName\");\r\n List<Book> bookNameList=query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return bookNameList;\r\n }", "public List<Tool> findByTags(String[] tags) {\n String sql = \"SELECT tool \"\n + \" FROM Tool tool \"\n + \" LEFT JOIN tool.tags tag\"\n + \" WHERE tool.active = TRUE\";\n Map<String, String> params = new HashMap<String, String>();\n if (tags != null) {\n int paramNumber = 0;\n for (String tag : tags) {\n sql += \" AND lower(tag.name) = :param\" + paramNumber;\n params.put(\"param\" + paramNumber++, tag);\n }\n }\n Query query = getEntityManager().createQuery(sql);\n for (Map.Entry<String, String> entry : params.entrySet()) {\n query.setParameter(entry.getKey(), entry.getValue());\n }\n return query.getResultList();\n }", "@Repository\npublic interface AnswerRepository extends JpaRepository<Answer, Long> {\n\n @Query(\"SELECT a FROM Answer as a WHERE a.question.id = :questionId ORDER BY a.position ASC\")\n List<Answer> findQuestionAnswersOrderedByPosition(@Param(\"questionId\") long questionId);\n\n @Query(\"SELECT a FROM Answer as a WHERE a.isCorrect = true AND a.question.id = :questionId\")\n List<Answer> findQuestionCorrectAnswers(@Param(\"questionId\") long questionId);\n}", "public List<Questions> getAllQuestionsMedium() {\n List<Questions> questionList = new ArrayList<>();\n db = getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + QuestionsTable.Table_name + \" WHERE _id BETWEEN 11 AND 20\", null);\n\n if (c.moveToFirst()){\n do {\n Questions question = new Questions();\n question.setQuestion(c.getString(c.getColumnIndex(QuestionsTable.Column_Question)));\n question.setOption1(c.getString(c.getColumnIndex(QuestionsTable.Column_Option1)));\n question.setOption2(c.getString(c.getColumnIndex(QuestionsTable.Column_Option2)));\n question.setOption3(c.getString(c.getColumnIndex(QuestionsTable.Column_Option3)));\n question.setOption4(c.getString(c.getColumnIndex(QuestionsTable.Column_Option4)));\n question.setAnswerNr(c.getInt(c.getColumnIndex(QuestionsTable.Column_Answer_Nr)));\n questionList.add(question);\n } while (c.moveToNext());\n }\n c.close();\n return questionList;\n }", "public List searchCategoryName(categoryvo categoryvo1) {\nList l1=new ArrayList();\r\n\t\t\r\n\t\ttry{\r\n\t\tSessionFactory sessionFactory=new Configuration().configure().buildSessionFactory();\r\n\t\tSession session =sessionFactory.openSession();\r\n\t\t\r\n\t\tQuery q=session.createQuery(\"from categoryvo where cat_id='\"+categoryvo1.getCat_id()+\"'\");\r\n\t\tl1=q.list();\r\n\t\t\r\n\t\tSystem.out.println(\"done\");\r\n\t\t\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\treturn l1;\r\n\r\n\t}", "public List<MultQuestion> multChoiceQuestions(int qid);", "public void jpqlFiltri() {\n em.getTransaction().begin();\n Query q = em.createQuery(\"SELECT c FROM Customer c WHERE c.customer_id between 340 and 345\");\n\n List<Customer> listF = q.getResultList();\n\n System.out.println(\"I Customer con id tra 340 e 345 sono:\");\n\n for (Customer c : listF) {\n System.out.println(c.getCustomerId() + c.getFirstName() + c.getLastName());\n\n }\n\n Query q1 = em.createQuery(\"SELECT c FROM Customer c WHERE c.first_name like 'S%'\");\n\n List<Customer> listF2 = q1.getResultList();\n\n System.out.println(\"I Customer con nome che inizia per la lettera S sono:\");\n\n for (Customer c : listF2) {\n System.out.println(c.getCustomerId() + c.getFirstName() + c.getLastName());\n\n }\n\n em.getTransaction().commit();\n em.close();\n emf.close();\n }", "@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\n public List<Product> getProductFindAll() {\n return em.createNamedQuery(\"Product.findAll\", Product.class).getResultList();\n }", "@Override\r\n\tpublic List<T> find(String hql, Object[] param) {\n\t\tQuery q = this.getcurrentSession().createQuery(hql);\r\n\t\tif (param != null && param.length > 0) {\r\n\t\t\tfor (int i = 0; i < param.length; i++) {\r\n\t\t\t\tq.setParameter(i, param[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn q.list();\r\n\t}", "@Transactional(readOnly = true)\r\n\t@Override\r\n\tpublic List<Danmu> getallByvidueid(int id) {\n\t\treturn dd.getallByvidueid(id);\r\n\t}", "public List<IEntity> query(IQuery query) throws SQLException;" ]
[ "0.65693676", "0.6467249", "0.6217501", "0.6209293", "0.6119254", "0.59644854", "0.59340215", "0.59332836", "0.584551", "0.5839861", "0.577201", "0.57196665", "0.5708779", "0.5693597", "0.5689997", "0.56772655", "0.5675452", "0.5667555", "0.56660026", "0.56329346", "0.56009984", "0.5593752", "0.555662", "0.55517155", "0.5550968", "0.5544979", "0.55129737", "0.54901314", "0.54704756", "0.5469345", "0.5465933", "0.5464136", "0.5407205", "0.5407205", "0.53903484", "0.53865314", "0.53754514", "0.53673077", "0.5361088", "0.53536075", "0.5353089", "0.5331207", "0.53267914", "0.53201675", "0.5316668", "0.5315385", "0.530785", "0.53074557", "0.5306475", "0.53015375", "0.5297731", "0.5293296", "0.52919006", "0.52905023", "0.52870727", "0.5279952", "0.527801", "0.5275599", "0.5273378", "0.5263894", "0.52346194", "0.5220203", "0.52194786", "0.5214452", "0.52089256", "0.52063423", "0.5206153", "0.52056456", "0.5198675", "0.5191759", "0.51864916", "0.51771283", "0.51753587", "0.5173982", "0.5171258", "0.51671094", "0.5167099", "0.51652735", "0.5162147", "0.5148029", "0.5147941", "0.5139642", "0.51375675", "0.5129266", "0.51192087", "0.5118218", "0.51149523", "0.5113438", "0.51123446", "0.5109402", "0.5100295", "0.50978607", "0.50977445", "0.50863874", "0.508189", "0.50787914", "0.5067758", "0.5057557", "0.505369", "0.5048532" ]
0.7099037
0
Use GoodsItem.newBuilder() to construct.
private GoodsItem(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private GoodsItem(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "private InventoryItemProto(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public Item(){\n description = \"No description avaible for this item\";\n weight = 0;\n }", "private Item initItem() {\n String name = inputName.getText().toString();\n int quantityToBuy = -1;\n if (!inputQuantityToBuy.getText().toString().equals(\"\"))\n quantityToBuy = Integer.parseInt(inputQuantityToBuy.getText().toString());\n String units = inputUnits.getText().toString();\n double price = 0;\n if (!inputPrice.getText().toString().equals(\"\"))\n price = Double.parseDouble(inputPrice.getText().toString());\n int calories = 0;\n if (!inputCalories.getText().toString().equals(\"\"))\n calories = Integer.parseInt(inputCalories.getText().toString());\n ArrayList<String> allergies = allergyActions.getAllergies();\n return new Item(name, 0, units, quantityToBuy, 0, allergies, calories, price);\n }", "@Nonnull\n public static UBL23WriterBuilder <GoodsItemItineraryType> goodsItemItinerary ()\n {\n return UBL23WriterBuilder.create (GoodsItemItineraryType.class);\n }", "private C_SellItem(Builder builder) {\n super(builder);\n }", "public Item() {\r\n this.name = \"\";\r\n this.description = \"\";\r\n this.price = 0F;\r\n this.type = \"\";\r\n this.available = 0;\r\n this.wholesaler = new Wholesaler();\r\n this.wholesalerId = 0;\r\n this.category = new Category();\r\n this.categoryId = 0; \r\n }", "private S_UseItem(Builder builder) {\n super(builder);\n }", "private C_UseItem(Builder builder) {\n super(builder);\n }", "public FinalMysteryItem() {\n int randomIndex = new Random().nextInt(7);\n item = new Item(listOfPossibleNames[randomIndex], PRICE_TO_BUY);\n }", "public GItem(Item i) {\n this.mGItem = i.getId();\n this.title = i.getTitle();\n\n if (!i.getAddress().equals(\"\")){\n this.address = i.getAddress();\n }\n\n if (i instanceof OfficerItem){\n this.type = 1;\n\n } else if (i instanceof CompanyItem){\n this.type = 0;\n }\n\n }", "Item(){\r\n\t\tthis(0, new Weight(5), new DukatAmount(0));\r\n\t}", "private CatalogItem(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public Item(String itemName, String itemDescription){\n this.itemName = itemName;\n this.itemDescription = itemDescription;\n}", "public InventoryItem(){\r\n this.itemName = \"TBD\";\r\n this.sku = 0;\r\n this.price = 0.0;\r\n this.quantity = 0;\r\n nItems++;\r\n }", "private Item(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "@SuppressWarnings(\"unused\")\n public Item() {\n }", "public Item() {}", "private C_FuseItem(Builder builder) {\n super(builder);\n }", "private Item(){}", "private S_FuseItem(Builder builder) {\n super(builder);\n }", "public Good() {\n }", "private S_SynBagItem(Builder builder) {\n super(builder);\n }", "private void makeBag(final HashMap<Integer, Integer> legalGoods,\n final HashMap<Integer, Integer> illegalGoods) {\n if (!legalGoods.isEmpty()) {\n this.putLegalGoods(legalGoods);\n } else {\n this.putIllegalGood(illegalGoods);\n this.setDeclaredGood(0);\n }\n }", "public io.opencannabis.schema.commerce.OrderItem.Item.Builder getItemBuilder(\n int index) {\n return getItemFieldBuilder().getBuilder(index);\n }", "@Nonnull\n public static UBL23WriterBuilder <GoodsCertificateType> goodsCertificate ()\n {\n return UBL23WriterBuilder.create (GoodsCertificateType.class);\n }", "public Item(){}", "public Item(int weigth, String name, String description) {\n this.weigth = weigth;\n this.name = name;\n this.description = description;\n }", "Item(Weight weight){\r\n\t\tthis(0, weight, new DukatAmount(0));\r\n\t}", "public Goods(String upc, String name, int quantity, Double price, String location,\r\n Double cost, int threshold) {\r\n this.upc = upc;\r\n this.name = name;\r\n this.quantity = quantity;\r\n this.price = price;\r\n this.location = location;\r\n this.cost = cost;\r\n this.threshold = threshold;\r\n }", "private void createItems()\n {\n Item belt, nappies, phone, money, cigarretes, \n jacket, cereal, shoes, keys, comics, bra, \n bread, bowl, computer;\n\n belt = new Item(2,\"Keeps something from falling\",\"Belt\");\n nappies = new Item(7,\"Holds the unspeakable\",\"Nappies\");\n phone = new Item(4, \"A electronic device that holds every answer\",\"Iphone 10\");\n money = new Item(1, \"A form of currency\",\"Money\");\n cigarretes = new Item(2,\"It's bad for health\",\"Cigarretes\");\n jacket = new Item(3,\"Keeps you warm and cozy\", \"Jacket\");\n cereal = new Item(3, \"What you eat for breakfast\",\"Kellog's Rice Kripsies\");\n shoes = new Item(5,\"Used for walking\", \"Sneakers\");\n keys = new Item(2, \"Unlock stuff\", \"Keys\");\n comics = new Item(2, \"A popular comic\",\"Batman Chronicles\");\n bra = new Item(3,\"What is this thing?, Eeeewww\", \"Bra\");\n bread = new Item(6,\"Your best source of carbohydrates\",\"Bread\");\n bowl = new Item(4,\"where food is placed\",\"Plate\");\n computer = new Item(10,\"A computational machine\",\"Computer\");\n\n items.add(belt);\n items.add(nappies);\n items.add(phone);\n items.add(money);\n items.add(cigarretes);\n items.add(jacket);\n items.add(cereal);\n items.add(shoes);\n items.add(keys);\n items.add(comics);\n items.add(bra);\n items.add(bread);\n items.add(bowl);\n items.add(computer);\n }", "public Item(String des, double w){\n description = des;\n weight = w;\n }", "@Nonnull\n public static UBL23WriterBuilder <GoodsItemPassportType> goodsItemPassport ()\n {\n return UBL23WriterBuilder.create (GoodsItemPassportType.class);\n }", "public Item(String itemName, double itemPrice, int numPurchased)\n {\n \tname = itemName;\n \tprice = itemPrice;\n \tquantity = numPurchased;\n }", "Item(DukatAmount price){\r\n\t\tthis(0, new Weight(5), price);\r\n\t}", "public Item() \r\n\t{\r\n\t\tname = \"AbstractItem\";\r\n\t\tdescription = \"Example Item Generated\";\r\n\t\tprice = 0;\r\n\t}", "void createItem (String name, String description, double price);", "public Item()\n {\n super();\n }", "public interface Goods {\n\n int price();\n String name();\n String description();\n\n}", "public ItemInfo () {}", "public Item() {\n\t}", "public Item() {\n\t}", "public Item() {\n }", "public Item() {\n }", "public io.opencannabis.schema.commerce.OrderItem.Item.Builder addItemBuilder() {\n return getItemFieldBuilder().addBuilder(\n io.opencannabis.schema.commerce.OrderItem.Item.getDefaultInstance());\n }", "public OrderItem() {}", "Item(int i, String n, String c, double p) {\n this.id = i;\n this.name = n;\n this.category = c;\n this.price = p;\n }", "public DessertItem() {\n this(\"\");\n }", "public Item createItem() {\n if(pickUpImplementation == null)\n {\n pickUpImplementation = new DefaultPickUp();\n }\n\n if(lookImplementation == null)\n {\n lookImplementation = new DefaultLook(R.string.default_look);\n }\n\n if(defaultItemInteraction == null)\n {\n throw new IllegalArgumentException(\"No default interaction specified!\");\n }\n\n\n return new Item(\n id,\n name,\n pickUpImplementation,\n lookImplementation,\n useImplementation,\n defaultItemInteraction\n );\n }", "public Item(String itemName, String itemList, String itemNote, int itemNumStocks, String itemExpireDate, int itemID) {\n this.itemName = itemName;\n this.itemList = itemList;\n this.itemNote = itemNote;\n this.itemNumStocks = itemNumStocks;\n this.itemExpireDate = itemExpireDate;\n this.itemID = itemID;\n }", "public Item()\r\n\t{\r\n\t\tserialNum = 00000;\r\n\t\tweight = 0.0;\r\n\t}", "protected abstract void makeItem();", "public Objects(String item, double baseprice){\r\n this.item = item;\r\n this.baseprice = baseprice;\r\n }", "public EnterpriseBeansItem() {\n super();\n }", "protected abstract Item createTestItem3();", "public ItemRecord(String itemid, String productid, BigDecimal listprice, BigDecimal unitcost, Integer supplier, String status, String attr1, String attr2, String attr3, String attr4, String attr5) {\n super(Item.ITEM);\n\n set(0, itemid);\n set(1, productid);\n set(2, listprice);\n set(3, unitcost);\n set(4, supplier);\n set(5, status);\n set(6, attr1);\n set(7, attr2);\n set(8, attr3);\n set(9, attr4);\n set(10, attr5);\n }", "public NewItems() {\n super();\n }", "public Good(String name, double volume, String imgFilePath, double price) {\n this.name = name;\n this.volume = volume;\n this.imgFilePath = imgFilePath;\n this.price = price;\n }", "Item(long ID, DukatAmount price){\r\n\t\tthis(ID, new Weight(5), price);\r\n\t}", "public Item_Record() {\n super(Item_.ITEM_);\n }", "public Item(String name, String image, String flavour, int price) {\n\t\tthis.name = name;\n\t\tthis.image = image;\n\t\tthis.flavour = flavour;\n\t\tthis.price = price;\n\t}", "public Item(String description, double weight, String name)\n {\n this.description = description;\n this.weight = weight;\n this.name = name;\n }", "@Override\n\tpublic Item create() {\n\t\tLOGGER.info(\"Shoe Name\");\n\t\tString item_name = util.getString();\n\t\tLOGGER.info(\"Shoe Size\");\n\t\tdouble size = util.getDouble();\n\t\tLOGGER.info(\"Set Price\");\n\t\tdouble price = util.getDouble();\n\t\tLOGGER.info(\"Number in Stock\");\n\t\tlong stock = util.getLong();\n\t\tItem newItem = itemDAO.create(new Item(item_name, size, price, stock));\n\t\tLOGGER.info(\"\\n\");\n\t\treturn newItem;\n\t}", "QuoteItem createQuoteItem();", "public BasketItemBuilder(BasketItem copyFrom) {\n this.id = copyFrom.getId();\n this.quantity = copyFrom.getQuantity();\n this.label = copyFrom.getLabel();\n this.category = copyFrom.getCategory();\n this.amount = copyFrom.getIndividualAmount();\n this.baseAmount = copyFrom.getIndividualBaseAmount();\n this.measurement = copyFrom.getMeasurement();\n if (copyFrom.hasReferences()) {\n this.references = copyFrom.getReferences();\n }\n if (copyFrom.hasItemData()) {\n this.itemData = copyFrom.getItemData();\n }\n if (copyFrom.hasModifiers()) {\n this.modifiers = copyFrom.getModifiers();\n }\n }", "public ItemSummary() {\n }", "public Goodsinfo(Integer goodsId, Integer goodstypeId, String goodsName, Float goodsPrize, String goodsNote) {\n this.goodsId = goodsId;\n this.goodstypeId = goodstypeId;\n this.goodsName = goodsName;\n this.goodsPrize = goodsPrize;\n this.goodsNote = goodsNote;\n }", "public Item(String description) {\n this.description = description;\n }", "public ItemRecord() {\n super(Item.ITEM);\n }", "public Item(int id, String name, int quantity, double price, Supplier supplier){\r\n toolId = id;\r\n toolName = name;\r\n toolQuantity = quantity;\r\n toolPrice = price;\r\n toolSupplier = supplier;\r\n }", "public Item(Item item) {\n setId(item.getId());\n setName(item.getName());\n setPrice(item.getPrice());\n setWasPurchased(item.wasPurchased());\n setOrder(item.getOrder());\n setStoreName(item.getStoreName());\n }", "public BasketItemBuilder() {\n generateRandomId();\n }", "@NonNull\n protected AbstractEntityItem.Builder newBuilder(\n @NonNull IRequiredValueModelNodeItem item,\n @NonNull ItemType itemType,\n @NonNull String identifier) {\n return new AbstractEntityItem.Builder()\n .instance(item, itemType)\n .originalIdentifier(identifier)\n .source(ObjectUtils.requireNonNull(item.getBaseUri(), \"item must have an associated URI\"));\n }", "public ItemBlock createItemBlock() {\n\t\treturn new GenericItemBlock(this);\n\t}", "public static maestro.payloads.FlyerFeaturedItem.Builder newBuilder() {\n return new maestro.payloads.FlyerFeaturedItem.Builder();\n }", "public ItemStack generateItem(){\n\t\tItemStack item = new ItemStack(material);\n\t\tif(damage >= 0) item.setDurability(damage);\n\t\t\n\t\tif(itemName.isEmpty() && loreLine.isEmpty()) return item;\n\t\t\n\t\tItemMeta meta = item.getItemMeta();\n\t\tif(meta == null) return item;\n\t\t\n\t\tmeta.setDisplayName(itemName);\n\t\tmeta.setLore(Arrays.asList(loreLine));\n\t\titem.setItemMeta(meta);\n\t\t\n\t\treturn item;\n\t}", "public Item()\r\n {\r\n // Initialize instance variables\r\n \r\n }", "public PurchaseOrderItem () {\n\t\tsuper();\n\t}", "public GlowItem(GlowServer server, GlowWorld world, ItemStack item) {\n super(server, world);\n this.item = item;\n pickupDelay = 20;\n }", "void addGroceryItem(String item) {\n\n\t}", "public InventoryItem(String name) { \n\t\tthis(name, 1);\n\t}", "private TypeItem(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public Item(final String pDescription, final double pWeight, final String pMotclef)\r\n {\r\n this.aDescription = pDescription;\r\n this.aWeight = pWeight;\r\n this.aMotclef = pMotclef;\r\n }", "public UseCaseItem() {\n delegate = new MyModel.Builder().build();\n }", "public ConsumableItem(String name, String description, int numItem, char symbol) \n {\n this.name = name;\n this.description = description;\n this.numItem = numItem;\n this.symbol = symbol;\n }", "protected Item() {\n }", "public TransactionResponse buyEnchantFromItem() {\r\n \t\tTransactionResponse response = new TransactionResponse(hp);\r\n \t\tCalculation calc = hc.getCalculation();\r\n \t\tAccount acc = hc.getAccount();\r\n \t\tLog log = hc.getLog();\r\n \t\ttry {\r\n \t\t\tPlayer p = hp.getPlayer();\r\n \t\t\tString nenchant = \"\";\r\n \t\t\tnenchant = hyperObject.getMaterial();\r\n \t\t\tEnchantment ench = Enchantment.getByName(nenchant);\r\n \t\t\tString mater = p.getItemInHand().getType().toString();\r\n \t\t\tdouble price = hyperObject.getValue(EnchantmentClass.fromString(mater));\r\n \t\t\tif (price != 123456789) {\r\n \t\t\t\tif (!im.containsEnchantment(p.getItemInHand(), ench)) {\r\n \t\t\t\t\tif (im.canAcceptEnchantment(p.getItemInHand(), ench) && p.getItemInHand().getAmount() == 1) {\r\n \t\t\t\t\t\tif (acc.checkFunds(price, p)) {\r\n \t\t\t\t\t\t\tacc.withdraw(price, p);\r\n \t\t\t\t\t\t\tacc.depositAccount(price, tradePartner.getName());\r\n \t\t\t\t\t\t\tint l = hyperObject.getName().length();\r\n \t\t\t\t\t\t\tString lev = hyperObject.getName().substring(l - 1, l);\r\n \t\t\t\t\t\t\tint level = Integer.parseInt(lev);\r\n \t\t\t\t\t\t\tim.addEnchantment(p.getItemInHand(), ench, level);\r\n \t\t\t\t\t\t\tim.removeEnchantment(giveItem, ench);\r\n \t\t\t\t\t\t\tprice = calc.twoDecimals(price);\r\n \t\t\t\t\t\t\tresponse.addSuccess(L.f(L.get(\"PURCHASE_ENCHANTMENT_CHEST_MESSAGE\"), 1, calc.twoDecimals(price), hyperObject.getName(), tradePartner.getName()), calc.twoDecimals(price), hyperObject);\r\n \t\t\t\t\t\t\tresponse.setSuccessful();\r\n \t\t\t\t\t\t\tlog.writeSQLLog(p.getName(), \"purchase\", hyperObject.getName(), 1.0, price, 0.0, tradePartner.getName(), \"chestshop\");\r\n \t\t\t\t\t\t\ttradePartner.sendMessage(L.f(L.get(\"CHEST_ENCHANTMENT_BUY_NOTIFICATION\"), 1, calc.twoDecimals(price), hyperObject.getName(), p));\r\n \t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\tresponse.addFailed(L.get(\"INSUFFICIENT_FUNDS\"), hyperObject);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tresponse.addFailed(L.get(\"ITEM_CANT_ACCEPT_ENCHANTMENT\"), hyperObject);\r\n \t\t\t\t\t}\r\n \t\t\t\t} else {\r\n \t\t\t\t\tresponse.addFailed(L.get(\"ITEM_ALREADY_HAS_ENCHANTMENT\"), hyperObject);\r\n \t\t\t\t}\r\n \t\t\t} else {\r\n \t\t\t\tresponse.addFailed(L.get(\"ITEM_CANT_ACCEPT_ENCHANTMENT\"), hyperObject);\r\n \t\t\t}\r\n \t\t\treturn response;\r\n \t\t} catch (Exception e) {\r\n \t\t\tString info = \"ETransaction buyChestEnchant() passed values name='\" + hyperObject.getName() + \"', player='\" + hp.getName() + \"', owner='\" + tradePartner.getName() + \"'\";\r\n \t\t\tnew HyperError(e, info);\r\n \t\t\treturn new TransactionResponse(hp);\r\n \t\t}\r\n \t}", "protected abstract Item createTestItem1();", "private static Object makeItem(final String item){\n return new Object(){\n public String toString() {\n return item;\n }\n };\n }", "Items(){\r\n\t\tname=new String[]{\r\n\t\t\t\t\"\",\r\n\t\t\t\t//Parts to the vaccine[1-3]\r\n\t\t\t\t\"Mysterious Vial\", \"Piece of alien meteorite\",\"Alien X\",\r\n\t\t\t\t//Keys[4-6]\r\n\t\t\t\t\"Mysterious Key\",\"Office Key\",\"Captian's Key\",\r\n\t\t\t\t//suit[7,8]\r\n\t\t\t\t\"Hazmat Suit\",\"Gas Mask\",\r\n\t\t\t\t//vials[9-11]\r\n\t\t\t\t\"Blue Vial\",\"Pink Vial\", \"Gold Vial\",\r\n\t\t\t\t//other[12,13]\r\n\t\t\t\t\"X Files\", \"Demon's Bane Flower\",\"Reinforced Armor\"\r\n\t\t};\r\n\t\tdescription=new String[]{\r\n\t\t\t\t\"\",\r\n\t\t\t\t//vaccine parts[2-4]\r\n\t\t\t\t\"A special vial coated with a mysterious substance\",\r\n\t\t\t\t\"Part of an alien meteorite that the crew excavated\",\r\n\t\t\t\t\"A powerful allergen that instantly kills one’s immune system and their whole well-being, mutating them into something inhuman\",\r\n\t\t\t\t//keys\r\n\t\t\t\t\"A metal key that must open a door\",\r\n\t\t\t\t\"Looks like a normal key\",\r\n\t\t\t\t\"A metal key used to unlock something\",\r\n\t\t\t\t//Suit\r\n\t\t\t\t\"A full-body suit designed to keep harmful toxins away from the wearer. The face mask is missing, however\",\r\n\t\t\t\t\"A mask that goes over the wearer’s head and filters out all harmful substances in the air\",\r\n\t\t\t\t//Vials\r\n\t\t\t\t\"A vial similar to the ones in the DNA Library, it glows light blue\",\r\n\t\t\t\t\"A vial similar to the ones in the DNA Library, it glows bright pink\",\r\n\t\t\t\t\"A vial similar to the ones in the DNA Library, it glows golden yellow\",\r\n\t\t\t\t//other\r\n\t\t\t\t\"Recorded documentation of all experiments and research done while in space. Most importantly it contains reports on events leading up to the virus spreading throughout the ship\",\r\n\t\t\t\t\"A beautiful flower that seems to survive unattached to the ground, the veins running through its petals give a faint glow as a heavenly scent fills the room\",\r\n\t\t\t\t\"A set of fine leather armor with metal plates reinforcing vulnerable areas\"\r\n\t\t};\r\n\t}", "@Override // see item.java\n\tpublic void useItem() {\n\n\t}", "public com.rpg.framework.database.Protocol.Item.Builder getItemsBuilder(\n int index) {\n return getItemsFieldBuilder().getBuilder(index);\n }", "public void createItemInInventory(Item newItem) {\n\t\tinventory.createItem(newItem);\n\t}", "public AuctionItem(long auctionID, String name, String des, double minValue, double maxValue, ClientInterface client){\n\t\tID = auctionID;\n\t\titem_name = name;\n\t\titem_description = des;\n\t\tstart_price = minValue;\n\t\treserve_price = maxValue;\n\t\towner = client;\n\t\tstatus = \"open\";\n\t\tbids = new Hashtable<>();\n\t}", "public Market(ArrayList<G> goods, ArrayList<B> bidders) throws MarketCreationException{\n // Create immutable goods list.\n if(goods == null || goods.size() == 0){\n throw new MarketCreationException(\"A market must contain at least one good.\");\n }\n ImmutableList.Builder<G> goodsBuilder = ImmutableList.builder();\n goodsBuilder.addAll(goods);\n this.goods = goodsBuilder.build();\n // Sets bidders\n this.setBidders(bidders);\n }", "public ItemExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public Item_Record(Integer _Id_, String name_, String description_, String code_, Double price_, Double retailPrice_, Double costPrice_, Object _Search_, String[] _Types_, String _LastModified_, Integer _Version_) {\n super(Item_.ITEM_);\n\n set(0, _Id_);\n set(1, name_);\n set(2, description_);\n set(3, code_);\n set(4, price_);\n set(5, retailPrice_);\n set(6, costPrice_);\n set(7, _Search_);\n set(8, _Types_);\n set(9, _LastModified_);\n set(10, _Version_);\n }", "private void makeObject() {\n\t\t\n\t\tItem I1= new Item(1,\"Cap\",10.0f,\"to protect from sun\");\n\t\tItemMap.put(1, I1);\n\t\t\n\t\tItem I2= new Item(2,\"phone\",100.0f,\"Conversation\");\n\t\tItemMap.put(2, I2);\n\t\t\n\t\tSystem.out.println(\"Objects Inserted\");\n\t}", "public FlyerFeaturedItem() {}", "public POGOProtos.Rpc.HoloInventoryItemProto.Builder getInventoryItemDataBuilder() {\n return getInventoryItemDataFieldBuilder().getBuilder();\n }" ]
[ "0.7398441", "0.6540017", "0.64247435", "0.64182115", "0.6310177", "0.6232988", "0.6222684", "0.6128192", "0.6113143", "0.6064411", "0.6040452", "0.60205114", "0.5994123", "0.5974963", "0.5960265", "0.59566987", "0.5938509", "0.5909097", "0.5901526", "0.5870639", "0.58663845", "0.5824381", "0.5824379", "0.5795639", "0.5794439", "0.57841486", "0.57668096", "0.5734356", "0.572989", "0.57239586", "0.571901", "0.57172", "0.5712254", "0.57032293", "0.5697902", "0.56961393", "0.5685899", "0.56815684", "0.567474", "0.56572413", "0.56404376", "0.56404376", "0.56303376", "0.56303376", "0.56257975", "0.5595539", "0.5591929", "0.5574", "0.556377", "0.55446815", "0.55418754", "0.5516675", "0.5508594", "0.5496661", "0.54885715", "0.54795116", "0.5479135", "0.5473225", "0.546714", "0.5462527", "0.5462123", "0.5456741", "0.54438305", "0.5443745", "0.5431687", "0.54313856", "0.5419162", "0.5410535", "0.5405903", "0.54035443", "0.54013264", "0.54012966", "0.5395561", "0.53897756", "0.53846854", "0.538443", "0.5381267", "0.5370244", "0.53563315", "0.53529775", "0.5347027", "0.5345952", "0.52894133", "0.5287888", "0.52869624", "0.52826065", "0.5276934", "0.5276702", "0.52749616", "0.5265697", "0.5265375", "0.52647966", "0.52565277", "0.52477604", "0.52473754", "0.52460563", "0.5245691", "0.52422416", "0.5234129", "0.52310425" ]
0.8044088
0
item_id int64 item_id = 9;
@java.lang.Override public long getItemId() { return itemId_; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long getID(Object item);", "int getItemID();", "public long getItemShopBasketId();", "public Integer getItemid() {\n return itemid;\n }", "public Integer getItemid() {\n return itemid;\n }", "public int getItemId()\r\n {\r\n return _itemId;\r\n }", "public int getItemID()\n {\n return itemID;\n }", "public int getItemId() {\n return itemId;\n }", "@Test\r\n\tpublic void testIdItem() {\r\n\r\n\t\ttry {\r\n\t\t\tItem itemDes = new Item(idItem, \"elixir de Destreza\", 0, 0, 0, 0, 0, 0, null, null);\r\n\r\n\t\t\tAssert.assertEquals(12321, itemDes.getIdItem());\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\r\n\t}", "public Long getItemId() {\r\n return itemId;\r\n }", "public interface IdItem {\n int getId();\n}", "public Item getItemById(Integer itemId);", "public String getItemId() {\n return itemId;\n }", "public String getItemId() {\r\n return itemId;\r\n }", "void setItemId(String itemId);", "int getItemId() {\n return m_itemId;\n }", "public Integer getId(){return id;}", "public void setItem_id(int item_id) {\r\n\t\tthis.item_id = item_id;\r\n\t}", "public void setItemId(Long itemId) {\r\n this.itemId = itemId;\r\n }", "public long getShopBasketId();", "public String getItemId(){\r\n\t\treturn \"\";\r\n\t}", "public long UnSigndCatster(Object item){\n long x = Integer.toUnsignedLong((int)item);\n //String s = item.toString();\n //long x = Integer.parseUnsignedInt(s);\n return x;\n }", "public void setItemShopBasketId(long itemShopBasketId);", "public long getId(){return this.id;}", "public int getBigId () { return bigId; }", "public void setM_Product_ID (int M_Product_ID)\n{\nset_Value (\"M_Product_ID\", new Integer(M_Product_ID));\n}", "abstract int getItemID(int level);", "public int add(Item item) {\r\n Transaction trans = null;\r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n int id = 0;\r\n\r\n try {\r\n trans = session.beginTransaction();\r\n\r\n id = (int) session.save(item);\r\n\r\n trans.commit();\r\n } catch (HibernateException e) {\r\n if (trans != null) {\r\n trans.rollback();\r\n }\r\n e.printStackTrace();\r\n } finally {\r\n session.close();\r\n }\r\n return id;\r\n }", "com.google.protobuf.Int64Value getFromId();", "public int getITEM() {\r\n return item;\r\n }", "public int getId(){ return id; }", "private Long getApiId(final RpStoreEntity item){\n \n if(allowedPosNames.contains(item.getPosSoftware())){\n return apiService.findByName(item.getPosSoftware()).getApiId();\n } else {\n return apiService.findByName(defaultApiForPosSoftware).getApiId();\n }\n }", "public byte getId(){\n return id;\n }", "public Integer getID(){\n return ID;\n }", "public interface ID_UNIQUENESS_POLICY_ID\n{\n\n /**\n\t * The value representing ID_UNIQUENESS_POLICY_ID.\n\t */\n public static final int value = (int)(18L);\n}", "@Override\n public long getItemId(int itemId) {\n return itemId;\n }", "@Override\r\n public int getItemId() {\n return this.itemId;\r\n }", "private Integer getId() { return this.id; }", "public Object getKey(Movie item) {\n\t return (item == null) ? null : item.getId();\r\n\t }", "@Override\r\n public void setItemId(int itemId) {\n this.itemId = itemId;\r\n }", "public void setId(byte id){this.id = id;}", "public long getSuburItemId();", "public Integer getId() { return id; }", "public void setM_Warehouse_ID (int M_Warehouse_ID)\n{\nset_Value (\"M_Warehouse_ID\", new Integer(M_Warehouse_ID));\n}", "public abstract long getId();", "public abstract long getId();", "public int getId(){return id;}", "io.dstore.values.IntegerValue getUnitId();", "public long getId() { return id; }", "public long getId() { return id; }", "public long getId() { return _id; }", "@java.lang.Override\n public long getItemId() {\n return itemId_;\n }", "public Item getItem(long idItem) throws ItemNotFound;", "public interface ID_TYPE {\r\n public static final int OWNER = 1;\r\n public static final int ATTENDANT = 2;\r\n public static final int DRIVER = 3;\r\n }", "ShoppingItem getShoppingItemByGuid(String itemGuid);", "public final ItemId getId() {\r\n return null;\r\n }", "public int getId(){\r\n return localId;\r\n }", "id(int id) {}", "public String getItemID() {\n\t return this.itemID;\n\t}", "public void setFlyerItemId(Integer value) {\n this.flyer_item_id = value;\n }", "public void setItemId(String itemId) {\n this.itemId = itemId;\n }", "int getPokedexIdValue();", "int getPokedexIdValue();", "public int getM_Inventory_ID() \n{\nInteger ii = (Integer)get_Value(\"M_Inventory_ID\");\nif (ii == null) return 0;\nreturn ii.intValue();\n}", "public abstract Long getId();", "int getMyId();", "public int getItem_id() {\r\n\t\treturn item_id;\r\n\t}", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "public Long getId() {\n return id;\n }", "public int id() {return id;}", "private int getItemID(String item) {\n\t\titem = item.replace(\" \", \"%20\");\n\t\t//log(\"Item: \" + item);\n \ttry {\n \tString webPage = \"http://\" + serverIP + \"/getid.php?i=\" + item;\n \t//log(\"Webpage: '\" +webPage+\"'\");\n \tURL url = new URL(webPage);\n \tURLConnection urlConnection = url.openConnection();\n \tInputStream is = urlConnection.getInputStream();\n \tInputStreamReader isr = new InputStreamReader(is);\n\n \tint numCharsRead;\n \tchar[] charArray = new char[1024];\n \tStringBuffer sb = new StringBuffer();\n \twhile ((numCharsRead = isr.read(charArray)) > 0) {\n \tsb.append(charArray, 0, numCharsRead);\n \t}\n \tString result = sb.toString();\n \t//log(\"ItemID: \" + result);\n \t//window.status.setText(\"Ready\");\n\n \treturn Integer.parseInt(result);\n \t} catch (Exception e) {\n \tlog(\"Exception occurred at getID.\" + e);\n \t}\n\n \treturn 0;\n \t}", "public void setId(long id) {\n id_ = id;\n }", "public long getVocubalaryId();", "Integer getId();", "Integer getId();", "Integer getId();", "@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}", "Integer getID();", "Integer getID();", "public abstract long id();", "public String indexItem(T item) {\n IndexQuery indexQuery = new IndexQueryBuilder()\n .withId(String.valueOf(item.getId()))\n .withObject(item)\n .build();\n String documentId = elasticsearchOperations.index(indexQuery, getIndexCoordinates());\n return documentId;\n }", "public byte getId() {\n return 2;\n }" ]
[ "0.6832262", "0.67022014", "0.6573659", "0.64553726", "0.64553726", "0.64229095", "0.6410955", "0.6409017", "0.6404034", "0.6281676", "0.62705797", "0.6211113", "0.60965604", "0.6096335", "0.60360247", "0.60205024", "0.5994523", "0.5988325", "0.5982117", "0.5964025", "0.5910507", "0.5826721", "0.5819618", "0.58019525", "0.57943016", "0.5791316", "0.57898396", "0.57693875", "0.5766306", "0.5739626", "0.57015", "0.56973624", "0.569608", "0.5693868", "0.5691435", "0.56911147", "0.56852615", "0.5679146", "0.5674232", "0.5672523", "0.5669916", "0.5667431", "0.56626785", "0.5662283", "0.56515425", "0.56515425", "0.5646449", "0.5646041", "0.5637892", "0.5637892", "0.5633225", "0.56037074", "0.5590872", "0.55808425", "0.55804884", "0.5576504", "0.5573161", "0.5570916", "0.55665815", "0.5552992", "0.555035", "0.553115", "0.553115", "0.55297315", "0.5518338", "0.551116", "0.55102694", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.55017906", "0.5500541", "0.54979354", "0.5497606", "0.54965156", "0.5496437", "0.5496437", "0.5496437", "0.5495764", "0.549447", "0.549447", "0.5491912", "0.54914427", "0.54898864" ]
0.5848173
21
schema_url string schema_url = 10;
@java.lang.Override public java.lang.String getSchemaUrl() { java.lang.Object ref = schemaUrl_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); schemaUrl_ = s; return s; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String getSchemaURI();", "void schema(String schema);", "void schema(String schema);", "public Builder setSchemaUrl(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n schemaUrl_ = value;\n onChanged();\n return this;\n }", "Builder addSchemaVersion(URL value);", "public java.lang.String getSchemaUrl() {\n java.lang.Object ref = schemaUrl_;\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 schemaUrl_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public void setSchema(String schema) {\n this.schema = schema;\n }", "public void setSchema(java.lang.String schema) {\r\n this.schema = schema;\r\n }", "String getRemoteSchema();", "public void setSchemaBaseURL(String schemaBaseURL) {\n this.schemaBaseURL = schemaBaseURL;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getSchemaUrlBytes() {\n java.lang.Object ref = schemaUrl_;\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 schemaUrl_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getSchemaLocation();", "public static String getSchema( String url )\n\t{\n\t\tString db = url.split( \":\" )[ 1 ];\n\t\tString result = null;\n\t\tif( SCHEMAS.containsKey( db ) )\n\t\t{\n\t\t\tresult = SCHEMAS.get( db );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif( MYSQL.equals( db ) )\n\t\t\t{\n//\t\t\t\tString dbNameAndProps = url.split( \"/\" )[ 3 ];\n//\t\t\t\tresult = dbNameAndProps.split( \"[?]\" )[ 0 ];\n\t\t\t\tresult = null;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public com.google.protobuf.ByteString\n getSchemaUrlBytes() {\n java.lang.Object ref = schemaUrl_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n schemaUrl_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setSchema(Schema schema)\n {\n this.schema = schema;\n }", "@Column(length = 2048)\r\n @PlaceHolder(key = \"schema\")\r\n public String getUrlPath() {\r\n return urlPath;\r\n }", "@ApiModelProperty(value = \"A URI to a JSON-Schema file that defines additional attributes and relationships\")\n\n\n public String getSchemaLocation() {\n return schemaLocation;\n }", "@ApiModelProperty(value = \"A URI to a JSON-Schema file that defines additional attributes and relationships\")\n\n\n public String getSchemaLocation() {\n return schemaLocation;\n }", "String getSchemaFile();", "void setSchema(S schema);", "String handlerSchema();", "private static Schema createSchema(URL url) throws SAXException {\n\t\tSchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);\n\t\treturn schemaFactory.newSchema(url);\n\t}", "public void setSchemaLocation(String schemaLocation) {\n\t\t\r\n\t}", "public String getSchemaLocation() {\r\n return schemaLocation;\r\n }", "public String getSchema()\n {\n return schema;\n }", "public String getSchema() {\n return schema;\n }", "public void createURL(){\n urlDB = ( PREFACE + server + \"/\" + database + options);\n }", "S getSchema();", "@Override\n public void setXMLSchema(URL url) throws XMLPlatformException {\n if (null == url) {\n return;\n }\n if (null == documentBuilderFactory) {\n loadDocumentBuilderFactory();\n }\n try {\n documentBuilderFactory.setAttribute(SCHEMA_LANGUAGE, XML_SCHEMA);\n documentBuilderFactory.setAttribute(JAXP_SCHEMA_SOURCE, url.toString());\n } catch (IllegalArgumentException e) {\n // The attribute isn't supported so do nothing\n } catch (Exception e) {\n XMLPlatformException.xmlPlatformErrorResolvingXMLSchema(url, e);\n }\n }", "public Builder setSchemaUrlBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n schemaUrl_ = value;\n onChanged();\n return this;\n }", "private String getSchema(Document doc) {\n\t\tElement rootElement = doc.getRootElement();\n\t\treturn rootElement.getAttributeValue(\"schemaLocation\", xsiNamespace).replace(\"http://www.github.com/biosemantics\", \"\").trim();\n\t}", "public String getSchema() {\n return schema;\n }", "public String getSchema() {\n return schema;\n }", "public java.lang.String getSchema() {\r\n return schema;\r\n }", "public void setldschema(String ldap_schema_url) throws Exception{\t\t\r\n\t\tjava.io.InputStream ldschemaxml = null;\t\t\r\n\t\ttry {\r\n\t\t\tldschemaxmlurl = new java.net.URL(ldap_schema_url);\t\t \r\n\t\t\tldschemaxml = ldschemaxmlurl.openStream();\t\t\t\r\n\t\t\tjavax.xml.parsers.DocumentBuilderFactory ldschemaDomFactory = javax.xml.parsers.DocumentBuilderFactory.newInstance();\r\n\t\t\tjavax.xml.parsers.DocumentBuilder ldschemaDB = ldschemaDomFactory.newDocumentBuilder();\r\n\t\t\torg.w3c.dom.Document ldschemaDom = ldschemaDB.parse(ldschemaxml);\r\n\t\t\torg.w3c.dom.Element ldschemaRootElement = ldschemaDom.getDocumentElement();\r\n\t\t\torg.w3c.dom.NodeList ldschemaNodeList = ldschemaRootElement.getChildNodes();\r\n\t\t\torg.w3c.dom.NodeList ldschemaChildNodeList;\r\n\t\t\torg.w3c.dom.Node templdschemaNode;\r\n\t\t\t// Get the number of the schema\r\n\t\t\tint schemaCount = 0;\t\t\t\r\n\t\t\tfor (int i=0; i<ldschemaNodeList.getLength(); i++) {\r\n\t\t\t templdschemaNode = ldschemaNodeList.item(i);\r\n\t\t\t if (templdschemaNode.getNodeName().startsWith(Constant.attNameElement)) schemaCount +=1;\r\n\t\t\t}\r\n\t\t\t//Dimension Attribute and Attribute Type Array \t\r\n\t\t\tconAttName = new String[schemaCount];\r\n\t\t\tconAttType = new String[schemaCount];\r\n\t\t\t//Input Attribute and Attribute Type Array Value\r\n\t\t\tint tempSchemaCount = 0;\r\n\t\t\tlogger.debug(\"[Central LDAP schema Loading \"+schemaCount+\" attributes Start]\");\r\n\t\t\tfor (int i=0; i<ldschemaNodeList.getLength(); i++) {\r\n\t\t\t\t templdschemaNode = ldschemaNodeList.item(i);\t\t \t\t \t \r\n\t\t\t\t if (templdschemaNode.getNodeName().startsWith(Constant.attNameElement)) {\r\n\t\t\t\t\tconAttName[tempSchemaCount] = (templdschemaNode.getFirstChild().getNodeValue()).toUpperCase();\t\t\t\t \r\n\t\t\t\t\tconAttType[tempSchemaCount] = ((org.w3c.dom.Element)templdschemaNode).getAttribute(\"vtype\");\r\n\t\t\t\t\t//Print Attribute and Attribute Type Array Information\r\n\t\t\t\t\tlogger.debug(\"[Central LDAP schema Name]\"+conAttName[tempSchemaCount]+\" [Type] \"+conAttType[tempSchemaCount]);\r\n\t\t\t\t\ttempSchemaCount +=1;\t\t\t\t \r\n\t\t\t\t }\r\n\t\t\t}\r\n\t\t\tlogger.debug(\"[Central LDAP schema Loading End][\"+tempSchemaCount+\" Elements Added\");\r\n\t\t}catch(MalformedURLException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\tlogger.error(\"[Central LDAP schema Loading]\"+e.getMessage(), e);\r\n\t\t\tthrow new Exception(e.getMessage());\r\n\t\t}catch(org.xml.sax.SAXParseException spe){\r\n\t\t\tlogger.error(\"\\n[Central LDAP schema Loading]** Parsing error, line \" + spe.getLineNumber() + \", uri \" + spe.getSystemId());\r\n\t\t\tlogger.error(\" \" + spe.getMessage());\r\n\t\t\tthrow new Exception(spe.getMessage());\t\t\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t\tlogger.error(\"[Central LDAP schema Loading]\"+ex.getMessage(), ex);\r\n\t\t\tthrow new Exception(ex.getMessage());\r\n\t\t}finally{\r\n\t\t\tif ( ldschemaxml != null ) ldschemaxml.close();\r\n\t\t}\t\t\r\n\t}", "@Test\n public void atSchemaLocationTest() {\n // TODO: test atSchemaLocation\n }", "Schema createSchema();", "Builder addSchemaVersion(String value);", "public String getSchemeSpecific() {\n return \"\";\n }", "private void fixSchemaDocumentUri(MetadataSchemaRecord schemaRecord) {\n fixSchemaDocumentUri(schemaRecord, false);\n }", "public String getSchemaLocation() {\r\n\t\treturn mSchemaLocation;\r\n\t}", "public void setURL(String inputSchema, String outputSchema) {\n String port = getPortValueForJS();\n browser.setUrl(\"http://localhost:\" + port + \"/dataMapper?port=\" + port + \"&inputtype=\" + inputSchema\n + \"&outputtype=\" + outputSchema + NO_CACHE);\n }", "public void setSchemaInstance(String schemaInstance) {\n\t\t\r\n\t}", "public void setObject_schema(String object_schema) {\n this.object_schema = object_schema == null ? null : object_schema.trim();\n }", "Builder addSchemaVersion(Text value);", "String getSchemaName();", "String getSchemaName();", "public void setlldschema(String lldap_schema_url) throws Exception{\t\t\r\n\t\tjava.io.InputStream lldschemaxml = null;\t\t\r\n\t\ttry {\t\t\t\r\n\t\t\tUtil.validateSchemaLocalLDAP(); // Validate the local ldap schema\t\t\t\r\n\t\t\tlldschemaxmlurl = new java.net.URL(lldap_schema_url);\t\t \r\n\t\t lldschemaxml = lldschemaxmlurl.openStream();\t\t\r\n\t\t\tjavax.xml.parsers.DocumentBuilderFactory lldschemaDomFactory = javax.xml.parsers.DocumentBuilderFactory.newInstance();\r\n\t\t\tjavax.xml.parsers.DocumentBuilder lldschemaDB = lldschemaDomFactory.newDocumentBuilder();\r\n\t\t\torg.w3c.dom.Document lldschemaDom = lldschemaDB.parse(lldschemaxml);\r\n\t\t\torg.w3c.dom.Element lldschemaRootElement = lldschemaDom.getDocumentElement();\r\n\t\t\torg.w3c.dom.NodeList lldschemaNodeList = lldschemaRootElement.getChildNodes();\r\n\t\t \torg.w3c.dom.NodeList lldschemaChildNodeList;\r\n\t\t\torg.w3c.dom.Node templldschemaNode;\r\n\t\t\t// Get the number of the schema\r\n\t\t\tint schemaCount = 0;\t\t\r\n\t\t\tfor (int i=0; i<lldschemaNodeList.getLength(); i++) {\r\n\t\t templldschemaNode = lldschemaNodeList.item(i);\r\n\t\t\t if (templldschemaNode.getNodeName().startsWith(Constant.attNameElement)) schemaCount +=1;\r\n\t\t\t}\r\n\t\t\t// Dimension new Attribute and Attribute Type Array \t\r\n\t\t \tString[] tmp_conAttName = new String[conAttName.length + schemaCount];\r\n\t\t \tString[] tmp_conAttType = new String[conAttType.length + schemaCount];\r\n\t\t \t// Reload old Attribute and Attribute Type to Temp Array \r\n\t\t \tfor (int i=0; i<conAttName.length; i++){\r\n\t\t \t\ttmp_conAttName[i] = conAttName[i];\r\n\t\t \t\ttmp_conAttType[i] = conAttType[i];\r\n\t\t \t}\r\n\t\t\t//Input Attribute and Attribute Type Array Value\r\n\t\t\tint tempSchemaCount = conAttName.length;\r\n\t\t\tlogger.debug(\"[Local LDAP schema Loading Start]\");\r\n\t\t for (int i=0; i<lldschemaNodeList.getLength(); i++) {\r\n\t\t \ttemplldschemaNode = lldschemaNodeList.item(i);\r\n\t\t if (templldschemaNode.getNodeName().startsWith(Constant.attNameElement)) {\t\t \t\r\n\t\t \tif ( templldschemaNode.getFirstChild() == null ) throw new Exception(\"xml element called attibute_name not allow empty string\");\r\n\t\t tmp_conAttName[tempSchemaCount] = templldschemaNode.getFirstChild().getNodeValue();\r\n\t\t\t\t tmp_conAttType[tempSchemaCount] = ((org.w3c.dom.Element)templldschemaNode).getAttribute(\"vtype\");\t\t\t\t \r\n\t\t\t\t\tlogger.debug(\"[Local LDAP schema Name] \"+tmp_conAttName[tempSchemaCount]+\" [Type] \"+tmp_conAttType[tempSchemaCount]);\r\n\t\t\t\t tempSchemaCount +=1;\t\t\t\t \r\n\t\t \t\t }\r\n\t\t\t}\r\n\t\t\tif (tempSchemaCount == conAttName.length) {\r\n\t\t\t\tlogger.debug(\"No Local LDAP Schema Attribute Added !\");\r\n\t\t\t} else {\r\n\t\t\t// Reload Attribute and Attribute Type to Array \r\n\t\t\t\tconAttName = new String[tempSchemaCount];\r\n\t\t\t\tconAttType = new String[tempSchemaCount];\r\n\t\t\t\tfor (int i=0; i<conAttName.length; i++){\r\n\t\t\t\t\tconAttName[i] = tmp_conAttName[i];\r\n\t\t\t\t\tconAttType[i] = tmp_conAttType[i];\r\n\t\t\t\t}\t\t\t\t \r\n\t\t\t}\r\n\t\t\tlogger.debug(\"[Local LDAP schema Loading End][Total \"+tempSchemaCount+\" Attriutes in Array]\");\r\n\t\t} catch(MalformedURLException e){\r\n\t\t\te.printStackTrace();\t\t\t\r\n\t\t\tlogger.error(\"[Local LDAP schema Loading]\"+e.getMessage(), e);\r\n\t\t\tthrow new Exception(e.getMessage());\r\n\t\t} catch(org.xml.sax.SAXParseException spe){\r\n\t\t\tlogger.error(\"\\n[Local LDAP schema Loading]** Parsing error, line \" + spe.getLineNumber() + \", uri \" + spe.getSystemId());\r\n\t\t\tlogger.error(\" \" + spe.getMessage());\r\n\t\t\tthrow new Exception(spe.getMessage());\t\t\t\t\r\n\t\t} catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t\tlogger.error(\"[Local LDAP schema Loading]\"+ex.getMessage(), ex);\r\n\t\t\tthrow new Exception(ex.getMessage());\r\n\t\t} finally {\r\n\t\t\tif ( lldschemaxml != null ) lldschemaxml.close();\r\n\t\t}\r\n\t}", "public void setSchema(String schema)\n {\n if(this.props == null)\n {\n this.props = new Properties();\n }\n this.props.setProperty(\"db.schema\", schema);\n }", "public Schema getSchema();", "@Override\r\n\t\tpublic void setSchema(String schema) throws SQLException {\n\t\t\t\r\n\t\t}", "public void setSchema(String aValue) {\n String oldValue = schema;\n schema = aValue;\n changeSupport.firePropertyChange(\"schema\", oldValue, aValue);\n }", "SchemaBuilder withResourceResolver(LSResourceResolver resourceResolver);", "String getSchemaVersion();", "SchemaDefinition createSchemaDefinition();", "public String schema() {\n return schemaName;\n }", "public String schema() {\n return schemaName;\n }", "public String getSchemaName() { return schemaName; }", "public MetaSchema getMetaSchema(int iSchema);", "public String getObject_schema() {\n return object_schema;\n }", "public String getStrDataSchema() {\n return strDataSchema;\n }", "public boolean setSchema(String schema){\n \ttry {\n \t\tsql = connection.createStatement();\n\t\t\tString sqlText;\n\t\t\tsqlText = \"SET search_path TO \" + schema;\n\t\t\tsql.executeUpdate(sqlText);\n\t\t} catch (SQLException e) {\n\t\t\treturn false;\n\t\t}\n \treturn true;\n }", "public String getSchemaPath(final String requestUrl) {\n // find out if we have a known route, e.g. /rules, /bnrules, etc.\n final Optional<String> match = businessObjectToJsonSchema.keySet().stream().filter(requestUrl::contains).findAny();\n\n if (match.isEmpty()) {\n logger.debug(\"Schema validation not configured for: {}\", requestUrl);\n return null; // the request has not mapping, meaning there is no schema for this request URL's payload\n }\n\n final String route = match.get();\n // find out if there are trailing elements after the base mapping (e.g. rules/<hash>). If so, we validate.\n if (requestUrl.lastIndexOf(route) >= requestUrl.lastIndexOf(\"/\")) {\n // this means we have no hash or any other trailing path components after the route. We are not validating this.\n // The payloads we are interested in are always qualified with a hash, a country, etc.\n return null;\n }\n // since there is currently only one schema per route, we can take the route as a key for the schema\n // e.g. if we have /rules/<something>, we use the same schema, no matter what <something> is.\n return businessObjectToJsonSchema.get(route);\n }", "public String getSchema()\n {\n String schema = \"\";\n if(this.props != null && !this.props.isEmpty())\n {\n schema = this.props.getProperty(\"db.schema\");\n }\n \n return schema;\n }", "public URI getSchemaDocumentUri(MetadataSchemaRecord schemaRecord) {\n return WebMvcLinkBuilder.linkTo(WebMvcLinkBuilder.methodOn(this.getClass()).getSchemaDocumentById(schemaRecord.getSchemaId(), schemaRecord.getSchemaVersion(), null, null)).toUri();\n }", "public interface HeaderSchema {\n String code = \"c\";//服务器返回码\n String error_msg = \"e\";//服务器返回错误信息\n}", "public static void setDatabaseURL(String url){\n databaseURL=url;\n }", "static Path getSchemaPath(Configuration conf) {\n int iteration = lastSchemaUpdate(conf);\n return getOutputPath(conf, SCHEMA_BASE + iteration);\n }", "private static String composeApiUrl(String string){\r\n\t\treturn API_BASE + API_VERSION + string;\r\n\t}", "String getScheme();", "@Test\n public void testPartitionOne()\n {\n\t UrlValidator urlVal = new UrlValidator(null, null, UrlValidator.ALLOW_ALL_SCHEMES);\n\t String resource = \"://www.example.com\";\n\t ArrayList<ResultPair> schemaUrls = new ArrayList<ResultPair>();\n\t //append the static valid resource string to each schema as a new pair\n\t for(ResultPair schema : this.m_schemas)\n\t {\n\t\t ResultPair pair = new ResultPair(schema.item + resource, schema.valid);\n\t\t schemaUrls.add(pair);\n\t }\n\t //test each now full URL\n\t for(ResultPair pair : schemaUrls)\n\t {\n\t\t collector.checkThat(pair.item, pair.valid, equalTo(urlVal.isValid(pair.item)));\n\t }\n }", "public Schema(final String reference) throws IOException {\n\t\tsuper(reference);\n\t}", "public test_SDURL(String n) {\n super(n);\n }", "java.lang.String getScheme();", "public String getSchema()\n\t{\n\t\t//begin vpj-cd e-evolution 03/04/2005\n\t\treturn \"compiere\";\n\t\t//end vpj-cd e-evolution 03/04/2005\n\t}", "public void setSchema(URI aSchemaUri) throws SAXException, MalformedURLException {\n schema = SCHEMA_FACTORY.newSchema(aSchemaUri.toURL());\n }", "public String getScheme() {\n return scheme;\n }", "public String getScheme() {\n return scheme;\n }", "public String getScheme() {\n return scheme;\n }", "public void setSubSchema(String subSchema) {\n this.subSchema = subSchema;\n }", "public SchemaInfo getSchema () throws Exception;", "public String getIdGeneratorDatabaseConnectionUrl(){\n \t\treturn getProperty(\"org.sagebionetworks.id.generator.database.connection.url\");\n \t}", "public int getMetaSchemas();", "String createParameterJsonSchema();", "@Override\r\n public String getScheme() {\r\n return scheme;\r\n }", "AstroSchema getSchema();", "public void addSchema (final String uri, final IslandSchema s)\n {\n if (m_aSchemata.containsKey (uri))\n throw new IllegalArgumentException ();\n m_aSchemata.put (uri, s);\n }", "public static Schema getSchema(final String schemaURL) {\r\n Schema s = null;\r\n try {\r\n final URL url = FileUtils.getResource(schemaURL);\r\n \t\r\n final File file = FileUtils.getFile(schemaURL);\r\n \r\n\r\n if (logB.isInfoEnabled()) {\r\n logB.info(\"XmlFactory.getSchema : retrieve schema and compile it : \" + schemaURL);\r\n }\r\n\r\n // 2. Compile the schema.\r\n final long start = System.nanoTime();\r\n\r\n SchemaFactory sf = getSchemaFactory();\r\n s = sf.newSchema(url);\r\n \r\n\r\n TimerFactory.getTimer(\"XmlFactory.getSchema[\" + schemaURL + \"]\").addMilliSeconds(start, System.nanoTime());\r\n\r\n if (logB.isInfoEnabled()) {\r\n logB.info(\"XmlFactory.getSchema : schema ready : \" + s);\r\n }\r\n\r\n } catch (final SAXException se) {\r\n throw new IllegalStateException(\"XmlFactory.getSchema : unable to create a Schema for : \" + schemaURL, se);\r\n/* } catch (final MalformedURLException mue) {\r\n throw new IllegalStateException(\"XmlFactory.getSchema : unable to create a Schema for : \" + schemaURL, mue);\r\n*/ }\r\n return s;\r\n }", "private DefaultSchema() {\n super(\"\", null);\n }", "BigDecimal getLqncoreSchemaVersion();", "@Value.Default\n public String getUri() {\n\treturn \"\";\n }", "private String initUrlParameter() {\n StringBuffer url = new StringBuffer();\n url.append(URL).append(initPathParameter());\n return url.toString();\n }", "@VisibleForTesting\n public JsonSchemaValidator(final URI baseUri) {\n this.jsonSchemaFactory = JsonSchemaFactory.getInstance(SpecVersion.VersionFlag.V7);\n this.baseUri = baseUri;\n }", "SchemaReference setVersion(String version);", "public void testYourFirstPartition() {\r\n\t UrlValidator urlVal = new UrlValidator(null, null, UrlValidator.ALLOW_ALL_SCHEMES);\r\n\t System.out.println(\"1st partition with a valid scheme = true: \" + urlVal.isValid(\"http://www.google.com\")); //bug here = does not account for http://\r\n System.out.println(\"1st partition with a invalid scheme = false: \" + urlVal.isValid(\"://go.a1a:65a\")); \r\n }", "public void setStrDataSchema(final String strDataSchema) {\n this.strDataSchema = strDataSchema;\n }", "public SchemaDef getSourceSchema();", "public interface SensorSchema\n{\n String ID = \"_id\";\n String SENSOR_ID = \"sensor_id\";\n String NAME = \"name\";\n String PIN_NUMBER = \"pin_number\";\n String FREQUENCY = \"frequency\";\n String TIME_UNIT = \"time_unit\";\n String INPUT_TYPE = \"input_type\";\n String MEASUREMENT_TYPE = \"measurement_type\";\n String THRESHOLD = \"threshold\";\n String THRESHOLD_TYPE = \"threshold_type\";\n String STATE = \"state\";\n String USE_XIVELY = \"use_xively\";\n String DATASTREAM = \"datastream\";\n}", "public void setScheme(String newValue);", "private void fixSchemaDocumentUri(MetadataSchemaRecord schemaRecord, boolean saveUrl) {\n String schemaDocumentUri = schemaRecord.getSchemaDocumentUri();\n schemaRecord.setSchemaDocumentUri(getSchemaDocumentUri(schemaRecord).toString());\n LOG.trace(\"Fix schema document Uri '{}' -> '{}'\", schemaDocumentUri, schemaRecord.getSchemaDocumentUri());\n if (saveUrl) {\n LOG.trace(\"Store path for URI!\");\n Url2Path url2Path = new Url2Path();\n url2Path.setPath(schemaDocumentUri);\n url2Path.setUrl(schemaRecord.getSchemaDocumentUri());\n url2Path.setType(schemaRecord.getType());\n url2Path.setVersion(schemaRecord.getSchemaVersion());\n url2PathDao.save(url2Path);\n }\n }" ]
[ "0.7147353", "0.6984463", "0.6984463", "0.6629155", "0.66020215", "0.6460415", "0.6364115", "0.6349817", "0.6290244", "0.623084", "0.61599565", "0.61357313", "0.60573936", "0.59503204", "0.5879538", "0.58049405", "0.5789022", "0.5789022", "0.57843155", "0.578323", "0.5769759", "0.5767667", "0.5762977", "0.57459414", "0.57310104", "0.5706264", "0.56904745", "0.5569326", "0.5563721", "0.55581963", "0.5549666", "0.55441135", "0.55441135", "0.54911244", "0.54807526", "0.54463154", "0.54457366", "0.5444", "0.54438764", "0.542985", "0.53788245", "0.5371495", "0.5365843", "0.5353684", "0.5348177", "0.5345693", "0.5345693", "0.53356576", "0.5314088", "0.5295183", "0.5294992", "0.5263575", "0.52472883", "0.52293414", "0.52218616", "0.52130747", "0.52130747", "0.5203701", "0.5198971", "0.5193373", "0.5182805", "0.51563543", "0.51445854", "0.51256216", "0.5124387", "0.5118153", "0.5095768", "0.50947976", "0.5080895", "0.50749457", "0.5067582", "0.5045139", "0.50383145", "0.502869", "0.5012795", "0.49950647", "0.49940136", "0.49940136", "0.49940136", "0.49924836", "0.49904507", "0.49875924", "0.49874806", "0.49778548", "0.4964115", "0.4948847", "0.4944569", "0.49292448", "0.49115318", "0.49096707", "0.49077758", "0.48822856", "0.48789853", "0.48758745", "0.48752138", "0.48751476", "0.48718512", "0.48692214", "0.48660442", "0.48657748" ]
0.65841216
5
schema_url string schema_url = 10;
@java.lang.Override public com.google.protobuf.ByteString getSchemaUrlBytes() { java.lang.Object ref = schemaUrl_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); schemaUrl_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String getSchemaURI();", "void schema(String schema);", "void schema(String schema);", "public Builder setSchemaUrl(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n schemaUrl_ = value;\n onChanged();\n return this;\n }", "Builder addSchemaVersion(URL value);", "@java.lang.Override\n public java.lang.String getSchemaUrl() {\n java.lang.Object ref = schemaUrl_;\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 schemaUrl_ = s;\n return s;\n }\n }", "public java.lang.String getSchemaUrl() {\n java.lang.Object ref = schemaUrl_;\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 schemaUrl_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public void setSchema(String schema) {\n this.schema = schema;\n }", "public void setSchema(java.lang.String schema) {\r\n this.schema = schema;\r\n }", "String getRemoteSchema();", "public void setSchemaBaseURL(String schemaBaseURL) {\n this.schemaBaseURL = schemaBaseURL;\n }", "public String getSchemaLocation();", "public static String getSchema( String url )\n\t{\n\t\tString db = url.split( \":\" )[ 1 ];\n\t\tString result = null;\n\t\tif( SCHEMAS.containsKey( db ) )\n\t\t{\n\t\t\tresult = SCHEMAS.get( db );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif( MYSQL.equals( db ) )\n\t\t\t{\n//\t\t\t\tString dbNameAndProps = url.split( \"/\" )[ 3 ];\n//\t\t\t\tresult = dbNameAndProps.split( \"[?]\" )[ 0 ];\n\t\t\t\tresult = null;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public com.google.protobuf.ByteString\n getSchemaUrlBytes() {\n java.lang.Object ref = schemaUrl_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n schemaUrl_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setSchema(Schema schema)\n {\n this.schema = schema;\n }", "@Column(length = 2048)\r\n @PlaceHolder(key = \"schema\")\r\n public String getUrlPath() {\r\n return urlPath;\r\n }", "@ApiModelProperty(value = \"A URI to a JSON-Schema file that defines additional attributes and relationships\")\n\n\n public String getSchemaLocation() {\n return schemaLocation;\n }", "@ApiModelProperty(value = \"A URI to a JSON-Schema file that defines additional attributes and relationships\")\n\n\n public String getSchemaLocation() {\n return schemaLocation;\n }", "String getSchemaFile();", "void setSchema(S schema);", "String handlerSchema();", "private static Schema createSchema(URL url) throws SAXException {\n\t\tSchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);\n\t\treturn schemaFactory.newSchema(url);\n\t}", "public void setSchemaLocation(String schemaLocation) {\n\t\t\r\n\t}", "public String getSchemaLocation() {\r\n return schemaLocation;\r\n }", "public String getSchema()\n {\n return schema;\n }", "public String getSchema() {\n return schema;\n }", "public void createURL(){\n urlDB = ( PREFACE + server + \"/\" + database + options);\n }", "S getSchema();", "@Override\n public void setXMLSchema(URL url) throws XMLPlatformException {\n if (null == url) {\n return;\n }\n if (null == documentBuilderFactory) {\n loadDocumentBuilderFactory();\n }\n try {\n documentBuilderFactory.setAttribute(SCHEMA_LANGUAGE, XML_SCHEMA);\n documentBuilderFactory.setAttribute(JAXP_SCHEMA_SOURCE, url.toString());\n } catch (IllegalArgumentException e) {\n // The attribute isn't supported so do nothing\n } catch (Exception e) {\n XMLPlatformException.xmlPlatformErrorResolvingXMLSchema(url, e);\n }\n }", "public Builder setSchemaUrlBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n schemaUrl_ = value;\n onChanged();\n return this;\n }", "private String getSchema(Document doc) {\n\t\tElement rootElement = doc.getRootElement();\n\t\treturn rootElement.getAttributeValue(\"schemaLocation\", xsiNamespace).replace(\"http://www.github.com/biosemantics\", \"\").trim();\n\t}", "public String getSchema() {\n return schema;\n }", "public String getSchema() {\n return schema;\n }", "public java.lang.String getSchema() {\r\n return schema;\r\n }", "public void setldschema(String ldap_schema_url) throws Exception{\t\t\r\n\t\tjava.io.InputStream ldschemaxml = null;\t\t\r\n\t\ttry {\r\n\t\t\tldschemaxmlurl = new java.net.URL(ldap_schema_url);\t\t \r\n\t\t\tldschemaxml = ldschemaxmlurl.openStream();\t\t\t\r\n\t\t\tjavax.xml.parsers.DocumentBuilderFactory ldschemaDomFactory = javax.xml.parsers.DocumentBuilderFactory.newInstance();\r\n\t\t\tjavax.xml.parsers.DocumentBuilder ldschemaDB = ldschemaDomFactory.newDocumentBuilder();\r\n\t\t\torg.w3c.dom.Document ldschemaDom = ldschemaDB.parse(ldschemaxml);\r\n\t\t\torg.w3c.dom.Element ldschemaRootElement = ldschemaDom.getDocumentElement();\r\n\t\t\torg.w3c.dom.NodeList ldschemaNodeList = ldschemaRootElement.getChildNodes();\r\n\t\t\torg.w3c.dom.NodeList ldschemaChildNodeList;\r\n\t\t\torg.w3c.dom.Node templdschemaNode;\r\n\t\t\t// Get the number of the schema\r\n\t\t\tint schemaCount = 0;\t\t\t\r\n\t\t\tfor (int i=0; i<ldschemaNodeList.getLength(); i++) {\r\n\t\t\t templdschemaNode = ldschemaNodeList.item(i);\r\n\t\t\t if (templdschemaNode.getNodeName().startsWith(Constant.attNameElement)) schemaCount +=1;\r\n\t\t\t}\r\n\t\t\t//Dimension Attribute and Attribute Type Array \t\r\n\t\t\tconAttName = new String[schemaCount];\r\n\t\t\tconAttType = new String[schemaCount];\r\n\t\t\t//Input Attribute and Attribute Type Array Value\r\n\t\t\tint tempSchemaCount = 0;\r\n\t\t\tlogger.debug(\"[Central LDAP schema Loading \"+schemaCount+\" attributes Start]\");\r\n\t\t\tfor (int i=0; i<ldschemaNodeList.getLength(); i++) {\r\n\t\t\t\t templdschemaNode = ldschemaNodeList.item(i);\t\t \t\t \t \r\n\t\t\t\t if (templdschemaNode.getNodeName().startsWith(Constant.attNameElement)) {\r\n\t\t\t\t\tconAttName[tempSchemaCount] = (templdschemaNode.getFirstChild().getNodeValue()).toUpperCase();\t\t\t\t \r\n\t\t\t\t\tconAttType[tempSchemaCount] = ((org.w3c.dom.Element)templdschemaNode).getAttribute(\"vtype\");\r\n\t\t\t\t\t//Print Attribute and Attribute Type Array Information\r\n\t\t\t\t\tlogger.debug(\"[Central LDAP schema Name]\"+conAttName[tempSchemaCount]+\" [Type] \"+conAttType[tempSchemaCount]);\r\n\t\t\t\t\ttempSchemaCount +=1;\t\t\t\t \r\n\t\t\t\t }\r\n\t\t\t}\r\n\t\t\tlogger.debug(\"[Central LDAP schema Loading End][\"+tempSchemaCount+\" Elements Added\");\r\n\t\t}catch(MalformedURLException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\tlogger.error(\"[Central LDAP schema Loading]\"+e.getMessage(), e);\r\n\t\t\tthrow new Exception(e.getMessage());\r\n\t\t}catch(org.xml.sax.SAXParseException spe){\r\n\t\t\tlogger.error(\"\\n[Central LDAP schema Loading]** Parsing error, line \" + spe.getLineNumber() + \", uri \" + spe.getSystemId());\r\n\t\t\tlogger.error(\" \" + spe.getMessage());\r\n\t\t\tthrow new Exception(spe.getMessage());\t\t\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t\tlogger.error(\"[Central LDAP schema Loading]\"+ex.getMessage(), ex);\r\n\t\t\tthrow new Exception(ex.getMessage());\r\n\t\t}finally{\r\n\t\t\tif ( ldschemaxml != null ) ldschemaxml.close();\r\n\t\t}\t\t\r\n\t}", "@Test\n public void atSchemaLocationTest() {\n // TODO: test atSchemaLocation\n }", "Schema createSchema();", "Builder addSchemaVersion(String value);", "public String getSchemeSpecific() {\n return \"\";\n }", "private void fixSchemaDocumentUri(MetadataSchemaRecord schemaRecord) {\n fixSchemaDocumentUri(schemaRecord, false);\n }", "public String getSchemaLocation() {\r\n\t\treturn mSchemaLocation;\r\n\t}", "public void setURL(String inputSchema, String outputSchema) {\n String port = getPortValueForJS();\n browser.setUrl(\"http://localhost:\" + port + \"/dataMapper?port=\" + port + \"&inputtype=\" + inputSchema\n + \"&outputtype=\" + outputSchema + NO_CACHE);\n }", "public void setSchemaInstance(String schemaInstance) {\n\t\t\r\n\t}", "public void setObject_schema(String object_schema) {\n this.object_schema = object_schema == null ? null : object_schema.trim();\n }", "Builder addSchemaVersion(Text value);", "String getSchemaName();", "String getSchemaName();", "public void setlldschema(String lldap_schema_url) throws Exception{\t\t\r\n\t\tjava.io.InputStream lldschemaxml = null;\t\t\r\n\t\ttry {\t\t\t\r\n\t\t\tUtil.validateSchemaLocalLDAP(); // Validate the local ldap schema\t\t\t\r\n\t\t\tlldschemaxmlurl = new java.net.URL(lldap_schema_url);\t\t \r\n\t\t lldschemaxml = lldschemaxmlurl.openStream();\t\t\r\n\t\t\tjavax.xml.parsers.DocumentBuilderFactory lldschemaDomFactory = javax.xml.parsers.DocumentBuilderFactory.newInstance();\r\n\t\t\tjavax.xml.parsers.DocumentBuilder lldschemaDB = lldschemaDomFactory.newDocumentBuilder();\r\n\t\t\torg.w3c.dom.Document lldschemaDom = lldschemaDB.parse(lldschemaxml);\r\n\t\t\torg.w3c.dom.Element lldschemaRootElement = lldschemaDom.getDocumentElement();\r\n\t\t\torg.w3c.dom.NodeList lldschemaNodeList = lldschemaRootElement.getChildNodes();\r\n\t\t \torg.w3c.dom.NodeList lldschemaChildNodeList;\r\n\t\t\torg.w3c.dom.Node templldschemaNode;\r\n\t\t\t// Get the number of the schema\r\n\t\t\tint schemaCount = 0;\t\t\r\n\t\t\tfor (int i=0; i<lldschemaNodeList.getLength(); i++) {\r\n\t\t templldschemaNode = lldschemaNodeList.item(i);\r\n\t\t\t if (templldschemaNode.getNodeName().startsWith(Constant.attNameElement)) schemaCount +=1;\r\n\t\t\t}\r\n\t\t\t// Dimension new Attribute and Attribute Type Array \t\r\n\t\t \tString[] tmp_conAttName = new String[conAttName.length + schemaCount];\r\n\t\t \tString[] tmp_conAttType = new String[conAttType.length + schemaCount];\r\n\t\t \t// Reload old Attribute and Attribute Type to Temp Array \r\n\t\t \tfor (int i=0; i<conAttName.length; i++){\r\n\t\t \t\ttmp_conAttName[i] = conAttName[i];\r\n\t\t \t\ttmp_conAttType[i] = conAttType[i];\r\n\t\t \t}\r\n\t\t\t//Input Attribute and Attribute Type Array Value\r\n\t\t\tint tempSchemaCount = conAttName.length;\r\n\t\t\tlogger.debug(\"[Local LDAP schema Loading Start]\");\r\n\t\t for (int i=0; i<lldschemaNodeList.getLength(); i++) {\r\n\t\t \ttemplldschemaNode = lldschemaNodeList.item(i);\r\n\t\t if (templldschemaNode.getNodeName().startsWith(Constant.attNameElement)) {\t\t \t\r\n\t\t \tif ( templldschemaNode.getFirstChild() == null ) throw new Exception(\"xml element called attibute_name not allow empty string\");\r\n\t\t tmp_conAttName[tempSchemaCount] = templldschemaNode.getFirstChild().getNodeValue();\r\n\t\t\t\t tmp_conAttType[tempSchemaCount] = ((org.w3c.dom.Element)templldschemaNode).getAttribute(\"vtype\");\t\t\t\t \r\n\t\t\t\t\tlogger.debug(\"[Local LDAP schema Name] \"+tmp_conAttName[tempSchemaCount]+\" [Type] \"+tmp_conAttType[tempSchemaCount]);\r\n\t\t\t\t tempSchemaCount +=1;\t\t\t\t \r\n\t\t \t\t }\r\n\t\t\t}\r\n\t\t\tif (tempSchemaCount == conAttName.length) {\r\n\t\t\t\tlogger.debug(\"No Local LDAP Schema Attribute Added !\");\r\n\t\t\t} else {\r\n\t\t\t// Reload Attribute and Attribute Type to Array \r\n\t\t\t\tconAttName = new String[tempSchemaCount];\r\n\t\t\t\tconAttType = new String[tempSchemaCount];\r\n\t\t\t\tfor (int i=0; i<conAttName.length; i++){\r\n\t\t\t\t\tconAttName[i] = tmp_conAttName[i];\r\n\t\t\t\t\tconAttType[i] = tmp_conAttType[i];\r\n\t\t\t\t}\t\t\t\t \r\n\t\t\t}\r\n\t\t\tlogger.debug(\"[Local LDAP schema Loading End][Total \"+tempSchemaCount+\" Attriutes in Array]\");\r\n\t\t} catch(MalformedURLException e){\r\n\t\t\te.printStackTrace();\t\t\t\r\n\t\t\tlogger.error(\"[Local LDAP schema Loading]\"+e.getMessage(), e);\r\n\t\t\tthrow new Exception(e.getMessage());\r\n\t\t} catch(org.xml.sax.SAXParseException spe){\r\n\t\t\tlogger.error(\"\\n[Local LDAP schema Loading]** Parsing error, line \" + spe.getLineNumber() + \", uri \" + spe.getSystemId());\r\n\t\t\tlogger.error(\" \" + spe.getMessage());\r\n\t\t\tthrow new Exception(spe.getMessage());\t\t\t\t\r\n\t\t} catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t\tlogger.error(\"[Local LDAP schema Loading]\"+ex.getMessage(), ex);\r\n\t\t\tthrow new Exception(ex.getMessage());\r\n\t\t} finally {\r\n\t\t\tif ( lldschemaxml != null ) lldschemaxml.close();\r\n\t\t}\r\n\t}", "public void setSchema(String schema)\n {\n if(this.props == null)\n {\n this.props = new Properties();\n }\n this.props.setProperty(\"db.schema\", schema);\n }", "public Schema getSchema();", "@Override\r\n\t\tpublic void setSchema(String schema) throws SQLException {\n\t\t\t\r\n\t\t}", "public void setSchema(String aValue) {\n String oldValue = schema;\n schema = aValue;\n changeSupport.firePropertyChange(\"schema\", oldValue, aValue);\n }", "SchemaBuilder withResourceResolver(LSResourceResolver resourceResolver);", "String getSchemaVersion();", "SchemaDefinition createSchemaDefinition();", "public String schema() {\n return schemaName;\n }", "public String schema() {\n return schemaName;\n }", "public String getSchemaName() { return schemaName; }", "public MetaSchema getMetaSchema(int iSchema);", "public String getObject_schema() {\n return object_schema;\n }", "public String getStrDataSchema() {\n return strDataSchema;\n }", "public boolean setSchema(String schema){\n \ttry {\n \t\tsql = connection.createStatement();\n\t\t\tString sqlText;\n\t\t\tsqlText = \"SET search_path TO \" + schema;\n\t\t\tsql.executeUpdate(sqlText);\n\t\t} catch (SQLException e) {\n\t\t\treturn false;\n\t\t}\n \treturn true;\n }", "public String getSchemaPath(final String requestUrl) {\n // find out if we have a known route, e.g. /rules, /bnrules, etc.\n final Optional<String> match = businessObjectToJsonSchema.keySet().stream().filter(requestUrl::contains).findAny();\n\n if (match.isEmpty()) {\n logger.debug(\"Schema validation not configured for: {}\", requestUrl);\n return null; // the request has not mapping, meaning there is no schema for this request URL's payload\n }\n\n final String route = match.get();\n // find out if there are trailing elements after the base mapping (e.g. rules/<hash>). If so, we validate.\n if (requestUrl.lastIndexOf(route) >= requestUrl.lastIndexOf(\"/\")) {\n // this means we have no hash or any other trailing path components after the route. We are not validating this.\n // The payloads we are interested in are always qualified with a hash, a country, etc.\n return null;\n }\n // since there is currently only one schema per route, we can take the route as a key for the schema\n // e.g. if we have /rules/<something>, we use the same schema, no matter what <something> is.\n return businessObjectToJsonSchema.get(route);\n }", "public String getSchema()\n {\n String schema = \"\";\n if(this.props != null && !this.props.isEmpty())\n {\n schema = this.props.getProperty(\"db.schema\");\n }\n \n return schema;\n }", "public URI getSchemaDocumentUri(MetadataSchemaRecord schemaRecord) {\n return WebMvcLinkBuilder.linkTo(WebMvcLinkBuilder.methodOn(this.getClass()).getSchemaDocumentById(schemaRecord.getSchemaId(), schemaRecord.getSchemaVersion(), null, null)).toUri();\n }", "public interface HeaderSchema {\n String code = \"c\";//服务器返回码\n String error_msg = \"e\";//服务器返回错误信息\n}", "public static void setDatabaseURL(String url){\n databaseURL=url;\n }", "static Path getSchemaPath(Configuration conf) {\n int iteration = lastSchemaUpdate(conf);\n return getOutputPath(conf, SCHEMA_BASE + iteration);\n }", "private static String composeApiUrl(String string){\r\n\t\treturn API_BASE + API_VERSION + string;\r\n\t}", "String getScheme();", "@Test\n public void testPartitionOne()\n {\n\t UrlValidator urlVal = new UrlValidator(null, null, UrlValidator.ALLOW_ALL_SCHEMES);\n\t String resource = \"://www.example.com\";\n\t ArrayList<ResultPair> schemaUrls = new ArrayList<ResultPair>();\n\t //append the static valid resource string to each schema as a new pair\n\t for(ResultPair schema : this.m_schemas)\n\t {\n\t\t ResultPair pair = new ResultPair(schema.item + resource, schema.valid);\n\t\t schemaUrls.add(pair);\n\t }\n\t //test each now full URL\n\t for(ResultPair pair : schemaUrls)\n\t {\n\t\t collector.checkThat(pair.item, pair.valid, equalTo(urlVal.isValid(pair.item)));\n\t }\n }", "public Schema(final String reference) throws IOException {\n\t\tsuper(reference);\n\t}", "public test_SDURL(String n) {\n super(n);\n }", "java.lang.String getScheme();", "public String getSchema()\n\t{\n\t\t//begin vpj-cd e-evolution 03/04/2005\n\t\treturn \"compiere\";\n\t\t//end vpj-cd e-evolution 03/04/2005\n\t}", "public void setSchema(URI aSchemaUri) throws SAXException, MalformedURLException {\n schema = SCHEMA_FACTORY.newSchema(aSchemaUri.toURL());\n }", "public String getScheme() {\n return scheme;\n }", "public String getScheme() {\n return scheme;\n }", "public String getScheme() {\n return scheme;\n }", "public void setSubSchema(String subSchema) {\n this.subSchema = subSchema;\n }", "public SchemaInfo getSchema () throws Exception;", "public String getIdGeneratorDatabaseConnectionUrl(){\n \t\treturn getProperty(\"org.sagebionetworks.id.generator.database.connection.url\");\n \t}", "public int getMetaSchemas();", "String createParameterJsonSchema();", "@Override\r\n public String getScheme() {\r\n return scheme;\r\n }", "AstroSchema getSchema();", "public void addSchema (final String uri, final IslandSchema s)\n {\n if (m_aSchemata.containsKey (uri))\n throw new IllegalArgumentException ();\n m_aSchemata.put (uri, s);\n }", "public static Schema getSchema(final String schemaURL) {\r\n Schema s = null;\r\n try {\r\n final URL url = FileUtils.getResource(schemaURL);\r\n \t\r\n final File file = FileUtils.getFile(schemaURL);\r\n \r\n\r\n if (logB.isInfoEnabled()) {\r\n logB.info(\"XmlFactory.getSchema : retrieve schema and compile it : \" + schemaURL);\r\n }\r\n\r\n // 2. Compile the schema.\r\n final long start = System.nanoTime();\r\n\r\n SchemaFactory sf = getSchemaFactory();\r\n s = sf.newSchema(url);\r\n \r\n\r\n TimerFactory.getTimer(\"XmlFactory.getSchema[\" + schemaURL + \"]\").addMilliSeconds(start, System.nanoTime());\r\n\r\n if (logB.isInfoEnabled()) {\r\n logB.info(\"XmlFactory.getSchema : schema ready : \" + s);\r\n }\r\n\r\n } catch (final SAXException se) {\r\n throw new IllegalStateException(\"XmlFactory.getSchema : unable to create a Schema for : \" + schemaURL, se);\r\n/* } catch (final MalformedURLException mue) {\r\n throw new IllegalStateException(\"XmlFactory.getSchema : unable to create a Schema for : \" + schemaURL, mue);\r\n*/ }\r\n return s;\r\n }", "private DefaultSchema() {\n super(\"\", null);\n }", "BigDecimal getLqncoreSchemaVersion();", "@Value.Default\n public String getUri() {\n\treturn \"\";\n }", "private String initUrlParameter() {\n StringBuffer url = new StringBuffer();\n url.append(URL).append(initPathParameter());\n return url.toString();\n }", "@VisibleForTesting\n public JsonSchemaValidator(final URI baseUri) {\n this.jsonSchemaFactory = JsonSchemaFactory.getInstance(SpecVersion.VersionFlag.V7);\n this.baseUri = baseUri;\n }", "SchemaReference setVersion(String version);", "public void testYourFirstPartition() {\r\n\t UrlValidator urlVal = new UrlValidator(null, null, UrlValidator.ALLOW_ALL_SCHEMES);\r\n\t System.out.println(\"1st partition with a valid scheme = true: \" + urlVal.isValid(\"http://www.google.com\")); //bug here = does not account for http://\r\n System.out.println(\"1st partition with a invalid scheme = false: \" + urlVal.isValid(\"://go.a1a:65a\")); \r\n }", "public void setStrDataSchema(final String strDataSchema) {\n this.strDataSchema = strDataSchema;\n }", "public SchemaDef getSourceSchema();", "public interface SensorSchema\n{\n String ID = \"_id\";\n String SENSOR_ID = \"sensor_id\";\n String NAME = \"name\";\n String PIN_NUMBER = \"pin_number\";\n String FREQUENCY = \"frequency\";\n String TIME_UNIT = \"time_unit\";\n String INPUT_TYPE = \"input_type\";\n String MEASUREMENT_TYPE = \"measurement_type\";\n String THRESHOLD = \"threshold\";\n String THRESHOLD_TYPE = \"threshold_type\";\n String STATE = \"state\";\n String USE_XIVELY = \"use_xively\";\n String DATASTREAM = \"datastream\";\n}", "public void setScheme(String newValue);", "private void fixSchemaDocumentUri(MetadataSchemaRecord schemaRecord, boolean saveUrl) {\n String schemaDocumentUri = schemaRecord.getSchemaDocumentUri();\n schemaRecord.setSchemaDocumentUri(getSchemaDocumentUri(schemaRecord).toString());\n LOG.trace(\"Fix schema document Uri '{}' -> '{}'\", schemaDocumentUri, schemaRecord.getSchemaDocumentUri());\n if (saveUrl) {\n LOG.trace(\"Store path for URI!\");\n Url2Path url2Path = new Url2Path();\n url2Path.setPath(schemaDocumentUri);\n url2Path.setUrl(schemaRecord.getSchemaDocumentUri());\n url2Path.setType(schemaRecord.getType());\n url2Path.setVersion(schemaRecord.getSchemaVersion());\n url2PathDao.save(url2Path);\n }\n }" ]
[ "0.7147353", "0.6984463", "0.6984463", "0.6629155", "0.66020215", "0.65841216", "0.6460415", "0.6364115", "0.6349817", "0.6290244", "0.623084", "0.61357313", "0.60573936", "0.59503204", "0.5879538", "0.58049405", "0.5789022", "0.5789022", "0.57843155", "0.578323", "0.5769759", "0.5767667", "0.5762977", "0.57459414", "0.57310104", "0.5706264", "0.56904745", "0.5569326", "0.5563721", "0.55581963", "0.5549666", "0.55441135", "0.55441135", "0.54911244", "0.54807526", "0.54463154", "0.54457366", "0.5444", "0.54438764", "0.542985", "0.53788245", "0.5371495", "0.5365843", "0.5353684", "0.5348177", "0.5345693", "0.5345693", "0.53356576", "0.5314088", "0.5295183", "0.5294992", "0.5263575", "0.52472883", "0.52293414", "0.52218616", "0.52130747", "0.52130747", "0.5203701", "0.5198971", "0.5193373", "0.5182805", "0.51563543", "0.51445854", "0.51256216", "0.5124387", "0.5118153", "0.5095768", "0.50947976", "0.5080895", "0.50749457", "0.5067582", "0.5045139", "0.50383145", "0.502869", "0.5012795", "0.49950647", "0.49940136", "0.49940136", "0.49940136", "0.49924836", "0.49904507", "0.49875924", "0.49874806", "0.49778548", "0.4964115", "0.4948847", "0.4944569", "0.49292448", "0.49115318", "0.49096707", "0.49077758", "0.48822856", "0.48789853", "0.48758745", "0.48752138", "0.48751476", "0.48718512", "0.48692214", "0.48660442", "0.48657748" ]
0.61599565
11
open_white_list repeated string open_white_list = 11;
public com.google.protobuf.ProtocolStringList getOpenWhiteListList() { return openWhiteList_; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SList oddWords();", "public java.lang.String getOpenWhiteList(int index) {\n return openWhiteList_.get(index);\n }", "public int getOpenWhiteListCount() {\n return openWhiteList_.size();\n }", "public java.lang.String getOpenWhiteList(int index) {\n return openWhiteList_.get(index);\n }", "public int getOpenWhiteListCount() {\n return openWhiteList_.size();\n }", "private LowercaseWordList() {\n\n }", "public Builder setOpenWhiteList(\n int index, java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureOpenWhiteListIsMutable();\n openWhiteList_.set(index, value);\n onChanged();\n return this;\n }", "static List DuplicateElements(List<Character> characters){\r\n\t\tList newlist=new ArrayList<>();\r\n\t\tfor(char c:characters)\r\n\t\t{\r\n\t\t\tnewlist.add(Collections.nCopies(2,c ));\r\n\t\r\n\t\t}\r\n\tSystem.out.println(newlist);\r\n\treturn newlist;\r\n\t}", "public Builder addOpenWhiteList(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureOpenWhiteListIsMutable();\n openWhiteList_.add(value);\n onChanged();\n return this;\n }", "public static List<String> createCompetencyList() {\n List<String> list = new ArrayList<String>();\n list.add(\"Line number 1\");\n list.add(\"Line number 2\");\n return list;\n }", "private void exercise2() {\n List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerOddLengthList = list.stream()\n .filter((string) -> string.length() % 2 != 0)\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public void setWhiteSpacesCount(long value) {\n this.whiteSpacesCount = value;\n }", "List<String> mo5877c(String str);", "java.util.List<String> getRepeatedStringFieldList();", "private String addRandomSpacing(String originalText) {\n ArrayList<Expression> list = new ArrayList<Expression>();\n\n\t\tclass MyVisitor extends ModifierVisitor<Void> {\n\t\t @Override\n\t\t public Node visit(VariableDeclarator declarator, Void args) {\n\t Expression expression = declarator.getInitializer().get();\n\t \n\t \n\t // We're looking for string.\n\t if (expression instanceof StringLiteralExpr) {\n\t list.add(expression);\n\t }\n\t\t return null;\n\t\t }\n\t\t}\n\t\t\n\t\t\n\t}", "SList evenWords();", "List<String> mo5876c();", "void fillList(List<String> toFill) {\n for (int i = 0; i < number; i++) {\n toFill.add(i + \"\");\n }\n }", "public String getWhiteList0() {\n return getString(\"whitelist.0\");\n }", "public Builder clearOpenWhiteList() {\n openWhiteList_ = com.google.protobuf.LazyStringArrayList.EMPTY;\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n return this;\n }", "public Builder addAllOpenWhiteList(\n java.lang.Iterable<java.lang.String> values) {\n ensureOpenWhiteListIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, openWhiteList_);\n onChanged();\n return this;\n }", "public com.google.protobuf.ByteString\n getOpenWhiteListBytes(int index) {\n return openWhiteList_.getByteString(index);\n }", "public abstract List<C41717j> mo70725h(String str);", "static int getNumPatterns() { return 64; }", "private static void skipSplitAdd(String s, List<String> list) {\n String tmp[] = s.split(\" \");\n\n for (int i = 1; i < tmp.length; i++) {\n list.add(tmp[i]);\n\n // System.out.println(tmp[i]);\n }\n }", "public static void addStars(ArrayList<String> list){\r\n //Loops through the list\r\n for(int i = 1; i < list.size(); i+=2){\r\n list.add(i, \"*\");\r\n }\r\n System.out.println(list);\r\n }", "private void m4676a(List<C0906d> list, StringBuilder sb) {\n if (sb.length() != 0) {\n list.add(new C0906d(C0906d.EnumC0907a.LITERAL, sb.toString()));\n }\n }", "public void setWhiteCounter(int num){\n this.whiteCounter = num;\n }", "StringList createStringList();", "List<C1114c> mo5886k(String str);", "private String genWhiteSpaceRegex(int noOfWhiteSpace,\n String multiWhiteSpace,\n String zeroWhiteSpace) {\n\n return (noOfWhiteSpace == 0) ? zeroWhiteSpace\n : multiWhiteSpace.replace(\"%%\", String.valueOf(noOfWhiteSpace));\n }", "public com.google.protobuf.ByteString\n getOpenWhiteListBytes(int index) {\n return openWhiteList_.getByteString(index);\n }", "private void generateLists(String num, Stack<String> numberList)\n {\n\tfor(int i = 0, len = num.length(); i < len; i++)\n\t numberList.push(new Character(num.charAt(i)).toString());\n }", "private void exercise5() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> nonDuplicateList;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n nonDuplicateList = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .collect(toList());\n }\n\n nonDuplicateList.forEach(System.out::println);\n }", "void mo100443a(List<String> list);", "ListString createListString();", "List<Log> mo13160a(String str, int i);", "public com.google.protobuf.ProtocolStringList\n getOpenWhiteListList() {\n return openWhiteList_.getUnmodifiableView();\n }", "public static void main(String[] args) { String s = \"catsanddog\";\n// List<String> wordDict = new ArrayList<>(Arrays.asList(\"cat\", \"cats\", \"and\", \"sand\", \"dog\"));\n//\n String s = \"pineapplepenappl\";\n List<String> wordDict = new ArrayList<>(Arrays.asList(\"apple\", \"pen\", \"applepen\", \"pine\", \"pineapple\"));\n\n WordBreak140 tmp = new WordBreak140();\n tmp.wordBreak(s, wordDict);\n }", "@Test\n public void repeatedSubstringPattern() {\n assertTrue(new Solution1().repeatedSubstringPattern(\"abcabcabcabc\"));\n }", "@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }", "private static List<String> testStringGenerator(List<String> palString) {\n\t\tList<String> list = new ArrayList<>();\n\t\tfor (String pal : palString) {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor (int i = 0; i < 10; i++) {\n\t\t\t\tsb.append(pal);\n\t\t\t\tfor (int j = 0; j < pal.length(); j++) {\n\t\t\t\t\tsb.append(j % 10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(sb.toString());\n\t\t}\n\t\treturn list;\n\t}", "public static void makeBlanks(char[] list) {\n\t\tfor (int i = 0; i < list.length; i++) {\n\t\t\tlist[i] = '*';\n\t\t}\n\t}", "public int selectOriginalTokens (Scanner scan, String [] list){\n \n int count = 0;\n while(scan.hasNext()){\n String line = scan.nextLine();\n String[] t = line.split(\"[ \\n\\t\\r.,:?)({}\\\\[\\\\]]\");\n for (int i = 0; i < t.length; i++){\n String item = t[i].trim();\n if(item.length() > 0){\n list[count] = item;\n count++;\n }//End if statement\n }//End for loop\n }//End while loop\n \n return count;\n }", "private String whiteSpace(String sum, String num)\n {\n\tString space = \"\";\n\tfor(int i = 0; i < sum.length() - num.length(); i++)\n\t space += \" \";\n\treturn space;\n }", "void mo54419a(List<String> list);", "List<C1113b> mo5874b(String str);", "public static List<String> stringList() {\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.add(\"abdxxx\");\n\t\tlist.add(\"xxxxx\");\n\t\tlist.add(\"hi\");\n\t\tlist.add(\"SmoothStack\");\n\t\tlist.add(\"Wyatt x Wyatt x\");\n\t\treturn list;\n\t}", "private static String[] resetStringArray() {\n String[] st = new String[L_MAX];\n L = 2 << 8;\n W = 9;\n int i;\n // initialize symbol table with all 1-character strings\n for (i = 0; i < R; i++)\n st[i] = \"\" + (char) i;\n st[i++] = \"\"; // (unused) lookahead for EOF\n return st;\n }", "public void setUp2( )\n\t{\n\t\tfor( int i = 0; i < 1000; i++ )\n\t\t{\n\t\t\tlista.append( \"\" + i );\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tList<Character>st1=new ArrayList<>();\n\t\n\t\tst1.add('a');\n\t\tst1.add('b');\n\t\tst1.add('a');\n\t\tst1.add('a');\n\t\tst1.add('c');\n\t\tst1.add('t');\n\t\n\t\tSystem.out.println(st1);//[a, b, a, a, c, t]\n\t\t\n\t\tList<Character>st2=new ArrayList<>();//empty []\n\t\tfor (int i=0; i<st1.size();i++) {\n\t\t\tif(!st2.contains(st1.get(i))) {\n\t\t\t\t// created str2 [empty], we will get the element from st1 to st2 while checking if there is repetition \n\t\t\t\tst2.add(st1.get(i));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(st2);//[a, b, c, t]\n\t\t\n\n\t}", "private void many(Set<String> s) {\n\t\twhile (!done() && s.contains(program.charAt(pos)+\"\"))\n\t\t\tpos++;\n }", "private static String createPrepStmPlaceHolder(int num) {\n\t\tchar[] c_ar = new char[num*3];\n\t\tc_ar[0] = '(';\n\t\tc_ar[1] = '?';\n\t\tfor(int i=1; i<num; ++i) {\n\t\t\tc_ar[3*i-1] = ',';\n\t\t\tc_ar[3*i] = ' ';\n\t\t\tc_ar[3*i+1] = '?';\n\t\t}\n\t\tc_ar[3*num-1] = ')';\n\t\treturn new String(c_ar);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_2() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\", false), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "private void exercise1() {\n final List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerList = list.stream()\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }", "private static String repeatSpace(int number) {\n StringBuilder space = new StringBuilder();\n\n // Adding spaces.\n for (int i = 0; i < number; i++) {\n space.append(\" \");\n }\n\n //returning spaces.\n return space.toString();\n }", "public void mo88640a(List<String> list) {\n List<String> stringList = RxPreferences.INSTANCE.getStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), new ArrayList());\n stringList.addAll(0, list);\n RxPreferences.INSTANCE.putStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), (List) StreamSupport.m150134a(stringList).mo131128a(new AbstractC32239o(new HashSet(stringList)) {\n /* class com.zhihu.android.p1480db.fragment.customview.C18240x255e53c2 */\n private final /* synthetic */ HashSet f$0;\n\n {\n this.f$0 = r1;\n }\n\n @Override // java8.util.p2234b.AbstractC32239o\n public final boolean test(Object obj) {\n return DbEditorSuggestTagCustomView.m93354a(this.f$0, (String) obj);\n }\n }).mo131126a(5).mo131125a(Collectors.m150203a($$Lambda$ofunvu1bqmYbfXGEtxXaV_csE4M.INSTANCE)));\n }", "public Builder addOpenWhiteListBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n ensureOpenWhiteListIsMutable();\n openWhiteList_.add(value);\n onChanged();\n return this;\n }", "@Test\n public void noSpacesBetweenKeywordsTest() {\n tester.yields(\"LaLaLaLaLaaaLi\", lala.EXPRESSION);\n }", "private int skipLeadingWhite( List content, int start) {\r\n if (start < 0) {\r\n start = 0;\r\n }\r\n\r\n int index = start;\r\n int size = content.size();\r\n if (currentFormat.trimAllWhite\r\n || currentFormat.textNormalize\r\n || currentFormat.textTrim) {\r\n while( index < size) {\r\n if ( !isAllWhitespace( content.get(index))) {\r\n return index;\r\n }\r\n index++;\r\n }\r\n }\r\n return index;\r\n }", "private void initWhitespace(Set<String> s) {\n\t\ts.add(\" \");\n\t\ts.add(\"\\n\");\n\t\ts.add(\"\\t\");\n }", "List<C1111j> mo5869a(int i);", "private void appendPlaceHolder(StringBuilder builder, int indent, int consecutiveExcluded, String message) {\n indent(builder, indent);\n builder.append(ELLIPSIS)\n .append(\" \")\n .append(consecutiveExcluded)\n .append(\" \")\n .append(message)\n .append(CoreConstants.LINE_SEPARATOR);\n }", "public void visiualizeSkipList(){\r\n\t\tint number=0;\r\n\t\tNode dummy = sl.getFrom(0,0);\r\n\t\t\r\n\t\tNode next;\r\n\t\tfor(int i=sl.height(); i>=0; i--){\r\n\t\t\t\r\n\t\t\tnext = sl.getFrom(i,0);\r\n\t\t\t\r\n\t\t\tfor(int j=0; j<(sl.size()+2); j++){\r\n\r\n\t\t\t\tnumber = next.getKey();\r\n\t\t\t\t//F.p(number);\r\n\t\t\t\tif(number==dummy.getKey()){\r\n\r\n\t\t\t\t\tif(number==minf)\r\n\t\t\t\t\t\tSystem.out.print(\"-inf\");\r\n\t\t\t\t\telse if(number==inf)\r\n\t\t\t\t\t\tSystem.out.print(\"---inf\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(\"-\",2)+number);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(\"-\",4));\r\n\t\t\t\t\r\n\t\t\t\tif(dummy.getKey()==number)\r\n\t\t\t\t\tnext = next.getRight();\r\n\t\t\t\t\r\n\t\t\t\tdummy = dummy.getRight();\r\n\t\t\t}\r\n\t\t\tdummy = sl.getFrom(0,0);\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "public long getWhiteSpacesCount() {\n return whiteSpacesCount;\n }", "@Test\n\tpublic void testStartingIndicesRegression(){\n\t\tassertLeftmostStartingIndices(\"5,1,7,3,2|-..xxx$1..x...xxx$3....-xx........\", 0, 6, 8, 18, 22);\n\t\tassertRightmostStartingIndices(\"7,5|.......xxx$1....xxx$2..-\", 6, 14);\n\t\t\n\t}", "public MacroList() {\n\t\tthis.macrosses = new HashMap<Integer, String>(12);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_1() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\"), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n String s=\"a /*a*/ sd /*v*/\";\n Pattern p = Pattern.compile(\"(\\\\/\\\\*(\\\\w|\\r\\n)+\\\\*\\\\/)\");\n Matcher m = p.matcher(s);\n List<String> l = new ArrayList<>(100);\n\n while (m.find()) {\n System.out.println(\"tick\");\n l.add(s.substring(m.start()+2, m.end()-2));\n }\n\n System.out.println(l);\n }", "StringPatternCounter(ArrayList<StringPattern> stringPatternList, String fileInput)\n {\n super(fileInput);\n this.stringPatternList = stringPatternList;\n }", "@Before\n public void createString(){\n s1 = \"casa\";\n\ts2 = \"cassa\";\n\ts3 = \"\";\n\ts4 = \"casa\";\n }", "public String minRemoveToMakeValid(String s) {\n int openAvail = 0;\n Set<Integer> skipSet = new HashSet<>();\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) == ')') {\n if (openAvail == 0) {\n skipSet.add(i);\n } else {\n openAvail -= 1;\n }\n } else if (s.charAt(i) == '(') {\n openAvail += 1;\n }\n }\n\n int closedAvail = 0;\n for (int i = s.length() - 1; i >= 0; i--) {\n if (s.charAt(i) == ')') {\n closedAvail += 1;\n } else if (s.charAt(i) == '(') {\n if (closedAvail == 0) {\n skipSet.add(i);\n } else {\n closedAvail -= 1; \n }\n }\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < s.length(); i++) {\n if (!skipSet.contains(i)){\n sb.append(s.charAt(i));\n }\n }\n return sb.toString();\n }", "@Test(timeout = 4000)\n public void test20() throws Throwable {\n StringReader stringReader0 = new StringReader(\"0(Hu\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer2 = new StreamTokenizer(stringReader0);\n JSTerm jSTerm0 = new JSTerm(streamTokenizer0);\n stringReader0.reset();\n StreamTokenizer streamTokenizer3 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer4 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer5 = new StreamTokenizer(stringReader0);\n streamTokenizer0.commentChar((-4));\n StreamTokenizer streamTokenizer6 = new StreamTokenizer(stringReader0);\n streamTokenizer6.ordinaryChars((-1), (-322070664));\n streamTokenizer1.parseNumbers();\n jSTerm0.add((Object) \"JSTerm: Error reading control parameters: \");\n StreamTokenizer streamTokenizer7 = new StreamTokenizer(stringReader0);\n streamTokenizer7.pushBack();\n streamTokenizer1.nextToken();\n StreamTokenizer streamTokenizer8 = new StreamTokenizer(stringReader0);\n streamTokenizer2.slashSlashComments(false);\n JSTerm jSTerm1 = new JSTerm(streamTokenizer5);\n streamTokenizer1.slashStarComments(false);\n streamTokenizer3.eolIsSignificant(false);\n streamTokenizer7.commentChar((-4));\n StreamTokenizer streamTokenizer9 = new StreamTokenizer(stringReader0);\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n jSSubstitution0.listIterator();\n JSSubstitution jSSubstitution1 = jSTerm1.matches((JSPredicateForm) jSTerm0, jSSubstitution0);\n assertTrue(jSSubstitution1.fail());\n }", "public Removalstops()\n {\n stopWords.add(\"am\");\n stopWords.add(\"my\");\nstopWords.add(\"at\");\nstopWords.add(\"a\");\nstopWords.add(\"i\");\nstopWords.add(\"is\");\nstopWords.add(\"of\");\nstopWords.add(\"have\");\nstopWords.add(\"--\");\nstopWords.add(\"do\");\nstopWords.add(\"the\");\nstopWords.add(\"was\");\nstopWords.add(\"iam\");\nstopWords.add(\"there\");\nstopWords.add(\"what\");\nstopWords.add(\"for\");\nstopWords.add(\"in\");\nstopWords.add(\"very\");\nstopWords.add(\"and\");\nstopWords.add(\"to\");\nstopWords.add(\"often\");\nstopWords.add(\"because\");\nstopWords.add(\"in\");\nstopWords.add(\"an\");\nstopWords.add(\"can\");\nstopWords.add(\"via\");\nstopWords.add(\"even\");\nstopWords.add(\"as\");\nstopWords.add(\"best\");\nstopWords.add(\"been\");\nstopWords.add(\"into\");\nstopWords.add(\"by\");\nstopWords.add(\"around\");\nstopWords.add(\"being\");\nstopWords.add(\"from\");\nstopWords.add(\"etc\");\nstopWords.add(\"his\");\nstopWords.add(\"do\");\nstopWords.add(\"have\");\nstopWords.add(\"had\"); \nstopWords.add(\"able\");\nstopWords.add(\"about\");\nstopWords.add(\"above\");\nstopWords.add(\"abroad\");\nstopWords.add(\"according\");\nstopWords.add(\"accordingly\");\nstopWords.add(\"across\");\nstopWords.add(\"actually\");\nstopWords.add(\"adj\");\nstopWords.add(\"after\");\nstopWords.add(\"afterwards\");\nstopWords.add(\"again\");\nstopWords.add(\"against\");\nstopWords.add(\"ago\");\nstopWords.add(\"ahead\");\nstopWords.add(\"ain't\");\nstopWords.add(\"all\");\nstopWords.add(\"allow\");\nstopWords.add(\"allows\");\nstopWords.add(\"almost\");\nstopWords.add(\"alone\");\nstopWords.add(\"along\");\nstopWords.add(\"alongside\");\nstopWords.add(\"already\");\nstopWords.add(\"also\");\nstopWords.add(\"although\");\nstopWords.add(\"always\");\nstopWords.add(\"am\");\nstopWords.add(\"amid\");\nstopWords.add(\"amidst\");\nstopWords.add(\"among\");\nstopWords.add(\"amongst\");\nstopWords.add(\"an\");\nstopWords.add(\"and\");\nstopWords.add(\"another\");\nstopWords.add(\"any\");\nstopWords.add(\"anybody\");\nstopWords.add(\"anyhow\");\nstopWords.add(\"anyone\");\nstopWords.add(\"anything\");\nstopWords.add(\"anyway\");\nstopWords.add(\"anyways\");\nstopWords.add(\"anywhere\");\nstopWords.add(\"apart\");\nstopWords.add(\"appear\");\nstopWords.add(\"appreciate\");\nstopWords.add(\"appropriate\");\nstopWords.add(\"are\");\nstopWords.add(\"aren't\");\nstopWords.add(\"around\");\nstopWords.add(\"as\");\nstopWords.add(\"a's\");\nstopWords.add(\"aside\");\nstopWords.add(\"ask\");\nstopWords.add(\"asking\");\nstopWords.add(\"associated\");\nstopWords.add(\"at\");\nstopWords.add(\"available\");\nstopWords.add(\"away\");\nstopWords.add(\"awfully\");\nstopWords.add(\"back\");\nstopWords.add(\"backward\");\nstopWords.add(\"backwards\");\nstopWords.add(\"be\");\nstopWords.add(\"became\");\nstopWords.add(\"beacause\");\nstopWords.add(\"become\");\nstopWords.add(\"becomes\");\nstopWords.add(\"becoming\");\nstopWords.add(\"been\");\nstopWords.add(\"before\");\nstopWords.add(\"beforehand\");\nstopWords.add(\"begin\");\nstopWords.add(\"behind\");\nstopWords.add(\"being\");\nstopWords.add(\"believe\");\nstopWords.add(\"below\");\nstopWords.add(\"beside\");\nstopWords.add(\"besides\");\nstopWords.add(\"best\");\nstopWords.add(\"better\");\nstopWords.add(\"between\");\nstopWords.add(\"beyond\");\nstopWords.add(\"both\");\nstopWords.add(\"brief\");\nstopWords.add(\"but\");\nstopWords.add(\"by\");\nstopWords.add(\"came\");\nstopWords.add(\"can\");\nstopWords.add(\"cannot\");\nstopWords.add(\"cant\");\nstopWords.add(\"can't\");\nstopWords.add(\"caption\");\nstopWords.add(\"cause\");\nstopWords.add(\"causes\");\nstopWords.add(\"certain\");\nstopWords.add(\"cetrainly\");\nstopWords.add(\"changes\");\nstopWords.add(\"clearly\");\nstopWords.add(\"c'mon\");\nstopWords.add(\"co\");\nstopWords.add(\"co.\");\nstopWords.add(\"com\");\nstopWords.add(\"come\");\nstopWords.add(\"comes\");\nstopWords.add(\"concerning\");\nstopWords.add(\"consequently\");\nstopWords.add(\"consider\");\nstopWords.add(\"considering\");\nstopWords.add(\"could\");\nstopWords.add(\"couldn't\");\nstopWords.add(\"c's\");\nstopWords.add(\"currently\");\nstopWords.add(\"dare\");\nstopWords.add(\"daren't\");\nstopWords.add(\"definitely\");\nstopWords.add(\"described\");\nstopWords.add(\"despite\");\nstopWords.add(\"did\");\nstopWords.add(\"didn't\");\nstopWords.add(\"different\");\nstopWords.add(\"directly\");\nstopWords.add(\"do\");\nstopWords.add(\"does\");\nstopWords.add(\"doesn't\");\nstopWords.add(\"doing\");\nstopWords.add(\"done\");\nstopWords.add(\"don't\");\nstopWords.add(\"down\");\nstopWords.add(\"downwards\");\nstopWords.add(\"during\");\nstopWords.add(\"each\");\nstopWords.add(\"edu\");\nstopWords.add(\"eg\");\nstopWords.add(\"eight\");\nstopWords.add(\"eighty\");\nstopWords.add(\"either\");\nstopWords.add(\"else\");\nstopWords.add(\"elsewhere\");\nstopWords.add(\"end\");\nstopWords.add(\"ending\");\nstopWords.add(\"enough\");\nstopWords.add(\"entirely\");\nstopWords.add(\"especially\");\nstopWords.add(\"et\");\nstopWords.add(\"etc\");\nstopWords.add(\"even\");\nstopWords.add(\"evenmore\");\nstopWords.add(\"every\");\nstopWords.add(\"everybody\");\nstopWords.add(\"everyone\");\nstopWords.add(\"everything\");\nstopWords.add(\"everywhere\");\nstopWords.add(\"ex\");\nstopWords.add(\"exactly\");\nstopWords.add(\"example\");\nstopWords.add(\"except\");\nstopWords.add(\"fairly\");\nstopWords.add(\"far\");\nstopWords.add(\"farhter\");\nstopWords.add(\"few\");\nstopWords.add(\"fewer\");\nstopWords.add(\"fifth\");\nstopWords.add(\"first\");\nstopWords.add(\"five\");\nstopWords.add(\"followed\");\nstopWords.add(\"following\");\nstopWords.add(\"follows\");\nstopWords.add(\"for\");\nstopWords.add(\"forever\");\nstopWords.add(\"former\");\nstopWords.add(\"formerly\");\nstopWords.add(\"forth\");\nstopWords.add(\"forward\");\nstopWords.add(\"found\");\nstopWords.add(\"four\");\nstopWords.add(\"from\");\nstopWords.add(\"further\");\nstopWords.add(\"furthermore\");\nstopWords.add(\"get\");\nstopWords.add(\"gets\");\nstopWords.add(\"getting\");\nstopWords.add(\"given\");\nstopWords.add(\"gives\");\nstopWords.add(\"go\");\nstopWords.add(\"goes\");\nstopWords.add(\"going\");\nstopWords.add(\"gone\");\nstopWords.add(\"got\");\nstopWords.add(\"gotten\");\nstopWords.add(\"greetings\");\nstopWords.add(\"had\");\nstopWords.add(\"hadn't\");\nstopWords.add(\"half\");\nstopWords.add(\"happens\");\nstopWords.add(\"hardly\");\nstopWords.add(\"has\");\nstopWords.add(\"hasn't\");\nstopWords.add(\"have\");\nstopWords.add(\"haven't\");\nstopWords.add(\"having\");\nstopWords.add(\"he\");\nstopWords.add(\"he'd\");\nstopWords.add(\"he'll\");\nstopWords.add(\"hello\");\nstopWords.add(\"help\");\nstopWords.add(\"hence\");\nstopWords.add(\"her\");\nstopWords.add(\"here\");\nstopWords.add(\"hereafter\");\nstopWords.add(\"hereby\");\nstopWords.add(\"herein\");\nstopWords.add(\"here's\");\nstopWords.add(\"hereupon\");\nstopWords.add(\"hers\");\nstopWords.add(\"herself\");\nstopWords.add(\"he's\");\nstopWords.add(\"hi\");\nstopWords.add(\"him\");\nstopWords.add(\"himself\");\nstopWords.add(\"his\");\nstopWords.add(\"hither\");\nstopWords.add(\"hopefully\");\nstopWords.add(\"how\");\nstopWords.add(\"howbeit\");\nstopWords.add(\"however\");\nstopWords.add(\"however\");\nstopWords.add(\"hundred\");\nstopWords.add(\"i'd\");\nstopWords.add(\"ie\");\nstopWords.add(\"if\");\nstopWords.add(\"ignored\");\nstopWords.add(\"i'll\");\nstopWords.add(\"i'm\");\nstopWords.add(\"immediate\");\nstopWords.add(\"in\");\nstopWords.add(\"iansmuch\");\nstopWords.add(\"inc\");\nstopWords.add(\"inc.\");\nstopWords.add(\"indeed\");\nstopWords.add(\"indicate\");\nstopWords.add(\"indicated\");\nstopWords.add(\"indicates\");\nstopWords.add(\"inner\");\nstopWords.add(\"inside\");\nstopWords.add(\"insofar\");\nstopWords.add(\"into\");\nstopWords.add(\"inward\");\nstopWords.add(\"is\");\nstopWords.add(\"isn't\");\nstopWords.add(\"it\");\nstopWords.add(\"it'd\");\nstopWords.add(\"it'll\");\nstopWords.add(\"its\");\nstopWords.add(\"it's\");\nstopWords.add(\"itself\");\nstopWords.add(\"i've\");\nstopWords.add(\"just\");\nstopWords.add(\"k\");\nstopWords.add(\"keep\");\nstopWords.add(\"keeps\");\nstopWords.add(\"kept\");\nstopWords.add(\"know\");\nstopWords.add(\"knows\");\nstopWords.add(\"known\");\nstopWords.add(\"last\");\nstopWords.add(\"lately\");\nstopWords.add(\"later\");\nstopWords.add(\"latter\");\nstopWords.add(\"latterly\");\nstopWords.add(\"least\");\nstopWords.add(\"less\");\nstopWords.add(\"let\");\nstopWords.add(\"let's\");\nstopWords.add(\"like\");\nstopWords.add(\"liked\");\nstopWords.add(\"likely\");\nstopWords.add(\"likewise\");\nstopWords.add(\"little\");\nstopWords.add(\"look\");\nstopWords.add(\"looks\");\nstopWords.add(\"low\");\nstopWords.add(\"lower\");\nstopWords.add(\"ltd\");\nstopWords.add(\"made\");\nstopWords.add(\"mainly\");\nstopWords.add(\"make\");\nstopWords.add(\"makes\");\nstopWords.add(\"many\");\nstopWords.add(\"may\");\nstopWords.add(\"maybe\");\nstopWords.add(\"mayn't\");\nstopWords.add(\"me\");\nstopWords.add(\"mean\");\nstopWords.add(\"meanwhile\");\nstopWords.add(\"merely\");\nstopWords.add(\"might\");\nstopWords.add(\"mightn't\");\nstopWords.add(\"mine\");\nstopWords.add(\"minus\");\nstopWords.add(\"miss\");\nstopWords.add(\"more\");\nstopWords.add(\"moreover\");\nstopWords.add(\"most\");\nstopWords.add(\"mostly\");\nstopWords.add(\"mr\");\nstopWords.add(\"mrs\");\nstopWords.add(\"much\");\nstopWords.add(\"must\");\nstopWords.add(\"mustn't\");\nstopWords.add(\"my\");\nstopWords.add(\"myself\");\nstopWords.add(\"name\");\nstopWords.add(\"namely\");\nstopWords.add(\"nd\");\nstopWords.add(\"near\");\nstopWords.add(\"nearly\");\nstopWords.add(\"necessary\");\nstopWords.add(\"need\");\nstopWords.add(\"needn't\");\nstopWords.add(\"needs\");\nstopWords.add(\"neither\");\nstopWords.add(\"never\");\nstopWords.add(\"neverf\");\nstopWords.add(\"neverless\");\nstopWords.add(\"nevertheless\");\nstopWords.add(\"new\");\nstopWords.add(\"next\");\nstopWords.add(\"nine\");\nstopWords.add(\"ninety\");\nstopWords.add(\"no\");\nstopWords.add(\"nobody\");\nstopWords.add(\"non\");\nstopWords.add(\"none\");\nstopWords.add(\"nonetheless\");\nstopWords.add(\"noone\");\nstopWords.add(\"no-one\");\nstopWords.add(\"nor\");\nstopWords.add(\"normally\");\nstopWords.add(\"not\");\nstopWords.add(\"nothing\");\nstopWords.add(\"notwithstanding\");\nstopWords.add(\"novel\");\nstopWords.add(\"now\");\nstopWords.add(\"nowwhere\");\nstopWords.add(\"obviously\");\nstopWords.add(\"of\");\nstopWords.add(\"off\");\nstopWords.add(\"often\");\nstopWords.add(\"oh\");\nstopWords.add(\"ok\");\nstopWords.add(\"okay\");\nstopWords.add(\"old\");\nstopWords.add(\"on\");\nstopWords.add(\"once\");\nstopWords.add(\"one\");\nstopWords.add(\"ones\");\nstopWords.add(\"one's\");\nstopWords.add(\"only\");\nstopWords.add(\"onto\");\nstopWords.add(\"opposite\");\nstopWords.add(\"or\");\nstopWords.add(\"other\");\nstopWords.add(\"others\");\nstopWords.add(\"otherwise\");\nstopWords.add(\"ought\");\nstopWords.add(\"oughtn't\");\nstopWords.add(\"our\");\nstopWords.add(\"ourselves\");\nstopWords.add(\"out\");\nstopWords.add(\"outside\");\nstopWords.add(\"over\");\nstopWords.add(\"overall\");\nstopWords.add(\"own\");\nstopWords.add(\"particular\");\nstopWords.add(\"particularly\");\nstopWords.add(\"past\");\nstopWords.add(\"per\");\nstopWords.add(\"perhaps\");\nstopWords.add(\"placed\");\nstopWords.add(\"please\");\nstopWords.add(\"plus\");\nstopWords.add(\"possible\");\nstopWords.add(\"presumably\");\nstopWords.add(\"probably\");\nstopWords.add(\"provided\");\nstopWords.add(\"provides\");\nstopWords.add(\"que\");\nstopWords.add(\"quite\");\nstopWords.add(\"qv\");\nstopWords.add(\"rather\");\nstopWords.add(\"rd\");\nstopWords.add(\"re\");\nstopWords.add(\"really\");\nstopWords.add(\"reasonably\");\nstopWords.add(\"recent\");\nstopWords.add(\"recently\");\nstopWords.add(\"regarding\");\nstopWords.add(\"regardless\");\nstopWords.add(\"regards\");\nstopWords.add(\"relatively\");\nstopWords.add(\"respectively\");\nstopWords.add(\"right\");\nstopWords.add(\"round\");\nstopWords.add(\"said\");\nstopWords.add(\"same\");\nstopWords.add(\"saw\");\nstopWords.add(\"say\");\nstopWords.add(\"saying\");\nstopWords.add(\"says\");\nstopWords.add(\"second\");\nstopWords.add(\"secondly\");\nstopWords.add(\"see\");\nstopWords.add(\"seeing\");\nstopWords.add(\"seem\");\nstopWords.add(\"seemed\");\nstopWords.add(\"seeming\");\nstopWords.add(\"seems\");\nstopWords.add(\"seen\");\nstopWords.add(\"self\");\nstopWords.add(\"selves\");\nstopWords.add(\"sensible\");\nstopWords.add(\"sent\");\nstopWords.add(\"serious\");\nstopWords.add(\"seriously\");\nstopWords.add(\"seven\");\nstopWords.add(\"several\");\nstopWords.add(\"shall\");\nstopWords.add(\"shan't\");\nstopWords.add(\"she\");\nstopWords.add(\"she'd\");\nstopWords.add(\"she'll\");\nstopWords.add(\"she's\");\nstopWords.add(\"should\");\nstopWords.add(\"shouldn't\");\nstopWords.add(\"since\");\nstopWords.add(\"six\");\nstopWords.add(\"so\");\nstopWords.add(\"some\");\nstopWords.add(\"somebody\");\nstopWords.add(\"someday\");\nstopWords.add(\"somehow\");\nstopWords.add(\"someone\");\nstopWords.add(\"something\");\nstopWords.add(\"sometime\");\nstopWords.add(\"sometimes\");\nstopWords.add(\"somewhat\");\nstopWords.add(\"somewhere\");\nstopWords.add(\"soon\");\nstopWords.add(\"sorry\");\nstopWords.add(\"specified\");\nstopWords.add(\"specify\");\nstopWords.add(\"specifying\");\nstopWords.add(\"still\");\nstopWords.add(\"sub\");\nstopWords.add(\"such\");\nstopWords.add(\"sup\");\nstopWords.add(\"sure\");\nstopWords.add(\"take\");\nstopWords.add(\"taken\");\nstopWords.add(\"taking\");\nstopWords.add(\"tell\");\nstopWords.add(\"tends\");\nstopWords.add(\"th\");\nstopWords.add(\"than\");\nstopWords.add(\"thank\");\nstopWords.add(\"thanks\");\nstopWords.add(\"thanx\");\nstopWords.add(\"that\");\nstopWords.add(\"that'll\");\nstopWords.add(\"thats\");\nstopWords.add(\"that've\");\nstopWords.add(\"the\");\nstopWords.add(\"their\");\nstopWords.add(\"theirs\");\nstopWords.add(\"them\");\nstopWords.add(\"themselves\");\nstopWords.add(\"then\");\nstopWords.add(\"thence\");\nstopWords.add(\"there\");\nstopWords.add(\"thereafter\");\nstopWords.add(\"thereby\");\nstopWords.add(\"there'd\");\nstopWords.add(\"therefore\");\nstopWords.add(\"therein\");\nstopWords.add(\"ther'll\");\nstopWords.add(\"there're\");\nstopWords.add(\"theres\");\nstopWords.add(\"there's\");\nstopWords.add(\"thereupon\");\nstopWords.add(\"there've\");\nstopWords.add(\"these\");\nstopWords.add(\"they\");\nstopWords.add(\"they'd\");\nstopWords.add(\"they'll\");\nstopWords.add(\"they're\");\nstopWords.add(\"they've\");\nstopWords.add(\"thing\");\nstopWords.add(\"things\");\nstopWords.add(\"think\");\nstopWords.add(\"third\");\nstopWords.add(\"thirty\");\nstopWords.add(\"this\");\nstopWords.add(\"thorough\");\nstopWords.add(\"thoroughly\");\nstopWords.add(\"those\");\nstopWords.add(\"though\");\nstopWords.add(\"throughout\");\nstopWords.add(\"thru\");\nstopWords.add(\"thus\");\nstopWords.add(\"till\");\nstopWords.add(\"to\");\nstopWords.add(\"together\");\nstopWords.add(\"too\");\nstopWords.add(\"took\");\nstopWords.add(\"toward\");\nstopWords.add(\"towards\");\nstopWords.add(\"tried\");\nstopWords.add(\"tries\");\nstopWords.add(\"truly\");\nstopWords.add(\"try\");\nstopWords.add(\"trying\");\nstopWords.add(\"t's\");\nstopWords.add(\"twice\");\nstopWords.add(\"two\");\nstopWords.add(\"un\");\nstopWords.add(\"under\");\nstopWords.add(\"underneath\");\nstopWords.add(\"undoing\");\nstopWords.add(\"unfortunately\");\nstopWords.add(\"unless\");\nstopWords.add(\"unlike\");\nstopWords.add(\"unlikely\");\nstopWords.add(\"untill\");\nstopWords.add(\"unto\");\nstopWords.add(\"up\");\nstopWords.add(\"upon\");\nstopWords.add(\"upwards\");\nstopWords.add(\"us\");\nstopWords.add(\"use\");\nstopWords.add(\"used\");\nstopWords.add(\"useful\");\nstopWords.add(\"uses\");\nstopWords.add(\"using\");\nstopWords.add(\"usually\");\nstopWords.add(\"v\");\nstopWords.add(\"value\");\nstopWords.add(\"various\");\nstopWords.add(\"versus\");\nstopWords.add(\"very\");\nstopWords.add(\"via\");\nstopWords.add(\"viz\");\nstopWords.add(\"vs\");\nstopWords.add(\"want\");\nstopWords.add(\"wants\");\nstopWords.add(\"was\");\nstopWords.add(\"wasn't\");\nstopWords.add(\"way\");\nstopWords.add(\"we\");\nstopWords.add(\"we'd\");\nstopWords.add(\"welcome\");\nstopWords.add(\"well\");\nstopWords.add(\"we'll\");\nstopWords.add(\"went\");\nstopWords.add(\"were\");\nstopWords.add(\"we're\");\nstopWords.add(\"weren't\");\nstopWords.add(\"we've\");\nstopWords.add(\"what\");\nstopWords.add(\"whatever\");\nstopWords.add(\"what'll\");\nstopWords.add(\"what's\");\nstopWords.add(\"what've\");\nstopWords.add(\"when\");\nstopWords.add(\"whence\");\nstopWords.add(\"whenever\");\nstopWords.add(\"where\");\nstopWords.add(\"whereafter\");\nstopWords.add(\"whereas\");\nstopWords.add(\"whereby\");\nstopWords.add(\"wherein\");\nstopWords.add(\"where's\");\nstopWords.add(\"whereupon\");\nstopWords.add(\"whereever\");\nstopWords.add(\"whether\");\nstopWords.add(\"which\");\nstopWords.add(\"whichever\");\nstopWords.add(\"while\");\nstopWords.add(\"whilst\");\nstopWords.add(\"whither\");\nstopWords.add(\"who\");\nstopWords.add(\"who'd\");\nstopWords.add(\"whoever\");\nstopWords.add(\"whole\");\nstopWords.add(\"who'll\");\nstopWords.add(\"whom\");\nstopWords.add(\"whomever\");\nstopWords.add(\"who's\");\nstopWords.add(\"whose\");\nstopWords.add(\"why\");\nstopWords.add(\"will\");\nstopWords.add(\"willing\");\nstopWords.add(\"wish\");\nstopWords.add(\"with\");\nstopWords.add(\"within\");\nstopWords.add(\"without\");\nstopWords.add(\"wonder\");\nstopWords.add(\"won't\");\nstopWords.add(\"would\");\nstopWords.add(\"wouldn't\");\nstopWords.add(\"yes\");\nstopWords.add(\"yet\");\nstopWords.add(\"you\");\nstopWords.add(\"you'd\");\nstopWords.add(\"you'll\");\nstopWords.add(\"your\");\nstopWords.add(\"you're\");\nstopWords.add(\"yours\");\nstopWords.add(\"yourself\");\nstopWords.add(\"you've\");\nstopWords.add(\"zero\");\n\n \n \n }", "@SuppressWarnings(\"resource\")\n public static void doubleCapacity(String[] array){\n int wordCount = 0;\n int arrayGrowth = 500;\n array = new String[10];\n String strLine = null;\n while (strLine != null) {\n // Store the content into an array\n Scanner s = new Scanner(strLine);\n while (s.hasNext()) {\n if (array.length == wordCount) {\n // expand list\n array = Arrays.copyOf(array, array.length + arrayGrowth);\n }\n array[wordCount] = s.next();\n wordCount++;\n } \n }\n }", "private int skipTrialingWhite( List content, int start) {\r\n int size = content.size();\r\n if (start > size) {\r\n start = size;\r\n }\r\n\r\n int index = start;\r\n if (currentFormat.trimAllWhite\r\n || currentFormat.textNormalize\r\n || currentFormat.textTrim) {\r\n while( index >= 0) {\r\n if ( !isAllWhitespace( content.get(index - 1)))\r\n break;\r\n --index;\r\n }\r\n }\r\n return index;\r\n }", "public abstract void mo9247b(String str, long j, List<String> list);", "private void fillSet() {\r\n\t\tString regex = \"\\\\p{L}+\";\r\n\t\tMatcher matcher = Pattern.compile(regex).matcher(body);\r\n\t\twhile (matcher.find()) {\r\n\t\t\tif (!matcher.group().isEmpty()) {\r\n\t\t\t\twords.add(matcher.group());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private ArrayList<Integer> getEmptySpaces(char[] board) {\n ArrayList<Integer> emptySpaces = new ArrayList<>();\n for (int i = 0; i < board.length; i++) {\n if (board[i] == ' ') {\n emptySpaces.add(i);\n }\n }\n return emptySpaces;\n }", "void mo13370a(int i, int i2, List<C15929a> list) throws IOException;", "private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }", "private static Stream<List<Tile>> substituteBlanks(List<Tile> p) {\n Stream<List<Tile>> res = Stream.of(p);\n //Iterate through all letters.\n for (int i = 0; i < p.size(); i++) {\n //Check for blanks.\n if (p.get(i).getLetter() == Character.MIN_VALUE) {\n //If blank found, substitute it for all a-z, and look again for next blank.\n res = substituteBlankAtIndex(p, i)\n .flatMap(s -> substituteBlanks(s));\n }\n }\n\n return res;\n }", "public static void main(String[] args) {\n String[] strings = new String[100];\n for (int i = 0; i < strings.length; i++) {\n strings[i] = randomStrings(2);\n }\n// for (String s : strings) {\n// System.out.println(s);\n// }\n ArrayList<String> appeared = new ArrayList<>();\n for (String s : strings) {\n if (!appeared.contains(s)) {\n appeared.add(s);\n }\n }\n System.out.println(appeared.size());\n\n }", "private IgnoreListHelper() {\n\t}", "@Test\n\t public void test5 ()\n\t{\n\t\t\tString s = new String(\"aaabaaaaabaabaaaabaaaaaaaaaaaaaabaaaaaaaaaaaaaaabaaaaaaaaaaaaaaba\");\n\t s = s.replaceAll(\"\\\\s+\", \" \");\n\t assertEquals(\"aaaaaaaaaaaaaabaaaaaaaaaaaaaa\", LRS.lrs(s)); \n\t}", "public static List<String> findRepeatedDnaSequences(String s) {\n \tList<String> re=new ArrayList<String>();\n \tif(s.length()<=10){\n \t\treturn re;\n \t}\n \tMap<String, Integer> map=new HashMap<String, Integer>(); \t\n \tfor(int i=10; i<=s.length(); i++){\n \t\tString k=s.substring(i-10, i);\n \t\tif(map.containsKey(k)){\n \t\t\tint val=map.get(k);\n \t\t\tif(val==1){\n \t\t\t\tre.add(k);\n \t\t\t}\n \t\t\tmap.put(k, val+1);\n \t\t}else{\n \t\t\tmap.put(k, 1);\n \t\t}\n \t}\n \treturn re;\n }", "public static void main(){\r\n\t\t\r\n\t\tArrayList<tok> pHolder = new ArrayList<tok>();\r\n\r\n\t\t pHolder.add(new tok(\"@\", \"@\"));\r\n\t\t\r\n\t\treturn;\r\n\t}", "public void mo9497b(List<String> list) {\n this.f1514c = list;\n }", "private void listEntries(BufferedWriter bw, String previous, int start, int end, String zeroes) throws IOException {\n\t\tint writeStart = -1;\n\t\tStringBuilder sb = new StringBuilder();\n\t\tchar c;\n\t\tfor (int i = 0, l = previous.length(); i < l && writeStart == -1; i++) {\n\t\t\tc = previous.charAt(i);\n\t\t\tif (Character.isDigit(c)) {sb.append(c);}\n\t\t\telse {writeStart = Integer.parseInt(sb.toString());}\n\t\t}\n\t\tfor (int i = start; i < end; i++) {bw.write(++writeStart + \"=\" + zeroes + i + \"\\n\");}\n\t}", "public void m20623OooO00o() {\n for (C8964ooOOo000 ooooo000 : this.f22213OooO00o) {\n OooO00o(ooooo000);\n }\n this.f22212OooO00o.clear();\n this.f22213OooO00o.clear();\n }", "public String addWhiteSpace(String str, int number) {\n\t\tStringBuilder result = new StringBuilder();\n\t\tfor (int i = 0; i < str.length(); i+=2) {\n\t\t if (i > 0) {\n\t\t\t for (int j = 0; j < number; j++)\n\t\t\t\t result.append(\" \");\n\t\t }\n\t\t result.append(str.charAt(i));\n\t\t result.append(str.charAt(i+1));\n\t\t}\n\t\treturn result.toString();\n\t}", "public static List<String> findStrobogrammatic(int n) {\n List<String> cur, ans;\n ans = new ArrayList<String>((n & 1) == 0 ? Arrays.asList(\"\") : Arrays.asList(\"0\", \"1\", \"8\"));\n if (n < 2) return ans;\n\n for (;n > 1; n -= 2) {\n cur = ans;\n ans = new ArrayList<String>();\n for (String i : cur) {\n if (n > 3) {\n ans.add('0' + i + '0');\n }\n ans.add('1' + i + '1');\n ans.add('8' + i + '8');\n ans.add('6' + i + '9');\n ans.add('9' + i + '6');\n }\n }\n System.out.println(ans.size());\n return ans;\n }", "private static List<String> induceSynonims(String word) {\n\t\treturn null;\n\t}", "private List<WordScore> liveList(List<WordScore> gridList, String s) {\n s = s.toLowerCase();\n List<WordScore> liveList = new ArrayList<>();\n for(WordScore ws : gridList){\n int nochars = s.length() - s.replaceAll(ws.getWord(), \"\").length();\n liveList.add(new WordScore(ws.getWord(), ws.getScore()-nochars));\n }\n return liveList;\n }", "private void fillRandomList()\n\t{\n\t\trandomList.add(\"I like cheese.\");\n\t\trandomList.add(\"Tortoise can move faster than slow rodent.\");\n\t\trandomList.add(\"I enjoy sitting on the ground.\");\n\t\trandomList.add(\"I like cereal.\");\n\t\trandomList.add(\"This is random.\");\n\t\trandomList.add(\"I like typing\");\n\t\trandomList.add(\"FLdlsjejf is my favorite word.\");\n\t\trandomList.add(\"I have two left toes.\");\n\t\trandomList.add(\"Sqrt(2) = 1.414213562 ...\");\n\t\trandomList.add(\"Hi mom.\");\n\t}", "public static void main(String[] args) {\n\t\tString s=\"22\";\n\t\t\n\t\tif(s.indexOf(\"1\")>=0||s.equals(\"\"))\n\t\t\tSystem.out.println(\"hello\");\n\t\t\t\n\t\tArrayList f=new ArrayList();\n\t\tint stack[]=new int[2*s.length()];\n\t\tint top=-1;\n\t\tchar a[][]=new char[][]{{},{},{'#','a','b','c','#'},{'#','d','e','f','#'},{'#','g','h','i','#'},{'#','j','k','l','#'},{'#','m','n','o','#'},{'#','p','q','r','s','#'},{'#','t','u','v','#'},{'#','w','x','y','z','#'}};\n\t\tint length[]=new int []{0,0,3,3,3,3,3,4,3,4};\n\t\tStringBuilder ans=new StringBuilder();\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tint x=stack[++top]=(int)s.charAt(i)-'0';\n\t\t\tans.append(a[x][1]);\n\t\t\tstack[++top]=1;\n\t\t}\n\t\twhile(stack[1]!=length[(int)s.charAt(0)-'0']+1){\n\t\t\tif(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\tif(s.length()==(top+1)/2){\n\t\t\t\t\twhile(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\t\t\tint r=(top-1)/2;\n\t\t\t\t\t\tchar r1=a[stack[top-1]][stack[top]];\n\t\t\t\t\t\tans.setCharAt(r, r1);\n\t\t\t\t\t\tString ans1=ans.toString();\n\t\t\t\t\t\tf.add(ans1);\n\t\t\t\t\t\tstack[top]++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t\t\ttop+=2;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[top]=1;\n\t\t\t\ttop-=2;\n\t\t\t\tstack[top]++;\n\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(f.size());\n\t}", "private void modify(List listString){\n\t}", "private String repeatM(int count){\n return new String(new char[count]).replace('\\0','M');\n }", "private static void\n eatWhite(ParseState state)\n {\n while(state.pos < state.data.length() && state.data.charAt(state.pos) == ' ')\n {\n ++state.pos;\n }\n }" ]
[ "0.55591595", "0.5524409", "0.54578066", "0.5425202", "0.53757787", "0.5364262", "0.5288061", "0.5286694", "0.52332956", "0.5221815", "0.5211653", "0.5201803", "0.51848924", "0.518454", "0.5178811", "0.51761377", "0.5141157", "0.5138997", "0.51366293", "0.5130912", "0.51279604", "0.5071481", "0.50682074", "0.50673336", "0.5058374", "0.50503725", "0.5046189", "0.5046023", "0.50277734", "0.50120145", "0.49743384", "0.4959684", "0.49513972", "0.49383563", "0.492581", "0.49236417", "0.49056625", "0.48794308", "0.48752907", "0.48583564", "0.4856731", "0.48500034", "0.48222542", "0.48127964", "0.4812774", "0.48096502", "0.48054305", "0.48029843", "0.48021927", "0.4784932", "0.47791797", "0.47657204", "0.47405565", "0.47405225", "0.47390026", "0.47360018", "0.47321254", "0.47301587", "0.47235176", "0.47201622", "0.4720113", "0.4717014", "0.47158983", "0.4708474", "0.4698091", "0.46781585", "0.46772122", "0.46698767", "0.46634603", "0.46624836", "0.46601665", "0.4651289", "0.46146277", "0.4606947", "0.4606018", "0.4604179", "0.45975944", "0.45943204", "0.45926452", "0.45925856", "0.45852026", "0.4583654", "0.45777828", "0.45770383", "0.45763302", "0.4573015", "0.45670146", "0.45669803", "0.4564498", "0.45611578", "0.45599565", "0.45561954", "0.45553017", "0.45483592", "0.45479", "0.45477003", "0.4545243", "0.45429727", "0.45390365", "0.4536908" ]
0.5150973
16
open_white_list repeated string open_white_list = 11;
public int getOpenWhiteListCount() { return openWhiteList_.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SList oddWords();", "public java.lang.String getOpenWhiteList(int index) {\n return openWhiteList_.get(index);\n }", "public java.lang.String getOpenWhiteList(int index) {\n return openWhiteList_.get(index);\n }", "public int getOpenWhiteListCount() {\n return openWhiteList_.size();\n }", "private LowercaseWordList() {\n\n }", "static List DuplicateElements(List<Character> characters){\r\n\t\tList newlist=new ArrayList<>();\r\n\t\tfor(char c:characters)\r\n\t\t{\r\n\t\t\tnewlist.add(Collections.nCopies(2,c ));\r\n\t\r\n\t\t}\r\n\tSystem.out.println(newlist);\r\n\treturn newlist;\r\n\t}", "public Builder setOpenWhiteList(\n int index, java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureOpenWhiteListIsMutable();\n openWhiteList_.set(index, value);\n onChanged();\n return this;\n }", "public Builder addOpenWhiteList(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureOpenWhiteListIsMutable();\n openWhiteList_.add(value);\n onChanged();\n return this;\n }", "public static List<String> createCompetencyList() {\n List<String> list = new ArrayList<String>();\n list.add(\"Line number 1\");\n list.add(\"Line number 2\");\n return list;\n }", "private void exercise2() {\n List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerOddLengthList = list.stream()\n .filter((string) -> string.length() % 2 != 0)\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public void setWhiteSpacesCount(long value) {\n this.whiteSpacesCount = value;\n }", "java.util.List<String> getRepeatedStringFieldList();", "List<String> mo5877c(String str);", "private String addRandomSpacing(String originalText) {\n ArrayList<Expression> list = new ArrayList<Expression>();\n\n\t\tclass MyVisitor extends ModifierVisitor<Void> {\n\t\t @Override\n\t\t public Node visit(VariableDeclarator declarator, Void args) {\n\t Expression expression = declarator.getInitializer().get();\n\t \n\t \n\t // We're looking for string.\n\t if (expression instanceof StringLiteralExpr) {\n\t list.add(expression);\n\t }\n\t\t return null;\n\t\t }\n\t\t}\n\t\t\n\t\t\n\t}", "SList evenWords();", "public com.google.protobuf.ProtocolStringList\n getOpenWhiteListList() {\n return openWhiteList_;\n }", "List<String> mo5876c();", "void fillList(List<String> toFill) {\n for (int i = 0; i < number; i++) {\n toFill.add(i + \"\");\n }\n }", "public String getWhiteList0() {\n return getString(\"whitelist.0\");\n }", "public Builder clearOpenWhiteList() {\n openWhiteList_ = com.google.protobuf.LazyStringArrayList.EMPTY;\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n return this;\n }", "public Builder addAllOpenWhiteList(\n java.lang.Iterable<java.lang.String> values) {\n ensureOpenWhiteListIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, openWhiteList_);\n onChanged();\n return this;\n }", "public com.google.protobuf.ByteString\n getOpenWhiteListBytes(int index) {\n return openWhiteList_.getByteString(index);\n }", "public abstract List<C41717j> mo70725h(String str);", "static int getNumPatterns() { return 64; }", "private static void skipSplitAdd(String s, List<String> list) {\n String tmp[] = s.split(\" \");\n\n for (int i = 1; i < tmp.length; i++) {\n list.add(tmp[i]);\n\n // System.out.println(tmp[i]);\n }\n }", "public static void addStars(ArrayList<String> list){\r\n //Loops through the list\r\n for(int i = 1; i < list.size(); i+=2){\r\n list.add(i, \"*\");\r\n }\r\n System.out.println(list);\r\n }", "private void m4676a(List<C0906d> list, StringBuilder sb) {\n if (sb.length() != 0) {\n list.add(new C0906d(C0906d.EnumC0907a.LITERAL, sb.toString()));\n }\n }", "public void setWhiteCounter(int num){\n this.whiteCounter = num;\n }", "StringList createStringList();", "List<C1114c> mo5886k(String str);", "private String genWhiteSpaceRegex(int noOfWhiteSpace,\n String multiWhiteSpace,\n String zeroWhiteSpace) {\n\n return (noOfWhiteSpace == 0) ? zeroWhiteSpace\n : multiWhiteSpace.replace(\"%%\", String.valueOf(noOfWhiteSpace));\n }", "public com.google.protobuf.ByteString\n getOpenWhiteListBytes(int index) {\n return openWhiteList_.getByteString(index);\n }", "private void generateLists(String num, Stack<String> numberList)\n {\n\tfor(int i = 0, len = num.length(); i < len; i++)\n\t numberList.push(new Character(num.charAt(i)).toString());\n }", "private void exercise5() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> nonDuplicateList;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n nonDuplicateList = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .collect(toList());\n }\n\n nonDuplicateList.forEach(System.out::println);\n }", "void mo100443a(List<String> list);", "ListString createListString();", "List<Log> mo13160a(String str, int i);", "public com.google.protobuf.ProtocolStringList\n getOpenWhiteListList() {\n return openWhiteList_.getUnmodifiableView();\n }", "public static void main(String[] args) { String s = \"catsanddog\";\n// List<String> wordDict = new ArrayList<>(Arrays.asList(\"cat\", \"cats\", \"and\", \"sand\", \"dog\"));\n//\n String s = \"pineapplepenappl\";\n List<String> wordDict = new ArrayList<>(Arrays.asList(\"apple\", \"pen\", \"applepen\", \"pine\", \"pineapple\"));\n\n WordBreak140 tmp = new WordBreak140();\n tmp.wordBreak(s, wordDict);\n }", "@Test\n public void repeatedSubstringPattern() {\n assertTrue(new Solution1().repeatedSubstringPattern(\"abcabcabcabc\"));\n }", "@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }", "private static List<String> testStringGenerator(List<String> palString) {\n\t\tList<String> list = new ArrayList<>();\n\t\tfor (String pal : palString) {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor (int i = 0; i < 10; i++) {\n\t\t\t\tsb.append(pal);\n\t\t\t\tfor (int j = 0; j < pal.length(); j++) {\n\t\t\t\t\tsb.append(j % 10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(sb.toString());\n\t\t}\n\t\treturn list;\n\t}", "public static void makeBlanks(char[] list) {\n\t\tfor (int i = 0; i < list.length; i++) {\n\t\t\tlist[i] = '*';\n\t\t}\n\t}", "public int selectOriginalTokens (Scanner scan, String [] list){\n \n int count = 0;\n while(scan.hasNext()){\n String line = scan.nextLine();\n String[] t = line.split(\"[ \\n\\t\\r.,:?)({}\\\\[\\\\]]\");\n for (int i = 0; i < t.length; i++){\n String item = t[i].trim();\n if(item.length() > 0){\n list[count] = item;\n count++;\n }//End if statement\n }//End for loop\n }//End while loop\n \n return count;\n }", "void mo54419a(List<String> list);", "private String whiteSpace(String sum, String num)\n {\n\tString space = \"\";\n\tfor(int i = 0; i < sum.length() - num.length(); i++)\n\t space += \" \";\n\treturn space;\n }", "List<C1113b> mo5874b(String str);", "public static List<String> stringList() {\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.add(\"abdxxx\");\n\t\tlist.add(\"xxxxx\");\n\t\tlist.add(\"hi\");\n\t\tlist.add(\"SmoothStack\");\n\t\tlist.add(\"Wyatt x Wyatt x\");\n\t\treturn list;\n\t}", "private static String[] resetStringArray() {\n String[] st = new String[L_MAX];\n L = 2 << 8;\n W = 9;\n int i;\n // initialize symbol table with all 1-character strings\n for (i = 0; i < R; i++)\n st[i] = \"\" + (char) i;\n st[i++] = \"\"; // (unused) lookahead for EOF\n return st;\n }", "public void setUp2( )\n\t{\n\t\tfor( int i = 0; i < 1000; i++ )\n\t\t{\n\t\t\tlista.append( \"\" + i );\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tList<Character>st1=new ArrayList<>();\n\t\n\t\tst1.add('a');\n\t\tst1.add('b');\n\t\tst1.add('a');\n\t\tst1.add('a');\n\t\tst1.add('c');\n\t\tst1.add('t');\n\t\n\t\tSystem.out.println(st1);//[a, b, a, a, c, t]\n\t\t\n\t\tList<Character>st2=new ArrayList<>();//empty []\n\t\tfor (int i=0; i<st1.size();i++) {\n\t\t\tif(!st2.contains(st1.get(i))) {\n\t\t\t\t// created str2 [empty], we will get the element from st1 to st2 while checking if there is repetition \n\t\t\t\tst2.add(st1.get(i));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(st2);//[a, b, c, t]\n\t\t\n\n\t}", "private void many(Set<String> s) {\n\t\twhile (!done() && s.contains(program.charAt(pos)+\"\"))\n\t\t\tpos++;\n }", "@Test\r\n\tpublic void testPositiveGenerateStrings_2() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\", false), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "private static String createPrepStmPlaceHolder(int num) {\n\t\tchar[] c_ar = new char[num*3];\n\t\tc_ar[0] = '(';\n\t\tc_ar[1] = '?';\n\t\tfor(int i=1; i<num; ++i) {\n\t\t\tc_ar[3*i-1] = ',';\n\t\t\tc_ar[3*i] = ' ';\n\t\t\tc_ar[3*i+1] = '?';\n\t\t}\n\t\tc_ar[3*num-1] = ')';\n\t\treturn new String(c_ar);\n\t}", "private void exercise1() {\n final List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerList = list.stream()\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }", "private static String repeatSpace(int number) {\n StringBuilder space = new StringBuilder();\n\n // Adding spaces.\n for (int i = 0; i < number; i++) {\n space.append(\" \");\n }\n\n //returning spaces.\n return space.toString();\n }", "public void mo88640a(List<String> list) {\n List<String> stringList = RxPreferences.INSTANCE.getStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), new ArrayList());\n stringList.addAll(0, list);\n RxPreferences.INSTANCE.putStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), (List) StreamSupport.m150134a(stringList).mo131128a(new AbstractC32239o(new HashSet(stringList)) {\n /* class com.zhihu.android.p1480db.fragment.customview.C18240x255e53c2 */\n private final /* synthetic */ HashSet f$0;\n\n {\n this.f$0 = r1;\n }\n\n @Override // java8.util.p2234b.AbstractC32239o\n public final boolean test(Object obj) {\n return DbEditorSuggestTagCustomView.m93354a(this.f$0, (String) obj);\n }\n }).mo131126a(5).mo131125a(Collectors.m150203a($$Lambda$ofunvu1bqmYbfXGEtxXaV_csE4M.INSTANCE)));\n }", "public Builder addOpenWhiteListBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n ensureOpenWhiteListIsMutable();\n openWhiteList_.add(value);\n onChanged();\n return this;\n }", "private void initWhitespace(Set<String> s) {\n\t\ts.add(\" \");\n\t\ts.add(\"\\n\");\n\t\ts.add(\"\\t\");\n }", "private int skipLeadingWhite( List content, int start) {\r\n if (start < 0) {\r\n start = 0;\r\n }\r\n\r\n int index = start;\r\n int size = content.size();\r\n if (currentFormat.trimAllWhite\r\n || currentFormat.textNormalize\r\n || currentFormat.textTrim) {\r\n while( index < size) {\r\n if ( !isAllWhitespace( content.get(index))) {\r\n return index;\r\n }\r\n index++;\r\n }\r\n }\r\n return index;\r\n }", "List<C1111j> mo5869a(int i);", "@Test\n public void noSpacesBetweenKeywordsTest() {\n tester.yields(\"LaLaLaLaLaaaLi\", lala.EXPRESSION);\n }", "private void appendPlaceHolder(StringBuilder builder, int indent, int consecutiveExcluded, String message) {\n indent(builder, indent);\n builder.append(ELLIPSIS)\n .append(\" \")\n .append(consecutiveExcluded)\n .append(\" \")\n .append(message)\n .append(CoreConstants.LINE_SEPARATOR);\n }", "public void visiualizeSkipList(){\r\n\t\tint number=0;\r\n\t\tNode dummy = sl.getFrom(0,0);\r\n\t\t\r\n\t\tNode next;\r\n\t\tfor(int i=sl.height(); i>=0; i--){\r\n\t\t\t\r\n\t\t\tnext = sl.getFrom(i,0);\r\n\t\t\t\r\n\t\t\tfor(int j=0; j<(sl.size()+2); j++){\r\n\r\n\t\t\t\tnumber = next.getKey();\r\n\t\t\t\t//F.p(number);\r\n\t\t\t\tif(number==dummy.getKey()){\r\n\r\n\t\t\t\t\tif(number==minf)\r\n\t\t\t\t\t\tSystem.out.print(\"-inf\");\r\n\t\t\t\t\telse if(number==inf)\r\n\t\t\t\t\t\tSystem.out.print(\"---inf\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(\"-\",2)+number);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(\"-\",4));\r\n\t\t\t\t\r\n\t\t\t\tif(dummy.getKey()==number)\r\n\t\t\t\t\tnext = next.getRight();\r\n\t\t\t\t\r\n\t\t\t\tdummy = dummy.getRight();\r\n\t\t\t}\r\n\t\t\tdummy = sl.getFrom(0,0);\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testStartingIndicesRegression(){\n\t\tassertLeftmostStartingIndices(\"5,1,7,3,2|-..xxx$1..x...xxx$3....-xx........\", 0, 6, 8, 18, 22);\n\t\tassertRightmostStartingIndices(\"7,5|.......xxx$1....xxx$2..-\", 6, 14);\n\t\t\n\t}", "public long getWhiteSpacesCount() {\n return whiteSpacesCount;\n }", "public MacroList() {\n\t\tthis.macrosses = new HashMap<Integer, String>(12);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_1() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\"), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n String s=\"a /*a*/ sd /*v*/\";\n Pattern p = Pattern.compile(\"(\\\\/\\\\*(\\\\w|\\r\\n)+\\\\*\\\\/)\");\n Matcher m = p.matcher(s);\n List<String> l = new ArrayList<>(100);\n\n while (m.find()) {\n System.out.println(\"tick\");\n l.add(s.substring(m.start()+2, m.end()-2));\n }\n\n System.out.println(l);\n }", "StringPatternCounter(ArrayList<StringPattern> stringPatternList, String fileInput)\n {\n super(fileInput);\n this.stringPatternList = stringPatternList;\n }", "@Before\n public void createString(){\n s1 = \"casa\";\n\ts2 = \"cassa\";\n\ts3 = \"\";\n\ts4 = \"casa\";\n }", "public String minRemoveToMakeValid(String s) {\n int openAvail = 0;\n Set<Integer> skipSet = new HashSet<>();\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) == ')') {\n if (openAvail == 0) {\n skipSet.add(i);\n } else {\n openAvail -= 1;\n }\n } else if (s.charAt(i) == '(') {\n openAvail += 1;\n }\n }\n\n int closedAvail = 0;\n for (int i = s.length() - 1; i >= 0; i--) {\n if (s.charAt(i) == ')') {\n closedAvail += 1;\n } else if (s.charAt(i) == '(') {\n if (closedAvail == 0) {\n skipSet.add(i);\n } else {\n closedAvail -= 1; \n }\n }\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < s.length(); i++) {\n if (!skipSet.contains(i)){\n sb.append(s.charAt(i));\n }\n }\n return sb.toString();\n }", "@SuppressWarnings(\"resource\")\n public static void doubleCapacity(String[] array){\n int wordCount = 0;\n int arrayGrowth = 500;\n array = new String[10];\n String strLine = null;\n while (strLine != null) {\n // Store the content into an array\n Scanner s = new Scanner(strLine);\n while (s.hasNext()) {\n if (array.length == wordCount) {\n // expand list\n array = Arrays.copyOf(array, array.length + arrayGrowth);\n }\n array[wordCount] = s.next();\n wordCount++;\n } \n }\n }", "@Test(timeout = 4000)\n public void test20() throws Throwable {\n StringReader stringReader0 = new StringReader(\"0(Hu\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer2 = new StreamTokenizer(stringReader0);\n JSTerm jSTerm0 = new JSTerm(streamTokenizer0);\n stringReader0.reset();\n StreamTokenizer streamTokenizer3 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer4 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer5 = new StreamTokenizer(stringReader0);\n streamTokenizer0.commentChar((-4));\n StreamTokenizer streamTokenizer6 = new StreamTokenizer(stringReader0);\n streamTokenizer6.ordinaryChars((-1), (-322070664));\n streamTokenizer1.parseNumbers();\n jSTerm0.add((Object) \"JSTerm: Error reading control parameters: \");\n StreamTokenizer streamTokenizer7 = new StreamTokenizer(stringReader0);\n streamTokenizer7.pushBack();\n streamTokenizer1.nextToken();\n StreamTokenizer streamTokenizer8 = new StreamTokenizer(stringReader0);\n streamTokenizer2.slashSlashComments(false);\n JSTerm jSTerm1 = new JSTerm(streamTokenizer5);\n streamTokenizer1.slashStarComments(false);\n streamTokenizer3.eolIsSignificant(false);\n streamTokenizer7.commentChar((-4));\n StreamTokenizer streamTokenizer9 = new StreamTokenizer(stringReader0);\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n jSSubstitution0.listIterator();\n JSSubstitution jSSubstitution1 = jSTerm1.matches((JSPredicateForm) jSTerm0, jSSubstitution0);\n assertTrue(jSSubstitution1.fail());\n }", "public Removalstops()\n {\n stopWords.add(\"am\");\n stopWords.add(\"my\");\nstopWords.add(\"at\");\nstopWords.add(\"a\");\nstopWords.add(\"i\");\nstopWords.add(\"is\");\nstopWords.add(\"of\");\nstopWords.add(\"have\");\nstopWords.add(\"--\");\nstopWords.add(\"do\");\nstopWords.add(\"the\");\nstopWords.add(\"was\");\nstopWords.add(\"iam\");\nstopWords.add(\"there\");\nstopWords.add(\"what\");\nstopWords.add(\"for\");\nstopWords.add(\"in\");\nstopWords.add(\"very\");\nstopWords.add(\"and\");\nstopWords.add(\"to\");\nstopWords.add(\"often\");\nstopWords.add(\"because\");\nstopWords.add(\"in\");\nstopWords.add(\"an\");\nstopWords.add(\"can\");\nstopWords.add(\"via\");\nstopWords.add(\"even\");\nstopWords.add(\"as\");\nstopWords.add(\"best\");\nstopWords.add(\"been\");\nstopWords.add(\"into\");\nstopWords.add(\"by\");\nstopWords.add(\"around\");\nstopWords.add(\"being\");\nstopWords.add(\"from\");\nstopWords.add(\"etc\");\nstopWords.add(\"his\");\nstopWords.add(\"do\");\nstopWords.add(\"have\");\nstopWords.add(\"had\"); \nstopWords.add(\"able\");\nstopWords.add(\"about\");\nstopWords.add(\"above\");\nstopWords.add(\"abroad\");\nstopWords.add(\"according\");\nstopWords.add(\"accordingly\");\nstopWords.add(\"across\");\nstopWords.add(\"actually\");\nstopWords.add(\"adj\");\nstopWords.add(\"after\");\nstopWords.add(\"afterwards\");\nstopWords.add(\"again\");\nstopWords.add(\"against\");\nstopWords.add(\"ago\");\nstopWords.add(\"ahead\");\nstopWords.add(\"ain't\");\nstopWords.add(\"all\");\nstopWords.add(\"allow\");\nstopWords.add(\"allows\");\nstopWords.add(\"almost\");\nstopWords.add(\"alone\");\nstopWords.add(\"along\");\nstopWords.add(\"alongside\");\nstopWords.add(\"already\");\nstopWords.add(\"also\");\nstopWords.add(\"although\");\nstopWords.add(\"always\");\nstopWords.add(\"am\");\nstopWords.add(\"amid\");\nstopWords.add(\"amidst\");\nstopWords.add(\"among\");\nstopWords.add(\"amongst\");\nstopWords.add(\"an\");\nstopWords.add(\"and\");\nstopWords.add(\"another\");\nstopWords.add(\"any\");\nstopWords.add(\"anybody\");\nstopWords.add(\"anyhow\");\nstopWords.add(\"anyone\");\nstopWords.add(\"anything\");\nstopWords.add(\"anyway\");\nstopWords.add(\"anyways\");\nstopWords.add(\"anywhere\");\nstopWords.add(\"apart\");\nstopWords.add(\"appear\");\nstopWords.add(\"appreciate\");\nstopWords.add(\"appropriate\");\nstopWords.add(\"are\");\nstopWords.add(\"aren't\");\nstopWords.add(\"around\");\nstopWords.add(\"as\");\nstopWords.add(\"a's\");\nstopWords.add(\"aside\");\nstopWords.add(\"ask\");\nstopWords.add(\"asking\");\nstopWords.add(\"associated\");\nstopWords.add(\"at\");\nstopWords.add(\"available\");\nstopWords.add(\"away\");\nstopWords.add(\"awfully\");\nstopWords.add(\"back\");\nstopWords.add(\"backward\");\nstopWords.add(\"backwards\");\nstopWords.add(\"be\");\nstopWords.add(\"became\");\nstopWords.add(\"beacause\");\nstopWords.add(\"become\");\nstopWords.add(\"becomes\");\nstopWords.add(\"becoming\");\nstopWords.add(\"been\");\nstopWords.add(\"before\");\nstopWords.add(\"beforehand\");\nstopWords.add(\"begin\");\nstopWords.add(\"behind\");\nstopWords.add(\"being\");\nstopWords.add(\"believe\");\nstopWords.add(\"below\");\nstopWords.add(\"beside\");\nstopWords.add(\"besides\");\nstopWords.add(\"best\");\nstopWords.add(\"better\");\nstopWords.add(\"between\");\nstopWords.add(\"beyond\");\nstopWords.add(\"both\");\nstopWords.add(\"brief\");\nstopWords.add(\"but\");\nstopWords.add(\"by\");\nstopWords.add(\"came\");\nstopWords.add(\"can\");\nstopWords.add(\"cannot\");\nstopWords.add(\"cant\");\nstopWords.add(\"can't\");\nstopWords.add(\"caption\");\nstopWords.add(\"cause\");\nstopWords.add(\"causes\");\nstopWords.add(\"certain\");\nstopWords.add(\"cetrainly\");\nstopWords.add(\"changes\");\nstopWords.add(\"clearly\");\nstopWords.add(\"c'mon\");\nstopWords.add(\"co\");\nstopWords.add(\"co.\");\nstopWords.add(\"com\");\nstopWords.add(\"come\");\nstopWords.add(\"comes\");\nstopWords.add(\"concerning\");\nstopWords.add(\"consequently\");\nstopWords.add(\"consider\");\nstopWords.add(\"considering\");\nstopWords.add(\"could\");\nstopWords.add(\"couldn't\");\nstopWords.add(\"c's\");\nstopWords.add(\"currently\");\nstopWords.add(\"dare\");\nstopWords.add(\"daren't\");\nstopWords.add(\"definitely\");\nstopWords.add(\"described\");\nstopWords.add(\"despite\");\nstopWords.add(\"did\");\nstopWords.add(\"didn't\");\nstopWords.add(\"different\");\nstopWords.add(\"directly\");\nstopWords.add(\"do\");\nstopWords.add(\"does\");\nstopWords.add(\"doesn't\");\nstopWords.add(\"doing\");\nstopWords.add(\"done\");\nstopWords.add(\"don't\");\nstopWords.add(\"down\");\nstopWords.add(\"downwards\");\nstopWords.add(\"during\");\nstopWords.add(\"each\");\nstopWords.add(\"edu\");\nstopWords.add(\"eg\");\nstopWords.add(\"eight\");\nstopWords.add(\"eighty\");\nstopWords.add(\"either\");\nstopWords.add(\"else\");\nstopWords.add(\"elsewhere\");\nstopWords.add(\"end\");\nstopWords.add(\"ending\");\nstopWords.add(\"enough\");\nstopWords.add(\"entirely\");\nstopWords.add(\"especially\");\nstopWords.add(\"et\");\nstopWords.add(\"etc\");\nstopWords.add(\"even\");\nstopWords.add(\"evenmore\");\nstopWords.add(\"every\");\nstopWords.add(\"everybody\");\nstopWords.add(\"everyone\");\nstopWords.add(\"everything\");\nstopWords.add(\"everywhere\");\nstopWords.add(\"ex\");\nstopWords.add(\"exactly\");\nstopWords.add(\"example\");\nstopWords.add(\"except\");\nstopWords.add(\"fairly\");\nstopWords.add(\"far\");\nstopWords.add(\"farhter\");\nstopWords.add(\"few\");\nstopWords.add(\"fewer\");\nstopWords.add(\"fifth\");\nstopWords.add(\"first\");\nstopWords.add(\"five\");\nstopWords.add(\"followed\");\nstopWords.add(\"following\");\nstopWords.add(\"follows\");\nstopWords.add(\"for\");\nstopWords.add(\"forever\");\nstopWords.add(\"former\");\nstopWords.add(\"formerly\");\nstopWords.add(\"forth\");\nstopWords.add(\"forward\");\nstopWords.add(\"found\");\nstopWords.add(\"four\");\nstopWords.add(\"from\");\nstopWords.add(\"further\");\nstopWords.add(\"furthermore\");\nstopWords.add(\"get\");\nstopWords.add(\"gets\");\nstopWords.add(\"getting\");\nstopWords.add(\"given\");\nstopWords.add(\"gives\");\nstopWords.add(\"go\");\nstopWords.add(\"goes\");\nstopWords.add(\"going\");\nstopWords.add(\"gone\");\nstopWords.add(\"got\");\nstopWords.add(\"gotten\");\nstopWords.add(\"greetings\");\nstopWords.add(\"had\");\nstopWords.add(\"hadn't\");\nstopWords.add(\"half\");\nstopWords.add(\"happens\");\nstopWords.add(\"hardly\");\nstopWords.add(\"has\");\nstopWords.add(\"hasn't\");\nstopWords.add(\"have\");\nstopWords.add(\"haven't\");\nstopWords.add(\"having\");\nstopWords.add(\"he\");\nstopWords.add(\"he'd\");\nstopWords.add(\"he'll\");\nstopWords.add(\"hello\");\nstopWords.add(\"help\");\nstopWords.add(\"hence\");\nstopWords.add(\"her\");\nstopWords.add(\"here\");\nstopWords.add(\"hereafter\");\nstopWords.add(\"hereby\");\nstopWords.add(\"herein\");\nstopWords.add(\"here's\");\nstopWords.add(\"hereupon\");\nstopWords.add(\"hers\");\nstopWords.add(\"herself\");\nstopWords.add(\"he's\");\nstopWords.add(\"hi\");\nstopWords.add(\"him\");\nstopWords.add(\"himself\");\nstopWords.add(\"his\");\nstopWords.add(\"hither\");\nstopWords.add(\"hopefully\");\nstopWords.add(\"how\");\nstopWords.add(\"howbeit\");\nstopWords.add(\"however\");\nstopWords.add(\"however\");\nstopWords.add(\"hundred\");\nstopWords.add(\"i'd\");\nstopWords.add(\"ie\");\nstopWords.add(\"if\");\nstopWords.add(\"ignored\");\nstopWords.add(\"i'll\");\nstopWords.add(\"i'm\");\nstopWords.add(\"immediate\");\nstopWords.add(\"in\");\nstopWords.add(\"iansmuch\");\nstopWords.add(\"inc\");\nstopWords.add(\"inc.\");\nstopWords.add(\"indeed\");\nstopWords.add(\"indicate\");\nstopWords.add(\"indicated\");\nstopWords.add(\"indicates\");\nstopWords.add(\"inner\");\nstopWords.add(\"inside\");\nstopWords.add(\"insofar\");\nstopWords.add(\"into\");\nstopWords.add(\"inward\");\nstopWords.add(\"is\");\nstopWords.add(\"isn't\");\nstopWords.add(\"it\");\nstopWords.add(\"it'd\");\nstopWords.add(\"it'll\");\nstopWords.add(\"its\");\nstopWords.add(\"it's\");\nstopWords.add(\"itself\");\nstopWords.add(\"i've\");\nstopWords.add(\"just\");\nstopWords.add(\"k\");\nstopWords.add(\"keep\");\nstopWords.add(\"keeps\");\nstopWords.add(\"kept\");\nstopWords.add(\"know\");\nstopWords.add(\"knows\");\nstopWords.add(\"known\");\nstopWords.add(\"last\");\nstopWords.add(\"lately\");\nstopWords.add(\"later\");\nstopWords.add(\"latter\");\nstopWords.add(\"latterly\");\nstopWords.add(\"least\");\nstopWords.add(\"less\");\nstopWords.add(\"let\");\nstopWords.add(\"let's\");\nstopWords.add(\"like\");\nstopWords.add(\"liked\");\nstopWords.add(\"likely\");\nstopWords.add(\"likewise\");\nstopWords.add(\"little\");\nstopWords.add(\"look\");\nstopWords.add(\"looks\");\nstopWords.add(\"low\");\nstopWords.add(\"lower\");\nstopWords.add(\"ltd\");\nstopWords.add(\"made\");\nstopWords.add(\"mainly\");\nstopWords.add(\"make\");\nstopWords.add(\"makes\");\nstopWords.add(\"many\");\nstopWords.add(\"may\");\nstopWords.add(\"maybe\");\nstopWords.add(\"mayn't\");\nstopWords.add(\"me\");\nstopWords.add(\"mean\");\nstopWords.add(\"meanwhile\");\nstopWords.add(\"merely\");\nstopWords.add(\"might\");\nstopWords.add(\"mightn't\");\nstopWords.add(\"mine\");\nstopWords.add(\"minus\");\nstopWords.add(\"miss\");\nstopWords.add(\"more\");\nstopWords.add(\"moreover\");\nstopWords.add(\"most\");\nstopWords.add(\"mostly\");\nstopWords.add(\"mr\");\nstopWords.add(\"mrs\");\nstopWords.add(\"much\");\nstopWords.add(\"must\");\nstopWords.add(\"mustn't\");\nstopWords.add(\"my\");\nstopWords.add(\"myself\");\nstopWords.add(\"name\");\nstopWords.add(\"namely\");\nstopWords.add(\"nd\");\nstopWords.add(\"near\");\nstopWords.add(\"nearly\");\nstopWords.add(\"necessary\");\nstopWords.add(\"need\");\nstopWords.add(\"needn't\");\nstopWords.add(\"needs\");\nstopWords.add(\"neither\");\nstopWords.add(\"never\");\nstopWords.add(\"neverf\");\nstopWords.add(\"neverless\");\nstopWords.add(\"nevertheless\");\nstopWords.add(\"new\");\nstopWords.add(\"next\");\nstopWords.add(\"nine\");\nstopWords.add(\"ninety\");\nstopWords.add(\"no\");\nstopWords.add(\"nobody\");\nstopWords.add(\"non\");\nstopWords.add(\"none\");\nstopWords.add(\"nonetheless\");\nstopWords.add(\"noone\");\nstopWords.add(\"no-one\");\nstopWords.add(\"nor\");\nstopWords.add(\"normally\");\nstopWords.add(\"not\");\nstopWords.add(\"nothing\");\nstopWords.add(\"notwithstanding\");\nstopWords.add(\"novel\");\nstopWords.add(\"now\");\nstopWords.add(\"nowwhere\");\nstopWords.add(\"obviously\");\nstopWords.add(\"of\");\nstopWords.add(\"off\");\nstopWords.add(\"often\");\nstopWords.add(\"oh\");\nstopWords.add(\"ok\");\nstopWords.add(\"okay\");\nstopWords.add(\"old\");\nstopWords.add(\"on\");\nstopWords.add(\"once\");\nstopWords.add(\"one\");\nstopWords.add(\"ones\");\nstopWords.add(\"one's\");\nstopWords.add(\"only\");\nstopWords.add(\"onto\");\nstopWords.add(\"opposite\");\nstopWords.add(\"or\");\nstopWords.add(\"other\");\nstopWords.add(\"others\");\nstopWords.add(\"otherwise\");\nstopWords.add(\"ought\");\nstopWords.add(\"oughtn't\");\nstopWords.add(\"our\");\nstopWords.add(\"ourselves\");\nstopWords.add(\"out\");\nstopWords.add(\"outside\");\nstopWords.add(\"over\");\nstopWords.add(\"overall\");\nstopWords.add(\"own\");\nstopWords.add(\"particular\");\nstopWords.add(\"particularly\");\nstopWords.add(\"past\");\nstopWords.add(\"per\");\nstopWords.add(\"perhaps\");\nstopWords.add(\"placed\");\nstopWords.add(\"please\");\nstopWords.add(\"plus\");\nstopWords.add(\"possible\");\nstopWords.add(\"presumably\");\nstopWords.add(\"probably\");\nstopWords.add(\"provided\");\nstopWords.add(\"provides\");\nstopWords.add(\"que\");\nstopWords.add(\"quite\");\nstopWords.add(\"qv\");\nstopWords.add(\"rather\");\nstopWords.add(\"rd\");\nstopWords.add(\"re\");\nstopWords.add(\"really\");\nstopWords.add(\"reasonably\");\nstopWords.add(\"recent\");\nstopWords.add(\"recently\");\nstopWords.add(\"regarding\");\nstopWords.add(\"regardless\");\nstopWords.add(\"regards\");\nstopWords.add(\"relatively\");\nstopWords.add(\"respectively\");\nstopWords.add(\"right\");\nstopWords.add(\"round\");\nstopWords.add(\"said\");\nstopWords.add(\"same\");\nstopWords.add(\"saw\");\nstopWords.add(\"say\");\nstopWords.add(\"saying\");\nstopWords.add(\"says\");\nstopWords.add(\"second\");\nstopWords.add(\"secondly\");\nstopWords.add(\"see\");\nstopWords.add(\"seeing\");\nstopWords.add(\"seem\");\nstopWords.add(\"seemed\");\nstopWords.add(\"seeming\");\nstopWords.add(\"seems\");\nstopWords.add(\"seen\");\nstopWords.add(\"self\");\nstopWords.add(\"selves\");\nstopWords.add(\"sensible\");\nstopWords.add(\"sent\");\nstopWords.add(\"serious\");\nstopWords.add(\"seriously\");\nstopWords.add(\"seven\");\nstopWords.add(\"several\");\nstopWords.add(\"shall\");\nstopWords.add(\"shan't\");\nstopWords.add(\"she\");\nstopWords.add(\"she'd\");\nstopWords.add(\"she'll\");\nstopWords.add(\"she's\");\nstopWords.add(\"should\");\nstopWords.add(\"shouldn't\");\nstopWords.add(\"since\");\nstopWords.add(\"six\");\nstopWords.add(\"so\");\nstopWords.add(\"some\");\nstopWords.add(\"somebody\");\nstopWords.add(\"someday\");\nstopWords.add(\"somehow\");\nstopWords.add(\"someone\");\nstopWords.add(\"something\");\nstopWords.add(\"sometime\");\nstopWords.add(\"sometimes\");\nstopWords.add(\"somewhat\");\nstopWords.add(\"somewhere\");\nstopWords.add(\"soon\");\nstopWords.add(\"sorry\");\nstopWords.add(\"specified\");\nstopWords.add(\"specify\");\nstopWords.add(\"specifying\");\nstopWords.add(\"still\");\nstopWords.add(\"sub\");\nstopWords.add(\"such\");\nstopWords.add(\"sup\");\nstopWords.add(\"sure\");\nstopWords.add(\"take\");\nstopWords.add(\"taken\");\nstopWords.add(\"taking\");\nstopWords.add(\"tell\");\nstopWords.add(\"tends\");\nstopWords.add(\"th\");\nstopWords.add(\"than\");\nstopWords.add(\"thank\");\nstopWords.add(\"thanks\");\nstopWords.add(\"thanx\");\nstopWords.add(\"that\");\nstopWords.add(\"that'll\");\nstopWords.add(\"thats\");\nstopWords.add(\"that've\");\nstopWords.add(\"the\");\nstopWords.add(\"their\");\nstopWords.add(\"theirs\");\nstopWords.add(\"them\");\nstopWords.add(\"themselves\");\nstopWords.add(\"then\");\nstopWords.add(\"thence\");\nstopWords.add(\"there\");\nstopWords.add(\"thereafter\");\nstopWords.add(\"thereby\");\nstopWords.add(\"there'd\");\nstopWords.add(\"therefore\");\nstopWords.add(\"therein\");\nstopWords.add(\"ther'll\");\nstopWords.add(\"there're\");\nstopWords.add(\"theres\");\nstopWords.add(\"there's\");\nstopWords.add(\"thereupon\");\nstopWords.add(\"there've\");\nstopWords.add(\"these\");\nstopWords.add(\"they\");\nstopWords.add(\"they'd\");\nstopWords.add(\"they'll\");\nstopWords.add(\"they're\");\nstopWords.add(\"they've\");\nstopWords.add(\"thing\");\nstopWords.add(\"things\");\nstopWords.add(\"think\");\nstopWords.add(\"third\");\nstopWords.add(\"thirty\");\nstopWords.add(\"this\");\nstopWords.add(\"thorough\");\nstopWords.add(\"thoroughly\");\nstopWords.add(\"those\");\nstopWords.add(\"though\");\nstopWords.add(\"throughout\");\nstopWords.add(\"thru\");\nstopWords.add(\"thus\");\nstopWords.add(\"till\");\nstopWords.add(\"to\");\nstopWords.add(\"together\");\nstopWords.add(\"too\");\nstopWords.add(\"took\");\nstopWords.add(\"toward\");\nstopWords.add(\"towards\");\nstopWords.add(\"tried\");\nstopWords.add(\"tries\");\nstopWords.add(\"truly\");\nstopWords.add(\"try\");\nstopWords.add(\"trying\");\nstopWords.add(\"t's\");\nstopWords.add(\"twice\");\nstopWords.add(\"two\");\nstopWords.add(\"un\");\nstopWords.add(\"under\");\nstopWords.add(\"underneath\");\nstopWords.add(\"undoing\");\nstopWords.add(\"unfortunately\");\nstopWords.add(\"unless\");\nstopWords.add(\"unlike\");\nstopWords.add(\"unlikely\");\nstopWords.add(\"untill\");\nstopWords.add(\"unto\");\nstopWords.add(\"up\");\nstopWords.add(\"upon\");\nstopWords.add(\"upwards\");\nstopWords.add(\"us\");\nstopWords.add(\"use\");\nstopWords.add(\"used\");\nstopWords.add(\"useful\");\nstopWords.add(\"uses\");\nstopWords.add(\"using\");\nstopWords.add(\"usually\");\nstopWords.add(\"v\");\nstopWords.add(\"value\");\nstopWords.add(\"various\");\nstopWords.add(\"versus\");\nstopWords.add(\"very\");\nstopWords.add(\"via\");\nstopWords.add(\"viz\");\nstopWords.add(\"vs\");\nstopWords.add(\"want\");\nstopWords.add(\"wants\");\nstopWords.add(\"was\");\nstopWords.add(\"wasn't\");\nstopWords.add(\"way\");\nstopWords.add(\"we\");\nstopWords.add(\"we'd\");\nstopWords.add(\"welcome\");\nstopWords.add(\"well\");\nstopWords.add(\"we'll\");\nstopWords.add(\"went\");\nstopWords.add(\"were\");\nstopWords.add(\"we're\");\nstopWords.add(\"weren't\");\nstopWords.add(\"we've\");\nstopWords.add(\"what\");\nstopWords.add(\"whatever\");\nstopWords.add(\"what'll\");\nstopWords.add(\"what's\");\nstopWords.add(\"what've\");\nstopWords.add(\"when\");\nstopWords.add(\"whence\");\nstopWords.add(\"whenever\");\nstopWords.add(\"where\");\nstopWords.add(\"whereafter\");\nstopWords.add(\"whereas\");\nstopWords.add(\"whereby\");\nstopWords.add(\"wherein\");\nstopWords.add(\"where's\");\nstopWords.add(\"whereupon\");\nstopWords.add(\"whereever\");\nstopWords.add(\"whether\");\nstopWords.add(\"which\");\nstopWords.add(\"whichever\");\nstopWords.add(\"while\");\nstopWords.add(\"whilst\");\nstopWords.add(\"whither\");\nstopWords.add(\"who\");\nstopWords.add(\"who'd\");\nstopWords.add(\"whoever\");\nstopWords.add(\"whole\");\nstopWords.add(\"who'll\");\nstopWords.add(\"whom\");\nstopWords.add(\"whomever\");\nstopWords.add(\"who's\");\nstopWords.add(\"whose\");\nstopWords.add(\"why\");\nstopWords.add(\"will\");\nstopWords.add(\"willing\");\nstopWords.add(\"wish\");\nstopWords.add(\"with\");\nstopWords.add(\"within\");\nstopWords.add(\"without\");\nstopWords.add(\"wonder\");\nstopWords.add(\"won't\");\nstopWords.add(\"would\");\nstopWords.add(\"wouldn't\");\nstopWords.add(\"yes\");\nstopWords.add(\"yet\");\nstopWords.add(\"you\");\nstopWords.add(\"you'd\");\nstopWords.add(\"you'll\");\nstopWords.add(\"your\");\nstopWords.add(\"you're\");\nstopWords.add(\"yours\");\nstopWords.add(\"yourself\");\nstopWords.add(\"you've\");\nstopWords.add(\"zero\");\n\n \n \n }", "public abstract void mo9247b(String str, long j, List<String> list);", "private int skipTrialingWhite( List content, int start) {\r\n int size = content.size();\r\n if (start > size) {\r\n start = size;\r\n }\r\n\r\n int index = start;\r\n if (currentFormat.trimAllWhite\r\n || currentFormat.textNormalize\r\n || currentFormat.textTrim) {\r\n while( index >= 0) {\r\n if ( !isAllWhitespace( content.get(index - 1)))\r\n break;\r\n --index;\r\n }\r\n }\r\n return index;\r\n }", "private void fillSet() {\r\n\t\tString regex = \"\\\\p{L}+\";\r\n\t\tMatcher matcher = Pattern.compile(regex).matcher(body);\r\n\t\twhile (matcher.find()) {\r\n\t\t\tif (!matcher.group().isEmpty()) {\r\n\t\t\t\twords.add(matcher.group());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private ArrayList<Integer> getEmptySpaces(char[] board) {\n ArrayList<Integer> emptySpaces = new ArrayList<>();\n for (int i = 0; i < board.length; i++) {\n if (board[i] == ' ') {\n emptySpaces.add(i);\n }\n }\n return emptySpaces;\n }", "void mo13370a(int i, int i2, List<C15929a> list) throws IOException;", "private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }", "public static void main(String[] args) {\n String[] strings = new String[100];\n for (int i = 0; i < strings.length; i++) {\n strings[i] = randomStrings(2);\n }\n// for (String s : strings) {\n// System.out.println(s);\n// }\n ArrayList<String> appeared = new ArrayList<>();\n for (String s : strings) {\n if (!appeared.contains(s)) {\n appeared.add(s);\n }\n }\n System.out.println(appeared.size());\n\n }", "private static Stream<List<Tile>> substituteBlanks(List<Tile> p) {\n Stream<List<Tile>> res = Stream.of(p);\n //Iterate through all letters.\n for (int i = 0; i < p.size(); i++) {\n //Check for blanks.\n if (p.get(i).getLetter() == Character.MIN_VALUE) {\n //If blank found, substitute it for all a-z, and look again for next blank.\n res = substituteBlankAtIndex(p, i)\n .flatMap(s -> substituteBlanks(s));\n }\n }\n\n return res;\n }", "private IgnoreListHelper() {\n\t}", "@Test\n\t public void test5 ()\n\t{\n\t\t\tString s = new String(\"aaabaaaaabaabaaaabaaaaaaaaaaaaaabaaaaaaaaaaaaaaabaaaaaaaaaaaaaaba\");\n\t s = s.replaceAll(\"\\\\s+\", \" \");\n\t assertEquals(\"aaaaaaaaaaaaaabaaaaaaaaaaaaaa\", LRS.lrs(s)); \n\t}", "public static List<String> findRepeatedDnaSequences(String s) {\n \tList<String> re=new ArrayList<String>();\n \tif(s.length()<=10){\n \t\treturn re;\n \t}\n \tMap<String, Integer> map=new HashMap<String, Integer>(); \t\n \tfor(int i=10; i<=s.length(); i++){\n \t\tString k=s.substring(i-10, i);\n \t\tif(map.containsKey(k)){\n \t\t\tint val=map.get(k);\n \t\t\tif(val==1){\n \t\t\t\tre.add(k);\n \t\t\t}\n \t\t\tmap.put(k, val+1);\n \t\t}else{\n \t\t\tmap.put(k, 1);\n \t\t}\n \t}\n \treturn re;\n }", "public static void main(){\r\n\t\t\r\n\t\tArrayList<tok> pHolder = new ArrayList<tok>();\r\n\r\n\t\t pHolder.add(new tok(\"@\", \"@\"));\r\n\t\t\r\n\t\treturn;\r\n\t}", "public void mo9497b(List<String> list) {\n this.f1514c = list;\n }", "private void listEntries(BufferedWriter bw, String previous, int start, int end, String zeroes) throws IOException {\n\t\tint writeStart = -1;\n\t\tStringBuilder sb = new StringBuilder();\n\t\tchar c;\n\t\tfor (int i = 0, l = previous.length(); i < l && writeStart == -1; i++) {\n\t\t\tc = previous.charAt(i);\n\t\t\tif (Character.isDigit(c)) {sb.append(c);}\n\t\t\telse {writeStart = Integer.parseInt(sb.toString());}\n\t\t}\n\t\tfor (int i = start; i < end; i++) {bw.write(++writeStart + \"=\" + zeroes + i + \"\\n\");}\n\t}", "public void m20623OooO00o() {\n for (C8964ooOOo000 ooooo000 : this.f22213OooO00o) {\n OooO00o(ooooo000);\n }\n this.f22212OooO00o.clear();\n this.f22213OooO00o.clear();\n }", "public static List<String> findStrobogrammatic(int n) {\n List<String> cur, ans;\n ans = new ArrayList<String>((n & 1) == 0 ? Arrays.asList(\"\") : Arrays.asList(\"0\", \"1\", \"8\"));\n if (n < 2) return ans;\n\n for (;n > 1; n -= 2) {\n cur = ans;\n ans = new ArrayList<String>();\n for (String i : cur) {\n if (n > 3) {\n ans.add('0' + i + '0');\n }\n ans.add('1' + i + '1');\n ans.add('8' + i + '8');\n ans.add('6' + i + '9');\n ans.add('9' + i + '6');\n }\n }\n System.out.println(ans.size());\n return ans;\n }", "public String addWhiteSpace(String str, int number) {\n\t\tStringBuilder result = new StringBuilder();\n\t\tfor (int i = 0; i < str.length(); i+=2) {\n\t\t if (i > 0) {\n\t\t\t for (int j = 0; j < number; j++)\n\t\t\t\t result.append(\" \");\n\t\t }\n\t\t result.append(str.charAt(i));\n\t\t result.append(str.charAt(i+1));\n\t\t}\n\t\treturn result.toString();\n\t}", "private void fillRandomList()\n\t{\n\t\trandomList.add(\"I like cheese.\");\n\t\trandomList.add(\"Tortoise can move faster than slow rodent.\");\n\t\trandomList.add(\"I enjoy sitting on the ground.\");\n\t\trandomList.add(\"I like cereal.\");\n\t\trandomList.add(\"This is random.\");\n\t\trandomList.add(\"I like typing\");\n\t\trandomList.add(\"FLdlsjejf is my favorite word.\");\n\t\trandomList.add(\"I have two left toes.\");\n\t\trandomList.add(\"Sqrt(2) = 1.414213562 ...\");\n\t\trandomList.add(\"Hi mom.\");\n\t}", "private List<WordScore> liveList(List<WordScore> gridList, String s) {\n s = s.toLowerCase();\n List<WordScore> liveList = new ArrayList<>();\n for(WordScore ws : gridList){\n int nochars = s.length() - s.replaceAll(ws.getWord(), \"\").length();\n liveList.add(new WordScore(ws.getWord(), ws.getScore()-nochars));\n }\n return liveList;\n }", "private static List<String> induceSynonims(String word) {\n\t\treturn null;\n\t}", "public static void main(String[] args) {\n\t\tString s=\"22\";\n\t\t\n\t\tif(s.indexOf(\"1\")>=0||s.equals(\"\"))\n\t\t\tSystem.out.println(\"hello\");\n\t\t\t\n\t\tArrayList f=new ArrayList();\n\t\tint stack[]=new int[2*s.length()];\n\t\tint top=-1;\n\t\tchar a[][]=new char[][]{{},{},{'#','a','b','c','#'},{'#','d','e','f','#'},{'#','g','h','i','#'},{'#','j','k','l','#'},{'#','m','n','o','#'},{'#','p','q','r','s','#'},{'#','t','u','v','#'},{'#','w','x','y','z','#'}};\n\t\tint length[]=new int []{0,0,3,3,3,3,3,4,3,4};\n\t\tStringBuilder ans=new StringBuilder();\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tint x=stack[++top]=(int)s.charAt(i)-'0';\n\t\t\tans.append(a[x][1]);\n\t\t\tstack[++top]=1;\n\t\t}\n\t\twhile(stack[1]!=length[(int)s.charAt(0)-'0']+1){\n\t\t\tif(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\tif(s.length()==(top+1)/2){\n\t\t\t\t\twhile(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\t\t\tint r=(top-1)/2;\n\t\t\t\t\t\tchar r1=a[stack[top-1]][stack[top]];\n\t\t\t\t\t\tans.setCharAt(r, r1);\n\t\t\t\t\t\tString ans1=ans.toString();\n\t\t\t\t\t\tf.add(ans1);\n\t\t\t\t\t\tstack[top]++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t\t\ttop+=2;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[top]=1;\n\t\t\t\ttop-=2;\n\t\t\t\tstack[top]++;\n\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(f.size());\n\t}", "private void modify(List listString){\n\t}", "private String repeatM(int count){\n return new String(new char[count]).replace('\\0','M');\n }", "public static void loopThroughListOfStrings(List<String> input) {\n\t\t\n\t\tList<String> output = input.stream().filter(i -> i.length()>=4).collect(Collectors.toList());\n\t\t\n\t\tSystem.out.println(output);\n\t}" ]
[ "0.55588835", "0.55229723", "0.54238254", "0.5377577", "0.53646344", "0.52897197", "0.5288007", "0.5233525", "0.5225019", "0.521158", "0.5200129", "0.51884824", "0.5185825", "0.51782596", "0.51773864", "0.5151502", "0.5142657", "0.514163", "0.513604", "0.51307565", "0.5129297", "0.50706583", "0.5069423", "0.5069118", "0.50578684", "0.5051562", "0.5048556", "0.5042992", "0.5030988", "0.5012325", "0.49734595", "0.49587935", "0.49542245", "0.49387205", "0.49275225", "0.4927479", "0.49069813", "0.4880256", "0.48751348", "0.4858941", "0.48582852", "0.48521936", "0.48219705", "0.48149616", "0.48114434", "0.48105443", "0.48057917", "0.4804807", "0.4803039", "0.4787876", "0.47805554", "0.4765939", "0.4741199", "0.47396874", "0.47387704", "0.4736322", "0.47323987", "0.4732157", "0.47237864", "0.47171202", "0.47171193", "0.47170532", "0.47169754", "0.47078192", "0.4697591", "0.4677753", "0.46771806", "0.46718898", "0.46639842", "0.46629536", "0.46625173", "0.46510023", "0.46136248", "0.46063063", "0.46059436", "0.4605689", "0.4595574", "0.45940256", "0.45932886", "0.459322", "0.4587189", "0.4584727", "0.45785964", "0.45778894", "0.4575683", "0.4572642", "0.45703217", "0.45672476", "0.45662442", "0.45627823", "0.45595953", "0.45576534", "0.45555827", "0.45507377", "0.45498928", "0.45479152", "0.45470604", "0.4544842", "0.45396292", "0.45385683" ]
0.54595375
2
open_white_list repeated string open_white_list = 11;
public java.lang.String getOpenWhiteList(int index) { return openWhiteList_.get(index); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SList oddWords();", "public int getOpenWhiteListCount() {\n return openWhiteList_.size();\n }", "public java.lang.String getOpenWhiteList(int index) {\n return openWhiteList_.get(index);\n }", "public int getOpenWhiteListCount() {\n return openWhiteList_.size();\n }", "private LowercaseWordList() {\n\n }", "public Builder setOpenWhiteList(\n int index, java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureOpenWhiteListIsMutable();\n openWhiteList_.set(index, value);\n onChanged();\n return this;\n }", "static List DuplicateElements(List<Character> characters){\r\n\t\tList newlist=new ArrayList<>();\r\n\t\tfor(char c:characters)\r\n\t\t{\r\n\t\t\tnewlist.add(Collections.nCopies(2,c ));\r\n\t\r\n\t\t}\r\n\tSystem.out.println(newlist);\r\n\treturn newlist;\r\n\t}", "public Builder addOpenWhiteList(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureOpenWhiteListIsMutable();\n openWhiteList_.add(value);\n onChanged();\n return this;\n }", "public static List<String> createCompetencyList() {\n List<String> list = new ArrayList<String>();\n list.add(\"Line number 1\");\n list.add(\"Line number 2\");\n return list;\n }", "private void exercise2() {\n List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerOddLengthList = list.stream()\n .filter((string) -> string.length() % 2 != 0)\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public void setWhiteSpacesCount(long value) {\n this.whiteSpacesCount = value;\n }", "List<String> mo5877c(String str);", "java.util.List<String> getRepeatedStringFieldList();", "private String addRandomSpacing(String originalText) {\n ArrayList<Expression> list = new ArrayList<Expression>();\n\n\t\tclass MyVisitor extends ModifierVisitor<Void> {\n\t\t @Override\n\t\t public Node visit(VariableDeclarator declarator, Void args) {\n\t Expression expression = declarator.getInitializer().get();\n\t \n\t \n\t // We're looking for string.\n\t if (expression instanceof StringLiteralExpr) {\n\t list.add(expression);\n\t }\n\t\t return null;\n\t\t }\n\t\t}\n\t\t\n\t\t\n\t}", "SList evenWords();", "public com.google.protobuf.ProtocolStringList\n getOpenWhiteListList() {\n return openWhiteList_;\n }", "List<String> mo5876c();", "void fillList(List<String> toFill) {\n for (int i = 0; i < number; i++) {\n toFill.add(i + \"\");\n }\n }", "public String getWhiteList0() {\n return getString(\"whitelist.0\");\n }", "public Builder clearOpenWhiteList() {\n openWhiteList_ = com.google.protobuf.LazyStringArrayList.EMPTY;\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n return this;\n }", "public Builder addAllOpenWhiteList(\n java.lang.Iterable<java.lang.String> values) {\n ensureOpenWhiteListIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, openWhiteList_);\n onChanged();\n return this;\n }", "public com.google.protobuf.ByteString\n getOpenWhiteListBytes(int index) {\n return openWhiteList_.getByteString(index);\n }", "public abstract List<C41717j> mo70725h(String str);", "static int getNumPatterns() { return 64; }", "private static void skipSplitAdd(String s, List<String> list) {\n String tmp[] = s.split(\" \");\n\n for (int i = 1; i < tmp.length; i++) {\n list.add(tmp[i]);\n\n // System.out.println(tmp[i]);\n }\n }", "public static void addStars(ArrayList<String> list){\r\n //Loops through the list\r\n for(int i = 1; i < list.size(); i+=2){\r\n list.add(i, \"*\");\r\n }\r\n System.out.println(list);\r\n }", "private void m4676a(List<C0906d> list, StringBuilder sb) {\n if (sb.length() != 0) {\n list.add(new C0906d(C0906d.EnumC0907a.LITERAL, sb.toString()));\n }\n }", "public void setWhiteCounter(int num){\n this.whiteCounter = num;\n }", "StringList createStringList();", "List<C1114c> mo5886k(String str);", "private String genWhiteSpaceRegex(int noOfWhiteSpace,\n String multiWhiteSpace,\n String zeroWhiteSpace) {\n\n return (noOfWhiteSpace == 0) ? zeroWhiteSpace\n : multiWhiteSpace.replace(\"%%\", String.valueOf(noOfWhiteSpace));\n }", "public com.google.protobuf.ByteString\n getOpenWhiteListBytes(int index) {\n return openWhiteList_.getByteString(index);\n }", "private void generateLists(String num, Stack<String> numberList)\n {\n\tfor(int i = 0, len = num.length(); i < len; i++)\n\t numberList.push(new Character(num.charAt(i)).toString());\n }", "private void exercise5() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> nonDuplicateList;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n nonDuplicateList = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .collect(toList());\n }\n\n nonDuplicateList.forEach(System.out::println);\n }", "void mo100443a(List<String> list);", "ListString createListString();", "List<Log> mo13160a(String str, int i);", "public com.google.protobuf.ProtocolStringList\n getOpenWhiteListList() {\n return openWhiteList_.getUnmodifiableView();\n }", "public static void main(String[] args) { String s = \"catsanddog\";\n// List<String> wordDict = new ArrayList<>(Arrays.asList(\"cat\", \"cats\", \"and\", \"sand\", \"dog\"));\n//\n String s = \"pineapplepenappl\";\n List<String> wordDict = new ArrayList<>(Arrays.asList(\"apple\", \"pen\", \"applepen\", \"pine\", \"pineapple\"));\n\n WordBreak140 tmp = new WordBreak140();\n tmp.wordBreak(s, wordDict);\n }", "@Test\n public void repeatedSubstringPattern() {\n assertTrue(new Solution1().repeatedSubstringPattern(\"abcabcabcabc\"));\n }", "@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }", "private static List<String> testStringGenerator(List<String> palString) {\n\t\tList<String> list = new ArrayList<>();\n\t\tfor (String pal : palString) {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor (int i = 0; i < 10; i++) {\n\t\t\t\tsb.append(pal);\n\t\t\t\tfor (int j = 0; j < pal.length(); j++) {\n\t\t\t\t\tsb.append(j % 10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(sb.toString());\n\t\t}\n\t\treturn list;\n\t}", "public static void makeBlanks(char[] list) {\n\t\tfor (int i = 0; i < list.length; i++) {\n\t\t\tlist[i] = '*';\n\t\t}\n\t}", "public int selectOriginalTokens (Scanner scan, String [] list){\n \n int count = 0;\n while(scan.hasNext()){\n String line = scan.nextLine();\n String[] t = line.split(\"[ \\n\\t\\r.,:?)({}\\\\[\\\\]]\");\n for (int i = 0; i < t.length; i++){\n String item = t[i].trim();\n if(item.length() > 0){\n list[count] = item;\n count++;\n }//End if statement\n }//End for loop\n }//End while loop\n \n return count;\n }", "private String whiteSpace(String sum, String num)\n {\n\tString space = \"\";\n\tfor(int i = 0; i < sum.length() - num.length(); i++)\n\t space += \" \";\n\treturn space;\n }", "void mo54419a(List<String> list);", "List<C1113b> mo5874b(String str);", "public static List<String> stringList() {\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.add(\"abdxxx\");\n\t\tlist.add(\"xxxxx\");\n\t\tlist.add(\"hi\");\n\t\tlist.add(\"SmoothStack\");\n\t\tlist.add(\"Wyatt x Wyatt x\");\n\t\treturn list;\n\t}", "private static String[] resetStringArray() {\n String[] st = new String[L_MAX];\n L = 2 << 8;\n W = 9;\n int i;\n // initialize symbol table with all 1-character strings\n for (i = 0; i < R; i++)\n st[i] = \"\" + (char) i;\n st[i++] = \"\"; // (unused) lookahead for EOF\n return st;\n }", "public void setUp2( )\n\t{\n\t\tfor( int i = 0; i < 1000; i++ )\n\t\t{\n\t\t\tlista.append( \"\" + i );\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tList<Character>st1=new ArrayList<>();\n\t\n\t\tst1.add('a');\n\t\tst1.add('b');\n\t\tst1.add('a');\n\t\tst1.add('a');\n\t\tst1.add('c');\n\t\tst1.add('t');\n\t\n\t\tSystem.out.println(st1);//[a, b, a, a, c, t]\n\t\t\n\t\tList<Character>st2=new ArrayList<>();//empty []\n\t\tfor (int i=0; i<st1.size();i++) {\n\t\t\tif(!st2.contains(st1.get(i))) {\n\t\t\t\t// created str2 [empty], we will get the element from st1 to st2 while checking if there is repetition \n\t\t\t\tst2.add(st1.get(i));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(st2);//[a, b, c, t]\n\t\t\n\n\t}", "private void many(Set<String> s) {\n\t\twhile (!done() && s.contains(program.charAt(pos)+\"\"))\n\t\t\tpos++;\n }", "private static String createPrepStmPlaceHolder(int num) {\n\t\tchar[] c_ar = new char[num*3];\n\t\tc_ar[0] = '(';\n\t\tc_ar[1] = '?';\n\t\tfor(int i=1; i<num; ++i) {\n\t\t\tc_ar[3*i-1] = ',';\n\t\t\tc_ar[3*i] = ' ';\n\t\t\tc_ar[3*i+1] = '?';\n\t\t}\n\t\tc_ar[3*num-1] = ')';\n\t\treturn new String(c_ar);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_2() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\", false), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "private void exercise1() {\n final List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerList = list.stream()\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }", "private static String repeatSpace(int number) {\n StringBuilder space = new StringBuilder();\n\n // Adding spaces.\n for (int i = 0; i < number; i++) {\n space.append(\" \");\n }\n\n //returning spaces.\n return space.toString();\n }", "public void mo88640a(List<String> list) {\n List<String> stringList = RxPreferences.INSTANCE.getStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), new ArrayList());\n stringList.addAll(0, list);\n RxPreferences.INSTANCE.putStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), (List) StreamSupport.m150134a(stringList).mo131128a(new AbstractC32239o(new HashSet(stringList)) {\n /* class com.zhihu.android.p1480db.fragment.customview.C18240x255e53c2 */\n private final /* synthetic */ HashSet f$0;\n\n {\n this.f$0 = r1;\n }\n\n @Override // java8.util.p2234b.AbstractC32239o\n public final boolean test(Object obj) {\n return DbEditorSuggestTagCustomView.m93354a(this.f$0, (String) obj);\n }\n }).mo131126a(5).mo131125a(Collectors.m150203a($$Lambda$ofunvu1bqmYbfXGEtxXaV_csE4M.INSTANCE)));\n }", "public Builder addOpenWhiteListBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n ensureOpenWhiteListIsMutable();\n openWhiteList_.add(value);\n onChanged();\n return this;\n }", "@Test\n public void noSpacesBetweenKeywordsTest() {\n tester.yields(\"LaLaLaLaLaaaLi\", lala.EXPRESSION);\n }", "private int skipLeadingWhite( List content, int start) {\r\n if (start < 0) {\r\n start = 0;\r\n }\r\n\r\n int index = start;\r\n int size = content.size();\r\n if (currentFormat.trimAllWhite\r\n || currentFormat.textNormalize\r\n || currentFormat.textTrim) {\r\n while( index < size) {\r\n if ( !isAllWhitespace( content.get(index))) {\r\n return index;\r\n }\r\n index++;\r\n }\r\n }\r\n return index;\r\n }", "private void initWhitespace(Set<String> s) {\n\t\ts.add(\" \");\n\t\ts.add(\"\\n\");\n\t\ts.add(\"\\t\");\n }", "List<C1111j> mo5869a(int i);", "private void appendPlaceHolder(StringBuilder builder, int indent, int consecutiveExcluded, String message) {\n indent(builder, indent);\n builder.append(ELLIPSIS)\n .append(\" \")\n .append(consecutiveExcluded)\n .append(\" \")\n .append(message)\n .append(CoreConstants.LINE_SEPARATOR);\n }", "public void visiualizeSkipList(){\r\n\t\tint number=0;\r\n\t\tNode dummy = sl.getFrom(0,0);\r\n\t\t\r\n\t\tNode next;\r\n\t\tfor(int i=sl.height(); i>=0; i--){\r\n\t\t\t\r\n\t\t\tnext = sl.getFrom(i,0);\r\n\t\t\t\r\n\t\t\tfor(int j=0; j<(sl.size()+2); j++){\r\n\r\n\t\t\t\tnumber = next.getKey();\r\n\t\t\t\t//F.p(number);\r\n\t\t\t\tif(number==dummy.getKey()){\r\n\r\n\t\t\t\t\tif(number==minf)\r\n\t\t\t\t\t\tSystem.out.print(\"-inf\");\r\n\t\t\t\t\telse if(number==inf)\r\n\t\t\t\t\t\tSystem.out.print(\"---inf\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(\"-\",2)+number);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(\"-\",4));\r\n\t\t\t\t\r\n\t\t\t\tif(dummy.getKey()==number)\r\n\t\t\t\t\tnext = next.getRight();\r\n\t\t\t\t\r\n\t\t\t\tdummy = dummy.getRight();\r\n\t\t\t}\r\n\t\t\tdummy = sl.getFrom(0,0);\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "public long getWhiteSpacesCount() {\n return whiteSpacesCount;\n }", "@Test\n\tpublic void testStartingIndicesRegression(){\n\t\tassertLeftmostStartingIndices(\"5,1,7,3,2|-..xxx$1..x...xxx$3....-xx........\", 0, 6, 8, 18, 22);\n\t\tassertRightmostStartingIndices(\"7,5|.......xxx$1....xxx$2..-\", 6, 14);\n\t\t\n\t}", "public MacroList() {\n\t\tthis.macrosses = new HashMap<Integer, String>(12);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_1() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\"), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n String s=\"a /*a*/ sd /*v*/\";\n Pattern p = Pattern.compile(\"(\\\\/\\\\*(\\\\w|\\r\\n)+\\\\*\\\\/)\");\n Matcher m = p.matcher(s);\n List<String> l = new ArrayList<>(100);\n\n while (m.find()) {\n System.out.println(\"tick\");\n l.add(s.substring(m.start()+2, m.end()-2));\n }\n\n System.out.println(l);\n }", "StringPatternCounter(ArrayList<StringPattern> stringPatternList, String fileInput)\n {\n super(fileInput);\n this.stringPatternList = stringPatternList;\n }", "@Before\n public void createString(){\n s1 = \"casa\";\n\ts2 = \"cassa\";\n\ts3 = \"\";\n\ts4 = \"casa\";\n }", "public String minRemoveToMakeValid(String s) {\n int openAvail = 0;\n Set<Integer> skipSet = new HashSet<>();\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) == ')') {\n if (openAvail == 0) {\n skipSet.add(i);\n } else {\n openAvail -= 1;\n }\n } else if (s.charAt(i) == '(') {\n openAvail += 1;\n }\n }\n\n int closedAvail = 0;\n for (int i = s.length() - 1; i >= 0; i--) {\n if (s.charAt(i) == ')') {\n closedAvail += 1;\n } else if (s.charAt(i) == '(') {\n if (closedAvail == 0) {\n skipSet.add(i);\n } else {\n closedAvail -= 1; \n }\n }\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < s.length(); i++) {\n if (!skipSet.contains(i)){\n sb.append(s.charAt(i));\n }\n }\n return sb.toString();\n }", "@Test(timeout = 4000)\n public void test20() throws Throwable {\n StringReader stringReader0 = new StringReader(\"0(Hu\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer2 = new StreamTokenizer(stringReader0);\n JSTerm jSTerm0 = new JSTerm(streamTokenizer0);\n stringReader0.reset();\n StreamTokenizer streamTokenizer3 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer4 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer5 = new StreamTokenizer(stringReader0);\n streamTokenizer0.commentChar((-4));\n StreamTokenizer streamTokenizer6 = new StreamTokenizer(stringReader0);\n streamTokenizer6.ordinaryChars((-1), (-322070664));\n streamTokenizer1.parseNumbers();\n jSTerm0.add((Object) \"JSTerm: Error reading control parameters: \");\n StreamTokenizer streamTokenizer7 = new StreamTokenizer(stringReader0);\n streamTokenizer7.pushBack();\n streamTokenizer1.nextToken();\n StreamTokenizer streamTokenizer8 = new StreamTokenizer(stringReader0);\n streamTokenizer2.slashSlashComments(false);\n JSTerm jSTerm1 = new JSTerm(streamTokenizer5);\n streamTokenizer1.slashStarComments(false);\n streamTokenizer3.eolIsSignificant(false);\n streamTokenizer7.commentChar((-4));\n StreamTokenizer streamTokenizer9 = new StreamTokenizer(stringReader0);\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n jSSubstitution0.listIterator();\n JSSubstitution jSSubstitution1 = jSTerm1.matches((JSPredicateForm) jSTerm0, jSSubstitution0);\n assertTrue(jSSubstitution1.fail());\n }", "public Removalstops()\n {\n stopWords.add(\"am\");\n stopWords.add(\"my\");\nstopWords.add(\"at\");\nstopWords.add(\"a\");\nstopWords.add(\"i\");\nstopWords.add(\"is\");\nstopWords.add(\"of\");\nstopWords.add(\"have\");\nstopWords.add(\"--\");\nstopWords.add(\"do\");\nstopWords.add(\"the\");\nstopWords.add(\"was\");\nstopWords.add(\"iam\");\nstopWords.add(\"there\");\nstopWords.add(\"what\");\nstopWords.add(\"for\");\nstopWords.add(\"in\");\nstopWords.add(\"very\");\nstopWords.add(\"and\");\nstopWords.add(\"to\");\nstopWords.add(\"often\");\nstopWords.add(\"because\");\nstopWords.add(\"in\");\nstopWords.add(\"an\");\nstopWords.add(\"can\");\nstopWords.add(\"via\");\nstopWords.add(\"even\");\nstopWords.add(\"as\");\nstopWords.add(\"best\");\nstopWords.add(\"been\");\nstopWords.add(\"into\");\nstopWords.add(\"by\");\nstopWords.add(\"around\");\nstopWords.add(\"being\");\nstopWords.add(\"from\");\nstopWords.add(\"etc\");\nstopWords.add(\"his\");\nstopWords.add(\"do\");\nstopWords.add(\"have\");\nstopWords.add(\"had\"); \nstopWords.add(\"able\");\nstopWords.add(\"about\");\nstopWords.add(\"above\");\nstopWords.add(\"abroad\");\nstopWords.add(\"according\");\nstopWords.add(\"accordingly\");\nstopWords.add(\"across\");\nstopWords.add(\"actually\");\nstopWords.add(\"adj\");\nstopWords.add(\"after\");\nstopWords.add(\"afterwards\");\nstopWords.add(\"again\");\nstopWords.add(\"against\");\nstopWords.add(\"ago\");\nstopWords.add(\"ahead\");\nstopWords.add(\"ain't\");\nstopWords.add(\"all\");\nstopWords.add(\"allow\");\nstopWords.add(\"allows\");\nstopWords.add(\"almost\");\nstopWords.add(\"alone\");\nstopWords.add(\"along\");\nstopWords.add(\"alongside\");\nstopWords.add(\"already\");\nstopWords.add(\"also\");\nstopWords.add(\"although\");\nstopWords.add(\"always\");\nstopWords.add(\"am\");\nstopWords.add(\"amid\");\nstopWords.add(\"amidst\");\nstopWords.add(\"among\");\nstopWords.add(\"amongst\");\nstopWords.add(\"an\");\nstopWords.add(\"and\");\nstopWords.add(\"another\");\nstopWords.add(\"any\");\nstopWords.add(\"anybody\");\nstopWords.add(\"anyhow\");\nstopWords.add(\"anyone\");\nstopWords.add(\"anything\");\nstopWords.add(\"anyway\");\nstopWords.add(\"anyways\");\nstopWords.add(\"anywhere\");\nstopWords.add(\"apart\");\nstopWords.add(\"appear\");\nstopWords.add(\"appreciate\");\nstopWords.add(\"appropriate\");\nstopWords.add(\"are\");\nstopWords.add(\"aren't\");\nstopWords.add(\"around\");\nstopWords.add(\"as\");\nstopWords.add(\"a's\");\nstopWords.add(\"aside\");\nstopWords.add(\"ask\");\nstopWords.add(\"asking\");\nstopWords.add(\"associated\");\nstopWords.add(\"at\");\nstopWords.add(\"available\");\nstopWords.add(\"away\");\nstopWords.add(\"awfully\");\nstopWords.add(\"back\");\nstopWords.add(\"backward\");\nstopWords.add(\"backwards\");\nstopWords.add(\"be\");\nstopWords.add(\"became\");\nstopWords.add(\"beacause\");\nstopWords.add(\"become\");\nstopWords.add(\"becomes\");\nstopWords.add(\"becoming\");\nstopWords.add(\"been\");\nstopWords.add(\"before\");\nstopWords.add(\"beforehand\");\nstopWords.add(\"begin\");\nstopWords.add(\"behind\");\nstopWords.add(\"being\");\nstopWords.add(\"believe\");\nstopWords.add(\"below\");\nstopWords.add(\"beside\");\nstopWords.add(\"besides\");\nstopWords.add(\"best\");\nstopWords.add(\"better\");\nstopWords.add(\"between\");\nstopWords.add(\"beyond\");\nstopWords.add(\"both\");\nstopWords.add(\"brief\");\nstopWords.add(\"but\");\nstopWords.add(\"by\");\nstopWords.add(\"came\");\nstopWords.add(\"can\");\nstopWords.add(\"cannot\");\nstopWords.add(\"cant\");\nstopWords.add(\"can't\");\nstopWords.add(\"caption\");\nstopWords.add(\"cause\");\nstopWords.add(\"causes\");\nstopWords.add(\"certain\");\nstopWords.add(\"cetrainly\");\nstopWords.add(\"changes\");\nstopWords.add(\"clearly\");\nstopWords.add(\"c'mon\");\nstopWords.add(\"co\");\nstopWords.add(\"co.\");\nstopWords.add(\"com\");\nstopWords.add(\"come\");\nstopWords.add(\"comes\");\nstopWords.add(\"concerning\");\nstopWords.add(\"consequently\");\nstopWords.add(\"consider\");\nstopWords.add(\"considering\");\nstopWords.add(\"could\");\nstopWords.add(\"couldn't\");\nstopWords.add(\"c's\");\nstopWords.add(\"currently\");\nstopWords.add(\"dare\");\nstopWords.add(\"daren't\");\nstopWords.add(\"definitely\");\nstopWords.add(\"described\");\nstopWords.add(\"despite\");\nstopWords.add(\"did\");\nstopWords.add(\"didn't\");\nstopWords.add(\"different\");\nstopWords.add(\"directly\");\nstopWords.add(\"do\");\nstopWords.add(\"does\");\nstopWords.add(\"doesn't\");\nstopWords.add(\"doing\");\nstopWords.add(\"done\");\nstopWords.add(\"don't\");\nstopWords.add(\"down\");\nstopWords.add(\"downwards\");\nstopWords.add(\"during\");\nstopWords.add(\"each\");\nstopWords.add(\"edu\");\nstopWords.add(\"eg\");\nstopWords.add(\"eight\");\nstopWords.add(\"eighty\");\nstopWords.add(\"either\");\nstopWords.add(\"else\");\nstopWords.add(\"elsewhere\");\nstopWords.add(\"end\");\nstopWords.add(\"ending\");\nstopWords.add(\"enough\");\nstopWords.add(\"entirely\");\nstopWords.add(\"especially\");\nstopWords.add(\"et\");\nstopWords.add(\"etc\");\nstopWords.add(\"even\");\nstopWords.add(\"evenmore\");\nstopWords.add(\"every\");\nstopWords.add(\"everybody\");\nstopWords.add(\"everyone\");\nstopWords.add(\"everything\");\nstopWords.add(\"everywhere\");\nstopWords.add(\"ex\");\nstopWords.add(\"exactly\");\nstopWords.add(\"example\");\nstopWords.add(\"except\");\nstopWords.add(\"fairly\");\nstopWords.add(\"far\");\nstopWords.add(\"farhter\");\nstopWords.add(\"few\");\nstopWords.add(\"fewer\");\nstopWords.add(\"fifth\");\nstopWords.add(\"first\");\nstopWords.add(\"five\");\nstopWords.add(\"followed\");\nstopWords.add(\"following\");\nstopWords.add(\"follows\");\nstopWords.add(\"for\");\nstopWords.add(\"forever\");\nstopWords.add(\"former\");\nstopWords.add(\"formerly\");\nstopWords.add(\"forth\");\nstopWords.add(\"forward\");\nstopWords.add(\"found\");\nstopWords.add(\"four\");\nstopWords.add(\"from\");\nstopWords.add(\"further\");\nstopWords.add(\"furthermore\");\nstopWords.add(\"get\");\nstopWords.add(\"gets\");\nstopWords.add(\"getting\");\nstopWords.add(\"given\");\nstopWords.add(\"gives\");\nstopWords.add(\"go\");\nstopWords.add(\"goes\");\nstopWords.add(\"going\");\nstopWords.add(\"gone\");\nstopWords.add(\"got\");\nstopWords.add(\"gotten\");\nstopWords.add(\"greetings\");\nstopWords.add(\"had\");\nstopWords.add(\"hadn't\");\nstopWords.add(\"half\");\nstopWords.add(\"happens\");\nstopWords.add(\"hardly\");\nstopWords.add(\"has\");\nstopWords.add(\"hasn't\");\nstopWords.add(\"have\");\nstopWords.add(\"haven't\");\nstopWords.add(\"having\");\nstopWords.add(\"he\");\nstopWords.add(\"he'd\");\nstopWords.add(\"he'll\");\nstopWords.add(\"hello\");\nstopWords.add(\"help\");\nstopWords.add(\"hence\");\nstopWords.add(\"her\");\nstopWords.add(\"here\");\nstopWords.add(\"hereafter\");\nstopWords.add(\"hereby\");\nstopWords.add(\"herein\");\nstopWords.add(\"here's\");\nstopWords.add(\"hereupon\");\nstopWords.add(\"hers\");\nstopWords.add(\"herself\");\nstopWords.add(\"he's\");\nstopWords.add(\"hi\");\nstopWords.add(\"him\");\nstopWords.add(\"himself\");\nstopWords.add(\"his\");\nstopWords.add(\"hither\");\nstopWords.add(\"hopefully\");\nstopWords.add(\"how\");\nstopWords.add(\"howbeit\");\nstopWords.add(\"however\");\nstopWords.add(\"however\");\nstopWords.add(\"hundred\");\nstopWords.add(\"i'd\");\nstopWords.add(\"ie\");\nstopWords.add(\"if\");\nstopWords.add(\"ignored\");\nstopWords.add(\"i'll\");\nstopWords.add(\"i'm\");\nstopWords.add(\"immediate\");\nstopWords.add(\"in\");\nstopWords.add(\"iansmuch\");\nstopWords.add(\"inc\");\nstopWords.add(\"inc.\");\nstopWords.add(\"indeed\");\nstopWords.add(\"indicate\");\nstopWords.add(\"indicated\");\nstopWords.add(\"indicates\");\nstopWords.add(\"inner\");\nstopWords.add(\"inside\");\nstopWords.add(\"insofar\");\nstopWords.add(\"into\");\nstopWords.add(\"inward\");\nstopWords.add(\"is\");\nstopWords.add(\"isn't\");\nstopWords.add(\"it\");\nstopWords.add(\"it'd\");\nstopWords.add(\"it'll\");\nstopWords.add(\"its\");\nstopWords.add(\"it's\");\nstopWords.add(\"itself\");\nstopWords.add(\"i've\");\nstopWords.add(\"just\");\nstopWords.add(\"k\");\nstopWords.add(\"keep\");\nstopWords.add(\"keeps\");\nstopWords.add(\"kept\");\nstopWords.add(\"know\");\nstopWords.add(\"knows\");\nstopWords.add(\"known\");\nstopWords.add(\"last\");\nstopWords.add(\"lately\");\nstopWords.add(\"later\");\nstopWords.add(\"latter\");\nstopWords.add(\"latterly\");\nstopWords.add(\"least\");\nstopWords.add(\"less\");\nstopWords.add(\"let\");\nstopWords.add(\"let's\");\nstopWords.add(\"like\");\nstopWords.add(\"liked\");\nstopWords.add(\"likely\");\nstopWords.add(\"likewise\");\nstopWords.add(\"little\");\nstopWords.add(\"look\");\nstopWords.add(\"looks\");\nstopWords.add(\"low\");\nstopWords.add(\"lower\");\nstopWords.add(\"ltd\");\nstopWords.add(\"made\");\nstopWords.add(\"mainly\");\nstopWords.add(\"make\");\nstopWords.add(\"makes\");\nstopWords.add(\"many\");\nstopWords.add(\"may\");\nstopWords.add(\"maybe\");\nstopWords.add(\"mayn't\");\nstopWords.add(\"me\");\nstopWords.add(\"mean\");\nstopWords.add(\"meanwhile\");\nstopWords.add(\"merely\");\nstopWords.add(\"might\");\nstopWords.add(\"mightn't\");\nstopWords.add(\"mine\");\nstopWords.add(\"minus\");\nstopWords.add(\"miss\");\nstopWords.add(\"more\");\nstopWords.add(\"moreover\");\nstopWords.add(\"most\");\nstopWords.add(\"mostly\");\nstopWords.add(\"mr\");\nstopWords.add(\"mrs\");\nstopWords.add(\"much\");\nstopWords.add(\"must\");\nstopWords.add(\"mustn't\");\nstopWords.add(\"my\");\nstopWords.add(\"myself\");\nstopWords.add(\"name\");\nstopWords.add(\"namely\");\nstopWords.add(\"nd\");\nstopWords.add(\"near\");\nstopWords.add(\"nearly\");\nstopWords.add(\"necessary\");\nstopWords.add(\"need\");\nstopWords.add(\"needn't\");\nstopWords.add(\"needs\");\nstopWords.add(\"neither\");\nstopWords.add(\"never\");\nstopWords.add(\"neverf\");\nstopWords.add(\"neverless\");\nstopWords.add(\"nevertheless\");\nstopWords.add(\"new\");\nstopWords.add(\"next\");\nstopWords.add(\"nine\");\nstopWords.add(\"ninety\");\nstopWords.add(\"no\");\nstopWords.add(\"nobody\");\nstopWords.add(\"non\");\nstopWords.add(\"none\");\nstopWords.add(\"nonetheless\");\nstopWords.add(\"noone\");\nstopWords.add(\"no-one\");\nstopWords.add(\"nor\");\nstopWords.add(\"normally\");\nstopWords.add(\"not\");\nstopWords.add(\"nothing\");\nstopWords.add(\"notwithstanding\");\nstopWords.add(\"novel\");\nstopWords.add(\"now\");\nstopWords.add(\"nowwhere\");\nstopWords.add(\"obviously\");\nstopWords.add(\"of\");\nstopWords.add(\"off\");\nstopWords.add(\"often\");\nstopWords.add(\"oh\");\nstopWords.add(\"ok\");\nstopWords.add(\"okay\");\nstopWords.add(\"old\");\nstopWords.add(\"on\");\nstopWords.add(\"once\");\nstopWords.add(\"one\");\nstopWords.add(\"ones\");\nstopWords.add(\"one's\");\nstopWords.add(\"only\");\nstopWords.add(\"onto\");\nstopWords.add(\"opposite\");\nstopWords.add(\"or\");\nstopWords.add(\"other\");\nstopWords.add(\"others\");\nstopWords.add(\"otherwise\");\nstopWords.add(\"ought\");\nstopWords.add(\"oughtn't\");\nstopWords.add(\"our\");\nstopWords.add(\"ourselves\");\nstopWords.add(\"out\");\nstopWords.add(\"outside\");\nstopWords.add(\"over\");\nstopWords.add(\"overall\");\nstopWords.add(\"own\");\nstopWords.add(\"particular\");\nstopWords.add(\"particularly\");\nstopWords.add(\"past\");\nstopWords.add(\"per\");\nstopWords.add(\"perhaps\");\nstopWords.add(\"placed\");\nstopWords.add(\"please\");\nstopWords.add(\"plus\");\nstopWords.add(\"possible\");\nstopWords.add(\"presumably\");\nstopWords.add(\"probably\");\nstopWords.add(\"provided\");\nstopWords.add(\"provides\");\nstopWords.add(\"que\");\nstopWords.add(\"quite\");\nstopWords.add(\"qv\");\nstopWords.add(\"rather\");\nstopWords.add(\"rd\");\nstopWords.add(\"re\");\nstopWords.add(\"really\");\nstopWords.add(\"reasonably\");\nstopWords.add(\"recent\");\nstopWords.add(\"recently\");\nstopWords.add(\"regarding\");\nstopWords.add(\"regardless\");\nstopWords.add(\"regards\");\nstopWords.add(\"relatively\");\nstopWords.add(\"respectively\");\nstopWords.add(\"right\");\nstopWords.add(\"round\");\nstopWords.add(\"said\");\nstopWords.add(\"same\");\nstopWords.add(\"saw\");\nstopWords.add(\"say\");\nstopWords.add(\"saying\");\nstopWords.add(\"says\");\nstopWords.add(\"second\");\nstopWords.add(\"secondly\");\nstopWords.add(\"see\");\nstopWords.add(\"seeing\");\nstopWords.add(\"seem\");\nstopWords.add(\"seemed\");\nstopWords.add(\"seeming\");\nstopWords.add(\"seems\");\nstopWords.add(\"seen\");\nstopWords.add(\"self\");\nstopWords.add(\"selves\");\nstopWords.add(\"sensible\");\nstopWords.add(\"sent\");\nstopWords.add(\"serious\");\nstopWords.add(\"seriously\");\nstopWords.add(\"seven\");\nstopWords.add(\"several\");\nstopWords.add(\"shall\");\nstopWords.add(\"shan't\");\nstopWords.add(\"she\");\nstopWords.add(\"she'd\");\nstopWords.add(\"she'll\");\nstopWords.add(\"she's\");\nstopWords.add(\"should\");\nstopWords.add(\"shouldn't\");\nstopWords.add(\"since\");\nstopWords.add(\"six\");\nstopWords.add(\"so\");\nstopWords.add(\"some\");\nstopWords.add(\"somebody\");\nstopWords.add(\"someday\");\nstopWords.add(\"somehow\");\nstopWords.add(\"someone\");\nstopWords.add(\"something\");\nstopWords.add(\"sometime\");\nstopWords.add(\"sometimes\");\nstopWords.add(\"somewhat\");\nstopWords.add(\"somewhere\");\nstopWords.add(\"soon\");\nstopWords.add(\"sorry\");\nstopWords.add(\"specified\");\nstopWords.add(\"specify\");\nstopWords.add(\"specifying\");\nstopWords.add(\"still\");\nstopWords.add(\"sub\");\nstopWords.add(\"such\");\nstopWords.add(\"sup\");\nstopWords.add(\"sure\");\nstopWords.add(\"take\");\nstopWords.add(\"taken\");\nstopWords.add(\"taking\");\nstopWords.add(\"tell\");\nstopWords.add(\"tends\");\nstopWords.add(\"th\");\nstopWords.add(\"than\");\nstopWords.add(\"thank\");\nstopWords.add(\"thanks\");\nstopWords.add(\"thanx\");\nstopWords.add(\"that\");\nstopWords.add(\"that'll\");\nstopWords.add(\"thats\");\nstopWords.add(\"that've\");\nstopWords.add(\"the\");\nstopWords.add(\"their\");\nstopWords.add(\"theirs\");\nstopWords.add(\"them\");\nstopWords.add(\"themselves\");\nstopWords.add(\"then\");\nstopWords.add(\"thence\");\nstopWords.add(\"there\");\nstopWords.add(\"thereafter\");\nstopWords.add(\"thereby\");\nstopWords.add(\"there'd\");\nstopWords.add(\"therefore\");\nstopWords.add(\"therein\");\nstopWords.add(\"ther'll\");\nstopWords.add(\"there're\");\nstopWords.add(\"theres\");\nstopWords.add(\"there's\");\nstopWords.add(\"thereupon\");\nstopWords.add(\"there've\");\nstopWords.add(\"these\");\nstopWords.add(\"they\");\nstopWords.add(\"they'd\");\nstopWords.add(\"they'll\");\nstopWords.add(\"they're\");\nstopWords.add(\"they've\");\nstopWords.add(\"thing\");\nstopWords.add(\"things\");\nstopWords.add(\"think\");\nstopWords.add(\"third\");\nstopWords.add(\"thirty\");\nstopWords.add(\"this\");\nstopWords.add(\"thorough\");\nstopWords.add(\"thoroughly\");\nstopWords.add(\"those\");\nstopWords.add(\"though\");\nstopWords.add(\"throughout\");\nstopWords.add(\"thru\");\nstopWords.add(\"thus\");\nstopWords.add(\"till\");\nstopWords.add(\"to\");\nstopWords.add(\"together\");\nstopWords.add(\"too\");\nstopWords.add(\"took\");\nstopWords.add(\"toward\");\nstopWords.add(\"towards\");\nstopWords.add(\"tried\");\nstopWords.add(\"tries\");\nstopWords.add(\"truly\");\nstopWords.add(\"try\");\nstopWords.add(\"trying\");\nstopWords.add(\"t's\");\nstopWords.add(\"twice\");\nstopWords.add(\"two\");\nstopWords.add(\"un\");\nstopWords.add(\"under\");\nstopWords.add(\"underneath\");\nstopWords.add(\"undoing\");\nstopWords.add(\"unfortunately\");\nstopWords.add(\"unless\");\nstopWords.add(\"unlike\");\nstopWords.add(\"unlikely\");\nstopWords.add(\"untill\");\nstopWords.add(\"unto\");\nstopWords.add(\"up\");\nstopWords.add(\"upon\");\nstopWords.add(\"upwards\");\nstopWords.add(\"us\");\nstopWords.add(\"use\");\nstopWords.add(\"used\");\nstopWords.add(\"useful\");\nstopWords.add(\"uses\");\nstopWords.add(\"using\");\nstopWords.add(\"usually\");\nstopWords.add(\"v\");\nstopWords.add(\"value\");\nstopWords.add(\"various\");\nstopWords.add(\"versus\");\nstopWords.add(\"very\");\nstopWords.add(\"via\");\nstopWords.add(\"viz\");\nstopWords.add(\"vs\");\nstopWords.add(\"want\");\nstopWords.add(\"wants\");\nstopWords.add(\"was\");\nstopWords.add(\"wasn't\");\nstopWords.add(\"way\");\nstopWords.add(\"we\");\nstopWords.add(\"we'd\");\nstopWords.add(\"welcome\");\nstopWords.add(\"well\");\nstopWords.add(\"we'll\");\nstopWords.add(\"went\");\nstopWords.add(\"were\");\nstopWords.add(\"we're\");\nstopWords.add(\"weren't\");\nstopWords.add(\"we've\");\nstopWords.add(\"what\");\nstopWords.add(\"whatever\");\nstopWords.add(\"what'll\");\nstopWords.add(\"what's\");\nstopWords.add(\"what've\");\nstopWords.add(\"when\");\nstopWords.add(\"whence\");\nstopWords.add(\"whenever\");\nstopWords.add(\"where\");\nstopWords.add(\"whereafter\");\nstopWords.add(\"whereas\");\nstopWords.add(\"whereby\");\nstopWords.add(\"wherein\");\nstopWords.add(\"where's\");\nstopWords.add(\"whereupon\");\nstopWords.add(\"whereever\");\nstopWords.add(\"whether\");\nstopWords.add(\"which\");\nstopWords.add(\"whichever\");\nstopWords.add(\"while\");\nstopWords.add(\"whilst\");\nstopWords.add(\"whither\");\nstopWords.add(\"who\");\nstopWords.add(\"who'd\");\nstopWords.add(\"whoever\");\nstopWords.add(\"whole\");\nstopWords.add(\"who'll\");\nstopWords.add(\"whom\");\nstopWords.add(\"whomever\");\nstopWords.add(\"who's\");\nstopWords.add(\"whose\");\nstopWords.add(\"why\");\nstopWords.add(\"will\");\nstopWords.add(\"willing\");\nstopWords.add(\"wish\");\nstopWords.add(\"with\");\nstopWords.add(\"within\");\nstopWords.add(\"without\");\nstopWords.add(\"wonder\");\nstopWords.add(\"won't\");\nstopWords.add(\"would\");\nstopWords.add(\"wouldn't\");\nstopWords.add(\"yes\");\nstopWords.add(\"yet\");\nstopWords.add(\"you\");\nstopWords.add(\"you'd\");\nstopWords.add(\"you'll\");\nstopWords.add(\"your\");\nstopWords.add(\"you're\");\nstopWords.add(\"yours\");\nstopWords.add(\"yourself\");\nstopWords.add(\"you've\");\nstopWords.add(\"zero\");\n\n \n \n }", "@SuppressWarnings(\"resource\")\n public static void doubleCapacity(String[] array){\n int wordCount = 0;\n int arrayGrowth = 500;\n array = new String[10];\n String strLine = null;\n while (strLine != null) {\n // Store the content into an array\n Scanner s = new Scanner(strLine);\n while (s.hasNext()) {\n if (array.length == wordCount) {\n // expand list\n array = Arrays.copyOf(array, array.length + arrayGrowth);\n }\n array[wordCount] = s.next();\n wordCount++;\n } \n }\n }", "private int skipTrialingWhite( List content, int start) {\r\n int size = content.size();\r\n if (start > size) {\r\n start = size;\r\n }\r\n\r\n int index = start;\r\n if (currentFormat.trimAllWhite\r\n || currentFormat.textNormalize\r\n || currentFormat.textTrim) {\r\n while( index >= 0) {\r\n if ( !isAllWhitespace( content.get(index - 1)))\r\n break;\r\n --index;\r\n }\r\n }\r\n return index;\r\n }", "public abstract void mo9247b(String str, long j, List<String> list);", "private void fillSet() {\r\n\t\tString regex = \"\\\\p{L}+\";\r\n\t\tMatcher matcher = Pattern.compile(regex).matcher(body);\r\n\t\twhile (matcher.find()) {\r\n\t\t\tif (!matcher.group().isEmpty()) {\r\n\t\t\t\twords.add(matcher.group());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private ArrayList<Integer> getEmptySpaces(char[] board) {\n ArrayList<Integer> emptySpaces = new ArrayList<>();\n for (int i = 0; i < board.length; i++) {\n if (board[i] == ' ') {\n emptySpaces.add(i);\n }\n }\n return emptySpaces;\n }", "void mo13370a(int i, int i2, List<C15929a> list) throws IOException;", "private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }", "private static Stream<List<Tile>> substituteBlanks(List<Tile> p) {\n Stream<List<Tile>> res = Stream.of(p);\n //Iterate through all letters.\n for (int i = 0; i < p.size(); i++) {\n //Check for blanks.\n if (p.get(i).getLetter() == Character.MIN_VALUE) {\n //If blank found, substitute it for all a-z, and look again for next blank.\n res = substituteBlankAtIndex(p, i)\n .flatMap(s -> substituteBlanks(s));\n }\n }\n\n return res;\n }", "public static void main(String[] args) {\n String[] strings = new String[100];\n for (int i = 0; i < strings.length; i++) {\n strings[i] = randomStrings(2);\n }\n// for (String s : strings) {\n// System.out.println(s);\n// }\n ArrayList<String> appeared = new ArrayList<>();\n for (String s : strings) {\n if (!appeared.contains(s)) {\n appeared.add(s);\n }\n }\n System.out.println(appeared.size());\n\n }", "private IgnoreListHelper() {\n\t}", "@Test\n\t public void test5 ()\n\t{\n\t\t\tString s = new String(\"aaabaaaaabaabaaaabaaaaaaaaaaaaaabaaaaaaaaaaaaaaabaaaaaaaaaaaaaaba\");\n\t s = s.replaceAll(\"\\\\s+\", \" \");\n\t assertEquals(\"aaaaaaaaaaaaaabaaaaaaaaaaaaaa\", LRS.lrs(s)); \n\t}", "public static List<String> findRepeatedDnaSequences(String s) {\n \tList<String> re=new ArrayList<String>();\n \tif(s.length()<=10){\n \t\treturn re;\n \t}\n \tMap<String, Integer> map=new HashMap<String, Integer>(); \t\n \tfor(int i=10; i<=s.length(); i++){\n \t\tString k=s.substring(i-10, i);\n \t\tif(map.containsKey(k)){\n \t\t\tint val=map.get(k);\n \t\t\tif(val==1){\n \t\t\t\tre.add(k);\n \t\t\t}\n \t\t\tmap.put(k, val+1);\n \t\t}else{\n \t\t\tmap.put(k, 1);\n \t\t}\n \t}\n \treturn re;\n }", "public static void main(){\r\n\t\t\r\n\t\tArrayList<tok> pHolder = new ArrayList<tok>();\r\n\r\n\t\t pHolder.add(new tok(\"@\", \"@\"));\r\n\t\t\r\n\t\treturn;\r\n\t}", "public void mo9497b(List<String> list) {\n this.f1514c = list;\n }", "private void listEntries(BufferedWriter bw, String previous, int start, int end, String zeroes) throws IOException {\n\t\tint writeStart = -1;\n\t\tStringBuilder sb = new StringBuilder();\n\t\tchar c;\n\t\tfor (int i = 0, l = previous.length(); i < l && writeStart == -1; i++) {\n\t\t\tc = previous.charAt(i);\n\t\t\tif (Character.isDigit(c)) {sb.append(c);}\n\t\t\telse {writeStart = Integer.parseInt(sb.toString());}\n\t\t}\n\t\tfor (int i = start; i < end; i++) {bw.write(++writeStart + \"=\" + zeroes + i + \"\\n\");}\n\t}", "public void m20623OooO00o() {\n for (C8964ooOOo000 ooooo000 : this.f22213OooO00o) {\n OooO00o(ooooo000);\n }\n this.f22212OooO00o.clear();\n this.f22213OooO00o.clear();\n }", "public String addWhiteSpace(String str, int number) {\n\t\tStringBuilder result = new StringBuilder();\n\t\tfor (int i = 0; i < str.length(); i+=2) {\n\t\t if (i > 0) {\n\t\t\t for (int j = 0; j < number; j++)\n\t\t\t\t result.append(\" \");\n\t\t }\n\t\t result.append(str.charAt(i));\n\t\t result.append(str.charAt(i+1));\n\t\t}\n\t\treturn result.toString();\n\t}", "public static List<String> findStrobogrammatic(int n) {\n List<String> cur, ans;\n ans = new ArrayList<String>((n & 1) == 0 ? Arrays.asList(\"\") : Arrays.asList(\"0\", \"1\", \"8\"));\n if (n < 2) return ans;\n\n for (;n > 1; n -= 2) {\n cur = ans;\n ans = new ArrayList<String>();\n for (String i : cur) {\n if (n > 3) {\n ans.add('0' + i + '0');\n }\n ans.add('1' + i + '1');\n ans.add('8' + i + '8');\n ans.add('6' + i + '9');\n ans.add('9' + i + '6');\n }\n }\n System.out.println(ans.size());\n return ans;\n }", "private static List<String> induceSynonims(String word) {\n\t\treturn null;\n\t}", "private List<WordScore> liveList(List<WordScore> gridList, String s) {\n s = s.toLowerCase();\n List<WordScore> liveList = new ArrayList<>();\n for(WordScore ws : gridList){\n int nochars = s.length() - s.replaceAll(ws.getWord(), \"\").length();\n liveList.add(new WordScore(ws.getWord(), ws.getScore()-nochars));\n }\n return liveList;\n }", "private void fillRandomList()\n\t{\n\t\trandomList.add(\"I like cheese.\");\n\t\trandomList.add(\"Tortoise can move faster than slow rodent.\");\n\t\trandomList.add(\"I enjoy sitting on the ground.\");\n\t\trandomList.add(\"I like cereal.\");\n\t\trandomList.add(\"This is random.\");\n\t\trandomList.add(\"I like typing\");\n\t\trandomList.add(\"FLdlsjejf is my favorite word.\");\n\t\trandomList.add(\"I have two left toes.\");\n\t\trandomList.add(\"Sqrt(2) = 1.414213562 ...\");\n\t\trandomList.add(\"Hi mom.\");\n\t}", "public static void main(String[] args) {\n\t\tString s=\"22\";\n\t\t\n\t\tif(s.indexOf(\"1\")>=0||s.equals(\"\"))\n\t\t\tSystem.out.println(\"hello\");\n\t\t\t\n\t\tArrayList f=new ArrayList();\n\t\tint stack[]=new int[2*s.length()];\n\t\tint top=-1;\n\t\tchar a[][]=new char[][]{{},{},{'#','a','b','c','#'},{'#','d','e','f','#'},{'#','g','h','i','#'},{'#','j','k','l','#'},{'#','m','n','o','#'},{'#','p','q','r','s','#'},{'#','t','u','v','#'},{'#','w','x','y','z','#'}};\n\t\tint length[]=new int []{0,0,3,3,3,3,3,4,3,4};\n\t\tStringBuilder ans=new StringBuilder();\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tint x=stack[++top]=(int)s.charAt(i)-'0';\n\t\t\tans.append(a[x][1]);\n\t\t\tstack[++top]=1;\n\t\t}\n\t\twhile(stack[1]!=length[(int)s.charAt(0)-'0']+1){\n\t\t\tif(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\tif(s.length()==(top+1)/2){\n\t\t\t\t\twhile(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\t\t\tint r=(top-1)/2;\n\t\t\t\t\t\tchar r1=a[stack[top-1]][stack[top]];\n\t\t\t\t\t\tans.setCharAt(r, r1);\n\t\t\t\t\t\tString ans1=ans.toString();\n\t\t\t\t\t\tf.add(ans1);\n\t\t\t\t\t\tstack[top]++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t\t\ttop+=2;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[top]=1;\n\t\t\t\ttop-=2;\n\t\t\t\tstack[top]++;\n\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(f.size());\n\t}", "private void modify(List listString){\n\t}", "private String repeatM(int count){\n return new String(new char[count]).replace('\\0','M');\n }", "private static void\n eatWhite(ParseState state)\n {\n while(state.pos < state.data.length() && state.data.charAt(state.pos) == ' ')\n {\n ++state.pos;\n }\n }" ]
[ "0.55591595", "0.54578066", "0.5425202", "0.53757787", "0.5364262", "0.5288061", "0.5286694", "0.52332956", "0.5221815", "0.5211653", "0.5201803", "0.51848924", "0.518454", "0.5178811", "0.51761377", "0.5150973", "0.5141157", "0.5138997", "0.51366293", "0.5130912", "0.51279604", "0.5071481", "0.50682074", "0.50673336", "0.5058374", "0.50503725", "0.5046189", "0.5046023", "0.50277734", "0.50120145", "0.49743384", "0.4959684", "0.49513972", "0.49383563", "0.492581", "0.49236417", "0.49056625", "0.48794308", "0.48752907", "0.48583564", "0.4856731", "0.48500034", "0.48222542", "0.48127964", "0.4812774", "0.48096502", "0.48054305", "0.48029843", "0.48021927", "0.4784932", "0.47791797", "0.47657204", "0.47405565", "0.47405225", "0.47390026", "0.47360018", "0.47321254", "0.47301587", "0.47235176", "0.47201622", "0.4720113", "0.4717014", "0.47158983", "0.4708474", "0.4698091", "0.46781585", "0.46772122", "0.46698767", "0.46634603", "0.46624836", "0.46601665", "0.4651289", "0.46146277", "0.4606947", "0.4606018", "0.4604179", "0.45975944", "0.45943204", "0.45926452", "0.45925856", "0.45852026", "0.4583654", "0.45777828", "0.45770383", "0.45763302", "0.4573015", "0.45670146", "0.45669803", "0.4564498", "0.45611578", "0.45599565", "0.45561954", "0.45553017", "0.45483592", "0.45479", "0.45477003", "0.4545243", "0.45429727", "0.45390365", "0.4536908" ]
0.5524409
1
open_white_list repeated string open_white_list = 11;
public com.google.protobuf.ByteString getOpenWhiteListBytes(int index) { return openWhiteList_.getByteString(index); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SList oddWords();", "public java.lang.String getOpenWhiteList(int index) {\n return openWhiteList_.get(index);\n }", "public int getOpenWhiteListCount() {\n return openWhiteList_.size();\n }", "public java.lang.String getOpenWhiteList(int index) {\n return openWhiteList_.get(index);\n }", "public int getOpenWhiteListCount() {\n return openWhiteList_.size();\n }", "private LowercaseWordList() {\n\n }", "public Builder setOpenWhiteList(\n int index, java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureOpenWhiteListIsMutable();\n openWhiteList_.set(index, value);\n onChanged();\n return this;\n }", "static List DuplicateElements(List<Character> characters){\r\n\t\tList newlist=new ArrayList<>();\r\n\t\tfor(char c:characters)\r\n\t\t{\r\n\t\t\tnewlist.add(Collections.nCopies(2,c ));\r\n\t\r\n\t\t}\r\n\tSystem.out.println(newlist);\r\n\treturn newlist;\r\n\t}", "public Builder addOpenWhiteList(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureOpenWhiteListIsMutable();\n openWhiteList_.add(value);\n onChanged();\n return this;\n }", "public static List<String> createCompetencyList() {\n List<String> list = new ArrayList<String>();\n list.add(\"Line number 1\");\n list.add(\"Line number 2\");\n return list;\n }", "private void exercise2() {\n List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerOddLengthList = list.stream()\n .filter((string) -> string.length() % 2 != 0)\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public void setWhiteSpacesCount(long value) {\n this.whiteSpacesCount = value;\n }", "List<String> mo5877c(String str);", "java.util.List<String> getRepeatedStringFieldList();", "private String addRandomSpacing(String originalText) {\n ArrayList<Expression> list = new ArrayList<Expression>();\n\n\t\tclass MyVisitor extends ModifierVisitor<Void> {\n\t\t @Override\n\t\t public Node visit(VariableDeclarator declarator, Void args) {\n\t Expression expression = declarator.getInitializer().get();\n\t \n\t \n\t // We're looking for string.\n\t if (expression instanceof StringLiteralExpr) {\n\t list.add(expression);\n\t }\n\t\t return null;\n\t\t }\n\t\t}\n\t\t\n\t\t\n\t}", "SList evenWords();", "public com.google.protobuf.ProtocolStringList\n getOpenWhiteListList() {\n return openWhiteList_;\n }", "List<String> mo5876c();", "void fillList(List<String> toFill) {\n for (int i = 0; i < number; i++) {\n toFill.add(i + \"\");\n }\n }", "public String getWhiteList0() {\n return getString(\"whitelist.0\");\n }", "public Builder clearOpenWhiteList() {\n openWhiteList_ = com.google.protobuf.LazyStringArrayList.EMPTY;\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n return this;\n }", "public Builder addAllOpenWhiteList(\n java.lang.Iterable<java.lang.String> values) {\n ensureOpenWhiteListIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, openWhiteList_);\n onChanged();\n return this;\n }", "public abstract List<C41717j> mo70725h(String str);", "static int getNumPatterns() { return 64; }", "private static void skipSplitAdd(String s, List<String> list) {\n String tmp[] = s.split(\" \");\n\n for (int i = 1; i < tmp.length; i++) {\n list.add(tmp[i]);\n\n // System.out.println(tmp[i]);\n }\n }", "public static void addStars(ArrayList<String> list){\r\n //Loops through the list\r\n for(int i = 1; i < list.size(); i+=2){\r\n list.add(i, \"*\");\r\n }\r\n System.out.println(list);\r\n }", "private void m4676a(List<C0906d> list, StringBuilder sb) {\n if (sb.length() != 0) {\n list.add(new C0906d(C0906d.EnumC0907a.LITERAL, sb.toString()));\n }\n }", "public void setWhiteCounter(int num){\n this.whiteCounter = num;\n }", "StringList createStringList();", "List<C1114c> mo5886k(String str);", "private String genWhiteSpaceRegex(int noOfWhiteSpace,\n String multiWhiteSpace,\n String zeroWhiteSpace) {\n\n return (noOfWhiteSpace == 0) ? zeroWhiteSpace\n : multiWhiteSpace.replace(\"%%\", String.valueOf(noOfWhiteSpace));\n }", "public com.google.protobuf.ByteString\n getOpenWhiteListBytes(int index) {\n return openWhiteList_.getByteString(index);\n }", "private void generateLists(String num, Stack<String> numberList)\n {\n\tfor(int i = 0, len = num.length(); i < len; i++)\n\t numberList.push(new Character(num.charAt(i)).toString());\n }", "private void exercise5() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> nonDuplicateList;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n nonDuplicateList = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .collect(toList());\n }\n\n nonDuplicateList.forEach(System.out::println);\n }", "void mo100443a(List<String> list);", "ListString createListString();", "List<Log> mo13160a(String str, int i);", "public com.google.protobuf.ProtocolStringList\n getOpenWhiteListList() {\n return openWhiteList_.getUnmodifiableView();\n }", "public static void main(String[] args) { String s = \"catsanddog\";\n// List<String> wordDict = new ArrayList<>(Arrays.asList(\"cat\", \"cats\", \"and\", \"sand\", \"dog\"));\n//\n String s = \"pineapplepenappl\";\n List<String> wordDict = new ArrayList<>(Arrays.asList(\"apple\", \"pen\", \"applepen\", \"pine\", \"pineapple\"));\n\n WordBreak140 tmp = new WordBreak140();\n tmp.wordBreak(s, wordDict);\n }", "@Test\n public void repeatedSubstringPattern() {\n assertTrue(new Solution1().repeatedSubstringPattern(\"abcabcabcabc\"));\n }", "@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }", "private static List<String> testStringGenerator(List<String> palString) {\n\t\tList<String> list = new ArrayList<>();\n\t\tfor (String pal : palString) {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor (int i = 0; i < 10; i++) {\n\t\t\t\tsb.append(pal);\n\t\t\t\tfor (int j = 0; j < pal.length(); j++) {\n\t\t\t\t\tsb.append(j % 10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(sb.toString());\n\t\t}\n\t\treturn list;\n\t}", "public static void makeBlanks(char[] list) {\n\t\tfor (int i = 0; i < list.length; i++) {\n\t\t\tlist[i] = '*';\n\t\t}\n\t}", "public int selectOriginalTokens (Scanner scan, String [] list){\n \n int count = 0;\n while(scan.hasNext()){\n String line = scan.nextLine();\n String[] t = line.split(\"[ \\n\\t\\r.,:?)({}\\\\[\\\\]]\");\n for (int i = 0; i < t.length; i++){\n String item = t[i].trim();\n if(item.length() > 0){\n list[count] = item;\n count++;\n }//End if statement\n }//End for loop\n }//End while loop\n \n return count;\n }", "private String whiteSpace(String sum, String num)\n {\n\tString space = \"\";\n\tfor(int i = 0; i < sum.length() - num.length(); i++)\n\t space += \" \";\n\treturn space;\n }", "void mo54419a(List<String> list);", "List<C1113b> mo5874b(String str);", "public static List<String> stringList() {\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.add(\"abdxxx\");\n\t\tlist.add(\"xxxxx\");\n\t\tlist.add(\"hi\");\n\t\tlist.add(\"SmoothStack\");\n\t\tlist.add(\"Wyatt x Wyatt x\");\n\t\treturn list;\n\t}", "private static String[] resetStringArray() {\n String[] st = new String[L_MAX];\n L = 2 << 8;\n W = 9;\n int i;\n // initialize symbol table with all 1-character strings\n for (i = 0; i < R; i++)\n st[i] = \"\" + (char) i;\n st[i++] = \"\"; // (unused) lookahead for EOF\n return st;\n }", "public void setUp2( )\n\t{\n\t\tfor( int i = 0; i < 1000; i++ )\n\t\t{\n\t\t\tlista.append( \"\" + i );\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tList<Character>st1=new ArrayList<>();\n\t\n\t\tst1.add('a');\n\t\tst1.add('b');\n\t\tst1.add('a');\n\t\tst1.add('a');\n\t\tst1.add('c');\n\t\tst1.add('t');\n\t\n\t\tSystem.out.println(st1);//[a, b, a, a, c, t]\n\t\t\n\t\tList<Character>st2=new ArrayList<>();//empty []\n\t\tfor (int i=0; i<st1.size();i++) {\n\t\t\tif(!st2.contains(st1.get(i))) {\n\t\t\t\t// created str2 [empty], we will get the element from st1 to st2 while checking if there is repetition \n\t\t\t\tst2.add(st1.get(i));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(st2);//[a, b, c, t]\n\t\t\n\n\t}", "private void many(Set<String> s) {\n\t\twhile (!done() && s.contains(program.charAt(pos)+\"\"))\n\t\t\tpos++;\n }", "private static String createPrepStmPlaceHolder(int num) {\n\t\tchar[] c_ar = new char[num*3];\n\t\tc_ar[0] = '(';\n\t\tc_ar[1] = '?';\n\t\tfor(int i=1; i<num; ++i) {\n\t\t\tc_ar[3*i-1] = ',';\n\t\t\tc_ar[3*i] = ' ';\n\t\t\tc_ar[3*i+1] = '?';\n\t\t}\n\t\tc_ar[3*num-1] = ')';\n\t\treturn new String(c_ar);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_2() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\", false), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "private void exercise1() {\n final List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerList = list.stream()\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }", "private static String repeatSpace(int number) {\n StringBuilder space = new StringBuilder();\n\n // Adding spaces.\n for (int i = 0; i < number; i++) {\n space.append(\" \");\n }\n\n //returning spaces.\n return space.toString();\n }", "public void mo88640a(List<String> list) {\n List<String> stringList = RxPreferences.INSTANCE.getStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), new ArrayList());\n stringList.addAll(0, list);\n RxPreferences.INSTANCE.putStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), (List) StreamSupport.m150134a(stringList).mo131128a(new AbstractC32239o(new HashSet(stringList)) {\n /* class com.zhihu.android.p1480db.fragment.customview.C18240x255e53c2 */\n private final /* synthetic */ HashSet f$0;\n\n {\n this.f$0 = r1;\n }\n\n @Override // java8.util.p2234b.AbstractC32239o\n public final boolean test(Object obj) {\n return DbEditorSuggestTagCustomView.m93354a(this.f$0, (String) obj);\n }\n }).mo131126a(5).mo131125a(Collectors.m150203a($$Lambda$ofunvu1bqmYbfXGEtxXaV_csE4M.INSTANCE)));\n }", "public Builder addOpenWhiteListBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n ensureOpenWhiteListIsMutable();\n openWhiteList_.add(value);\n onChanged();\n return this;\n }", "@Test\n public void noSpacesBetweenKeywordsTest() {\n tester.yields(\"LaLaLaLaLaaaLi\", lala.EXPRESSION);\n }", "private int skipLeadingWhite( List content, int start) {\r\n if (start < 0) {\r\n start = 0;\r\n }\r\n\r\n int index = start;\r\n int size = content.size();\r\n if (currentFormat.trimAllWhite\r\n || currentFormat.textNormalize\r\n || currentFormat.textTrim) {\r\n while( index < size) {\r\n if ( !isAllWhitespace( content.get(index))) {\r\n return index;\r\n }\r\n index++;\r\n }\r\n }\r\n return index;\r\n }", "private void initWhitespace(Set<String> s) {\n\t\ts.add(\" \");\n\t\ts.add(\"\\n\");\n\t\ts.add(\"\\t\");\n }", "List<C1111j> mo5869a(int i);", "private void appendPlaceHolder(StringBuilder builder, int indent, int consecutiveExcluded, String message) {\n indent(builder, indent);\n builder.append(ELLIPSIS)\n .append(\" \")\n .append(consecutiveExcluded)\n .append(\" \")\n .append(message)\n .append(CoreConstants.LINE_SEPARATOR);\n }", "public void visiualizeSkipList(){\r\n\t\tint number=0;\r\n\t\tNode dummy = sl.getFrom(0,0);\r\n\t\t\r\n\t\tNode next;\r\n\t\tfor(int i=sl.height(); i>=0; i--){\r\n\t\t\t\r\n\t\t\tnext = sl.getFrom(i,0);\r\n\t\t\t\r\n\t\t\tfor(int j=0; j<(sl.size()+2); j++){\r\n\r\n\t\t\t\tnumber = next.getKey();\r\n\t\t\t\t//F.p(number);\r\n\t\t\t\tif(number==dummy.getKey()){\r\n\r\n\t\t\t\t\tif(number==minf)\r\n\t\t\t\t\t\tSystem.out.print(\"-inf\");\r\n\t\t\t\t\telse if(number==inf)\r\n\t\t\t\t\t\tSystem.out.print(\"---inf\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(\"-\",2)+number);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(\"-\",4));\r\n\t\t\t\t\r\n\t\t\t\tif(dummy.getKey()==number)\r\n\t\t\t\t\tnext = next.getRight();\r\n\t\t\t\t\r\n\t\t\t\tdummy = dummy.getRight();\r\n\t\t\t}\r\n\t\t\tdummy = sl.getFrom(0,0);\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "public long getWhiteSpacesCount() {\n return whiteSpacesCount;\n }", "@Test\n\tpublic void testStartingIndicesRegression(){\n\t\tassertLeftmostStartingIndices(\"5,1,7,3,2|-..xxx$1..x...xxx$3....-xx........\", 0, 6, 8, 18, 22);\n\t\tassertRightmostStartingIndices(\"7,5|.......xxx$1....xxx$2..-\", 6, 14);\n\t\t\n\t}", "public MacroList() {\n\t\tthis.macrosses = new HashMap<Integer, String>(12);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_1() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\"), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n String s=\"a /*a*/ sd /*v*/\";\n Pattern p = Pattern.compile(\"(\\\\/\\\\*(\\\\w|\\r\\n)+\\\\*\\\\/)\");\n Matcher m = p.matcher(s);\n List<String> l = new ArrayList<>(100);\n\n while (m.find()) {\n System.out.println(\"tick\");\n l.add(s.substring(m.start()+2, m.end()-2));\n }\n\n System.out.println(l);\n }", "StringPatternCounter(ArrayList<StringPattern> stringPatternList, String fileInput)\n {\n super(fileInput);\n this.stringPatternList = stringPatternList;\n }", "@Before\n public void createString(){\n s1 = \"casa\";\n\ts2 = \"cassa\";\n\ts3 = \"\";\n\ts4 = \"casa\";\n }", "public String minRemoveToMakeValid(String s) {\n int openAvail = 0;\n Set<Integer> skipSet = new HashSet<>();\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) == ')') {\n if (openAvail == 0) {\n skipSet.add(i);\n } else {\n openAvail -= 1;\n }\n } else if (s.charAt(i) == '(') {\n openAvail += 1;\n }\n }\n\n int closedAvail = 0;\n for (int i = s.length() - 1; i >= 0; i--) {\n if (s.charAt(i) == ')') {\n closedAvail += 1;\n } else if (s.charAt(i) == '(') {\n if (closedAvail == 0) {\n skipSet.add(i);\n } else {\n closedAvail -= 1; \n }\n }\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < s.length(); i++) {\n if (!skipSet.contains(i)){\n sb.append(s.charAt(i));\n }\n }\n return sb.toString();\n }", "@Test(timeout = 4000)\n public void test20() throws Throwable {\n StringReader stringReader0 = new StringReader(\"0(Hu\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer2 = new StreamTokenizer(stringReader0);\n JSTerm jSTerm0 = new JSTerm(streamTokenizer0);\n stringReader0.reset();\n StreamTokenizer streamTokenizer3 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer4 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer5 = new StreamTokenizer(stringReader0);\n streamTokenizer0.commentChar((-4));\n StreamTokenizer streamTokenizer6 = new StreamTokenizer(stringReader0);\n streamTokenizer6.ordinaryChars((-1), (-322070664));\n streamTokenizer1.parseNumbers();\n jSTerm0.add((Object) \"JSTerm: Error reading control parameters: \");\n StreamTokenizer streamTokenizer7 = new StreamTokenizer(stringReader0);\n streamTokenizer7.pushBack();\n streamTokenizer1.nextToken();\n StreamTokenizer streamTokenizer8 = new StreamTokenizer(stringReader0);\n streamTokenizer2.slashSlashComments(false);\n JSTerm jSTerm1 = new JSTerm(streamTokenizer5);\n streamTokenizer1.slashStarComments(false);\n streamTokenizer3.eolIsSignificant(false);\n streamTokenizer7.commentChar((-4));\n StreamTokenizer streamTokenizer9 = new StreamTokenizer(stringReader0);\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n jSSubstitution0.listIterator();\n JSSubstitution jSSubstitution1 = jSTerm1.matches((JSPredicateForm) jSTerm0, jSSubstitution0);\n assertTrue(jSSubstitution1.fail());\n }", "public Removalstops()\n {\n stopWords.add(\"am\");\n stopWords.add(\"my\");\nstopWords.add(\"at\");\nstopWords.add(\"a\");\nstopWords.add(\"i\");\nstopWords.add(\"is\");\nstopWords.add(\"of\");\nstopWords.add(\"have\");\nstopWords.add(\"--\");\nstopWords.add(\"do\");\nstopWords.add(\"the\");\nstopWords.add(\"was\");\nstopWords.add(\"iam\");\nstopWords.add(\"there\");\nstopWords.add(\"what\");\nstopWords.add(\"for\");\nstopWords.add(\"in\");\nstopWords.add(\"very\");\nstopWords.add(\"and\");\nstopWords.add(\"to\");\nstopWords.add(\"often\");\nstopWords.add(\"because\");\nstopWords.add(\"in\");\nstopWords.add(\"an\");\nstopWords.add(\"can\");\nstopWords.add(\"via\");\nstopWords.add(\"even\");\nstopWords.add(\"as\");\nstopWords.add(\"best\");\nstopWords.add(\"been\");\nstopWords.add(\"into\");\nstopWords.add(\"by\");\nstopWords.add(\"around\");\nstopWords.add(\"being\");\nstopWords.add(\"from\");\nstopWords.add(\"etc\");\nstopWords.add(\"his\");\nstopWords.add(\"do\");\nstopWords.add(\"have\");\nstopWords.add(\"had\"); \nstopWords.add(\"able\");\nstopWords.add(\"about\");\nstopWords.add(\"above\");\nstopWords.add(\"abroad\");\nstopWords.add(\"according\");\nstopWords.add(\"accordingly\");\nstopWords.add(\"across\");\nstopWords.add(\"actually\");\nstopWords.add(\"adj\");\nstopWords.add(\"after\");\nstopWords.add(\"afterwards\");\nstopWords.add(\"again\");\nstopWords.add(\"against\");\nstopWords.add(\"ago\");\nstopWords.add(\"ahead\");\nstopWords.add(\"ain't\");\nstopWords.add(\"all\");\nstopWords.add(\"allow\");\nstopWords.add(\"allows\");\nstopWords.add(\"almost\");\nstopWords.add(\"alone\");\nstopWords.add(\"along\");\nstopWords.add(\"alongside\");\nstopWords.add(\"already\");\nstopWords.add(\"also\");\nstopWords.add(\"although\");\nstopWords.add(\"always\");\nstopWords.add(\"am\");\nstopWords.add(\"amid\");\nstopWords.add(\"amidst\");\nstopWords.add(\"among\");\nstopWords.add(\"amongst\");\nstopWords.add(\"an\");\nstopWords.add(\"and\");\nstopWords.add(\"another\");\nstopWords.add(\"any\");\nstopWords.add(\"anybody\");\nstopWords.add(\"anyhow\");\nstopWords.add(\"anyone\");\nstopWords.add(\"anything\");\nstopWords.add(\"anyway\");\nstopWords.add(\"anyways\");\nstopWords.add(\"anywhere\");\nstopWords.add(\"apart\");\nstopWords.add(\"appear\");\nstopWords.add(\"appreciate\");\nstopWords.add(\"appropriate\");\nstopWords.add(\"are\");\nstopWords.add(\"aren't\");\nstopWords.add(\"around\");\nstopWords.add(\"as\");\nstopWords.add(\"a's\");\nstopWords.add(\"aside\");\nstopWords.add(\"ask\");\nstopWords.add(\"asking\");\nstopWords.add(\"associated\");\nstopWords.add(\"at\");\nstopWords.add(\"available\");\nstopWords.add(\"away\");\nstopWords.add(\"awfully\");\nstopWords.add(\"back\");\nstopWords.add(\"backward\");\nstopWords.add(\"backwards\");\nstopWords.add(\"be\");\nstopWords.add(\"became\");\nstopWords.add(\"beacause\");\nstopWords.add(\"become\");\nstopWords.add(\"becomes\");\nstopWords.add(\"becoming\");\nstopWords.add(\"been\");\nstopWords.add(\"before\");\nstopWords.add(\"beforehand\");\nstopWords.add(\"begin\");\nstopWords.add(\"behind\");\nstopWords.add(\"being\");\nstopWords.add(\"believe\");\nstopWords.add(\"below\");\nstopWords.add(\"beside\");\nstopWords.add(\"besides\");\nstopWords.add(\"best\");\nstopWords.add(\"better\");\nstopWords.add(\"between\");\nstopWords.add(\"beyond\");\nstopWords.add(\"both\");\nstopWords.add(\"brief\");\nstopWords.add(\"but\");\nstopWords.add(\"by\");\nstopWords.add(\"came\");\nstopWords.add(\"can\");\nstopWords.add(\"cannot\");\nstopWords.add(\"cant\");\nstopWords.add(\"can't\");\nstopWords.add(\"caption\");\nstopWords.add(\"cause\");\nstopWords.add(\"causes\");\nstopWords.add(\"certain\");\nstopWords.add(\"cetrainly\");\nstopWords.add(\"changes\");\nstopWords.add(\"clearly\");\nstopWords.add(\"c'mon\");\nstopWords.add(\"co\");\nstopWords.add(\"co.\");\nstopWords.add(\"com\");\nstopWords.add(\"come\");\nstopWords.add(\"comes\");\nstopWords.add(\"concerning\");\nstopWords.add(\"consequently\");\nstopWords.add(\"consider\");\nstopWords.add(\"considering\");\nstopWords.add(\"could\");\nstopWords.add(\"couldn't\");\nstopWords.add(\"c's\");\nstopWords.add(\"currently\");\nstopWords.add(\"dare\");\nstopWords.add(\"daren't\");\nstopWords.add(\"definitely\");\nstopWords.add(\"described\");\nstopWords.add(\"despite\");\nstopWords.add(\"did\");\nstopWords.add(\"didn't\");\nstopWords.add(\"different\");\nstopWords.add(\"directly\");\nstopWords.add(\"do\");\nstopWords.add(\"does\");\nstopWords.add(\"doesn't\");\nstopWords.add(\"doing\");\nstopWords.add(\"done\");\nstopWords.add(\"don't\");\nstopWords.add(\"down\");\nstopWords.add(\"downwards\");\nstopWords.add(\"during\");\nstopWords.add(\"each\");\nstopWords.add(\"edu\");\nstopWords.add(\"eg\");\nstopWords.add(\"eight\");\nstopWords.add(\"eighty\");\nstopWords.add(\"either\");\nstopWords.add(\"else\");\nstopWords.add(\"elsewhere\");\nstopWords.add(\"end\");\nstopWords.add(\"ending\");\nstopWords.add(\"enough\");\nstopWords.add(\"entirely\");\nstopWords.add(\"especially\");\nstopWords.add(\"et\");\nstopWords.add(\"etc\");\nstopWords.add(\"even\");\nstopWords.add(\"evenmore\");\nstopWords.add(\"every\");\nstopWords.add(\"everybody\");\nstopWords.add(\"everyone\");\nstopWords.add(\"everything\");\nstopWords.add(\"everywhere\");\nstopWords.add(\"ex\");\nstopWords.add(\"exactly\");\nstopWords.add(\"example\");\nstopWords.add(\"except\");\nstopWords.add(\"fairly\");\nstopWords.add(\"far\");\nstopWords.add(\"farhter\");\nstopWords.add(\"few\");\nstopWords.add(\"fewer\");\nstopWords.add(\"fifth\");\nstopWords.add(\"first\");\nstopWords.add(\"five\");\nstopWords.add(\"followed\");\nstopWords.add(\"following\");\nstopWords.add(\"follows\");\nstopWords.add(\"for\");\nstopWords.add(\"forever\");\nstopWords.add(\"former\");\nstopWords.add(\"formerly\");\nstopWords.add(\"forth\");\nstopWords.add(\"forward\");\nstopWords.add(\"found\");\nstopWords.add(\"four\");\nstopWords.add(\"from\");\nstopWords.add(\"further\");\nstopWords.add(\"furthermore\");\nstopWords.add(\"get\");\nstopWords.add(\"gets\");\nstopWords.add(\"getting\");\nstopWords.add(\"given\");\nstopWords.add(\"gives\");\nstopWords.add(\"go\");\nstopWords.add(\"goes\");\nstopWords.add(\"going\");\nstopWords.add(\"gone\");\nstopWords.add(\"got\");\nstopWords.add(\"gotten\");\nstopWords.add(\"greetings\");\nstopWords.add(\"had\");\nstopWords.add(\"hadn't\");\nstopWords.add(\"half\");\nstopWords.add(\"happens\");\nstopWords.add(\"hardly\");\nstopWords.add(\"has\");\nstopWords.add(\"hasn't\");\nstopWords.add(\"have\");\nstopWords.add(\"haven't\");\nstopWords.add(\"having\");\nstopWords.add(\"he\");\nstopWords.add(\"he'd\");\nstopWords.add(\"he'll\");\nstopWords.add(\"hello\");\nstopWords.add(\"help\");\nstopWords.add(\"hence\");\nstopWords.add(\"her\");\nstopWords.add(\"here\");\nstopWords.add(\"hereafter\");\nstopWords.add(\"hereby\");\nstopWords.add(\"herein\");\nstopWords.add(\"here's\");\nstopWords.add(\"hereupon\");\nstopWords.add(\"hers\");\nstopWords.add(\"herself\");\nstopWords.add(\"he's\");\nstopWords.add(\"hi\");\nstopWords.add(\"him\");\nstopWords.add(\"himself\");\nstopWords.add(\"his\");\nstopWords.add(\"hither\");\nstopWords.add(\"hopefully\");\nstopWords.add(\"how\");\nstopWords.add(\"howbeit\");\nstopWords.add(\"however\");\nstopWords.add(\"however\");\nstopWords.add(\"hundred\");\nstopWords.add(\"i'd\");\nstopWords.add(\"ie\");\nstopWords.add(\"if\");\nstopWords.add(\"ignored\");\nstopWords.add(\"i'll\");\nstopWords.add(\"i'm\");\nstopWords.add(\"immediate\");\nstopWords.add(\"in\");\nstopWords.add(\"iansmuch\");\nstopWords.add(\"inc\");\nstopWords.add(\"inc.\");\nstopWords.add(\"indeed\");\nstopWords.add(\"indicate\");\nstopWords.add(\"indicated\");\nstopWords.add(\"indicates\");\nstopWords.add(\"inner\");\nstopWords.add(\"inside\");\nstopWords.add(\"insofar\");\nstopWords.add(\"into\");\nstopWords.add(\"inward\");\nstopWords.add(\"is\");\nstopWords.add(\"isn't\");\nstopWords.add(\"it\");\nstopWords.add(\"it'd\");\nstopWords.add(\"it'll\");\nstopWords.add(\"its\");\nstopWords.add(\"it's\");\nstopWords.add(\"itself\");\nstopWords.add(\"i've\");\nstopWords.add(\"just\");\nstopWords.add(\"k\");\nstopWords.add(\"keep\");\nstopWords.add(\"keeps\");\nstopWords.add(\"kept\");\nstopWords.add(\"know\");\nstopWords.add(\"knows\");\nstopWords.add(\"known\");\nstopWords.add(\"last\");\nstopWords.add(\"lately\");\nstopWords.add(\"later\");\nstopWords.add(\"latter\");\nstopWords.add(\"latterly\");\nstopWords.add(\"least\");\nstopWords.add(\"less\");\nstopWords.add(\"let\");\nstopWords.add(\"let's\");\nstopWords.add(\"like\");\nstopWords.add(\"liked\");\nstopWords.add(\"likely\");\nstopWords.add(\"likewise\");\nstopWords.add(\"little\");\nstopWords.add(\"look\");\nstopWords.add(\"looks\");\nstopWords.add(\"low\");\nstopWords.add(\"lower\");\nstopWords.add(\"ltd\");\nstopWords.add(\"made\");\nstopWords.add(\"mainly\");\nstopWords.add(\"make\");\nstopWords.add(\"makes\");\nstopWords.add(\"many\");\nstopWords.add(\"may\");\nstopWords.add(\"maybe\");\nstopWords.add(\"mayn't\");\nstopWords.add(\"me\");\nstopWords.add(\"mean\");\nstopWords.add(\"meanwhile\");\nstopWords.add(\"merely\");\nstopWords.add(\"might\");\nstopWords.add(\"mightn't\");\nstopWords.add(\"mine\");\nstopWords.add(\"minus\");\nstopWords.add(\"miss\");\nstopWords.add(\"more\");\nstopWords.add(\"moreover\");\nstopWords.add(\"most\");\nstopWords.add(\"mostly\");\nstopWords.add(\"mr\");\nstopWords.add(\"mrs\");\nstopWords.add(\"much\");\nstopWords.add(\"must\");\nstopWords.add(\"mustn't\");\nstopWords.add(\"my\");\nstopWords.add(\"myself\");\nstopWords.add(\"name\");\nstopWords.add(\"namely\");\nstopWords.add(\"nd\");\nstopWords.add(\"near\");\nstopWords.add(\"nearly\");\nstopWords.add(\"necessary\");\nstopWords.add(\"need\");\nstopWords.add(\"needn't\");\nstopWords.add(\"needs\");\nstopWords.add(\"neither\");\nstopWords.add(\"never\");\nstopWords.add(\"neverf\");\nstopWords.add(\"neverless\");\nstopWords.add(\"nevertheless\");\nstopWords.add(\"new\");\nstopWords.add(\"next\");\nstopWords.add(\"nine\");\nstopWords.add(\"ninety\");\nstopWords.add(\"no\");\nstopWords.add(\"nobody\");\nstopWords.add(\"non\");\nstopWords.add(\"none\");\nstopWords.add(\"nonetheless\");\nstopWords.add(\"noone\");\nstopWords.add(\"no-one\");\nstopWords.add(\"nor\");\nstopWords.add(\"normally\");\nstopWords.add(\"not\");\nstopWords.add(\"nothing\");\nstopWords.add(\"notwithstanding\");\nstopWords.add(\"novel\");\nstopWords.add(\"now\");\nstopWords.add(\"nowwhere\");\nstopWords.add(\"obviously\");\nstopWords.add(\"of\");\nstopWords.add(\"off\");\nstopWords.add(\"often\");\nstopWords.add(\"oh\");\nstopWords.add(\"ok\");\nstopWords.add(\"okay\");\nstopWords.add(\"old\");\nstopWords.add(\"on\");\nstopWords.add(\"once\");\nstopWords.add(\"one\");\nstopWords.add(\"ones\");\nstopWords.add(\"one's\");\nstopWords.add(\"only\");\nstopWords.add(\"onto\");\nstopWords.add(\"opposite\");\nstopWords.add(\"or\");\nstopWords.add(\"other\");\nstopWords.add(\"others\");\nstopWords.add(\"otherwise\");\nstopWords.add(\"ought\");\nstopWords.add(\"oughtn't\");\nstopWords.add(\"our\");\nstopWords.add(\"ourselves\");\nstopWords.add(\"out\");\nstopWords.add(\"outside\");\nstopWords.add(\"over\");\nstopWords.add(\"overall\");\nstopWords.add(\"own\");\nstopWords.add(\"particular\");\nstopWords.add(\"particularly\");\nstopWords.add(\"past\");\nstopWords.add(\"per\");\nstopWords.add(\"perhaps\");\nstopWords.add(\"placed\");\nstopWords.add(\"please\");\nstopWords.add(\"plus\");\nstopWords.add(\"possible\");\nstopWords.add(\"presumably\");\nstopWords.add(\"probably\");\nstopWords.add(\"provided\");\nstopWords.add(\"provides\");\nstopWords.add(\"que\");\nstopWords.add(\"quite\");\nstopWords.add(\"qv\");\nstopWords.add(\"rather\");\nstopWords.add(\"rd\");\nstopWords.add(\"re\");\nstopWords.add(\"really\");\nstopWords.add(\"reasonably\");\nstopWords.add(\"recent\");\nstopWords.add(\"recently\");\nstopWords.add(\"regarding\");\nstopWords.add(\"regardless\");\nstopWords.add(\"regards\");\nstopWords.add(\"relatively\");\nstopWords.add(\"respectively\");\nstopWords.add(\"right\");\nstopWords.add(\"round\");\nstopWords.add(\"said\");\nstopWords.add(\"same\");\nstopWords.add(\"saw\");\nstopWords.add(\"say\");\nstopWords.add(\"saying\");\nstopWords.add(\"says\");\nstopWords.add(\"second\");\nstopWords.add(\"secondly\");\nstopWords.add(\"see\");\nstopWords.add(\"seeing\");\nstopWords.add(\"seem\");\nstopWords.add(\"seemed\");\nstopWords.add(\"seeming\");\nstopWords.add(\"seems\");\nstopWords.add(\"seen\");\nstopWords.add(\"self\");\nstopWords.add(\"selves\");\nstopWords.add(\"sensible\");\nstopWords.add(\"sent\");\nstopWords.add(\"serious\");\nstopWords.add(\"seriously\");\nstopWords.add(\"seven\");\nstopWords.add(\"several\");\nstopWords.add(\"shall\");\nstopWords.add(\"shan't\");\nstopWords.add(\"she\");\nstopWords.add(\"she'd\");\nstopWords.add(\"she'll\");\nstopWords.add(\"she's\");\nstopWords.add(\"should\");\nstopWords.add(\"shouldn't\");\nstopWords.add(\"since\");\nstopWords.add(\"six\");\nstopWords.add(\"so\");\nstopWords.add(\"some\");\nstopWords.add(\"somebody\");\nstopWords.add(\"someday\");\nstopWords.add(\"somehow\");\nstopWords.add(\"someone\");\nstopWords.add(\"something\");\nstopWords.add(\"sometime\");\nstopWords.add(\"sometimes\");\nstopWords.add(\"somewhat\");\nstopWords.add(\"somewhere\");\nstopWords.add(\"soon\");\nstopWords.add(\"sorry\");\nstopWords.add(\"specified\");\nstopWords.add(\"specify\");\nstopWords.add(\"specifying\");\nstopWords.add(\"still\");\nstopWords.add(\"sub\");\nstopWords.add(\"such\");\nstopWords.add(\"sup\");\nstopWords.add(\"sure\");\nstopWords.add(\"take\");\nstopWords.add(\"taken\");\nstopWords.add(\"taking\");\nstopWords.add(\"tell\");\nstopWords.add(\"tends\");\nstopWords.add(\"th\");\nstopWords.add(\"than\");\nstopWords.add(\"thank\");\nstopWords.add(\"thanks\");\nstopWords.add(\"thanx\");\nstopWords.add(\"that\");\nstopWords.add(\"that'll\");\nstopWords.add(\"thats\");\nstopWords.add(\"that've\");\nstopWords.add(\"the\");\nstopWords.add(\"their\");\nstopWords.add(\"theirs\");\nstopWords.add(\"them\");\nstopWords.add(\"themselves\");\nstopWords.add(\"then\");\nstopWords.add(\"thence\");\nstopWords.add(\"there\");\nstopWords.add(\"thereafter\");\nstopWords.add(\"thereby\");\nstopWords.add(\"there'd\");\nstopWords.add(\"therefore\");\nstopWords.add(\"therein\");\nstopWords.add(\"ther'll\");\nstopWords.add(\"there're\");\nstopWords.add(\"theres\");\nstopWords.add(\"there's\");\nstopWords.add(\"thereupon\");\nstopWords.add(\"there've\");\nstopWords.add(\"these\");\nstopWords.add(\"they\");\nstopWords.add(\"they'd\");\nstopWords.add(\"they'll\");\nstopWords.add(\"they're\");\nstopWords.add(\"they've\");\nstopWords.add(\"thing\");\nstopWords.add(\"things\");\nstopWords.add(\"think\");\nstopWords.add(\"third\");\nstopWords.add(\"thirty\");\nstopWords.add(\"this\");\nstopWords.add(\"thorough\");\nstopWords.add(\"thoroughly\");\nstopWords.add(\"those\");\nstopWords.add(\"though\");\nstopWords.add(\"throughout\");\nstopWords.add(\"thru\");\nstopWords.add(\"thus\");\nstopWords.add(\"till\");\nstopWords.add(\"to\");\nstopWords.add(\"together\");\nstopWords.add(\"too\");\nstopWords.add(\"took\");\nstopWords.add(\"toward\");\nstopWords.add(\"towards\");\nstopWords.add(\"tried\");\nstopWords.add(\"tries\");\nstopWords.add(\"truly\");\nstopWords.add(\"try\");\nstopWords.add(\"trying\");\nstopWords.add(\"t's\");\nstopWords.add(\"twice\");\nstopWords.add(\"two\");\nstopWords.add(\"un\");\nstopWords.add(\"under\");\nstopWords.add(\"underneath\");\nstopWords.add(\"undoing\");\nstopWords.add(\"unfortunately\");\nstopWords.add(\"unless\");\nstopWords.add(\"unlike\");\nstopWords.add(\"unlikely\");\nstopWords.add(\"untill\");\nstopWords.add(\"unto\");\nstopWords.add(\"up\");\nstopWords.add(\"upon\");\nstopWords.add(\"upwards\");\nstopWords.add(\"us\");\nstopWords.add(\"use\");\nstopWords.add(\"used\");\nstopWords.add(\"useful\");\nstopWords.add(\"uses\");\nstopWords.add(\"using\");\nstopWords.add(\"usually\");\nstopWords.add(\"v\");\nstopWords.add(\"value\");\nstopWords.add(\"various\");\nstopWords.add(\"versus\");\nstopWords.add(\"very\");\nstopWords.add(\"via\");\nstopWords.add(\"viz\");\nstopWords.add(\"vs\");\nstopWords.add(\"want\");\nstopWords.add(\"wants\");\nstopWords.add(\"was\");\nstopWords.add(\"wasn't\");\nstopWords.add(\"way\");\nstopWords.add(\"we\");\nstopWords.add(\"we'd\");\nstopWords.add(\"welcome\");\nstopWords.add(\"well\");\nstopWords.add(\"we'll\");\nstopWords.add(\"went\");\nstopWords.add(\"were\");\nstopWords.add(\"we're\");\nstopWords.add(\"weren't\");\nstopWords.add(\"we've\");\nstopWords.add(\"what\");\nstopWords.add(\"whatever\");\nstopWords.add(\"what'll\");\nstopWords.add(\"what's\");\nstopWords.add(\"what've\");\nstopWords.add(\"when\");\nstopWords.add(\"whence\");\nstopWords.add(\"whenever\");\nstopWords.add(\"where\");\nstopWords.add(\"whereafter\");\nstopWords.add(\"whereas\");\nstopWords.add(\"whereby\");\nstopWords.add(\"wherein\");\nstopWords.add(\"where's\");\nstopWords.add(\"whereupon\");\nstopWords.add(\"whereever\");\nstopWords.add(\"whether\");\nstopWords.add(\"which\");\nstopWords.add(\"whichever\");\nstopWords.add(\"while\");\nstopWords.add(\"whilst\");\nstopWords.add(\"whither\");\nstopWords.add(\"who\");\nstopWords.add(\"who'd\");\nstopWords.add(\"whoever\");\nstopWords.add(\"whole\");\nstopWords.add(\"who'll\");\nstopWords.add(\"whom\");\nstopWords.add(\"whomever\");\nstopWords.add(\"who's\");\nstopWords.add(\"whose\");\nstopWords.add(\"why\");\nstopWords.add(\"will\");\nstopWords.add(\"willing\");\nstopWords.add(\"wish\");\nstopWords.add(\"with\");\nstopWords.add(\"within\");\nstopWords.add(\"without\");\nstopWords.add(\"wonder\");\nstopWords.add(\"won't\");\nstopWords.add(\"would\");\nstopWords.add(\"wouldn't\");\nstopWords.add(\"yes\");\nstopWords.add(\"yet\");\nstopWords.add(\"you\");\nstopWords.add(\"you'd\");\nstopWords.add(\"you'll\");\nstopWords.add(\"your\");\nstopWords.add(\"you're\");\nstopWords.add(\"yours\");\nstopWords.add(\"yourself\");\nstopWords.add(\"you've\");\nstopWords.add(\"zero\");\n\n \n \n }", "@SuppressWarnings(\"resource\")\n public static void doubleCapacity(String[] array){\n int wordCount = 0;\n int arrayGrowth = 500;\n array = new String[10];\n String strLine = null;\n while (strLine != null) {\n // Store the content into an array\n Scanner s = new Scanner(strLine);\n while (s.hasNext()) {\n if (array.length == wordCount) {\n // expand list\n array = Arrays.copyOf(array, array.length + arrayGrowth);\n }\n array[wordCount] = s.next();\n wordCount++;\n } \n }\n }", "private int skipTrialingWhite( List content, int start) {\r\n int size = content.size();\r\n if (start > size) {\r\n start = size;\r\n }\r\n\r\n int index = start;\r\n if (currentFormat.trimAllWhite\r\n || currentFormat.textNormalize\r\n || currentFormat.textTrim) {\r\n while( index >= 0) {\r\n if ( !isAllWhitespace( content.get(index - 1)))\r\n break;\r\n --index;\r\n }\r\n }\r\n return index;\r\n }", "public abstract void mo9247b(String str, long j, List<String> list);", "private void fillSet() {\r\n\t\tString regex = \"\\\\p{L}+\";\r\n\t\tMatcher matcher = Pattern.compile(regex).matcher(body);\r\n\t\twhile (matcher.find()) {\r\n\t\t\tif (!matcher.group().isEmpty()) {\r\n\t\t\t\twords.add(matcher.group());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private ArrayList<Integer> getEmptySpaces(char[] board) {\n ArrayList<Integer> emptySpaces = new ArrayList<>();\n for (int i = 0; i < board.length; i++) {\n if (board[i] == ' ') {\n emptySpaces.add(i);\n }\n }\n return emptySpaces;\n }", "void mo13370a(int i, int i2, List<C15929a> list) throws IOException;", "private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }", "private static Stream<List<Tile>> substituteBlanks(List<Tile> p) {\n Stream<List<Tile>> res = Stream.of(p);\n //Iterate through all letters.\n for (int i = 0; i < p.size(); i++) {\n //Check for blanks.\n if (p.get(i).getLetter() == Character.MIN_VALUE) {\n //If blank found, substitute it for all a-z, and look again for next blank.\n res = substituteBlankAtIndex(p, i)\n .flatMap(s -> substituteBlanks(s));\n }\n }\n\n return res;\n }", "public static void main(String[] args) {\n String[] strings = new String[100];\n for (int i = 0; i < strings.length; i++) {\n strings[i] = randomStrings(2);\n }\n// for (String s : strings) {\n// System.out.println(s);\n// }\n ArrayList<String> appeared = new ArrayList<>();\n for (String s : strings) {\n if (!appeared.contains(s)) {\n appeared.add(s);\n }\n }\n System.out.println(appeared.size());\n\n }", "private IgnoreListHelper() {\n\t}", "@Test\n\t public void test5 ()\n\t{\n\t\t\tString s = new String(\"aaabaaaaabaabaaaabaaaaaaaaaaaaaabaaaaaaaaaaaaaaabaaaaaaaaaaaaaaba\");\n\t s = s.replaceAll(\"\\\\s+\", \" \");\n\t assertEquals(\"aaaaaaaaaaaaaabaaaaaaaaaaaaaa\", LRS.lrs(s)); \n\t}", "public static List<String> findRepeatedDnaSequences(String s) {\n \tList<String> re=new ArrayList<String>();\n \tif(s.length()<=10){\n \t\treturn re;\n \t}\n \tMap<String, Integer> map=new HashMap<String, Integer>(); \t\n \tfor(int i=10; i<=s.length(); i++){\n \t\tString k=s.substring(i-10, i);\n \t\tif(map.containsKey(k)){\n \t\t\tint val=map.get(k);\n \t\t\tif(val==1){\n \t\t\t\tre.add(k);\n \t\t\t}\n \t\t\tmap.put(k, val+1);\n \t\t}else{\n \t\t\tmap.put(k, 1);\n \t\t}\n \t}\n \treturn re;\n }", "public static void main(){\r\n\t\t\r\n\t\tArrayList<tok> pHolder = new ArrayList<tok>();\r\n\r\n\t\t pHolder.add(new tok(\"@\", \"@\"));\r\n\t\t\r\n\t\treturn;\r\n\t}", "public void mo9497b(List<String> list) {\n this.f1514c = list;\n }", "private void listEntries(BufferedWriter bw, String previous, int start, int end, String zeroes) throws IOException {\n\t\tint writeStart = -1;\n\t\tStringBuilder sb = new StringBuilder();\n\t\tchar c;\n\t\tfor (int i = 0, l = previous.length(); i < l && writeStart == -1; i++) {\n\t\t\tc = previous.charAt(i);\n\t\t\tif (Character.isDigit(c)) {sb.append(c);}\n\t\t\telse {writeStart = Integer.parseInt(sb.toString());}\n\t\t}\n\t\tfor (int i = start; i < end; i++) {bw.write(++writeStart + \"=\" + zeroes + i + \"\\n\");}\n\t}", "public void m20623OooO00o() {\n for (C8964ooOOo000 ooooo000 : this.f22213OooO00o) {\n OooO00o(ooooo000);\n }\n this.f22212OooO00o.clear();\n this.f22213OooO00o.clear();\n }", "public String addWhiteSpace(String str, int number) {\n\t\tStringBuilder result = new StringBuilder();\n\t\tfor (int i = 0; i < str.length(); i+=2) {\n\t\t if (i > 0) {\n\t\t\t for (int j = 0; j < number; j++)\n\t\t\t\t result.append(\" \");\n\t\t }\n\t\t result.append(str.charAt(i));\n\t\t result.append(str.charAt(i+1));\n\t\t}\n\t\treturn result.toString();\n\t}", "public static List<String> findStrobogrammatic(int n) {\n List<String> cur, ans;\n ans = new ArrayList<String>((n & 1) == 0 ? Arrays.asList(\"\") : Arrays.asList(\"0\", \"1\", \"8\"));\n if (n < 2) return ans;\n\n for (;n > 1; n -= 2) {\n cur = ans;\n ans = new ArrayList<String>();\n for (String i : cur) {\n if (n > 3) {\n ans.add('0' + i + '0');\n }\n ans.add('1' + i + '1');\n ans.add('8' + i + '8');\n ans.add('6' + i + '9');\n ans.add('9' + i + '6');\n }\n }\n System.out.println(ans.size());\n return ans;\n }", "private static List<String> induceSynonims(String word) {\n\t\treturn null;\n\t}", "private List<WordScore> liveList(List<WordScore> gridList, String s) {\n s = s.toLowerCase();\n List<WordScore> liveList = new ArrayList<>();\n for(WordScore ws : gridList){\n int nochars = s.length() - s.replaceAll(ws.getWord(), \"\").length();\n liveList.add(new WordScore(ws.getWord(), ws.getScore()-nochars));\n }\n return liveList;\n }", "private void fillRandomList()\n\t{\n\t\trandomList.add(\"I like cheese.\");\n\t\trandomList.add(\"Tortoise can move faster than slow rodent.\");\n\t\trandomList.add(\"I enjoy sitting on the ground.\");\n\t\trandomList.add(\"I like cereal.\");\n\t\trandomList.add(\"This is random.\");\n\t\trandomList.add(\"I like typing\");\n\t\trandomList.add(\"FLdlsjejf is my favorite word.\");\n\t\trandomList.add(\"I have two left toes.\");\n\t\trandomList.add(\"Sqrt(2) = 1.414213562 ...\");\n\t\trandomList.add(\"Hi mom.\");\n\t}", "public static void main(String[] args) {\n\t\tString s=\"22\";\n\t\t\n\t\tif(s.indexOf(\"1\")>=0||s.equals(\"\"))\n\t\t\tSystem.out.println(\"hello\");\n\t\t\t\n\t\tArrayList f=new ArrayList();\n\t\tint stack[]=new int[2*s.length()];\n\t\tint top=-1;\n\t\tchar a[][]=new char[][]{{},{},{'#','a','b','c','#'},{'#','d','e','f','#'},{'#','g','h','i','#'},{'#','j','k','l','#'},{'#','m','n','o','#'},{'#','p','q','r','s','#'},{'#','t','u','v','#'},{'#','w','x','y','z','#'}};\n\t\tint length[]=new int []{0,0,3,3,3,3,3,4,3,4};\n\t\tStringBuilder ans=new StringBuilder();\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tint x=stack[++top]=(int)s.charAt(i)-'0';\n\t\t\tans.append(a[x][1]);\n\t\t\tstack[++top]=1;\n\t\t}\n\t\twhile(stack[1]!=length[(int)s.charAt(0)-'0']+1){\n\t\t\tif(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\tif(s.length()==(top+1)/2){\n\t\t\t\t\twhile(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\t\t\tint r=(top-1)/2;\n\t\t\t\t\t\tchar r1=a[stack[top-1]][stack[top]];\n\t\t\t\t\t\tans.setCharAt(r, r1);\n\t\t\t\t\t\tString ans1=ans.toString();\n\t\t\t\t\t\tf.add(ans1);\n\t\t\t\t\t\tstack[top]++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t\t\ttop+=2;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[top]=1;\n\t\t\t\ttop-=2;\n\t\t\t\tstack[top]++;\n\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(f.size());\n\t}", "private void modify(List listString){\n\t}", "private String repeatM(int count){\n return new String(new char[count]).replace('\\0','M');\n }", "private static void\n eatWhite(ParseState state)\n {\n while(state.pos < state.data.length() && state.data.charAt(state.pos) == ' ')\n {\n ++state.pos;\n }\n }" ]
[ "0.55591595", "0.5524409", "0.54578066", "0.5425202", "0.53757787", "0.5364262", "0.5288061", "0.5286694", "0.52332956", "0.5221815", "0.5211653", "0.5201803", "0.51848924", "0.518454", "0.5178811", "0.51761377", "0.5150973", "0.5141157", "0.5138997", "0.51366293", "0.5130912", "0.51279604", "0.50682074", "0.50673336", "0.5058374", "0.50503725", "0.5046189", "0.5046023", "0.50277734", "0.50120145", "0.49743384", "0.4959684", "0.49513972", "0.49383563", "0.492581", "0.49236417", "0.49056625", "0.48794308", "0.48752907", "0.48583564", "0.4856731", "0.48500034", "0.48222542", "0.48127964", "0.4812774", "0.48096502", "0.48054305", "0.48029843", "0.48021927", "0.4784932", "0.47791797", "0.47657204", "0.47405565", "0.47405225", "0.47390026", "0.47360018", "0.47321254", "0.47301587", "0.47235176", "0.47201622", "0.4720113", "0.4717014", "0.47158983", "0.4708474", "0.4698091", "0.46781585", "0.46772122", "0.46698767", "0.46634603", "0.46624836", "0.46601665", "0.4651289", "0.46146277", "0.4606947", "0.4606018", "0.4604179", "0.45975944", "0.45943204", "0.45926452", "0.45925856", "0.45852026", "0.4583654", "0.45777828", "0.45770383", "0.45763302", "0.4573015", "0.45670146", "0.45669803", "0.4564498", "0.45611578", "0.45599565", "0.45561954", "0.45553017", "0.45483592", "0.45479", "0.45477003", "0.4545243", "0.45429727", "0.45390365", "0.4536908" ]
0.5071481
22
use_web_v2 bool user_web_v2 = 12;
@java.lang.Override public boolean getUserWebV2() { return userWebV2_; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@java.lang.Override\n public boolean getUserWebV2() {\n return userWebV2_;\n }", "public Builder setUserWebV2(boolean value) {\n \n userWebV2_ = value;\n onChanged();\n return this;\n }", "public boolean isWebSignupSupported()\n {\n return false;\n }", "public void setWeb(String web) {\n\t\tthis.web = web;\n\t}", "private boolean m11885j() {\n IUser a = ((C3592a) C3596c.m13172a(C3592a.class)).user().mo22165a();\n if (!C9290a.f25466a && a != null && a.isEnableShowCommerceSale()) {\n if (this.f9687p == LiveMode.VIDEO) {\n return true;\n }\n LiveMode liveMode = this.f9687p;\n LiveMode liveMode2 = LiveMode.THIRD_PARTY;\n }\n return false;\n }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Enable Web Secure Remote Access\")\n\n public Boolean getSecureAccessWeb() {\n return secureAccessWeb;\n }", "public boolean mo37b(Context context) {\n try {\n PackageInfo packageInfo = context.getPackageManager().getPackageInfo(\"com.heytap.openid\", 0);\n if (Build.VERSION.SDK_INT >= 28) {\n if (packageInfo == null || packageInfo.getLongVersionCode() < 1) {\n return false;\n }\n return true;\n } else if (packageInfo == null || packageInfo.versionCode < 1) {\n return false;\n } else {\n return true;\n }\n } catch (PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n return false;\n }\n }", "@Override\n public void setWeb(String web) {\n this.web = web;\n }", "public boolean isSupportWebP() {\n return ImageInitBusinss.getInstance() != null && ImageInitBusinss.getInstance().getStrategySupport().isSupportWebP();\n }", "public void setWebIso(boolean flag) {\n this.webIsoFlag = flag;\n }", "boolean isVersion3Allowed();", "public interface MainConst extends NetUrl_Const {\n\t/**\n\t * 当为true时为商业模式,此时异常不抛出,日志不打印。关闭所有开发痕迹。\n\t */\n\tpublic final static boolean DEVS_BUSINESS_MODEL = false;\n\n\t/**\n\t * true时打印日志。<br/>\n\t * false不打印日志。\n\t */\n\tpublic final static boolean DEVS_PRINT_LOG = true;\n\t/**\n\t * true时抛出异常\n\t */\n\tpublic final static boolean DEVS_THROW_ALL_EXCEPTION = true;\n\n\t/**\n\t * app_token\n\t */\n\tpublic final static String APP_APP_TOKEN = \"readyGo1408.app_token@bj-china\";\n\t/**\n\t * MD5加密盐\n\t */\n\tpublic final static String APP_MD5_TOKEN = \"readyGo1408.md5@bj-china\";\n\t/**\n\t * 硬件平台,安卓平台\n\t */\n\tpublic final static String APP_PLATFORM = \"2\";\n}", "public boolean getDevelopment();", "public static boolean setTDAGlasswarePageId( String userId){\n\t\treturn false;\n\t}", "public boolean isWebShowing();", "@Override\n public String getWeb() {\n return web;\n }", "public String getWeb() {\n\t\treturn web;\n\t}", "boolean hasThirdPartyAppAnalytics();", "boolean mo1836b();", "@Updatable\n public Boolean getEnableHttp2() {\n if (enableHttp2 == null) {\n enableHttp2 = false;\n }\n\n return enableHttp2;\n }", "public Builder clearUserWebV2() {\n \n userWebV2_ = false;\n onChanged();\n return this;\n }", "public void webSignup()\n {\n throw new UnsupportedOperationException(\n \"The web sign up is not supproted by the dictionary wizard.\");\n }", "boolean authQop() {\n/* 114 */ return this.serverQop;\n/* */ }", "public void setIsProVersion(Boolean IsProVersion) {\n this.IsProVersion = IsProVersion;\n }", "public static boolean isUsingHttp() {\n\t\treturn ((activeAccount == null) ? ((adHocAccount == null) ? false : adHocAccount.useHttp) : activeAccount.useHttp);\n\t}", "public interface WebConstants {\n\n String REQUEST_ATTR_ORIGIN_IP = \"ORIGIN_IP\";\n\n String USER_LOGIN_STATUS = \"USER_LOGIN_STATUS\";\n}", "@java.lang.Override\n public boolean hasUserAgentBuildVersion() {\n return userAgentVersionTypeCase_ == 8;\n }", "boolean hasUserAppId();", "boolean hasUserAppId();", "public interface HuobiConsts {\n String API_HOST_PRO = \"api.huobi.pro\";\n String API_HOST_HADAX = \"api.hadax.com\";\n\n String USER_AGENT = \"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36\";\n\n String ENDPOINT_SECURITY_TYPE_APIKEY = \"AccessKeyId\";\n String ENDPOINT_SECURITY_TYPE_APIKEY_HEADER = ENDPOINT_SECURITY_TYPE_APIKEY + \":#\";\n\n String ENDPOINT_SECURITY_TYPE_SIGNED = \"Signature\";\n String ENDPOINT_SECURITY_TYPE_SIGNED_HEADER = ENDPOINT_SECURITY_TYPE_SIGNED + \":#\";\n\n String SIGNATURE_METHOD = \"HmacSHA256\";\n String SIGNATURE_VERSION = \"2\";\n\n DateTimeFormatter DT_FORMAT = DateTimeFormatter.ofPattern(\"uuuu-MM-dd'T'HH:mm:ss\");\n ZoneId ZONE_GMT = ZoneId.of(\"Z\");\n\n\n interface WsCode {\n int manualClose = 4999;\n int autoReconnect = 4998;\n int pingExpired = 1003;\n }\n\n\n}", "public Boolean getIsProVersion() {\n return this.IsProVersion;\n }", "public static boolean vu0IsRunning() { return false; }", "@java.lang.Override\n public boolean hasUserAgentBuildVersion() {\n return userAgentVersionTypeCase_ == 8;\n }", "public interface WebConstants {\n String SESSION_USER = \"user\";\n}", "@Property(name = \"staging:ssl\")\n public abstract boolean isSsl();", "public void v_Verify_Guest2_Hidden(){\n\t}", "public final void setIsVoipAudioMode(java.lang.String r1, boolean r2) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.telecom.ConnectionServiceAdapterServant.2.setIsVoipAudioMode(java.lang.String, boolean):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telecom.ConnectionServiceAdapterServant.2.setIsVoipAudioMode(java.lang.String, boolean):void\");\n }", "public void setTwentyOne() {\r\n gotTwentyOne = true;\r\n\t}", "public PrivacySettingsWeb() {\n\t}", "public final void mo18789b() {\n throw new RuntimeException(\"Embedded Security Key option is not available for U2F request!\");\n }", "public String mo33121a() {\n return \"secure\";\n }", "public boolean _paymentpage_overrideurl(String _url) throws Exception{\n__c.LogImpl(\"21114113\",_url,0);\n //BA.debugLineNum = 172;BA.debugLine=\"If Url.Contains(\\\"api.com\\\") Then\";\nif (_url.contains(\"api.com\")) { \n };\n //BA.debugLineNum = 175;BA.debugLine=\"Return True\";\nif (true) return __c.True;\n //BA.debugLineNum = 176;BA.debugLine=\"End Sub\";\nreturn false;\n}", "public final boolean mo50006a(C18846s sVar) {\n String scheme = sVar.f50794d.getScheme();\n if (WebKitApi.SCHEME_HTTP.equals(scheme) || WebKitApi.SCHEME_HTTPS.equals(scheme)) {\n return true;\n }\n return false;\n }", "@Override\n\tpublic boolean needSecurityCheck() {\n\t\treturn false;\n\t}", "public String getAPISetting(){\n if(!apiSetting.equals(\"true\")){\n apiSetting = \"false\";\n }\n return apiSetting;\n }", "public boolean requiresOnline()\n {\n return onlineRequired;\n }", "boolean hasThirdPartyAppAnalyticsLink();", "private boolean getStandalone( HttpServletRequest request )\r\n {\r\n String strStandalone = request.getParameter( PARAMETER_STANDALONE );\r\n if ( strStandalone != null && ( strStandalone.equalsIgnoreCase( \"true\" ) || strStandalone.equalsIgnoreCase( \"on\" ) ) )\r\n {\r\n return true;\r\n }\r\n strStandalone = AppPropertiesService.getProperty( PROPERTY_STANDALONE );\r\n if ( strStandalone != null && ( strStandalone.equalsIgnoreCase( \"true\" ) || strStandalone.equalsIgnoreCase( \"on\" ) ) )\r\n {\r\n return true;\r\n }\r\n return false;\r\n }", "public interface WebRequestConstants extends ServerConstant {\n\n String CONSTANT_APP_UPDATE = \"APP_UPDATE\";\n\n String HEADER_KEY_DEVICE_TYPE = \"devicetype\";\n String HEADER_KEY_DEVICE_INFO = \"deviceinfo\";\n String HEADER_KEY_APP_INFO = \"appinfo\";\n String HEADER_KEY_IN_PLAY = \"inplay\";\n String DEVICE_TYPE_ANDROID = \"A\";\n\n String Loginauthcontroller = BASE + \"Loginauthcontroller/\";\n String Apicontroller = BASE + \"Apicontroller/\";\n String Apiusercontroller = BASE + \"Apiusercontroller/\";\n String Apiadmincontroller = BASE + \"Apiadmincontroller/\";\n String Apimobilecontroller = BASE + \"Apimobilecontroller/\";\n String Betentrycntr = BASE + \"Betentrycntr/\";\n String Geteventcntr = BASE + \"Geteventcntr/\";\n String Createdealercontroller = BASE + \"Createdealercontroller/\";\n String Chipscntrl = BASE + \"Chipscntrl/\";\n\n\n String URL_CHECK_APP_VERSION = Apimobilecontroller + \"chkAppVersion\";\n String URL_APK_DOWNLOAD = BASE + \"uploads/apk/%s\";\n\n String URL_LOAD_CAPTCHA = Loginauthcontroller + \"loadCaptcha\";\n int ID_LOAD_CAPTCHA = 1;\n\n String URL_LOGIN = Loginauthcontroller + \"chkLoginMobileUser\";\n int ID_LOGIN = 2;\n\n String URL_LOGIN_CHECK = Loginauthcontroller + \"is_logged_in_check\";\n int ID_LOGIN_CHECK = 3;\n\n String URL_USER_MATCH_LIST = Apiusercontroller + \"getUserFavouriteMatchLst/%s\";\n int ID_USER_MATCH_LIST = 4;\n\n String URL_ODDS_BY_MARKET_IDS = \"http://demo.com/get_odds_by_market_ids.php?market_id=%s\"; // change here http://demo.com/ in your url\n int ID_ODDS_BY_MARKET_IDS = 5;\n\n\n String URL_MARKET_LISTING = Apicontroller + \"getMarketListing/%s\";//matchid\n int ID_MARKET_LISTING = 6;\n\n String URL_CHANGE_PASSWORD = Createdealercontroller + \"changePassword\";\n int ID_CHANGE_PASSWORD = 7;\n\n String URL_MARKET_WIN_LOSS = Apicontroller + \"market_win_loss\";\n int ID_MARKET_WIN_LOSS = 8;\n\n String URL_GET_MATCH_BETFAIR_SESSION = \"http://demo.com/get_match_betfair_session.php?market_id=%s\"; // change here http://demo.com/ in your url\n int ID_MATCH_BETFAIR_SESSION = 9;\n\n String URL_GET_MATCH_INDIAN_SESSION = Apicontroller + \"matchLstIndianSession/%s/%s\"; //matchId marketId\n int ID_MATCH_INDIAN_SESSION = 10;\n\n String URL_GET_MATCH_ADMIN_SESSION = Apicontroller + \"matchLstAdminSession/%s/%s\"; //matchId marketId\n int ID_MATCH_ADMIN_SESSION = 11;\n\n String URL_DISPLAY_MSG_HEADER = Betentrycntr + \"DisplayMsgOnHeader\";\n int ID_DISPLAY_MSG_HEADER = 12;\n\n String URL_BALANCE = Chipscntrl + \"getChipDataById/%s\";// userId\n int ID_BALANCE = 13;\n\n String URL_GET_MATCH_SCORE = \"http://demo.com/api/match-center/stats/%s/%s\";// sport_id, match_id // change here http://demo.com/ in your url\n String URL_GET_MATCH_SCORE2 = Geteventcntr + \"GetScoreApi/%s\";// match_id\n int ID_GET_MATCH_SCORE = 14;\n\n String URL_GET_BET_DATA = Betentrycntr + \"GatBetData/%s/%s/%s/%s\";// :match_id\n int ID_GET_BET_DATA = 15;\n\n String URL_PLAY_STORE_APP_VERSION = BASE + \"get_playstore_app_version/%s\";\n\n String URL_ONE_PAGE_REPORT = Apiadmincontroller + \"one_page_report\";\n int ID_ONE_PAGE_REPORT = 16;\n\n String URL_CHIP_LEGER = Betentrycntr + \"Chip_leger/%s/%s/%s/%s/%s\";//user_id, user_type, type, from_date, to_date\n int ID_CHIP_LEGER = 17;\n\n String URL_PROFIT_LOSS_BY_MATCH = Betentrycntr + \"profitLossByMatchId\";\n String KEY_PROFIT_LOSS_BY_MATCH = \"profitLossByMatchId\";\n int ID_PROFIT_LOSS_BY_MATCH = 18;\n\n String URL_BET_HISTORY_PL = Betentrycntr + \"BetHistoryPL/%s/%s/%s/%s\";//user_id/matchId/page_no/fancyId\n int ID_URL_BET_HISTORY_PL = 19;\n\n String URL_GET_SERIES_LIST = Geteventcntr + \"getSeriesLst/%s\";// match type\n int ID_GET_SERIES_LIST = 20;\n\n String URL_MATCH_BY_SPORT_ID = Geteventcntr + \"getInPlayMatchBySportId/%s/%s\";// sport_id/user_id\n int ID_MATCH_BY_SPORT_ID = 21;\n\n String URL_GET_STAKE_SETTING = Apiusercontroller + \"get_stake_setting\";\n int ID_GET_STAKE_SETTING = 22;\n\n String URL_ONE_CLICK_STAKE_SETTING = Apiusercontroller + \"one_click_stake_setting\";\n String KEY_ONE_CLICK_STAKE_SETTING = \"one_click_stake_setting\";\n int ID_ONE_CLICK_STAKE_SETTING = 23;\n\n String URL_STAKE_SETTING = Apiusercontroller + \"stake_setting\";\n String KEY_STAKE_SETTING = \"stake_setting\";\n int ID_STAKE_SETTING = 24;\n\n String URL_SERIES_WITH_MATCH_DATA = Geteventcntr + \"getSeriesWithMatchData/%s/%s/%s\";// sport_id/seriesId/user_id\n int ID_SERIES_WITH_MATCH_DATA = 25;\n String KEY_SERIES_WITH_MATCH_DATA = \"getSeriesWithMatchData\";\n\n String URL_SAVE_MULTIPLE_BETS = Apiusercontroller + \"save_multiple_bets\";\n int ID_SAVE_MULTIPLE_BETS = 26;\n\n String URL_MATCH_AUTOCOMPLETE = Apiusercontroller + \"match_autocomplete\";\n int ID_MATCH_AUTOCOMPLETE = 27;\n\n String URL_FAVOURITE_MATCH = Apiusercontroller + \"getFavouriteMatchLst/%s\";\n int ID_FAVOURITE_MATCH = 28;\n\n String URL_FAVOURITE = Apiusercontroller + \"favourite\";\n String KEY_MATCHDETAIL = \"match_detail\";\n String KEY_FAVOURITE = \"favourite\";\n int ID_FAVOURITE = 29;\n\n String URL_UNFAVOURITE = Apiusercontroller + \"unfavourite\";\n String KEY_UNFAVOURITE = \"unfavourite\";\n int ID_UNFAVOURITE = 30;\n\n String URL_CONFIRM_BET = Apiusercontroller + \"confirm_bet\";\n int ID_CONFIRM_BET = 31;\n\n String URL_DELETE_BETTING = Betentrycntr + \"deleteGetbetting/%s/%s\";//MstCode, UserId\n String KEY_DELETE = \"delete\";\n int ID_DELETE_BETTING = 32;\n\n String URL_GET_SELECTION_NAME = \"http://demo.com/get_selectionname_by_market_ids.php?market_sel_id=%s\";//marketid-selectionid,marketid-selectionid // change here http://demo.com/ in your url\n int ID_GET_SELECTION_NAME = 33;\n\n\n String TV1 = BASE+\"tvnew/tv1.html\";;\n String TV2 = BASE+\"tvnew/tv2.html\";\n\n}", "private void m1182e(boolean z) {\n this.f1445d.mo55878c();\n m1183f();\n CollectorsInfrastructure.getInstance().setSDKAnalyticsVersion(C3682q4.C3683a.valueOf(z ? \"V2\" : \"V1\"));\n CollectorsInfrastructure.getInstance().setSDKFramework(this.f1451j);\n }", "private static void oneUserExample()\t{\n\t}", "public interface IPSBrandCodeConstants\n{\n public static final int REPOSITORY = 1;\n public static final int SERVER = 2;\n public static final int PUBLISHER = 4;\n public static final int DEVELOPMENT_TOOLS = 8;\n public static final int DATABASE_PUBLISHER = 16;\n public static final int BEA_ACCELERATOR = 32;\n public static final int MULTI_SERVER_MANANGER = 64;\n public static final int CONTENT_CONNECTOR = 128;\n public static final int WORD = 256;\n public static final int INLINE_EDITING = 512;\n public static final int SPRINTA = 1024;\n public static final int APPLICATION_SERVER = 2048;\n public static final int WEB_SERVICES_LISTENER = 4096;\n public static final int DOCUMENT_ASSEMBLER = 8192;\n public static final int WEBSPHERE_ACCELERATOR = 16384;\n public static final int CONVERA_SEARCH = 32768;\n public static final int EKTRON_WEP_XML = 65536;\n public static final int EKTRON_WEBIMAGEFX = 131072;\n\n \n /**\n * Represents types of servers for which codes can be generated.\n */\n public enum ServerTypes\n {\n /**\n * Development server\n */\n DEVELOPMENT(0, \"Development\"),\n \n /**\n * Production server\n */\n PRODUCTION(1, \"Production\"),\n \n /**\n * Test server\n */\n TEST(2, \"Test\"),\n \n /**\n * Failover server\n */\n FAIL0VER(3, \"Fail Over\"),\n \n /**\n * Disaster Recovery server\n */\n DISATER_RECOVERY(4, \"Disaster Recovery\"),\n \n /**\n * Publishing Hub\n */\n PUBLISHING_HUB(5, \"Publishing Hub\");\n \n /**\n * Constructor\n * \n * @param value The integer representation of this type. \n * \n * @param displayName The display name, assumed not <code>null</code> or \n * empty.\n */\n private ServerTypes(int value, String displayName)\n {\n mi_value = value;\n mi_name = displayName;\n }\n \n /**\n * Get the integer value of this server type\n * \n * @return The value\n */\n public int getValue()\n {\n return mi_value;\n }\n \n /**\n * Returns the display name of this type\n * \n * @return The name, never <code>null</code> or empty.\n */\n @Override\n public String toString()\n {\n return mi_name;\n }\n \n /**\n * Determine if this type is an extended server type. These are types\n * that are not available for codes that don't support extended product\n * info.\n * \n * @return <code>true</code> if it is extended, <code>false</code>\n * otherwise.\n */\n public boolean isExtendedServerType()\n {\n return mi_value > PRODUCTION.mi_value;\n }\n \n /**\n * Lookup enum value by ordinal. Ordinals should be unique. If they are\n * not unique, then the first enum value with a matching ordinal is\n * returned.\n * \n * @param s The enum value\n * \n * @return an enumerated value, never <code>null</code>.\n * \n * @throws IllegalArgumentException if the value does not match\n */\n public static ServerTypes valueOf(int s) throws IllegalArgumentException\n {\n ServerTypes types[] = values();\n for (int i = 0; i < types.length; i++)\n {\n if (types[i].getValue() == s)\n return types[i];\n }\n throw new IllegalArgumentException(\"No match for value: \" + s);\n } \n \n /**\n * Gets list of server types sorted on display name ascending \n * case-insensitive.\n * \n * @return The list, never <code>null</code> or empty.\n */\n public static List<ServerTypes> getSortedValues()\n {\n List<ServerTypes> sortedTypes = new ArrayList<ServerTypes>();\n for (ServerTypes serverTypes : values())\n sortedTypes.add(serverTypes);\n \n Collections.sort(sortedTypes, new Comparator<ServerTypes>() {\n\n public int compare(ServerTypes t1, ServerTypes t2)\n {\n return t1.mi_name.toLowerCase().compareTo(\n t2.mi_name.toLowerCase());\n }});\n \n return sortedTypes;\n }\n \n\n /**\n * The value supplied during construction, immutable.\n */\n private int mi_value;\n \n /**\n * The display name supplied during construction, immutable.\n */\n private String mi_name;\n }\n \n \n /**\n * Represents types of evals for which codes can be generated.\n */\n public enum EvalTypes\n {\n /**\n * Development server\n */\n NOT_EVAL(0, \"Non-Eval\"),\n \n /**\n * Production server\n */\n M30_DAY(1, \"30 Day Eval\"),\n \n /**\n * Test server\n */\n M60_DAY(2, \"60 Day Eval\"),\n \n /**\n * Failover server\n */\n M90_DAY(3, \"90 Day Eval\"),\n \n /**\n * Disaster Recovery server\n */\n TERM(4, \"Term License\");\n\n \n /**\n * Constructor\n * \n * @param value The integer representation of this type. \n * \n * @param displayName The display name, assumed not <code>null</code> or \n * empty.\n */\n private EvalTypes(int value, String displayName)\n {\n mi_value = value;\n mi_name = displayName;\n }\n \n /**\n * Get the integer value of this eval type\n * \n * @return The value\n */\n public int getValue()\n {\n return mi_value;\n }\n \n /**\n * Returns the display name of this type\n * \n * @return The name, never <code>null</code> or empty.\n */\n @Override\n public String toString()\n {\n return mi_name;\n }\n \n /**\n * Determine if this type is an extended server type. These are types\n * that are not available for codes that don't support extended product\n * info.\n * \n * @return <code>true</code> if it is extended, <code>false</code>\n * otherwise.\n */\n public boolean isExtendedEvalType()\n {\n return mi_value > M90_DAY.mi_value;\n }\n \n /**\n * Lookup enum value by ordinal. Ordinals should be unique. If they are\n * not unique, then the first enum value with a matching ordinal is\n * returned.\n * \n * @param s The enum value\n * \n * @return an enumerated value, never <code>null</code>.\n * \n * @throws IllegalArgumentException if the value does not match\n */\n public static EvalTypes valueOf(int s) throws IllegalArgumentException\n {\n EvalTypes types[] = values();\n for (int i = 0; i < types.length; i++)\n {\n if (types[i].getValue() == s)\n return types[i];\n }\n throw new IllegalArgumentException(\"No match for value: \" + s);\n } \n \n /**\n * The value supplied during construction, immutable.\n */\n private int mi_value;\n \n /**\n * The display name supplied during construction, immutable.\n */\n private String mi_name;\n } \n}", "private static Boolean pmaIsLite(String... varargs) {\n\t\t// setting the default value when argument's value is omitted\n\t\tString pmaCoreURL = varargs.length > 0 ? varargs[0] : pmaCoreLiteURL;\n\t\tString url = PMA.join(pmaCoreURL, \"api/json/IsLite\");\n\t\ttry {\n\t\t\tString jsonString = PMA.httpGet(url, \"application/json\");\n\t\t\treturn jsonString.equals(\"true\");\n\t\t} catch (Exception e) {\n\t\t\t// this happens when NO instance of PMA.core is detected\n\t\t\te.printStackTrace();\n\t\t\tif (PMA.logger != null) {\n\t\t\t\tStringWriter sw = new StringWriter();\n\t\t\t\te.printStackTrace(new PrintWriter(sw));\n\t\t\t\tPMA.logger.severe(sw.toString());\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t}", "protected boolean getStravaCheckToken()\n {\n return true;\n }", "public boolean isWebIso() {\n return webIsoFlag;\n }", "protected int getLaunchType() {\n return ILaunchConstants.LAUNCH_TYPE_WEB_CLIENT;\n }", "private static boolean m151985b(C32724ad adVar, Proxy.Type type) {\n return !adVar.mo132325g() && type == Proxy.Type.HTTP;\n }", "public abstract boolean isLiveMode();", "public String getServerVersion();", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Secure browser via Akeyless Web Access Bastion\")\n\n public Boolean getSecureAccessWebBrowsing() {\n return secureAccessWebBrowsing;\n }", "public boolean requiresSecurityPolicy()\n {\n return true;\n }", "public boolean hasEndpoint2() { return true; }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Web-Proxy via Akeyless Web Access Bastion\")\n\n public Boolean getSecureAccessWebProxy() {\n return secureAccessWebProxy;\n }", "@java.lang.Override\n public boolean hasUserAgentVersion() {\n return userAgentVersionTypeCase_ == 7;\n }", "boolean hasLoginapiavgrtt();", "public String getRequiredVersion() {\n/* 152 */ return this.jspversion;\n/* */ }", "boolean hasWeixinLogin();", "public static boolean getFb() {\n return fb;\n }", "private void m81848e(WindowConfig iVar) {\n boolean z;\n boolean z2;\n boolean z3;\n WebViewFragment2 u;\n if (iVar.mo81404a()) {\n this.f58073e = iVar.f58090f;\n if (this.f58069a.getHasSystemBar()) {\n this.f58069a.setSystemBarTitle(this.f58073e);\n }\n }\n boolean z4 = false;\n if (iVar.mo81412e()) {\n if (iVar.mo81421j()) {\n z = !m81840a(iVar.f58087c, this.f58080l);\n this.f58080l = iVar.f58087c;\n if (z) {\n m81846c(false);\n }\n if (iVar.mo81416g()) {\n if (iVar.mo81422k()) {\n boolean equals = C6969H.m41409d(\"G7A86D408BC38\").equals(iVar.f58088d);\n z2 = equals != this.f58075g;\n this.f58075g = equals;\n if (iVar.mo81414f()) {\n if (iVar.mo81423l()) {\n z3 = !m81840a(iVar.f58089e, this.f58076h);\n this.f58076h = iVar.f58089e;\n if (iVar.mo81418h()) {\n z4 = !m81840a(iVar.f58094j, this.f58081m);\n this.f58081m = iVar.f58094j;\n }\n u = m81857u();\n if (u == null) {\n u.mo81332a(z, z2, z3, z4);\n return;\n }\n return;\n }\n iVar.mo81402a(C6969H.m41409d(\"G6782C328B637A33D\"));\n }\n z3 = false;\n if (iVar.mo81418h()) {\n }\n u = m81857u();\n if (u == null) {\n }\n } else {\n iVar.mo81402a(C6969H.m41409d(\"G6782C337B634\"));\n }\n }\n z2 = false;\n if (iVar.mo81414f()) {\n }\n z3 = false;\n if (iVar.mo81418h()) {\n }\n u = m81857u();\n if (u == null) {\n }\n } else {\n iVar.mo81402a(C6969H.m41409d(\"G6782C336BA36BF\"));\n }\n }\n z = false;\n if (iVar.mo81416g()) {\n }\n z2 = false;\n if (iVar.mo81414f()) {\n }\n z3 = false;\n if (iVar.mo81418h()) {\n }\n u = m81857u();\n if (u == null) {\n }\n }", "public static final boolean isUserLoad() {\n return SystemProperties.get(BUILD_TYPE).equals(BUILD_TYPE_USER);\n }", "public Boolean multipleStepWebTest() {\n return this.multipleStepWebTest;\n }", "public void setForua(boolean newValue);", "private boolean m81322a(boolean z, String str, String str2) {\n AppMethodBeat.m2504i(131592);\n if (z || this.iae) {\n AppMethodBeat.m2505o(131592);\n return true;\n } else if (C1443d.m3067fP(18)) {\n AppMethodBeat.m2505o(131592);\n return true;\n } else {\n C4990ab.m7411d(\"MicroMsg.AppBrandVideoWrapper\", \"checkUseSystemPlayer abtestFlag[%d]\", Integer.valueOf(C4996ah.getContext().getSharedPreferences(\"system_config_prefs\", C1448h.m3078Mu()).getInt(\"appbrand_video_player\", -1)));\n if (C4996ah.getContext().getSharedPreferences(\"system_config_prefs\", C1448h.m3078Mu()).getInt(\"appbrand_video_player\", -1) <= 0) {\n C4990ab.m7416i(\"MicroMsg.AppBrandVideoWrapper\", \"abtest is zero, use system player\");\n AppMethodBeat.m2505o(131592);\n return true;\n } else if (!C5046bo.isNullOrNil(str) && str.contains(\".m3u8\")) {\n C4990ab.m7417i(\"MicroMsg.AppBrandVideoWrapper\", \"%d it is m3u8 file use system player.\", Integer.valueOf(hashCode()));\n mo26918gp(204);\n AppMethodBeat.m2505o(131592);\n return true;\n } else if (C26492r.m42231ud(str2)) {\n C4990ab.m7417i(\"MicroMsg.AppBrandVideoWrapper\", \"%d it is m3u8 file use system player.\", Integer.valueOf(hashCode()));\n mo26918gp(204);\n AppMethodBeat.m2505o(131592);\n return true;\n } else {\n AppMethodBeat.m2505o(131592);\n return false;\n }\n }\n }", "private static final String m2193f() {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"fb\");\n stringBuilder.append(C0560t.m1253e());\n stringBuilder.append(\"://authorize\");\n return stringBuilder.toString();\n }", "public interface Platform {\n String WEB = \"Web\";\n String FB = \"Facebook Messenger\";\n}", "boolean getIsGoogleCn();", "@Deprecated\n public boolean isRequestCorrect(){\n\treturn true;\n }", "public void flashlightSwitch()\n {\n usingFlashlight = !usingFlashlight;\n }", "boolean isGaotongPay(String url) {\n if (url.startsWith(\"http://wgtj.gaotongpay.com/\")) {\r\n return true;\r\n }\r\n return false;\r\n }", "public void v_Verify_Guest6_Hidden(){\n\t}", "public void v_Verify_Guest3_Hidden(){\n\t}", "public interface WebContainerConstants\n{\n\n /**\n * Service PID used for configuration.\n */\n static final String PID = \"org.ops4j.pax.web\";\n\n /**\n * Init param name for specifying a context name.\n */\n static final String CONTEXT_NAME = \"webapp.context\";\n\n /**\n * Servlet init param name for specifying a servlet name.\n */\n static final String SERVLET_NAME = \"servlet-name\";\n\n /**\n * Filter init param name for specifying a filter name.\n */\n static final String FILTER_NAME = \"filter-name\";\n\n /**\n * Filter init param name for specifying a filter-mapping dispatch behaviour\n * Must be a comma delimited string of:\n * <ol>\n * <li>request</li>\n * <li>forward</li>\n * <li>include</li>\n * <li>error</li>\n * </ol>\n *\n * values are not case sensitive.\n */\n static final String FILTER_MAPPING_DISPATCHER = \"filter-mapping-dispatcher\".intern();\n\n static final String PROPERTY_HTTP_USE_NIO = \"org.osgi.service.http.useNIO\";\n static final String PROPERTY_HTTP_PORT = \"org.osgi.service.http.port\";\n static final String PROPERTY_HTTP_SECURE_PORT = \"org.osgi.service.http.port.secure\";\n static final String PROPERTY_HTTP_ENABLED = \"org.osgi.service.http.enabled\";\n static final String PROPERTY_HTTP_SECURE_ENABLED = \"org.osgi.service.http.secure.enabled\";\n\n static final String PROPERTY_SSL_KEYSTORE = PID + \".ssl.keystore\";\n static final String PROPERTY_SSL_KEYSTORE_TYPE = PID + \".ssl.keystore.type\";\n static final String PROPERTY_SSL_PASSWORD = PID + \".ssl.password\";\n static final String PROPERTY_SSL_KEYPASSWORD = PID + \".ssl.keypassword\";\n\n static final String PROPERTY_SSL_CLIENT_AUTH_WANTED = PID + \".ssl.clientauthwanted\";\n static final String PROPERTY_SSL_CLIENT_AUTH_NEEDED = PID + \".ssl.clientauthneeded\";\n\n static final String PROPERTY_SESSION_TIMEOUT = PID + \".session.timeout\";\n static final String PROPERTY_SESSION_COOKIE = PID + \".session.cookie\";\n static final String PROPERTY_SESSION_URL = PID + \".session.url\";\n static final String PROPERTY_WORKER_NAME = PID + \".worker.name\";\n\n static final String PROPERTY_TEMP_DIR = \"javax.servlet.context.tempdir\";\n\n static final String PROPERTY_LISTENING_ADDRESSES = PID + \".listening.addresses\";\n\n static final String PROPERTY_LOG_NCSA_ENABLED = \"org.ops4j.pax.web.log.ncsa.enabled\";\n static final String PROPERTY_LOG_NCSA_FORMAT = \"org.ops4j.pax.web.log.ncsa.format\";\n static final String PROPERTY_LOG_NCSA_RETAINDAYS = \"org.ops4j.pax.web.log.ncsa.retaindays\";\n static final String PROPERTY_LOG_NCSA_APPEND = \"org.ops4j.pax.web.log.ncsa.append\";\n static final String PROPERTY_LOG_NCSA_EXTENDED = \"org.ops4j.pax.web.log.ncsa.extended\";\n static final String PROPERTY_LOG_NCSA_LOGTIMEZONE = \"org.ops4j.pax.web.log.ncsa.logtimezone\";\n static final String PROPERTY_LOG_NCSA_LOGDIR = \"org.ops4j.pax.web.log.ncsa.directory\";\n\n /**\n * Servlet context attribute containing the bundle context of the bundle registereing the http context.\n */\n static final String BUNDLE_CONTEXT_ATTRIBUTE = \"osgi-bundlecontext\";\n \n static final String PROPERTY_SERVER_CONFIGURATION_FILE = PID + \".config.file\";\n \n}", "protected boolean isAlwaysExperienceDropper() {\n/* 1849 */ return true;\n/* */ }", "public boolean isbLive() {\n\t\treturn true;\n\t}", "boolean useCamera2();", "boolean getUsePage();", "public static String m21397c(Context context) {\n if (TextUtils.isEmpty(f16892c)) {\n try {\n f16892c = VERSION.SDK_INT >= 17 ? WebSettings.getDefaultUserAgent(context) : m21385a();\n } catch (Throwable unused) {\n f16892c = m21385a();\n }\n }\n return f16892c;\n }", "public void v_Verify_Guest7_Hidden(){\n\t}", "@java.lang.Override\n public boolean hasAppEngineVersion() {\n return stepInfoCase_ == 22;\n }", "boolean mo106365g();", "private boolean shouldUseSimpleUserSwitcher() {\n return Settings.Global.getInt(this.mContext.getContentResolver(), \"lockscreenSimpleUserSwitcher\", this.mContext.getResources().getBoolean(17891459) ? 1 : 0) != 0;\n }", "private void getPreferences() {\n\n if(sharedpreferences.getBoolean(\"usaGPU\", true)) {\n mUtilizzoGPU.setChecked(true);\n }\n else{\n mUtilizzoGPU.setChecked(false);\n }\n\n }", "static public int getGUEST() {\n return 2;\n }", "public static String getWebHost() { return mWebHost; }", "public interface WebAppConstants {\n\n\t\n\tpublic static final String MSG_OK = \"I dati sono stati inseriti correttamente\";\n\tpublic static final String MSG_SI = \"SI\";\n\tpublic static final String MSG_NO = \"NO\";\n\t\n\tpublic static final String Si = \"Si\";\n\tpublic static final String No = \"No\";\n\t\n\tpublic static final String CODICE_ITALIA = \"1\";\n\t\n\t\n\tpublic static final String CAP_UG =\"CAP-UG\";\n\tpublic static final String CAP_EG =\"CAP-EG\";\n\t\n\t\n\tpublic static final String FRAZIONABILE = \"Frazionabile\";\n\tpublic static final String NON_FRAZIONABILE = \"Non frazionabile\";\n\t\n\tpublic static final String PRENOTATO = \"Prenotato\";\n\tpublic static final String PRENOTATO_LIQUIDABILE = \"Prenotato liquidabile\";\n\tpublic static final String NON_PRENOTATO = \"Non Prenotato\";\n\t\n\t//per la scelta del tipo debito siope:\n\tpublic static final String COMMERCIALE_CON_FATTURE = \"Commerciale (con fatture)\";\n\tpublic static final String COMMERCIALE = \"Commerciale\";\n\tpublic static final String NON_COMMERCIALE = \"Non commerciale\";\n\t\n\t//per la scela di quale provvedimento usare nel reintroito di un ordinativo:\n\tpublic static final String SCELTA_PROVVEDIMENTO_UNICO = \"Provvedimento Unico\";\n\tpublic static final String SCELTA_PROVVEDIMENTO_DA_MOVIMENTI = \"Provvedimento da movimenti\";\n\t\n\t//SIAC-5333: duplicate da bilapp\n\tpublic static final String CODICE_CAPITOLO_ENTRATA_GESTIONE = \"CAP-EG\";\n\tpublic static final String CODICE_CAPITOLO_USCITA_GESTIONE = \"CAP-UG\";\n\tpublic static final String TRUE_STRING = \"TRUE\"; \n\tpublic static final String GESTIONE_UEB = \"GESTIONE_UEB\";\n\tpublic static final String TITOLO_1 = \"1\"; \n\tpublic static final String TITOLO_2 = \"2\";\n\tpublic static final String TITOLO_3 = \"3\"; \n\tpublic static final String TITOLO_4 = \"4\"; \n\tpublic static final String TITOLO_5 = \"5\"; \n\tpublic static final String TITOLO_7 = \"7\";\n\tpublic static final String MACROAGGREGATO_1030000 = \"1030000\";\n\tpublic static final String MACROAGGREGATO_1040000 = \"1040000\"; \n\tpublic static final String MACROAGGREGATO_2030000 = \"2030000\";\n\tpublic static final String MACROAGGREGATO_2040000 = \"2040000\"; \n\tpublic static final String MACROAGGREGATO_2050000 = \"2050000\";\n\tpublic static final String MACROAGGREGATO_4010000 = \"4010000\";\n\tpublic static final String MACROAGGREGATO_4020000 = \"4020000\";\n\tpublic static final String MACROAGGREGATO_4030000 = \"4030000\";\n\tpublic static final String MACROAGGREGATO_4040000 = \"4040000\";\n\tpublic static final String MACROAGGREGATO_7020000 = \"7020000\";\n\tpublic static final String MACROAGGREGATO_7010000 = \"7010000\"; \n\tpublic static final String MACROAGGREGATO_1100000 = \"1100000\";\n\t\n\tpublic static final String CONDIZIONI_REGISTRAZIONE_NON_SODDISFATTE = \"Condizioni per la creazione di una registrazione sulla contabilit&agrave; generale non soddisfatte\";\n\t\n\t//costante per table risultati ricerca pre doc:\n\tpublic static final String KEY_LISTA_PRE_DOC_DA_DOCUMENTI = \"LISTA_PRE_DOC_DA_DOCUMENTI\";\n}", "public static void setUseHttp(boolean useHttp) {\n\t\tif (adHocAccount == null)\n\t\t\tadHocAccount = new Account();\n\t\tadHocAccount.useHttp = useHttp;\n\t\t\n\t\t//\tset default HTTP port if not set before\n\t\tif ((adHocAccount.port == -1) && useHttp)\n\t\t\tadHocAccount.port = 80;\n\t}", "public abstract boolean mo2163j();", "public void v_Verify_Guest8_Hidden(){\n\t}", "private boolean tienePermiso(String urlStr){\n return true;\n }", "public static WebSecurity get(int value) {\n\t\tswitch (value) {\n\t\t\tcase PREFER_SECURE_VALUE: return PREFER_SECURE;\n\t\t\tcase ALWAYS_SECURE_VALUE: return ALWAYS_SECURE;\n\t\t\tcase ALWAYS_UNSECURE_VALUE: return ALWAYS_UNSECURE;\n\t\t}\n\t\treturn null;\n\t}" ]
[ "0.72402245", "0.6900422", "0.57291615", "0.5685951", "0.55701023", "0.5427062", "0.5390331", "0.53485477", "0.52722657", "0.5243693", "0.52132434", "0.5166238", "0.51049083", "0.5103322", "0.50971246", "0.50955397", "0.5083663", "0.5081766", "0.5063107", "0.50076437", "0.49899334", "0.49847585", "0.49845606", "0.4979671", "0.49779367", "0.49735454", "0.49728435", "0.49628276", "0.49628276", "0.4948856", "0.49402875", "0.49330574", "0.49167973", "0.4916374", "0.4906024", "0.49050114", "0.49035883", "0.48991156", "0.48941773", "0.48914838", "0.48854503", "0.48849013", "0.48590192", "0.4858159", "0.4842561", "0.4842292", "0.4837342", "0.4831356", "0.4813313", "0.48118588", "0.4808296", "0.480341", "0.48018017", "0.47979844", "0.47949356", "0.47948635", "0.47912428", "0.47799766", "0.47787467", "0.4778313", "0.47756058", "0.4770174", "0.4764404", "0.47598594", "0.47582975", "0.47549117", "0.47516656", "0.4750809", "0.47423685", "0.47366452", "0.4734026", "0.47307974", "0.47231203", "0.47226834", "0.47195145", "0.4710416", "0.47095427", "0.47064397", "0.47012132", "0.4699804", "0.46956787", "0.46951997", "0.46929732", "0.46870247", "0.46810693", "0.46743077", "0.46739075", "0.46724465", "0.467135", "0.46692562", "0.46638423", "0.4660325", "0.46597904", "0.4657159", "0.4657049", "0.4653272", "0.46515635", "0.46514884", "0.46507058", "0.46409136" ]
0.74197036
0
item_id int64 item_id = 9;
@java.lang.Override public long getItemId() { return itemId_; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long getID(Object item);", "int getItemID();", "public long getItemShopBasketId();", "public Integer getItemid() {\n return itemid;\n }", "public Integer getItemid() {\n return itemid;\n }", "public int getItemId()\r\n {\r\n return _itemId;\r\n }", "public int getItemID()\n {\n return itemID;\n }", "public int getItemId() {\n return itemId;\n }", "@Test\r\n\tpublic void testIdItem() {\r\n\r\n\t\ttry {\r\n\t\t\tItem itemDes = new Item(idItem, \"elixir de Destreza\", 0, 0, 0, 0, 0, 0, null, null);\r\n\r\n\t\t\tAssert.assertEquals(12321, itemDes.getIdItem());\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\r\n\t}", "public Long getItemId() {\r\n return itemId;\r\n }", "public interface IdItem {\n int getId();\n}", "public Item getItemById(Integer itemId);", "public String getItemId() {\n return itemId;\n }", "public String getItemId() {\r\n return itemId;\r\n }", "void setItemId(String itemId);", "int getItemId() {\n return m_itemId;\n }", "public Integer getId(){return id;}", "public void setItem_id(int item_id) {\r\n\t\tthis.item_id = item_id;\r\n\t}", "public void setItemId(Long itemId) {\r\n this.itemId = itemId;\r\n }", "public long getShopBasketId();", "public String getItemId(){\r\n\t\treturn \"\";\r\n\t}", "@java.lang.Override\n public long getItemId() {\n return itemId_;\n }", "public long UnSigndCatster(Object item){\n long x = Integer.toUnsignedLong((int)item);\n //String s = item.toString();\n //long x = Integer.parseUnsignedInt(s);\n return x;\n }", "public void setItemShopBasketId(long itemShopBasketId);", "public long getId(){return this.id;}", "public int getBigId () { return bigId; }", "public void setM_Product_ID (int M_Product_ID)\n{\nset_Value (\"M_Product_ID\", new Integer(M_Product_ID));\n}", "abstract int getItemID(int level);", "public int add(Item item) {\r\n Transaction trans = null;\r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n int id = 0;\r\n\r\n try {\r\n trans = session.beginTransaction();\r\n\r\n id = (int) session.save(item);\r\n\r\n trans.commit();\r\n } catch (HibernateException e) {\r\n if (trans != null) {\r\n trans.rollback();\r\n }\r\n e.printStackTrace();\r\n } finally {\r\n session.close();\r\n }\r\n return id;\r\n }", "com.google.protobuf.Int64Value getFromId();", "public int getITEM() {\r\n return item;\r\n }", "public int getId(){ return id; }", "private Long getApiId(final RpStoreEntity item){\n \n if(allowedPosNames.contains(item.getPosSoftware())){\n return apiService.findByName(item.getPosSoftware()).getApiId();\n } else {\n return apiService.findByName(defaultApiForPosSoftware).getApiId();\n }\n }", "public byte getId(){\n return id;\n }", "public Integer getID(){\n return ID;\n }", "public interface ID_UNIQUENESS_POLICY_ID\n{\n\n /**\n\t * The value representing ID_UNIQUENESS_POLICY_ID.\n\t */\n public static final int value = (int)(18L);\n}", "@Override\n public long getItemId(int itemId) {\n return itemId;\n }", "@Override\r\n public int getItemId() {\n return this.itemId;\r\n }", "private Integer getId() { return this.id; }", "public Object getKey(Movie item) {\n\t return (item == null) ? null : item.getId();\r\n\t }", "@Override\r\n public void setItemId(int itemId) {\n this.itemId = itemId;\r\n }", "public void setId(byte id){this.id = id;}", "public long getSuburItemId();", "public Integer getId() { return id; }", "public void setM_Warehouse_ID (int M_Warehouse_ID)\n{\nset_Value (\"M_Warehouse_ID\", new Integer(M_Warehouse_ID));\n}", "public abstract long getId();", "public abstract long getId();", "public int getId(){return id;}", "io.dstore.values.IntegerValue getUnitId();", "public long getId() { return id; }", "public long getId() { return id; }", "public long getId() { return _id; }", "public Item getItem(long idItem) throws ItemNotFound;", "public interface ID_TYPE {\r\n public static final int OWNER = 1;\r\n public static final int ATTENDANT = 2;\r\n public static final int DRIVER = 3;\r\n }", "ShoppingItem getShoppingItemByGuid(String itemGuid);", "public final ItemId getId() {\r\n return null;\r\n }", "public int getId(){\r\n return localId;\r\n }", "id(int id) {}", "public String getItemID() {\n\t return this.itemID;\n\t}", "public void setFlyerItemId(Integer value) {\n this.flyer_item_id = value;\n }", "public void setItemId(String itemId) {\n this.itemId = itemId;\n }", "int getPokedexIdValue();", "int getPokedexIdValue();", "public int getM_Inventory_ID() \n{\nInteger ii = (Integer)get_Value(\"M_Inventory_ID\");\nif (ii == null) return 0;\nreturn ii.intValue();\n}", "public abstract Long getId();", "int getMyId();", "public int getItem_id() {\r\n\t\treturn item_id;\r\n\t}", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "public Long getId() {\n return id;\n }", "public int id() {return id;}", "private int getItemID(String item) {\n\t\titem = item.replace(\" \", \"%20\");\n\t\t//log(\"Item: \" + item);\n \ttry {\n \tString webPage = \"http://\" + serverIP + \"/getid.php?i=\" + item;\n \t//log(\"Webpage: '\" +webPage+\"'\");\n \tURL url = new URL(webPage);\n \tURLConnection urlConnection = url.openConnection();\n \tInputStream is = urlConnection.getInputStream();\n \tInputStreamReader isr = new InputStreamReader(is);\n\n \tint numCharsRead;\n \tchar[] charArray = new char[1024];\n \tStringBuffer sb = new StringBuffer();\n \twhile ((numCharsRead = isr.read(charArray)) > 0) {\n \tsb.append(charArray, 0, numCharsRead);\n \t}\n \tString result = sb.toString();\n \t//log(\"ItemID: \" + result);\n \t//window.status.setText(\"Ready\");\n\n \treturn Integer.parseInt(result);\n \t} catch (Exception e) {\n \tlog(\"Exception occurred at getID.\" + e);\n \t}\n\n \treturn 0;\n \t}", "public void setId(long id) {\n id_ = id;\n }", "public long getVocubalaryId();", "Integer getId();", "Integer getId();", "Integer getId();", "@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}", "Integer getID();", "Integer getID();", "public abstract long id();", "public String indexItem(T item) {\n IndexQuery indexQuery = new IndexQueryBuilder()\n .withId(String.valueOf(item.getId()))\n .withObject(item)\n .build();\n String documentId = elasticsearchOperations.index(indexQuery, getIndexCoordinates());\n return documentId;\n }", "public byte getId() {\n return 2;\n }" ]
[ "0.6832262", "0.67022014", "0.6573659", "0.64553726", "0.64553726", "0.64229095", "0.6410955", "0.6409017", "0.6404034", "0.6281676", "0.62705797", "0.6211113", "0.60965604", "0.6096335", "0.60360247", "0.60205024", "0.5994523", "0.5988325", "0.5982117", "0.5964025", "0.5910507", "0.5848173", "0.5826721", "0.5819618", "0.58019525", "0.57943016", "0.5791316", "0.57898396", "0.57693875", "0.5766306", "0.5739626", "0.57015", "0.56973624", "0.569608", "0.5693868", "0.5691435", "0.56911147", "0.56852615", "0.5679146", "0.5674232", "0.5672523", "0.5669916", "0.5667431", "0.56626785", "0.5662283", "0.56515425", "0.56515425", "0.5646449", "0.5646041", "0.5637892", "0.5637892", "0.5633225", "0.5590872", "0.55808425", "0.55804884", "0.5576504", "0.5573161", "0.5570916", "0.55665815", "0.5552992", "0.555035", "0.553115", "0.553115", "0.55297315", "0.5518338", "0.551116", "0.55102694", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.550845", "0.55017906", "0.5500541", "0.54979354", "0.5497606", "0.54965156", "0.5496437", "0.5496437", "0.5496437", "0.5495764", "0.549447", "0.549447", "0.5491912", "0.54914427", "0.54898864" ]
0.56037074
52
item_id int64 item_id = 9;
public Builder setItemId(long value) { itemId_ = value; onChanged(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long getID(Object item);", "int getItemID();", "public long getItemShopBasketId();", "public Integer getItemid() {\n return itemid;\n }", "public Integer getItemid() {\n return itemid;\n }", "public int getItemId()\r\n {\r\n return _itemId;\r\n }", "public int getItemID()\n {\n return itemID;\n }", "public int getItemId() {\n return itemId;\n }", "@Test\r\n\tpublic void testIdItem() {\r\n\r\n\t\ttry {\r\n\t\t\tItem itemDes = new Item(idItem, \"elixir de Destreza\", 0, 0, 0, 0, 0, 0, null, null);\r\n\r\n\t\t\tAssert.assertEquals(12321, itemDes.getIdItem());\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\r\n\t}", "public Long getItemId() {\r\n return itemId;\r\n }", "public interface IdItem {\n int getId();\n}", "public Item getItemById(Integer itemId);", "public String getItemId() {\n return itemId;\n }", "public String getItemId() {\r\n return itemId;\r\n }", "void setItemId(String itemId);", "int getItemId() {\n return m_itemId;\n }", "public Integer getId(){return id;}", "public void setItem_id(int item_id) {\r\n\t\tthis.item_id = item_id;\r\n\t}", "public void setItemId(Long itemId) {\r\n this.itemId = itemId;\r\n }", "public long getShopBasketId();", "public String getItemId(){\r\n\t\treturn \"\";\r\n\t}", "@java.lang.Override\n public long getItemId() {\n return itemId_;\n }", "public long UnSigndCatster(Object item){\n long x = Integer.toUnsignedLong((int)item);\n //String s = item.toString();\n //long x = Integer.parseUnsignedInt(s);\n return x;\n }", "public void setItemShopBasketId(long itemShopBasketId);", "public long getId(){return this.id;}", "public int getBigId () { return bigId; }", "public void setM_Product_ID (int M_Product_ID)\n{\nset_Value (\"M_Product_ID\", new Integer(M_Product_ID));\n}", "abstract int getItemID(int level);", "public int add(Item item) {\r\n Transaction trans = null;\r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n int id = 0;\r\n\r\n try {\r\n trans = session.beginTransaction();\r\n\r\n id = (int) session.save(item);\r\n\r\n trans.commit();\r\n } catch (HibernateException e) {\r\n if (trans != null) {\r\n trans.rollback();\r\n }\r\n e.printStackTrace();\r\n } finally {\r\n session.close();\r\n }\r\n return id;\r\n }", "com.google.protobuf.Int64Value getFromId();", "public int getITEM() {\r\n return item;\r\n }", "public int getId(){ return id; }", "private Long getApiId(final RpStoreEntity item){\n \n if(allowedPosNames.contains(item.getPosSoftware())){\n return apiService.findByName(item.getPosSoftware()).getApiId();\n } else {\n return apiService.findByName(defaultApiForPosSoftware).getApiId();\n }\n }", "public byte getId(){\n return id;\n }", "public Integer getID(){\n return ID;\n }", "public interface ID_UNIQUENESS_POLICY_ID\n{\n\n /**\n\t * The value representing ID_UNIQUENESS_POLICY_ID.\n\t */\n public static final int value = (int)(18L);\n}", "@Override\n public long getItemId(int itemId) {\n return itemId;\n }", "@Override\r\n public int getItemId() {\n return this.itemId;\r\n }", "private Integer getId() { return this.id; }", "public Object getKey(Movie item) {\n\t return (item == null) ? null : item.getId();\r\n\t }", "@Override\r\n public void setItemId(int itemId) {\n this.itemId = itemId;\r\n }", "public void setId(byte id){this.id = id;}", "public long getSuburItemId();", "public void setM_Warehouse_ID (int M_Warehouse_ID)\n{\nset_Value (\"M_Warehouse_ID\", new Integer(M_Warehouse_ID));\n}", "public Integer getId() { return id; }", "public abstract long getId();", "public abstract long getId();", "public int getId(){return id;}", "io.dstore.values.IntegerValue getUnitId();", "public long getId() { return id; }", "public long getId() { return id; }", "public long getId() { return _id; }", "@java.lang.Override\n public long getItemId() {\n return itemId_;\n }", "public Item getItem(long idItem) throws ItemNotFound;", "public interface ID_TYPE {\r\n public static final int OWNER = 1;\r\n public static final int ATTENDANT = 2;\r\n public static final int DRIVER = 3;\r\n }", "ShoppingItem getShoppingItemByGuid(String itemGuid);", "public final ItemId getId() {\r\n return null;\r\n }", "public int getId(){\r\n return localId;\r\n }", "id(int id) {}", "public String getItemID() {\n\t return this.itemID;\n\t}", "public void setFlyerItemId(Integer value) {\n this.flyer_item_id = value;\n }", "public void setItemId(String itemId) {\n this.itemId = itemId;\n }", "int getPokedexIdValue();", "int getPokedexIdValue();", "public int getM_Inventory_ID() \n{\nInteger ii = (Integer)get_Value(\"M_Inventory_ID\");\nif (ii == null) return 0;\nreturn ii.intValue();\n}", "public abstract Long getId();", "int getMyId();", "public int getItem_id() {\r\n\t\treturn item_id;\r\n\t}", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "public Long getId() {\n return id;\n }", "public int id() {return id;}", "public void setId(long id) {\n id_ = id;\n }", "public long getVocubalaryId();", "@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}", "Integer getId();", "Integer getId();", "Integer getId();", "private int getItemID(String item) {\n\t\titem = item.replace(\" \", \"%20\");\n\t\t//log(\"Item: \" + item);\n \ttry {\n \tString webPage = \"http://\" + serverIP + \"/getid.php?i=\" + item;\n \t//log(\"Webpage: '\" +webPage+\"'\");\n \tURL url = new URL(webPage);\n \tURLConnection urlConnection = url.openConnection();\n \tInputStream is = urlConnection.getInputStream();\n \tInputStreamReader isr = new InputStreamReader(is);\n\n \tint numCharsRead;\n \tchar[] charArray = new char[1024];\n \tStringBuffer sb = new StringBuffer();\n \twhile ((numCharsRead = isr.read(charArray)) > 0) {\n \tsb.append(charArray, 0, numCharsRead);\n \t}\n \tString result = sb.toString();\n \t//log(\"ItemID: \" + result);\n \t//window.status.setText(\"Ready\");\n\n \treturn Integer.parseInt(result);\n \t} catch (Exception e) {\n \tlog(\"Exception occurred at getID.\" + e);\n \t}\n\n \treturn 0;\n \t}", "Integer getID();", "Integer getID();", "public byte getId() {\n return 2;\n }", "public abstract long id();", "public void setITEM(int value) {\r\n this.item = value;\r\n }" ]
[ "0.6829706", "0.6700685", "0.6573403", "0.6454609", "0.6454609", "0.64222175", "0.6409563", "0.6408336", "0.64018166", "0.62806517", "0.6269503", "0.62097144", "0.6095648", "0.6095398", "0.6034809", "0.60197014", "0.5995563", "0.59866834", "0.5980938", "0.5964149", "0.59096986", "0.58469266", "0.5825405", "0.5819509", "0.58025384", "0.57945913", "0.5791793", "0.57893574", "0.5767527", "0.5766608", "0.5739853", "0.5702353", "0.56973183", "0.56970733", "0.5694184", "0.56923264", "0.56899744", "0.5684821", "0.5679567", "0.56726533", "0.56717944", "0.5670699", "0.56667525", "0.5663418", "0.56633466", "0.56506866", "0.56506866", "0.56474125", "0.56457925", "0.56380624", "0.56380624", "0.5633254", "0.56023765", "0.55895907", "0.55805564", "0.5578398", "0.55752045", "0.5573719", "0.5571197", "0.55647904", "0.5553672", "0.5549004", "0.5531441", "0.5531441", "0.5529904", "0.5517648", "0.55105215", "0.5509259", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.550234", "0.5501127", "0.5498132", "0.54965156", "0.5496504", "0.54958403", "0.54958403", "0.54958403", "0.5495038", "0.5493471", "0.5493471", "0.549147", "0.54909205", "0.54899955" ]
0.0
-1
item_id int64 item_id = 9;
public Builder clearItemId() { itemId_ = 0L; onChanged(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long getID(Object item);", "int getItemID();", "public long getItemShopBasketId();", "public Integer getItemid() {\n return itemid;\n }", "public Integer getItemid() {\n return itemid;\n }", "public int getItemId()\r\n {\r\n return _itemId;\r\n }", "public int getItemID()\n {\n return itemID;\n }", "public int getItemId() {\n return itemId;\n }", "@Test\r\n\tpublic void testIdItem() {\r\n\r\n\t\ttry {\r\n\t\t\tItem itemDes = new Item(idItem, \"elixir de Destreza\", 0, 0, 0, 0, 0, 0, null, null);\r\n\r\n\t\t\tAssert.assertEquals(12321, itemDes.getIdItem());\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\r\n\t}", "public Long getItemId() {\r\n return itemId;\r\n }", "public interface IdItem {\n int getId();\n}", "public Item getItemById(Integer itemId);", "public String getItemId() {\n return itemId;\n }", "public String getItemId() {\r\n return itemId;\r\n }", "void setItemId(String itemId);", "int getItemId() {\n return m_itemId;\n }", "public Integer getId(){return id;}", "public void setItem_id(int item_id) {\r\n\t\tthis.item_id = item_id;\r\n\t}", "public void setItemId(Long itemId) {\r\n this.itemId = itemId;\r\n }", "public long getShopBasketId();", "public String getItemId(){\r\n\t\treturn \"\";\r\n\t}", "@java.lang.Override\n public long getItemId() {\n return itemId_;\n }", "public long UnSigndCatster(Object item){\n long x = Integer.toUnsignedLong((int)item);\n //String s = item.toString();\n //long x = Integer.parseUnsignedInt(s);\n return x;\n }", "public void setItemShopBasketId(long itemShopBasketId);", "public long getId(){return this.id;}", "public int getBigId () { return bigId; }", "public void setM_Product_ID (int M_Product_ID)\n{\nset_Value (\"M_Product_ID\", new Integer(M_Product_ID));\n}", "abstract int getItemID(int level);", "public int add(Item item) {\r\n Transaction trans = null;\r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n int id = 0;\r\n\r\n try {\r\n trans = session.beginTransaction();\r\n\r\n id = (int) session.save(item);\r\n\r\n trans.commit();\r\n } catch (HibernateException e) {\r\n if (trans != null) {\r\n trans.rollback();\r\n }\r\n e.printStackTrace();\r\n } finally {\r\n session.close();\r\n }\r\n return id;\r\n }", "com.google.protobuf.Int64Value getFromId();", "public int getITEM() {\r\n return item;\r\n }", "public int getId(){ return id; }", "private Long getApiId(final RpStoreEntity item){\n \n if(allowedPosNames.contains(item.getPosSoftware())){\n return apiService.findByName(item.getPosSoftware()).getApiId();\n } else {\n return apiService.findByName(defaultApiForPosSoftware).getApiId();\n }\n }", "public byte getId(){\n return id;\n }", "public Integer getID(){\n return ID;\n }", "public interface ID_UNIQUENESS_POLICY_ID\n{\n\n /**\n\t * The value representing ID_UNIQUENESS_POLICY_ID.\n\t */\n public static final int value = (int)(18L);\n}", "@Override\n public long getItemId(int itemId) {\n return itemId;\n }", "@Override\r\n public int getItemId() {\n return this.itemId;\r\n }", "private Integer getId() { return this.id; }", "public Object getKey(Movie item) {\n\t return (item == null) ? null : item.getId();\r\n\t }", "@Override\r\n public void setItemId(int itemId) {\n this.itemId = itemId;\r\n }", "public void setId(byte id){this.id = id;}", "public long getSuburItemId();", "public void setM_Warehouse_ID (int M_Warehouse_ID)\n{\nset_Value (\"M_Warehouse_ID\", new Integer(M_Warehouse_ID));\n}", "public Integer getId() { return id; }", "public abstract long getId();", "public abstract long getId();", "public int getId(){return id;}", "io.dstore.values.IntegerValue getUnitId();", "public long getId() { return id; }", "public long getId() { return id; }", "public long getId() { return _id; }", "@java.lang.Override\n public long getItemId() {\n return itemId_;\n }", "public Item getItem(long idItem) throws ItemNotFound;", "public interface ID_TYPE {\r\n public static final int OWNER = 1;\r\n public static final int ATTENDANT = 2;\r\n public static final int DRIVER = 3;\r\n }", "ShoppingItem getShoppingItemByGuid(String itemGuid);", "public final ItemId getId() {\r\n return null;\r\n }", "public int getId(){\r\n return localId;\r\n }", "id(int id) {}", "public String getItemID() {\n\t return this.itemID;\n\t}", "public void setFlyerItemId(Integer value) {\n this.flyer_item_id = value;\n }", "public void setItemId(String itemId) {\n this.itemId = itemId;\n }", "int getPokedexIdValue();", "int getPokedexIdValue();", "public int getM_Inventory_ID() \n{\nInteger ii = (Integer)get_Value(\"M_Inventory_ID\");\nif (ii == null) return 0;\nreturn ii.intValue();\n}", "public abstract Long getId();", "int getMyId();", "public int getItem_id() {\r\n\t\treturn item_id;\r\n\t}", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "public Long getId() {\n return id;\n }", "public int id() {return id;}", "public void setId(long id) {\n id_ = id;\n }", "public long getVocubalaryId();", "@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}", "Integer getId();", "Integer getId();", "Integer getId();", "private int getItemID(String item) {\n\t\titem = item.replace(\" \", \"%20\");\n\t\t//log(\"Item: \" + item);\n \ttry {\n \tString webPage = \"http://\" + serverIP + \"/getid.php?i=\" + item;\n \t//log(\"Webpage: '\" +webPage+\"'\");\n \tURL url = new URL(webPage);\n \tURLConnection urlConnection = url.openConnection();\n \tInputStream is = urlConnection.getInputStream();\n \tInputStreamReader isr = new InputStreamReader(is);\n\n \tint numCharsRead;\n \tchar[] charArray = new char[1024];\n \tStringBuffer sb = new StringBuffer();\n \twhile ((numCharsRead = isr.read(charArray)) > 0) {\n \tsb.append(charArray, 0, numCharsRead);\n \t}\n \tString result = sb.toString();\n \t//log(\"ItemID: \" + result);\n \t//window.status.setText(\"Ready\");\n\n \treturn Integer.parseInt(result);\n \t} catch (Exception e) {\n \tlog(\"Exception occurred at getID.\" + e);\n \t}\n\n \treturn 0;\n \t}", "Integer getID();", "Integer getID();", "public byte getId() {\n return 2;\n }", "public abstract long id();", "public void setITEM(int value) {\r\n this.item = value;\r\n }" ]
[ "0.6829706", "0.6700685", "0.6573403", "0.6454609", "0.6454609", "0.64222175", "0.6409563", "0.6408336", "0.64018166", "0.62806517", "0.6269503", "0.62097144", "0.6095648", "0.6095398", "0.6034809", "0.60197014", "0.5995563", "0.59866834", "0.5980938", "0.5964149", "0.59096986", "0.58469266", "0.5825405", "0.5819509", "0.58025384", "0.57945913", "0.5791793", "0.57893574", "0.5767527", "0.5766608", "0.5739853", "0.5702353", "0.56973183", "0.56970733", "0.5694184", "0.56923264", "0.56899744", "0.5684821", "0.5679567", "0.56726533", "0.56717944", "0.5670699", "0.56667525", "0.5663418", "0.56633466", "0.56506866", "0.56506866", "0.56474125", "0.56457925", "0.56380624", "0.56380624", "0.5633254", "0.56023765", "0.55895907", "0.55805564", "0.5578398", "0.55752045", "0.5573719", "0.5571197", "0.55647904", "0.5553672", "0.5549004", "0.5531441", "0.5531441", "0.5529904", "0.5517648", "0.55105215", "0.5509259", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.55077076", "0.550234", "0.5501127", "0.5498132", "0.54965156", "0.5496504", "0.54958403", "0.54958403", "0.54958403", "0.5495038", "0.5493471", "0.5493471", "0.549147", "0.54909205", "0.54899955" ]
0.0
-1
schema_url string schema_url = 10;
public java.lang.String getSchemaUrl() { java.lang.Object ref = schemaUrl_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); schemaUrl_ = s; return s; } else { return (java.lang.String) ref; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String getSchemaURI();", "void schema(String schema);", "void schema(String schema);", "public Builder setSchemaUrl(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n schemaUrl_ = value;\n onChanged();\n return this;\n }", "Builder addSchemaVersion(URL value);", "@java.lang.Override\n public java.lang.String getSchemaUrl() {\n java.lang.Object ref = schemaUrl_;\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 schemaUrl_ = s;\n return s;\n }\n }", "public void setSchema(String schema) {\n this.schema = schema;\n }", "public void setSchema(java.lang.String schema) {\r\n this.schema = schema;\r\n }", "String getRemoteSchema();", "public void setSchemaBaseURL(String schemaBaseURL) {\n this.schemaBaseURL = schemaBaseURL;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getSchemaUrlBytes() {\n java.lang.Object ref = schemaUrl_;\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 schemaUrl_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getSchemaLocation();", "public static String getSchema( String url )\n\t{\n\t\tString db = url.split( \":\" )[ 1 ];\n\t\tString result = null;\n\t\tif( SCHEMAS.containsKey( db ) )\n\t\t{\n\t\t\tresult = SCHEMAS.get( db );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif( MYSQL.equals( db ) )\n\t\t\t{\n//\t\t\t\tString dbNameAndProps = url.split( \"/\" )[ 3 ];\n//\t\t\t\tresult = dbNameAndProps.split( \"[?]\" )[ 0 ];\n\t\t\t\tresult = null;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public com.google.protobuf.ByteString\n getSchemaUrlBytes() {\n java.lang.Object ref = schemaUrl_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n schemaUrl_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setSchema(Schema schema)\n {\n this.schema = schema;\n }", "@Column(length = 2048)\r\n @PlaceHolder(key = \"schema\")\r\n public String getUrlPath() {\r\n return urlPath;\r\n }", "@ApiModelProperty(value = \"A URI to a JSON-Schema file that defines additional attributes and relationships\")\n\n\n public String getSchemaLocation() {\n return schemaLocation;\n }", "@ApiModelProperty(value = \"A URI to a JSON-Schema file that defines additional attributes and relationships\")\n\n\n public String getSchemaLocation() {\n return schemaLocation;\n }", "String getSchemaFile();", "void setSchema(S schema);", "String handlerSchema();", "private static Schema createSchema(URL url) throws SAXException {\n\t\tSchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);\n\t\treturn schemaFactory.newSchema(url);\n\t}", "public void setSchemaLocation(String schemaLocation) {\n\t\t\r\n\t}", "public String getSchemaLocation() {\r\n return schemaLocation;\r\n }", "public String getSchema()\n {\n return schema;\n }", "public String getSchema() {\n return schema;\n }", "public void createURL(){\n urlDB = ( PREFACE + server + \"/\" + database + options);\n }", "S getSchema();", "@Override\n public void setXMLSchema(URL url) throws XMLPlatformException {\n if (null == url) {\n return;\n }\n if (null == documentBuilderFactory) {\n loadDocumentBuilderFactory();\n }\n try {\n documentBuilderFactory.setAttribute(SCHEMA_LANGUAGE, XML_SCHEMA);\n documentBuilderFactory.setAttribute(JAXP_SCHEMA_SOURCE, url.toString());\n } catch (IllegalArgumentException e) {\n // The attribute isn't supported so do nothing\n } catch (Exception e) {\n XMLPlatformException.xmlPlatformErrorResolvingXMLSchema(url, e);\n }\n }", "public Builder setSchemaUrlBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n schemaUrl_ = value;\n onChanged();\n return this;\n }", "private String getSchema(Document doc) {\n\t\tElement rootElement = doc.getRootElement();\n\t\treturn rootElement.getAttributeValue(\"schemaLocation\", xsiNamespace).replace(\"http://www.github.com/biosemantics\", \"\").trim();\n\t}", "public String getSchema() {\n return schema;\n }", "public String getSchema() {\n return schema;\n }", "public java.lang.String getSchema() {\r\n return schema;\r\n }", "public void setldschema(String ldap_schema_url) throws Exception{\t\t\r\n\t\tjava.io.InputStream ldschemaxml = null;\t\t\r\n\t\ttry {\r\n\t\t\tldschemaxmlurl = new java.net.URL(ldap_schema_url);\t\t \r\n\t\t\tldschemaxml = ldschemaxmlurl.openStream();\t\t\t\r\n\t\t\tjavax.xml.parsers.DocumentBuilderFactory ldschemaDomFactory = javax.xml.parsers.DocumentBuilderFactory.newInstance();\r\n\t\t\tjavax.xml.parsers.DocumentBuilder ldschemaDB = ldschemaDomFactory.newDocumentBuilder();\r\n\t\t\torg.w3c.dom.Document ldschemaDom = ldschemaDB.parse(ldschemaxml);\r\n\t\t\torg.w3c.dom.Element ldschemaRootElement = ldschemaDom.getDocumentElement();\r\n\t\t\torg.w3c.dom.NodeList ldschemaNodeList = ldschemaRootElement.getChildNodes();\r\n\t\t\torg.w3c.dom.NodeList ldschemaChildNodeList;\r\n\t\t\torg.w3c.dom.Node templdschemaNode;\r\n\t\t\t// Get the number of the schema\r\n\t\t\tint schemaCount = 0;\t\t\t\r\n\t\t\tfor (int i=0; i<ldschemaNodeList.getLength(); i++) {\r\n\t\t\t templdschemaNode = ldschemaNodeList.item(i);\r\n\t\t\t if (templdschemaNode.getNodeName().startsWith(Constant.attNameElement)) schemaCount +=1;\r\n\t\t\t}\r\n\t\t\t//Dimension Attribute and Attribute Type Array \t\r\n\t\t\tconAttName = new String[schemaCount];\r\n\t\t\tconAttType = new String[schemaCount];\r\n\t\t\t//Input Attribute and Attribute Type Array Value\r\n\t\t\tint tempSchemaCount = 0;\r\n\t\t\tlogger.debug(\"[Central LDAP schema Loading \"+schemaCount+\" attributes Start]\");\r\n\t\t\tfor (int i=0; i<ldschemaNodeList.getLength(); i++) {\r\n\t\t\t\t templdschemaNode = ldschemaNodeList.item(i);\t\t \t\t \t \r\n\t\t\t\t if (templdschemaNode.getNodeName().startsWith(Constant.attNameElement)) {\r\n\t\t\t\t\tconAttName[tempSchemaCount] = (templdschemaNode.getFirstChild().getNodeValue()).toUpperCase();\t\t\t\t \r\n\t\t\t\t\tconAttType[tempSchemaCount] = ((org.w3c.dom.Element)templdschemaNode).getAttribute(\"vtype\");\r\n\t\t\t\t\t//Print Attribute and Attribute Type Array Information\r\n\t\t\t\t\tlogger.debug(\"[Central LDAP schema Name]\"+conAttName[tempSchemaCount]+\" [Type] \"+conAttType[tempSchemaCount]);\r\n\t\t\t\t\ttempSchemaCount +=1;\t\t\t\t \r\n\t\t\t\t }\r\n\t\t\t}\r\n\t\t\tlogger.debug(\"[Central LDAP schema Loading End][\"+tempSchemaCount+\" Elements Added\");\r\n\t\t}catch(MalformedURLException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\tlogger.error(\"[Central LDAP schema Loading]\"+e.getMessage(), e);\r\n\t\t\tthrow new Exception(e.getMessage());\r\n\t\t}catch(org.xml.sax.SAXParseException spe){\r\n\t\t\tlogger.error(\"\\n[Central LDAP schema Loading]** Parsing error, line \" + spe.getLineNumber() + \", uri \" + spe.getSystemId());\r\n\t\t\tlogger.error(\" \" + spe.getMessage());\r\n\t\t\tthrow new Exception(spe.getMessage());\t\t\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t\tlogger.error(\"[Central LDAP schema Loading]\"+ex.getMessage(), ex);\r\n\t\t\tthrow new Exception(ex.getMessage());\r\n\t\t}finally{\r\n\t\t\tif ( ldschemaxml != null ) ldschemaxml.close();\r\n\t\t}\t\t\r\n\t}", "@Test\n public void atSchemaLocationTest() {\n // TODO: test atSchemaLocation\n }", "Schema createSchema();", "Builder addSchemaVersion(String value);", "public String getSchemeSpecific() {\n return \"\";\n }", "private void fixSchemaDocumentUri(MetadataSchemaRecord schemaRecord) {\n fixSchemaDocumentUri(schemaRecord, false);\n }", "public String getSchemaLocation() {\r\n\t\treturn mSchemaLocation;\r\n\t}", "public void setURL(String inputSchema, String outputSchema) {\n String port = getPortValueForJS();\n browser.setUrl(\"http://localhost:\" + port + \"/dataMapper?port=\" + port + \"&inputtype=\" + inputSchema\n + \"&outputtype=\" + outputSchema + NO_CACHE);\n }", "public void setSchemaInstance(String schemaInstance) {\n\t\t\r\n\t}", "public void setObject_schema(String object_schema) {\n this.object_schema = object_schema == null ? null : object_schema.trim();\n }", "Builder addSchemaVersion(Text value);", "String getSchemaName();", "String getSchemaName();", "public void setlldschema(String lldap_schema_url) throws Exception{\t\t\r\n\t\tjava.io.InputStream lldschemaxml = null;\t\t\r\n\t\ttry {\t\t\t\r\n\t\t\tUtil.validateSchemaLocalLDAP(); // Validate the local ldap schema\t\t\t\r\n\t\t\tlldschemaxmlurl = new java.net.URL(lldap_schema_url);\t\t \r\n\t\t lldschemaxml = lldschemaxmlurl.openStream();\t\t\r\n\t\t\tjavax.xml.parsers.DocumentBuilderFactory lldschemaDomFactory = javax.xml.parsers.DocumentBuilderFactory.newInstance();\r\n\t\t\tjavax.xml.parsers.DocumentBuilder lldschemaDB = lldschemaDomFactory.newDocumentBuilder();\r\n\t\t\torg.w3c.dom.Document lldschemaDom = lldschemaDB.parse(lldschemaxml);\r\n\t\t\torg.w3c.dom.Element lldschemaRootElement = lldschemaDom.getDocumentElement();\r\n\t\t\torg.w3c.dom.NodeList lldschemaNodeList = lldschemaRootElement.getChildNodes();\r\n\t\t \torg.w3c.dom.NodeList lldschemaChildNodeList;\r\n\t\t\torg.w3c.dom.Node templldschemaNode;\r\n\t\t\t// Get the number of the schema\r\n\t\t\tint schemaCount = 0;\t\t\r\n\t\t\tfor (int i=0; i<lldschemaNodeList.getLength(); i++) {\r\n\t\t templldschemaNode = lldschemaNodeList.item(i);\r\n\t\t\t if (templldschemaNode.getNodeName().startsWith(Constant.attNameElement)) schemaCount +=1;\r\n\t\t\t}\r\n\t\t\t// Dimension new Attribute and Attribute Type Array \t\r\n\t\t \tString[] tmp_conAttName = new String[conAttName.length + schemaCount];\r\n\t\t \tString[] tmp_conAttType = new String[conAttType.length + schemaCount];\r\n\t\t \t// Reload old Attribute and Attribute Type to Temp Array \r\n\t\t \tfor (int i=0; i<conAttName.length; i++){\r\n\t\t \t\ttmp_conAttName[i] = conAttName[i];\r\n\t\t \t\ttmp_conAttType[i] = conAttType[i];\r\n\t\t \t}\r\n\t\t\t//Input Attribute and Attribute Type Array Value\r\n\t\t\tint tempSchemaCount = conAttName.length;\r\n\t\t\tlogger.debug(\"[Local LDAP schema Loading Start]\");\r\n\t\t for (int i=0; i<lldschemaNodeList.getLength(); i++) {\r\n\t\t \ttemplldschemaNode = lldschemaNodeList.item(i);\r\n\t\t if (templldschemaNode.getNodeName().startsWith(Constant.attNameElement)) {\t\t \t\r\n\t\t \tif ( templldschemaNode.getFirstChild() == null ) throw new Exception(\"xml element called attibute_name not allow empty string\");\r\n\t\t tmp_conAttName[tempSchemaCount] = templldschemaNode.getFirstChild().getNodeValue();\r\n\t\t\t\t tmp_conAttType[tempSchemaCount] = ((org.w3c.dom.Element)templldschemaNode).getAttribute(\"vtype\");\t\t\t\t \r\n\t\t\t\t\tlogger.debug(\"[Local LDAP schema Name] \"+tmp_conAttName[tempSchemaCount]+\" [Type] \"+tmp_conAttType[tempSchemaCount]);\r\n\t\t\t\t tempSchemaCount +=1;\t\t\t\t \r\n\t\t \t\t }\r\n\t\t\t}\r\n\t\t\tif (tempSchemaCount == conAttName.length) {\r\n\t\t\t\tlogger.debug(\"No Local LDAP Schema Attribute Added !\");\r\n\t\t\t} else {\r\n\t\t\t// Reload Attribute and Attribute Type to Array \r\n\t\t\t\tconAttName = new String[tempSchemaCount];\r\n\t\t\t\tconAttType = new String[tempSchemaCount];\r\n\t\t\t\tfor (int i=0; i<conAttName.length; i++){\r\n\t\t\t\t\tconAttName[i] = tmp_conAttName[i];\r\n\t\t\t\t\tconAttType[i] = tmp_conAttType[i];\r\n\t\t\t\t}\t\t\t\t \r\n\t\t\t}\r\n\t\t\tlogger.debug(\"[Local LDAP schema Loading End][Total \"+tempSchemaCount+\" Attriutes in Array]\");\r\n\t\t} catch(MalformedURLException e){\r\n\t\t\te.printStackTrace();\t\t\t\r\n\t\t\tlogger.error(\"[Local LDAP schema Loading]\"+e.getMessage(), e);\r\n\t\t\tthrow new Exception(e.getMessage());\r\n\t\t} catch(org.xml.sax.SAXParseException spe){\r\n\t\t\tlogger.error(\"\\n[Local LDAP schema Loading]** Parsing error, line \" + spe.getLineNumber() + \", uri \" + spe.getSystemId());\r\n\t\t\tlogger.error(\" \" + spe.getMessage());\r\n\t\t\tthrow new Exception(spe.getMessage());\t\t\t\t\r\n\t\t} catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t\tlogger.error(\"[Local LDAP schema Loading]\"+ex.getMessage(), ex);\r\n\t\t\tthrow new Exception(ex.getMessage());\r\n\t\t} finally {\r\n\t\t\tif ( lldschemaxml != null ) lldschemaxml.close();\r\n\t\t}\r\n\t}", "public void setSchema(String schema)\n {\n if(this.props == null)\n {\n this.props = new Properties();\n }\n this.props.setProperty(\"db.schema\", schema);\n }", "public Schema getSchema();", "@Override\r\n\t\tpublic void setSchema(String schema) throws SQLException {\n\t\t\t\r\n\t\t}", "public void setSchema(String aValue) {\n String oldValue = schema;\n schema = aValue;\n changeSupport.firePropertyChange(\"schema\", oldValue, aValue);\n }", "SchemaBuilder withResourceResolver(LSResourceResolver resourceResolver);", "String getSchemaVersion();", "SchemaDefinition createSchemaDefinition();", "public String schema() {\n return schemaName;\n }", "public String schema() {\n return schemaName;\n }", "public String getSchemaName() { return schemaName; }", "public MetaSchema getMetaSchema(int iSchema);", "public String getObject_schema() {\n return object_schema;\n }", "public String getStrDataSchema() {\n return strDataSchema;\n }", "public boolean setSchema(String schema){\n \ttry {\n \t\tsql = connection.createStatement();\n\t\t\tString sqlText;\n\t\t\tsqlText = \"SET search_path TO \" + schema;\n\t\t\tsql.executeUpdate(sqlText);\n\t\t} catch (SQLException e) {\n\t\t\treturn false;\n\t\t}\n \treturn true;\n }", "public String getSchemaPath(final String requestUrl) {\n // find out if we have a known route, e.g. /rules, /bnrules, etc.\n final Optional<String> match = businessObjectToJsonSchema.keySet().stream().filter(requestUrl::contains).findAny();\n\n if (match.isEmpty()) {\n logger.debug(\"Schema validation not configured for: {}\", requestUrl);\n return null; // the request has not mapping, meaning there is no schema for this request URL's payload\n }\n\n final String route = match.get();\n // find out if there are trailing elements after the base mapping (e.g. rules/<hash>). If so, we validate.\n if (requestUrl.lastIndexOf(route) >= requestUrl.lastIndexOf(\"/\")) {\n // this means we have no hash or any other trailing path components after the route. We are not validating this.\n // The payloads we are interested in are always qualified with a hash, a country, etc.\n return null;\n }\n // since there is currently only one schema per route, we can take the route as a key for the schema\n // e.g. if we have /rules/<something>, we use the same schema, no matter what <something> is.\n return businessObjectToJsonSchema.get(route);\n }", "public String getSchema()\n {\n String schema = \"\";\n if(this.props != null && !this.props.isEmpty())\n {\n schema = this.props.getProperty(\"db.schema\");\n }\n \n return schema;\n }", "public URI getSchemaDocumentUri(MetadataSchemaRecord schemaRecord) {\n return WebMvcLinkBuilder.linkTo(WebMvcLinkBuilder.methodOn(this.getClass()).getSchemaDocumentById(schemaRecord.getSchemaId(), schemaRecord.getSchemaVersion(), null, null)).toUri();\n }", "public interface HeaderSchema {\n String code = \"c\";//服务器返回码\n String error_msg = \"e\";//服务器返回错误信息\n}", "public static void setDatabaseURL(String url){\n databaseURL=url;\n }", "static Path getSchemaPath(Configuration conf) {\n int iteration = lastSchemaUpdate(conf);\n return getOutputPath(conf, SCHEMA_BASE + iteration);\n }", "private static String composeApiUrl(String string){\r\n\t\treturn API_BASE + API_VERSION + string;\r\n\t}", "String getScheme();", "@Test\n public void testPartitionOne()\n {\n\t UrlValidator urlVal = new UrlValidator(null, null, UrlValidator.ALLOW_ALL_SCHEMES);\n\t String resource = \"://www.example.com\";\n\t ArrayList<ResultPair> schemaUrls = new ArrayList<ResultPair>();\n\t //append the static valid resource string to each schema as a new pair\n\t for(ResultPair schema : this.m_schemas)\n\t {\n\t\t ResultPair pair = new ResultPair(schema.item + resource, schema.valid);\n\t\t schemaUrls.add(pair);\n\t }\n\t //test each now full URL\n\t for(ResultPair pair : schemaUrls)\n\t {\n\t\t collector.checkThat(pair.item, pair.valid, equalTo(urlVal.isValid(pair.item)));\n\t }\n }", "public Schema(final String reference) throws IOException {\n\t\tsuper(reference);\n\t}", "public test_SDURL(String n) {\n super(n);\n }", "java.lang.String getScheme();", "public String getSchema()\n\t{\n\t\t//begin vpj-cd e-evolution 03/04/2005\n\t\treturn \"compiere\";\n\t\t//end vpj-cd e-evolution 03/04/2005\n\t}", "public void setSchema(URI aSchemaUri) throws SAXException, MalformedURLException {\n schema = SCHEMA_FACTORY.newSchema(aSchemaUri.toURL());\n }", "public String getScheme() {\n return scheme;\n }", "public String getScheme() {\n return scheme;\n }", "public String getScheme() {\n return scheme;\n }", "public void setSubSchema(String subSchema) {\n this.subSchema = subSchema;\n }", "public SchemaInfo getSchema () throws Exception;", "public String getIdGeneratorDatabaseConnectionUrl(){\n \t\treturn getProperty(\"org.sagebionetworks.id.generator.database.connection.url\");\n \t}", "public int getMetaSchemas();", "String createParameterJsonSchema();", "@Override\r\n public String getScheme() {\r\n return scheme;\r\n }", "AstroSchema getSchema();", "public void addSchema (final String uri, final IslandSchema s)\n {\n if (m_aSchemata.containsKey (uri))\n throw new IllegalArgumentException ();\n m_aSchemata.put (uri, s);\n }", "public static Schema getSchema(final String schemaURL) {\r\n Schema s = null;\r\n try {\r\n final URL url = FileUtils.getResource(schemaURL);\r\n \t\r\n final File file = FileUtils.getFile(schemaURL);\r\n \r\n\r\n if (logB.isInfoEnabled()) {\r\n logB.info(\"XmlFactory.getSchema : retrieve schema and compile it : \" + schemaURL);\r\n }\r\n\r\n // 2. Compile the schema.\r\n final long start = System.nanoTime();\r\n\r\n SchemaFactory sf = getSchemaFactory();\r\n s = sf.newSchema(url);\r\n \r\n\r\n TimerFactory.getTimer(\"XmlFactory.getSchema[\" + schemaURL + \"]\").addMilliSeconds(start, System.nanoTime());\r\n\r\n if (logB.isInfoEnabled()) {\r\n logB.info(\"XmlFactory.getSchema : schema ready : \" + s);\r\n }\r\n\r\n } catch (final SAXException se) {\r\n throw new IllegalStateException(\"XmlFactory.getSchema : unable to create a Schema for : \" + schemaURL, se);\r\n/* } catch (final MalformedURLException mue) {\r\n throw new IllegalStateException(\"XmlFactory.getSchema : unable to create a Schema for : \" + schemaURL, mue);\r\n*/ }\r\n return s;\r\n }", "private DefaultSchema() {\n super(\"\", null);\n }", "BigDecimal getLqncoreSchemaVersion();", "@Value.Default\n public String getUri() {\n\treturn \"\";\n }", "private String initUrlParameter() {\n StringBuffer url = new StringBuffer();\n url.append(URL).append(initPathParameter());\n return url.toString();\n }", "@VisibleForTesting\n public JsonSchemaValidator(final URI baseUri) {\n this.jsonSchemaFactory = JsonSchemaFactory.getInstance(SpecVersion.VersionFlag.V7);\n this.baseUri = baseUri;\n }", "SchemaReference setVersion(String version);", "public void testYourFirstPartition() {\r\n\t UrlValidator urlVal = new UrlValidator(null, null, UrlValidator.ALLOW_ALL_SCHEMES);\r\n\t System.out.println(\"1st partition with a valid scheme = true: \" + urlVal.isValid(\"http://www.google.com\")); //bug here = does not account for http://\r\n System.out.println(\"1st partition with a invalid scheme = false: \" + urlVal.isValid(\"://go.a1a:65a\")); \r\n }", "public void setStrDataSchema(final String strDataSchema) {\n this.strDataSchema = strDataSchema;\n }", "public SchemaDef getSourceSchema();", "public interface SensorSchema\n{\n String ID = \"_id\";\n String SENSOR_ID = \"sensor_id\";\n String NAME = \"name\";\n String PIN_NUMBER = \"pin_number\";\n String FREQUENCY = \"frequency\";\n String TIME_UNIT = \"time_unit\";\n String INPUT_TYPE = \"input_type\";\n String MEASUREMENT_TYPE = \"measurement_type\";\n String THRESHOLD = \"threshold\";\n String THRESHOLD_TYPE = \"threshold_type\";\n String STATE = \"state\";\n String USE_XIVELY = \"use_xively\";\n String DATASTREAM = \"datastream\";\n}", "public void setScheme(String newValue);", "private void fixSchemaDocumentUri(MetadataSchemaRecord schemaRecord, boolean saveUrl) {\n String schemaDocumentUri = schemaRecord.getSchemaDocumentUri();\n schemaRecord.setSchemaDocumentUri(getSchemaDocumentUri(schemaRecord).toString());\n LOG.trace(\"Fix schema document Uri '{}' -> '{}'\", schemaDocumentUri, schemaRecord.getSchemaDocumentUri());\n if (saveUrl) {\n LOG.trace(\"Store path for URI!\");\n Url2Path url2Path = new Url2Path();\n url2Path.setPath(schemaDocumentUri);\n url2Path.setUrl(schemaRecord.getSchemaDocumentUri());\n url2Path.setType(schemaRecord.getType());\n url2Path.setVersion(schemaRecord.getSchemaVersion());\n url2PathDao.save(url2Path);\n }\n }" ]
[ "0.7147353", "0.6984463", "0.6984463", "0.6629155", "0.66020215", "0.65841216", "0.6364115", "0.6349817", "0.6290244", "0.623084", "0.61599565", "0.61357313", "0.60573936", "0.59503204", "0.5879538", "0.58049405", "0.5789022", "0.5789022", "0.57843155", "0.578323", "0.5769759", "0.5767667", "0.5762977", "0.57459414", "0.57310104", "0.5706264", "0.56904745", "0.5569326", "0.5563721", "0.55581963", "0.5549666", "0.55441135", "0.55441135", "0.54911244", "0.54807526", "0.54463154", "0.54457366", "0.5444", "0.54438764", "0.542985", "0.53788245", "0.5371495", "0.5365843", "0.5353684", "0.5348177", "0.5345693", "0.5345693", "0.53356576", "0.5314088", "0.5295183", "0.5294992", "0.5263575", "0.52472883", "0.52293414", "0.52218616", "0.52130747", "0.52130747", "0.5203701", "0.5198971", "0.5193373", "0.5182805", "0.51563543", "0.51445854", "0.51256216", "0.5124387", "0.5118153", "0.5095768", "0.50947976", "0.5080895", "0.50749457", "0.5067582", "0.5045139", "0.50383145", "0.502869", "0.5012795", "0.49950647", "0.49940136", "0.49940136", "0.49940136", "0.49924836", "0.49904507", "0.49875924", "0.49874806", "0.49778548", "0.4964115", "0.4948847", "0.4944569", "0.49292448", "0.49115318", "0.49096707", "0.49077758", "0.48822856", "0.48789853", "0.48758745", "0.48752138", "0.48751476", "0.48718512", "0.48692214", "0.48660442", "0.48657748" ]
0.6460415
6
schema_url string schema_url = 10;
public com.google.protobuf.ByteString getSchemaUrlBytes() { java.lang.Object ref = schemaUrl_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); schemaUrl_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String getSchemaURI();", "void schema(String schema);", "void schema(String schema);", "public Builder setSchemaUrl(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n schemaUrl_ = value;\n onChanged();\n return this;\n }", "Builder addSchemaVersion(URL value);", "@java.lang.Override\n public java.lang.String getSchemaUrl() {\n java.lang.Object ref = schemaUrl_;\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 schemaUrl_ = s;\n return s;\n }\n }", "public java.lang.String getSchemaUrl() {\n java.lang.Object ref = schemaUrl_;\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 schemaUrl_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public void setSchema(String schema) {\n this.schema = schema;\n }", "public void setSchema(java.lang.String schema) {\r\n this.schema = schema;\r\n }", "String getRemoteSchema();", "public void setSchemaBaseURL(String schemaBaseURL) {\n this.schemaBaseURL = schemaBaseURL;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getSchemaUrlBytes() {\n java.lang.Object ref = schemaUrl_;\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 schemaUrl_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getSchemaLocation();", "public static String getSchema( String url )\n\t{\n\t\tString db = url.split( \":\" )[ 1 ];\n\t\tString result = null;\n\t\tif( SCHEMAS.containsKey( db ) )\n\t\t{\n\t\t\tresult = SCHEMAS.get( db );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif( MYSQL.equals( db ) )\n\t\t\t{\n//\t\t\t\tString dbNameAndProps = url.split( \"/\" )[ 3 ];\n//\t\t\t\tresult = dbNameAndProps.split( \"[?]\" )[ 0 ];\n\t\t\t\tresult = null;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public void setSchema(Schema schema)\n {\n this.schema = schema;\n }", "@Column(length = 2048)\r\n @PlaceHolder(key = \"schema\")\r\n public String getUrlPath() {\r\n return urlPath;\r\n }", "@ApiModelProperty(value = \"A URI to a JSON-Schema file that defines additional attributes and relationships\")\n\n\n public String getSchemaLocation() {\n return schemaLocation;\n }", "@ApiModelProperty(value = \"A URI to a JSON-Schema file that defines additional attributes and relationships\")\n\n\n public String getSchemaLocation() {\n return schemaLocation;\n }", "String getSchemaFile();", "void setSchema(S schema);", "String handlerSchema();", "private static Schema createSchema(URL url) throws SAXException {\n\t\tSchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);\n\t\treturn schemaFactory.newSchema(url);\n\t}", "public void setSchemaLocation(String schemaLocation) {\n\t\t\r\n\t}", "public String getSchemaLocation() {\r\n return schemaLocation;\r\n }", "public String getSchema()\n {\n return schema;\n }", "public String getSchema() {\n return schema;\n }", "public void createURL(){\n urlDB = ( PREFACE + server + \"/\" + database + options);\n }", "S getSchema();", "@Override\n public void setXMLSchema(URL url) throws XMLPlatformException {\n if (null == url) {\n return;\n }\n if (null == documentBuilderFactory) {\n loadDocumentBuilderFactory();\n }\n try {\n documentBuilderFactory.setAttribute(SCHEMA_LANGUAGE, XML_SCHEMA);\n documentBuilderFactory.setAttribute(JAXP_SCHEMA_SOURCE, url.toString());\n } catch (IllegalArgumentException e) {\n // The attribute isn't supported so do nothing\n } catch (Exception e) {\n XMLPlatformException.xmlPlatformErrorResolvingXMLSchema(url, e);\n }\n }", "public Builder setSchemaUrlBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n schemaUrl_ = value;\n onChanged();\n return this;\n }", "private String getSchema(Document doc) {\n\t\tElement rootElement = doc.getRootElement();\n\t\treturn rootElement.getAttributeValue(\"schemaLocation\", xsiNamespace).replace(\"http://www.github.com/biosemantics\", \"\").trim();\n\t}", "public String getSchema() {\n return schema;\n }", "public String getSchema() {\n return schema;\n }", "public java.lang.String getSchema() {\r\n return schema;\r\n }", "public void setldschema(String ldap_schema_url) throws Exception{\t\t\r\n\t\tjava.io.InputStream ldschemaxml = null;\t\t\r\n\t\ttry {\r\n\t\t\tldschemaxmlurl = new java.net.URL(ldap_schema_url);\t\t \r\n\t\t\tldschemaxml = ldschemaxmlurl.openStream();\t\t\t\r\n\t\t\tjavax.xml.parsers.DocumentBuilderFactory ldschemaDomFactory = javax.xml.parsers.DocumentBuilderFactory.newInstance();\r\n\t\t\tjavax.xml.parsers.DocumentBuilder ldschemaDB = ldschemaDomFactory.newDocumentBuilder();\r\n\t\t\torg.w3c.dom.Document ldschemaDom = ldschemaDB.parse(ldschemaxml);\r\n\t\t\torg.w3c.dom.Element ldschemaRootElement = ldschemaDom.getDocumentElement();\r\n\t\t\torg.w3c.dom.NodeList ldschemaNodeList = ldschemaRootElement.getChildNodes();\r\n\t\t\torg.w3c.dom.NodeList ldschemaChildNodeList;\r\n\t\t\torg.w3c.dom.Node templdschemaNode;\r\n\t\t\t// Get the number of the schema\r\n\t\t\tint schemaCount = 0;\t\t\t\r\n\t\t\tfor (int i=0; i<ldschemaNodeList.getLength(); i++) {\r\n\t\t\t templdschemaNode = ldschemaNodeList.item(i);\r\n\t\t\t if (templdschemaNode.getNodeName().startsWith(Constant.attNameElement)) schemaCount +=1;\r\n\t\t\t}\r\n\t\t\t//Dimension Attribute and Attribute Type Array \t\r\n\t\t\tconAttName = new String[schemaCount];\r\n\t\t\tconAttType = new String[schemaCount];\r\n\t\t\t//Input Attribute and Attribute Type Array Value\r\n\t\t\tint tempSchemaCount = 0;\r\n\t\t\tlogger.debug(\"[Central LDAP schema Loading \"+schemaCount+\" attributes Start]\");\r\n\t\t\tfor (int i=0; i<ldschemaNodeList.getLength(); i++) {\r\n\t\t\t\t templdschemaNode = ldschemaNodeList.item(i);\t\t \t\t \t \r\n\t\t\t\t if (templdschemaNode.getNodeName().startsWith(Constant.attNameElement)) {\r\n\t\t\t\t\tconAttName[tempSchemaCount] = (templdschemaNode.getFirstChild().getNodeValue()).toUpperCase();\t\t\t\t \r\n\t\t\t\t\tconAttType[tempSchemaCount] = ((org.w3c.dom.Element)templdschemaNode).getAttribute(\"vtype\");\r\n\t\t\t\t\t//Print Attribute and Attribute Type Array Information\r\n\t\t\t\t\tlogger.debug(\"[Central LDAP schema Name]\"+conAttName[tempSchemaCount]+\" [Type] \"+conAttType[tempSchemaCount]);\r\n\t\t\t\t\ttempSchemaCount +=1;\t\t\t\t \r\n\t\t\t\t }\r\n\t\t\t}\r\n\t\t\tlogger.debug(\"[Central LDAP schema Loading End][\"+tempSchemaCount+\" Elements Added\");\r\n\t\t}catch(MalformedURLException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\tlogger.error(\"[Central LDAP schema Loading]\"+e.getMessage(), e);\r\n\t\t\tthrow new Exception(e.getMessage());\r\n\t\t}catch(org.xml.sax.SAXParseException spe){\r\n\t\t\tlogger.error(\"\\n[Central LDAP schema Loading]** Parsing error, line \" + spe.getLineNumber() + \", uri \" + spe.getSystemId());\r\n\t\t\tlogger.error(\" \" + spe.getMessage());\r\n\t\t\tthrow new Exception(spe.getMessage());\t\t\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t\tlogger.error(\"[Central LDAP schema Loading]\"+ex.getMessage(), ex);\r\n\t\t\tthrow new Exception(ex.getMessage());\r\n\t\t}finally{\r\n\t\t\tif ( ldschemaxml != null ) ldschemaxml.close();\r\n\t\t}\t\t\r\n\t}", "@Test\n public void atSchemaLocationTest() {\n // TODO: test atSchemaLocation\n }", "Schema createSchema();", "public String getSchemeSpecific() {\n return \"\";\n }", "Builder addSchemaVersion(String value);", "private void fixSchemaDocumentUri(MetadataSchemaRecord schemaRecord) {\n fixSchemaDocumentUri(schemaRecord, false);\n }", "public String getSchemaLocation() {\r\n\t\treturn mSchemaLocation;\r\n\t}", "public void setURL(String inputSchema, String outputSchema) {\n String port = getPortValueForJS();\n browser.setUrl(\"http://localhost:\" + port + \"/dataMapper?port=\" + port + \"&inputtype=\" + inputSchema\n + \"&outputtype=\" + outputSchema + NO_CACHE);\n }", "public void setSchemaInstance(String schemaInstance) {\n\t\t\r\n\t}", "public void setObject_schema(String object_schema) {\n this.object_schema = object_schema == null ? null : object_schema.trim();\n }", "Builder addSchemaVersion(Text value);", "String getSchemaName();", "String getSchemaName();", "public void setlldschema(String lldap_schema_url) throws Exception{\t\t\r\n\t\tjava.io.InputStream lldschemaxml = null;\t\t\r\n\t\ttry {\t\t\t\r\n\t\t\tUtil.validateSchemaLocalLDAP(); // Validate the local ldap schema\t\t\t\r\n\t\t\tlldschemaxmlurl = new java.net.URL(lldap_schema_url);\t\t \r\n\t\t lldschemaxml = lldschemaxmlurl.openStream();\t\t\r\n\t\t\tjavax.xml.parsers.DocumentBuilderFactory lldschemaDomFactory = javax.xml.parsers.DocumentBuilderFactory.newInstance();\r\n\t\t\tjavax.xml.parsers.DocumentBuilder lldschemaDB = lldschemaDomFactory.newDocumentBuilder();\r\n\t\t\torg.w3c.dom.Document lldschemaDom = lldschemaDB.parse(lldschemaxml);\r\n\t\t\torg.w3c.dom.Element lldschemaRootElement = lldschemaDom.getDocumentElement();\r\n\t\t\torg.w3c.dom.NodeList lldschemaNodeList = lldschemaRootElement.getChildNodes();\r\n\t\t \torg.w3c.dom.NodeList lldschemaChildNodeList;\r\n\t\t\torg.w3c.dom.Node templldschemaNode;\r\n\t\t\t// Get the number of the schema\r\n\t\t\tint schemaCount = 0;\t\t\r\n\t\t\tfor (int i=0; i<lldschemaNodeList.getLength(); i++) {\r\n\t\t templldschemaNode = lldschemaNodeList.item(i);\r\n\t\t\t if (templldschemaNode.getNodeName().startsWith(Constant.attNameElement)) schemaCount +=1;\r\n\t\t\t}\r\n\t\t\t// Dimension new Attribute and Attribute Type Array \t\r\n\t\t \tString[] tmp_conAttName = new String[conAttName.length + schemaCount];\r\n\t\t \tString[] tmp_conAttType = new String[conAttType.length + schemaCount];\r\n\t\t \t// Reload old Attribute and Attribute Type to Temp Array \r\n\t\t \tfor (int i=0; i<conAttName.length; i++){\r\n\t\t \t\ttmp_conAttName[i] = conAttName[i];\r\n\t\t \t\ttmp_conAttType[i] = conAttType[i];\r\n\t\t \t}\r\n\t\t\t//Input Attribute and Attribute Type Array Value\r\n\t\t\tint tempSchemaCount = conAttName.length;\r\n\t\t\tlogger.debug(\"[Local LDAP schema Loading Start]\");\r\n\t\t for (int i=0; i<lldschemaNodeList.getLength(); i++) {\r\n\t\t \ttemplldschemaNode = lldschemaNodeList.item(i);\r\n\t\t if (templldschemaNode.getNodeName().startsWith(Constant.attNameElement)) {\t\t \t\r\n\t\t \tif ( templldschemaNode.getFirstChild() == null ) throw new Exception(\"xml element called attibute_name not allow empty string\");\r\n\t\t tmp_conAttName[tempSchemaCount] = templldschemaNode.getFirstChild().getNodeValue();\r\n\t\t\t\t tmp_conAttType[tempSchemaCount] = ((org.w3c.dom.Element)templldschemaNode).getAttribute(\"vtype\");\t\t\t\t \r\n\t\t\t\t\tlogger.debug(\"[Local LDAP schema Name] \"+tmp_conAttName[tempSchemaCount]+\" [Type] \"+tmp_conAttType[tempSchemaCount]);\r\n\t\t\t\t tempSchemaCount +=1;\t\t\t\t \r\n\t\t \t\t }\r\n\t\t\t}\r\n\t\t\tif (tempSchemaCount == conAttName.length) {\r\n\t\t\t\tlogger.debug(\"No Local LDAP Schema Attribute Added !\");\r\n\t\t\t} else {\r\n\t\t\t// Reload Attribute and Attribute Type to Array \r\n\t\t\t\tconAttName = new String[tempSchemaCount];\r\n\t\t\t\tconAttType = new String[tempSchemaCount];\r\n\t\t\t\tfor (int i=0; i<conAttName.length; i++){\r\n\t\t\t\t\tconAttName[i] = tmp_conAttName[i];\r\n\t\t\t\t\tconAttType[i] = tmp_conAttType[i];\r\n\t\t\t\t}\t\t\t\t \r\n\t\t\t}\r\n\t\t\tlogger.debug(\"[Local LDAP schema Loading End][Total \"+tempSchemaCount+\" Attriutes in Array]\");\r\n\t\t} catch(MalformedURLException e){\r\n\t\t\te.printStackTrace();\t\t\t\r\n\t\t\tlogger.error(\"[Local LDAP schema Loading]\"+e.getMessage(), e);\r\n\t\t\tthrow new Exception(e.getMessage());\r\n\t\t} catch(org.xml.sax.SAXParseException spe){\r\n\t\t\tlogger.error(\"\\n[Local LDAP schema Loading]** Parsing error, line \" + spe.getLineNumber() + \", uri \" + spe.getSystemId());\r\n\t\t\tlogger.error(\" \" + spe.getMessage());\r\n\t\t\tthrow new Exception(spe.getMessage());\t\t\t\t\r\n\t\t} catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t\tlogger.error(\"[Local LDAP schema Loading]\"+ex.getMessage(), ex);\r\n\t\t\tthrow new Exception(ex.getMessage());\r\n\t\t} finally {\r\n\t\t\tif ( lldschemaxml != null ) lldschemaxml.close();\r\n\t\t}\r\n\t}", "public void setSchema(String schema)\n {\n if(this.props == null)\n {\n this.props = new Properties();\n }\n this.props.setProperty(\"db.schema\", schema);\n }", "public Schema getSchema();", "@Override\r\n\t\tpublic void setSchema(String schema) throws SQLException {\n\t\t\t\r\n\t\t}", "public void setSchema(String aValue) {\n String oldValue = schema;\n schema = aValue;\n changeSupport.firePropertyChange(\"schema\", oldValue, aValue);\n }", "SchemaBuilder withResourceResolver(LSResourceResolver resourceResolver);", "String getSchemaVersion();", "SchemaDefinition createSchemaDefinition();", "public String schema() {\n return schemaName;\n }", "public String schema() {\n return schemaName;\n }", "public String getSchemaName() { return schemaName; }", "public MetaSchema getMetaSchema(int iSchema);", "public String getObject_schema() {\n return object_schema;\n }", "public String getStrDataSchema() {\n return strDataSchema;\n }", "public boolean setSchema(String schema){\n \ttry {\n \t\tsql = connection.createStatement();\n\t\t\tString sqlText;\n\t\t\tsqlText = \"SET search_path TO \" + schema;\n\t\t\tsql.executeUpdate(sqlText);\n\t\t} catch (SQLException e) {\n\t\t\treturn false;\n\t\t}\n \treturn true;\n }", "public String getSchemaPath(final String requestUrl) {\n // find out if we have a known route, e.g. /rules, /bnrules, etc.\n final Optional<String> match = businessObjectToJsonSchema.keySet().stream().filter(requestUrl::contains).findAny();\n\n if (match.isEmpty()) {\n logger.debug(\"Schema validation not configured for: {}\", requestUrl);\n return null; // the request has not mapping, meaning there is no schema for this request URL's payload\n }\n\n final String route = match.get();\n // find out if there are trailing elements after the base mapping (e.g. rules/<hash>). If so, we validate.\n if (requestUrl.lastIndexOf(route) >= requestUrl.lastIndexOf(\"/\")) {\n // this means we have no hash or any other trailing path components after the route. We are not validating this.\n // The payloads we are interested in are always qualified with a hash, a country, etc.\n return null;\n }\n // since there is currently only one schema per route, we can take the route as a key for the schema\n // e.g. if we have /rules/<something>, we use the same schema, no matter what <something> is.\n return businessObjectToJsonSchema.get(route);\n }", "public String getSchema()\n {\n String schema = \"\";\n if(this.props != null && !this.props.isEmpty())\n {\n schema = this.props.getProperty(\"db.schema\");\n }\n \n return schema;\n }", "public URI getSchemaDocumentUri(MetadataSchemaRecord schemaRecord) {\n return WebMvcLinkBuilder.linkTo(WebMvcLinkBuilder.methodOn(this.getClass()).getSchemaDocumentById(schemaRecord.getSchemaId(), schemaRecord.getSchemaVersion(), null, null)).toUri();\n }", "public interface HeaderSchema {\n String code = \"c\";//服务器返回码\n String error_msg = \"e\";//服务器返回错误信息\n}", "public static void setDatabaseURL(String url){\n databaseURL=url;\n }", "static Path getSchemaPath(Configuration conf) {\n int iteration = lastSchemaUpdate(conf);\n return getOutputPath(conf, SCHEMA_BASE + iteration);\n }", "private static String composeApiUrl(String string){\r\n\t\treturn API_BASE + API_VERSION + string;\r\n\t}", "String getScheme();", "@Test\n public void testPartitionOne()\n {\n\t UrlValidator urlVal = new UrlValidator(null, null, UrlValidator.ALLOW_ALL_SCHEMES);\n\t String resource = \"://www.example.com\";\n\t ArrayList<ResultPair> schemaUrls = new ArrayList<ResultPair>();\n\t //append the static valid resource string to each schema as a new pair\n\t for(ResultPair schema : this.m_schemas)\n\t {\n\t\t ResultPair pair = new ResultPair(schema.item + resource, schema.valid);\n\t\t schemaUrls.add(pair);\n\t }\n\t //test each now full URL\n\t for(ResultPair pair : schemaUrls)\n\t {\n\t\t collector.checkThat(pair.item, pair.valid, equalTo(urlVal.isValid(pair.item)));\n\t }\n }", "public Schema(final String reference) throws IOException {\n\t\tsuper(reference);\n\t}", "public test_SDURL(String n) {\n super(n);\n }", "java.lang.String getScheme();", "public String getSchema()\n\t{\n\t\t//begin vpj-cd e-evolution 03/04/2005\n\t\treturn \"compiere\";\n\t\t//end vpj-cd e-evolution 03/04/2005\n\t}", "public void setSchema(URI aSchemaUri) throws SAXException, MalformedURLException {\n schema = SCHEMA_FACTORY.newSchema(aSchemaUri.toURL());\n }", "public String getScheme() {\n return scheme;\n }", "public String getScheme() {\n return scheme;\n }", "public String getScheme() {\n return scheme;\n }", "public void setSubSchema(String subSchema) {\n this.subSchema = subSchema;\n }", "public SchemaInfo getSchema () throws Exception;", "public int getMetaSchemas();", "public String getIdGeneratorDatabaseConnectionUrl(){\n \t\treturn getProperty(\"org.sagebionetworks.id.generator.database.connection.url\");\n \t}", "String createParameterJsonSchema();", "@Override\r\n public String getScheme() {\r\n return scheme;\r\n }", "AstroSchema getSchema();", "public void addSchema (final String uri, final IslandSchema s)\n {\n if (m_aSchemata.containsKey (uri))\n throw new IllegalArgumentException ();\n m_aSchemata.put (uri, s);\n }", "public static Schema getSchema(final String schemaURL) {\r\n Schema s = null;\r\n try {\r\n final URL url = FileUtils.getResource(schemaURL);\r\n \t\r\n final File file = FileUtils.getFile(schemaURL);\r\n \r\n\r\n if (logB.isInfoEnabled()) {\r\n logB.info(\"XmlFactory.getSchema : retrieve schema and compile it : \" + schemaURL);\r\n }\r\n\r\n // 2. Compile the schema.\r\n final long start = System.nanoTime();\r\n\r\n SchemaFactory sf = getSchemaFactory();\r\n s = sf.newSchema(url);\r\n \r\n\r\n TimerFactory.getTimer(\"XmlFactory.getSchema[\" + schemaURL + \"]\").addMilliSeconds(start, System.nanoTime());\r\n\r\n if (logB.isInfoEnabled()) {\r\n logB.info(\"XmlFactory.getSchema : schema ready : \" + s);\r\n }\r\n\r\n } catch (final SAXException se) {\r\n throw new IllegalStateException(\"XmlFactory.getSchema : unable to create a Schema for : \" + schemaURL, se);\r\n/* } catch (final MalformedURLException mue) {\r\n throw new IllegalStateException(\"XmlFactory.getSchema : unable to create a Schema for : \" + schemaURL, mue);\r\n*/ }\r\n return s;\r\n }", "private DefaultSchema() {\n super(\"\", null);\n }", "BigDecimal getLqncoreSchemaVersion();", "@Value.Default\n public String getUri() {\n\treturn \"\";\n }", "private String initUrlParameter() {\n StringBuffer url = new StringBuffer();\n url.append(URL).append(initPathParameter());\n return url.toString();\n }", "@VisibleForTesting\n public JsonSchemaValidator(final URI baseUri) {\n this.jsonSchemaFactory = JsonSchemaFactory.getInstance(SpecVersion.VersionFlag.V7);\n this.baseUri = baseUri;\n }", "SchemaReference setVersion(String version);", "public void setStrDataSchema(final String strDataSchema) {\n this.strDataSchema = strDataSchema;\n }", "public void testYourFirstPartition() {\r\n\t UrlValidator urlVal = new UrlValidator(null, null, UrlValidator.ALLOW_ALL_SCHEMES);\r\n\t System.out.println(\"1st partition with a valid scheme = true: \" + urlVal.isValid(\"http://www.google.com\")); //bug here = does not account for http://\r\n System.out.println(\"1st partition with a invalid scheme = false: \" + urlVal.isValid(\"://go.a1a:65a\")); \r\n }", "public SchemaDef getSourceSchema();", "public interface SensorSchema\n{\n String ID = \"_id\";\n String SENSOR_ID = \"sensor_id\";\n String NAME = \"name\";\n String PIN_NUMBER = \"pin_number\";\n String FREQUENCY = \"frequency\";\n String TIME_UNIT = \"time_unit\";\n String INPUT_TYPE = \"input_type\";\n String MEASUREMENT_TYPE = \"measurement_type\";\n String THRESHOLD = \"threshold\";\n String THRESHOLD_TYPE = \"threshold_type\";\n String STATE = \"state\";\n String USE_XIVELY = \"use_xively\";\n String DATASTREAM = \"datastream\";\n}", "public void setScheme(String newValue);", "@Override\r\n\tprotected String getSchemaSpacePattern() throws SQLException {\r\n\t\tString schema = databaseConnection.getSchema();\r\n\t\tif ((schema == null) || schema.isEmpty()) {\r\n\t\t\tschema = dbmd.getUserName();\r\n\t\t}\r\n\t\treturn schema;\r\n\t}" ]
[ "0.71473914", "0.69847476", "0.69847476", "0.66282034", "0.6600492", "0.6582395", "0.645873", "0.6363657", "0.6349423", "0.629031", "0.6230005", "0.61581266", "0.6135941", "0.6057086", "0.5879001", "0.5803982", "0.5788181", "0.5788181", "0.5784742", "0.5783416", "0.5770439", "0.5767832", "0.5762946", "0.5745766", "0.5730444", "0.5705545", "0.56906366", "0.5569577", "0.5563388", "0.5557939", "0.5549921", "0.5543398", "0.5543398", "0.54905486", "0.5481429", "0.5446117", "0.5445864", "0.5443833", "0.5442828", "0.54292226", "0.5378698", "0.53714705", "0.536551", "0.5353034", "0.5346585", "0.5345953", "0.5345953", "0.53360987", "0.53135586", "0.52946293", "0.5294364", "0.5262818", "0.52477163", "0.52285385", "0.522233", "0.5213018", "0.5213018", "0.52035034", "0.519868", "0.5192885", "0.5182736", "0.5155822", "0.51436806", "0.512498", "0.5123037", "0.5118846", "0.50952303", "0.50937575", "0.5080408", "0.5074602", "0.5068197", "0.5045563", "0.5039668", "0.5028152", "0.5013367", "0.49954575", "0.49932864", "0.49932864", "0.49932864", "0.49929368", "0.49900967", "0.49870884", "0.4986851", "0.49776018", "0.49634573", "0.49486575", "0.49451643", "0.49289507", "0.4912278", "0.49096534", "0.49080697", "0.48816204", "0.48795047", "0.4875748", "0.48753214", "0.4875097", "0.48716077", "0.4869733", "0.48660725", "0.48651087" ]
0.5948576
14
schema_url string schema_url = 10;
public Builder setSchemaUrl( java.lang.String value) { if (value == null) { throw new NullPointerException(); } schemaUrl_ = value; onChanged(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String getSchemaURI();", "void schema(String schema);", "void schema(String schema);", "Builder addSchemaVersion(URL value);", "@java.lang.Override\n public java.lang.String getSchemaUrl() {\n java.lang.Object ref = schemaUrl_;\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 schemaUrl_ = s;\n return s;\n }\n }", "public java.lang.String getSchemaUrl() {\n java.lang.Object ref = schemaUrl_;\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 schemaUrl_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public void setSchema(String schema) {\n this.schema = schema;\n }", "public void setSchema(java.lang.String schema) {\r\n this.schema = schema;\r\n }", "String getRemoteSchema();", "public void setSchemaBaseURL(String schemaBaseURL) {\n this.schemaBaseURL = schemaBaseURL;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getSchemaUrlBytes() {\n java.lang.Object ref = schemaUrl_;\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 schemaUrl_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getSchemaLocation();", "public static String getSchema( String url )\n\t{\n\t\tString db = url.split( \":\" )[ 1 ];\n\t\tString result = null;\n\t\tif( SCHEMAS.containsKey( db ) )\n\t\t{\n\t\t\tresult = SCHEMAS.get( db );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif( MYSQL.equals( db ) )\n\t\t\t{\n//\t\t\t\tString dbNameAndProps = url.split( \"/\" )[ 3 ];\n//\t\t\t\tresult = dbNameAndProps.split( \"[?]\" )[ 0 ];\n\t\t\t\tresult = null;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public com.google.protobuf.ByteString\n getSchemaUrlBytes() {\n java.lang.Object ref = schemaUrl_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n schemaUrl_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setSchema(Schema schema)\n {\n this.schema = schema;\n }", "@Column(length = 2048)\r\n @PlaceHolder(key = \"schema\")\r\n public String getUrlPath() {\r\n return urlPath;\r\n }", "@ApiModelProperty(value = \"A URI to a JSON-Schema file that defines additional attributes and relationships\")\n\n\n public String getSchemaLocation() {\n return schemaLocation;\n }", "@ApiModelProperty(value = \"A URI to a JSON-Schema file that defines additional attributes and relationships\")\n\n\n public String getSchemaLocation() {\n return schemaLocation;\n }", "String getSchemaFile();", "void setSchema(S schema);", "String handlerSchema();", "private static Schema createSchema(URL url) throws SAXException {\n\t\tSchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);\n\t\treturn schemaFactory.newSchema(url);\n\t}", "public void setSchemaLocation(String schemaLocation) {\n\t\t\r\n\t}", "public String getSchemaLocation() {\r\n return schemaLocation;\r\n }", "public String getSchema()\n {\n return schema;\n }", "public String getSchema() {\n return schema;\n }", "public void createURL(){\n urlDB = ( PREFACE + server + \"/\" + database + options);\n }", "S getSchema();", "@Override\n public void setXMLSchema(URL url) throws XMLPlatformException {\n if (null == url) {\n return;\n }\n if (null == documentBuilderFactory) {\n loadDocumentBuilderFactory();\n }\n try {\n documentBuilderFactory.setAttribute(SCHEMA_LANGUAGE, XML_SCHEMA);\n documentBuilderFactory.setAttribute(JAXP_SCHEMA_SOURCE, url.toString());\n } catch (IllegalArgumentException e) {\n // The attribute isn't supported so do nothing\n } catch (Exception e) {\n XMLPlatformException.xmlPlatformErrorResolvingXMLSchema(url, e);\n }\n }", "public Builder setSchemaUrlBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n schemaUrl_ = value;\n onChanged();\n return this;\n }", "private String getSchema(Document doc) {\n\t\tElement rootElement = doc.getRootElement();\n\t\treturn rootElement.getAttributeValue(\"schemaLocation\", xsiNamespace).replace(\"http://www.github.com/biosemantics\", \"\").trim();\n\t}", "public String getSchema() {\n return schema;\n }", "public String getSchema() {\n return schema;\n }", "public java.lang.String getSchema() {\r\n return schema;\r\n }", "public void setldschema(String ldap_schema_url) throws Exception{\t\t\r\n\t\tjava.io.InputStream ldschemaxml = null;\t\t\r\n\t\ttry {\r\n\t\t\tldschemaxmlurl = new java.net.URL(ldap_schema_url);\t\t \r\n\t\t\tldschemaxml = ldschemaxmlurl.openStream();\t\t\t\r\n\t\t\tjavax.xml.parsers.DocumentBuilderFactory ldschemaDomFactory = javax.xml.parsers.DocumentBuilderFactory.newInstance();\r\n\t\t\tjavax.xml.parsers.DocumentBuilder ldschemaDB = ldschemaDomFactory.newDocumentBuilder();\r\n\t\t\torg.w3c.dom.Document ldschemaDom = ldschemaDB.parse(ldschemaxml);\r\n\t\t\torg.w3c.dom.Element ldschemaRootElement = ldschemaDom.getDocumentElement();\r\n\t\t\torg.w3c.dom.NodeList ldschemaNodeList = ldschemaRootElement.getChildNodes();\r\n\t\t\torg.w3c.dom.NodeList ldschemaChildNodeList;\r\n\t\t\torg.w3c.dom.Node templdschemaNode;\r\n\t\t\t// Get the number of the schema\r\n\t\t\tint schemaCount = 0;\t\t\t\r\n\t\t\tfor (int i=0; i<ldschemaNodeList.getLength(); i++) {\r\n\t\t\t templdschemaNode = ldschemaNodeList.item(i);\r\n\t\t\t if (templdschemaNode.getNodeName().startsWith(Constant.attNameElement)) schemaCount +=1;\r\n\t\t\t}\r\n\t\t\t//Dimension Attribute and Attribute Type Array \t\r\n\t\t\tconAttName = new String[schemaCount];\r\n\t\t\tconAttType = new String[schemaCount];\r\n\t\t\t//Input Attribute and Attribute Type Array Value\r\n\t\t\tint tempSchemaCount = 0;\r\n\t\t\tlogger.debug(\"[Central LDAP schema Loading \"+schemaCount+\" attributes Start]\");\r\n\t\t\tfor (int i=0; i<ldschemaNodeList.getLength(); i++) {\r\n\t\t\t\t templdschemaNode = ldschemaNodeList.item(i);\t\t \t\t \t \r\n\t\t\t\t if (templdschemaNode.getNodeName().startsWith(Constant.attNameElement)) {\r\n\t\t\t\t\tconAttName[tempSchemaCount] = (templdschemaNode.getFirstChild().getNodeValue()).toUpperCase();\t\t\t\t \r\n\t\t\t\t\tconAttType[tempSchemaCount] = ((org.w3c.dom.Element)templdschemaNode).getAttribute(\"vtype\");\r\n\t\t\t\t\t//Print Attribute and Attribute Type Array Information\r\n\t\t\t\t\tlogger.debug(\"[Central LDAP schema Name]\"+conAttName[tempSchemaCount]+\" [Type] \"+conAttType[tempSchemaCount]);\r\n\t\t\t\t\ttempSchemaCount +=1;\t\t\t\t \r\n\t\t\t\t }\r\n\t\t\t}\r\n\t\t\tlogger.debug(\"[Central LDAP schema Loading End][\"+tempSchemaCount+\" Elements Added\");\r\n\t\t}catch(MalformedURLException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\tlogger.error(\"[Central LDAP schema Loading]\"+e.getMessage(), e);\r\n\t\t\tthrow new Exception(e.getMessage());\r\n\t\t}catch(org.xml.sax.SAXParseException spe){\r\n\t\t\tlogger.error(\"\\n[Central LDAP schema Loading]** Parsing error, line \" + spe.getLineNumber() + \", uri \" + spe.getSystemId());\r\n\t\t\tlogger.error(\" \" + spe.getMessage());\r\n\t\t\tthrow new Exception(spe.getMessage());\t\t\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t\tlogger.error(\"[Central LDAP schema Loading]\"+ex.getMessage(), ex);\r\n\t\t\tthrow new Exception(ex.getMessage());\r\n\t\t}finally{\r\n\t\t\tif ( ldschemaxml != null ) ldschemaxml.close();\r\n\t\t}\t\t\r\n\t}", "@Test\n public void atSchemaLocationTest() {\n // TODO: test atSchemaLocation\n }", "Schema createSchema();", "Builder addSchemaVersion(String value);", "public String getSchemeSpecific() {\n return \"\";\n }", "private void fixSchemaDocumentUri(MetadataSchemaRecord schemaRecord) {\n fixSchemaDocumentUri(schemaRecord, false);\n }", "public String getSchemaLocation() {\r\n\t\treturn mSchemaLocation;\r\n\t}", "public void setURL(String inputSchema, String outputSchema) {\n String port = getPortValueForJS();\n browser.setUrl(\"http://localhost:\" + port + \"/dataMapper?port=\" + port + \"&inputtype=\" + inputSchema\n + \"&outputtype=\" + outputSchema + NO_CACHE);\n }", "public void setSchemaInstance(String schemaInstance) {\n\t\t\r\n\t}", "public void setObject_schema(String object_schema) {\n this.object_schema = object_schema == null ? null : object_schema.trim();\n }", "Builder addSchemaVersion(Text value);", "String getSchemaName();", "String getSchemaName();", "public void setlldschema(String lldap_schema_url) throws Exception{\t\t\r\n\t\tjava.io.InputStream lldschemaxml = null;\t\t\r\n\t\ttry {\t\t\t\r\n\t\t\tUtil.validateSchemaLocalLDAP(); // Validate the local ldap schema\t\t\t\r\n\t\t\tlldschemaxmlurl = new java.net.URL(lldap_schema_url);\t\t \r\n\t\t lldschemaxml = lldschemaxmlurl.openStream();\t\t\r\n\t\t\tjavax.xml.parsers.DocumentBuilderFactory lldschemaDomFactory = javax.xml.parsers.DocumentBuilderFactory.newInstance();\r\n\t\t\tjavax.xml.parsers.DocumentBuilder lldschemaDB = lldschemaDomFactory.newDocumentBuilder();\r\n\t\t\torg.w3c.dom.Document lldschemaDom = lldschemaDB.parse(lldschemaxml);\r\n\t\t\torg.w3c.dom.Element lldschemaRootElement = lldschemaDom.getDocumentElement();\r\n\t\t\torg.w3c.dom.NodeList lldschemaNodeList = lldschemaRootElement.getChildNodes();\r\n\t\t \torg.w3c.dom.NodeList lldschemaChildNodeList;\r\n\t\t\torg.w3c.dom.Node templldschemaNode;\r\n\t\t\t// Get the number of the schema\r\n\t\t\tint schemaCount = 0;\t\t\r\n\t\t\tfor (int i=0; i<lldschemaNodeList.getLength(); i++) {\r\n\t\t templldschemaNode = lldschemaNodeList.item(i);\r\n\t\t\t if (templldschemaNode.getNodeName().startsWith(Constant.attNameElement)) schemaCount +=1;\r\n\t\t\t}\r\n\t\t\t// Dimension new Attribute and Attribute Type Array \t\r\n\t\t \tString[] tmp_conAttName = new String[conAttName.length + schemaCount];\r\n\t\t \tString[] tmp_conAttType = new String[conAttType.length + schemaCount];\r\n\t\t \t// Reload old Attribute and Attribute Type to Temp Array \r\n\t\t \tfor (int i=0; i<conAttName.length; i++){\r\n\t\t \t\ttmp_conAttName[i] = conAttName[i];\r\n\t\t \t\ttmp_conAttType[i] = conAttType[i];\r\n\t\t \t}\r\n\t\t\t//Input Attribute and Attribute Type Array Value\r\n\t\t\tint tempSchemaCount = conAttName.length;\r\n\t\t\tlogger.debug(\"[Local LDAP schema Loading Start]\");\r\n\t\t for (int i=0; i<lldschemaNodeList.getLength(); i++) {\r\n\t\t \ttemplldschemaNode = lldschemaNodeList.item(i);\r\n\t\t if (templldschemaNode.getNodeName().startsWith(Constant.attNameElement)) {\t\t \t\r\n\t\t \tif ( templldschemaNode.getFirstChild() == null ) throw new Exception(\"xml element called attibute_name not allow empty string\");\r\n\t\t tmp_conAttName[tempSchemaCount] = templldschemaNode.getFirstChild().getNodeValue();\r\n\t\t\t\t tmp_conAttType[tempSchemaCount] = ((org.w3c.dom.Element)templldschemaNode).getAttribute(\"vtype\");\t\t\t\t \r\n\t\t\t\t\tlogger.debug(\"[Local LDAP schema Name] \"+tmp_conAttName[tempSchemaCount]+\" [Type] \"+tmp_conAttType[tempSchemaCount]);\r\n\t\t\t\t tempSchemaCount +=1;\t\t\t\t \r\n\t\t \t\t }\r\n\t\t\t}\r\n\t\t\tif (tempSchemaCount == conAttName.length) {\r\n\t\t\t\tlogger.debug(\"No Local LDAP Schema Attribute Added !\");\r\n\t\t\t} else {\r\n\t\t\t// Reload Attribute and Attribute Type to Array \r\n\t\t\t\tconAttName = new String[tempSchemaCount];\r\n\t\t\t\tconAttType = new String[tempSchemaCount];\r\n\t\t\t\tfor (int i=0; i<conAttName.length; i++){\r\n\t\t\t\t\tconAttName[i] = tmp_conAttName[i];\r\n\t\t\t\t\tconAttType[i] = tmp_conAttType[i];\r\n\t\t\t\t}\t\t\t\t \r\n\t\t\t}\r\n\t\t\tlogger.debug(\"[Local LDAP schema Loading End][Total \"+tempSchemaCount+\" Attriutes in Array]\");\r\n\t\t} catch(MalformedURLException e){\r\n\t\t\te.printStackTrace();\t\t\t\r\n\t\t\tlogger.error(\"[Local LDAP schema Loading]\"+e.getMessage(), e);\r\n\t\t\tthrow new Exception(e.getMessage());\r\n\t\t} catch(org.xml.sax.SAXParseException spe){\r\n\t\t\tlogger.error(\"\\n[Local LDAP schema Loading]** Parsing error, line \" + spe.getLineNumber() + \", uri \" + spe.getSystemId());\r\n\t\t\tlogger.error(\" \" + spe.getMessage());\r\n\t\t\tthrow new Exception(spe.getMessage());\t\t\t\t\r\n\t\t} catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t\tlogger.error(\"[Local LDAP schema Loading]\"+ex.getMessage(), ex);\r\n\t\t\tthrow new Exception(ex.getMessage());\r\n\t\t} finally {\r\n\t\t\tif ( lldschemaxml != null ) lldschemaxml.close();\r\n\t\t}\r\n\t}", "public void setSchema(String schema)\n {\n if(this.props == null)\n {\n this.props = new Properties();\n }\n this.props.setProperty(\"db.schema\", schema);\n }", "public Schema getSchema();", "@Override\r\n\t\tpublic void setSchema(String schema) throws SQLException {\n\t\t\t\r\n\t\t}", "public void setSchema(String aValue) {\n String oldValue = schema;\n schema = aValue;\n changeSupport.firePropertyChange(\"schema\", oldValue, aValue);\n }", "SchemaBuilder withResourceResolver(LSResourceResolver resourceResolver);", "String getSchemaVersion();", "SchemaDefinition createSchemaDefinition();", "public String schema() {\n return schemaName;\n }", "public String schema() {\n return schemaName;\n }", "public String getSchemaName() { return schemaName; }", "public MetaSchema getMetaSchema(int iSchema);", "public String getObject_schema() {\n return object_schema;\n }", "public String getStrDataSchema() {\n return strDataSchema;\n }", "public boolean setSchema(String schema){\n \ttry {\n \t\tsql = connection.createStatement();\n\t\t\tString sqlText;\n\t\t\tsqlText = \"SET search_path TO \" + schema;\n\t\t\tsql.executeUpdate(sqlText);\n\t\t} catch (SQLException e) {\n\t\t\treturn false;\n\t\t}\n \treturn true;\n }", "public String getSchemaPath(final String requestUrl) {\n // find out if we have a known route, e.g. /rules, /bnrules, etc.\n final Optional<String> match = businessObjectToJsonSchema.keySet().stream().filter(requestUrl::contains).findAny();\n\n if (match.isEmpty()) {\n logger.debug(\"Schema validation not configured for: {}\", requestUrl);\n return null; // the request has not mapping, meaning there is no schema for this request URL's payload\n }\n\n final String route = match.get();\n // find out if there are trailing elements after the base mapping (e.g. rules/<hash>). If so, we validate.\n if (requestUrl.lastIndexOf(route) >= requestUrl.lastIndexOf(\"/\")) {\n // this means we have no hash or any other trailing path components after the route. We are not validating this.\n // The payloads we are interested in are always qualified with a hash, a country, etc.\n return null;\n }\n // since there is currently only one schema per route, we can take the route as a key for the schema\n // e.g. if we have /rules/<something>, we use the same schema, no matter what <something> is.\n return businessObjectToJsonSchema.get(route);\n }", "public String getSchema()\n {\n String schema = \"\";\n if(this.props != null && !this.props.isEmpty())\n {\n schema = this.props.getProperty(\"db.schema\");\n }\n \n return schema;\n }", "public URI getSchemaDocumentUri(MetadataSchemaRecord schemaRecord) {\n return WebMvcLinkBuilder.linkTo(WebMvcLinkBuilder.methodOn(this.getClass()).getSchemaDocumentById(schemaRecord.getSchemaId(), schemaRecord.getSchemaVersion(), null, null)).toUri();\n }", "public interface HeaderSchema {\n String code = \"c\";//服务器返回码\n String error_msg = \"e\";//服务器返回错误信息\n}", "public static void setDatabaseURL(String url){\n databaseURL=url;\n }", "static Path getSchemaPath(Configuration conf) {\n int iteration = lastSchemaUpdate(conf);\n return getOutputPath(conf, SCHEMA_BASE + iteration);\n }", "private static String composeApiUrl(String string){\r\n\t\treturn API_BASE + API_VERSION + string;\r\n\t}", "String getScheme();", "@Test\n public void testPartitionOne()\n {\n\t UrlValidator urlVal = new UrlValidator(null, null, UrlValidator.ALLOW_ALL_SCHEMES);\n\t String resource = \"://www.example.com\";\n\t ArrayList<ResultPair> schemaUrls = new ArrayList<ResultPair>();\n\t //append the static valid resource string to each schema as a new pair\n\t for(ResultPair schema : this.m_schemas)\n\t {\n\t\t ResultPair pair = new ResultPair(schema.item + resource, schema.valid);\n\t\t schemaUrls.add(pair);\n\t }\n\t //test each now full URL\n\t for(ResultPair pair : schemaUrls)\n\t {\n\t\t collector.checkThat(pair.item, pair.valid, equalTo(urlVal.isValid(pair.item)));\n\t }\n }", "public Schema(final String reference) throws IOException {\n\t\tsuper(reference);\n\t}", "public test_SDURL(String n) {\n super(n);\n }", "java.lang.String getScheme();", "public String getSchema()\n\t{\n\t\t//begin vpj-cd e-evolution 03/04/2005\n\t\treturn \"compiere\";\n\t\t//end vpj-cd e-evolution 03/04/2005\n\t}", "public void setSchema(URI aSchemaUri) throws SAXException, MalformedURLException {\n schema = SCHEMA_FACTORY.newSchema(aSchemaUri.toURL());\n }", "public String getScheme() {\n return scheme;\n }", "public String getScheme() {\n return scheme;\n }", "public String getScheme() {\n return scheme;\n }", "public void setSubSchema(String subSchema) {\n this.subSchema = subSchema;\n }", "public SchemaInfo getSchema () throws Exception;", "public String getIdGeneratorDatabaseConnectionUrl(){\n \t\treturn getProperty(\"org.sagebionetworks.id.generator.database.connection.url\");\n \t}", "public int getMetaSchemas();", "String createParameterJsonSchema();", "@Override\r\n public String getScheme() {\r\n return scheme;\r\n }", "AstroSchema getSchema();", "public void addSchema (final String uri, final IslandSchema s)\n {\n if (m_aSchemata.containsKey (uri))\n throw new IllegalArgumentException ();\n m_aSchemata.put (uri, s);\n }", "public static Schema getSchema(final String schemaURL) {\r\n Schema s = null;\r\n try {\r\n final URL url = FileUtils.getResource(schemaURL);\r\n \t\r\n final File file = FileUtils.getFile(schemaURL);\r\n \r\n\r\n if (logB.isInfoEnabled()) {\r\n logB.info(\"XmlFactory.getSchema : retrieve schema and compile it : \" + schemaURL);\r\n }\r\n\r\n // 2. Compile the schema.\r\n final long start = System.nanoTime();\r\n\r\n SchemaFactory sf = getSchemaFactory();\r\n s = sf.newSchema(url);\r\n \r\n\r\n TimerFactory.getTimer(\"XmlFactory.getSchema[\" + schemaURL + \"]\").addMilliSeconds(start, System.nanoTime());\r\n\r\n if (logB.isInfoEnabled()) {\r\n logB.info(\"XmlFactory.getSchema : schema ready : \" + s);\r\n }\r\n\r\n } catch (final SAXException se) {\r\n throw new IllegalStateException(\"XmlFactory.getSchema : unable to create a Schema for : \" + schemaURL, se);\r\n/* } catch (final MalformedURLException mue) {\r\n throw new IllegalStateException(\"XmlFactory.getSchema : unable to create a Schema for : \" + schemaURL, mue);\r\n*/ }\r\n return s;\r\n }", "private DefaultSchema() {\n super(\"\", null);\n }", "BigDecimal getLqncoreSchemaVersion();", "@Value.Default\n public String getUri() {\n\treturn \"\";\n }", "private String initUrlParameter() {\n StringBuffer url = new StringBuffer();\n url.append(URL).append(initPathParameter());\n return url.toString();\n }", "@VisibleForTesting\n public JsonSchemaValidator(final URI baseUri) {\n this.jsonSchemaFactory = JsonSchemaFactory.getInstance(SpecVersion.VersionFlag.V7);\n this.baseUri = baseUri;\n }", "SchemaReference setVersion(String version);", "public void testYourFirstPartition() {\r\n\t UrlValidator urlVal = new UrlValidator(null, null, UrlValidator.ALLOW_ALL_SCHEMES);\r\n\t System.out.println(\"1st partition with a valid scheme = true: \" + urlVal.isValid(\"http://www.google.com\")); //bug here = does not account for http://\r\n System.out.println(\"1st partition with a invalid scheme = false: \" + urlVal.isValid(\"://go.a1a:65a\")); \r\n }", "public void setStrDataSchema(final String strDataSchema) {\n this.strDataSchema = strDataSchema;\n }", "public SchemaDef getSourceSchema();", "public interface SensorSchema\n{\n String ID = \"_id\";\n String SENSOR_ID = \"sensor_id\";\n String NAME = \"name\";\n String PIN_NUMBER = \"pin_number\";\n String FREQUENCY = \"frequency\";\n String TIME_UNIT = \"time_unit\";\n String INPUT_TYPE = \"input_type\";\n String MEASUREMENT_TYPE = \"measurement_type\";\n String THRESHOLD = \"threshold\";\n String THRESHOLD_TYPE = \"threshold_type\";\n String STATE = \"state\";\n String USE_XIVELY = \"use_xively\";\n String DATASTREAM = \"datastream\";\n}", "public void setScheme(String newValue);", "private void fixSchemaDocumentUri(MetadataSchemaRecord schemaRecord, boolean saveUrl) {\n String schemaDocumentUri = schemaRecord.getSchemaDocumentUri();\n schemaRecord.setSchemaDocumentUri(getSchemaDocumentUri(schemaRecord).toString());\n LOG.trace(\"Fix schema document Uri '{}' -> '{}'\", schemaDocumentUri, schemaRecord.getSchemaDocumentUri());\n if (saveUrl) {\n LOG.trace(\"Store path for URI!\");\n Url2Path url2Path = new Url2Path();\n url2Path.setPath(schemaDocumentUri);\n url2Path.setUrl(schemaRecord.getSchemaDocumentUri());\n url2Path.setType(schemaRecord.getType());\n url2Path.setVersion(schemaRecord.getSchemaVersion());\n url2PathDao.save(url2Path);\n }\n }" ]
[ "0.7147353", "0.6984463", "0.6984463", "0.66020215", "0.65841216", "0.6460415", "0.6364115", "0.6349817", "0.6290244", "0.623084", "0.61599565", "0.61357313", "0.60573936", "0.59503204", "0.5879538", "0.58049405", "0.5789022", "0.5789022", "0.57843155", "0.578323", "0.5769759", "0.5767667", "0.5762977", "0.57459414", "0.57310104", "0.5706264", "0.56904745", "0.5569326", "0.5563721", "0.55581963", "0.5549666", "0.55441135", "0.55441135", "0.54911244", "0.54807526", "0.54463154", "0.54457366", "0.5444", "0.54438764", "0.542985", "0.53788245", "0.5371495", "0.5365843", "0.5353684", "0.5348177", "0.5345693", "0.5345693", "0.53356576", "0.5314088", "0.5295183", "0.5294992", "0.5263575", "0.52472883", "0.52293414", "0.52218616", "0.52130747", "0.52130747", "0.5203701", "0.5198971", "0.5193373", "0.5182805", "0.51563543", "0.51445854", "0.51256216", "0.5124387", "0.5118153", "0.5095768", "0.50947976", "0.5080895", "0.50749457", "0.5067582", "0.5045139", "0.50383145", "0.502869", "0.5012795", "0.49950647", "0.49940136", "0.49940136", "0.49940136", "0.49924836", "0.49904507", "0.49875924", "0.49874806", "0.49778548", "0.4964115", "0.4948847", "0.4944569", "0.49292448", "0.49115318", "0.49096707", "0.49077758", "0.48822856", "0.48789853", "0.48758745", "0.48752138", "0.48751476", "0.48718512", "0.48692214", "0.48660442", "0.48657748" ]
0.6629155
3
schema_url string schema_url = 10;
public Builder clearSchemaUrl() { schemaUrl_ = getDefaultInstance().getSchemaUrl(); onChanged(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String getSchemaURI();", "void schema(String schema);", "void schema(String schema);", "public Builder setSchemaUrl(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n schemaUrl_ = value;\n onChanged();\n return this;\n }", "Builder addSchemaVersion(URL value);", "@java.lang.Override\n public java.lang.String getSchemaUrl() {\n java.lang.Object ref = schemaUrl_;\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 schemaUrl_ = s;\n return s;\n }\n }", "public java.lang.String getSchemaUrl() {\n java.lang.Object ref = schemaUrl_;\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 schemaUrl_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public void setSchema(String schema) {\n this.schema = schema;\n }", "public void setSchema(java.lang.String schema) {\r\n this.schema = schema;\r\n }", "String getRemoteSchema();", "public void setSchemaBaseURL(String schemaBaseURL) {\n this.schemaBaseURL = schemaBaseURL;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getSchemaUrlBytes() {\n java.lang.Object ref = schemaUrl_;\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 schemaUrl_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getSchemaLocation();", "public static String getSchema( String url )\n\t{\n\t\tString db = url.split( \":\" )[ 1 ];\n\t\tString result = null;\n\t\tif( SCHEMAS.containsKey( db ) )\n\t\t{\n\t\t\tresult = SCHEMAS.get( db );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif( MYSQL.equals( db ) )\n\t\t\t{\n//\t\t\t\tString dbNameAndProps = url.split( \"/\" )[ 3 ];\n//\t\t\t\tresult = dbNameAndProps.split( \"[?]\" )[ 0 ];\n\t\t\t\tresult = null;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public com.google.protobuf.ByteString\n getSchemaUrlBytes() {\n java.lang.Object ref = schemaUrl_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n schemaUrl_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setSchema(Schema schema)\n {\n this.schema = schema;\n }", "@Column(length = 2048)\r\n @PlaceHolder(key = \"schema\")\r\n public String getUrlPath() {\r\n return urlPath;\r\n }", "@ApiModelProperty(value = \"A URI to a JSON-Schema file that defines additional attributes and relationships\")\n\n\n public String getSchemaLocation() {\n return schemaLocation;\n }", "@ApiModelProperty(value = \"A URI to a JSON-Schema file that defines additional attributes and relationships\")\n\n\n public String getSchemaLocation() {\n return schemaLocation;\n }", "String getSchemaFile();", "void setSchema(S schema);", "String handlerSchema();", "private static Schema createSchema(URL url) throws SAXException {\n\t\tSchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);\n\t\treturn schemaFactory.newSchema(url);\n\t}", "public void setSchemaLocation(String schemaLocation) {\n\t\t\r\n\t}", "public String getSchemaLocation() {\r\n return schemaLocation;\r\n }", "public String getSchema()\n {\n return schema;\n }", "public String getSchema() {\n return schema;\n }", "public void createURL(){\n urlDB = ( PREFACE + server + \"/\" + database + options);\n }", "S getSchema();", "@Override\n public void setXMLSchema(URL url) throws XMLPlatformException {\n if (null == url) {\n return;\n }\n if (null == documentBuilderFactory) {\n loadDocumentBuilderFactory();\n }\n try {\n documentBuilderFactory.setAttribute(SCHEMA_LANGUAGE, XML_SCHEMA);\n documentBuilderFactory.setAttribute(JAXP_SCHEMA_SOURCE, url.toString());\n } catch (IllegalArgumentException e) {\n // The attribute isn't supported so do nothing\n } catch (Exception e) {\n XMLPlatformException.xmlPlatformErrorResolvingXMLSchema(url, e);\n }\n }", "public Builder setSchemaUrlBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n schemaUrl_ = value;\n onChanged();\n return this;\n }", "private String getSchema(Document doc) {\n\t\tElement rootElement = doc.getRootElement();\n\t\treturn rootElement.getAttributeValue(\"schemaLocation\", xsiNamespace).replace(\"http://www.github.com/biosemantics\", \"\").trim();\n\t}", "public String getSchema() {\n return schema;\n }", "public String getSchema() {\n return schema;\n }", "public java.lang.String getSchema() {\r\n return schema;\r\n }", "public void setldschema(String ldap_schema_url) throws Exception{\t\t\r\n\t\tjava.io.InputStream ldschemaxml = null;\t\t\r\n\t\ttry {\r\n\t\t\tldschemaxmlurl = new java.net.URL(ldap_schema_url);\t\t \r\n\t\t\tldschemaxml = ldschemaxmlurl.openStream();\t\t\t\r\n\t\t\tjavax.xml.parsers.DocumentBuilderFactory ldschemaDomFactory = javax.xml.parsers.DocumentBuilderFactory.newInstance();\r\n\t\t\tjavax.xml.parsers.DocumentBuilder ldschemaDB = ldschemaDomFactory.newDocumentBuilder();\r\n\t\t\torg.w3c.dom.Document ldschemaDom = ldschemaDB.parse(ldschemaxml);\r\n\t\t\torg.w3c.dom.Element ldschemaRootElement = ldschemaDom.getDocumentElement();\r\n\t\t\torg.w3c.dom.NodeList ldschemaNodeList = ldschemaRootElement.getChildNodes();\r\n\t\t\torg.w3c.dom.NodeList ldschemaChildNodeList;\r\n\t\t\torg.w3c.dom.Node templdschemaNode;\r\n\t\t\t// Get the number of the schema\r\n\t\t\tint schemaCount = 0;\t\t\t\r\n\t\t\tfor (int i=0; i<ldschemaNodeList.getLength(); i++) {\r\n\t\t\t templdschemaNode = ldschemaNodeList.item(i);\r\n\t\t\t if (templdschemaNode.getNodeName().startsWith(Constant.attNameElement)) schemaCount +=1;\r\n\t\t\t}\r\n\t\t\t//Dimension Attribute and Attribute Type Array \t\r\n\t\t\tconAttName = new String[schemaCount];\r\n\t\t\tconAttType = new String[schemaCount];\r\n\t\t\t//Input Attribute and Attribute Type Array Value\r\n\t\t\tint tempSchemaCount = 0;\r\n\t\t\tlogger.debug(\"[Central LDAP schema Loading \"+schemaCount+\" attributes Start]\");\r\n\t\t\tfor (int i=0; i<ldschemaNodeList.getLength(); i++) {\r\n\t\t\t\t templdschemaNode = ldschemaNodeList.item(i);\t\t \t\t \t \r\n\t\t\t\t if (templdschemaNode.getNodeName().startsWith(Constant.attNameElement)) {\r\n\t\t\t\t\tconAttName[tempSchemaCount] = (templdschemaNode.getFirstChild().getNodeValue()).toUpperCase();\t\t\t\t \r\n\t\t\t\t\tconAttType[tempSchemaCount] = ((org.w3c.dom.Element)templdschemaNode).getAttribute(\"vtype\");\r\n\t\t\t\t\t//Print Attribute and Attribute Type Array Information\r\n\t\t\t\t\tlogger.debug(\"[Central LDAP schema Name]\"+conAttName[tempSchemaCount]+\" [Type] \"+conAttType[tempSchemaCount]);\r\n\t\t\t\t\ttempSchemaCount +=1;\t\t\t\t \r\n\t\t\t\t }\r\n\t\t\t}\r\n\t\t\tlogger.debug(\"[Central LDAP schema Loading End][\"+tempSchemaCount+\" Elements Added\");\r\n\t\t}catch(MalformedURLException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\tlogger.error(\"[Central LDAP schema Loading]\"+e.getMessage(), e);\r\n\t\t\tthrow new Exception(e.getMessage());\r\n\t\t}catch(org.xml.sax.SAXParseException spe){\r\n\t\t\tlogger.error(\"\\n[Central LDAP schema Loading]** Parsing error, line \" + spe.getLineNumber() + \", uri \" + spe.getSystemId());\r\n\t\t\tlogger.error(\" \" + spe.getMessage());\r\n\t\t\tthrow new Exception(spe.getMessage());\t\t\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t\tlogger.error(\"[Central LDAP schema Loading]\"+ex.getMessage(), ex);\r\n\t\t\tthrow new Exception(ex.getMessage());\r\n\t\t}finally{\r\n\t\t\tif ( ldschemaxml != null ) ldschemaxml.close();\r\n\t\t}\t\t\r\n\t}", "@Test\n public void atSchemaLocationTest() {\n // TODO: test atSchemaLocation\n }", "Schema createSchema();", "Builder addSchemaVersion(String value);", "public String getSchemeSpecific() {\n return \"\";\n }", "private void fixSchemaDocumentUri(MetadataSchemaRecord schemaRecord) {\n fixSchemaDocumentUri(schemaRecord, false);\n }", "public String getSchemaLocation() {\r\n\t\treturn mSchemaLocation;\r\n\t}", "public void setURL(String inputSchema, String outputSchema) {\n String port = getPortValueForJS();\n browser.setUrl(\"http://localhost:\" + port + \"/dataMapper?port=\" + port + \"&inputtype=\" + inputSchema\n + \"&outputtype=\" + outputSchema + NO_CACHE);\n }", "public void setSchemaInstance(String schemaInstance) {\n\t\t\r\n\t}", "public void setObject_schema(String object_schema) {\n this.object_schema = object_schema == null ? null : object_schema.trim();\n }", "Builder addSchemaVersion(Text value);", "String getSchemaName();", "String getSchemaName();", "public void setlldschema(String lldap_schema_url) throws Exception{\t\t\r\n\t\tjava.io.InputStream lldschemaxml = null;\t\t\r\n\t\ttry {\t\t\t\r\n\t\t\tUtil.validateSchemaLocalLDAP(); // Validate the local ldap schema\t\t\t\r\n\t\t\tlldschemaxmlurl = new java.net.URL(lldap_schema_url);\t\t \r\n\t\t lldschemaxml = lldschemaxmlurl.openStream();\t\t\r\n\t\t\tjavax.xml.parsers.DocumentBuilderFactory lldschemaDomFactory = javax.xml.parsers.DocumentBuilderFactory.newInstance();\r\n\t\t\tjavax.xml.parsers.DocumentBuilder lldschemaDB = lldschemaDomFactory.newDocumentBuilder();\r\n\t\t\torg.w3c.dom.Document lldschemaDom = lldschemaDB.parse(lldschemaxml);\r\n\t\t\torg.w3c.dom.Element lldschemaRootElement = lldschemaDom.getDocumentElement();\r\n\t\t\torg.w3c.dom.NodeList lldschemaNodeList = lldschemaRootElement.getChildNodes();\r\n\t\t \torg.w3c.dom.NodeList lldschemaChildNodeList;\r\n\t\t\torg.w3c.dom.Node templldschemaNode;\r\n\t\t\t// Get the number of the schema\r\n\t\t\tint schemaCount = 0;\t\t\r\n\t\t\tfor (int i=0; i<lldschemaNodeList.getLength(); i++) {\r\n\t\t templldschemaNode = lldschemaNodeList.item(i);\r\n\t\t\t if (templldschemaNode.getNodeName().startsWith(Constant.attNameElement)) schemaCount +=1;\r\n\t\t\t}\r\n\t\t\t// Dimension new Attribute and Attribute Type Array \t\r\n\t\t \tString[] tmp_conAttName = new String[conAttName.length + schemaCount];\r\n\t\t \tString[] tmp_conAttType = new String[conAttType.length + schemaCount];\r\n\t\t \t// Reload old Attribute and Attribute Type to Temp Array \r\n\t\t \tfor (int i=0; i<conAttName.length; i++){\r\n\t\t \t\ttmp_conAttName[i] = conAttName[i];\r\n\t\t \t\ttmp_conAttType[i] = conAttType[i];\r\n\t\t \t}\r\n\t\t\t//Input Attribute and Attribute Type Array Value\r\n\t\t\tint tempSchemaCount = conAttName.length;\r\n\t\t\tlogger.debug(\"[Local LDAP schema Loading Start]\");\r\n\t\t for (int i=0; i<lldschemaNodeList.getLength(); i++) {\r\n\t\t \ttemplldschemaNode = lldschemaNodeList.item(i);\r\n\t\t if (templldschemaNode.getNodeName().startsWith(Constant.attNameElement)) {\t\t \t\r\n\t\t \tif ( templldschemaNode.getFirstChild() == null ) throw new Exception(\"xml element called attibute_name not allow empty string\");\r\n\t\t tmp_conAttName[tempSchemaCount] = templldschemaNode.getFirstChild().getNodeValue();\r\n\t\t\t\t tmp_conAttType[tempSchemaCount] = ((org.w3c.dom.Element)templldschemaNode).getAttribute(\"vtype\");\t\t\t\t \r\n\t\t\t\t\tlogger.debug(\"[Local LDAP schema Name] \"+tmp_conAttName[tempSchemaCount]+\" [Type] \"+tmp_conAttType[tempSchemaCount]);\r\n\t\t\t\t tempSchemaCount +=1;\t\t\t\t \r\n\t\t \t\t }\r\n\t\t\t}\r\n\t\t\tif (tempSchemaCount == conAttName.length) {\r\n\t\t\t\tlogger.debug(\"No Local LDAP Schema Attribute Added !\");\r\n\t\t\t} else {\r\n\t\t\t// Reload Attribute and Attribute Type to Array \r\n\t\t\t\tconAttName = new String[tempSchemaCount];\r\n\t\t\t\tconAttType = new String[tempSchemaCount];\r\n\t\t\t\tfor (int i=0; i<conAttName.length; i++){\r\n\t\t\t\t\tconAttName[i] = tmp_conAttName[i];\r\n\t\t\t\t\tconAttType[i] = tmp_conAttType[i];\r\n\t\t\t\t}\t\t\t\t \r\n\t\t\t}\r\n\t\t\tlogger.debug(\"[Local LDAP schema Loading End][Total \"+tempSchemaCount+\" Attriutes in Array]\");\r\n\t\t} catch(MalformedURLException e){\r\n\t\t\te.printStackTrace();\t\t\t\r\n\t\t\tlogger.error(\"[Local LDAP schema Loading]\"+e.getMessage(), e);\r\n\t\t\tthrow new Exception(e.getMessage());\r\n\t\t} catch(org.xml.sax.SAXParseException spe){\r\n\t\t\tlogger.error(\"\\n[Local LDAP schema Loading]** Parsing error, line \" + spe.getLineNumber() + \", uri \" + spe.getSystemId());\r\n\t\t\tlogger.error(\" \" + spe.getMessage());\r\n\t\t\tthrow new Exception(spe.getMessage());\t\t\t\t\r\n\t\t} catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t\tlogger.error(\"[Local LDAP schema Loading]\"+ex.getMessage(), ex);\r\n\t\t\tthrow new Exception(ex.getMessage());\r\n\t\t} finally {\r\n\t\t\tif ( lldschemaxml != null ) lldschemaxml.close();\r\n\t\t}\r\n\t}", "public void setSchema(String schema)\n {\n if(this.props == null)\n {\n this.props = new Properties();\n }\n this.props.setProperty(\"db.schema\", schema);\n }", "public Schema getSchema();", "@Override\r\n\t\tpublic void setSchema(String schema) throws SQLException {\n\t\t\t\r\n\t\t}", "public void setSchema(String aValue) {\n String oldValue = schema;\n schema = aValue;\n changeSupport.firePropertyChange(\"schema\", oldValue, aValue);\n }", "SchemaBuilder withResourceResolver(LSResourceResolver resourceResolver);", "String getSchemaVersion();", "SchemaDefinition createSchemaDefinition();", "public String schema() {\n return schemaName;\n }", "public String schema() {\n return schemaName;\n }", "public String getSchemaName() { return schemaName; }", "public MetaSchema getMetaSchema(int iSchema);", "public String getObject_schema() {\n return object_schema;\n }", "public String getStrDataSchema() {\n return strDataSchema;\n }", "public boolean setSchema(String schema){\n \ttry {\n \t\tsql = connection.createStatement();\n\t\t\tString sqlText;\n\t\t\tsqlText = \"SET search_path TO \" + schema;\n\t\t\tsql.executeUpdate(sqlText);\n\t\t} catch (SQLException e) {\n\t\t\treturn false;\n\t\t}\n \treturn true;\n }", "public String getSchemaPath(final String requestUrl) {\n // find out if we have a known route, e.g. /rules, /bnrules, etc.\n final Optional<String> match = businessObjectToJsonSchema.keySet().stream().filter(requestUrl::contains).findAny();\n\n if (match.isEmpty()) {\n logger.debug(\"Schema validation not configured for: {}\", requestUrl);\n return null; // the request has not mapping, meaning there is no schema for this request URL's payload\n }\n\n final String route = match.get();\n // find out if there are trailing elements after the base mapping (e.g. rules/<hash>). If so, we validate.\n if (requestUrl.lastIndexOf(route) >= requestUrl.lastIndexOf(\"/\")) {\n // this means we have no hash or any other trailing path components after the route. We are not validating this.\n // The payloads we are interested in are always qualified with a hash, a country, etc.\n return null;\n }\n // since there is currently only one schema per route, we can take the route as a key for the schema\n // e.g. if we have /rules/<something>, we use the same schema, no matter what <something> is.\n return businessObjectToJsonSchema.get(route);\n }", "public String getSchema()\n {\n String schema = \"\";\n if(this.props != null && !this.props.isEmpty())\n {\n schema = this.props.getProperty(\"db.schema\");\n }\n \n return schema;\n }", "public URI getSchemaDocumentUri(MetadataSchemaRecord schemaRecord) {\n return WebMvcLinkBuilder.linkTo(WebMvcLinkBuilder.methodOn(this.getClass()).getSchemaDocumentById(schemaRecord.getSchemaId(), schemaRecord.getSchemaVersion(), null, null)).toUri();\n }", "public interface HeaderSchema {\n String code = \"c\";//服务器返回码\n String error_msg = \"e\";//服务器返回错误信息\n}", "public static void setDatabaseURL(String url){\n databaseURL=url;\n }", "static Path getSchemaPath(Configuration conf) {\n int iteration = lastSchemaUpdate(conf);\n return getOutputPath(conf, SCHEMA_BASE + iteration);\n }", "private static String composeApiUrl(String string){\r\n\t\treturn API_BASE + API_VERSION + string;\r\n\t}", "String getScheme();", "@Test\n public void testPartitionOne()\n {\n\t UrlValidator urlVal = new UrlValidator(null, null, UrlValidator.ALLOW_ALL_SCHEMES);\n\t String resource = \"://www.example.com\";\n\t ArrayList<ResultPair> schemaUrls = new ArrayList<ResultPair>();\n\t //append the static valid resource string to each schema as a new pair\n\t for(ResultPair schema : this.m_schemas)\n\t {\n\t\t ResultPair pair = new ResultPair(schema.item + resource, schema.valid);\n\t\t schemaUrls.add(pair);\n\t }\n\t //test each now full URL\n\t for(ResultPair pair : schemaUrls)\n\t {\n\t\t collector.checkThat(pair.item, pair.valid, equalTo(urlVal.isValid(pair.item)));\n\t }\n }", "public Schema(final String reference) throws IOException {\n\t\tsuper(reference);\n\t}", "public test_SDURL(String n) {\n super(n);\n }", "java.lang.String getScheme();", "public String getSchema()\n\t{\n\t\t//begin vpj-cd e-evolution 03/04/2005\n\t\treturn \"compiere\";\n\t\t//end vpj-cd e-evolution 03/04/2005\n\t}", "public void setSchema(URI aSchemaUri) throws SAXException, MalformedURLException {\n schema = SCHEMA_FACTORY.newSchema(aSchemaUri.toURL());\n }", "public String getScheme() {\n return scheme;\n }", "public String getScheme() {\n return scheme;\n }", "public String getScheme() {\n return scheme;\n }", "public void setSubSchema(String subSchema) {\n this.subSchema = subSchema;\n }", "public SchemaInfo getSchema () throws Exception;", "public String getIdGeneratorDatabaseConnectionUrl(){\n \t\treturn getProperty(\"org.sagebionetworks.id.generator.database.connection.url\");\n \t}", "public int getMetaSchemas();", "String createParameterJsonSchema();", "@Override\r\n public String getScheme() {\r\n return scheme;\r\n }", "AstroSchema getSchema();", "public void addSchema (final String uri, final IslandSchema s)\n {\n if (m_aSchemata.containsKey (uri))\n throw new IllegalArgumentException ();\n m_aSchemata.put (uri, s);\n }", "public static Schema getSchema(final String schemaURL) {\r\n Schema s = null;\r\n try {\r\n final URL url = FileUtils.getResource(schemaURL);\r\n \t\r\n final File file = FileUtils.getFile(schemaURL);\r\n \r\n\r\n if (logB.isInfoEnabled()) {\r\n logB.info(\"XmlFactory.getSchema : retrieve schema and compile it : \" + schemaURL);\r\n }\r\n\r\n // 2. Compile the schema.\r\n final long start = System.nanoTime();\r\n\r\n SchemaFactory sf = getSchemaFactory();\r\n s = sf.newSchema(url);\r\n \r\n\r\n TimerFactory.getTimer(\"XmlFactory.getSchema[\" + schemaURL + \"]\").addMilliSeconds(start, System.nanoTime());\r\n\r\n if (logB.isInfoEnabled()) {\r\n logB.info(\"XmlFactory.getSchema : schema ready : \" + s);\r\n }\r\n\r\n } catch (final SAXException se) {\r\n throw new IllegalStateException(\"XmlFactory.getSchema : unable to create a Schema for : \" + schemaURL, se);\r\n/* } catch (final MalformedURLException mue) {\r\n throw new IllegalStateException(\"XmlFactory.getSchema : unable to create a Schema for : \" + schemaURL, mue);\r\n*/ }\r\n return s;\r\n }", "private DefaultSchema() {\n super(\"\", null);\n }", "BigDecimal getLqncoreSchemaVersion();", "@Value.Default\n public String getUri() {\n\treturn \"\";\n }", "private String initUrlParameter() {\n StringBuffer url = new StringBuffer();\n url.append(URL).append(initPathParameter());\n return url.toString();\n }", "@VisibleForTesting\n public JsonSchemaValidator(final URI baseUri) {\n this.jsonSchemaFactory = JsonSchemaFactory.getInstance(SpecVersion.VersionFlag.V7);\n this.baseUri = baseUri;\n }", "SchemaReference setVersion(String version);", "public void testYourFirstPartition() {\r\n\t UrlValidator urlVal = new UrlValidator(null, null, UrlValidator.ALLOW_ALL_SCHEMES);\r\n\t System.out.println(\"1st partition with a valid scheme = true: \" + urlVal.isValid(\"http://www.google.com\")); //bug here = does not account for http://\r\n System.out.println(\"1st partition with a invalid scheme = false: \" + urlVal.isValid(\"://go.a1a:65a\")); \r\n }", "public void setStrDataSchema(final String strDataSchema) {\n this.strDataSchema = strDataSchema;\n }", "public SchemaDef getSourceSchema();", "public interface SensorSchema\n{\n String ID = \"_id\";\n String SENSOR_ID = \"sensor_id\";\n String NAME = \"name\";\n String PIN_NUMBER = \"pin_number\";\n String FREQUENCY = \"frequency\";\n String TIME_UNIT = \"time_unit\";\n String INPUT_TYPE = \"input_type\";\n String MEASUREMENT_TYPE = \"measurement_type\";\n String THRESHOLD = \"threshold\";\n String THRESHOLD_TYPE = \"threshold_type\";\n String STATE = \"state\";\n String USE_XIVELY = \"use_xively\";\n String DATASTREAM = \"datastream\";\n}", "public void setScheme(String newValue);", "private void fixSchemaDocumentUri(MetadataSchemaRecord schemaRecord, boolean saveUrl) {\n String schemaDocumentUri = schemaRecord.getSchemaDocumentUri();\n schemaRecord.setSchemaDocumentUri(getSchemaDocumentUri(schemaRecord).toString());\n LOG.trace(\"Fix schema document Uri '{}' -> '{}'\", schemaDocumentUri, schemaRecord.getSchemaDocumentUri());\n if (saveUrl) {\n LOG.trace(\"Store path for URI!\");\n Url2Path url2Path = new Url2Path();\n url2Path.setPath(schemaDocumentUri);\n url2Path.setUrl(schemaRecord.getSchemaDocumentUri());\n url2Path.setType(schemaRecord.getType());\n url2Path.setVersion(schemaRecord.getSchemaVersion());\n url2PathDao.save(url2Path);\n }\n }" ]
[ "0.7147353", "0.6984463", "0.6984463", "0.6629155", "0.66020215", "0.65841216", "0.6460415", "0.6364115", "0.6349817", "0.6290244", "0.623084", "0.61599565", "0.61357313", "0.60573936", "0.59503204", "0.5879538", "0.58049405", "0.5789022", "0.5789022", "0.57843155", "0.578323", "0.5769759", "0.5767667", "0.5762977", "0.57459414", "0.57310104", "0.5706264", "0.56904745", "0.5569326", "0.5563721", "0.55581963", "0.5549666", "0.55441135", "0.55441135", "0.54911244", "0.54807526", "0.54463154", "0.54457366", "0.5444", "0.54438764", "0.542985", "0.53788245", "0.5371495", "0.5365843", "0.5353684", "0.5348177", "0.5345693", "0.5345693", "0.53356576", "0.5314088", "0.5295183", "0.5294992", "0.5263575", "0.52472883", "0.52293414", "0.52218616", "0.52130747", "0.52130747", "0.5203701", "0.5198971", "0.5193373", "0.5182805", "0.51563543", "0.51445854", "0.51256216", "0.5124387", "0.5118153", "0.5095768", "0.50947976", "0.5080895", "0.50749457", "0.5067582", "0.5045139", "0.50383145", "0.502869", "0.5012795", "0.49950647", "0.49940136", "0.49940136", "0.49940136", "0.49924836", "0.49904507", "0.49875924", "0.49874806", "0.49778548", "0.4964115", "0.4948847", "0.4944569", "0.49292448", "0.49115318", "0.49096707", "0.49077758", "0.48822856", "0.48789853", "0.48758745", "0.48752138", "0.48751476", "0.48718512", "0.48692214", "0.48660442", "0.48657748" ]
0.0
-1
schema_url string schema_url = 10;
public Builder setSchemaUrlBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); schemaUrl_ = value; onChanged(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String getSchemaURI();", "void schema(String schema);", "void schema(String schema);", "public Builder setSchemaUrl(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n schemaUrl_ = value;\n onChanged();\n return this;\n }", "Builder addSchemaVersion(URL value);", "@java.lang.Override\n public java.lang.String getSchemaUrl() {\n java.lang.Object ref = schemaUrl_;\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 schemaUrl_ = s;\n return s;\n }\n }", "public java.lang.String getSchemaUrl() {\n java.lang.Object ref = schemaUrl_;\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 schemaUrl_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public void setSchema(String schema) {\n this.schema = schema;\n }", "public void setSchema(java.lang.String schema) {\r\n this.schema = schema;\r\n }", "String getRemoteSchema();", "public void setSchemaBaseURL(String schemaBaseURL) {\n this.schemaBaseURL = schemaBaseURL;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getSchemaUrlBytes() {\n java.lang.Object ref = schemaUrl_;\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 schemaUrl_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getSchemaLocation();", "public static String getSchema( String url )\n\t{\n\t\tString db = url.split( \":\" )[ 1 ];\n\t\tString result = null;\n\t\tif( SCHEMAS.containsKey( db ) )\n\t\t{\n\t\t\tresult = SCHEMAS.get( db );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif( MYSQL.equals( db ) )\n\t\t\t{\n//\t\t\t\tString dbNameAndProps = url.split( \"/\" )[ 3 ];\n//\t\t\t\tresult = dbNameAndProps.split( \"[?]\" )[ 0 ];\n\t\t\t\tresult = null;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public com.google.protobuf.ByteString\n getSchemaUrlBytes() {\n java.lang.Object ref = schemaUrl_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n schemaUrl_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setSchema(Schema schema)\n {\n this.schema = schema;\n }", "@Column(length = 2048)\r\n @PlaceHolder(key = \"schema\")\r\n public String getUrlPath() {\r\n return urlPath;\r\n }", "@ApiModelProperty(value = \"A URI to a JSON-Schema file that defines additional attributes and relationships\")\n\n\n public String getSchemaLocation() {\n return schemaLocation;\n }", "@ApiModelProperty(value = \"A URI to a JSON-Schema file that defines additional attributes and relationships\")\n\n\n public String getSchemaLocation() {\n return schemaLocation;\n }", "String getSchemaFile();", "void setSchema(S schema);", "String handlerSchema();", "private static Schema createSchema(URL url) throws SAXException {\n\t\tSchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);\n\t\treturn schemaFactory.newSchema(url);\n\t}", "public void setSchemaLocation(String schemaLocation) {\n\t\t\r\n\t}", "public String getSchemaLocation() {\r\n return schemaLocation;\r\n }", "public String getSchema()\n {\n return schema;\n }", "public String getSchema() {\n return schema;\n }", "public void createURL(){\n urlDB = ( PREFACE + server + \"/\" + database + options);\n }", "S getSchema();", "@Override\n public void setXMLSchema(URL url) throws XMLPlatformException {\n if (null == url) {\n return;\n }\n if (null == documentBuilderFactory) {\n loadDocumentBuilderFactory();\n }\n try {\n documentBuilderFactory.setAttribute(SCHEMA_LANGUAGE, XML_SCHEMA);\n documentBuilderFactory.setAttribute(JAXP_SCHEMA_SOURCE, url.toString());\n } catch (IllegalArgumentException e) {\n // The attribute isn't supported so do nothing\n } catch (Exception e) {\n XMLPlatformException.xmlPlatformErrorResolvingXMLSchema(url, e);\n }\n }", "private String getSchema(Document doc) {\n\t\tElement rootElement = doc.getRootElement();\n\t\treturn rootElement.getAttributeValue(\"schemaLocation\", xsiNamespace).replace(\"http://www.github.com/biosemantics\", \"\").trim();\n\t}", "public String getSchema() {\n return schema;\n }", "public String getSchema() {\n return schema;\n }", "public java.lang.String getSchema() {\r\n return schema;\r\n }", "public void setldschema(String ldap_schema_url) throws Exception{\t\t\r\n\t\tjava.io.InputStream ldschemaxml = null;\t\t\r\n\t\ttry {\r\n\t\t\tldschemaxmlurl = new java.net.URL(ldap_schema_url);\t\t \r\n\t\t\tldschemaxml = ldschemaxmlurl.openStream();\t\t\t\r\n\t\t\tjavax.xml.parsers.DocumentBuilderFactory ldschemaDomFactory = javax.xml.parsers.DocumentBuilderFactory.newInstance();\r\n\t\t\tjavax.xml.parsers.DocumentBuilder ldschemaDB = ldschemaDomFactory.newDocumentBuilder();\r\n\t\t\torg.w3c.dom.Document ldschemaDom = ldschemaDB.parse(ldschemaxml);\r\n\t\t\torg.w3c.dom.Element ldschemaRootElement = ldschemaDom.getDocumentElement();\r\n\t\t\torg.w3c.dom.NodeList ldschemaNodeList = ldschemaRootElement.getChildNodes();\r\n\t\t\torg.w3c.dom.NodeList ldschemaChildNodeList;\r\n\t\t\torg.w3c.dom.Node templdschemaNode;\r\n\t\t\t// Get the number of the schema\r\n\t\t\tint schemaCount = 0;\t\t\t\r\n\t\t\tfor (int i=0; i<ldschemaNodeList.getLength(); i++) {\r\n\t\t\t templdschemaNode = ldschemaNodeList.item(i);\r\n\t\t\t if (templdschemaNode.getNodeName().startsWith(Constant.attNameElement)) schemaCount +=1;\r\n\t\t\t}\r\n\t\t\t//Dimension Attribute and Attribute Type Array \t\r\n\t\t\tconAttName = new String[schemaCount];\r\n\t\t\tconAttType = new String[schemaCount];\r\n\t\t\t//Input Attribute and Attribute Type Array Value\r\n\t\t\tint tempSchemaCount = 0;\r\n\t\t\tlogger.debug(\"[Central LDAP schema Loading \"+schemaCount+\" attributes Start]\");\r\n\t\t\tfor (int i=0; i<ldschemaNodeList.getLength(); i++) {\r\n\t\t\t\t templdschemaNode = ldschemaNodeList.item(i);\t\t \t\t \t \r\n\t\t\t\t if (templdschemaNode.getNodeName().startsWith(Constant.attNameElement)) {\r\n\t\t\t\t\tconAttName[tempSchemaCount] = (templdschemaNode.getFirstChild().getNodeValue()).toUpperCase();\t\t\t\t \r\n\t\t\t\t\tconAttType[tempSchemaCount] = ((org.w3c.dom.Element)templdschemaNode).getAttribute(\"vtype\");\r\n\t\t\t\t\t//Print Attribute and Attribute Type Array Information\r\n\t\t\t\t\tlogger.debug(\"[Central LDAP schema Name]\"+conAttName[tempSchemaCount]+\" [Type] \"+conAttType[tempSchemaCount]);\r\n\t\t\t\t\ttempSchemaCount +=1;\t\t\t\t \r\n\t\t\t\t }\r\n\t\t\t}\r\n\t\t\tlogger.debug(\"[Central LDAP schema Loading End][\"+tempSchemaCount+\" Elements Added\");\r\n\t\t}catch(MalformedURLException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\tlogger.error(\"[Central LDAP schema Loading]\"+e.getMessage(), e);\r\n\t\t\tthrow new Exception(e.getMessage());\r\n\t\t}catch(org.xml.sax.SAXParseException spe){\r\n\t\t\tlogger.error(\"\\n[Central LDAP schema Loading]** Parsing error, line \" + spe.getLineNumber() + \", uri \" + spe.getSystemId());\r\n\t\t\tlogger.error(\" \" + spe.getMessage());\r\n\t\t\tthrow new Exception(spe.getMessage());\t\t\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t\tlogger.error(\"[Central LDAP schema Loading]\"+ex.getMessage(), ex);\r\n\t\t\tthrow new Exception(ex.getMessage());\r\n\t\t}finally{\r\n\t\t\tif ( ldschemaxml != null ) ldschemaxml.close();\r\n\t\t}\t\t\r\n\t}", "@Test\n public void atSchemaLocationTest() {\n // TODO: test atSchemaLocation\n }", "Schema createSchema();", "Builder addSchemaVersion(String value);", "public String getSchemeSpecific() {\n return \"\";\n }", "private void fixSchemaDocumentUri(MetadataSchemaRecord schemaRecord) {\n fixSchemaDocumentUri(schemaRecord, false);\n }", "public String getSchemaLocation() {\r\n\t\treturn mSchemaLocation;\r\n\t}", "public void setURL(String inputSchema, String outputSchema) {\n String port = getPortValueForJS();\n browser.setUrl(\"http://localhost:\" + port + \"/dataMapper?port=\" + port + \"&inputtype=\" + inputSchema\n + \"&outputtype=\" + outputSchema + NO_CACHE);\n }", "public void setSchemaInstance(String schemaInstance) {\n\t\t\r\n\t}", "public void setObject_schema(String object_schema) {\n this.object_schema = object_schema == null ? null : object_schema.trim();\n }", "Builder addSchemaVersion(Text value);", "String getSchemaName();", "String getSchemaName();", "public void setlldschema(String lldap_schema_url) throws Exception{\t\t\r\n\t\tjava.io.InputStream lldschemaxml = null;\t\t\r\n\t\ttry {\t\t\t\r\n\t\t\tUtil.validateSchemaLocalLDAP(); // Validate the local ldap schema\t\t\t\r\n\t\t\tlldschemaxmlurl = new java.net.URL(lldap_schema_url);\t\t \r\n\t\t lldschemaxml = lldschemaxmlurl.openStream();\t\t\r\n\t\t\tjavax.xml.parsers.DocumentBuilderFactory lldschemaDomFactory = javax.xml.parsers.DocumentBuilderFactory.newInstance();\r\n\t\t\tjavax.xml.parsers.DocumentBuilder lldschemaDB = lldschemaDomFactory.newDocumentBuilder();\r\n\t\t\torg.w3c.dom.Document lldschemaDom = lldschemaDB.parse(lldschemaxml);\r\n\t\t\torg.w3c.dom.Element lldschemaRootElement = lldschemaDom.getDocumentElement();\r\n\t\t\torg.w3c.dom.NodeList lldschemaNodeList = lldschemaRootElement.getChildNodes();\r\n\t\t \torg.w3c.dom.NodeList lldschemaChildNodeList;\r\n\t\t\torg.w3c.dom.Node templldschemaNode;\r\n\t\t\t// Get the number of the schema\r\n\t\t\tint schemaCount = 0;\t\t\r\n\t\t\tfor (int i=0; i<lldschemaNodeList.getLength(); i++) {\r\n\t\t templldschemaNode = lldschemaNodeList.item(i);\r\n\t\t\t if (templldschemaNode.getNodeName().startsWith(Constant.attNameElement)) schemaCount +=1;\r\n\t\t\t}\r\n\t\t\t// Dimension new Attribute and Attribute Type Array \t\r\n\t\t \tString[] tmp_conAttName = new String[conAttName.length + schemaCount];\r\n\t\t \tString[] tmp_conAttType = new String[conAttType.length + schemaCount];\r\n\t\t \t// Reload old Attribute and Attribute Type to Temp Array \r\n\t\t \tfor (int i=0; i<conAttName.length; i++){\r\n\t\t \t\ttmp_conAttName[i] = conAttName[i];\r\n\t\t \t\ttmp_conAttType[i] = conAttType[i];\r\n\t\t \t}\r\n\t\t\t//Input Attribute and Attribute Type Array Value\r\n\t\t\tint tempSchemaCount = conAttName.length;\r\n\t\t\tlogger.debug(\"[Local LDAP schema Loading Start]\");\r\n\t\t for (int i=0; i<lldschemaNodeList.getLength(); i++) {\r\n\t\t \ttemplldschemaNode = lldschemaNodeList.item(i);\r\n\t\t if (templldschemaNode.getNodeName().startsWith(Constant.attNameElement)) {\t\t \t\r\n\t\t \tif ( templldschemaNode.getFirstChild() == null ) throw new Exception(\"xml element called attibute_name not allow empty string\");\r\n\t\t tmp_conAttName[tempSchemaCount] = templldschemaNode.getFirstChild().getNodeValue();\r\n\t\t\t\t tmp_conAttType[tempSchemaCount] = ((org.w3c.dom.Element)templldschemaNode).getAttribute(\"vtype\");\t\t\t\t \r\n\t\t\t\t\tlogger.debug(\"[Local LDAP schema Name] \"+tmp_conAttName[tempSchemaCount]+\" [Type] \"+tmp_conAttType[tempSchemaCount]);\r\n\t\t\t\t tempSchemaCount +=1;\t\t\t\t \r\n\t\t \t\t }\r\n\t\t\t}\r\n\t\t\tif (tempSchemaCount == conAttName.length) {\r\n\t\t\t\tlogger.debug(\"No Local LDAP Schema Attribute Added !\");\r\n\t\t\t} else {\r\n\t\t\t// Reload Attribute and Attribute Type to Array \r\n\t\t\t\tconAttName = new String[tempSchemaCount];\r\n\t\t\t\tconAttType = new String[tempSchemaCount];\r\n\t\t\t\tfor (int i=0; i<conAttName.length; i++){\r\n\t\t\t\t\tconAttName[i] = tmp_conAttName[i];\r\n\t\t\t\t\tconAttType[i] = tmp_conAttType[i];\r\n\t\t\t\t}\t\t\t\t \r\n\t\t\t}\r\n\t\t\tlogger.debug(\"[Local LDAP schema Loading End][Total \"+tempSchemaCount+\" Attriutes in Array]\");\r\n\t\t} catch(MalformedURLException e){\r\n\t\t\te.printStackTrace();\t\t\t\r\n\t\t\tlogger.error(\"[Local LDAP schema Loading]\"+e.getMessage(), e);\r\n\t\t\tthrow new Exception(e.getMessage());\r\n\t\t} catch(org.xml.sax.SAXParseException spe){\r\n\t\t\tlogger.error(\"\\n[Local LDAP schema Loading]** Parsing error, line \" + spe.getLineNumber() + \", uri \" + spe.getSystemId());\r\n\t\t\tlogger.error(\" \" + spe.getMessage());\r\n\t\t\tthrow new Exception(spe.getMessage());\t\t\t\t\r\n\t\t} catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t\tlogger.error(\"[Local LDAP schema Loading]\"+ex.getMessage(), ex);\r\n\t\t\tthrow new Exception(ex.getMessage());\r\n\t\t} finally {\r\n\t\t\tif ( lldschemaxml != null ) lldschemaxml.close();\r\n\t\t}\r\n\t}", "public void setSchema(String schema)\n {\n if(this.props == null)\n {\n this.props = new Properties();\n }\n this.props.setProperty(\"db.schema\", schema);\n }", "public Schema getSchema();", "@Override\r\n\t\tpublic void setSchema(String schema) throws SQLException {\n\t\t\t\r\n\t\t}", "public void setSchema(String aValue) {\n String oldValue = schema;\n schema = aValue;\n changeSupport.firePropertyChange(\"schema\", oldValue, aValue);\n }", "SchemaBuilder withResourceResolver(LSResourceResolver resourceResolver);", "String getSchemaVersion();", "SchemaDefinition createSchemaDefinition();", "public String schema() {\n return schemaName;\n }", "public String schema() {\n return schemaName;\n }", "public String getSchemaName() { return schemaName; }", "public MetaSchema getMetaSchema(int iSchema);", "public String getObject_schema() {\n return object_schema;\n }", "public String getStrDataSchema() {\n return strDataSchema;\n }", "public boolean setSchema(String schema){\n \ttry {\n \t\tsql = connection.createStatement();\n\t\t\tString sqlText;\n\t\t\tsqlText = \"SET search_path TO \" + schema;\n\t\t\tsql.executeUpdate(sqlText);\n\t\t} catch (SQLException e) {\n\t\t\treturn false;\n\t\t}\n \treturn true;\n }", "public String getSchemaPath(final String requestUrl) {\n // find out if we have a known route, e.g. /rules, /bnrules, etc.\n final Optional<String> match = businessObjectToJsonSchema.keySet().stream().filter(requestUrl::contains).findAny();\n\n if (match.isEmpty()) {\n logger.debug(\"Schema validation not configured for: {}\", requestUrl);\n return null; // the request has not mapping, meaning there is no schema for this request URL's payload\n }\n\n final String route = match.get();\n // find out if there are trailing elements after the base mapping (e.g. rules/<hash>). If so, we validate.\n if (requestUrl.lastIndexOf(route) >= requestUrl.lastIndexOf(\"/\")) {\n // this means we have no hash or any other trailing path components after the route. We are not validating this.\n // The payloads we are interested in are always qualified with a hash, a country, etc.\n return null;\n }\n // since there is currently only one schema per route, we can take the route as a key for the schema\n // e.g. if we have /rules/<something>, we use the same schema, no matter what <something> is.\n return businessObjectToJsonSchema.get(route);\n }", "public String getSchema()\n {\n String schema = \"\";\n if(this.props != null && !this.props.isEmpty())\n {\n schema = this.props.getProperty(\"db.schema\");\n }\n \n return schema;\n }", "public URI getSchemaDocumentUri(MetadataSchemaRecord schemaRecord) {\n return WebMvcLinkBuilder.linkTo(WebMvcLinkBuilder.methodOn(this.getClass()).getSchemaDocumentById(schemaRecord.getSchemaId(), schemaRecord.getSchemaVersion(), null, null)).toUri();\n }", "public interface HeaderSchema {\n String code = \"c\";//服务器返回码\n String error_msg = \"e\";//服务器返回错误信息\n}", "public static void setDatabaseURL(String url){\n databaseURL=url;\n }", "static Path getSchemaPath(Configuration conf) {\n int iteration = lastSchemaUpdate(conf);\n return getOutputPath(conf, SCHEMA_BASE + iteration);\n }", "private static String composeApiUrl(String string){\r\n\t\treturn API_BASE + API_VERSION + string;\r\n\t}", "String getScheme();", "@Test\n public void testPartitionOne()\n {\n\t UrlValidator urlVal = new UrlValidator(null, null, UrlValidator.ALLOW_ALL_SCHEMES);\n\t String resource = \"://www.example.com\";\n\t ArrayList<ResultPair> schemaUrls = new ArrayList<ResultPair>();\n\t //append the static valid resource string to each schema as a new pair\n\t for(ResultPair schema : this.m_schemas)\n\t {\n\t\t ResultPair pair = new ResultPair(schema.item + resource, schema.valid);\n\t\t schemaUrls.add(pair);\n\t }\n\t //test each now full URL\n\t for(ResultPair pair : schemaUrls)\n\t {\n\t\t collector.checkThat(pair.item, pair.valid, equalTo(urlVal.isValid(pair.item)));\n\t }\n }", "public Schema(final String reference) throws IOException {\n\t\tsuper(reference);\n\t}", "public test_SDURL(String n) {\n super(n);\n }", "java.lang.String getScheme();", "public String getSchema()\n\t{\n\t\t//begin vpj-cd e-evolution 03/04/2005\n\t\treturn \"compiere\";\n\t\t//end vpj-cd e-evolution 03/04/2005\n\t}", "public void setSchema(URI aSchemaUri) throws SAXException, MalformedURLException {\n schema = SCHEMA_FACTORY.newSchema(aSchemaUri.toURL());\n }", "public String getScheme() {\n return scheme;\n }", "public String getScheme() {\n return scheme;\n }", "public String getScheme() {\n return scheme;\n }", "public void setSubSchema(String subSchema) {\n this.subSchema = subSchema;\n }", "public SchemaInfo getSchema () throws Exception;", "public String getIdGeneratorDatabaseConnectionUrl(){\n \t\treturn getProperty(\"org.sagebionetworks.id.generator.database.connection.url\");\n \t}", "public int getMetaSchemas();", "String createParameterJsonSchema();", "@Override\r\n public String getScheme() {\r\n return scheme;\r\n }", "AstroSchema getSchema();", "public void addSchema (final String uri, final IslandSchema s)\n {\n if (m_aSchemata.containsKey (uri))\n throw new IllegalArgumentException ();\n m_aSchemata.put (uri, s);\n }", "public static Schema getSchema(final String schemaURL) {\r\n Schema s = null;\r\n try {\r\n final URL url = FileUtils.getResource(schemaURL);\r\n \t\r\n final File file = FileUtils.getFile(schemaURL);\r\n \r\n\r\n if (logB.isInfoEnabled()) {\r\n logB.info(\"XmlFactory.getSchema : retrieve schema and compile it : \" + schemaURL);\r\n }\r\n\r\n // 2. Compile the schema.\r\n final long start = System.nanoTime();\r\n\r\n SchemaFactory sf = getSchemaFactory();\r\n s = sf.newSchema(url);\r\n \r\n\r\n TimerFactory.getTimer(\"XmlFactory.getSchema[\" + schemaURL + \"]\").addMilliSeconds(start, System.nanoTime());\r\n\r\n if (logB.isInfoEnabled()) {\r\n logB.info(\"XmlFactory.getSchema : schema ready : \" + s);\r\n }\r\n\r\n } catch (final SAXException se) {\r\n throw new IllegalStateException(\"XmlFactory.getSchema : unable to create a Schema for : \" + schemaURL, se);\r\n/* } catch (final MalformedURLException mue) {\r\n throw new IllegalStateException(\"XmlFactory.getSchema : unable to create a Schema for : \" + schemaURL, mue);\r\n*/ }\r\n return s;\r\n }", "private DefaultSchema() {\n super(\"\", null);\n }", "BigDecimal getLqncoreSchemaVersion();", "@Value.Default\n public String getUri() {\n\treturn \"\";\n }", "private String initUrlParameter() {\n StringBuffer url = new StringBuffer();\n url.append(URL).append(initPathParameter());\n return url.toString();\n }", "@VisibleForTesting\n public JsonSchemaValidator(final URI baseUri) {\n this.jsonSchemaFactory = JsonSchemaFactory.getInstance(SpecVersion.VersionFlag.V7);\n this.baseUri = baseUri;\n }", "SchemaReference setVersion(String version);", "public void testYourFirstPartition() {\r\n\t UrlValidator urlVal = new UrlValidator(null, null, UrlValidator.ALLOW_ALL_SCHEMES);\r\n\t System.out.println(\"1st partition with a valid scheme = true: \" + urlVal.isValid(\"http://www.google.com\")); //bug here = does not account for http://\r\n System.out.println(\"1st partition with a invalid scheme = false: \" + urlVal.isValid(\"://go.a1a:65a\")); \r\n }", "public void setStrDataSchema(final String strDataSchema) {\n this.strDataSchema = strDataSchema;\n }", "public SchemaDef getSourceSchema();", "public interface SensorSchema\n{\n String ID = \"_id\";\n String SENSOR_ID = \"sensor_id\";\n String NAME = \"name\";\n String PIN_NUMBER = \"pin_number\";\n String FREQUENCY = \"frequency\";\n String TIME_UNIT = \"time_unit\";\n String INPUT_TYPE = \"input_type\";\n String MEASUREMENT_TYPE = \"measurement_type\";\n String THRESHOLD = \"threshold\";\n String THRESHOLD_TYPE = \"threshold_type\";\n String STATE = \"state\";\n String USE_XIVELY = \"use_xively\";\n String DATASTREAM = \"datastream\";\n}", "public void setScheme(String newValue);", "private void fixSchemaDocumentUri(MetadataSchemaRecord schemaRecord, boolean saveUrl) {\n String schemaDocumentUri = schemaRecord.getSchemaDocumentUri();\n schemaRecord.setSchemaDocumentUri(getSchemaDocumentUri(schemaRecord).toString());\n LOG.trace(\"Fix schema document Uri '{}' -> '{}'\", schemaDocumentUri, schemaRecord.getSchemaDocumentUri());\n if (saveUrl) {\n LOG.trace(\"Store path for URI!\");\n Url2Path url2Path = new Url2Path();\n url2Path.setPath(schemaDocumentUri);\n url2Path.setUrl(schemaRecord.getSchemaDocumentUri());\n url2Path.setType(schemaRecord.getType());\n url2Path.setVersion(schemaRecord.getSchemaVersion());\n url2PathDao.save(url2Path);\n }\n }" ]
[ "0.7147353", "0.6984463", "0.6984463", "0.6629155", "0.66020215", "0.65841216", "0.6460415", "0.6364115", "0.6349817", "0.6290244", "0.623084", "0.61599565", "0.61357313", "0.60573936", "0.59503204", "0.5879538", "0.58049405", "0.5789022", "0.5789022", "0.57843155", "0.578323", "0.5769759", "0.5767667", "0.5762977", "0.57459414", "0.57310104", "0.5706264", "0.56904745", "0.5569326", "0.5563721", "0.5549666", "0.55441135", "0.55441135", "0.54911244", "0.54807526", "0.54463154", "0.54457366", "0.5444", "0.54438764", "0.542985", "0.53788245", "0.5371495", "0.5365843", "0.5353684", "0.5348177", "0.5345693", "0.5345693", "0.53356576", "0.5314088", "0.5295183", "0.5294992", "0.5263575", "0.52472883", "0.52293414", "0.52218616", "0.52130747", "0.52130747", "0.5203701", "0.5198971", "0.5193373", "0.5182805", "0.51563543", "0.51445854", "0.51256216", "0.5124387", "0.5118153", "0.5095768", "0.50947976", "0.5080895", "0.50749457", "0.5067582", "0.5045139", "0.50383145", "0.502869", "0.5012795", "0.49950647", "0.49940136", "0.49940136", "0.49940136", "0.49924836", "0.49904507", "0.49875924", "0.49874806", "0.49778548", "0.4964115", "0.4948847", "0.4944569", "0.49292448", "0.49115318", "0.49096707", "0.49077758", "0.48822856", "0.48789853", "0.48758745", "0.48752138", "0.48751476", "0.48718512", "0.48692214", "0.48660442", "0.48657748" ]
0.55581963
30
open_white_list repeated string open_white_list = 11;
public com.google.protobuf.ProtocolStringList getOpenWhiteListList() { return openWhiteList_.getUnmodifiableView(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SList oddWords();", "public java.lang.String getOpenWhiteList(int index) {\n return openWhiteList_.get(index);\n }", "public int getOpenWhiteListCount() {\n return openWhiteList_.size();\n }", "public java.lang.String getOpenWhiteList(int index) {\n return openWhiteList_.get(index);\n }", "public int getOpenWhiteListCount() {\n return openWhiteList_.size();\n }", "private LowercaseWordList() {\n\n }", "static List DuplicateElements(List<Character> characters){\r\n\t\tList newlist=new ArrayList<>();\r\n\t\tfor(char c:characters)\r\n\t\t{\r\n\t\t\tnewlist.add(Collections.nCopies(2,c ));\r\n\t\r\n\t\t}\r\n\tSystem.out.println(newlist);\r\n\treturn newlist;\r\n\t}", "public Builder setOpenWhiteList(\n int index, java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureOpenWhiteListIsMutable();\n openWhiteList_.set(index, value);\n onChanged();\n return this;\n }", "public Builder addOpenWhiteList(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureOpenWhiteListIsMutable();\n openWhiteList_.add(value);\n onChanged();\n return this;\n }", "public static List<String> createCompetencyList() {\n List<String> list = new ArrayList<String>();\n list.add(\"Line number 1\");\n list.add(\"Line number 2\");\n return list;\n }", "private void exercise2() {\n List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerOddLengthList = list.stream()\n .filter((string) -> string.length() % 2 != 0)\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public void setWhiteSpacesCount(long value) {\n this.whiteSpacesCount = value;\n }", "java.util.List<String> getRepeatedStringFieldList();", "List<String> mo5877c(String str);", "private String addRandomSpacing(String originalText) {\n ArrayList<Expression> list = new ArrayList<Expression>();\n\n\t\tclass MyVisitor extends ModifierVisitor<Void> {\n\t\t @Override\n\t\t public Node visit(VariableDeclarator declarator, Void args) {\n\t Expression expression = declarator.getInitializer().get();\n\t \n\t \n\t // We're looking for string.\n\t if (expression instanceof StringLiteralExpr) {\n\t list.add(expression);\n\t }\n\t\t return null;\n\t\t }\n\t\t}\n\t\t\n\t\t\n\t}", "SList evenWords();", "public com.google.protobuf.ProtocolStringList\n getOpenWhiteListList() {\n return openWhiteList_;\n }", "List<String> mo5876c();", "void fillList(List<String> toFill) {\n for (int i = 0; i < number; i++) {\n toFill.add(i + \"\");\n }\n }", "public String getWhiteList0() {\n return getString(\"whitelist.0\");\n }", "public Builder clearOpenWhiteList() {\n openWhiteList_ = com.google.protobuf.LazyStringArrayList.EMPTY;\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n return this;\n }", "public Builder addAllOpenWhiteList(\n java.lang.Iterable<java.lang.String> values) {\n ensureOpenWhiteListIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, openWhiteList_);\n onChanged();\n return this;\n }", "public com.google.protobuf.ByteString\n getOpenWhiteListBytes(int index) {\n return openWhiteList_.getByteString(index);\n }", "public abstract List<C41717j> mo70725h(String str);", "static int getNumPatterns() { return 64; }", "private static void skipSplitAdd(String s, List<String> list) {\n String tmp[] = s.split(\" \");\n\n for (int i = 1; i < tmp.length; i++) {\n list.add(tmp[i]);\n\n // System.out.println(tmp[i]);\n }\n }", "public static void addStars(ArrayList<String> list){\r\n //Loops through the list\r\n for(int i = 1; i < list.size(); i+=2){\r\n list.add(i, \"*\");\r\n }\r\n System.out.println(list);\r\n }", "private void m4676a(List<C0906d> list, StringBuilder sb) {\n if (sb.length() != 0) {\n list.add(new C0906d(C0906d.EnumC0907a.LITERAL, sb.toString()));\n }\n }", "public void setWhiteCounter(int num){\n this.whiteCounter = num;\n }", "StringList createStringList();", "List<C1114c> mo5886k(String str);", "private String genWhiteSpaceRegex(int noOfWhiteSpace,\n String multiWhiteSpace,\n String zeroWhiteSpace) {\n\n return (noOfWhiteSpace == 0) ? zeroWhiteSpace\n : multiWhiteSpace.replace(\"%%\", String.valueOf(noOfWhiteSpace));\n }", "public com.google.protobuf.ByteString\n getOpenWhiteListBytes(int index) {\n return openWhiteList_.getByteString(index);\n }", "private void generateLists(String num, Stack<String> numberList)\n {\n\tfor(int i = 0, len = num.length(); i < len; i++)\n\t numberList.push(new Character(num.charAt(i)).toString());\n }", "private void exercise5() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> nonDuplicateList;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n nonDuplicateList = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .collect(toList());\n }\n\n nonDuplicateList.forEach(System.out::println);\n }", "void mo100443a(List<String> list);", "ListString createListString();", "List<Log> mo13160a(String str, int i);", "public static void main(String[] args) { String s = \"catsanddog\";\n// List<String> wordDict = new ArrayList<>(Arrays.asList(\"cat\", \"cats\", \"and\", \"sand\", \"dog\"));\n//\n String s = \"pineapplepenappl\";\n List<String> wordDict = new ArrayList<>(Arrays.asList(\"apple\", \"pen\", \"applepen\", \"pine\", \"pineapple\"));\n\n WordBreak140 tmp = new WordBreak140();\n tmp.wordBreak(s, wordDict);\n }", "@Test\n public void repeatedSubstringPattern() {\n assertTrue(new Solution1().repeatedSubstringPattern(\"abcabcabcabc\"));\n }", "@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }", "private static List<String> testStringGenerator(List<String> palString) {\n\t\tList<String> list = new ArrayList<>();\n\t\tfor (String pal : palString) {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor (int i = 0; i < 10; i++) {\n\t\t\t\tsb.append(pal);\n\t\t\t\tfor (int j = 0; j < pal.length(); j++) {\n\t\t\t\t\tsb.append(j % 10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(sb.toString());\n\t\t}\n\t\treturn list;\n\t}", "public static void makeBlanks(char[] list) {\n\t\tfor (int i = 0; i < list.length; i++) {\n\t\t\tlist[i] = '*';\n\t\t}\n\t}", "public int selectOriginalTokens (Scanner scan, String [] list){\n \n int count = 0;\n while(scan.hasNext()){\n String line = scan.nextLine();\n String[] t = line.split(\"[ \\n\\t\\r.,:?)({}\\\\[\\\\]]\");\n for (int i = 0; i < t.length; i++){\n String item = t[i].trim();\n if(item.length() > 0){\n list[count] = item;\n count++;\n }//End if statement\n }//End for loop\n }//End while loop\n \n return count;\n }", "void mo54419a(List<String> list);", "private String whiteSpace(String sum, String num)\n {\n\tString space = \"\";\n\tfor(int i = 0; i < sum.length() - num.length(); i++)\n\t space += \" \";\n\treturn space;\n }", "List<C1113b> mo5874b(String str);", "public static List<String> stringList() {\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.add(\"abdxxx\");\n\t\tlist.add(\"xxxxx\");\n\t\tlist.add(\"hi\");\n\t\tlist.add(\"SmoothStack\");\n\t\tlist.add(\"Wyatt x Wyatt x\");\n\t\treturn list;\n\t}", "private static String[] resetStringArray() {\n String[] st = new String[L_MAX];\n L = 2 << 8;\n W = 9;\n int i;\n // initialize symbol table with all 1-character strings\n for (i = 0; i < R; i++)\n st[i] = \"\" + (char) i;\n st[i++] = \"\"; // (unused) lookahead for EOF\n return st;\n }", "public void setUp2( )\n\t{\n\t\tfor( int i = 0; i < 1000; i++ )\n\t\t{\n\t\t\tlista.append( \"\" + i );\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tList<Character>st1=new ArrayList<>();\n\t\n\t\tst1.add('a');\n\t\tst1.add('b');\n\t\tst1.add('a');\n\t\tst1.add('a');\n\t\tst1.add('c');\n\t\tst1.add('t');\n\t\n\t\tSystem.out.println(st1);//[a, b, a, a, c, t]\n\t\t\n\t\tList<Character>st2=new ArrayList<>();//empty []\n\t\tfor (int i=0; i<st1.size();i++) {\n\t\t\tif(!st2.contains(st1.get(i))) {\n\t\t\t\t// created str2 [empty], we will get the element from st1 to st2 while checking if there is repetition \n\t\t\t\tst2.add(st1.get(i));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(st2);//[a, b, c, t]\n\t\t\n\n\t}", "private void many(Set<String> s) {\n\t\twhile (!done() && s.contains(program.charAt(pos)+\"\"))\n\t\t\tpos++;\n }", "@Test\r\n\tpublic void testPositiveGenerateStrings_2() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\", false), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "private static String createPrepStmPlaceHolder(int num) {\n\t\tchar[] c_ar = new char[num*3];\n\t\tc_ar[0] = '(';\n\t\tc_ar[1] = '?';\n\t\tfor(int i=1; i<num; ++i) {\n\t\t\tc_ar[3*i-1] = ',';\n\t\t\tc_ar[3*i] = ' ';\n\t\t\tc_ar[3*i+1] = '?';\n\t\t}\n\t\tc_ar[3*num-1] = ')';\n\t\treturn new String(c_ar);\n\t}", "private void exercise1() {\n final List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerList = list.stream()\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }", "private static String repeatSpace(int number) {\n StringBuilder space = new StringBuilder();\n\n // Adding spaces.\n for (int i = 0; i < number; i++) {\n space.append(\" \");\n }\n\n //returning spaces.\n return space.toString();\n }", "public void mo88640a(List<String> list) {\n List<String> stringList = RxPreferences.INSTANCE.getStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), new ArrayList());\n stringList.addAll(0, list);\n RxPreferences.INSTANCE.putStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), (List) StreamSupport.m150134a(stringList).mo131128a(new AbstractC32239o(new HashSet(stringList)) {\n /* class com.zhihu.android.p1480db.fragment.customview.C18240x255e53c2 */\n private final /* synthetic */ HashSet f$0;\n\n {\n this.f$0 = r1;\n }\n\n @Override // java8.util.p2234b.AbstractC32239o\n public final boolean test(Object obj) {\n return DbEditorSuggestTagCustomView.m93354a(this.f$0, (String) obj);\n }\n }).mo131126a(5).mo131125a(Collectors.m150203a($$Lambda$ofunvu1bqmYbfXGEtxXaV_csE4M.INSTANCE)));\n }", "public Builder addOpenWhiteListBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n ensureOpenWhiteListIsMutable();\n openWhiteList_.add(value);\n onChanged();\n return this;\n }", "private void initWhitespace(Set<String> s) {\n\t\ts.add(\" \");\n\t\ts.add(\"\\n\");\n\t\ts.add(\"\\t\");\n }", "private int skipLeadingWhite( List content, int start) {\r\n if (start < 0) {\r\n start = 0;\r\n }\r\n\r\n int index = start;\r\n int size = content.size();\r\n if (currentFormat.trimAllWhite\r\n || currentFormat.textNormalize\r\n || currentFormat.textTrim) {\r\n while( index < size) {\r\n if ( !isAllWhitespace( content.get(index))) {\r\n return index;\r\n }\r\n index++;\r\n }\r\n }\r\n return index;\r\n }", "List<C1111j> mo5869a(int i);", "@Test\n public void noSpacesBetweenKeywordsTest() {\n tester.yields(\"LaLaLaLaLaaaLi\", lala.EXPRESSION);\n }", "private void appendPlaceHolder(StringBuilder builder, int indent, int consecutiveExcluded, String message) {\n indent(builder, indent);\n builder.append(ELLIPSIS)\n .append(\" \")\n .append(consecutiveExcluded)\n .append(\" \")\n .append(message)\n .append(CoreConstants.LINE_SEPARATOR);\n }", "public void visiualizeSkipList(){\r\n\t\tint number=0;\r\n\t\tNode dummy = sl.getFrom(0,0);\r\n\t\t\r\n\t\tNode next;\r\n\t\tfor(int i=sl.height(); i>=0; i--){\r\n\t\t\t\r\n\t\t\tnext = sl.getFrom(i,0);\r\n\t\t\t\r\n\t\t\tfor(int j=0; j<(sl.size()+2); j++){\r\n\r\n\t\t\t\tnumber = next.getKey();\r\n\t\t\t\t//F.p(number);\r\n\t\t\t\tif(number==dummy.getKey()){\r\n\r\n\t\t\t\t\tif(number==minf)\r\n\t\t\t\t\t\tSystem.out.print(\"-inf\");\r\n\t\t\t\t\telse if(number==inf)\r\n\t\t\t\t\t\tSystem.out.print(\"---inf\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(\"-\",2)+number);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(\"-\",4));\r\n\t\t\t\t\r\n\t\t\t\tif(dummy.getKey()==number)\r\n\t\t\t\t\tnext = next.getRight();\r\n\t\t\t\t\r\n\t\t\t\tdummy = dummy.getRight();\r\n\t\t\t}\r\n\t\t\tdummy = sl.getFrom(0,0);\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testStartingIndicesRegression(){\n\t\tassertLeftmostStartingIndices(\"5,1,7,3,2|-..xxx$1..x...xxx$3....-xx........\", 0, 6, 8, 18, 22);\n\t\tassertRightmostStartingIndices(\"7,5|.......xxx$1....xxx$2..-\", 6, 14);\n\t\t\n\t}", "public long getWhiteSpacesCount() {\n return whiteSpacesCount;\n }", "public MacroList() {\n\t\tthis.macrosses = new HashMap<Integer, String>(12);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_1() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\"), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n String s=\"a /*a*/ sd /*v*/\";\n Pattern p = Pattern.compile(\"(\\\\/\\\\*(\\\\w|\\r\\n)+\\\\*\\\\/)\");\n Matcher m = p.matcher(s);\n List<String> l = new ArrayList<>(100);\n\n while (m.find()) {\n System.out.println(\"tick\");\n l.add(s.substring(m.start()+2, m.end()-2));\n }\n\n System.out.println(l);\n }", "StringPatternCounter(ArrayList<StringPattern> stringPatternList, String fileInput)\n {\n super(fileInput);\n this.stringPatternList = stringPatternList;\n }", "@Before\n public void createString(){\n s1 = \"casa\";\n\ts2 = \"cassa\";\n\ts3 = \"\";\n\ts4 = \"casa\";\n }", "public String minRemoveToMakeValid(String s) {\n int openAvail = 0;\n Set<Integer> skipSet = new HashSet<>();\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) == ')') {\n if (openAvail == 0) {\n skipSet.add(i);\n } else {\n openAvail -= 1;\n }\n } else if (s.charAt(i) == '(') {\n openAvail += 1;\n }\n }\n\n int closedAvail = 0;\n for (int i = s.length() - 1; i >= 0; i--) {\n if (s.charAt(i) == ')') {\n closedAvail += 1;\n } else if (s.charAt(i) == '(') {\n if (closedAvail == 0) {\n skipSet.add(i);\n } else {\n closedAvail -= 1; \n }\n }\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < s.length(); i++) {\n if (!skipSet.contains(i)){\n sb.append(s.charAt(i));\n }\n }\n return sb.toString();\n }", "@SuppressWarnings(\"resource\")\n public static void doubleCapacity(String[] array){\n int wordCount = 0;\n int arrayGrowth = 500;\n array = new String[10];\n String strLine = null;\n while (strLine != null) {\n // Store the content into an array\n Scanner s = new Scanner(strLine);\n while (s.hasNext()) {\n if (array.length == wordCount) {\n // expand list\n array = Arrays.copyOf(array, array.length + arrayGrowth);\n }\n array[wordCount] = s.next();\n wordCount++;\n } \n }\n }", "@Test(timeout = 4000)\n public void test20() throws Throwable {\n StringReader stringReader0 = new StringReader(\"0(Hu\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer2 = new StreamTokenizer(stringReader0);\n JSTerm jSTerm0 = new JSTerm(streamTokenizer0);\n stringReader0.reset();\n StreamTokenizer streamTokenizer3 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer4 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer5 = new StreamTokenizer(stringReader0);\n streamTokenizer0.commentChar((-4));\n StreamTokenizer streamTokenizer6 = new StreamTokenizer(stringReader0);\n streamTokenizer6.ordinaryChars((-1), (-322070664));\n streamTokenizer1.parseNumbers();\n jSTerm0.add((Object) \"JSTerm: Error reading control parameters: \");\n StreamTokenizer streamTokenizer7 = new StreamTokenizer(stringReader0);\n streamTokenizer7.pushBack();\n streamTokenizer1.nextToken();\n StreamTokenizer streamTokenizer8 = new StreamTokenizer(stringReader0);\n streamTokenizer2.slashSlashComments(false);\n JSTerm jSTerm1 = new JSTerm(streamTokenizer5);\n streamTokenizer1.slashStarComments(false);\n streamTokenizer3.eolIsSignificant(false);\n streamTokenizer7.commentChar((-4));\n StreamTokenizer streamTokenizer9 = new StreamTokenizer(stringReader0);\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n jSSubstitution0.listIterator();\n JSSubstitution jSSubstitution1 = jSTerm1.matches((JSPredicateForm) jSTerm0, jSSubstitution0);\n assertTrue(jSSubstitution1.fail());\n }", "public Removalstops()\n {\n stopWords.add(\"am\");\n stopWords.add(\"my\");\nstopWords.add(\"at\");\nstopWords.add(\"a\");\nstopWords.add(\"i\");\nstopWords.add(\"is\");\nstopWords.add(\"of\");\nstopWords.add(\"have\");\nstopWords.add(\"--\");\nstopWords.add(\"do\");\nstopWords.add(\"the\");\nstopWords.add(\"was\");\nstopWords.add(\"iam\");\nstopWords.add(\"there\");\nstopWords.add(\"what\");\nstopWords.add(\"for\");\nstopWords.add(\"in\");\nstopWords.add(\"very\");\nstopWords.add(\"and\");\nstopWords.add(\"to\");\nstopWords.add(\"often\");\nstopWords.add(\"because\");\nstopWords.add(\"in\");\nstopWords.add(\"an\");\nstopWords.add(\"can\");\nstopWords.add(\"via\");\nstopWords.add(\"even\");\nstopWords.add(\"as\");\nstopWords.add(\"best\");\nstopWords.add(\"been\");\nstopWords.add(\"into\");\nstopWords.add(\"by\");\nstopWords.add(\"around\");\nstopWords.add(\"being\");\nstopWords.add(\"from\");\nstopWords.add(\"etc\");\nstopWords.add(\"his\");\nstopWords.add(\"do\");\nstopWords.add(\"have\");\nstopWords.add(\"had\"); \nstopWords.add(\"able\");\nstopWords.add(\"about\");\nstopWords.add(\"above\");\nstopWords.add(\"abroad\");\nstopWords.add(\"according\");\nstopWords.add(\"accordingly\");\nstopWords.add(\"across\");\nstopWords.add(\"actually\");\nstopWords.add(\"adj\");\nstopWords.add(\"after\");\nstopWords.add(\"afterwards\");\nstopWords.add(\"again\");\nstopWords.add(\"against\");\nstopWords.add(\"ago\");\nstopWords.add(\"ahead\");\nstopWords.add(\"ain't\");\nstopWords.add(\"all\");\nstopWords.add(\"allow\");\nstopWords.add(\"allows\");\nstopWords.add(\"almost\");\nstopWords.add(\"alone\");\nstopWords.add(\"along\");\nstopWords.add(\"alongside\");\nstopWords.add(\"already\");\nstopWords.add(\"also\");\nstopWords.add(\"although\");\nstopWords.add(\"always\");\nstopWords.add(\"am\");\nstopWords.add(\"amid\");\nstopWords.add(\"amidst\");\nstopWords.add(\"among\");\nstopWords.add(\"amongst\");\nstopWords.add(\"an\");\nstopWords.add(\"and\");\nstopWords.add(\"another\");\nstopWords.add(\"any\");\nstopWords.add(\"anybody\");\nstopWords.add(\"anyhow\");\nstopWords.add(\"anyone\");\nstopWords.add(\"anything\");\nstopWords.add(\"anyway\");\nstopWords.add(\"anyways\");\nstopWords.add(\"anywhere\");\nstopWords.add(\"apart\");\nstopWords.add(\"appear\");\nstopWords.add(\"appreciate\");\nstopWords.add(\"appropriate\");\nstopWords.add(\"are\");\nstopWords.add(\"aren't\");\nstopWords.add(\"around\");\nstopWords.add(\"as\");\nstopWords.add(\"a's\");\nstopWords.add(\"aside\");\nstopWords.add(\"ask\");\nstopWords.add(\"asking\");\nstopWords.add(\"associated\");\nstopWords.add(\"at\");\nstopWords.add(\"available\");\nstopWords.add(\"away\");\nstopWords.add(\"awfully\");\nstopWords.add(\"back\");\nstopWords.add(\"backward\");\nstopWords.add(\"backwards\");\nstopWords.add(\"be\");\nstopWords.add(\"became\");\nstopWords.add(\"beacause\");\nstopWords.add(\"become\");\nstopWords.add(\"becomes\");\nstopWords.add(\"becoming\");\nstopWords.add(\"been\");\nstopWords.add(\"before\");\nstopWords.add(\"beforehand\");\nstopWords.add(\"begin\");\nstopWords.add(\"behind\");\nstopWords.add(\"being\");\nstopWords.add(\"believe\");\nstopWords.add(\"below\");\nstopWords.add(\"beside\");\nstopWords.add(\"besides\");\nstopWords.add(\"best\");\nstopWords.add(\"better\");\nstopWords.add(\"between\");\nstopWords.add(\"beyond\");\nstopWords.add(\"both\");\nstopWords.add(\"brief\");\nstopWords.add(\"but\");\nstopWords.add(\"by\");\nstopWords.add(\"came\");\nstopWords.add(\"can\");\nstopWords.add(\"cannot\");\nstopWords.add(\"cant\");\nstopWords.add(\"can't\");\nstopWords.add(\"caption\");\nstopWords.add(\"cause\");\nstopWords.add(\"causes\");\nstopWords.add(\"certain\");\nstopWords.add(\"cetrainly\");\nstopWords.add(\"changes\");\nstopWords.add(\"clearly\");\nstopWords.add(\"c'mon\");\nstopWords.add(\"co\");\nstopWords.add(\"co.\");\nstopWords.add(\"com\");\nstopWords.add(\"come\");\nstopWords.add(\"comes\");\nstopWords.add(\"concerning\");\nstopWords.add(\"consequently\");\nstopWords.add(\"consider\");\nstopWords.add(\"considering\");\nstopWords.add(\"could\");\nstopWords.add(\"couldn't\");\nstopWords.add(\"c's\");\nstopWords.add(\"currently\");\nstopWords.add(\"dare\");\nstopWords.add(\"daren't\");\nstopWords.add(\"definitely\");\nstopWords.add(\"described\");\nstopWords.add(\"despite\");\nstopWords.add(\"did\");\nstopWords.add(\"didn't\");\nstopWords.add(\"different\");\nstopWords.add(\"directly\");\nstopWords.add(\"do\");\nstopWords.add(\"does\");\nstopWords.add(\"doesn't\");\nstopWords.add(\"doing\");\nstopWords.add(\"done\");\nstopWords.add(\"don't\");\nstopWords.add(\"down\");\nstopWords.add(\"downwards\");\nstopWords.add(\"during\");\nstopWords.add(\"each\");\nstopWords.add(\"edu\");\nstopWords.add(\"eg\");\nstopWords.add(\"eight\");\nstopWords.add(\"eighty\");\nstopWords.add(\"either\");\nstopWords.add(\"else\");\nstopWords.add(\"elsewhere\");\nstopWords.add(\"end\");\nstopWords.add(\"ending\");\nstopWords.add(\"enough\");\nstopWords.add(\"entirely\");\nstopWords.add(\"especially\");\nstopWords.add(\"et\");\nstopWords.add(\"etc\");\nstopWords.add(\"even\");\nstopWords.add(\"evenmore\");\nstopWords.add(\"every\");\nstopWords.add(\"everybody\");\nstopWords.add(\"everyone\");\nstopWords.add(\"everything\");\nstopWords.add(\"everywhere\");\nstopWords.add(\"ex\");\nstopWords.add(\"exactly\");\nstopWords.add(\"example\");\nstopWords.add(\"except\");\nstopWords.add(\"fairly\");\nstopWords.add(\"far\");\nstopWords.add(\"farhter\");\nstopWords.add(\"few\");\nstopWords.add(\"fewer\");\nstopWords.add(\"fifth\");\nstopWords.add(\"first\");\nstopWords.add(\"five\");\nstopWords.add(\"followed\");\nstopWords.add(\"following\");\nstopWords.add(\"follows\");\nstopWords.add(\"for\");\nstopWords.add(\"forever\");\nstopWords.add(\"former\");\nstopWords.add(\"formerly\");\nstopWords.add(\"forth\");\nstopWords.add(\"forward\");\nstopWords.add(\"found\");\nstopWords.add(\"four\");\nstopWords.add(\"from\");\nstopWords.add(\"further\");\nstopWords.add(\"furthermore\");\nstopWords.add(\"get\");\nstopWords.add(\"gets\");\nstopWords.add(\"getting\");\nstopWords.add(\"given\");\nstopWords.add(\"gives\");\nstopWords.add(\"go\");\nstopWords.add(\"goes\");\nstopWords.add(\"going\");\nstopWords.add(\"gone\");\nstopWords.add(\"got\");\nstopWords.add(\"gotten\");\nstopWords.add(\"greetings\");\nstopWords.add(\"had\");\nstopWords.add(\"hadn't\");\nstopWords.add(\"half\");\nstopWords.add(\"happens\");\nstopWords.add(\"hardly\");\nstopWords.add(\"has\");\nstopWords.add(\"hasn't\");\nstopWords.add(\"have\");\nstopWords.add(\"haven't\");\nstopWords.add(\"having\");\nstopWords.add(\"he\");\nstopWords.add(\"he'd\");\nstopWords.add(\"he'll\");\nstopWords.add(\"hello\");\nstopWords.add(\"help\");\nstopWords.add(\"hence\");\nstopWords.add(\"her\");\nstopWords.add(\"here\");\nstopWords.add(\"hereafter\");\nstopWords.add(\"hereby\");\nstopWords.add(\"herein\");\nstopWords.add(\"here's\");\nstopWords.add(\"hereupon\");\nstopWords.add(\"hers\");\nstopWords.add(\"herself\");\nstopWords.add(\"he's\");\nstopWords.add(\"hi\");\nstopWords.add(\"him\");\nstopWords.add(\"himself\");\nstopWords.add(\"his\");\nstopWords.add(\"hither\");\nstopWords.add(\"hopefully\");\nstopWords.add(\"how\");\nstopWords.add(\"howbeit\");\nstopWords.add(\"however\");\nstopWords.add(\"however\");\nstopWords.add(\"hundred\");\nstopWords.add(\"i'd\");\nstopWords.add(\"ie\");\nstopWords.add(\"if\");\nstopWords.add(\"ignored\");\nstopWords.add(\"i'll\");\nstopWords.add(\"i'm\");\nstopWords.add(\"immediate\");\nstopWords.add(\"in\");\nstopWords.add(\"iansmuch\");\nstopWords.add(\"inc\");\nstopWords.add(\"inc.\");\nstopWords.add(\"indeed\");\nstopWords.add(\"indicate\");\nstopWords.add(\"indicated\");\nstopWords.add(\"indicates\");\nstopWords.add(\"inner\");\nstopWords.add(\"inside\");\nstopWords.add(\"insofar\");\nstopWords.add(\"into\");\nstopWords.add(\"inward\");\nstopWords.add(\"is\");\nstopWords.add(\"isn't\");\nstopWords.add(\"it\");\nstopWords.add(\"it'd\");\nstopWords.add(\"it'll\");\nstopWords.add(\"its\");\nstopWords.add(\"it's\");\nstopWords.add(\"itself\");\nstopWords.add(\"i've\");\nstopWords.add(\"just\");\nstopWords.add(\"k\");\nstopWords.add(\"keep\");\nstopWords.add(\"keeps\");\nstopWords.add(\"kept\");\nstopWords.add(\"know\");\nstopWords.add(\"knows\");\nstopWords.add(\"known\");\nstopWords.add(\"last\");\nstopWords.add(\"lately\");\nstopWords.add(\"later\");\nstopWords.add(\"latter\");\nstopWords.add(\"latterly\");\nstopWords.add(\"least\");\nstopWords.add(\"less\");\nstopWords.add(\"let\");\nstopWords.add(\"let's\");\nstopWords.add(\"like\");\nstopWords.add(\"liked\");\nstopWords.add(\"likely\");\nstopWords.add(\"likewise\");\nstopWords.add(\"little\");\nstopWords.add(\"look\");\nstopWords.add(\"looks\");\nstopWords.add(\"low\");\nstopWords.add(\"lower\");\nstopWords.add(\"ltd\");\nstopWords.add(\"made\");\nstopWords.add(\"mainly\");\nstopWords.add(\"make\");\nstopWords.add(\"makes\");\nstopWords.add(\"many\");\nstopWords.add(\"may\");\nstopWords.add(\"maybe\");\nstopWords.add(\"mayn't\");\nstopWords.add(\"me\");\nstopWords.add(\"mean\");\nstopWords.add(\"meanwhile\");\nstopWords.add(\"merely\");\nstopWords.add(\"might\");\nstopWords.add(\"mightn't\");\nstopWords.add(\"mine\");\nstopWords.add(\"minus\");\nstopWords.add(\"miss\");\nstopWords.add(\"more\");\nstopWords.add(\"moreover\");\nstopWords.add(\"most\");\nstopWords.add(\"mostly\");\nstopWords.add(\"mr\");\nstopWords.add(\"mrs\");\nstopWords.add(\"much\");\nstopWords.add(\"must\");\nstopWords.add(\"mustn't\");\nstopWords.add(\"my\");\nstopWords.add(\"myself\");\nstopWords.add(\"name\");\nstopWords.add(\"namely\");\nstopWords.add(\"nd\");\nstopWords.add(\"near\");\nstopWords.add(\"nearly\");\nstopWords.add(\"necessary\");\nstopWords.add(\"need\");\nstopWords.add(\"needn't\");\nstopWords.add(\"needs\");\nstopWords.add(\"neither\");\nstopWords.add(\"never\");\nstopWords.add(\"neverf\");\nstopWords.add(\"neverless\");\nstopWords.add(\"nevertheless\");\nstopWords.add(\"new\");\nstopWords.add(\"next\");\nstopWords.add(\"nine\");\nstopWords.add(\"ninety\");\nstopWords.add(\"no\");\nstopWords.add(\"nobody\");\nstopWords.add(\"non\");\nstopWords.add(\"none\");\nstopWords.add(\"nonetheless\");\nstopWords.add(\"noone\");\nstopWords.add(\"no-one\");\nstopWords.add(\"nor\");\nstopWords.add(\"normally\");\nstopWords.add(\"not\");\nstopWords.add(\"nothing\");\nstopWords.add(\"notwithstanding\");\nstopWords.add(\"novel\");\nstopWords.add(\"now\");\nstopWords.add(\"nowwhere\");\nstopWords.add(\"obviously\");\nstopWords.add(\"of\");\nstopWords.add(\"off\");\nstopWords.add(\"often\");\nstopWords.add(\"oh\");\nstopWords.add(\"ok\");\nstopWords.add(\"okay\");\nstopWords.add(\"old\");\nstopWords.add(\"on\");\nstopWords.add(\"once\");\nstopWords.add(\"one\");\nstopWords.add(\"ones\");\nstopWords.add(\"one's\");\nstopWords.add(\"only\");\nstopWords.add(\"onto\");\nstopWords.add(\"opposite\");\nstopWords.add(\"or\");\nstopWords.add(\"other\");\nstopWords.add(\"others\");\nstopWords.add(\"otherwise\");\nstopWords.add(\"ought\");\nstopWords.add(\"oughtn't\");\nstopWords.add(\"our\");\nstopWords.add(\"ourselves\");\nstopWords.add(\"out\");\nstopWords.add(\"outside\");\nstopWords.add(\"over\");\nstopWords.add(\"overall\");\nstopWords.add(\"own\");\nstopWords.add(\"particular\");\nstopWords.add(\"particularly\");\nstopWords.add(\"past\");\nstopWords.add(\"per\");\nstopWords.add(\"perhaps\");\nstopWords.add(\"placed\");\nstopWords.add(\"please\");\nstopWords.add(\"plus\");\nstopWords.add(\"possible\");\nstopWords.add(\"presumably\");\nstopWords.add(\"probably\");\nstopWords.add(\"provided\");\nstopWords.add(\"provides\");\nstopWords.add(\"que\");\nstopWords.add(\"quite\");\nstopWords.add(\"qv\");\nstopWords.add(\"rather\");\nstopWords.add(\"rd\");\nstopWords.add(\"re\");\nstopWords.add(\"really\");\nstopWords.add(\"reasonably\");\nstopWords.add(\"recent\");\nstopWords.add(\"recently\");\nstopWords.add(\"regarding\");\nstopWords.add(\"regardless\");\nstopWords.add(\"regards\");\nstopWords.add(\"relatively\");\nstopWords.add(\"respectively\");\nstopWords.add(\"right\");\nstopWords.add(\"round\");\nstopWords.add(\"said\");\nstopWords.add(\"same\");\nstopWords.add(\"saw\");\nstopWords.add(\"say\");\nstopWords.add(\"saying\");\nstopWords.add(\"says\");\nstopWords.add(\"second\");\nstopWords.add(\"secondly\");\nstopWords.add(\"see\");\nstopWords.add(\"seeing\");\nstopWords.add(\"seem\");\nstopWords.add(\"seemed\");\nstopWords.add(\"seeming\");\nstopWords.add(\"seems\");\nstopWords.add(\"seen\");\nstopWords.add(\"self\");\nstopWords.add(\"selves\");\nstopWords.add(\"sensible\");\nstopWords.add(\"sent\");\nstopWords.add(\"serious\");\nstopWords.add(\"seriously\");\nstopWords.add(\"seven\");\nstopWords.add(\"several\");\nstopWords.add(\"shall\");\nstopWords.add(\"shan't\");\nstopWords.add(\"she\");\nstopWords.add(\"she'd\");\nstopWords.add(\"she'll\");\nstopWords.add(\"she's\");\nstopWords.add(\"should\");\nstopWords.add(\"shouldn't\");\nstopWords.add(\"since\");\nstopWords.add(\"six\");\nstopWords.add(\"so\");\nstopWords.add(\"some\");\nstopWords.add(\"somebody\");\nstopWords.add(\"someday\");\nstopWords.add(\"somehow\");\nstopWords.add(\"someone\");\nstopWords.add(\"something\");\nstopWords.add(\"sometime\");\nstopWords.add(\"sometimes\");\nstopWords.add(\"somewhat\");\nstopWords.add(\"somewhere\");\nstopWords.add(\"soon\");\nstopWords.add(\"sorry\");\nstopWords.add(\"specified\");\nstopWords.add(\"specify\");\nstopWords.add(\"specifying\");\nstopWords.add(\"still\");\nstopWords.add(\"sub\");\nstopWords.add(\"such\");\nstopWords.add(\"sup\");\nstopWords.add(\"sure\");\nstopWords.add(\"take\");\nstopWords.add(\"taken\");\nstopWords.add(\"taking\");\nstopWords.add(\"tell\");\nstopWords.add(\"tends\");\nstopWords.add(\"th\");\nstopWords.add(\"than\");\nstopWords.add(\"thank\");\nstopWords.add(\"thanks\");\nstopWords.add(\"thanx\");\nstopWords.add(\"that\");\nstopWords.add(\"that'll\");\nstopWords.add(\"thats\");\nstopWords.add(\"that've\");\nstopWords.add(\"the\");\nstopWords.add(\"their\");\nstopWords.add(\"theirs\");\nstopWords.add(\"them\");\nstopWords.add(\"themselves\");\nstopWords.add(\"then\");\nstopWords.add(\"thence\");\nstopWords.add(\"there\");\nstopWords.add(\"thereafter\");\nstopWords.add(\"thereby\");\nstopWords.add(\"there'd\");\nstopWords.add(\"therefore\");\nstopWords.add(\"therein\");\nstopWords.add(\"ther'll\");\nstopWords.add(\"there're\");\nstopWords.add(\"theres\");\nstopWords.add(\"there's\");\nstopWords.add(\"thereupon\");\nstopWords.add(\"there've\");\nstopWords.add(\"these\");\nstopWords.add(\"they\");\nstopWords.add(\"they'd\");\nstopWords.add(\"they'll\");\nstopWords.add(\"they're\");\nstopWords.add(\"they've\");\nstopWords.add(\"thing\");\nstopWords.add(\"things\");\nstopWords.add(\"think\");\nstopWords.add(\"third\");\nstopWords.add(\"thirty\");\nstopWords.add(\"this\");\nstopWords.add(\"thorough\");\nstopWords.add(\"thoroughly\");\nstopWords.add(\"those\");\nstopWords.add(\"though\");\nstopWords.add(\"throughout\");\nstopWords.add(\"thru\");\nstopWords.add(\"thus\");\nstopWords.add(\"till\");\nstopWords.add(\"to\");\nstopWords.add(\"together\");\nstopWords.add(\"too\");\nstopWords.add(\"took\");\nstopWords.add(\"toward\");\nstopWords.add(\"towards\");\nstopWords.add(\"tried\");\nstopWords.add(\"tries\");\nstopWords.add(\"truly\");\nstopWords.add(\"try\");\nstopWords.add(\"trying\");\nstopWords.add(\"t's\");\nstopWords.add(\"twice\");\nstopWords.add(\"two\");\nstopWords.add(\"un\");\nstopWords.add(\"under\");\nstopWords.add(\"underneath\");\nstopWords.add(\"undoing\");\nstopWords.add(\"unfortunately\");\nstopWords.add(\"unless\");\nstopWords.add(\"unlike\");\nstopWords.add(\"unlikely\");\nstopWords.add(\"untill\");\nstopWords.add(\"unto\");\nstopWords.add(\"up\");\nstopWords.add(\"upon\");\nstopWords.add(\"upwards\");\nstopWords.add(\"us\");\nstopWords.add(\"use\");\nstopWords.add(\"used\");\nstopWords.add(\"useful\");\nstopWords.add(\"uses\");\nstopWords.add(\"using\");\nstopWords.add(\"usually\");\nstopWords.add(\"v\");\nstopWords.add(\"value\");\nstopWords.add(\"various\");\nstopWords.add(\"versus\");\nstopWords.add(\"very\");\nstopWords.add(\"via\");\nstopWords.add(\"viz\");\nstopWords.add(\"vs\");\nstopWords.add(\"want\");\nstopWords.add(\"wants\");\nstopWords.add(\"was\");\nstopWords.add(\"wasn't\");\nstopWords.add(\"way\");\nstopWords.add(\"we\");\nstopWords.add(\"we'd\");\nstopWords.add(\"welcome\");\nstopWords.add(\"well\");\nstopWords.add(\"we'll\");\nstopWords.add(\"went\");\nstopWords.add(\"were\");\nstopWords.add(\"we're\");\nstopWords.add(\"weren't\");\nstopWords.add(\"we've\");\nstopWords.add(\"what\");\nstopWords.add(\"whatever\");\nstopWords.add(\"what'll\");\nstopWords.add(\"what's\");\nstopWords.add(\"what've\");\nstopWords.add(\"when\");\nstopWords.add(\"whence\");\nstopWords.add(\"whenever\");\nstopWords.add(\"where\");\nstopWords.add(\"whereafter\");\nstopWords.add(\"whereas\");\nstopWords.add(\"whereby\");\nstopWords.add(\"wherein\");\nstopWords.add(\"where's\");\nstopWords.add(\"whereupon\");\nstopWords.add(\"whereever\");\nstopWords.add(\"whether\");\nstopWords.add(\"which\");\nstopWords.add(\"whichever\");\nstopWords.add(\"while\");\nstopWords.add(\"whilst\");\nstopWords.add(\"whither\");\nstopWords.add(\"who\");\nstopWords.add(\"who'd\");\nstopWords.add(\"whoever\");\nstopWords.add(\"whole\");\nstopWords.add(\"who'll\");\nstopWords.add(\"whom\");\nstopWords.add(\"whomever\");\nstopWords.add(\"who's\");\nstopWords.add(\"whose\");\nstopWords.add(\"why\");\nstopWords.add(\"will\");\nstopWords.add(\"willing\");\nstopWords.add(\"wish\");\nstopWords.add(\"with\");\nstopWords.add(\"within\");\nstopWords.add(\"without\");\nstopWords.add(\"wonder\");\nstopWords.add(\"won't\");\nstopWords.add(\"would\");\nstopWords.add(\"wouldn't\");\nstopWords.add(\"yes\");\nstopWords.add(\"yet\");\nstopWords.add(\"you\");\nstopWords.add(\"you'd\");\nstopWords.add(\"you'll\");\nstopWords.add(\"your\");\nstopWords.add(\"you're\");\nstopWords.add(\"yours\");\nstopWords.add(\"yourself\");\nstopWords.add(\"you've\");\nstopWords.add(\"zero\");\n\n \n \n }", "public abstract void mo9247b(String str, long j, List<String> list);", "private int skipTrialingWhite( List content, int start) {\r\n int size = content.size();\r\n if (start > size) {\r\n start = size;\r\n }\r\n\r\n int index = start;\r\n if (currentFormat.trimAllWhite\r\n || currentFormat.textNormalize\r\n || currentFormat.textTrim) {\r\n while( index >= 0) {\r\n if ( !isAllWhitespace( content.get(index - 1)))\r\n break;\r\n --index;\r\n }\r\n }\r\n return index;\r\n }", "private void fillSet() {\r\n\t\tString regex = \"\\\\p{L}+\";\r\n\t\tMatcher matcher = Pattern.compile(regex).matcher(body);\r\n\t\twhile (matcher.find()) {\r\n\t\t\tif (!matcher.group().isEmpty()) {\r\n\t\t\t\twords.add(matcher.group());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private ArrayList<Integer> getEmptySpaces(char[] board) {\n ArrayList<Integer> emptySpaces = new ArrayList<>();\n for (int i = 0; i < board.length; i++) {\n if (board[i] == ' ') {\n emptySpaces.add(i);\n }\n }\n return emptySpaces;\n }", "void mo13370a(int i, int i2, List<C15929a> list) throws IOException;", "private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }", "public static void main(String[] args) {\n String[] strings = new String[100];\n for (int i = 0; i < strings.length; i++) {\n strings[i] = randomStrings(2);\n }\n// for (String s : strings) {\n// System.out.println(s);\n// }\n ArrayList<String> appeared = new ArrayList<>();\n for (String s : strings) {\n if (!appeared.contains(s)) {\n appeared.add(s);\n }\n }\n System.out.println(appeared.size());\n\n }", "private static Stream<List<Tile>> substituteBlanks(List<Tile> p) {\n Stream<List<Tile>> res = Stream.of(p);\n //Iterate through all letters.\n for (int i = 0; i < p.size(); i++) {\n //Check for blanks.\n if (p.get(i).getLetter() == Character.MIN_VALUE) {\n //If blank found, substitute it for all a-z, and look again for next blank.\n res = substituteBlankAtIndex(p, i)\n .flatMap(s -> substituteBlanks(s));\n }\n }\n\n return res;\n }", "private IgnoreListHelper() {\n\t}", "@Test\n\t public void test5 ()\n\t{\n\t\t\tString s = new String(\"aaabaaaaabaabaaaabaaaaaaaaaaaaaabaaaaaaaaaaaaaaabaaaaaaaaaaaaaaba\");\n\t s = s.replaceAll(\"\\\\s+\", \" \");\n\t assertEquals(\"aaaaaaaaaaaaaabaaaaaaaaaaaaaa\", LRS.lrs(s)); \n\t}", "public static List<String> findRepeatedDnaSequences(String s) {\n \tList<String> re=new ArrayList<String>();\n \tif(s.length()<=10){\n \t\treturn re;\n \t}\n \tMap<String, Integer> map=new HashMap<String, Integer>(); \t\n \tfor(int i=10; i<=s.length(); i++){\n \t\tString k=s.substring(i-10, i);\n \t\tif(map.containsKey(k)){\n \t\t\tint val=map.get(k);\n \t\t\tif(val==1){\n \t\t\t\tre.add(k);\n \t\t\t}\n \t\t\tmap.put(k, val+1);\n \t\t}else{\n \t\t\tmap.put(k, 1);\n \t\t}\n \t}\n \treturn re;\n }", "public static void main(){\r\n\t\t\r\n\t\tArrayList<tok> pHolder = new ArrayList<tok>();\r\n\r\n\t\t pHolder.add(new tok(\"@\", \"@\"));\r\n\t\t\r\n\t\treturn;\r\n\t}", "public void mo9497b(List<String> list) {\n this.f1514c = list;\n }", "private void listEntries(BufferedWriter bw, String previous, int start, int end, String zeroes) throws IOException {\n\t\tint writeStart = -1;\n\t\tStringBuilder sb = new StringBuilder();\n\t\tchar c;\n\t\tfor (int i = 0, l = previous.length(); i < l && writeStart == -1; i++) {\n\t\t\tc = previous.charAt(i);\n\t\t\tif (Character.isDigit(c)) {sb.append(c);}\n\t\t\telse {writeStart = Integer.parseInt(sb.toString());}\n\t\t}\n\t\tfor (int i = start; i < end; i++) {bw.write(++writeStart + \"=\" + zeroes + i + \"\\n\");}\n\t}", "public void m20623OooO00o() {\n for (C8964ooOOo000 ooooo000 : this.f22213OooO00o) {\n OooO00o(ooooo000);\n }\n this.f22212OooO00o.clear();\n this.f22213OooO00o.clear();\n }", "public static List<String> findStrobogrammatic(int n) {\n List<String> cur, ans;\n ans = new ArrayList<String>((n & 1) == 0 ? Arrays.asList(\"\") : Arrays.asList(\"0\", \"1\", \"8\"));\n if (n < 2) return ans;\n\n for (;n > 1; n -= 2) {\n cur = ans;\n ans = new ArrayList<String>();\n for (String i : cur) {\n if (n > 3) {\n ans.add('0' + i + '0');\n }\n ans.add('1' + i + '1');\n ans.add('8' + i + '8');\n ans.add('6' + i + '9');\n ans.add('9' + i + '6');\n }\n }\n System.out.println(ans.size());\n return ans;\n }", "public String addWhiteSpace(String str, int number) {\n\t\tStringBuilder result = new StringBuilder();\n\t\tfor (int i = 0; i < str.length(); i+=2) {\n\t\t if (i > 0) {\n\t\t\t for (int j = 0; j < number; j++)\n\t\t\t\t result.append(\" \");\n\t\t }\n\t\t result.append(str.charAt(i));\n\t\t result.append(str.charAt(i+1));\n\t\t}\n\t\treturn result.toString();\n\t}", "private void fillRandomList()\n\t{\n\t\trandomList.add(\"I like cheese.\");\n\t\trandomList.add(\"Tortoise can move faster than slow rodent.\");\n\t\trandomList.add(\"I enjoy sitting on the ground.\");\n\t\trandomList.add(\"I like cereal.\");\n\t\trandomList.add(\"This is random.\");\n\t\trandomList.add(\"I like typing\");\n\t\trandomList.add(\"FLdlsjejf is my favorite word.\");\n\t\trandomList.add(\"I have two left toes.\");\n\t\trandomList.add(\"Sqrt(2) = 1.414213562 ...\");\n\t\trandomList.add(\"Hi mom.\");\n\t}", "private List<WordScore> liveList(List<WordScore> gridList, String s) {\n s = s.toLowerCase();\n List<WordScore> liveList = new ArrayList<>();\n for(WordScore ws : gridList){\n int nochars = s.length() - s.replaceAll(ws.getWord(), \"\").length();\n liveList.add(new WordScore(ws.getWord(), ws.getScore()-nochars));\n }\n return liveList;\n }", "private static List<String> induceSynonims(String word) {\n\t\treturn null;\n\t}", "public static void main(String[] args) {\n\t\tString s=\"22\";\n\t\t\n\t\tif(s.indexOf(\"1\")>=0||s.equals(\"\"))\n\t\t\tSystem.out.println(\"hello\");\n\t\t\t\n\t\tArrayList f=new ArrayList();\n\t\tint stack[]=new int[2*s.length()];\n\t\tint top=-1;\n\t\tchar a[][]=new char[][]{{},{},{'#','a','b','c','#'},{'#','d','e','f','#'},{'#','g','h','i','#'},{'#','j','k','l','#'},{'#','m','n','o','#'},{'#','p','q','r','s','#'},{'#','t','u','v','#'},{'#','w','x','y','z','#'}};\n\t\tint length[]=new int []{0,0,3,3,3,3,3,4,3,4};\n\t\tStringBuilder ans=new StringBuilder();\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tint x=stack[++top]=(int)s.charAt(i)-'0';\n\t\t\tans.append(a[x][1]);\n\t\t\tstack[++top]=1;\n\t\t}\n\t\twhile(stack[1]!=length[(int)s.charAt(0)-'0']+1){\n\t\t\tif(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\tif(s.length()==(top+1)/2){\n\t\t\t\t\twhile(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\t\t\tint r=(top-1)/2;\n\t\t\t\t\t\tchar r1=a[stack[top-1]][stack[top]];\n\t\t\t\t\t\tans.setCharAt(r, r1);\n\t\t\t\t\t\tString ans1=ans.toString();\n\t\t\t\t\t\tf.add(ans1);\n\t\t\t\t\t\tstack[top]++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t\t\ttop+=2;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[top]=1;\n\t\t\t\ttop-=2;\n\t\t\t\tstack[top]++;\n\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(f.size());\n\t}", "private void modify(List listString){\n\t}", "private String repeatM(int count){\n return new String(new char[count]).replace('\\0','M');\n }", "public static void loopThroughListOfStrings(List<String> input) {\n\t\t\n\t\tList<String> output = input.stream().filter(i -> i.length()>=4).collect(Collectors.toList());\n\t\t\n\t\tSystem.out.println(output);\n\t}" ]
[ "0.55588835", "0.55229723", "0.54595375", "0.54238254", "0.5377577", "0.53646344", "0.52897197", "0.5288007", "0.5233525", "0.5225019", "0.521158", "0.5200129", "0.51884824", "0.5185825", "0.51782596", "0.51773864", "0.5151502", "0.5142657", "0.514163", "0.513604", "0.51307565", "0.5129297", "0.50706583", "0.5069423", "0.5069118", "0.50578684", "0.5051562", "0.5048556", "0.5042992", "0.5030988", "0.5012325", "0.49734595", "0.49587935", "0.49542245", "0.49387205", "0.49275225", "0.4927479", "0.49069813", "0.48751348", "0.4858941", "0.48582852", "0.48521936", "0.48219705", "0.48149616", "0.48114434", "0.48105443", "0.48057917", "0.4804807", "0.4803039", "0.4787876", "0.47805554", "0.4765939", "0.4741199", "0.47396874", "0.47387704", "0.4736322", "0.47323987", "0.4732157", "0.47237864", "0.47171202", "0.47171193", "0.47170532", "0.47169754", "0.47078192", "0.4697591", "0.4677753", "0.46771806", "0.46718898", "0.46639842", "0.46629536", "0.46625173", "0.46510023", "0.46136248", "0.46063063", "0.46059436", "0.4605689", "0.4595574", "0.45940256", "0.45932886", "0.459322", "0.4587189", "0.4584727", "0.45785964", "0.45778894", "0.4575683", "0.4572642", "0.45703217", "0.45672476", "0.45662442", "0.45627823", "0.45595953", "0.45576534", "0.45555827", "0.45507377", "0.45498928", "0.45479152", "0.45470604", "0.4544842", "0.45396292", "0.45385683" ]
0.4880256
38
open_white_list repeated string open_white_list = 11;
public int getOpenWhiteListCount() { return openWhiteList_.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SList oddWords();", "public java.lang.String getOpenWhiteList(int index) {\n return openWhiteList_.get(index);\n }", "public int getOpenWhiteListCount() {\n return openWhiteList_.size();\n }", "public java.lang.String getOpenWhiteList(int index) {\n return openWhiteList_.get(index);\n }", "private LowercaseWordList() {\n\n }", "public Builder setOpenWhiteList(\n int index, java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureOpenWhiteListIsMutable();\n openWhiteList_.set(index, value);\n onChanged();\n return this;\n }", "static List DuplicateElements(List<Character> characters){\r\n\t\tList newlist=new ArrayList<>();\r\n\t\tfor(char c:characters)\r\n\t\t{\r\n\t\t\tnewlist.add(Collections.nCopies(2,c ));\r\n\t\r\n\t\t}\r\n\tSystem.out.println(newlist);\r\n\treturn newlist;\r\n\t}", "public Builder addOpenWhiteList(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureOpenWhiteListIsMutable();\n openWhiteList_.add(value);\n onChanged();\n return this;\n }", "public static List<String> createCompetencyList() {\n List<String> list = new ArrayList<String>();\n list.add(\"Line number 1\");\n list.add(\"Line number 2\");\n return list;\n }", "private void exercise2() {\n List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerOddLengthList = list.stream()\n .filter((string) -> string.length() % 2 != 0)\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public void setWhiteSpacesCount(long value) {\n this.whiteSpacesCount = value;\n }", "List<String> mo5877c(String str);", "java.util.List<String> getRepeatedStringFieldList();", "private String addRandomSpacing(String originalText) {\n ArrayList<Expression> list = new ArrayList<Expression>();\n\n\t\tclass MyVisitor extends ModifierVisitor<Void> {\n\t\t @Override\n\t\t public Node visit(VariableDeclarator declarator, Void args) {\n\t Expression expression = declarator.getInitializer().get();\n\t \n\t \n\t // We're looking for string.\n\t if (expression instanceof StringLiteralExpr) {\n\t list.add(expression);\n\t }\n\t\t return null;\n\t\t }\n\t\t}\n\t\t\n\t\t\n\t}", "SList evenWords();", "public com.google.protobuf.ProtocolStringList\n getOpenWhiteListList() {\n return openWhiteList_;\n }", "List<String> mo5876c();", "void fillList(List<String> toFill) {\n for (int i = 0; i < number; i++) {\n toFill.add(i + \"\");\n }\n }", "public String getWhiteList0() {\n return getString(\"whitelist.0\");\n }", "public Builder clearOpenWhiteList() {\n openWhiteList_ = com.google.protobuf.LazyStringArrayList.EMPTY;\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n return this;\n }", "public Builder addAllOpenWhiteList(\n java.lang.Iterable<java.lang.String> values) {\n ensureOpenWhiteListIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, openWhiteList_);\n onChanged();\n return this;\n }", "public com.google.protobuf.ByteString\n getOpenWhiteListBytes(int index) {\n return openWhiteList_.getByteString(index);\n }", "public abstract List<C41717j> mo70725h(String str);", "static int getNumPatterns() { return 64; }", "private static void skipSplitAdd(String s, List<String> list) {\n String tmp[] = s.split(\" \");\n\n for (int i = 1; i < tmp.length; i++) {\n list.add(tmp[i]);\n\n // System.out.println(tmp[i]);\n }\n }", "public static void addStars(ArrayList<String> list){\r\n //Loops through the list\r\n for(int i = 1; i < list.size(); i+=2){\r\n list.add(i, \"*\");\r\n }\r\n System.out.println(list);\r\n }", "private void m4676a(List<C0906d> list, StringBuilder sb) {\n if (sb.length() != 0) {\n list.add(new C0906d(C0906d.EnumC0907a.LITERAL, sb.toString()));\n }\n }", "public void setWhiteCounter(int num){\n this.whiteCounter = num;\n }", "StringList createStringList();", "List<C1114c> mo5886k(String str);", "private String genWhiteSpaceRegex(int noOfWhiteSpace,\n String multiWhiteSpace,\n String zeroWhiteSpace) {\n\n return (noOfWhiteSpace == 0) ? zeroWhiteSpace\n : multiWhiteSpace.replace(\"%%\", String.valueOf(noOfWhiteSpace));\n }", "public com.google.protobuf.ByteString\n getOpenWhiteListBytes(int index) {\n return openWhiteList_.getByteString(index);\n }", "private void generateLists(String num, Stack<String> numberList)\n {\n\tfor(int i = 0, len = num.length(); i < len; i++)\n\t numberList.push(new Character(num.charAt(i)).toString());\n }", "private void exercise5() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> nonDuplicateList;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n nonDuplicateList = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .collect(toList());\n }\n\n nonDuplicateList.forEach(System.out::println);\n }", "void mo100443a(List<String> list);", "ListString createListString();", "List<Log> mo13160a(String str, int i);", "public com.google.protobuf.ProtocolStringList\n getOpenWhiteListList() {\n return openWhiteList_.getUnmodifiableView();\n }", "public static void main(String[] args) { String s = \"catsanddog\";\n// List<String> wordDict = new ArrayList<>(Arrays.asList(\"cat\", \"cats\", \"and\", \"sand\", \"dog\"));\n//\n String s = \"pineapplepenappl\";\n List<String> wordDict = new ArrayList<>(Arrays.asList(\"apple\", \"pen\", \"applepen\", \"pine\", \"pineapple\"));\n\n WordBreak140 tmp = new WordBreak140();\n tmp.wordBreak(s, wordDict);\n }", "@Test\n public void repeatedSubstringPattern() {\n assertTrue(new Solution1().repeatedSubstringPattern(\"abcabcabcabc\"));\n }", "@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }", "private static List<String> testStringGenerator(List<String> palString) {\n\t\tList<String> list = new ArrayList<>();\n\t\tfor (String pal : palString) {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor (int i = 0; i < 10; i++) {\n\t\t\t\tsb.append(pal);\n\t\t\t\tfor (int j = 0; j < pal.length(); j++) {\n\t\t\t\t\tsb.append(j % 10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(sb.toString());\n\t\t}\n\t\treturn list;\n\t}", "public static void makeBlanks(char[] list) {\n\t\tfor (int i = 0; i < list.length; i++) {\n\t\t\tlist[i] = '*';\n\t\t}\n\t}", "public int selectOriginalTokens (Scanner scan, String [] list){\n \n int count = 0;\n while(scan.hasNext()){\n String line = scan.nextLine();\n String[] t = line.split(\"[ \\n\\t\\r.,:?)({}\\\\[\\\\]]\");\n for (int i = 0; i < t.length; i++){\n String item = t[i].trim();\n if(item.length() > 0){\n list[count] = item;\n count++;\n }//End if statement\n }//End for loop\n }//End while loop\n \n return count;\n }", "private String whiteSpace(String sum, String num)\n {\n\tString space = \"\";\n\tfor(int i = 0; i < sum.length() - num.length(); i++)\n\t space += \" \";\n\treturn space;\n }", "void mo54419a(List<String> list);", "List<C1113b> mo5874b(String str);", "public static List<String> stringList() {\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.add(\"abdxxx\");\n\t\tlist.add(\"xxxxx\");\n\t\tlist.add(\"hi\");\n\t\tlist.add(\"SmoothStack\");\n\t\tlist.add(\"Wyatt x Wyatt x\");\n\t\treturn list;\n\t}", "private static String[] resetStringArray() {\n String[] st = new String[L_MAX];\n L = 2 << 8;\n W = 9;\n int i;\n // initialize symbol table with all 1-character strings\n for (i = 0; i < R; i++)\n st[i] = \"\" + (char) i;\n st[i++] = \"\"; // (unused) lookahead for EOF\n return st;\n }", "public void setUp2( )\n\t{\n\t\tfor( int i = 0; i < 1000; i++ )\n\t\t{\n\t\t\tlista.append( \"\" + i );\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tList<Character>st1=new ArrayList<>();\n\t\n\t\tst1.add('a');\n\t\tst1.add('b');\n\t\tst1.add('a');\n\t\tst1.add('a');\n\t\tst1.add('c');\n\t\tst1.add('t');\n\t\n\t\tSystem.out.println(st1);//[a, b, a, a, c, t]\n\t\t\n\t\tList<Character>st2=new ArrayList<>();//empty []\n\t\tfor (int i=0; i<st1.size();i++) {\n\t\t\tif(!st2.contains(st1.get(i))) {\n\t\t\t\t// created str2 [empty], we will get the element from st1 to st2 while checking if there is repetition \n\t\t\t\tst2.add(st1.get(i));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(st2);//[a, b, c, t]\n\t\t\n\n\t}", "private void many(Set<String> s) {\n\t\twhile (!done() && s.contains(program.charAt(pos)+\"\"))\n\t\t\tpos++;\n }", "private static String createPrepStmPlaceHolder(int num) {\n\t\tchar[] c_ar = new char[num*3];\n\t\tc_ar[0] = '(';\n\t\tc_ar[1] = '?';\n\t\tfor(int i=1; i<num; ++i) {\n\t\t\tc_ar[3*i-1] = ',';\n\t\t\tc_ar[3*i] = ' ';\n\t\t\tc_ar[3*i+1] = '?';\n\t\t}\n\t\tc_ar[3*num-1] = ')';\n\t\treturn new String(c_ar);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_2() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\", false), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "private void exercise1() {\n final List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerList = list.stream()\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }", "private static String repeatSpace(int number) {\n StringBuilder space = new StringBuilder();\n\n // Adding spaces.\n for (int i = 0; i < number; i++) {\n space.append(\" \");\n }\n\n //returning spaces.\n return space.toString();\n }", "public void mo88640a(List<String> list) {\n List<String> stringList = RxPreferences.INSTANCE.getStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), new ArrayList());\n stringList.addAll(0, list);\n RxPreferences.INSTANCE.putStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), (List) StreamSupport.m150134a(stringList).mo131128a(new AbstractC32239o(new HashSet(stringList)) {\n /* class com.zhihu.android.p1480db.fragment.customview.C18240x255e53c2 */\n private final /* synthetic */ HashSet f$0;\n\n {\n this.f$0 = r1;\n }\n\n @Override // java8.util.p2234b.AbstractC32239o\n public final boolean test(Object obj) {\n return DbEditorSuggestTagCustomView.m93354a(this.f$0, (String) obj);\n }\n }).mo131126a(5).mo131125a(Collectors.m150203a($$Lambda$ofunvu1bqmYbfXGEtxXaV_csE4M.INSTANCE)));\n }", "public Builder addOpenWhiteListBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n ensureOpenWhiteListIsMutable();\n openWhiteList_.add(value);\n onChanged();\n return this;\n }", "@Test\n public void noSpacesBetweenKeywordsTest() {\n tester.yields(\"LaLaLaLaLaaaLi\", lala.EXPRESSION);\n }", "private int skipLeadingWhite( List content, int start) {\r\n if (start < 0) {\r\n start = 0;\r\n }\r\n\r\n int index = start;\r\n int size = content.size();\r\n if (currentFormat.trimAllWhite\r\n || currentFormat.textNormalize\r\n || currentFormat.textTrim) {\r\n while( index < size) {\r\n if ( !isAllWhitespace( content.get(index))) {\r\n return index;\r\n }\r\n index++;\r\n }\r\n }\r\n return index;\r\n }", "private void initWhitespace(Set<String> s) {\n\t\ts.add(\" \");\n\t\ts.add(\"\\n\");\n\t\ts.add(\"\\t\");\n }", "List<C1111j> mo5869a(int i);", "private void appendPlaceHolder(StringBuilder builder, int indent, int consecutiveExcluded, String message) {\n indent(builder, indent);\n builder.append(ELLIPSIS)\n .append(\" \")\n .append(consecutiveExcluded)\n .append(\" \")\n .append(message)\n .append(CoreConstants.LINE_SEPARATOR);\n }", "public void visiualizeSkipList(){\r\n\t\tint number=0;\r\n\t\tNode dummy = sl.getFrom(0,0);\r\n\t\t\r\n\t\tNode next;\r\n\t\tfor(int i=sl.height(); i>=0; i--){\r\n\t\t\t\r\n\t\t\tnext = sl.getFrom(i,0);\r\n\t\t\t\r\n\t\t\tfor(int j=0; j<(sl.size()+2); j++){\r\n\r\n\t\t\t\tnumber = next.getKey();\r\n\t\t\t\t//F.p(number);\r\n\t\t\t\tif(number==dummy.getKey()){\r\n\r\n\t\t\t\t\tif(number==minf)\r\n\t\t\t\t\t\tSystem.out.print(\"-inf\");\r\n\t\t\t\t\telse if(number==inf)\r\n\t\t\t\t\t\tSystem.out.print(\"---inf\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(\"-\",2)+number);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(\"-\",4));\r\n\t\t\t\t\r\n\t\t\t\tif(dummy.getKey()==number)\r\n\t\t\t\t\tnext = next.getRight();\r\n\t\t\t\t\r\n\t\t\t\tdummy = dummy.getRight();\r\n\t\t\t}\r\n\t\t\tdummy = sl.getFrom(0,0);\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "public long getWhiteSpacesCount() {\n return whiteSpacesCount;\n }", "@Test\n\tpublic void testStartingIndicesRegression(){\n\t\tassertLeftmostStartingIndices(\"5,1,7,3,2|-..xxx$1..x...xxx$3....-xx........\", 0, 6, 8, 18, 22);\n\t\tassertRightmostStartingIndices(\"7,5|.......xxx$1....xxx$2..-\", 6, 14);\n\t\t\n\t}", "public MacroList() {\n\t\tthis.macrosses = new HashMap<Integer, String>(12);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_1() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\"), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n String s=\"a /*a*/ sd /*v*/\";\n Pattern p = Pattern.compile(\"(\\\\/\\\\*(\\\\w|\\r\\n)+\\\\*\\\\/)\");\n Matcher m = p.matcher(s);\n List<String> l = new ArrayList<>(100);\n\n while (m.find()) {\n System.out.println(\"tick\");\n l.add(s.substring(m.start()+2, m.end()-2));\n }\n\n System.out.println(l);\n }", "StringPatternCounter(ArrayList<StringPattern> stringPatternList, String fileInput)\n {\n super(fileInput);\n this.stringPatternList = stringPatternList;\n }", "@Before\n public void createString(){\n s1 = \"casa\";\n\ts2 = \"cassa\";\n\ts3 = \"\";\n\ts4 = \"casa\";\n }", "public String minRemoveToMakeValid(String s) {\n int openAvail = 0;\n Set<Integer> skipSet = new HashSet<>();\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) == ')') {\n if (openAvail == 0) {\n skipSet.add(i);\n } else {\n openAvail -= 1;\n }\n } else if (s.charAt(i) == '(') {\n openAvail += 1;\n }\n }\n\n int closedAvail = 0;\n for (int i = s.length() - 1; i >= 0; i--) {\n if (s.charAt(i) == ')') {\n closedAvail += 1;\n } else if (s.charAt(i) == '(') {\n if (closedAvail == 0) {\n skipSet.add(i);\n } else {\n closedAvail -= 1; \n }\n }\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < s.length(); i++) {\n if (!skipSet.contains(i)){\n sb.append(s.charAt(i));\n }\n }\n return sb.toString();\n }", "@Test(timeout = 4000)\n public void test20() throws Throwable {\n StringReader stringReader0 = new StringReader(\"0(Hu\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer2 = new StreamTokenizer(stringReader0);\n JSTerm jSTerm0 = new JSTerm(streamTokenizer0);\n stringReader0.reset();\n StreamTokenizer streamTokenizer3 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer4 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer5 = new StreamTokenizer(stringReader0);\n streamTokenizer0.commentChar((-4));\n StreamTokenizer streamTokenizer6 = new StreamTokenizer(stringReader0);\n streamTokenizer6.ordinaryChars((-1), (-322070664));\n streamTokenizer1.parseNumbers();\n jSTerm0.add((Object) \"JSTerm: Error reading control parameters: \");\n StreamTokenizer streamTokenizer7 = new StreamTokenizer(stringReader0);\n streamTokenizer7.pushBack();\n streamTokenizer1.nextToken();\n StreamTokenizer streamTokenizer8 = new StreamTokenizer(stringReader0);\n streamTokenizer2.slashSlashComments(false);\n JSTerm jSTerm1 = new JSTerm(streamTokenizer5);\n streamTokenizer1.slashStarComments(false);\n streamTokenizer3.eolIsSignificant(false);\n streamTokenizer7.commentChar((-4));\n StreamTokenizer streamTokenizer9 = new StreamTokenizer(stringReader0);\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n jSSubstitution0.listIterator();\n JSSubstitution jSSubstitution1 = jSTerm1.matches((JSPredicateForm) jSTerm0, jSSubstitution0);\n assertTrue(jSSubstitution1.fail());\n }", "public Removalstops()\n {\n stopWords.add(\"am\");\n stopWords.add(\"my\");\nstopWords.add(\"at\");\nstopWords.add(\"a\");\nstopWords.add(\"i\");\nstopWords.add(\"is\");\nstopWords.add(\"of\");\nstopWords.add(\"have\");\nstopWords.add(\"--\");\nstopWords.add(\"do\");\nstopWords.add(\"the\");\nstopWords.add(\"was\");\nstopWords.add(\"iam\");\nstopWords.add(\"there\");\nstopWords.add(\"what\");\nstopWords.add(\"for\");\nstopWords.add(\"in\");\nstopWords.add(\"very\");\nstopWords.add(\"and\");\nstopWords.add(\"to\");\nstopWords.add(\"often\");\nstopWords.add(\"because\");\nstopWords.add(\"in\");\nstopWords.add(\"an\");\nstopWords.add(\"can\");\nstopWords.add(\"via\");\nstopWords.add(\"even\");\nstopWords.add(\"as\");\nstopWords.add(\"best\");\nstopWords.add(\"been\");\nstopWords.add(\"into\");\nstopWords.add(\"by\");\nstopWords.add(\"around\");\nstopWords.add(\"being\");\nstopWords.add(\"from\");\nstopWords.add(\"etc\");\nstopWords.add(\"his\");\nstopWords.add(\"do\");\nstopWords.add(\"have\");\nstopWords.add(\"had\"); \nstopWords.add(\"able\");\nstopWords.add(\"about\");\nstopWords.add(\"above\");\nstopWords.add(\"abroad\");\nstopWords.add(\"according\");\nstopWords.add(\"accordingly\");\nstopWords.add(\"across\");\nstopWords.add(\"actually\");\nstopWords.add(\"adj\");\nstopWords.add(\"after\");\nstopWords.add(\"afterwards\");\nstopWords.add(\"again\");\nstopWords.add(\"against\");\nstopWords.add(\"ago\");\nstopWords.add(\"ahead\");\nstopWords.add(\"ain't\");\nstopWords.add(\"all\");\nstopWords.add(\"allow\");\nstopWords.add(\"allows\");\nstopWords.add(\"almost\");\nstopWords.add(\"alone\");\nstopWords.add(\"along\");\nstopWords.add(\"alongside\");\nstopWords.add(\"already\");\nstopWords.add(\"also\");\nstopWords.add(\"although\");\nstopWords.add(\"always\");\nstopWords.add(\"am\");\nstopWords.add(\"amid\");\nstopWords.add(\"amidst\");\nstopWords.add(\"among\");\nstopWords.add(\"amongst\");\nstopWords.add(\"an\");\nstopWords.add(\"and\");\nstopWords.add(\"another\");\nstopWords.add(\"any\");\nstopWords.add(\"anybody\");\nstopWords.add(\"anyhow\");\nstopWords.add(\"anyone\");\nstopWords.add(\"anything\");\nstopWords.add(\"anyway\");\nstopWords.add(\"anyways\");\nstopWords.add(\"anywhere\");\nstopWords.add(\"apart\");\nstopWords.add(\"appear\");\nstopWords.add(\"appreciate\");\nstopWords.add(\"appropriate\");\nstopWords.add(\"are\");\nstopWords.add(\"aren't\");\nstopWords.add(\"around\");\nstopWords.add(\"as\");\nstopWords.add(\"a's\");\nstopWords.add(\"aside\");\nstopWords.add(\"ask\");\nstopWords.add(\"asking\");\nstopWords.add(\"associated\");\nstopWords.add(\"at\");\nstopWords.add(\"available\");\nstopWords.add(\"away\");\nstopWords.add(\"awfully\");\nstopWords.add(\"back\");\nstopWords.add(\"backward\");\nstopWords.add(\"backwards\");\nstopWords.add(\"be\");\nstopWords.add(\"became\");\nstopWords.add(\"beacause\");\nstopWords.add(\"become\");\nstopWords.add(\"becomes\");\nstopWords.add(\"becoming\");\nstopWords.add(\"been\");\nstopWords.add(\"before\");\nstopWords.add(\"beforehand\");\nstopWords.add(\"begin\");\nstopWords.add(\"behind\");\nstopWords.add(\"being\");\nstopWords.add(\"believe\");\nstopWords.add(\"below\");\nstopWords.add(\"beside\");\nstopWords.add(\"besides\");\nstopWords.add(\"best\");\nstopWords.add(\"better\");\nstopWords.add(\"between\");\nstopWords.add(\"beyond\");\nstopWords.add(\"both\");\nstopWords.add(\"brief\");\nstopWords.add(\"but\");\nstopWords.add(\"by\");\nstopWords.add(\"came\");\nstopWords.add(\"can\");\nstopWords.add(\"cannot\");\nstopWords.add(\"cant\");\nstopWords.add(\"can't\");\nstopWords.add(\"caption\");\nstopWords.add(\"cause\");\nstopWords.add(\"causes\");\nstopWords.add(\"certain\");\nstopWords.add(\"cetrainly\");\nstopWords.add(\"changes\");\nstopWords.add(\"clearly\");\nstopWords.add(\"c'mon\");\nstopWords.add(\"co\");\nstopWords.add(\"co.\");\nstopWords.add(\"com\");\nstopWords.add(\"come\");\nstopWords.add(\"comes\");\nstopWords.add(\"concerning\");\nstopWords.add(\"consequently\");\nstopWords.add(\"consider\");\nstopWords.add(\"considering\");\nstopWords.add(\"could\");\nstopWords.add(\"couldn't\");\nstopWords.add(\"c's\");\nstopWords.add(\"currently\");\nstopWords.add(\"dare\");\nstopWords.add(\"daren't\");\nstopWords.add(\"definitely\");\nstopWords.add(\"described\");\nstopWords.add(\"despite\");\nstopWords.add(\"did\");\nstopWords.add(\"didn't\");\nstopWords.add(\"different\");\nstopWords.add(\"directly\");\nstopWords.add(\"do\");\nstopWords.add(\"does\");\nstopWords.add(\"doesn't\");\nstopWords.add(\"doing\");\nstopWords.add(\"done\");\nstopWords.add(\"don't\");\nstopWords.add(\"down\");\nstopWords.add(\"downwards\");\nstopWords.add(\"during\");\nstopWords.add(\"each\");\nstopWords.add(\"edu\");\nstopWords.add(\"eg\");\nstopWords.add(\"eight\");\nstopWords.add(\"eighty\");\nstopWords.add(\"either\");\nstopWords.add(\"else\");\nstopWords.add(\"elsewhere\");\nstopWords.add(\"end\");\nstopWords.add(\"ending\");\nstopWords.add(\"enough\");\nstopWords.add(\"entirely\");\nstopWords.add(\"especially\");\nstopWords.add(\"et\");\nstopWords.add(\"etc\");\nstopWords.add(\"even\");\nstopWords.add(\"evenmore\");\nstopWords.add(\"every\");\nstopWords.add(\"everybody\");\nstopWords.add(\"everyone\");\nstopWords.add(\"everything\");\nstopWords.add(\"everywhere\");\nstopWords.add(\"ex\");\nstopWords.add(\"exactly\");\nstopWords.add(\"example\");\nstopWords.add(\"except\");\nstopWords.add(\"fairly\");\nstopWords.add(\"far\");\nstopWords.add(\"farhter\");\nstopWords.add(\"few\");\nstopWords.add(\"fewer\");\nstopWords.add(\"fifth\");\nstopWords.add(\"first\");\nstopWords.add(\"five\");\nstopWords.add(\"followed\");\nstopWords.add(\"following\");\nstopWords.add(\"follows\");\nstopWords.add(\"for\");\nstopWords.add(\"forever\");\nstopWords.add(\"former\");\nstopWords.add(\"formerly\");\nstopWords.add(\"forth\");\nstopWords.add(\"forward\");\nstopWords.add(\"found\");\nstopWords.add(\"four\");\nstopWords.add(\"from\");\nstopWords.add(\"further\");\nstopWords.add(\"furthermore\");\nstopWords.add(\"get\");\nstopWords.add(\"gets\");\nstopWords.add(\"getting\");\nstopWords.add(\"given\");\nstopWords.add(\"gives\");\nstopWords.add(\"go\");\nstopWords.add(\"goes\");\nstopWords.add(\"going\");\nstopWords.add(\"gone\");\nstopWords.add(\"got\");\nstopWords.add(\"gotten\");\nstopWords.add(\"greetings\");\nstopWords.add(\"had\");\nstopWords.add(\"hadn't\");\nstopWords.add(\"half\");\nstopWords.add(\"happens\");\nstopWords.add(\"hardly\");\nstopWords.add(\"has\");\nstopWords.add(\"hasn't\");\nstopWords.add(\"have\");\nstopWords.add(\"haven't\");\nstopWords.add(\"having\");\nstopWords.add(\"he\");\nstopWords.add(\"he'd\");\nstopWords.add(\"he'll\");\nstopWords.add(\"hello\");\nstopWords.add(\"help\");\nstopWords.add(\"hence\");\nstopWords.add(\"her\");\nstopWords.add(\"here\");\nstopWords.add(\"hereafter\");\nstopWords.add(\"hereby\");\nstopWords.add(\"herein\");\nstopWords.add(\"here's\");\nstopWords.add(\"hereupon\");\nstopWords.add(\"hers\");\nstopWords.add(\"herself\");\nstopWords.add(\"he's\");\nstopWords.add(\"hi\");\nstopWords.add(\"him\");\nstopWords.add(\"himself\");\nstopWords.add(\"his\");\nstopWords.add(\"hither\");\nstopWords.add(\"hopefully\");\nstopWords.add(\"how\");\nstopWords.add(\"howbeit\");\nstopWords.add(\"however\");\nstopWords.add(\"however\");\nstopWords.add(\"hundred\");\nstopWords.add(\"i'd\");\nstopWords.add(\"ie\");\nstopWords.add(\"if\");\nstopWords.add(\"ignored\");\nstopWords.add(\"i'll\");\nstopWords.add(\"i'm\");\nstopWords.add(\"immediate\");\nstopWords.add(\"in\");\nstopWords.add(\"iansmuch\");\nstopWords.add(\"inc\");\nstopWords.add(\"inc.\");\nstopWords.add(\"indeed\");\nstopWords.add(\"indicate\");\nstopWords.add(\"indicated\");\nstopWords.add(\"indicates\");\nstopWords.add(\"inner\");\nstopWords.add(\"inside\");\nstopWords.add(\"insofar\");\nstopWords.add(\"into\");\nstopWords.add(\"inward\");\nstopWords.add(\"is\");\nstopWords.add(\"isn't\");\nstopWords.add(\"it\");\nstopWords.add(\"it'd\");\nstopWords.add(\"it'll\");\nstopWords.add(\"its\");\nstopWords.add(\"it's\");\nstopWords.add(\"itself\");\nstopWords.add(\"i've\");\nstopWords.add(\"just\");\nstopWords.add(\"k\");\nstopWords.add(\"keep\");\nstopWords.add(\"keeps\");\nstopWords.add(\"kept\");\nstopWords.add(\"know\");\nstopWords.add(\"knows\");\nstopWords.add(\"known\");\nstopWords.add(\"last\");\nstopWords.add(\"lately\");\nstopWords.add(\"later\");\nstopWords.add(\"latter\");\nstopWords.add(\"latterly\");\nstopWords.add(\"least\");\nstopWords.add(\"less\");\nstopWords.add(\"let\");\nstopWords.add(\"let's\");\nstopWords.add(\"like\");\nstopWords.add(\"liked\");\nstopWords.add(\"likely\");\nstopWords.add(\"likewise\");\nstopWords.add(\"little\");\nstopWords.add(\"look\");\nstopWords.add(\"looks\");\nstopWords.add(\"low\");\nstopWords.add(\"lower\");\nstopWords.add(\"ltd\");\nstopWords.add(\"made\");\nstopWords.add(\"mainly\");\nstopWords.add(\"make\");\nstopWords.add(\"makes\");\nstopWords.add(\"many\");\nstopWords.add(\"may\");\nstopWords.add(\"maybe\");\nstopWords.add(\"mayn't\");\nstopWords.add(\"me\");\nstopWords.add(\"mean\");\nstopWords.add(\"meanwhile\");\nstopWords.add(\"merely\");\nstopWords.add(\"might\");\nstopWords.add(\"mightn't\");\nstopWords.add(\"mine\");\nstopWords.add(\"minus\");\nstopWords.add(\"miss\");\nstopWords.add(\"more\");\nstopWords.add(\"moreover\");\nstopWords.add(\"most\");\nstopWords.add(\"mostly\");\nstopWords.add(\"mr\");\nstopWords.add(\"mrs\");\nstopWords.add(\"much\");\nstopWords.add(\"must\");\nstopWords.add(\"mustn't\");\nstopWords.add(\"my\");\nstopWords.add(\"myself\");\nstopWords.add(\"name\");\nstopWords.add(\"namely\");\nstopWords.add(\"nd\");\nstopWords.add(\"near\");\nstopWords.add(\"nearly\");\nstopWords.add(\"necessary\");\nstopWords.add(\"need\");\nstopWords.add(\"needn't\");\nstopWords.add(\"needs\");\nstopWords.add(\"neither\");\nstopWords.add(\"never\");\nstopWords.add(\"neverf\");\nstopWords.add(\"neverless\");\nstopWords.add(\"nevertheless\");\nstopWords.add(\"new\");\nstopWords.add(\"next\");\nstopWords.add(\"nine\");\nstopWords.add(\"ninety\");\nstopWords.add(\"no\");\nstopWords.add(\"nobody\");\nstopWords.add(\"non\");\nstopWords.add(\"none\");\nstopWords.add(\"nonetheless\");\nstopWords.add(\"noone\");\nstopWords.add(\"no-one\");\nstopWords.add(\"nor\");\nstopWords.add(\"normally\");\nstopWords.add(\"not\");\nstopWords.add(\"nothing\");\nstopWords.add(\"notwithstanding\");\nstopWords.add(\"novel\");\nstopWords.add(\"now\");\nstopWords.add(\"nowwhere\");\nstopWords.add(\"obviously\");\nstopWords.add(\"of\");\nstopWords.add(\"off\");\nstopWords.add(\"often\");\nstopWords.add(\"oh\");\nstopWords.add(\"ok\");\nstopWords.add(\"okay\");\nstopWords.add(\"old\");\nstopWords.add(\"on\");\nstopWords.add(\"once\");\nstopWords.add(\"one\");\nstopWords.add(\"ones\");\nstopWords.add(\"one's\");\nstopWords.add(\"only\");\nstopWords.add(\"onto\");\nstopWords.add(\"opposite\");\nstopWords.add(\"or\");\nstopWords.add(\"other\");\nstopWords.add(\"others\");\nstopWords.add(\"otherwise\");\nstopWords.add(\"ought\");\nstopWords.add(\"oughtn't\");\nstopWords.add(\"our\");\nstopWords.add(\"ourselves\");\nstopWords.add(\"out\");\nstopWords.add(\"outside\");\nstopWords.add(\"over\");\nstopWords.add(\"overall\");\nstopWords.add(\"own\");\nstopWords.add(\"particular\");\nstopWords.add(\"particularly\");\nstopWords.add(\"past\");\nstopWords.add(\"per\");\nstopWords.add(\"perhaps\");\nstopWords.add(\"placed\");\nstopWords.add(\"please\");\nstopWords.add(\"plus\");\nstopWords.add(\"possible\");\nstopWords.add(\"presumably\");\nstopWords.add(\"probably\");\nstopWords.add(\"provided\");\nstopWords.add(\"provides\");\nstopWords.add(\"que\");\nstopWords.add(\"quite\");\nstopWords.add(\"qv\");\nstopWords.add(\"rather\");\nstopWords.add(\"rd\");\nstopWords.add(\"re\");\nstopWords.add(\"really\");\nstopWords.add(\"reasonably\");\nstopWords.add(\"recent\");\nstopWords.add(\"recently\");\nstopWords.add(\"regarding\");\nstopWords.add(\"regardless\");\nstopWords.add(\"regards\");\nstopWords.add(\"relatively\");\nstopWords.add(\"respectively\");\nstopWords.add(\"right\");\nstopWords.add(\"round\");\nstopWords.add(\"said\");\nstopWords.add(\"same\");\nstopWords.add(\"saw\");\nstopWords.add(\"say\");\nstopWords.add(\"saying\");\nstopWords.add(\"says\");\nstopWords.add(\"second\");\nstopWords.add(\"secondly\");\nstopWords.add(\"see\");\nstopWords.add(\"seeing\");\nstopWords.add(\"seem\");\nstopWords.add(\"seemed\");\nstopWords.add(\"seeming\");\nstopWords.add(\"seems\");\nstopWords.add(\"seen\");\nstopWords.add(\"self\");\nstopWords.add(\"selves\");\nstopWords.add(\"sensible\");\nstopWords.add(\"sent\");\nstopWords.add(\"serious\");\nstopWords.add(\"seriously\");\nstopWords.add(\"seven\");\nstopWords.add(\"several\");\nstopWords.add(\"shall\");\nstopWords.add(\"shan't\");\nstopWords.add(\"she\");\nstopWords.add(\"she'd\");\nstopWords.add(\"she'll\");\nstopWords.add(\"she's\");\nstopWords.add(\"should\");\nstopWords.add(\"shouldn't\");\nstopWords.add(\"since\");\nstopWords.add(\"six\");\nstopWords.add(\"so\");\nstopWords.add(\"some\");\nstopWords.add(\"somebody\");\nstopWords.add(\"someday\");\nstopWords.add(\"somehow\");\nstopWords.add(\"someone\");\nstopWords.add(\"something\");\nstopWords.add(\"sometime\");\nstopWords.add(\"sometimes\");\nstopWords.add(\"somewhat\");\nstopWords.add(\"somewhere\");\nstopWords.add(\"soon\");\nstopWords.add(\"sorry\");\nstopWords.add(\"specified\");\nstopWords.add(\"specify\");\nstopWords.add(\"specifying\");\nstopWords.add(\"still\");\nstopWords.add(\"sub\");\nstopWords.add(\"such\");\nstopWords.add(\"sup\");\nstopWords.add(\"sure\");\nstopWords.add(\"take\");\nstopWords.add(\"taken\");\nstopWords.add(\"taking\");\nstopWords.add(\"tell\");\nstopWords.add(\"tends\");\nstopWords.add(\"th\");\nstopWords.add(\"than\");\nstopWords.add(\"thank\");\nstopWords.add(\"thanks\");\nstopWords.add(\"thanx\");\nstopWords.add(\"that\");\nstopWords.add(\"that'll\");\nstopWords.add(\"thats\");\nstopWords.add(\"that've\");\nstopWords.add(\"the\");\nstopWords.add(\"their\");\nstopWords.add(\"theirs\");\nstopWords.add(\"them\");\nstopWords.add(\"themselves\");\nstopWords.add(\"then\");\nstopWords.add(\"thence\");\nstopWords.add(\"there\");\nstopWords.add(\"thereafter\");\nstopWords.add(\"thereby\");\nstopWords.add(\"there'd\");\nstopWords.add(\"therefore\");\nstopWords.add(\"therein\");\nstopWords.add(\"ther'll\");\nstopWords.add(\"there're\");\nstopWords.add(\"theres\");\nstopWords.add(\"there's\");\nstopWords.add(\"thereupon\");\nstopWords.add(\"there've\");\nstopWords.add(\"these\");\nstopWords.add(\"they\");\nstopWords.add(\"they'd\");\nstopWords.add(\"they'll\");\nstopWords.add(\"they're\");\nstopWords.add(\"they've\");\nstopWords.add(\"thing\");\nstopWords.add(\"things\");\nstopWords.add(\"think\");\nstopWords.add(\"third\");\nstopWords.add(\"thirty\");\nstopWords.add(\"this\");\nstopWords.add(\"thorough\");\nstopWords.add(\"thoroughly\");\nstopWords.add(\"those\");\nstopWords.add(\"though\");\nstopWords.add(\"throughout\");\nstopWords.add(\"thru\");\nstopWords.add(\"thus\");\nstopWords.add(\"till\");\nstopWords.add(\"to\");\nstopWords.add(\"together\");\nstopWords.add(\"too\");\nstopWords.add(\"took\");\nstopWords.add(\"toward\");\nstopWords.add(\"towards\");\nstopWords.add(\"tried\");\nstopWords.add(\"tries\");\nstopWords.add(\"truly\");\nstopWords.add(\"try\");\nstopWords.add(\"trying\");\nstopWords.add(\"t's\");\nstopWords.add(\"twice\");\nstopWords.add(\"two\");\nstopWords.add(\"un\");\nstopWords.add(\"under\");\nstopWords.add(\"underneath\");\nstopWords.add(\"undoing\");\nstopWords.add(\"unfortunately\");\nstopWords.add(\"unless\");\nstopWords.add(\"unlike\");\nstopWords.add(\"unlikely\");\nstopWords.add(\"untill\");\nstopWords.add(\"unto\");\nstopWords.add(\"up\");\nstopWords.add(\"upon\");\nstopWords.add(\"upwards\");\nstopWords.add(\"us\");\nstopWords.add(\"use\");\nstopWords.add(\"used\");\nstopWords.add(\"useful\");\nstopWords.add(\"uses\");\nstopWords.add(\"using\");\nstopWords.add(\"usually\");\nstopWords.add(\"v\");\nstopWords.add(\"value\");\nstopWords.add(\"various\");\nstopWords.add(\"versus\");\nstopWords.add(\"very\");\nstopWords.add(\"via\");\nstopWords.add(\"viz\");\nstopWords.add(\"vs\");\nstopWords.add(\"want\");\nstopWords.add(\"wants\");\nstopWords.add(\"was\");\nstopWords.add(\"wasn't\");\nstopWords.add(\"way\");\nstopWords.add(\"we\");\nstopWords.add(\"we'd\");\nstopWords.add(\"welcome\");\nstopWords.add(\"well\");\nstopWords.add(\"we'll\");\nstopWords.add(\"went\");\nstopWords.add(\"were\");\nstopWords.add(\"we're\");\nstopWords.add(\"weren't\");\nstopWords.add(\"we've\");\nstopWords.add(\"what\");\nstopWords.add(\"whatever\");\nstopWords.add(\"what'll\");\nstopWords.add(\"what's\");\nstopWords.add(\"what've\");\nstopWords.add(\"when\");\nstopWords.add(\"whence\");\nstopWords.add(\"whenever\");\nstopWords.add(\"where\");\nstopWords.add(\"whereafter\");\nstopWords.add(\"whereas\");\nstopWords.add(\"whereby\");\nstopWords.add(\"wherein\");\nstopWords.add(\"where's\");\nstopWords.add(\"whereupon\");\nstopWords.add(\"whereever\");\nstopWords.add(\"whether\");\nstopWords.add(\"which\");\nstopWords.add(\"whichever\");\nstopWords.add(\"while\");\nstopWords.add(\"whilst\");\nstopWords.add(\"whither\");\nstopWords.add(\"who\");\nstopWords.add(\"who'd\");\nstopWords.add(\"whoever\");\nstopWords.add(\"whole\");\nstopWords.add(\"who'll\");\nstopWords.add(\"whom\");\nstopWords.add(\"whomever\");\nstopWords.add(\"who's\");\nstopWords.add(\"whose\");\nstopWords.add(\"why\");\nstopWords.add(\"will\");\nstopWords.add(\"willing\");\nstopWords.add(\"wish\");\nstopWords.add(\"with\");\nstopWords.add(\"within\");\nstopWords.add(\"without\");\nstopWords.add(\"wonder\");\nstopWords.add(\"won't\");\nstopWords.add(\"would\");\nstopWords.add(\"wouldn't\");\nstopWords.add(\"yes\");\nstopWords.add(\"yet\");\nstopWords.add(\"you\");\nstopWords.add(\"you'd\");\nstopWords.add(\"you'll\");\nstopWords.add(\"your\");\nstopWords.add(\"you're\");\nstopWords.add(\"yours\");\nstopWords.add(\"yourself\");\nstopWords.add(\"you've\");\nstopWords.add(\"zero\");\n\n \n \n }", "@SuppressWarnings(\"resource\")\n public static void doubleCapacity(String[] array){\n int wordCount = 0;\n int arrayGrowth = 500;\n array = new String[10];\n String strLine = null;\n while (strLine != null) {\n // Store the content into an array\n Scanner s = new Scanner(strLine);\n while (s.hasNext()) {\n if (array.length == wordCount) {\n // expand list\n array = Arrays.copyOf(array, array.length + arrayGrowth);\n }\n array[wordCount] = s.next();\n wordCount++;\n } \n }\n }", "private int skipTrialingWhite( List content, int start) {\r\n int size = content.size();\r\n if (start > size) {\r\n start = size;\r\n }\r\n\r\n int index = start;\r\n if (currentFormat.trimAllWhite\r\n || currentFormat.textNormalize\r\n || currentFormat.textTrim) {\r\n while( index >= 0) {\r\n if ( !isAllWhitespace( content.get(index - 1)))\r\n break;\r\n --index;\r\n }\r\n }\r\n return index;\r\n }", "public abstract void mo9247b(String str, long j, List<String> list);", "private void fillSet() {\r\n\t\tString regex = \"\\\\p{L}+\";\r\n\t\tMatcher matcher = Pattern.compile(regex).matcher(body);\r\n\t\twhile (matcher.find()) {\r\n\t\t\tif (!matcher.group().isEmpty()) {\r\n\t\t\t\twords.add(matcher.group());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private ArrayList<Integer> getEmptySpaces(char[] board) {\n ArrayList<Integer> emptySpaces = new ArrayList<>();\n for (int i = 0; i < board.length; i++) {\n if (board[i] == ' ') {\n emptySpaces.add(i);\n }\n }\n return emptySpaces;\n }", "void mo13370a(int i, int i2, List<C15929a> list) throws IOException;", "private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }", "private static Stream<List<Tile>> substituteBlanks(List<Tile> p) {\n Stream<List<Tile>> res = Stream.of(p);\n //Iterate through all letters.\n for (int i = 0; i < p.size(); i++) {\n //Check for blanks.\n if (p.get(i).getLetter() == Character.MIN_VALUE) {\n //If blank found, substitute it for all a-z, and look again for next blank.\n res = substituteBlankAtIndex(p, i)\n .flatMap(s -> substituteBlanks(s));\n }\n }\n\n return res;\n }", "public static void main(String[] args) {\n String[] strings = new String[100];\n for (int i = 0; i < strings.length; i++) {\n strings[i] = randomStrings(2);\n }\n// for (String s : strings) {\n// System.out.println(s);\n// }\n ArrayList<String> appeared = new ArrayList<>();\n for (String s : strings) {\n if (!appeared.contains(s)) {\n appeared.add(s);\n }\n }\n System.out.println(appeared.size());\n\n }", "private IgnoreListHelper() {\n\t}", "@Test\n\t public void test5 ()\n\t{\n\t\t\tString s = new String(\"aaabaaaaabaabaaaabaaaaaaaaaaaaaabaaaaaaaaaaaaaaabaaaaaaaaaaaaaaba\");\n\t s = s.replaceAll(\"\\\\s+\", \" \");\n\t assertEquals(\"aaaaaaaaaaaaaabaaaaaaaaaaaaaa\", LRS.lrs(s)); \n\t}", "public static List<String> findRepeatedDnaSequences(String s) {\n \tList<String> re=new ArrayList<String>();\n \tif(s.length()<=10){\n \t\treturn re;\n \t}\n \tMap<String, Integer> map=new HashMap<String, Integer>(); \t\n \tfor(int i=10; i<=s.length(); i++){\n \t\tString k=s.substring(i-10, i);\n \t\tif(map.containsKey(k)){\n \t\t\tint val=map.get(k);\n \t\t\tif(val==1){\n \t\t\t\tre.add(k);\n \t\t\t}\n \t\t\tmap.put(k, val+1);\n \t\t}else{\n \t\t\tmap.put(k, 1);\n \t\t}\n \t}\n \treturn re;\n }", "public static void main(){\r\n\t\t\r\n\t\tArrayList<tok> pHolder = new ArrayList<tok>();\r\n\r\n\t\t pHolder.add(new tok(\"@\", \"@\"));\r\n\t\t\r\n\t\treturn;\r\n\t}", "public void mo9497b(List<String> list) {\n this.f1514c = list;\n }", "private void listEntries(BufferedWriter bw, String previous, int start, int end, String zeroes) throws IOException {\n\t\tint writeStart = -1;\n\t\tStringBuilder sb = new StringBuilder();\n\t\tchar c;\n\t\tfor (int i = 0, l = previous.length(); i < l && writeStart == -1; i++) {\n\t\t\tc = previous.charAt(i);\n\t\t\tif (Character.isDigit(c)) {sb.append(c);}\n\t\t\telse {writeStart = Integer.parseInt(sb.toString());}\n\t\t}\n\t\tfor (int i = start; i < end; i++) {bw.write(++writeStart + \"=\" + zeroes + i + \"\\n\");}\n\t}", "public void m20623OooO00o() {\n for (C8964ooOOo000 ooooo000 : this.f22213OooO00o) {\n OooO00o(ooooo000);\n }\n this.f22212OooO00o.clear();\n this.f22213OooO00o.clear();\n }", "public String addWhiteSpace(String str, int number) {\n\t\tStringBuilder result = new StringBuilder();\n\t\tfor (int i = 0; i < str.length(); i+=2) {\n\t\t if (i > 0) {\n\t\t\t for (int j = 0; j < number; j++)\n\t\t\t\t result.append(\" \");\n\t\t }\n\t\t result.append(str.charAt(i));\n\t\t result.append(str.charAt(i+1));\n\t\t}\n\t\treturn result.toString();\n\t}", "public static List<String> findStrobogrammatic(int n) {\n List<String> cur, ans;\n ans = new ArrayList<String>((n & 1) == 0 ? Arrays.asList(\"\") : Arrays.asList(\"0\", \"1\", \"8\"));\n if (n < 2) return ans;\n\n for (;n > 1; n -= 2) {\n cur = ans;\n ans = new ArrayList<String>();\n for (String i : cur) {\n if (n > 3) {\n ans.add('0' + i + '0');\n }\n ans.add('1' + i + '1');\n ans.add('8' + i + '8');\n ans.add('6' + i + '9');\n ans.add('9' + i + '6');\n }\n }\n System.out.println(ans.size());\n return ans;\n }", "private static List<String> induceSynonims(String word) {\n\t\treturn null;\n\t}", "private List<WordScore> liveList(List<WordScore> gridList, String s) {\n s = s.toLowerCase();\n List<WordScore> liveList = new ArrayList<>();\n for(WordScore ws : gridList){\n int nochars = s.length() - s.replaceAll(ws.getWord(), \"\").length();\n liveList.add(new WordScore(ws.getWord(), ws.getScore()-nochars));\n }\n return liveList;\n }", "private void fillRandomList()\n\t{\n\t\trandomList.add(\"I like cheese.\");\n\t\trandomList.add(\"Tortoise can move faster than slow rodent.\");\n\t\trandomList.add(\"I enjoy sitting on the ground.\");\n\t\trandomList.add(\"I like cereal.\");\n\t\trandomList.add(\"This is random.\");\n\t\trandomList.add(\"I like typing\");\n\t\trandomList.add(\"FLdlsjejf is my favorite word.\");\n\t\trandomList.add(\"I have two left toes.\");\n\t\trandomList.add(\"Sqrt(2) = 1.414213562 ...\");\n\t\trandomList.add(\"Hi mom.\");\n\t}", "public static void main(String[] args) {\n\t\tString s=\"22\";\n\t\t\n\t\tif(s.indexOf(\"1\")>=0||s.equals(\"\"))\n\t\t\tSystem.out.println(\"hello\");\n\t\t\t\n\t\tArrayList f=new ArrayList();\n\t\tint stack[]=new int[2*s.length()];\n\t\tint top=-1;\n\t\tchar a[][]=new char[][]{{},{},{'#','a','b','c','#'},{'#','d','e','f','#'},{'#','g','h','i','#'},{'#','j','k','l','#'},{'#','m','n','o','#'},{'#','p','q','r','s','#'},{'#','t','u','v','#'},{'#','w','x','y','z','#'}};\n\t\tint length[]=new int []{0,0,3,3,3,3,3,4,3,4};\n\t\tStringBuilder ans=new StringBuilder();\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tint x=stack[++top]=(int)s.charAt(i)-'0';\n\t\t\tans.append(a[x][1]);\n\t\t\tstack[++top]=1;\n\t\t}\n\t\twhile(stack[1]!=length[(int)s.charAt(0)-'0']+1){\n\t\t\tif(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\tif(s.length()==(top+1)/2){\n\t\t\t\t\twhile(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\t\t\tint r=(top-1)/2;\n\t\t\t\t\t\tchar r1=a[stack[top-1]][stack[top]];\n\t\t\t\t\t\tans.setCharAt(r, r1);\n\t\t\t\t\t\tString ans1=ans.toString();\n\t\t\t\t\t\tf.add(ans1);\n\t\t\t\t\t\tstack[top]++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t\t\ttop+=2;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[top]=1;\n\t\t\t\ttop-=2;\n\t\t\t\tstack[top]++;\n\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(f.size());\n\t}", "private void modify(List listString){\n\t}", "private String repeatM(int count){\n return new String(new char[count]).replace('\\0','M');\n }", "private static void\n eatWhite(ParseState state)\n {\n while(state.pos < state.data.length() && state.data.charAt(state.pos) == ' ')\n {\n ++state.pos;\n }\n }" ]
[ "0.55591595", "0.5524409", "0.54578066", "0.5425202", "0.5364262", "0.5288061", "0.5286694", "0.52332956", "0.5221815", "0.5211653", "0.5201803", "0.51848924", "0.518454", "0.5178811", "0.51761377", "0.5150973", "0.5141157", "0.5138997", "0.51366293", "0.5130912", "0.51279604", "0.5071481", "0.50682074", "0.50673336", "0.5058374", "0.50503725", "0.5046189", "0.5046023", "0.50277734", "0.50120145", "0.49743384", "0.4959684", "0.49513972", "0.49383563", "0.492581", "0.49236417", "0.49056625", "0.48794308", "0.48752907", "0.48583564", "0.4856731", "0.48500034", "0.48222542", "0.48127964", "0.4812774", "0.48096502", "0.48054305", "0.48029843", "0.48021927", "0.4784932", "0.47791797", "0.47657204", "0.47405565", "0.47405225", "0.47390026", "0.47360018", "0.47321254", "0.47301587", "0.47235176", "0.47201622", "0.4720113", "0.4717014", "0.47158983", "0.4708474", "0.4698091", "0.46781585", "0.46772122", "0.46698767", "0.46634603", "0.46624836", "0.46601665", "0.4651289", "0.46146277", "0.4606947", "0.4606018", "0.4604179", "0.45975944", "0.45943204", "0.45926452", "0.45925856", "0.45852026", "0.4583654", "0.45777828", "0.45770383", "0.45763302", "0.4573015", "0.45670146", "0.45669803", "0.4564498", "0.45611578", "0.45599565", "0.45561954", "0.45553017", "0.45483592", "0.45479", "0.45477003", "0.4545243", "0.45429727", "0.45390365", "0.4536908" ]
0.53757787
4
open_white_list repeated string open_white_list = 11;
public java.lang.String getOpenWhiteList(int index) { return openWhiteList_.get(index); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SList oddWords();", "public java.lang.String getOpenWhiteList(int index) {\n return openWhiteList_.get(index);\n }", "public int getOpenWhiteListCount() {\n return openWhiteList_.size();\n }", "public int getOpenWhiteListCount() {\n return openWhiteList_.size();\n }", "private LowercaseWordList() {\n\n }", "public Builder setOpenWhiteList(\n int index, java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureOpenWhiteListIsMutable();\n openWhiteList_.set(index, value);\n onChanged();\n return this;\n }", "static List DuplicateElements(List<Character> characters){\r\n\t\tList newlist=new ArrayList<>();\r\n\t\tfor(char c:characters)\r\n\t\t{\r\n\t\t\tnewlist.add(Collections.nCopies(2,c ));\r\n\t\r\n\t\t}\r\n\tSystem.out.println(newlist);\r\n\treturn newlist;\r\n\t}", "public Builder addOpenWhiteList(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureOpenWhiteListIsMutable();\n openWhiteList_.add(value);\n onChanged();\n return this;\n }", "public static List<String> createCompetencyList() {\n List<String> list = new ArrayList<String>();\n list.add(\"Line number 1\");\n list.add(\"Line number 2\");\n return list;\n }", "private void exercise2() {\n List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerOddLengthList = list.stream()\n .filter((string) -> string.length() % 2 != 0)\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public void setWhiteSpacesCount(long value) {\n this.whiteSpacesCount = value;\n }", "List<String> mo5877c(String str);", "java.util.List<String> getRepeatedStringFieldList();", "private String addRandomSpacing(String originalText) {\n ArrayList<Expression> list = new ArrayList<Expression>();\n\n\t\tclass MyVisitor extends ModifierVisitor<Void> {\n\t\t @Override\n\t\t public Node visit(VariableDeclarator declarator, Void args) {\n\t Expression expression = declarator.getInitializer().get();\n\t \n\t \n\t // We're looking for string.\n\t if (expression instanceof StringLiteralExpr) {\n\t list.add(expression);\n\t }\n\t\t return null;\n\t\t }\n\t\t}\n\t\t\n\t\t\n\t}", "SList evenWords();", "public com.google.protobuf.ProtocolStringList\n getOpenWhiteListList() {\n return openWhiteList_;\n }", "List<String> mo5876c();", "void fillList(List<String> toFill) {\n for (int i = 0; i < number; i++) {\n toFill.add(i + \"\");\n }\n }", "public String getWhiteList0() {\n return getString(\"whitelist.0\");\n }", "public Builder clearOpenWhiteList() {\n openWhiteList_ = com.google.protobuf.LazyStringArrayList.EMPTY;\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n return this;\n }", "public Builder addAllOpenWhiteList(\n java.lang.Iterable<java.lang.String> values) {\n ensureOpenWhiteListIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, openWhiteList_);\n onChanged();\n return this;\n }", "public com.google.protobuf.ByteString\n getOpenWhiteListBytes(int index) {\n return openWhiteList_.getByteString(index);\n }", "public abstract List<C41717j> mo70725h(String str);", "static int getNumPatterns() { return 64; }", "private static void skipSplitAdd(String s, List<String> list) {\n String tmp[] = s.split(\" \");\n\n for (int i = 1; i < tmp.length; i++) {\n list.add(tmp[i]);\n\n // System.out.println(tmp[i]);\n }\n }", "public static void addStars(ArrayList<String> list){\r\n //Loops through the list\r\n for(int i = 1; i < list.size(); i+=2){\r\n list.add(i, \"*\");\r\n }\r\n System.out.println(list);\r\n }", "private void m4676a(List<C0906d> list, StringBuilder sb) {\n if (sb.length() != 0) {\n list.add(new C0906d(C0906d.EnumC0907a.LITERAL, sb.toString()));\n }\n }", "public void setWhiteCounter(int num){\n this.whiteCounter = num;\n }", "StringList createStringList();", "List<C1114c> mo5886k(String str);", "private String genWhiteSpaceRegex(int noOfWhiteSpace,\n String multiWhiteSpace,\n String zeroWhiteSpace) {\n\n return (noOfWhiteSpace == 0) ? zeroWhiteSpace\n : multiWhiteSpace.replace(\"%%\", String.valueOf(noOfWhiteSpace));\n }", "public com.google.protobuf.ByteString\n getOpenWhiteListBytes(int index) {\n return openWhiteList_.getByteString(index);\n }", "private void generateLists(String num, Stack<String> numberList)\n {\n\tfor(int i = 0, len = num.length(); i < len; i++)\n\t numberList.push(new Character(num.charAt(i)).toString());\n }", "private void exercise5() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> nonDuplicateList;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n nonDuplicateList = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .collect(toList());\n }\n\n nonDuplicateList.forEach(System.out::println);\n }", "void mo100443a(List<String> list);", "ListString createListString();", "List<Log> mo13160a(String str, int i);", "public com.google.protobuf.ProtocolStringList\n getOpenWhiteListList() {\n return openWhiteList_.getUnmodifiableView();\n }", "public static void main(String[] args) { String s = \"catsanddog\";\n// List<String> wordDict = new ArrayList<>(Arrays.asList(\"cat\", \"cats\", \"and\", \"sand\", \"dog\"));\n//\n String s = \"pineapplepenappl\";\n List<String> wordDict = new ArrayList<>(Arrays.asList(\"apple\", \"pen\", \"applepen\", \"pine\", \"pineapple\"));\n\n WordBreak140 tmp = new WordBreak140();\n tmp.wordBreak(s, wordDict);\n }", "@Test\n public void repeatedSubstringPattern() {\n assertTrue(new Solution1().repeatedSubstringPattern(\"abcabcabcabc\"));\n }", "@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }", "private static List<String> testStringGenerator(List<String> palString) {\n\t\tList<String> list = new ArrayList<>();\n\t\tfor (String pal : palString) {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor (int i = 0; i < 10; i++) {\n\t\t\t\tsb.append(pal);\n\t\t\t\tfor (int j = 0; j < pal.length(); j++) {\n\t\t\t\t\tsb.append(j % 10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(sb.toString());\n\t\t}\n\t\treturn list;\n\t}", "public static void makeBlanks(char[] list) {\n\t\tfor (int i = 0; i < list.length; i++) {\n\t\t\tlist[i] = '*';\n\t\t}\n\t}", "public int selectOriginalTokens (Scanner scan, String [] list){\n \n int count = 0;\n while(scan.hasNext()){\n String line = scan.nextLine();\n String[] t = line.split(\"[ \\n\\t\\r.,:?)({}\\\\[\\\\]]\");\n for (int i = 0; i < t.length; i++){\n String item = t[i].trim();\n if(item.length() > 0){\n list[count] = item;\n count++;\n }//End if statement\n }//End for loop\n }//End while loop\n \n return count;\n }", "private String whiteSpace(String sum, String num)\n {\n\tString space = \"\";\n\tfor(int i = 0; i < sum.length() - num.length(); i++)\n\t space += \" \";\n\treturn space;\n }", "void mo54419a(List<String> list);", "List<C1113b> mo5874b(String str);", "public static List<String> stringList() {\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.add(\"abdxxx\");\n\t\tlist.add(\"xxxxx\");\n\t\tlist.add(\"hi\");\n\t\tlist.add(\"SmoothStack\");\n\t\tlist.add(\"Wyatt x Wyatt x\");\n\t\treturn list;\n\t}", "private static String[] resetStringArray() {\n String[] st = new String[L_MAX];\n L = 2 << 8;\n W = 9;\n int i;\n // initialize symbol table with all 1-character strings\n for (i = 0; i < R; i++)\n st[i] = \"\" + (char) i;\n st[i++] = \"\"; // (unused) lookahead for EOF\n return st;\n }", "public void setUp2( )\n\t{\n\t\tfor( int i = 0; i < 1000; i++ )\n\t\t{\n\t\t\tlista.append( \"\" + i );\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tList<Character>st1=new ArrayList<>();\n\t\n\t\tst1.add('a');\n\t\tst1.add('b');\n\t\tst1.add('a');\n\t\tst1.add('a');\n\t\tst1.add('c');\n\t\tst1.add('t');\n\t\n\t\tSystem.out.println(st1);//[a, b, a, a, c, t]\n\t\t\n\t\tList<Character>st2=new ArrayList<>();//empty []\n\t\tfor (int i=0; i<st1.size();i++) {\n\t\t\tif(!st2.contains(st1.get(i))) {\n\t\t\t\t// created str2 [empty], we will get the element from st1 to st2 while checking if there is repetition \n\t\t\t\tst2.add(st1.get(i));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(st2);//[a, b, c, t]\n\t\t\n\n\t}", "private void many(Set<String> s) {\n\t\twhile (!done() && s.contains(program.charAt(pos)+\"\"))\n\t\t\tpos++;\n }", "private static String createPrepStmPlaceHolder(int num) {\n\t\tchar[] c_ar = new char[num*3];\n\t\tc_ar[0] = '(';\n\t\tc_ar[1] = '?';\n\t\tfor(int i=1; i<num; ++i) {\n\t\t\tc_ar[3*i-1] = ',';\n\t\t\tc_ar[3*i] = ' ';\n\t\t\tc_ar[3*i+1] = '?';\n\t\t}\n\t\tc_ar[3*num-1] = ')';\n\t\treturn new String(c_ar);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_2() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\", false), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "private void exercise1() {\n final List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerList = list.stream()\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }", "private static String repeatSpace(int number) {\n StringBuilder space = new StringBuilder();\n\n // Adding spaces.\n for (int i = 0; i < number; i++) {\n space.append(\" \");\n }\n\n //returning spaces.\n return space.toString();\n }", "public void mo88640a(List<String> list) {\n List<String> stringList = RxPreferences.INSTANCE.getStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), new ArrayList());\n stringList.addAll(0, list);\n RxPreferences.INSTANCE.putStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), (List) StreamSupport.m150134a(stringList).mo131128a(new AbstractC32239o(new HashSet(stringList)) {\n /* class com.zhihu.android.p1480db.fragment.customview.C18240x255e53c2 */\n private final /* synthetic */ HashSet f$0;\n\n {\n this.f$0 = r1;\n }\n\n @Override // java8.util.p2234b.AbstractC32239o\n public final boolean test(Object obj) {\n return DbEditorSuggestTagCustomView.m93354a(this.f$0, (String) obj);\n }\n }).mo131126a(5).mo131125a(Collectors.m150203a($$Lambda$ofunvu1bqmYbfXGEtxXaV_csE4M.INSTANCE)));\n }", "public Builder addOpenWhiteListBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n ensureOpenWhiteListIsMutable();\n openWhiteList_.add(value);\n onChanged();\n return this;\n }", "@Test\n public void noSpacesBetweenKeywordsTest() {\n tester.yields(\"LaLaLaLaLaaaLi\", lala.EXPRESSION);\n }", "private int skipLeadingWhite( List content, int start) {\r\n if (start < 0) {\r\n start = 0;\r\n }\r\n\r\n int index = start;\r\n int size = content.size();\r\n if (currentFormat.trimAllWhite\r\n || currentFormat.textNormalize\r\n || currentFormat.textTrim) {\r\n while( index < size) {\r\n if ( !isAllWhitespace( content.get(index))) {\r\n return index;\r\n }\r\n index++;\r\n }\r\n }\r\n return index;\r\n }", "private void initWhitespace(Set<String> s) {\n\t\ts.add(\" \");\n\t\ts.add(\"\\n\");\n\t\ts.add(\"\\t\");\n }", "List<C1111j> mo5869a(int i);", "private void appendPlaceHolder(StringBuilder builder, int indent, int consecutiveExcluded, String message) {\n indent(builder, indent);\n builder.append(ELLIPSIS)\n .append(\" \")\n .append(consecutiveExcluded)\n .append(\" \")\n .append(message)\n .append(CoreConstants.LINE_SEPARATOR);\n }", "public void visiualizeSkipList(){\r\n\t\tint number=0;\r\n\t\tNode dummy = sl.getFrom(0,0);\r\n\t\t\r\n\t\tNode next;\r\n\t\tfor(int i=sl.height(); i>=0; i--){\r\n\t\t\t\r\n\t\t\tnext = sl.getFrom(i,0);\r\n\t\t\t\r\n\t\t\tfor(int j=0; j<(sl.size()+2); j++){\r\n\r\n\t\t\t\tnumber = next.getKey();\r\n\t\t\t\t//F.p(number);\r\n\t\t\t\tif(number==dummy.getKey()){\r\n\r\n\t\t\t\t\tif(number==minf)\r\n\t\t\t\t\t\tSystem.out.print(\"-inf\");\r\n\t\t\t\t\telse if(number==inf)\r\n\t\t\t\t\t\tSystem.out.print(\"---inf\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(\"-\",2)+number);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(\"-\",4));\r\n\t\t\t\t\r\n\t\t\t\tif(dummy.getKey()==number)\r\n\t\t\t\t\tnext = next.getRight();\r\n\t\t\t\t\r\n\t\t\t\tdummy = dummy.getRight();\r\n\t\t\t}\r\n\t\t\tdummy = sl.getFrom(0,0);\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "public long getWhiteSpacesCount() {\n return whiteSpacesCount;\n }", "@Test\n\tpublic void testStartingIndicesRegression(){\n\t\tassertLeftmostStartingIndices(\"5,1,7,3,2|-..xxx$1..x...xxx$3....-xx........\", 0, 6, 8, 18, 22);\n\t\tassertRightmostStartingIndices(\"7,5|.......xxx$1....xxx$2..-\", 6, 14);\n\t\t\n\t}", "public MacroList() {\n\t\tthis.macrosses = new HashMap<Integer, String>(12);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_1() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\"), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n String s=\"a /*a*/ sd /*v*/\";\n Pattern p = Pattern.compile(\"(\\\\/\\\\*(\\\\w|\\r\\n)+\\\\*\\\\/)\");\n Matcher m = p.matcher(s);\n List<String> l = new ArrayList<>(100);\n\n while (m.find()) {\n System.out.println(\"tick\");\n l.add(s.substring(m.start()+2, m.end()-2));\n }\n\n System.out.println(l);\n }", "StringPatternCounter(ArrayList<StringPattern> stringPatternList, String fileInput)\n {\n super(fileInput);\n this.stringPatternList = stringPatternList;\n }", "@Before\n public void createString(){\n s1 = \"casa\";\n\ts2 = \"cassa\";\n\ts3 = \"\";\n\ts4 = \"casa\";\n }", "public String minRemoveToMakeValid(String s) {\n int openAvail = 0;\n Set<Integer> skipSet = new HashSet<>();\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) == ')') {\n if (openAvail == 0) {\n skipSet.add(i);\n } else {\n openAvail -= 1;\n }\n } else if (s.charAt(i) == '(') {\n openAvail += 1;\n }\n }\n\n int closedAvail = 0;\n for (int i = s.length() - 1; i >= 0; i--) {\n if (s.charAt(i) == ')') {\n closedAvail += 1;\n } else if (s.charAt(i) == '(') {\n if (closedAvail == 0) {\n skipSet.add(i);\n } else {\n closedAvail -= 1; \n }\n }\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < s.length(); i++) {\n if (!skipSet.contains(i)){\n sb.append(s.charAt(i));\n }\n }\n return sb.toString();\n }", "@Test(timeout = 4000)\n public void test20() throws Throwable {\n StringReader stringReader0 = new StringReader(\"0(Hu\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer2 = new StreamTokenizer(stringReader0);\n JSTerm jSTerm0 = new JSTerm(streamTokenizer0);\n stringReader0.reset();\n StreamTokenizer streamTokenizer3 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer4 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer5 = new StreamTokenizer(stringReader0);\n streamTokenizer0.commentChar((-4));\n StreamTokenizer streamTokenizer6 = new StreamTokenizer(stringReader0);\n streamTokenizer6.ordinaryChars((-1), (-322070664));\n streamTokenizer1.parseNumbers();\n jSTerm0.add((Object) \"JSTerm: Error reading control parameters: \");\n StreamTokenizer streamTokenizer7 = new StreamTokenizer(stringReader0);\n streamTokenizer7.pushBack();\n streamTokenizer1.nextToken();\n StreamTokenizer streamTokenizer8 = new StreamTokenizer(stringReader0);\n streamTokenizer2.slashSlashComments(false);\n JSTerm jSTerm1 = new JSTerm(streamTokenizer5);\n streamTokenizer1.slashStarComments(false);\n streamTokenizer3.eolIsSignificant(false);\n streamTokenizer7.commentChar((-4));\n StreamTokenizer streamTokenizer9 = new StreamTokenizer(stringReader0);\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n jSSubstitution0.listIterator();\n JSSubstitution jSSubstitution1 = jSTerm1.matches((JSPredicateForm) jSTerm0, jSSubstitution0);\n assertTrue(jSSubstitution1.fail());\n }", "public Removalstops()\n {\n stopWords.add(\"am\");\n stopWords.add(\"my\");\nstopWords.add(\"at\");\nstopWords.add(\"a\");\nstopWords.add(\"i\");\nstopWords.add(\"is\");\nstopWords.add(\"of\");\nstopWords.add(\"have\");\nstopWords.add(\"--\");\nstopWords.add(\"do\");\nstopWords.add(\"the\");\nstopWords.add(\"was\");\nstopWords.add(\"iam\");\nstopWords.add(\"there\");\nstopWords.add(\"what\");\nstopWords.add(\"for\");\nstopWords.add(\"in\");\nstopWords.add(\"very\");\nstopWords.add(\"and\");\nstopWords.add(\"to\");\nstopWords.add(\"often\");\nstopWords.add(\"because\");\nstopWords.add(\"in\");\nstopWords.add(\"an\");\nstopWords.add(\"can\");\nstopWords.add(\"via\");\nstopWords.add(\"even\");\nstopWords.add(\"as\");\nstopWords.add(\"best\");\nstopWords.add(\"been\");\nstopWords.add(\"into\");\nstopWords.add(\"by\");\nstopWords.add(\"around\");\nstopWords.add(\"being\");\nstopWords.add(\"from\");\nstopWords.add(\"etc\");\nstopWords.add(\"his\");\nstopWords.add(\"do\");\nstopWords.add(\"have\");\nstopWords.add(\"had\"); \nstopWords.add(\"able\");\nstopWords.add(\"about\");\nstopWords.add(\"above\");\nstopWords.add(\"abroad\");\nstopWords.add(\"according\");\nstopWords.add(\"accordingly\");\nstopWords.add(\"across\");\nstopWords.add(\"actually\");\nstopWords.add(\"adj\");\nstopWords.add(\"after\");\nstopWords.add(\"afterwards\");\nstopWords.add(\"again\");\nstopWords.add(\"against\");\nstopWords.add(\"ago\");\nstopWords.add(\"ahead\");\nstopWords.add(\"ain't\");\nstopWords.add(\"all\");\nstopWords.add(\"allow\");\nstopWords.add(\"allows\");\nstopWords.add(\"almost\");\nstopWords.add(\"alone\");\nstopWords.add(\"along\");\nstopWords.add(\"alongside\");\nstopWords.add(\"already\");\nstopWords.add(\"also\");\nstopWords.add(\"although\");\nstopWords.add(\"always\");\nstopWords.add(\"am\");\nstopWords.add(\"amid\");\nstopWords.add(\"amidst\");\nstopWords.add(\"among\");\nstopWords.add(\"amongst\");\nstopWords.add(\"an\");\nstopWords.add(\"and\");\nstopWords.add(\"another\");\nstopWords.add(\"any\");\nstopWords.add(\"anybody\");\nstopWords.add(\"anyhow\");\nstopWords.add(\"anyone\");\nstopWords.add(\"anything\");\nstopWords.add(\"anyway\");\nstopWords.add(\"anyways\");\nstopWords.add(\"anywhere\");\nstopWords.add(\"apart\");\nstopWords.add(\"appear\");\nstopWords.add(\"appreciate\");\nstopWords.add(\"appropriate\");\nstopWords.add(\"are\");\nstopWords.add(\"aren't\");\nstopWords.add(\"around\");\nstopWords.add(\"as\");\nstopWords.add(\"a's\");\nstopWords.add(\"aside\");\nstopWords.add(\"ask\");\nstopWords.add(\"asking\");\nstopWords.add(\"associated\");\nstopWords.add(\"at\");\nstopWords.add(\"available\");\nstopWords.add(\"away\");\nstopWords.add(\"awfully\");\nstopWords.add(\"back\");\nstopWords.add(\"backward\");\nstopWords.add(\"backwards\");\nstopWords.add(\"be\");\nstopWords.add(\"became\");\nstopWords.add(\"beacause\");\nstopWords.add(\"become\");\nstopWords.add(\"becomes\");\nstopWords.add(\"becoming\");\nstopWords.add(\"been\");\nstopWords.add(\"before\");\nstopWords.add(\"beforehand\");\nstopWords.add(\"begin\");\nstopWords.add(\"behind\");\nstopWords.add(\"being\");\nstopWords.add(\"believe\");\nstopWords.add(\"below\");\nstopWords.add(\"beside\");\nstopWords.add(\"besides\");\nstopWords.add(\"best\");\nstopWords.add(\"better\");\nstopWords.add(\"between\");\nstopWords.add(\"beyond\");\nstopWords.add(\"both\");\nstopWords.add(\"brief\");\nstopWords.add(\"but\");\nstopWords.add(\"by\");\nstopWords.add(\"came\");\nstopWords.add(\"can\");\nstopWords.add(\"cannot\");\nstopWords.add(\"cant\");\nstopWords.add(\"can't\");\nstopWords.add(\"caption\");\nstopWords.add(\"cause\");\nstopWords.add(\"causes\");\nstopWords.add(\"certain\");\nstopWords.add(\"cetrainly\");\nstopWords.add(\"changes\");\nstopWords.add(\"clearly\");\nstopWords.add(\"c'mon\");\nstopWords.add(\"co\");\nstopWords.add(\"co.\");\nstopWords.add(\"com\");\nstopWords.add(\"come\");\nstopWords.add(\"comes\");\nstopWords.add(\"concerning\");\nstopWords.add(\"consequently\");\nstopWords.add(\"consider\");\nstopWords.add(\"considering\");\nstopWords.add(\"could\");\nstopWords.add(\"couldn't\");\nstopWords.add(\"c's\");\nstopWords.add(\"currently\");\nstopWords.add(\"dare\");\nstopWords.add(\"daren't\");\nstopWords.add(\"definitely\");\nstopWords.add(\"described\");\nstopWords.add(\"despite\");\nstopWords.add(\"did\");\nstopWords.add(\"didn't\");\nstopWords.add(\"different\");\nstopWords.add(\"directly\");\nstopWords.add(\"do\");\nstopWords.add(\"does\");\nstopWords.add(\"doesn't\");\nstopWords.add(\"doing\");\nstopWords.add(\"done\");\nstopWords.add(\"don't\");\nstopWords.add(\"down\");\nstopWords.add(\"downwards\");\nstopWords.add(\"during\");\nstopWords.add(\"each\");\nstopWords.add(\"edu\");\nstopWords.add(\"eg\");\nstopWords.add(\"eight\");\nstopWords.add(\"eighty\");\nstopWords.add(\"either\");\nstopWords.add(\"else\");\nstopWords.add(\"elsewhere\");\nstopWords.add(\"end\");\nstopWords.add(\"ending\");\nstopWords.add(\"enough\");\nstopWords.add(\"entirely\");\nstopWords.add(\"especially\");\nstopWords.add(\"et\");\nstopWords.add(\"etc\");\nstopWords.add(\"even\");\nstopWords.add(\"evenmore\");\nstopWords.add(\"every\");\nstopWords.add(\"everybody\");\nstopWords.add(\"everyone\");\nstopWords.add(\"everything\");\nstopWords.add(\"everywhere\");\nstopWords.add(\"ex\");\nstopWords.add(\"exactly\");\nstopWords.add(\"example\");\nstopWords.add(\"except\");\nstopWords.add(\"fairly\");\nstopWords.add(\"far\");\nstopWords.add(\"farhter\");\nstopWords.add(\"few\");\nstopWords.add(\"fewer\");\nstopWords.add(\"fifth\");\nstopWords.add(\"first\");\nstopWords.add(\"five\");\nstopWords.add(\"followed\");\nstopWords.add(\"following\");\nstopWords.add(\"follows\");\nstopWords.add(\"for\");\nstopWords.add(\"forever\");\nstopWords.add(\"former\");\nstopWords.add(\"formerly\");\nstopWords.add(\"forth\");\nstopWords.add(\"forward\");\nstopWords.add(\"found\");\nstopWords.add(\"four\");\nstopWords.add(\"from\");\nstopWords.add(\"further\");\nstopWords.add(\"furthermore\");\nstopWords.add(\"get\");\nstopWords.add(\"gets\");\nstopWords.add(\"getting\");\nstopWords.add(\"given\");\nstopWords.add(\"gives\");\nstopWords.add(\"go\");\nstopWords.add(\"goes\");\nstopWords.add(\"going\");\nstopWords.add(\"gone\");\nstopWords.add(\"got\");\nstopWords.add(\"gotten\");\nstopWords.add(\"greetings\");\nstopWords.add(\"had\");\nstopWords.add(\"hadn't\");\nstopWords.add(\"half\");\nstopWords.add(\"happens\");\nstopWords.add(\"hardly\");\nstopWords.add(\"has\");\nstopWords.add(\"hasn't\");\nstopWords.add(\"have\");\nstopWords.add(\"haven't\");\nstopWords.add(\"having\");\nstopWords.add(\"he\");\nstopWords.add(\"he'd\");\nstopWords.add(\"he'll\");\nstopWords.add(\"hello\");\nstopWords.add(\"help\");\nstopWords.add(\"hence\");\nstopWords.add(\"her\");\nstopWords.add(\"here\");\nstopWords.add(\"hereafter\");\nstopWords.add(\"hereby\");\nstopWords.add(\"herein\");\nstopWords.add(\"here's\");\nstopWords.add(\"hereupon\");\nstopWords.add(\"hers\");\nstopWords.add(\"herself\");\nstopWords.add(\"he's\");\nstopWords.add(\"hi\");\nstopWords.add(\"him\");\nstopWords.add(\"himself\");\nstopWords.add(\"his\");\nstopWords.add(\"hither\");\nstopWords.add(\"hopefully\");\nstopWords.add(\"how\");\nstopWords.add(\"howbeit\");\nstopWords.add(\"however\");\nstopWords.add(\"however\");\nstopWords.add(\"hundred\");\nstopWords.add(\"i'd\");\nstopWords.add(\"ie\");\nstopWords.add(\"if\");\nstopWords.add(\"ignored\");\nstopWords.add(\"i'll\");\nstopWords.add(\"i'm\");\nstopWords.add(\"immediate\");\nstopWords.add(\"in\");\nstopWords.add(\"iansmuch\");\nstopWords.add(\"inc\");\nstopWords.add(\"inc.\");\nstopWords.add(\"indeed\");\nstopWords.add(\"indicate\");\nstopWords.add(\"indicated\");\nstopWords.add(\"indicates\");\nstopWords.add(\"inner\");\nstopWords.add(\"inside\");\nstopWords.add(\"insofar\");\nstopWords.add(\"into\");\nstopWords.add(\"inward\");\nstopWords.add(\"is\");\nstopWords.add(\"isn't\");\nstopWords.add(\"it\");\nstopWords.add(\"it'd\");\nstopWords.add(\"it'll\");\nstopWords.add(\"its\");\nstopWords.add(\"it's\");\nstopWords.add(\"itself\");\nstopWords.add(\"i've\");\nstopWords.add(\"just\");\nstopWords.add(\"k\");\nstopWords.add(\"keep\");\nstopWords.add(\"keeps\");\nstopWords.add(\"kept\");\nstopWords.add(\"know\");\nstopWords.add(\"knows\");\nstopWords.add(\"known\");\nstopWords.add(\"last\");\nstopWords.add(\"lately\");\nstopWords.add(\"later\");\nstopWords.add(\"latter\");\nstopWords.add(\"latterly\");\nstopWords.add(\"least\");\nstopWords.add(\"less\");\nstopWords.add(\"let\");\nstopWords.add(\"let's\");\nstopWords.add(\"like\");\nstopWords.add(\"liked\");\nstopWords.add(\"likely\");\nstopWords.add(\"likewise\");\nstopWords.add(\"little\");\nstopWords.add(\"look\");\nstopWords.add(\"looks\");\nstopWords.add(\"low\");\nstopWords.add(\"lower\");\nstopWords.add(\"ltd\");\nstopWords.add(\"made\");\nstopWords.add(\"mainly\");\nstopWords.add(\"make\");\nstopWords.add(\"makes\");\nstopWords.add(\"many\");\nstopWords.add(\"may\");\nstopWords.add(\"maybe\");\nstopWords.add(\"mayn't\");\nstopWords.add(\"me\");\nstopWords.add(\"mean\");\nstopWords.add(\"meanwhile\");\nstopWords.add(\"merely\");\nstopWords.add(\"might\");\nstopWords.add(\"mightn't\");\nstopWords.add(\"mine\");\nstopWords.add(\"minus\");\nstopWords.add(\"miss\");\nstopWords.add(\"more\");\nstopWords.add(\"moreover\");\nstopWords.add(\"most\");\nstopWords.add(\"mostly\");\nstopWords.add(\"mr\");\nstopWords.add(\"mrs\");\nstopWords.add(\"much\");\nstopWords.add(\"must\");\nstopWords.add(\"mustn't\");\nstopWords.add(\"my\");\nstopWords.add(\"myself\");\nstopWords.add(\"name\");\nstopWords.add(\"namely\");\nstopWords.add(\"nd\");\nstopWords.add(\"near\");\nstopWords.add(\"nearly\");\nstopWords.add(\"necessary\");\nstopWords.add(\"need\");\nstopWords.add(\"needn't\");\nstopWords.add(\"needs\");\nstopWords.add(\"neither\");\nstopWords.add(\"never\");\nstopWords.add(\"neverf\");\nstopWords.add(\"neverless\");\nstopWords.add(\"nevertheless\");\nstopWords.add(\"new\");\nstopWords.add(\"next\");\nstopWords.add(\"nine\");\nstopWords.add(\"ninety\");\nstopWords.add(\"no\");\nstopWords.add(\"nobody\");\nstopWords.add(\"non\");\nstopWords.add(\"none\");\nstopWords.add(\"nonetheless\");\nstopWords.add(\"noone\");\nstopWords.add(\"no-one\");\nstopWords.add(\"nor\");\nstopWords.add(\"normally\");\nstopWords.add(\"not\");\nstopWords.add(\"nothing\");\nstopWords.add(\"notwithstanding\");\nstopWords.add(\"novel\");\nstopWords.add(\"now\");\nstopWords.add(\"nowwhere\");\nstopWords.add(\"obviously\");\nstopWords.add(\"of\");\nstopWords.add(\"off\");\nstopWords.add(\"often\");\nstopWords.add(\"oh\");\nstopWords.add(\"ok\");\nstopWords.add(\"okay\");\nstopWords.add(\"old\");\nstopWords.add(\"on\");\nstopWords.add(\"once\");\nstopWords.add(\"one\");\nstopWords.add(\"ones\");\nstopWords.add(\"one's\");\nstopWords.add(\"only\");\nstopWords.add(\"onto\");\nstopWords.add(\"opposite\");\nstopWords.add(\"or\");\nstopWords.add(\"other\");\nstopWords.add(\"others\");\nstopWords.add(\"otherwise\");\nstopWords.add(\"ought\");\nstopWords.add(\"oughtn't\");\nstopWords.add(\"our\");\nstopWords.add(\"ourselves\");\nstopWords.add(\"out\");\nstopWords.add(\"outside\");\nstopWords.add(\"over\");\nstopWords.add(\"overall\");\nstopWords.add(\"own\");\nstopWords.add(\"particular\");\nstopWords.add(\"particularly\");\nstopWords.add(\"past\");\nstopWords.add(\"per\");\nstopWords.add(\"perhaps\");\nstopWords.add(\"placed\");\nstopWords.add(\"please\");\nstopWords.add(\"plus\");\nstopWords.add(\"possible\");\nstopWords.add(\"presumably\");\nstopWords.add(\"probably\");\nstopWords.add(\"provided\");\nstopWords.add(\"provides\");\nstopWords.add(\"que\");\nstopWords.add(\"quite\");\nstopWords.add(\"qv\");\nstopWords.add(\"rather\");\nstopWords.add(\"rd\");\nstopWords.add(\"re\");\nstopWords.add(\"really\");\nstopWords.add(\"reasonably\");\nstopWords.add(\"recent\");\nstopWords.add(\"recently\");\nstopWords.add(\"regarding\");\nstopWords.add(\"regardless\");\nstopWords.add(\"regards\");\nstopWords.add(\"relatively\");\nstopWords.add(\"respectively\");\nstopWords.add(\"right\");\nstopWords.add(\"round\");\nstopWords.add(\"said\");\nstopWords.add(\"same\");\nstopWords.add(\"saw\");\nstopWords.add(\"say\");\nstopWords.add(\"saying\");\nstopWords.add(\"says\");\nstopWords.add(\"second\");\nstopWords.add(\"secondly\");\nstopWords.add(\"see\");\nstopWords.add(\"seeing\");\nstopWords.add(\"seem\");\nstopWords.add(\"seemed\");\nstopWords.add(\"seeming\");\nstopWords.add(\"seems\");\nstopWords.add(\"seen\");\nstopWords.add(\"self\");\nstopWords.add(\"selves\");\nstopWords.add(\"sensible\");\nstopWords.add(\"sent\");\nstopWords.add(\"serious\");\nstopWords.add(\"seriously\");\nstopWords.add(\"seven\");\nstopWords.add(\"several\");\nstopWords.add(\"shall\");\nstopWords.add(\"shan't\");\nstopWords.add(\"she\");\nstopWords.add(\"she'd\");\nstopWords.add(\"she'll\");\nstopWords.add(\"she's\");\nstopWords.add(\"should\");\nstopWords.add(\"shouldn't\");\nstopWords.add(\"since\");\nstopWords.add(\"six\");\nstopWords.add(\"so\");\nstopWords.add(\"some\");\nstopWords.add(\"somebody\");\nstopWords.add(\"someday\");\nstopWords.add(\"somehow\");\nstopWords.add(\"someone\");\nstopWords.add(\"something\");\nstopWords.add(\"sometime\");\nstopWords.add(\"sometimes\");\nstopWords.add(\"somewhat\");\nstopWords.add(\"somewhere\");\nstopWords.add(\"soon\");\nstopWords.add(\"sorry\");\nstopWords.add(\"specified\");\nstopWords.add(\"specify\");\nstopWords.add(\"specifying\");\nstopWords.add(\"still\");\nstopWords.add(\"sub\");\nstopWords.add(\"such\");\nstopWords.add(\"sup\");\nstopWords.add(\"sure\");\nstopWords.add(\"take\");\nstopWords.add(\"taken\");\nstopWords.add(\"taking\");\nstopWords.add(\"tell\");\nstopWords.add(\"tends\");\nstopWords.add(\"th\");\nstopWords.add(\"than\");\nstopWords.add(\"thank\");\nstopWords.add(\"thanks\");\nstopWords.add(\"thanx\");\nstopWords.add(\"that\");\nstopWords.add(\"that'll\");\nstopWords.add(\"thats\");\nstopWords.add(\"that've\");\nstopWords.add(\"the\");\nstopWords.add(\"their\");\nstopWords.add(\"theirs\");\nstopWords.add(\"them\");\nstopWords.add(\"themselves\");\nstopWords.add(\"then\");\nstopWords.add(\"thence\");\nstopWords.add(\"there\");\nstopWords.add(\"thereafter\");\nstopWords.add(\"thereby\");\nstopWords.add(\"there'd\");\nstopWords.add(\"therefore\");\nstopWords.add(\"therein\");\nstopWords.add(\"ther'll\");\nstopWords.add(\"there're\");\nstopWords.add(\"theres\");\nstopWords.add(\"there's\");\nstopWords.add(\"thereupon\");\nstopWords.add(\"there've\");\nstopWords.add(\"these\");\nstopWords.add(\"they\");\nstopWords.add(\"they'd\");\nstopWords.add(\"they'll\");\nstopWords.add(\"they're\");\nstopWords.add(\"they've\");\nstopWords.add(\"thing\");\nstopWords.add(\"things\");\nstopWords.add(\"think\");\nstopWords.add(\"third\");\nstopWords.add(\"thirty\");\nstopWords.add(\"this\");\nstopWords.add(\"thorough\");\nstopWords.add(\"thoroughly\");\nstopWords.add(\"those\");\nstopWords.add(\"though\");\nstopWords.add(\"throughout\");\nstopWords.add(\"thru\");\nstopWords.add(\"thus\");\nstopWords.add(\"till\");\nstopWords.add(\"to\");\nstopWords.add(\"together\");\nstopWords.add(\"too\");\nstopWords.add(\"took\");\nstopWords.add(\"toward\");\nstopWords.add(\"towards\");\nstopWords.add(\"tried\");\nstopWords.add(\"tries\");\nstopWords.add(\"truly\");\nstopWords.add(\"try\");\nstopWords.add(\"trying\");\nstopWords.add(\"t's\");\nstopWords.add(\"twice\");\nstopWords.add(\"two\");\nstopWords.add(\"un\");\nstopWords.add(\"under\");\nstopWords.add(\"underneath\");\nstopWords.add(\"undoing\");\nstopWords.add(\"unfortunately\");\nstopWords.add(\"unless\");\nstopWords.add(\"unlike\");\nstopWords.add(\"unlikely\");\nstopWords.add(\"untill\");\nstopWords.add(\"unto\");\nstopWords.add(\"up\");\nstopWords.add(\"upon\");\nstopWords.add(\"upwards\");\nstopWords.add(\"us\");\nstopWords.add(\"use\");\nstopWords.add(\"used\");\nstopWords.add(\"useful\");\nstopWords.add(\"uses\");\nstopWords.add(\"using\");\nstopWords.add(\"usually\");\nstopWords.add(\"v\");\nstopWords.add(\"value\");\nstopWords.add(\"various\");\nstopWords.add(\"versus\");\nstopWords.add(\"very\");\nstopWords.add(\"via\");\nstopWords.add(\"viz\");\nstopWords.add(\"vs\");\nstopWords.add(\"want\");\nstopWords.add(\"wants\");\nstopWords.add(\"was\");\nstopWords.add(\"wasn't\");\nstopWords.add(\"way\");\nstopWords.add(\"we\");\nstopWords.add(\"we'd\");\nstopWords.add(\"welcome\");\nstopWords.add(\"well\");\nstopWords.add(\"we'll\");\nstopWords.add(\"went\");\nstopWords.add(\"were\");\nstopWords.add(\"we're\");\nstopWords.add(\"weren't\");\nstopWords.add(\"we've\");\nstopWords.add(\"what\");\nstopWords.add(\"whatever\");\nstopWords.add(\"what'll\");\nstopWords.add(\"what's\");\nstopWords.add(\"what've\");\nstopWords.add(\"when\");\nstopWords.add(\"whence\");\nstopWords.add(\"whenever\");\nstopWords.add(\"where\");\nstopWords.add(\"whereafter\");\nstopWords.add(\"whereas\");\nstopWords.add(\"whereby\");\nstopWords.add(\"wherein\");\nstopWords.add(\"where's\");\nstopWords.add(\"whereupon\");\nstopWords.add(\"whereever\");\nstopWords.add(\"whether\");\nstopWords.add(\"which\");\nstopWords.add(\"whichever\");\nstopWords.add(\"while\");\nstopWords.add(\"whilst\");\nstopWords.add(\"whither\");\nstopWords.add(\"who\");\nstopWords.add(\"who'd\");\nstopWords.add(\"whoever\");\nstopWords.add(\"whole\");\nstopWords.add(\"who'll\");\nstopWords.add(\"whom\");\nstopWords.add(\"whomever\");\nstopWords.add(\"who's\");\nstopWords.add(\"whose\");\nstopWords.add(\"why\");\nstopWords.add(\"will\");\nstopWords.add(\"willing\");\nstopWords.add(\"wish\");\nstopWords.add(\"with\");\nstopWords.add(\"within\");\nstopWords.add(\"without\");\nstopWords.add(\"wonder\");\nstopWords.add(\"won't\");\nstopWords.add(\"would\");\nstopWords.add(\"wouldn't\");\nstopWords.add(\"yes\");\nstopWords.add(\"yet\");\nstopWords.add(\"you\");\nstopWords.add(\"you'd\");\nstopWords.add(\"you'll\");\nstopWords.add(\"your\");\nstopWords.add(\"you're\");\nstopWords.add(\"yours\");\nstopWords.add(\"yourself\");\nstopWords.add(\"you've\");\nstopWords.add(\"zero\");\n\n \n \n }", "@SuppressWarnings(\"resource\")\n public static void doubleCapacity(String[] array){\n int wordCount = 0;\n int arrayGrowth = 500;\n array = new String[10];\n String strLine = null;\n while (strLine != null) {\n // Store the content into an array\n Scanner s = new Scanner(strLine);\n while (s.hasNext()) {\n if (array.length == wordCount) {\n // expand list\n array = Arrays.copyOf(array, array.length + arrayGrowth);\n }\n array[wordCount] = s.next();\n wordCount++;\n } \n }\n }", "private int skipTrialingWhite( List content, int start) {\r\n int size = content.size();\r\n if (start > size) {\r\n start = size;\r\n }\r\n\r\n int index = start;\r\n if (currentFormat.trimAllWhite\r\n || currentFormat.textNormalize\r\n || currentFormat.textTrim) {\r\n while( index >= 0) {\r\n if ( !isAllWhitespace( content.get(index - 1)))\r\n break;\r\n --index;\r\n }\r\n }\r\n return index;\r\n }", "public abstract void mo9247b(String str, long j, List<String> list);", "private void fillSet() {\r\n\t\tString regex = \"\\\\p{L}+\";\r\n\t\tMatcher matcher = Pattern.compile(regex).matcher(body);\r\n\t\twhile (matcher.find()) {\r\n\t\t\tif (!matcher.group().isEmpty()) {\r\n\t\t\t\twords.add(matcher.group());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private ArrayList<Integer> getEmptySpaces(char[] board) {\n ArrayList<Integer> emptySpaces = new ArrayList<>();\n for (int i = 0; i < board.length; i++) {\n if (board[i] == ' ') {\n emptySpaces.add(i);\n }\n }\n return emptySpaces;\n }", "void mo13370a(int i, int i2, List<C15929a> list) throws IOException;", "private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }", "private static Stream<List<Tile>> substituteBlanks(List<Tile> p) {\n Stream<List<Tile>> res = Stream.of(p);\n //Iterate through all letters.\n for (int i = 0; i < p.size(); i++) {\n //Check for blanks.\n if (p.get(i).getLetter() == Character.MIN_VALUE) {\n //If blank found, substitute it for all a-z, and look again for next blank.\n res = substituteBlankAtIndex(p, i)\n .flatMap(s -> substituteBlanks(s));\n }\n }\n\n return res;\n }", "public static void main(String[] args) {\n String[] strings = new String[100];\n for (int i = 0; i < strings.length; i++) {\n strings[i] = randomStrings(2);\n }\n// for (String s : strings) {\n// System.out.println(s);\n// }\n ArrayList<String> appeared = new ArrayList<>();\n for (String s : strings) {\n if (!appeared.contains(s)) {\n appeared.add(s);\n }\n }\n System.out.println(appeared.size());\n\n }", "private IgnoreListHelper() {\n\t}", "@Test\n\t public void test5 ()\n\t{\n\t\t\tString s = new String(\"aaabaaaaabaabaaaabaaaaaaaaaaaaaabaaaaaaaaaaaaaaabaaaaaaaaaaaaaaba\");\n\t s = s.replaceAll(\"\\\\s+\", \" \");\n\t assertEquals(\"aaaaaaaaaaaaaabaaaaaaaaaaaaaa\", LRS.lrs(s)); \n\t}", "public static List<String> findRepeatedDnaSequences(String s) {\n \tList<String> re=new ArrayList<String>();\n \tif(s.length()<=10){\n \t\treturn re;\n \t}\n \tMap<String, Integer> map=new HashMap<String, Integer>(); \t\n \tfor(int i=10; i<=s.length(); i++){\n \t\tString k=s.substring(i-10, i);\n \t\tif(map.containsKey(k)){\n \t\t\tint val=map.get(k);\n \t\t\tif(val==1){\n \t\t\t\tre.add(k);\n \t\t\t}\n \t\t\tmap.put(k, val+1);\n \t\t}else{\n \t\t\tmap.put(k, 1);\n \t\t}\n \t}\n \treturn re;\n }", "public static void main(){\r\n\t\t\r\n\t\tArrayList<tok> pHolder = new ArrayList<tok>();\r\n\r\n\t\t pHolder.add(new tok(\"@\", \"@\"));\r\n\t\t\r\n\t\treturn;\r\n\t}", "public void mo9497b(List<String> list) {\n this.f1514c = list;\n }", "private void listEntries(BufferedWriter bw, String previous, int start, int end, String zeroes) throws IOException {\n\t\tint writeStart = -1;\n\t\tStringBuilder sb = new StringBuilder();\n\t\tchar c;\n\t\tfor (int i = 0, l = previous.length(); i < l && writeStart == -1; i++) {\n\t\t\tc = previous.charAt(i);\n\t\t\tif (Character.isDigit(c)) {sb.append(c);}\n\t\t\telse {writeStart = Integer.parseInt(sb.toString());}\n\t\t}\n\t\tfor (int i = start; i < end; i++) {bw.write(++writeStart + \"=\" + zeroes + i + \"\\n\");}\n\t}", "public void m20623OooO00o() {\n for (C8964ooOOo000 ooooo000 : this.f22213OooO00o) {\n OooO00o(ooooo000);\n }\n this.f22212OooO00o.clear();\n this.f22213OooO00o.clear();\n }", "public String addWhiteSpace(String str, int number) {\n\t\tStringBuilder result = new StringBuilder();\n\t\tfor (int i = 0; i < str.length(); i+=2) {\n\t\t if (i > 0) {\n\t\t\t for (int j = 0; j < number; j++)\n\t\t\t\t result.append(\" \");\n\t\t }\n\t\t result.append(str.charAt(i));\n\t\t result.append(str.charAt(i+1));\n\t\t}\n\t\treturn result.toString();\n\t}", "public static List<String> findStrobogrammatic(int n) {\n List<String> cur, ans;\n ans = new ArrayList<String>((n & 1) == 0 ? Arrays.asList(\"\") : Arrays.asList(\"0\", \"1\", \"8\"));\n if (n < 2) return ans;\n\n for (;n > 1; n -= 2) {\n cur = ans;\n ans = new ArrayList<String>();\n for (String i : cur) {\n if (n > 3) {\n ans.add('0' + i + '0');\n }\n ans.add('1' + i + '1');\n ans.add('8' + i + '8');\n ans.add('6' + i + '9');\n ans.add('9' + i + '6');\n }\n }\n System.out.println(ans.size());\n return ans;\n }", "private static List<String> induceSynonims(String word) {\n\t\treturn null;\n\t}", "private List<WordScore> liveList(List<WordScore> gridList, String s) {\n s = s.toLowerCase();\n List<WordScore> liveList = new ArrayList<>();\n for(WordScore ws : gridList){\n int nochars = s.length() - s.replaceAll(ws.getWord(), \"\").length();\n liveList.add(new WordScore(ws.getWord(), ws.getScore()-nochars));\n }\n return liveList;\n }", "private void fillRandomList()\n\t{\n\t\trandomList.add(\"I like cheese.\");\n\t\trandomList.add(\"Tortoise can move faster than slow rodent.\");\n\t\trandomList.add(\"I enjoy sitting on the ground.\");\n\t\trandomList.add(\"I like cereal.\");\n\t\trandomList.add(\"This is random.\");\n\t\trandomList.add(\"I like typing\");\n\t\trandomList.add(\"FLdlsjejf is my favorite word.\");\n\t\trandomList.add(\"I have two left toes.\");\n\t\trandomList.add(\"Sqrt(2) = 1.414213562 ...\");\n\t\trandomList.add(\"Hi mom.\");\n\t}", "public static void main(String[] args) {\n\t\tString s=\"22\";\n\t\t\n\t\tif(s.indexOf(\"1\")>=0||s.equals(\"\"))\n\t\t\tSystem.out.println(\"hello\");\n\t\t\t\n\t\tArrayList f=new ArrayList();\n\t\tint stack[]=new int[2*s.length()];\n\t\tint top=-1;\n\t\tchar a[][]=new char[][]{{},{},{'#','a','b','c','#'},{'#','d','e','f','#'},{'#','g','h','i','#'},{'#','j','k','l','#'},{'#','m','n','o','#'},{'#','p','q','r','s','#'},{'#','t','u','v','#'},{'#','w','x','y','z','#'}};\n\t\tint length[]=new int []{0,0,3,3,3,3,3,4,3,4};\n\t\tStringBuilder ans=new StringBuilder();\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tint x=stack[++top]=(int)s.charAt(i)-'0';\n\t\t\tans.append(a[x][1]);\n\t\t\tstack[++top]=1;\n\t\t}\n\t\twhile(stack[1]!=length[(int)s.charAt(0)-'0']+1){\n\t\t\tif(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\tif(s.length()==(top+1)/2){\n\t\t\t\t\twhile(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\t\t\tint r=(top-1)/2;\n\t\t\t\t\t\tchar r1=a[stack[top-1]][stack[top]];\n\t\t\t\t\t\tans.setCharAt(r, r1);\n\t\t\t\t\t\tString ans1=ans.toString();\n\t\t\t\t\t\tf.add(ans1);\n\t\t\t\t\t\tstack[top]++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t\t\ttop+=2;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[top]=1;\n\t\t\t\ttop-=2;\n\t\t\t\tstack[top]++;\n\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(f.size());\n\t}", "private void modify(List listString){\n\t}", "private String repeatM(int count){\n return new String(new char[count]).replace('\\0','M');\n }", "private static void\n eatWhite(ParseState state)\n {\n while(state.pos < state.data.length() && state.data.charAt(state.pos) == ' ')\n {\n ++state.pos;\n }\n }" ]
[ "0.55591595", "0.5524409", "0.54578066", "0.53757787", "0.5364262", "0.5288061", "0.5286694", "0.52332956", "0.5221815", "0.5211653", "0.5201803", "0.51848924", "0.518454", "0.5178811", "0.51761377", "0.5150973", "0.5141157", "0.5138997", "0.51366293", "0.5130912", "0.51279604", "0.5071481", "0.50682074", "0.50673336", "0.5058374", "0.50503725", "0.5046189", "0.5046023", "0.50277734", "0.50120145", "0.49743384", "0.4959684", "0.49513972", "0.49383563", "0.492581", "0.49236417", "0.49056625", "0.48794308", "0.48752907", "0.48583564", "0.4856731", "0.48500034", "0.48222542", "0.48127964", "0.4812774", "0.48096502", "0.48054305", "0.48029843", "0.48021927", "0.4784932", "0.47791797", "0.47657204", "0.47405565", "0.47405225", "0.47390026", "0.47360018", "0.47321254", "0.47301587", "0.47235176", "0.47201622", "0.4720113", "0.4717014", "0.47158983", "0.4708474", "0.4698091", "0.46781585", "0.46772122", "0.46698767", "0.46634603", "0.46624836", "0.46601665", "0.4651289", "0.46146277", "0.4606947", "0.4606018", "0.4604179", "0.45975944", "0.45943204", "0.45926452", "0.45925856", "0.45852026", "0.4583654", "0.45777828", "0.45770383", "0.45763302", "0.4573015", "0.45670146", "0.45669803", "0.4564498", "0.45611578", "0.45599565", "0.45561954", "0.45553017", "0.45483592", "0.45479", "0.45477003", "0.4545243", "0.45429727", "0.45390365", "0.4536908" ]
0.5425202
3
open_white_list repeated string open_white_list = 11;
public com.google.protobuf.ByteString getOpenWhiteListBytes(int index) { return openWhiteList_.getByteString(index); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SList oddWords();", "public java.lang.String getOpenWhiteList(int index) {\n return openWhiteList_.get(index);\n }", "public int getOpenWhiteListCount() {\n return openWhiteList_.size();\n }", "public java.lang.String getOpenWhiteList(int index) {\n return openWhiteList_.get(index);\n }", "public int getOpenWhiteListCount() {\n return openWhiteList_.size();\n }", "private LowercaseWordList() {\n\n }", "public Builder setOpenWhiteList(\n int index, java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureOpenWhiteListIsMutable();\n openWhiteList_.set(index, value);\n onChanged();\n return this;\n }", "static List DuplicateElements(List<Character> characters){\r\n\t\tList newlist=new ArrayList<>();\r\n\t\tfor(char c:characters)\r\n\t\t{\r\n\t\t\tnewlist.add(Collections.nCopies(2,c ));\r\n\t\r\n\t\t}\r\n\tSystem.out.println(newlist);\r\n\treturn newlist;\r\n\t}", "public Builder addOpenWhiteList(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureOpenWhiteListIsMutable();\n openWhiteList_.add(value);\n onChanged();\n return this;\n }", "public static List<String> createCompetencyList() {\n List<String> list = new ArrayList<String>();\n list.add(\"Line number 1\");\n list.add(\"Line number 2\");\n return list;\n }", "private void exercise2() {\n List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerOddLengthList = list.stream()\n .filter((string) -> string.length() % 2 != 0)\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public void setWhiteSpacesCount(long value) {\n this.whiteSpacesCount = value;\n }", "List<String> mo5877c(String str);", "java.util.List<String> getRepeatedStringFieldList();", "private String addRandomSpacing(String originalText) {\n ArrayList<Expression> list = new ArrayList<Expression>();\n\n\t\tclass MyVisitor extends ModifierVisitor<Void> {\n\t\t @Override\n\t\t public Node visit(VariableDeclarator declarator, Void args) {\n\t Expression expression = declarator.getInitializer().get();\n\t \n\t \n\t // We're looking for string.\n\t if (expression instanceof StringLiteralExpr) {\n\t list.add(expression);\n\t }\n\t\t return null;\n\t\t }\n\t\t}\n\t\t\n\t\t\n\t}", "SList evenWords();", "public com.google.protobuf.ProtocolStringList\n getOpenWhiteListList() {\n return openWhiteList_;\n }", "List<String> mo5876c();", "void fillList(List<String> toFill) {\n for (int i = 0; i < number; i++) {\n toFill.add(i + \"\");\n }\n }", "public String getWhiteList0() {\n return getString(\"whitelist.0\");\n }", "public Builder clearOpenWhiteList() {\n openWhiteList_ = com.google.protobuf.LazyStringArrayList.EMPTY;\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n return this;\n }", "public Builder addAllOpenWhiteList(\n java.lang.Iterable<java.lang.String> values) {\n ensureOpenWhiteListIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, openWhiteList_);\n onChanged();\n return this;\n }", "public com.google.protobuf.ByteString\n getOpenWhiteListBytes(int index) {\n return openWhiteList_.getByteString(index);\n }", "public abstract List<C41717j> mo70725h(String str);", "static int getNumPatterns() { return 64; }", "private static void skipSplitAdd(String s, List<String> list) {\n String tmp[] = s.split(\" \");\n\n for (int i = 1; i < tmp.length; i++) {\n list.add(tmp[i]);\n\n // System.out.println(tmp[i]);\n }\n }", "public static void addStars(ArrayList<String> list){\r\n //Loops through the list\r\n for(int i = 1; i < list.size(); i+=2){\r\n list.add(i, \"*\");\r\n }\r\n System.out.println(list);\r\n }", "private void m4676a(List<C0906d> list, StringBuilder sb) {\n if (sb.length() != 0) {\n list.add(new C0906d(C0906d.EnumC0907a.LITERAL, sb.toString()));\n }\n }", "public void setWhiteCounter(int num){\n this.whiteCounter = num;\n }", "StringList createStringList();", "List<C1114c> mo5886k(String str);", "private String genWhiteSpaceRegex(int noOfWhiteSpace,\n String multiWhiteSpace,\n String zeroWhiteSpace) {\n\n return (noOfWhiteSpace == 0) ? zeroWhiteSpace\n : multiWhiteSpace.replace(\"%%\", String.valueOf(noOfWhiteSpace));\n }", "private void generateLists(String num, Stack<String> numberList)\n {\n\tfor(int i = 0, len = num.length(); i < len; i++)\n\t numberList.push(new Character(num.charAt(i)).toString());\n }", "private void exercise5() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> nonDuplicateList;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n nonDuplicateList = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .collect(toList());\n }\n\n nonDuplicateList.forEach(System.out::println);\n }", "void mo100443a(List<String> list);", "ListString createListString();", "List<Log> mo13160a(String str, int i);", "public com.google.protobuf.ProtocolStringList\n getOpenWhiteListList() {\n return openWhiteList_.getUnmodifiableView();\n }", "public static void main(String[] args) { String s = \"catsanddog\";\n// List<String> wordDict = new ArrayList<>(Arrays.asList(\"cat\", \"cats\", \"and\", \"sand\", \"dog\"));\n//\n String s = \"pineapplepenappl\";\n List<String> wordDict = new ArrayList<>(Arrays.asList(\"apple\", \"pen\", \"applepen\", \"pine\", \"pineapple\"));\n\n WordBreak140 tmp = new WordBreak140();\n tmp.wordBreak(s, wordDict);\n }", "@Test\n public void repeatedSubstringPattern() {\n assertTrue(new Solution1().repeatedSubstringPattern(\"abcabcabcabc\"));\n }", "@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }", "private static List<String> testStringGenerator(List<String> palString) {\n\t\tList<String> list = new ArrayList<>();\n\t\tfor (String pal : palString) {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor (int i = 0; i < 10; i++) {\n\t\t\t\tsb.append(pal);\n\t\t\t\tfor (int j = 0; j < pal.length(); j++) {\n\t\t\t\t\tsb.append(j % 10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(sb.toString());\n\t\t}\n\t\treturn list;\n\t}", "public static void makeBlanks(char[] list) {\n\t\tfor (int i = 0; i < list.length; i++) {\n\t\t\tlist[i] = '*';\n\t\t}\n\t}", "public int selectOriginalTokens (Scanner scan, String [] list){\n \n int count = 0;\n while(scan.hasNext()){\n String line = scan.nextLine();\n String[] t = line.split(\"[ \\n\\t\\r.,:?)({}\\\\[\\\\]]\");\n for (int i = 0; i < t.length; i++){\n String item = t[i].trim();\n if(item.length() > 0){\n list[count] = item;\n count++;\n }//End if statement\n }//End for loop\n }//End while loop\n \n return count;\n }", "private String whiteSpace(String sum, String num)\n {\n\tString space = \"\";\n\tfor(int i = 0; i < sum.length() - num.length(); i++)\n\t space += \" \";\n\treturn space;\n }", "void mo54419a(List<String> list);", "List<C1113b> mo5874b(String str);", "public static List<String> stringList() {\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.add(\"abdxxx\");\n\t\tlist.add(\"xxxxx\");\n\t\tlist.add(\"hi\");\n\t\tlist.add(\"SmoothStack\");\n\t\tlist.add(\"Wyatt x Wyatt x\");\n\t\treturn list;\n\t}", "private static String[] resetStringArray() {\n String[] st = new String[L_MAX];\n L = 2 << 8;\n W = 9;\n int i;\n // initialize symbol table with all 1-character strings\n for (i = 0; i < R; i++)\n st[i] = \"\" + (char) i;\n st[i++] = \"\"; // (unused) lookahead for EOF\n return st;\n }", "public void setUp2( )\n\t{\n\t\tfor( int i = 0; i < 1000; i++ )\n\t\t{\n\t\t\tlista.append( \"\" + i );\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tList<Character>st1=new ArrayList<>();\n\t\n\t\tst1.add('a');\n\t\tst1.add('b');\n\t\tst1.add('a');\n\t\tst1.add('a');\n\t\tst1.add('c');\n\t\tst1.add('t');\n\t\n\t\tSystem.out.println(st1);//[a, b, a, a, c, t]\n\t\t\n\t\tList<Character>st2=new ArrayList<>();//empty []\n\t\tfor (int i=0; i<st1.size();i++) {\n\t\t\tif(!st2.contains(st1.get(i))) {\n\t\t\t\t// created str2 [empty], we will get the element from st1 to st2 while checking if there is repetition \n\t\t\t\tst2.add(st1.get(i));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(st2);//[a, b, c, t]\n\t\t\n\n\t}", "private void many(Set<String> s) {\n\t\twhile (!done() && s.contains(program.charAt(pos)+\"\"))\n\t\t\tpos++;\n }", "private static String createPrepStmPlaceHolder(int num) {\n\t\tchar[] c_ar = new char[num*3];\n\t\tc_ar[0] = '(';\n\t\tc_ar[1] = '?';\n\t\tfor(int i=1; i<num; ++i) {\n\t\t\tc_ar[3*i-1] = ',';\n\t\t\tc_ar[3*i] = ' ';\n\t\t\tc_ar[3*i+1] = '?';\n\t\t}\n\t\tc_ar[3*num-1] = ')';\n\t\treturn new String(c_ar);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_2() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\", false), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "private void exercise1() {\n final List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerList = list.stream()\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }", "private static String repeatSpace(int number) {\n StringBuilder space = new StringBuilder();\n\n // Adding spaces.\n for (int i = 0; i < number; i++) {\n space.append(\" \");\n }\n\n //returning spaces.\n return space.toString();\n }", "public void mo88640a(List<String> list) {\n List<String> stringList = RxPreferences.INSTANCE.getStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), new ArrayList());\n stringList.addAll(0, list);\n RxPreferences.INSTANCE.putStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), (List) StreamSupport.m150134a(stringList).mo131128a(new AbstractC32239o(new HashSet(stringList)) {\n /* class com.zhihu.android.p1480db.fragment.customview.C18240x255e53c2 */\n private final /* synthetic */ HashSet f$0;\n\n {\n this.f$0 = r1;\n }\n\n @Override // java8.util.p2234b.AbstractC32239o\n public final boolean test(Object obj) {\n return DbEditorSuggestTagCustomView.m93354a(this.f$0, (String) obj);\n }\n }).mo131126a(5).mo131125a(Collectors.m150203a($$Lambda$ofunvu1bqmYbfXGEtxXaV_csE4M.INSTANCE)));\n }", "public Builder addOpenWhiteListBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n ensureOpenWhiteListIsMutable();\n openWhiteList_.add(value);\n onChanged();\n return this;\n }", "@Test\n public void noSpacesBetweenKeywordsTest() {\n tester.yields(\"LaLaLaLaLaaaLi\", lala.EXPRESSION);\n }", "private int skipLeadingWhite( List content, int start) {\r\n if (start < 0) {\r\n start = 0;\r\n }\r\n\r\n int index = start;\r\n int size = content.size();\r\n if (currentFormat.trimAllWhite\r\n || currentFormat.textNormalize\r\n || currentFormat.textTrim) {\r\n while( index < size) {\r\n if ( !isAllWhitespace( content.get(index))) {\r\n return index;\r\n }\r\n index++;\r\n }\r\n }\r\n return index;\r\n }", "private void initWhitespace(Set<String> s) {\n\t\ts.add(\" \");\n\t\ts.add(\"\\n\");\n\t\ts.add(\"\\t\");\n }", "List<C1111j> mo5869a(int i);", "private void appendPlaceHolder(StringBuilder builder, int indent, int consecutiveExcluded, String message) {\n indent(builder, indent);\n builder.append(ELLIPSIS)\n .append(\" \")\n .append(consecutiveExcluded)\n .append(\" \")\n .append(message)\n .append(CoreConstants.LINE_SEPARATOR);\n }", "public void visiualizeSkipList(){\r\n\t\tint number=0;\r\n\t\tNode dummy = sl.getFrom(0,0);\r\n\t\t\r\n\t\tNode next;\r\n\t\tfor(int i=sl.height(); i>=0; i--){\r\n\t\t\t\r\n\t\t\tnext = sl.getFrom(i,0);\r\n\t\t\t\r\n\t\t\tfor(int j=0; j<(sl.size()+2); j++){\r\n\r\n\t\t\t\tnumber = next.getKey();\r\n\t\t\t\t//F.p(number);\r\n\t\t\t\tif(number==dummy.getKey()){\r\n\r\n\t\t\t\t\tif(number==minf)\r\n\t\t\t\t\t\tSystem.out.print(\"-inf\");\r\n\t\t\t\t\telse if(number==inf)\r\n\t\t\t\t\t\tSystem.out.print(\"---inf\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(\"-\",2)+number);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(\"-\",4));\r\n\t\t\t\t\r\n\t\t\t\tif(dummy.getKey()==number)\r\n\t\t\t\t\tnext = next.getRight();\r\n\t\t\t\t\r\n\t\t\t\tdummy = dummy.getRight();\r\n\t\t\t}\r\n\t\t\tdummy = sl.getFrom(0,0);\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "public long getWhiteSpacesCount() {\n return whiteSpacesCount;\n }", "@Test\n\tpublic void testStartingIndicesRegression(){\n\t\tassertLeftmostStartingIndices(\"5,1,7,3,2|-..xxx$1..x...xxx$3....-xx........\", 0, 6, 8, 18, 22);\n\t\tassertRightmostStartingIndices(\"7,5|.......xxx$1....xxx$2..-\", 6, 14);\n\t\t\n\t}", "public MacroList() {\n\t\tthis.macrosses = new HashMap<Integer, String>(12);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_1() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\"), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n String s=\"a /*a*/ sd /*v*/\";\n Pattern p = Pattern.compile(\"(\\\\/\\\\*(\\\\w|\\r\\n)+\\\\*\\\\/)\");\n Matcher m = p.matcher(s);\n List<String> l = new ArrayList<>(100);\n\n while (m.find()) {\n System.out.println(\"tick\");\n l.add(s.substring(m.start()+2, m.end()-2));\n }\n\n System.out.println(l);\n }", "StringPatternCounter(ArrayList<StringPattern> stringPatternList, String fileInput)\n {\n super(fileInput);\n this.stringPatternList = stringPatternList;\n }", "@Before\n public void createString(){\n s1 = \"casa\";\n\ts2 = \"cassa\";\n\ts3 = \"\";\n\ts4 = \"casa\";\n }", "public String minRemoveToMakeValid(String s) {\n int openAvail = 0;\n Set<Integer> skipSet = new HashSet<>();\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) == ')') {\n if (openAvail == 0) {\n skipSet.add(i);\n } else {\n openAvail -= 1;\n }\n } else if (s.charAt(i) == '(') {\n openAvail += 1;\n }\n }\n\n int closedAvail = 0;\n for (int i = s.length() - 1; i >= 0; i--) {\n if (s.charAt(i) == ')') {\n closedAvail += 1;\n } else if (s.charAt(i) == '(') {\n if (closedAvail == 0) {\n skipSet.add(i);\n } else {\n closedAvail -= 1; \n }\n }\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < s.length(); i++) {\n if (!skipSet.contains(i)){\n sb.append(s.charAt(i));\n }\n }\n return sb.toString();\n }", "@Test(timeout = 4000)\n public void test20() throws Throwable {\n StringReader stringReader0 = new StringReader(\"0(Hu\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer2 = new StreamTokenizer(stringReader0);\n JSTerm jSTerm0 = new JSTerm(streamTokenizer0);\n stringReader0.reset();\n StreamTokenizer streamTokenizer3 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer4 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer5 = new StreamTokenizer(stringReader0);\n streamTokenizer0.commentChar((-4));\n StreamTokenizer streamTokenizer6 = new StreamTokenizer(stringReader0);\n streamTokenizer6.ordinaryChars((-1), (-322070664));\n streamTokenizer1.parseNumbers();\n jSTerm0.add((Object) \"JSTerm: Error reading control parameters: \");\n StreamTokenizer streamTokenizer7 = new StreamTokenizer(stringReader0);\n streamTokenizer7.pushBack();\n streamTokenizer1.nextToken();\n StreamTokenizer streamTokenizer8 = new StreamTokenizer(stringReader0);\n streamTokenizer2.slashSlashComments(false);\n JSTerm jSTerm1 = new JSTerm(streamTokenizer5);\n streamTokenizer1.slashStarComments(false);\n streamTokenizer3.eolIsSignificant(false);\n streamTokenizer7.commentChar((-4));\n StreamTokenizer streamTokenizer9 = new StreamTokenizer(stringReader0);\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n jSSubstitution0.listIterator();\n JSSubstitution jSSubstitution1 = jSTerm1.matches((JSPredicateForm) jSTerm0, jSSubstitution0);\n assertTrue(jSSubstitution1.fail());\n }", "public Removalstops()\n {\n stopWords.add(\"am\");\n stopWords.add(\"my\");\nstopWords.add(\"at\");\nstopWords.add(\"a\");\nstopWords.add(\"i\");\nstopWords.add(\"is\");\nstopWords.add(\"of\");\nstopWords.add(\"have\");\nstopWords.add(\"--\");\nstopWords.add(\"do\");\nstopWords.add(\"the\");\nstopWords.add(\"was\");\nstopWords.add(\"iam\");\nstopWords.add(\"there\");\nstopWords.add(\"what\");\nstopWords.add(\"for\");\nstopWords.add(\"in\");\nstopWords.add(\"very\");\nstopWords.add(\"and\");\nstopWords.add(\"to\");\nstopWords.add(\"often\");\nstopWords.add(\"because\");\nstopWords.add(\"in\");\nstopWords.add(\"an\");\nstopWords.add(\"can\");\nstopWords.add(\"via\");\nstopWords.add(\"even\");\nstopWords.add(\"as\");\nstopWords.add(\"best\");\nstopWords.add(\"been\");\nstopWords.add(\"into\");\nstopWords.add(\"by\");\nstopWords.add(\"around\");\nstopWords.add(\"being\");\nstopWords.add(\"from\");\nstopWords.add(\"etc\");\nstopWords.add(\"his\");\nstopWords.add(\"do\");\nstopWords.add(\"have\");\nstopWords.add(\"had\"); \nstopWords.add(\"able\");\nstopWords.add(\"about\");\nstopWords.add(\"above\");\nstopWords.add(\"abroad\");\nstopWords.add(\"according\");\nstopWords.add(\"accordingly\");\nstopWords.add(\"across\");\nstopWords.add(\"actually\");\nstopWords.add(\"adj\");\nstopWords.add(\"after\");\nstopWords.add(\"afterwards\");\nstopWords.add(\"again\");\nstopWords.add(\"against\");\nstopWords.add(\"ago\");\nstopWords.add(\"ahead\");\nstopWords.add(\"ain't\");\nstopWords.add(\"all\");\nstopWords.add(\"allow\");\nstopWords.add(\"allows\");\nstopWords.add(\"almost\");\nstopWords.add(\"alone\");\nstopWords.add(\"along\");\nstopWords.add(\"alongside\");\nstopWords.add(\"already\");\nstopWords.add(\"also\");\nstopWords.add(\"although\");\nstopWords.add(\"always\");\nstopWords.add(\"am\");\nstopWords.add(\"amid\");\nstopWords.add(\"amidst\");\nstopWords.add(\"among\");\nstopWords.add(\"amongst\");\nstopWords.add(\"an\");\nstopWords.add(\"and\");\nstopWords.add(\"another\");\nstopWords.add(\"any\");\nstopWords.add(\"anybody\");\nstopWords.add(\"anyhow\");\nstopWords.add(\"anyone\");\nstopWords.add(\"anything\");\nstopWords.add(\"anyway\");\nstopWords.add(\"anyways\");\nstopWords.add(\"anywhere\");\nstopWords.add(\"apart\");\nstopWords.add(\"appear\");\nstopWords.add(\"appreciate\");\nstopWords.add(\"appropriate\");\nstopWords.add(\"are\");\nstopWords.add(\"aren't\");\nstopWords.add(\"around\");\nstopWords.add(\"as\");\nstopWords.add(\"a's\");\nstopWords.add(\"aside\");\nstopWords.add(\"ask\");\nstopWords.add(\"asking\");\nstopWords.add(\"associated\");\nstopWords.add(\"at\");\nstopWords.add(\"available\");\nstopWords.add(\"away\");\nstopWords.add(\"awfully\");\nstopWords.add(\"back\");\nstopWords.add(\"backward\");\nstopWords.add(\"backwards\");\nstopWords.add(\"be\");\nstopWords.add(\"became\");\nstopWords.add(\"beacause\");\nstopWords.add(\"become\");\nstopWords.add(\"becomes\");\nstopWords.add(\"becoming\");\nstopWords.add(\"been\");\nstopWords.add(\"before\");\nstopWords.add(\"beforehand\");\nstopWords.add(\"begin\");\nstopWords.add(\"behind\");\nstopWords.add(\"being\");\nstopWords.add(\"believe\");\nstopWords.add(\"below\");\nstopWords.add(\"beside\");\nstopWords.add(\"besides\");\nstopWords.add(\"best\");\nstopWords.add(\"better\");\nstopWords.add(\"between\");\nstopWords.add(\"beyond\");\nstopWords.add(\"both\");\nstopWords.add(\"brief\");\nstopWords.add(\"but\");\nstopWords.add(\"by\");\nstopWords.add(\"came\");\nstopWords.add(\"can\");\nstopWords.add(\"cannot\");\nstopWords.add(\"cant\");\nstopWords.add(\"can't\");\nstopWords.add(\"caption\");\nstopWords.add(\"cause\");\nstopWords.add(\"causes\");\nstopWords.add(\"certain\");\nstopWords.add(\"cetrainly\");\nstopWords.add(\"changes\");\nstopWords.add(\"clearly\");\nstopWords.add(\"c'mon\");\nstopWords.add(\"co\");\nstopWords.add(\"co.\");\nstopWords.add(\"com\");\nstopWords.add(\"come\");\nstopWords.add(\"comes\");\nstopWords.add(\"concerning\");\nstopWords.add(\"consequently\");\nstopWords.add(\"consider\");\nstopWords.add(\"considering\");\nstopWords.add(\"could\");\nstopWords.add(\"couldn't\");\nstopWords.add(\"c's\");\nstopWords.add(\"currently\");\nstopWords.add(\"dare\");\nstopWords.add(\"daren't\");\nstopWords.add(\"definitely\");\nstopWords.add(\"described\");\nstopWords.add(\"despite\");\nstopWords.add(\"did\");\nstopWords.add(\"didn't\");\nstopWords.add(\"different\");\nstopWords.add(\"directly\");\nstopWords.add(\"do\");\nstopWords.add(\"does\");\nstopWords.add(\"doesn't\");\nstopWords.add(\"doing\");\nstopWords.add(\"done\");\nstopWords.add(\"don't\");\nstopWords.add(\"down\");\nstopWords.add(\"downwards\");\nstopWords.add(\"during\");\nstopWords.add(\"each\");\nstopWords.add(\"edu\");\nstopWords.add(\"eg\");\nstopWords.add(\"eight\");\nstopWords.add(\"eighty\");\nstopWords.add(\"either\");\nstopWords.add(\"else\");\nstopWords.add(\"elsewhere\");\nstopWords.add(\"end\");\nstopWords.add(\"ending\");\nstopWords.add(\"enough\");\nstopWords.add(\"entirely\");\nstopWords.add(\"especially\");\nstopWords.add(\"et\");\nstopWords.add(\"etc\");\nstopWords.add(\"even\");\nstopWords.add(\"evenmore\");\nstopWords.add(\"every\");\nstopWords.add(\"everybody\");\nstopWords.add(\"everyone\");\nstopWords.add(\"everything\");\nstopWords.add(\"everywhere\");\nstopWords.add(\"ex\");\nstopWords.add(\"exactly\");\nstopWords.add(\"example\");\nstopWords.add(\"except\");\nstopWords.add(\"fairly\");\nstopWords.add(\"far\");\nstopWords.add(\"farhter\");\nstopWords.add(\"few\");\nstopWords.add(\"fewer\");\nstopWords.add(\"fifth\");\nstopWords.add(\"first\");\nstopWords.add(\"five\");\nstopWords.add(\"followed\");\nstopWords.add(\"following\");\nstopWords.add(\"follows\");\nstopWords.add(\"for\");\nstopWords.add(\"forever\");\nstopWords.add(\"former\");\nstopWords.add(\"formerly\");\nstopWords.add(\"forth\");\nstopWords.add(\"forward\");\nstopWords.add(\"found\");\nstopWords.add(\"four\");\nstopWords.add(\"from\");\nstopWords.add(\"further\");\nstopWords.add(\"furthermore\");\nstopWords.add(\"get\");\nstopWords.add(\"gets\");\nstopWords.add(\"getting\");\nstopWords.add(\"given\");\nstopWords.add(\"gives\");\nstopWords.add(\"go\");\nstopWords.add(\"goes\");\nstopWords.add(\"going\");\nstopWords.add(\"gone\");\nstopWords.add(\"got\");\nstopWords.add(\"gotten\");\nstopWords.add(\"greetings\");\nstopWords.add(\"had\");\nstopWords.add(\"hadn't\");\nstopWords.add(\"half\");\nstopWords.add(\"happens\");\nstopWords.add(\"hardly\");\nstopWords.add(\"has\");\nstopWords.add(\"hasn't\");\nstopWords.add(\"have\");\nstopWords.add(\"haven't\");\nstopWords.add(\"having\");\nstopWords.add(\"he\");\nstopWords.add(\"he'd\");\nstopWords.add(\"he'll\");\nstopWords.add(\"hello\");\nstopWords.add(\"help\");\nstopWords.add(\"hence\");\nstopWords.add(\"her\");\nstopWords.add(\"here\");\nstopWords.add(\"hereafter\");\nstopWords.add(\"hereby\");\nstopWords.add(\"herein\");\nstopWords.add(\"here's\");\nstopWords.add(\"hereupon\");\nstopWords.add(\"hers\");\nstopWords.add(\"herself\");\nstopWords.add(\"he's\");\nstopWords.add(\"hi\");\nstopWords.add(\"him\");\nstopWords.add(\"himself\");\nstopWords.add(\"his\");\nstopWords.add(\"hither\");\nstopWords.add(\"hopefully\");\nstopWords.add(\"how\");\nstopWords.add(\"howbeit\");\nstopWords.add(\"however\");\nstopWords.add(\"however\");\nstopWords.add(\"hundred\");\nstopWords.add(\"i'd\");\nstopWords.add(\"ie\");\nstopWords.add(\"if\");\nstopWords.add(\"ignored\");\nstopWords.add(\"i'll\");\nstopWords.add(\"i'm\");\nstopWords.add(\"immediate\");\nstopWords.add(\"in\");\nstopWords.add(\"iansmuch\");\nstopWords.add(\"inc\");\nstopWords.add(\"inc.\");\nstopWords.add(\"indeed\");\nstopWords.add(\"indicate\");\nstopWords.add(\"indicated\");\nstopWords.add(\"indicates\");\nstopWords.add(\"inner\");\nstopWords.add(\"inside\");\nstopWords.add(\"insofar\");\nstopWords.add(\"into\");\nstopWords.add(\"inward\");\nstopWords.add(\"is\");\nstopWords.add(\"isn't\");\nstopWords.add(\"it\");\nstopWords.add(\"it'd\");\nstopWords.add(\"it'll\");\nstopWords.add(\"its\");\nstopWords.add(\"it's\");\nstopWords.add(\"itself\");\nstopWords.add(\"i've\");\nstopWords.add(\"just\");\nstopWords.add(\"k\");\nstopWords.add(\"keep\");\nstopWords.add(\"keeps\");\nstopWords.add(\"kept\");\nstopWords.add(\"know\");\nstopWords.add(\"knows\");\nstopWords.add(\"known\");\nstopWords.add(\"last\");\nstopWords.add(\"lately\");\nstopWords.add(\"later\");\nstopWords.add(\"latter\");\nstopWords.add(\"latterly\");\nstopWords.add(\"least\");\nstopWords.add(\"less\");\nstopWords.add(\"let\");\nstopWords.add(\"let's\");\nstopWords.add(\"like\");\nstopWords.add(\"liked\");\nstopWords.add(\"likely\");\nstopWords.add(\"likewise\");\nstopWords.add(\"little\");\nstopWords.add(\"look\");\nstopWords.add(\"looks\");\nstopWords.add(\"low\");\nstopWords.add(\"lower\");\nstopWords.add(\"ltd\");\nstopWords.add(\"made\");\nstopWords.add(\"mainly\");\nstopWords.add(\"make\");\nstopWords.add(\"makes\");\nstopWords.add(\"many\");\nstopWords.add(\"may\");\nstopWords.add(\"maybe\");\nstopWords.add(\"mayn't\");\nstopWords.add(\"me\");\nstopWords.add(\"mean\");\nstopWords.add(\"meanwhile\");\nstopWords.add(\"merely\");\nstopWords.add(\"might\");\nstopWords.add(\"mightn't\");\nstopWords.add(\"mine\");\nstopWords.add(\"minus\");\nstopWords.add(\"miss\");\nstopWords.add(\"more\");\nstopWords.add(\"moreover\");\nstopWords.add(\"most\");\nstopWords.add(\"mostly\");\nstopWords.add(\"mr\");\nstopWords.add(\"mrs\");\nstopWords.add(\"much\");\nstopWords.add(\"must\");\nstopWords.add(\"mustn't\");\nstopWords.add(\"my\");\nstopWords.add(\"myself\");\nstopWords.add(\"name\");\nstopWords.add(\"namely\");\nstopWords.add(\"nd\");\nstopWords.add(\"near\");\nstopWords.add(\"nearly\");\nstopWords.add(\"necessary\");\nstopWords.add(\"need\");\nstopWords.add(\"needn't\");\nstopWords.add(\"needs\");\nstopWords.add(\"neither\");\nstopWords.add(\"never\");\nstopWords.add(\"neverf\");\nstopWords.add(\"neverless\");\nstopWords.add(\"nevertheless\");\nstopWords.add(\"new\");\nstopWords.add(\"next\");\nstopWords.add(\"nine\");\nstopWords.add(\"ninety\");\nstopWords.add(\"no\");\nstopWords.add(\"nobody\");\nstopWords.add(\"non\");\nstopWords.add(\"none\");\nstopWords.add(\"nonetheless\");\nstopWords.add(\"noone\");\nstopWords.add(\"no-one\");\nstopWords.add(\"nor\");\nstopWords.add(\"normally\");\nstopWords.add(\"not\");\nstopWords.add(\"nothing\");\nstopWords.add(\"notwithstanding\");\nstopWords.add(\"novel\");\nstopWords.add(\"now\");\nstopWords.add(\"nowwhere\");\nstopWords.add(\"obviously\");\nstopWords.add(\"of\");\nstopWords.add(\"off\");\nstopWords.add(\"often\");\nstopWords.add(\"oh\");\nstopWords.add(\"ok\");\nstopWords.add(\"okay\");\nstopWords.add(\"old\");\nstopWords.add(\"on\");\nstopWords.add(\"once\");\nstopWords.add(\"one\");\nstopWords.add(\"ones\");\nstopWords.add(\"one's\");\nstopWords.add(\"only\");\nstopWords.add(\"onto\");\nstopWords.add(\"opposite\");\nstopWords.add(\"or\");\nstopWords.add(\"other\");\nstopWords.add(\"others\");\nstopWords.add(\"otherwise\");\nstopWords.add(\"ought\");\nstopWords.add(\"oughtn't\");\nstopWords.add(\"our\");\nstopWords.add(\"ourselves\");\nstopWords.add(\"out\");\nstopWords.add(\"outside\");\nstopWords.add(\"over\");\nstopWords.add(\"overall\");\nstopWords.add(\"own\");\nstopWords.add(\"particular\");\nstopWords.add(\"particularly\");\nstopWords.add(\"past\");\nstopWords.add(\"per\");\nstopWords.add(\"perhaps\");\nstopWords.add(\"placed\");\nstopWords.add(\"please\");\nstopWords.add(\"plus\");\nstopWords.add(\"possible\");\nstopWords.add(\"presumably\");\nstopWords.add(\"probably\");\nstopWords.add(\"provided\");\nstopWords.add(\"provides\");\nstopWords.add(\"que\");\nstopWords.add(\"quite\");\nstopWords.add(\"qv\");\nstopWords.add(\"rather\");\nstopWords.add(\"rd\");\nstopWords.add(\"re\");\nstopWords.add(\"really\");\nstopWords.add(\"reasonably\");\nstopWords.add(\"recent\");\nstopWords.add(\"recently\");\nstopWords.add(\"regarding\");\nstopWords.add(\"regardless\");\nstopWords.add(\"regards\");\nstopWords.add(\"relatively\");\nstopWords.add(\"respectively\");\nstopWords.add(\"right\");\nstopWords.add(\"round\");\nstopWords.add(\"said\");\nstopWords.add(\"same\");\nstopWords.add(\"saw\");\nstopWords.add(\"say\");\nstopWords.add(\"saying\");\nstopWords.add(\"says\");\nstopWords.add(\"second\");\nstopWords.add(\"secondly\");\nstopWords.add(\"see\");\nstopWords.add(\"seeing\");\nstopWords.add(\"seem\");\nstopWords.add(\"seemed\");\nstopWords.add(\"seeming\");\nstopWords.add(\"seems\");\nstopWords.add(\"seen\");\nstopWords.add(\"self\");\nstopWords.add(\"selves\");\nstopWords.add(\"sensible\");\nstopWords.add(\"sent\");\nstopWords.add(\"serious\");\nstopWords.add(\"seriously\");\nstopWords.add(\"seven\");\nstopWords.add(\"several\");\nstopWords.add(\"shall\");\nstopWords.add(\"shan't\");\nstopWords.add(\"she\");\nstopWords.add(\"she'd\");\nstopWords.add(\"she'll\");\nstopWords.add(\"she's\");\nstopWords.add(\"should\");\nstopWords.add(\"shouldn't\");\nstopWords.add(\"since\");\nstopWords.add(\"six\");\nstopWords.add(\"so\");\nstopWords.add(\"some\");\nstopWords.add(\"somebody\");\nstopWords.add(\"someday\");\nstopWords.add(\"somehow\");\nstopWords.add(\"someone\");\nstopWords.add(\"something\");\nstopWords.add(\"sometime\");\nstopWords.add(\"sometimes\");\nstopWords.add(\"somewhat\");\nstopWords.add(\"somewhere\");\nstopWords.add(\"soon\");\nstopWords.add(\"sorry\");\nstopWords.add(\"specified\");\nstopWords.add(\"specify\");\nstopWords.add(\"specifying\");\nstopWords.add(\"still\");\nstopWords.add(\"sub\");\nstopWords.add(\"such\");\nstopWords.add(\"sup\");\nstopWords.add(\"sure\");\nstopWords.add(\"take\");\nstopWords.add(\"taken\");\nstopWords.add(\"taking\");\nstopWords.add(\"tell\");\nstopWords.add(\"tends\");\nstopWords.add(\"th\");\nstopWords.add(\"than\");\nstopWords.add(\"thank\");\nstopWords.add(\"thanks\");\nstopWords.add(\"thanx\");\nstopWords.add(\"that\");\nstopWords.add(\"that'll\");\nstopWords.add(\"thats\");\nstopWords.add(\"that've\");\nstopWords.add(\"the\");\nstopWords.add(\"their\");\nstopWords.add(\"theirs\");\nstopWords.add(\"them\");\nstopWords.add(\"themselves\");\nstopWords.add(\"then\");\nstopWords.add(\"thence\");\nstopWords.add(\"there\");\nstopWords.add(\"thereafter\");\nstopWords.add(\"thereby\");\nstopWords.add(\"there'd\");\nstopWords.add(\"therefore\");\nstopWords.add(\"therein\");\nstopWords.add(\"ther'll\");\nstopWords.add(\"there're\");\nstopWords.add(\"theres\");\nstopWords.add(\"there's\");\nstopWords.add(\"thereupon\");\nstopWords.add(\"there've\");\nstopWords.add(\"these\");\nstopWords.add(\"they\");\nstopWords.add(\"they'd\");\nstopWords.add(\"they'll\");\nstopWords.add(\"they're\");\nstopWords.add(\"they've\");\nstopWords.add(\"thing\");\nstopWords.add(\"things\");\nstopWords.add(\"think\");\nstopWords.add(\"third\");\nstopWords.add(\"thirty\");\nstopWords.add(\"this\");\nstopWords.add(\"thorough\");\nstopWords.add(\"thoroughly\");\nstopWords.add(\"those\");\nstopWords.add(\"though\");\nstopWords.add(\"throughout\");\nstopWords.add(\"thru\");\nstopWords.add(\"thus\");\nstopWords.add(\"till\");\nstopWords.add(\"to\");\nstopWords.add(\"together\");\nstopWords.add(\"too\");\nstopWords.add(\"took\");\nstopWords.add(\"toward\");\nstopWords.add(\"towards\");\nstopWords.add(\"tried\");\nstopWords.add(\"tries\");\nstopWords.add(\"truly\");\nstopWords.add(\"try\");\nstopWords.add(\"trying\");\nstopWords.add(\"t's\");\nstopWords.add(\"twice\");\nstopWords.add(\"two\");\nstopWords.add(\"un\");\nstopWords.add(\"under\");\nstopWords.add(\"underneath\");\nstopWords.add(\"undoing\");\nstopWords.add(\"unfortunately\");\nstopWords.add(\"unless\");\nstopWords.add(\"unlike\");\nstopWords.add(\"unlikely\");\nstopWords.add(\"untill\");\nstopWords.add(\"unto\");\nstopWords.add(\"up\");\nstopWords.add(\"upon\");\nstopWords.add(\"upwards\");\nstopWords.add(\"us\");\nstopWords.add(\"use\");\nstopWords.add(\"used\");\nstopWords.add(\"useful\");\nstopWords.add(\"uses\");\nstopWords.add(\"using\");\nstopWords.add(\"usually\");\nstopWords.add(\"v\");\nstopWords.add(\"value\");\nstopWords.add(\"various\");\nstopWords.add(\"versus\");\nstopWords.add(\"very\");\nstopWords.add(\"via\");\nstopWords.add(\"viz\");\nstopWords.add(\"vs\");\nstopWords.add(\"want\");\nstopWords.add(\"wants\");\nstopWords.add(\"was\");\nstopWords.add(\"wasn't\");\nstopWords.add(\"way\");\nstopWords.add(\"we\");\nstopWords.add(\"we'd\");\nstopWords.add(\"welcome\");\nstopWords.add(\"well\");\nstopWords.add(\"we'll\");\nstopWords.add(\"went\");\nstopWords.add(\"were\");\nstopWords.add(\"we're\");\nstopWords.add(\"weren't\");\nstopWords.add(\"we've\");\nstopWords.add(\"what\");\nstopWords.add(\"whatever\");\nstopWords.add(\"what'll\");\nstopWords.add(\"what's\");\nstopWords.add(\"what've\");\nstopWords.add(\"when\");\nstopWords.add(\"whence\");\nstopWords.add(\"whenever\");\nstopWords.add(\"where\");\nstopWords.add(\"whereafter\");\nstopWords.add(\"whereas\");\nstopWords.add(\"whereby\");\nstopWords.add(\"wherein\");\nstopWords.add(\"where's\");\nstopWords.add(\"whereupon\");\nstopWords.add(\"whereever\");\nstopWords.add(\"whether\");\nstopWords.add(\"which\");\nstopWords.add(\"whichever\");\nstopWords.add(\"while\");\nstopWords.add(\"whilst\");\nstopWords.add(\"whither\");\nstopWords.add(\"who\");\nstopWords.add(\"who'd\");\nstopWords.add(\"whoever\");\nstopWords.add(\"whole\");\nstopWords.add(\"who'll\");\nstopWords.add(\"whom\");\nstopWords.add(\"whomever\");\nstopWords.add(\"who's\");\nstopWords.add(\"whose\");\nstopWords.add(\"why\");\nstopWords.add(\"will\");\nstopWords.add(\"willing\");\nstopWords.add(\"wish\");\nstopWords.add(\"with\");\nstopWords.add(\"within\");\nstopWords.add(\"without\");\nstopWords.add(\"wonder\");\nstopWords.add(\"won't\");\nstopWords.add(\"would\");\nstopWords.add(\"wouldn't\");\nstopWords.add(\"yes\");\nstopWords.add(\"yet\");\nstopWords.add(\"you\");\nstopWords.add(\"you'd\");\nstopWords.add(\"you'll\");\nstopWords.add(\"your\");\nstopWords.add(\"you're\");\nstopWords.add(\"yours\");\nstopWords.add(\"yourself\");\nstopWords.add(\"you've\");\nstopWords.add(\"zero\");\n\n \n \n }", "@SuppressWarnings(\"resource\")\n public static void doubleCapacity(String[] array){\n int wordCount = 0;\n int arrayGrowth = 500;\n array = new String[10];\n String strLine = null;\n while (strLine != null) {\n // Store the content into an array\n Scanner s = new Scanner(strLine);\n while (s.hasNext()) {\n if (array.length == wordCount) {\n // expand list\n array = Arrays.copyOf(array, array.length + arrayGrowth);\n }\n array[wordCount] = s.next();\n wordCount++;\n } \n }\n }", "private int skipTrialingWhite( List content, int start) {\r\n int size = content.size();\r\n if (start > size) {\r\n start = size;\r\n }\r\n\r\n int index = start;\r\n if (currentFormat.trimAllWhite\r\n || currentFormat.textNormalize\r\n || currentFormat.textTrim) {\r\n while( index >= 0) {\r\n if ( !isAllWhitespace( content.get(index - 1)))\r\n break;\r\n --index;\r\n }\r\n }\r\n return index;\r\n }", "public abstract void mo9247b(String str, long j, List<String> list);", "private void fillSet() {\r\n\t\tString regex = \"\\\\p{L}+\";\r\n\t\tMatcher matcher = Pattern.compile(regex).matcher(body);\r\n\t\twhile (matcher.find()) {\r\n\t\t\tif (!matcher.group().isEmpty()) {\r\n\t\t\t\twords.add(matcher.group());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private ArrayList<Integer> getEmptySpaces(char[] board) {\n ArrayList<Integer> emptySpaces = new ArrayList<>();\n for (int i = 0; i < board.length; i++) {\n if (board[i] == ' ') {\n emptySpaces.add(i);\n }\n }\n return emptySpaces;\n }", "void mo13370a(int i, int i2, List<C15929a> list) throws IOException;", "private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }", "private static Stream<List<Tile>> substituteBlanks(List<Tile> p) {\n Stream<List<Tile>> res = Stream.of(p);\n //Iterate through all letters.\n for (int i = 0; i < p.size(); i++) {\n //Check for blanks.\n if (p.get(i).getLetter() == Character.MIN_VALUE) {\n //If blank found, substitute it for all a-z, and look again for next blank.\n res = substituteBlankAtIndex(p, i)\n .flatMap(s -> substituteBlanks(s));\n }\n }\n\n return res;\n }", "public static void main(String[] args) {\n String[] strings = new String[100];\n for (int i = 0; i < strings.length; i++) {\n strings[i] = randomStrings(2);\n }\n// for (String s : strings) {\n// System.out.println(s);\n// }\n ArrayList<String> appeared = new ArrayList<>();\n for (String s : strings) {\n if (!appeared.contains(s)) {\n appeared.add(s);\n }\n }\n System.out.println(appeared.size());\n\n }", "private IgnoreListHelper() {\n\t}", "@Test\n\t public void test5 ()\n\t{\n\t\t\tString s = new String(\"aaabaaaaabaabaaaabaaaaaaaaaaaaaabaaaaaaaaaaaaaaabaaaaaaaaaaaaaaba\");\n\t s = s.replaceAll(\"\\\\s+\", \" \");\n\t assertEquals(\"aaaaaaaaaaaaaabaaaaaaaaaaaaaa\", LRS.lrs(s)); \n\t}", "public static List<String> findRepeatedDnaSequences(String s) {\n \tList<String> re=new ArrayList<String>();\n \tif(s.length()<=10){\n \t\treturn re;\n \t}\n \tMap<String, Integer> map=new HashMap<String, Integer>(); \t\n \tfor(int i=10; i<=s.length(); i++){\n \t\tString k=s.substring(i-10, i);\n \t\tif(map.containsKey(k)){\n \t\t\tint val=map.get(k);\n \t\t\tif(val==1){\n \t\t\t\tre.add(k);\n \t\t\t}\n \t\t\tmap.put(k, val+1);\n \t\t}else{\n \t\t\tmap.put(k, 1);\n \t\t}\n \t}\n \treturn re;\n }", "public static void main(){\r\n\t\t\r\n\t\tArrayList<tok> pHolder = new ArrayList<tok>();\r\n\r\n\t\t pHolder.add(new tok(\"@\", \"@\"));\r\n\t\t\r\n\t\treturn;\r\n\t}", "public void mo9497b(List<String> list) {\n this.f1514c = list;\n }", "private void listEntries(BufferedWriter bw, String previous, int start, int end, String zeroes) throws IOException {\n\t\tint writeStart = -1;\n\t\tStringBuilder sb = new StringBuilder();\n\t\tchar c;\n\t\tfor (int i = 0, l = previous.length(); i < l && writeStart == -1; i++) {\n\t\t\tc = previous.charAt(i);\n\t\t\tif (Character.isDigit(c)) {sb.append(c);}\n\t\t\telse {writeStart = Integer.parseInt(sb.toString());}\n\t\t}\n\t\tfor (int i = start; i < end; i++) {bw.write(++writeStart + \"=\" + zeroes + i + \"\\n\");}\n\t}", "public void m20623OooO00o() {\n for (C8964ooOOo000 ooooo000 : this.f22213OooO00o) {\n OooO00o(ooooo000);\n }\n this.f22212OooO00o.clear();\n this.f22213OooO00o.clear();\n }", "public String addWhiteSpace(String str, int number) {\n\t\tStringBuilder result = new StringBuilder();\n\t\tfor (int i = 0; i < str.length(); i+=2) {\n\t\t if (i > 0) {\n\t\t\t for (int j = 0; j < number; j++)\n\t\t\t\t result.append(\" \");\n\t\t }\n\t\t result.append(str.charAt(i));\n\t\t result.append(str.charAt(i+1));\n\t\t}\n\t\treturn result.toString();\n\t}", "public static List<String> findStrobogrammatic(int n) {\n List<String> cur, ans;\n ans = new ArrayList<String>((n & 1) == 0 ? Arrays.asList(\"\") : Arrays.asList(\"0\", \"1\", \"8\"));\n if (n < 2) return ans;\n\n for (;n > 1; n -= 2) {\n cur = ans;\n ans = new ArrayList<String>();\n for (String i : cur) {\n if (n > 3) {\n ans.add('0' + i + '0');\n }\n ans.add('1' + i + '1');\n ans.add('8' + i + '8');\n ans.add('6' + i + '9');\n ans.add('9' + i + '6');\n }\n }\n System.out.println(ans.size());\n return ans;\n }", "private static List<String> induceSynonims(String word) {\n\t\treturn null;\n\t}", "private List<WordScore> liveList(List<WordScore> gridList, String s) {\n s = s.toLowerCase();\n List<WordScore> liveList = new ArrayList<>();\n for(WordScore ws : gridList){\n int nochars = s.length() - s.replaceAll(ws.getWord(), \"\").length();\n liveList.add(new WordScore(ws.getWord(), ws.getScore()-nochars));\n }\n return liveList;\n }", "private void fillRandomList()\n\t{\n\t\trandomList.add(\"I like cheese.\");\n\t\trandomList.add(\"Tortoise can move faster than slow rodent.\");\n\t\trandomList.add(\"I enjoy sitting on the ground.\");\n\t\trandomList.add(\"I like cereal.\");\n\t\trandomList.add(\"This is random.\");\n\t\trandomList.add(\"I like typing\");\n\t\trandomList.add(\"FLdlsjejf is my favorite word.\");\n\t\trandomList.add(\"I have two left toes.\");\n\t\trandomList.add(\"Sqrt(2) = 1.414213562 ...\");\n\t\trandomList.add(\"Hi mom.\");\n\t}", "public static void main(String[] args) {\n\t\tString s=\"22\";\n\t\t\n\t\tif(s.indexOf(\"1\")>=0||s.equals(\"\"))\n\t\t\tSystem.out.println(\"hello\");\n\t\t\t\n\t\tArrayList f=new ArrayList();\n\t\tint stack[]=new int[2*s.length()];\n\t\tint top=-1;\n\t\tchar a[][]=new char[][]{{},{},{'#','a','b','c','#'},{'#','d','e','f','#'},{'#','g','h','i','#'},{'#','j','k','l','#'},{'#','m','n','o','#'},{'#','p','q','r','s','#'},{'#','t','u','v','#'},{'#','w','x','y','z','#'}};\n\t\tint length[]=new int []{0,0,3,3,3,3,3,4,3,4};\n\t\tStringBuilder ans=new StringBuilder();\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tint x=stack[++top]=(int)s.charAt(i)-'0';\n\t\t\tans.append(a[x][1]);\n\t\t\tstack[++top]=1;\n\t\t}\n\t\twhile(stack[1]!=length[(int)s.charAt(0)-'0']+1){\n\t\t\tif(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\tif(s.length()==(top+1)/2){\n\t\t\t\t\twhile(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\t\t\tint r=(top-1)/2;\n\t\t\t\t\t\tchar r1=a[stack[top-1]][stack[top]];\n\t\t\t\t\t\tans.setCharAt(r, r1);\n\t\t\t\t\t\tString ans1=ans.toString();\n\t\t\t\t\t\tf.add(ans1);\n\t\t\t\t\t\tstack[top]++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t\t\ttop+=2;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[top]=1;\n\t\t\t\ttop-=2;\n\t\t\t\tstack[top]++;\n\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(f.size());\n\t}", "private void modify(List listString){\n\t}", "private String repeatM(int count){\n return new String(new char[count]).replace('\\0','M');\n }", "private static void\n eatWhite(ParseState state)\n {\n while(state.pos < state.data.length() && state.data.charAt(state.pos) == ' ')\n {\n ++state.pos;\n }\n }" ]
[ "0.55591595", "0.5524409", "0.54578066", "0.5425202", "0.53757787", "0.5364262", "0.5288061", "0.5286694", "0.52332956", "0.5221815", "0.5211653", "0.5201803", "0.51848924", "0.518454", "0.5178811", "0.51761377", "0.5150973", "0.5141157", "0.5138997", "0.51366293", "0.5130912", "0.51279604", "0.5071481", "0.50682074", "0.50673336", "0.5058374", "0.50503725", "0.5046189", "0.5046023", "0.50277734", "0.50120145", "0.49743384", "0.49513972", "0.49383563", "0.492581", "0.49236417", "0.49056625", "0.48794308", "0.48752907", "0.48583564", "0.4856731", "0.48500034", "0.48222542", "0.48127964", "0.4812774", "0.48096502", "0.48054305", "0.48029843", "0.48021927", "0.4784932", "0.47791797", "0.47657204", "0.47405565", "0.47405225", "0.47390026", "0.47360018", "0.47321254", "0.47301587", "0.47235176", "0.47201622", "0.4720113", "0.4717014", "0.47158983", "0.4708474", "0.4698091", "0.46781585", "0.46772122", "0.46698767", "0.46634603", "0.46624836", "0.46601665", "0.4651289", "0.46146277", "0.4606947", "0.4606018", "0.4604179", "0.45975944", "0.45943204", "0.45926452", "0.45925856", "0.45852026", "0.4583654", "0.45777828", "0.45770383", "0.45763302", "0.4573015", "0.45670146", "0.45669803", "0.4564498", "0.45611578", "0.45599565", "0.45561954", "0.45553017", "0.45483592", "0.45479", "0.45477003", "0.4545243", "0.45429727", "0.45390365", "0.4536908" ]
0.4959684
32
open_white_list repeated string open_white_list = 11;
public Builder setOpenWhiteList( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureOpenWhiteListIsMutable(); openWhiteList_.set(index, value); onChanged(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SList oddWords();", "public java.lang.String getOpenWhiteList(int index) {\n return openWhiteList_.get(index);\n }", "public int getOpenWhiteListCount() {\n return openWhiteList_.size();\n }", "public java.lang.String getOpenWhiteList(int index) {\n return openWhiteList_.get(index);\n }", "public int getOpenWhiteListCount() {\n return openWhiteList_.size();\n }", "private LowercaseWordList() {\n\n }", "static List DuplicateElements(List<Character> characters){\r\n\t\tList newlist=new ArrayList<>();\r\n\t\tfor(char c:characters)\r\n\t\t{\r\n\t\t\tnewlist.add(Collections.nCopies(2,c ));\r\n\t\r\n\t\t}\r\n\tSystem.out.println(newlist);\r\n\treturn newlist;\r\n\t}", "public Builder addOpenWhiteList(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureOpenWhiteListIsMutable();\n openWhiteList_.add(value);\n onChanged();\n return this;\n }", "public static List<String> createCompetencyList() {\n List<String> list = new ArrayList<String>();\n list.add(\"Line number 1\");\n list.add(\"Line number 2\");\n return list;\n }", "private void exercise2() {\n List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerOddLengthList = list.stream()\n .filter((string) -> string.length() % 2 != 0)\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public void setWhiteSpacesCount(long value) {\n this.whiteSpacesCount = value;\n }", "java.util.List<String> getRepeatedStringFieldList();", "List<String> mo5877c(String str);", "private String addRandomSpacing(String originalText) {\n ArrayList<Expression> list = new ArrayList<Expression>();\n\n\t\tclass MyVisitor extends ModifierVisitor<Void> {\n\t\t @Override\n\t\t public Node visit(VariableDeclarator declarator, Void args) {\n\t Expression expression = declarator.getInitializer().get();\n\t \n\t \n\t // We're looking for string.\n\t if (expression instanceof StringLiteralExpr) {\n\t list.add(expression);\n\t }\n\t\t return null;\n\t\t }\n\t\t}\n\t\t\n\t\t\n\t}", "SList evenWords();", "public com.google.protobuf.ProtocolStringList\n getOpenWhiteListList() {\n return openWhiteList_;\n }", "List<String> mo5876c();", "void fillList(List<String> toFill) {\n for (int i = 0; i < number; i++) {\n toFill.add(i + \"\");\n }\n }", "public String getWhiteList0() {\n return getString(\"whitelist.0\");\n }", "public Builder clearOpenWhiteList() {\n openWhiteList_ = com.google.protobuf.LazyStringArrayList.EMPTY;\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n return this;\n }", "public Builder addAllOpenWhiteList(\n java.lang.Iterable<java.lang.String> values) {\n ensureOpenWhiteListIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, openWhiteList_);\n onChanged();\n return this;\n }", "public com.google.protobuf.ByteString\n getOpenWhiteListBytes(int index) {\n return openWhiteList_.getByteString(index);\n }", "public abstract List<C41717j> mo70725h(String str);", "static int getNumPatterns() { return 64; }", "private static void skipSplitAdd(String s, List<String> list) {\n String tmp[] = s.split(\" \");\n\n for (int i = 1; i < tmp.length; i++) {\n list.add(tmp[i]);\n\n // System.out.println(tmp[i]);\n }\n }", "public static void addStars(ArrayList<String> list){\r\n //Loops through the list\r\n for(int i = 1; i < list.size(); i+=2){\r\n list.add(i, \"*\");\r\n }\r\n System.out.println(list);\r\n }", "private void m4676a(List<C0906d> list, StringBuilder sb) {\n if (sb.length() != 0) {\n list.add(new C0906d(C0906d.EnumC0907a.LITERAL, sb.toString()));\n }\n }", "public void setWhiteCounter(int num){\n this.whiteCounter = num;\n }", "StringList createStringList();", "List<C1114c> mo5886k(String str);", "private String genWhiteSpaceRegex(int noOfWhiteSpace,\n String multiWhiteSpace,\n String zeroWhiteSpace) {\n\n return (noOfWhiteSpace == 0) ? zeroWhiteSpace\n : multiWhiteSpace.replace(\"%%\", String.valueOf(noOfWhiteSpace));\n }", "public com.google.protobuf.ByteString\n getOpenWhiteListBytes(int index) {\n return openWhiteList_.getByteString(index);\n }", "private void generateLists(String num, Stack<String> numberList)\n {\n\tfor(int i = 0, len = num.length(); i < len; i++)\n\t numberList.push(new Character(num.charAt(i)).toString());\n }", "private void exercise5() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> nonDuplicateList;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n nonDuplicateList = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .collect(toList());\n }\n\n nonDuplicateList.forEach(System.out::println);\n }", "void mo100443a(List<String> list);", "ListString createListString();", "List<Log> mo13160a(String str, int i);", "public com.google.protobuf.ProtocolStringList\n getOpenWhiteListList() {\n return openWhiteList_.getUnmodifiableView();\n }", "public static void main(String[] args) { String s = \"catsanddog\";\n// List<String> wordDict = new ArrayList<>(Arrays.asList(\"cat\", \"cats\", \"and\", \"sand\", \"dog\"));\n//\n String s = \"pineapplepenappl\";\n List<String> wordDict = new ArrayList<>(Arrays.asList(\"apple\", \"pen\", \"applepen\", \"pine\", \"pineapple\"));\n\n WordBreak140 tmp = new WordBreak140();\n tmp.wordBreak(s, wordDict);\n }", "@Test\n public void repeatedSubstringPattern() {\n assertTrue(new Solution1().repeatedSubstringPattern(\"abcabcabcabc\"));\n }", "@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }", "private static List<String> testStringGenerator(List<String> palString) {\n\t\tList<String> list = new ArrayList<>();\n\t\tfor (String pal : palString) {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor (int i = 0; i < 10; i++) {\n\t\t\t\tsb.append(pal);\n\t\t\t\tfor (int j = 0; j < pal.length(); j++) {\n\t\t\t\t\tsb.append(j % 10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(sb.toString());\n\t\t}\n\t\treturn list;\n\t}", "public static void makeBlanks(char[] list) {\n\t\tfor (int i = 0; i < list.length; i++) {\n\t\t\tlist[i] = '*';\n\t\t}\n\t}", "public int selectOriginalTokens (Scanner scan, String [] list){\n \n int count = 0;\n while(scan.hasNext()){\n String line = scan.nextLine();\n String[] t = line.split(\"[ \\n\\t\\r.,:?)({}\\\\[\\\\]]\");\n for (int i = 0; i < t.length; i++){\n String item = t[i].trim();\n if(item.length() > 0){\n list[count] = item;\n count++;\n }//End if statement\n }//End for loop\n }//End while loop\n \n return count;\n }", "void mo54419a(List<String> list);", "private String whiteSpace(String sum, String num)\n {\n\tString space = \"\";\n\tfor(int i = 0; i < sum.length() - num.length(); i++)\n\t space += \" \";\n\treturn space;\n }", "List<C1113b> mo5874b(String str);", "public static List<String> stringList() {\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.add(\"abdxxx\");\n\t\tlist.add(\"xxxxx\");\n\t\tlist.add(\"hi\");\n\t\tlist.add(\"SmoothStack\");\n\t\tlist.add(\"Wyatt x Wyatt x\");\n\t\treturn list;\n\t}", "private static String[] resetStringArray() {\n String[] st = new String[L_MAX];\n L = 2 << 8;\n W = 9;\n int i;\n // initialize symbol table with all 1-character strings\n for (i = 0; i < R; i++)\n st[i] = \"\" + (char) i;\n st[i++] = \"\"; // (unused) lookahead for EOF\n return st;\n }", "public void setUp2( )\n\t{\n\t\tfor( int i = 0; i < 1000; i++ )\n\t\t{\n\t\t\tlista.append( \"\" + i );\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tList<Character>st1=new ArrayList<>();\n\t\n\t\tst1.add('a');\n\t\tst1.add('b');\n\t\tst1.add('a');\n\t\tst1.add('a');\n\t\tst1.add('c');\n\t\tst1.add('t');\n\t\n\t\tSystem.out.println(st1);//[a, b, a, a, c, t]\n\t\t\n\t\tList<Character>st2=new ArrayList<>();//empty []\n\t\tfor (int i=0; i<st1.size();i++) {\n\t\t\tif(!st2.contains(st1.get(i))) {\n\t\t\t\t// created str2 [empty], we will get the element from st1 to st2 while checking if there is repetition \n\t\t\t\tst2.add(st1.get(i));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(st2);//[a, b, c, t]\n\t\t\n\n\t}", "private void many(Set<String> s) {\n\t\twhile (!done() && s.contains(program.charAt(pos)+\"\"))\n\t\t\tpos++;\n }", "@Test\r\n\tpublic void testPositiveGenerateStrings_2() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\", false), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "private static String createPrepStmPlaceHolder(int num) {\n\t\tchar[] c_ar = new char[num*3];\n\t\tc_ar[0] = '(';\n\t\tc_ar[1] = '?';\n\t\tfor(int i=1; i<num; ++i) {\n\t\t\tc_ar[3*i-1] = ',';\n\t\t\tc_ar[3*i] = ' ';\n\t\t\tc_ar[3*i+1] = '?';\n\t\t}\n\t\tc_ar[3*num-1] = ')';\n\t\treturn new String(c_ar);\n\t}", "private void exercise1() {\n final List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerList = list.stream()\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }", "private static String repeatSpace(int number) {\n StringBuilder space = new StringBuilder();\n\n // Adding spaces.\n for (int i = 0; i < number; i++) {\n space.append(\" \");\n }\n\n //returning spaces.\n return space.toString();\n }", "public void mo88640a(List<String> list) {\n List<String> stringList = RxPreferences.INSTANCE.getStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), new ArrayList());\n stringList.addAll(0, list);\n RxPreferences.INSTANCE.putStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), (List) StreamSupport.m150134a(stringList).mo131128a(new AbstractC32239o(new HashSet(stringList)) {\n /* class com.zhihu.android.p1480db.fragment.customview.C18240x255e53c2 */\n private final /* synthetic */ HashSet f$0;\n\n {\n this.f$0 = r1;\n }\n\n @Override // java8.util.p2234b.AbstractC32239o\n public final boolean test(Object obj) {\n return DbEditorSuggestTagCustomView.m93354a(this.f$0, (String) obj);\n }\n }).mo131126a(5).mo131125a(Collectors.m150203a($$Lambda$ofunvu1bqmYbfXGEtxXaV_csE4M.INSTANCE)));\n }", "public Builder addOpenWhiteListBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n ensureOpenWhiteListIsMutable();\n openWhiteList_.add(value);\n onChanged();\n return this;\n }", "private void initWhitespace(Set<String> s) {\n\t\ts.add(\" \");\n\t\ts.add(\"\\n\");\n\t\ts.add(\"\\t\");\n }", "private int skipLeadingWhite( List content, int start) {\r\n if (start < 0) {\r\n start = 0;\r\n }\r\n\r\n int index = start;\r\n int size = content.size();\r\n if (currentFormat.trimAllWhite\r\n || currentFormat.textNormalize\r\n || currentFormat.textTrim) {\r\n while( index < size) {\r\n if ( !isAllWhitespace( content.get(index))) {\r\n return index;\r\n }\r\n index++;\r\n }\r\n }\r\n return index;\r\n }", "List<C1111j> mo5869a(int i);", "@Test\n public void noSpacesBetweenKeywordsTest() {\n tester.yields(\"LaLaLaLaLaaaLi\", lala.EXPRESSION);\n }", "private void appendPlaceHolder(StringBuilder builder, int indent, int consecutiveExcluded, String message) {\n indent(builder, indent);\n builder.append(ELLIPSIS)\n .append(\" \")\n .append(consecutiveExcluded)\n .append(\" \")\n .append(message)\n .append(CoreConstants.LINE_SEPARATOR);\n }", "public void visiualizeSkipList(){\r\n\t\tint number=0;\r\n\t\tNode dummy = sl.getFrom(0,0);\r\n\t\t\r\n\t\tNode next;\r\n\t\tfor(int i=sl.height(); i>=0; i--){\r\n\t\t\t\r\n\t\t\tnext = sl.getFrom(i,0);\r\n\t\t\t\r\n\t\t\tfor(int j=0; j<(sl.size()+2); j++){\r\n\r\n\t\t\t\tnumber = next.getKey();\r\n\t\t\t\t//F.p(number);\r\n\t\t\t\tif(number==dummy.getKey()){\r\n\r\n\t\t\t\t\tif(number==minf)\r\n\t\t\t\t\t\tSystem.out.print(\"-inf\");\r\n\t\t\t\t\telse if(number==inf)\r\n\t\t\t\t\t\tSystem.out.print(\"---inf\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(\"-\",2)+number);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(\"-\",4));\r\n\t\t\t\t\r\n\t\t\t\tif(dummy.getKey()==number)\r\n\t\t\t\t\tnext = next.getRight();\r\n\t\t\t\t\r\n\t\t\t\tdummy = dummy.getRight();\r\n\t\t\t}\r\n\t\t\tdummy = sl.getFrom(0,0);\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testStartingIndicesRegression(){\n\t\tassertLeftmostStartingIndices(\"5,1,7,3,2|-..xxx$1..x...xxx$3....-xx........\", 0, 6, 8, 18, 22);\n\t\tassertRightmostStartingIndices(\"7,5|.......xxx$1....xxx$2..-\", 6, 14);\n\t\t\n\t}", "public long getWhiteSpacesCount() {\n return whiteSpacesCount;\n }", "public MacroList() {\n\t\tthis.macrosses = new HashMap<Integer, String>(12);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_1() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\"), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n String s=\"a /*a*/ sd /*v*/\";\n Pattern p = Pattern.compile(\"(\\\\/\\\\*(\\\\w|\\r\\n)+\\\\*\\\\/)\");\n Matcher m = p.matcher(s);\n List<String> l = new ArrayList<>(100);\n\n while (m.find()) {\n System.out.println(\"tick\");\n l.add(s.substring(m.start()+2, m.end()-2));\n }\n\n System.out.println(l);\n }", "StringPatternCounter(ArrayList<StringPattern> stringPatternList, String fileInput)\n {\n super(fileInput);\n this.stringPatternList = stringPatternList;\n }", "@Before\n public void createString(){\n s1 = \"casa\";\n\ts2 = \"cassa\";\n\ts3 = \"\";\n\ts4 = \"casa\";\n }", "public String minRemoveToMakeValid(String s) {\n int openAvail = 0;\n Set<Integer> skipSet = new HashSet<>();\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) == ')') {\n if (openAvail == 0) {\n skipSet.add(i);\n } else {\n openAvail -= 1;\n }\n } else if (s.charAt(i) == '(') {\n openAvail += 1;\n }\n }\n\n int closedAvail = 0;\n for (int i = s.length() - 1; i >= 0; i--) {\n if (s.charAt(i) == ')') {\n closedAvail += 1;\n } else if (s.charAt(i) == '(') {\n if (closedAvail == 0) {\n skipSet.add(i);\n } else {\n closedAvail -= 1; \n }\n }\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < s.length(); i++) {\n if (!skipSet.contains(i)){\n sb.append(s.charAt(i));\n }\n }\n return sb.toString();\n }", "@SuppressWarnings(\"resource\")\n public static void doubleCapacity(String[] array){\n int wordCount = 0;\n int arrayGrowth = 500;\n array = new String[10];\n String strLine = null;\n while (strLine != null) {\n // Store the content into an array\n Scanner s = new Scanner(strLine);\n while (s.hasNext()) {\n if (array.length == wordCount) {\n // expand list\n array = Arrays.copyOf(array, array.length + arrayGrowth);\n }\n array[wordCount] = s.next();\n wordCount++;\n } \n }\n }", "@Test(timeout = 4000)\n public void test20() throws Throwable {\n StringReader stringReader0 = new StringReader(\"0(Hu\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer2 = new StreamTokenizer(stringReader0);\n JSTerm jSTerm0 = new JSTerm(streamTokenizer0);\n stringReader0.reset();\n StreamTokenizer streamTokenizer3 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer4 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer5 = new StreamTokenizer(stringReader0);\n streamTokenizer0.commentChar((-4));\n StreamTokenizer streamTokenizer6 = new StreamTokenizer(stringReader0);\n streamTokenizer6.ordinaryChars((-1), (-322070664));\n streamTokenizer1.parseNumbers();\n jSTerm0.add((Object) \"JSTerm: Error reading control parameters: \");\n StreamTokenizer streamTokenizer7 = new StreamTokenizer(stringReader0);\n streamTokenizer7.pushBack();\n streamTokenizer1.nextToken();\n StreamTokenizer streamTokenizer8 = new StreamTokenizer(stringReader0);\n streamTokenizer2.slashSlashComments(false);\n JSTerm jSTerm1 = new JSTerm(streamTokenizer5);\n streamTokenizer1.slashStarComments(false);\n streamTokenizer3.eolIsSignificant(false);\n streamTokenizer7.commentChar((-4));\n StreamTokenizer streamTokenizer9 = new StreamTokenizer(stringReader0);\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n jSSubstitution0.listIterator();\n JSSubstitution jSSubstitution1 = jSTerm1.matches((JSPredicateForm) jSTerm0, jSSubstitution0);\n assertTrue(jSSubstitution1.fail());\n }", "public Removalstops()\n {\n stopWords.add(\"am\");\n stopWords.add(\"my\");\nstopWords.add(\"at\");\nstopWords.add(\"a\");\nstopWords.add(\"i\");\nstopWords.add(\"is\");\nstopWords.add(\"of\");\nstopWords.add(\"have\");\nstopWords.add(\"--\");\nstopWords.add(\"do\");\nstopWords.add(\"the\");\nstopWords.add(\"was\");\nstopWords.add(\"iam\");\nstopWords.add(\"there\");\nstopWords.add(\"what\");\nstopWords.add(\"for\");\nstopWords.add(\"in\");\nstopWords.add(\"very\");\nstopWords.add(\"and\");\nstopWords.add(\"to\");\nstopWords.add(\"often\");\nstopWords.add(\"because\");\nstopWords.add(\"in\");\nstopWords.add(\"an\");\nstopWords.add(\"can\");\nstopWords.add(\"via\");\nstopWords.add(\"even\");\nstopWords.add(\"as\");\nstopWords.add(\"best\");\nstopWords.add(\"been\");\nstopWords.add(\"into\");\nstopWords.add(\"by\");\nstopWords.add(\"around\");\nstopWords.add(\"being\");\nstopWords.add(\"from\");\nstopWords.add(\"etc\");\nstopWords.add(\"his\");\nstopWords.add(\"do\");\nstopWords.add(\"have\");\nstopWords.add(\"had\"); \nstopWords.add(\"able\");\nstopWords.add(\"about\");\nstopWords.add(\"above\");\nstopWords.add(\"abroad\");\nstopWords.add(\"according\");\nstopWords.add(\"accordingly\");\nstopWords.add(\"across\");\nstopWords.add(\"actually\");\nstopWords.add(\"adj\");\nstopWords.add(\"after\");\nstopWords.add(\"afterwards\");\nstopWords.add(\"again\");\nstopWords.add(\"against\");\nstopWords.add(\"ago\");\nstopWords.add(\"ahead\");\nstopWords.add(\"ain't\");\nstopWords.add(\"all\");\nstopWords.add(\"allow\");\nstopWords.add(\"allows\");\nstopWords.add(\"almost\");\nstopWords.add(\"alone\");\nstopWords.add(\"along\");\nstopWords.add(\"alongside\");\nstopWords.add(\"already\");\nstopWords.add(\"also\");\nstopWords.add(\"although\");\nstopWords.add(\"always\");\nstopWords.add(\"am\");\nstopWords.add(\"amid\");\nstopWords.add(\"amidst\");\nstopWords.add(\"among\");\nstopWords.add(\"amongst\");\nstopWords.add(\"an\");\nstopWords.add(\"and\");\nstopWords.add(\"another\");\nstopWords.add(\"any\");\nstopWords.add(\"anybody\");\nstopWords.add(\"anyhow\");\nstopWords.add(\"anyone\");\nstopWords.add(\"anything\");\nstopWords.add(\"anyway\");\nstopWords.add(\"anyways\");\nstopWords.add(\"anywhere\");\nstopWords.add(\"apart\");\nstopWords.add(\"appear\");\nstopWords.add(\"appreciate\");\nstopWords.add(\"appropriate\");\nstopWords.add(\"are\");\nstopWords.add(\"aren't\");\nstopWords.add(\"around\");\nstopWords.add(\"as\");\nstopWords.add(\"a's\");\nstopWords.add(\"aside\");\nstopWords.add(\"ask\");\nstopWords.add(\"asking\");\nstopWords.add(\"associated\");\nstopWords.add(\"at\");\nstopWords.add(\"available\");\nstopWords.add(\"away\");\nstopWords.add(\"awfully\");\nstopWords.add(\"back\");\nstopWords.add(\"backward\");\nstopWords.add(\"backwards\");\nstopWords.add(\"be\");\nstopWords.add(\"became\");\nstopWords.add(\"beacause\");\nstopWords.add(\"become\");\nstopWords.add(\"becomes\");\nstopWords.add(\"becoming\");\nstopWords.add(\"been\");\nstopWords.add(\"before\");\nstopWords.add(\"beforehand\");\nstopWords.add(\"begin\");\nstopWords.add(\"behind\");\nstopWords.add(\"being\");\nstopWords.add(\"believe\");\nstopWords.add(\"below\");\nstopWords.add(\"beside\");\nstopWords.add(\"besides\");\nstopWords.add(\"best\");\nstopWords.add(\"better\");\nstopWords.add(\"between\");\nstopWords.add(\"beyond\");\nstopWords.add(\"both\");\nstopWords.add(\"brief\");\nstopWords.add(\"but\");\nstopWords.add(\"by\");\nstopWords.add(\"came\");\nstopWords.add(\"can\");\nstopWords.add(\"cannot\");\nstopWords.add(\"cant\");\nstopWords.add(\"can't\");\nstopWords.add(\"caption\");\nstopWords.add(\"cause\");\nstopWords.add(\"causes\");\nstopWords.add(\"certain\");\nstopWords.add(\"cetrainly\");\nstopWords.add(\"changes\");\nstopWords.add(\"clearly\");\nstopWords.add(\"c'mon\");\nstopWords.add(\"co\");\nstopWords.add(\"co.\");\nstopWords.add(\"com\");\nstopWords.add(\"come\");\nstopWords.add(\"comes\");\nstopWords.add(\"concerning\");\nstopWords.add(\"consequently\");\nstopWords.add(\"consider\");\nstopWords.add(\"considering\");\nstopWords.add(\"could\");\nstopWords.add(\"couldn't\");\nstopWords.add(\"c's\");\nstopWords.add(\"currently\");\nstopWords.add(\"dare\");\nstopWords.add(\"daren't\");\nstopWords.add(\"definitely\");\nstopWords.add(\"described\");\nstopWords.add(\"despite\");\nstopWords.add(\"did\");\nstopWords.add(\"didn't\");\nstopWords.add(\"different\");\nstopWords.add(\"directly\");\nstopWords.add(\"do\");\nstopWords.add(\"does\");\nstopWords.add(\"doesn't\");\nstopWords.add(\"doing\");\nstopWords.add(\"done\");\nstopWords.add(\"don't\");\nstopWords.add(\"down\");\nstopWords.add(\"downwards\");\nstopWords.add(\"during\");\nstopWords.add(\"each\");\nstopWords.add(\"edu\");\nstopWords.add(\"eg\");\nstopWords.add(\"eight\");\nstopWords.add(\"eighty\");\nstopWords.add(\"either\");\nstopWords.add(\"else\");\nstopWords.add(\"elsewhere\");\nstopWords.add(\"end\");\nstopWords.add(\"ending\");\nstopWords.add(\"enough\");\nstopWords.add(\"entirely\");\nstopWords.add(\"especially\");\nstopWords.add(\"et\");\nstopWords.add(\"etc\");\nstopWords.add(\"even\");\nstopWords.add(\"evenmore\");\nstopWords.add(\"every\");\nstopWords.add(\"everybody\");\nstopWords.add(\"everyone\");\nstopWords.add(\"everything\");\nstopWords.add(\"everywhere\");\nstopWords.add(\"ex\");\nstopWords.add(\"exactly\");\nstopWords.add(\"example\");\nstopWords.add(\"except\");\nstopWords.add(\"fairly\");\nstopWords.add(\"far\");\nstopWords.add(\"farhter\");\nstopWords.add(\"few\");\nstopWords.add(\"fewer\");\nstopWords.add(\"fifth\");\nstopWords.add(\"first\");\nstopWords.add(\"five\");\nstopWords.add(\"followed\");\nstopWords.add(\"following\");\nstopWords.add(\"follows\");\nstopWords.add(\"for\");\nstopWords.add(\"forever\");\nstopWords.add(\"former\");\nstopWords.add(\"formerly\");\nstopWords.add(\"forth\");\nstopWords.add(\"forward\");\nstopWords.add(\"found\");\nstopWords.add(\"four\");\nstopWords.add(\"from\");\nstopWords.add(\"further\");\nstopWords.add(\"furthermore\");\nstopWords.add(\"get\");\nstopWords.add(\"gets\");\nstopWords.add(\"getting\");\nstopWords.add(\"given\");\nstopWords.add(\"gives\");\nstopWords.add(\"go\");\nstopWords.add(\"goes\");\nstopWords.add(\"going\");\nstopWords.add(\"gone\");\nstopWords.add(\"got\");\nstopWords.add(\"gotten\");\nstopWords.add(\"greetings\");\nstopWords.add(\"had\");\nstopWords.add(\"hadn't\");\nstopWords.add(\"half\");\nstopWords.add(\"happens\");\nstopWords.add(\"hardly\");\nstopWords.add(\"has\");\nstopWords.add(\"hasn't\");\nstopWords.add(\"have\");\nstopWords.add(\"haven't\");\nstopWords.add(\"having\");\nstopWords.add(\"he\");\nstopWords.add(\"he'd\");\nstopWords.add(\"he'll\");\nstopWords.add(\"hello\");\nstopWords.add(\"help\");\nstopWords.add(\"hence\");\nstopWords.add(\"her\");\nstopWords.add(\"here\");\nstopWords.add(\"hereafter\");\nstopWords.add(\"hereby\");\nstopWords.add(\"herein\");\nstopWords.add(\"here's\");\nstopWords.add(\"hereupon\");\nstopWords.add(\"hers\");\nstopWords.add(\"herself\");\nstopWords.add(\"he's\");\nstopWords.add(\"hi\");\nstopWords.add(\"him\");\nstopWords.add(\"himself\");\nstopWords.add(\"his\");\nstopWords.add(\"hither\");\nstopWords.add(\"hopefully\");\nstopWords.add(\"how\");\nstopWords.add(\"howbeit\");\nstopWords.add(\"however\");\nstopWords.add(\"however\");\nstopWords.add(\"hundred\");\nstopWords.add(\"i'd\");\nstopWords.add(\"ie\");\nstopWords.add(\"if\");\nstopWords.add(\"ignored\");\nstopWords.add(\"i'll\");\nstopWords.add(\"i'm\");\nstopWords.add(\"immediate\");\nstopWords.add(\"in\");\nstopWords.add(\"iansmuch\");\nstopWords.add(\"inc\");\nstopWords.add(\"inc.\");\nstopWords.add(\"indeed\");\nstopWords.add(\"indicate\");\nstopWords.add(\"indicated\");\nstopWords.add(\"indicates\");\nstopWords.add(\"inner\");\nstopWords.add(\"inside\");\nstopWords.add(\"insofar\");\nstopWords.add(\"into\");\nstopWords.add(\"inward\");\nstopWords.add(\"is\");\nstopWords.add(\"isn't\");\nstopWords.add(\"it\");\nstopWords.add(\"it'd\");\nstopWords.add(\"it'll\");\nstopWords.add(\"its\");\nstopWords.add(\"it's\");\nstopWords.add(\"itself\");\nstopWords.add(\"i've\");\nstopWords.add(\"just\");\nstopWords.add(\"k\");\nstopWords.add(\"keep\");\nstopWords.add(\"keeps\");\nstopWords.add(\"kept\");\nstopWords.add(\"know\");\nstopWords.add(\"knows\");\nstopWords.add(\"known\");\nstopWords.add(\"last\");\nstopWords.add(\"lately\");\nstopWords.add(\"later\");\nstopWords.add(\"latter\");\nstopWords.add(\"latterly\");\nstopWords.add(\"least\");\nstopWords.add(\"less\");\nstopWords.add(\"let\");\nstopWords.add(\"let's\");\nstopWords.add(\"like\");\nstopWords.add(\"liked\");\nstopWords.add(\"likely\");\nstopWords.add(\"likewise\");\nstopWords.add(\"little\");\nstopWords.add(\"look\");\nstopWords.add(\"looks\");\nstopWords.add(\"low\");\nstopWords.add(\"lower\");\nstopWords.add(\"ltd\");\nstopWords.add(\"made\");\nstopWords.add(\"mainly\");\nstopWords.add(\"make\");\nstopWords.add(\"makes\");\nstopWords.add(\"many\");\nstopWords.add(\"may\");\nstopWords.add(\"maybe\");\nstopWords.add(\"mayn't\");\nstopWords.add(\"me\");\nstopWords.add(\"mean\");\nstopWords.add(\"meanwhile\");\nstopWords.add(\"merely\");\nstopWords.add(\"might\");\nstopWords.add(\"mightn't\");\nstopWords.add(\"mine\");\nstopWords.add(\"minus\");\nstopWords.add(\"miss\");\nstopWords.add(\"more\");\nstopWords.add(\"moreover\");\nstopWords.add(\"most\");\nstopWords.add(\"mostly\");\nstopWords.add(\"mr\");\nstopWords.add(\"mrs\");\nstopWords.add(\"much\");\nstopWords.add(\"must\");\nstopWords.add(\"mustn't\");\nstopWords.add(\"my\");\nstopWords.add(\"myself\");\nstopWords.add(\"name\");\nstopWords.add(\"namely\");\nstopWords.add(\"nd\");\nstopWords.add(\"near\");\nstopWords.add(\"nearly\");\nstopWords.add(\"necessary\");\nstopWords.add(\"need\");\nstopWords.add(\"needn't\");\nstopWords.add(\"needs\");\nstopWords.add(\"neither\");\nstopWords.add(\"never\");\nstopWords.add(\"neverf\");\nstopWords.add(\"neverless\");\nstopWords.add(\"nevertheless\");\nstopWords.add(\"new\");\nstopWords.add(\"next\");\nstopWords.add(\"nine\");\nstopWords.add(\"ninety\");\nstopWords.add(\"no\");\nstopWords.add(\"nobody\");\nstopWords.add(\"non\");\nstopWords.add(\"none\");\nstopWords.add(\"nonetheless\");\nstopWords.add(\"noone\");\nstopWords.add(\"no-one\");\nstopWords.add(\"nor\");\nstopWords.add(\"normally\");\nstopWords.add(\"not\");\nstopWords.add(\"nothing\");\nstopWords.add(\"notwithstanding\");\nstopWords.add(\"novel\");\nstopWords.add(\"now\");\nstopWords.add(\"nowwhere\");\nstopWords.add(\"obviously\");\nstopWords.add(\"of\");\nstopWords.add(\"off\");\nstopWords.add(\"often\");\nstopWords.add(\"oh\");\nstopWords.add(\"ok\");\nstopWords.add(\"okay\");\nstopWords.add(\"old\");\nstopWords.add(\"on\");\nstopWords.add(\"once\");\nstopWords.add(\"one\");\nstopWords.add(\"ones\");\nstopWords.add(\"one's\");\nstopWords.add(\"only\");\nstopWords.add(\"onto\");\nstopWords.add(\"opposite\");\nstopWords.add(\"or\");\nstopWords.add(\"other\");\nstopWords.add(\"others\");\nstopWords.add(\"otherwise\");\nstopWords.add(\"ought\");\nstopWords.add(\"oughtn't\");\nstopWords.add(\"our\");\nstopWords.add(\"ourselves\");\nstopWords.add(\"out\");\nstopWords.add(\"outside\");\nstopWords.add(\"over\");\nstopWords.add(\"overall\");\nstopWords.add(\"own\");\nstopWords.add(\"particular\");\nstopWords.add(\"particularly\");\nstopWords.add(\"past\");\nstopWords.add(\"per\");\nstopWords.add(\"perhaps\");\nstopWords.add(\"placed\");\nstopWords.add(\"please\");\nstopWords.add(\"plus\");\nstopWords.add(\"possible\");\nstopWords.add(\"presumably\");\nstopWords.add(\"probably\");\nstopWords.add(\"provided\");\nstopWords.add(\"provides\");\nstopWords.add(\"que\");\nstopWords.add(\"quite\");\nstopWords.add(\"qv\");\nstopWords.add(\"rather\");\nstopWords.add(\"rd\");\nstopWords.add(\"re\");\nstopWords.add(\"really\");\nstopWords.add(\"reasonably\");\nstopWords.add(\"recent\");\nstopWords.add(\"recently\");\nstopWords.add(\"regarding\");\nstopWords.add(\"regardless\");\nstopWords.add(\"regards\");\nstopWords.add(\"relatively\");\nstopWords.add(\"respectively\");\nstopWords.add(\"right\");\nstopWords.add(\"round\");\nstopWords.add(\"said\");\nstopWords.add(\"same\");\nstopWords.add(\"saw\");\nstopWords.add(\"say\");\nstopWords.add(\"saying\");\nstopWords.add(\"says\");\nstopWords.add(\"second\");\nstopWords.add(\"secondly\");\nstopWords.add(\"see\");\nstopWords.add(\"seeing\");\nstopWords.add(\"seem\");\nstopWords.add(\"seemed\");\nstopWords.add(\"seeming\");\nstopWords.add(\"seems\");\nstopWords.add(\"seen\");\nstopWords.add(\"self\");\nstopWords.add(\"selves\");\nstopWords.add(\"sensible\");\nstopWords.add(\"sent\");\nstopWords.add(\"serious\");\nstopWords.add(\"seriously\");\nstopWords.add(\"seven\");\nstopWords.add(\"several\");\nstopWords.add(\"shall\");\nstopWords.add(\"shan't\");\nstopWords.add(\"she\");\nstopWords.add(\"she'd\");\nstopWords.add(\"she'll\");\nstopWords.add(\"she's\");\nstopWords.add(\"should\");\nstopWords.add(\"shouldn't\");\nstopWords.add(\"since\");\nstopWords.add(\"six\");\nstopWords.add(\"so\");\nstopWords.add(\"some\");\nstopWords.add(\"somebody\");\nstopWords.add(\"someday\");\nstopWords.add(\"somehow\");\nstopWords.add(\"someone\");\nstopWords.add(\"something\");\nstopWords.add(\"sometime\");\nstopWords.add(\"sometimes\");\nstopWords.add(\"somewhat\");\nstopWords.add(\"somewhere\");\nstopWords.add(\"soon\");\nstopWords.add(\"sorry\");\nstopWords.add(\"specified\");\nstopWords.add(\"specify\");\nstopWords.add(\"specifying\");\nstopWords.add(\"still\");\nstopWords.add(\"sub\");\nstopWords.add(\"such\");\nstopWords.add(\"sup\");\nstopWords.add(\"sure\");\nstopWords.add(\"take\");\nstopWords.add(\"taken\");\nstopWords.add(\"taking\");\nstopWords.add(\"tell\");\nstopWords.add(\"tends\");\nstopWords.add(\"th\");\nstopWords.add(\"than\");\nstopWords.add(\"thank\");\nstopWords.add(\"thanks\");\nstopWords.add(\"thanx\");\nstopWords.add(\"that\");\nstopWords.add(\"that'll\");\nstopWords.add(\"thats\");\nstopWords.add(\"that've\");\nstopWords.add(\"the\");\nstopWords.add(\"their\");\nstopWords.add(\"theirs\");\nstopWords.add(\"them\");\nstopWords.add(\"themselves\");\nstopWords.add(\"then\");\nstopWords.add(\"thence\");\nstopWords.add(\"there\");\nstopWords.add(\"thereafter\");\nstopWords.add(\"thereby\");\nstopWords.add(\"there'd\");\nstopWords.add(\"therefore\");\nstopWords.add(\"therein\");\nstopWords.add(\"ther'll\");\nstopWords.add(\"there're\");\nstopWords.add(\"theres\");\nstopWords.add(\"there's\");\nstopWords.add(\"thereupon\");\nstopWords.add(\"there've\");\nstopWords.add(\"these\");\nstopWords.add(\"they\");\nstopWords.add(\"they'd\");\nstopWords.add(\"they'll\");\nstopWords.add(\"they're\");\nstopWords.add(\"they've\");\nstopWords.add(\"thing\");\nstopWords.add(\"things\");\nstopWords.add(\"think\");\nstopWords.add(\"third\");\nstopWords.add(\"thirty\");\nstopWords.add(\"this\");\nstopWords.add(\"thorough\");\nstopWords.add(\"thoroughly\");\nstopWords.add(\"those\");\nstopWords.add(\"though\");\nstopWords.add(\"throughout\");\nstopWords.add(\"thru\");\nstopWords.add(\"thus\");\nstopWords.add(\"till\");\nstopWords.add(\"to\");\nstopWords.add(\"together\");\nstopWords.add(\"too\");\nstopWords.add(\"took\");\nstopWords.add(\"toward\");\nstopWords.add(\"towards\");\nstopWords.add(\"tried\");\nstopWords.add(\"tries\");\nstopWords.add(\"truly\");\nstopWords.add(\"try\");\nstopWords.add(\"trying\");\nstopWords.add(\"t's\");\nstopWords.add(\"twice\");\nstopWords.add(\"two\");\nstopWords.add(\"un\");\nstopWords.add(\"under\");\nstopWords.add(\"underneath\");\nstopWords.add(\"undoing\");\nstopWords.add(\"unfortunately\");\nstopWords.add(\"unless\");\nstopWords.add(\"unlike\");\nstopWords.add(\"unlikely\");\nstopWords.add(\"untill\");\nstopWords.add(\"unto\");\nstopWords.add(\"up\");\nstopWords.add(\"upon\");\nstopWords.add(\"upwards\");\nstopWords.add(\"us\");\nstopWords.add(\"use\");\nstopWords.add(\"used\");\nstopWords.add(\"useful\");\nstopWords.add(\"uses\");\nstopWords.add(\"using\");\nstopWords.add(\"usually\");\nstopWords.add(\"v\");\nstopWords.add(\"value\");\nstopWords.add(\"various\");\nstopWords.add(\"versus\");\nstopWords.add(\"very\");\nstopWords.add(\"via\");\nstopWords.add(\"viz\");\nstopWords.add(\"vs\");\nstopWords.add(\"want\");\nstopWords.add(\"wants\");\nstopWords.add(\"was\");\nstopWords.add(\"wasn't\");\nstopWords.add(\"way\");\nstopWords.add(\"we\");\nstopWords.add(\"we'd\");\nstopWords.add(\"welcome\");\nstopWords.add(\"well\");\nstopWords.add(\"we'll\");\nstopWords.add(\"went\");\nstopWords.add(\"were\");\nstopWords.add(\"we're\");\nstopWords.add(\"weren't\");\nstopWords.add(\"we've\");\nstopWords.add(\"what\");\nstopWords.add(\"whatever\");\nstopWords.add(\"what'll\");\nstopWords.add(\"what's\");\nstopWords.add(\"what've\");\nstopWords.add(\"when\");\nstopWords.add(\"whence\");\nstopWords.add(\"whenever\");\nstopWords.add(\"where\");\nstopWords.add(\"whereafter\");\nstopWords.add(\"whereas\");\nstopWords.add(\"whereby\");\nstopWords.add(\"wherein\");\nstopWords.add(\"where's\");\nstopWords.add(\"whereupon\");\nstopWords.add(\"whereever\");\nstopWords.add(\"whether\");\nstopWords.add(\"which\");\nstopWords.add(\"whichever\");\nstopWords.add(\"while\");\nstopWords.add(\"whilst\");\nstopWords.add(\"whither\");\nstopWords.add(\"who\");\nstopWords.add(\"who'd\");\nstopWords.add(\"whoever\");\nstopWords.add(\"whole\");\nstopWords.add(\"who'll\");\nstopWords.add(\"whom\");\nstopWords.add(\"whomever\");\nstopWords.add(\"who's\");\nstopWords.add(\"whose\");\nstopWords.add(\"why\");\nstopWords.add(\"will\");\nstopWords.add(\"willing\");\nstopWords.add(\"wish\");\nstopWords.add(\"with\");\nstopWords.add(\"within\");\nstopWords.add(\"without\");\nstopWords.add(\"wonder\");\nstopWords.add(\"won't\");\nstopWords.add(\"would\");\nstopWords.add(\"wouldn't\");\nstopWords.add(\"yes\");\nstopWords.add(\"yet\");\nstopWords.add(\"you\");\nstopWords.add(\"you'd\");\nstopWords.add(\"you'll\");\nstopWords.add(\"your\");\nstopWords.add(\"you're\");\nstopWords.add(\"yours\");\nstopWords.add(\"yourself\");\nstopWords.add(\"you've\");\nstopWords.add(\"zero\");\n\n \n \n }", "public abstract void mo9247b(String str, long j, List<String> list);", "private int skipTrialingWhite( List content, int start) {\r\n int size = content.size();\r\n if (start > size) {\r\n start = size;\r\n }\r\n\r\n int index = start;\r\n if (currentFormat.trimAllWhite\r\n || currentFormat.textNormalize\r\n || currentFormat.textTrim) {\r\n while( index >= 0) {\r\n if ( !isAllWhitespace( content.get(index - 1)))\r\n break;\r\n --index;\r\n }\r\n }\r\n return index;\r\n }", "private void fillSet() {\r\n\t\tString regex = \"\\\\p{L}+\";\r\n\t\tMatcher matcher = Pattern.compile(regex).matcher(body);\r\n\t\twhile (matcher.find()) {\r\n\t\t\tif (!matcher.group().isEmpty()) {\r\n\t\t\t\twords.add(matcher.group());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private ArrayList<Integer> getEmptySpaces(char[] board) {\n ArrayList<Integer> emptySpaces = new ArrayList<>();\n for (int i = 0; i < board.length; i++) {\n if (board[i] == ' ') {\n emptySpaces.add(i);\n }\n }\n return emptySpaces;\n }", "void mo13370a(int i, int i2, List<C15929a> list) throws IOException;", "private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }", "public static void main(String[] args) {\n String[] strings = new String[100];\n for (int i = 0; i < strings.length; i++) {\n strings[i] = randomStrings(2);\n }\n// for (String s : strings) {\n// System.out.println(s);\n// }\n ArrayList<String> appeared = new ArrayList<>();\n for (String s : strings) {\n if (!appeared.contains(s)) {\n appeared.add(s);\n }\n }\n System.out.println(appeared.size());\n\n }", "private static Stream<List<Tile>> substituteBlanks(List<Tile> p) {\n Stream<List<Tile>> res = Stream.of(p);\n //Iterate through all letters.\n for (int i = 0; i < p.size(); i++) {\n //Check for blanks.\n if (p.get(i).getLetter() == Character.MIN_VALUE) {\n //If blank found, substitute it for all a-z, and look again for next blank.\n res = substituteBlankAtIndex(p, i)\n .flatMap(s -> substituteBlanks(s));\n }\n }\n\n return res;\n }", "private IgnoreListHelper() {\n\t}", "@Test\n\t public void test5 ()\n\t{\n\t\t\tString s = new String(\"aaabaaaaabaabaaaabaaaaaaaaaaaaaabaaaaaaaaaaaaaaabaaaaaaaaaaaaaaba\");\n\t s = s.replaceAll(\"\\\\s+\", \" \");\n\t assertEquals(\"aaaaaaaaaaaaaabaaaaaaaaaaaaaa\", LRS.lrs(s)); \n\t}", "public static List<String> findRepeatedDnaSequences(String s) {\n \tList<String> re=new ArrayList<String>();\n \tif(s.length()<=10){\n \t\treturn re;\n \t}\n \tMap<String, Integer> map=new HashMap<String, Integer>(); \t\n \tfor(int i=10; i<=s.length(); i++){\n \t\tString k=s.substring(i-10, i);\n \t\tif(map.containsKey(k)){\n \t\t\tint val=map.get(k);\n \t\t\tif(val==1){\n \t\t\t\tre.add(k);\n \t\t\t}\n \t\t\tmap.put(k, val+1);\n \t\t}else{\n \t\t\tmap.put(k, 1);\n \t\t}\n \t}\n \treturn re;\n }", "public static void main(){\r\n\t\t\r\n\t\tArrayList<tok> pHolder = new ArrayList<tok>();\r\n\r\n\t\t pHolder.add(new tok(\"@\", \"@\"));\r\n\t\t\r\n\t\treturn;\r\n\t}", "public void mo9497b(List<String> list) {\n this.f1514c = list;\n }", "private void listEntries(BufferedWriter bw, String previous, int start, int end, String zeroes) throws IOException {\n\t\tint writeStart = -1;\n\t\tStringBuilder sb = new StringBuilder();\n\t\tchar c;\n\t\tfor (int i = 0, l = previous.length(); i < l && writeStart == -1; i++) {\n\t\t\tc = previous.charAt(i);\n\t\t\tif (Character.isDigit(c)) {sb.append(c);}\n\t\t\telse {writeStart = Integer.parseInt(sb.toString());}\n\t\t}\n\t\tfor (int i = start; i < end; i++) {bw.write(++writeStart + \"=\" + zeroes + i + \"\\n\");}\n\t}", "public void m20623OooO00o() {\n for (C8964ooOOo000 ooooo000 : this.f22213OooO00o) {\n OooO00o(ooooo000);\n }\n this.f22212OooO00o.clear();\n this.f22213OooO00o.clear();\n }", "public static List<String> findStrobogrammatic(int n) {\n List<String> cur, ans;\n ans = new ArrayList<String>((n & 1) == 0 ? Arrays.asList(\"\") : Arrays.asList(\"0\", \"1\", \"8\"));\n if (n < 2) return ans;\n\n for (;n > 1; n -= 2) {\n cur = ans;\n ans = new ArrayList<String>();\n for (String i : cur) {\n if (n > 3) {\n ans.add('0' + i + '0');\n }\n ans.add('1' + i + '1');\n ans.add('8' + i + '8');\n ans.add('6' + i + '9');\n ans.add('9' + i + '6');\n }\n }\n System.out.println(ans.size());\n return ans;\n }", "public String addWhiteSpace(String str, int number) {\n\t\tStringBuilder result = new StringBuilder();\n\t\tfor (int i = 0; i < str.length(); i+=2) {\n\t\t if (i > 0) {\n\t\t\t for (int j = 0; j < number; j++)\n\t\t\t\t result.append(\" \");\n\t\t }\n\t\t result.append(str.charAt(i));\n\t\t result.append(str.charAt(i+1));\n\t\t}\n\t\treturn result.toString();\n\t}", "private void fillRandomList()\n\t{\n\t\trandomList.add(\"I like cheese.\");\n\t\trandomList.add(\"Tortoise can move faster than slow rodent.\");\n\t\trandomList.add(\"I enjoy sitting on the ground.\");\n\t\trandomList.add(\"I like cereal.\");\n\t\trandomList.add(\"This is random.\");\n\t\trandomList.add(\"I like typing\");\n\t\trandomList.add(\"FLdlsjejf is my favorite word.\");\n\t\trandomList.add(\"I have two left toes.\");\n\t\trandomList.add(\"Sqrt(2) = 1.414213562 ...\");\n\t\trandomList.add(\"Hi mom.\");\n\t}", "private List<WordScore> liveList(List<WordScore> gridList, String s) {\n s = s.toLowerCase();\n List<WordScore> liveList = new ArrayList<>();\n for(WordScore ws : gridList){\n int nochars = s.length() - s.replaceAll(ws.getWord(), \"\").length();\n liveList.add(new WordScore(ws.getWord(), ws.getScore()-nochars));\n }\n return liveList;\n }", "private static List<String> induceSynonims(String word) {\n\t\treturn null;\n\t}", "public static void main(String[] args) {\n\t\tString s=\"22\";\n\t\t\n\t\tif(s.indexOf(\"1\")>=0||s.equals(\"\"))\n\t\t\tSystem.out.println(\"hello\");\n\t\t\t\n\t\tArrayList f=new ArrayList();\n\t\tint stack[]=new int[2*s.length()];\n\t\tint top=-1;\n\t\tchar a[][]=new char[][]{{},{},{'#','a','b','c','#'},{'#','d','e','f','#'},{'#','g','h','i','#'},{'#','j','k','l','#'},{'#','m','n','o','#'},{'#','p','q','r','s','#'},{'#','t','u','v','#'},{'#','w','x','y','z','#'}};\n\t\tint length[]=new int []{0,0,3,3,3,3,3,4,3,4};\n\t\tStringBuilder ans=new StringBuilder();\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tint x=stack[++top]=(int)s.charAt(i)-'0';\n\t\t\tans.append(a[x][1]);\n\t\t\tstack[++top]=1;\n\t\t}\n\t\twhile(stack[1]!=length[(int)s.charAt(0)-'0']+1){\n\t\t\tif(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\tif(s.length()==(top+1)/2){\n\t\t\t\t\twhile(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\t\t\tint r=(top-1)/2;\n\t\t\t\t\t\tchar r1=a[stack[top-1]][stack[top]];\n\t\t\t\t\t\tans.setCharAt(r, r1);\n\t\t\t\t\t\tString ans1=ans.toString();\n\t\t\t\t\t\tf.add(ans1);\n\t\t\t\t\t\tstack[top]++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t\t\ttop+=2;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[top]=1;\n\t\t\t\ttop-=2;\n\t\t\t\tstack[top]++;\n\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(f.size());\n\t}", "private void modify(List listString){\n\t}", "private String repeatM(int count){\n return new String(new char[count]).replace('\\0','M');\n }", "public static void loopThroughListOfStrings(List<String> input) {\n\t\t\n\t\tList<String> output = input.stream().filter(i -> i.length()>=4).collect(Collectors.toList());\n\t\t\n\t\tSystem.out.println(output);\n\t}" ]
[ "0.55588835", "0.55229723", "0.54595375", "0.54238254", "0.5377577", "0.53646344", "0.52897197", "0.5233525", "0.5225019", "0.521158", "0.5200129", "0.51884824", "0.5185825", "0.51782596", "0.51773864", "0.5151502", "0.5142657", "0.514163", "0.513604", "0.51307565", "0.5129297", "0.50706583", "0.5069423", "0.5069118", "0.50578684", "0.5051562", "0.5048556", "0.5042992", "0.5030988", "0.5012325", "0.49734595", "0.49587935", "0.49542245", "0.49387205", "0.49275225", "0.4927479", "0.49069813", "0.4880256", "0.48751348", "0.4858941", "0.48582852", "0.48521936", "0.48219705", "0.48149616", "0.48114434", "0.48105443", "0.48057917", "0.4804807", "0.4803039", "0.4787876", "0.47805554", "0.4765939", "0.4741199", "0.47396874", "0.47387704", "0.4736322", "0.47323987", "0.4732157", "0.47237864", "0.47171202", "0.47171193", "0.47170532", "0.47169754", "0.47078192", "0.4697591", "0.4677753", "0.46771806", "0.46718898", "0.46639842", "0.46629536", "0.46625173", "0.46510023", "0.46136248", "0.46063063", "0.46059436", "0.4605689", "0.4595574", "0.45940256", "0.45932886", "0.459322", "0.4587189", "0.4584727", "0.45785964", "0.45778894", "0.4575683", "0.4572642", "0.45703217", "0.45672476", "0.45662442", "0.45627823", "0.45595953", "0.45576534", "0.45555827", "0.45507377", "0.45498928", "0.45479152", "0.45470604", "0.4544842", "0.45396292", "0.45385683" ]
0.5288007
7
open_white_list repeated string open_white_list = 11;
public Builder addOpenWhiteList( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureOpenWhiteListIsMutable(); openWhiteList_.add(value); onChanged(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SList oddWords();", "public java.lang.String getOpenWhiteList(int index) {\n return openWhiteList_.get(index);\n }", "public int getOpenWhiteListCount() {\n return openWhiteList_.size();\n }", "public java.lang.String getOpenWhiteList(int index) {\n return openWhiteList_.get(index);\n }", "public int getOpenWhiteListCount() {\n return openWhiteList_.size();\n }", "private LowercaseWordList() {\n\n }", "public Builder setOpenWhiteList(\n int index, java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureOpenWhiteListIsMutable();\n openWhiteList_.set(index, value);\n onChanged();\n return this;\n }", "static List DuplicateElements(List<Character> characters){\r\n\t\tList newlist=new ArrayList<>();\r\n\t\tfor(char c:characters)\r\n\t\t{\r\n\t\t\tnewlist.add(Collections.nCopies(2,c ));\r\n\t\r\n\t\t}\r\n\tSystem.out.println(newlist);\r\n\treturn newlist;\r\n\t}", "public static List<String> createCompetencyList() {\n List<String> list = new ArrayList<String>();\n list.add(\"Line number 1\");\n list.add(\"Line number 2\");\n return list;\n }", "private void exercise2() {\n List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerOddLengthList = list.stream()\n .filter((string) -> string.length() % 2 != 0)\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public void setWhiteSpacesCount(long value) {\n this.whiteSpacesCount = value;\n }", "List<String> mo5877c(String str);", "java.util.List<String> getRepeatedStringFieldList();", "private String addRandomSpacing(String originalText) {\n ArrayList<Expression> list = new ArrayList<Expression>();\n\n\t\tclass MyVisitor extends ModifierVisitor<Void> {\n\t\t @Override\n\t\t public Node visit(VariableDeclarator declarator, Void args) {\n\t Expression expression = declarator.getInitializer().get();\n\t \n\t \n\t // We're looking for string.\n\t if (expression instanceof StringLiteralExpr) {\n\t list.add(expression);\n\t }\n\t\t return null;\n\t\t }\n\t\t}\n\t\t\n\t\t\n\t}", "SList evenWords();", "public com.google.protobuf.ProtocolStringList\n getOpenWhiteListList() {\n return openWhiteList_;\n }", "List<String> mo5876c();", "void fillList(List<String> toFill) {\n for (int i = 0; i < number; i++) {\n toFill.add(i + \"\");\n }\n }", "public String getWhiteList0() {\n return getString(\"whitelist.0\");\n }", "public Builder clearOpenWhiteList() {\n openWhiteList_ = com.google.protobuf.LazyStringArrayList.EMPTY;\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n return this;\n }", "public Builder addAllOpenWhiteList(\n java.lang.Iterable<java.lang.String> values) {\n ensureOpenWhiteListIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, openWhiteList_);\n onChanged();\n return this;\n }", "public com.google.protobuf.ByteString\n getOpenWhiteListBytes(int index) {\n return openWhiteList_.getByteString(index);\n }", "public abstract List<C41717j> mo70725h(String str);", "static int getNumPatterns() { return 64; }", "private static void skipSplitAdd(String s, List<String> list) {\n String tmp[] = s.split(\" \");\n\n for (int i = 1; i < tmp.length; i++) {\n list.add(tmp[i]);\n\n // System.out.println(tmp[i]);\n }\n }", "public static void addStars(ArrayList<String> list){\r\n //Loops through the list\r\n for(int i = 1; i < list.size(); i+=2){\r\n list.add(i, \"*\");\r\n }\r\n System.out.println(list);\r\n }", "private void m4676a(List<C0906d> list, StringBuilder sb) {\n if (sb.length() != 0) {\n list.add(new C0906d(C0906d.EnumC0907a.LITERAL, sb.toString()));\n }\n }", "public void setWhiteCounter(int num){\n this.whiteCounter = num;\n }", "StringList createStringList();", "List<C1114c> mo5886k(String str);", "private String genWhiteSpaceRegex(int noOfWhiteSpace,\n String multiWhiteSpace,\n String zeroWhiteSpace) {\n\n return (noOfWhiteSpace == 0) ? zeroWhiteSpace\n : multiWhiteSpace.replace(\"%%\", String.valueOf(noOfWhiteSpace));\n }", "public com.google.protobuf.ByteString\n getOpenWhiteListBytes(int index) {\n return openWhiteList_.getByteString(index);\n }", "private void generateLists(String num, Stack<String> numberList)\n {\n\tfor(int i = 0, len = num.length(); i < len; i++)\n\t numberList.push(new Character(num.charAt(i)).toString());\n }", "private void exercise5() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> nonDuplicateList;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n nonDuplicateList = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .collect(toList());\n }\n\n nonDuplicateList.forEach(System.out::println);\n }", "void mo100443a(List<String> list);", "ListString createListString();", "List<Log> mo13160a(String str, int i);", "public com.google.protobuf.ProtocolStringList\n getOpenWhiteListList() {\n return openWhiteList_.getUnmodifiableView();\n }", "public static void main(String[] args) { String s = \"catsanddog\";\n// List<String> wordDict = new ArrayList<>(Arrays.asList(\"cat\", \"cats\", \"and\", \"sand\", \"dog\"));\n//\n String s = \"pineapplepenappl\";\n List<String> wordDict = new ArrayList<>(Arrays.asList(\"apple\", \"pen\", \"applepen\", \"pine\", \"pineapple\"));\n\n WordBreak140 tmp = new WordBreak140();\n tmp.wordBreak(s, wordDict);\n }", "@Test\n public void repeatedSubstringPattern() {\n assertTrue(new Solution1().repeatedSubstringPattern(\"abcabcabcabc\"));\n }", "@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }", "private static List<String> testStringGenerator(List<String> palString) {\n\t\tList<String> list = new ArrayList<>();\n\t\tfor (String pal : palString) {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor (int i = 0; i < 10; i++) {\n\t\t\t\tsb.append(pal);\n\t\t\t\tfor (int j = 0; j < pal.length(); j++) {\n\t\t\t\t\tsb.append(j % 10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(sb.toString());\n\t\t}\n\t\treturn list;\n\t}", "public static void makeBlanks(char[] list) {\n\t\tfor (int i = 0; i < list.length; i++) {\n\t\t\tlist[i] = '*';\n\t\t}\n\t}", "public int selectOriginalTokens (Scanner scan, String [] list){\n \n int count = 0;\n while(scan.hasNext()){\n String line = scan.nextLine();\n String[] t = line.split(\"[ \\n\\t\\r.,:?)({}\\\\[\\\\]]\");\n for (int i = 0; i < t.length; i++){\n String item = t[i].trim();\n if(item.length() > 0){\n list[count] = item;\n count++;\n }//End if statement\n }//End for loop\n }//End while loop\n \n return count;\n }", "private String whiteSpace(String sum, String num)\n {\n\tString space = \"\";\n\tfor(int i = 0; i < sum.length() - num.length(); i++)\n\t space += \" \";\n\treturn space;\n }", "void mo54419a(List<String> list);", "List<C1113b> mo5874b(String str);", "public static List<String> stringList() {\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.add(\"abdxxx\");\n\t\tlist.add(\"xxxxx\");\n\t\tlist.add(\"hi\");\n\t\tlist.add(\"SmoothStack\");\n\t\tlist.add(\"Wyatt x Wyatt x\");\n\t\treturn list;\n\t}", "private static String[] resetStringArray() {\n String[] st = new String[L_MAX];\n L = 2 << 8;\n W = 9;\n int i;\n // initialize symbol table with all 1-character strings\n for (i = 0; i < R; i++)\n st[i] = \"\" + (char) i;\n st[i++] = \"\"; // (unused) lookahead for EOF\n return st;\n }", "public void setUp2( )\n\t{\n\t\tfor( int i = 0; i < 1000; i++ )\n\t\t{\n\t\t\tlista.append( \"\" + i );\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tList<Character>st1=new ArrayList<>();\n\t\n\t\tst1.add('a');\n\t\tst1.add('b');\n\t\tst1.add('a');\n\t\tst1.add('a');\n\t\tst1.add('c');\n\t\tst1.add('t');\n\t\n\t\tSystem.out.println(st1);//[a, b, a, a, c, t]\n\t\t\n\t\tList<Character>st2=new ArrayList<>();//empty []\n\t\tfor (int i=0; i<st1.size();i++) {\n\t\t\tif(!st2.contains(st1.get(i))) {\n\t\t\t\t// created str2 [empty], we will get the element from st1 to st2 while checking if there is repetition \n\t\t\t\tst2.add(st1.get(i));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(st2);//[a, b, c, t]\n\t\t\n\n\t}", "private void many(Set<String> s) {\n\t\twhile (!done() && s.contains(program.charAt(pos)+\"\"))\n\t\t\tpos++;\n }", "private static String createPrepStmPlaceHolder(int num) {\n\t\tchar[] c_ar = new char[num*3];\n\t\tc_ar[0] = '(';\n\t\tc_ar[1] = '?';\n\t\tfor(int i=1; i<num; ++i) {\n\t\t\tc_ar[3*i-1] = ',';\n\t\t\tc_ar[3*i] = ' ';\n\t\t\tc_ar[3*i+1] = '?';\n\t\t}\n\t\tc_ar[3*num-1] = ')';\n\t\treturn new String(c_ar);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_2() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\", false), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "private void exercise1() {\n final List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerList = list.stream()\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }", "private static String repeatSpace(int number) {\n StringBuilder space = new StringBuilder();\n\n // Adding spaces.\n for (int i = 0; i < number; i++) {\n space.append(\" \");\n }\n\n //returning spaces.\n return space.toString();\n }", "public void mo88640a(List<String> list) {\n List<String> stringList = RxPreferences.INSTANCE.getStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), new ArrayList());\n stringList.addAll(0, list);\n RxPreferences.INSTANCE.putStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), (List) StreamSupport.m150134a(stringList).mo131128a(new AbstractC32239o(new HashSet(stringList)) {\n /* class com.zhihu.android.p1480db.fragment.customview.C18240x255e53c2 */\n private final /* synthetic */ HashSet f$0;\n\n {\n this.f$0 = r1;\n }\n\n @Override // java8.util.p2234b.AbstractC32239o\n public final boolean test(Object obj) {\n return DbEditorSuggestTagCustomView.m93354a(this.f$0, (String) obj);\n }\n }).mo131126a(5).mo131125a(Collectors.m150203a($$Lambda$ofunvu1bqmYbfXGEtxXaV_csE4M.INSTANCE)));\n }", "public Builder addOpenWhiteListBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n ensureOpenWhiteListIsMutable();\n openWhiteList_.add(value);\n onChanged();\n return this;\n }", "@Test\n public void noSpacesBetweenKeywordsTest() {\n tester.yields(\"LaLaLaLaLaaaLi\", lala.EXPRESSION);\n }", "private int skipLeadingWhite( List content, int start) {\r\n if (start < 0) {\r\n start = 0;\r\n }\r\n\r\n int index = start;\r\n int size = content.size();\r\n if (currentFormat.trimAllWhite\r\n || currentFormat.textNormalize\r\n || currentFormat.textTrim) {\r\n while( index < size) {\r\n if ( !isAllWhitespace( content.get(index))) {\r\n return index;\r\n }\r\n index++;\r\n }\r\n }\r\n return index;\r\n }", "private void initWhitespace(Set<String> s) {\n\t\ts.add(\" \");\n\t\ts.add(\"\\n\");\n\t\ts.add(\"\\t\");\n }", "List<C1111j> mo5869a(int i);", "private void appendPlaceHolder(StringBuilder builder, int indent, int consecutiveExcluded, String message) {\n indent(builder, indent);\n builder.append(ELLIPSIS)\n .append(\" \")\n .append(consecutiveExcluded)\n .append(\" \")\n .append(message)\n .append(CoreConstants.LINE_SEPARATOR);\n }", "public void visiualizeSkipList(){\r\n\t\tint number=0;\r\n\t\tNode dummy = sl.getFrom(0,0);\r\n\t\t\r\n\t\tNode next;\r\n\t\tfor(int i=sl.height(); i>=0; i--){\r\n\t\t\t\r\n\t\t\tnext = sl.getFrom(i,0);\r\n\t\t\t\r\n\t\t\tfor(int j=0; j<(sl.size()+2); j++){\r\n\r\n\t\t\t\tnumber = next.getKey();\r\n\t\t\t\t//F.p(number);\r\n\t\t\t\tif(number==dummy.getKey()){\r\n\r\n\t\t\t\t\tif(number==minf)\r\n\t\t\t\t\t\tSystem.out.print(\"-inf\");\r\n\t\t\t\t\telse if(number==inf)\r\n\t\t\t\t\t\tSystem.out.print(\"---inf\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(\"-\",2)+number);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(\"-\",4));\r\n\t\t\t\t\r\n\t\t\t\tif(dummy.getKey()==number)\r\n\t\t\t\t\tnext = next.getRight();\r\n\t\t\t\t\r\n\t\t\t\tdummy = dummy.getRight();\r\n\t\t\t}\r\n\t\t\tdummy = sl.getFrom(0,0);\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "public long getWhiteSpacesCount() {\n return whiteSpacesCount;\n }", "@Test\n\tpublic void testStartingIndicesRegression(){\n\t\tassertLeftmostStartingIndices(\"5,1,7,3,2|-..xxx$1..x...xxx$3....-xx........\", 0, 6, 8, 18, 22);\n\t\tassertRightmostStartingIndices(\"7,5|.......xxx$1....xxx$2..-\", 6, 14);\n\t\t\n\t}", "public MacroList() {\n\t\tthis.macrosses = new HashMap<Integer, String>(12);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_1() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\"), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n String s=\"a /*a*/ sd /*v*/\";\n Pattern p = Pattern.compile(\"(\\\\/\\\\*(\\\\w|\\r\\n)+\\\\*\\\\/)\");\n Matcher m = p.matcher(s);\n List<String> l = new ArrayList<>(100);\n\n while (m.find()) {\n System.out.println(\"tick\");\n l.add(s.substring(m.start()+2, m.end()-2));\n }\n\n System.out.println(l);\n }", "StringPatternCounter(ArrayList<StringPattern> stringPatternList, String fileInput)\n {\n super(fileInput);\n this.stringPatternList = stringPatternList;\n }", "@Before\n public void createString(){\n s1 = \"casa\";\n\ts2 = \"cassa\";\n\ts3 = \"\";\n\ts4 = \"casa\";\n }", "public String minRemoveToMakeValid(String s) {\n int openAvail = 0;\n Set<Integer> skipSet = new HashSet<>();\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) == ')') {\n if (openAvail == 0) {\n skipSet.add(i);\n } else {\n openAvail -= 1;\n }\n } else if (s.charAt(i) == '(') {\n openAvail += 1;\n }\n }\n\n int closedAvail = 0;\n for (int i = s.length() - 1; i >= 0; i--) {\n if (s.charAt(i) == ')') {\n closedAvail += 1;\n } else if (s.charAt(i) == '(') {\n if (closedAvail == 0) {\n skipSet.add(i);\n } else {\n closedAvail -= 1; \n }\n }\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < s.length(); i++) {\n if (!skipSet.contains(i)){\n sb.append(s.charAt(i));\n }\n }\n return sb.toString();\n }", "@Test(timeout = 4000)\n public void test20() throws Throwable {\n StringReader stringReader0 = new StringReader(\"0(Hu\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer2 = new StreamTokenizer(stringReader0);\n JSTerm jSTerm0 = new JSTerm(streamTokenizer0);\n stringReader0.reset();\n StreamTokenizer streamTokenizer3 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer4 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer5 = new StreamTokenizer(stringReader0);\n streamTokenizer0.commentChar((-4));\n StreamTokenizer streamTokenizer6 = new StreamTokenizer(stringReader0);\n streamTokenizer6.ordinaryChars((-1), (-322070664));\n streamTokenizer1.parseNumbers();\n jSTerm0.add((Object) \"JSTerm: Error reading control parameters: \");\n StreamTokenizer streamTokenizer7 = new StreamTokenizer(stringReader0);\n streamTokenizer7.pushBack();\n streamTokenizer1.nextToken();\n StreamTokenizer streamTokenizer8 = new StreamTokenizer(stringReader0);\n streamTokenizer2.slashSlashComments(false);\n JSTerm jSTerm1 = new JSTerm(streamTokenizer5);\n streamTokenizer1.slashStarComments(false);\n streamTokenizer3.eolIsSignificant(false);\n streamTokenizer7.commentChar((-4));\n StreamTokenizer streamTokenizer9 = new StreamTokenizer(stringReader0);\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n jSSubstitution0.listIterator();\n JSSubstitution jSSubstitution1 = jSTerm1.matches((JSPredicateForm) jSTerm0, jSSubstitution0);\n assertTrue(jSSubstitution1.fail());\n }", "public Removalstops()\n {\n stopWords.add(\"am\");\n stopWords.add(\"my\");\nstopWords.add(\"at\");\nstopWords.add(\"a\");\nstopWords.add(\"i\");\nstopWords.add(\"is\");\nstopWords.add(\"of\");\nstopWords.add(\"have\");\nstopWords.add(\"--\");\nstopWords.add(\"do\");\nstopWords.add(\"the\");\nstopWords.add(\"was\");\nstopWords.add(\"iam\");\nstopWords.add(\"there\");\nstopWords.add(\"what\");\nstopWords.add(\"for\");\nstopWords.add(\"in\");\nstopWords.add(\"very\");\nstopWords.add(\"and\");\nstopWords.add(\"to\");\nstopWords.add(\"often\");\nstopWords.add(\"because\");\nstopWords.add(\"in\");\nstopWords.add(\"an\");\nstopWords.add(\"can\");\nstopWords.add(\"via\");\nstopWords.add(\"even\");\nstopWords.add(\"as\");\nstopWords.add(\"best\");\nstopWords.add(\"been\");\nstopWords.add(\"into\");\nstopWords.add(\"by\");\nstopWords.add(\"around\");\nstopWords.add(\"being\");\nstopWords.add(\"from\");\nstopWords.add(\"etc\");\nstopWords.add(\"his\");\nstopWords.add(\"do\");\nstopWords.add(\"have\");\nstopWords.add(\"had\"); \nstopWords.add(\"able\");\nstopWords.add(\"about\");\nstopWords.add(\"above\");\nstopWords.add(\"abroad\");\nstopWords.add(\"according\");\nstopWords.add(\"accordingly\");\nstopWords.add(\"across\");\nstopWords.add(\"actually\");\nstopWords.add(\"adj\");\nstopWords.add(\"after\");\nstopWords.add(\"afterwards\");\nstopWords.add(\"again\");\nstopWords.add(\"against\");\nstopWords.add(\"ago\");\nstopWords.add(\"ahead\");\nstopWords.add(\"ain't\");\nstopWords.add(\"all\");\nstopWords.add(\"allow\");\nstopWords.add(\"allows\");\nstopWords.add(\"almost\");\nstopWords.add(\"alone\");\nstopWords.add(\"along\");\nstopWords.add(\"alongside\");\nstopWords.add(\"already\");\nstopWords.add(\"also\");\nstopWords.add(\"although\");\nstopWords.add(\"always\");\nstopWords.add(\"am\");\nstopWords.add(\"amid\");\nstopWords.add(\"amidst\");\nstopWords.add(\"among\");\nstopWords.add(\"amongst\");\nstopWords.add(\"an\");\nstopWords.add(\"and\");\nstopWords.add(\"another\");\nstopWords.add(\"any\");\nstopWords.add(\"anybody\");\nstopWords.add(\"anyhow\");\nstopWords.add(\"anyone\");\nstopWords.add(\"anything\");\nstopWords.add(\"anyway\");\nstopWords.add(\"anyways\");\nstopWords.add(\"anywhere\");\nstopWords.add(\"apart\");\nstopWords.add(\"appear\");\nstopWords.add(\"appreciate\");\nstopWords.add(\"appropriate\");\nstopWords.add(\"are\");\nstopWords.add(\"aren't\");\nstopWords.add(\"around\");\nstopWords.add(\"as\");\nstopWords.add(\"a's\");\nstopWords.add(\"aside\");\nstopWords.add(\"ask\");\nstopWords.add(\"asking\");\nstopWords.add(\"associated\");\nstopWords.add(\"at\");\nstopWords.add(\"available\");\nstopWords.add(\"away\");\nstopWords.add(\"awfully\");\nstopWords.add(\"back\");\nstopWords.add(\"backward\");\nstopWords.add(\"backwards\");\nstopWords.add(\"be\");\nstopWords.add(\"became\");\nstopWords.add(\"beacause\");\nstopWords.add(\"become\");\nstopWords.add(\"becomes\");\nstopWords.add(\"becoming\");\nstopWords.add(\"been\");\nstopWords.add(\"before\");\nstopWords.add(\"beforehand\");\nstopWords.add(\"begin\");\nstopWords.add(\"behind\");\nstopWords.add(\"being\");\nstopWords.add(\"believe\");\nstopWords.add(\"below\");\nstopWords.add(\"beside\");\nstopWords.add(\"besides\");\nstopWords.add(\"best\");\nstopWords.add(\"better\");\nstopWords.add(\"between\");\nstopWords.add(\"beyond\");\nstopWords.add(\"both\");\nstopWords.add(\"brief\");\nstopWords.add(\"but\");\nstopWords.add(\"by\");\nstopWords.add(\"came\");\nstopWords.add(\"can\");\nstopWords.add(\"cannot\");\nstopWords.add(\"cant\");\nstopWords.add(\"can't\");\nstopWords.add(\"caption\");\nstopWords.add(\"cause\");\nstopWords.add(\"causes\");\nstopWords.add(\"certain\");\nstopWords.add(\"cetrainly\");\nstopWords.add(\"changes\");\nstopWords.add(\"clearly\");\nstopWords.add(\"c'mon\");\nstopWords.add(\"co\");\nstopWords.add(\"co.\");\nstopWords.add(\"com\");\nstopWords.add(\"come\");\nstopWords.add(\"comes\");\nstopWords.add(\"concerning\");\nstopWords.add(\"consequently\");\nstopWords.add(\"consider\");\nstopWords.add(\"considering\");\nstopWords.add(\"could\");\nstopWords.add(\"couldn't\");\nstopWords.add(\"c's\");\nstopWords.add(\"currently\");\nstopWords.add(\"dare\");\nstopWords.add(\"daren't\");\nstopWords.add(\"definitely\");\nstopWords.add(\"described\");\nstopWords.add(\"despite\");\nstopWords.add(\"did\");\nstopWords.add(\"didn't\");\nstopWords.add(\"different\");\nstopWords.add(\"directly\");\nstopWords.add(\"do\");\nstopWords.add(\"does\");\nstopWords.add(\"doesn't\");\nstopWords.add(\"doing\");\nstopWords.add(\"done\");\nstopWords.add(\"don't\");\nstopWords.add(\"down\");\nstopWords.add(\"downwards\");\nstopWords.add(\"during\");\nstopWords.add(\"each\");\nstopWords.add(\"edu\");\nstopWords.add(\"eg\");\nstopWords.add(\"eight\");\nstopWords.add(\"eighty\");\nstopWords.add(\"either\");\nstopWords.add(\"else\");\nstopWords.add(\"elsewhere\");\nstopWords.add(\"end\");\nstopWords.add(\"ending\");\nstopWords.add(\"enough\");\nstopWords.add(\"entirely\");\nstopWords.add(\"especially\");\nstopWords.add(\"et\");\nstopWords.add(\"etc\");\nstopWords.add(\"even\");\nstopWords.add(\"evenmore\");\nstopWords.add(\"every\");\nstopWords.add(\"everybody\");\nstopWords.add(\"everyone\");\nstopWords.add(\"everything\");\nstopWords.add(\"everywhere\");\nstopWords.add(\"ex\");\nstopWords.add(\"exactly\");\nstopWords.add(\"example\");\nstopWords.add(\"except\");\nstopWords.add(\"fairly\");\nstopWords.add(\"far\");\nstopWords.add(\"farhter\");\nstopWords.add(\"few\");\nstopWords.add(\"fewer\");\nstopWords.add(\"fifth\");\nstopWords.add(\"first\");\nstopWords.add(\"five\");\nstopWords.add(\"followed\");\nstopWords.add(\"following\");\nstopWords.add(\"follows\");\nstopWords.add(\"for\");\nstopWords.add(\"forever\");\nstopWords.add(\"former\");\nstopWords.add(\"formerly\");\nstopWords.add(\"forth\");\nstopWords.add(\"forward\");\nstopWords.add(\"found\");\nstopWords.add(\"four\");\nstopWords.add(\"from\");\nstopWords.add(\"further\");\nstopWords.add(\"furthermore\");\nstopWords.add(\"get\");\nstopWords.add(\"gets\");\nstopWords.add(\"getting\");\nstopWords.add(\"given\");\nstopWords.add(\"gives\");\nstopWords.add(\"go\");\nstopWords.add(\"goes\");\nstopWords.add(\"going\");\nstopWords.add(\"gone\");\nstopWords.add(\"got\");\nstopWords.add(\"gotten\");\nstopWords.add(\"greetings\");\nstopWords.add(\"had\");\nstopWords.add(\"hadn't\");\nstopWords.add(\"half\");\nstopWords.add(\"happens\");\nstopWords.add(\"hardly\");\nstopWords.add(\"has\");\nstopWords.add(\"hasn't\");\nstopWords.add(\"have\");\nstopWords.add(\"haven't\");\nstopWords.add(\"having\");\nstopWords.add(\"he\");\nstopWords.add(\"he'd\");\nstopWords.add(\"he'll\");\nstopWords.add(\"hello\");\nstopWords.add(\"help\");\nstopWords.add(\"hence\");\nstopWords.add(\"her\");\nstopWords.add(\"here\");\nstopWords.add(\"hereafter\");\nstopWords.add(\"hereby\");\nstopWords.add(\"herein\");\nstopWords.add(\"here's\");\nstopWords.add(\"hereupon\");\nstopWords.add(\"hers\");\nstopWords.add(\"herself\");\nstopWords.add(\"he's\");\nstopWords.add(\"hi\");\nstopWords.add(\"him\");\nstopWords.add(\"himself\");\nstopWords.add(\"his\");\nstopWords.add(\"hither\");\nstopWords.add(\"hopefully\");\nstopWords.add(\"how\");\nstopWords.add(\"howbeit\");\nstopWords.add(\"however\");\nstopWords.add(\"however\");\nstopWords.add(\"hundred\");\nstopWords.add(\"i'd\");\nstopWords.add(\"ie\");\nstopWords.add(\"if\");\nstopWords.add(\"ignored\");\nstopWords.add(\"i'll\");\nstopWords.add(\"i'm\");\nstopWords.add(\"immediate\");\nstopWords.add(\"in\");\nstopWords.add(\"iansmuch\");\nstopWords.add(\"inc\");\nstopWords.add(\"inc.\");\nstopWords.add(\"indeed\");\nstopWords.add(\"indicate\");\nstopWords.add(\"indicated\");\nstopWords.add(\"indicates\");\nstopWords.add(\"inner\");\nstopWords.add(\"inside\");\nstopWords.add(\"insofar\");\nstopWords.add(\"into\");\nstopWords.add(\"inward\");\nstopWords.add(\"is\");\nstopWords.add(\"isn't\");\nstopWords.add(\"it\");\nstopWords.add(\"it'd\");\nstopWords.add(\"it'll\");\nstopWords.add(\"its\");\nstopWords.add(\"it's\");\nstopWords.add(\"itself\");\nstopWords.add(\"i've\");\nstopWords.add(\"just\");\nstopWords.add(\"k\");\nstopWords.add(\"keep\");\nstopWords.add(\"keeps\");\nstopWords.add(\"kept\");\nstopWords.add(\"know\");\nstopWords.add(\"knows\");\nstopWords.add(\"known\");\nstopWords.add(\"last\");\nstopWords.add(\"lately\");\nstopWords.add(\"later\");\nstopWords.add(\"latter\");\nstopWords.add(\"latterly\");\nstopWords.add(\"least\");\nstopWords.add(\"less\");\nstopWords.add(\"let\");\nstopWords.add(\"let's\");\nstopWords.add(\"like\");\nstopWords.add(\"liked\");\nstopWords.add(\"likely\");\nstopWords.add(\"likewise\");\nstopWords.add(\"little\");\nstopWords.add(\"look\");\nstopWords.add(\"looks\");\nstopWords.add(\"low\");\nstopWords.add(\"lower\");\nstopWords.add(\"ltd\");\nstopWords.add(\"made\");\nstopWords.add(\"mainly\");\nstopWords.add(\"make\");\nstopWords.add(\"makes\");\nstopWords.add(\"many\");\nstopWords.add(\"may\");\nstopWords.add(\"maybe\");\nstopWords.add(\"mayn't\");\nstopWords.add(\"me\");\nstopWords.add(\"mean\");\nstopWords.add(\"meanwhile\");\nstopWords.add(\"merely\");\nstopWords.add(\"might\");\nstopWords.add(\"mightn't\");\nstopWords.add(\"mine\");\nstopWords.add(\"minus\");\nstopWords.add(\"miss\");\nstopWords.add(\"more\");\nstopWords.add(\"moreover\");\nstopWords.add(\"most\");\nstopWords.add(\"mostly\");\nstopWords.add(\"mr\");\nstopWords.add(\"mrs\");\nstopWords.add(\"much\");\nstopWords.add(\"must\");\nstopWords.add(\"mustn't\");\nstopWords.add(\"my\");\nstopWords.add(\"myself\");\nstopWords.add(\"name\");\nstopWords.add(\"namely\");\nstopWords.add(\"nd\");\nstopWords.add(\"near\");\nstopWords.add(\"nearly\");\nstopWords.add(\"necessary\");\nstopWords.add(\"need\");\nstopWords.add(\"needn't\");\nstopWords.add(\"needs\");\nstopWords.add(\"neither\");\nstopWords.add(\"never\");\nstopWords.add(\"neverf\");\nstopWords.add(\"neverless\");\nstopWords.add(\"nevertheless\");\nstopWords.add(\"new\");\nstopWords.add(\"next\");\nstopWords.add(\"nine\");\nstopWords.add(\"ninety\");\nstopWords.add(\"no\");\nstopWords.add(\"nobody\");\nstopWords.add(\"non\");\nstopWords.add(\"none\");\nstopWords.add(\"nonetheless\");\nstopWords.add(\"noone\");\nstopWords.add(\"no-one\");\nstopWords.add(\"nor\");\nstopWords.add(\"normally\");\nstopWords.add(\"not\");\nstopWords.add(\"nothing\");\nstopWords.add(\"notwithstanding\");\nstopWords.add(\"novel\");\nstopWords.add(\"now\");\nstopWords.add(\"nowwhere\");\nstopWords.add(\"obviously\");\nstopWords.add(\"of\");\nstopWords.add(\"off\");\nstopWords.add(\"often\");\nstopWords.add(\"oh\");\nstopWords.add(\"ok\");\nstopWords.add(\"okay\");\nstopWords.add(\"old\");\nstopWords.add(\"on\");\nstopWords.add(\"once\");\nstopWords.add(\"one\");\nstopWords.add(\"ones\");\nstopWords.add(\"one's\");\nstopWords.add(\"only\");\nstopWords.add(\"onto\");\nstopWords.add(\"opposite\");\nstopWords.add(\"or\");\nstopWords.add(\"other\");\nstopWords.add(\"others\");\nstopWords.add(\"otherwise\");\nstopWords.add(\"ought\");\nstopWords.add(\"oughtn't\");\nstopWords.add(\"our\");\nstopWords.add(\"ourselves\");\nstopWords.add(\"out\");\nstopWords.add(\"outside\");\nstopWords.add(\"over\");\nstopWords.add(\"overall\");\nstopWords.add(\"own\");\nstopWords.add(\"particular\");\nstopWords.add(\"particularly\");\nstopWords.add(\"past\");\nstopWords.add(\"per\");\nstopWords.add(\"perhaps\");\nstopWords.add(\"placed\");\nstopWords.add(\"please\");\nstopWords.add(\"plus\");\nstopWords.add(\"possible\");\nstopWords.add(\"presumably\");\nstopWords.add(\"probably\");\nstopWords.add(\"provided\");\nstopWords.add(\"provides\");\nstopWords.add(\"que\");\nstopWords.add(\"quite\");\nstopWords.add(\"qv\");\nstopWords.add(\"rather\");\nstopWords.add(\"rd\");\nstopWords.add(\"re\");\nstopWords.add(\"really\");\nstopWords.add(\"reasonably\");\nstopWords.add(\"recent\");\nstopWords.add(\"recently\");\nstopWords.add(\"regarding\");\nstopWords.add(\"regardless\");\nstopWords.add(\"regards\");\nstopWords.add(\"relatively\");\nstopWords.add(\"respectively\");\nstopWords.add(\"right\");\nstopWords.add(\"round\");\nstopWords.add(\"said\");\nstopWords.add(\"same\");\nstopWords.add(\"saw\");\nstopWords.add(\"say\");\nstopWords.add(\"saying\");\nstopWords.add(\"says\");\nstopWords.add(\"second\");\nstopWords.add(\"secondly\");\nstopWords.add(\"see\");\nstopWords.add(\"seeing\");\nstopWords.add(\"seem\");\nstopWords.add(\"seemed\");\nstopWords.add(\"seeming\");\nstopWords.add(\"seems\");\nstopWords.add(\"seen\");\nstopWords.add(\"self\");\nstopWords.add(\"selves\");\nstopWords.add(\"sensible\");\nstopWords.add(\"sent\");\nstopWords.add(\"serious\");\nstopWords.add(\"seriously\");\nstopWords.add(\"seven\");\nstopWords.add(\"several\");\nstopWords.add(\"shall\");\nstopWords.add(\"shan't\");\nstopWords.add(\"she\");\nstopWords.add(\"she'd\");\nstopWords.add(\"she'll\");\nstopWords.add(\"she's\");\nstopWords.add(\"should\");\nstopWords.add(\"shouldn't\");\nstopWords.add(\"since\");\nstopWords.add(\"six\");\nstopWords.add(\"so\");\nstopWords.add(\"some\");\nstopWords.add(\"somebody\");\nstopWords.add(\"someday\");\nstopWords.add(\"somehow\");\nstopWords.add(\"someone\");\nstopWords.add(\"something\");\nstopWords.add(\"sometime\");\nstopWords.add(\"sometimes\");\nstopWords.add(\"somewhat\");\nstopWords.add(\"somewhere\");\nstopWords.add(\"soon\");\nstopWords.add(\"sorry\");\nstopWords.add(\"specified\");\nstopWords.add(\"specify\");\nstopWords.add(\"specifying\");\nstopWords.add(\"still\");\nstopWords.add(\"sub\");\nstopWords.add(\"such\");\nstopWords.add(\"sup\");\nstopWords.add(\"sure\");\nstopWords.add(\"take\");\nstopWords.add(\"taken\");\nstopWords.add(\"taking\");\nstopWords.add(\"tell\");\nstopWords.add(\"tends\");\nstopWords.add(\"th\");\nstopWords.add(\"than\");\nstopWords.add(\"thank\");\nstopWords.add(\"thanks\");\nstopWords.add(\"thanx\");\nstopWords.add(\"that\");\nstopWords.add(\"that'll\");\nstopWords.add(\"thats\");\nstopWords.add(\"that've\");\nstopWords.add(\"the\");\nstopWords.add(\"their\");\nstopWords.add(\"theirs\");\nstopWords.add(\"them\");\nstopWords.add(\"themselves\");\nstopWords.add(\"then\");\nstopWords.add(\"thence\");\nstopWords.add(\"there\");\nstopWords.add(\"thereafter\");\nstopWords.add(\"thereby\");\nstopWords.add(\"there'd\");\nstopWords.add(\"therefore\");\nstopWords.add(\"therein\");\nstopWords.add(\"ther'll\");\nstopWords.add(\"there're\");\nstopWords.add(\"theres\");\nstopWords.add(\"there's\");\nstopWords.add(\"thereupon\");\nstopWords.add(\"there've\");\nstopWords.add(\"these\");\nstopWords.add(\"they\");\nstopWords.add(\"they'd\");\nstopWords.add(\"they'll\");\nstopWords.add(\"they're\");\nstopWords.add(\"they've\");\nstopWords.add(\"thing\");\nstopWords.add(\"things\");\nstopWords.add(\"think\");\nstopWords.add(\"third\");\nstopWords.add(\"thirty\");\nstopWords.add(\"this\");\nstopWords.add(\"thorough\");\nstopWords.add(\"thoroughly\");\nstopWords.add(\"those\");\nstopWords.add(\"though\");\nstopWords.add(\"throughout\");\nstopWords.add(\"thru\");\nstopWords.add(\"thus\");\nstopWords.add(\"till\");\nstopWords.add(\"to\");\nstopWords.add(\"together\");\nstopWords.add(\"too\");\nstopWords.add(\"took\");\nstopWords.add(\"toward\");\nstopWords.add(\"towards\");\nstopWords.add(\"tried\");\nstopWords.add(\"tries\");\nstopWords.add(\"truly\");\nstopWords.add(\"try\");\nstopWords.add(\"trying\");\nstopWords.add(\"t's\");\nstopWords.add(\"twice\");\nstopWords.add(\"two\");\nstopWords.add(\"un\");\nstopWords.add(\"under\");\nstopWords.add(\"underneath\");\nstopWords.add(\"undoing\");\nstopWords.add(\"unfortunately\");\nstopWords.add(\"unless\");\nstopWords.add(\"unlike\");\nstopWords.add(\"unlikely\");\nstopWords.add(\"untill\");\nstopWords.add(\"unto\");\nstopWords.add(\"up\");\nstopWords.add(\"upon\");\nstopWords.add(\"upwards\");\nstopWords.add(\"us\");\nstopWords.add(\"use\");\nstopWords.add(\"used\");\nstopWords.add(\"useful\");\nstopWords.add(\"uses\");\nstopWords.add(\"using\");\nstopWords.add(\"usually\");\nstopWords.add(\"v\");\nstopWords.add(\"value\");\nstopWords.add(\"various\");\nstopWords.add(\"versus\");\nstopWords.add(\"very\");\nstopWords.add(\"via\");\nstopWords.add(\"viz\");\nstopWords.add(\"vs\");\nstopWords.add(\"want\");\nstopWords.add(\"wants\");\nstopWords.add(\"was\");\nstopWords.add(\"wasn't\");\nstopWords.add(\"way\");\nstopWords.add(\"we\");\nstopWords.add(\"we'd\");\nstopWords.add(\"welcome\");\nstopWords.add(\"well\");\nstopWords.add(\"we'll\");\nstopWords.add(\"went\");\nstopWords.add(\"were\");\nstopWords.add(\"we're\");\nstopWords.add(\"weren't\");\nstopWords.add(\"we've\");\nstopWords.add(\"what\");\nstopWords.add(\"whatever\");\nstopWords.add(\"what'll\");\nstopWords.add(\"what's\");\nstopWords.add(\"what've\");\nstopWords.add(\"when\");\nstopWords.add(\"whence\");\nstopWords.add(\"whenever\");\nstopWords.add(\"where\");\nstopWords.add(\"whereafter\");\nstopWords.add(\"whereas\");\nstopWords.add(\"whereby\");\nstopWords.add(\"wherein\");\nstopWords.add(\"where's\");\nstopWords.add(\"whereupon\");\nstopWords.add(\"whereever\");\nstopWords.add(\"whether\");\nstopWords.add(\"which\");\nstopWords.add(\"whichever\");\nstopWords.add(\"while\");\nstopWords.add(\"whilst\");\nstopWords.add(\"whither\");\nstopWords.add(\"who\");\nstopWords.add(\"who'd\");\nstopWords.add(\"whoever\");\nstopWords.add(\"whole\");\nstopWords.add(\"who'll\");\nstopWords.add(\"whom\");\nstopWords.add(\"whomever\");\nstopWords.add(\"who's\");\nstopWords.add(\"whose\");\nstopWords.add(\"why\");\nstopWords.add(\"will\");\nstopWords.add(\"willing\");\nstopWords.add(\"wish\");\nstopWords.add(\"with\");\nstopWords.add(\"within\");\nstopWords.add(\"without\");\nstopWords.add(\"wonder\");\nstopWords.add(\"won't\");\nstopWords.add(\"would\");\nstopWords.add(\"wouldn't\");\nstopWords.add(\"yes\");\nstopWords.add(\"yet\");\nstopWords.add(\"you\");\nstopWords.add(\"you'd\");\nstopWords.add(\"you'll\");\nstopWords.add(\"your\");\nstopWords.add(\"you're\");\nstopWords.add(\"yours\");\nstopWords.add(\"yourself\");\nstopWords.add(\"you've\");\nstopWords.add(\"zero\");\n\n \n \n }", "@SuppressWarnings(\"resource\")\n public static void doubleCapacity(String[] array){\n int wordCount = 0;\n int arrayGrowth = 500;\n array = new String[10];\n String strLine = null;\n while (strLine != null) {\n // Store the content into an array\n Scanner s = new Scanner(strLine);\n while (s.hasNext()) {\n if (array.length == wordCount) {\n // expand list\n array = Arrays.copyOf(array, array.length + arrayGrowth);\n }\n array[wordCount] = s.next();\n wordCount++;\n } \n }\n }", "private int skipTrialingWhite( List content, int start) {\r\n int size = content.size();\r\n if (start > size) {\r\n start = size;\r\n }\r\n\r\n int index = start;\r\n if (currentFormat.trimAllWhite\r\n || currentFormat.textNormalize\r\n || currentFormat.textTrim) {\r\n while( index >= 0) {\r\n if ( !isAllWhitespace( content.get(index - 1)))\r\n break;\r\n --index;\r\n }\r\n }\r\n return index;\r\n }", "public abstract void mo9247b(String str, long j, List<String> list);", "private void fillSet() {\r\n\t\tString regex = \"\\\\p{L}+\";\r\n\t\tMatcher matcher = Pattern.compile(regex).matcher(body);\r\n\t\twhile (matcher.find()) {\r\n\t\t\tif (!matcher.group().isEmpty()) {\r\n\t\t\t\twords.add(matcher.group());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private ArrayList<Integer> getEmptySpaces(char[] board) {\n ArrayList<Integer> emptySpaces = new ArrayList<>();\n for (int i = 0; i < board.length; i++) {\n if (board[i] == ' ') {\n emptySpaces.add(i);\n }\n }\n return emptySpaces;\n }", "void mo13370a(int i, int i2, List<C15929a> list) throws IOException;", "private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }", "private static Stream<List<Tile>> substituteBlanks(List<Tile> p) {\n Stream<List<Tile>> res = Stream.of(p);\n //Iterate through all letters.\n for (int i = 0; i < p.size(); i++) {\n //Check for blanks.\n if (p.get(i).getLetter() == Character.MIN_VALUE) {\n //If blank found, substitute it for all a-z, and look again for next blank.\n res = substituteBlankAtIndex(p, i)\n .flatMap(s -> substituteBlanks(s));\n }\n }\n\n return res;\n }", "public static void main(String[] args) {\n String[] strings = new String[100];\n for (int i = 0; i < strings.length; i++) {\n strings[i] = randomStrings(2);\n }\n// for (String s : strings) {\n// System.out.println(s);\n// }\n ArrayList<String> appeared = new ArrayList<>();\n for (String s : strings) {\n if (!appeared.contains(s)) {\n appeared.add(s);\n }\n }\n System.out.println(appeared.size());\n\n }", "private IgnoreListHelper() {\n\t}", "@Test\n\t public void test5 ()\n\t{\n\t\t\tString s = new String(\"aaabaaaaabaabaaaabaaaaaaaaaaaaaabaaaaaaaaaaaaaaabaaaaaaaaaaaaaaba\");\n\t s = s.replaceAll(\"\\\\s+\", \" \");\n\t assertEquals(\"aaaaaaaaaaaaaabaaaaaaaaaaaaaa\", LRS.lrs(s)); \n\t}", "public static List<String> findRepeatedDnaSequences(String s) {\n \tList<String> re=new ArrayList<String>();\n \tif(s.length()<=10){\n \t\treturn re;\n \t}\n \tMap<String, Integer> map=new HashMap<String, Integer>(); \t\n \tfor(int i=10; i<=s.length(); i++){\n \t\tString k=s.substring(i-10, i);\n \t\tif(map.containsKey(k)){\n \t\t\tint val=map.get(k);\n \t\t\tif(val==1){\n \t\t\t\tre.add(k);\n \t\t\t}\n \t\t\tmap.put(k, val+1);\n \t\t}else{\n \t\t\tmap.put(k, 1);\n \t\t}\n \t}\n \treturn re;\n }", "public static void main(){\r\n\t\t\r\n\t\tArrayList<tok> pHolder = new ArrayList<tok>();\r\n\r\n\t\t pHolder.add(new tok(\"@\", \"@\"));\r\n\t\t\r\n\t\treturn;\r\n\t}", "public void mo9497b(List<String> list) {\n this.f1514c = list;\n }", "private void listEntries(BufferedWriter bw, String previous, int start, int end, String zeroes) throws IOException {\n\t\tint writeStart = -1;\n\t\tStringBuilder sb = new StringBuilder();\n\t\tchar c;\n\t\tfor (int i = 0, l = previous.length(); i < l && writeStart == -1; i++) {\n\t\t\tc = previous.charAt(i);\n\t\t\tif (Character.isDigit(c)) {sb.append(c);}\n\t\t\telse {writeStart = Integer.parseInt(sb.toString());}\n\t\t}\n\t\tfor (int i = start; i < end; i++) {bw.write(++writeStart + \"=\" + zeroes + i + \"\\n\");}\n\t}", "public void m20623OooO00o() {\n for (C8964ooOOo000 ooooo000 : this.f22213OooO00o) {\n OooO00o(ooooo000);\n }\n this.f22212OooO00o.clear();\n this.f22213OooO00o.clear();\n }", "public String addWhiteSpace(String str, int number) {\n\t\tStringBuilder result = new StringBuilder();\n\t\tfor (int i = 0; i < str.length(); i+=2) {\n\t\t if (i > 0) {\n\t\t\t for (int j = 0; j < number; j++)\n\t\t\t\t result.append(\" \");\n\t\t }\n\t\t result.append(str.charAt(i));\n\t\t result.append(str.charAt(i+1));\n\t\t}\n\t\treturn result.toString();\n\t}", "public static List<String> findStrobogrammatic(int n) {\n List<String> cur, ans;\n ans = new ArrayList<String>((n & 1) == 0 ? Arrays.asList(\"\") : Arrays.asList(\"0\", \"1\", \"8\"));\n if (n < 2) return ans;\n\n for (;n > 1; n -= 2) {\n cur = ans;\n ans = new ArrayList<String>();\n for (String i : cur) {\n if (n > 3) {\n ans.add('0' + i + '0');\n }\n ans.add('1' + i + '1');\n ans.add('8' + i + '8');\n ans.add('6' + i + '9');\n ans.add('9' + i + '6');\n }\n }\n System.out.println(ans.size());\n return ans;\n }", "private static List<String> induceSynonims(String word) {\n\t\treturn null;\n\t}", "private List<WordScore> liveList(List<WordScore> gridList, String s) {\n s = s.toLowerCase();\n List<WordScore> liveList = new ArrayList<>();\n for(WordScore ws : gridList){\n int nochars = s.length() - s.replaceAll(ws.getWord(), \"\").length();\n liveList.add(new WordScore(ws.getWord(), ws.getScore()-nochars));\n }\n return liveList;\n }", "private void fillRandomList()\n\t{\n\t\trandomList.add(\"I like cheese.\");\n\t\trandomList.add(\"Tortoise can move faster than slow rodent.\");\n\t\trandomList.add(\"I enjoy sitting on the ground.\");\n\t\trandomList.add(\"I like cereal.\");\n\t\trandomList.add(\"This is random.\");\n\t\trandomList.add(\"I like typing\");\n\t\trandomList.add(\"FLdlsjejf is my favorite word.\");\n\t\trandomList.add(\"I have two left toes.\");\n\t\trandomList.add(\"Sqrt(2) = 1.414213562 ...\");\n\t\trandomList.add(\"Hi mom.\");\n\t}", "public static void main(String[] args) {\n\t\tString s=\"22\";\n\t\t\n\t\tif(s.indexOf(\"1\")>=0||s.equals(\"\"))\n\t\t\tSystem.out.println(\"hello\");\n\t\t\t\n\t\tArrayList f=new ArrayList();\n\t\tint stack[]=new int[2*s.length()];\n\t\tint top=-1;\n\t\tchar a[][]=new char[][]{{},{},{'#','a','b','c','#'},{'#','d','e','f','#'},{'#','g','h','i','#'},{'#','j','k','l','#'},{'#','m','n','o','#'},{'#','p','q','r','s','#'},{'#','t','u','v','#'},{'#','w','x','y','z','#'}};\n\t\tint length[]=new int []{0,0,3,3,3,3,3,4,3,4};\n\t\tStringBuilder ans=new StringBuilder();\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tint x=stack[++top]=(int)s.charAt(i)-'0';\n\t\t\tans.append(a[x][1]);\n\t\t\tstack[++top]=1;\n\t\t}\n\t\twhile(stack[1]!=length[(int)s.charAt(0)-'0']+1){\n\t\t\tif(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\tif(s.length()==(top+1)/2){\n\t\t\t\t\twhile(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\t\t\tint r=(top-1)/2;\n\t\t\t\t\t\tchar r1=a[stack[top-1]][stack[top]];\n\t\t\t\t\t\tans.setCharAt(r, r1);\n\t\t\t\t\t\tString ans1=ans.toString();\n\t\t\t\t\t\tf.add(ans1);\n\t\t\t\t\t\tstack[top]++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t\t\ttop+=2;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[top]=1;\n\t\t\t\ttop-=2;\n\t\t\t\tstack[top]++;\n\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(f.size());\n\t}", "private void modify(List listString){\n\t}", "private String repeatM(int count){\n return new String(new char[count]).replace('\\0','M');\n }", "private static void\n eatWhite(ParseState state)\n {\n while(state.pos < state.data.length() && state.data.charAt(state.pos) == ' ')\n {\n ++state.pos;\n }\n }" ]
[ "0.55591595", "0.5524409", "0.54578066", "0.5425202", "0.53757787", "0.5364262", "0.5288061", "0.5286694", "0.5221815", "0.5211653", "0.5201803", "0.51848924", "0.518454", "0.5178811", "0.51761377", "0.5150973", "0.5141157", "0.5138997", "0.51366293", "0.5130912", "0.51279604", "0.5071481", "0.50682074", "0.50673336", "0.5058374", "0.50503725", "0.5046189", "0.5046023", "0.50277734", "0.50120145", "0.49743384", "0.4959684", "0.49513972", "0.49383563", "0.492581", "0.49236417", "0.49056625", "0.48794308", "0.48752907", "0.48583564", "0.4856731", "0.48500034", "0.48222542", "0.48127964", "0.4812774", "0.48096502", "0.48054305", "0.48029843", "0.48021927", "0.4784932", "0.47791797", "0.47657204", "0.47405565", "0.47405225", "0.47390026", "0.47360018", "0.47321254", "0.47301587", "0.47235176", "0.47201622", "0.4720113", "0.4717014", "0.47158983", "0.4708474", "0.4698091", "0.46781585", "0.46772122", "0.46698767", "0.46634603", "0.46624836", "0.46601665", "0.4651289", "0.46146277", "0.4606947", "0.4606018", "0.4604179", "0.45975944", "0.45943204", "0.45926452", "0.45925856", "0.45852026", "0.4583654", "0.45777828", "0.45770383", "0.45763302", "0.4573015", "0.45670146", "0.45669803", "0.4564498", "0.45611578", "0.45599565", "0.45561954", "0.45553017", "0.45483592", "0.45479", "0.45477003", "0.4545243", "0.45429727", "0.45390365", "0.4536908" ]
0.52332956
8
open_white_list repeated string open_white_list = 11;
public Builder addAllOpenWhiteList( java.lang.Iterable<java.lang.String> values) { ensureOpenWhiteListIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, openWhiteList_); onChanged(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SList oddWords();", "public java.lang.String getOpenWhiteList(int index) {\n return openWhiteList_.get(index);\n }", "public int getOpenWhiteListCount() {\n return openWhiteList_.size();\n }", "public java.lang.String getOpenWhiteList(int index) {\n return openWhiteList_.get(index);\n }", "public int getOpenWhiteListCount() {\n return openWhiteList_.size();\n }", "private LowercaseWordList() {\n\n }", "public Builder setOpenWhiteList(\n int index, java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureOpenWhiteListIsMutable();\n openWhiteList_.set(index, value);\n onChanged();\n return this;\n }", "static List DuplicateElements(List<Character> characters){\r\n\t\tList newlist=new ArrayList<>();\r\n\t\tfor(char c:characters)\r\n\t\t{\r\n\t\t\tnewlist.add(Collections.nCopies(2,c ));\r\n\t\r\n\t\t}\r\n\tSystem.out.println(newlist);\r\n\treturn newlist;\r\n\t}", "public Builder addOpenWhiteList(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureOpenWhiteListIsMutable();\n openWhiteList_.add(value);\n onChanged();\n return this;\n }", "public static List<String> createCompetencyList() {\n List<String> list = new ArrayList<String>();\n list.add(\"Line number 1\");\n list.add(\"Line number 2\");\n return list;\n }", "private void exercise2() {\n List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerOddLengthList = list.stream()\n .filter((string) -> string.length() % 2 != 0)\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public void setWhiteSpacesCount(long value) {\n this.whiteSpacesCount = value;\n }", "List<String> mo5877c(String str);", "java.util.List<String> getRepeatedStringFieldList();", "private String addRandomSpacing(String originalText) {\n ArrayList<Expression> list = new ArrayList<Expression>();\n\n\t\tclass MyVisitor extends ModifierVisitor<Void> {\n\t\t @Override\n\t\t public Node visit(VariableDeclarator declarator, Void args) {\n\t Expression expression = declarator.getInitializer().get();\n\t \n\t \n\t // We're looking for string.\n\t if (expression instanceof StringLiteralExpr) {\n\t list.add(expression);\n\t }\n\t\t return null;\n\t\t }\n\t\t}\n\t\t\n\t\t\n\t}", "SList evenWords();", "public com.google.protobuf.ProtocolStringList\n getOpenWhiteListList() {\n return openWhiteList_;\n }", "List<String> mo5876c();", "void fillList(List<String> toFill) {\n for (int i = 0; i < number; i++) {\n toFill.add(i + \"\");\n }\n }", "public String getWhiteList0() {\n return getString(\"whitelist.0\");\n }", "public Builder clearOpenWhiteList() {\n openWhiteList_ = com.google.protobuf.LazyStringArrayList.EMPTY;\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n return this;\n }", "public com.google.protobuf.ByteString\n getOpenWhiteListBytes(int index) {\n return openWhiteList_.getByteString(index);\n }", "public abstract List<C41717j> mo70725h(String str);", "static int getNumPatterns() { return 64; }", "private static void skipSplitAdd(String s, List<String> list) {\n String tmp[] = s.split(\" \");\n\n for (int i = 1; i < tmp.length; i++) {\n list.add(tmp[i]);\n\n // System.out.println(tmp[i]);\n }\n }", "public static void addStars(ArrayList<String> list){\r\n //Loops through the list\r\n for(int i = 1; i < list.size(); i+=2){\r\n list.add(i, \"*\");\r\n }\r\n System.out.println(list);\r\n }", "private void m4676a(List<C0906d> list, StringBuilder sb) {\n if (sb.length() != 0) {\n list.add(new C0906d(C0906d.EnumC0907a.LITERAL, sb.toString()));\n }\n }", "public void setWhiteCounter(int num){\n this.whiteCounter = num;\n }", "StringList createStringList();", "List<C1114c> mo5886k(String str);", "private String genWhiteSpaceRegex(int noOfWhiteSpace,\n String multiWhiteSpace,\n String zeroWhiteSpace) {\n\n return (noOfWhiteSpace == 0) ? zeroWhiteSpace\n : multiWhiteSpace.replace(\"%%\", String.valueOf(noOfWhiteSpace));\n }", "public com.google.protobuf.ByteString\n getOpenWhiteListBytes(int index) {\n return openWhiteList_.getByteString(index);\n }", "private void generateLists(String num, Stack<String> numberList)\n {\n\tfor(int i = 0, len = num.length(); i < len; i++)\n\t numberList.push(new Character(num.charAt(i)).toString());\n }", "private void exercise5() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> nonDuplicateList;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n nonDuplicateList = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .collect(toList());\n }\n\n nonDuplicateList.forEach(System.out::println);\n }", "void mo100443a(List<String> list);", "ListString createListString();", "List<Log> mo13160a(String str, int i);", "public com.google.protobuf.ProtocolStringList\n getOpenWhiteListList() {\n return openWhiteList_.getUnmodifiableView();\n }", "public static void main(String[] args) { String s = \"catsanddog\";\n// List<String> wordDict = new ArrayList<>(Arrays.asList(\"cat\", \"cats\", \"and\", \"sand\", \"dog\"));\n//\n String s = \"pineapplepenappl\";\n List<String> wordDict = new ArrayList<>(Arrays.asList(\"apple\", \"pen\", \"applepen\", \"pine\", \"pineapple\"));\n\n WordBreak140 tmp = new WordBreak140();\n tmp.wordBreak(s, wordDict);\n }", "@Test\n public void repeatedSubstringPattern() {\n assertTrue(new Solution1().repeatedSubstringPattern(\"abcabcabcabc\"));\n }", "@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }", "private static List<String> testStringGenerator(List<String> palString) {\n\t\tList<String> list = new ArrayList<>();\n\t\tfor (String pal : palString) {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor (int i = 0; i < 10; i++) {\n\t\t\t\tsb.append(pal);\n\t\t\t\tfor (int j = 0; j < pal.length(); j++) {\n\t\t\t\t\tsb.append(j % 10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(sb.toString());\n\t\t}\n\t\treturn list;\n\t}", "public static void makeBlanks(char[] list) {\n\t\tfor (int i = 0; i < list.length; i++) {\n\t\t\tlist[i] = '*';\n\t\t}\n\t}", "public int selectOriginalTokens (Scanner scan, String [] list){\n \n int count = 0;\n while(scan.hasNext()){\n String line = scan.nextLine();\n String[] t = line.split(\"[ \\n\\t\\r.,:?)({}\\\\[\\\\]]\");\n for (int i = 0; i < t.length; i++){\n String item = t[i].trim();\n if(item.length() > 0){\n list[count] = item;\n count++;\n }//End if statement\n }//End for loop\n }//End while loop\n \n return count;\n }", "private String whiteSpace(String sum, String num)\n {\n\tString space = \"\";\n\tfor(int i = 0; i < sum.length() - num.length(); i++)\n\t space += \" \";\n\treturn space;\n }", "void mo54419a(List<String> list);", "List<C1113b> mo5874b(String str);", "public static List<String> stringList() {\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.add(\"abdxxx\");\n\t\tlist.add(\"xxxxx\");\n\t\tlist.add(\"hi\");\n\t\tlist.add(\"SmoothStack\");\n\t\tlist.add(\"Wyatt x Wyatt x\");\n\t\treturn list;\n\t}", "private static String[] resetStringArray() {\n String[] st = new String[L_MAX];\n L = 2 << 8;\n W = 9;\n int i;\n // initialize symbol table with all 1-character strings\n for (i = 0; i < R; i++)\n st[i] = \"\" + (char) i;\n st[i++] = \"\"; // (unused) lookahead for EOF\n return st;\n }", "public void setUp2( )\n\t{\n\t\tfor( int i = 0; i < 1000; i++ )\n\t\t{\n\t\t\tlista.append( \"\" + i );\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tList<Character>st1=new ArrayList<>();\n\t\n\t\tst1.add('a');\n\t\tst1.add('b');\n\t\tst1.add('a');\n\t\tst1.add('a');\n\t\tst1.add('c');\n\t\tst1.add('t');\n\t\n\t\tSystem.out.println(st1);//[a, b, a, a, c, t]\n\t\t\n\t\tList<Character>st2=new ArrayList<>();//empty []\n\t\tfor (int i=0; i<st1.size();i++) {\n\t\t\tif(!st2.contains(st1.get(i))) {\n\t\t\t\t// created str2 [empty], we will get the element from st1 to st2 while checking if there is repetition \n\t\t\t\tst2.add(st1.get(i));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(st2);//[a, b, c, t]\n\t\t\n\n\t}", "private void many(Set<String> s) {\n\t\twhile (!done() && s.contains(program.charAt(pos)+\"\"))\n\t\t\tpos++;\n }", "private static String createPrepStmPlaceHolder(int num) {\n\t\tchar[] c_ar = new char[num*3];\n\t\tc_ar[0] = '(';\n\t\tc_ar[1] = '?';\n\t\tfor(int i=1; i<num; ++i) {\n\t\t\tc_ar[3*i-1] = ',';\n\t\t\tc_ar[3*i] = ' ';\n\t\t\tc_ar[3*i+1] = '?';\n\t\t}\n\t\tc_ar[3*num-1] = ')';\n\t\treturn new String(c_ar);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_2() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\", false), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "private void exercise1() {\n final List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerList = list.stream()\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }", "private static String repeatSpace(int number) {\n StringBuilder space = new StringBuilder();\n\n // Adding spaces.\n for (int i = 0; i < number; i++) {\n space.append(\" \");\n }\n\n //returning spaces.\n return space.toString();\n }", "public void mo88640a(List<String> list) {\n List<String> stringList = RxPreferences.INSTANCE.getStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), new ArrayList());\n stringList.addAll(0, list);\n RxPreferences.INSTANCE.putStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), (List) StreamSupport.m150134a(stringList).mo131128a(new AbstractC32239o(new HashSet(stringList)) {\n /* class com.zhihu.android.p1480db.fragment.customview.C18240x255e53c2 */\n private final /* synthetic */ HashSet f$0;\n\n {\n this.f$0 = r1;\n }\n\n @Override // java8.util.p2234b.AbstractC32239o\n public final boolean test(Object obj) {\n return DbEditorSuggestTagCustomView.m93354a(this.f$0, (String) obj);\n }\n }).mo131126a(5).mo131125a(Collectors.m150203a($$Lambda$ofunvu1bqmYbfXGEtxXaV_csE4M.INSTANCE)));\n }", "public Builder addOpenWhiteListBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n ensureOpenWhiteListIsMutable();\n openWhiteList_.add(value);\n onChanged();\n return this;\n }", "@Test\n public void noSpacesBetweenKeywordsTest() {\n tester.yields(\"LaLaLaLaLaaaLi\", lala.EXPRESSION);\n }", "private int skipLeadingWhite( List content, int start) {\r\n if (start < 0) {\r\n start = 0;\r\n }\r\n\r\n int index = start;\r\n int size = content.size();\r\n if (currentFormat.trimAllWhite\r\n || currentFormat.textNormalize\r\n || currentFormat.textTrim) {\r\n while( index < size) {\r\n if ( !isAllWhitespace( content.get(index))) {\r\n return index;\r\n }\r\n index++;\r\n }\r\n }\r\n return index;\r\n }", "private void initWhitespace(Set<String> s) {\n\t\ts.add(\" \");\n\t\ts.add(\"\\n\");\n\t\ts.add(\"\\t\");\n }", "List<C1111j> mo5869a(int i);", "private void appendPlaceHolder(StringBuilder builder, int indent, int consecutiveExcluded, String message) {\n indent(builder, indent);\n builder.append(ELLIPSIS)\n .append(\" \")\n .append(consecutiveExcluded)\n .append(\" \")\n .append(message)\n .append(CoreConstants.LINE_SEPARATOR);\n }", "public void visiualizeSkipList(){\r\n\t\tint number=0;\r\n\t\tNode dummy = sl.getFrom(0,0);\r\n\t\t\r\n\t\tNode next;\r\n\t\tfor(int i=sl.height(); i>=0; i--){\r\n\t\t\t\r\n\t\t\tnext = sl.getFrom(i,0);\r\n\t\t\t\r\n\t\t\tfor(int j=0; j<(sl.size()+2); j++){\r\n\r\n\t\t\t\tnumber = next.getKey();\r\n\t\t\t\t//F.p(number);\r\n\t\t\t\tif(number==dummy.getKey()){\r\n\r\n\t\t\t\t\tif(number==minf)\r\n\t\t\t\t\t\tSystem.out.print(\"-inf\");\r\n\t\t\t\t\telse if(number==inf)\r\n\t\t\t\t\t\tSystem.out.print(\"---inf\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(\"-\",2)+number);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(\"-\",4));\r\n\t\t\t\t\r\n\t\t\t\tif(dummy.getKey()==number)\r\n\t\t\t\t\tnext = next.getRight();\r\n\t\t\t\t\r\n\t\t\t\tdummy = dummy.getRight();\r\n\t\t\t}\r\n\t\t\tdummy = sl.getFrom(0,0);\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "public long getWhiteSpacesCount() {\n return whiteSpacesCount;\n }", "@Test\n\tpublic void testStartingIndicesRegression(){\n\t\tassertLeftmostStartingIndices(\"5,1,7,3,2|-..xxx$1..x...xxx$3....-xx........\", 0, 6, 8, 18, 22);\n\t\tassertRightmostStartingIndices(\"7,5|.......xxx$1....xxx$2..-\", 6, 14);\n\t\t\n\t}", "public MacroList() {\n\t\tthis.macrosses = new HashMap<Integer, String>(12);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_1() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\"), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n String s=\"a /*a*/ sd /*v*/\";\n Pattern p = Pattern.compile(\"(\\\\/\\\\*(\\\\w|\\r\\n)+\\\\*\\\\/)\");\n Matcher m = p.matcher(s);\n List<String> l = new ArrayList<>(100);\n\n while (m.find()) {\n System.out.println(\"tick\");\n l.add(s.substring(m.start()+2, m.end()-2));\n }\n\n System.out.println(l);\n }", "StringPatternCounter(ArrayList<StringPattern> stringPatternList, String fileInput)\n {\n super(fileInput);\n this.stringPatternList = stringPatternList;\n }", "@Before\n public void createString(){\n s1 = \"casa\";\n\ts2 = \"cassa\";\n\ts3 = \"\";\n\ts4 = \"casa\";\n }", "public String minRemoveToMakeValid(String s) {\n int openAvail = 0;\n Set<Integer> skipSet = new HashSet<>();\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) == ')') {\n if (openAvail == 0) {\n skipSet.add(i);\n } else {\n openAvail -= 1;\n }\n } else if (s.charAt(i) == '(') {\n openAvail += 1;\n }\n }\n\n int closedAvail = 0;\n for (int i = s.length() - 1; i >= 0; i--) {\n if (s.charAt(i) == ')') {\n closedAvail += 1;\n } else if (s.charAt(i) == '(') {\n if (closedAvail == 0) {\n skipSet.add(i);\n } else {\n closedAvail -= 1; \n }\n }\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < s.length(); i++) {\n if (!skipSet.contains(i)){\n sb.append(s.charAt(i));\n }\n }\n return sb.toString();\n }", "@Test(timeout = 4000)\n public void test20() throws Throwable {\n StringReader stringReader0 = new StringReader(\"0(Hu\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer2 = new StreamTokenizer(stringReader0);\n JSTerm jSTerm0 = new JSTerm(streamTokenizer0);\n stringReader0.reset();\n StreamTokenizer streamTokenizer3 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer4 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer5 = new StreamTokenizer(stringReader0);\n streamTokenizer0.commentChar((-4));\n StreamTokenizer streamTokenizer6 = new StreamTokenizer(stringReader0);\n streamTokenizer6.ordinaryChars((-1), (-322070664));\n streamTokenizer1.parseNumbers();\n jSTerm0.add((Object) \"JSTerm: Error reading control parameters: \");\n StreamTokenizer streamTokenizer7 = new StreamTokenizer(stringReader0);\n streamTokenizer7.pushBack();\n streamTokenizer1.nextToken();\n StreamTokenizer streamTokenizer8 = new StreamTokenizer(stringReader0);\n streamTokenizer2.slashSlashComments(false);\n JSTerm jSTerm1 = new JSTerm(streamTokenizer5);\n streamTokenizer1.slashStarComments(false);\n streamTokenizer3.eolIsSignificant(false);\n streamTokenizer7.commentChar((-4));\n StreamTokenizer streamTokenizer9 = new StreamTokenizer(stringReader0);\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n jSSubstitution0.listIterator();\n JSSubstitution jSSubstitution1 = jSTerm1.matches((JSPredicateForm) jSTerm0, jSSubstitution0);\n assertTrue(jSSubstitution1.fail());\n }", "public Removalstops()\n {\n stopWords.add(\"am\");\n stopWords.add(\"my\");\nstopWords.add(\"at\");\nstopWords.add(\"a\");\nstopWords.add(\"i\");\nstopWords.add(\"is\");\nstopWords.add(\"of\");\nstopWords.add(\"have\");\nstopWords.add(\"--\");\nstopWords.add(\"do\");\nstopWords.add(\"the\");\nstopWords.add(\"was\");\nstopWords.add(\"iam\");\nstopWords.add(\"there\");\nstopWords.add(\"what\");\nstopWords.add(\"for\");\nstopWords.add(\"in\");\nstopWords.add(\"very\");\nstopWords.add(\"and\");\nstopWords.add(\"to\");\nstopWords.add(\"often\");\nstopWords.add(\"because\");\nstopWords.add(\"in\");\nstopWords.add(\"an\");\nstopWords.add(\"can\");\nstopWords.add(\"via\");\nstopWords.add(\"even\");\nstopWords.add(\"as\");\nstopWords.add(\"best\");\nstopWords.add(\"been\");\nstopWords.add(\"into\");\nstopWords.add(\"by\");\nstopWords.add(\"around\");\nstopWords.add(\"being\");\nstopWords.add(\"from\");\nstopWords.add(\"etc\");\nstopWords.add(\"his\");\nstopWords.add(\"do\");\nstopWords.add(\"have\");\nstopWords.add(\"had\"); \nstopWords.add(\"able\");\nstopWords.add(\"about\");\nstopWords.add(\"above\");\nstopWords.add(\"abroad\");\nstopWords.add(\"according\");\nstopWords.add(\"accordingly\");\nstopWords.add(\"across\");\nstopWords.add(\"actually\");\nstopWords.add(\"adj\");\nstopWords.add(\"after\");\nstopWords.add(\"afterwards\");\nstopWords.add(\"again\");\nstopWords.add(\"against\");\nstopWords.add(\"ago\");\nstopWords.add(\"ahead\");\nstopWords.add(\"ain't\");\nstopWords.add(\"all\");\nstopWords.add(\"allow\");\nstopWords.add(\"allows\");\nstopWords.add(\"almost\");\nstopWords.add(\"alone\");\nstopWords.add(\"along\");\nstopWords.add(\"alongside\");\nstopWords.add(\"already\");\nstopWords.add(\"also\");\nstopWords.add(\"although\");\nstopWords.add(\"always\");\nstopWords.add(\"am\");\nstopWords.add(\"amid\");\nstopWords.add(\"amidst\");\nstopWords.add(\"among\");\nstopWords.add(\"amongst\");\nstopWords.add(\"an\");\nstopWords.add(\"and\");\nstopWords.add(\"another\");\nstopWords.add(\"any\");\nstopWords.add(\"anybody\");\nstopWords.add(\"anyhow\");\nstopWords.add(\"anyone\");\nstopWords.add(\"anything\");\nstopWords.add(\"anyway\");\nstopWords.add(\"anyways\");\nstopWords.add(\"anywhere\");\nstopWords.add(\"apart\");\nstopWords.add(\"appear\");\nstopWords.add(\"appreciate\");\nstopWords.add(\"appropriate\");\nstopWords.add(\"are\");\nstopWords.add(\"aren't\");\nstopWords.add(\"around\");\nstopWords.add(\"as\");\nstopWords.add(\"a's\");\nstopWords.add(\"aside\");\nstopWords.add(\"ask\");\nstopWords.add(\"asking\");\nstopWords.add(\"associated\");\nstopWords.add(\"at\");\nstopWords.add(\"available\");\nstopWords.add(\"away\");\nstopWords.add(\"awfully\");\nstopWords.add(\"back\");\nstopWords.add(\"backward\");\nstopWords.add(\"backwards\");\nstopWords.add(\"be\");\nstopWords.add(\"became\");\nstopWords.add(\"beacause\");\nstopWords.add(\"become\");\nstopWords.add(\"becomes\");\nstopWords.add(\"becoming\");\nstopWords.add(\"been\");\nstopWords.add(\"before\");\nstopWords.add(\"beforehand\");\nstopWords.add(\"begin\");\nstopWords.add(\"behind\");\nstopWords.add(\"being\");\nstopWords.add(\"believe\");\nstopWords.add(\"below\");\nstopWords.add(\"beside\");\nstopWords.add(\"besides\");\nstopWords.add(\"best\");\nstopWords.add(\"better\");\nstopWords.add(\"between\");\nstopWords.add(\"beyond\");\nstopWords.add(\"both\");\nstopWords.add(\"brief\");\nstopWords.add(\"but\");\nstopWords.add(\"by\");\nstopWords.add(\"came\");\nstopWords.add(\"can\");\nstopWords.add(\"cannot\");\nstopWords.add(\"cant\");\nstopWords.add(\"can't\");\nstopWords.add(\"caption\");\nstopWords.add(\"cause\");\nstopWords.add(\"causes\");\nstopWords.add(\"certain\");\nstopWords.add(\"cetrainly\");\nstopWords.add(\"changes\");\nstopWords.add(\"clearly\");\nstopWords.add(\"c'mon\");\nstopWords.add(\"co\");\nstopWords.add(\"co.\");\nstopWords.add(\"com\");\nstopWords.add(\"come\");\nstopWords.add(\"comes\");\nstopWords.add(\"concerning\");\nstopWords.add(\"consequently\");\nstopWords.add(\"consider\");\nstopWords.add(\"considering\");\nstopWords.add(\"could\");\nstopWords.add(\"couldn't\");\nstopWords.add(\"c's\");\nstopWords.add(\"currently\");\nstopWords.add(\"dare\");\nstopWords.add(\"daren't\");\nstopWords.add(\"definitely\");\nstopWords.add(\"described\");\nstopWords.add(\"despite\");\nstopWords.add(\"did\");\nstopWords.add(\"didn't\");\nstopWords.add(\"different\");\nstopWords.add(\"directly\");\nstopWords.add(\"do\");\nstopWords.add(\"does\");\nstopWords.add(\"doesn't\");\nstopWords.add(\"doing\");\nstopWords.add(\"done\");\nstopWords.add(\"don't\");\nstopWords.add(\"down\");\nstopWords.add(\"downwards\");\nstopWords.add(\"during\");\nstopWords.add(\"each\");\nstopWords.add(\"edu\");\nstopWords.add(\"eg\");\nstopWords.add(\"eight\");\nstopWords.add(\"eighty\");\nstopWords.add(\"either\");\nstopWords.add(\"else\");\nstopWords.add(\"elsewhere\");\nstopWords.add(\"end\");\nstopWords.add(\"ending\");\nstopWords.add(\"enough\");\nstopWords.add(\"entirely\");\nstopWords.add(\"especially\");\nstopWords.add(\"et\");\nstopWords.add(\"etc\");\nstopWords.add(\"even\");\nstopWords.add(\"evenmore\");\nstopWords.add(\"every\");\nstopWords.add(\"everybody\");\nstopWords.add(\"everyone\");\nstopWords.add(\"everything\");\nstopWords.add(\"everywhere\");\nstopWords.add(\"ex\");\nstopWords.add(\"exactly\");\nstopWords.add(\"example\");\nstopWords.add(\"except\");\nstopWords.add(\"fairly\");\nstopWords.add(\"far\");\nstopWords.add(\"farhter\");\nstopWords.add(\"few\");\nstopWords.add(\"fewer\");\nstopWords.add(\"fifth\");\nstopWords.add(\"first\");\nstopWords.add(\"five\");\nstopWords.add(\"followed\");\nstopWords.add(\"following\");\nstopWords.add(\"follows\");\nstopWords.add(\"for\");\nstopWords.add(\"forever\");\nstopWords.add(\"former\");\nstopWords.add(\"formerly\");\nstopWords.add(\"forth\");\nstopWords.add(\"forward\");\nstopWords.add(\"found\");\nstopWords.add(\"four\");\nstopWords.add(\"from\");\nstopWords.add(\"further\");\nstopWords.add(\"furthermore\");\nstopWords.add(\"get\");\nstopWords.add(\"gets\");\nstopWords.add(\"getting\");\nstopWords.add(\"given\");\nstopWords.add(\"gives\");\nstopWords.add(\"go\");\nstopWords.add(\"goes\");\nstopWords.add(\"going\");\nstopWords.add(\"gone\");\nstopWords.add(\"got\");\nstopWords.add(\"gotten\");\nstopWords.add(\"greetings\");\nstopWords.add(\"had\");\nstopWords.add(\"hadn't\");\nstopWords.add(\"half\");\nstopWords.add(\"happens\");\nstopWords.add(\"hardly\");\nstopWords.add(\"has\");\nstopWords.add(\"hasn't\");\nstopWords.add(\"have\");\nstopWords.add(\"haven't\");\nstopWords.add(\"having\");\nstopWords.add(\"he\");\nstopWords.add(\"he'd\");\nstopWords.add(\"he'll\");\nstopWords.add(\"hello\");\nstopWords.add(\"help\");\nstopWords.add(\"hence\");\nstopWords.add(\"her\");\nstopWords.add(\"here\");\nstopWords.add(\"hereafter\");\nstopWords.add(\"hereby\");\nstopWords.add(\"herein\");\nstopWords.add(\"here's\");\nstopWords.add(\"hereupon\");\nstopWords.add(\"hers\");\nstopWords.add(\"herself\");\nstopWords.add(\"he's\");\nstopWords.add(\"hi\");\nstopWords.add(\"him\");\nstopWords.add(\"himself\");\nstopWords.add(\"his\");\nstopWords.add(\"hither\");\nstopWords.add(\"hopefully\");\nstopWords.add(\"how\");\nstopWords.add(\"howbeit\");\nstopWords.add(\"however\");\nstopWords.add(\"however\");\nstopWords.add(\"hundred\");\nstopWords.add(\"i'd\");\nstopWords.add(\"ie\");\nstopWords.add(\"if\");\nstopWords.add(\"ignored\");\nstopWords.add(\"i'll\");\nstopWords.add(\"i'm\");\nstopWords.add(\"immediate\");\nstopWords.add(\"in\");\nstopWords.add(\"iansmuch\");\nstopWords.add(\"inc\");\nstopWords.add(\"inc.\");\nstopWords.add(\"indeed\");\nstopWords.add(\"indicate\");\nstopWords.add(\"indicated\");\nstopWords.add(\"indicates\");\nstopWords.add(\"inner\");\nstopWords.add(\"inside\");\nstopWords.add(\"insofar\");\nstopWords.add(\"into\");\nstopWords.add(\"inward\");\nstopWords.add(\"is\");\nstopWords.add(\"isn't\");\nstopWords.add(\"it\");\nstopWords.add(\"it'd\");\nstopWords.add(\"it'll\");\nstopWords.add(\"its\");\nstopWords.add(\"it's\");\nstopWords.add(\"itself\");\nstopWords.add(\"i've\");\nstopWords.add(\"just\");\nstopWords.add(\"k\");\nstopWords.add(\"keep\");\nstopWords.add(\"keeps\");\nstopWords.add(\"kept\");\nstopWords.add(\"know\");\nstopWords.add(\"knows\");\nstopWords.add(\"known\");\nstopWords.add(\"last\");\nstopWords.add(\"lately\");\nstopWords.add(\"later\");\nstopWords.add(\"latter\");\nstopWords.add(\"latterly\");\nstopWords.add(\"least\");\nstopWords.add(\"less\");\nstopWords.add(\"let\");\nstopWords.add(\"let's\");\nstopWords.add(\"like\");\nstopWords.add(\"liked\");\nstopWords.add(\"likely\");\nstopWords.add(\"likewise\");\nstopWords.add(\"little\");\nstopWords.add(\"look\");\nstopWords.add(\"looks\");\nstopWords.add(\"low\");\nstopWords.add(\"lower\");\nstopWords.add(\"ltd\");\nstopWords.add(\"made\");\nstopWords.add(\"mainly\");\nstopWords.add(\"make\");\nstopWords.add(\"makes\");\nstopWords.add(\"many\");\nstopWords.add(\"may\");\nstopWords.add(\"maybe\");\nstopWords.add(\"mayn't\");\nstopWords.add(\"me\");\nstopWords.add(\"mean\");\nstopWords.add(\"meanwhile\");\nstopWords.add(\"merely\");\nstopWords.add(\"might\");\nstopWords.add(\"mightn't\");\nstopWords.add(\"mine\");\nstopWords.add(\"minus\");\nstopWords.add(\"miss\");\nstopWords.add(\"more\");\nstopWords.add(\"moreover\");\nstopWords.add(\"most\");\nstopWords.add(\"mostly\");\nstopWords.add(\"mr\");\nstopWords.add(\"mrs\");\nstopWords.add(\"much\");\nstopWords.add(\"must\");\nstopWords.add(\"mustn't\");\nstopWords.add(\"my\");\nstopWords.add(\"myself\");\nstopWords.add(\"name\");\nstopWords.add(\"namely\");\nstopWords.add(\"nd\");\nstopWords.add(\"near\");\nstopWords.add(\"nearly\");\nstopWords.add(\"necessary\");\nstopWords.add(\"need\");\nstopWords.add(\"needn't\");\nstopWords.add(\"needs\");\nstopWords.add(\"neither\");\nstopWords.add(\"never\");\nstopWords.add(\"neverf\");\nstopWords.add(\"neverless\");\nstopWords.add(\"nevertheless\");\nstopWords.add(\"new\");\nstopWords.add(\"next\");\nstopWords.add(\"nine\");\nstopWords.add(\"ninety\");\nstopWords.add(\"no\");\nstopWords.add(\"nobody\");\nstopWords.add(\"non\");\nstopWords.add(\"none\");\nstopWords.add(\"nonetheless\");\nstopWords.add(\"noone\");\nstopWords.add(\"no-one\");\nstopWords.add(\"nor\");\nstopWords.add(\"normally\");\nstopWords.add(\"not\");\nstopWords.add(\"nothing\");\nstopWords.add(\"notwithstanding\");\nstopWords.add(\"novel\");\nstopWords.add(\"now\");\nstopWords.add(\"nowwhere\");\nstopWords.add(\"obviously\");\nstopWords.add(\"of\");\nstopWords.add(\"off\");\nstopWords.add(\"often\");\nstopWords.add(\"oh\");\nstopWords.add(\"ok\");\nstopWords.add(\"okay\");\nstopWords.add(\"old\");\nstopWords.add(\"on\");\nstopWords.add(\"once\");\nstopWords.add(\"one\");\nstopWords.add(\"ones\");\nstopWords.add(\"one's\");\nstopWords.add(\"only\");\nstopWords.add(\"onto\");\nstopWords.add(\"opposite\");\nstopWords.add(\"or\");\nstopWords.add(\"other\");\nstopWords.add(\"others\");\nstopWords.add(\"otherwise\");\nstopWords.add(\"ought\");\nstopWords.add(\"oughtn't\");\nstopWords.add(\"our\");\nstopWords.add(\"ourselves\");\nstopWords.add(\"out\");\nstopWords.add(\"outside\");\nstopWords.add(\"over\");\nstopWords.add(\"overall\");\nstopWords.add(\"own\");\nstopWords.add(\"particular\");\nstopWords.add(\"particularly\");\nstopWords.add(\"past\");\nstopWords.add(\"per\");\nstopWords.add(\"perhaps\");\nstopWords.add(\"placed\");\nstopWords.add(\"please\");\nstopWords.add(\"plus\");\nstopWords.add(\"possible\");\nstopWords.add(\"presumably\");\nstopWords.add(\"probably\");\nstopWords.add(\"provided\");\nstopWords.add(\"provides\");\nstopWords.add(\"que\");\nstopWords.add(\"quite\");\nstopWords.add(\"qv\");\nstopWords.add(\"rather\");\nstopWords.add(\"rd\");\nstopWords.add(\"re\");\nstopWords.add(\"really\");\nstopWords.add(\"reasonably\");\nstopWords.add(\"recent\");\nstopWords.add(\"recently\");\nstopWords.add(\"regarding\");\nstopWords.add(\"regardless\");\nstopWords.add(\"regards\");\nstopWords.add(\"relatively\");\nstopWords.add(\"respectively\");\nstopWords.add(\"right\");\nstopWords.add(\"round\");\nstopWords.add(\"said\");\nstopWords.add(\"same\");\nstopWords.add(\"saw\");\nstopWords.add(\"say\");\nstopWords.add(\"saying\");\nstopWords.add(\"says\");\nstopWords.add(\"second\");\nstopWords.add(\"secondly\");\nstopWords.add(\"see\");\nstopWords.add(\"seeing\");\nstopWords.add(\"seem\");\nstopWords.add(\"seemed\");\nstopWords.add(\"seeming\");\nstopWords.add(\"seems\");\nstopWords.add(\"seen\");\nstopWords.add(\"self\");\nstopWords.add(\"selves\");\nstopWords.add(\"sensible\");\nstopWords.add(\"sent\");\nstopWords.add(\"serious\");\nstopWords.add(\"seriously\");\nstopWords.add(\"seven\");\nstopWords.add(\"several\");\nstopWords.add(\"shall\");\nstopWords.add(\"shan't\");\nstopWords.add(\"she\");\nstopWords.add(\"she'd\");\nstopWords.add(\"she'll\");\nstopWords.add(\"she's\");\nstopWords.add(\"should\");\nstopWords.add(\"shouldn't\");\nstopWords.add(\"since\");\nstopWords.add(\"six\");\nstopWords.add(\"so\");\nstopWords.add(\"some\");\nstopWords.add(\"somebody\");\nstopWords.add(\"someday\");\nstopWords.add(\"somehow\");\nstopWords.add(\"someone\");\nstopWords.add(\"something\");\nstopWords.add(\"sometime\");\nstopWords.add(\"sometimes\");\nstopWords.add(\"somewhat\");\nstopWords.add(\"somewhere\");\nstopWords.add(\"soon\");\nstopWords.add(\"sorry\");\nstopWords.add(\"specified\");\nstopWords.add(\"specify\");\nstopWords.add(\"specifying\");\nstopWords.add(\"still\");\nstopWords.add(\"sub\");\nstopWords.add(\"such\");\nstopWords.add(\"sup\");\nstopWords.add(\"sure\");\nstopWords.add(\"take\");\nstopWords.add(\"taken\");\nstopWords.add(\"taking\");\nstopWords.add(\"tell\");\nstopWords.add(\"tends\");\nstopWords.add(\"th\");\nstopWords.add(\"than\");\nstopWords.add(\"thank\");\nstopWords.add(\"thanks\");\nstopWords.add(\"thanx\");\nstopWords.add(\"that\");\nstopWords.add(\"that'll\");\nstopWords.add(\"thats\");\nstopWords.add(\"that've\");\nstopWords.add(\"the\");\nstopWords.add(\"their\");\nstopWords.add(\"theirs\");\nstopWords.add(\"them\");\nstopWords.add(\"themselves\");\nstopWords.add(\"then\");\nstopWords.add(\"thence\");\nstopWords.add(\"there\");\nstopWords.add(\"thereafter\");\nstopWords.add(\"thereby\");\nstopWords.add(\"there'd\");\nstopWords.add(\"therefore\");\nstopWords.add(\"therein\");\nstopWords.add(\"ther'll\");\nstopWords.add(\"there're\");\nstopWords.add(\"theres\");\nstopWords.add(\"there's\");\nstopWords.add(\"thereupon\");\nstopWords.add(\"there've\");\nstopWords.add(\"these\");\nstopWords.add(\"they\");\nstopWords.add(\"they'd\");\nstopWords.add(\"they'll\");\nstopWords.add(\"they're\");\nstopWords.add(\"they've\");\nstopWords.add(\"thing\");\nstopWords.add(\"things\");\nstopWords.add(\"think\");\nstopWords.add(\"third\");\nstopWords.add(\"thirty\");\nstopWords.add(\"this\");\nstopWords.add(\"thorough\");\nstopWords.add(\"thoroughly\");\nstopWords.add(\"those\");\nstopWords.add(\"though\");\nstopWords.add(\"throughout\");\nstopWords.add(\"thru\");\nstopWords.add(\"thus\");\nstopWords.add(\"till\");\nstopWords.add(\"to\");\nstopWords.add(\"together\");\nstopWords.add(\"too\");\nstopWords.add(\"took\");\nstopWords.add(\"toward\");\nstopWords.add(\"towards\");\nstopWords.add(\"tried\");\nstopWords.add(\"tries\");\nstopWords.add(\"truly\");\nstopWords.add(\"try\");\nstopWords.add(\"trying\");\nstopWords.add(\"t's\");\nstopWords.add(\"twice\");\nstopWords.add(\"two\");\nstopWords.add(\"un\");\nstopWords.add(\"under\");\nstopWords.add(\"underneath\");\nstopWords.add(\"undoing\");\nstopWords.add(\"unfortunately\");\nstopWords.add(\"unless\");\nstopWords.add(\"unlike\");\nstopWords.add(\"unlikely\");\nstopWords.add(\"untill\");\nstopWords.add(\"unto\");\nstopWords.add(\"up\");\nstopWords.add(\"upon\");\nstopWords.add(\"upwards\");\nstopWords.add(\"us\");\nstopWords.add(\"use\");\nstopWords.add(\"used\");\nstopWords.add(\"useful\");\nstopWords.add(\"uses\");\nstopWords.add(\"using\");\nstopWords.add(\"usually\");\nstopWords.add(\"v\");\nstopWords.add(\"value\");\nstopWords.add(\"various\");\nstopWords.add(\"versus\");\nstopWords.add(\"very\");\nstopWords.add(\"via\");\nstopWords.add(\"viz\");\nstopWords.add(\"vs\");\nstopWords.add(\"want\");\nstopWords.add(\"wants\");\nstopWords.add(\"was\");\nstopWords.add(\"wasn't\");\nstopWords.add(\"way\");\nstopWords.add(\"we\");\nstopWords.add(\"we'd\");\nstopWords.add(\"welcome\");\nstopWords.add(\"well\");\nstopWords.add(\"we'll\");\nstopWords.add(\"went\");\nstopWords.add(\"were\");\nstopWords.add(\"we're\");\nstopWords.add(\"weren't\");\nstopWords.add(\"we've\");\nstopWords.add(\"what\");\nstopWords.add(\"whatever\");\nstopWords.add(\"what'll\");\nstopWords.add(\"what's\");\nstopWords.add(\"what've\");\nstopWords.add(\"when\");\nstopWords.add(\"whence\");\nstopWords.add(\"whenever\");\nstopWords.add(\"where\");\nstopWords.add(\"whereafter\");\nstopWords.add(\"whereas\");\nstopWords.add(\"whereby\");\nstopWords.add(\"wherein\");\nstopWords.add(\"where's\");\nstopWords.add(\"whereupon\");\nstopWords.add(\"whereever\");\nstopWords.add(\"whether\");\nstopWords.add(\"which\");\nstopWords.add(\"whichever\");\nstopWords.add(\"while\");\nstopWords.add(\"whilst\");\nstopWords.add(\"whither\");\nstopWords.add(\"who\");\nstopWords.add(\"who'd\");\nstopWords.add(\"whoever\");\nstopWords.add(\"whole\");\nstopWords.add(\"who'll\");\nstopWords.add(\"whom\");\nstopWords.add(\"whomever\");\nstopWords.add(\"who's\");\nstopWords.add(\"whose\");\nstopWords.add(\"why\");\nstopWords.add(\"will\");\nstopWords.add(\"willing\");\nstopWords.add(\"wish\");\nstopWords.add(\"with\");\nstopWords.add(\"within\");\nstopWords.add(\"without\");\nstopWords.add(\"wonder\");\nstopWords.add(\"won't\");\nstopWords.add(\"would\");\nstopWords.add(\"wouldn't\");\nstopWords.add(\"yes\");\nstopWords.add(\"yet\");\nstopWords.add(\"you\");\nstopWords.add(\"you'd\");\nstopWords.add(\"you'll\");\nstopWords.add(\"your\");\nstopWords.add(\"you're\");\nstopWords.add(\"yours\");\nstopWords.add(\"yourself\");\nstopWords.add(\"you've\");\nstopWords.add(\"zero\");\n\n \n \n }", "@SuppressWarnings(\"resource\")\n public static void doubleCapacity(String[] array){\n int wordCount = 0;\n int arrayGrowth = 500;\n array = new String[10];\n String strLine = null;\n while (strLine != null) {\n // Store the content into an array\n Scanner s = new Scanner(strLine);\n while (s.hasNext()) {\n if (array.length == wordCount) {\n // expand list\n array = Arrays.copyOf(array, array.length + arrayGrowth);\n }\n array[wordCount] = s.next();\n wordCount++;\n } \n }\n }", "private int skipTrialingWhite( List content, int start) {\r\n int size = content.size();\r\n if (start > size) {\r\n start = size;\r\n }\r\n\r\n int index = start;\r\n if (currentFormat.trimAllWhite\r\n || currentFormat.textNormalize\r\n || currentFormat.textTrim) {\r\n while( index >= 0) {\r\n if ( !isAllWhitespace( content.get(index - 1)))\r\n break;\r\n --index;\r\n }\r\n }\r\n return index;\r\n }", "public abstract void mo9247b(String str, long j, List<String> list);", "private void fillSet() {\r\n\t\tString regex = \"\\\\p{L}+\";\r\n\t\tMatcher matcher = Pattern.compile(regex).matcher(body);\r\n\t\twhile (matcher.find()) {\r\n\t\t\tif (!matcher.group().isEmpty()) {\r\n\t\t\t\twords.add(matcher.group());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private ArrayList<Integer> getEmptySpaces(char[] board) {\n ArrayList<Integer> emptySpaces = new ArrayList<>();\n for (int i = 0; i < board.length; i++) {\n if (board[i] == ' ') {\n emptySpaces.add(i);\n }\n }\n return emptySpaces;\n }", "void mo13370a(int i, int i2, List<C15929a> list) throws IOException;", "private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }", "private static Stream<List<Tile>> substituteBlanks(List<Tile> p) {\n Stream<List<Tile>> res = Stream.of(p);\n //Iterate through all letters.\n for (int i = 0; i < p.size(); i++) {\n //Check for blanks.\n if (p.get(i).getLetter() == Character.MIN_VALUE) {\n //If blank found, substitute it for all a-z, and look again for next blank.\n res = substituteBlankAtIndex(p, i)\n .flatMap(s -> substituteBlanks(s));\n }\n }\n\n return res;\n }", "public static void main(String[] args) {\n String[] strings = new String[100];\n for (int i = 0; i < strings.length; i++) {\n strings[i] = randomStrings(2);\n }\n// for (String s : strings) {\n// System.out.println(s);\n// }\n ArrayList<String> appeared = new ArrayList<>();\n for (String s : strings) {\n if (!appeared.contains(s)) {\n appeared.add(s);\n }\n }\n System.out.println(appeared.size());\n\n }", "private IgnoreListHelper() {\n\t}", "@Test\n\t public void test5 ()\n\t{\n\t\t\tString s = new String(\"aaabaaaaabaabaaaabaaaaaaaaaaaaaabaaaaaaaaaaaaaaabaaaaaaaaaaaaaaba\");\n\t s = s.replaceAll(\"\\\\s+\", \" \");\n\t assertEquals(\"aaaaaaaaaaaaaabaaaaaaaaaaaaaa\", LRS.lrs(s)); \n\t}", "public static List<String> findRepeatedDnaSequences(String s) {\n \tList<String> re=new ArrayList<String>();\n \tif(s.length()<=10){\n \t\treturn re;\n \t}\n \tMap<String, Integer> map=new HashMap<String, Integer>(); \t\n \tfor(int i=10; i<=s.length(); i++){\n \t\tString k=s.substring(i-10, i);\n \t\tif(map.containsKey(k)){\n \t\t\tint val=map.get(k);\n \t\t\tif(val==1){\n \t\t\t\tre.add(k);\n \t\t\t}\n \t\t\tmap.put(k, val+1);\n \t\t}else{\n \t\t\tmap.put(k, 1);\n \t\t}\n \t}\n \treturn re;\n }", "public static void main(){\r\n\t\t\r\n\t\tArrayList<tok> pHolder = new ArrayList<tok>();\r\n\r\n\t\t pHolder.add(new tok(\"@\", \"@\"));\r\n\t\t\r\n\t\treturn;\r\n\t}", "public void mo9497b(List<String> list) {\n this.f1514c = list;\n }", "private void listEntries(BufferedWriter bw, String previous, int start, int end, String zeroes) throws IOException {\n\t\tint writeStart = -1;\n\t\tStringBuilder sb = new StringBuilder();\n\t\tchar c;\n\t\tfor (int i = 0, l = previous.length(); i < l && writeStart == -1; i++) {\n\t\t\tc = previous.charAt(i);\n\t\t\tif (Character.isDigit(c)) {sb.append(c);}\n\t\t\telse {writeStart = Integer.parseInt(sb.toString());}\n\t\t}\n\t\tfor (int i = start; i < end; i++) {bw.write(++writeStart + \"=\" + zeroes + i + \"\\n\");}\n\t}", "public void m20623OooO00o() {\n for (C8964ooOOo000 ooooo000 : this.f22213OooO00o) {\n OooO00o(ooooo000);\n }\n this.f22212OooO00o.clear();\n this.f22213OooO00o.clear();\n }", "public String addWhiteSpace(String str, int number) {\n\t\tStringBuilder result = new StringBuilder();\n\t\tfor (int i = 0; i < str.length(); i+=2) {\n\t\t if (i > 0) {\n\t\t\t for (int j = 0; j < number; j++)\n\t\t\t\t result.append(\" \");\n\t\t }\n\t\t result.append(str.charAt(i));\n\t\t result.append(str.charAt(i+1));\n\t\t}\n\t\treturn result.toString();\n\t}", "public static List<String> findStrobogrammatic(int n) {\n List<String> cur, ans;\n ans = new ArrayList<String>((n & 1) == 0 ? Arrays.asList(\"\") : Arrays.asList(\"0\", \"1\", \"8\"));\n if (n < 2) return ans;\n\n for (;n > 1; n -= 2) {\n cur = ans;\n ans = new ArrayList<String>();\n for (String i : cur) {\n if (n > 3) {\n ans.add('0' + i + '0');\n }\n ans.add('1' + i + '1');\n ans.add('8' + i + '8');\n ans.add('6' + i + '9');\n ans.add('9' + i + '6');\n }\n }\n System.out.println(ans.size());\n return ans;\n }", "private static List<String> induceSynonims(String word) {\n\t\treturn null;\n\t}", "private List<WordScore> liveList(List<WordScore> gridList, String s) {\n s = s.toLowerCase();\n List<WordScore> liveList = new ArrayList<>();\n for(WordScore ws : gridList){\n int nochars = s.length() - s.replaceAll(ws.getWord(), \"\").length();\n liveList.add(new WordScore(ws.getWord(), ws.getScore()-nochars));\n }\n return liveList;\n }", "private void fillRandomList()\n\t{\n\t\trandomList.add(\"I like cheese.\");\n\t\trandomList.add(\"Tortoise can move faster than slow rodent.\");\n\t\trandomList.add(\"I enjoy sitting on the ground.\");\n\t\trandomList.add(\"I like cereal.\");\n\t\trandomList.add(\"This is random.\");\n\t\trandomList.add(\"I like typing\");\n\t\trandomList.add(\"FLdlsjejf is my favorite word.\");\n\t\trandomList.add(\"I have two left toes.\");\n\t\trandomList.add(\"Sqrt(2) = 1.414213562 ...\");\n\t\trandomList.add(\"Hi mom.\");\n\t}", "public static void main(String[] args) {\n\t\tString s=\"22\";\n\t\t\n\t\tif(s.indexOf(\"1\")>=0||s.equals(\"\"))\n\t\t\tSystem.out.println(\"hello\");\n\t\t\t\n\t\tArrayList f=new ArrayList();\n\t\tint stack[]=new int[2*s.length()];\n\t\tint top=-1;\n\t\tchar a[][]=new char[][]{{},{},{'#','a','b','c','#'},{'#','d','e','f','#'},{'#','g','h','i','#'},{'#','j','k','l','#'},{'#','m','n','o','#'},{'#','p','q','r','s','#'},{'#','t','u','v','#'},{'#','w','x','y','z','#'}};\n\t\tint length[]=new int []{0,0,3,3,3,3,3,4,3,4};\n\t\tStringBuilder ans=new StringBuilder();\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tint x=stack[++top]=(int)s.charAt(i)-'0';\n\t\t\tans.append(a[x][1]);\n\t\t\tstack[++top]=1;\n\t\t}\n\t\twhile(stack[1]!=length[(int)s.charAt(0)-'0']+1){\n\t\t\tif(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\tif(s.length()==(top+1)/2){\n\t\t\t\t\twhile(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\t\t\tint r=(top-1)/2;\n\t\t\t\t\t\tchar r1=a[stack[top-1]][stack[top]];\n\t\t\t\t\t\tans.setCharAt(r, r1);\n\t\t\t\t\t\tString ans1=ans.toString();\n\t\t\t\t\t\tf.add(ans1);\n\t\t\t\t\t\tstack[top]++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t\t\ttop+=2;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[top]=1;\n\t\t\t\ttop-=2;\n\t\t\t\tstack[top]++;\n\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(f.size());\n\t}", "private void modify(List listString){\n\t}", "private String repeatM(int count){\n return new String(new char[count]).replace('\\0','M');\n }", "private static void\n eatWhite(ParseState state)\n {\n while(state.pos < state.data.length() && state.data.charAt(state.pos) == ' ')\n {\n ++state.pos;\n }\n }" ]
[ "0.55591595", "0.5524409", "0.54578066", "0.5425202", "0.53757787", "0.5364262", "0.5288061", "0.5286694", "0.52332956", "0.5221815", "0.5211653", "0.5201803", "0.51848924", "0.518454", "0.5178811", "0.51761377", "0.5150973", "0.5141157", "0.5138997", "0.51366293", "0.5130912", "0.5071481", "0.50682074", "0.50673336", "0.5058374", "0.50503725", "0.5046189", "0.5046023", "0.50277734", "0.50120145", "0.49743384", "0.4959684", "0.49513972", "0.49383563", "0.492581", "0.49236417", "0.49056625", "0.48794308", "0.48752907", "0.48583564", "0.4856731", "0.48500034", "0.48222542", "0.48127964", "0.4812774", "0.48096502", "0.48054305", "0.48029843", "0.48021927", "0.4784932", "0.47791797", "0.47657204", "0.47405565", "0.47405225", "0.47390026", "0.47360018", "0.47321254", "0.47301587", "0.47235176", "0.47201622", "0.4720113", "0.4717014", "0.47158983", "0.4708474", "0.4698091", "0.46781585", "0.46772122", "0.46698767", "0.46634603", "0.46624836", "0.46601665", "0.4651289", "0.46146277", "0.4606947", "0.4606018", "0.4604179", "0.45975944", "0.45943204", "0.45926452", "0.45925856", "0.45852026", "0.4583654", "0.45777828", "0.45770383", "0.45763302", "0.4573015", "0.45670146", "0.45669803", "0.4564498", "0.45611578", "0.45599565", "0.45561954", "0.45553017", "0.45483592", "0.45479", "0.45477003", "0.4545243", "0.45429727", "0.45390365", "0.4536908" ]
0.51279604
21
open_white_list repeated string open_white_list = 11;
public Builder clearOpenWhiteList() { openWhiteList_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SList oddWords();", "public java.lang.String getOpenWhiteList(int index) {\n return openWhiteList_.get(index);\n }", "public int getOpenWhiteListCount() {\n return openWhiteList_.size();\n }", "public java.lang.String getOpenWhiteList(int index) {\n return openWhiteList_.get(index);\n }", "public int getOpenWhiteListCount() {\n return openWhiteList_.size();\n }", "private LowercaseWordList() {\n\n }", "public Builder setOpenWhiteList(\n int index, java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureOpenWhiteListIsMutable();\n openWhiteList_.set(index, value);\n onChanged();\n return this;\n }", "static List DuplicateElements(List<Character> characters){\r\n\t\tList newlist=new ArrayList<>();\r\n\t\tfor(char c:characters)\r\n\t\t{\r\n\t\t\tnewlist.add(Collections.nCopies(2,c ));\r\n\t\r\n\t\t}\r\n\tSystem.out.println(newlist);\r\n\treturn newlist;\r\n\t}", "public Builder addOpenWhiteList(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureOpenWhiteListIsMutable();\n openWhiteList_.add(value);\n onChanged();\n return this;\n }", "public static List<String> createCompetencyList() {\n List<String> list = new ArrayList<String>();\n list.add(\"Line number 1\");\n list.add(\"Line number 2\");\n return list;\n }", "private void exercise2() {\n List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerOddLengthList = list.stream()\n .filter((string) -> string.length() % 2 != 0)\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public void setWhiteSpacesCount(long value) {\n this.whiteSpacesCount = value;\n }", "List<String> mo5877c(String str);", "java.util.List<String> getRepeatedStringFieldList();", "private String addRandomSpacing(String originalText) {\n ArrayList<Expression> list = new ArrayList<Expression>();\n\n\t\tclass MyVisitor extends ModifierVisitor<Void> {\n\t\t @Override\n\t\t public Node visit(VariableDeclarator declarator, Void args) {\n\t Expression expression = declarator.getInitializer().get();\n\t \n\t \n\t // We're looking for string.\n\t if (expression instanceof StringLiteralExpr) {\n\t list.add(expression);\n\t }\n\t\t return null;\n\t\t }\n\t\t}\n\t\t\n\t\t\n\t}", "SList evenWords();", "public com.google.protobuf.ProtocolStringList\n getOpenWhiteListList() {\n return openWhiteList_;\n }", "List<String> mo5876c();", "void fillList(List<String> toFill) {\n for (int i = 0; i < number; i++) {\n toFill.add(i + \"\");\n }\n }", "public String getWhiteList0() {\n return getString(\"whitelist.0\");\n }", "public Builder addAllOpenWhiteList(\n java.lang.Iterable<java.lang.String> values) {\n ensureOpenWhiteListIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, openWhiteList_);\n onChanged();\n return this;\n }", "public com.google.protobuf.ByteString\n getOpenWhiteListBytes(int index) {\n return openWhiteList_.getByteString(index);\n }", "public abstract List<C41717j> mo70725h(String str);", "static int getNumPatterns() { return 64; }", "private static void skipSplitAdd(String s, List<String> list) {\n String tmp[] = s.split(\" \");\n\n for (int i = 1; i < tmp.length; i++) {\n list.add(tmp[i]);\n\n // System.out.println(tmp[i]);\n }\n }", "public static void addStars(ArrayList<String> list){\r\n //Loops through the list\r\n for(int i = 1; i < list.size(); i+=2){\r\n list.add(i, \"*\");\r\n }\r\n System.out.println(list);\r\n }", "private void m4676a(List<C0906d> list, StringBuilder sb) {\n if (sb.length() != 0) {\n list.add(new C0906d(C0906d.EnumC0907a.LITERAL, sb.toString()));\n }\n }", "public void setWhiteCounter(int num){\n this.whiteCounter = num;\n }", "StringList createStringList();", "List<C1114c> mo5886k(String str);", "private String genWhiteSpaceRegex(int noOfWhiteSpace,\n String multiWhiteSpace,\n String zeroWhiteSpace) {\n\n return (noOfWhiteSpace == 0) ? zeroWhiteSpace\n : multiWhiteSpace.replace(\"%%\", String.valueOf(noOfWhiteSpace));\n }", "public com.google.protobuf.ByteString\n getOpenWhiteListBytes(int index) {\n return openWhiteList_.getByteString(index);\n }", "private void generateLists(String num, Stack<String> numberList)\n {\n\tfor(int i = 0, len = num.length(); i < len; i++)\n\t numberList.push(new Character(num.charAt(i)).toString());\n }", "private void exercise5() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> nonDuplicateList;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n nonDuplicateList = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .collect(toList());\n }\n\n nonDuplicateList.forEach(System.out::println);\n }", "void mo100443a(List<String> list);", "ListString createListString();", "List<Log> mo13160a(String str, int i);", "public com.google.protobuf.ProtocolStringList\n getOpenWhiteListList() {\n return openWhiteList_.getUnmodifiableView();\n }", "public static void main(String[] args) { String s = \"catsanddog\";\n// List<String> wordDict = new ArrayList<>(Arrays.asList(\"cat\", \"cats\", \"and\", \"sand\", \"dog\"));\n//\n String s = \"pineapplepenappl\";\n List<String> wordDict = new ArrayList<>(Arrays.asList(\"apple\", \"pen\", \"applepen\", \"pine\", \"pineapple\"));\n\n WordBreak140 tmp = new WordBreak140();\n tmp.wordBreak(s, wordDict);\n }", "@Test\n public void repeatedSubstringPattern() {\n assertTrue(new Solution1().repeatedSubstringPattern(\"abcabcabcabc\"));\n }", "@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }", "private static List<String> testStringGenerator(List<String> palString) {\n\t\tList<String> list = new ArrayList<>();\n\t\tfor (String pal : palString) {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor (int i = 0; i < 10; i++) {\n\t\t\t\tsb.append(pal);\n\t\t\t\tfor (int j = 0; j < pal.length(); j++) {\n\t\t\t\t\tsb.append(j % 10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(sb.toString());\n\t\t}\n\t\treturn list;\n\t}", "public static void makeBlanks(char[] list) {\n\t\tfor (int i = 0; i < list.length; i++) {\n\t\t\tlist[i] = '*';\n\t\t}\n\t}", "public int selectOriginalTokens (Scanner scan, String [] list){\n \n int count = 0;\n while(scan.hasNext()){\n String line = scan.nextLine();\n String[] t = line.split(\"[ \\n\\t\\r.,:?)({}\\\\[\\\\]]\");\n for (int i = 0; i < t.length; i++){\n String item = t[i].trim();\n if(item.length() > 0){\n list[count] = item;\n count++;\n }//End if statement\n }//End for loop\n }//End while loop\n \n return count;\n }", "private String whiteSpace(String sum, String num)\n {\n\tString space = \"\";\n\tfor(int i = 0; i < sum.length() - num.length(); i++)\n\t space += \" \";\n\treturn space;\n }", "void mo54419a(List<String> list);", "List<C1113b> mo5874b(String str);", "public static List<String> stringList() {\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.add(\"abdxxx\");\n\t\tlist.add(\"xxxxx\");\n\t\tlist.add(\"hi\");\n\t\tlist.add(\"SmoothStack\");\n\t\tlist.add(\"Wyatt x Wyatt x\");\n\t\treturn list;\n\t}", "private static String[] resetStringArray() {\n String[] st = new String[L_MAX];\n L = 2 << 8;\n W = 9;\n int i;\n // initialize symbol table with all 1-character strings\n for (i = 0; i < R; i++)\n st[i] = \"\" + (char) i;\n st[i++] = \"\"; // (unused) lookahead for EOF\n return st;\n }", "public void setUp2( )\n\t{\n\t\tfor( int i = 0; i < 1000; i++ )\n\t\t{\n\t\t\tlista.append( \"\" + i );\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tList<Character>st1=new ArrayList<>();\n\t\n\t\tst1.add('a');\n\t\tst1.add('b');\n\t\tst1.add('a');\n\t\tst1.add('a');\n\t\tst1.add('c');\n\t\tst1.add('t');\n\t\n\t\tSystem.out.println(st1);//[a, b, a, a, c, t]\n\t\t\n\t\tList<Character>st2=new ArrayList<>();//empty []\n\t\tfor (int i=0; i<st1.size();i++) {\n\t\t\tif(!st2.contains(st1.get(i))) {\n\t\t\t\t// created str2 [empty], we will get the element from st1 to st2 while checking if there is repetition \n\t\t\t\tst2.add(st1.get(i));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(st2);//[a, b, c, t]\n\t\t\n\n\t}", "private void many(Set<String> s) {\n\t\twhile (!done() && s.contains(program.charAt(pos)+\"\"))\n\t\t\tpos++;\n }", "private static String createPrepStmPlaceHolder(int num) {\n\t\tchar[] c_ar = new char[num*3];\n\t\tc_ar[0] = '(';\n\t\tc_ar[1] = '?';\n\t\tfor(int i=1; i<num; ++i) {\n\t\t\tc_ar[3*i-1] = ',';\n\t\t\tc_ar[3*i] = ' ';\n\t\t\tc_ar[3*i+1] = '?';\n\t\t}\n\t\tc_ar[3*num-1] = ')';\n\t\treturn new String(c_ar);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_2() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\", false), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "private void exercise1() {\n final List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerList = list.stream()\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }", "private static String repeatSpace(int number) {\n StringBuilder space = new StringBuilder();\n\n // Adding spaces.\n for (int i = 0; i < number; i++) {\n space.append(\" \");\n }\n\n //returning spaces.\n return space.toString();\n }", "public void mo88640a(List<String> list) {\n List<String> stringList = RxPreferences.INSTANCE.getStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), new ArrayList());\n stringList.addAll(0, list);\n RxPreferences.INSTANCE.putStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), (List) StreamSupport.m150134a(stringList).mo131128a(new AbstractC32239o(new HashSet(stringList)) {\n /* class com.zhihu.android.p1480db.fragment.customview.C18240x255e53c2 */\n private final /* synthetic */ HashSet f$0;\n\n {\n this.f$0 = r1;\n }\n\n @Override // java8.util.p2234b.AbstractC32239o\n public final boolean test(Object obj) {\n return DbEditorSuggestTagCustomView.m93354a(this.f$0, (String) obj);\n }\n }).mo131126a(5).mo131125a(Collectors.m150203a($$Lambda$ofunvu1bqmYbfXGEtxXaV_csE4M.INSTANCE)));\n }", "public Builder addOpenWhiteListBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n ensureOpenWhiteListIsMutable();\n openWhiteList_.add(value);\n onChanged();\n return this;\n }", "@Test\n public void noSpacesBetweenKeywordsTest() {\n tester.yields(\"LaLaLaLaLaaaLi\", lala.EXPRESSION);\n }", "private int skipLeadingWhite( List content, int start) {\r\n if (start < 0) {\r\n start = 0;\r\n }\r\n\r\n int index = start;\r\n int size = content.size();\r\n if (currentFormat.trimAllWhite\r\n || currentFormat.textNormalize\r\n || currentFormat.textTrim) {\r\n while( index < size) {\r\n if ( !isAllWhitespace( content.get(index))) {\r\n return index;\r\n }\r\n index++;\r\n }\r\n }\r\n return index;\r\n }", "private void initWhitespace(Set<String> s) {\n\t\ts.add(\" \");\n\t\ts.add(\"\\n\");\n\t\ts.add(\"\\t\");\n }", "List<C1111j> mo5869a(int i);", "private void appendPlaceHolder(StringBuilder builder, int indent, int consecutiveExcluded, String message) {\n indent(builder, indent);\n builder.append(ELLIPSIS)\n .append(\" \")\n .append(consecutiveExcluded)\n .append(\" \")\n .append(message)\n .append(CoreConstants.LINE_SEPARATOR);\n }", "public void visiualizeSkipList(){\r\n\t\tint number=0;\r\n\t\tNode dummy = sl.getFrom(0,0);\r\n\t\t\r\n\t\tNode next;\r\n\t\tfor(int i=sl.height(); i>=0; i--){\r\n\t\t\t\r\n\t\t\tnext = sl.getFrom(i,0);\r\n\t\t\t\r\n\t\t\tfor(int j=0; j<(sl.size()+2); j++){\r\n\r\n\t\t\t\tnumber = next.getKey();\r\n\t\t\t\t//F.p(number);\r\n\t\t\t\tif(number==dummy.getKey()){\r\n\r\n\t\t\t\t\tif(number==minf)\r\n\t\t\t\t\t\tSystem.out.print(\"-inf\");\r\n\t\t\t\t\telse if(number==inf)\r\n\t\t\t\t\t\tSystem.out.print(\"---inf\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(\"-\",2)+number);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(\"-\",4));\r\n\t\t\t\t\r\n\t\t\t\tif(dummy.getKey()==number)\r\n\t\t\t\t\tnext = next.getRight();\r\n\t\t\t\t\r\n\t\t\t\tdummy = dummy.getRight();\r\n\t\t\t}\r\n\t\t\tdummy = sl.getFrom(0,0);\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "public long getWhiteSpacesCount() {\n return whiteSpacesCount;\n }", "@Test\n\tpublic void testStartingIndicesRegression(){\n\t\tassertLeftmostStartingIndices(\"5,1,7,3,2|-..xxx$1..x...xxx$3....-xx........\", 0, 6, 8, 18, 22);\n\t\tassertRightmostStartingIndices(\"7,5|.......xxx$1....xxx$2..-\", 6, 14);\n\t\t\n\t}", "public MacroList() {\n\t\tthis.macrosses = new HashMap<Integer, String>(12);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_1() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\"), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n String s=\"a /*a*/ sd /*v*/\";\n Pattern p = Pattern.compile(\"(\\\\/\\\\*(\\\\w|\\r\\n)+\\\\*\\\\/)\");\n Matcher m = p.matcher(s);\n List<String> l = new ArrayList<>(100);\n\n while (m.find()) {\n System.out.println(\"tick\");\n l.add(s.substring(m.start()+2, m.end()-2));\n }\n\n System.out.println(l);\n }", "StringPatternCounter(ArrayList<StringPattern> stringPatternList, String fileInput)\n {\n super(fileInput);\n this.stringPatternList = stringPatternList;\n }", "@Before\n public void createString(){\n s1 = \"casa\";\n\ts2 = \"cassa\";\n\ts3 = \"\";\n\ts4 = \"casa\";\n }", "public String minRemoveToMakeValid(String s) {\n int openAvail = 0;\n Set<Integer> skipSet = new HashSet<>();\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) == ')') {\n if (openAvail == 0) {\n skipSet.add(i);\n } else {\n openAvail -= 1;\n }\n } else if (s.charAt(i) == '(') {\n openAvail += 1;\n }\n }\n\n int closedAvail = 0;\n for (int i = s.length() - 1; i >= 0; i--) {\n if (s.charAt(i) == ')') {\n closedAvail += 1;\n } else if (s.charAt(i) == '(') {\n if (closedAvail == 0) {\n skipSet.add(i);\n } else {\n closedAvail -= 1; \n }\n }\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < s.length(); i++) {\n if (!skipSet.contains(i)){\n sb.append(s.charAt(i));\n }\n }\n return sb.toString();\n }", "@Test(timeout = 4000)\n public void test20() throws Throwable {\n StringReader stringReader0 = new StringReader(\"0(Hu\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer2 = new StreamTokenizer(stringReader0);\n JSTerm jSTerm0 = new JSTerm(streamTokenizer0);\n stringReader0.reset();\n StreamTokenizer streamTokenizer3 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer4 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer5 = new StreamTokenizer(stringReader0);\n streamTokenizer0.commentChar((-4));\n StreamTokenizer streamTokenizer6 = new StreamTokenizer(stringReader0);\n streamTokenizer6.ordinaryChars((-1), (-322070664));\n streamTokenizer1.parseNumbers();\n jSTerm0.add((Object) \"JSTerm: Error reading control parameters: \");\n StreamTokenizer streamTokenizer7 = new StreamTokenizer(stringReader0);\n streamTokenizer7.pushBack();\n streamTokenizer1.nextToken();\n StreamTokenizer streamTokenizer8 = new StreamTokenizer(stringReader0);\n streamTokenizer2.slashSlashComments(false);\n JSTerm jSTerm1 = new JSTerm(streamTokenizer5);\n streamTokenizer1.slashStarComments(false);\n streamTokenizer3.eolIsSignificant(false);\n streamTokenizer7.commentChar((-4));\n StreamTokenizer streamTokenizer9 = new StreamTokenizer(stringReader0);\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n jSSubstitution0.listIterator();\n JSSubstitution jSSubstitution1 = jSTerm1.matches((JSPredicateForm) jSTerm0, jSSubstitution0);\n assertTrue(jSSubstitution1.fail());\n }", "public Removalstops()\n {\n stopWords.add(\"am\");\n stopWords.add(\"my\");\nstopWords.add(\"at\");\nstopWords.add(\"a\");\nstopWords.add(\"i\");\nstopWords.add(\"is\");\nstopWords.add(\"of\");\nstopWords.add(\"have\");\nstopWords.add(\"--\");\nstopWords.add(\"do\");\nstopWords.add(\"the\");\nstopWords.add(\"was\");\nstopWords.add(\"iam\");\nstopWords.add(\"there\");\nstopWords.add(\"what\");\nstopWords.add(\"for\");\nstopWords.add(\"in\");\nstopWords.add(\"very\");\nstopWords.add(\"and\");\nstopWords.add(\"to\");\nstopWords.add(\"often\");\nstopWords.add(\"because\");\nstopWords.add(\"in\");\nstopWords.add(\"an\");\nstopWords.add(\"can\");\nstopWords.add(\"via\");\nstopWords.add(\"even\");\nstopWords.add(\"as\");\nstopWords.add(\"best\");\nstopWords.add(\"been\");\nstopWords.add(\"into\");\nstopWords.add(\"by\");\nstopWords.add(\"around\");\nstopWords.add(\"being\");\nstopWords.add(\"from\");\nstopWords.add(\"etc\");\nstopWords.add(\"his\");\nstopWords.add(\"do\");\nstopWords.add(\"have\");\nstopWords.add(\"had\"); \nstopWords.add(\"able\");\nstopWords.add(\"about\");\nstopWords.add(\"above\");\nstopWords.add(\"abroad\");\nstopWords.add(\"according\");\nstopWords.add(\"accordingly\");\nstopWords.add(\"across\");\nstopWords.add(\"actually\");\nstopWords.add(\"adj\");\nstopWords.add(\"after\");\nstopWords.add(\"afterwards\");\nstopWords.add(\"again\");\nstopWords.add(\"against\");\nstopWords.add(\"ago\");\nstopWords.add(\"ahead\");\nstopWords.add(\"ain't\");\nstopWords.add(\"all\");\nstopWords.add(\"allow\");\nstopWords.add(\"allows\");\nstopWords.add(\"almost\");\nstopWords.add(\"alone\");\nstopWords.add(\"along\");\nstopWords.add(\"alongside\");\nstopWords.add(\"already\");\nstopWords.add(\"also\");\nstopWords.add(\"although\");\nstopWords.add(\"always\");\nstopWords.add(\"am\");\nstopWords.add(\"amid\");\nstopWords.add(\"amidst\");\nstopWords.add(\"among\");\nstopWords.add(\"amongst\");\nstopWords.add(\"an\");\nstopWords.add(\"and\");\nstopWords.add(\"another\");\nstopWords.add(\"any\");\nstopWords.add(\"anybody\");\nstopWords.add(\"anyhow\");\nstopWords.add(\"anyone\");\nstopWords.add(\"anything\");\nstopWords.add(\"anyway\");\nstopWords.add(\"anyways\");\nstopWords.add(\"anywhere\");\nstopWords.add(\"apart\");\nstopWords.add(\"appear\");\nstopWords.add(\"appreciate\");\nstopWords.add(\"appropriate\");\nstopWords.add(\"are\");\nstopWords.add(\"aren't\");\nstopWords.add(\"around\");\nstopWords.add(\"as\");\nstopWords.add(\"a's\");\nstopWords.add(\"aside\");\nstopWords.add(\"ask\");\nstopWords.add(\"asking\");\nstopWords.add(\"associated\");\nstopWords.add(\"at\");\nstopWords.add(\"available\");\nstopWords.add(\"away\");\nstopWords.add(\"awfully\");\nstopWords.add(\"back\");\nstopWords.add(\"backward\");\nstopWords.add(\"backwards\");\nstopWords.add(\"be\");\nstopWords.add(\"became\");\nstopWords.add(\"beacause\");\nstopWords.add(\"become\");\nstopWords.add(\"becomes\");\nstopWords.add(\"becoming\");\nstopWords.add(\"been\");\nstopWords.add(\"before\");\nstopWords.add(\"beforehand\");\nstopWords.add(\"begin\");\nstopWords.add(\"behind\");\nstopWords.add(\"being\");\nstopWords.add(\"believe\");\nstopWords.add(\"below\");\nstopWords.add(\"beside\");\nstopWords.add(\"besides\");\nstopWords.add(\"best\");\nstopWords.add(\"better\");\nstopWords.add(\"between\");\nstopWords.add(\"beyond\");\nstopWords.add(\"both\");\nstopWords.add(\"brief\");\nstopWords.add(\"but\");\nstopWords.add(\"by\");\nstopWords.add(\"came\");\nstopWords.add(\"can\");\nstopWords.add(\"cannot\");\nstopWords.add(\"cant\");\nstopWords.add(\"can't\");\nstopWords.add(\"caption\");\nstopWords.add(\"cause\");\nstopWords.add(\"causes\");\nstopWords.add(\"certain\");\nstopWords.add(\"cetrainly\");\nstopWords.add(\"changes\");\nstopWords.add(\"clearly\");\nstopWords.add(\"c'mon\");\nstopWords.add(\"co\");\nstopWords.add(\"co.\");\nstopWords.add(\"com\");\nstopWords.add(\"come\");\nstopWords.add(\"comes\");\nstopWords.add(\"concerning\");\nstopWords.add(\"consequently\");\nstopWords.add(\"consider\");\nstopWords.add(\"considering\");\nstopWords.add(\"could\");\nstopWords.add(\"couldn't\");\nstopWords.add(\"c's\");\nstopWords.add(\"currently\");\nstopWords.add(\"dare\");\nstopWords.add(\"daren't\");\nstopWords.add(\"definitely\");\nstopWords.add(\"described\");\nstopWords.add(\"despite\");\nstopWords.add(\"did\");\nstopWords.add(\"didn't\");\nstopWords.add(\"different\");\nstopWords.add(\"directly\");\nstopWords.add(\"do\");\nstopWords.add(\"does\");\nstopWords.add(\"doesn't\");\nstopWords.add(\"doing\");\nstopWords.add(\"done\");\nstopWords.add(\"don't\");\nstopWords.add(\"down\");\nstopWords.add(\"downwards\");\nstopWords.add(\"during\");\nstopWords.add(\"each\");\nstopWords.add(\"edu\");\nstopWords.add(\"eg\");\nstopWords.add(\"eight\");\nstopWords.add(\"eighty\");\nstopWords.add(\"either\");\nstopWords.add(\"else\");\nstopWords.add(\"elsewhere\");\nstopWords.add(\"end\");\nstopWords.add(\"ending\");\nstopWords.add(\"enough\");\nstopWords.add(\"entirely\");\nstopWords.add(\"especially\");\nstopWords.add(\"et\");\nstopWords.add(\"etc\");\nstopWords.add(\"even\");\nstopWords.add(\"evenmore\");\nstopWords.add(\"every\");\nstopWords.add(\"everybody\");\nstopWords.add(\"everyone\");\nstopWords.add(\"everything\");\nstopWords.add(\"everywhere\");\nstopWords.add(\"ex\");\nstopWords.add(\"exactly\");\nstopWords.add(\"example\");\nstopWords.add(\"except\");\nstopWords.add(\"fairly\");\nstopWords.add(\"far\");\nstopWords.add(\"farhter\");\nstopWords.add(\"few\");\nstopWords.add(\"fewer\");\nstopWords.add(\"fifth\");\nstopWords.add(\"first\");\nstopWords.add(\"five\");\nstopWords.add(\"followed\");\nstopWords.add(\"following\");\nstopWords.add(\"follows\");\nstopWords.add(\"for\");\nstopWords.add(\"forever\");\nstopWords.add(\"former\");\nstopWords.add(\"formerly\");\nstopWords.add(\"forth\");\nstopWords.add(\"forward\");\nstopWords.add(\"found\");\nstopWords.add(\"four\");\nstopWords.add(\"from\");\nstopWords.add(\"further\");\nstopWords.add(\"furthermore\");\nstopWords.add(\"get\");\nstopWords.add(\"gets\");\nstopWords.add(\"getting\");\nstopWords.add(\"given\");\nstopWords.add(\"gives\");\nstopWords.add(\"go\");\nstopWords.add(\"goes\");\nstopWords.add(\"going\");\nstopWords.add(\"gone\");\nstopWords.add(\"got\");\nstopWords.add(\"gotten\");\nstopWords.add(\"greetings\");\nstopWords.add(\"had\");\nstopWords.add(\"hadn't\");\nstopWords.add(\"half\");\nstopWords.add(\"happens\");\nstopWords.add(\"hardly\");\nstopWords.add(\"has\");\nstopWords.add(\"hasn't\");\nstopWords.add(\"have\");\nstopWords.add(\"haven't\");\nstopWords.add(\"having\");\nstopWords.add(\"he\");\nstopWords.add(\"he'd\");\nstopWords.add(\"he'll\");\nstopWords.add(\"hello\");\nstopWords.add(\"help\");\nstopWords.add(\"hence\");\nstopWords.add(\"her\");\nstopWords.add(\"here\");\nstopWords.add(\"hereafter\");\nstopWords.add(\"hereby\");\nstopWords.add(\"herein\");\nstopWords.add(\"here's\");\nstopWords.add(\"hereupon\");\nstopWords.add(\"hers\");\nstopWords.add(\"herself\");\nstopWords.add(\"he's\");\nstopWords.add(\"hi\");\nstopWords.add(\"him\");\nstopWords.add(\"himself\");\nstopWords.add(\"his\");\nstopWords.add(\"hither\");\nstopWords.add(\"hopefully\");\nstopWords.add(\"how\");\nstopWords.add(\"howbeit\");\nstopWords.add(\"however\");\nstopWords.add(\"however\");\nstopWords.add(\"hundred\");\nstopWords.add(\"i'd\");\nstopWords.add(\"ie\");\nstopWords.add(\"if\");\nstopWords.add(\"ignored\");\nstopWords.add(\"i'll\");\nstopWords.add(\"i'm\");\nstopWords.add(\"immediate\");\nstopWords.add(\"in\");\nstopWords.add(\"iansmuch\");\nstopWords.add(\"inc\");\nstopWords.add(\"inc.\");\nstopWords.add(\"indeed\");\nstopWords.add(\"indicate\");\nstopWords.add(\"indicated\");\nstopWords.add(\"indicates\");\nstopWords.add(\"inner\");\nstopWords.add(\"inside\");\nstopWords.add(\"insofar\");\nstopWords.add(\"into\");\nstopWords.add(\"inward\");\nstopWords.add(\"is\");\nstopWords.add(\"isn't\");\nstopWords.add(\"it\");\nstopWords.add(\"it'd\");\nstopWords.add(\"it'll\");\nstopWords.add(\"its\");\nstopWords.add(\"it's\");\nstopWords.add(\"itself\");\nstopWords.add(\"i've\");\nstopWords.add(\"just\");\nstopWords.add(\"k\");\nstopWords.add(\"keep\");\nstopWords.add(\"keeps\");\nstopWords.add(\"kept\");\nstopWords.add(\"know\");\nstopWords.add(\"knows\");\nstopWords.add(\"known\");\nstopWords.add(\"last\");\nstopWords.add(\"lately\");\nstopWords.add(\"later\");\nstopWords.add(\"latter\");\nstopWords.add(\"latterly\");\nstopWords.add(\"least\");\nstopWords.add(\"less\");\nstopWords.add(\"let\");\nstopWords.add(\"let's\");\nstopWords.add(\"like\");\nstopWords.add(\"liked\");\nstopWords.add(\"likely\");\nstopWords.add(\"likewise\");\nstopWords.add(\"little\");\nstopWords.add(\"look\");\nstopWords.add(\"looks\");\nstopWords.add(\"low\");\nstopWords.add(\"lower\");\nstopWords.add(\"ltd\");\nstopWords.add(\"made\");\nstopWords.add(\"mainly\");\nstopWords.add(\"make\");\nstopWords.add(\"makes\");\nstopWords.add(\"many\");\nstopWords.add(\"may\");\nstopWords.add(\"maybe\");\nstopWords.add(\"mayn't\");\nstopWords.add(\"me\");\nstopWords.add(\"mean\");\nstopWords.add(\"meanwhile\");\nstopWords.add(\"merely\");\nstopWords.add(\"might\");\nstopWords.add(\"mightn't\");\nstopWords.add(\"mine\");\nstopWords.add(\"minus\");\nstopWords.add(\"miss\");\nstopWords.add(\"more\");\nstopWords.add(\"moreover\");\nstopWords.add(\"most\");\nstopWords.add(\"mostly\");\nstopWords.add(\"mr\");\nstopWords.add(\"mrs\");\nstopWords.add(\"much\");\nstopWords.add(\"must\");\nstopWords.add(\"mustn't\");\nstopWords.add(\"my\");\nstopWords.add(\"myself\");\nstopWords.add(\"name\");\nstopWords.add(\"namely\");\nstopWords.add(\"nd\");\nstopWords.add(\"near\");\nstopWords.add(\"nearly\");\nstopWords.add(\"necessary\");\nstopWords.add(\"need\");\nstopWords.add(\"needn't\");\nstopWords.add(\"needs\");\nstopWords.add(\"neither\");\nstopWords.add(\"never\");\nstopWords.add(\"neverf\");\nstopWords.add(\"neverless\");\nstopWords.add(\"nevertheless\");\nstopWords.add(\"new\");\nstopWords.add(\"next\");\nstopWords.add(\"nine\");\nstopWords.add(\"ninety\");\nstopWords.add(\"no\");\nstopWords.add(\"nobody\");\nstopWords.add(\"non\");\nstopWords.add(\"none\");\nstopWords.add(\"nonetheless\");\nstopWords.add(\"noone\");\nstopWords.add(\"no-one\");\nstopWords.add(\"nor\");\nstopWords.add(\"normally\");\nstopWords.add(\"not\");\nstopWords.add(\"nothing\");\nstopWords.add(\"notwithstanding\");\nstopWords.add(\"novel\");\nstopWords.add(\"now\");\nstopWords.add(\"nowwhere\");\nstopWords.add(\"obviously\");\nstopWords.add(\"of\");\nstopWords.add(\"off\");\nstopWords.add(\"often\");\nstopWords.add(\"oh\");\nstopWords.add(\"ok\");\nstopWords.add(\"okay\");\nstopWords.add(\"old\");\nstopWords.add(\"on\");\nstopWords.add(\"once\");\nstopWords.add(\"one\");\nstopWords.add(\"ones\");\nstopWords.add(\"one's\");\nstopWords.add(\"only\");\nstopWords.add(\"onto\");\nstopWords.add(\"opposite\");\nstopWords.add(\"or\");\nstopWords.add(\"other\");\nstopWords.add(\"others\");\nstopWords.add(\"otherwise\");\nstopWords.add(\"ought\");\nstopWords.add(\"oughtn't\");\nstopWords.add(\"our\");\nstopWords.add(\"ourselves\");\nstopWords.add(\"out\");\nstopWords.add(\"outside\");\nstopWords.add(\"over\");\nstopWords.add(\"overall\");\nstopWords.add(\"own\");\nstopWords.add(\"particular\");\nstopWords.add(\"particularly\");\nstopWords.add(\"past\");\nstopWords.add(\"per\");\nstopWords.add(\"perhaps\");\nstopWords.add(\"placed\");\nstopWords.add(\"please\");\nstopWords.add(\"plus\");\nstopWords.add(\"possible\");\nstopWords.add(\"presumably\");\nstopWords.add(\"probably\");\nstopWords.add(\"provided\");\nstopWords.add(\"provides\");\nstopWords.add(\"que\");\nstopWords.add(\"quite\");\nstopWords.add(\"qv\");\nstopWords.add(\"rather\");\nstopWords.add(\"rd\");\nstopWords.add(\"re\");\nstopWords.add(\"really\");\nstopWords.add(\"reasonably\");\nstopWords.add(\"recent\");\nstopWords.add(\"recently\");\nstopWords.add(\"regarding\");\nstopWords.add(\"regardless\");\nstopWords.add(\"regards\");\nstopWords.add(\"relatively\");\nstopWords.add(\"respectively\");\nstopWords.add(\"right\");\nstopWords.add(\"round\");\nstopWords.add(\"said\");\nstopWords.add(\"same\");\nstopWords.add(\"saw\");\nstopWords.add(\"say\");\nstopWords.add(\"saying\");\nstopWords.add(\"says\");\nstopWords.add(\"second\");\nstopWords.add(\"secondly\");\nstopWords.add(\"see\");\nstopWords.add(\"seeing\");\nstopWords.add(\"seem\");\nstopWords.add(\"seemed\");\nstopWords.add(\"seeming\");\nstopWords.add(\"seems\");\nstopWords.add(\"seen\");\nstopWords.add(\"self\");\nstopWords.add(\"selves\");\nstopWords.add(\"sensible\");\nstopWords.add(\"sent\");\nstopWords.add(\"serious\");\nstopWords.add(\"seriously\");\nstopWords.add(\"seven\");\nstopWords.add(\"several\");\nstopWords.add(\"shall\");\nstopWords.add(\"shan't\");\nstopWords.add(\"she\");\nstopWords.add(\"she'd\");\nstopWords.add(\"she'll\");\nstopWords.add(\"she's\");\nstopWords.add(\"should\");\nstopWords.add(\"shouldn't\");\nstopWords.add(\"since\");\nstopWords.add(\"six\");\nstopWords.add(\"so\");\nstopWords.add(\"some\");\nstopWords.add(\"somebody\");\nstopWords.add(\"someday\");\nstopWords.add(\"somehow\");\nstopWords.add(\"someone\");\nstopWords.add(\"something\");\nstopWords.add(\"sometime\");\nstopWords.add(\"sometimes\");\nstopWords.add(\"somewhat\");\nstopWords.add(\"somewhere\");\nstopWords.add(\"soon\");\nstopWords.add(\"sorry\");\nstopWords.add(\"specified\");\nstopWords.add(\"specify\");\nstopWords.add(\"specifying\");\nstopWords.add(\"still\");\nstopWords.add(\"sub\");\nstopWords.add(\"such\");\nstopWords.add(\"sup\");\nstopWords.add(\"sure\");\nstopWords.add(\"take\");\nstopWords.add(\"taken\");\nstopWords.add(\"taking\");\nstopWords.add(\"tell\");\nstopWords.add(\"tends\");\nstopWords.add(\"th\");\nstopWords.add(\"than\");\nstopWords.add(\"thank\");\nstopWords.add(\"thanks\");\nstopWords.add(\"thanx\");\nstopWords.add(\"that\");\nstopWords.add(\"that'll\");\nstopWords.add(\"thats\");\nstopWords.add(\"that've\");\nstopWords.add(\"the\");\nstopWords.add(\"their\");\nstopWords.add(\"theirs\");\nstopWords.add(\"them\");\nstopWords.add(\"themselves\");\nstopWords.add(\"then\");\nstopWords.add(\"thence\");\nstopWords.add(\"there\");\nstopWords.add(\"thereafter\");\nstopWords.add(\"thereby\");\nstopWords.add(\"there'd\");\nstopWords.add(\"therefore\");\nstopWords.add(\"therein\");\nstopWords.add(\"ther'll\");\nstopWords.add(\"there're\");\nstopWords.add(\"theres\");\nstopWords.add(\"there's\");\nstopWords.add(\"thereupon\");\nstopWords.add(\"there've\");\nstopWords.add(\"these\");\nstopWords.add(\"they\");\nstopWords.add(\"they'd\");\nstopWords.add(\"they'll\");\nstopWords.add(\"they're\");\nstopWords.add(\"they've\");\nstopWords.add(\"thing\");\nstopWords.add(\"things\");\nstopWords.add(\"think\");\nstopWords.add(\"third\");\nstopWords.add(\"thirty\");\nstopWords.add(\"this\");\nstopWords.add(\"thorough\");\nstopWords.add(\"thoroughly\");\nstopWords.add(\"those\");\nstopWords.add(\"though\");\nstopWords.add(\"throughout\");\nstopWords.add(\"thru\");\nstopWords.add(\"thus\");\nstopWords.add(\"till\");\nstopWords.add(\"to\");\nstopWords.add(\"together\");\nstopWords.add(\"too\");\nstopWords.add(\"took\");\nstopWords.add(\"toward\");\nstopWords.add(\"towards\");\nstopWords.add(\"tried\");\nstopWords.add(\"tries\");\nstopWords.add(\"truly\");\nstopWords.add(\"try\");\nstopWords.add(\"trying\");\nstopWords.add(\"t's\");\nstopWords.add(\"twice\");\nstopWords.add(\"two\");\nstopWords.add(\"un\");\nstopWords.add(\"under\");\nstopWords.add(\"underneath\");\nstopWords.add(\"undoing\");\nstopWords.add(\"unfortunately\");\nstopWords.add(\"unless\");\nstopWords.add(\"unlike\");\nstopWords.add(\"unlikely\");\nstopWords.add(\"untill\");\nstopWords.add(\"unto\");\nstopWords.add(\"up\");\nstopWords.add(\"upon\");\nstopWords.add(\"upwards\");\nstopWords.add(\"us\");\nstopWords.add(\"use\");\nstopWords.add(\"used\");\nstopWords.add(\"useful\");\nstopWords.add(\"uses\");\nstopWords.add(\"using\");\nstopWords.add(\"usually\");\nstopWords.add(\"v\");\nstopWords.add(\"value\");\nstopWords.add(\"various\");\nstopWords.add(\"versus\");\nstopWords.add(\"very\");\nstopWords.add(\"via\");\nstopWords.add(\"viz\");\nstopWords.add(\"vs\");\nstopWords.add(\"want\");\nstopWords.add(\"wants\");\nstopWords.add(\"was\");\nstopWords.add(\"wasn't\");\nstopWords.add(\"way\");\nstopWords.add(\"we\");\nstopWords.add(\"we'd\");\nstopWords.add(\"welcome\");\nstopWords.add(\"well\");\nstopWords.add(\"we'll\");\nstopWords.add(\"went\");\nstopWords.add(\"were\");\nstopWords.add(\"we're\");\nstopWords.add(\"weren't\");\nstopWords.add(\"we've\");\nstopWords.add(\"what\");\nstopWords.add(\"whatever\");\nstopWords.add(\"what'll\");\nstopWords.add(\"what's\");\nstopWords.add(\"what've\");\nstopWords.add(\"when\");\nstopWords.add(\"whence\");\nstopWords.add(\"whenever\");\nstopWords.add(\"where\");\nstopWords.add(\"whereafter\");\nstopWords.add(\"whereas\");\nstopWords.add(\"whereby\");\nstopWords.add(\"wherein\");\nstopWords.add(\"where's\");\nstopWords.add(\"whereupon\");\nstopWords.add(\"whereever\");\nstopWords.add(\"whether\");\nstopWords.add(\"which\");\nstopWords.add(\"whichever\");\nstopWords.add(\"while\");\nstopWords.add(\"whilst\");\nstopWords.add(\"whither\");\nstopWords.add(\"who\");\nstopWords.add(\"who'd\");\nstopWords.add(\"whoever\");\nstopWords.add(\"whole\");\nstopWords.add(\"who'll\");\nstopWords.add(\"whom\");\nstopWords.add(\"whomever\");\nstopWords.add(\"who's\");\nstopWords.add(\"whose\");\nstopWords.add(\"why\");\nstopWords.add(\"will\");\nstopWords.add(\"willing\");\nstopWords.add(\"wish\");\nstopWords.add(\"with\");\nstopWords.add(\"within\");\nstopWords.add(\"without\");\nstopWords.add(\"wonder\");\nstopWords.add(\"won't\");\nstopWords.add(\"would\");\nstopWords.add(\"wouldn't\");\nstopWords.add(\"yes\");\nstopWords.add(\"yet\");\nstopWords.add(\"you\");\nstopWords.add(\"you'd\");\nstopWords.add(\"you'll\");\nstopWords.add(\"your\");\nstopWords.add(\"you're\");\nstopWords.add(\"yours\");\nstopWords.add(\"yourself\");\nstopWords.add(\"you've\");\nstopWords.add(\"zero\");\n\n \n \n }", "@SuppressWarnings(\"resource\")\n public static void doubleCapacity(String[] array){\n int wordCount = 0;\n int arrayGrowth = 500;\n array = new String[10];\n String strLine = null;\n while (strLine != null) {\n // Store the content into an array\n Scanner s = new Scanner(strLine);\n while (s.hasNext()) {\n if (array.length == wordCount) {\n // expand list\n array = Arrays.copyOf(array, array.length + arrayGrowth);\n }\n array[wordCount] = s.next();\n wordCount++;\n } \n }\n }", "private int skipTrialingWhite( List content, int start) {\r\n int size = content.size();\r\n if (start > size) {\r\n start = size;\r\n }\r\n\r\n int index = start;\r\n if (currentFormat.trimAllWhite\r\n || currentFormat.textNormalize\r\n || currentFormat.textTrim) {\r\n while( index >= 0) {\r\n if ( !isAllWhitespace( content.get(index - 1)))\r\n break;\r\n --index;\r\n }\r\n }\r\n return index;\r\n }", "public abstract void mo9247b(String str, long j, List<String> list);", "private void fillSet() {\r\n\t\tString regex = \"\\\\p{L}+\";\r\n\t\tMatcher matcher = Pattern.compile(regex).matcher(body);\r\n\t\twhile (matcher.find()) {\r\n\t\t\tif (!matcher.group().isEmpty()) {\r\n\t\t\t\twords.add(matcher.group());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private ArrayList<Integer> getEmptySpaces(char[] board) {\n ArrayList<Integer> emptySpaces = new ArrayList<>();\n for (int i = 0; i < board.length; i++) {\n if (board[i] == ' ') {\n emptySpaces.add(i);\n }\n }\n return emptySpaces;\n }", "void mo13370a(int i, int i2, List<C15929a> list) throws IOException;", "private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }", "private static Stream<List<Tile>> substituteBlanks(List<Tile> p) {\n Stream<List<Tile>> res = Stream.of(p);\n //Iterate through all letters.\n for (int i = 0; i < p.size(); i++) {\n //Check for blanks.\n if (p.get(i).getLetter() == Character.MIN_VALUE) {\n //If blank found, substitute it for all a-z, and look again for next blank.\n res = substituteBlankAtIndex(p, i)\n .flatMap(s -> substituteBlanks(s));\n }\n }\n\n return res;\n }", "public static void main(String[] args) {\n String[] strings = new String[100];\n for (int i = 0; i < strings.length; i++) {\n strings[i] = randomStrings(2);\n }\n// for (String s : strings) {\n// System.out.println(s);\n// }\n ArrayList<String> appeared = new ArrayList<>();\n for (String s : strings) {\n if (!appeared.contains(s)) {\n appeared.add(s);\n }\n }\n System.out.println(appeared.size());\n\n }", "private IgnoreListHelper() {\n\t}", "@Test\n\t public void test5 ()\n\t{\n\t\t\tString s = new String(\"aaabaaaaabaabaaaabaaaaaaaaaaaaaabaaaaaaaaaaaaaaabaaaaaaaaaaaaaaba\");\n\t s = s.replaceAll(\"\\\\s+\", \" \");\n\t assertEquals(\"aaaaaaaaaaaaaabaaaaaaaaaaaaaa\", LRS.lrs(s)); \n\t}", "public static List<String> findRepeatedDnaSequences(String s) {\n \tList<String> re=new ArrayList<String>();\n \tif(s.length()<=10){\n \t\treturn re;\n \t}\n \tMap<String, Integer> map=new HashMap<String, Integer>(); \t\n \tfor(int i=10; i<=s.length(); i++){\n \t\tString k=s.substring(i-10, i);\n \t\tif(map.containsKey(k)){\n \t\t\tint val=map.get(k);\n \t\t\tif(val==1){\n \t\t\t\tre.add(k);\n \t\t\t}\n \t\t\tmap.put(k, val+1);\n \t\t}else{\n \t\t\tmap.put(k, 1);\n \t\t}\n \t}\n \treturn re;\n }", "public static void main(){\r\n\t\t\r\n\t\tArrayList<tok> pHolder = new ArrayList<tok>();\r\n\r\n\t\t pHolder.add(new tok(\"@\", \"@\"));\r\n\t\t\r\n\t\treturn;\r\n\t}", "public void mo9497b(List<String> list) {\n this.f1514c = list;\n }", "private void listEntries(BufferedWriter bw, String previous, int start, int end, String zeroes) throws IOException {\n\t\tint writeStart = -1;\n\t\tStringBuilder sb = new StringBuilder();\n\t\tchar c;\n\t\tfor (int i = 0, l = previous.length(); i < l && writeStart == -1; i++) {\n\t\t\tc = previous.charAt(i);\n\t\t\tif (Character.isDigit(c)) {sb.append(c);}\n\t\t\telse {writeStart = Integer.parseInt(sb.toString());}\n\t\t}\n\t\tfor (int i = start; i < end; i++) {bw.write(++writeStart + \"=\" + zeroes + i + \"\\n\");}\n\t}", "public void m20623OooO00o() {\n for (C8964ooOOo000 ooooo000 : this.f22213OooO00o) {\n OooO00o(ooooo000);\n }\n this.f22212OooO00o.clear();\n this.f22213OooO00o.clear();\n }", "public String addWhiteSpace(String str, int number) {\n\t\tStringBuilder result = new StringBuilder();\n\t\tfor (int i = 0; i < str.length(); i+=2) {\n\t\t if (i > 0) {\n\t\t\t for (int j = 0; j < number; j++)\n\t\t\t\t result.append(\" \");\n\t\t }\n\t\t result.append(str.charAt(i));\n\t\t result.append(str.charAt(i+1));\n\t\t}\n\t\treturn result.toString();\n\t}", "public static List<String> findStrobogrammatic(int n) {\n List<String> cur, ans;\n ans = new ArrayList<String>((n & 1) == 0 ? Arrays.asList(\"\") : Arrays.asList(\"0\", \"1\", \"8\"));\n if (n < 2) return ans;\n\n for (;n > 1; n -= 2) {\n cur = ans;\n ans = new ArrayList<String>();\n for (String i : cur) {\n if (n > 3) {\n ans.add('0' + i + '0');\n }\n ans.add('1' + i + '1');\n ans.add('8' + i + '8');\n ans.add('6' + i + '9');\n ans.add('9' + i + '6');\n }\n }\n System.out.println(ans.size());\n return ans;\n }", "private static List<String> induceSynonims(String word) {\n\t\treturn null;\n\t}", "private List<WordScore> liveList(List<WordScore> gridList, String s) {\n s = s.toLowerCase();\n List<WordScore> liveList = new ArrayList<>();\n for(WordScore ws : gridList){\n int nochars = s.length() - s.replaceAll(ws.getWord(), \"\").length();\n liveList.add(new WordScore(ws.getWord(), ws.getScore()-nochars));\n }\n return liveList;\n }", "private void fillRandomList()\n\t{\n\t\trandomList.add(\"I like cheese.\");\n\t\trandomList.add(\"Tortoise can move faster than slow rodent.\");\n\t\trandomList.add(\"I enjoy sitting on the ground.\");\n\t\trandomList.add(\"I like cereal.\");\n\t\trandomList.add(\"This is random.\");\n\t\trandomList.add(\"I like typing\");\n\t\trandomList.add(\"FLdlsjejf is my favorite word.\");\n\t\trandomList.add(\"I have two left toes.\");\n\t\trandomList.add(\"Sqrt(2) = 1.414213562 ...\");\n\t\trandomList.add(\"Hi mom.\");\n\t}", "public static void main(String[] args) {\n\t\tString s=\"22\";\n\t\t\n\t\tif(s.indexOf(\"1\")>=0||s.equals(\"\"))\n\t\t\tSystem.out.println(\"hello\");\n\t\t\t\n\t\tArrayList f=new ArrayList();\n\t\tint stack[]=new int[2*s.length()];\n\t\tint top=-1;\n\t\tchar a[][]=new char[][]{{},{},{'#','a','b','c','#'},{'#','d','e','f','#'},{'#','g','h','i','#'},{'#','j','k','l','#'},{'#','m','n','o','#'},{'#','p','q','r','s','#'},{'#','t','u','v','#'},{'#','w','x','y','z','#'}};\n\t\tint length[]=new int []{0,0,3,3,3,3,3,4,3,4};\n\t\tStringBuilder ans=new StringBuilder();\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tint x=stack[++top]=(int)s.charAt(i)-'0';\n\t\t\tans.append(a[x][1]);\n\t\t\tstack[++top]=1;\n\t\t}\n\t\twhile(stack[1]!=length[(int)s.charAt(0)-'0']+1){\n\t\t\tif(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\tif(s.length()==(top+1)/2){\n\t\t\t\t\twhile(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\t\t\tint r=(top-1)/2;\n\t\t\t\t\t\tchar r1=a[stack[top-1]][stack[top]];\n\t\t\t\t\t\tans.setCharAt(r, r1);\n\t\t\t\t\t\tString ans1=ans.toString();\n\t\t\t\t\t\tf.add(ans1);\n\t\t\t\t\t\tstack[top]++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t\t\ttop+=2;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[top]=1;\n\t\t\t\ttop-=2;\n\t\t\t\tstack[top]++;\n\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(f.size());\n\t}", "private void modify(List listString){\n\t}", "private String repeatM(int count){\n return new String(new char[count]).replace('\\0','M');\n }", "private static void\n eatWhite(ParseState state)\n {\n while(state.pos < state.data.length() && state.data.charAt(state.pos) == ' ')\n {\n ++state.pos;\n }\n }" ]
[ "0.55591595", "0.5524409", "0.54578066", "0.5425202", "0.53757787", "0.5364262", "0.5288061", "0.5286694", "0.52332956", "0.5221815", "0.5211653", "0.5201803", "0.51848924", "0.518454", "0.5178811", "0.51761377", "0.5150973", "0.5141157", "0.5138997", "0.51366293", "0.51279604", "0.5071481", "0.50682074", "0.50673336", "0.5058374", "0.50503725", "0.5046189", "0.5046023", "0.50277734", "0.50120145", "0.49743384", "0.4959684", "0.49513972", "0.49383563", "0.492581", "0.49236417", "0.49056625", "0.48794308", "0.48752907", "0.48583564", "0.4856731", "0.48500034", "0.48222542", "0.48127964", "0.4812774", "0.48096502", "0.48054305", "0.48029843", "0.48021927", "0.4784932", "0.47791797", "0.47657204", "0.47405565", "0.47405225", "0.47390026", "0.47360018", "0.47321254", "0.47301587", "0.47235176", "0.47201622", "0.4720113", "0.4717014", "0.47158983", "0.4708474", "0.4698091", "0.46781585", "0.46772122", "0.46698767", "0.46634603", "0.46624836", "0.46601665", "0.4651289", "0.46146277", "0.4606947", "0.4606018", "0.4604179", "0.45975944", "0.45943204", "0.45926452", "0.45925856", "0.45852026", "0.4583654", "0.45777828", "0.45770383", "0.45763302", "0.4573015", "0.45670146", "0.45669803", "0.4564498", "0.45611578", "0.45599565", "0.45561954", "0.45553017", "0.45483592", "0.45479", "0.45477003", "0.4545243", "0.45429727", "0.45390365", "0.4536908" ]
0.5130912
20
open_white_list repeated string open_white_list = 11;
public Builder addOpenWhiteListBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureOpenWhiteListIsMutable(); openWhiteList_.add(value); onChanged(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SList oddWords();", "public java.lang.String getOpenWhiteList(int index) {\n return openWhiteList_.get(index);\n }", "public int getOpenWhiteListCount() {\n return openWhiteList_.size();\n }", "public java.lang.String getOpenWhiteList(int index) {\n return openWhiteList_.get(index);\n }", "public int getOpenWhiteListCount() {\n return openWhiteList_.size();\n }", "private LowercaseWordList() {\n\n }", "static List DuplicateElements(List<Character> characters){\r\n\t\tList newlist=new ArrayList<>();\r\n\t\tfor(char c:characters)\r\n\t\t{\r\n\t\t\tnewlist.add(Collections.nCopies(2,c ));\r\n\t\r\n\t\t}\r\n\tSystem.out.println(newlist);\r\n\treturn newlist;\r\n\t}", "public Builder setOpenWhiteList(\n int index, java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureOpenWhiteListIsMutable();\n openWhiteList_.set(index, value);\n onChanged();\n return this;\n }", "public Builder addOpenWhiteList(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureOpenWhiteListIsMutable();\n openWhiteList_.add(value);\n onChanged();\n return this;\n }", "public static List<String> createCompetencyList() {\n List<String> list = new ArrayList<String>();\n list.add(\"Line number 1\");\n list.add(\"Line number 2\");\n return list;\n }", "private void exercise2() {\n List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerOddLengthList = list.stream()\n .filter((string) -> string.length() % 2 != 0)\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public void setWhiteSpacesCount(long value) {\n this.whiteSpacesCount = value;\n }", "java.util.List<String> getRepeatedStringFieldList();", "List<String> mo5877c(String str);", "private String addRandomSpacing(String originalText) {\n ArrayList<Expression> list = new ArrayList<Expression>();\n\n\t\tclass MyVisitor extends ModifierVisitor<Void> {\n\t\t @Override\n\t\t public Node visit(VariableDeclarator declarator, Void args) {\n\t Expression expression = declarator.getInitializer().get();\n\t \n\t \n\t // We're looking for string.\n\t if (expression instanceof StringLiteralExpr) {\n\t list.add(expression);\n\t }\n\t\t return null;\n\t\t }\n\t\t}\n\t\t\n\t\t\n\t}", "SList evenWords();", "public com.google.protobuf.ProtocolStringList\n getOpenWhiteListList() {\n return openWhiteList_;\n }", "List<String> mo5876c();", "void fillList(List<String> toFill) {\n for (int i = 0; i < number; i++) {\n toFill.add(i + \"\");\n }\n }", "public String getWhiteList0() {\n return getString(\"whitelist.0\");\n }", "public Builder clearOpenWhiteList() {\n openWhiteList_ = com.google.protobuf.LazyStringArrayList.EMPTY;\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n return this;\n }", "public Builder addAllOpenWhiteList(\n java.lang.Iterable<java.lang.String> values) {\n ensureOpenWhiteListIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, openWhiteList_);\n onChanged();\n return this;\n }", "public com.google.protobuf.ByteString\n getOpenWhiteListBytes(int index) {\n return openWhiteList_.getByteString(index);\n }", "public abstract List<C41717j> mo70725h(String str);", "static int getNumPatterns() { return 64; }", "private static void skipSplitAdd(String s, List<String> list) {\n String tmp[] = s.split(\" \");\n\n for (int i = 1; i < tmp.length; i++) {\n list.add(tmp[i]);\n\n // System.out.println(tmp[i]);\n }\n }", "public static void addStars(ArrayList<String> list){\r\n //Loops through the list\r\n for(int i = 1; i < list.size(); i+=2){\r\n list.add(i, \"*\");\r\n }\r\n System.out.println(list);\r\n }", "private void m4676a(List<C0906d> list, StringBuilder sb) {\n if (sb.length() != 0) {\n list.add(new C0906d(C0906d.EnumC0907a.LITERAL, sb.toString()));\n }\n }", "public void setWhiteCounter(int num){\n this.whiteCounter = num;\n }", "StringList createStringList();", "List<C1114c> mo5886k(String str);", "private String genWhiteSpaceRegex(int noOfWhiteSpace,\n String multiWhiteSpace,\n String zeroWhiteSpace) {\n\n return (noOfWhiteSpace == 0) ? zeroWhiteSpace\n : multiWhiteSpace.replace(\"%%\", String.valueOf(noOfWhiteSpace));\n }", "public com.google.protobuf.ByteString\n getOpenWhiteListBytes(int index) {\n return openWhiteList_.getByteString(index);\n }", "private void generateLists(String num, Stack<String> numberList)\n {\n\tfor(int i = 0, len = num.length(); i < len; i++)\n\t numberList.push(new Character(num.charAt(i)).toString());\n }", "private void exercise5() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> nonDuplicateList;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n nonDuplicateList = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .collect(toList());\n }\n\n nonDuplicateList.forEach(System.out::println);\n }", "void mo100443a(List<String> list);", "ListString createListString();", "List<Log> mo13160a(String str, int i);", "public com.google.protobuf.ProtocolStringList\n getOpenWhiteListList() {\n return openWhiteList_.getUnmodifiableView();\n }", "public static void main(String[] args) { String s = \"catsanddog\";\n// List<String> wordDict = new ArrayList<>(Arrays.asList(\"cat\", \"cats\", \"and\", \"sand\", \"dog\"));\n//\n String s = \"pineapplepenappl\";\n List<String> wordDict = new ArrayList<>(Arrays.asList(\"apple\", \"pen\", \"applepen\", \"pine\", \"pineapple\"));\n\n WordBreak140 tmp = new WordBreak140();\n tmp.wordBreak(s, wordDict);\n }", "@Test\n public void repeatedSubstringPattern() {\n assertTrue(new Solution1().repeatedSubstringPattern(\"abcabcabcabc\"));\n }", "@Test\n public void findEvenLengthWords() {\n List<String> output = null; // TODO\n\n assertEquals(Arrays.asList(\"in\", \"computer\", \"be\", \"solved\", \"by\", \"adding\", \"of\",\n \"except\", \"many\", \"levels\", \"of\"), output);\n }", "private static List<String> testStringGenerator(List<String> palString) {\n\t\tList<String> list = new ArrayList<>();\n\t\tfor (String pal : palString) {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor (int i = 0; i < 10; i++) {\n\t\t\t\tsb.append(pal);\n\t\t\t\tfor (int j = 0; j < pal.length(); j++) {\n\t\t\t\t\tsb.append(j % 10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(sb.toString());\n\t\t}\n\t\treturn list;\n\t}", "public static void makeBlanks(char[] list) {\n\t\tfor (int i = 0; i < list.length; i++) {\n\t\t\tlist[i] = '*';\n\t\t}\n\t}", "public int selectOriginalTokens (Scanner scan, String [] list){\n \n int count = 0;\n while(scan.hasNext()){\n String line = scan.nextLine();\n String[] t = line.split(\"[ \\n\\t\\r.,:?)({}\\\\[\\\\]]\");\n for (int i = 0; i < t.length; i++){\n String item = t[i].trim();\n if(item.length() > 0){\n list[count] = item;\n count++;\n }//End if statement\n }//End for loop\n }//End while loop\n \n return count;\n }", "void mo54419a(List<String> list);", "private String whiteSpace(String sum, String num)\n {\n\tString space = \"\";\n\tfor(int i = 0; i < sum.length() - num.length(); i++)\n\t space += \" \";\n\treturn space;\n }", "List<C1113b> mo5874b(String str);", "public static List<String> stringList() {\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.add(\"abdxxx\");\n\t\tlist.add(\"xxxxx\");\n\t\tlist.add(\"hi\");\n\t\tlist.add(\"SmoothStack\");\n\t\tlist.add(\"Wyatt x Wyatt x\");\n\t\treturn list;\n\t}", "private static String[] resetStringArray() {\n String[] st = new String[L_MAX];\n L = 2 << 8;\n W = 9;\n int i;\n // initialize symbol table with all 1-character strings\n for (i = 0; i < R; i++)\n st[i] = \"\" + (char) i;\n st[i++] = \"\"; // (unused) lookahead for EOF\n return st;\n }", "public void setUp2( )\n\t{\n\t\tfor( int i = 0; i < 1000; i++ )\n\t\t{\n\t\t\tlista.append( \"\" + i );\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tList<Character>st1=new ArrayList<>();\n\t\n\t\tst1.add('a');\n\t\tst1.add('b');\n\t\tst1.add('a');\n\t\tst1.add('a');\n\t\tst1.add('c');\n\t\tst1.add('t');\n\t\n\t\tSystem.out.println(st1);//[a, b, a, a, c, t]\n\t\t\n\t\tList<Character>st2=new ArrayList<>();//empty []\n\t\tfor (int i=0; i<st1.size();i++) {\n\t\t\tif(!st2.contains(st1.get(i))) {\n\t\t\t\t// created str2 [empty], we will get the element from st1 to st2 while checking if there is repetition \n\t\t\t\tst2.add(st1.get(i));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(st2);//[a, b, c, t]\n\t\t\n\n\t}", "private void many(Set<String> s) {\n\t\twhile (!done() && s.contains(program.charAt(pos)+\"\"))\n\t\t\tpos++;\n }", "@Test\r\n\tpublic void testPositiveGenerateStrings_2() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\", false), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "private static String createPrepStmPlaceHolder(int num) {\n\t\tchar[] c_ar = new char[num*3];\n\t\tc_ar[0] = '(';\n\t\tc_ar[1] = '?';\n\t\tfor(int i=1; i<num; ++i) {\n\t\t\tc_ar[3*i-1] = ',';\n\t\t\tc_ar[3*i] = ' ';\n\t\t\tc_ar[3*i+1] = '?';\n\t\t}\n\t\tc_ar[3*num-1] = ')';\n\t\treturn new String(c_ar);\n\t}", "private void exercise1() {\n final List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerList = list.stream()\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }", "public List<String> validWords(int input) throws Exception {\n List<String> validStrings = new ArrayList<>();\n getValidStrings(validStrings, \"\", Integer.toString(input));\n return validStrings;\n }", "private static String repeatSpace(int number) {\n StringBuilder space = new StringBuilder();\n\n // Adding spaces.\n for (int i = 0; i < number; i++) {\n space.append(\" \");\n }\n\n //returning spaces.\n return space.toString();\n }", "public void mo88640a(List<String> list) {\n List<String> stringList = RxPreferences.INSTANCE.getStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), new ArrayList());\n stringList.addAll(0, list);\n RxPreferences.INSTANCE.putStringList(C6969H.m41409d(\"G6286CC25BB32942CE2078447E0DACBD67A8BEA0EBE379425EF1D84\"), (List) StreamSupport.m150134a(stringList).mo131128a(new AbstractC32239o(new HashSet(stringList)) {\n /* class com.zhihu.android.p1480db.fragment.customview.C18240x255e53c2 */\n private final /* synthetic */ HashSet f$0;\n\n {\n this.f$0 = r1;\n }\n\n @Override // java8.util.p2234b.AbstractC32239o\n public final boolean test(Object obj) {\n return DbEditorSuggestTagCustomView.m93354a(this.f$0, (String) obj);\n }\n }).mo131126a(5).mo131125a(Collectors.m150203a($$Lambda$ofunvu1bqmYbfXGEtxXaV_csE4M.INSTANCE)));\n }", "private void initWhitespace(Set<String> s) {\n\t\ts.add(\" \");\n\t\ts.add(\"\\n\");\n\t\ts.add(\"\\t\");\n }", "private int skipLeadingWhite( List content, int start) {\r\n if (start < 0) {\r\n start = 0;\r\n }\r\n\r\n int index = start;\r\n int size = content.size();\r\n if (currentFormat.trimAllWhite\r\n || currentFormat.textNormalize\r\n || currentFormat.textTrim) {\r\n while( index < size) {\r\n if ( !isAllWhitespace( content.get(index))) {\r\n return index;\r\n }\r\n index++;\r\n }\r\n }\r\n return index;\r\n }", "List<C1111j> mo5869a(int i);", "@Test\n public void noSpacesBetweenKeywordsTest() {\n tester.yields(\"LaLaLaLaLaaaLi\", lala.EXPRESSION);\n }", "private void appendPlaceHolder(StringBuilder builder, int indent, int consecutiveExcluded, String message) {\n indent(builder, indent);\n builder.append(ELLIPSIS)\n .append(\" \")\n .append(consecutiveExcluded)\n .append(\" \")\n .append(message)\n .append(CoreConstants.LINE_SEPARATOR);\n }", "public void visiualizeSkipList(){\r\n\t\tint number=0;\r\n\t\tNode dummy = sl.getFrom(0,0);\r\n\t\t\r\n\t\tNode next;\r\n\t\tfor(int i=sl.height(); i>=0; i--){\r\n\t\t\t\r\n\t\t\tnext = sl.getFrom(i,0);\r\n\t\t\t\r\n\t\t\tfor(int j=0; j<(sl.size()+2); j++){\r\n\r\n\t\t\t\tnumber = next.getKey();\r\n\t\t\t\t//F.p(number);\r\n\t\t\t\tif(number==dummy.getKey()){\r\n\r\n\t\t\t\t\tif(number==minf)\r\n\t\t\t\t\t\tSystem.out.print(\"-inf\");\r\n\t\t\t\t\telse if(number==inf)\r\n\t\t\t\t\t\tSystem.out.print(\"---inf\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(\"-\",2)+number);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(\"-\",4));\r\n\t\t\t\t\r\n\t\t\t\tif(dummy.getKey()==number)\r\n\t\t\t\t\tnext = next.getRight();\r\n\t\t\t\t\r\n\t\t\t\tdummy = dummy.getRight();\r\n\t\t\t}\r\n\t\t\tdummy = sl.getFrom(0,0);\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testStartingIndicesRegression(){\n\t\tassertLeftmostStartingIndices(\"5,1,7,3,2|-..xxx$1..x...xxx$3....-xx........\", 0, 6, 8, 18, 22);\n\t\tassertRightmostStartingIndices(\"7,5|.......xxx$1....xxx$2..-\", 6, 14);\n\t\t\n\t}", "public long getWhiteSpacesCount() {\n return whiteSpacesCount;\n }", "public MacroList() {\n\t\tthis.macrosses = new HashMap<Integer, String>(12);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_1() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateStrings(10, 5, \"abcd\"), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n String s=\"a /*a*/ sd /*v*/\";\n Pattern p = Pattern.compile(\"(\\\\/\\\\*(\\\\w|\\r\\n)+\\\\*\\\\/)\");\n Matcher m = p.matcher(s);\n List<String> l = new ArrayList<>(100);\n\n while (m.find()) {\n System.out.println(\"tick\");\n l.add(s.substring(m.start()+2, m.end()-2));\n }\n\n System.out.println(l);\n }", "StringPatternCounter(ArrayList<StringPattern> stringPatternList, String fileInput)\n {\n super(fileInput);\n this.stringPatternList = stringPatternList;\n }", "@Before\n public void createString(){\n s1 = \"casa\";\n\ts2 = \"cassa\";\n\ts3 = \"\";\n\ts4 = \"casa\";\n }", "public String minRemoveToMakeValid(String s) {\n int openAvail = 0;\n Set<Integer> skipSet = new HashSet<>();\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) == ')') {\n if (openAvail == 0) {\n skipSet.add(i);\n } else {\n openAvail -= 1;\n }\n } else if (s.charAt(i) == '(') {\n openAvail += 1;\n }\n }\n\n int closedAvail = 0;\n for (int i = s.length() - 1; i >= 0; i--) {\n if (s.charAt(i) == ')') {\n closedAvail += 1;\n } else if (s.charAt(i) == '(') {\n if (closedAvail == 0) {\n skipSet.add(i);\n } else {\n closedAvail -= 1; \n }\n }\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < s.length(); i++) {\n if (!skipSet.contains(i)){\n sb.append(s.charAt(i));\n }\n }\n return sb.toString();\n }", "@SuppressWarnings(\"resource\")\n public static void doubleCapacity(String[] array){\n int wordCount = 0;\n int arrayGrowth = 500;\n array = new String[10];\n String strLine = null;\n while (strLine != null) {\n // Store the content into an array\n Scanner s = new Scanner(strLine);\n while (s.hasNext()) {\n if (array.length == wordCount) {\n // expand list\n array = Arrays.copyOf(array, array.length + arrayGrowth);\n }\n array[wordCount] = s.next();\n wordCount++;\n } \n }\n }", "@Test(timeout = 4000)\n public void test20() throws Throwable {\n StringReader stringReader0 = new StringReader(\"0(Hu\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer2 = new StreamTokenizer(stringReader0);\n JSTerm jSTerm0 = new JSTerm(streamTokenizer0);\n stringReader0.reset();\n StreamTokenizer streamTokenizer3 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer4 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer5 = new StreamTokenizer(stringReader0);\n streamTokenizer0.commentChar((-4));\n StreamTokenizer streamTokenizer6 = new StreamTokenizer(stringReader0);\n streamTokenizer6.ordinaryChars((-1), (-322070664));\n streamTokenizer1.parseNumbers();\n jSTerm0.add((Object) \"JSTerm: Error reading control parameters: \");\n StreamTokenizer streamTokenizer7 = new StreamTokenizer(stringReader0);\n streamTokenizer7.pushBack();\n streamTokenizer1.nextToken();\n StreamTokenizer streamTokenizer8 = new StreamTokenizer(stringReader0);\n streamTokenizer2.slashSlashComments(false);\n JSTerm jSTerm1 = new JSTerm(streamTokenizer5);\n streamTokenizer1.slashStarComments(false);\n streamTokenizer3.eolIsSignificant(false);\n streamTokenizer7.commentChar((-4));\n StreamTokenizer streamTokenizer9 = new StreamTokenizer(stringReader0);\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n jSSubstitution0.listIterator();\n JSSubstitution jSSubstitution1 = jSTerm1.matches((JSPredicateForm) jSTerm0, jSSubstitution0);\n assertTrue(jSSubstitution1.fail());\n }", "public Removalstops()\n {\n stopWords.add(\"am\");\n stopWords.add(\"my\");\nstopWords.add(\"at\");\nstopWords.add(\"a\");\nstopWords.add(\"i\");\nstopWords.add(\"is\");\nstopWords.add(\"of\");\nstopWords.add(\"have\");\nstopWords.add(\"--\");\nstopWords.add(\"do\");\nstopWords.add(\"the\");\nstopWords.add(\"was\");\nstopWords.add(\"iam\");\nstopWords.add(\"there\");\nstopWords.add(\"what\");\nstopWords.add(\"for\");\nstopWords.add(\"in\");\nstopWords.add(\"very\");\nstopWords.add(\"and\");\nstopWords.add(\"to\");\nstopWords.add(\"often\");\nstopWords.add(\"because\");\nstopWords.add(\"in\");\nstopWords.add(\"an\");\nstopWords.add(\"can\");\nstopWords.add(\"via\");\nstopWords.add(\"even\");\nstopWords.add(\"as\");\nstopWords.add(\"best\");\nstopWords.add(\"been\");\nstopWords.add(\"into\");\nstopWords.add(\"by\");\nstopWords.add(\"around\");\nstopWords.add(\"being\");\nstopWords.add(\"from\");\nstopWords.add(\"etc\");\nstopWords.add(\"his\");\nstopWords.add(\"do\");\nstopWords.add(\"have\");\nstopWords.add(\"had\"); \nstopWords.add(\"able\");\nstopWords.add(\"about\");\nstopWords.add(\"above\");\nstopWords.add(\"abroad\");\nstopWords.add(\"according\");\nstopWords.add(\"accordingly\");\nstopWords.add(\"across\");\nstopWords.add(\"actually\");\nstopWords.add(\"adj\");\nstopWords.add(\"after\");\nstopWords.add(\"afterwards\");\nstopWords.add(\"again\");\nstopWords.add(\"against\");\nstopWords.add(\"ago\");\nstopWords.add(\"ahead\");\nstopWords.add(\"ain't\");\nstopWords.add(\"all\");\nstopWords.add(\"allow\");\nstopWords.add(\"allows\");\nstopWords.add(\"almost\");\nstopWords.add(\"alone\");\nstopWords.add(\"along\");\nstopWords.add(\"alongside\");\nstopWords.add(\"already\");\nstopWords.add(\"also\");\nstopWords.add(\"although\");\nstopWords.add(\"always\");\nstopWords.add(\"am\");\nstopWords.add(\"amid\");\nstopWords.add(\"amidst\");\nstopWords.add(\"among\");\nstopWords.add(\"amongst\");\nstopWords.add(\"an\");\nstopWords.add(\"and\");\nstopWords.add(\"another\");\nstopWords.add(\"any\");\nstopWords.add(\"anybody\");\nstopWords.add(\"anyhow\");\nstopWords.add(\"anyone\");\nstopWords.add(\"anything\");\nstopWords.add(\"anyway\");\nstopWords.add(\"anyways\");\nstopWords.add(\"anywhere\");\nstopWords.add(\"apart\");\nstopWords.add(\"appear\");\nstopWords.add(\"appreciate\");\nstopWords.add(\"appropriate\");\nstopWords.add(\"are\");\nstopWords.add(\"aren't\");\nstopWords.add(\"around\");\nstopWords.add(\"as\");\nstopWords.add(\"a's\");\nstopWords.add(\"aside\");\nstopWords.add(\"ask\");\nstopWords.add(\"asking\");\nstopWords.add(\"associated\");\nstopWords.add(\"at\");\nstopWords.add(\"available\");\nstopWords.add(\"away\");\nstopWords.add(\"awfully\");\nstopWords.add(\"back\");\nstopWords.add(\"backward\");\nstopWords.add(\"backwards\");\nstopWords.add(\"be\");\nstopWords.add(\"became\");\nstopWords.add(\"beacause\");\nstopWords.add(\"become\");\nstopWords.add(\"becomes\");\nstopWords.add(\"becoming\");\nstopWords.add(\"been\");\nstopWords.add(\"before\");\nstopWords.add(\"beforehand\");\nstopWords.add(\"begin\");\nstopWords.add(\"behind\");\nstopWords.add(\"being\");\nstopWords.add(\"believe\");\nstopWords.add(\"below\");\nstopWords.add(\"beside\");\nstopWords.add(\"besides\");\nstopWords.add(\"best\");\nstopWords.add(\"better\");\nstopWords.add(\"between\");\nstopWords.add(\"beyond\");\nstopWords.add(\"both\");\nstopWords.add(\"brief\");\nstopWords.add(\"but\");\nstopWords.add(\"by\");\nstopWords.add(\"came\");\nstopWords.add(\"can\");\nstopWords.add(\"cannot\");\nstopWords.add(\"cant\");\nstopWords.add(\"can't\");\nstopWords.add(\"caption\");\nstopWords.add(\"cause\");\nstopWords.add(\"causes\");\nstopWords.add(\"certain\");\nstopWords.add(\"cetrainly\");\nstopWords.add(\"changes\");\nstopWords.add(\"clearly\");\nstopWords.add(\"c'mon\");\nstopWords.add(\"co\");\nstopWords.add(\"co.\");\nstopWords.add(\"com\");\nstopWords.add(\"come\");\nstopWords.add(\"comes\");\nstopWords.add(\"concerning\");\nstopWords.add(\"consequently\");\nstopWords.add(\"consider\");\nstopWords.add(\"considering\");\nstopWords.add(\"could\");\nstopWords.add(\"couldn't\");\nstopWords.add(\"c's\");\nstopWords.add(\"currently\");\nstopWords.add(\"dare\");\nstopWords.add(\"daren't\");\nstopWords.add(\"definitely\");\nstopWords.add(\"described\");\nstopWords.add(\"despite\");\nstopWords.add(\"did\");\nstopWords.add(\"didn't\");\nstopWords.add(\"different\");\nstopWords.add(\"directly\");\nstopWords.add(\"do\");\nstopWords.add(\"does\");\nstopWords.add(\"doesn't\");\nstopWords.add(\"doing\");\nstopWords.add(\"done\");\nstopWords.add(\"don't\");\nstopWords.add(\"down\");\nstopWords.add(\"downwards\");\nstopWords.add(\"during\");\nstopWords.add(\"each\");\nstopWords.add(\"edu\");\nstopWords.add(\"eg\");\nstopWords.add(\"eight\");\nstopWords.add(\"eighty\");\nstopWords.add(\"either\");\nstopWords.add(\"else\");\nstopWords.add(\"elsewhere\");\nstopWords.add(\"end\");\nstopWords.add(\"ending\");\nstopWords.add(\"enough\");\nstopWords.add(\"entirely\");\nstopWords.add(\"especially\");\nstopWords.add(\"et\");\nstopWords.add(\"etc\");\nstopWords.add(\"even\");\nstopWords.add(\"evenmore\");\nstopWords.add(\"every\");\nstopWords.add(\"everybody\");\nstopWords.add(\"everyone\");\nstopWords.add(\"everything\");\nstopWords.add(\"everywhere\");\nstopWords.add(\"ex\");\nstopWords.add(\"exactly\");\nstopWords.add(\"example\");\nstopWords.add(\"except\");\nstopWords.add(\"fairly\");\nstopWords.add(\"far\");\nstopWords.add(\"farhter\");\nstopWords.add(\"few\");\nstopWords.add(\"fewer\");\nstopWords.add(\"fifth\");\nstopWords.add(\"first\");\nstopWords.add(\"five\");\nstopWords.add(\"followed\");\nstopWords.add(\"following\");\nstopWords.add(\"follows\");\nstopWords.add(\"for\");\nstopWords.add(\"forever\");\nstopWords.add(\"former\");\nstopWords.add(\"formerly\");\nstopWords.add(\"forth\");\nstopWords.add(\"forward\");\nstopWords.add(\"found\");\nstopWords.add(\"four\");\nstopWords.add(\"from\");\nstopWords.add(\"further\");\nstopWords.add(\"furthermore\");\nstopWords.add(\"get\");\nstopWords.add(\"gets\");\nstopWords.add(\"getting\");\nstopWords.add(\"given\");\nstopWords.add(\"gives\");\nstopWords.add(\"go\");\nstopWords.add(\"goes\");\nstopWords.add(\"going\");\nstopWords.add(\"gone\");\nstopWords.add(\"got\");\nstopWords.add(\"gotten\");\nstopWords.add(\"greetings\");\nstopWords.add(\"had\");\nstopWords.add(\"hadn't\");\nstopWords.add(\"half\");\nstopWords.add(\"happens\");\nstopWords.add(\"hardly\");\nstopWords.add(\"has\");\nstopWords.add(\"hasn't\");\nstopWords.add(\"have\");\nstopWords.add(\"haven't\");\nstopWords.add(\"having\");\nstopWords.add(\"he\");\nstopWords.add(\"he'd\");\nstopWords.add(\"he'll\");\nstopWords.add(\"hello\");\nstopWords.add(\"help\");\nstopWords.add(\"hence\");\nstopWords.add(\"her\");\nstopWords.add(\"here\");\nstopWords.add(\"hereafter\");\nstopWords.add(\"hereby\");\nstopWords.add(\"herein\");\nstopWords.add(\"here's\");\nstopWords.add(\"hereupon\");\nstopWords.add(\"hers\");\nstopWords.add(\"herself\");\nstopWords.add(\"he's\");\nstopWords.add(\"hi\");\nstopWords.add(\"him\");\nstopWords.add(\"himself\");\nstopWords.add(\"his\");\nstopWords.add(\"hither\");\nstopWords.add(\"hopefully\");\nstopWords.add(\"how\");\nstopWords.add(\"howbeit\");\nstopWords.add(\"however\");\nstopWords.add(\"however\");\nstopWords.add(\"hundred\");\nstopWords.add(\"i'd\");\nstopWords.add(\"ie\");\nstopWords.add(\"if\");\nstopWords.add(\"ignored\");\nstopWords.add(\"i'll\");\nstopWords.add(\"i'm\");\nstopWords.add(\"immediate\");\nstopWords.add(\"in\");\nstopWords.add(\"iansmuch\");\nstopWords.add(\"inc\");\nstopWords.add(\"inc.\");\nstopWords.add(\"indeed\");\nstopWords.add(\"indicate\");\nstopWords.add(\"indicated\");\nstopWords.add(\"indicates\");\nstopWords.add(\"inner\");\nstopWords.add(\"inside\");\nstopWords.add(\"insofar\");\nstopWords.add(\"into\");\nstopWords.add(\"inward\");\nstopWords.add(\"is\");\nstopWords.add(\"isn't\");\nstopWords.add(\"it\");\nstopWords.add(\"it'd\");\nstopWords.add(\"it'll\");\nstopWords.add(\"its\");\nstopWords.add(\"it's\");\nstopWords.add(\"itself\");\nstopWords.add(\"i've\");\nstopWords.add(\"just\");\nstopWords.add(\"k\");\nstopWords.add(\"keep\");\nstopWords.add(\"keeps\");\nstopWords.add(\"kept\");\nstopWords.add(\"know\");\nstopWords.add(\"knows\");\nstopWords.add(\"known\");\nstopWords.add(\"last\");\nstopWords.add(\"lately\");\nstopWords.add(\"later\");\nstopWords.add(\"latter\");\nstopWords.add(\"latterly\");\nstopWords.add(\"least\");\nstopWords.add(\"less\");\nstopWords.add(\"let\");\nstopWords.add(\"let's\");\nstopWords.add(\"like\");\nstopWords.add(\"liked\");\nstopWords.add(\"likely\");\nstopWords.add(\"likewise\");\nstopWords.add(\"little\");\nstopWords.add(\"look\");\nstopWords.add(\"looks\");\nstopWords.add(\"low\");\nstopWords.add(\"lower\");\nstopWords.add(\"ltd\");\nstopWords.add(\"made\");\nstopWords.add(\"mainly\");\nstopWords.add(\"make\");\nstopWords.add(\"makes\");\nstopWords.add(\"many\");\nstopWords.add(\"may\");\nstopWords.add(\"maybe\");\nstopWords.add(\"mayn't\");\nstopWords.add(\"me\");\nstopWords.add(\"mean\");\nstopWords.add(\"meanwhile\");\nstopWords.add(\"merely\");\nstopWords.add(\"might\");\nstopWords.add(\"mightn't\");\nstopWords.add(\"mine\");\nstopWords.add(\"minus\");\nstopWords.add(\"miss\");\nstopWords.add(\"more\");\nstopWords.add(\"moreover\");\nstopWords.add(\"most\");\nstopWords.add(\"mostly\");\nstopWords.add(\"mr\");\nstopWords.add(\"mrs\");\nstopWords.add(\"much\");\nstopWords.add(\"must\");\nstopWords.add(\"mustn't\");\nstopWords.add(\"my\");\nstopWords.add(\"myself\");\nstopWords.add(\"name\");\nstopWords.add(\"namely\");\nstopWords.add(\"nd\");\nstopWords.add(\"near\");\nstopWords.add(\"nearly\");\nstopWords.add(\"necessary\");\nstopWords.add(\"need\");\nstopWords.add(\"needn't\");\nstopWords.add(\"needs\");\nstopWords.add(\"neither\");\nstopWords.add(\"never\");\nstopWords.add(\"neverf\");\nstopWords.add(\"neverless\");\nstopWords.add(\"nevertheless\");\nstopWords.add(\"new\");\nstopWords.add(\"next\");\nstopWords.add(\"nine\");\nstopWords.add(\"ninety\");\nstopWords.add(\"no\");\nstopWords.add(\"nobody\");\nstopWords.add(\"non\");\nstopWords.add(\"none\");\nstopWords.add(\"nonetheless\");\nstopWords.add(\"noone\");\nstopWords.add(\"no-one\");\nstopWords.add(\"nor\");\nstopWords.add(\"normally\");\nstopWords.add(\"not\");\nstopWords.add(\"nothing\");\nstopWords.add(\"notwithstanding\");\nstopWords.add(\"novel\");\nstopWords.add(\"now\");\nstopWords.add(\"nowwhere\");\nstopWords.add(\"obviously\");\nstopWords.add(\"of\");\nstopWords.add(\"off\");\nstopWords.add(\"often\");\nstopWords.add(\"oh\");\nstopWords.add(\"ok\");\nstopWords.add(\"okay\");\nstopWords.add(\"old\");\nstopWords.add(\"on\");\nstopWords.add(\"once\");\nstopWords.add(\"one\");\nstopWords.add(\"ones\");\nstopWords.add(\"one's\");\nstopWords.add(\"only\");\nstopWords.add(\"onto\");\nstopWords.add(\"opposite\");\nstopWords.add(\"or\");\nstopWords.add(\"other\");\nstopWords.add(\"others\");\nstopWords.add(\"otherwise\");\nstopWords.add(\"ought\");\nstopWords.add(\"oughtn't\");\nstopWords.add(\"our\");\nstopWords.add(\"ourselves\");\nstopWords.add(\"out\");\nstopWords.add(\"outside\");\nstopWords.add(\"over\");\nstopWords.add(\"overall\");\nstopWords.add(\"own\");\nstopWords.add(\"particular\");\nstopWords.add(\"particularly\");\nstopWords.add(\"past\");\nstopWords.add(\"per\");\nstopWords.add(\"perhaps\");\nstopWords.add(\"placed\");\nstopWords.add(\"please\");\nstopWords.add(\"plus\");\nstopWords.add(\"possible\");\nstopWords.add(\"presumably\");\nstopWords.add(\"probably\");\nstopWords.add(\"provided\");\nstopWords.add(\"provides\");\nstopWords.add(\"que\");\nstopWords.add(\"quite\");\nstopWords.add(\"qv\");\nstopWords.add(\"rather\");\nstopWords.add(\"rd\");\nstopWords.add(\"re\");\nstopWords.add(\"really\");\nstopWords.add(\"reasonably\");\nstopWords.add(\"recent\");\nstopWords.add(\"recently\");\nstopWords.add(\"regarding\");\nstopWords.add(\"regardless\");\nstopWords.add(\"regards\");\nstopWords.add(\"relatively\");\nstopWords.add(\"respectively\");\nstopWords.add(\"right\");\nstopWords.add(\"round\");\nstopWords.add(\"said\");\nstopWords.add(\"same\");\nstopWords.add(\"saw\");\nstopWords.add(\"say\");\nstopWords.add(\"saying\");\nstopWords.add(\"says\");\nstopWords.add(\"second\");\nstopWords.add(\"secondly\");\nstopWords.add(\"see\");\nstopWords.add(\"seeing\");\nstopWords.add(\"seem\");\nstopWords.add(\"seemed\");\nstopWords.add(\"seeming\");\nstopWords.add(\"seems\");\nstopWords.add(\"seen\");\nstopWords.add(\"self\");\nstopWords.add(\"selves\");\nstopWords.add(\"sensible\");\nstopWords.add(\"sent\");\nstopWords.add(\"serious\");\nstopWords.add(\"seriously\");\nstopWords.add(\"seven\");\nstopWords.add(\"several\");\nstopWords.add(\"shall\");\nstopWords.add(\"shan't\");\nstopWords.add(\"she\");\nstopWords.add(\"she'd\");\nstopWords.add(\"she'll\");\nstopWords.add(\"she's\");\nstopWords.add(\"should\");\nstopWords.add(\"shouldn't\");\nstopWords.add(\"since\");\nstopWords.add(\"six\");\nstopWords.add(\"so\");\nstopWords.add(\"some\");\nstopWords.add(\"somebody\");\nstopWords.add(\"someday\");\nstopWords.add(\"somehow\");\nstopWords.add(\"someone\");\nstopWords.add(\"something\");\nstopWords.add(\"sometime\");\nstopWords.add(\"sometimes\");\nstopWords.add(\"somewhat\");\nstopWords.add(\"somewhere\");\nstopWords.add(\"soon\");\nstopWords.add(\"sorry\");\nstopWords.add(\"specified\");\nstopWords.add(\"specify\");\nstopWords.add(\"specifying\");\nstopWords.add(\"still\");\nstopWords.add(\"sub\");\nstopWords.add(\"such\");\nstopWords.add(\"sup\");\nstopWords.add(\"sure\");\nstopWords.add(\"take\");\nstopWords.add(\"taken\");\nstopWords.add(\"taking\");\nstopWords.add(\"tell\");\nstopWords.add(\"tends\");\nstopWords.add(\"th\");\nstopWords.add(\"than\");\nstopWords.add(\"thank\");\nstopWords.add(\"thanks\");\nstopWords.add(\"thanx\");\nstopWords.add(\"that\");\nstopWords.add(\"that'll\");\nstopWords.add(\"thats\");\nstopWords.add(\"that've\");\nstopWords.add(\"the\");\nstopWords.add(\"their\");\nstopWords.add(\"theirs\");\nstopWords.add(\"them\");\nstopWords.add(\"themselves\");\nstopWords.add(\"then\");\nstopWords.add(\"thence\");\nstopWords.add(\"there\");\nstopWords.add(\"thereafter\");\nstopWords.add(\"thereby\");\nstopWords.add(\"there'd\");\nstopWords.add(\"therefore\");\nstopWords.add(\"therein\");\nstopWords.add(\"ther'll\");\nstopWords.add(\"there're\");\nstopWords.add(\"theres\");\nstopWords.add(\"there's\");\nstopWords.add(\"thereupon\");\nstopWords.add(\"there've\");\nstopWords.add(\"these\");\nstopWords.add(\"they\");\nstopWords.add(\"they'd\");\nstopWords.add(\"they'll\");\nstopWords.add(\"they're\");\nstopWords.add(\"they've\");\nstopWords.add(\"thing\");\nstopWords.add(\"things\");\nstopWords.add(\"think\");\nstopWords.add(\"third\");\nstopWords.add(\"thirty\");\nstopWords.add(\"this\");\nstopWords.add(\"thorough\");\nstopWords.add(\"thoroughly\");\nstopWords.add(\"those\");\nstopWords.add(\"though\");\nstopWords.add(\"throughout\");\nstopWords.add(\"thru\");\nstopWords.add(\"thus\");\nstopWords.add(\"till\");\nstopWords.add(\"to\");\nstopWords.add(\"together\");\nstopWords.add(\"too\");\nstopWords.add(\"took\");\nstopWords.add(\"toward\");\nstopWords.add(\"towards\");\nstopWords.add(\"tried\");\nstopWords.add(\"tries\");\nstopWords.add(\"truly\");\nstopWords.add(\"try\");\nstopWords.add(\"trying\");\nstopWords.add(\"t's\");\nstopWords.add(\"twice\");\nstopWords.add(\"two\");\nstopWords.add(\"un\");\nstopWords.add(\"under\");\nstopWords.add(\"underneath\");\nstopWords.add(\"undoing\");\nstopWords.add(\"unfortunately\");\nstopWords.add(\"unless\");\nstopWords.add(\"unlike\");\nstopWords.add(\"unlikely\");\nstopWords.add(\"untill\");\nstopWords.add(\"unto\");\nstopWords.add(\"up\");\nstopWords.add(\"upon\");\nstopWords.add(\"upwards\");\nstopWords.add(\"us\");\nstopWords.add(\"use\");\nstopWords.add(\"used\");\nstopWords.add(\"useful\");\nstopWords.add(\"uses\");\nstopWords.add(\"using\");\nstopWords.add(\"usually\");\nstopWords.add(\"v\");\nstopWords.add(\"value\");\nstopWords.add(\"various\");\nstopWords.add(\"versus\");\nstopWords.add(\"very\");\nstopWords.add(\"via\");\nstopWords.add(\"viz\");\nstopWords.add(\"vs\");\nstopWords.add(\"want\");\nstopWords.add(\"wants\");\nstopWords.add(\"was\");\nstopWords.add(\"wasn't\");\nstopWords.add(\"way\");\nstopWords.add(\"we\");\nstopWords.add(\"we'd\");\nstopWords.add(\"welcome\");\nstopWords.add(\"well\");\nstopWords.add(\"we'll\");\nstopWords.add(\"went\");\nstopWords.add(\"were\");\nstopWords.add(\"we're\");\nstopWords.add(\"weren't\");\nstopWords.add(\"we've\");\nstopWords.add(\"what\");\nstopWords.add(\"whatever\");\nstopWords.add(\"what'll\");\nstopWords.add(\"what's\");\nstopWords.add(\"what've\");\nstopWords.add(\"when\");\nstopWords.add(\"whence\");\nstopWords.add(\"whenever\");\nstopWords.add(\"where\");\nstopWords.add(\"whereafter\");\nstopWords.add(\"whereas\");\nstopWords.add(\"whereby\");\nstopWords.add(\"wherein\");\nstopWords.add(\"where's\");\nstopWords.add(\"whereupon\");\nstopWords.add(\"whereever\");\nstopWords.add(\"whether\");\nstopWords.add(\"which\");\nstopWords.add(\"whichever\");\nstopWords.add(\"while\");\nstopWords.add(\"whilst\");\nstopWords.add(\"whither\");\nstopWords.add(\"who\");\nstopWords.add(\"who'd\");\nstopWords.add(\"whoever\");\nstopWords.add(\"whole\");\nstopWords.add(\"who'll\");\nstopWords.add(\"whom\");\nstopWords.add(\"whomever\");\nstopWords.add(\"who's\");\nstopWords.add(\"whose\");\nstopWords.add(\"why\");\nstopWords.add(\"will\");\nstopWords.add(\"willing\");\nstopWords.add(\"wish\");\nstopWords.add(\"with\");\nstopWords.add(\"within\");\nstopWords.add(\"without\");\nstopWords.add(\"wonder\");\nstopWords.add(\"won't\");\nstopWords.add(\"would\");\nstopWords.add(\"wouldn't\");\nstopWords.add(\"yes\");\nstopWords.add(\"yet\");\nstopWords.add(\"you\");\nstopWords.add(\"you'd\");\nstopWords.add(\"you'll\");\nstopWords.add(\"your\");\nstopWords.add(\"you're\");\nstopWords.add(\"yours\");\nstopWords.add(\"yourself\");\nstopWords.add(\"you've\");\nstopWords.add(\"zero\");\n\n \n \n }", "public abstract void mo9247b(String str, long j, List<String> list);", "private int skipTrialingWhite( List content, int start) {\r\n int size = content.size();\r\n if (start > size) {\r\n start = size;\r\n }\r\n\r\n int index = start;\r\n if (currentFormat.trimAllWhite\r\n || currentFormat.textNormalize\r\n || currentFormat.textTrim) {\r\n while( index >= 0) {\r\n if ( !isAllWhitespace( content.get(index - 1)))\r\n break;\r\n --index;\r\n }\r\n }\r\n return index;\r\n }", "private void fillSet() {\r\n\t\tString regex = \"\\\\p{L}+\";\r\n\t\tMatcher matcher = Pattern.compile(regex).matcher(body);\r\n\t\twhile (matcher.find()) {\r\n\t\t\tif (!matcher.group().isEmpty()) {\r\n\t\t\t\twords.add(matcher.group());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private ArrayList<Integer> getEmptySpaces(char[] board) {\n ArrayList<Integer> emptySpaces = new ArrayList<>();\n for (int i = 0; i < board.length; i++) {\n if (board[i] == ' ') {\n emptySpaces.add(i);\n }\n }\n return emptySpaces;\n }", "void mo13370a(int i, int i2, List<C15929a> list) throws IOException;", "private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }", "public static void main(String[] args) {\n String[] strings = new String[100];\n for (int i = 0; i < strings.length; i++) {\n strings[i] = randomStrings(2);\n }\n// for (String s : strings) {\n// System.out.println(s);\n// }\n ArrayList<String> appeared = new ArrayList<>();\n for (String s : strings) {\n if (!appeared.contains(s)) {\n appeared.add(s);\n }\n }\n System.out.println(appeared.size());\n\n }", "private static Stream<List<Tile>> substituteBlanks(List<Tile> p) {\n Stream<List<Tile>> res = Stream.of(p);\n //Iterate through all letters.\n for (int i = 0; i < p.size(); i++) {\n //Check for blanks.\n if (p.get(i).getLetter() == Character.MIN_VALUE) {\n //If blank found, substitute it for all a-z, and look again for next blank.\n res = substituteBlankAtIndex(p, i)\n .flatMap(s -> substituteBlanks(s));\n }\n }\n\n return res;\n }", "private IgnoreListHelper() {\n\t}", "@Test\n\t public void test5 ()\n\t{\n\t\t\tString s = new String(\"aaabaaaaabaabaaaabaaaaaaaaaaaaaabaaaaaaaaaaaaaaabaaaaaaaaaaaaaaba\");\n\t s = s.replaceAll(\"\\\\s+\", \" \");\n\t assertEquals(\"aaaaaaaaaaaaaabaaaaaaaaaaaaaa\", LRS.lrs(s)); \n\t}", "public static List<String> findRepeatedDnaSequences(String s) {\n \tList<String> re=new ArrayList<String>();\n \tif(s.length()<=10){\n \t\treturn re;\n \t}\n \tMap<String, Integer> map=new HashMap<String, Integer>(); \t\n \tfor(int i=10; i<=s.length(); i++){\n \t\tString k=s.substring(i-10, i);\n \t\tif(map.containsKey(k)){\n \t\t\tint val=map.get(k);\n \t\t\tif(val==1){\n \t\t\t\tre.add(k);\n \t\t\t}\n \t\t\tmap.put(k, val+1);\n \t\t}else{\n \t\t\tmap.put(k, 1);\n \t\t}\n \t}\n \treturn re;\n }", "public static void main(){\r\n\t\t\r\n\t\tArrayList<tok> pHolder = new ArrayList<tok>();\r\n\r\n\t\t pHolder.add(new tok(\"@\", \"@\"));\r\n\t\t\r\n\t\treturn;\r\n\t}", "public void mo9497b(List<String> list) {\n this.f1514c = list;\n }", "private void listEntries(BufferedWriter bw, String previous, int start, int end, String zeroes) throws IOException {\n\t\tint writeStart = -1;\n\t\tStringBuilder sb = new StringBuilder();\n\t\tchar c;\n\t\tfor (int i = 0, l = previous.length(); i < l && writeStart == -1; i++) {\n\t\t\tc = previous.charAt(i);\n\t\t\tif (Character.isDigit(c)) {sb.append(c);}\n\t\t\telse {writeStart = Integer.parseInt(sb.toString());}\n\t\t}\n\t\tfor (int i = start; i < end; i++) {bw.write(++writeStart + \"=\" + zeroes + i + \"\\n\");}\n\t}", "public void m20623OooO00o() {\n for (C8964ooOOo000 ooooo000 : this.f22213OooO00o) {\n OooO00o(ooooo000);\n }\n this.f22212OooO00o.clear();\n this.f22213OooO00o.clear();\n }", "public static List<String> findStrobogrammatic(int n) {\n List<String> cur, ans;\n ans = new ArrayList<String>((n & 1) == 0 ? Arrays.asList(\"\") : Arrays.asList(\"0\", \"1\", \"8\"));\n if (n < 2) return ans;\n\n for (;n > 1; n -= 2) {\n cur = ans;\n ans = new ArrayList<String>();\n for (String i : cur) {\n if (n > 3) {\n ans.add('0' + i + '0');\n }\n ans.add('1' + i + '1');\n ans.add('8' + i + '8');\n ans.add('6' + i + '9');\n ans.add('9' + i + '6');\n }\n }\n System.out.println(ans.size());\n return ans;\n }", "public String addWhiteSpace(String str, int number) {\n\t\tStringBuilder result = new StringBuilder();\n\t\tfor (int i = 0; i < str.length(); i+=2) {\n\t\t if (i > 0) {\n\t\t\t for (int j = 0; j < number; j++)\n\t\t\t\t result.append(\" \");\n\t\t }\n\t\t result.append(str.charAt(i));\n\t\t result.append(str.charAt(i+1));\n\t\t}\n\t\treturn result.toString();\n\t}", "private void fillRandomList()\n\t{\n\t\trandomList.add(\"I like cheese.\");\n\t\trandomList.add(\"Tortoise can move faster than slow rodent.\");\n\t\trandomList.add(\"I enjoy sitting on the ground.\");\n\t\trandomList.add(\"I like cereal.\");\n\t\trandomList.add(\"This is random.\");\n\t\trandomList.add(\"I like typing\");\n\t\trandomList.add(\"FLdlsjejf is my favorite word.\");\n\t\trandomList.add(\"I have two left toes.\");\n\t\trandomList.add(\"Sqrt(2) = 1.414213562 ...\");\n\t\trandomList.add(\"Hi mom.\");\n\t}", "private List<WordScore> liveList(List<WordScore> gridList, String s) {\n s = s.toLowerCase();\n List<WordScore> liveList = new ArrayList<>();\n for(WordScore ws : gridList){\n int nochars = s.length() - s.replaceAll(ws.getWord(), \"\").length();\n liveList.add(new WordScore(ws.getWord(), ws.getScore()-nochars));\n }\n return liveList;\n }", "private static List<String> induceSynonims(String word) {\n\t\treturn null;\n\t}", "public static void main(String[] args) {\n\t\tString s=\"22\";\n\t\t\n\t\tif(s.indexOf(\"1\")>=0||s.equals(\"\"))\n\t\t\tSystem.out.println(\"hello\");\n\t\t\t\n\t\tArrayList f=new ArrayList();\n\t\tint stack[]=new int[2*s.length()];\n\t\tint top=-1;\n\t\tchar a[][]=new char[][]{{},{},{'#','a','b','c','#'},{'#','d','e','f','#'},{'#','g','h','i','#'},{'#','j','k','l','#'},{'#','m','n','o','#'},{'#','p','q','r','s','#'},{'#','t','u','v','#'},{'#','w','x','y','z','#'}};\n\t\tint length[]=new int []{0,0,3,3,3,3,3,4,3,4};\n\t\tStringBuilder ans=new StringBuilder();\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tint x=stack[++top]=(int)s.charAt(i)-'0';\n\t\t\tans.append(a[x][1]);\n\t\t\tstack[++top]=1;\n\t\t}\n\t\twhile(stack[1]!=length[(int)s.charAt(0)-'0']+1){\n\t\t\tif(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\tif(s.length()==(top+1)/2){\n\t\t\t\t\twhile(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\t\t\tint r=(top-1)/2;\n\t\t\t\t\t\tchar r1=a[stack[top-1]][stack[top]];\n\t\t\t\t\t\tans.setCharAt(r, r1);\n\t\t\t\t\t\tString ans1=ans.toString();\n\t\t\t\t\t\tf.add(ans1);\n\t\t\t\t\t\tstack[top]++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t\t\ttop+=2;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[top]=1;\n\t\t\t\ttop-=2;\n\t\t\t\tstack[top]++;\n\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(f.size());\n\t}", "private void modify(List listString){\n\t}", "private String repeatM(int count){\n return new String(new char[count]).replace('\\0','M');\n }", "public static void loopThroughListOfStrings(List<String> input) {\n\t\t\n\t\tList<String> output = input.stream().filter(i -> i.length()>=4).collect(Collectors.toList());\n\t\t\n\t\tSystem.out.println(output);\n\t}" ]
[ "0.55588835", "0.55229723", "0.54595375", "0.54238254", "0.5377577", "0.53646344", "0.52897197", "0.5288007", "0.5233525", "0.5225019", "0.521158", "0.5200129", "0.51884824", "0.5185825", "0.51782596", "0.51773864", "0.5151502", "0.5142657", "0.514163", "0.513604", "0.51307565", "0.5129297", "0.50706583", "0.5069423", "0.5069118", "0.50578684", "0.5051562", "0.5048556", "0.5042992", "0.5030988", "0.5012325", "0.49734595", "0.49587935", "0.49542245", "0.49387205", "0.49275225", "0.4927479", "0.49069813", "0.4880256", "0.48751348", "0.4858941", "0.48582852", "0.48521936", "0.48219705", "0.48149616", "0.48114434", "0.48105443", "0.48057917", "0.4804807", "0.4803039", "0.4787876", "0.47805554", "0.4765939", "0.4741199", "0.47396874", "0.47387704", "0.4736322", "0.47323987", "0.4732157", "0.47171202", "0.47171193", "0.47170532", "0.47169754", "0.47078192", "0.4697591", "0.4677753", "0.46771806", "0.46718898", "0.46639842", "0.46629536", "0.46625173", "0.46510023", "0.46136248", "0.46063063", "0.46059436", "0.4605689", "0.4595574", "0.45940256", "0.45932886", "0.459322", "0.4587189", "0.4584727", "0.45785964", "0.45778894", "0.4575683", "0.4572642", "0.45703217", "0.45672476", "0.45662442", "0.45627823", "0.45595953", "0.45576534", "0.45555827", "0.45507377", "0.45498928", "0.45479152", "0.45470604", "0.4544842", "0.45396292", "0.45385683" ]
0.47237864
59
use_web_v2 bool user_web_v2 = 12;
@java.lang.Override public boolean getUserWebV2() { return userWebV2_; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@java.lang.Override\n public boolean getUserWebV2() {\n return userWebV2_;\n }", "public Builder setUserWebV2(boolean value) {\n \n userWebV2_ = value;\n onChanged();\n return this;\n }", "public boolean isWebSignupSupported()\n {\n return false;\n }", "public void setWeb(String web) {\n\t\tthis.web = web;\n\t}", "private boolean m11885j() {\n IUser a = ((C3592a) C3596c.m13172a(C3592a.class)).user().mo22165a();\n if (!C9290a.f25466a && a != null && a.isEnableShowCommerceSale()) {\n if (this.f9687p == LiveMode.VIDEO) {\n return true;\n }\n LiveMode liveMode = this.f9687p;\n LiveMode liveMode2 = LiveMode.THIRD_PARTY;\n }\n return false;\n }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Enable Web Secure Remote Access\")\n\n public Boolean getSecureAccessWeb() {\n return secureAccessWeb;\n }", "public boolean mo37b(Context context) {\n try {\n PackageInfo packageInfo = context.getPackageManager().getPackageInfo(\"com.heytap.openid\", 0);\n if (Build.VERSION.SDK_INT >= 28) {\n if (packageInfo == null || packageInfo.getLongVersionCode() < 1) {\n return false;\n }\n return true;\n } else if (packageInfo == null || packageInfo.versionCode < 1) {\n return false;\n } else {\n return true;\n }\n } catch (PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n return false;\n }\n }", "@Override\n public void setWeb(String web) {\n this.web = web;\n }", "public boolean isSupportWebP() {\n return ImageInitBusinss.getInstance() != null && ImageInitBusinss.getInstance().getStrategySupport().isSupportWebP();\n }", "public void setWebIso(boolean flag) {\n this.webIsoFlag = flag;\n }", "boolean isVersion3Allowed();", "public interface MainConst extends NetUrl_Const {\n\t/**\n\t * 当为true时为商业模式,此时异常不抛出,日志不打印。关闭所有开发痕迹。\n\t */\n\tpublic final static boolean DEVS_BUSINESS_MODEL = false;\n\n\t/**\n\t * true时打印日志。<br/>\n\t * false不打印日志。\n\t */\n\tpublic final static boolean DEVS_PRINT_LOG = true;\n\t/**\n\t * true时抛出异常\n\t */\n\tpublic final static boolean DEVS_THROW_ALL_EXCEPTION = true;\n\n\t/**\n\t * app_token\n\t */\n\tpublic final static String APP_APP_TOKEN = \"readyGo1408.app_token@bj-china\";\n\t/**\n\t * MD5加密盐\n\t */\n\tpublic final static String APP_MD5_TOKEN = \"readyGo1408.md5@bj-china\";\n\t/**\n\t * 硬件平台,安卓平台\n\t */\n\tpublic final static String APP_PLATFORM = \"2\";\n}", "public boolean getDevelopment();", "public static boolean setTDAGlasswarePageId( String userId){\n\t\treturn false;\n\t}", "public boolean isWebShowing();", "@Override\n public String getWeb() {\n return web;\n }", "public String getWeb() {\n\t\treturn web;\n\t}", "boolean hasThirdPartyAppAnalytics();", "boolean mo1836b();", "@Updatable\n public Boolean getEnableHttp2() {\n if (enableHttp2 == null) {\n enableHttp2 = false;\n }\n\n return enableHttp2;\n }", "public Builder clearUserWebV2() {\n \n userWebV2_ = false;\n onChanged();\n return this;\n }", "public void webSignup()\n {\n throw new UnsupportedOperationException(\n \"The web sign up is not supproted by the dictionary wizard.\");\n }", "boolean authQop() {\n/* 114 */ return this.serverQop;\n/* */ }", "public void setIsProVersion(Boolean IsProVersion) {\n this.IsProVersion = IsProVersion;\n }", "public static boolean isUsingHttp() {\n\t\treturn ((activeAccount == null) ? ((adHocAccount == null) ? false : adHocAccount.useHttp) : activeAccount.useHttp);\n\t}", "public interface WebConstants {\n\n String REQUEST_ATTR_ORIGIN_IP = \"ORIGIN_IP\";\n\n String USER_LOGIN_STATUS = \"USER_LOGIN_STATUS\";\n}", "@java.lang.Override\n public boolean hasUserAgentBuildVersion() {\n return userAgentVersionTypeCase_ == 8;\n }", "boolean hasUserAppId();", "boolean hasUserAppId();", "public interface HuobiConsts {\n String API_HOST_PRO = \"api.huobi.pro\";\n String API_HOST_HADAX = \"api.hadax.com\";\n\n String USER_AGENT = \"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36\";\n\n String ENDPOINT_SECURITY_TYPE_APIKEY = \"AccessKeyId\";\n String ENDPOINT_SECURITY_TYPE_APIKEY_HEADER = ENDPOINT_SECURITY_TYPE_APIKEY + \":#\";\n\n String ENDPOINT_SECURITY_TYPE_SIGNED = \"Signature\";\n String ENDPOINT_SECURITY_TYPE_SIGNED_HEADER = ENDPOINT_SECURITY_TYPE_SIGNED + \":#\";\n\n String SIGNATURE_METHOD = \"HmacSHA256\";\n String SIGNATURE_VERSION = \"2\";\n\n DateTimeFormatter DT_FORMAT = DateTimeFormatter.ofPattern(\"uuuu-MM-dd'T'HH:mm:ss\");\n ZoneId ZONE_GMT = ZoneId.of(\"Z\");\n\n\n interface WsCode {\n int manualClose = 4999;\n int autoReconnect = 4998;\n int pingExpired = 1003;\n }\n\n\n}", "public Boolean getIsProVersion() {\n return this.IsProVersion;\n }", "public static boolean vu0IsRunning() { return false; }", "@java.lang.Override\n public boolean hasUserAgentBuildVersion() {\n return userAgentVersionTypeCase_ == 8;\n }", "public interface WebConstants {\n String SESSION_USER = \"user\";\n}", "@Property(name = \"staging:ssl\")\n public abstract boolean isSsl();", "public void v_Verify_Guest2_Hidden(){\n\t}", "public final void setIsVoipAudioMode(java.lang.String r1, boolean r2) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.telecom.ConnectionServiceAdapterServant.2.setIsVoipAudioMode(java.lang.String, boolean):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telecom.ConnectionServiceAdapterServant.2.setIsVoipAudioMode(java.lang.String, boolean):void\");\n }", "public void setTwentyOne() {\r\n gotTwentyOne = true;\r\n\t}", "public PrivacySettingsWeb() {\n\t}", "public final void mo18789b() {\n throw new RuntimeException(\"Embedded Security Key option is not available for U2F request!\");\n }", "public String mo33121a() {\n return \"secure\";\n }", "public boolean _paymentpage_overrideurl(String _url) throws Exception{\n__c.LogImpl(\"21114113\",_url,0);\n //BA.debugLineNum = 172;BA.debugLine=\"If Url.Contains(\\\"api.com\\\") Then\";\nif (_url.contains(\"api.com\")) { \n };\n //BA.debugLineNum = 175;BA.debugLine=\"Return True\";\nif (true) return __c.True;\n //BA.debugLineNum = 176;BA.debugLine=\"End Sub\";\nreturn false;\n}", "public final boolean mo50006a(C18846s sVar) {\n String scheme = sVar.f50794d.getScheme();\n if (WebKitApi.SCHEME_HTTP.equals(scheme) || WebKitApi.SCHEME_HTTPS.equals(scheme)) {\n return true;\n }\n return false;\n }", "@Override\n\tpublic boolean needSecurityCheck() {\n\t\treturn false;\n\t}", "public String getAPISetting(){\n if(!apiSetting.equals(\"true\")){\n apiSetting = \"false\";\n }\n return apiSetting;\n }", "public boolean requiresOnline()\n {\n return onlineRequired;\n }", "boolean hasThirdPartyAppAnalyticsLink();", "private boolean getStandalone( HttpServletRequest request )\r\n {\r\n String strStandalone = request.getParameter( PARAMETER_STANDALONE );\r\n if ( strStandalone != null && ( strStandalone.equalsIgnoreCase( \"true\" ) || strStandalone.equalsIgnoreCase( \"on\" ) ) )\r\n {\r\n return true;\r\n }\r\n strStandalone = AppPropertiesService.getProperty( PROPERTY_STANDALONE );\r\n if ( strStandalone != null && ( strStandalone.equalsIgnoreCase( \"true\" ) || strStandalone.equalsIgnoreCase( \"on\" ) ) )\r\n {\r\n return true;\r\n }\r\n return false;\r\n }", "public interface WebRequestConstants extends ServerConstant {\n\n String CONSTANT_APP_UPDATE = \"APP_UPDATE\";\n\n String HEADER_KEY_DEVICE_TYPE = \"devicetype\";\n String HEADER_KEY_DEVICE_INFO = \"deviceinfo\";\n String HEADER_KEY_APP_INFO = \"appinfo\";\n String HEADER_KEY_IN_PLAY = \"inplay\";\n String DEVICE_TYPE_ANDROID = \"A\";\n\n String Loginauthcontroller = BASE + \"Loginauthcontroller/\";\n String Apicontroller = BASE + \"Apicontroller/\";\n String Apiusercontroller = BASE + \"Apiusercontroller/\";\n String Apiadmincontroller = BASE + \"Apiadmincontroller/\";\n String Apimobilecontroller = BASE + \"Apimobilecontroller/\";\n String Betentrycntr = BASE + \"Betentrycntr/\";\n String Geteventcntr = BASE + \"Geteventcntr/\";\n String Createdealercontroller = BASE + \"Createdealercontroller/\";\n String Chipscntrl = BASE + \"Chipscntrl/\";\n\n\n String URL_CHECK_APP_VERSION = Apimobilecontroller + \"chkAppVersion\";\n String URL_APK_DOWNLOAD = BASE + \"uploads/apk/%s\";\n\n String URL_LOAD_CAPTCHA = Loginauthcontroller + \"loadCaptcha\";\n int ID_LOAD_CAPTCHA = 1;\n\n String URL_LOGIN = Loginauthcontroller + \"chkLoginMobileUser\";\n int ID_LOGIN = 2;\n\n String URL_LOGIN_CHECK = Loginauthcontroller + \"is_logged_in_check\";\n int ID_LOGIN_CHECK = 3;\n\n String URL_USER_MATCH_LIST = Apiusercontroller + \"getUserFavouriteMatchLst/%s\";\n int ID_USER_MATCH_LIST = 4;\n\n String URL_ODDS_BY_MARKET_IDS = \"http://demo.com/get_odds_by_market_ids.php?market_id=%s\"; // change here http://demo.com/ in your url\n int ID_ODDS_BY_MARKET_IDS = 5;\n\n\n String URL_MARKET_LISTING = Apicontroller + \"getMarketListing/%s\";//matchid\n int ID_MARKET_LISTING = 6;\n\n String URL_CHANGE_PASSWORD = Createdealercontroller + \"changePassword\";\n int ID_CHANGE_PASSWORD = 7;\n\n String URL_MARKET_WIN_LOSS = Apicontroller + \"market_win_loss\";\n int ID_MARKET_WIN_LOSS = 8;\n\n String URL_GET_MATCH_BETFAIR_SESSION = \"http://demo.com/get_match_betfair_session.php?market_id=%s\"; // change here http://demo.com/ in your url\n int ID_MATCH_BETFAIR_SESSION = 9;\n\n String URL_GET_MATCH_INDIAN_SESSION = Apicontroller + \"matchLstIndianSession/%s/%s\"; //matchId marketId\n int ID_MATCH_INDIAN_SESSION = 10;\n\n String URL_GET_MATCH_ADMIN_SESSION = Apicontroller + \"matchLstAdminSession/%s/%s\"; //matchId marketId\n int ID_MATCH_ADMIN_SESSION = 11;\n\n String URL_DISPLAY_MSG_HEADER = Betentrycntr + \"DisplayMsgOnHeader\";\n int ID_DISPLAY_MSG_HEADER = 12;\n\n String URL_BALANCE = Chipscntrl + \"getChipDataById/%s\";// userId\n int ID_BALANCE = 13;\n\n String URL_GET_MATCH_SCORE = \"http://demo.com/api/match-center/stats/%s/%s\";// sport_id, match_id // change here http://demo.com/ in your url\n String URL_GET_MATCH_SCORE2 = Geteventcntr + \"GetScoreApi/%s\";// match_id\n int ID_GET_MATCH_SCORE = 14;\n\n String URL_GET_BET_DATA = Betentrycntr + \"GatBetData/%s/%s/%s/%s\";// :match_id\n int ID_GET_BET_DATA = 15;\n\n String URL_PLAY_STORE_APP_VERSION = BASE + \"get_playstore_app_version/%s\";\n\n String URL_ONE_PAGE_REPORT = Apiadmincontroller + \"one_page_report\";\n int ID_ONE_PAGE_REPORT = 16;\n\n String URL_CHIP_LEGER = Betentrycntr + \"Chip_leger/%s/%s/%s/%s/%s\";//user_id, user_type, type, from_date, to_date\n int ID_CHIP_LEGER = 17;\n\n String URL_PROFIT_LOSS_BY_MATCH = Betentrycntr + \"profitLossByMatchId\";\n String KEY_PROFIT_LOSS_BY_MATCH = \"profitLossByMatchId\";\n int ID_PROFIT_LOSS_BY_MATCH = 18;\n\n String URL_BET_HISTORY_PL = Betentrycntr + \"BetHistoryPL/%s/%s/%s/%s\";//user_id/matchId/page_no/fancyId\n int ID_URL_BET_HISTORY_PL = 19;\n\n String URL_GET_SERIES_LIST = Geteventcntr + \"getSeriesLst/%s\";// match type\n int ID_GET_SERIES_LIST = 20;\n\n String URL_MATCH_BY_SPORT_ID = Geteventcntr + \"getInPlayMatchBySportId/%s/%s\";// sport_id/user_id\n int ID_MATCH_BY_SPORT_ID = 21;\n\n String URL_GET_STAKE_SETTING = Apiusercontroller + \"get_stake_setting\";\n int ID_GET_STAKE_SETTING = 22;\n\n String URL_ONE_CLICK_STAKE_SETTING = Apiusercontroller + \"one_click_stake_setting\";\n String KEY_ONE_CLICK_STAKE_SETTING = \"one_click_stake_setting\";\n int ID_ONE_CLICK_STAKE_SETTING = 23;\n\n String URL_STAKE_SETTING = Apiusercontroller + \"stake_setting\";\n String KEY_STAKE_SETTING = \"stake_setting\";\n int ID_STAKE_SETTING = 24;\n\n String URL_SERIES_WITH_MATCH_DATA = Geteventcntr + \"getSeriesWithMatchData/%s/%s/%s\";// sport_id/seriesId/user_id\n int ID_SERIES_WITH_MATCH_DATA = 25;\n String KEY_SERIES_WITH_MATCH_DATA = \"getSeriesWithMatchData\";\n\n String URL_SAVE_MULTIPLE_BETS = Apiusercontroller + \"save_multiple_bets\";\n int ID_SAVE_MULTIPLE_BETS = 26;\n\n String URL_MATCH_AUTOCOMPLETE = Apiusercontroller + \"match_autocomplete\";\n int ID_MATCH_AUTOCOMPLETE = 27;\n\n String URL_FAVOURITE_MATCH = Apiusercontroller + \"getFavouriteMatchLst/%s\";\n int ID_FAVOURITE_MATCH = 28;\n\n String URL_FAVOURITE = Apiusercontroller + \"favourite\";\n String KEY_MATCHDETAIL = \"match_detail\";\n String KEY_FAVOURITE = \"favourite\";\n int ID_FAVOURITE = 29;\n\n String URL_UNFAVOURITE = Apiusercontroller + \"unfavourite\";\n String KEY_UNFAVOURITE = \"unfavourite\";\n int ID_UNFAVOURITE = 30;\n\n String URL_CONFIRM_BET = Apiusercontroller + \"confirm_bet\";\n int ID_CONFIRM_BET = 31;\n\n String URL_DELETE_BETTING = Betentrycntr + \"deleteGetbetting/%s/%s\";//MstCode, UserId\n String KEY_DELETE = \"delete\";\n int ID_DELETE_BETTING = 32;\n\n String URL_GET_SELECTION_NAME = \"http://demo.com/get_selectionname_by_market_ids.php?market_sel_id=%s\";//marketid-selectionid,marketid-selectionid // change here http://demo.com/ in your url\n int ID_GET_SELECTION_NAME = 33;\n\n\n String TV1 = BASE+\"tvnew/tv1.html\";;\n String TV2 = BASE+\"tvnew/tv2.html\";\n\n}", "private void m1182e(boolean z) {\n this.f1445d.mo55878c();\n m1183f();\n CollectorsInfrastructure.getInstance().setSDKAnalyticsVersion(C3682q4.C3683a.valueOf(z ? \"V2\" : \"V1\"));\n CollectorsInfrastructure.getInstance().setSDKFramework(this.f1451j);\n }", "private static void oneUserExample()\t{\n\t}", "public interface IPSBrandCodeConstants\n{\n public static final int REPOSITORY = 1;\n public static final int SERVER = 2;\n public static final int PUBLISHER = 4;\n public static final int DEVELOPMENT_TOOLS = 8;\n public static final int DATABASE_PUBLISHER = 16;\n public static final int BEA_ACCELERATOR = 32;\n public static final int MULTI_SERVER_MANANGER = 64;\n public static final int CONTENT_CONNECTOR = 128;\n public static final int WORD = 256;\n public static final int INLINE_EDITING = 512;\n public static final int SPRINTA = 1024;\n public static final int APPLICATION_SERVER = 2048;\n public static final int WEB_SERVICES_LISTENER = 4096;\n public static final int DOCUMENT_ASSEMBLER = 8192;\n public static final int WEBSPHERE_ACCELERATOR = 16384;\n public static final int CONVERA_SEARCH = 32768;\n public static final int EKTRON_WEP_XML = 65536;\n public static final int EKTRON_WEBIMAGEFX = 131072;\n\n \n /**\n * Represents types of servers for which codes can be generated.\n */\n public enum ServerTypes\n {\n /**\n * Development server\n */\n DEVELOPMENT(0, \"Development\"),\n \n /**\n * Production server\n */\n PRODUCTION(1, \"Production\"),\n \n /**\n * Test server\n */\n TEST(2, \"Test\"),\n \n /**\n * Failover server\n */\n FAIL0VER(3, \"Fail Over\"),\n \n /**\n * Disaster Recovery server\n */\n DISATER_RECOVERY(4, \"Disaster Recovery\"),\n \n /**\n * Publishing Hub\n */\n PUBLISHING_HUB(5, \"Publishing Hub\");\n \n /**\n * Constructor\n * \n * @param value The integer representation of this type. \n * \n * @param displayName The display name, assumed not <code>null</code> or \n * empty.\n */\n private ServerTypes(int value, String displayName)\n {\n mi_value = value;\n mi_name = displayName;\n }\n \n /**\n * Get the integer value of this server type\n * \n * @return The value\n */\n public int getValue()\n {\n return mi_value;\n }\n \n /**\n * Returns the display name of this type\n * \n * @return The name, never <code>null</code> or empty.\n */\n @Override\n public String toString()\n {\n return mi_name;\n }\n \n /**\n * Determine if this type is an extended server type. These are types\n * that are not available for codes that don't support extended product\n * info.\n * \n * @return <code>true</code> if it is extended, <code>false</code>\n * otherwise.\n */\n public boolean isExtendedServerType()\n {\n return mi_value > PRODUCTION.mi_value;\n }\n \n /**\n * Lookup enum value by ordinal. Ordinals should be unique. If they are\n * not unique, then the first enum value with a matching ordinal is\n * returned.\n * \n * @param s The enum value\n * \n * @return an enumerated value, never <code>null</code>.\n * \n * @throws IllegalArgumentException if the value does not match\n */\n public static ServerTypes valueOf(int s) throws IllegalArgumentException\n {\n ServerTypes types[] = values();\n for (int i = 0; i < types.length; i++)\n {\n if (types[i].getValue() == s)\n return types[i];\n }\n throw new IllegalArgumentException(\"No match for value: \" + s);\n } \n \n /**\n * Gets list of server types sorted on display name ascending \n * case-insensitive.\n * \n * @return The list, never <code>null</code> or empty.\n */\n public static List<ServerTypes> getSortedValues()\n {\n List<ServerTypes> sortedTypes = new ArrayList<ServerTypes>();\n for (ServerTypes serverTypes : values())\n sortedTypes.add(serverTypes);\n \n Collections.sort(sortedTypes, new Comparator<ServerTypes>() {\n\n public int compare(ServerTypes t1, ServerTypes t2)\n {\n return t1.mi_name.toLowerCase().compareTo(\n t2.mi_name.toLowerCase());\n }});\n \n return sortedTypes;\n }\n \n\n /**\n * The value supplied during construction, immutable.\n */\n private int mi_value;\n \n /**\n * The display name supplied during construction, immutable.\n */\n private String mi_name;\n }\n \n \n /**\n * Represents types of evals for which codes can be generated.\n */\n public enum EvalTypes\n {\n /**\n * Development server\n */\n NOT_EVAL(0, \"Non-Eval\"),\n \n /**\n * Production server\n */\n M30_DAY(1, \"30 Day Eval\"),\n \n /**\n * Test server\n */\n M60_DAY(2, \"60 Day Eval\"),\n \n /**\n * Failover server\n */\n M90_DAY(3, \"90 Day Eval\"),\n \n /**\n * Disaster Recovery server\n */\n TERM(4, \"Term License\");\n\n \n /**\n * Constructor\n * \n * @param value The integer representation of this type. \n * \n * @param displayName The display name, assumed not <code>null</code> or \n * empty.\n */\n private EvalTypes(int value, String displayName)\n {\n mi_value = value;\n mi_name = displayName;\n }\n \n /**\n * Get the integer value of this eval type\n * \n * @return The value\n */\n public int getValue()\n {\n return mi_value;\n }\n \n /**\n * Returns the display name of this type\n * \n * @return The name, never <code>null</code> or empty.\n */\n @Override\n public String toString()\n {\n return mi_name;\n }\n \n /**\n * Determine if this type is an extended server type. These are types\n * that are not available for codes that don't support extended product\n * info.\n * \n * @return <code>true</code> if it is extended, <code>false</code>\n * otherwise.\n */\n public boolean isExtendedEvalType()\n {\n return mi_value > M90_DAY.mi_value;\n }\n \n /**\n * Lookup enum value by ordinal. Ordinals should be unique. If they are\n * not unique, then the first enum value with a matching ordinal is\n * returned.\n * \n * @param s The enum value\n * \n * @return an enumerated value, never <code>null</code>.\n * \n * @throws IllegalArgumentException if the value does not match\n */\n public static EvalTypes valueOf(int s) throws IllegalArgumentException\n {\n EvalTypes types[] = values();\n for (int i = 0; i < types.length; i++)\n {\n if (types[i].getValue() == s)\n return types[i];\n }\n throw new IllegalArgumentException(\"No match for value: \" + s);\n } \n \n /**\n * The value supplied during construction, immutable.\n */\n private int mi_value;\n \n /**\n * The display name supplied during construction, immutable.\n */\n private String mi_name;\n } \n}", "private static Boolean pmaIsLite(String... varargs) {\n\t\t// setting the default value when argument's value is omitted\n\t\tString pmaCoreURL = varargs.length > 0 ? varargs[0] : pmaCoreLiteURL;\n\t\tString url = PMA.join(pmaCoreURL, \"api/json/IsLite\");\n\t\ttry {\n\t\t\tString jsonString = PMA.httpGet(url, \"application/json\");\n\t\t\treturn jsonString.equals(\"true\");\n\t\t} catch (Exception e) {\n\t\t\t// this happens when NO instance of PMA.core is detected\n\t\t\te.printStackTrace();\n\t\t\tif (PMA.logger != null) {\n\t\t\t\tStringWriter sw = new StringWriter();\n\t\t\t\te.printStackTrace(new PrintWriter(sw));\n\t\t\t\tPMA.logger.severe(sw.toString());\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t}", "protected boolean getStravaCheckToken()\n {\n return true;\n }", "public boolean isWebIso() {\n return webIsoFlag;\n }", "protected int getLaunchType() {\n return ILaunchConstants.LAUNCH_TYPE_WEB_CLIENT;\n }", "private static boolean m151985b(C32724ad adVar, Proxy.Type type) {\n return !adVar.mo132325g() && type == Proxy.Type.HTTP;\n }", "public abstract boolean isLiveMode();", "public String getServerVersion();", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Secure browser via Akeyless Web Access Bastion\")\n\n public Boolean getSecureAccessWebBrowsing() {\n return secureAccessWebBrowsing;\n }", "public boolean requiresSecurityPolicy()\n {\n return true;\n }", "public boolean hasEndpoint2() { return true; }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Web-Proxy via Akeyless Web Access Bastion\")\n\n public Boolean getSecureAccessWebProxy() {\n return secureAccessWebProxy;\n }", "@java.lang.Override\n public boolean hasUserAgentVersion() {\n return userAgentVersionTypeCase_ == 7;\n }", "boolean hasLoginapiavgrtt();", "public String getRequiredVersion() {\n/* 152 */ return this.jspversion;\n/* */ }", "boolean hasWeixinLogin();", "public static boolean getFb() {\n return fb;\n }", "private void m81848e(WindowConfig iVar) {\n boolean z;\n boolean z2;\n boolean z3;\n WebViewFragment2 u;\n if (iVar.mo81404a()) {\n this.f58073e = iVar.f58090f;\n if (this.f58069a.getHasSystemBar()) {\n this.f58069a.setSystemBarTitle(this.f58073e);\n }\n }\n boolean z4 = false;\n if (iVar.mo81412e()) {\n if (iVar.mo81421j()) {\n z = !m81840a(iVar.f58087c, this.f58080l);\n this.f58080l = iVar.f58087c;\n if (z) {\n m81846c(false);\n }\n if (iVar.mo81416g()) {\n if (iVar.mo81422k()) {\n boolean equals = C6969H.m41409d(\"G7A86D408BC38\").equals(iVar.f58088d);\n z2 = equals != this.f58075g;\n this.f58075g = equals;\n if (iVar.mo81414f()) {\n if (iVar.mo81423l()) {\n z3 = !m81840a(iVar.f58089e, this.f58076h);\n this.f58076h = iVar.f58089e;\n if (iVar.mo81418h()) {\n z4 = !m81840a(iVar.f58094j, this.f58081m);\n this.f58081m = iVar.f58094j;\n }\n u = m81857u();\n if (u == null) {\n u.mo81332a(z, z2, z3, z4);\n return;\n }\n return;\n }\n iVar.mo81402a(C6969H.m41409d(\"G6782C328B637A33D\"));\n }\n z3 = false;\n if (iVar.mo81418h()) {\n }\n u = m81857u();\n if (u == null) {\n }\n } else {\n iVar.mo81402a(C6969H.m41409d(\"G6782C337B634\"));\n }\n }\n z2 = false;\n if (iVar.mo81414f()) {\n }\n z3 = false;\n if (iVar.mo81418h()) {\n }\n u = m81857u();\n if (u == null) {\n }\n } else {\n iVar.mo81402a(C6969H.m41409d(\"G6782C336BA36BF\"));\n }\n }\n z = false;\n if (iVar.mo81416g()) {\n }\n z2 = false;\n if (iVar.mo81414f()) {\n }\n z3 = false;\n if (iVar.mo81418h()) {\n }\n u = m81857u();\n if (u == null) {\n }\n }", "public static final boolean isUserLoad() {\n return SystemProperties.get(BUILD_TYPE).equals(BUILD_TYPE_USER);\n }", "public Boolean multipleStepWebTest() {\n return this.multipleStepWebTest;\n }", "public void setForua(boolean newValue);", "private boolean m81322a(boolean z, String str, String str2) {\n AppMethodBeat.m2504i(131592);\n if (z || this.iae) {\n AppMethodBeat.m2505o(131592);\n return true;\n } else if (C1443d.m3067fP(18)) {\n AppMethodBeat.m2505o(131592);\n return true;\n } else {\n C4990ab.m7411d(\"MicroMsg.AppBrandVideoWrapper\", \"checkUseSystemPlayer abtestFlag[%d]\", Integer.valueOf(C4996ah.getContext().getSharedPreferences(\"system_config_prefs\", C1448h.m3078Mu()).getInt(\"appbrand_video_player\", -1)));\n if (C4996ah.getContext().getSharedPreferences(\"system_config_prefs\", C1448h.m3078Mu()).getInt(\"appbrand_video_player\", -1) <= 0) {\n C4990ab.m7416i(\"MicroMsg.AppBrandVideoWrapper\", \"abtest is zero, use system player\");\n AppMethodBeat.m2505o(131592);\n return true;\n } else if (!C5046bo.isNullOrNil(str) && str.contains(\".m3u8\")) {\n C4990ab.m7417i(\"MicroMsg.AppBrandVideoWrapper\", \"%d it is m3u8 file use system player.\", Integer.valueOf(hashCode()));\n mo26918gp(204);\n AppMethodBeat.m2505o(131592);\n return true;\n } else if (C26492r.m42231ud(str2)) {\n C4990ab.m7417i(\"MicroMsg.AppBrandVideoWrapper\", \"%d it is m3u8 file use system player.\", Integer.valueOf(hashCode()));\n mo26918gp(204);\n AppMethodBeat.m2505o(131592);\n return true;\n } else {\n AppMethodBeat.m2505o(131592);\n return false;\n }\n }\n }", "private static final String m2193f() {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"fb\");\n stringBuilder.append(C0560t.m1253e());\n stringBuilder.append(\"://authorize\");\n return stringBuilder.toString();\n }", "public interface Platform {\n String WEB = \"Web\";\n String FB = \"Facebook Messenger\";\n}", "boolean getIsGoogleCn();", "@Deprecated\n public boolean isRequestCorrect(){\n\treturn true;\n }", "public void flashlightSwitch()\n {\n usingFlashlight = !usingFlashlight;\n }", "boolean isGaotongPay(String url) {\n if (url.startsWith(\"http://wgtj.gaotongpay.com/\")) {\r\n return true;\r\n }\r\n return false;\r\n }", "public void v_Verify_Guest6_Hidden(){\n\t}", "public void v_Verify_Guest3_Hidden(){\n\t}", "public interface WebContainerConstants\n{\n\n /**\n * Service PID used for configuration.\n */\n static final String PID = \"org.ops4j.pax.web\";\n\n /**\n * Init param name for specifying a context name.\n */\n static final String CONTEXT_NAME = \"webapp.context\";\n\n /**\n * Servlet init param name for specifying a servlet name.\n */\n static final String SERVLET_NAME = \"servlet-name\";\n\n /**\n * Filter init param name for specifying a filter name.\n */\n static final String FILTER_NAME = \"filter-name\";\n\n /**\n * Filter init param name for specifying a filter-mapping dispatch behaviour\n * Must be a comma delimited string of:\n * <ol>\n * <li>request</li>\n * <li>forward</li>\n * <li>include</li>\n * <li>error</li>\n * </ol>\n *\n * values are not case sensitive.\n */\n static final String FILTER_MAPPING_DISPATCHER = \"filter-mapping-dispatcher\".intern();\n\n static final String PROPERTY_HTTP_USE_NIO = \"org.osgi.service.http.useNIO\";\n static final String PROPERTY_HTTP_PORT = \"org.osgi.service.http.port\";\n static final String PROPERTY_HTTP_SECURE_PORT = \"org.osgi.service.http.port.secure\";\n static final String PROPERTY_HTTP_ENABLED = \"org.osgi.service.http.enabled\";\n static final String PROPERTY_HTTP_SECURE_ENABLED = \"org.osgi.service.http.secure.enabled\";\n\n static final String PROPERTY_SSL_KEYSTORE = PID + \".ssl.keystore\";\n static final String PROPERTY_SSL_KEYSTORE_TYPE = PID + \".ssl.keystore.type\";\n static final String PROPERTY_SSL_PASSWORD = PID + \".ssl.password\";\n static final String PROPERTY_SSL_KEYPASSWORD = PID + \".ssl.keypassword\";\n\n static final String PROPERTY_SSL_CLIENT_AUTH_WANTED = PID + \".ssl.clientauthwanted\";\n static final String PROPERTY_SSL_CLIENT_AUTH_NEEDED = PID + \".ssl.clientauthneeded\";\n\n static final String PROPERTY_SESSION_TIMEOUT = PID + \".session.timeout\";\n static final String PROPERTY_SESSION_COOKIE = PID + \".session.cookie\";\n static final String PROPERTY_SESSION_URL = PID + \".session.url\";\n static final String PROPERTY_WORKER_NAME = PID + \".worker.name\";\n\n static final String PROPERTY_TEMP_DIR = \"javax.servlet.context.tempdir\";\n\n static final String PROPERTY_LISTENING_ADDRESSES = PID + \".listening.addresses\";\n\n static final String PROPERTY_LOG_NCSA_ENABLED = \"org.ops4j.pax.web.log.ncsa.enabled\";\n static final String PROPERTY_LOG_NCSA_FORMAT = \"org.ops4j.pax.web.log.ncsa.format\";\n static final String PROPERTY_LOG_NCSA_RETAINDAYS = \"org.ops4j.pax.web.log.ncsa.retaindays\";\n static final String PROPERTY_LOG_NCSA_APPEND = \"org.ops4j.pax.web.log.ncsa.append\";\n static final String PROPERTY_LOG_NCSA_EXTENDED = \"org.ops4j.pax.web.log.ncsa.extended\";\n static final String PROPERTY_LOG_NCSA_LOGTIMEZONE = \"org.ops4j.pax.web.log.ncsa.logtimezone\";\n static final String PROPERTY_LOG_NCSA_LOGDIR = \"org.ops4j.pax.web.log.ncsa.directory\";\n\n /**\n * Servlet context attribute containing the bundle context of the bundle registereing the http context.\n */\n static final String BUNDLE_CONTEXT_ATTRIBUTE = \"osgi-bundlecontext\";\n \n static final String PROPERTY_SERVER_CONFIGURATION_FILE = PID + \".config.file\";\n \n}", "protected boolean isAlwaysExperienceDropper() {\n/* 1849 */ return true;\n/* */ }", "public boolean isbLive() {\n\t\treturn true;\n\t}", "boolean useCamera2();", "boolean getUsePage();", "public static String m21397c(Context context) {\n if (TextUtils.isEmpty(f16892c)) {\n try {\n f16892c = VERSION.SDK_INT >= 17 ? WebSettings.getDefaultUserAgent(context) : m21385a();\n } catch (Throwable unused) {\n f16892c = m21385a();\n }\n }\n return f16892c;\n }", "public void v_Verify_Guest7_Hidden(){\n\t}", "@java.lang.Override\n public boolean hasAppEngineVersion() {\n return stepInfoCase_ == 22;\n }", "boolean mo106365g();", "private boolean shouldUseSimpleUserSwitcher() {\n return Settings.Global.getInt(this.mContext.getContentResolver(), \"lockscreenSimpleUserSwitcher\", this.mContext.getResources().getBoolean(17891459) ? 1 : 0) != 0;\n }", "private void getPreferences() {\n\n if(sharedpreferences.getBoolean(\"usaGPU\", true)) {\n mUtilizzoGPU.setChecked(true);\n }\n else{\n mUtilizzoGPU.setChecked(false);\n }\n\n }", "static public int getGUEST() {\n return 2;\n }", "public static String getWebHost() { return mWebHost; }", "public interface WebAppConstants {\n\n\t\n\tpublic static final String MSG_OK = \"I dati sono stati inseriti correttamente\";\n\tpublic static final String MSG_SI = \"SI\";\n\tpublic static final String MSG_NO = \"NO\";\n\t\n\tpublic static final String Si = \"Si\";\n\tpublic static final String No = \"No\";\n\t\n\tpublic static final String CODICE_ITALIA = \"1\";\n\t\n\t\n\tpublic static final String CAP_UG =\"CAP-UG\";\n\tpublic static final String CAP_EG =\"CAP-EG\";\n\t\n\t\n\tpublic static final String FRAZIONABILE = \"Frazionabile\";\n\tpublic static final String NON_FRAZIONABILE = \"Non frazionabile\";\n\t\n\tpublic static final String PRENOTATO = \"Prenotato\";\n\tpublic static final String PRENOTATO_LIQUIDABILE = \"Prenotato liquidabile\";\n\tpublic static final String NON_PRENOTATO = \"Non Prenotato\";\n\t\n\t//per la scelta del tipo debito siope:\n\tpublic static final String COMMERCIALE_CON_FATTURE = \"Commerciale (con fatture)\";\n\tpublic static final String COMMERCIALE = \"Commerciale\";\n\tpublic static final String NON_COMMERCIALE = \"Non commerciale\";\n\t\n\t//per la scela di quale provvedimento usare nel reintroito di un ordinativo:\n\tpublic static final String SCELTA_PROVVEDIMENTO_UNICO = \"Provvedimento Unico\";\n\tpublic static final String SCELTA_PROVVEDIMENTO_DA_MOVIMENTI = \"Provvedimento da movimenti\";\n\t\n\t//SIAC-5333: duplicate da bilapp\n\tpublic static final String CODICE_CAPITOLO_ENTRATA_GESTIONE = \"CAP-EG\";\n\tpublic static final String CODICE_CAPITOLO_USCITA_GESTIONE = \"CAP-UG\";\n\tpublic static final String TRUE_STRING = \"TRUE\"; \n\tpublic static final String GESTIONE_UEB = \"GESTIONE_UEB\";\n\tpublic static final String TITOLO_1 = \"1\"; \n\tpublic static final String TITOLO_2 = \"2\";\n\tpublic static final String TITOLO_3 = \"3\"; \n\tpublic static final String TITOLO_4 = \"4\"; \n\tpublic static final String TITOLO_5 = \"5\"; \n\tpublic static final String TITOLO_7 = \"7\";\n\tpublic static final String MACROAGGREGATO_1030000 = \"1030000\";\n\tpublic static final String MACROAGGREGATO_1040000 = \"1040000\"; \n\tpublic static final String MACROAGGREGATO_2030000 = \"2030000\";\n\tpublic static final String MACROAGGREGATO_2040000 = \"2040000\"; \n\tpublic static final String MACROAGGREGATO_2050000 = \"2050000\";\n\tpublic static final String MACROAGGREGATO_4010000 = \"4010000\";\n\tpublic static final String MACROAGGREGATO_4020000 = \"4020000\";\n\tpublic static final String MACROAGGREGATO_4030000 = \"4030000\";\n\tpublic static final String MACROAGGREGATO_4040000 = \"4040000\";\n\tpublic static final String MACROAGGREGATO_7020000 = \"7020000\";\n\tpublic static final String MACROAGGREGATO_7010000 = \"7010000\"; \n\tpublic static final String MACROAGGREGATO_1100000 = \"1100000\";\n\t\n\tpublic static final String CONDIZIONI_REGISTRAZIONE_NON_SODDISFATTE = \"Condizioni per la creazione di una registrazione sulla contabilit&agrave; generale non soddisfatte\";\n\t\n\t//costante per table risultati ricerca pre doc:\n\tpublic static final String KEY_LISTA_PRE_DOC_DA_DOCUMENTI = \"LISTA_PRE_DOC_DA_DOCUMENTI\";\n}", "public static void setUseHttp(boolean useHttp) {\n\t\tif (adHocAccount == null)\n\t\t\tadHocAccount = new Account();\n\t\tadHocAccount.useHttp = useHttp;\n\t\t\n\t\t//\tset default HTTP port if not set before\n\t\tif ((adHocAccount.port == -1) && useHttp)\n\t\t\tadHocAccount.port = 80;\n\t}", "public abstract boolean mo2163j();", "public void v_Verify_Guest8_Hidden(){\n\t}", "private boolean tienePermiso(String urlStr){\n return true;\n }", "public static WebSecurity get(int value) {\n\t\tswitch (value) {\n\t\t\tcase PREFER_SECURE_VALUE: return PREFER_SECURE;\n\t\t\tcase ALWAYS_SECURE_VALUE: return ALWAYS_SECURE;\n\t\t\tcase ALWAYS_UNSECURE_VALUE: return ALWAYS_UNSECURE;\n\t\t}\n\t\treturn null;\n\t}" ]
[ "0.74197036", "0.6900422", "0.57291615", "0.5685951", "0.55701023", "0.5427062", "0.5390331", "0.53485477", "0.52722657", "0.5243693", "0.52132434", "0.5166238", "0.51049083", "0.5103322", "0.50971246", "0.50955397", "0.5083663", "0.5081766", "0.5063107", "0.50076437", "0.49899334", "0.49847585", "0.49845606", "0.4979671", "0.49779367", "0.49735454", "0.49728435", "0.49628276", "0.49628276", "0.4948856", "0.49402875", "0.49330574", "0.49167973", "0.4916374", "0.4906024", "0.49050114", "0.49035883", "0.48991156", "0.48941773", "0.48914838", "0.48854503", "0.48849013", "0.48590192", "0.4858159", "0.4842561", "0.4842292", "0.4837342", "0.4831356", "0.4813313", "0.48118588", "0.4808296", "0.480341", "0.48018017", "0.47979844", "0.47949356", "0.47948635", "0.47912428", "0.47799766", "0.47787467", "0.4778313", "0.47756058", "0.4770174", "0.4764404", "0.47598594", "0.47582975", "0.47549117", "0.47516656", "0.4750809", "0.47423685", "0.47366452", "0.4734026", "0.47307974", "0.47231203", "0.47226834", "0.47195145", "0.4710416", "0.47095427", "0.47064397", "0.47012132", "0.4699804", "0.46956787", "0.46951997", "0.46929732", "0.46870247", "0.46810693", "0.46743077", "0.46739075", "0.46724465", "0.467135", "0.46692562", "0.46638423", "0.4660325", "0.46597904", "0.4657159", "0.4657049", "0.4653272", "0.46515635", "0.46514884", "0.46507058", "0.46409136" ]
0.72402245
1
use_web_v2 bool user_web_v2 = 12;
public Builder setUserWebV2(boolean value) { userWebV2_ = value; onChanged(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@java.lang.Override\n public boolean getUserWebV2() {\n return userWebV2_;\n }", "@java.lang.Override\n public boolean getUserWebV2() {\n return userWebV2_;\n }", "public boolean isWebSignupSupported()\n {\n return false;\n }", "public void setWeb(String web) {\n\t\tthis.web = web;\n\t}", "private boolean m11885j() {\n IUser a = ((C3592a) C3596c.m13172a(C3592a.class)).user().mo22165a();\n if (!C9290a.f25466a && a != null && a.isEnableShowCommerceSale()) {\n if (this.f9687p == LiveMode.VIDEO) {\n return true;\n }\n LiveMode liveMode = this.f9687p;\n LiveMode liveMode2 = LiveMode.THIRD_PARTY;\n }\n return false;\n }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Enable Web Secure Remote Access\")\n\n public Boolean getSecureAccessWeb() {\n return secureAccessWeb;\n }", "public boolean mo37b(Context context) {\n try {\n PackageInfo packageInfo = context.getPackageManager().getPackageInfo(\"com.heytap.openid\", 0);\n if (Build.VERSION.SDK_INT >= 28) {\n if (packageInfo == null || packageInfo.getLongVersionCode() < 1) {\n return false;\n }\n return true;\n } else if (packageInfo == null || packageInfo.versionCode < 1) {\n return false;\n } else {\n return true;\n }\n } catch (PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n return false;\n }\n }", "@Override\n public void setWeb(String web) {\n this.web = web;\n }", "public boolean isSupportWebP() {\n return ImageInitBusinss.getInstance() != null && ImageInitBusinss.getInstance().getStrategySupport().isSupportWebP();\n }", "public void setWebIso(boolean flag) {\n this.webIsoFlag = flag;\n }", "boolean isVersion3Allowed();", "public interface MainConst extends NetUrl_Const {\n\t/**\n\t * 当为true时为商业模式,此时异常不抛出,日志不打印。关闭所有开发痕迹。\n\t */\n\tpublic final static boolean DEVS_BUSINESS_MODEL = false;\n\n\t/**\n\t * true时打印日志。<br/>\n\t * false不打印日志。\n\t */\n\tpublic final static boolean DEVS_PRINT_LOG = true;\n\t/**\n\t * true时抛出异常\n\t */\n\tpublic final static boolean DEVS_THROW_ALL_EXCEPTION = true;\n\n\t/**\n\t * app_token\n\t */\n\tpublic final static String APP_APP_TOKEN = \"readyGo1408.app_token@bj-china\";\n\t/**\n\t * MD5加密盐\n\t */\n\tpublic final static String APP_MD5_TOKEN = \"readyGo1408.md5@bj-china\";\n\t/**\n\t * 硬件平台,安卓平台\n\t */\n\tpublic final static String APP_PLATFORM = \"2\";\n}", "public boolean getDevelopment();", "public static boolean setTDAGlasswarePageId( String userId){\n\t\treturn false;\n\t}", "public boolean isWebShowing();", "@Override\n public String getWeb() {\n return web;\n }", "public String getWeb() {\n\t\treturn web;\n\t}", "boolean hasThirdPartyAppAnalytics();", "boolean mo1836b();", "@Updatable\n public Boolean getEnableHttp2() {\n if (enableHttp2 == null) {\n enableHttp2 = false;\n }\n\n return enableHttp2;\n }", "public Builder clearUserWebV2() {\n \n userWebV2_ = false;\n onChanged();\n return this;\n }", "public void webSignup()\n {\n throw new UnsupportedOperationException(\n \"The web sign up is not supproted by the dictionary wizard.\");\n }", "boolean authQop() {\n/* 114 */ return this.serverQop;\n/* */ }", "public void setIsProVersion(Boolean IsProVersion) {\n this.IsProVersion = IsProVersion;\n }", "public static boolean isUsingHttp() {\n\t\treturn ((activeAccount == null) ? ((adHocAccount == null) ? false : adHocAccount.useHttp) : activeAccount.useHttp);\n\t}", "public interface WebConstants {\n\n String REQUEST_ATTR_ORIGIN_IP = \"ORIGIN_IP\";\n\n String USER_LOGIN_STATUS = \"USER_LOGIN_STATUS\";\n}", "@java.lang.Override\n public boolean hasUserAgentBuildVersion() {\n return userAgentVersionTypeCase_ == 8;\n }", "boolean hasUserAppId();", "boolean hasUserAppId();", "public interface HuobiConsts {\n String API_HOST_PRO = \"api.huobi.pro\";\n String API_HOST_HADAX = \"api.hadax.com\";\n\n String USER_AGENT = \"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36\";\n\n String ENDPOINT_SECURITY_TYPE_APIKEY = \"AccessKeyId\";\n String ENDPOINT_SECURITY_TYPE_APIKEY_HEADER = ENDPOINT_SECURITY_TYPE_APIKEY + \":#\";\n\n String ENDPOINT_SECURITY_TYPE_SIGNED = \"Signature\";\n String ENDPOINT_SECURITY_TYPE_SIGNED_HEADER = ENDPOINT_SECURITY_TYPE_SIGNED + \":#\";\n\n String SIGNATURE_METHOD = \"HmacSHA256\";\n String SIGNATURE_VERSION = \"2\";\n\n DateTimeFormatter DT_FORMAT = DateTimeFormatter.ofPattern(\"uuuu-MM-dd'T'HH:mm:ss\");\n ZoneId ZONE_GMT = ZoneId.of(\"Z\");\n\n\n interface WsCode {\n int manualClose = 4999;\n int autoReconnect = 4998;\n int pingExpired = 1003;\n }\n\n\n}", "public Boolean getIsProVersion() {\n return this.IsProVersion;\n }", "public static boolean vu0IsRunning() { return false; }", "@java.lang.Override\n public boolean hasUserAgentBuildVersion() {\n return userAgentVersionTypeCase_ == 8;\n }", "public interface WebConstants {\n String SESSION_USER = \"user\";\n}", "@Property(name = \"staging:ssl\")\n public abstract boolean isSsl();", "public void v_Verify_Guest2_Hidden(){\n\t}", "public final void setIsVoipAudioMode(java.lang.String r1, boolean r2) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.telecom.ConnectionServiceAdapterServant.2.setIsVoipAudioMode(java.lang.String, boolean):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telecom.ConnectionServiceAdapterServant.2.setIsVoipAudioMode(java.lang.String, boolean):void\");\n }", "public void setTwentyOne() {\r\n gotTwentyOne = true;\r\n\t}", "public PrivacySettingsWeb() {\n\t}", "public final void mo18789b() {\n throw new RuntimeException(\"Embedded Security Key option is not available for U2F request!\");\n }", "public String mo33121a() {\n return \"secure\";\n }", "public boolean _paymentpage_overrideurl(String _url) throws Exception{\n__c.LogImpl(\"21114113\",_url,0);\n //BA.debugLineNum = 172;BA.debugLine=\"If Url.Contains(\\\"api.com\\\") Then\";\nif (_url.contains(\"api.com\")) { \n };\n //BA.debugLineNum = 175;BA.debugLine=\"Return True\";\nif (true) return __c.True;\n //BA.debugLineNum = 176;BA.debugLine=\"End Sub\";\nreturn false;\n}", "public final boolean mo50006a(C18846s sVar) {\n String scheme = sVar.f50794d.getScheme();\n if (WebKitApi.SCHEME_HTTP.equals(scheme) || WebKitApi.SCHEME_HTTPS.equals(scheme)) {\n return true;\n }\n return false;\n }", "@Override\n\tpublic boolean needSecurityCheck() {\n\t\treturn false;\n\t}", "public String getAPISetting(){\n if(!apiSetting.equals(\"true\")){\n apiSetting = \"false\";\n }\n return apiSetting;\n }", "public boolean requiresOnline()\n {\n return onlineRequired;\n }", "boolean hasThirdPartyAppAnalyticsLink();", "private boolean getStandalone( HttpServletRequest request )\r\n {\r\n String strStandalone = request.getParameter( PARAMETER_STANDALONE );\r\n if ( strStandalone != null && ( strStandalone.equalsIgnoreCase( \"true\" ) || strStandalone.equalsIgnoreCase( \"on\" ) ) )\r\n {\r\n return true;\r\n }\r\n strStandalone = AppPropertiesService.getProperty( PROPERTY_STANDALONE );\r\n if ( strStandalone != null && ( strStandalone.equalsIgnoreCase( \"true\" ) || strStandalone.equalsIgnoreCase( \"on\" ) ) )\r\n {\r\n return true;\r\n }\r\n return false;\r\n }", "public interface WebRequestConstants extends ServerConstant {\n\n String CONSTANT_APP_UPDATE = \"APP_UPDATE\";\n\n String HEADER_KEY_DEVICE_TYPE = \"devicetype\";\n String HEADER_KEY_DEVICE_INFO = \"deviceinfo\";\n String HEADER_KEY_APP_INFO = \"appinfo\";\n String HEADER_KEY_IN_PLAY = \"inplay\";\n String DEVICE_TYPE_ANDROID = \"A\";\n\n String Loginauthcontroller = BASE + \"Loginauthcontroller/\";\n String Apicontroller = BASE + \"Apicontroller/\";\n String Apiusercontroller = BASE + \"Apiusercontroller/\";\n String Apiadmincontroller = BASE + \"Apiadmincontroller/\";\n String Apimobilecontroller = BASE + \"Apimobilecontroller/\";\n String Betentrycntr = BASE + \"Betentrycntr/\";\n String Geteventcntr = BASE + \"Geteventcntr/\";\n String Createdealercontroller = BASE + \"Createdealercontroller/\";\n String Chipscntrl = BASE + \"Chipscntrl/\";\n\n\n String URL_CHECK_APP_VERSION = Apimobilecontroller + \"chkAppVersion\";\n String URL_APK_DOWNLOAD = BASE + \"uploads/apk/%s\";\n\n String URL_LOAD_CAPTCHA = Loginauthcontroller + \"loadCaptcha\";\n int ID_LOAD_CAPTCHA = 1;\n\n String URL_LOGIN = Loginauthcontroller + \"chkLoginMobileUser\";\n int ID_LOGIN = 2;\n\n String URL_LOGIN_CHECK = Loginauthcontroller + \"is_logged_in_check\";\n int ID_LOGIN_CHECK = 3;\n\n String URL_USER_MATCH_LIST = Apiusercontroller + \"getUserFavouriteMatchLst/%s\";\n int ID_USER_MATCH_LIST = 4;\n\n String URL_ODDS_BY_MARKET_IDS = \"http://demo.com/get_odds_by_market_ids.php?market_id=%s\"; // change here http://demo.com/ in your url\n int ID_ODDS_BY_MARKET_IDS = 5;\n\n\n String URL_MARKET_LISTING = Apicontroller + \"getMarketListing/%s\";//matchid\n int ID_MARKET_LISTING = 6;\n\n String URL_CHANGE_PASSWORD = Createdealercontroller + \"changePassword\";\n int ID_CHANGE_PASSWORD = 7;\n\n String URL_MARKET_WIN_LOSS = Apicontroller + \"market_win_loss\";\n int ID_MARKET_WIN_LOSS = 8;\n\n String URL_GET_MATCH_BETFAIR_SESSION = \"http://demo.com/get_match_betfair_session.php?market_id=%s\"; // change here http://demo.com/ in your url\n int ID_MATCH_BETFAIR_SESSION = 9;\n\n String URL_GET_MATCH_INDIAN_SESSION = Apicontroller + \"matchLstIndianSession/%s/%s\"; //matchId marketId\n int ID_MATCH_INDIAN_SESSION = 10;\n\n String URL_GET_MATCH_ADMIN_SESSION = Apicontroller + \"matchLstAdminSession/%s/%s\"; //matchId marketId\n int ID_MATCH_ADMIN_SESSION = 11;\n\n String URL_DISPLAY_MSG_HEADER = Betentrycntr + \"DisplayMsgOnHeader\";\n int ID_DISPLAY_MSG_HEADER = 12;\n\n String URL_BALANCE = Chipscntrl + \"getChipDataById/%s\";// userId\n int ID_BALANCE = 13;\n\n String URL_GET_MATCH_SCORE = \"http://demo.com/api/match-center/stats/%s/%s\";// sport_id, match_id // change here http://demo.com/ in your url\n String URL_GET_MATCH_SCORE2 = Geteventcntr + \"GetScoreApi/%s\";// match_id\n int ID_GET_MATCH_SCORE = 14;\n\n String URL_GET_BET_DATA = Betentrycntr + \"GatBetData/%s/%s/%s/%s\";// :match_id\n int ID_GET_BET_DATA = 15;\n\n String URL_PLAY_STORE_APP_VERSION = BASE + \"get_playstore_app_version/%s\";\n\n String URL_ONE_PAGE_REPORT = Apiadmincontroller + \"one_page_report\";\n int ID_ONE_PAGE_REPORT = 16;\n\n String URL_CHIP_LEGER = Betentrycntr + \"Chip_leger/%s/%s/%s/%s/%s\";//user_id, user_type, type, from_date, to_date\n int ID_CHIP_LEGER = 17;\n\n String URL_PROFIT_LOSS_BY_MATCH = Betentrycntr + \"profitLossByMatchId\";\n String KEY_PROFIT_LOSS_BY_MATCH = \"profitLossByMatchId\";\n int ID_PROFIT_LOSS_BY_MATCH = 18;\n\n String URL_BET_HISTORY_PL = Betentrycntr + \"BetHistoryPL/%s/%s/%s/%s\";//user_id/matchId/page_no/fancyId\n int ID_URL_BET_HISTORY_PL = 19;\n\n String URL_GET_SERIES_LIST = Geteventcntr + \"getSeriesLst/%s\";// match type\n int ID_GET_SERIES_LIST = 20;\n\n String URL_MATCH_BY_SPORT_ID = Geteventcntr + \"getInPlayMatchBySportId/%s/%s\";// sport_id/user_id\n int ID_MATCH_BY_SPORT_ID = 21;\n\n String URL_GET_STAKE_SETTING = Apiusercontroller + \"get_stake_setting\";\n int ID_GET_STAKE_SETTING = 22;\n\n String URL_ONE_CLICK_STAKE_SETTING = Apiusercontroller + \"one_click_stake_setting\";\n String KEY_ONE_CLICK_STAKE_SETTING = \"one_click_stake_setting\";\n int ID_ONE_CLICK_STAKE_SETTING = 23;\n\n String URL_STAKE_SETTING = Apiusercontroller + \"stake_setting\";\n String KEY_STAKE_SETTING = \"stake_setting\";\n int ID_STAKE_SETTING = 24;\n\n String URL_SERIES_WITH_MATCH_DATA = Geteventcntr + \"getSeriesWithMatchData/%s/%s/%s\";// sport_id/seriesId/user_id\n int ID_SERIES_WITH_MATCH_DATA = 25;\n String KEY_SERIES_WITH_MATCH_DATA = \"getSeriesWithMatchData\";\n\n String URL_SAVE_MULTIPLE_BETS = Apiusercontroller + \"save_multiple_bets\";\n int ID_SAVE_MULTIPLE_BETS = 26;\n\n String URL_MATCH_AUTOCOMPLETE = Apiusercontroller + \"match_autocomplete\";\n int ID_MATCH_AUTOCOMPLETE = 27;\n\n String URL_FAVOURITE_MATCH = Apiusercontroller + \"getFavouriteMatchLst/%s\";\n int ID_FAVOURITE_MATCH = 28;\n\n String URL_FAVOURITE = Apiusercontroller + \"favourite\";\n String KEY_MATCHDETAIL = \"match_detail\";\n String KEY_FAVOURITE = \"favourite\";\n int ID_FAVOURITE = 29;\n\n String URL_UNFAVOURITE = Apiusercontroller + \"unfavourite\";\n String KEY_UNFAVOURITE = \"unfavourite\";\n int ID_UNFAVOURITE = 30;\n\n String URL_CONFIRM_BET = Apiusercontroller + \"confirm_bet\";\n int ID_CONFIRM_BET = 31;\n\n String URL_DELETE_BETTING = Betentrycntr + \"deleteGetbetting/%s/%s\";//MstCode, UserId\n String KEY_DELETE = \"delete\";\n int ID_DELETE_BETTING = 32;\n\n String URL_GET_SELECTION_NAME = \"http://demo.com/get_selectionname_by_market_ids.php?market_sel_id=%s\";//marketid-selectionid,marketid-selectionid // change here http://demo.com/ in your url\n int ID_GET_SELECTION_NAME = 33;\n\n\n String TV1 = BASE+\"tvnew/tv1.html\";;\n String TV2 = BASE+\"tvnew/tv2.html\";\n\n}", "private void m1182e(boolean z) {\n this.f1445d.mo55878c();\n m1183f();\n CollectorsInfrastructure.getInstance().setSDKAnalyticsVersion(C3682q4.C3683a.valueOf(z ? \"V2\" : \"V1\"));\n CollectorsInfrastructure.getInstance().setSDKFramework(this.f1451j);\n }", "private static void oneUserExample()\t{\n\t}", "public interface IPSBrandCodeConstants\n{\n public static final int REPOSITORY = 1;\n public static final int SERVER = 2;\n public static final int PUBLISHER = 4;\n public static final int DEVELOPMENT_TOOLS = 8;\n public static final int DATABASE_PUBLISHER = 16;\n public static final int BEA_ACCELERATOR = 32;\n public static final int MULTI_SERVER_MANANGER = 64;\n public static final int CONTENT_CONNECTOR = 128;\n public static final int WORD = 256;\n public static final int INLINE_EDITING = 512;\n public static final int SPRINTA = 1024;\n public static final int APPLICATION_SERVER = 2048;\n public static final int WEB_SERVICES_LISTENER = 4096;\n public static final int DOCUMENT_ASSEMBLER = 8192;\n public static final int WEBSPHERE_ACCELERATOR = 16384;\n public static final int CONVERA_SEARCH = 32768;\n public static final int EKTRON_WEP_XML = 65536;\n public static final int EKTRON_WEBIMAGEFX = 131072;\n\n \n /**\n * Represents types of servers for which codes can be generated.\n */\n public enum ServerTypes\n {\n /**\n * Development server\n */\n DEVELOPMENT(0, \"Development\"),\n \n /**\n * Production server\n */\n PRODUCTION(1, \"Production\"),\n \n /**\n * Test server\n */\n TEST(2, \"Test\"),\n \n /**\n * Failover server\n */\n FAIL0VER(3, \"Fail Over\"),\n \n /**\n * Disaster Recovery server\n */\n DISATER_RECOVERY(4, \"Disaster Recovery\"),\n \n /**\n * Publishing Hub\n */\n PUBLISHING_HUB(5, \"Publishing Hub\");\n \n /**\n * Constructor\n * \n * @param value The integer representation of this type. \n * \n * @param displayName The display name, assumed not <code>null</code> or \n * empty.\n */\n private ServerTypes(int value, String displayName)\n {\n mi_value = value;\n mi_name = displayName;\n }\n \n /**\n * Get the integer value of this server type\n * \n * @return The value\n */\n public int getValue()\n {\n return mi_value;\n }\n \n /**\n * Returns the display name of this type\n * \n * @return The name, never <code>null</code> or empty.\n */\n @Override\n public String toString()\n {\n return mi_name;\n }\n \n /**\n * Determine if this type is an extended server type. These are types\n * that are not available for codes that don't support extended product\n * info.\n * \n * @return <code>true</code> if it is extended, <code>false</code>\n * otherwise.\n */\n public boolean isExtendedServerType()\n {\n return mi_value > PRODUCTION.mi_value;\n }\n \n /**\n * Lookup enum value by ordinal. Ordinals should be unique. If they are\n * not unique, then the first enum value with a matching ordinal is\n * returned.\n * \n * @param s The enum value\n * \n * @return an enumerated value, never <code>null</code>.\n * \n * @throws IllegalArgumentException if the value does not match\n */\n public static ServerTypes valueOf(int s) throws IllegalArgumentException\n {\n ServerTypes types[] = values();\n for (int i = 0; i < types.length; i++)\n {\n if (types[i].getValue() == s)\n return types[i];\n }\n throw new IllegalArgumentException(\"No match for value: \" + s);\n } \n \n /**\n * Gets list of server types sorted on display name ascending \n * case-insensitive.\n * \n * @return The list, never <code>null</code> or empty.\n */\n public static List<ServerTypes> getSortedValues()\n {\n List<ServerTypes> sortedTypes = new ArrayList<ServerTypes>();\n for (ServerTypes serverTypes : values())\n sortedTypes.add(serverTypes);\n \n Collections.sort(sortedTypes, new Comparator<ServerTypes>() {\n\n public int compare(ServerTypes t1, ServerTypes t2)\n {\n return t1.mi_name.toLowerCase().compareTo(\n t2.mi_name.toLowerCase());\n }});\n \n return sortedTypes;\n }\n \n\n /**\n * The value supplied during construction, immutable.\n */\n private int mi_value;\n \n /**\n * The display name supplied during construction, immutable.\n */\n private String mi_name;\n }\n \n \n /**\n * Represents types of evals for which codes can be generated.\n */\n public enum EvalTypes\n {\n /**\n * Development server\n */\n NOT_EVAL(0, \"Non-Eval\"),\n \n /**\n * Production server\n */\n M30_DAY(1, \"30 Day Eval\"),\n \n /**\n * Test server\n */\n M60_DAY(2, \"60 Day Eval\"),\n \n /**\n * Failover server\n */\n M90_DAY(3, \"90 Day Eval\"),\n \n /**\n * Disaster Recovery server\n */\n TERM(4, \"Term License\");\n\n \n /**\n * Constructor\n * \n * @param value The integer representation of this type. \n * \n * @param displayName The display name, assumed not <code>null</code> or \n * empty.\n */\n private EvalTypes(int value, String displayName)\n {\n mi_value = value;\n mi_name = displayName;\n }\n \n /**\n * Get the integer value of this eval type\n * \n * @return The value\n */\n public int getValue()\n {\n return mi_value;\n }\n \n /**\n * Returns the display name of this type\n * \n * @return The name, never <code>null</code> or empty.\n */\n @Override\n public String toString()\n {\n return mi_name;\n }\n \n /**\n * Determine if this type is an extended server type. These are types\n * that are not available for codes that don't support extended product\n * info.\n * \n * @return <code>true</code> if it is extended, <code>false</code>\n * otherwise.\n */\n public boolean isExtendedEvalType()\n {\n return mi_value > M90_DAY.mi_value;\n }\n \n /**\n * Lookup enum value by ordinal. Ordinals should be unique. If they are\n * not unique, then the first enum value with a matching ordinal is\n * returned.\n * \n * @param s The enum value\n * \n * @return an enumerated value, never <code>null</code>.\n * \n * @throws IllegalArgumentException if the value does not match\n */\n public static EvalTypes valueOf(int s) throws IllegalArgumentException\n {\n EvalTypes types[] = values();\n for (int i = 0; i < types.length; i++)\n {\n if (types[i].getValue() == s)\n return types[i];\n }\n throw new IllegalArgumentException(\"No match for value: \" + s);\n } \n \n /**\n * The value supplied during construction, immutable.\n */\n private int mi_value;\n \n /**\n * The display name supplied during construction, immutable.\n */\n private String mi_name;\n } \n}", "private static Boolean pmaIsLite(String... varargs) {\n\t\t// setting the default value when argument's value is omitted\n\t\tString pmaCoreURL = varargs.length > 0 ? varargs[0] : pmaCoreLiteURL;\n\t\tString url = PMA.join(pmaCoreURL, \"api/json/IsLite\");\n\t\ttry {\n\t\t\tString jsonString = PMA.httpGet(url, \"application/json\");\n\t\t\treturn jsonString.equals(\"true\");\n\t\t} catch (Exception e) {\n\t\t\t// this happens when NO instance of PMA.core is detected\n\t\t\te.printStackTrace();\n\t\t\tif (PMA.logger != null) {\n\t\t\t\tStringWriter sw = new StringWriter();\n\t\t\t\te.printStackTrace(new PrintWriter(sw));\n\t\t\t\tPMA.logger.severe(sw.toString());\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t}", "protected boolean getStravaCheckToken()\n {\n return true;\n }", "public boolean isWebIso() {\n return webIsoFlag;\n }", "protected int getLaunchType() {\n return ILaunchConstants.LAUNCH_TYPE_WEB_CLIENT;\n }", "private static boolean m151985b(C32724ad adVar, Proxy.Type type) {\n return !adVar.mo132325g() && type == Proxy.Type.HTTP;\n }", "public abstract boolean isLiveMode();", "public String getServerVersion();", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Secure browser via Akeyless Web Access Bastion\")\n\n public Boolean getSecureAccessWebBrowsing() {\n return secureAccessWebBrowsing;\n }", "public boolean requiresSecurityPolicy()\n {\n return true;\n }", "public boolean hasEndpoint2() { return true; }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Web-Proxy via Akeyless Web Access Bastion\")\n\n public Boolean getSecureAccessWebProxy() {\n return secureAccessWebProxy;\n }", "@java.lang.Override\n public boolean hasUserAgentVersion() {\n return userAgentVersionTypeCase_ == 7;\n }", "boolean hasLoginapiavgrtt();", "public String getRequiredVersion() {\n/* 152 */ return this.jspversion;\n/* */ }", "boolean hasWeixinLogin();", "public static boolean getFb() {\n return fb;\n }", "private void m81848e(WindowConfig iVar) {\n boolean z;\n boolean z2;\n boolean z3;\n WebViewFragment2 u;\n if (iVar.mo81404a()) {\n this.f58073e = iVar.f58090f;\n if (this.f58069a.getHasSystemBar()) {\n this.f58069a.setSystemBarTitle(this.f58073e);\n }\n }\n boolean z4 = false;\n if (iVar.mo81412e()) {\n if (iVar.mo81421j()) {\n z = !m81840a(iVar.f58087c, this.f58080l);\n this.f58080l = iVar.f58087c;\n if (z) {\n m81846c(false);\n }\n if (iVar.mo81416g()) {\n if (iVar.mo81422k()) {\n boolean equals = C6969H.m41409d(\"G7A86D408BC38\").equals(iVar.f58088d);\n z2 = equals != this.f58075g;\n this.f58075g = equals;\n if (iVar.mo81414f()) {\n if (iVar.mo81423l()) {\n z3 = !m81840a(iVar.f58089e, this.f58076h);\n this.f58076h = iVar.f58089e;\n if (iVar.mo81418h()) {\n z4 = !m81840a(iVar.f58094j, this.f58081m);\n this.f58081m = iVar.f58094j;\n }\n u = m81857u();\n if (u == null) {\n u.mo81332a(z, z2, z3, z4);\n return;\n }\n return;\n }\n iVar.mo81402a(C6969H.m41409d(\"G6782C328B637A33D\"));\n }\n z3 = false;\n if (iVar.mo81418h()) {\n }\n u = m81857u();\n if (u == null) {\n }\n } else {\n iVar.mo81402a(C6969H.m41409d(\"G6782C337B634\"));\n }\n }\n z2 = false;\n if (iVar.mo81414f()) {\n }\n z3 = false;\n if (iVar.mo81418h()) {\n }\n u = m81857u();\n if (u == null) {\n }\n } else {\n iVar.mo81402a(C6969H.m41409d(\"G6782C336BA36BF\"));\n }\n }\n z = false;\n if (iVar.mo81416g()) {\n }\n z2 = false;\n if (iVar.mo81414f()) {\n }\n z3 = false;\n if (iVar.mo81418h()) {\n }\n u = m81857u();\n if (u == null) {\n }\n }", "public static final boolean isUserLoad() {\n return SystemProperties.get(BUILD_TYPE).equals(BUILD_TYPE_USER);\n }", "public Boolean multipleStepWebTest() {\n return this.multipleStepWebTest;\n }", "public void setForua(boolean newValue);", "private boolean m81322a(boolean z, String str, String str2) {\n AppMethodBeat.m2504i(131592);\n if (z || this.iae) {\n AppMethodBeat.m2505o(131592);\n return true;\n } else if (C1443d.m3067fP(18)) {\n AppMethodBeat.m2505o(131592);\n return true;\n } else {\n C4990ab.m7411d(\"MicroMsg.AppBrandVideoWrapper\", \"checkUseSystemPlayer abtestFlag[%d]\", Integer.valueOf(C4996ah.getContext().getSharedPreferences(\"system_config_prefs\", C1448h.m3078Mu()).getInt(\"appbrand_video_player\", -1)));\n if (C4996ah.getContext().getSharedPreferences(\"system_config_prefs\", C1448h.m3078Mu()).getInt(\"appbrand_video_player\", -1) <= 0) {\n C4990ab.m7416i(\"MicroMsg.AppBrandVideoWrapper\", \"abtest is zero, use system player\");\n AppMethodBeat.m2505o(131592);\n return true;\n } else if (!C5046bo.isNullOrNil(str) && str.contains(\".m3u8\")) {\n C4990ab.m7417i(\"MicroMsg.AppBrandVideoWrapper\", \"%d it is m3u8 file use system player.\", Integer.valueOf(hashCode()));\n mo26918gp(204);\n AppMethodBeat.m2505o(131592);\n return true;\n } else if (C26492r.m42231ud(str2)) {\n C4990ab.m7417i(\"MicroMsg.AppBrandVideoWrapper\", \"%d it is m3u8 file use system player.\", Integer.valueOf(hashCode()));\n mo26918gp(204);\n AppMethodBeat.m2505o(131592);\n return true;\n } else {\n AppMethodBeat.m2505o(131592);\n return false;\n }\n }\n }", "private static final String m2193f() {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"fb\");\n stringBuilder.append(C0560t.m1253e());\n stringBuilder.append(\"://authorize\");\n return stringBuilder.toString();\n }", "public interface Platform {\n String WEB = \"Web\";\n String FB = \"Facebook Messenger\";\n}", "boolean getIsGoogleCn();", "@Deprecated\n public boolean isRequestCorrect(){\n\treturn true;\n }", "public void flashlightSwitch()\n {\n usingFlashlight = !usingFlashlight;\n }", "boolean isGaotongPay(String url) {\n if (url.startsWith(\"http://wgtj.gaotongpay.com/\")) {\r\n return true;\r\n }\r\n return false;\r\n }", "public void v_Verify_Guest6_Hidden(){\n\t}", "public void v_Verify_Guest3_Hidden(){\n\t}", "public interface WebContainerConstants\n{\n\n /**\n * Service PID used for configuration.\n */\n static final String PID = \"org.ops4j.pax.web\";\n\n /**\n * Init param name for specifying a context name.\n */\n static final String CONTEXT_NAME = \"webapp.context\";\n\n /**\n * Servlet init param name for specifying a servlet name.\n */\n static final String SERVLET_NAME = \"servlet-name\";\n\n /**\n * Filter init param name for specifying a filter name.\n */\n static final String FILTER_NAME = \"filter-name\";\n\n /**\n * Filter init param name for specifying a filter-mapping dispatch behaviour\n * Must be a comma delimited string of:\n * <ol>\n * <li>request</li>\n * <li>forward</li>\n * <li>include</li>\n * <li>error</li>\n * </ol>\n *\n * values are not case sensitive.\n */\n static final String FILTER_MAPPING_DISPATCHER = \"filter-mapping-dispatcher\".intern();\n\n static final String PROPERTY_HTTP_USE_NIO = \"org.osgi.service.http.useNIO\";\n static final String PROPERTY_HTTP_PORT = \"org.osgi.service.http.port\";\n static final String PROPERTY_HTTP_SECURE_PORT = \"org.osgi.service.http.port.secure\";\n static final String PROPERTY_HTTP_ENABLED = \"org.osgi.service.http.enabled\";\n static final String PROPERTY_HTTP_SECURE_ENABLED = \"org.osgi.service.http.secure.enabled\";\n\n static final String PROPERTY_SSL_KEYSTORE = PID + \".ssl.keystore\";\n static final String PROPERTY_SSL_KEYSTORE_TYPE = PID + \".ssl.keystore.type\";\n static final String PROPERTY_SSL_PASSWORD = PID + \".ssl.password\";\n static final String PROPERTY_SSL_KEYPASSWORD = PID + \".ssl.keypassword\";\n\n static final String PROPERTY_SSL_CLIENT_AUTH_WANTED = PID + \".ssl.clientauthwanted\";\n static final String PROPERTY_SSL_CLIENT_AUTH_NEEDED = PID + \".ssl.clientauthneeded\";\n\n static final String PROPERTY_SESSION_TIMEOUT = PID + \".session.timeout\";\n static final String PROPERTY_SESSION_COOKIE = PID + \".session.cookie\";\n static final String PROPERTY_SESSION_URL = PID + \".session.url\";\n static final String PROPERTY_WORKER_NAME = PID + \".worker.name\";\n\n static final String PROPERTY_TEMP_DIR = \"javax.servlet.context.tempdir\";\n\n static final String PROPERTY_LISTENING_ADDRESSES = PID + \".listening.addresses\";\n\n static final String PROPERTY_LOG_NCSA_ENABLED = \"org.ops4j.pax.web.log.ncsa.enabled\";\n static final String PROPERTY_LOG_NCSA_FORMAT = \"org.ops4j.pax.web.log.ncsa.format\";\n static final String PROPERTY_LOG_NCSA_RETAINDAYS = \"org.ops4j.pax.web.log.ncsa.retaindays\";\n static final String PROPERTY_LOG_NCSA_APPEND = \"org.ops4j.pax.web.log.ncsa.append\";\n static final String PROPERTY_LOG_NCSA_EXTENDED = \"org.ops4j.pax.web.log.ncsa.extended\";\n static final String PROPERTY_LOG_NCSA_LOGTIMEZONE = \"org.ops4j.pax.web.log.ncsa.logtimezone\";\n static final String PROPERTY_LOG_NCSA_LOGDIR = \"org.ops4j.pax.web.log.ncsa.directory\";\n\n /**\n * Servlet context attribute containing the bundle context of the bundle registereing the http context.\n */\n static final String BUNDLE_CONTEXT_ATTRIBUTE = \"osgi-bundlecontext\";\n \n static final String PROPERTY_SERVER_CONFIGURATION_FILE = PID + \".config.file\";\n \n}", "protected boolean isAlwaysExperienceDropper() {\n/* 1849 */ return true;\n/* */ }", "public boolean isbLive() {\n\t\treturn true;\n\t}", "boolean useCamera2();", "boolean getUsePage();", "public static String m21397c(Context context) {\n if (TextUtils.isEmpty(f16892c)) {\n try {\n f16892c = VERSION.SDK_INT >= 17 ? WebSettings.getDefaultUserAgent(context) : m21385a();\n } catch (Throwable unused) {\n f16892c = m21385a();\n }\n }\n return f16892c;\n }", "public void v_Verify_Guest7_Hidden(){\n\t}", "@java.lang.Override\n public boolean hasAppEngineVersion() {\n return stepInfoCase_ == 22;\n }", "boolean mo106365g();", "private boolean shouldUseSimpleUserSwitcher() {\n return Settings.Global.getInt(this.mContext.getContentResolver(), \"lockscreenSimpleUserSwitcher\", this.mContext.getResources().getBoolean(17891459) ? 1 : 0) != 0;\n }", "private void getPreferences() {\n\n if(sharedpreferences.getBoolean(\"usaGPU\", true)) {\n mUtilizzoGPU.setChecked(true);\n }\n else{\n mUtilizzoGPU.setChecked(false);\n }\n\n }", "static public int getGUEST() {\n return 2;\n }", "public static String getWebHost() { return mWebHost; }", "public interface WebAppConstants {\n\n\t\n\tpublic static final String MSG_OK = \"I dati sono stati inseriti correttamente\";\n\tpublic static final String MSG_SI = \"SI\";\n\tpublic static final String MSG_NO = \"NO\";\n\t\n\tpublic static final String Si = \"Si\";\n\tpublic static final String No = \"No\";\n\t\n\tpublic static final String CODICE_ITALIA = \"1\";\n\t\n\t\n\tpublic static final String CAP_UG =\"CAP-UG\";\n\tpublic static final String CAP_EG =\"CAP-EG\";\n\t\n\t\n\tpublic static final String FRAZIONABILE = \"Frazionabile\";\n\tpublic static final String NON_FRAZIONABILE = \"Non frazionabile\";\n\t\n\tpublic static final String PRENOTATO = \"Prenotato\";\n\tpublic static final String PRENOTATO_LIQUIDABILE = \"Prenotato liquidabile\";\n\tpublic static final String NON_PRENOTATO = \"Non Prenotato\";\n\t\n\t//per la scelta del tipo debito siope:\n\tpublic static final String COMMERCIALE_CON_FATTURE = \"Commerciale (con fatture)\";\n\tpublic static final String COMMERCIALE = \"Commerciale\";\n\tpublic static final String NON_COMMERCIALE = \"Non commerciale\";\n\t\n\t//per la scela di quale provvedimento usare nel reintroito di un ordinativo:\n\tpublic static final String SCELTA_PROVVEDIMENTO_UNICO = \"Provvedimento Unico\";\n\tpublic static final String SCELTA_PROVVEDIMENTO_DA_MOVIMENTI = \"Provvedimento da movimenti\";\n\t\n\t//SIAC-5333: duplicate da bilapp\n\tpublic static final String CODICE_CAPITOLO_ENTRATA_GESTIONE = \"CAP-EG\";\n\tpublic static final String CODICE_CAPITOLO_USCITA_GESTIONE = \"CAP-UG\";\n\tpublic static final String TRUE_STRING = \"TRUE\"; \n\tpublic static final String GESTIONE_UEB = \"GESTIONE_UEB\";\n\tpublic static final String TITOLO_1 = \"1\"; \n\tpublic static final String TITOLO_2 = \"2\";\n\tpublic static final String TITOLO_3 = \"3\"; \n\tpublic static final String TITOLO_4 = \"4\"; \n\tpublic static final String TITOLO_5 = \"5\"; \n\tpublic static final String TITOLO_7 = \"7\";\n\tpublic static final String MACROAGGREGATO_1030000 = \"1030000\";\n\tpublic static final String MACROAGGREGATO_1040000 = \"1040000\"; \n\tpublic static final String MACROAGGREGATO_2030000 = \"2030000\";\n\tpublic static final String MACROAGGREGATO_2040000 = \"2040000\"; \n\tpublic static final String MACROAGGREGATO_2050000 = \"2050000\";\n\tpublic static final String MACROAGGREGATO_4010000 = \"4010000\";\n\tpublic static final String MACROAGGREGATO_4020000 = \"4020000\";\n\tpublic static final String MACROAGGREGATO_4030000 = \"4030000\";\n\tpublic static final String MACROAGGREGATO_4040000 = \"4040000\";\n\tpublic static final String MACROAGGREGATO_7020000 = \"7020000\";\n\tpublic static final String MACROAGGREGATO_7010000 = \"7010000\"; \n\tpublic static final String MACROAGGREGATO_1100000 = \"1100000\";\n\t\n\tpublic static final String CONDIZIONI_REGISTRAZIONE_NON_SODDISFATTE = \"Condizioni per la creazione di una registrazione sulla contabilit&agrave; generale non soddisfatte\";\n\t\n\t//costante per table risultati ricerca pre doc:\n\tpublic static final String KEY_LISTA_PRE_DOC_DA_DOCUMENTI = \"LISTA_PRE_DOC_DA_DOCUMENTI\";\n}", "public static void setUseHttp(boolean useHttp) {\n\t\tif (adHocAccount == null)\n\t\t\tadHocAccount = new Account();\n\t\tadHocAccount.useHttp = useHttp;\n\t\t\n\t\t//\tset default HTTP port if not set before\n\t\tif ((adHocAccount.port == -1) && useHttp)\n\t\t\tadHocAccount.port = 80;\n\t}", "public abstract boolean mo2163j();", "public void v_Verify_Guest8_Hidden(){\n\t}", "private boolean tienePermiso(String urlStr){\n return true;\n }", "public static WebSecurity get(int value) {\n\t\tswitch (value) {\n\t\t\tcase PREFER_SECURE_VALUE: return PREFER_SECURE;\n\t\t\tcase ALWAYS_SECURE_VALUE: return ALWAYS_SECURE;\n\t\t\tcase ALWAYS_UNSECURE_VALUE: return ALWAYS_UNSECURE;\n\t\t}\n\t\treturn null;\n\t}" ]
[ "0.74197036", "0.72402245", "0.57291615", "0.5685951", "0.55701023", "0.5427062", "0.5390331", "0.53485477", "0.52722657", "0.5243693", "0.52132434", "0.5166238", "0.51049083", "0.5103322", "0.50971246", "0.50955397", "0.5083663", "0.5081766", "0.5063107", "0.50076437", "0.49899334", "0.49847585", "0.49845606", "0.4979671", "0.49779367", "0.49735454", "0.49728435", "0.49628276", "0.49628276", "0.4948856", "0.49402875", "0.49330574", "0.49167973", "0.4916374", "0.4906024", "0.49050114", "0.49035883", "0.48991156", "0.48941773", "0.48914838", "0.48854503", "0.48849013", "0.48590192", "0.4858159", "0.4842561", "0.4842292", "0.4837342", "0.4831356", "0.4813313", "0.48118588", "0.4808296", "0.480341", "0.48018017", "0.47979844", "0.47949356", "0.47948635", "0.47912428", "0.47799766", "0.47787467", "0.4778313", "0.47756058", "0.4770174", "0.4764404", "0.47598594", "0.47582975", "0.47549117", "0.47516656", "0.4750809", "0.47423685", "0.47366452", "0.4734026", "0.47307974", "0.47231203", "0.47226834", "0.47195145", "0.4710416", "0.47095427", "0.47064397", "0.47012132", "0.4699804", "0.46956787", "0.46951997", "0.46929732", "0.46870247", "0.46810693", "0.46743077", "0.46739075", "0.46724465", "0.467135", "0.46692562", "0.46638423", "0.4660325", "0.46597904", "0.4657159", "0.4657049", "0.4653272", "0.46515635", "0.46514884", "0.46507058", "0.46409136" ]
0.6900422
2
use_web_v2 bool user_web_v2 = 12;
public Builder clearUserWebV2() { userWebV2_ = false; onChanged(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@java.lang.Override\n public boolean getUserWebV2() {\n return userWebV2_;\n }", "@java.lang.Override\n public boolean getUserWebV2() {\n return userWebV2_;\n }", "public Builder setUserWebV2(boolean value) {\n \n userWebV2_ = value;\n onChanged();\n return this;\n }", "public boolean isWebSignupSupported()\n {\n return false;\n }", "public void setWeb(String web) {\n\t\tthis.web = web;\n\t}", "private boolean m11885j() {\n IUser a = ((C3592a) C3596c.m13172a(C3592a.class)).user().mo22165a();\n if (!C9290a.f25466a && a != null && a.isEnableShowCommerceSale()) {\n if (this.f9687p == LiveMode.VIDEO) {\n return true;\n }\n LiveMode liveMode = this.f9687p;\n LiveMode liveMode2 = LiveMode.THIRD_PARTY;\n }\n return false;\n }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Enable Web Secure Remote Access\")\n\n public Boolean getSecureAccessWeb() {\n return secureAccessWeb;\n }", "public boolean mo37b(Context context) {\n try {\n PackageInfo packageInfo = context.getPackageManager().getPackageInfo(\"com.heytap.openid\", 0);\n if (Build.VERSION.SDK_INT >= 28) {\n if (packageInfo == null || packageInfo.getLongVersionCode() < 1) {\n return false;\n }\n return true;\n } else if (packageInfo == null || packageInfo.versionCode < 1) {\n return false;\n } else {\n return true;\n }\n } catch (PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n return false;\n }\n }", "@Override\n public void setWeb(String web) {\n this.web = web;\n }", "public boolean isSupportWebP() {\n return ImageInitBusinss.getInstance() != null && ImageInitBusinss.getInstance().getStrategySupport().isSupportWebP();\n }", "public void setWebIso(boolean flag) {\n this.webIsoFlag = flag;\n }", "boolean isVersion3Allowed();", "public interface MainConst extends NetUrl_Const {\n\t/**\n\t * 当为true时为商业模式,此时异常不抛出,日志不打印。关闭所有开发痕迹。\n\t */\n\tpublic final static boolean DEVS_BUSINESS_MODEL = false;\n\n\t/**\n\t * true时打印日志。<br/>\n\t * false不打印日志。\n\t */\n\tpublic final static boolean DEVS_PRINT_LOG = true;\n\t/**\n\t * true时抛出异常\n\t */\n\tpublic final static boolean DEVS_THROW_ALL_EXCEPTION = true;\n\n\t/**\n\t * app_token\n\t */\n\tpublic final static String APP_APP_TOKEN = \"readyGo1408.app_token@bj-china\";\n\t/**\n\t * MD5加密盐\n\t */\n\tpublic final static String APP_MD5_TOKEN = \"readyGo1408.md5@bj-china\";\n\t/**\n\t * 硬件平台,安卓平台\n\t */\n\tpublic final static String APP_PLATFORM = \"2\";\n}", "public boolean getDevelopment();", "public static boolean setTDAGlasswarePageId( String userId){\n\t\treturn false;\n\t}", "public boolean isWebShowing();", "@Override\n public String getWeb() {\n return web;\n }", "public String getWeb() {\n\t\treturn web;\n\t}", "boolean hasThirdPartyAppAnalytics();", "boolean mo1836b();", "@Updatable\n public Boolean getEnableHttp2() {\n if (enableHttp2 == null) {\n enableHttp2 = false;\n }\n\n return enableHttp2;\n }", "public void webSignup()\n {\n throw new UnsupportedOperationException(\n \"The web sign up is not supproted by the dictionary wizard.\");\n }", "boolean authQop() {\n/* 114 */ return this.serverQop;\n/* */ }", "public void setIsProVersion(Boolean IsProVersion) {\n this.IsProVersion = IsProVersion;\n }", "public static boolean isUsingHttp() {\n\t\treturn ((activeAccount == null) ? ((adHocAccount == null) ? false : adHocAccount.useHttp) : activeAccount.useHttp);\n\t}", "public interface WebConstants {\n\n String REQUEST_ATTR_ORIGIN_IP = \"ORIGIN_IP\";\n\n String USER_LOGIN_STATUS = \"USER_LOGIN_STATUS\";\n}", "@java.lang.Override\n public boolean hasUserAgentBuildVersion() {\n return userAgentVersionTypeCase_ == 8;\n }", "boolean hasUserAppId();", "boolean hasUserAppId();", "public interface HuobiConsts {\n String API_HOST_PRO = \"api.huobi.pro\";\n String API_HOST_HADAX = \"api.hadax.com\";\n\n String USER_AGENT = \"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36\";\n\n String ENDPOINT_SECURITY_TYPE_APIKEY = \"AccessKeyId\";\n String ENDPOINT_SECURITY_TYPE_APIKEY_HEADER = ENDPOINT_SECURITY_TYPE_APIKEY + \":#\";\n\n String ENDPOINT_SECURITY_TYPE_SIGNED = \"Signature\";\n String ENDPOINT_SECURITY_TYPE_SIGNED_HEADER = ENDPOINT_SECURITY_TYPE_SIGNED + \":#\";\n\n String SIGNATURE_METHOD = \"HmacSHA256\";\n String SIGNATURE_VERSION = \"2\";\n\n DateTimeFormatter DT_FORMAT = DateTimeFormatter.ofPattern(\"uuuu-MM-dd'T'HH:mm:ss\");\n ZoneId ZONE_GMT = ZoneId.of(\"Z\");\n\n\n interface WsCode {\n int manualClose = 4999;\n int autoReconnect = 4998;\n int pingExpired = 1003;\n }\n\n\n}", "public Boolean getIsProVersion() {\n return this.IsProVersion;\n }", "public static boolean vu0IsRunning() { return false; }", "@java.lang.Override\n public boolean hasUserAgentBuildVersion() {\n return userAgentVersionTypeCase_ == 8;\n }", "public interface WebConstants {\n String SESSION_USER = \"user\";\n}", "@Property(name = \"staging:ssl\")\n public abstract boolean isSsl();", "public void v_Verify_Guest2_Hidden(){\n\t}", "public final void setIsVoipAudioMode(java.lang.String r1, boolean r2) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.telecom.ConnectionServiceAdapterServant.2.setIsVoipAudioMode(java.lang.String, boolean):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telecom.ConnectionServiceAdapterServant.2.setIsVoipAudioMode(java.lang.String, boolean):void\");\n }", "public void setTwentyOne() {\r\n gotTwentyOne = true;\r\n\t}", "public PrivacySettingsWeb() {\n\t}", "public final void mo18789b() {\n throw new RuntimeException(\"Embedded Security Key option is not available for U2F request!\");\n }", "public String mo33121a() {\n return \"secure\";\n }", "public boolean _paymentpage_overrideurl(String _url) throws Exception{\n__c.LogImpl(\"21114113\",_url,0);\n //BA.debugLineNum = 172;BA.debugLine=\"If Url.Contains(\\\"api.com\\\") Then\";\nif (_url.contains(\"api.com\")) { \n };\n //BA.debugLineNum = 175;BA.debugLine=\"Return True\";\nif (true) return __c.True;\n //BA.debugLineNum = 176;BA.debugLine=\"End Sub\";\nreturn false;\n}", "public final boolean mo50006a(C18846s sVar) {\n String scheme = sVar.f50794d.getScheme();\n if (WebKitApi.SCHEME_HTTP.equals(scheme) || WebKitApi.SCHEME_HTTPS.equals(scheme)) {\n return true;\n }\n return false;\n }", "@Override\n\tpublic boolean needSecurityCheck() {\n\t\treturn false;\n\t}", "public String getAPISetting(){\n if(!apiSetting.equals(\"true\")){\n apiSetting = \"false\";\n }\n return apiSetting;\n }", "public boolean requiresOnline()\n {\n return onlineRequired;\n }", "boolean hasThirdPartyAppAnalyticsLink();", "private boolean getStandalone( HttpServletRequest request )\r\n {\r\n String strStandalone = request.getParameter( PARAMETER_STANDALONE );\r\n if ( strStandalone != null && ( strStandalone.equalsIgnoreCase( \"true\" ) || strStandalone.equalsIgnoreCase( \"on\" ) ) )\r\n {\r\n return true;\r\n }\r\n strStandalone = AppPropertiesService.getProperty( PROPERTY_STANDALONE );\r\n if ( strStandalone != null && ( strStandalone.equalsIgnoreCase( \"true\" ) || strStandalone.equalsIgnoreCase( \"on\" ) ) )\r\n {\r\n return true;\r\n }\r\n return false;\r\n }", "public interface WebRequestConstants extends ServerConstant {\n\n String CONSTANT_APP_UPDATE = \"APP_UPDATE\";\n\n String HEADER_KEY_DEVICE_TYPE = \"devicetype\";\n String HEADER_KEY_DEVICE_INFO = \"deviceinfo\";\n String HEADER_KEY_APP_INFO = \"appinfo\";\n String HEADER_KEY_IN_PLAY = \"inplay\";\n String DEVICE_TYPE_ANDROID = \"A\";\n\n String Loginauthcontroller = BASE + \"Loginauthcontroller/\";\n String Apicontroller = BASE + \"Apicontroller/\";\n String Apiusercontroller = BASE + \"Apiusercontroller/\";\n String Apiadmincontroller = BASE + \"Apiadmincontroller/\";\n String Apimobilecontroller = BASE + \"Apimobilecontroller/\";\n String Betentrycntr = BASE + \"Betentrycntr/\";\n String Geteventcntr = BASE + \"Geteventcntr/\";\n String Createdealercontroller = BASE + \"Createdealercontroller/\";\n String Chipscntrl = BASE + \"Chipscntrl/\";\n\n\n String URL_CHECK_APP_VERSION = Apimobilecontroller + \"chkAppVersion\";\n String URL_APK_DOWNLOAD = BASE + \"uploads/apk/%s\";\n\n String URL_LOAD_CAPTCHA = Loginauthcontroller + \"loadCaptcha\";\n int ID_LOAD_CAPTCHA = 1;\n\n String URL_LOGIN = Loginauthcontroller + \"chkLoginMobileUser\";\n int ID_LOGIN = 2;\n\n String URL_LOGIN_CHECK = Loginauthcontroller + \"is_logged_in_check\";\n int ID_LOGIN_CHECK = 3;\n\n String URL_USER_MATCH_LIST = Apiusercontroller + \"getUserFavouriteMatchLst/%s\";\n int ID_USER_MATCH_LIST = 4;\n\n String URL_ODDS_BY_MARKET_IDS = \"http://demo.com/get_odds_by_market_ids.php?market_id=%s\"; // change here http://demo.com/ in your url\n int ID_ODDS_BY_MARKET_IDS = 5;\n\n\n String URL_MARKET_LISTING = Apicontroller + \"getMarketListing/%s\";//matchid\n int ID_MARKET_LISTING = 6;\n\n String URL_CHANGE_PASSWORD = Createdealercontroller + \"changePassword\";\n int ID_CHANGE_PASSWORD = 7;\n\n String URL_MARKET_WIN_LOSS = Apicontroller + \"market_win_loss\";\n int ID_MARKET_WIN_LOSS = 8;\n\n String URL_GET_MATCH_BETFAIR_SESSION = \"http://demo.com/get_match_betfair_session.php?market_id=%s\"; // change here http://demo.com/ in your url\n int ID_MATCH_BETFAIR_SESSION = 9;\n\n String URL_GET_MATCH_INDIAN_SESSION = Apicontroller + \"matchLstIndianSession/%s/%s\"; //matchId marketId\n int ID_MATCH_INDIAN_SESSION = 10;\n\n String URL_GET_MATCH_ADMIN_SESSION = Apicontroller + \"matchLstAdminSession/%s/%s\"; //matchId marketId\n int ID_MATCH_ADMIN_SESSION = 11;\n\n String URL_DISPLAY_MSG_HEADER = Betentrycntr + \"DisplayMsgOnHeader\";\n int ID_DISPLAY_MSG_HEADER = 12;\n\n String URL_BALANCE = Chipscntrl + \"getChipDataById/%s\";// userId\n int ID_BALANCE = 13;\n\n String URL_GET_MATCH_SCORE = \"http://demo.com/api/match-center/stats/%s/%s\";// sport_id, match_id // change here http://demo.com/ in your url\n String URL_GET_MATCH_SCORE2 = Geteventcntr + \"GetScoreApi/%s\";// match_id\n int ID_GET_MATCH_SCORE = 14;\n\n String URL_GET_BET_DATA = Betentrycntr + \"GatBetData/%s/%s/%s/%s\";// :match_id\n int ID_GET_BET_DATA = 15;\n\n String URL_PLAY_STORE_APP_VERSION = BASE + \"get_playstore_app_version/%s\";\n\n String URL_ONE_PAGE_REPORT = Apiadmincontroller + \"one_page_report\";\n int ID_ONE_PAGE_REPORT = 16;\n\n String URL_CHIP_LEGER = Betentrycntr + \"Chip_leger/%s/%s/%s/%s/%s\";//user_id, user_type, type, from_date, to_date\n int ID_CHIP_LEGER = 17;\n\n String URL_PROFIT_LOSS_BY_MATCH = Betentrycntr + \"profitLossByMatchId\";\n String KEY_PROFIT_LOSS_BY_MATCH = \"profitLossByMatchId\";\n int ID_PROFIT_LOSS_BY_MATCH = 18;\n\n String URL_BET_HISTORY_PL = Betentrycntr + \"BetHistoryPL/%s/%s/%s/%s\";//user_id/matchId/page_no/fancyId\n int ID_URL_BET_HISTORY_PL = 19;\n\n String URL_GET_SERIES_LIST = Geteventcntr + \"getSeriesLst/%s\";// match type\n int ID_GET_SERIES_LIST = 20;\n\n String URL_MATCH_BY_SPORT_ID = Geteventcntr + \"getInPlayMatchBySportId/%s/%s\";// sport_id/user_id\n int ID_MATCH_BY_SPORT_ID = 21;\n\n String URL_GET_STAKE_SETTING = Apiusercontroller + \"get_stake_setting\";\n int ID_GET_STAKE_SETTING = 22;\n\n String URL_ONE_CLICK_STAKE_SETTING = Apiusercontroller + \"one_click_stake_setting\";\n String KEY_ONE_CLICK_STAKE_SETTING = \"one_click_stake_setting\";\n int ID_ONE_CLICK_STAKE_SETTING = 23;\n\n String URL_STAKE_SETTING = Apiusercontroller + \"stake_setting\";\n String KEY_STAKE_SETTING = \"stake_setting\";\n int ID_STAKE_SETTING = 24;\n\n String URL_SERIES_WITH_MATCH_DATA = Geteventcntr + \"getSeriesWithMatchData/%s/%s/%s\";// sport_id/seriesId/user_id\n int ID_SERIES_WITH_MATCH_DATA = 25;\n String KEY_SERIES_WITH_MATCH_DATA = \"getSeriesWithMatchData\";\n\n String URL_SAVE_MULTIPLE_BETS = Apiusercontroller + \"save_multiple_bets\";\n int ID_SAVE_MULTIPLE_BETS = 26;\n\n String URL_MATCH_AUTOCOMPLETE = Apiusercontroller + \"match_autocomplete\";\n int ID_MATCH_AUTOCOMPLETE = 27;\n\n String URL_FAVOURITE_MATCH = Apiusercontroller + \"getFavouriteMatchLst/%s\";\n int ID_FAVOURITE_MATCH = 28;\n\n String URL_FAVOURITE = Apiusercontroller + \"favourite\";\n String KEY_MATCHDETAIL = \"match_detail\";\n String KEY_FAVOURITE = \"favourite\";\n int ID_FAVOURITE = 29;\n\n String URL_UNFAVOURITE = Apiusercontroller + \"unfavourite\";\n String KEY_UNFAVOURITE = \"unfavourite\";\n int ID_UNFAVOURITE = 30;\n\n String URL_CONFIRM_BET = Apiusercontroller + \"confirm_bet\";\n int ID_CONFIRM_BET = 31;\n\n String URL_DELETE_BETTING = Betentrycntr + \"deleteGetbetting/%s/%s\";//MstCode, UserId\n String KEY_DELETE = \"delete\";\n int ID_DELETE_BETTING = 32;\n\n String URL_GET_SELECTION_NAME = \"http://demo.com/get_selectionname_by_market_ids.php?market_sel_id=%s\";//marketid-selectionid,marketid-selectionid // change here http://demo.com/ in your url\n int ID_GET_SELECTION_NAME = 33;\n\n\n String TV1 = BASE+\"tvnew/tv1.html\";;\n String TV2 = BASE+\"tvnew/tv2.html\";\n\n}", "private void m1182e(boolean z) {\n this.f1445d.mo55878c();\n m1183f();\n CollectorsInfrastructure.getInstance().setSDKAnalyticsVersion(C3682q4.C3683a.valueOf(z ? \"V2\" : \"V1\"));\n CollectorsInfrastructure.getInstance().setSDKFramework(this.f1451j);\n }", "private static void oneUserExample()\t{\n\t}", "public interface IPSBrandCodeConstants\n{\n public static final int REPOSITORY = 1;\n public static final int SERVER = 2;\n public static final int PUBLISHER = 4;\n public static final int DEVELOPMENT_TOOLS = 8;\n public static final int DATABASE_PUBLISHER = 16;\n public static final int BEA_ACCELERATOR = 32;\n public static final int MULTI_SERVER_MANANGER = 64;\n public static final int CONTENT_CONNECTOR = 128;\n public static final int WORD = 256;\n public static final int INLINE_EDITING = 512;\n public static final int SPRINTA = 1024;\n public static final int APPLICATION_SERVER = 2048;\n public static final int WEB_SERVICES_LISTENER = 4096;\n public static final int DOCUMENT_ASSEMBLER = 8192;\n public static final int WEBSPHERE_ACCELERATOR = 16384;\n public static final int CONVERA_SEARCH = 32768;\n public static final int EKTRON_WEP_XML = 65536;\n public static final int EKTRON_WEBIMAGEFX = 131072;\n\n \n /**\n * Represents types of servers for which codes can be generated.\n */\n public enum ServerTypes\n {\n /**\n * Development server\n */\n DEVELOPMENT(0, \"Development\"),\n \n /**\n * Production server\n */\n PRODUCTION(1, \"Production\"),\n \n /**\n * Test server\n */\n TEST(2, \"Test\"),\n \n /**\n * Failover server\n */\n FAIL0VER(3, \"Fail Over\"),\n \n /**\n * Disaster Recovery server\n */\n DISATER_RECOVERY(4, \"Disaster Recovery\"),\n \n /**\n * Publishing Hub\n */\n PUBLISHING_HUB(5, \"Publishing Hub\");\n \n /**\n * Constructor\n * \n * @param value The integer representation of this type. \n * \n * @param displayName The display name, assumed not <code>null</code> or \n * empty.\n */\n private ServerTypes(int value, String displayName)\n {\n mi_value = value;\n mi_name = displayName;\n }\n \n /**\n * Get the integer value of this server type\n * \n * @return The value\n */\n public int getValue()\n {\n return mi_value;\n }\n \n /**\n * Returns the display name of this type\n * \n * @return The name, never <code>null</code> or empty.\n */\n @Override\n public String toString()\n {\n return mi_name;\n }\n \n /**\n * Determine if this type is an extended server type. These are types\n * that are not available for codes that don't support extended product\n * info.\n * \n * @return <code>true</code> if it is extended, <code>false</code>\n * otherwise.\n */\n public boolean isExtendedServerType()\n {\n return mi_value > PRODUCTION.mi_value;\n }\n \n /**\n * Lookup enum value by ordinal. Ordinals should be unique. If they are\n * not unique, then the first enum value with a matching ordinal is\n * returned.\n * \n * @param s The enum value\n * \n * @return an enumerated value, never <code>null</code>.\n * \n * @throws IllegalArgumentException if the value does not match\n */\n public static ServerTypes valueOf(int s) throws IllegalArgumentException\n {\n ServerTypes types[] = values();\n for (int i = 0; i < types.length; i++)\n {\n if (types[i].getValue() == s)\n return types[i];\n }\n throw new IllegalArgumentException(\"No match for value: \" + s);\n } \n \n /**\n * Gets list of server types sorted on display name ascending \n * case-insensitive.\n * \n * @return The list, never <code>null</code> or empty.\n */\n public static List<ServerTypes> getSortedValues()\n {\n List<ServerTypes> sortedTypes = new ArrayList<ServerTypes>();\n for (ServerTypes serverTypes : values())\n sortedTypes.add(serverTypes);\n \n Collections.sort(sortedTypes, new Comparator<ServerTypes>() {\n\n public int compare(ServerTypes t1, ServerTypes t2)\n {\n return t1.mi_name.toLowerCase().compareTo(\n t2.mi_name.toLowerCase());\n }});\n \n return sortedTypes;\n }\n \n\n /**\n * The value supplied during construction, immutable.\n */\n private int mi_value;\n \n /**\n * The display name supplied during construction, immutable.\n */\n private String mi_name;\n }\n \n \n /**\n * Represents types of evals for which codes can be generated.\n */\n public enum EvalTypes\n {\n /**\n * Development server\n */\n NOT_EVAL(0, \"Non-Eval\"),\n \n /**\n * Production server\n */\n M30_DAY(1, \"30 Day Eval\"),\n \n /**\n * Test server\n */\n M60_DAY(2, \"60 Day Eval\"),\n \n /**\n * Failover server\n */\n M90_DAY(3, \"90 Day Eval\"),\n \n /**\n * Disaster Recovery server\n */\n TERM(4, \"Term License\");\n\n \n /**\n * Constructor\n * \n * @param value The integer representation of this type. \n * \n * @param displayName The display name, assumed not <code>null</code> or \n * empty.\n */\n private EvalTypes(int value, String displayName)\n {\n mi_value = value;\n mi_name = displayName;\n }\n \n /**\n * Get the integer value of this eval type\n * \n * @return The value\n */\n public int getValue()\n {\n return mi_value;\n }\n \n /**\n * Returns the display name of this type\n * \n * @return The name, never <code>null</code> or empty.\n */\n @Override\n public String toString()\n {\n return mi_name;\n }\n \n /**\n * Determine if this type is an extended server type. These are types\n * that are not available for codes that don't support extended product\n * info.\n * \n * @return <code>true</code> if it is extended, <code>false</code>\n * otherwise.\n */\n public boolean isExtendedEvalType()\n {\n return mi_value > M90_DAY.mi_value;\n }\n \n /**\n * Lookup enum value by ordinal. Ordinals should be unique. If they are\n * not unique, then the first enum value with a matching ordinal is\n * returned.\n * \n * @param s The enum value\n * \n * @return an enumerated value, never <code>null</code>.\n * \n * @throws IllegalArgumentException if the value does not match\n */\n public static EvalTypes valueOf(int s) throws IllegalArgumentException\n {\n EvalTypes types[] = values();\n for (int i = 0; i < types.length; i++)\n {\n if (types[i].getValue() == s)\n return types[i];\n }\n throw new IllegalArgumentException(\"No match for value: \" + s);\n } \n \n /**\n * The value supplied during construction, immutable.\n */\n private int mi_value;\n \n /**\n * The display name supplied during construction, immutable.\n */\n private String mi_name;\n } \n}", "private static Boolean pmaIsLite(String... varargs) {\n\t\t// setting the default value when argument's value is omitted\n\t\tString pmaCoreURL = varargs.length > 0 ? varargs[0] : pmaCoreLiteURL;\n\t\tString url = PMA.join(pmaCoreURL, \"api/json/IsLite\");\n\t\ttry {\n\t\t\tString jsonString = PMA.httpGet(url, \"application/json\");\n\t\t\treturn jsonString.equals(\"true\");\n\t\t} catch (Exception e) {\n\t\t\t// this happens when NO instance of PMA.core is detected\n\t\t\te.printStackTrace();\n\t\t\tif (PMA.logger != null) {\n\t\t\t\tStringWriter sw = new StringWriter();\n\t\t\t\te.printStackTrace(new PrintWriter(sw));\n\t\t\t\tPMA.logger.severe(sw.toString());\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t}", "protected boolean getStravaCheckToken()\n {\n return true;\n }", "public boolean isWebIso() {\n return webIsoFlag;\n }", "protected int getLaunchType() {\n return ILaunchConstants.LAUNCH_TYPE_WEB_CLIENT;\n }", "private static boolean m151985b(C32724ad adVar, Proxy.Type type) {\n return !adVar.mo132325g() && type == Proxy.Type.HTTP;\n }", "public abstract boolean isLiveMode();", "public String getServerVersion();", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Secure browser via Akeyless Web Access Bastion\")\n\n public Boolean getSecureAccessWebBrowsing() {\n return secureAccessWebBrowsing;\n }", "public boolean requiresSecurityPolicy()\n {\n return true;\n }", "public boolean hasEndpoint2() { return true; }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Web-Proxy via Akeyless Web Access Bastion\")\n\n public Boolean getSecureAccessWebProxy() {\n return secureAccessWebProxy;\n }", "@java.lang.Override\n public boolean hasUserAgentVersion() {\n return userAgentVersionTypeCase_ == 7;\n }", "boolean hasLoginapiavgrtt();", "public String getRequiredVersion() {\n/* 152 */ return this.jspversion;\n/* */ }", "boolean hasWeixinLogin();", "public static boolean getFb() {\n return fb;\n }", "private void m81848e(WindowConfig iVar) {\n boolean z;\n boolean z2;\n boolean z3;\n WebViewFragment2 u;\n if (iVar.mo81404a()) {\n this.f58073e = iVar.f58090f;\n if (this.f58069a.getHasSystemBar()) {\n this.f58069a.setSystemBarTitle(this.f58073e);\n }\n }\n boolean z4 = false;\n if (iVar.mo81412e()) {\n if (iVar.mo81421j()) {\n z = !m81840a(iVar.f58087c, this.f58080l);\n this.f58080l = iVar.f58087c;\n if (z) {\n m81846c(false);\n }\n if (iVar.mo81416g()) {\n if (iVar.mo81422k()) {\n boolean equals = C6969H.m41409d(\"G7A86D408BC38\").equals(iVar.f58088d);\n z2 = equals != this.f58075g;\n this.f58075g = equals;\n if (iVar.mo81414f()) {\n if (iVar.mo81423l()) {\n z3 = !m81840a(iVar.f58089e, this.f58076h);\n this.f58076h = iVar.f58089e;\n if (iVar.mo81418h()) {\n z4 = !m81840a(iVar.f58094j, this.f58081m);\n this.f58081m = iVar.f58094j;\n }\n u = m81857u();\n if (u == null) {\n u.mo81332a(z, z2, z3, z4);\n return;\n }\n return;\n }\n iVar.mo81402a(C6969H.m41409d(\"G6782C328B637A33D\"));\n }\n z3 = false;\n if (iVar.mo81418h()) {\n }\n u = m81857u();\n if (u == null) {\n }\n } else {\n iVar.mo81402a(C6969H.m41409d(\"G6782C337B634\"));\n }\n }\n z2 = false;\n if (iVar.mo81414f()) {\n }\n z3 = false;\n if (iVar.mo81418h()) {\n }\n u = m81857u();\n if (u == null) {\n }\n } else {\n iVar.mo81402a(C6969H.m41409d(\"G6782C336BA36BF\"));\n }\n }\n z = false;\n if (iVar.mo81416g()) {\n }\n z2 = false;\n if (iVar.mo81414f()) {\n }\n z3 = false;\n if (iVar.mo81418h()) {\n }\n u = m81857u();\n if (u == null) {\n }\n }", "public static final boolean isUserLoad() {\n return SystemProperties.get(BUILD_TYPE).equals(BUILD_TYPE_USER);\n }", "public Boolean multipleStepWebTest() {\n return this.multipleStepWebTest;\n }", "public void setForua(boolean newValue);", "private boolean m81322a(boolean z, String str, String str2) {\n AppMethodBeat.m2504i(131592);\n if (z || this.iae) {\n AppMethodBeat.m2505o(131592);\n return true;\n } else if (C1443d.m3067fP(18)) {\n AppMethodBeat.m2505o(131592);\n return true;\n } else {\n C4990ab.m7411d(\"MicroMsg.AppBrandVideoWrapper\", \"checkUseSystemPlayer abtestFlag[%d]\", Integer.valueOf(C4996ah.getContext().getSharedPreferences(\"system_config_prefs\", C1448h.m3078Mu()).getInt(\"appbrand_video_player\", -1)));\n if (C4996ah.getContext().getSharedPreferences(\"system_config_prefs\", C1448h.m3078Mu()).getInt(\"appbrand_video_player\", -1) <= 0) {\n C4990ab.m7416i(\"MicroMsg.AppBrandVideoWrapper\", \"abtest is zero, use system player\");\n AppMethodBeat.m2505o(131592);\n return true;\n } else if (!C5046bo.isNullOrNil(str) && str.contains(\".m3u8\")) {\n C4990ab.m7417i(\"MicroMsg.AppBrandVideoWrapper\", \"%d it is m3u8 file use system player.\", Integer.valueOf(hashCode()));\n mo26918gp(204);\n AppMethodBeat.m2505o(131592);\n return true;\n } else if (C26492r.m42231ud(str2)) {\n C4990ab.m7417i(\"MicroMsg.AppBrandVideoWrapper\", \"%d it is m3u8 file use system player.\", Integer.valueOf(hashCode()));\n mo26918gp(204);\n AppMethodBeat.m2505o(131592);\n return true;\n } else {\n AppMethodBeat.m2505o(131592);\n return false;\n }\n }\n }", "private static final String m2193f() {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"fb\");\n stringBuilder.append(C0560t.m1253e());\n stringBuilder.append(\"://authorize\");\n return stringBuilder.toString();\n }", "public interface Platform {\n String WEB = \"Web\";\n String FB = \"Facebook Messenger\";\n}", "boolean getIsGoogleCn();", "@Deprecated\n public boolean isRequestCorrect(){\n\treturn true;\n }", "public void flashlightSwitch()\n {\n usingFlashlight = !usingFlashlight;\n }", "boolean isGaotongPay(String url) {\n if (url.startsWith(\"http://wgtj.gaotongpay.com/\")) {\r\n return true;\r\n }\r\n return false;\r\n }", "public void v_Verify_Guest6_Hidden(){\n\t}", "public void v_Verify_Guest3_Hidden(){\n\t}", "public interface WebContainerConstants\n{\n\n /**\n * Service PID used for configuration.\n */\n static final String PID = \"org.ops4j.pax.web\";\n\n /**\n * Init param name for specifying a context name.\n */\n static final String CONTEXT_NAME = \"webapp.context\";\n\n /**\n * Servlet init param name for specifying a servlet name.\n */\n static final String SERVLET_NAME = \"servlet-name\";\n\n /**\n * Filter init param name for specifying a filter name.\n */\n static final String FILTER_NAME = \"filter-name\";\n\n /**\n * Filter init param name for specifying a filter-mapping dispatch behaviour\n * Must be a comma delimited string of:\n * <ol>\n * <li>request</li>\n * <li>forward</li>\n * <li>include</li>\n * <li>error</li>\n * </ol>\n *\n * values are not case sensitive.\n */\n static final String FILTER_MAPPING_DISPATCHER = \"filter-mapping-dispatcher\".intern();\n\n static final String PROPERTY_HTTP_USE_NIO = \"org.osgi.service.http.useNIO\";\n static final String PROPERTY_HTTP_PORT = \"org.osgi.service.http.port\";\n static final String PROPERTY_HTTP_SECURE_PORT = \"org.osgi.service.http.port.secure\";\n static final String PROPERTY_HTTP_ENABLED = \"org.osgi.service.http.enabled\";\n static final String PROPERTY_HTTP_SECURE_ENABLED = \"org.osgi.service.http.secure.enabled\";\n\n static final String PROPERTY_SSL_KEYSTORE = PID + \".ssl.keystore\";\n static final String PROPERTY_SSL_KEYSTORE_TYPE = PID + \".ssl.keystore.type\";\n static final String PROPERTY_SSL_PASSWORD = PID + \".ssl.password\";\n static final String PROPERTY_SSL_KEYPASSWORD = PID + \".ssl.keypassword\";\n\n static final String PROPERTY_SSL_CLIENT_AUTH_WANTED = PID + \".ssl.clientauthwanted\";\n static final String PROPERTY_SSL_CLIENT_AUTH_NEEDED = PID + \".ssl.clientauthneeded\";\n\n static final String PROPERTY_SESSION_TIMEOUT = PID + \".session.timeout\";\n static final String PROPERTY_SESSION_COOKIE = PID + \".session.cookie\";\n static final String PROPERTY_SESSION_URL = PID + \".session.url\";\n static final String PROPERTY_WORKER_NAME = PID + \".worker.name\";\n\n static final String PROPERTY_TEMP_DIR = \"javax.servlet.context.tempdir\";\n\n static final String PROPERTY_LISTENING_ADDRESSES = PID + \".listening.addresses\";\n\n static final String PROPERTY_LOG_NCSA_ENABLED = \"org.ops4j.pax.web.log.ncsa.enabled\";\n static final String PROPERTY_LOG_NCSA_FORMAT = \"org.ops4j.pax.web.log.ncsa.format\";\n static final String PROPERTY_LOG_NCSA_RETAINDAYS = \"org.ops4j.pax.web.log.ncsa.retaindays\";\n static final String PROPERTY_LOG_NCSA_APPEND = \"org.ops4j.pax.web.log.ncsa.append\";\n static final String PROPERTY_LOG_NCSA_EXTENDED = \"org.ops4j.pax.web.log.ncsa.extended\";\n static final String PROPERTY_LOG_NCSA_LOGTIMEZONE = \"org.ops4j.pax.web.log.ncsa.logtimezone\";\n static final String PROPERTY_LOG_NCSA_LOGDIR = \"org.ops4j.pax.web.log.ncsa.directory\";\n\n /**\n * Servlet context attribute containing the bundle context of the bundle registereing the http context.\n */\n static final String BUNDLE_CONTEXT_ATTRIBUTE = \"osgi-bundlecontext\";\n \n static final String PROPERTY_SERVER_CONFIGURATION_FILE = PID + \".config.file\";\n \n}", "protected boolean isAlwaysExperienceDropper() {\n/* 1849 */ return true;\n/* */ }", "public boolean isbLive() {\n\t\treturn true;\n\t}", "boolean useCamera2();", "boolean getUsePage();", "public static String m21397c(Context context) {\n if (TextUtils.isEmpty(f16892c)) {\n try {\n f16892c = VERSION.SDK_INT >= 17 ? WebSettings.getDefaultUserAgent(context) : m21385a();\n } catch (Throwable unused) {\n f16892c = m21385a();\n }\n }\n return f16892c;\n }", "public void v_Verify_Guest7_Hidden(){\n\t}", "@java.lang.Override\n public boolean hasAppEngineVersion() {\n return stepInfoCase_ == 22;\n }", "boolean mo106365g();", "private boolean shouldUseSimpleUserSwitcher() {\n return Settings.Global.getInt(this.mContext.getContentResolver(), \"lockscreenSimpleUserSwitcher\", this.mContext.getResources().getBoolean(17891459) ? 1 : 0) != 0;\n }", "private void getPreferences() {\n\n if(sharedpreferences.getBoolean(\"usaGPU\", true)) {\n mUtilizzoGPU.setChecked(true);\n }\n else{\n mUtilizzoGPU.setChecked(false);\n }\n\n }", "static public int getGUEST() {\n return 2;\n }", "public static String getWebHost() { return mWebHost; }", "public interface WebAppConstants {\n\n\t\n\tpublic static final String MSG_OK = \"I dati sono stati inseriti correttamente\";\n\tpublic static final String MSG_SI = \"SI\";\n\tpublic static final String MSG_NO = \"NO\";\n\t\n\tpublic static final String Si = \"Si\";\n\tpublic static final String No = \"No\";\n\t\n\tpublic static final String CODICE_ITALIA = \"1\";\n\t\n\t\n\tpublic static final String CAP_UG =\"CAP-UG\";\n\tpublic static final String CAP_EG =\"CAP-EG\";\n\t\n\t\n\tpublic static final String FRAZIONABILE = \"Frazionabile\";\n\tpublic static final String NON_FRAZIONABILE = \"Non frazionabile\";\n\t\n\tpublic static final String PRENOTATO = \"Prenotato\";\n\tpublic static final String PRENOTATO_LIQUIDABILE = \"Prenotato liquidabile\";\n\tpublic static final String NON_PRENOTATO = \"Non Prenotato\";\n\t\n\t//per la scelta del tipo debito siope:\n\tpublic static final String COMMERCIALE_CON_FATTURE = \"Commerciale (con fatture)\";\n\tpublic static final String COMMERCIALE = \"Commerciale\";\n\tpublic static final String NON_COMMERCIALE = \"Non commerciale\";\n\t\n\t//per la scela di quale provvedimento usare nel reintroito di un ordinativo:\n\tpublic static final String SCELTA_PROVVEDIMENTO_UNICO = \"Provvedimento Unico\";\n\tpublic static final String SCELTA_PROVVEDIMENTO_DA_MOVIMENTI = \"Provvedimento da movimenti\";\n\t\n\t//SIAC-5333: duplicate da bilapp\n\tpublic static final String CODICE_CAPITOLO_ENTRATA_GESTIONE = \"CAP-EG\";\n\tpublic static final String CODICE_CAPITOLO_USCITA_GESTIONE = \"CAP-UG\";\n\tpublic static final String TRUE_STRING = \"TRUE\"; \n\tpublic static final String GESTIONE_UEB = \"GESTIONE_UEB\";\n\tpublic static final String TITOLO_1 = \"1\"; \n\tpublic static final String TITOLO_2 = \"2\";\n\tpublic static final String TITOLO_3 = \"3\"; \n\tpublic static final String TITOLO_4 = \"4\"; \n\tpublic static final String TITOLO_5 = \"5\"; \n\tpublic static final String TITOLO_7 = \"7\";\n\tpublic static final String MACROAGGREGATO_1030000 = \"1030000\";\n\tpublic static final String MACROAGGREGATO_1040000 = \"1040000\"; \n\tpublic static final String MACROAGGREGATO_2030000 = \"2030000\";\n\tpublic static final String MACROAGGREGATO_2040000 = \"2040000\"; \n\tpublic static final String MACROAGGREGATO_2050000 = \"2050000\";\n\tpublic static final String MACROAGGREGATO_4010000 = \"4010000\";\n\tpublic static final String MACROAGGREGATO_4020000 = \"4020000\";\n\tpublic static final String MACROAGGREGATO_4030000 = \"4030000\";\n\tpublic static final String MACROAGGREGATO_4040000 = \"4040000\";\n\tpublic static final String MACROAGGREGATO_7020000 = \"7020000\";\n\tpublic static final String MACROAGGREGATO_7010000 = \"7010000\"; \n\tpublic static final String MACROAGGREGATO_1100000 = \"1100000\";\n\t\n\tpublic static final String CONDIZIONI_REGISTRAZIONE_NON_SODDISFATTE = \"Condizioni per la creazione di una registrazione sulla contabilit&agrave; generale non soddisfatte\";\n\t\n\t//costante per table risultati ricerca pre doc:\n\tpublic static final String KEY_LISTA_PRE_DOC_DA_DOCUMENTI = \"LISTA_PRE_DOC_DA_DOCUMENTI\";\n}", "public static void setUseHttp(boolean useHttp) {\n\t\tif (adHocAccount == null)\n\t\t\tadHocAccount = new Account();\n\t\tadHocAccount.useHttp = useHttp;\n\t\t\n\t\t//\tset default HTTP port if not set before\n\t\tif ((adHocAccount.port == -1) && useHttp)\n\t\t\tadHocAccount.port = 80;\n\t}", "public abstract boolean mo2163j();", "public void v_Verify_Guest8_Hidden(){\n\t}", "private boolean tienePermiso(String urlStr){\n return true;\n }", "public static WebSecurity get(int value) {\n\t\tswitch (value) {\n\t\t\tcase PREFER_SECURE_VALUE: return PREFER_SECURE;\n\t\t\tcase ALWAYS_SECURE_VALUE: return ALWAYS_SECURE;\n\t\t\tcase ALWAYS_UNSECURE_VALUE: return ALWAYS_UNSECURE;\n\t\t}\n\t\treturn null;\n\t}" ]
[ "0.74197036", "0.72402245", "0.6900422", "0.57291615", "0.5685951", "0.55701023", "0.5427062", "0.5390331", "0.53485477", "0.52722657", "0.5243693", "0.52132434", "0.5166238", "0.51049083", "0.5103322", "0.50971246", "0.50955397", "0.5083663", "0.5081766", "0.5063107", "0.50076437", "0.49847585", "0.49845606", "0.4979671", "0.49779367", "0.49735454", "0.49728435", "0.49628276", "0.49628276", "0.4948856", "0.49402875", "0.49330574", "0.49167973", "0.4916374", "0.4906024", "0.49050114", "0.49035883", "0.48991156", "0.48941773", "0.48914838", "0.48854503", "0.48849013", "0.48590192", "0.4858159", "0.4842561", "0.4842292", "0.4837342", "0.4831356", "0.4813313", "0.48118588", "0.4808296", "0.480341", "0.48018017", "0.47979844", "0.47949356", "0.47948635", "0.47912428", "0.47799766", "0.47787467", "0.4778313", "0.47756058", "0.4770174", "0.4764404", "0.47598594", "0.47582975", "0.47549117", "0.47516656", "0.4750809", "0.47423685", "0.47366452", "0.4734026", "0.47307974", "0.47231203", "0.47226834", "0.47195145", "0.4710416", "0.47095427", "0.47064397", "0.47012132", "0.4699804", "0.46956787", "0.46951997", "0.46929732", "0.46870247", "0.46810693", "0.46743077", "0.46739075", "0.46724465", "0.467135", "0.46692562", "0.46638423", "0.4660325", "0.46597904", "0.4657159", "0.4657049", "0.4653272", "0.46515635", "0.46514884", "0.46507058", "0.46409136" ]
0.49899334
21
This method creates the velocity using two given values.
public Velocity(double dx, double dy) { this.dx = dx; this.dy = dy; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void calcVelocity()\n\t{}", "public void addVelocity(double var1, double var3, double var5)\n {}", "void addVelocityValue(int velocityValue);", "public static void initVelocity() {\n }", "private void calculateVelocity() {\n\t\tthis.velocity = Math.sqrt((this.roughRange *this.roughRange * this.gravity_Math)\n\t\t\t\t/ ((this.roughRange * Math.sin(2 * angle)) + (2\n\t\t\t\t\t\t* Constant.heroBaseHeight * Math.cos(angle) * Math\n\t\t\t\t\t\t\t.cos(angle))));\n\t\t\n\t}", "public void setVelocity(double x, double y) {\n velocity[X] = x;\n velocity[Y] = y;\n //velocity[Z] = z;\n }", "public void applyVelocityChange(final Vector2f velocityChange);", "private void updateVelocity() {\n\t \t//Update x velocity\n\t \tif (getNode().getTranslateX() > MAX_SPEED_X) {\n\t \t\tsetvX(MAX_SPEED_X);\n\t \t} else if (getNode().getTranslateX() < -MAX_SPEED_X) {\n\t \t\tsetvX(-MAX_SPEED_X);\n\t } else {\n\t \t\tsetvX(getNode().getTranslateX());\n\t \t}\n\n\t \t//Update x velocity\n\t \tif (getNode().getTranslateY() > MAX_SPEED_Y) {\n\t \t\tsetvY(MAX_SPEED_Y);\n\t \t} else if (getNode().getTranslateY() < -MAX_SPEED_Y) {\n\t \t\tsetvY(-MAX_SPEED_Y);\n\t \t} else {\n\t \t\tsetvY(getNode().getTranslateY());\n\t \t}\n\t }", "public void setVelocity(Velocity velocity) {\n this.v = velocity;\n }", "public void setVelocity(Velocity v) {\n this.velocity = v;\n }", "public void setVelocity(Velocity v) {\n this.velocity = v;\n }", "public void setVelocity(Velocity v) {\n this.velocity = v;\n }", "public Velocity(int dx, int dy) {\n this((double) dx, (double) dy);\n }", "public void setVelocity(double x, double y) {\n velocityX = x;\n velocityY = y;\n }", "private void doVels() {\n\t\tthis.launchPerVel = Math.sqrt((2d * body.getGm() * this.launchApoAlt) / (this.launchPerAlt * this.a));\n\t\tthis.launchApoVel = Math.sqrt((2d * body.getGm() * this.launchPerAlt) / (this.launchApoAlt * this.a));\n\t}", "public Velocity(double dx, double dy) {\n this.dx = dx;\n this.dy = dy;\n }", "public Velocity(double dx, double dy) {\n this.dx = dx;\n this.dy = dy;\n }", "@Raw\n protected void setVelocity(double xVelocity, double yVelocity){\n if ( !isValidVelocity(xVelocity, yVelocity)){\n this.velocity.setVelocity(0.0, 0.0);\n }\n else {\n this.velocity.setVelocity(xVelocity, yVelocity);\n }\n }", "@Override\n\tpublic double calculateVelocity() {\n\t\tdouble result = distance / time + velocitySame - velocityReverse;\n\t\treturn result;\n\t}", "public void addVelocity(double x, double y) {\n velocityX += x;\n velocityY += y;\n }", "public void setVelocity(Velocity v) {\r\n this.vel = v;\r\n }", "public Vector2D getVelocity ();", "public void calculateVelocity(Planet3D other) {\n\t\tVec3d temp = new Vec3d(other);\n\t\ttemp.sub(this);\n\t\tSystem.out.println(\"\\n[other]-[this]=[new dir] == [\"+other.x+\",\"+other.y+\",\"+other.z+\"]-[\"+this.x+\",\"+this.y+\",\"+this.z+\"]=[\"+temp.x+\",\"+temp.y+\",\"+temp.z+\"]\");\n\t\tdouble force=forceCalc(other.getMass(), temp.length());\n\t\ttemp.normalize();\n//\t\tSystem.out.println(\", and direction between is this:(\"+temp.x+\",\"+temp.y+\",\"+temp.z+\"),\\nthe other planet has a mass of \"+other.getMass());\n//\t\tSystem.out.println(\"the force added to the vector is:\"+(Math.abs(force)));\n\t\ttemp.mul(force);\t\n\t\tvelocity.sub(temp);\n\t\t\t\n\t}", "public void setVelocity(String value) {\n setVelocity(Format.toDouble(value));\n }", "static float calculateNewVelocity(float a, float deltaTime, float v0) {\n return v0 + (a * deltaTime);\n }", "public void configVelocityControl() {\n leftDrive.configTeleopVelocity();\n rightDrive.configTeleopVelocity();\n }", "public VelocityComponent(Point3D velocity) {\n this.velocity = velocity;\n }", "public Velocity(double dx, double dy) {\n this.dxVelocity = dx;\n this.dyVelocity = dy;\n }", "private static double calculateVelocity(double velocity, double deltaT, double acceleration) {\n return velocity + (deltaT * acceleration);\n }", "void setVelocity(int vel) {\n\t\tthis.velocity = vel;\n\t}", "private void UpdateVelocity()\n\t{\n\t\tVector2 currentPosition = new Vector2(parent.transform.position);\n\t\tVector2 newVelocity = Vector2.Add(currentPosition,previousPosition.negate());\n\t\tpreviousPosition = currentPosition;\n\t\t\n\t\tfloat currentRotation = parent.transform.rotation;\n\t\tangularVelocity = currentRotation - previousRotation;\n\t\tpreviousRotation = currentRotation;\n\t\t\n\t\tvelocity = newVelocity;\n\t}", "public void setVelocityVector(double newDX, double newDY) {\r\n this.dx = newDX;\r\n this.dy = newDY;\r\n }", "public void changeVel(double xV, double yV){ \n this.xVel += xV;\n this.yVel += yV;\n }", "public Vector2f getVelocity(){\n\t\treturn velocity.copy();\n\t}", "public VelocityComponent(double xVector, double yVector, double zVector) {\n velocity = new Point3D(xVector, yVector, zVector);\n }", "public void setVelocity () {\n\t\t\tfb5.getCommunicationModule().setClientHandler(null);\n\t\t\tif(state == BotMove.SHARP_RIGHT){\n\t\t\t\tfb5.setVelocity((byte)200,(byte)0);\n\t\t\t}\n\t\t\telse if(state == BotMove.LEFT){\n\t\t\t\tfb5.setVelocity((byte)100,(byte)200);\n\t\t\t}\n\t\t\telse if(state == BotMove.SOFT_RIGHT){\n\t\t\t\tfb5.setVelocity((byte)200,(byte)100);\n\t\t\t}\n\t\t\telse if(state == BotMove.FORWARD){\n\t\t\t\twt.turning = false;\n\t\t\t\tLog.d(TAG,\"Setting forward velocity\");\n\t\t\t\tfb5.setVelocity((byte)150,(byte)150);\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(state == BotMove.STOP){\n\t\t\t\twt.turning = false;\n\t\t\t\tfb5.setVelocity((byte)0,(byte)0);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfb5.moveForward();\n\t\t\tfb5.accModifiedStart();\n\t\t}", "public void addVelocity(double x, double y) {\n\t\tvelocity.add(x, y);\n\t}", "public void updateVelocity(){\r\n if (getPosition().x <= 0 || getPosition().x >= GameBoard.MAX_X) {\r\n setVelocity(getVelocity().add(getVelocity().mul(reverse)));\r\n }\r\n }", "public void setVelocity(Vector2d velocity) {\n\t\tthis.velocity=velocity;\n\t}", "public void setVelocity(float x, float y)\n\t{\n\t\tthis.vel.x = x;\n\t\tthis.vel.y = y;\n\t}", "List<Velocity> initialBallVelocities();", "public void setVelocity(Velocity velocity) {\r\n this.v.setVelocity(velocity);\r\n }", "public Velocity getVelocity() {\n return this.v;\n\n }", "public void testVelocityNumerically() {\n // crud, I don't know, how much can we expect velocity and finite differences to agree?\n double bound = dt*dt*velocity*velocity; // sure, let's go with that. Keep in mind this changes with sampling rates, velocity, the order of the function, etc.\n double endtime = racetrack.getPerimeter() / racetrack.getVelocity();\n differentiatePosition(racetrack, 0.0, endtime, dt, bound);\n }", "public void setVelocityProperties(Properties velocityProperties)\n\t{\n\t\tsetVelocityPropertiesMap(velocityProperties);\n\t}", "public void setVelocity ( org.bukkit.util.Vector velocity ) {\n\t\texecute ( handle -> handle.setVelocity ( velocity ) );\n\t}", "public void setVelocity(double value) {\n _avTable.set(ATTR_VELOCITY, value);\n }", "public GameObject(int x, int y, int width, int height, int[] velocity){\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n this.velocity= velocity;\n }", "public void setVelocity(float dummyX, float dummyZ){\n\t\t\n\t}", "public void setVerticalVelocity( final float velocity )\r\n {\r\n this.v_velocity = velocity;\r\n }", "public Vector2f (float[] values)\n {\n set(values);\n }", "public void setVelocity(Vector2D velocity)\n\t{\n\t\tthis.velocity = velocity;\n\t}", "private static void updateComponents(PhysicsGameObject obj, Vector3 position, Velocity velocity, Vector3 acceleration,double dt){\n float newX = (float) (position.x +(dt * velocity.Vx) + (dt*acceleration.x * dt / 2));\n float newY = (float) (position.y + (dt * velocity.Vy) + ( dt*acceleration.y * dt / 2));\n\n //v(t+h) = v(t) + h*a\n float newVelX = (float) (velocity.Vx + dt * acceleration.x );\n float newVelY = (float) (velocity.Vy + dt * acceleration.y );\n\n obj.setPositionX(newX);\n obj.setPositionY(newY);\n\n obj.setVelocityComponents(newVelX, newVelY);\n\n\n }", "public void setVelocity(double dx, double dy) {\n this.v = new Velocity(dx, dy);\n }", "public void setVelocity(double x, double y, double z) {\n/* 72 */ this.motionX = x;\n/* 73 */ this.motionY = y;\n/* 74 */ this.motionZ = z;\n/* */ \n/* 76 */ if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) {\n/* */ \n/* 78 */ float var7 = MathHelper.sqrt_double(x * x + z * z);\n/* 79 */ this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(x, z) * 180.0D / Math.PI);\n/* 80 */ this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(y, var7) * 180.0D / Math.PI);\n/* */ } \n/* */ }", "public TrackingParameterVelocityVector(TrackingParameterDistance distance,\n\t\t\tTrackingParameterTime time) {\n\t\tsuper(\"Velocity Vector\", distance.getUnit() + \"/\" + time.getUnit());\n\t\tscaleDistance = distance.getScale();\n\t\tscaleTime = time.getScale();\n\t}", "@Override\n\t@SideOnly(Side.CLIENT)\n\tpublic void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_)\n\t{\n\t\tthis.motionX = p_70016_1_;\n\t\tthis.motionY = p_70016_3_;\n\t\tthis.motionZ = p_70016_5_;\n\n\t\tif ((this.prevRotationPitch == 0.0F) && (this.prevRotationYaw == 0.0F))\n\t\t{\n\t\t\tfloat f = MathHelper.sqrt_double((p_70016_1_ * p_70016_1_) + (p_70016_5_ * p_70016_5_));\n\t\t\tthis.prevRotationYaw = this.rotationYaw = (float) ((Math.atan2(p_70016_1_, p_70016_5_) * 180.0D) / Math.PI);\n\t\t\tthis.prevRotationPitch = this.rotationPitch = (float) ((Math.atan2(p_70016_3_, f) * 180.0D) / Math.PI);\n\t\t}\n\t}", "@Override\n public void receivedVelocity(Twist velocity) {\n synchronized(_velocityListeners) {\n if (_velocityListeners.isEmpty()) return;\n }\n \n try {\n // Construct message\n Response resp = new Response(UdpConstants.NO_TICKET, DUMMY_ADDRESS);\n resp.stream.writeUTF(UdpConstants.COMMAND.CMD_SEND_VELOCITY.str);\n UdpConstants.writeTwist(resp.stream, velocity);\n \n // Send to all listeners\n synchronized(_velocityListeners) {\n _udpServer.bcast(resp, _velocityListeners.keySet());\n }\n } catch (IOException e) {\n throw new RuntimeException(\"Failed to serialize camera\");\n }\n }", "public GameObject setVelocity(Vector vel) {\n\t\tthis.velocity = vel;\n\t\treturn this;\n\t}", "public void update(Vehicle v, float dt) {\nPoint2D.Float p = v.getPosition();\r\nPoint2D.Float tp = target.getPosition();\r\nPoint2D.Float desired_velocity = new Point2D.Float(tp.x - p.x , tp.y - p.y);\r\nVehicle.scale(desired_velocity, v.getMaxSpeed());\r\nv.updateSteering(desired_velocity.x, desired_velocity.y);\r\n}", "public void setVelocity(float horizontalInput, float verticalInput) {\n\t\tbody.setLinearVelocity(speed*horizontalInput , speed*verticalInput );\n\t}", "private Vector3f getOrbitalVelocity(CelestialEntity entity1, CelestialEntity entity2) {\r\n\t\tVector3f p1 = entity1.getPosition();\r\n\t\tVector3f p2 = entity2.getPosition();\r\n\t\tfloat m1 = entity1.getMass();\r\n\t\tfloat m2 = entity2.getMass();\r\n\t\tVector3f r = Vector3f.sub(p2, p1);\r\n\t\t\r\n\t\tVector3f velocity = new Vector3f();\r\n\t\t// Perpendicular vector in the x-z plane\r\n\t\tvelocity.x = -r.z;\r\n\t\tvelocity.z = r.x;\r\n\t\t// Calculate velocity magnitude (speed)\r\n\t\tdouble distance = r.magnitude();\r\n\t\tdouble speed = Math.sqrt(Constants.G * (m1 + m2) / distance);\r\n\t\tvelocity.setMagnitude((float) speed);\r\n\t\t\r\n\t\treturn velocity;\r\n\t}", "public void addVelocity(Vector2d vector) {\n\t\tvelocity.add(vector);\n\t}", "static int getVelocity(){return currentVelocity;}", "public void setVelocity(double dx, double dy) {\n this.velocity = new Velocity(dx, dy);\n }", "public void setVelocity(double dx, double dy) {\n this.velocity = new Velocity(dx, dy);\n }", "public void setVelocity(double velocity) {\n //set the velocity of the motors\n m_masterMotor.set(ControlMode.Velocity, velocity);\n \n //set our slave motors to follow master\n m_closeSlaveMotor.follow(m_masterMotor, FollowerType.PercentOutput);\n m_farSlaveMotor1.follow(m_masterMotor, FollowerType.PercentOutput);\n m_farSlaveMotor2.follow(m_masterMotor, FollowerType.PercentOutput);\n }", "public void updateVelocity (Body[] bodies, int dt) {\n this.updateAcceleration(bodies);\n this.vx += 0.5 * (this.ax + this.axplusone) * dt;\n this.vy += 0.5 * (this.ay + this.ayplusone) * dt;\n }", "public Velocity(double angle, double mag){\n\t\tthis(Math.cos(angle),-Math.sin(angle),mag);\n\t}", "public static void new_speed( Body body, double t ){\r\n body.currentState.vx = body.currentState.vx + body.currentState.ax * t; // new x velocity\r\n body.currentState.vy = body.currentState.vy + body.currentState.ay * t; // new y velocity\r\n body.currentState.vz = body.currentState.vz + body.currentState.az * t; // new z velocity\r\n }", "public Velocity(double xDir, double yDir, double mag){\n\t\tif(xDir > 1 || xDir < -1 || yDir > 1 || yDir < -1){\n\t\t\tthrow new RuntimeException(\"Invalid Velocity Direction, values should be only from 1 to -1\");\n\t\t}\n\t\tthis.xDir = xDir;\n\t\tthis.yDir = yDir;\n\t\tthis.magnitude = mag;\n\t\t//System.out.println(xDir + \" \" + yDir + \" \" + getAngle() + \" \" + mag);\n\t}", "@Override\n public Point3D getValue() {\n return velocity;\n }", "public TwoBody(VectorN r, VectorN v)\n\t{\n\t\trv2Elements(r, v);\n\t}", "public void setVelocity(double dx, double dy) {\r\n this.vel = new Velocity(dx, dy);\r\n }", "public Vector2f (float x, float y)\n {\n set(x, y);\n }", "public static void main(String[] args) {\r\n\r\n ArrayList<Point> points = new ArrayList<>();\r\n for (int i = 0; i<10; i++){\r\n points.add(new Point(Math.random()*i, i));\r\n }\r\n\r\n Spline spline = new BSpline(points);\r\n\r\n VelocitiesAdapter vs = new VelocitiesAdapter(spline, 15, 0.5);\r\n System.out.println(vs.getNumPoints());\r\n\r\n // Print velocities:\r\n for (int i : vs.iterate()){\r\n double[] ves = vs.velocity(i, 50);\r\n System.out.println(\"Right speed: \" + ves[0]);\r\n System.out.println(\"Left speed: \" + ves[1] + \"\\n\");\r\n }\r\n\r\n }", "public TwoBody(double mu, VectorN r, VectorN v)\n\t{\n\t\tthis.mu = mu;\n\t\trv2Elements(r, v);\n\t}", "static void resetVelocity(){currentVelocity = INITIAL_SPEED;}", "public void setV(double vx, double vy, double vz){\n vel[0] = vx;\n vel[0] = vy;\n vel[0] = vz;\n }", "protected void createBody(int x, int y, Vector v){\n \tint a[] = {x - 1 , x + 1 , x , x};\n \tint b[] = {y , y , y - 1 , y + 1};\n\n int curState = getPoint(x, y).getState();\n\t\tif (v != null) v.addElement(new Point(x, y));\n\n\t\tgetPoint(x, y).setSigned(true);\n\n \tfor (int i = 0 ; i < 4 ; i++){\n if (!validatePoint(a[i], b[i]))\n continue;\n else {\n\t \t\t\tint xx = a[i];\n\t \t\tint yy = b[i];\n\t \t\tif (getPoint(xx, yy).isSigned()) continue;\n \t\t\tif (getPoint(xx, yy).getState() == curState){\n \t\t\tcreateBody(xx, yy, v);\n \t\t}\n \t\t}\n\t\t} // end for\n\t}", "static Vec vector(PointDouble a, PointDouble b) {\n return new Vec(b.x - a.x, b.y - a.y);\n }", "public void setVelocity(Vector2f n)\n\t{\n\t\tsetVelocity(n.x, n.y);\n\t}", "public Vector2D getVelocity()\n\t{\n\t\treturn velocity;\n\t}", "public Velocity getVelocity() {\n return this.velocity;\n }", "public Vector2() {\n\t\tthis(0.0f, 0.0f);\n\t}", "double V2Dot(Position a, Position b){\r\n\t\treturn((a.getX() * b.getX())+(a.getY() * b.getY()));\r\n\t}", "public double getVelocity() {\n return mV;\n }", "@Model\r\n\tpublic Vector(double xComp, double yComp) {\r\n\t\t\r\n\t\t\tthis.xComp = xComp;\r\n\t\t\r\n\t\r\n\t\t\tthis.yComp = yComp;\r\n\r\n\t}", "@Override\n public void setValue(Point3D value) {\n this.velocity = value;\n }", "public void setVelocity(double x, double y) {\n getMotion().setVelocity(x, y);\n }", "@Basic @Raw\n public double[] getVelocity(){\n \t return this.velocity.getVelocity();\n }", "public ObjetoJuegoMovimiento(int xPosition, int yPosition, int xVelocity, int yVelocity, Color color)\r\n {\r\n super(xPosition, yPosition, color);\r\n this.xVel = xVelocity;\r\n this.yVel = yVelocity;\r\n \r\n }", "private void setInitialBallVelocity() {\n\t\tvx = rgen.nextDouble(1.0, 3.0);\n\t\tif (rgen.nextBoolean(0.5)) vx = -vx;\n\t\t\n\t\tvy = 3;\n\t}", "double getVy() { return vel[1]; }", "public void setLinearVelocity (Vector2 v) {\n\t\ttmp.set(v.x, v.y);\n\t\tbody.setLinearVelocity(tmp);\n\t}", "private Vector2D rightVelocity() {\n return new Vector2D(this.movementSpeed * this.differenceTime, 0);\n }", "public Particle(double xstart, double ystart, double velx, double vely, Compound c) {\r\n\t\tpos = new Vector(xstart, ystart);\r\n\t\tvel = new Vector(velx, vely);\r\n\t\tcompound = c;\r\n\t\tactivated = false;\r\n\t}", "public void setVelocity(double dx, double dy) {\n this.velocity.setDx(dx);\n this.velocity.setDy(dy);\n }", "public void applyAngularVelocityChange(final float velocityChange);" ]
[ "0.6764221", "0.66798747", "0.64465785", "0.64170015", "0.63181245", "0.62923926", "0.62038153", "0.6180991", "0.6156389", "0.6148896", "0.6148896", "0.6148896", "0.60644346", "0.60337335", "0.60102445", "0.59849524", "0.59849524", "0.5982526", "0.596721", "0.5954076", "0.5932682", "0.5888614", "0.5874687", "0.5854288", "0.583766", "0.58334386", "0.58329725", "0.58215445", "0.58091426", "0.5793628", "0.5793519", "0.57926244", "0.5785485", "0.57771665", "0.5751924", "0.57395136", "0.5735589", "0.5719623", "0.56986594", "0.5697043", "0.5690339", "0.5653448", "0.56487006", "0.56470406", "0.56460917", "0.5644868", "0.564071", "0.5634422", "0.56324446", "0.5630652", "0.5622697", "0.56022185", "0.5601686", "0.5578523", "0.5573814", "0.5572057", "0.55605274", "0.55532867", "0.55469567", "0.5537706", "0.55376697", "0.5535667", "0.54863423", "0.54840237", "0.5471222", "0.5471222", "0.5466761", "0.5458813", "0.5447673", "0.54474115", "0.54472196", "0.54348713", "0.54330283", "0.54297185", "0.5418972", "0.54174745", "0.53787357", "0.536921", "0.53659105", "0.53629434", "0.5361618", "0.5353257", "0.5347854", "0.53414994", "0.5337203", "0.5334528", "0.5331813", "0.53277296", "0.5316553", "0.5308785", "0.529817", "0.5276754", "0.5272968", "0.5272465", "0.52718145", "0.52695024", "0.52685124", "0.526717", "0.5266289" ]
0.60475373
14
This method finds the x value of the velocity.
public double getX() { return this.dx; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getVelocityX() {\n\t\treturn velocity.getX();\n\t}", "public int getVelX() {\r\n\t\treturn velX;\r\n\t}", "public int getXVelocity()\r\n {\r\n return xVel;\r\n }", "@Basic\n\tpublic double getXVelocity(){\n\t\treturn this.xVelocity;\n\t}", "double getVx() { return vel[0]; }", "public double getX() {\n\t\tif (v == 0) {\n\t\t\treturn 0.0;\n\t\t} else {\n\t\t\treturn x;\n\t\t}\n\t}", "public double getXVel() {\n return this.xVel;\n }", "double getPositionX();", "double getPositionX();", "double getPositionX();", "public float getX() {\n return pos.x;\n }", "public double getX() {\n return collider.getX();\n }", "@Basic\n\tpublic double getVx() {\n\t\treturn this.vx;\n\t}", "public double getX() {\n return position.getX();\n }", "public int getVx() { return vx; }", "public float getXComponent() {\n return this.vx;\n }", "double getXPosition();", "public float getPositionX() {return this.position.getX();}", "public float getX() {\n return x;\n }", "public float getX() {\n return x;\n }", "public float getX() {\n return x;\n }", "public float getX() {\r\n return x;\r\n }", "public double getXPos(){\n return xPos;\n }", "public float getX() {\n return x_;\n }", "public double getXPos() {\n\t\treturn this.position[0];\n\t}", "public double getStartX() {\n\treturn v1.getX();\n }", "public int getX() {\n return pos_x;\n }", "public SVGLength getX() {\n return x;\n }", "public double getX() {\n return x;\r\n }", "public float getX() {\n return this.x;\n }", "double getX() { return pos[0]; }", "public double getX() {\n\t\t\t\treturn x;\n\t\t\t}", "public double getXPosition()\n\t{\n\t\treturn xPosition;\n\t}", "public float getX() {\r\n\t\treturn x;\r\n\t}", "public double getX() {\n\t\t\treturn x;\n\t\t}", "public Float getX() {\n\t\treturn x;\n\t}", "private double getPosX() {\n\t\treturn this.posX.get();\n\t}", "public double getX(){\n\t\treturn x;\n\t}", "public float getX() {\n return this.x;\n }", "public int getPos_x(){\n\t\treturn pos_x;\n\t}", "public double getX() {\r\n return x;\r\n }", "@java.lang.Override\n public float getX() {\n return x_;\n }", "public float getxPosition() {\n return xPosition;\n }", "public double getX() {\n return x;\n }", "public double getX() {\n return x;\n }", "public double getX() {\n return x;\n }", "public double getX() {\n return x;\n }", "public double getX() {\n return x;\n }", "public double getX() {\n return x;\n }", "public double getX() {\n return x;\n }", "public float getX() {\n return x_;\n }", "public Float getX() {\n return _x;\n }", "public double getX() {\n\t\treturn x;\n\t}", "public double getX() {\n\t\treturn x;\n\t}", "public double getX() {\n\t\treturn x;\n\t}", "public double getX() {\n\t\treturn x;\n\t}", "public double getX() {\n\t\treturn x;\n\t}", "public double getX() {\n\t\treturn x;\n\t}", "public double getX() {\n\t\treturn x;\n\t}", "@java.lang.Override\n public float getX() {\n return x_;\n }", "@java.lang.Override\n public float getX() {\n return x_;\n }", "@java.lang.Override\n public float getX() {\n return x_;\n }", "@java.lang.Override\n public float getX() {\n return x_;\n }", "public int getX(){\n\t\tif(!resetCoordinates()) return 10000;\n\t\treturn Math.round(robot.translation.get(0)/ AvesAblazeHardware.mmPerInch);\n\t}", "public double getX() {\n return this.x;\n }", "public double getX() {\n return this.x;\n }", "public double getX() {\n return this.x;\n }", "public double getX() {\n return this.x;\n }", "public double getX() {\n return x_;\n }", "public final int getX()\n\t{\n\t\treturn pos.x;\n\t}", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\r\n return this.x;\r\n }", "float getX();", "float getX();", "float getX();", "float getX();", "float getX();", "float getX();", "Float getX();", "@java.lang.Override\n public float getX() {\n return x_;\n }", "@java.lang.Override\n public float getX() {\n return x_;\n }", "@java.lang.Override\n public float getX() {\n return x_;\n }", "public double getX()\n\t{\n\t\treturn x;\n\t}", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public double getX() {\n return x_;\n }", "public int getVelocity()\n\t{\n\t\treturn logDx;\n\t}", "public double getPositionX() {\n return positionX_;\n }", "public double getPositionX() {\n return positionX_;\n }", "public double getPositionX() {\n return positionX_;\n }" ]
[ "0.8181994", "0.775522", "0.77296937", "0.7661505", "0.7594851", "0.74448574", "0.7436043", "0.71945494", "0.71945494", "0.71945494", "0.71223485", "0.70764124", "0.70370007", "0.7031732", "0.70009696", "0.6983447", "0.6932696", "0.6883826", "0.68802714", "0.68802714", "0.68802714", "0.6871997", "0.68642163", "0.6861353", "0.68521154", "0.6842757", "0.68386763", "0.6838164", "0.6837854", "0.68355995", "0.6832808", "0.6832256", "0.68321335", "0.68264544", "0.6824538", "0.6820734", "0.68185914", "0.6814054", "0.6813402", "0.6808933", "0.67977095", "0.67964774", "0.6792194", "0.67915505", "0.67915505", "0.67915505", "0.67915505", "0.67915505", "0.67915505", "0.67915505", "0.6784322", "0.67774105", "0.6775451", "0.6775451", "0.6775451", "0.6775451", "0.6775451", "0.6775451", "0.6775451", "0.6773821", "0.6773821", "0.6773821", "0.6773821", "0.6769832", "0.67640525", "0.67640525", "0.67640525", "0.67640525", "0.67599976", "0.6758739", "0.6758653", "0.6758653", "0.6758653", "0.6758653", "0.6758653", "0.6758653", "0.6758653", "0.67575395", "0.67539585", "0.67539585", "0.67539585", "0.67539585", "0.67539585", "0.67539585", "0.6738198", "0.67327845", "0.67327845", "0.67327845", "0.6731626", "0.6724084", "0.6724084", "0.6724084", "0.6724084", "0.6724084", "0.6724084", "0.6724084", "0.6724084", "0.67228496", "0.6722377", "0.6722377", "0.67218757" ]
0.0
-1
This method finds the y value of the velocity.
public double getY() { return this.dy; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getVelocityY() {\n\t\treturn velocity.getY();\n\t}", "@Basic\n\tpublic double getYVelocity(){\n\t\treturn this.yVelocity;\n\t}", "public double getYVel() {\n return this.yVel;\n }", "public double getY_vel() {\n return this.y_vel;\n }", "public double getY() {\n return position.getY();\n }", "public double getY() {\n return collider.getY();\n }", "public float getY() {\n return pos.y;\n }", "public int getY(){\n\t\tif(!resetCoordinates()) return 10000;\n\t\treturn Math.round(robot.translation.get(1)/ AvesAblazeHardware.mmPerInch);\n\t}", "public double getYPos() {\n\t\treturn this.position[1];\n\t}", "public double getY() {\r\n return this.y;\r\n }", "public SVGLength getY() {\n return y;\n }", "public double getEndY() {\n\treturn v2.getY();\n }", "public float getYComponent() {\n return this.vy;\n }", "public double getY() {\n return this.y;\n }", "public double getY() {\n return this.y;\n }", "public double getY() {\n return this.y;\n }", "double getVy() { return vel[1]; }", "public double getY();", "double getYPosition();", "double getY() { return pos[1]; }", "public final int getY()\n\t{\n\t\treturn pos.y;\n\t}", "public double getYValue(){\n return(yValue);\n }", "public double getY() { return y; }", "@Override\n\tpublic float getY() {\n\t\treturn this.y;\n\t}", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "public double getY(){\n return this.y;\n }", "public float getVerticalVelocity( )\r\n {\r\n return this.v_velocity;\r\n }", "@Override\n\tpublic double getY() {\n\t\treturn y;\n\t}", "public float getY() {\n return this.y;\n }", "public double getY(){\n\t\treturn y;\n\t}", "public int yPos() {\n\t\treturn Engine.scaleY(y);\n\t}", "public double getY() {\r\n return y;\r\n }", "public double getY() {\n\t\treturn point[1];\n\t}", "public double getY() {\n return y;\r\n }", "public int getY() {\n synchronized (this.yLock) {\n return (int) this.movementComposer.getYPosition();\n }\n }", "public float getY() {\n return this.y;\n }", "public double getY() {\r\n\t\t return this.yCoord;\r\n\t }", "public double getY() {\n\t\treturn y;\n\t}", "public double getY() {\n\t\treturn y;\n\t}", "public double getY() {\n\t\treturn y;\n\t}", "public double getY() {\n\t\treturn y;\n\t}", "public double getY()\n\t\t{\n\t\t\treturn this.y[0];\n\t\t}", "public double getYValue(){\r\n\t\treturn ((Double)(super.yValue) ).doubleValue(); \r\n\t}", "public double getY() {\n return y;\n }", "public double getY() {\n return y;\n }", "public double getY() {\n return y;\n }", "public double getY() {\n return y;\n }", "public double getY() {\n return y;\n }", "public double getY() {\n return y;\n }", "@Override\n\tpublic float getY() \n\t{\n\t\treturn _y;\n\t}", "double getPositionY();", "double getPositionY();", "double getPositionY();", "public float getY() {\r\n\t\treturn y;\r\n\t}", "@Basic\n\tpublic double getY() {\n\t\treturn this.y;\n\t}", "public double getY()\n {\n return y;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY()\n\t{\n\t\treturn y;\n\t}", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public double getY() {\n return y_;\n }", "public int getY() {\n return (int) yPos;\n }", "@java.lang.Override\n public godot.wire.Wire.Vector2 getY() {\n return y_ == null ? godot.wire.Wire.Vector2.getDefaultInstance() : y_;\n }", "public int getY() {\n return pos_y;\n }", "public double getYPosition()\n\t{\n\t\treturn yPosition;\n\t}", "Float getY();", "public float getY();", "public float getY();", "public double getY(){\r\n return y;\r\n }", "public final double getY() {\n return y;\n }", "@java.lang.Override\n public float getY() {\n return y_;\n }", "@java.lang.Override\n public float getY() {\n return y_;\n }", "@java.lang.Override\n public float getY() {\n return y_;\n }", "@java.lang.Override\n public float getY() {\n return y_;\n }", "@java.lang.Override\n public float getY() {\n return y_;\n }", "public final double getY() {\n return y;\n }", "public double getY() {\n return y;\n }", "float getY();", "float getY();", "float getY();" ]
[ "0.84682554", "0.7979984", "0.79103494", "0.77649283", "0.756366", "0.75249934", "0.75125605", "0.7483108", "0.7453787", "0.7423675", "0.74198556", "0.74182236", "0.74130464", "0.740397", "0.740397", "0.740397", "0.73907167", "0.7364688", "0.73558855", "0.7347505", "0.7342042", "0.73374236", "0.731555", "0.7314815", "0.7313345", "0.7313345", "0.7313345", "0.7313345", "0.7313345", "0.7313345", "0.7313345", "0.7313345", "0.7313345", "0.73129916", "0.7311318", "0.73063976", "0.7302205", "0.730108", "0.7298717", "0.7286573", "0.72855824", "0.7282122", "0.7279997", "0.72761655", "0.72675925", "0.7265775", "0.7265775", "0.7265775", "0.7265775", "0.7265589", "0.7258106", "0.72577894", "0.72577894", "0.72577894", "0.72577894", "0.72577894", "0.72577894", "0.72571445", "0.72373784", "0.72373784", "0.72373784", "0.7231641", "0.72279763", "0.72266924", "0.72219837", "0.72219837", "0.72219837", "0.7221723", "0.7221723", "0.7221723", "0.7221723", "0.7221723", "0.72190934", "0.7217716", "0.7217671", "0.7217671", "0.7217671", "0.7217671", "0.7217671", "0.7217671", "0.7217671", "0.7216039", "0.72138673", "0.7213561", "0.7213231", "0.7213006", "0.7211575", "0.7211575", "0.72110415", "0.7209781", "0.7207411", "0.7207411", "0.7207411", "0.7207411", "0.7195611", "0.7195282", "0.7194302", "0.7189023", "0.7189023", "0.7189023" ]
0.73294413
22
This method Take a point with position (x,y) and return a new point with position (x+dx, y+dy).
public Point applyToPoint(Point p) { double newX = p.getX() + this.dx; double newY = p.getY() + this.dy; Point newP = new Point(newX, newY); return newP; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Point applyToPoint(Point p) {\n return new Point(this.dx + p.getX(), this.dy + p.getY());\n }", "public Point applyToPoint(Point p) {\r\n return new Point(p.getX() + this.dx, p.getY() + this.dy);\r\n }", "public Point applyToPoint(Point p) {\n double newX = p.getX() + this.dx;\n double newY = p.getY() + this.dy;\n return new Point(newX, newY);\n }", "public Point applyToPoint(Point p) {\n double newX, newY;\n Point newP;\n //the new x\n newX = p.getX() + this.dx;\n //the new y\n newY = p.getY() + this.dy;\n //the new point\n newP = new Point((newX), (newY));\n return newP;\n }", "public Point applyToPoint(Point p) {\n Point newP;\n double x = p.getX() + this.dxVelocity;\n double y = p.getY() + this.dyVelocity;\n newP = new Point(x, y);\n return newP;\n }", "Point add (double x, double y);", "public Point2D addPoint(double x, double y);", "public Point applyToPoint(Point p, double dt) {\r\n p.setX(p.getX() + dt * this.dx);\r\n p.setY(p.getY() + dt * this.dy);\r\n return p;\r\n }", "public Point add(Point point)\n {\n return new Point(this.x + point.x, this.y + point.y);\n }", "private static Point moveTo(Point p, int d) {\n switch (d) {\n case 0:\n return new Point(p.x, p.y - 1);\n case 1:\n return new Point(p.x + 1, p.y - 1);\n case 2:\n return new Point(p.x + 1, p.y);\n case 3:\n return new Point(p.x + 1, p.y + 1);\n case 4:\n return new Point(p.x, p.y + 1);\n case 5:\n return new Point(p.x - 1, p.y + 1);\n case 6:\n return new Point(p.x - 1, p.y);\n default:\n return new Point(p.x - 1, p.y - 1);\n }\n }", "public void pointAt(int x, int y){\n int dx=x-this.x;\n int dy=y-this.y;\n if(dx!=0)\n dir=Math.atan(((double)(dy))/((dx)))/ratioDegRad;\n else if(dy>0){\n dir=0;\n }\n else if (dy<0)\n dir=180;\n if(dx<0) {\n dir=(dir+180)%360;\n }\n\n }", "public abstract Point adjPoint(Point p, Direction d);", "public Point translate(int dX, int dY) {\n\t\tint translatedX = x + dX;\n\t\tint translatedY = y + dY;\n\t\treturn new Point(translatedX, translatedY);\n\t}", "public void moveBy(int dx, int dy){\n x += dx;\n y += dy;\n }", "public Point translate(int x, int y) {\n return new Point(\n this.x + x,\n this.y + y\n );\n }", "Point(Double x, Double y) {\n\t\tthis.setX(x);\n\t\tthis.setY(y);\n\t}", "void turnToPoint(float x, float y) {\n _rotVector.set(x - _x, y - _y, 0);\n _rotVector.setMag(1);\n }", "Point add (double x, double y, Point result);", "public void updatePosition() {\n \t\r\n \tx += dx;\r\n \ty += dy;\r\n \t\r\n\t}", "Point add(Point otherPoint) {\n\t\treturn(new Point(x+otherPoint.x,y+otherPoint.y));\n }", "public void pointToXY(int x, int y) {\n PVector targetVector;\n targetVector = new PVector(x, y);\n direction = (p.degrees(p.atan2(pos.x - (targetVector.x), pos.y - (targetVector.y))))+90;\n if (direction < 0) direction += 360;\n }", "public void addAtOffset(double dx, double dy) {\n\t\tGPoint prev = isEmpty() ? new GPoint(0, 0) : last();\n\t\tadd(prev.getX() + dx, prev.getY() + dy);\n\t}", "public Point convertPointCoordinate(Point point)\n\t{\n\t\tpoint.y = this.getHeight() - point.y;\n\t\treturn point;\n\t}", "void move(int dx, int dy) {\n position = position.addX(dx);\n position = position.addY(dy);\n }", "void moveTo(int dx, int dy);", "public Point add(double translateX, double translateY) {\n return new Point(x+translateX,y+translateY);\n }", "public void addPoint(int x, int y) {\n\t\tshape.addPoint(x, y);\n\t}", "void moveToPoint(float x, float y) {\n _x = x;\n _y = y;\n }", "public void increasePosition(float dx, float dy, float dz);", "public void offsetXY(double dx, double dy) { setXY(_x + dx, _y + dy); }", "private void touchMove(float x,float y){\n float dx = Math.abs(x - pointX);\n float dy = Math.abs(y - pointY);\n\n if(dx >= TOUCH_TOLERANCE || dy >= TOUCH_TOLERANCE){\n path.quadTo(pointX,pointY,(x + pointX)/2,(y + pointY)/2);\n pointX=x;\n pointY=y;\n }\n }", "private Point getPoint(int x, int y) {\n return new Point((int) (x / lineHeight), (int) (y / lineHeight));\n }", "public void move(int dx, int dy) {\n this.x = this.x + dx;\n this.y = this.y + dy;\n }", "private Point toInnerPoint(Point punto){\r\n \treturn punto.add(-coord.X(), -coord.Y());\r\n// return new Point(punto.getRow() - coord.getRow(), punto.getCol() - coord.getCol());\r\n }", "public void move(int dx, int dy) {\n this.xPosition += dx;\n this.yPosition += dy;\n }", "public void addPoint(double x, double y)\t{\n\t\tdouble[][] pointsCopy = new double[points.length][3];\n\t\tfor (int i = 0; i < points.length; i++)\t{\n\t\t\tpointsCopy[i][0] = points[i][0];\n\t\t\tpointsCopy[i][1] = points[i][1];\n\t\t\tpointsCopy[i][2] = points[i][2];\n\t\t}\n\t\tpoints = new double[points.length+1][3];\n\t\tint stopon = 0;\n\t\tfor (int i = 0; i < pointsCopy.length; i++)\t{\n\t\t\tif (x < pointsCopy[i][0]) break;\n\t\t\tstopon = i + 1;\n\t\t\tpoints[i][0] = pointsCopy[i][0];\n\t\t\tpoints[i][1] = pointsCopy[i][1];\n\t\t\tpoints[i][2] = pointsCopy[i][2];\n\t\t}\n\t\tfor (int i = stopon; i < pointsCopy.length; i++)\t{\n\t\t\tpoints[i+1][0] = pointsCopy[i][0];\n\t\t\tpoints[i+1][1] = pointsCopy[i][1];\n\t\t\tpoints[i+1][2] = pointsCopy[i][2];\n\t\t}\n\t\tpoints[stopon][0] = x;\n\t\tpoints[stopon][1] = y;\n\t\tpoints[stopon][2] = lineon;\n\t\tif (x > maxX) maxX = x;\n\t\tif (y > maxY)\tmaxY = y;\n\t\tif (maxX > XEnd) XEnd = maxX;\n\t\tif (maxY > YEnd) YEnd = maxY;\n\t\tif (autoUpdate) repaint();\n\t}", "void getPosRelPoint(double px, double py, double pz, DVector3 result);", "public java.awt.geom.Point2D.Double transformedPoint(double x, double y)\n {\n double[] position = {x,y}; \n getGraphicsState().getCurrentTransformationMatrix().createAffineTransform().transform(position, 0, position, 0, 1);\n position[1] = fixY(position[1]);\n\n\t_pageAffineTransform.transform(position,0, position, 0, 1);\n return new Point2D.Double(position[0],position[1]);\n }", "public void addPoint( final double x, final double y ){\n points.add(new Point2d(x,y));\n\n dirty = true;\n }", "public Point(Point point) {\n this.x = point.x;\n this.y = point.y;\n }", "public static Point createPoint(double x, double y) {\n Point point = new Point();\n point.setX(x);\n point.setY(y);\n\n return point;\n }", "public Point(double x, double y) {\n this.xPosition = x;\n this.yPosition = y;\n }", "public final void addPoint(final int x, final int y) {\n points.add(new Position(x, y));\n }", "Point createPoint();", "private Point getEndPoint(double slope, int x, int y){\n Point p = new Point();\n int iteration = 0;\n \n return p;\n }", "public void move(double dx, double dy)\n\t{\n\t\txPosition += dx;\n\t\tyPosition += dy;\n\t}", "protected Point getNewPointRelatively(Point p){\n\t\treturn new Point((int) (p.getX()-CELL_SIZE),(int) (p.getY()-CELL_SIZE));\n\t}", "public void addPoint( final Point2D point ){\n this.addPoint(point.getX(),point.getY());\n }", "public Vector2Dd formVector(Point2Dd pt) {\r\n return (new Vector2Dd(x-pt.x, y-pt.y));\r\n }", "public void addPoint(float x, float y) {\n Vector2 point = new Vector2(x, y);\n points.add(point);\n }", "protected IPoint scalePointIntoCoordinates(IPoint point) {\n\t\t\n\t\tdouble newX = point.getX() / getPixelsPerX();\n\t\tdouble newY = point.getY() / getPixelsPerY();\n\t\treturn new Point(newX, newY, point.getTime());\n\t}", "Point getPosition();", "Point getPosition();", "public Point(double x, double y){\n this.x = x;\n this.y = y;\n }", "public T setPoint(float x, float y) {\n this.startX = x;\n this.startY = y;\n return self();\n }", "public void goToXY(float x, float y) {\n float oldX, oldY;\n oldX = pos.x;\n oldY = pos.y; \n pos.x = x; \n pos.y = y;\n if (penDown) {\n pen.beginDraw();\n pen.line(oldX,oldY,pos.x,pos.y);\n pen.endDraw();\n }\n }", "public void AddPoint(double x, double y, int index) {\n if (index > PointArray.length - 1) {\n index = PointArray.length;\n } else if (index < 0) {\n index = 0;\n }\n double temp[] = new double[PointArray.length + 2];\n for (int i = 0; i <= temp.length - 1; i++) {\n if (i > index + 1) {\n temp[i] = PointArray[i - 2];\n } else if (i < index) {\n temp[i] = PointArray[i];\n } else if (i == index) {\n temp[i] = x;\n } else {\n temp[i] = y;\n }\n }\n PointArray = temp;\n }", "void move(double dx, double dy);", "public void move(double dx, double dy){\r\n x+= dx;\r\n y+= dy;\r\n changed();\r\n }", "public Point2F add(Point2F p)\r\n {return new Point2F(x + p.x, y + p.y);}", "public void translate() {\r\n this.x += dx;\r\n this.y += dy;\r\n }", "public Point(int x, int y) {\n /* DO NOT MODIFY */\n this.x = x;\n this.y = y;\n SLOPE_ORDER = new SlopeOrder();\n }", "private int xyTo1DAfterwards(int x, int y) {\n validate(x, width);\n validate(y, height);\n return !isTransposed ? x + (width - 1) * y : y + x * (height - 1);\n }", "public Point plus(Vector vector){\n\t\tdouble dx = vector.getDeltaX();\n\t\tdouble dy = vector.getDeltaY();\n\t\treturn new Point(x+dx, y+dy);\n\t}", "public GLGraphics drawPoint(float x, float y) {\n\t\tif (isInvalid(x) || isInvalid(y))\n\t\t\treturn this;\n\t\tgl.glBegin(GL.GL_POINTS);\n\t\tgl.glVertex3f(x, y, z);\n\t\tgl.glEnd();\n\t\treturn this;\n\t}", "PointF m1286a(ac acVar, ac acVar2, Point point, double d) {\r\n PointF pointF = new PointF();\r\n pointF.x = (float) (((acVar.m827e() - acVar2.m827e()) / d) + ((double) point.x));\r\n pointF.y = (float) (((double) point.y) - ((acVar.m828f() - acVar2.m828f()) / d));\r\n return pointF;\r\n }", "static Posn translate ( Posn p, double dx, double dy ) {\n\t// return .... ;\n\t// Take stock\n\t// return ... p ... dx ... dy ; // <- We know this from Posn p\n\t// return new Posn ( ... p.x ... p.y ... dx ... dy ); // <- We know this from Posn translate\n\t// return new Posn ( ... p.x ... p.y ... dx ... dy, ... p.x ... p.y ... dx ... dy );\t\n\treturn new Posn ( p.x + dx, p.y + dy );\t\n }", "public Point(Point point) {\n super(point.getReferenceX(), point.getReferenceY());\n this.x = point.x;\n this.y = point.y;\n this.setHeight(point.getHeight());\n }", "public void addPoint(double x, double y) {\n xList.add(x);\n yList.add(y);\n }", "public void addPoint(Point p) {\r\n line.add(p);\r\n }", "public Point(double x, double y) {\r\n this.x = x;\r\n this.y = y;\r\n }", "public void changePos(double xP, double yP){ \n this.xCoor += xP;\n this.yCoor += yP;\n \n }", "public void moveRelative(int x, int y) {\n this.x = this.x + x;\n this.y = this.y + y;\n }", "public static Point2D.Double findPositionGeneralization(Point2D.Double point, Point2D.Double point2){\r\n\r\n\t\tPoint2D.Double newpoint = new Point2D.Double();\r\n\t\tif(Math.abs(point.getX()-point2.getX())>Math.abs(point.getY()-point2.getY())){\t\r\n\t\t\tif(point.getX()>point2.getX())\r\n\t\t\t\tnewpoint.x=(point.getX()+point2.getX())/2;\r\n\t\t\telse\r\n\t\t\t\tnewpoint.x=(point2.getX()+point.getX())/2;\r\n\r\n\t\t\tif(point.getY()<point2.getY())\r\n\t\t\t\tnewpoint.y=point.getY()-110;\r\n\t\t\telse\r\n\t\t\t\tnewpoint.y=point2.getY()-110;\r\n\t\t}else{\r\n\t\t\tif(point.getY()>point2.getY())\r\n\t\t\t\tnewpoint.y=(point.getY()+point2.getY())/2;\r\n\t\t\telse\r\n\t\t\t\tnewpoint.y=(point2.getY()+point.getY())/2;\r\n\r\n\t\t\tif(point.getX()<point2.getX())\r\n\t\t\t\tnewpoint.x=point.getX()+150;\r\n\t\t\telse\r\n\t\t\t\tnewpoint.x=point2.getX()+150;\r\n\r\n\t\t}\r\n\t\treturn newpoint;\r\n\t}", "public Point2D translatePoint( Figure f, Point2D p, Point2D dir);", "public Point.Double getPosition(){\r\n return new Point.Double(x, y);\r\n }", "public Point(double x, double y) {\n this.x = x;\n this.y = y;\n }", "public Point(double x, double y) {\n this.x = x;\n this.y = y;\n }", "public Point(double x, double y) {\n this.x = x;\n this.y = y;\n }", "public Point(double x, double y) {\n this.x = x;\n this.y = y;\n }", "public Point(double x, double y) {\n this.x = x;\n this.y = y;\n }", "private DataPoint _addPoint(DataPoint point) {\n DataPoint existingPoint = ntree.add(point);\n if (existingPoint != null) {\n return existingPoint;\n }\n ensureDistances();\n lastAddedPoint = point;\n return null;\n }", "public void move(Point p);", "public Point getXY()\n\t{\n\t\tPoint newPoint = new Point(x,y);\t\t\t\t\t\t// Create new Point object \n\t\treturn newPoint; \t\t\t\t\t\t\t\t\t\t// Return point's x and y coordinates\n\t}", "public Point getPoint(Point start, Direction d)\n \t{\n \t\tPoint end = new Point();\n \t\tswitch(d)\n \t\t{\n \t\tcase up:\n \t\t\tend.y = start.y + 1; //up\n \t\t\tend.x = start.x; //none\n \t\t\tbreak;\n \t\tcase down:\n \t\t\tend.y = start.y - 1; //down\n \t\t\tend.x = start.x; //none\n \t\t\tbreak;\n \t\tcase left:\n \t\t\tend.y = start.y; //none\n \t\t\tend.x = start.x - 1; //left\n \t\t\tbreak;\n \t\tcase right:\n \t\t\tend.y = start.y; //none\n \t\t\tend.x = start.x + 1; //right\n \t\t\tbreak;\n \t\tcase topleft:\n \t\t\tend.y = start.y + 1; //up\n \t\t\tend.x = start.x - 1; //left\n \t\t\tbreak;\n \t\tcase botleft:\n \t\t\tend.y = start.y - 1; //down\n \t\t\tend.x = start.x - 1; //left\n \t\t\tbreak;\n \t\tcase topright:\n \t\t\tend.y = start.y + 1; //up\n \t\t\tend.x = start.x + 1; //right\n \t\t\tbreak;\n \t\tcase botright:\n \t\t\tend.y = start.y - 1; //down\n \t\t\tend.x = start.x + 1; //right\n \t\t\tbreak;\n \t\tcase none:\n \t\t\tend.y = start.y; //none\n \t\t\tend.x = start.x; //none\n \t\t}\n \t\t//might want to check if the point contains negative values\n \t\treturn end;\n \t}", "void move(int dx, int dy);", "public Point(int x,int y){\r\n\t\tthis.pos = x;\r\n\t\tthis.id = y;\r\n\t}", "public void Move(int x, int y)\r\n\t{\r\n\t\tP.x+=x;\r\n\t\tP.y+=y;\r\n\t}", "public Point2D insertPoint(int i, double x, double y);", "public Point2D.Double fromOriginal(Point2D point){\n return new Point2D.Double(\n point.getX() * scale + offsetX,\n point.getY() * scale + offsetY);\n }", "public Point2Dd (double x, double y){\r\n this.x = x;\r\n this.y = y;\r\n }", "private Point translatePoint(Point start, double angle, double distance) {\n\t\tif (distance==0)\n\t\t\treturn start;\n\t\tangle = angle*0.0174532778; //Convert to radians = pi/180\n\t\tPoint p = new Point(start.x+distance*Math.sin(angle), start.y-distance*Math.cos(angle) );\n\t\treturn p;\n\t}", "public void move(int x, int y) {\n \tint xOld = this.x;\n \tint yOld = this.y;\n \tthis.x = x;\n \tthis.y = y;\n \tSystem.out.print (\"point moved from (\" + xOld + \",\" + yOld + \") to (\" + this.x + \",\" + this.y + \")\");\n }", "public void deltaMove(Point delta){\n originPoint.x += delta.x;\n originPoint.y += delta.y;\n endPoint.x += delta.x;\n endPoint.y += delta.y;\n }", "public Point(double x, double y) {\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t}", "public Point toOuterPoint(Point punto){\r\n \treturn punto.add(coord);\r\n// return new Point(punto.getRow() + coord.getRow(), punto.getCol() + coord.getCol());\r\n }", "public void translate(double dx, double dy) {\n this.left += dx;\n this.right += dx;\n this.top += dy;\n this.bottom += dy;\n }", "public static Point mapPoint(Point point) {\n\t\treturn point;\n\t}", "public void dragPoint(final int index, final int dx, final int dy) {\n \t\tif (index < 0 || index >= n_points) return;\n \t\tp[0][index] += dx;\n \t\tp[1][index] += dy;\n \n \t\t// Reset autotracing records\n \t\tif (-1 != last_autotrace_start && index >= last_autotrace_start) {\n \t\t\tlast_autotrace_start = -1;\n \t\t}\n \t}", "public static void movePoint(Point p, Direction direction) {\r\n\t\t\tif (direction == Direction.UP) { p.y -= 1; }\r\n\t\t\telse if (direction == Direction.DOWN) { p.y += 1; }\r\n\t\t\telse if (direction == Direction.RIGHT){ p.x += 1; }\r\n\t\t\telse if (direction == Direction.LEFT) { p.x -= 1; }\r\n\t\t}" ]
[ "0.76203305", "0.7537962", "0.7508211", "0.73979384", "0.69587255", "0.67730427", "0.66520023", "0.66457057", "0.658741", "0.65378237", "0.6458168", "0.64228123", "0.64149565", "0.63574487", "0.63255423", "0.6324741", "0.6294691", "0.62926185", "0.6248068", "0.6246032", "0.62234735", "0.61988246", "0.61628133", "0.61371756", "0.6131182", "0.61245763", "0.60913426", "0.6087788", "0.607689", "0.60647583", "0.60424554", "0.60156834", "0.6014042", "0.6005115", "0.5996182", "0.59766364", "0.59375644", "0.59245485", "0.5910126", "0.589908", "0.5898508", "0.5825345", "0.5818207", "0.5802519", "0.5796098", "0.57793266", "0.5766696", "0.5747421", "0.57434136", "0.5737878", "0.5733819", "0.5731328", "0.5731328", "0.57193047", "0.57138", "0.5711153", "0.570751", "0.5686951", "0.568632", "0.5680605", "0.5676991", "0.5675602", "0.56745726", "0.5664604", "0.566365", "0.5663113", "0.5659434", "0.56593794", "0.56593037", "0.56559974", "0.56493473", "0.56461924", "0.5642561", "0.5638667", "0.56358665", "0.5632583", "0.56312716", "0.56312716", "0.56312716", "0.56312716", "0.56312716", "0.5622837", "0.5619363", "0.561537", "0.5610051", "0.5609398", "0.5606666", "0.5590908", "0.55693066", "0.55643517", "0.55600744", "0.55598634", "0.5556397", "0.55543965", "0.555366", "0.5552347", "0.5551264", "0.5549053", "0.5546371", "0.5537349" ]
0.741565
3
This method takes the given angle and speed and calculates the new velocity.
public static Velocity fromAngleAndSpeed(double angle, double speed) { angle -= 90; angle *= Math.PI / (180); double dx = Math.cos(angle) * speed; double dy = Math.sin(angle) * speed; return new Velocity(dx, dy); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Velocity fromAngleAndSpeed(double angle, double speed) {\n double adjustAngle = angle - 90;\n double nextX = speed * Math.cos(Math.toRadians(adjustAngle));\n double nextY = speed * Math.sin(Math.toRadians(adjustAngle));\n return new Velocity(nextX, nextY);\n }", "public static Velocity fromAngleAndSpeed(double angle, double speed) {\r\n double dx = speed * Math.sin(Math.toRadians(angle));\r\n double dy = -speed * Math.cos(Math.toRadians(angle));\r\n return new Velocity(dx, dy);\r\n }", "public static Velocity fromAngleAndSpeed(double angle, double speed) {\n double dx = speed * Math.sin(Math.toRadians(angle));\n double dy = speed * Math.cos(Math.toRadians(angle));\n return new Velocity(dx, -dy);\n }", "public static Velocity fromAngleAndSpeed(double angle, double speed) {\n double dx = speed * Math.sin(Math.toRadians(angle));\n double dy = -speed * Math.cos(Math.toRadians(angle));\n return new Velocity(dx, dy);\n }", "public static Velocity fromAngleAndSpeed(double angle, double speed) {\n double dx = Math.sin(Math.toRadians(angle)) * Math.abs(speed);\n double dy = Math.cos(Math.toRadians(angle - 180)) * Math.abs(speed);\n return new Velocity(dx, dy);\n }", "public Velocity fromAngleAndSpeed(double angle, double speed) {\r\n double dX = Math.sin(Math.toRadians(angle)) * speed;\r\n double dY = Math.cos(Math.toRadians(angle)) * speed;\r\n return new Velocity(dX, dY);\r\n }", "private void calculateVelocity() {\n\t\tthis.velocity = Math.sqrt((this.roughRange *this.roughRange * this.gravity_Math)\n\t\t\t\t/ ((this.roughRange * Math.sin(2 * angle)) + (2\n\t\t\t\t\t\t* Constant.heroBaseHeight * Math.cos(angle) * Math\n\t\t\t\t\t\t\t.cos(angle))));\n\t\t\n\t}", "public void updateAngle(Vector2 angleVector) {\n Vector2 vel = angleVector;\n //regularizes angles to be between 0 and 2pi\n float angle = (float)((getBody().getAngle() + Math.PI * 4) % (Math.PI * 2));\n float nextangle = (float)((Math.atan2(vel.y, vel.x) + Math.PI * 4) % (Math.PI * 2));\n float altangle = (float)((nextangle > angle) ? nextangle - Math.PI * 2 : nextangle + Math.PI *2);\n\n //checks which direction to turn angle\n float dist1 = Math.abs(nextangle - angle);\n float dist2 = Math.abs(altangle - angle);\n\n //sets direction appropriately\n int direction = (nextangle > angle) ? 1 : -1;;\n if (dist2 < dist1) {\n direction = direction * -1;\n }\n getBody().setAngularVelocity(ANG_VEL * direction * Math.min(dist1, dist2));\n }", "public void applyForce(float speed, int angleDir) {\n float angle[] = {0, 45, 90, 135, 180, 225, 270, 315}; //!Reimp\n\n if (angleDir >= 8) {\n //velocity.x = 0.0f;\n //velocity.y = 0.0f;\n return;\n }\n //System.out.format(\"angle %d%n\", angleDir);\n\n // convert degrees to radians\n // libdgx rotation happens in a clockwise direction, but in mathematics it goes counterclockwise\n // to overcome differences add 90 degrees\n double radians = MathUtils.degRad * (90.0f - angle[angleDir]);\n\n float ballSpeed = speed;\n\n this.velocity.x = (float) (ballSpeed * Math.cos(radians));\n this.velocity.y = (float) (ballSpeed * Math.sin(radians));\n this.velocity.z = 80;\n }", "public Velocity(double angle, double mag){\n\t\tthis(Math.cos(angle),-Math.sin(angle),mag);\n\t}", "double getVelComp(double vel, double angle)\n {\n angle = Math.toRadians(angle);\n double cos = Math.cos(angle);\n double sin = Math.sin(angle);\n ux = vel*cos;\n uy = vel*sin;\n this.angle = angle; \n return ux;\n }", "public void changeAngle (int horizontalSpeed)\n\t{\n\t\t//The following makes the PaperAirplane face as far right as it can\n\t\t//(but it still faces downward slightly).\n\t\tif (horizontalSpeed >= 5)\n\t\t{\n\t\t\txDimension1 = getX_Pos () - 23;\n\t\t\txDimension2 = getX_Pos () - 18;\n\t\t\txDimension3 = getX_Pos () + 22;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 2;\n\t\t\tyDimension2 = getY_Pos () - 17;\n\t\t\tyDimension3 = getY_Pos () + 5;\n\t\t}\n\t\t//When the horizontal speed progresses from 5 to 0, the plane faces\n\t\t//further downward, which is shown by the if statements below. Likewise,\n\t\t//as the horizontal speed progresses from 0 to 5, the plane faces\n\t\t//further right.\n\t\telse if (horizontalSpeed == 4)\n\t\t{\n\t\t\txDimension1 = getX_Pos () - 20;\n\t\t\txDimension2 = getX_Pos () - 12;\n\t\t\txDimension3 = getX_Pos () + 20;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 7;\n\t\t\tyDimension2 = getY_Pos () - 19;\n\t\t\tyDimension3 = getY_Pos () + 11;\n\t\t}\n\t\telse if (horizontalSpeed == 3)\n\t\t{\n\t\t\txDimension1 = getX_Pos () - 15;\n\t\t\txDimension2 = getX_Pos () - 5;\n\t\t\txDimension3 = getX_Pos () + 14;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 12;\n\t\t\tyDimension2 = getY_Pos () - 22;\n\t\t\tyDimension3 = getY_Pos () + 13;\n\t\t}\n\t\telse if (horizontalSpeed == 2)\n\t\t{\n\t\t\txDimension1 = getX_Pos () - 10;\n\t\t\txDimension2 = getX_Pos () + 2;\n\t\t\txDimension3 = getX_Pos () + 12;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 17;\n\t\t\tyDimension2 = getY_Pos () - 22;\n\t\t\tyDimension3 = getY_Pos () + 18;\n\t\t}\n\t\telse if (horizontalSpeed == 1)\n\t\t{\n\t\t\txDimension1 = getX_Pos () - 10;\n\t\t\txDimension2 = getX_Pos () + 4;\n\t\t\txDimension3 = getX_Pos () + 6;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 18;\n\t\t\tyDimension2 = getY_Pos () - 20;\n\t\t\tyDimension3 = getY_Pos () + 20;\n\t\t}\n\t\t//The following makes the plane face straight down.\n\t\telse if (horizontalSpeed == 0)\n\t\t{\n\t\t\txDimension1 = getX_Pos () - 7;\n\t\t\txDimension2 = getX_Pos ();\n\t\t\txDimension3 = getX_Pos () + 7;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 20;\n\t\t\tyDimension2 = getY_Pos () + 24;\n\t\t\tyDimension3 = getY_Pos () - 20;\n\t\t}\n\t\t//When the horizontal speed progresses from -5 to 0, the plane faces\n\t\t//further downward, which is shown by the if statements below. Likewise,\n\t\t//as the horizontal speed progresses from 0 to -5, the plane faces\n\t\t//further left.\n\t\telse if (horizontalSpeed == -1)\n\t\t{\n\t\t\txDimension1 = getX_Pos () + 10;\n\t\t\txDimension2 = getX_Pos () - 4;\n\t\t\txDimension3 = getX_Pos () - 6;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 18;\n\t\t\tyDimension2 = getY_Pos () - 20;\n\t\t\tyDimension3 = getY_Pos () + 20;\n\t\t}\n\t\telse if (horizontalSpeed == -2)\n\t\t{\n\t\t\txDimension1 = getX_Pos () + 10;\n\t\t\txDimension2 = getX_Pos () - 2;\n\t\t\txDimension3 = getX_Pos () - 12;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 17;\n\t\t\tyDimension2 = getY_Pos () - 22;\n\t\t\tyDimension3 = getY_Pos () + 18;\n\t\t}\n\t\telse if (horizontalSpeed == -3)\n\t\t{\n\t\t\txDimension1 = getX_Pos () + 15;\n\t\t\txDimension2 = getX_Pos () + 5;\n\t\t\txDimension3 = getX_Pos () - 14;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 12;\n\t\t\tyDimension2 = getY_Pos () - 22;\n\t\t\tyDimension3 = getY_Pos () + 13;\n\t\t}\n\t\telse if (horizontalSpeed == -4)\n\t\t{\n\t\t\txDimension1 = getX_Pos () + 20;\n\t\t\txDimension2 = getX_Pos () + 12;\n\t\t\txDimension3 = getX_Pos () - 20;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 7;\n\t\t\tyDimension2 = getY_Pos () - 19;\n\t\t\tyDimension3 = getY_Pos () + 11;\n\t\t}\n\t\t//The following makes the PaperAirplane face as far left as it can\n\t\t//(but it still faces downward slightly).\n\t\telse if (horizontalSpeed <= -5)\n\t\t{\n\t\t\txDimension1 = getX_Pos () + 23;\n\t\t\txDimension2 = getX_Pos () + 18;\n\t\t\txDimension3 = getX_Pos () - 22;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 2;\n\t\t\tyDimension2 = getY_Pos () - 17;\n\t\t\tyDimension3 = getY_Pos () + 5;\n\t\t}\n\t}", "@Override\n\tpublic double calculateVelocity() {\n\t\tdouble result = distance / time + velocitySame - velocityReverse;\n\t\treturn result;\n\t}", "public void gyroTurn ( double speed, double angle) {\n\n // keep looping while we are still active, and not on heading.\n while (!onHeading(speed, angle, P_TURN_COEFF) ) {\n // Update telemetry & Allow time for other processes to run.\n try {\n sleep(50);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n\n }", "public void gyroDrive ( double speed,\n double distance,\n double angle) {\n\n\n // Ensure that the opmode is still activ\n\n // Determine new target position, and pass to motor controller\n moveCounts = (int)(distance * COUNTS_PER_INCH);\n newLeftTarget = leftmotor.getCurrentPosition() + moveCounts;\n newRightTarget = rightmotor.getCurrentPosition() + moveCounts;\n\n // Set Target and Turn On RUN_TO_POSITION\n leftmotor.setTargetPosition(newLeftTarget);\n rightmotor.setTargetPosition(newRightTarget);\n\n leftmotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n rightmotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n // start motion.\n speed = Range.clip(Math.abs(speed), 0.0, 1.0);\n\n maxSpeed = speed;\n speed = INCREMENT;\n rampUp = true;\n\n leftmotor.setPower(speed);\n rightmotor.setPower(speed);\n\n // keep looping while we are still active, and BOTH motors are running.\n while ((leftmotor.isBusy() && rightmotor.isBusy())) {\n if (rampUp){\n speed += INCREMENT ;\n if (speed >= maxSpeed ) {\n speed = maxSpeed;\n }\n }\n\n // adjust relative speed based on heading error.\n error = getError(angle);\n steer = getSteer(error, P_DRIVE_COEFF);\n\n // if driving in reverse, the motor correction also needs to be reversed\n if (distance < 0)\n steer *= -1.0;\n\n leftSpeed = speed - steer;\n rightSpeed = speed + steer;\n\n // Normalize speeds if either one exceeds +/- 1.0;\n max = Math.max(Math.abs(leftSpeed), Math.abs(rightSpeed));\n if (max > 1.0)\n {\n leftSpeed /= max;\n rightSpeed /= max;\n }\n\n leftmotor.setPower(leftSpeed);\n rightmotor.setPower(rightSpeed);\n }\n\n // Stop all motion;\n leftmotor.setPower(0);\n rightmotor.setPower(0);\n\n // Turn off RUN_TO_POSITION\n leftmotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n rightmotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n gyroHold(TURN_SPEED,angle,0.166);\n\n }", "public double speed() {\n /* dx = sin(angle) * speed\n dy = cos(angle-180) * speed = -cos(angle)\n sqrt((dx)^2 + (-dy)^2 = sin(angle)^2*speed^2 + cos(angle)^2*speed^2)=\n sqrt(speed^2 *(cos(angle)^2+sin(angle)^2) = sqrt(speed^2*1)=speed\n */\n //distance math functions\n //to calculate the square root of the sum of squares of numbers passed to it as arguments.\n return Math.hypot(this.dx, this.dy);\n }", "public void updateAngle() {\n\t\tfloat ak = 0;\n\t\tfloat gk = 0;\n\t\tak = (float) (pathBoardRectangles.get(curTargetPathCellIndex).getCenterX() - x);\n\t\tgk = (float) (pathBoardRectangles.get(curTargetPathCellIndex).getCenterY() - y);\n\t\tangleDesired = (float) Math.toDegrees(Math.atan2(ak*-1, gk));\n\t\t// if the angle and the angleDesired are opposites the Vector point into the opposite direction\n\t\t// this means the angle will be the angle of the longer vector which is always angle\n\t\t// so if that happens the angleDesired is offset so this won't happen\n\t\tangle = Commons.calculateAngleAfterRotation(angle, angleDesired, rotationDelay);\n\t}", "public void gyroDrive ( double speed,\n double distance,\n double angle) {\n\n int newLeftTarget;\n int newRightTarget;\n int moveCounts;\n double max;\n double error;\n double steer;\n double leftSpeed;\n double rightSpeed;\n\n // Ensure that the opmode is still active\n if (opModeIsActive()) {\n\n // Determine new target position, and pass to motor controller\n moveCounts = (int)(distance * COUNTS_PER_INCH);\n newLeftTarget = leftMotor.getCurrentPosition() + moveCounts;\n newRightTarget = rightMotor.getCurrentPosition() + moveCounts;\n\n // Set Target and Turn On RUN_TO_POSITION\n leftMotor.setTargetPosition(newLeftTarget);\n rightMotor.setTargetPosition(newRightTarget);\n\n leftMotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n rightMotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n // start motion.\n speed = Range.clip(Math.abs(speed), 0.0, 1.0);\n leftMotor.setPower(speed);\n rightMotor.setPower(speed);\n\n // keep looping while we are still active, and BOTH motors are running.\n while (opModeIsActive() &&\n (leftMotor.isBusy() && rightMotor.isBusy())) {\n\n // adjust relative speed based on heading error.\n error = getError(angle);\n steer = getSteer(error, P_DRIVE_COEFF);\n\n // if driving in reverse, the motor correction also needs to be reversed\n if (distance < 0)\n steer *= -1.0;\n\n leftSpeed = speed - steer;\n rightSpeed = speed + steer;\n\n // Normalize speeds if any one exceeds +/- 1.0;\n max = Math.max(Math.abs(leftSpeed), Math.abs(rightSpeed));\n if (max > 1.0)\n {\n leftSpeed /= max;\n rightSpeed /= max;\n }\n\n leftMotor.setPower(leftSpeed);\n rightMotor.setPower(rightSpeed);\n\n // Display drive status for the driver.\n telemetry.addData(\"Err/St\", \"%5.1f/%5.1f\", error, steer);\n telemetry.addData(\"Target\", \"%7d:%7d\", newLeftTarget, newRightTarget);\n telemetry.addData(\"Actual\", \"%7d:%7d\", leftMotor.getCurrentPosition(),\n rightMotor.getCurrentPosition());\n telemetry.addData(\"Speed\", \"%5.2f:%5.2f\", leftSpeed, rightSpeed);\n telemetry.update();\n }\n\n // Stop all motion;\n\n rightMotor.setPower(0);\n leftMotor.setPower(0);\n\n // Turn off RUN_TO_POSITION\n leftMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n rightMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }\n }", "public AutoRotateCommand(double angle, double speed){\r\n\t\tAHRS ahrs = new AHRS(Port.kMXP);\r\n\t\trequires(Robot.driveSys);\r\n\t\tangle = ahrs.getAngle();\r\n\t\tthis.speed = speed;\r\n\t}", "protected void calcVelocity()\n\t{}", "public void gyroTurn(double speed, double angle) {\n while (opModeIsActive() && !onHeading(speed, angle, P_TURN_COEFF)) {\n // Update telemetry & Allow time for other processes to run.\n telemetry.update();\n }\n }", "public void gyroTurn ( double speed, double angle) {\n\n // keep looping while we are still active, and not on heading.\n while (opModeIsActive() && !onHeading(speed, angle, P_TURN_COEFF)) {\n // Update telemetry & Allow time for other processes to run.\n telemetry.addData(\"Direction\", gyro.getHeading());\n telemetry.update();\n }\n }", "static void resetVelocity(){currentVelocity = INITIAL_SPEED;}", "public void updateVelocity(double ax, double ay, double timestep){\n\t\tvx = vx + ax * timestep;\n\t vy = vy + ay * timestep;\n\t}", "public void gyroDrive ( double speed,\n double distance,\n double angle) {\n\n int newLeftTarget;\n int newRightTarget;\n int moveCounts;\n double max;\n double error;\n double steer;\n double leftSpeed;\n double rightSpeed;\n\n // Ensure that the opmode is still active\n if (opModeIsActive()) {\n\n // Determine new target position, and pass to motor controller\n moveCounts = (int)(distance * COUNTS_PER_INCH);\n newLeftTarget = robot.leftDrive.getCurrentPosition() + moveCounts;\n newRightTarget = robot.rightDrive.getCurrentPosition() + moveCounts;\n\n // Set Target and Turn On RUN_TO_POSITION\n robot.leftDrive.setTargetPosition(newLeftTarget);\n robot.rightDrive.setTargetPosition(newRightTarget);\n\n robot.leftDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.rightDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n // start motion.\n speed = Range.clip(Math.abs(speed), 0.0, 1.0);\n robot.leftDrive.setPower(speed);\n robot.rightDrive.setPower(speed);\n\n // keep looping while we are still active, and BOTH motors are running.\n while (opModeIsActive() &&\n (robot.leftDrive.isBusy() && robot.rightDrive.isBusy())) {\n\n // adjust relative speed based on heading error.\n error = getError(angle);\n steer = getSteer(error, P_DRIVE_COEFF);\n\n // if driving in reverse, the motor correction also needs to be reversed\n if (distance < 0)\n steer *= -1.0;\n\n leftSpeed = speed - steer;\n rightSpeed = speed + steer;\n\n // Normalize speeds if either one exceeds +/- 1.0;\n max = Math.max(Math.abs(leftSpeed), Math.abs(rightSpeed));\n if (max > 1.0)\n {\n leftSpeed /= max;\n rightSpeed /= max;\n }\n\n robot.leftDrive.setPower(leftSpeed);\n robot.rightDrive.setPower(rightSpeed);\n\n // Display drive status for the driver.\n telemetry.addData(\"Err/St\", \"%5.1f/%5.1f\", error, steer);\n telemetry.addData(\"Target\", \"%7d:%7d\", newLeftTarget, newRightTarget);\n telemetry.addData(\"Actual\", \"%7d:%7d\", robot.leftDrive.getCurrentPosition(),\n robot.rightDrive.getCurrentPosition());\n telemetry.addData(\"Speed\", \"%5.2f:%5.2f\", leftSpeed, rightSpeed);\n telemetry.update();\n }\n\n // Stop all motion;\n robot.leftDrive.setPower(0);\n robot.rightDrive.setPower(0);\n\n // Turn off RUN_TO_POSITION\n robot.leftDrive.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n robot.rightDrive.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }\n }", "public static void moveArm(double speed) {\n\t\tSmartDashboard.putNumber(\"Arm Max value\",maxPos);\n\t\tSmartDashboard.putNumber(\"Arm Min value\",minPos);\n\t\tActuators.getArmAngleMotor().changeControlMode(TalonControlMode.PercentVbus);\t//CHECK THIS SCOTT\n\t\tSmartDashboard.putNumber(\"Percent of Arm Angle\", unMapPosition(Actuators.getArmAngleMotor().getPosition()));\t//CHECK THIS SCOTT\n\t\tSmartDashboard.putNumber(\"Arm Position\", Actuators.getArmAngleMotor().getPosition());\n\t\tSmartDashboard.putNumber(\"THeoreticalPID position\", mapPosition(unMapPosition(Actuators.getArmAngleMotor().getPosition())));\n\t\tif (Gamepad.secondary.getBack()) {\n\t\t\tActuators.getArmAngleMotor().set(speed);\n\t\t} else {\n\t\t\tif ((Actuators.getArmAngleMotor().getPosition() < MAX_ARM_POSITION && Sensors.getArmMinLimitSwitch().get())\n\t\t\t\t\t&& speed > 0) {\n\t\t\t\tActuators.getArmAngleMotor().set(speed / 2);\n\t\t\t} else if ((Actuators.getArmAngleMotor().getPosition() > MIN_ARM_POSITION\n\t\t\t\t\t&& Sensors.getArmMaxLimitSwitch().get()) && speed < 0) {\n\t\t\t\tActuators.getArmAngleMotor().set(speed);\n\t\t\t} else if (!Sensors.getArmMaxLimitSwitch().get()){\n\t\t\t\tActuators.getArmAngleMotor().set(Actuators.STOP_MOTOR);\t\t\t\t//CHECK THIS SCOTT\n\t\t\t\tmaxPos = Actuators.getArmAngleMotor().getPosition();\t\t//CHECK THIS SCOTT\n\t\t\t} else if (!Sensors.getArmMinLimitSwitch().get()){\t\t\t\t\t\t//CHECK THIS SCOTT\n\t\t\t\tActuators.getArmAngleMotor().set(Actuators.STOP_MOTOR);\t\t\t\t//CHECK THIS SCOTT\n\t\t\t\tminPos = Actuators.getArmAngleMotor().getPosition();\t\t//CHECK THIS SCOTT\n\t\t\t}\n\t\t\telse {\n\t\t\t\tActuators.getArmAngleMotor().set(Actuators.STOP_MOTOR);\n\t\t\t}\n\n\t\t\t// speed = -speed;\n\t\t\tSmartDashboard.putNumber(\"Arm Position\", Actuators.getArmAngleMotor().getPosition());\n\t\t\tif (Gamepad.secondary.getBack()) {\n\t\t\t\tActuators.getArmAngleMotor().set(speed);\n\t\t\t} else {\n\t\t\t\tif ((Sensors.getArmMaxLimitSwitch().get()) && speed < 0) {\n\t\t\t\t\tActuators.getArmAngleMotor().set(speed);\n\t\t\t\t} else if ((Sensors.getArmMinLimitSwitch().get()) && speed > 0) {\n\t\t\t\t\tActuators.getArmAngleMotor().set(speed);\n\t\t\t\t} else if (!Sensors.getArmMaxLimitSwitch().get()){\n\t\t\t\t\tActuators.getArmAngleMotor().set(Actuators.STOP_MOTOR);\t\t\t\t//CHECK THIS SCOTT\n\t\t\t\t\tmaxPos = Actuators.getArmAngleMotor().getPosition();\t\t//CHECK THIS SCOTT\n\t\t\t\t} else if (!Sensors.getArmMinLimitSwitch().get()){\t\t\t\t\t\t//CHECK THIS SCOTT\n\t\t\t\t\tActuators.getArmAngleMotor().set(Actuators.STOP_MOTOR);\t\t\t\t//CHECK THIS SCOTT\n\t\t\t\t\tminPos = Actuators.getArmAngleMotor().getPosition();\t\t//CHECK THIS SCOTT\n\t\t\t\t} else {\n\t\t\t\t\tActuators.getArmAngleMotor().set(Actuators.STOP_MOTOR);\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\t// if (!(/*\n\t\t\t\t// * Actuators.getArmAngleMotor().getPosition() >\n\t\t\t\t// * MAX_ARM_POSITION &&\n\t\t\t\t// */\n\t\t\t\t// Sensors.getArmMaxLimitSwitch().get()) && speed > 0) {\n\t\t\t\t// Actuators.getArmAngleMotor().set(speed);\n\t\t\t\t// } else if (!(/*\n\t\t\t\t// * Actuators.getArmAngleMotor().getPosition() <\n\t\t\t\t// * MIN_ARM_POSITION &&\n\t\t\t\t// */\n\t\t\t\t// Sensors.getArmMinLimitSwitch().get()) && speed < 0) {\n\t\t\t\t// Actuators.getArmAngleMotor().set(speed);\n\t\t\t\t// } else {\n\t\t\t\t// Actuators.getArmAngleMotor().set(Actuators.STOP_MOTOR);\n\t\t\t\t//\n\t\t\t\t// }\n\t\t\t}\n\t\t}\n\t}", "public void moveDistance(double distance, double angle) {\n\t\tdouble startX = posX;\n\t\tdouble startY = posY;\n\t\trotateTo(angle);\n\t\twhile(Math.sqrt((startX * startX) + (startY * startY)) < distance) {\t\n\t\t//I thought while loops broke things? Do we need to fix this? [Yes. -Thomas]\n\t\t\tif (angleToForward < angle) {\n\t\t\t\t//right greater\n\t\t\t\tmotorRB.set(0.25);\n\t\t\t\tmotorRF.set(0.25);\n\t\t\t\tmotorLB.set(-0.1);\n\t\t\t\tmotorLF.set(-0.1);\n\t\t\t} else if (angleToForward > angle) {\n\t\t\t\tmotorRB.set(0.1);\n\t\t\t\tmotorRF.set(0.1);\n\t\t\t\tmotorLB.set(-0.25);\n\t\t\t\tmotorLF.set(-0.25);\n\t\t\t} else {\n\t\t\t\tmotorRB.set(0.25);\n\t\t\t\tmotorRF.set(0.25);\n\t\t\t\tmotorLB.set(-0.25);\n\t\t\t\tmotorLF.set(-0.25);\n\t\t\t}\n\t\t}\n\t}", "public void driveCurve(int angle, double speed) {\r\n \tdrivetrain.drive(speed, angle);\r\n }", "org.auvua.utils.protobuffer.AUVprotocol.AUVCommand.Movement getSpeed();", "private void updateVelocity() {\n\t \t//Update x velocity\n\t \tif (getNode().getTranslateX() > MAX_SPEED_X) {\n\t \t\tsetvX(MAX_SPEED_X);\n\t \t} else if (getNode().getTranslateX() < -MAX_SPEED_X) {\n\t \t\tsetvX(-MAX_SPEED_X);\n\t } else {\n\t \t\tsetvX(getNode().getTranslateX());\n\t \t}\n\n\t \t//Update x velocity\n\t \tif (getNode().getTranslateY() > MAX_SPEED_Y) {\n\t \t\tsetvY(MAX_SPEED_Y);\n\t \t} else if (getNode().getTranslateY() < -MAX_SPEED_Y) {\n\t \t\tsetvY(-MAX_SPEED_Y);\n\t \t} else {\n\t \t\tsetvY(getNode().getTranslateY());\n\t \t}\n\t }", "private static double calculateVelocity(double velocity, double deltaT, double acceleration) {\n return velocity + (deltaT * acceleration);\n }", "@Override\n\tpublic double calculateVelocity(Parrot parrot) {\n\t\treturn (parrot.getisNailed()) ? 0 : parrot.getBaseSpeed(parrot.getVoltage());\n\t}", "public double fromVelocityToSpeed() {\n return Math.sqrt(Math.pow(this.getDx(), 2) + Math.pow(this.getDy(), 2));\n }", "public void gyroTurn ( double speed, double angle, double timeoutS) {\n\n eTime.reset();\n\n // keep looping while we are still active, and not on heading.\n while (opModeIsActive() && (eTime.seconds() < timeoutS) && !onHeading(speed, angle, P_TURN_COEFF)) {\n // Update telemetry & Allow time for other processes to run.\n telemetry.update();\n }\n }", "public void applyAngularVelocityChange(final float velocityChange);", "public void update()\n\t{\n\t\tif (active)\n\t\t{\n\t\t\t// Increases speed to accelerate.\n\t\t\tif (speed < max_speed) speed += acceleration;\n\n\t\t\tif (speed > max_speed) speed = max_speed;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Negates speed to slow down.\n\t\t\tif (speed > 0) speed = -speed;\n\t\t\tif (speed < 0) speed += acceleration;\n\n\t\t\tif (speed > 0) speed = 0;\n\t\t}\n\n\t\t// Sets the speed for thrust.\n\t\thost.momentum.addVelocity(new Displacement(speed * Math.cos(angle), speed * Math.sin(angle)));\n\t}", "private static void updateComponents(PhysicsGameObject obj, Vector3 position, Velocity velocity, Vector3 acceleration,double dt){\n float newX = (float) (position.x +(dt * velocity.Vx) + (dt*acceleration.x * dt / 2));\n float newY = (float) (position.y + (dt * velocity.Vy) + ( dt*acceleration.y * dt / 2));\n\n //v(t+h) = v(t) + h*a\n float newVelX = (float) (velocity.Vx + dt * acceleration.x );\n float newVelY = (float) (velocity.Vy + dt * acceleration.y );\n\n obj.setPositionX(newX);\n obj.setPositionY(newY);\n\n obj.setVelocityComponents(newVelX, newVelY);\n\n\n }", "@Override\n public void specialUpdate(double time) {\n if(relativeAngle > maxAngle) {\n angleDirection = -1;\n }\n if(relativeAngle < minAngle) {\n angleDirection = 1;\n }\n relativeAngle += angleDirection * BODY_MEMBER_MOVING_SPEED * time * (person.getCurrentSpeed() / 2.0);\n }", "public void update(){\r\n //Move and rotate the gate at the specified speeds\r\n this.angle += this.rotationSpeed; \r\n this.centerX += this.xSpeed;\r\n this.centerY += this.ySpeed;\r\n \r\n //Calculate the new endpoints based on the updated values\r\n p1.x = centerX + (int)((length / 2)*(Math.cos(angle)));\r\n p1.y = centerY + (int)((length / 2)*(Math.sin(angle)));\r\n p2.x = centerX - (int)((length / 2)*(Math.cos(angle)));\r\n p2.y = centerY - (int)((length / 2)*(Math.sin(angle))); \r\n \r\n //Check if either end is out of bounds\r\n checkOutOfBounds(p1);\r\n checkOutOfBounds(p2); \r\n }", "public void angleTurn(float angle, int timeout){\n\t\tcalculateAngles();\n\n\t\t// Get the current program time and starting encoder position before we start our drive loop\n\t\tfloat StartTime = data.time.currentTime();\n\t\tfloat StartPosition = data.drive.leftDrive.getCurrentPosition();\n\n\t\t// Reset our Integral and Derivative data.\n\t\tdata.PID.integralData.clear();\n\t\tdata.PID.derivativeData.clear();\n\n\n\t\t// Manually calculate our first target\n\t\tdata.PID.target = (calculateAngles() + (data.PID.IMURotations * 360)) + angle;\n\n\t\t// We need to keep track of how much time passes between a loop.\n\t\tfloat LoopTime = data.time.currentTime();\n\n\t\t// This is the main loop of our straight drive.\n\t\t// We use encoders to form a loop that corrects rotation until we reach our target.\n\t\twhile(StartTime + timeout > data.time.currentTime()){\n\n\t\t\t// Record the time since the previous loop.\n\t\t\tLoopTime = data.time.timeFrom(LoopTime);\n\t\t\t// Calculate our angles. This method may modify the input Rotations.\n\t\t\t//IMURotations =\n\t\t\tcalculateAngles();\n\t\t\t// Calculate our PID\n\t\t\tcalculatePID(LoopTime);\n\n\t\t\t// Calculate the Direction to travel to correct any rotational errors.\n\t\t\tfloat Direction = ((data.PID.I * data.PID.ITuning) / 2000) + ((data.PID.P * data.PID.PTuning) / 2000) + ((data.PID.D * data.PID.DTuning) / 2000);;\n\n\t\t\tif(Math.abs(Direction) <= 0.03f) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tdata.drive.rightDrive.setPower(data.drive.POWER_CONSTANT - (Direction));\n\t\t\tdata.drive.leftDrive.setPower(data.drive.POWER_CONSTANT + (Direction));\n\t\t}\n\t\t// Our drive loop has completed! Stop the motors.\n\t\tdata.drive.rightDrive.setPower(0);\n\t\tdata.drive.leftDrive.setPower(0);\n\t}", "@SuppressWarnings(\"deprecation\")\n\tpublic void carAction(int linearSpeed, int angle, int angularSpeed)\n\t{\n\t\tif(angularSpeed == 0)\n\t\t\tpilot.moveStraight(linearSpeed, (int) angle);\n\t\telse\n\t\t\tpilot.spinningMove(linearSpeed, angularSpeed, angle);\n\t\t\n//\t\tpilot.spinningMove(0, angularSpeed, 0);\n//\t\tpilot.moveStraight(linearSpeed, (int) angle);\n\t\t\n\t\t// The spinning move method is more sophisticated but difficult to control\n\t\t//pilot.spinningMove(linearSpeed, angularSpeed, angle);\n\t}", "void turnToDir(float angle) { \n float radian = radians(angle);\n _rotVector.set(cos(radian), sin(radian));\n _rotVector.setMag(1);\n }", "public void update() {\n // Update velocity\n velocity.add(acceleration);\n // Limit speed\n velocity.limit(maxspeed);\n position.add(velocity);\n // Reset accelertion to 0 each cycle\n acceleration.mult(0);\n }", "public void update() {\n // Update velocity\n velocity.add(acceleration);\n // Limit speed\n velocity.limit(maxspeed);\n position.add(velocity);\n // Reset accelertion to 0 each cycle\n acceleration.mult(0);\n }", "void adelante(int speed){\n\t\tMotorA.setSpeed(speed);\n\t\tMotorB.setSpeed(speed);\n\t\tMotorC.setSpeed(speed);\n\t\t\n\t\tMotorA.backward();\n\t\tMotorB.forward();\n\t\tMotorC.forward();\n\t}", "public void setGoal(double speed) {\n\t\t// we'll assume that the angle you wish to drive at is the same\n\t\t// as the one when you set the goal\n\t\tmGoalAngle = mNavigation.getHeadingInDegrees(); \n\t\tmSpeed = speed;\n\t\t// we want the difference between where we want to be and where we are to be 0\n\t\t// same with the angle\n\t\tsuper.setSetpoint(0.0);\n\t}", "private void UpdateVelocity()\n\t{\n\t\tVector2 currentPosition = new Vector2(parent.transform.position);\n\t\tVector2 newVelocity = Vector2.Add(currentPosition,previousPosition.negate());\n\t\tpreviousPosition = currentPosition;\n\t\t\n\t\tfloat currentRotation = parent.transform.rotation;\n\t\tangularVelocity = currentRotation - previousRotation;\n\t\tpreviousRotation = currentRotation;\n\t\t\n\t\tvelocity = newVelocity;\n\t}", "public void reviseMotorSpeed() {\n\t\tmHandler.removeMessages(EVAL_MOTOR_SPEED);\n\t\tlong starttime = System.currentTimeMillis();\n\n\t\t//Retrieve current orientation.\t\t\n\t\t\n\t\tmAzimuth = mStatus.getReadingField(AZIMUTH);\t\t\n\t\tmPitchDeg = mStatus.getReadingField(PITCH);\n\t\tmRollDeg = -mStatus.getReadingField(ROLL);\n\t\t\n\t\tdouble[] errors = new double[4];\n\t\tsynchronized (mAngleTarget) {\n\t\t\t//logArray(\"mAngleTarget\", mAngleTarget);\n\t\t\terrors[0] = mAngleTarget[0] - mRollDeg;\n\t\t\terrors[1] = mAngleTarget[1] - mPitchDeg;\n\t\t\terrors[2] = mAngleTarget[2] - mStatus.getGpsField(dALT);\n\t\t\terrors[3] = mAngleTarget[3] - mAzimuth;\n\t\t\t//logArray(\"errors\", errors);\n\t\t}\n\t\t\n\t\t@SuppressWarnings(\"unused\")\n\t\tString errs = \"errors: \";\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\terrs += errors[i] + \": \";\n\t\t}\n\t\t//Log.v(TAG, errs);\n\t\t//For azimuth, multiple possibilities exist for error, each equally valid; but only the error nearest zero makes practical sense.\n\t\tif (errors[3] > 180.0)\n\t\t\terrors[3] -= 360.0;\n\t\tif (errors[3] < -180.0)\n\t\t\terrors[3] += 360.0;\n\t\t\n\t\t\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t//Calculate proportional errors\n\t\t\tdouble err = errors[i];//mTarget[i] - mCurrent[i];\n\t\t\t\n\n\t\t\t//Calculate derivative errors.\n\t\t\tlong timeInterval = starttime - mLastUpdate;\n\t\t\tif (timeInterval != 0) {\n\t\t\t\tmErrors[i][2] = (err - mErrors[i][0]) * 1000.0 / timeInterval;\n\t\t\t} else {\n\t\t\t\tmErrors[i][2] = 0.0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//Mark proportional error\n\t\t\tmErrors[i][0] = err;\n\t\t\t/*if (i == 2)\n\t\t\t\tLog.v(TAG, \"guid, dalt err is \" + err);*/\n\t\t\t//Update integral errors\n\t\t\tmErrors[i][1] -= mIntegralErrors[i][mIntegralIndex];\n\t\t\tmIntegralErrors[i][mIntegralIndex] = err;\n\t\t\tmErrors[i][1] += err;\n\t\t\tmIntegralIndex = ++mIntegralIndex % PIDREPS;\n\t\t\t\n\t\t\t//Calculate changes in output\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tmControlVars[i] += mErrors[i][j] * mGain[i][j];\n\t\t\t}\n\t\t}\n\t\tif (mGuidanceMode.get() == MANUAL) {\n\t\t\tsynchronized (mAngleTarget) {\n\t\t\t\tmControlVars[2] = mAngleTarget[2];\n\t\t\t}\n\t\t}\n\t\tmLastUpdate = starttime;\n\t\t\n\t\t// Constrain control vars:\n\t\tmControlVars[0] = constrainValue(mControlVars[0], -1, 1);\n\t\tmControlVars[1] = constrainValue(mControlVars[1], -1, 1);\n\t\tmControlVars[2] = constrainValue(mControlVars[2], 0, 1);\n\t\tmControlVars[3] = constrainValue(mControlVars[3], -2, 2);\n\t\t\n\t\t/*String vars = \"Control vars: \";\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tvars += mControlVars[i] + \": \";\n\t\t}\n\t\tLog.v(TAG, vars);*/\n\t\t\n\t\tcontrolVarsToMotorSpeeds();\n\t\t\n\t\t//Send motor values to motors here:\n\t\tupdateMotors();\n\t\tupdateAngleTarget();\n\t\t//Log.v(TAG, \"motors: \" + mMotorSpeed[0] + \", \" + mMotorSpeed[1] + \", \" + mMotorSpeed[2] + \", \" + mMotorSpeed[3]);\n\t\t//Sleep a while\n\t\tlong timetonext = (1000 / PIDREPS) - (System.currentTimeMillis() - starttime);\n\t\t//Log.v(TAG, \"time to next: \" + timetonext);\n\t\tint currentMode = mGuidanceMode.get();\n\t\tif ((currentMode == MANUAL) || (currentMode == AUTOPILOT)) {\n\t\t\tif (timetonext > 0)\n\t\t\t\tmHandler.sendEmptyMessageDelayed(EVAL_MOTOR_SPEED, timetonext);\n\t\t\telse {\n\t\t\t\tLog.e(TAG, \"Guidance too slow\");\n\t\t\t\tmHandler.sendEmptyMessage(EVAL_MOTOR_SPEED);\n\t\t\t}\n\t\t}\n\t}", "org.auvua.utils.protobuffer.AUVprotocol.AUVCommand.MovementOrBuilder getSpeedOrBuilder();", "public void accelerate(){\n double acceleration = .1;\n if(xVel<0)\n xVel-=acceleration;\n if(xVel>0)\n xVel+=acceleration;\n if(yVel<0)\n yVel-=acceleration;\n if(yVel>0)\n yVel+=acceleration;\n System.out.println(xVel + \" \" + yVel);\n \n }", "public void driveStraight(double speed) {\r\n \tspeed = Math.abs(speed);\r\n \tint angle = getGyroAngle();\r\n \tdrivetrain.drive(speed, -1 * angle * kP);\r\n \tTimer.delay(0.004); //4 millisecond delay to allow for gyro to calibrate\r\n }", "public void redraw(double angle, double speed) {\n }", "public void strafe(double speed, boolean angle, double inches, double timeout){\n int newLeftTarget;\n int newRightTarget;\n int newLeftBottomTarget;\n int newRightBottomTarget;\n if (opModeIsActive()) {\n if (angle) {\n //strafe right\n // Determine new target position, and pass to motor controller\n newLeftTarget = robot.leftFrontMotor.getCurrentPosition() + (int)(Math.abs(inches) * COUNTS_PER_INCH);\n newLeftBottomTarget = robot.leftBackMotor.getCurrentPosition() + (int)(-Math.abs(inches) * COUNTS_PER_INCH);\n newRightTarget = robot.rightFrontMotor.getCurrentPosition() + (int)(-Math.abs(inches) * COUNTS_PER_INCH);\n newRightBottomTarget = robot.rightBackMotor.getCurrentPosition() + (int)(Math.abs(inches) * COUNTS_PER_INCH);\n robot.leftFrontMotor.setTargetPosition(newLeftTarget);\n robot.leftBackMotor.setTargetPosition(newLeftBottomTarget);\n robot.rightFrontMotor.setTargetPosition(newRightTarget);\n robot.rightBackMotor.setTargetPosition(newRightBottomTarget);\n\n // Turn On RUN_TO_POSITION\n robot.leftFrontMotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.leftBackMotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.rightFrontMotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.rightBackMotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n // reset the timeout time and start motion.\n runtime.reset();\n robot.leftFrontMotor.setPower(Math.abs(speed));\n robot.rightFrontMotor.setPower(Math.abs(speed));\n robot.leftBackMotor.setPower(Math.abs(speed));\n robot.rightBackMotor.setPower(Math.abs(speed));\n\n // keep looping while we are still active, and there is time left, and both motors are running.\n // Note: We use (isBusy() && isBusy()) in the loop test, which means that when EITHER motor hits\n // its target position, the motion will stop. This is \"safer\" in the event that the robot will\n // always end the motion as soon as possible.\n // However, if you require that BOTH motors have finished their moves before the robot continues\n // onto the next step, use (isBusy() || isBusy()) in the loop test.\n\n while (opModeIsActive() &&\n (runtime.seconds() < timeout) &&\n (robot.leftFrontMotor.isBusy() && robot.rightFrontMotor.isBusy())) {\n\n // Display it for the driver.\n telemetry.addData(\"Path1\", \"Running to %7d :%7d\", newLeftTarget, newRightTarget);\n telemetry.addData(\"Path2\", \"Running at %7d :%7d\",\n robot.leftFrontMotor.getCurrentPosition(),\n robot.rightFrontMotor.getCurrentPosition(), robot.leftBackMotor.getCurrentPosition(), robot.rightBackMotor.getCurrentPosition());\n telemetry.update();\n }\n // Stop all motion;\n robot.rightFrontMotor.setPower(0);\n robot.rightBackMotor.setPower(0);\n robot.leftFrontMotor.setPower(0);\n robot.leftBackMotor.setPower(0);\n\n // Turn off RUN_TO_POSITION\n robot.rightFrontMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.rightBackMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.leftFrontMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.leftBackMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n } else if (!angle) {\n //strafe left\n // Determine new target position, and pass to motor controller\n newLeftTarget = robot.leftFrontMotor.getCurrentPosition() + (int)(-Math.abs(inches) * COUNTS_PER_INCH);\n newLeftBottomTarget = robot.leftBackMotor.getCurrentPosition() + (int)(Math.abs(inches) * COUNTS_PER_INCH);\n newRightTarget = robot.rightFrontMotor.getCurrentPosition() + (int)(Math.abs(inches) * COUNTS_PER_INCH);\n newRightBottomTarget = robot.rightBackMotor.getCurrentPosition() + (int)(-Math.abs(inches) * COUNTS_PER_INCH);\n robot.leftFrontMotor.setTargetPosition(newLeftTarget);\n robot.leftBackMotor.setTargetPosition(newLeftBottomTarget);\n robot.rightFrontMotor.setTargetPosition(newRightTarget);\n robot.rightBackMotor.setTargetPosition(newRightBottomTarget);\n\n // Turn On RUN_TO_POSITION\n robot.leftFrontMotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.leftBackMotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.rightFrontMotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.rightBackMotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n // reset the timeout time and start motion.\n runtime.reset();\n robot.leftFrontMotor.setPower(Math.abs(speed));\n robot.rightFrontMotor.setPower(Math.abs(speed));\n robot.leftBackMotor.setPower(Math.abs(speed));\n robot.rightBackMotor.setPower(Math.abs(speed));\n\n // keep looping while we are still active, and there is time left, and both motors are running.\n // Note: We use (isBusy() && isBusy()) in the loop test, which means that when EITHER motor hits\n // its target position, the motion will stop. This is \"safer\" in the event that the robot will\n // always end the motion as soon as possible.\n // However, if you require that BOTH motors have finished their moves before the robot continues\n // onto the next step, use (isBusy() || isBusy()) in the loop test.\n\n while (opModeIsActive() &&\n (runtime.seconds() < timeout) &&\n (robot.leftFrontMotor.isBusy() && robot.rightFrontMotor.isBusy())) {\n\n // Display it for the driver.\n telemetry.addData(\"Path1\", \"Running to %7d :%7d\", newLeftTarget, newRightTarget);\n telemetry.addData(\"Path2\", \"Running at %7d :%7d\",\n robot.leftFrontMotor.getCurrentPosition(),\n robot.rightFrontMotor.getCurrentPosition(), robot.leftBackMotor.getCurrentPosition(), robot.rightBackMotor.getCurrentPosition());\n telemetry.update();\n }\n // Stop all motion;\n robot.rightFrontMotor.setPower(0);\n robot.rightBackMotor.setPower(0);\n robot.leftFrontMotor.setPower(0);\n robot.leftBackMotor.setPower(0);\n\n // Turn off RUN_TO_POSITION\n robot.rightFrontMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.rightBackMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.leftFrontMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.leftBackMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }\n }\n }", "public AutoRotateCommand(double angle){\r\n\t\tAHRS ahrs = new AHRS(Port.kMXP);\r\n\t\trequires(Robot.driveSys);\r\n\t\tdouble gangle = ahrs.getAngle();\t\r\n\t\tif(gangle < angle)\r\n\t\t\tspeed = -DEFAULT_SPEED;\r\n\t\telse\r\n\t\t\tspeed = DEFAULT_SPEED;\r\n\t}", "private void move() {\n acceleration.accelerate(velocity, position);\r\n }", "static float calculateNewVelocity(float a, float deltaTime, float v0) {\n return v0 + (a * deltaTime);\n }", "private void calculateMovement() {\r\n \tmovementY = (int)(movementSpeed * Math.sin(Math.toRadians(movementDirection - 90)));\r\n \tmovementX = (int)(movementSpeed * Math.cos(Math.toRadians(movementDirection - 90)));\r\n }", "public void gyroHold( double speed, double angle, double holdTime) {\n\n ElapsedTime holdTimer = new ElapsedTime();\n\n // keep looping while we have time remaining.\n holdTimer.reset();\n while ((holdTimer.time() < holdTime)) {\n // Update telemetry & Allow time for other processes to run.\n onHeading(speed, angle, P_TURN_COEFF);\n try {\n sleep(50);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n }\n\n // Stop all motion;\n leftmotor.setPower(0);\n rightmotor.setPower(0);\n }", "public void updateVelocity(){\r\n if (getPosition().x <= 0 || getPosition().x >= GameBoard.MAX_X) {\r\n setVelocity(getVelocity().add(getVelocity().mul(reverse)));\r\n }\r\n }", "public void accelerationSet(double speed){\n\t\tdouble currentDelta = Math.abs(currentSpeed - speed);\r\n\t\tif(currentDelta > maxDelta){\r\n\t\t\tif(speed > currentSpeed){\r\n\t\t\t\tspeed = currentSpeed + maxDelta;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tspeed = currentSpeed - maxDelta;\r\n\t\t\t}\r\n\t\t}\r\n\t//\tSystem.out.println(\"Speed:\" + speed);\r\n\t\tcurrentSpeed = speed;\r\n\t\tsuper.set(speed * motorDirection);\r\n\t}", "public void refreshMovementSpeed(){\n\t\tif(orientation==ORIENTATION.RIGHT) moveRight();\n\t\telse if(orientation==ORIENTATION.LEFT) moveLeft();\n\t\telse if(orientation==ORIENTATION.UP) moveUp();\n\t\telse if(orientation==ORIENTATION.DOWN) moveDown();\n\t}", "public void set(double speed) {\n if ((getRawAngle() < Constants.Hood.MIN_RAW_ANGLE && speed > 0)\n || (getRawAngle() > Constants.Hood.MAX_RAW_ANGLE && speed < 0)) {\n stop();\n } else {\n m_servo.setSpeed(speed);\n }\n }", "public float getVelAngle() {\n\t\tif (velocity.y == 0f && velocity.x == 0f)\n\t\t\treturn restrictAngle((float) Math.random() * float2pi);\n\t\tfloat result = (float) Math.atan2(velocity.y, velocity.x);\n\t\treturn restrictAngle(result);\n\t}", "private static void updateComponents(PhysicsGameObject obj, Vector3 position, Velocity velocity, Vector2 acceleration,double dt){\n\n integral(obj, dt);\n\n }", "private void calculateMotorOutputs(int angle, int strength) {\n Point cart_point = polarToCart(angle,strength);\n\n final double max_motor_speed = 1024.0;\n final double min_motor_speed = 600.0;\n\n final double max_joy_val = 100;\n\n final double fPivYLimit = 24.0; // 32.0 was originally recommended\n\n // TEMP VARIABLES\n double nMotPremixL; // Motor (left) premixed output (-100..+99)\n double nMotPremixR; // Motor (right) premixed output (-100..+99)\n int nPivSpeed; // Pivot Speed (-100..+99)\n double fPivScale; // Balance scale b/w drive and pivot ( 0..1 )\n\n\n // Calculate Drive Turn output due to Joystick X input\n if (cart_point.y >= 0) {\n // Forward\n nMotPremixL = (cart_point.x>=0)? max_joy_val : (max_joy_val + cart_point.x);\n nMotPremixR = (cart_point.x>=0)? (max_joy_val - cart_point.x) : max_joy_val;\n } else {\n // Reverse\n nMotPremixL = (cart_point.x>=0)? (max_joy_val - cart_point.x) : max_joy_val;\n nMotPremixR = (cart_point.x>=0)? max_joy_val : (max_joy_val + cart_point.x);\n }\n\n // Scale Drive output due to Joystick Y input (throttle)\n nMotPremixL = nMotPremixL * cart_point.y/max_joy_val;\n nMotPremixR = nMotPremixR * cart_point.y/max_joy_val;\n\n // Now calculate pivot amount\n // - Strength of pivot (nPivSpeed) based on Joystick X input\n // - Blending of pivot vs drive (fPivScale) based on Joystick Y input\n nPivSpeed = cart_point.x;\n fPivScale = (Math.abs(cart_point.y)>fPivYLimit)? 0.0 : (1.0 - Math.abs(cart_point.y)/fPivYLimit);\n\n // Calculate final mix of Drive and Pivot, produces normalised values between -1 and 1\n double motor_a_prescale = ( (1.0-fPivScale)*nMotPremixL + fPivScale*( nPivSpeed) ) /100;\n double motor_b_prescale = ( (1.0-fPivScale)*nMotPremixR + fPivScale*(-nPivSpeed) ) /100;\n\n // convert normalised values to usable motor range\n motor_a = (int)( motor_a_prescale * (max_motor_speed - min_motor_speed) + (Math.signum(motor_a_prescale)*min_motor_speed) );\n motor_b = (int)( motor_b_prescale * (max_motor_speed - min_motor_speed) + (Math.signum(motor_b_prescale)*min_motor_speed) );\n\n }", "public void update(Vehicle v, float dt) {\nPoint2D.Float p = v.getPosition();\r\nPoint2D.Float tp = target.getPosition();\r\nPoint2D.Float desired_velocity = new Point2D.Float(tp.x - p.x , tp.y - p.y);\r\nVehicle.scale(desired_velocity, v.getMaxSpeed());\r\nv.updateSteering(desired_velocity.x, desired_velocity.y);\r\n}", "public void update() {\n\t\tthis.set(owner.getX(), owner.getY(), owner.getX() + length*(float)Math.cos(angle),\n\t\t\t\towner.getY() + length*(float)Math.sin(angle));\n\t}", "public void setVelocity(double x, double y, double z) {\n/* 72 */ this.motionX = x;\n/* 73 */ this.motionY = y;\n/* 74 */ this.motionZ = z;\n/* */ \n/* 76 */ if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) {\n/* */ \n/* 78 */ float var7 = MathHelper.sqrt_double(x * x + z * z);\n/* 79 */ this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(x, z) * 180.0D / Math.PI);\n/* 80 */ this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(y, var7) * 180.0D / Math.PI);\n/* */ } \n/* */ }", "public void updateTrifecta() {\n\n\t\taccelX = (xl.getX() - 0) * 9.8 * Math.cos(angleToForward * (Math.PI / 180.0)); //convert from g's\n\t\taccelY = (xl.getY() - 0) * 9.8 * Math.sin(angleToForward * (Math.PI / 180.0));\n\t\taccelZ = (xl.getZ() - 0) * 9.8;\n\t\t\n\t\t//velocity updated by acceleration integral\n\t\tvelX += accelX * dT;\n\t\tvelY += accelY * dT;\n\t\tvelZ += accelZ * dT;\n\t\t\n\t\t//position updated by velocity integral and adjusted for robot rotation\n\t\tposX += velX * dT;\n\t\tposY += velY * dT;\n\t\tposZ += velZ * dT;\n\t}", "@Override\n public void update(float delta) {\n if (engine) {\n //accelerate\n velocity.x += acceleration * direction.x * delta;\n velocity.y += acceleration * direction.y * delta;\n } else {\n //decelerate\n velocity.scl((1 - (delta / 2))); //(1-delta/2) approx= 0.991\n\n //ship stops when speed is close to 0\n if (velocity.len() < 15) {\n velocity.setZero();\n }\n }\n //cap speed\n if (velocity.len() > speedCap) {\n velocity.setLength(speedCap);\n }\n\n //adjust ship position\n super.update(delta);\n }", "public void setSpeed( Vector2 sp ) { speed = sp; }", "public void setVelocity () {\n\t\t\tfb5.getCommunicationModule().setClientHandler(null);\n\t\t\tif(state == BotMove.SHARP_RIGHT){\n\t\t\t\tfb5.setVelocity((byte)200,(byte)0);\n\t\t\t}\n\t\t\telse if(state == BotMove.LEFT){\n\t\t\t\tfb5.setVelocity((byte)100,(byte)200);\n\t\t\t}\n\t\t\telse if(state == BotMove.SOFT_RIGHT){\n\t\t\t\tfb5.setVelocity((byte)200,(byte)100);\n\t\t\t}\n\t\t\telse if(state == BotMove.FORWARD){\n\t\t\t\twt.turning = false;\n\t\t\t\tLog.d(TAG,\"Setting forward velocity\");\n\t\t\t\tfb5.setVelocity((byte)150,(byte)150);\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(state == BotMove.STOP){\n\t\t\t\twt.turning = false;\n\t\t\t\tfb5.setVelocity((byte)0,(byte)0);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfb5.moveForward();\n\t\t\tfb5.accModifiedStart();\n\t\t}", "void setSpeed(RobotSpeedValue newSpeed);", "public void drive(double speed){\n \t\tsetRight(speed);\n \t\tsetLeft(speed);\n \t}", "public void updateAngle(){\n\t\tif (turnUp && (angle < 180) ){\n\t\t\tangle+=1;\n\t\t}\n\t\tif (turnDown && (angle > 0)){\n\t\t\tangle-=1;\n\t\t}\n\t}", "public void update()\n {\n // always roatating time by 7 for fixed point calculation\n x = (velocity*cos(theta) *time) >> 21;\n int yFirstPart = (int)(velocity*sin(theta)*time) >> 21;\n int ySecondPart = (int)((g*time*time) >> 15);\n y = yFirstPart - ySecondPart;\n y =initialY - y;\n x= x + initialX;\n time+= updateSpeed;\n if(lastY == -1)\n {\n lastY = y;\n }else{\n int direction = lastY - y;\n if(lastDirection == -1)\n {\n lastDirection = direction;\n }else{\n if(lastDirection != 0 && direction != 0)\n {\n \n int signOfDirection = lastDirection / Math.abs(lastDirection);\n int signOfLastDirection = direction / Math.abs(direction);\n if(signOfDirection != signOfLastDirection)\n {\n if(!reachedTop)\n {\n onTop();\n reachedTop = true;\n }\n \n setIsOnHalf(true);\n }\n }\n lastY = y;\n }\n \n }\n }", "public SetTiltSpeed(double speed) {\n requires(Robot.tilt);\n this.speed = speed;\n }", "public static void setMotorSpeed(double speed){\n setLeftMotorSpeed(speed);\n setRightMotorSpeed(speed);\n }", "public void accelerate(){\n speed += 5;\n }", "public void applyVelocityChange(final Vector2f velocityChange);", "public void turnTo(double angle, boolean stop) {\n \t\t\n \t\tdouble error = angle - this.myOdometer.getAng();\n \n \t\twhile (Math.abs(error) > DEG_ERR) {\n \n \t\t\terror = angle - this.myOdometer.getAng();\n \n \t\t\tif (error < -180.0) {\n \t\t\t\tthis.setSpeeds(-SLOW, SLOW);\n \t\t\t} else if (error < 0.0) {\n \t\t\t\tthis.setSpeeds(SLOW, -SLOW);\n \t\t\t} else if (error > 180.0) {\n \t\t\t\tthis.setSpeeds(SLOW, -SLOW);\n \t\t\t} else {\n \t\t\t\tthis.setSpeeds(-SLOW, SLOW);\n \t\t\t}\n \t\t}\n \n \t\tif (stop) {\n \t\t\tthis.setSpeeds(0, 0);\n \t\t}\n \t}", "public void bounce() {\n angle = -angle;\n }", "public void setRotationSpeed(double speed) {\n\t\trotationMotor.set(speed);\n\t}", "public org.auvua.utils.protobuffer.AUVprotocol.AUVCommand.MovementOrBuilder getSpeedOrBuilder() {\n return speed_;\n }", "private void getNextPosition() {\n \n if (turnLeft) {\n angleSpeed += angleMoveSpeed;\n if (angleSpeed > maxAngleSpeed) {\n angleSpeed = maxAngleSpeed;\n }\n angle += angleSpeed;\n \n if (angle > 360) {\n angle = angle - 360 + angleSpeed;\n }\n \n if (forward)\n {\n speed += moveSpeed;\n if (speed > maxSpeed)\n {\n speed = maxSpeed;\n }\n } else if (backwards)\n {\n speed -= moveSpeed;\n if (speed < -maxSpeed)\n {\n speed = -maxSpeed;\n }\n }\n }\n //moving in negative x direction\n if (turnRight) {\n angleSpeed -= angleMoveSpeed;\n if (angleSpeed < -maxAngleSpeed) {\n angleSpeed = -maxAngleSpeed;\n }\n angle += angleSpeed;\n \n if (angle < -360) {\n angle = angle + 360 - angleSpeed;\n }\n \n if (backwards)\n {\n speed -= moveSpeed;\n if (speed < -maxSpeed)\n {\n speed = -maxSpeed;\n }\n } else if (forward)\n {\n speed += moveSpeed;\n if (speed > maxSpeed)\n {\n speed = maxSpeed;\n }\n }\n }\n \n //moving in positive y direction\n if (backwards) {\n speed += moveSpeed;\n if (speed > maxSpeed) {\n speed = maxSpeed;\n }\n }\n //moving in negative y direction\n if (forward) {\n speed -= moveSpeed;\n if (speed < -maxSpeed) {\n speed = -maxSpeed;\n }\n }\n \n //not moving forward or backwards direction\n if (isNotMoving()) {\n //stop moving in the x direction\n if (speed > 0) {\n speed -= stopSpeed;\n if (speed < 0) {\n speed = 0;\n }\n }\n else if (speed < 0) {\n speed += stopSpeed;\n if (speed > 0) {\n speed = 0;\n }\n }\n \n if (isNotTurning()) {\n //stop moving in the y direction\n if (angleSpeed > 0) {\n angleSpeed -= stopSpeed;\n if (angleSpeed < 0) {\n angleSpeed = 0;\n }\n }\n else if (angleSpeed < 0) {\n angleSpeed += stopSpeed;\n if (angleSpeed > 0) {\n angleSpeed = 0;\n }\n }\n } \n }\n }", "private void setSpeed() {\n double cVel = cAccel*0.1;\n speed += round(mpsToMph(cVel), 2);\n speedOutput.setText(String.valueOf(speed));\n }", "public void update() {\n \n // move\n // Update velocity\n velocity.add(acceleration);\n // Limit speed\n velocity.limit(maxspeed);\n location.add(velocity);\n // Reset accelertion to 0 each cycle\n acceleration.mult(0);\n \n // decay life\n leftToLive = lifespan - (millis() - birth);\n }", "public double getVelocity() {\n \treturn this.currentSpeed;\n }", "private void updateVelWithAccel(Ball ball, double timeDelta) {\n if (!ball.isHeld()) {\n // Updating with Friction\n double magnitude = ball.getVelocity().length();\n magnitude = magnitude\n * (1 - this.MU * timeDelta - this.MU2 * magnitude\n * timeDelta);\n Vect intermediateVel = new Vect(ball.getVelocity().angle(),\n magnitude);\n \n // Updating using Gravity\n Vect withGrav = new Vect(intermediateVel.x(), intermediateVel.y()\n + this.GRAVITY * timeDelta);\n ball.setVelocity(withGrav);\n }\n }", "public void rotate(double angle) {\t\t\n\t\t// precompute values\n\t\tVector t = new Vector(this.a14, this.a24, this.a34);\n\t\tif (t.length() > 0) t = t.norm();\n\t\t\n\t\tdouble x = t.x();\n\t\tdouble y = t.y();\n\t\tdouble z = t.z();\n\t\t\n\t\tdouble s = Math.sin(angle);\n\t\tdouble c = Math.cos(angle);\n\t\tdouble d = 1 - c;\n\t\t\n\t\t// precompute to avoid double computations\n\t\tdouble dxy = d*x*y;\n\t\tdouble dxz = d*x*z;\n\t\tdouble dyz = d*y*z;\n\t\tdouble xs = x*s;\n\t\tdouble ys = y*s;\n\t\tdouble zs = z*s;\n\t\t\n\t\t// update matrix\n\t\ta11 = d*x*x+c; a12 = dxy-zs; a13 = dxz+ys;\n\t\ta21 = dxy+zs; a22 = d*y*y+c; a23 = dyz-xs;\n\t\ta31 = dxz-ys; a32 = dyz+xs; a33 = d*z*z+c;\n\t}", "public void setSpeed(int speed) {\n this.movementSpeed = speed;\n }", "public void changeVel(double xV, double yV){ \n this.xVel += xV;\n this.yVel += yV;\n }", "public void setCurrentSpeed (double speed);", "public void rotateToAngle(double angle) {\n controlState = ControlState.POSITION;\n outputPosition = -angle * TurretConstants.TICKS_PER_DEGREE;\n }", "public void setDriveSpeeds(double strafe, double forward, double rotate, double angle)\n {\n \tRobotMap.robotDrive.mecanumDrive_Cartesian(strafe, forward, rotate, angle);\n \tRobotMap.robotDrive.setInvertedMotor(RobotDrive.MotorType.kFrontLeft, true);\n \tRobotMap.robotDrive.setInvertedMotor(RobotDrive.MotorType.kRearLeft, true);\n\t\n }", "@Override\n public double speed() {\n \tif(Robot.drive.getDistance() > 120) {\n \t\treturn 0.2;\n \t}\n \treturn speed;\n }", "void setAngularVelocity(double omega) {\r\n // changing direction of rotation takes energy\r\n if (!expendEnergy(Math.abs(omega - angularVel) / 2))\r\n return;\r\n //sets amount of degree rotation per clock tick, in radians;\r\n //clockwise is positive\r\n angularVel = omega;\r\n }", "public void setRotationSpeed(int speed) {\r\n\t\tsendCommand(9, 5, 3, speed);\r\n\t}", "public float getSpeed() {\n\t\tfloat result = (float) Math.sqrt(velocity.x * velocity.x + velocity.y * velocity.y);\n\t\treturn result;\n\t}", "public void gyroHold( double speed, double angle, double holdTime) {\n\n ElapsedTime holdTimer = new ElapsedTime();\n\n // keep looping while we have time remaining.\n holdTimer.reset();\n while (opModeIsActive() && (holdTimer.time() < holdTime)) {\n // Update telemetry & Allow time for other processes to run.\n onHeading(speed, angle, P_TURN_COEFF);\n telemetry.update();\n }\n\n // Stop all motion;\n leftMotor.setPower(0);\n rightMotor.setPower(0);\n }" ]
[ "0.7781995", "0.7376984", "0.73603696", "0.7334631", "0.73236156", "0.72523385", "0.71382403", "0.7040417", "0.6939214", "0.65873057", "0.65224534", "0.6423757", "0.63872546", "0.6377203", "0.63748705", "0.63674587", "0.62813735", "0.626896", "0.62594223", "0.62346137", "0.6230621", "0.6211552", "0.6202155", "0.6194431", "0.6158271", "0.614191", "0.60936743", "0.60516095", "0.6040559", "0.60376906", "0.6019975", "0.6016439", "0.60089904", "0.59921235", "0.59896886", "0.5981647", "0.5973634", "0.5967767", "0.5965538", "0.5956556", "0.59443593", "0.5935913", "0.5927563", "0.5927563", "0.59018296", "0.5894163", "0.58898324", "0.5873881", "0.5853479", "0.5846042", "0.5826994", "0.5825265", "0.5814037", "0.5803388", "0.57866406", "0.5782376", "0.5772872", "0.5772294", "0.57612807", "0.5754308", "0.5752447", "0.573523", "0.57334805", "0.5728804", "0.5718379", "0.57153213", "0.5712976", "0.57076037", "0.5702646", "0.5700715", "0.5699131", "0.56883633", "0.56805646", "0.5675906", "0.5672329", "0.56675476", "0.56653464", "0.5662524", "0.5662267", "0.56545234", "0.5643012", "0.5629307", "0.56276995", "0.56175506", "0.56168383", "0.5616102", "0.5615046", "0.5612705", "0.5610698", "0.5608723", "0.56028557", "0.56004256", "0.5588136", "0.5582115", "0.5577961", "0.5577635", "0.5574907", "0.557154", "0.55693364", "0.55687225" ]
0.74982196
1
Creates a wishlist when one product is added to the list when created
public void createWishlist(Customer customer, Product product) { wishlistService.createWishlist(customerRepository.findByID(customer.getAccountID()), product); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addToWish( String product_id, String product_name,String product_brand, String product_img,\n String product_price,String product_desc, String product_discount, String product_varieties )\n {\n boolean isAdded = mDatabaseFavorite.insert(product_id, product_name,product_brand, product_img,\n product_price,product_discount);\n\n if (isAdded == true)\n {\n Toast.makeText(DetailActivity.this,\"Added to Favorite\",Toast.LENGTH_SHORT).show();\n\n }\n\n else {\n\n Toast.makeText(DetailActivity.this,\"Already present in favoriteList\",Toast.LENGTH_SHORT).show();\n\n }\n\n }", "public void createWishlist(Customer customer, List<Product> products) {\n wishlistService.createWishlist(customer, products);\n }", "public void addWishlistItem(WishlistItem wishItem){\n fStore.collection(\"user_profiles\").document(fUser.getUid()).collection(\"wishlist\").document(wishItem.getWishID()).set(wishItem).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n }\n });\n }", "public boolean addProductToWishlist(String productId) throws WishListException {\n\t\t// TODO Auto-generated method stub\n\t\tboolean result=false;\n\t\tif(ProductRepository.productList.get(productId) != null)\n\t\t{ if(WishlistDaoImpl.wlist.containsKey(productId))\n\t \t{\t\n\t\t\t throw new WishListException(\"WishList already contain this PRODUCT\");\n\t \t}\n\t\t else {\n\t\t\t result=WishlistDaoImplObj.addProductToWishlist(productId);\n\t\t return result;\n\t\t }\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new WishListException(\"Product ID not Found in Product List to Add in WishList\\n\");\n\t\t}\n\t \n\t\t\n\t}", "public void addProductToWishlist(Product product, long accountId) {\n wishlistService.addProduct(product, accountId);\n }", "private void save_to_wishlist(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws Exception {\n\t\t\n\t\tSystem.out.println(\"inside save to wishlist\");\n\t\tString cart_type = request.getParameter(\"cart_type\");\n\t\tSystem.out.println(cart_type);\n\t\tString quantity[] = request.getParameterValues(\"qty_name\");\n\t\tList lqty = new ArrayList();\n\t\tfor(int i=0;i<quantity.length;i++)\n\t\t{\n\t\t\tSystem.out.println(quantity[i]);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tUaddToCartMstVO mstVO = new UaddToCartMstVO();\n\t\tSystem.out.println(\"cart typw3333333333333333333333333333333\"+cart_type);\n\t\tmstVO.setCart_type(cart_type);\n\t\t\n\t\tHttpSession hs = request.getSession();\n\t\tint user_id=Integer.parseInt(hs.getAttribute(\"userID\").toString());\n\t\tSystem.out.println(\"User............\"+user_id);\n\t\t\n\t\tUaddToCartDAO addCartDAO;\n\t\taddCartDAO=new UaddToCartDAO();\n\n\t\tint BuyerregId = -1;\n\t\tloginVO logVo=new loginVO();\n\t\tlogVo.setLogin_id(user_id);\n\t\tList luser=addCartDAO.search_user_id(logVo);\n\t\tif(luser!=null && luser.size()>0)\n\t\t{\n\t\t\tUregistrationVO regVo=(UregistrationVO)luser.get(0);\n\t\t\tBuyerregId=regVo.getBuyer_user_id();\n\t\t\tSystem.out.println(\"Buyer user Id======================================================\"+BuyerregId);\n\t\t}\n\t\t\n\t\tUregistrationVO regVo=new UregistrationVO();\n\t\tregVo.setBuyer_user_id(BuyerregId);\n\t\t//System.out.println(\"User login id....\"+ regVo.getLoginVoObj().getLogin_id());\n\t\t\n\t\tmstVO.setBuyer_user_id(regVo);\n\t\t\n\t\t\t\t\n\t\taddCartDAO.save_to_wishlist(mstVO);\n\t\t\n\t\tSystem.out.println(\"--------------------------------------------------child Data insertion---------------------------------\");\n\t\t\n\t\t\n\t\tList l= (List)hs.getAttribute(\"product_data_wishlist\");\n\t\t\n\t\tSystem.out.println(\"LIST value::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\"+l.toString());\n\t\t\n\t\t\n\t\tUaddToCartVO addCartVO[]=new UaddToCartVO[l.size()];\n\t\t\n\t\tUaddToCartVO temp=new UaddToCartVO();\n\t\t\n\t\t\n\t\t\n\t\tfor(int i=0;i<l.size();i++)\n\t\t{\n\t\t\t\n\t\t\ttemp=(UaddToCartVO)l.get(i);\n\t\t\taddCartVO[i]=new UaddToCartVO();\n\t\t\taddCartVO[i].setCloth_id(temp.getCloth_id());\n\t\t\taddCartVO[i].setColor_code(temp.getColor_code());\n\t\t\taddCartVO[i].setPrice(temp.getPrice());\n\t\t\taddCartVO[i].setProduct_name(temp.getProduct_name());\n\t\t\taddCartVO[i].setSize(temp.getSize());\n\t\t\taddCartVO[i].setQuantity(Integer.parseInt(quantity[i]));\n\t\t\taddCartVO[i].setDesigner_user_id(temp.getDesigner_user_id());\n\t\t\taddCartVO[i].setCartMstVOObj(mstVO);\n\t\t\taddCartDAO.save_to_cart(addCartVO[i]);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*String type=mstVO.getCart_type();\n\t\tint userId=((UregistrationVO)mstVO.getBuyer_user_id()).getBuyer_user_id();\n\t\t\n\t\tSystem.out.println(\"---------------------------------------------------------------------------------------------------------------\");\n\t\tSystem.out.println(\"TYPE value is ::::::::::::::\"+type);\n\t\tSystem.out.println(\"USERID value is ::::::::::::::\"+userId);\n\n\t\tSystem.out.println(\"---------------------------------------------------------------------------------------------------------------\");\n\t\t\n*/\t\t\n\t\tresponse.sendRedirect(request.getContextPath()+\"/user/add_to_wishlist.jsp\");\n\t}", "@Override\n public void onClick(View view) {\n String name = getResources().getString(R.string.stock_shopping_list) + \": \" + productList.getName();\n StockShoppingList stockShoppingList = ((Stock)productList).generateShoppingList(name);\n StockShoppingListDao dao = new StockShoppingListDao(getDaoProductList().getBDConnection());\n if(((Stock)productList).getAssociatedListId() != -1) {\n // Si ya tiene una lista de la compra asociada la eliminamos para crear la nueva\n stockShoppingList.setID(((Stock) productList).getAssociatedListId());\n dao.remove(stockShoppingList);\n }\n int shoppingListId = dao.insert(stockShoppingList);\n\n // Actualizamos el id del stock\n ((Stock) productList).setAssociatedListId(shoppingListId);\n getDaoProductList().update((Stock)productList);\n\n // Mostramos un mensaje de exito\n Toast.makeText(getContext(),String.format(getResources().getString(R.string.info_msg_stock_shopping_list_created),name),Toast.LENGTH_LONG).show();\n }", "@Override\n\tpublic WishList addProductToWishList(List<String> productName, Long userId) {\n\t\tList<Product> allProduct = productDAO.getallProduct();\n\t\t\n\t\t\n\t\t\n\t\tfor(String p : productName) {\n\t\t\tProduct product = productDAO.getProductByName(p).get(0);\n\t\t\t\n\t\t\t\n\t\t\tif(allProduct.contains(p)) {\n\t\t\t\tUserDetail user = userDetailDAO.getUserById(userId).get(0);\n\t\t\t\tif(user.getWishList().getProducts().contains(p)) {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tWishList wishList = new WishList();\n\t\t\t\t\tList<Product> prod = new ArrayList<>();\n\t\t\t\t\tprod.add(product);\n\t\t\t\t\twishList.setProducts(prod);\n\t\t\t\t\tuser.setWishList(wishList);\n\t\t\t\t\tuserDetailDAO.save(user);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn userDetailDAO.getUserById(userId).get(0).getWishList();\n\t}", "public boolean insertWishlist(ProductDetail productDetail) {\n\n db = helper.getWritableDatabase();\n ContentValues v = new ContentValues();\n v.put(DatabaseConstant.TABLE_WISHLIST_ID, productDetail.getId());\n v.put(DatabaseConstant.TABLE_WISHLIST_TITLE, productDetail.getTitle());\n v.put(DatabaseConstant.TABLE_WISHLIST_PRICE, productDetail.getPrice());\n v.put(DatabaseConstant.TABLE_WISHLIST_ORDER_QUANTITY, productDetail.getOrder_quantity());\n v.put(DatabaseConstant.TABLE_WISHLIST_QUANTITY_TYPE, productDetail.getQuantity_type());\n v.put(DatabaseConstant.TABLE_WISHLIST_MIN_QUAITITY, productDetail.getMin_quantity());\n v.put(DatabaseConstant.TABLE_WISHLIST_AVAILABILITY, productDetail.getAvailability());\n v.put(DatabaseConstant.TABLE_WISHLIST_DISCOUNT, productDetail.getDiscount());\n v.put(DatabaseConstant.TABLE_WISHLIST_IMAGE, productDetail.getImage());\n v.put(DatabaseConstant.TABLE_WISHLIST_RATING, productDetail.getRating());\n v.put(DatabaseConstant.TABLE_WISHLIST_DESCRIPTION, productDetail.getDescription());\n v.put(DatabaseConstant.TABLE_WISHLIST_TYPE, productDetail.getType());\n v.put(DatabaseConstant.TABLE_WISHLIST_QUANTITY, productDetail.getQuantity());\n long isCheck = db.insert(DatabaseConstant.TABLE_NAME_WISHLIST, null, v);\n if (isCheck > 0) {\n return true;\n } else {\n return false;\n }\n }", "@FXML\r\n\tpublic void addToShoppingCart() {\r\n\t\t\r\n\t\tWatch w = listView.getSelectionModel().getSelectedItem();\r\n\t\tboolean add = controller.addWatchToShoppingCart(w);\r\n\t\tcontroller.deleteWishlistItem(w.getId());\r\n\t\tlistView.setItems(controller.getWishlistWatchesForCurrentUser());\r\n\t\tlistView.getSelectionModel().select(-1);\r\n\t\tcheckSelected();\r\n\t}", "private void getWishListInfo(final long productId) {\n User user = SettingsMy.getActiveUser();\n if (user != null) {\n // determine if product is in wishlist\n //String wishlistUrl = String.format(EndPoints.WISHLIST_IS_IN_WISHLIST, SettingsMy.getActualNonNullShop(getActivity()).getId(), productId);\n String wishlistUrl = String.format(EndPoints.WISHLIST);\n GsonRequest<WishlistResponse> getWishlistInfo = new GsonRequest<WishlistResponse>(Request.Method.GET, wishlistUrl, null, WishlistResponse.class, new Response.Listener<WishlistResponse>() {\n @Override\n public void onResponse(@NonNull WishlistResponse response) {\n if(response != null) {\n if(response.getStatusText() != null && response.getStatusCode() != null) {\n if (response.getStatusCode().toLowerCase().equals(CONST.RESPONSE_CODE) || response.getStatusText().toLowerCase().equals(CONST.RESPONSE_UNAUTHORIZED)) {\n LoginDialogFragment.logoutUser(true);\n DialogFragment loginExpiredDialogFragment = new LoginExpiredDialogFragment();\n loginExpiredDialogFragment.show(getFragmentManager(), LoginExpiredDialogFragment.class.getSimpleName());\n }\n }\n else\n prepareWishListButton(response, productId);\n }\n else\n Timber.d(\"returned null response during getWishListInfo\");\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n MsgUtils.logAndShowErrorMessage(getActivity(), error);\n }\n }, getFragmentManager(), \"\");\n getWishlistInfo.setRetryPolicy(MyApplication.getDefaultRetryPolice());\n getWishlistInfo.setShouldCache(false);\n MyApplication.getInstance().addToRequestQueue(getWishlistInfo, CONST.PRODUCT_REQUESTS_TAG);\n }\n }", "protected Order createWishlistCart(HttpServletRequest request, String wishlistName) {\r\n Order currentWishlistOrder = cartService.createNamedOrderForCustomer(wishlistName, customerState.getCustomer(request));\r\n return currentWishlistOrder;\r\n }", "@Then(\"I click on Add to WishList button for the Leica T Mirrorless Digital camara product.\")\n public void i_click_on_add_to_wish_list_button_for_the_leica_t_mirrorless_digital_camara_product() {\n BasePage.driverUtils.waitForWebElementToBeClickable(BasePage.leicaTMirrorlessDigitalCamPage.getLeicaTMirrorlessCamAddToWishListButton());\n BasePage.leicaTMirrorlessDigitalCamPage.getLeicaTMirrorlessCamAddToWishListButton().click();\n }", "@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 }", "void addList(ShoppingList _ShoppingList);", "@Test\r\n\tpublic void test_7and8_AddToList() throws Exception {\n\t\texecutor = (JavascriptExecutor) driver;\r\n\t\texecutor.executeScript(\"window.scrollTo(0, 600)\");\r\n\t\t// click on add to list button\r\n\t\tdriver.findElement(By.id(\"add-to-wishlist-button-submit\")).click();\r\n\t\tThread.sleep(3000);\r\n\r\n\t\t// get selected item \r\n\t\tWebElement element = driver.findElement(By.xpath(\"//span[@id='productTitle']\"));\r\n\t\tselectedItem = element.getText();\r\n\t\t// click on view the wish list\r\n\t\tdriver.findElement(By.cssSelector(\"span.w-button-text\")).click();\r\n\t\tThread.sleep(3000);\r\n\r\n\t\t// test 8\r\n\t\t// create an array of product titles to get items in wish list\r\n\t\t// get the product title in wish list then compare with selected item\r\n\t\tList<WebElement> productTitles = driver.findElements(By.xpath(\"//div[@id='g-items']//h5\")); \r\n\t\tfor(WebElement productTitle : productTitles) {\r\n\t\t\t// compare selected item and any item in wish list\r\n\t\t\tString listedItem = productTitle.getText(); \r\n\t\t\tif (listedItem.equals(selectedItem)) {\r\n\t\t\t\tSystem.out.println(listedItem + \" is added to wish list\");\r\n\t\t\t\tAssert.assertTrue(listedItem.equals(selectedItem));\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "public void add_item_button(View v){\n if(expiry_date==0){ //if no expiry date was chosen,\n if(product_name.equals(\"Milk\")){//and if the product is milk, \n expiry_date=7; //set it to the default of 7 days until expiry\n }else{//If the product is bread,\n expiry_date=3;//set it to the default of 7 days until expiry\n }\n }\n Product added_p=new Product(product_name,expiry_date); //added_p : product chosen by the user that they currently own\n added_list.add(added_p); //this product is added to the list \n text=(TextView) findViewById(R.id.added_list);\n String content=\"\";\n for(Product p:added_list){\n content=content+(p.getProduct_name()+\" \"+p.getProduct_exp()+\" days \\n\"); //then displayed to show the user \n }\n text.setText(content);\n }", "private void registerClick() {\n listView = (ListView) findViewById(R.id.listViewPick);\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n private AdapterView parent;\n\n @Override\n public void onItemClick(AdapterView<?> parent, View viewClicked, int position, long id) {\n this.parent = parent;\n TextView textView = (TextView) viewClicked;\n //String message = \"You clicked # \" + position + \", which is list: \" + textView.getText().toString();\n //Toast.makeText(PickExisting.this, message, Toast.LENGTH_SHORT).show();\n\n String name = textView.getText().toString();\n Product product = new Product();\n product = myDB.findProdByName(name);\n\n if (FROM.equals(\"UseList\")) {\n myDB.addListProduct(FORWARD, product);\n }else{\n myDB.addInventoryProduct(FORWARD, product);\n }\n }\n });\n }", "public static void addToWishList(String item, String messageOnFailure) {\n String wishlistCount = getText(WISHLIST_UPPER_MENU);\n System.out.println(\"Current wishlist count: \" + wishlistCount);\n\n type(SEARCH_FIELD_INPUT, item);\n click(SEARCH_ICON);\n List<WebElement> wishlistButtons = Browser.driver.findElements(ADD_TO_WISHLIST_BUTTON);\n wishlistButtons.get(0).click();\n Browser.driver.navigate().refresh();\n\n String wishlistCountAfterItemAdded = getText(WISHLIST_UPPER_MENU);\n System.out.println(\"Wishlist count after item is added: \" + wishlistCountAfterItemAdded);\n assertFalse(wishlistCountAfterItemAdded.matches(wishlistCount), messageOnFailure);\n }", "public void addProduct(String c, String p){\n\t\ttry {\n\t\t\tif(!hasProduct(c, p)){\n\t\t\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t\t\tif( c.equals(list.get(i).getUsername()) ){\n\t\t\t\t\t\tlist.get(i).getWishlist().add(p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IllegalArgumentException e){\n\t\t\tSystem.out.println(\"Customer\" + c + \"is not in the datavase.\");\n\t\t}\n\t}", "@Test(priority=3)\n\t\tpublic void addToWishlist() throws Exception{\n\t\t\t\n//'**********************************************************\n//Calling method to click on 'Add to Wishlist' link and verify success toast is displayed\n//'**********************************************************\n\t\t\tThread.sleep(1500);\n\t\t\tgalaxyPage.clickOnAddToWishlist();\n\t\t\tThread.sleep(1500);\n\t\t\tAssert.assertTrue(galaxyPage.getSuccessMessage().contains(\"Success\"), \"Product is not added to Wishlist\");\n\t\t\textentTest.log(LogStatus.PASS,\"Success: You have added Samsung Galaxy Tab 10.1 to your wish list!\");\n//'**********************************************************\n//Calling method to close the success toast\n//'**********************************************************\n\t\t\tgalaxyPage.closeSuccesstoast();\n//'**********************************************************\n//Calling method to click on 'Wishlist' link and check user is redirected to 'My Wishlist' page\n//'**********************************************************\n\t\t\tmyWishlistPage = galaxyPage.clickOnWishlist();\n\t\t\t\n\t\t\tAssert.assertTrue(myWishlistPage.getTitle().equals(\"My Wish List\"), \"User is not redirected to wishlist page\");\n\t\t\textentTest.log(LogStatus.PASS,\"User is redirected to My Wishlist Page\");\n\t\t\t\n//'**********************************************************\n//Verifying count in 'Wishlist' link is equal to number of products in the page\n//'**********************************************************\n\t\t\tAssert.assertEquals(myWishlistPage.valueInWishlistLink(), myWishlistPage.numOfProductsInTable(), \"Value shown in wishlist link is different from number of records in the table\");\n\t\t\textentTest.log(LogStatus.PASS,\"Product added: Value shown in wishlist link is equal to number of records in the table\");\n\t\t\t\n\t\t\t}", "private void notifyWishlists(String title) {\n\t\tfor(User u:LibrarySystem.getInstance().users) {\n\t\t\tfor(String wish:u.getWishlist()) {\n\t\t\t\tif(wish.equalsIgnoreCase(title)) {\n\t\t\t\t\tu.notify(\"An item from your wishlist had been added: \" + title + \"!\");\n\t\t\t\t\t//u.getWishlist().remove(title);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public synchronized void clickOnWishList(WebDriver driver) throws Exception {\n\n\t\tutils.isElementPresent(driver, \"Add_To_WishList\");\n\n\t\ttry {\n\n\t\t\tWebElement elem = utils.findElementByLocator(driver, \"Add_To_WishList\", \"Add To Wishlist not clicked\");\n\t\t\telem.click();\n\t\t\tReporterLog.actionMsg(\"Add To WishList clicked\");\n\n\t\t} catch (Exception e) {\n\n\t\t\tCustomException.throwExceptionError(e, \"PDP\", \"Add To WishList action failed\", driver);\n\t\t}\n\t}", "public HashMap<String, ProductDTO> displayProductInWishlist() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\treturn WishlistDaoImpl.wlist ;\n\t}", "@PostMapping(\"/wishLists/{custId}/{prodId}\")\r\n\tpublic ResponseEntity<WishList> createWishList(@PathVariable(\"custId\") Integer custId, @PathVariable(\"prodId\") Integer prodId,@PathVariable(\"category3\") String category3) {\r\n\t\tList<Inventory> inventory= inventoryService.getAllInventory();\r\n\t\tList<Inventory> inventory1=new ArrayList();\r\n\t\t\r\n\t\tcategory3=\"Books\";\r\n\t\tfor (Inventory c : inventory) {\r\n\t\t\tCategory category= c.getCategory();\r\n\t\t\tString cat=category.getCategoryName();\r\n\t\t\tif(cat.equals(category3)) {\r\n\t\t\t\r\n\t\t\t\tInventory inv=new Inventory();\r\n\t\t\t\tinv.setProductId(c.getProductId());\r\n\t\t\t\tinv.setProductName(c.getProductName());\r\n\t\t\t\tinv.setPrice(c.getPrice());\r\n\t\t\t\tinv.setCategory(c.getCategory());\r\n\t\t\t\tinv.setDescription(c.getDescription());\r\n\t\t\t\t\r\n\t\t\t\tinventory1.add(inv);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(inventory1==null)\r\n\t\t\treturn new ResponseEntity\r\n\t\t\t\t(\"Sorry! Inventory details not available!\",HttpStatus.NOT_FOUND);\r\n\t\treturn new ResponseEntity<WishList>(HttpStatus.OK);\r\n\t\r\n\t\t\r\n}", "public static MozuUrl addItemToWishlistUrl(String responseFields, String wishlistId)\r\n\t{\r\n\t\tUrlFormatter formatter = new UrlFormatter(\"/api/commerce/wishlists/{wishlistId}/items?responseFields={responseFields}\");\r\n\t\tformatter.formatUrl(\"responseFields\", responseFields);\r\n\t\tformatter.formatUrl(\"wishlistId\", wishlistId);\r\n\t\treturn new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;\r\n\t}", "@Override\n public void addProductToFavorites(View view, Intent intent) {\n try {\n if(iProduct != null && view != null && intent != null){\n Context context = view.getContext();\n String jsonProduct = intent.getStringExtra(CommonPresenter.DETAIL_PRODUCT);\n Product product = CommonPresenter.getProductFromJSON(jsonProduct);\n CRUDFavorite crudFavorite = new CRUDFavorite(context);\n boolean isProductExists = crudFavorite.isProductExists(product.getProductId());\n if(isProductExists){\n crudFavorite.deleteByProductId(product.getProductId());\n CommonPresenter.showSnackBarMessage(view, context.getString(R.string.lb_product_delete_to_favorite));\n iProduct.changeImageRightResource(R.drawable.ic_add_to_favorite_32dp);\n }\n else{\n crudFavorite.add(new Favorite(0, product));\n CommonPresenter.showSnackBarMessage(view, context.getString(R.string.lb_product_add_to_favorite));\n iProduct.changeImageRightResource(R.drawable.ic_favorite_32dp);\n }\n }\n }\n catch (Exception ex){\n Log.e(\"TAG_ERROR\", \"ProductPresenter-->addProductToFavorites() : \"+ex.getMessage());\n }\n }", "@GET\n @Path(\"/addwl/{beerId}\")\n @Produces({MediaType.TEXT_XML, MediaType.APPLICATION_JSON , MediaType.APPLICATION_XML })\n public long addBeerToWishList( @PathParam(\"beerId\") Long beerId) {\n\t\t\n \t\n \thelper = new Helper();\n\t\tsoapService = helper.getSoapService();\n\t\tUser user = helper.getUserByUsername(username);\n Beer beer = soapService.readBeer(beerId);\n \n soapService.addBeerToUser(user, beer);\n \n System.out.println(\"beer added to wishlist...\");\n \n \treturn beerId;\n \t \t\n }", "public void addProduct(Product p){\n stock.add(p);\n }", "public WishlistItemTbl (\n\t\t Integer in_wishlistItemId\n ) {\n\t\tthis.setWishlistItemId(in_wishlistItemId);\n }", "public void rbListAddElement() {\n rbProductType.clear();\n rbProductType.add(rbScs);\n rbProductType.add(rbSko);\n rbProductType.add(rbMko);\n rbProductType.add(rbZko);\n }", "Product addNewProductInStore(Product newProduct);", "@Override\n public void onClick(View v) {\n FavouriteDatabase fd = new FavouriteDatabase();\n fd.addToFavouritesList(catID);\n Toast.makeText(getContext(), \"Added to your Favourites\", Toast.LENGTH_SHORT).show();\n }", "public void btnAddClicked(View view){\n List list = new List(input.getText().toString());\n dbHandler.addProduct(list);\n printDatabase();\n }", "public void addButtonClicked(){\n Products products = new Products(buckysInput.getText().toString());\n dbHandler.addProduct(products);\n printDatabase();\n }", "@POST\n\t@Path(\"/getWishlist\")\n\t@Consumes(\"application/json\")\n\t@Produces(\"application/json\")\n\tpublic String getWishlist(WishlistProduct user_data) {\n\t\t\n\t\tWishlistProductDAO WishlistProductDao = new WishlistProductDAO();\n\t\tList<WishlistProduct> wishlistedProducts = WishlistProductDao.getWishlistProductsByWishlistID(user_data.getWishlist_id());\n\t\t\n\t\tWishlistDAO WishlistDao = new WishlistDAO();\n\t\tWishlist wishlist = WishlistDao.getWishlistDetailsByID(user_data.getWishlist_id());\n\t\t\n\t\tJSONArray products = new JSONArray();\n\t\t\n\t\tfor(int i=0; i<wishlistedProducts.size();i++)\n\t\t{\n\t\t\tJSONObject product = new JSONObject();\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tproduct.put(\"wishlist_name\", wishlist.getName());\n\t\t\t\tproduct.put(\"req_qty\", wishlistedProducts.get(i).getQuantity());\n\t\t\t\tproduct.put(\"remaining_qty\", wishlistedProducts.get(i).getRemaining_qty());\n\t\t\t\tproduct.put(\"address\", wishlistedProducts.get(i).getAddress());\n\t\t\t\tproduct.put(\"reason\", wishlistedProducts.get(i).getReason());\n\t\t\t\t\t\n\t\t\t\tCatalogDAO CatalogDao = new CatalogDAO();\n\t\t\t\tCatalog productDetails = CatalogDao.getProductByID(wishlistedProducts.get(i).getProduct_id());\n\t\t\t\t\n\t\t\t\tproduct.put(\"product_id\", productDetails.getProduct_id());\n\t\t\t\tproduct.put(\"product_name\", productDetails.getProduct_name());\n\t\t\t\tproduct.put(\"product_qty\", productDetails.getQuantity());\n\t\t\t\tproduct.put(\"brand\", productDetails.getBrand());\n\t\t\t\tproduct.put(\"description\", productDetails.getDescription());\n\t\t\t\tproduct.put(\"price\", productDetails.getPrice());\n\t\t\t\tproduct.put(\"pic_location\", productDetails.getPic_location());\n\t\t\t\t\n\t\t\t\tproducts.put(product);\n\t\t\t\t\n\t\t\t}\n\t\t\tcatch (JSONException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t}\n\t\t\n\t\treturn products.toString();\n\t\t\n\t}", "public void add_to_my_list_process(View v) {\n\n addToCart_flag = false;\n // get current login value saved in sharedpreferences object\n SharedPreferences loginSharedPref = getSharedPreferences(\"LoginData\", MODE_PRIVATE);\n // get current agent id\n final String AgentID = loginSharedPref.getString(\"ID\", \"\");\n // create string\n create_final_string_product();\n /* get all list names into arraylist object */\n ArrayList<String> listNames = get_list_data_from_local_DB(AgentID);\n // display alert box to choose list name by user\n display_list_names(listNames, AgentID);\n // clear all data after adding product into cart\n clear_data();\n }", "public void addProduct(Product product);", "public void addProductToList(Product aProduct){\n listOfProduct.add(aProduct);\n }", "public void addToBasket(Product product){\n\n Purchaseitem purchaseitem = new Purchaseitem();\n purchaseitem.setProduct(product.getId());\n purchaseitem.setProductByProduct(product);\n boolean toAdd = false;\n if(basket.isEmpty()){\n purchaseitem.setQuantity(1);\n basket.add(purchaseitem);\n }else {\n for(int i = 0; i < basket.size(); i++){\n if(basket.get(i).getProduct() == product.getId()){\n basket.get(i).setQuantity(basket.get(i).getQuantity() + 1);\n return;\n } else {\n purchaseitem.setQuantity(1);\n toAdd = true;\n }\n }\n }\n if(toAdd){\n basket.add(purchaseitem);\n }\n }", "void addToFavorites(int recipeId);", "@Override\n public void onClick(View v) {\n if (productName.getText().toString().isEmpty()) {\n Toast.makeText(getActivity(), getResources().getString(R.string.need_product_name), Toast.LENGTH_SHORT).show();\n //add product\n } else if (productQuantity.getText().toString().isEmpty()) {\n // add with capitalized name\n productList.add(new Product(WordUtils.capitalize(productName.getText().toString())));\n //update user\n user.setShoppingLists(shoppingLists);\n dataController.saveUser(user);\n } else if (!productQuantity.getText().toString().isEmpty()) {\n productList.add(new Product(WordUtils.capitalize(productName.getText().toString()), Integer.parseInt(productQuantity.getText().toString()), quantityType.getSelectedItemPosition()));\n //update user\n user.setShoppingLists(shoppingLists);\n dataController.saveUser(user);\n }\n //update list\n adapter.notifyDataSetChanged();\n //close dialog\n dialog.dismiss();\n }", "public WishlistItemTbl () {\n\t\tsuper();\n\t}", "@Test\n public void bookAddedToWishlistSuccessfully() throws InterruptedException {\n //WebElement Books Link\n clickOnElement(By.xpath(\"//ul[@class='top-menu notmobile']//li[5]/a\"));\n\n //WebElement Position dropdown box\n selectByIndexFromDropDown(By.cssSelector(\"select#products-orderby\"),1);\n\n //Scroll down page\n windowScrollUpOrDown(0,500);\n sleepMethod(2000);\n\n //WebElement for wishlist button\n clickOnElement(By.xpath(\"//div[@class='item-grid']//div[1]//div[1]//div[2]//div[3]//div[2]//input[3]\"));\n\n String expectedTxt = \"The product has been added to your wishlist\";\n String actualTxt = getTextFromElement(By.xpath(\"//p[@class='content']\"));\n Assert.assertEquals(expectedTxt, actualTxt);\n }", "public long addProductShoppingList(String name){\n return addProductShoppingList(name, 0, 0, \"\");\n\n }", "void addProduct(Product product);", "public void addBuy() {\r\n\t\tbuys++;\r\n\t\tnotifyObservers();\r\n\t}", "public void addProductToBuyBasket(Product product, int count) {\n if (buyBasket.containsKey(product.getId()))\n buyBasket.replace(product.getId(), buyBasket.get(product.getId() + count));\n else\n buyBasket.put(product.getId(), count);\n }", "private void addToFavorites() {\n\n favoriteBool = true;\n preferencesConfig.writeAddFavoriteTip(shownTipIndex);\n Toast.makeText(getContext(), \"Added to favorites.\", Toast.LENGTH_SHORT).show();\n\n }", "public void create(Pizza pizza){\n pizza.setID(counter++);\n pizzas.add(pizza);\n }", "@Test(priority =1)\n\tpublic void userAddProductsToCompareList() {\n\t\tsearch = new SearchPage(driver);\n\t\tproductDetails = new ProductDetailsPage(driver);\n\t\tcompare = new AddToCompareListPage(driver);\n\n\t\tsearch.searchUsingAutoCompleteList(\"niko\");\n\t\tassertTrue(productDetails.productNameInBreadCrumb.getText().equalsIgnoreCase(firstProductName));\n\t\tproductDetails.addToCompareList();\n\t\t\n\t\tsearch.searchUsingAutoCompleteList(\"leic\");\n\t\tproductDetails = new ProductDetailsPage(driver);\n\t\tassertTrue(productDetails.productNameInBreadCrumb.getText().equalsIgnoreCase(secondProductName));\n\t\tproductDetails.addToCompareList();\n\t\tproductDetails.openProductComparisonPage();\n\t\tcompare.compareProducts();\n\n\t}", "public addproduct() {\n\t\tsuper();\n\t}", "public void createNewList(ActionEvent actionEvent) {\n // ideally again, this would have its own window\n // give it a title, and optionally populate it with some items\n }", "public void addProduct(Product item)\n {\n stock.add(item);\n }", "@Override\n public void onComplete(@NonNull Task<Void> task) {\n if(task.isSuccessful()){\n\n if(wishlistModelList.size() !=0 ){\n wishlistModelList.remove(index);\n MyWishlistFragment.wishlistAdapter.notifyDataSetChanged();\n }\n ProductDetailsActivity.ALREADY_ADDED_TO_WISHLIST = false;\n Toast.makeText(context, \"removed successfully!!\", Toast.LENGTH_SHORT).show();\n\n }\n else{\n if (ProductDetailsActivity.addToWishListBtn != null) {\n ProductDetailsActivity.addToWishListBtn.setSupportImageTintList(context.getResources().getColorStateList(R.color.colorPrimary));\n }\n wishList.add(index,removedProductId);\n String error = task.getException().getMessage();\n Toast.makeText(context, error, Toast.LENGTH_SHORT).show();\n }\n// if (ProductDetailsActivity.addToWishListBtn != null) {\n// ProductDetailsActivity.addToWishListBtn.setEnabled(true);\n// }\n\n ProductDetailsActivity.running_wishlist_query = false;\n }", "@FXML\n\tpublic void createProduct(ActionEvent event) {\n\t\tif (!txtProductName.getText().equals(\"\") && !txtProductPrice.getText().equals(\"\")\n\t\t\t\t&& ComboSize.getValue() != null && ComboType.getValue() != null && selectedIngredients.size() != 0) {\n\n\t\t\tProduct objProduct = new Product(txtProductName.getText(), ComboSize.getValue(), txtProductPrice.getText(),\n\t\t\t\t\tComboType.getValue(), selectedIngredients);\n\n\t\t\ttry {\n\t\t\t\trestaurant.addProduct(objProduct, empleadoUsername);\n\n\t\t\t\ttxtProductName.setText(null);\n\t\t\t\ttxtProductPrice.setText(null);\n\t\t\t\tComboSize.setValue(null);\n\t\t\t\tComboType.setValue(null);\n\t\t\t\tChoiceIngredients.setValue(null);\n\t\t\t\tselectedIngredients.clear();\n\t\t\t\tproductOptions.clear();\n\t\t\t\tproductOptions.addAll(restaurant.getStringReferencedIdsProducts());\n\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Todos los campos deben de ser llenados\");\n\t\t\tdialog.setTitle(\"Error al guardar los datos\");\n\t\t\tdialog.show();\n\t\t}\n\n\t}", "public void requestWishList() {\n if (!hasInternetConnection()) {\n PromeetsDialog.show(this, getString(R.string.no_internet));\n } else {\n UserPOJO userPOJO = (UserPOJO) PromeetsUtils.getUserData(PromeetsPreferenceUtil.USER_OBJECT_KEY, UserPOJO.class);\n if (userPOJO == null) finish();\n String[] key = {Constant.USERID, Constant.PAGENUMBER};\n String[] value = {userPOJO.id + \"\", page + \"\"};\n\n PromeetsDialog.showProgress(this);\n HashMap<String, String> header = new HashMap<>();\n header.put(\"ptimestamp\", ServiceHeaderGeneratorUtil.getInstance().getPTimeStamp());\n header.put(\"promeetsT\", ServiceHeaderGeneratorUtil.getInstance().getPromeetsTHeader(Constant.FETCH_MY_WISH_LIST));\n header.put(\"accessToken\", ServiceHeaderGeneratorUtil.getInstance().getAccessToken());\n header.put(\"API_VERSION\", Utility.getVersionCode());\n new GenericServiceHandler(Constant.ServiceType.WISH_LIST, this, PromeetsUtils.buildURL(Constant.FETCH_MY_WISH_LIST, key, value), null, header, IServiceResponseHandler.GET, false, \"Please wait!\", \"Processing..\").execute();\n }\n }", "public void createPromo() {\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Whats the new promo's name?\");\r\n\t\tthis.name = sc.nextLine();\r\n\t\tSystem.out.println(\"Whats the new promo's description?\");\r\n\t\tthis.description = sc.nextLine();\r\n\t\tSystem.out.println(\"Whats the new promo's price?\");\r\n\t\tthis.price = sc.nextDouble();\r\n\t\tint createChoice = 0;\r\n\t\twhile (createChoice < 2){\r\n\t\t\tSystem.out.println(\"What would you like to do?\");\r\n\t\t\tSystem.out.println(\"1. add items 2. quit\");\r\n\t\t\tcreateChoice = sc.nextInt();\r\n\t\t\tsc.nextLine();\r\n\t\t\tif (createChoice == 1){\r\n\t\t\t\tthis.addPromoItem();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void createNewListSection() {\n\t\tImageIcon image10 = new ImageIcon(sURLFCL1);\n\t\tImageIcon image11 = new ImageIcon(sURLFCL2);\n\t\tImageIcon image12 = new ImageIcon(sURLFCL3);\n\t\tjbCreateLists = new JButton(\"New PlayList\");\n\t\tjbCreateLists.setFont(new java.awt.Font(\"Century Gothic\",0, 15));\n\t\tjbCreateLists.setForeground(new Color(150,100,100));\n\t\tjbCreateLists.setIcon(image10);\n\t\tjbCreateLists.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tjbCreateLists.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tjbCreateLists.setRolloverIcon(image11);\n\t\tjbCreateLists.setRolloverSelectedIcon(image12);\t\n\t\tjbCreateLists.setContentAreaFilled(false);\n\t\tjbCreateLists.setFocusable(false);\n\t\tjbCreateLists.setBorderPainted(false);\n\t}", "public void addList(ShoppingList list) {\n\n lists.add(0, list);\n list.save();\n notifyItemInserted(0);\n\n }", "@Override\n\tpublic boolean addProduct(Product p) {\n\t\treturn false;\n\t}", "public void addButtonClicked(View view) {\n\n Products product = new Products(johnsInput.getText().toString());\n\n dbHandler.addProduct(product);\n printDatabase();\n }", "@Override\n public void onAddToCart(Product product) {\n }", "@Override\n public void insertIntoAuthBooks(long cartid, long itemid) {\n wishListRepository.insertIntoAuthBooks(cartid, itemid);\n\n }", "public long addProductShoppingList(String name, int quality, double quantity, String unit) {\n long pid = addNewProduct(name);\n Cursor c = null;\n\n SQLiteDatabase db = DBHelper.getWritableDatabase();\n if (pid == -1) {\n\n String[] args = new String[1];\n args[0] = name;\n c = db.rawQuery(\"SELECT * FROM Products WHERE pname=?\", args);\n c.moveToFirst();\n while (!c.isAfterLast()) {\n pid=c.getInt(c.getColumnIndex(\"_id\"));\n c.moveToNext();\n }\n }\n ContentValues cv = new ContentValues();\n cv.put(DBHelper.SHOPPINGLIST_PID, (int) pid);\n cv.put(DBHelper.SHOPPINGLIST_QUALITY, quality);\n cv.put(DBHelper.SHOPPINGLIST_QUANTITY, quantity);\n cv.put(DBHelper.SHOPPINGLIST_UNIT, unit);\n\n long _id = db.insert(DBHelper.TABLE_SHOPPINGLIST, null, cv);\n\n if (_id > 0) {\n Log.d(DatabaseHelper.class.getName(), \"AddProductShoppingList: _id:\" + String.valueOf(_id) + \", pid:\" + String.valueOf(pid) + \", pname:\" + name);\n } else {\n Log.d(DatabaseHelper.class.getName(), \"AddProductShoppingList: pname:'\" + name + \"', But already in ShoppingList table.\");\n }\n db.close();\n return _id;\n }", "public List<Integer> getWishList() {\n\t\treturn wishList;\n\t}", "public void addProduct(Product p) {\n\t\tthis.productList.add(p);\n\t}", "public static ArrayList<Product> addProduct() {\r\n\r\n\t\tboolean proDiscontinued = false;\r\n\t\tboolean proInStock = false;\r\n\t\tint proQtyAvailable = 0;\r\n\r\n\t\tArrayList<Product> newProductArray = new ArrayList<Product>();\r\n\r\n\t\tSystem.out.println(\"---Product details---\");\r\n\r\n\t\tRandom proCodeRandom = new Random();\t\t\t\t\t\t\t\r\n\t\tint proCode = proCodeRandom.nextInt(100);\r\n\r\n\r\n\t\tSystem.out.println(\"Please enter the make of the product:\");\t\t\r\n\r\n\t\tString proMake = Validation.stringNoIntsValidation();\r\n\r\n\r\n\t\tSystem.out.println(\"Please enter the model of the product:\");\r\n\r\n\t\tString proModel = Validation.stringNoIntsValidation();\r\n\r\n\r\n\t\tSystem.out.println(\"Please enter the price of the product:\");\r\n\t\tdouble proPrice = Validation.doubleValidation();\r\n\r\n\t\tSystem.out.println(\"Is the product discontinued? y/n \");\r\n\r\n\t\tString answer = Validation.stringNoIntsValidation();\r\n\r\n\r\n\t\tif(answer.equals(\"y\") || answer.equals(\"Y\")) {\r\n\t\t\tproDiscontinued = true;\r\n\t\t\tSystem.out.println(\"How many products are available?\");\r\n\t\t\tproQtyAvailable = Validation.intValidation();\r\n\t\t\tif(proQtyAvailable <= 0) {\r\n\r\n\t\t\t\tproInStock = false;\r\n\t\t\t}else {\r\n\t\t\t\tproInStock = true;\r\n\t\t\t}\r\n\t\t}else if(answer.equals(\"n\") || answer.equals(\"N\")) {\r\n\t\t\tproDiscontinued = false;\r\n\t\t\tSystem.out.println(\"How many products are available?\");\r\n\t\t\tproQtyAvailable = Validation.intValidation();\r\n\t\t\tif(proQtyAvailable <= 0) {\r\n\t\t\t\tproInStock = false;\r\n\t\t\t}else {\r\n\t\t\t\tproInStock = true;\r\n\t\t\t}\r\n\t\t}\t\r\n\r\n\t\tProduct newProduct = new Product(proCode, proMake, proModel, proPrice, proInStock);\r\n\t\tnewProduct.setProQtyAvailable(proQtyAvailable);\r\n\t\tnewProduct.setProDiscontinued(proDiscontinued);\r\n\r\n\t\tnewProductArray.add(newProduct);\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\r\n\t\tSystem.out.println();\r\n\r\n\t\treturn newProductArray;\r\n\t}", "@Override\n public ProductBacklog createNewBacklog(ProductBacklog productBacklog) {\n return backlogRepository.save(productBacklog);\n }", "public ArrayList<ProductDetail> readAllWishlist() {\n db = helper.getReadableDatabase();\n ArrayList<ProductDetail> list = new ArrayList<>();\n Cursor cursor = db.rawQuery(\"select * from \" + DatabaseConstant.TABLE_NAME_WISHLIST, null);\n while (cursor.moveToNext()) {\n String id = cursor.getString(0);\n String title = cursor.getString(1);\n String price = cursor.getString(2);\n String order_quantity = cursor.getString(3);\n String quantity_type = cursor.getString(4);\n String min_quantity = cursor.getString(5);\n String availability = cursor.getString(6);\n String discount = cursor.getString(7);\n String image = cursor.getString(8);\n String rating = cursor.getString(9);\n String description = cursor.getString(10);\n String type = cursor.getString(11);\n int qty = cursor.getInt(12);\n\n list.add(new ProductDetail(id, title, price, order_quantity, quantity_type, min_quantity, availability, discount, image, rating, description\n ,type, qty));\n }\n return list;\n }", "public void createNewItem(ActionEvent actionEvent) {\n // we will create a new item instance here (ideally we would use another window for this)\n // and then we will simply addItem() to the currently selected list\n }", "@Then (\"\")\n\t\n\t\n\t@When (\"buy women clothes\")\n\tpublic void buy_women_clothes() {\n\t\t\n\t\taction = new Actions(driver);\n\t\tWebElement womenbutton = driver.findElement(By.xpath(\"//*[@id='block_top_menu']/ul/li[1]\"));\n\t\twomenbutton.click();\n\t\tjsx.executeScript(\"window.scrollBy(0,950)\", \"\");\n\t\t//*[@id='center_column']//ul[@class='product_list grid row']/li[1]/div/div[1]/div/a/img xpath de la imagen\n\t\t//*[@id='center_column']//ul[@class='product_list grid row']/li[1]//div[@class='right-block'] xpath del segundo bloque\n\t\t//*[@id='center_column']//ul[@class='product_list grid row']/li[1] todo el bloque\n\t\t//*[@id='center_column']//ul[@class='product_list grid row']/li[1]/div/div[2]/div[2]/a[1] \n\t\t\n\t\tWebElement womencloth = driver.findElement(By.xpath(\"//*[@id='center_column']//ul[@class='product_list grid row']/li[1]\"));\n\t\tWebElement womencloth2 = driver.findElement(By.xpath(\"//*[@id='center_column']//ul[@class='product_list grid row']/li[1]/div/div[2]/div[2]/a[1]\"));\n\t\taction.moveToElement(womencloth).perform();\n\t\taction.moveToElement(womencloth2).perform();\n\t\t\n\t\twomencloth2.click();\n\t\n}", "private int notify(Wishlist wishlist, WishlistItem watched, InventoryItem invItem) {\n\t\tif (watched.isNotified) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tSystem.out.println(invItem.name + \" is in stock. Notify \" + wishlist.distributorID);\n\t\tif (notifier.notifyInStock(wishlist.notificationEmail, invItem.name)) {\n\t\t\twatched.setNotified();\n\t\t}\n\t\treturn 1;\n\t}", "public void addProduct(Product p) {\n c.addProduct(p);\n }", "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 }", "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 }", "void createOrder(List<Product> products, Customer customer);", "@Override\r\n\tpublic void deleteWishList(int wishNo) throws Exception {\n\r\n\t}", "public void insertIntoProduct() {\n\t\ttry {\n\t\t\tPreparedStatement statement = connect.prepareStatement(addProduct);\n\t\t\tstatement.setString(1, productName);\n\t\t\tstatement.setString(2, quantity);\n\t\t\t\n\t\t\tstatement.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "public void creatList()\n\t{\n\t\tbowlers.add(new Bowler(\"A\",44));\n\t\tbowlers.add(new Bowler(\"B\",25));\n\t\tbowlers.add(new Bowler(\"C\",2));\n\t\tbowlers.add(new Bowler(\"D\",10));\n\t\tbowlers.add(new Bowler(\"E\",6));\n\t}", "@And(\"^JSON document is ready$\")\n public void jsonDocumentIsReady() {\n addNewWishlistJsonObj.put(\"name\",\"Demo Wishlist\");\n addNewWishlistJsonObj.put(\"isDefault\", \"false\");\n\n System.out.println(\"Request: \" + addNewWishlistJsonObj.toString());\n }", "void updateList(ShoppingList _ShoppingList);", "public void productsToBuy(Product purchase){\n bill.getProducts().add(purchase);\n }", "@Override\r\n public void onResponse(@Nonnull com.apollographql.apollo.api.Response<OnCreateBuyableItemSubscription.Data> response) {\n Log.i(TAG, \"new data added\");\r\n final BuyableItem newItem = new BuyableItem(response.data().onCreateBuyableItem().title(), response.data().onCreateBuyableItem().priceInCents());\r\n Handler handler = new Handler(Looper.getMainLooper()) {\r\n @Override\r\n public void handleMessage(Message inputMessage) {\r\n buyableItemAdapter.addItem(newItem);\r\n }\r\n };\r\n\r\n handler.obtainMessage().sendToTarget();\r\n\r\n }", "public void clickWishlistLink()\n\t{\n \telementUtils.performElementClick(wbWishlistLink);\n\t}", "ListItem createListItem();", "public void setWishOfUser(boolean wish) {\n this.wishOfUSer = wish;\n }", "public void createList(View v){\n //Checking the user has added ingredients\n if(!ingredientModelList.isEmpty()){\n //Retrieving the current date and formatting it\n Calendar calendar = Calendar.getInstance();\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n String date = dateFormat.format(calendar.getTime());\n\n //Retrieving the grocery list title from the user input and the ArrayList<String> of Ingredients\n String title = groceryListTitleEt.getText().toString();\n ArrayList<String> ingredientList = arrayListFromIngredient(ingredientModelList);\n\n //Creating the grocery list model\n GroceryListModel groceryListModel = new GroceryListModel(date, ingredientList);\n\n //Checking if user has added a title\n if(title!=null){\n groceryListModel.setTitle(title);\n }\n\n // Using a single value event listener to read from the FirebaseDatabase\n databaseReference.child(uId).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n //Creating a current user that is the value of the user retrieved\n User currentUser = dataSnapshot.getValue(User.class);\n //Checking if user retrieved is null\n if(currentUser!=null){\n //Checking if the user has created any groceryLists yet\n if(currentUser.groceryListModels == null){\n //If the user hasn't, it creates a new list adding the grocerListModel just created\n List<GroceryListModel> groceryListModels = new ArrayList<>();\n groceryListModels.add(groceryListModel);\n //Uses databaseReference to set the groceryListModels list to the newly created list\n databaseReference.child(uId).child(\"groceryListModels\").setValue(groceryListModels);\n\n Log.d(\"Debug log\", \"Created new groceryListModels\");\n }else{\n //Retrieves the user's groceryListModels, adds the new groceryListModel\n List<GroceryListModel> userGroceryListModels = currentUser.groceryListModels;\n userGroceryListModels.add(groceryListModel);\n //Uses databaseReference to set the groceryListModels to the new one\n databaseReference.child(uId).child(\"groceryListModels\").setValue(userGroceryListModels);\n\n Log.d(\"Debug log\", \"Added to existing groceryListModels\");\n }\n }\n finish();\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n //Used to determine whether the request was successful\n Log.d(\"Error log\", \"Couldn't read from database\");\n }\n });\n\n\n }else{\n //Prompts the user to add ingredients if they haven't done so\n Toast.makeText(this, \"You need to add ingredients to your list!\", Toast.LENGTH_LONG).show();\n }\n\n }", "public void buyProduct(String productName) throws ProductNotFoundException {\r\n\r\n if (doesRecentOrderExist(productName)) {\r\n reorderProduct(productName);\r\n } else {\r\n //Create a new order to be given to the WebMarket\r\n Order newOrder = new Order(this, productName, \"buy\", \"pending\");\r\n\r\n //Acknowlegement print statment\r\n System.out.println(\"CUSTOMER: Request NEW purchase of - \" + newOrder.getProductName());\r\n\r\n //Send the order to WebMarket via placeNewOrder()\r\n market.placeNewOrder(newOrder);\r\n\r\n //Add this order to the customers personel list of orders\r\n orderHistory.add(newOrder);\r\n }\r\n }", "public void addProductToBuyBasket(int productId, int count) {\n if (buyBasket.containsKey(productId))\n buyBasket.replace(productId, buyBasket.get(productId + count));\n else\n buyBasket.put(productId, count);\n }", "public void insertToWish(String user, int cant, Producto prod) {\n NodoAvl tmp = root;\n while (tmp != null && !tmp.username.equals(user)) {\n if (user.compareTo(tmp.username) < 0) {\n tmp = tmp.izq;\n } else {\n tmp = tmp.der;\n }\n }\n if (tmp != null && user.equals(tmp.username)) {\n if(tmp.whish!= null)\n tmp.whish.insertTail(user, cant, prod);\n else{\n Lista ls = new Lista();\n ls.insertTail(user, cant, prod);\n tmp.whish = ls;\n }\n Log.logger.info(\" Agregado a usuario :\" + user);\n } else {\n Log.logger.warn(\"Usuario no encontrado \" + user);\n }\n \n }", "@Before(value = \"@createList\", order = 1)\n public void createList() {\n String endpoint = EnvironmentTrello.getInstance().getBaseUrl() + \"/lists/\";\n JSONObject json = new JSONObject();\n json.put(\"name\", \"testList\");\n json.put(\"idBoard\", context.getDataCollection(\"board\").get(\"id\"));\n RequestManager.setRequestSpec(AuthenticationUtils.getLoggedReqSpec());\n Response response = RequestManager.post(endpoint, json.toString());\n context.saveDataCollection(\"list\", response.jsonPath().getMap(\"\"));\n }", "public void addProduct(CartProduct p) throws InsufficientQuantityException {\n\t\tfor (CartProduct product : Admin.products) {\n\t\t\tif (product.getDescription().equals(p.getDescription()) && (product.getQuantity() >= 1)) {\n\t\t\t\tcart.addToCart(p);\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tthrow new InsufficientQuantityException(\"Out of Stock\");\n\t\t\t}\n\t\t}\n\t}", "public boolean addProduct(Product p) {\n// products.add(p);\n boolean prodExists = false;\n for(Product prod: products){\n if(prod.getId() == p.getId()){\n prodExists = true;\n break;\n }\n }\n if(!prodExists){\n products.add(p);\n return true;\n }\n return false;\n }", "void addFruit(Fruit item){\n\t\tfruitList.add(item);\n\t}", "public void addWasher() {\r\n\t\tdo {\r\n\t\t\tString brand = getToken(\"Enter washer brand: \");\r\n\t\t\tString model = getToken(\"Enter washer model: \");\r\n\t\t\tdouble price = getDouble(\"Enter washer price: \");\r\n\t\t\tWasher washer = store.addWasher(brand, model, price);\r\n\t\t\tif (washer != null) {\r\n\t\t\t\tSystem.out.println(washer);\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Washer could not be added.\");\r\n\t\t\t}\r\n\t\t} while (yesOrNo(\"Would you like to add another washer?\"));\r\n\t}", "public static Integer getWishListNumber() {\n return wishListNumber;\n }", "@POST\n @Produces(MediaType.APPLICATION_XML)\n @Consumes(MediaType.APPLICATION_FORM_URLENCODED)\n public ShoppingList creatShoppingList(@QueryParam(\"id\") Long id, @QueryParam(\"name\") String name) throws WebApplicationException {\n boolean b = sls.createShoppingList(id, name);\n if (b == true) {\n return sls.getShoppingList(id);\n } else {\n throw new WebApplicationException(Response.Status.BAD_REQUEST);\n }\n }", "public void deletesingleWishlist(ProductDetail productDetail) {\n SQLiteDatabase db = helper.getWritableDatabase();\n db.delete(DatabaseConstant.TABLE_NAME_WISHLIST, DatabaseConstant.TABLE_WISHLIST_ID + \" = ?\",\n new String[]{String.valueOf(productDetail.getId())});\n db.close();\n }", "public void createWaitList() {\n\n\t\tIterator it = getOrderProducts();\n\n\t\twhile (it.hasNext()) {\n\t\t\tOrderLineItem orderItem = (OrderLineItem) it.next();\n\t\t\tint oldProductQuantity = orderItem.product.getQuantity();\n\n\t\t\tif (orderItem.product.getQuantity() >= orderItem.quantity) {\n\t\t\t\torderItem.product.setQuantity(orderItem.product.getQuantity() - orderItem.quantity);\n\n\t\t\t}\n\n\t\t\telse if (orderItem.product.getQuantity() < orderItem.quantity) {\n\t\t\t\t// how much we are requesting - current stock\n\t\t\t\tint tempQuantityFornewWaitlist = orderItem.quantity - orderItem.product.getQuantity();\n\t\t\t\t// assign to new order waitlist item\n\t\t\t\tOrderLineItem newWaitListedItem = new OrderLineItem(orderItem.product, tempQuantityFornewWaitlist);\n\t\t\t\twaitlistItems.add(newWaitListedItem);\n\n\t\t\t\torderItem.quantity = oldProductQuantity;\n\t\t\t\torderItem.product.setQuantity(0);\n\n\t\t\t\t// System.out.println(\"waitlisted item: \"+ newWaitListedItem+ \"\n\t\t\t\t// waitlistItems: \" + waitlistItems + \" order items quantity:\" +\n\t\t\t\t// orderItem.quantity);\n\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.68621844", "0.66126657", "0.6509239", "0.6442504", "0.63522744", "0.62494", "0.620287", "0.61932844", "0.6187796", "0.61844385", "0.6090344", "0.6033382", "0.6011386", "0.60055786", "0.595488", "0.5950408", "0.5911955", "0.58621323", "0.5855522", "0.58550847", "0.5835971", "0.5792978", "0.5786565", "0.5746781", "0.571202", "0.5696701", "0.5695498", "0.5693338", "0.5666199", "0.564086", "0.5638412", "0.56188095", "0.56138545", "0.560564", "0.5602359", "0.56018007", "0.55739456", "0.55692095", "0.555638", "0.55514365", "0.5547402", "0.5530606", "0.5517314", "0.55129796", "0.54923797", "0.5481471", "0.546991", "0.5458384", "0.5430702", "0.5424342", "0.5388704", "0.53799707", "0.53762066", "0.5371711", "0.5365101", "0.5351325", "0.5338553", "0.5338153", "0.533532", "0.53299874", "0.53265446", "0.53256786", "0.5321685", "0.5316855", "0.53147143", "0.53140175", "0.5308368", "0.5301817", "0.529579", "0.52911997", "0.52903515", "0.52856904", "0.528534", "0.52824116", "0.5280703", "0.5264326", "0.5242641", "0.5228746", "0.5228152", "0.5214869", "0.5195561", "0.51896036", "0.51894873", "0.51765645", "0.51736844", "0.51718384", "0.5169372", "0.51637113", "0.5162512", "0.51571715", "0.51555073", "0.5154242", "0.5153001", "0.5151165", "0.51447165", "0.51363474", "0.51292264", "0.5125098", "0.51241744", "0.5120183" ]
0.7342396
0
Creates a wishlist where a list of products are added
public void createWishlist(Customer customer, List<Product> products) { wishlistService.createWishlist(customer, products); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createWishlist(Customer customer, Product product) {\n wishlistService.createWishlist(customerRepository.findByID(customer.getAccountID()), product);\n }", "public void addToWish( String product_id, String product_name,String product_brand, String product_img,\n String product_price,String product_desc, String product_discount, String product_varieties )\n {\n boolean isAdded = mDatabaseFavorite.insert(product_id, product_name,product_brand, product_img,\n product_price,product_discount);\n\n if (isAdded == true)\n {\n Toast.makeText(DetailActivity.this,\"Added to Favorite\",Toast.LENGTH_SHORT).show();\n\n }\n\n else {\n\n Toast.makeText(DetailActivity.this,\"Already present in favoriteList\",Toast.LENGTH_SHORT).show();\n\n }\n\n }", "@Override\n\tpublic WishList addProductToWishList(List<String> productName, Long userId) {\n\t\tList<Product> allProduct = productDAO.getallProduct();\n\t\t\n\t\t\n\t\t\n\t\tfor(String p : productName) {\n\t\t\tProduct product = productDAO.getProductByName(p).get(0);\n\t\t\t\n\t\t\t\n\t\t\tif(allProduct.contains(p)) {\n\t\t\t\tUserDetail user = userDetailDAO.getUserById(userId).get(0);\n\t\t\t\tif(user.getWishList().getProducts().contains(p)) {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tWishList wishList = new WishList();\n\t\t\t\t\tList<Product> prod = new ArrayList<>();\n\t\t\t\t\tprod.add(product);\n\t\t\t\t\twishList.setProducts(prod);\n\t\t\t\t\tuser.setWishList(wishList);\n\t\t\t\t\tuserDetailDAO.save(user);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn userDetailDAO.getUserById(userId).get(0).getWishList();\n\t}", "public void addWishlistItem(WishlistItem wishItem){\n fStore.collection(\"user_profiles\").document(fUser.getUid()).collection(\"wishlist\").document(wishItem.getWishID()).set(wishItem).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n }\n });\n }", "@Test\r\n\tpublic void test_7and8_AddToList() throws Exception {\n\t\texecutor = (JavascriptExecutor) driver;\r\n\t\texecutor.executeScript(\"window.scrollTo(0, 600)\");\r\n\t\t// click on add to list button\r\n\t\tdriver.findElement(By.id(\"add-to-wishlist-button-submit\")).click();\r\n\t\tThread.sleep(3000);\r\n\r\n\t\t// get selected item \r\n\t\tWebElement element = driver.findElement(By.xpath(\"//span[@id='productTitle']\"));\r\n\t\tselectedItem = element.getText();\r\n\t\t// click on view the wish list\r\n\t\tdriver.findElement(By.cssSelector(\"span.w-button-text\")).click();\r\n\t\tThread.sleep(3000);\r\n\r\n\t\t// test 8\r\n\t\t// create an array of product titles to get items in wish list\r\n\t\t// get the product title in wish list then compare with selected item\r\n\t\tList<WebElement> productTitles = driver.findElements(By.xpath(\"//div[@id='g-items']//h5\")); \r\n\t\tfor(WebElement productTitle : productTitles) {\r\n\t\t\t// compare selected item and any item in wish list\r\n\t\t\tString listedItem = productTitle.getText(); \r\n\t\t\tif (listedItem.equals(selectedItem)) {\r\n\t\t\t\tSystem.out.println(listedItem + \" is added to wish list\");\r\n\t\t\t\tAssert.assertTrue(listedItem.equals(selectedItem));\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "public boolean addProductToWishlist(String productId) throws WishListException {\n\t\t// TODO Auto-generated method stub\n\t\tboolean result=false;\n\t\tif(ProductRepository.productList.get(productId) != null)\n\t\t{ if(WishlistDaoImpl.wlist.containsKey(productId))\n\t \t{\t\n\t\t\t throw new WishListException(\"WishList already contain this PRODUCT\");\n\t \t}\n\t\t else {\n\t\t\t result=WishlistDaoImplObj.addProductToWishlist(productId);\n\t\t return result;\n\t\t }\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new WishListException(\"Product ID not Found in Product List to Add in WishList\\n\");\n\t\t}\n\t \n\t\t\n\t}", "@POST\n\t@Path(\"/getWishlist\")\n\t@Consumes(\"application/json\")\n\t@Produces(\"application/json\")\n\tpublic String getWishlist(WishlistProduct user_data) {\n\t\t\n\t\tWishlistProductDAO WishlistProductDao = new WishlistProductDAO();\n\t\tList<WishlistProduct> wishlistedProducts = WishlistProductDao.getWishlistProductsByWishlistID(user_data.getWishlist_id());\n\t\t\n\t\tWishlistDAO WishlistDao = new WishlistDAO();\n\t\tWishlist wishlist = WishlistDao.getWishlistDetailsByID(user_data.getWishlist_id());\n\t\t\n\t\tJSONArray products = new JSONArray();\n\t\t\n\t\tfor(int i=0; i<wishlistedProducts.size();i++)\n\t\t{\n\t\t\tJSONObject product = new JSONObject();\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tproduct.put(\"wishlist_name\", wishlist.getName());\n\t\t\t\tproduct.put(\"req_qty\", wishlistedProducts.get(i).getQuantity());\n\t\t\t\tproduct.put(\"remaining_qty\", wishlistedProducts.get(i).getRemaining_qty());\n\t\t\t\tproduct.put(\"address\", wishlistedProducts.get(i).getAddress());\n\t\t\t\tproduct.put(\"reason\", wishlistedProducts.get(i).getReason());\n\t\t\t\t\t\n\t\t\t\tCatalogDAO CatalogDao = new CatalogDAO();\n\t\t\t\tCatalog productDetails = CatalogDao.getProductByID(wishlistedProducts.get(i).getProduct_id());\n\t\t\t\t\n\t\t\t\tproduct.put(\"product_id\", productDetails.getProduct_id());\n\t\t\t\tproduct.put(\"product_name\", productDetails.getProduct_name());\n\t\t\t\tproduct.put(\"product_qty\", productDetails.getQuantity());\n\t\t\t\tproduct.put(\"brand\", productDetails.getBrand());\n\t\t\t\tproduct.put(\"description\", productDetails.getDescription());\n\t\t\t\tproduct.put(\"price\", productDetails.getPrice());\n\t\t\t\tproduct.put(\"pic_location\", productDetails.getPic_location());\n\t\t\t\t\n\t\t\t\tproducts.put(product);\n\t\t\t\t\n\t\t\t}\n\t\t\tcatch (JSONException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t}\n\t\t\n\t\treturn products.toString();\n\t\t\n\t}", "public void addProductToWishlist(Product product, long accountId) {\n wishlistService.addProduct(product, accountId);\n }", "private void getWishListInfo(final long productId) {\n User user = SettingsMy.getActiveUser();\n if (user != null) {\n // determine if product is in wishlist\n //String wishlistUrl = String.format(EndPoints.WISHLIST_IS_IN_WISHLIST, SettingsMy.getActualNonNullShop(getActivity()).getId(), productId);\n String wishlistUrl = String.format(EndPoints.WISHLIST);\n GsonRequest<WishlistResponse> getWishlistInfo = new GsonRequest<WishlistResponse>(Request.Method.GET, wishlistUrl, null, WishlistResponse.class, new Response.Listener<WishlistResponse>() {\n @Override\n public void onResponse(@NonNull WishlistResponse response) {\n if(response != null) {\n if(response.getStatusText() != null && response.getStatusCode() != null) {\n if (response.getStatusCode().toLowerCase().equals(CONST.RESPONSE_CODE) || response.getStatusText().toLowerCase().equals(CONST.RESPONSE_UNAUTHORIZED)) {\n LoginDialogFragment.logoutUser(true);\n DialogFragment loginExpiredDialogFragment = new LoginExpiredDialogFragment();\n loginExpiredDialogFragment.show(getFragmentManager(), LoginExpiredDialogFragment.class.getSimpleName());\n }\n }\n else\n prepareWishListButton(response, productId);\n }\n else\n Timber.d(\"returned null response during getWishListInfo\");\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n MsgUtils.logAndShowErrorMessage(getActivity(), error);\n }\n }, getFragmentManager(), \"\");\n getWishlistInfo.setRetryPolicy(MyApplication.getDefaultRetryPolice());\n getWishlistInfo.setShouldCache(false);\n MyApplication.getInstance().addToRequestQueue(getWishlistInfo, CONST.PRODUCT_REQUESTS_TAG);\n }\n }", "private void save_to_wishlist(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws Exception {\n\t\t\n\t\tSystem.out.println(\"inside save to wishlist\");\n\t\tString cart_type = request.getParameter(\"cart_type\");\n\t\tSystem.out.println(cart_type);\n\t\tString quantity[] = request.getParameterValues(\"qty_name\");\n\t\tList lqty = new ArrayList();\n\t\tfor(int i=0;i<quantity.length;i++)\n\t\t{\n\t\t\tSystem.out.println(quantity[i]);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tUaddToCartMstVO mstVO = new UaddToCartMstVO();\n\t\tSystem.out.println(\"cart typw3333333333333333333333333333333\"+cart_type);\n\t\tmstVO.setCart_type(cart_type);\n\t\t\n\t\tHttpSession hs = request.getSession();\n\t\tint user_id=Integer.parseInt(hs.getAttribute(\"userID\").toString());\n\t\tSystem.out.println(\"User............\"+user_id);\n\t\t\n\t\tUaddToCartDAO addCartDAO;\n\t\taddCartDAO=new UaddToCartDAO();\n\n\t\tint BuyerregId = -1;\n\t\tloginVO logVo=new loginVO();\n\t\tlogVo.setLogin_id(user_id);\n\t\tList luser=addCartDAO.search_user_id(logVo);\n\t\tif(luser!=null && luser.size()>0)\n\t\t{\n\t\t\tUregistrationVO regVo=(UregistrationVO)luser.get(0);\n\t\t\tBuyerregId=regVo.getBuyer_user_id();\n\t\t\tSystem.out.println(\"Buyer user Id======================================================\"+BuyerregId);\n\t\t}\n\t\t\n\t\tUregistrationVO regVo=new UregistrationVO();\n\t\tregVo.setBuyer_user_id(BuyerregId);\n\t\t//System.out.println(\"User login id....\"+ regVo.getLoginVoObj().getLogin_id());\n\t\t\n\t\tmstVO.setBuyer_user_id(regVo);\n\t\t\n\t\t\t\t\n\t\taddCartDAO.save_to_wishlist(mstVO);\n\t\t\n\t\tSystem.out.println(\"--------------------------------------------------child Data insertion---------------------------------\");\n\t\t\n\t\t\n\t\tList l= (List)hs.getAttribute(\"product_data_wishlist\");\n\t\t\n\t\tSystem.out.println(\"LIST value::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\"+l.toString());\n\t\t\n\t\t\n\t\tUaddToCartVO addCartVO[]=new UaddToCartVO[l.size()];\n\t\t\n\t\tUaddToCartVO temp=new UaddToCartVO();\n\t\t\n\t\t\n\t\t\n\t\tfor(int i=0;i<l.size();i++)\n\t\t{\n\t\t\t\n\t\t\ttemp=(UaddToCartVO)l.get(i);\n\t\t\taddCartVO[i]=new UaddToCartVO();\n\t\t\taddCartVO[i].setCloth_id(temp.getCloth_id());\n\t\t\taddCartVO[i].setColor_code(temp.getColor_code());\n\t\t\taddCartVO[i].setPrice(temp.getPrice());\n\t\t\taddCartVO[i].setProduct_name(temp.getProduct_name());\n\t\t\taddCartVO[i].setSize(temp.getSize());\n\t\t\taddCartVO[i].setQuantity(Integer.parseInt(quantity[i]));\n\t\t\taddCartVO[i].setDesigner_user_id(temp.getDesigner_user_id());\n\t\t\taddCartVO[i].setCartMstVOObj(mstVO);\n\t\t\taddCartDAO.save_to_cart(addCartVO[i]);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*String type=mstVO.getCart_type();\n\t\tint userId=((UregistrationVO)mstVO.getBuyer_user_id()).getBuyer_user_id();\n\t\t\n\t\tSystem.out.println(\"---------------------------------------------------------------------------------------------------------------\");\n\t\tSystem.out.println(\"TYPE value is ::::::::::::::\"+type);\n\t\tSystem.out.println(\"USERID value is ::::::::::::::\"+userId);\n\n\t\tSystem.out.println(\"---------------------------------------------------------------------------------------------------------------\");\n\t\t\n*/\t\t\n\t\tresponse.sendRedirect(request.getContextPath()+\"/user/add_to_wishlist.jsp\");\n\t}", "public HashMap<String, ProductDTO> displayProductInWishlist() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\treturn WishlistDaoImpl.wlist ;\n\t}", "public ArrayList<ProductDetail> readAllWishlist() {\n db = helper.getReadableDatabase();\n ArrayList<ProductDetail> list = new ArrayList<>();\n Cursor cursor = db.rawQuery(\"select * from \" + DatabaseConstant.TABLE_NAME_WISHLIST, null);\n while (cursor.moveToNext()) {\n String id = cursor.getString(0);\n String title = cursor.getString(1);\n String price = cursor.getString(2);\n String order_quantity = cursor.getString(3);\n String quantity_type = cursor.getString(4);\n String min_quantity = cursor.getString(5);\n String availability = cursor.getString(6);\n String discount = cursor.getString(7);\n String image = cursor.getString(8);\n String rating = cursor.getString(9);\n String description = cursor.getString(10);\n String type = cursor.getString(11);\n int qty = cursor.getInt(12);\n\n list.add(new ProductDetail(id, title, price, order_quantity, quantity_type, min_quantity, availability, discount, image, rating, description\n ,type, qty));\n }\n return list;\n }", "protected Order createWishlistCart(HttpServletRequest request, String wishlistName) {\r\n Order currentWishlistOrder = cartService.createNamedOrderForCustomer(wishlistName, customerState.getCustomer(request));\r\n return currentWishlistOrder;\r\n }", "private static void createProducts() {\n productRepository.addProduct(Product.builder()\n .name(\"Milk\")\n .barcode(new Barcode(\"5900017304007\"))\n .price(new BigDecimal(2.90))\n .build()\n );\n productRepository.addProduct(Product.builder()\n .name(\"Butter\")\n .barcode(new Barcode(\"5906217041483\"))\n .price(new BigDecimal(4.29))\n .build()\n );\n productRepository.addProduct(Product.builder()\n .name(\"Beer\")\n .barcode(new Barcode(\"5905927001114\"))\n .price(new BigDecimal(2.99))\n .build()\n );\n }", "@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 }", "void addList(ShoppingList _ShoppingList);", "@PostMapping(\"/wishLists/{custId}/{prodId}\")\r\n\tpublic ResponseEntity<WishList> createWishList(@PathVariable(\"custId\") Integer custId, @PathVariable(\"prodId\") Integer prodId,@PathVariable(\"category3\") String category3) {\r\n\t\tList<Inventory> inventory= inventoryService.getAllInventory();\r\n\t\tList<Inventory> inventory1=new ArrayList();\r\n\t\t\r\n\t\tcategory3=\"Books\";\r\n\t\tfor (Inventory c : inventory) {\r\n\t\t\tCategory category= c.getCategory();\r\n\t\t\tString cat=category.getCategoryName();\r\n\t\t\tif(cat.equals(category3)) {\r\n\t\t\t\r\n\t\t\t\tInventory inv=new Inventory();\r\n\t\t\t\tinv.setProductId(c.getProductId());\r\n\t\t\t\tinv.setProductName(c.getProductName());\r\n\t\t\t\tinv.setPrice(c.getPrice());\r\n\t\t\t\tinv.setCategory(c.getCategory());\r\n\t\t\t\tinv.setDescription(c.getDescription());\r\n\t\t\t\t\r\n\t\t\t\tinventory1.add(inv);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(inventory1==null)\r\n\t\t\treturn new ResponseEntity\r\n\t\t\t\t(\"Sorry! Inventory details not available!\",HttpStatus.NOT_FOUND);\r\n\t\treturn new ResponseEntity<WishList>(HttpStatus.OK);\r\n\t\r\n\t\t\r\n}", "@FXML\r\n\tpublic void addToShoppingCart() {\r\n\t\t\r\n\t\tWatch w = listView.getSelectionModel().getSelectedItem();\r\n\t\tboolean add = controller.addWatchToShoppingCart(w);\r\n\t\tcontroller.deleteWishlistItem(w.getId());\r\n\t\tlistView.setItems(controller.getWishlistWatchesForCurrentUser());\r\n\t\tlistView.getSelectionModel().select(-1);\r\n\t\tcheckSelected();\r\n\t}", "public void requestWishList() {\n if (!hasInternetConnection()) {\n PromeetsDialog.show(this, getString(R.string.no_internet));\n } else {\n UserPOJO userPOJO = (UserPOJO) PromeetsUtils.getUserData(PromeetsPreferenceUtil.USER_OBJECT_KEY, UserPOJO.class);\n if (userPOJO == null) finish();\n String[] key = {Constant.USERID, Constant.PAGENUMBER};\n String[] value = {userPOJO.id + \"\", page + \"\"};\n\n PromeetsDialog.showProgress(this);\n HashMap<String, String> header = new HashMap<>();\n header.put(\"ptimestamp\", ServiceHeaderGeneratorUtil.getInstance().getPTimeStamp());\n header.put(\"promeetsT\", ServiceHeaderGeneratorUtil.getInstance().getPromeetsTHeader(Constant.FETCH_MY_WISH_LIST));\n header.put(\"accessToken\", ServiceHeaderGeneratorUtil.getInstance().getAccessToken());\n header.put(\"API_VERSION\", Utility.getVersionCode());\n new GenericServiceHandler(Constant.ServiceType.WISH_LIST, this, PromeetsUtils.buildURL(Constant.FETCH_MY_WISH_LIST, key, value), null, header, IServiceResponseHandler.GET, false, \"Please wait!\", \"Processing..\").execute();\n }\n }", "public void add_item_button(View v){\n if(expiry_date==0){ //if no expiry date was chosen,\n if(product_name.equals(\"Milk\")){//and if the product is milk, \n expiry_date=7; //set it to the default of 7 days until expiry\n }else{//If the product is bread,\n expiry_date=3;//set it to the default of 7 days until expiry\n }\n }\n Product added_p=new Product(product_name,expiry_date); //added_p : product chosen by the user that they currently own\n added_list.add(added_p); //this product is added to the list \n text=(TextView) findViewById(R.id.added_list);\n String content=\"\";\n for(Product p:added_list){\n content=content+(p.getProduct_name()+\" \"+p.getProduct_exp()+\" days \\n\"); //then displayed to show the user \n }\n text.setText(content);\n }", "@Test(priority=3)\n\t\tpublic void addToWishlist() throws Exception{\n\t\t\t\n//'**********************************************************\n//Calling method to click on 'Add to Wishlist' link and verify success toast is displayed\n//'**********************************************************\n\t\t\tThread.sleep(1500);\n\t\t\tgalaxyPage.clickOnAddToWishlist();\n\t\t\tThread.sleep(1500);\n\t\t\tAssert.assertTrue(galaxyPage.getSuccessMessage().contains(\"Success\"), \"Product is not added to Wishlist\");\n\t\t\textentTest.log(LogStatus.PASS,\"Success: You have added Samsung Galaxy Tab 10.1 to your wish list!\");\n//'**********************************************************\n//Calling method to close the success toast\n//'**********************************************************\n\t\t\tgalaxyPage.closeSuccesstoast();\n//'**********************************************************\n//Calling method to click on 'Wishlist' link and check user is redirected to 'My Wishlist' page\n//'**********************************************************\n\t\t\tmyWishlistPage = galaxyPage.clickOnWishlist();\n\t\t\t\n\t\t\tAssert.assertTrue(myWishlistPage.getTitle().equals(\"My Wish List\"), \"User is not redirected to wishlist page\");\n\t\t\textentTest.log(LogStatus.PASS,\"User is redirected to My Wishlist Page\");\n\t\t\t\n//'**********************************************************\n//Verifying count in 'Wishlist' link is equal to number of products in the page\n//'**********************************************************\n\t\t\tAssert.assertEquals(myWishlistPage.valueInWishlistLink(), myWishlistPage.numOfProductsInTable(), \"Value shown in wishlist link is different from number of records in the table\");\n\t\t\textentTest.log(LogStatus.PASS,\"Product added: Value shown in wishlist link is equal to number of records in the table\");\n\t\t\t\n\t\t\t}", "public boolean insertWishlist(ProductDetail productDetail) {\n\n db = helper.getWritableDatabase();\n ContentValues v = new ContentValues();\n v.put(DatabaseConstant.TABLE_WISHLIST_ID, productDetail.getId());\n v.put(DatabaseConstant.TABLE_WISHLIST_TITLE, productDetail.getTitle());\n v.put(DatabaseConstant.TABLE_WISHLIST_PRICE, productDetail.getPrice());\n v.put(DatabaseConstant.TABLE_WISHLIST_ORDER_QUANTITY, productDetail.getOrder_quantity());\n v.put(DatabaseConstant.TABLE_WISHLIST_QUANTITY_TYPE, productDetail.getQuantity_type());\n v.put(DatabaseConstant.TABLE_WISHLIST_MIN_QUAITITY, productDetail.getMin_quantity());\n v.put(DatabaseConstant.TABLE_WISHLIST_AVAILABILITY, productDetail.getAvailability());\n v.put(DatabaseConstant.TABLE_WISHLIST_DISCOUNT, productDetail.getDiscount());\n v.put(DatabaseConstant.TABLE_WISHLIST_IMAGE, productDetail.getImage());\n v.put(DatabaseConstant.TABLE_WISHLIST_RATING, productDetail.getRating());\n v.put(DatabaseConstant.TABLE_WISHLIST_DESCRIPTION, productDetail.getDescription());\n v.put(DatabaseConstant.TABLE_WISHLIST_TYPE, productDetail.getType());\n v.put(DatabaseConstant.TABLE_WISHLIST_QUANTITY, productDetail.getQuantity());\n long isCheck = db.insert(DatabaseConstant.TABLE_NAME_WISHLIST, null, v);\n if (isCheck > 0) {\n return true;\n } else {\n return false;\n }\n }", "@Then(\"I click on Add to WishList button for the Leica T Mirrorless Digital camara product.\")\n public void i_click_on_add_to_wish_list_button_for_the_leica_t_mirrorless_digital_camara_product() {\n BasePage.driverUtils.waitForWebElementToBeClickable(BasePage.leicaTMirrorlessDigitalCamPage.getLeicaTMirrorlessCamAddToWishListButton());\n BasePage.leicaTMirrorlessDigitalCamPage.getLeicaTMirrorlessCamAddToWishListButton().click();\n }", "@Override\n public void onClick(View view) {\n String name = getResources().getString(R.string.stock_shopping_list) + \": \" + productList.getName();\n StockShoppingList stockShoppingList = ((Stock)productList).generateShoppingList(name);\n StockShoppingListDao dao = new StockShoppingListDao(getDaoProductList().getBDConnection());\n if(((Stock)productList).getAssociatedListId() != -1) {\n // Si ya tiene una lista de la compra asociada la eliminamos para crear la nueva\n stockShoppingList.setID(((Stock) productList).getAssociatedListId());\n dao.remove(stockShoppingList);\n }\n int shoppingListId = dao.insert(stockShoppingList);\n\n // Actualizamos el id del stock\n ((Stock) productList).setAssociatedListId(shoppingListId);\n getDaoProductList().update((Stock)productList);\n\n // Mostramos un mensaje de exito\n Toast.makeText(getContext(),String.format(getResources().getString(R.string.info_msg_stock_shopping_list_created),name),Toast.LENGTH_LONG).show();\n }", "public void addProduct(String c, String p){\n\t\ttry {\n\t\t\tif(!hasProduct(c, p)){\n\t\t\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t\t\tif( c.equals(list.get(i).getUsername()) ){\n\t\t\t\t\t\tlist.get(i).getWishlist().add(p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IllegalArgumentException e){\n\t\t\tSystem.out.println(\"Customer\" + c + \"is not in the datavase.\");\n\t\t}\n\t}", "public long addProductShoppingList(String name){\n return addProductShoppingList(name, 0, 0, \"\");\n\n }", "public void creatList()\n\t{\n\t\tbowlers.add(new Bowler(\"A\",44));\n\t\tbowlers.add(new Bowler(\"B\",25));\n\t\tbowlers.add(new Bowler(\"C\",2));\n\t\tbowlers.add(new Bowler(\"D\",10));\n\t\tbowlers.add(new Bowler(\"E\",6));\n\t}", "public List<WebElement> getProductHeaderInWishList()throws Exception{\r\n SearchPageFactory pageFactory = new SearchPageFactory(driver);\r\n List<WebElement> productList = pageFactory.wishListProductList;\r\n return productList;\r\n }", "@Test\n public void bookAddedToWishlistSuccessfully() throws InterruptedException {\n //WebElement Books Link\n clickOnElement(By.xpath(\"//ul[@class='top-menu notmobile']//li[5]/a\"));\n\n //WebElement Position dropdown box\n selectByIndexFromDropDown(By.cssSelector(\"select#products-orderby\"),1);\n\n //Scroll down page\n windowScrollUpOrDown(0,500);\n sleepMethod(2000);\n\n //WebElement for wishlist button\n clickOnElement(By.xpath(\"//div[@class='item-grid']//div[1]//div[1]//div[2]//div[3]//div[2]//input[3]\"));\n\n String expectedTxt = \"The product has been added to your wishlist\";\n String actualTxt = getTextFromElement(By.xpath(\"//p[@class='content']\"));\n Assert.assertEquals(expectedTxt, actualTxt);\n }", "public void addButtonClicked(){\n Products products = new Products(buckysInput.getText().toString());\n dbHandler.addProduct(products);\n printDatabase();\n }", "public static MozuUrl addItemToWishlistUrl(String responseFields, String wishlistId)\r\n\t{\r\n\t\tUrlFormatter formatter = new UrlFormatter(\"/api/commerce/wishlists/{wishlistId}/items?responseFields={responseFields}\");\r\n\t\tformatter.formatUrl(\"responseFields\", responseFields);\r\n\t\tformatter.formatUrl(\"wishlistId\", wishlistId);\r\n\t\treturn new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;\r\n\t}", "public void addProductToList(Product aProduct){\n listOfProduct.add(aProduct);\n }", "void createOrder(List<Product> products, Customer customer);", "public void btnAddClicked(View view){\n List list = new List(input.getText().toString());\n dbHandler.addProduct(list);\n printDatabase();\n }", "@GET\n @Path(\"/addwl/{beerId}\")\n @Produces({MediaType.TEXT_XML, MediaType.APPLICATION_JSON , MediaType.APPLICATION_XML })\n public long addBeerToWishList( @PathParam(\"beerId\") Long beerId) {\n\t\t\n \t\n \thelper = new Helper();\n\t\tsoapService = helper.getSoapService();\n\t\tUser user = helper.getUserByUsername(username);\n Beer beer = soapService.readBeer(beerId);\n \n soapService.addBeerToUser(user, beer);\n \n System.out.println(\"beer added to wishlist...\");\n \n \treturn beerId;\n \t \t\n }", "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 WishlistItemTbl (\n\t\t Integer in_wishlistItemId\n ) {\n\t\tthis.setWishlistItemId(in_wishlistItemId);\n }", "public static ArrayList<Product> addProduct() {\r\n\r\n\t\tboolean proDiscontinued = false;\r\n\t\tboolean proInStock = false;\r\n\t\tint proQtyAvailable = 0;\r\n\r\n\t\tArrayList<Product> newProductArray = new ArrayList<Product>();\r\n\r\n\t\tSystem.out.println(\"---Product details---\");\r\n\r\n\t\tRandom proCodeRandom = new Random();\t\t\t\t\t\t\t\r\n\t\tint proCode = proCodeRandom.nextInt(100);\r\n\r\n\r\n\t\tSystem.out.println(\"Please enter the make of the product:\");\t\t\r\n\r\n\t\tString proMake = Validation.stringNoIntsValidation();\r\n\r\n\r\n\t\tSystem.out.println(\"Please enter the model of the product:\");\r\n\r\n\t\tString proModel = Validation.stringNoIntsValidation();\r\n\r\n\r\n\t\tSystem.out.println(\"Please enter the price of the product:\");\r\n\t\tdouble proPrice = Validation.doubleValidation();\r\n\r\n\t\tSystem.out.println(\"Is the product discontinued? y/n \");\r\n\r\n\t\tString answer = Validation.stringNoIntsValidation();\r\n\r\n\r\n\t\tif(answer.equals(\"y\") || answer.equals(\"Y\")) {\r\n\t\t\tproDiscontinued = true;\r\n\t\t\tSystem.out.println(\"How many products are available?\");\r\n\t\t\tproQtyAvailable = Validation.intValidation();\r\n\t\t\tif(proQtyAvailable <= 0) {\r\n\r\n\t\t\t\tproInStock = false;\r\n\t\t\t}else {\r\n\t\t\t\tproInStock = true;\r\n\t\t\t}\r\n\t\t}else if(answer.equals(\"n\") || answer.equals(\"N\")) {\r\n\t\t\tproDiscontinued = false;\r\n\t\t\tSystem.out.println(\"How many products are available?\");\r\n\t\t\tproQtyAvailable = Validation.intValidation();\r\n\t\t\tif(proQtyAvailable <= 0) {\r\n\t\t\t\tproInStock = false;\r\n\t\t\t}else {\r\n\t\t\t\tproInStock = true;\r\n\t\t\t}\r\n\t\t}\t\r\n\r\n\t\tProduct newProduct = new Product(proCode, proMake, proModel, proPrice, proInStock);\r\n\t\tnewProduct.setProQtyAvailable(proQtyAvailable);\r\n\t\tnewProduct.setProDiscontinued(proDiscontinued);\r\n\r\n\t\tnewProductArray.add(newProduct);\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\r\n\t\tSystem.out.println();\r\n\r\n\t\treturn newProductArray;\r\n\t}", "public void rbListAddElement() {\n rbProductType.clear();\n rbProductType.add(rbScs);\n rbProductType.add(rbSko);\n rbProductType.add(rbMko);\n rbProductType.add(rbZko);\n }", "public void addProduct(Product p){\n stock.add(p);\n }", "@Test(priority =1)\n\tpublic void userAddProductsToCompareList() {\n\t\tsearch = new SearchPage(driver);\n\t\tproductDetails = new ProductDetailsPage(driver);\n\t\tcompare = new AddToCompareListPage(driver);\n\n\t\tsearch.searchUsingAutoCompleteList(\"niko\");\n\t\tassertTrue(productDetails.productNameInBreadCrumb.getText().equalsIgnoreCase(firstProductName));\n\t\tproductDetails.addToCompareList();\n\t\t\n\t\tsearch.searchUsingAutoCompleteList(\"leic\");\n\t\tproductDetails = new ProductDetailsPage(driver);\n\t\tassertTrue(productDetails.productNameInBreadCrumb.getText().equalsIgnoreCase(secondProductName));\n\t\tproductDetails.addToCompareList();\n\t\tproductDetails.openProductComparisonPage();\n\t\tcompare.compareProducts();\n\n\t}", "@Then (\"\")\n\t\n\t\n\t@When (\"buy women clothes\")\n\tpublic void buy_women_clothes() {\n\t\t\n\t\taction = new Actions(driver);\n\t\tWebElement womenbutton = driver.findElement(By.xpath(\"//*[@id='block_top_menu']/ul/li[1]\"));\n\t\twomenbutton.click();\n\t\tjsx.executeScript(\"window.scrollBy(0,950)\", \"\");\n\t\t//*[@id='center_column']//ul[@class='product_list grid row']/li[1]/div/div[1]/div/a/img xpath de la imagen\n\t\t//*[@id='center_column']//ul[@class='product_list grid row']/li[1]//div[@class='right-block'] xpath del segundo bloque\n\t\t//*[@id='center_column']//ul[@class='product_list grid row']/li[1] todo el bloque\n\t\t//*[@id='center_column']//ul[@class='product_list grid row']/li[1]/div/div[2]/div[2]/a[1] \n\t\t\n\t\tWebElement womencloth = driver.findElement(By.xpath(\"//*[@id='center_column']//ul[@class='product_list grid row']/li[1]\"));\n\t\tWebElement womencloth2 = driver.findElement(By.xpath(\"//*[@id='center_column']//ul[@class='product_list grid row']/li[1]/div/div[2]/div[2]/a[1]\"));\n\t\taction.moveToElement(womencloth).perform();\n\t\taction.moveToElement(womencloth2).perform();\n\t\t\n\t\twomencloth2.click();\n\t\n}", "public static void addToWishList(String item, String messageOnFailure) {\n String wishlistCount = getText(WISHLIST_UPPER_MENU);\n System.out.println(\"Current wishlist count: \" + wishlistCount);\n\n type(SEARCH_FIELD_INPUT, item);\n click(SEARCH_ICON);\n List<WebElement> wishlistButtons = Browser.driver.findElements(ADD_TO_WISHLIST_BUTTON);\n wishlistButtons.get(0).click();\n Browser.driver.navigate().refresh();\n\n String wishlistCountAfterItemAdded = getText(WISHLIST_UPPER_MENU);\n System.out.println(\"Wishlist count after item is added: \" + wishlistCountAfterItemAdded);\n assertFalse(wishlistCountAfterItemAdded.matches(wishlistCount), messageOnFailure);\n }", "public void addItems() {\r\n\t\tproductSet.add(new FoodItems(1000, \"maggi\", 12.0, 100, new Date(), new Date(), \"yes\"));\r\n\t\tproductSet.add(new FoodItems(1001, \"Pulses\", 55.0, 50, new Date(), new Date(), \"yes\"));\r\n\t\tproductSet.add(new FoodItems(1004, \"Meat\", 101.53, 5, new Date(), new Date(), \"no\"));\r\n\t\tproductSet.add(new FoodItems(1006, \"Jelly\", 30.0, 73, new Date(), new Date(), \"no\"));\r\n\t\t\r\n\t\tproductSet.add(new Apparels(1005, \"t-shirt\", 1000.0, 10, \"small\", \"cotton\"));\r\n\t\tproductSet.add(new Apparels(1002, \"sweater\", 2000.0, 5,\"medium\", \"woolen\"));\r\n\t\tproductSet.add(new Apparels(1003, \"cardigan\", 1001.53,22, \"large\", \"cotton\"));\r\n\t\tproductSet.add(new Apparels(1007, \"shirt\", 500.99, 45,\"large\",\"woolen\"));\r\n\t\t\r\n\t\tproductSet.add(new Electronics(1010, \"tv\", 100000.0, 13, 10));\r\n\t\tproductSet.add(new Electronics(1012, \"mobile\", 20000.0, 20,12));\r\n\t\tproductSet.add(new Electronics(1013, \"watch\", 1101.53,50, 5));\r\n\t\tproductSet.add(new Electronics(1009, \"headphones\", 300.0, 60,2));\r\n\t\t\r\n\t}", "public List<Integer> getWishList() {\n\t\treturn wishList;\n\t}", "public synchronized void clickOnWishList(WebDriver driver) throws Exception {\n\n\t\tutils.isElementPresent(driver, \"Add_To_WishList\");\n\n\t\ttry {\n\n\t\t\tWebElement elem = utils.findElementByLocator(driver, \"Add_To_WishList\", \"Add To Wishlist not clicked\");\n\t\t\telem.click();\n\t\t\tReporterLog.actionMsg(\"Add To WishList clicked\");\n\n\t\t} catch (Exception e) {\n\n\t\t\tCustomException.throwExceptionError(e, \"PDP\", \"Add To WishList action failed\", driver);\n\t\t}\n\t}", "private void notifyWishlists(String title) {\n\t\tfor(User u:LibrarySystem.getInstance().users) {\n\t\t\tfor(String wish:u.getWishlist()) {\n\t\t\t\tif(wish.equalsIgnoreCase(title)) {\n\t\t\t\t\tu.notify(\"An item from your wishlist had been added: \" + title + \"!\");\n\t\t\t\t\t//u.getWishlist().remove(title);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public WishlistItemTbl () {\n\t\tsuper();\n\t}", "public static Product generateProduct()\n {\n Random r = new Random();\n Product p = new Product();\n String [] itemName = {\"Cool Hat\" , \"Cool Watch\" , \"Cool Necklace\", \"Black Lipstick\" , \"Red LipStick\" ,\n \"Black Eyeliner\" , \"Blue Shirt\" , \"Blue Jeans\" , \"Black Dress\" , \"Red Bag\" ,\n \"White Bag\" , \"Yellow Bag\" , \"Cool Flip Flops\", \"Cool Shoes\" , \"Cool Heels\" ,\n \"Cool Blender\" , \"Cool Mixer\" , \"Cool Juicer\" };\n p.productID = 1 + r.nextInt(6);\n\n if( p.productID == 1){\n p.productName = itemName[r.nextInt(3)];\n p.productType = (\"Accessory\");\n p.productSize = 1;\n }\n if( p.productID == 2) {\n p.productName = itemName[3 + r.nextInt(3)];\n p.productType = (\"Beauty\");\n p.productSize = 2;\n }\n if( p.productID == 3) {\n p.productName = itemName[6 + r.nextInt(3)];\n p.productType = (\"Clothes\");\n p.productSize = 2;\n }\n if( p.productID == 4){\n p.productName = itemName[9 + r.nextInt(3)];\n p.productType = (\"Bags\");\n p.productSize = 3;\n }\n if( p.productID == 5){\n p.productName = itemName[12 + r.nextInt(3)];\n p.productType = (\"Shoes\");\n p.productSize = 3;\n }\n if( p.productID == 6) {\n p.productName = itemName[15 + r.nextInt(3)];\n p.productType = (\"Housewares\");\n p.productSize = 5;\n }\n\n p.productSku = 1000000 + r.nextInt(9999999);\n\n\n\n\n return p;\n }", "public void addProduct(Product product);", "public Pizza(){\n this.name = \"Plain Pizza\";\n this.toppings = new ArrayList<String>(Arrays.asList(\"Olive\", \"Cheese\"));\n }", "public void createWaitList() {\n\n\t\tIterator it = getOrderProducts();\n\n\t\twhile (it.hasNext()) {\n\t\t\tOrderLineItem orderItem = (OrderLineItem) it.next();\n\t\t\tint oldProductQuantity = orderItem.product.getQuantity();\n\n\t\t\tif (orderItem.product.getQuantity() >= orderItem.quantity) {\n\t\t\t\torderItem.product.setQuantity(orderItem.product.getQuantity() - orderItem.quantity);\n\n\t\t\t}\n\n\t\t\telse if (orderItem.product.getQuantity() < orderItem.quantity) {\n\t\t\t\t// how much we are requesting - current stock\n\t\t\t\tint tempQuantityFornewWaitlist = orderItem.quantity - orderItem.product.getQuantity();\n\t\t\t\t// assign to new order waitlist item\n\t\t\t\tOrderLineItem newWaitListedItem = new OrderLineItem(orderItem.product, tempQuantityFornewWaitlist);\n\t\t\t\twaitlistItems.add(newWaitListedItem);\n\n\t\t\t\torderItem.quantity = oldProductQuantity;\n\t\t\t\torderItem.product.setQuantity(0);\n\n\t\t\t\t// System.out.println(\"waitlisted item: \"+ newWaitListedItem+ \"\n\t\t\t\t// waitlistItems: \" + waitlistItems + \" order items quantity:\" +\n\t\t\t\t// orderItem.quantity);\n\n\t\t\t}\n\t\t}\n\t}", "public void createPromo() {\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Whats the new promo's name?\");\r\n\t\tthis.name = sc.nextLine();\r\n\t\tSystem.out.println(\"Whats the new promo's description?\");\r\n\t\tthis.description = sc.nextLine();\r\n\t\tSystem.out.println(\"Whats the new promo's price?\");\r\n\t\tthis.price = sc.nextDouble();\r\n\t\tint createChoice = 0;\r\n\t\twhile (createChoice < 2){\r\n\t\t\tSystem.out.println(\"What would you like to do?\");\r\n\t\t\tSystem.out.println(\"1. add items 2. quit\");\r\n\t\t\tcreateChoice = sc.nextInt();\r\n\t\t\tsc.nextLine();\r\n\t\t\tif (createChoice == 1){\r\n\t\t\t\tthis.addPromoItem();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void productsToBuy(Product purchase){\n bill.getProducts().add(purchase);\n }", "void addProduct(Product product);", "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}", "void addToFavorites(int recipeId);", "private void registerClick() {\n listView = (ListView) findViewById(R.id.listViewPick);\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n private AdapterView parent;\n\n @Override\n public void onItemClick(AdapterView<?> parent, View viewClicked, int position, long id) {\n this.parent = parent;\n TextView textView = (TextView) viewClicked;\n //String message = \"You clicked # \" + position + \", which is list: \" + textView.getText().toString();\n //Toast.makeText(PickExisting.this, message, Toast.LENGTH_SHORT).show();\n\n String name = textView.getText().toString();\n Product product = new Product();\n product = myDB.findProdByName(name);\n\n if (FROM.equals(\"UseList\")) {\n myDB.addListProduct(FORWARD, product);\n }else{\n myDB.addInventoryProduct(FORWARD, product);\n }\n }\n });\n }", "public void addToBasket(Product product){\n\n Purchaseitem purchaseitem = new Purchaseitem();\n purchaseitem.setProduct(product.getId());\n purchaseitem.setProductByProduct(product);\n boolean toAdd = false;\n if(basket.isEmpty()){\n purchaseitem.setQuantity(1);\n basket.add(purchaseitem);\n }else {\n for(int i = 0; i < basket.size(); i++){\n if(basket.get(i).getProduct() == product.getId()){\n basket.get(i).setQuantity(basket.get(i).getQuantity() + 1);\n return;\n } else {\n purchaseitem.setQuantity(1);\n toAdd = true;\n }\n }\n }\n if(toAdd){\n basket.add(purchaseitem);\n }\n }", "@POST\n @Produces(MediaType.APPLICATION_XML)\n @Consumes(MediaType.APPLICATION_FORM_URLENCODED)\n public ShoppingList creatShoppingList(@QueryParam(\"id\") Long id, @QueryParam(\"name\") String name) throws WebApplicationException {\n boolean b = sls.createShoppingList(id, name);\n if (b == true) {\n return sls.getShoppingList(id);\n } else {\n throw new WebApplicationException(Response.Status.BAD_REQUEST);\n }\n }", "public List<Wish> getAllWishes() {\n List<Wish> wishes = new ArrayList<Wish>();\n String selectQuery = \"SELECT * FROM \" + TABLE_WISH;\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (c.moveToFirst()) {\n do {\n Wish wh = new Wish();\n wh.setId(c.getLong((c.getColumnIndex(KEY_ID))));\n wh.setWishName((c.getString(c.getColumnIndex(KEY_WISHNAME))));\n wh.setStatus(c.getInt(c.getColumnIndex(KEY_STATUS)));\n\n // adding to wish list\n wishes.add(wh);\n } while (c.moveToNext());\n }\n c.close();\n return wishes;\n }", "public void createNewList(ActionEvent actionEvent) {\n // ideally again, this would have its own window\n // give it a title, and optionally populate it with some items\n }", "public void addProduct(Product item)\n {\n stock.add(item);\n }", "public void addToInventory() {\r\n\t\tdo {\r\n\t\t\tint quantity = 0;\r\n\t\t\tString brand = getToken(\"Enter washer brand: \");\r\n\t\t\tString model = getToken(\"Enter washer model: \");\r\n\t\t\tWasher washer = store.searchWashers(brand + model);\r\n\t\t\tif (washer == null) {\r\n\t\t\t\tSystem.out.println(\"No such washer exists.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tquantity = getInteger(\"Enter quantity to add: \");\r\n\t\t\tboolean result = store.addWasherToInventory(brand, model, quantity);\r\n\t\t\tif(result) {\r\n\t\t\t\tSystem.out.println(\"Added \" + quantity + \" of \" + washer);\r\n\t\t\t}else {\r\n\t\t\t\tSystem.out.println(\"Washer could not be added to inventory.\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} while (yesOrNo(\"Add more washers to the inventory?\"));\r\n\t}", "public static void main(String[] args) {\n\t\tGiftList list = new GiftList();\r\n\r\n\t\tSystem.out.println(\"Creating 3 gifts.....\");\r\n\t\tfor(int i=1;i<4;i++) {\r\n\t\t\tGiftBasket basket= new GiftBasket(i+5,\"Large\",i*5);\r\n\t\t\t//list.addGiftBasketToEnd(basket);\r\n\t\t}\r\n\t\tlist.showAllGiftBaskets();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public ShowProductListLimited() {\n initComponents();\n List<Product> products = WinkelApplication.getQueryManager().getProductList();\n DefaultTableModel model = (DefaultTableModel) this.jTable1.getModel();\n for (Product product : products) {\n model.addRow(new Object[]{new Integer(product.getProductId()),\n product.getCategorieId(),\n product.getName(),\n product.getPrice(),\n product.getDescription()});\n }\n }", "public void addButtonClicked(View view) {\n\n Products product = new Products(johnsInput.getText().toString());\n\n dbHandler.addProduct(product);\n printDatabase();\n }", "@Override\n public void addProductToFavorites(View view, Intent intent) {\n try {\n if(iProduct != null && view != null && intent != null){\n Context context = view.getContext();\n String jsonProduct = intent.getStringExtra(CommonPresenter.DETAIL_PRODUCT);\n Product product = CommonPresenter.getProductFromJSON(jsonProduct);\n CRUDFavorite crudFavorite = new CRUDFavorite(context);\n boolean isProductExists = crudFavorite.isProductExists(product.getProductId());\n if(isProductExists){\n crudFavorite.deleteByProductId(product.getProductId());\n CommonPresenter.showSnackBarMessage(view, context.getString(R.string.lb_product_delete_to_favorite));\n iProduct.changeImageRightResource(R.drawable.ic_add_to_favorite_32dp);\n }\n else{\n crudFavorite.add(new Favorite(0, product));\n CommonPresenter.showSnackBarMessage(view, context.getString(R.string.lb_product_add_to_favorite));\n iProduct.changeImageRightResource(R.drawable.ic_favorite_32dp);\n }\n }\n }\n catch (Exception ex){\n Log.e(\"TAG_ERROR\", \"ProductPresenter-->addProductToFavorites() : \"+ex.getMessage());\n }\n }", "@Override\n public void onClick(View v) {\n FavouriteDatabase fd = new FavouriteDatabase();\n fd.addToFavouritesList(catID);\n Toast.makeText(getContext(), \"Added to your Favourites\", Toast.LENGTH_SHORT).show();\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 }", "public void addProductToBuyBasket(Product product, int count) {\n if (buyBasket.containsKey(product.getId()))\n buyBasket.replace(product.getId(), buyBasket.get(product.getId() + count));\n else\n buyBasket.put(product.getId(), count);\n }", "public addproduct() {\n\t\tsuper();\n\t}", "public TransationRecords buyProduct(String species, int number) {\n HashMap<String , List<HashMap<String,String >>> productInfo = new HashMap<>();\n productInfo = productList.getProductInfo();\n if (species.equals(\"CHICKEN\")) {\n for (int i = 0; i < number; i++) {\n Chicken chicken = new Chicken();\n productList.chickenList.add(chicken);\n this.farmOwner.minusMoney(chicken.getBuyValue());\n }\n return new TransationRecords(\"CHICKEN\", TransationRecords.SellOrBuy.BUY,\n number, new Chicken().getBuyValue(), (int) this.farmOwner.getMoney(), productInfo);\n } else if (species.equals(\"DOG\")) {\n for (int i = 0; i < number; i++) {\n Dog dog = new Dog();\n productList.dogList.add(dog);\n this.farmOwner.minusMoney(dog.getBuyValue());\n }\n return new TransationRecords(\"DOG\", TransationRecords.SellOrBuy.BUY,\n number, new Dog().getBuyValue(), (int) this.farmOwner.getMoney(), productInfo);\n } else if (species.equals(\"PERCH\")) {\n for (int i = 0; i < number; i++) {\n Perch perch = new Perch();\n productList.perchList.add(perch);\n this.farmOwner.minusMoney(perch.getBuyValue());\n }\n return new TransationRecords(\"PERCH\", TransationRecords.SellOrBuy.BUY,\n number, new Perch().getBuyValue(), (int) this.farmOwner.getMoney(), productInfo);\n } else if (species.equals(\"APPLE\")) {\n for (int i = 0; i < number; i++) {\n Apple apple = new Apple();\n productList.appleList.add(apple);\n this.farmOwner.minusMoney(apple.getBuyValue());\n }\n return new TransationRecords(\"APPLE\", TransationRecords.SellOrBuy.BUY,\n number, new Apple().getBuyValue(), (int) this.farmOwner.getMoney(), productInfo);\n } else if (species.equals(\"CHERRY\")) {\n for (int i = 0; i < number; i++) {\n Cherry cherry = new Cherry();\n productList.cherryList.add(cherry);\n this.farmOwner.minusMoney(cherry.getBuyValue());\n }\n return new TransationRecords(\"CHERRY\", TransationRecords.SellOrBuy.BUY,\n number, new Cherry().getBuyValue(), (int) this.farmOwner.getMoney(), productInfo);\n } else if (species.equals(\"POTATO\")) {\n for (int i = 0; i < number; i++) {\n Potato potato = new Potato();\n productList.potatoList.add(potato);\n this.farmOwner.minusMoney(potato.getBuyValue());\n }\n return new TransationRecords(\"POTATO\", TransationRecords.SellOrBuy.BUY,\n number, new Potato().getBuyValue(), (int) this.farmOwner.getMoney(), productInfo);\n } else if (species.equals(\"TOMATO\")) {\n for (int i = 0; i < number; i++) {\n Tomato tomato = new Tomato();\n productList.tomatoList.add(tomato);\n this.farmOwner.minusMoney(tomato.getBuyValue());\n }\n return new TransationRecords(\"TOMATO\", TransationRecords.SellOrBuy.BUY,\n number, new Tomato().getBuyValue(), (int) this.farmOwner.getMoney(), productInfo);\n }\n return emptyRecords;\n }", "public PlaceOrder() {\n initComponents();\n this.setSize(1090, 750);\n \n System.out.println(\"new Order().getAllOrders() = \" + new Order().getAllOrders());\n \n this.products = new ArrayList<>();\n \n this.productsList = new ItemList(ProductOrderPanel.WIDTH);\n this.getAllCustomers();\n \n pnlAddProducts.add(productsList, new org.netbeans.lib.awtextra.AbsoluteConstraints(55, 260, ProductOrderPanel.WIDTH, 250));\n \n UIUtils.setIcon(this.jbPlaceOrder, \"save\");\n UIUtils.setIcon(this.jbAdd, \"add\");\n \n \n \n }", "public String clickWishListProductListAndGetProductHeader()throws Exception{\r\n SearchPageFactory pageFactory = new SearchPageFactory(driver);\r\n clickElement(pageFactory.openWishlistProductList,Constant.explicitTime);\r\n String wishlistProductItemHeader = getElementText(pageFactory.wishListRelatedItemHeader);\r\n return wishlistProductItemHeader;\r\n }", "public void add_to_my_list_process(View v) {\n\n addToCart_flag = false;\n // get current login value saved in sharedpreferences object\n SharedPreferences loginSharedPref = getSharedPreferences(\"LoginData\", MODE_PRIVATE);\n // get current agent id\n final String AgentID = loginSharedPref.getString(\"ID\", \"\");\n // create string\n create_final_string_product();\n /* get all list names into arraylist object */\n ArrayList<String> listNames = get_list_data_from_local_DB(AgentID);\n // display alert box to choose list name by user\n display_list_names(listNames, AgentID);\n // clear all data after adding product into cart\n clear_data();\n }", "private void createNewListSection() {\n\t\tImageIcon image10 = new ImageIcon(sURLFCL1);\n\t\tImageIcon image11 = new ImageIcon(sURLFCL2);\n\t\tImageIcon image12 = new ImageIcon(sURLFCL3);\n\t\tjbCreateLists = new JButton(\"New PlayList\");\n\t\tjbCreateLists.setFont(new java.awt.Font(\"Century Gothic\",0, 15));\n\t\tjbCreateLists.setForeground(new Color(150,100,100));\n\t\tjbCreateLists.setIcon(image10);\n\t\tjbCreateLists.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tjbCreateLists.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tjbCreateLists.setRolloverIcon(image11);\n\t\tjbCreateLists.setRolloverSelectedIcon(image12);\t\n\t\tjbCreateLists.setContentAreaFilled(false);\n\t\tjbCreateLists.setFocusable(false);\n\t\tjbCreateLists.setBorderPainted(false);\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 addBuy() {\r\n\t\tbuys++;\r\n\t\tnotifyObservers();\r\n\t}", "public void create(Pizza pizza){\n pizza.setID(counter++);\n pizzas.add(pizza);\n }", "public List<ShelfItem> getAllWishlist(String filter, String username, Integer from, Integer to);", "Product addNewProductInStore(Product newProduct);", "void createOrUpdateProducts(List<PsdProduct> psdProducts);", "public void createListIndex(HttpServletRequest request){\n \n HttpSession session = request.getSession();\n \n \n DAOFactory mySqlFactory = DAOFactory.getDAOFactory();\n ShoppingListDAO riverShoppingListDAO = mySqlFactory.getShoppingListDAO();\n ShoppingListDAO shoppingListDAO = new MySQLShoppingListDAOImpl();\n ProductCategoryDAO riverProductCategoryDAO = mySqlFactory.getProductCategoryDAO();\n ProductCategoryDAO productCategoryDAO = new MySQLProductCategoryDAOImpl();\n ProductListDAO riverProductListDAO = mySqlFactory.getProductListDAO();\n ProductListDAO productListDAO = new MySQLProductListDAOImpl();\n ProductDAO riverProductDAO = mySqlFactory.getProductDAO();\n ProductDAO productDAO = new MySQLProductDAOImpl();\n UserDAO riverUserDAO = mySqlFactory.getUserDAO();\n UserDAO userDAO = new MySQLUserDAOImpl();\n \n List resultSharingList = null;\n List AllProductInListRand = null;\n List resultList = null; \n ShoppingList resultListRand = null;\n \n String email = null;\n int cookieID = 0;\n \n //rihuardare\n \n if(session.getAttribute(\"emailSession\")!=null){\n email = (String)session.getAttribute(\"emailSession\"); \n } \n \n resultSharingList = shoppingListDAO.getAllShoppingListEditable(email);\n \n if(session.getAttribute(\"cookieIDSession\")!=null){\n cookieID = (int)session.getAttribute(\"cookieIDSession\");\n } \n \n resultListRand = shoppingListDAO.getRandShoppingList(email, cookieID);\n \n if(resultListRand != null){\n AllProductInListRand = productListDAO.getPIDsByLID(resultListRand.getLID());\n session.setAttribute(\"resultListRandExist\", true);\n } else {\n session.setAttribute(\"resultListRandExist\", false);\n }\n \n resultList = shoppingListDAO.getShoppingListByUserIDOrCookieID(email, cookieID);\n \n List prodottiRandom = null;\n if(session.getAttribute(\"emailSession\")!=null){\n prodottiRandom = productDAO.getRandomProduct((String)session.getAttribute(\"emailSession\"));\n } else {\n prodottiRandom = productDAO.getRandomProduct(null);\n }\n \n //resultListRand\n \n String[][] resultListRandMatrix = null;\n \n if(resultListRand != null){\n \n resultListRandMatrix = new String[1][2];\n session.setAttribute(\"listaAnonimo\", true);\n \n resultListRandMatrix[0][0] = Integer.toString(resultListRand.getLID());\n resultListRandMatrix[0][1] = resultListRand.getName();\n \n } else {\n resultListRandMatrix = new String[0][2];\n }\n \n //AllProductInListRand\n Product tmp1 = null;\n User tmp2 = null;\n ProductCategory productCategory = null;\n SharingProductDAO sharingProductDAO = new MySQLSharingProductDAOImpl();\n List userSharedProduct = null;\n \n String[][] AllProductInListRandMatrix = null;\n \n if(AllProductInListRand != null){\n \n AllProductInListRandMatrix = new String[AllProductInListRand.size()][9];\n\n for(int i=0; i<AllProductInListRand.size(); i++){\n \n\n tmp1 = productDAO.getProduct(((ProductList)(AllProductInListRand.get(i))).getPID(), email);\n tmp2 = userDAO.getUser(tmp1.getEmail());\n productCategory = productCategoryDAO.getProductCategory(tmp1.getPCID());\n\n AllProductInListRandMatrix[i][0] = Integer.toString(tmp1.getPID());\n AllProductInListRandMatrix[i][1] = tmp1.getName();\n AllProductInListRandMatrix[i][2] = tmp1.getNote();\n AllProductInListRandMatrix[i][3] = tmp1.getLogo();\n AllProductInListRandMatrix[i][4] = tmp1.getPhoto();\n AllProductInListRandMatrix[i][5] = tmp2.getName();\n AllProductInListRandMatrix[i][6] = tmp2.getSurname();\n AllProductInListRandMatrix[i][7] = productCategory.getName();\n \n if (!(tmp2).getAdmin()) {\n userSharedProduct = sharingProductDAO.getAllEmailsbyPID(Integer.parseInt(AllProductInListRandMatrix [i][0]));\n if (userSharedProduct.isEmpty() || userSharedProduct.size()>1){\n AllProductInListRandMatrix[i][8] = String.valueOf(userSharedProduct.size()) + \" utenti\";\n } else {\n AllProductInListRandMatrix[i][8] = String.valueOf(userSharedProduct.size()) + \" utente\";\n }\n } else {\n AllProductInListRandMatrix[i][8] = \"Tutti gli utenti\";\n }\n\n }\n \n } else {\n AllProductInListRandMatrix = new String[0][9];\n }\n \n //resultList\n ShoppingList tmp = null;\n String[][] resultListMatrix = null;\n \n if(resultList != null){\n \n resultListMatrix = new String[resultList.size()][2];\n\n for(int i=0; i<resultList.size(); i++){\n\n tmp = shoppingListDAO.getShoppingList(((ShoppingList)(resultList.get(i))).getLID());\n\n resultListMatrix[i][0] = Integer.toString(tmp.getLID());\n resultListMatrix[i][1] = tmp.getName();\n\n }\n \n } else {\n resultListMatrix = new String[0][2];\n }\n \n //resultSharingList\n tmp = null;\n String[][] resultSharingListMatrix = null;\n \n if(resultSharingList != null){\n \n resultSharingListMatrix = new String[resultSharingList.size()][2];\n\n for(int i=0; i<resultSharingList.size(); i++){\n\n tmp = shoppingListDAO.getShoppingList(((ShoppingList)(resultSharingList.get(i))).getLID());\n\n resultSharingListMatrix[i][0] = Integer.toString(tmp.getLID());\n resultSharingListMatrix[i][1] = tmp.getName();\n\n }\n \n } else {\n resultSharingListMatrix = new String[0][2];\n }\n \n //prodottiRandom\n tmp1 = null;\n tmp2 = null;\n String[][] prodottiRandomMatrix = new String[prodottiRandom.size()][9];\n \n for(int i=0; i<prodottiRandom.size(); i++){\n \n tmp1 = (Product)prodottiRandom.get(i);\n tmp2 = userDAO.getUser(tmp1.getEmail());\n \n prodottiRandomMatrix[i][0] = Integer.toString(tmp1.getPID());\n prodottiRandomMatrix[i][1] = tmp1.getName();\n prodottiRandomMatrix[i][2] = tmp1.getNote();\n prodottiRandomMatrix[i][3] = tmp1.getLogo();\n prodottiRandomMatrix[i][4] = tmp1.getPhoto();\n prodottiRandomMatrix[i][5] = (productCategoryDAO.getProductCategory(tmp1.getPCID())).getName();\n prodottiRandomMatrix[i][6] = tmp2.getName();\n prodottiRandomMatrix[i][7] = tmp2.getSurname();\n if (!(tmp2).getAdmin()) {\n userSharedProduct = sharingProductDAO.getAllEmailsbyPID(Integer.parseInt(prodottiRandomMatrix [i][0]));\n if (userSharedProduct.isEmpty() || userSharedProduct.size()>1){\n prodottiRandomMatrix[i][8] = String.valueOf(userSharedProduct.size()) + \" utenti\";\n } else {\n prodottiRandomMatrix[i][8] = String.valueOf(userSharedProduct.size()) + \" utente\";\n }\n } else {\n prodottiRandomMatrix[i][8] = \"Tutti gli utenti\";\n } \n\n }\n \n session.setAttribute(\"resultListRand\", resultListRandMatrix);\n session.setAttribute(\"resultList\", resultListMatrix);\n session.setAttribute(\"resultSharingList\", resultSharingListMatrix); \n session.setAttribute(\"AllProductInListRand\", AllProductInListRandMatrix);\n session.setAttribute(\"prodottiRand\", prodottiRandomMatrix);\n \n }", "public void insertIntoProduct() {\n\t\ttry {\n\t\t\tPreparedStatement statement = connect.prepareStatement(addProduct);\n\t\t\tstatement.setString(1, productName);\n\t\t\tstatement.setString(2, quantity);\n\t\t\t\n\t\t\tstatement.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "public long addProductShoppingList(String name, int quality, double quantity, String unit) {\n long pid = addNewProduct(name);\n Cursor c = null;\n\n SQLiteDatabase db = DBHelper.getWritableDatabase();\n if (pid == -1) {\n\n String[] args = new String[1];\n args[0] = name;\n c = db.rawQuery(\"SELECT * FROM Products WHERE pname=?\", args);\n c.moveToFirst();\n while (!c.isAfterLast()) {\n pid=c.getInt(c.getColumnIndex(\"_id\"));\n c.moveToNext();\n }\n }\n ContentValues cv = new ContentValues();\n cv.put(DBHelper.SHOPPINGLIST_PID, (int) pid);\n cv.put(DBHelper.SHOPPINGLIST_QUALITY, quality);\n cv.put(DBHelper.SHOPPINGLIST_QUANTITY, quantity);\n cv.put(DBHelper.SHOPPINGLIST_UNIT, unit);\n\n long _id = db.insert(DBHelper.TABLE_SHOPPINGLIST, null, cv);\n\n if (_id > 0) {\n Log.d(DatabaseHelper.class.getName(), \"AddProductShoppingList: _id:\" + String.valueOf(_id) + \", pid:\" + String.valueOf(pid) + \", pname:\" + name);\n } else {\n Log.d(DatabaseHelper.class.getName(), \"AddProductShoppingList: pname:'\" + name + \"', But already in ShoppingList table.\");\n }\n db.close();\n return _id;\n }", "@Override\r\n\tpublic void addProduct() {\n\r\n\t\ttry {\r\n\t\t\toos = new ObjectOutputStream(new FileOutputStream(\"pizza.txt\"));\r\n\t\t\r\n\t\t\tint flag = 1;\r\n\t\t\twhile (flag == 1) {\r\n\t\t\t\tSystem.out.println(\"Enter your Pid\");\r\n\t\t\t\tint pId = sc.nextInt();\r\n\t\t\t\tSystem.out.println(\"Enter your pname\");\r\n\t\t\t\tString pName = sc.next();\r\n\t\t\t\tSystem.out.println(\"Enter your pprice\");\r\n\t\t\t\tint pPrice = sc.nextInt();\r\n\t\t\t\tSystem.out.println(\"enter quantity\");\r\n\t\t\t\tint pqty = sc.nextInt();\r\n\t\t\t\tPizzaBean pb = new PizzaBean(pId, pName, pPrice, pqty);\r\n\t\t\t\tpizza.add(pb);\r\n\t\t\t\tSystem.out\r\n\t\t\t\t\t\t.println(\"Do you want to add one more record press 1 otherwise any number\");\r\n\t\t\t\tflag = sc.nextInt();\r\n\t\t\t}\r\n\t\t\t\toos.writeObject(pizza);\r\n\t\t\t\toos.flush();\r\n\t\t\t\toos.close();\r\n\t\t\t\tSystem.out.println(\"----Pizzas succesfully added----------\");\r\n\t\t}\r\n\t\t\t catch (IOException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t\r\n\t}", "@FXML\n public void generateShoppingList(){\n\n shoppingListIngredients.clear();\n //loop through all days of the weeklist\n for (Days dm : ObservableWeekList){\n //if breakfast is set add ingredients to shopping list\n if (dm.isBreakfastSet()){\n shoppingListIngredients.addAll(dm.getBreakfast().getIngredients());\n }\n //if lunch is set add ingredients to shopping list\n if (dm.isLunchSet()){\n shoppingListIngredients.addAll(dm.getLunch().getIngredients());\n }\n //if dinner is set add ingredients to shopping list\n if (dm.isDinnerSet()){\n shoppingListIngredients.addAll(dm.getDinner().getIngredients());\n }\n }\n\n //Sort list into alphabetical order and combine repeat ingredients together adding up their quantities\n if (shoppingListIngredients.size() > 0){\n //sort the order of the list into alphabetical by ingredient name\n shoppingListIngredients.sort( ((o1, o2) -> o1.getName().compareTo(o2.getName())));\n if (shoppingListIngredients.size() > 1){\n for (int i = 0; i < shoppingListIngredients.size() -1; i ++){\n //get the unique ID of the ingredients to compare\n int firstIngredientID = shoppingListIngredients.get(i).getId();\n int secondIngredientID = shoppingListIngredients.get(i+1).getId();\n //if the ingredients are the same. Add their quantities together and remove one of them\n if (firstIngredientID == secondIngredientID){\n double firstIngredientQuantity = shoppingListIngredients.get(i).getQuantityInGrams();\n double secondIngredientQuantity = shoppingListIngredients.get(i+1).getQuantityInGrams();\n shoppingListIngredients.get(i).setQuantityInGrams(firstIngredientQuantity +\n secondIngredientQuantity);\n shoppingListIngredients.remove(i + 1);\n //if an ingredient is removed from the list then i needs to be rolled back by one so that\n //no ingredient is missed\n i --;\n }\n }\n }\n }\n\n //compare the cupboard ingredients list with shopping list. If the shopping list ingredient exists in the\n //cupboard stores then:\n //- If the cupboard stores has more than the required amount in shopping list, remove the ingredient from\n // the shopping list\n //- If the cupboard stores only has some of quantity required in the shopping list, reduce the quantity in the\n // the shopping list\n if (cupboardCheckBox.isSelected()){\n for (int z = 0; z < shoppingListIngredients.size(); z++){\n Ingredient shoppingIngredient = shoppingListIngredients.get(z);\n for (Ingredient cupboardIngredients: cupboardIngredients){\n if (shoppingIngredient.getId() == cupboardIngredients.getId()){\n //if the shopping list ingredients is already in the cupboard\n if (cupboardIngredients.getQuantityInGrams() > shoppingIngredient.getQuantityInGrams()){\n //if there is enough in the the cupboard remove item from the shopping list\n shoppingListIngredients.remove(shoppingIngredient);\n z --;\n } else {\n //if there isnt enough in the cupboard stores\n //remove the cupboard amount from the shopping item\n double newAmountInGrams = shoppingIngredient.getQuantityInGrams() \n - cupboardIngredients.getQuantityInGrams();\n shoppingIngredient.setQuantityInGrams(newAmountInGrams);\n }\n }\n }\n }\n }\n\n //When the shopping list is newly generated then the planner and shopping list are in sync\n plannerOutOfSyncWithShoppingList(false);\n //save when the shopping list was generated\n settings.setGeneratedShoppingList(LocalDateTime.now());\n //go to view the shopping list pane to view the shopping list straight away\n plannerShoppingListBtnClicked();\n\n //save the shopping list\n Data.<Ingredient>saveList(shoppingListIngredients, shoppingListFile);\n\n }", "private void addToFavorites() {\n\n favoriteBool = true;\n preferencesConfig.writeAddFavoriteTip(shownTipIndex);\n Toast.makeText(getContext(), \"Added to favorites.\", Toast.LENGTH_SHORT).show();\n\n }", "private void chooseAddItemsToJcb() {\n if (animalFamilyType.contains(\"Terr\")) {\n addItemJcb(terAnimals);\n } else if (animalFamilyType.contains(\"Air\")) {\n addItemJcb(airAnimals);\n } else if (animalFamilyType.contains(\"Water\")) {\n addItemJcb(waterAnimals);\n }\n }", "public static void llenarWalmart(){\r\n \r\n \r\n Producto café = new Producto(\"cafe\", \"nescafe\", 77, 2);\r\n Nodo<Producto> nTemp = new Nodo(café);\r\n listaWalmart.agregarNodo(nTemp);\r\n \r\n Producto panblancobimbo = new Producto(\"pan blanco bimbo\", \"bimbo\", 30, 2);\r\n Nodo<Producto> nTemp2 = new Nodo(panblancobimbo);\r\n listaWalmart.agregarNodo(nTemp2);\r\n \r\n Producto lecheentera = new Producto(\"leche\", \"Lala\", 17, 2);\r\n Nodo<Producto> nTemp3 = new Nodo(lecheentera);\r\n listaWalmart.agregarNodo(nTemp3);\r\n \r\n Producto mantequilla = new Producto(\"mantequilla\", \"sin sal lala\", 11.50, 2);\r\n Nodo<Producto> nTemp4 = new Nodo(mantequilla);\r\n listaWalmart.agregarNodo(nTemp4);\r\n \r\n Producto huevoblanco= new Producto(\"huevo\", \"san juan\",50.50, 2);\r\n Nodo<Producto> nTemp5 = new Nodo(huevoblanco);\r\n listaWalmart.agregarNodo(nTemp5);\r\n \r\n Producto crema= new Producto(\"crema\", \"lala\", 46, 2);\r\n Nodo<Producto> nTemp6 = new Nodo(crema);\r\n listaWalmart.agregarNodo(nTemp6);\r\n \r\n Producto naranja= new Producto(\"naranja\", \"valencia\", 15.90, 0);\r\n Nodo<Producto> nTemp7 = new Nodo(naranja);\r\n listaWalmart.agregarNodo(nTemp7);\r\n \r\n Producto limon= new Producto(\"limon\", \"limon agrio\", 25.90, 0);\r\n Nodo<Producto> nTemp8 = new Nodo(limon);\r\n listaWalmart.agregarNodo(nTemp8);\r\n \r\n Producto manzana= new Producto(\"manzana\", \"red delicious\", 39.90, 0);\r\n Nodo<Producto> nTemp9 = new Nodo(manzana);\r\n listaWalmart.agregarNodo(nTemp9);\r\n \r\n Producto plátano = new Producto(\"platano\", \"chiapas\", 13.90, 0);\r\n Nodo<Producto> nTemp10 = new Nodo(plátano);\r\n listaWalmart.agregarNodo(nTemp10);\r\n \r\n Producto papaya= new Producto(\"papaya\", \"maradol\",27.90, 0);\r\n Nodo<Producto> nTemp11 = new Nodo(papaya);\r\n listaWalmart.agregarNodo(nTemp11);\r\n \r\n Producto uva= new Producto(\"uva\", \"roja sin semilla\", 59, 0);\r\n Nodo<Producto> nTemp12 = new Nodo(uva);\r\n listaWalmart.agregarNodo(nTemp12);\r\n \r\n Producto chiledelarbol= new Producto(\"chile del arbol\", \"verde valle\", 20, 2);\r\n Nodo<Producto> nTemp13 = new Nodo(chiledelarbol);\r\n listaWalmart.agregarNodo(nTemp13);\r\n \r\n Producto piernaymuslodepollo = new Producto(\"pierna y muslo de pollo\", \"bachoco\", 34, 1);\r\n Nodo<Producto> nTemp14 = new Nodo(piernaymuslodepollo);\r\n listaWalmart.agregarNodo(nTemp14);\r\n \r\n Producto pechugadepollo= new Producto(\"pechuga de pollo\", \"bachoco\", 114, 1);\r\n Nodo<Producto> nTemp15 = new Nodo(pechugadepollo);\r\n listaWalmart.agregarNodo(nTemp15);\r\n \r\n Producto costilladecerdo= new Producto(\"costilla de cerdo\", \"pork loin\", 114, 1);\r\n Nodo<Producto> nTemp16 = new Nodo(costilladecerdo);\r\n listaWalmart.agregarNodo(nTemp16);\r\n \r\n Producto carnemolida= new Producto(\"carne molida\", \"premium\", 152, 1);\r\n Nodo<Producto> nTemp17 = new Nodo(carnemolida);\r\n listaWalmart.agregarNodo(nTemp17);\r\n \r\n Producto chuletadecostilla= new Producto(\"chuleta de costilla\", \"premium\", 219, 1);\r\n Nodo<Producto> nTemp18 = new Nodo(chuletadecostilla);\r\n listaWalmart.agregarNodo(nTemp18);\r\n \r\n Producto pescado= new Producto(\"pescado\", \"sierra del golfo\", 89, 1);\r\n Nodo<Producto> nTemp19 = new Nodo(pescado);\r\n listaWalmart.agregarNodo(nTemp19);\r\n \r\n Producto atun= new Producto(\"atun\", \"herdez\", 18.50, 2);\r\n Nodo<Producto> nTemp20 = new Nodo(atun);\r\n listaWalmart.agregarNodo(nTemp20);\r\n \r\n Producto arroz = new Producto(\"arroz\", \"verde valle super extra\", 22.50, 2);\r\n Nodo<Producto> nTemp21 = new Nodo(arroz);\r\n listaWalmart.agregarNodo(nTemp21);\r\n \r\n Producto frijol= new Producto(\"frijol\", \"verde valle\", 30, 2);\r\n Nodo<Producto> nTemp22 = new Nodo(frijol);\r\n listaWalmart.agregarNodo(nTemp22);\r\n \r\n \r\n Producto azucar= new Producto(\"azucar\", \"zulka\", 54, 2);\r\n Nodo<Producto> nTemp23 = new Nodo(azucar);\r\n listaWalmart.agregarNodo(nTemp23);\r\n \r\n Producto consome= new Producto(\"consome\", \"knorr\", 7, 2);\r\n Nodo<Producto> nTemp24 = new Nodo(consome);\r\n listaWalmart.agregarNodo(nTemp24);\r\n \r\n Producto galletassaladas= new Producto(\"galletas saladas\", \"saladitas\", 40, 2);\r\n Nodo<Producto> nTemp25 = new Nodo(galletassaladas);\r\n listaWalmart.agregarNodo(nTemp25);\r\n \r\n Producto sal= new Producto(\"sal\", \"la fina\", 8.90, 2);\r\n Nodo<Producto> nTemp26 = new Nodo(sal);\r\n listaWalmart.agregarNodo(nTemp26);\r\n \r\n Producto pimienta= new Producto(\"pimienta\", \"mccormick\", 47.50, 2);\r\n Nodo<Producto> nTemp27= new Nodo(pimienta);\r\n listaWalmart.agregarNodo(nTemp27);\r\n \r\n Producto comino= new Producto(\"comino\", \"mccormick\", 30, 2);\r\n Nodo<Producto> nTemp28 = new Nodo(comino);\r\n listaWalmart.agregarNodo(nTemp28);\r\n \r\n Producto canela= new Producto(\"canela\", \"el cuernito\", 4.50, 2);\r\n Nodo<Producto> nTemp29 = new Nodo(canela);\r\n listaWalmart.agregarNodo(nTemp29);\r\n \r\n Producto cebolla= new Producto(\"cebolla\", \"blanca\", 31.90, 2);\r\n Nodo<Producto> nTemp30 = new Nodo(cebolla);\r\n listaWalmart.agregarNodo(nTemp30);\r\n \r\n Producto zanahoria= new Producto(\"zanahoria\", \"simple\", 19.50, 2);\r\n Nodo<Producto> nTemp31 = new Nodo(zanahoria);\r\n listaWalmart.agregarNodo(nTemp31);\r\n \r\n Producto polvoparaprepararbebida= new Producto(\"polvo para preparar bebida\", \"zuko\", 3.80, 2);\r\n Nodo<Producto> nTemp32 = new Nodo(polvoparaprepararbebida);\r\n listaWalmart.agregarNodo(nTemp32);\r\n \r\n Producto cereal= new Producto(\"cereal\", \"nestle\", 39.90, 2);\r\n Nodo<Producto> nTemp33 = new Nodo(cereal);\r\n listaWalmart.agregarNodo(nTemp33);\r\n \r\n Producto sopa= new Producto(\"sopa\", \"aurrera \", 3.10, 2);\r\n Nodo<Producto> nTemp34 = new Nodo(sopa);\r\n listaWalmart.agregarNodo(nTemp34);\r\n \r\n \r\n Producto espagueti= new Producto(\"espagueti\", \"moderna\", 5.20, 2);\r\n Nodo<Producto> nTem35 = new Nodo(espagueti);\r\n listaWalmart.agregarNodo(nTem35);\r\n \r\n Producto maquinaparaafeitar= new Producto(\"maquina para afeitar\", \"gillette prestobarba\", 20, 3);\r\n Nodo<Producto> nTemp35 = new Nodo(maquinaparaafeitar);\r\n listaWalmart.agregarNodo(nTemp35);\r\n \r\n Producto shampoo= new Producto(\"shampoo\", \"ego black\", 63.50, 3);\r\n Nodo<Producto> nTemp36 = new Nodo(shampoo);\r\n listaWalmart.agregarNodo(nTemp36);\r\n \r\n \r\n Producto pastadental= new Producto(\"pasta dental\", \"colgate\", 43.50, 3);\r\n Nodo<Producto> nTemp37 = new Nodo(pastadental);\r\n listaWalmart.agregarNodo(nTemp37);\r\n \r\n Producto papelhigienico= new Producto(\"papel higienico\", \"elite\", 17.50, 3);\r\n Nodo<Producto> nTemp38 = new Nodo(papelhigienico);\r\n listaWalmart.agregarNodo(nTemp38);\r\n \r\n Producto pañuelos = new Producto(\"pañuelos\", \"kleenex\", 14.50, 3);\r\n Nodo<Producto> nTemp39 = new Nodo(pañuelos);\r\n listaWalmart.agregarNodo(nTemp39);\r\n \r\n Producto cremad = new Producto(\"crema\", \"pond´s\", 56, 2);\r\n Nodo<Producto> nTemp40 = new Nodo(cremad);\r\n listaWalmart.agregarNodo(nTemp40);\r\n \r\n Producto desodorantemasculino= new Producto(\"desodorante masculino\", \"stefano\", 41.50, 3);\r\n Nodo<Producto> nTemp41 = new Nodo(desodorantemasculino);\r\n listaWalmart.agregarNodo(nTemp41);\r\n \r\n Producto desodorantefemenino= new Producto(\"desodorante femenino\", \"lady speed stick\", 23, 3);\r\n Nodo<Producto> nTemp42 = new Nodo(desodorantefemenino);\r\n listaWalmart.agregarNodo(nTemp42);\r\n \r\n Producto cloro= new Producto(\"cloro\", \"cloralex\", 21, 3);\r\n Nodo<Producto> nTemp43 = new Nodo(cloro);\r\n listaWalmart.agregarNodo(nTemp43);\r\n \r\n Producto pinol= new Producto(\"pinol\", \"pinol\", 29.90, 3);\r\n Nodo<Producto> nTemp44 = new Nodo(pinol);\r\n listaWalmart.agregarNodo(nTemp44);\r\n \r\n Producto lavatrastes= new Producto(\"lavatrastes\", \"axion\", 36.90, 3);\r\n Nodo<Producto> nTemp45 = new Nodo(lavatrastes);\r\n listaWalmart.agregarNodo(nTemp45);\r\n \r\n Producto deterjente= new Producto(\"deterjente\", \"finish\", 99, 3);\r\n Nodo<Producto> nTemp46 = new Nodo(deterjente);\r\n listaWalmart.agregarNodo(nTemp46);\r\n \r\n Producto queso= new Producto(\"queso\", \"chichuahua\", 125, 1);\r\n Nodo<Producto> nTemp47 = new Nodo(queso);\r\n listaWalmart.agregarNodo(nTemp47);\r\n \r\n Producto lentejas= new Producto(\"lentejas\", \"verde valle\", 25.50, 2);\r\n Nodo<Producto> nTemp48 = new Nodo(lentejas);\r\n listaWalmart.agregarNodo(nTemp48);\r\n \r\n Producto papitas= new Producto(\"papitas\", \"sabritas\", 36, 2);\r\n Nodo<Producto> nTemp49 = new Nodo(papitas);\r\n listaWalmart.agregarNodo(nTemp49);\r\n \r\n Producto mole= new Producto(\"mole\", \"doña maria \", 33, 2);\r\n Nodo<Producto> nTemp50 = new Nodo(mole);\r\n listaWalmart.agregarNodo(nTemp50);\r\n }", "public OrderForm() {\n initComponents();\n mWaffleList = new ArrayList<Product>();\n mCoffeeList = new ArrayList<Product>();\n mbdb = new BelgianDatabaseHandler(dbpath+menuDbName);\n resetQuantityBox();\n generateMenu();\n //if done generating menu\n //update orderhandler BelgianWaffle class for the items\n mbw = new BelgianWaffle(mWaffleList,mCoffeeList,mbdb);\n model = new DefaultListModel();\n \n }", "public void runDemo()\n {\n demoAddProduct(); // test we can add items to the list (test printing all the list)\n demoRemoveProduct(); // this will delete the product in the list, the list now has 0 items\n demoRenameProduct(); // this will add a product to the list and rename it, the list now has 1 items\n demoLowStock(); // this test finds a product which is low on stock\n demoFindId(); // this test does not add any products to the list, the \"findProduct\" method will search through all the list of products\n demoGetMatchingName(); // this test does not add any products to the list, the \"getMatchingName\" method will search through all the list of products\n demoDeliver(); // this test does not add any products to the list, its using the product added in the rename test \n demoSellProducts(); // this test does not add any products to the list, its using the product added in the rename test \n demoAddProductWhenTheresAlreadyOne(); // this test attempts to add a product which is already listed\n demoSellProductsWhensStocksTooLow(); // this test is to sell a product when there isn't enough stock\n demoRemoveProductWhichDoesNotExist(); // this test is to remove a product that doesn't exist\n }", "@Before(value = \"@createList\", order = 1)\n public void createList() {\n String endpoint = EnvironmentTrello.getInstance().getBaseUrl() + \"/lists/\";\n JSONObject json = new JSONObject();\n json.put(\"name\", \"testList\");\n json.put(\"idBoard\", context.getDataCollection(\"board\").get(\"id\"));\n RequestManager.setRequestSpec(AuthenticationUtils.getLoggedReqSpec());\n Response response = RequestManager.post(endpoint, json.toString());\n context.saveDataCollection(\"list\", response.jsonPath().getMap(\"\"));\n }", "private void buyProduct() {\n\t\tSystem.out.println(\"Enter Number of Product :- \");\n\t\tint numberOfProduct = getValidInteger(\"Enter Number of Product :- \");\n\t\twhile (!StoreController.getInstance().isValidNumberOfProduct(\n\t\t\t\tnumberOfProduct)) {\n\t\t\tSystem.out.println(\"Enter Valid Number of Product :- \");\n\t\t\tnumberOfProduct = getValidInteger(\"Enter Number of Product :- \");\n\t\t}\n\t\tfor (int number = 1; number <= numberOfProduct; number++) {\n\t\t\tSystem.out.println(\"Enter \" + number + \" Product Id\");\n\t\t\tint productId = getValidInteger(\"Enter \" + number + \" Product Id\");\n\t\t\twhile (!StoreController.getInstance().isValidProductId(productId)) {\n\t\t\t\tSystem.out.println(\"Enter Valid Product Id\");\n\t\t\t\tproductId = getValidInteger(\"Enter \" + number + \" Product Id\");\n\t\t\t}\n\t\t\tSystem.out.println(\"Enter product Quantity\");\n\t\t\tint quantity = getValidInteger(\"Enter product Quantity\");\n\t\t\tCartController.getInstance().addProductToCart(productId, quantity);\n\t\t}\n\t}", "public void addWasher() {\r\n\t\tdo {\r\n\t\t\tString brand = getToken(\"Enter washer brand: \");\r\n\t\t\tString model = getToken(\"Enter washer model: \");\r\n\t\t\tdouble price = getDouble(\"Enter washer price: \");\r\n\t\t\tWasher washer = store.addWasher(brand, model, price);\r\n\t\t\tif (washer != null) {\r\n\t\t\t\tSystem.out.println(washer);\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Washer could not be added.\");\r\n\t\t\t}\r\n\t\t} while (yesOrNo(\"Would you like to add another washer?\"));\r\n\t}", "private void createItems()\n {\n Item belt, nappies, phone, money, cigarretes, \n jacket, cereal, shoes, keys, comics, bra, \n bread, bowl, computer;\n\n belt = new Item(2,\"Keeps something from falling\",\"Belt\");\n nappies = new Item(7,\"Holds the unspeakable\",\"Nappies\");\n phone = new Item(4, \"A electronic device that holds every answer\",\"Iphone 10\");\n money = new Item(1, \"A form of currency\",\"Money\");\n cigarretes = new Item(2,\"It's bad for health\",\"Cigarretes\");\n jacket = new Item(3,\"Keeps you warm and cozy\", \"Jacket\");\n cereal = new Item(3, \"What you eat for breakfast\",\"Kellog's Rice Kripsies\");\n shoes = new Item(5,\"Used for walking\", \"Sneakers\");\n keys = new Item(2, \"Unlock stuff\", \"Keys\");\n comics = new Item(2, \"A popular comic\",\"Batman Chronicles\");\n bra = new Item(3,\"What is this thing?, Eeeewww\", \"Bra\");\n bread = new Item(6,\"Your best source of carbohydrates\",\"Bread\");\n bowl = new Item(4,\"where food is placed\",\"Plate\");\n computer = new Item(10,\"A computational machine\",\"Computer\");\n\n items.add(belt);\n items.add(nappies);\n items.add(phone);\n items.add(money);\n items.add(cigarretes);\n items.add(jacket);\n items.add(cereal);\n items.add(shoes);\n items.add(keys);\n items.add(comics);\n items.add(bra);\n items.add(bread);\n items.add(bowl);\n items.add(computer);\n }", "public void addProduct(Product p) {\n\t\tthis.productList.add(p);\n\t}", "@Override\r\n\tpublic List<Book> getWishList(User user) {\n\t\tTypedQuery<Book> query = sessionFactory.getCurrentSession().createNativeQuery(\"select USER_ID, BOOK_ID from WISH_USER_BOOK where USER_ID = \" + user.getId());\r\n\t\treturn query.getResultList();\r\n\t}", "public void add(int index){\n int i = 0;\n boolean isFound = false;\n for (Product product:inventory.getProducts().keySet())\n {\n i++;\n if (i == index && inventory.getProducts().get(product) > 0)\n {\n if (myBasket.containsKey(product))\n {\n System.out.println(\"One more of this product added.\");\n myBasket.replace(product , myBasket.get(product) + 1);\n }\n else {\n System.out.println(\"Product added to your basket.\");\n myBasket.put(product , 1);\n }\n totalCost = totalCost + product.getPrice();\n isFound = true;\n inventory.updateStock(product , '-');\n }\n }\n if (!isFound)\n System.out.println(\"Sorry. Invalid index or not enough product in stock!\");\n }" ]
[ "0.7122358", "0.651448", "0.63058555", "0.61067426", "0.6074461", "0.6058832", "0.60531706", "0.6020588", "0.60151875", "0.5992828", "0.59651214", "0.59225625", "0.5915555", "0.58716357", "0.58282036", "0.5810215", "0.57918304", "0.57821214", "0.57712287", "0.57347614", "0.5733383", "0.57292044", "0.5728186", "0.5722161", "0.5716994", "0.5703397", "0.56910336", "0.56710654", "0.56501055", "0.56386286", "0.5634201", "0.5626136", "0.5621285", "0.5602094", "0.55937964", "0.5588362", "0.55278194", "0.5519143", "0.55184436", "0.5502633", "0.5494005", "0.54705155", "0.5466491", "0.545818", "0.54569346", "0.54513144", "0.54507416", "0.542856", "0.5363295", "0.5351216", "0.53492355", "0.53454715", "0.53361094", "0.5329791", "0.5328584", "0.5321493", "0.5318427", "0.5317253", "0.5309003", "0.53039837", "0.52934647", "0.5288195", "0.52794397", "0.5276273", "0.52734095", "0.52656215", "0.52441746", "0.52285755", "0.52241397", "0.5223964", "0.5221817", "0.5221527", "0.5213187", "0.5205302", "0.520235", "0.5200749", "0.51959115", "0.5188046", "0.5186535", "0.5184476", "0.5175893", "0.5169178", "0.5167363", "0.5166297", "0.51627547", "0.51625663", "0.51531136", "0.5144072", "0.5142049", "0.5142025", "0.51343167", "0.5126125", "0.51131034", "0.51076", "0.51058257", "0.51026493", "0.5099383", "0.5099011", "0.5095857", "0.509392" ]
0.67998236
1
Adds a product in the wishlist to the basket
public boolean addProductToBasket(Product product, Order order) { int quantity = orderService.getQuanity(product); return orderService.addProductToBasket(order, product, quantity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addToBasket(Product product){\n\n Purchaseitem purchaseitem = new Purchaseitem();\n purchaseitem.setProduct(product.getId());\n purchaseitem.setProductByProduct(product);\n boolean toAdd = false;\n if(basket.isEmpty()){\n purchaseitem.setQuantity(1);\n basket.add(purchaseitem);\n }else {\n for(int i = 0; i < basket.size(); i++){\n if(basket.get(i).getProduct() == product.getId()){\n basket.get(i).setQuantity(basket.get(i).getQuantity() + 1);\n return;\n } else {\n purchaseitem.setQuantity(1);\n toAdd = true;\n }\n }\n }\n if(toAdd){\n basket.add(purchaseitem);\n }\n }", "public void addProductToBuyBasket(Product product, int count) {\n if (buyBasket.containsKey(product.getId()))\n buyBasket.replace(product.getId(), buyBasket.get(product.getId() + count));\n else\n buyBasket.put(product.getId(), count);\n }", "public void addProduct(String product, int quantity) {\n if (shoppingBasket.containsKey(product) != true) {\n shoppingBasket.put(product, quantity);\n } else {\n shoppingBasket.put(product, shoppingBasket.get(product) + quantity);\n }\n }", "public void addProductToBuyBasket(int productId, int count) {\n if (buyBasket.containsKey(productId))\n buyBasket.replace(productId, buyBasket.get(productId + count));\n else\n buyBasket.put(productId, count);\n }", "public void addProduct(Product item)\n {\n stock.add(item);\n }", "public void addProductToWishlist(Product product, long accountId) {\n wishlistService.addProduct(product, accountId);\n }", "public void addProduct(Product product);", "void addProduct(Product product);", "public void addToWish( String product_id, String product_name,String product_brand, String product_img,\n String product_price,String product_desc, String product_discount, String product_varieties )\n {\n boolean isAdded = mDatabaseFavorite.insert(product_id, product_name,product_brand, product_img,\n product_price,product_discount);\n\n if (isAdded == true)\n {\n Toast.makeText(DetailActivity.this,\"Added to Favorite\",Toast.LENGTH_SHORT).show();\n\n }\n\n else {\n\n Toast.makeText(DetailActivity.this,\"Already present in favoriteList\",Toast.LENGTH_SHORT).show();\n\n }\n\n }", "public boolean addProductToWishlist(String productId) throws WishListException {\n\t\t// TODO Auto-generated method stub\n\t\tboolean result=false;\n\t\tif(ProductRepository.productList.get(productId) != null)\n\t\t{ if(WishlistDaoImpl.wlist.containsKey(productId))\n\t \t{\t\n\t\t\t throw new WishListException(\"WishList already contain this PRODUCT\");\n\t \t}\n\t\t else {\n\t\t\t result=WishlistDaoImplObj.addProductToWishlist(productId);\n\t\t return result;\n\t\t }\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new WishListException(\"Product ID not Found in Product List to Add in WishList\\n\");\n\t\t}\n\t \n\t\t\n\t}", "public void addProduct(Product p){\n stock.add(p);\n }", "public void add(int index){\n int i = 0;\n boolean isFound = false;\n for (Product product:inventory.getProducts().keySet())\n {\n i++;\n if (i == index && inventory.getProducts().get(product) > 0)\n {\n if (myBasket.containsKey(product))\n {\n System.out.println(\"One more of this product added.\");\n myBasket.replace(product , myBasket.get(product) + 1);\n }\n else {\n System.out.println(\"Product added to your basket.\");\n myBasket.put(product , 1);\n }\n totalCost = totalCost + product.getPrice();\n isFound = true;\n inventory.updateStock(product , '-');\n }\n }\n if (!isFound)\n System.out.println(\"Sorry. Invalid index or not enough product in stock!\");\n }", "public void addBasketItem(BasketItem newItem) {\n \n // If the sku already exists in the basket then update the quantity\n for(BasketItem item : basketItems) {\n if(item.getVariant().getSku().equals(newItem.getVariant().getSku())) {\n item.setQuantity(newItem.getQuantity() + item.getQuantity());\n return;\n }\n }\n \n // If the sku wasn't found above then add it to the basket\n basketItems.add(newItem);\n }", "public void addProduct(Product item){\n inventory.add(item);\n }", "public void addProduct(Product product) {\n allProducts.add(product);\n }", "public void addProduct(Product p) {\n c.addProduct(p);\n }", "public synchronized void addItem(Product product){\n \n ShoppingCartItem item = carrito.get(product.getId());\n int new_quantity;\n \n if(item==null){\n carrito.set(product.getId(), new ShoppingCartItem(product));\n new_quantity = 1;\n }else{\n new_quantity = item.getQuantity()+1;\n }\n //even if it's added or not, we call update method to update the quantity of the product\n this.update(product,Integer.toString(new_quantity));\n }", "public void addProduct(Product toAdd) {\n\t\tthis.products.add(toAdd);\n\t}", "public void productsToBuy(Product purchase){\n bill.getProducts().add(purchase);\n }", "public void addProduct(Product pProduct)\n\t{\n\t\tmyProductInventory.add(pProduct);\n\n\n\t}", "@Override\n\tpublic WishList addProductToWishList(List<String> productName, Long userId) {\n\t\tList<Product> allProduct = productDAO.getallProduct();\n\t\t\n\t\t\n\t\t\n\t\tfor(String p : productName) {\n\t\t\tProduct product = productDAO.getProductByName(p).get(0);\n\t\t\t\n\t\t\t\n\t\t\tif(allProduct.contains(p)) {\n\t\t\t\tUserDetail user = userDetailDAO.getUserById(userId).get(0);\n\t\t\t\tif(user.getWishList().getProducts().contains(p)) {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tWishList wishList = new WishList();\n\t\t\t\t\tList<Product> prod = new ArrayList<>();\n\t\t\t\t\tprod.add(product);\n\t\t\t\t\twishList.setProducts(prod);\n\t\t\t\t\tuser.setWishList(wishList);\n\t\t\t\t\tuserDetailDAO.save(user);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn userDetailDAO.getUserById(userId).get(0).getWishList();\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 addProduct(Product product) {\n int newQuantity = product.getQuantity();\n try {\n Product productInCart = getProductInCartCorrespondentTo(product);\n int previousQuantity = productInCart.getQuantity();\n productInCart.setQuantity(newQuantity + previousQuantity);\n this.amount += newQuantity * product.getPrice();\n } catch (NoSuchProductException e) {\n // the product isn't already in the list -> add it\n int index;\n try {\n index = getCategoryIndex(product.getCategory().name());\n } catch (NoSuchCategoryException e2) {\n index = categoryNames.indexOf(Category.OTHER.name());\n }\n shoppingCart.get(index).add(product);\n float price = product.getPrice() * newQuantity;\n this.amount += price;\n }\n for (int i = 0; i < newQuantity; i ++)\n lastProductList.add(product);\n }", "public void addProductToList(Product aProduct){\n listOfProduct.add(aProduct);\n }", "public void add() {\n\t\tcart.add(item.createCopy());\n\t}", "public static int addToBasket(Basket basket, String item, int quantity) {\n StockItem stockItem = stockList.get(item);\n if(stockItem == null) {\n System.out.println(\"We don't sell \" + item);\n return 0;\n }\n if(stockList.reserveStock(item, quantity) != 0) {\n basket.addToBasket(stockItem, quantity);\n return quantity;\n }\n return 0;\n }", "Product addNewProductInStore(Product newProduct);", "public void add(WebSite website, int nProductID, int nQuantity) {\r\n\t\tfor (int i = 0; i < orderedItems.size(); i++) {\r\n\t\t\tOrderedItem oi = (OrderedItem) orderedItems.elementAt(i);\r\n\t\t\tif (oi.nProductID == nProductID) {\r\n\t\t\t\toi.nQuantity += nQuantity;\r\n\t\t\t\tcalculate(website);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tOrderedItem oi = new OrderedItem();\r\n\t\toi.nProductID = nProductID;\r\n\t\toi.nQuantity = nQuantity;\r\n\t\tProduct product = website.products.get(nProductID);\r\n\t\toi.dblPrice = product.dblPrice;\r\n\t\toi.dblCost = product.dblCost;\r\n\t\torderedItems.addElement(oi);\r\n\r\n\t\tcalculateCart(website);\r\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 insertIntoProduct() {\n\t\ttry {\n\t\t\tPreparedStatement statement = connect.prepareStatement(addProduct);\n\t\t\tstatement.setString(1, productName);\n\t\t\tstatement.setString(2, quantity);\n\t\t\t\n\t\t\tstatement.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "@Override\r\n public void addProductQuantity(Product product, int quantity) {\r\n int stock;\r\n int i = 0;\r\n for (Product p : this.productList) {\r\n if (p.getId() == product.getId()) {\r\n stock = this.productQuantity.get(i);\r\n this.productQuantity.set(i, stock + quantity);\r\n break;\r\n }\r\n i++;\r\n }\r\n this.productList.add(product);\r\n this.productQuantity.add(quantity);\r\n }", "public void Addproduct(Product objproduct) {\n\t\t\n\t}", "@Then(\"^click on add to basket$\")\r\n\tpublic void click_on_add_to_basket() throws Throwable {\n\t\tverbose(\"***********************************************************\");\r\n\t\tAssert.assertTrue(navigate_rsc.addbasket());\r\n\t\tverbose(\"***********************************************************\");\r\n\t \r\n\t}", "@FXML\r\n\tpublic void addToShoppingCart() {\r\n\t\t\r\n\t\tWatch w = listView.getSelectionModel().getSelectedItem();\r\n\t\tboolean add = controller.addWatchToShoppingCart(w);\r\n\t\tcontroller.deleteWishlistItem(w.getId());\r\n\t\tlistView.setItems(controller.getWishlistWatchesForCurrentUser());\r\n\t\tlistView.getSelectionModel().select(-1);\r\n\t\tcheckSelected();\r\n\t}", "public void addProduct(Product p) {\n\t\tthis.productList.add(p);\n\t}", "private void addProductToCart(HttpServletRequest request, HttpServletResponse response) throws IOException {\n String productID = request.getParameter(\"ProductID\");\n\n HttpSession session = request.getSession();\n\n List<Product> cartProducts = (List<Product>) session.getAttribute(\"cartProducts\");\n\n if (productID != null) {\n\n int id = Integer.parseInt(productID);\n\n if (cartProducts != null) {\n\n if (getCartSize(cartProducts) < Constants.CART_LIMIT) {\n\n if (!productIsAlreadyInCart(id, cartProducts))\n cartProducts.add(productDAO.getProduct(id));\n else\n increaseProductCountInCart(id, cartProducts);\n\n logger.info(\"Product (ID=\" + productID + \") has been added to the cart\");\n response.sendRedirect(Constants.PATH_CATALOG);\n } else\n response.getWriter().write(notifyCartIsFull());\n\n } else {\n cartProducts = new ArrayList<>();\n cartProducts.add(productDAO.getProduct(Integer.parseInt(productID)));\n\n logger.info(\"Product (ID=\" + productID + \") has been added to the cart\");\n session.setAttribute(\"cartProducts\", cartProducts);\n response.sendRedirect(Constants.PATH_CATALOG);\n }\n }\n }", "@Override\n\tpublic Basket addBasket(Basket basket) {\n\t\treturn br.save(basket);\n\t}", "public void addProductToCart(String product) {\n\t\tpause(1000);\n\t\tBy bySelector = By.cssSelector(\"button.prdbox\");\n\t\tList<WebElement> elements = driver.findElements(bySelector);\n\t\t\n\t\tfor (WebElement item : elements) {\n\t\t\tString test = item.getAttribute(\"innerHTML\");\n\t\t\tif (test.contains(product)){\n\t\t\t\titem.click();\n\t\t\t}\n\t\t}\t\n\t}", "public addproduct() {\n\t\tsuper();\n\t}", "public void addProduct(Product newProduct) {\n System.out.println(\"addProduct(): \" + newProduct.getName());\n allProducts.add(newProduct);\n }", "@Then(\"the product is added to my cart\")\n\t\tpublic void the_product_is_added_to_my_cart() throws Exception {\n\n\t\t\t//Waits for the cart page to load\n\t\t\tdriver.manage().timeouts().implicitlyWait(120, TimeUnit.SECONDS);\n\t\t\tcartElement = driver.findElement(By.xpath(itemSacola)).getText();\n\t\t\t\n\t\t\t//Verify that the product on the shopping cart is the correct one\n\t\t\tAssert.assertEquals(cartElement, TituloFinal);\n\n\t\t\t// Take snapshot as evidence\n\t\t\tFunctions.takeSnapShot(driver, null);\n\t\t}", "@Override\n\tpublic boolean addProduct(Product p) {\n\t\treturn false;\n\t}", "public void addItem(Product p) {\n\t\t_items.add(p);\n\t}", "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 }", "public static void addProduct(Product product){\r\n \r\n System.out.println(\"Adding Product \" + product.getProductName());\r\n productInvMap.put(productInvMap.size(),product);\r\n }", "public void addProduct(CartProduct p) throws InsufficientQuantityException {\n\t\tfor (CartProduct product : Admin.products) {\n\t\t\tif (product.getDescription().equals(p.getDescription()) && (product.getQuantity() >= 1)) {\n\t\t\t\tcart.addToCart(p);\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tthrow new InsufficientQuantityException(\"Out of Stock\");\n\t\t\t}\n\t\t}\n\t}", "public void add(Product product) {\r\n sessionFactory.getCurrentSession()\r\n .save(product);\r\n }", "public static void addProduct(Product newProduct) {\n allProducts.add(newProduct);\n }", "public void addToInventory() {\r\n\t\tdo {\r\n\t\t\tint quantity = 0;\r\n\t\t\tString brand = getToken(\"Enter washer brand: \");\r\n\t\t\tString model = getToken(\"Enter washer model: \");\r\n\t\t\tWasher washer = store.searchWashers(brand + model);\r\n\t\t\tif (washer == null) {\r\n\t\t\t\tSystem.out.println(\"No such washer exists.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tquantity = getInteger(\"Enter quantity to add: \");\r\n\t\t\tboolean result = store.addWasherToInventory(brand, model, quantity);\r\n\t\t\tif(result) {\r\n\t\t\t\tSystem.out.println(\"Added \" + quantity + \" of \" + washer);\r\n\t\t\t}else {\r\n\t\t\t\tSystem.out.println(\"Washer could not be added to inventory.\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} while (yesOrNo(\"Add more washers to the inventory?\"));\r\n\t}", "@Override\n public void onAddToCart(Product product) {\n }", "public void insert(Product product) {\n this.products.add(product);\n }", "Cart addToCart(String productCode, Long quantity, String userId);", "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 }", "public void addButtonClicked(){\n Products products = new Products(buckysInput.getText().toString());\n dbHandler.addProduct(products);\n printDatabase();\n }", "public void addProduct(Product p) {\n if(products.size() != 0 && products.get(0).getPricingDetails().equals(p.getPricingDetails()))\n return;\n\n products.add(p);\n quantity++;\n price = price.add(p.getPricingDetails());\n }", "public boolean addProduct(Product p) {\n// products.add(p);\n boolean prodExists = false;\n for(Product prod: products){\n if(prod.getId() == p.getId()){\n prodExists = true;\n break;\n }\n }\n if(!prodExists){\n products.add(p);\n return true;\n }\n return false;\n }", "public void addProduct(MarketObject<?> product) throws IllegalStateException{\n\t\tPlayer sellingPlayer=game.getCurrentPlayer();\n\n\t\tif(product.getObject().getClass().getSuperclass().equals(PoliticsCard.class))\n\t\t\tif(sellingPlayer.getCardsOwned().contains(product.getObject()))\n\t\t\t{\n\t\t\t\tsellingPlayer.getCardsOwned().remove((PoliticsCard)product.getObject());\n\t\t\t\tthis.products.add(product);\n\t\t\t}\n\t\t\telse\n\t\t\t\tthrow new IllegalStateException(\"Impossible to add \"+PoliticsCard.class.getSimpleName()+\n\t\t\t\t\t\t\". You don't own one.\");\n\t\telse if(product.getObject().getClass().equals(Assistant.class))\n\t\t\tif(sellingPlayer.checkAssistants(((Assistant)product.getObject()).getNumber()))\n\t\t\t\tthis.products.add(product);\n\t\t\telse \n\t\t\t\tthrow new IllegalStateException(\"Impossible to add \"+Assistant.class.getSimpleName()+\n\t\t\t\t\t\t\". You own just \"+sellingPlayer.getAssistants()+\" \"+Assistant.class.getSimpleName());\n\t\telse if(product.getObject().getClass().equals(BuildingPermit.class))\n\t\t\tif(sellingPlayer.getAllPermits().contains(product.getObject()))\n\t\t\t{\n\t\t\t\tsellingPlayer.getBuildingPermits().remove((BuildingPermit)product.getObject());\n\t\t\t\tthis.products.add(product);\n\t\t\t}\n\t\t\telse \n\t\t\t\tthrow new IllegalStateException(\"Impossible to add \"+BuildingPermit.class.getSimpleName()+\n\t\t\t\t\t\t\". You don't own one.\");\n\t\tgame.notifyObservers(new ModelChange(game));\n\t}", "public void addProductStock(Product product, int nbProducts) {\r\n this.productStocks.add(new ProductStock(product, nbProducts));\r\n }", "public boolean addProduct(Product product) {\n\t\treturn false;\n\t}", "public void addBuy() {\r\n\t\tbuys++;\r\n\t\tnotifyObservers();\r\n\t}", "public boolean add(Product product) {\n return cartRepository.add(product);\n }", "public void addItem(Product p) throws IOException, ClassNotFoundException {\n SortByName sortByName = new SortByName();\n Collections.sort(cartContents, sortByName.productSearch());\n\n int m = this.getQuantity(p);\n //check if in cart will exceed available amount\n if (p.getAvailableQuantity() > m)\n {\n cartContents.add(p);\n }\n saveCart();\n }", "public void addItemToSale(String productId, int quantity) {\r\n if (productId.isEmpty()) {\r\n System.out.println(\"Class CashRegister, method addItemToSale\");\r\n System.out.println(\"product id is missing - enter valid product id\");\r\n System.exit(1);\r\n }\r\n if (quantity <= 0) {\r\n System.out.println(\"Class CashRegister, method addItemToSale\");\r\n System.out.println(\"quantity is less than or equal to 0 - enter valid quantity\");\r\n System.exit(1);\r\n }\r\n FakeDatabase db = new FakeDatabase();\r\n Product product = db.findProduct(productId);\r\n\r\n if (product != null) { //product found in database\r\n receipt.addLineItem(product, quantity);\r\n } else {\r\n System.out.println(\"Class CashRegister, method addItemToSale\");\r\n System.out.println(\"product id not found in database - enter valid product id\");\r\n System.exit(1);\r\n }\r\n }", "@Test\n\tpublic void testAddProductToCart() {\n\t\tdouble startBalance = cart.getBalance();\n\t\tassertEquals(0,startBalance,0.01);\n\t\t\n\t\t\n\t\t\t // 4. CHECK NUM ITEMS IN CART BEFORE ADDING PRODUCT\n\t\t\t // \t\t - PREV NUM ITEMS\n\t\t\n\t\tint StartingNumItems = cart.getItemCount();\n\t\tassertEquals(0,StartingNumItems);\n\t\t\n\t\t\t // 5. ADD THE PRODUCT TO THE CART \n\t\tcart.addItem(phone);\n\t\t\n\t\t\t // 6. CHECK THE UPDATED NUMBER OF ITEMS IN CART \n\t\t\t // \t\t-- EO: NUM ITEMS + 1\n\t\tassertEquals(StartingNumItems + 1, cart.getItemCount());\n\t\t\t // -----------------------\n\t\t\t // 7. CHECK THE UPDATED BALANCE OF THE CART\n\t\t\t // \t\t-- EO: PREVIOUS BALANCE + PRICE OF PRODUCT\n\t\t\n\t\tdouble expectedBalance = startBalance + phone.getPrice();\n\t\t\n\t\tassertEquals(expectedBalance,cart.getBalance(),0.01);\n\t\t\n\t\t\n\t\t\n\t}", "public void addProduct(Product product)\n {\n SQLiteDatabase db = this.database.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n\n values.put(ShoppingListTable.KEY_TPNB, product.getTPNB());\n values.put(ShoppingListTable.KEY_NAME, product.getName());\n values.put(ShoppingListTable.KEY_DESCRIPTION, product.getDescription());\n values.put(ShoppingListTable.KEY_COST, product.getCost());\n values.put(ShoppingListTable.KEY_QUANTITY, product.getQuantity());\n values.put(ShoppingListTable.KEY_SUPER_DEPARTMENT, product.getSuperDepartment());\n values.put(ShoppingListTable.KEY_DEPARTMENT, product.getDepartment());\n values.put(ShoppingListTable.KEY_IMAGE_URL, product.getImageURL());\n values.put(ShoppingListTable.KEY_CHECKED, product.isChecked());\n values.put(ShoppingListTable.KEY_AMOUNT, product.getAmount());\n values.put(ShoppingListTable.KEY_POSITION, product.getAmount());\n\n db.insert(ShoppingListTable.TABLE_NAME, null, values);\n\n db.close();\n }", "public void buyProduct(String productName) throws ProductNotFoundException {\r\n\r\n if (doesRecentOrderExist(productName)) {\r\n reorderProduct(productName);\r\n } else {\r\n //Create a new order to be given to the WebMarket\r\n Order newOrder = new Order(this, productName, \"buy\", \"pending\");\r\n\r\n //Acknowlegement print statment\r\n System.out.println(\"CUSTOMER: Request NEW purchase of - \" + newOrder.getProductName());\r\n\r\n //Send the order to WebMarket via placeNewOrder()\r\n market.placeNewOrder(newOrder);\r\n\r\n //Add this order to the customers personel list of orders\r\n orderHistory.add(newOrder);\r\n }\r\n }", "public void onClick(View v)\n {\n // Add to cart model\n for (int i = 0; i < productQuantity; i++)\n {\n dbManager.addToCart(activeProduct.getID());\n }\n }", "public boolean addProduct(Product p) {\n\t\t\n\t\treturn products.add(p);\n\t}", "public static void addToCart() {\n List<WebElement> buttonsAddItem = Browser.driver.findElements(ADD_TO_CART_BUTTON);\n buttonsAddItem.get(0).click();\n Browser.driver.navigate().refresh();\n }", "@Step(\"Add product to cart and proceed to checkout\")\n public HomeSteps addProductToCart(String productName) {\n homePage\n .openPage()\n .clickAddToCartButton(productName)\n .clickProceedToCheckoutButton();\n return this;\n }", "@Override\n public void addProductToFavorites(View view, Intent intent) {\n try {\n if(iProduct != null && view != null && intent != null){\n Context context = view.getContext();\n String jsonProduct = intent.getStringExtra(CommonPresenter.DETAIL_PRODUCT);\n Product product = CommonPresenter.getProductFromJSON(jsonProduct);\n CRUDFavorite crudFavorite = new CRUDFavorite(context);\n boolean isProductExists = crudFavorite.isProductExists(product.getProductId());\n if(isProductExists){\n crudFavorite.deleteByProductId(product.getProductId());\n CommonPresenter.showSnackBarMessage(view, context.getString(R.string.lb_product_delete_to_favorite));\n iProduct.changeImageRightResource(R.drawable.ic_add_to_favorite_32dp);\n }\n else{\n crudFavorite.add(new Favorite(0, product));\n CommonPresenter.showSnackBarMessage(view, context.getString(R.string.lb_product_add_to_favorite));\n iProduct.changeImageRightResource(R.drawable.ic_favorite_32dp);\n }\n }\n }\n catch (Exception ex){\n Log.e(\"TAG_ERROR\", \"ProductPresenter-->addProductToFavorites() : \"+ex.getMessage());\n }\n }", "@Override\r\n\tpublic boolean addProduct(Product product) {\n\t\treturn dao.addProduct(product);\r\n\t}", "public void createWishlist(Customer customer, Product product) {\n wishlistService.createWishlist(customerRepository.findByID(customer.getAccountID()), product);\n }", "public void adding() {\n\t\t By cr=By.xpath(\"//a[@href=\\\"/cart?add&itemId=EST-2\\\"]\"); \r\n\t\tWebElement we_cr=wt.ElementToBeClickable(cr, 20);\r\n\t\twe_cr.click();\r\n\t}", "ProductView addProduct(ProductBinding productToAdd) throws ProductException;", "public void addWishlistItem(WishlistItem wishItem){\n fStore.collection(\"user_profiles\").document(fUser.getUid()).collection(\"wishlist\").document(wishItem.getWishID()).set(wishItem).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n }\n });\n }", "public void addStock(Product p, int n) {\nif (p.id < 0) return;\nif (n < 1) return;\n\nfor (int i = 0; i < productCatalog.size(); i++) {\nProductStockPair pair = productCatalog.get(i);\nif (pair.product.id == p.id) {\nproductCatalog.set(i, new ProductStockPair(p, pair.stock + n));\nreturn;\n}\n}\nproductCatalog.add(new ProductStockPair(p, n));\n}", "@When(\"^: Add them to the cart$\")\r\n\tpublic void add_them_to_the_cart() throws Throwable {\n\t\tobj.search();\r\n\t}", "public synchronized void add(Product product) {\n\t\tProduct[] playerProducts = playerMap.getOrDefault(product.getOwner(), new Product[8]);\n\t\tplayerProducts[product.getSlot()] = product;\n\t\tplayerMap.put(product.getOwner(), playerProducts);\n\n\t\tSet<Product> productSet = getProductSet(product);\n\t\tproductSet.add(product);\n\t\ttypeMap.get(product.getType()).get(product.getState()).put(product.getItemId(), productSet);\n\t}", "@Override\n\tpublic void addProductToCart(ShoppingCartItem cart_items) {\n\t\tthis.shoppingCartList.add(cart_items);\n\t}", "public void addItem(Product product, int quantity) {\n\t\t// search the Cartline list for the product\n\t\tfor (CartLine cartLine : getCartLineList()) {\n\t\t\t// check if product in cartline matches the product that we looking for\n\t\t\tif (cartLine.getProduct().equals(product)) {\n\t\t\t\tcartLine.setQuantity(quantity + cartLine.getQuantity());\n\t\t\t\treturn;\t//we found the product, exit the loop and the method\n\t\t\t}\n\t\t}\n\t\t//no cartline is found with the product so add new cart line \n\t\tcartLineList.add(new CartLine(product, quantity));\n\t}", "private void save_to_wishlist(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws Exception {\n\t\t\n\t\tSystem.out.println(\"inside save to wishlist\");\n\t\tString cart_type = request.getParameter(\"cart_type\");\n\t\tSystem.out.println(cart_type);\n\t\tString quantity[] = request.getParameterValues(\"qty_name\");\n\t\tList lqty = new ArrayList();\n\t\tfor(int i=0;i<quantity.length;i++)\n\t\t{\n\t\t\tSystem.out.println(quantity[i]);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tUaddToCartMstVO mstVO = new UaddToCartMstVO();\n\t\tSystem.out.println(\"cart typw3333333333333333333333333333333\"+cart_type);\n\t\tmstVO.setCart_type(cart_type);\n\t\t\n\t\tHttpSession hs = request.getSession();\n\t\tint user_id=Integer.parseInt(hs.getAttribute(\"userID\").toString());\n\t\tSystem.out.println(\"User............\"+user_id);\n\t\t\n\t\tUaddToCartDAO addCartDAO;\n\t\taddCartDAO=new UaddToCartDAO();\n\n\t\tint BuyerregId = -1;\n\t\tloginVO logVo=new loginVO();\n\t\tlogVo.setLogin_id(user_id);\n\t\tList luser=addCartDAO.search_user_id(logVo);\n\t\tif(luser!=null && luser.size()>0)\n\t\t{\n\t\t\tUregistrationVO regVo=(UregistrationVO)luser.get(0);\n\t\t\tBuyerregId=regVo.getBuyer_user_id();\n\t\t\tSystem.out.println(\"Buyer user Id======================================================\"+BuyerregId);\n\t\t}\n\t\t\n\t\tUregistrationVO regVo=new UregistrationVO();\n\t\tregVo.setBuyer_user_id(BuyerregId);\n\t\t//System.out.println(\"User login id....\"+ regVo.getLoginVoObj().getLogin_id());\n\t\t\n\t\tmstVO.setBuyer_user_id(regVo);\n\t\t\n\t\t\t\t\n\t\taddCartDAO.save_to_wishlist(mstVO);\n\t\t\n\t\tSystem.out.println(\"--------------------------------------------------child Data insertion---------------------------------\");\n\t\t\n\t\t\n\t\tList l= (List)hs.getAttribute(\"product_data_wishlist\");\n\t\t\n\t\tSystem.out.println(\"LIST value::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\"+l.toString());\n\t\t\n\t\t\n\t\tUaddToCartVO addCartVO[]=new UaddToCartVO[l.size()];\n\t\t\n\t\tUaddToCartVO temp=new UaddToCartVO();\n\t\t\n\t\t\n\t\t\n\t\tfor(int i=0;i<l.size();i++)\n\t\t{\n\t\t\t\n\t\t\ttemp=(UaddToCartVO)l.get(i);\n\t\t\taddCartVO[i]=new UaddToCartVO();\n\t\t\taddCartVO[i].setCloth_id(temp.getCloth_id());\n\t\t\taddCartVO[i].setColor_code(temp.getColor_code());\n\t\t\taddCartVO[i].setPrice(temp.getPrice());\n\t\t\taddCartVO[i].setProduct_name(temp.getProduct_name());\n\t\t\taddCartVO[i].setSize(temp.getSize());\n\t\t\taddCartVO[i].setQuantity(Integer.parseInt(quantity[i]));\n\t\t\taddCartVO[i].setDesigner_user_id(temp.getDesigner_user_id());\n\t\t\taddCartVO[i].setCartMstVOObj(mstVO);\n\t\t\taddCartDAO.save_to_cart(addCartVO[i]);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*String type=mstVO.getCart_type();\n\t\tint userId=((UregistrationVO)mstVO.getBuyer_user_id()).getBuyer_user_id();\n\t\t\n\t\tSystem.out.println(\"---------------------------------------------------------------------------------------------------------------\");\n\t\tSystem.out.println(\"TYPE value is ::::::::::::::\"+type);\n\t\tSystem.out.println(\"USERID value is ::::::::::::::\"+userId);\n\n\t\tSystem.out.println(\"---------------------------------------------------------------------------------------------------------------\");\n\t\t\n*/\t\t\n\t\tresponse.sendRedirect(request.getContextPath()+\"/user/add_to_wishlist.jsp\");\n\t}", "public long addProductShoppingList(String name){\n return addProductShoppingList(name, 0, 0, \"\");\n\n }", "public CategoryIPhone AddProductToCartAndContinue(String strProductName)\n\t{\n\t\t\n\t\twaittillResultload(\".//*[@name='\"+strProductName+\"']/div[2]/div/span/input\", \"xpath\");\n\t\t\n\t\tinputAddToCart.click();\n\t\t\n\t\twaittillResultload(\".continue_shopping\", \"css\");\n\t\t\n\t\tbuttonContinueShopping.click();\n\t\t\n\t\treturn this;\n\t\t\n\t}", "@RequestMapping(\n method = RequestMethod.POST,\n consumes = MediaType.APPLICATION_JSON_VALUE,\n path = \"{productId}\"\n )\n public void addProductToShoppingCart(@PathVariable(\"productId\") UUID productId){\n shoppingCartService.insertProduct(productId);\n }", "public void addProducts(Product product, int quantity) {\n this.getProductsQuantities().put(product, quantity);\n this.price += product.getPrice() * quantity;\n }", "public void addProduct(Product product) {\n\t\tSystem.out.println(\"Before inserting product \" + product.getProductID());\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(product);// permanently store the product object in database,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// session.sav\n\t\tSystem.out.println(\"After inserting product \" + product.getProductID());\n\n\t}", "public void onAddButtonClick(View view) {\n\n if (view.getId() == R.id.Badd) {\n\n EditText a = (EditText) findViewById(R.id.TFenterName);\n\n String b = a.getText().toString();\n product.setProductName(b);\n\n a = (EditText) findViewById(R.id.TFenterPrice);\n b = a.getText().toString();\n product.setPrice(b);\n\n a = (EditText) findViewById(R.id.TFenterQuantity);\n b = a.getText().toString();\n product.setQuantity(b);\n\n a = (EditText) findViewById(R.id.TFLocation);\n b = a.getText().toString();\n product.setLocation(b);\n\n a = (EditText) findViewById(R.id.TFExpiration);\n b = a.getText().toString();\n product.setExpiration(b);\n\n helper.insertProduct(product);\n\n Intent i = new Intent(AddProduct.this, WasAdded.class);\n i.putExtra(\"product\", product.getProductName());\n startActivity(i);\n\n }\n }", "public void addProduct(String c, String p){\n\t\ttry {\n\t\t\tif(!hasProduct(c, p)){\n\t\t\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t\t\tif( c.equals(list.get(i).getUsername()) ){\n\t\t\t\t\t\tlist.get(i).getWishlist().add(p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IllegalArgumentException e){\n\t\t\tSystem.out.println(\"Customer\" + c + \"is not in the datavase.\");\n\t\t}\n\t}", "Product addOneProduct(String name, String imgNameBarcode, String imgName, String barcode) throws Exception;", "@PutMapping(value = \"/{productId}/add/{quantity}\")\n @ApiOperation(value = \"Add Product To Basket\",response = CustomResponseEntity.class)\n public ResponseEntity<Object> addProductToBasket(@NotNull @PathVariable(value = \"productId\") @ApiParam(value = \"ID of Product\") String productId,\n @PathVariable(value = \"quantity\") @ApiParam(value = \"Quantity\") Long quantity, @RequestHeader(value = \"userId\") @ApiParam(value = \"ID of User\") Long userId) throws UserException, ProductException, SQLException {\n userService.findUserById(userId);\n CustomResponseEntity customResponseEntity = basketService.addProductToBasket(productId, userId, quantity);\n return new ResponseEntity(customResponseEntity, HttpStatus.CREATED);\n\n }", "@Then(\"I click on Add to WishList button for the Leica T Mirrorless Digital camara product.\")\n public void i_click_on_add_to_wish_list_button_for_the_leica_t_mirrorless_digital_camara_product() {\n BasePage.driverUtils.waitForWebElementToBeClickable(BasePage.leicaTMirrorlessDigitalCamPage.getLeicaTMirrorlessCamAddToWishListButton());\n BasePage.leicaTMirrorlessDigitalCamPage.getLeicaTMirrorlessCamAddToWishListButton().click();\n }", "void add(ProductCategory category);", "@Test \n\tpublic void testAddItemToBasket() throws Exception {\n\t\tBBBRequest request = BBBRequestFactory.getInstance().createAddBasketItemRequest(BOOK_BASKET_ITEM_ISBN);\n\t\t\n\t\tString expectedUrl = AccountHelper.constructUrl(BBBRequestFactory.getInstance().getHostBasket(), PATH_MY_BASKETS_ITEMS);\n\t\tassertEquals(expectedUrl, request.getUrl());\n\t\t\n\t\tBBBResponse response = BBBRequestManager.getInstance().executeRequestSynchronously(request);\n\t\t\n\t\tif(response.getResponseCode() != HttpURLConnection.HTTP_OK) {\n\t\t\tfail(\"Error: \"+response.toString());\n\t\t}\n\t}", "@Override\n\tpublic void add(Entity entity) throws Exception {\n\t\tsuper.add(entity);\n\t\tProduct prod = (Product) entity;\n\n\t\tSQLiteStatement st = db\n\t\t\t\t.prepare(\"INSERT INTO products(sessionID, name, priceMin, priceMax, quantity, category)\"\n\t\t\t\t\t\t+\"VALUES (?, ?, ?, ?, ?, ?)\");\n\t\tst.bind(1, sessionId).bind(2, prod.getName()).bind(3, prod.getPriceMin())\n\t\t\t\t.bind(4, prod.getPriceMin()).bind(5, prod.getQuantity())\n\t\t\t\t.bind(6, prod.getCategory());\n\t\tst.step();\n\t\ttotalQuantity += prod.quantity;\n\t\tif (!categoryList.containsKey(prod.getCategory())) {\n\t\t\tcategoryList.put(prod.getCategory(), new ArrayList<Product>());\n\t\t}\n\t\tcategoryList.get(prod.getCategory()).add(prod);\n\t\tif (availableProducts.get(entity.getName())==null) {\n\t\t\tavailableProducts.put(entity.getName(), \" \");\n\t\t}\n\t}", "public boolean AddUpdateProduct(Product product)\r\n {\r\n boolean isSuccess = false;\r\n // if the product already exists, update it\r\n for (int i = 0; i < productArrayList.size(); i++)\r\n {\r\n if (product.getId() == productArrayList.get(i).getId())\r\n {\r\n // update the value of the product\r\n productArrayList.set(i, product);\r\n isSuccess = true;\r\n System.out.println(\"Product updated\");\r\n }\r\n }\r\n\r\n // if product does not exist, add it to the list\r\n if (!isSuccess)\r\n {\r\n productArrayList.add(product);\r\n isSuccess = true;\r\n System.out.println(\"Product added to inventory\");\r\n }\r\n\r\n // print arrayList to the file\r\n File inventoryFile = new File(\"Inventory.txt\");\r\n try (PrintWriter fileWriter = new PrintWriter(inventoryFile))\r\n {\r\n for (Product product1: productArrayList) {\r\n fileWriter.print(product1.getId() + \", \" + product1.getName() + \", \" +\r\n product1.getCost() + \", \" + product1.getQuantity() + \", \" + product1.getMargin() + \"\\n\");\r\n }\r\n } catch (FileNotFoundException ex)\r\n {\r\n System.out.println(\"File not found\");\r\n }\r\n // if method was not able to add the product, isSuccess stays false\r\n return isSuccess;\r\n }", "public void rbListAddElement() {\n rbProductType.clear();\n rbProductType.add(rbScs);\n rbProductType.add(rbSko);\n rbProductType.add(rbMko);\n rbProductType.add(rbZko);\n }", "public CheckoutPage AddProductToCartAndCheckout(String strProductName)\n\t{\n\t\twaittillResultload(\".//*[@name='\"+strProductName+\"']/div[2]/div/span/input\", \"xpath\");\n\t\t\n\t\tinputAddToCart.click();\n\t\t\n\t\twaittillResultload(\".go_to_checkout\", \"css\");\n\t\t\n\t\tbuttonCheckout.click();\n\t\t\n\t\treturn new CheckoutPage(driver);\n\t\t\n\t}", "@Override\n\tpublic void addProduct(Product product) throws ProductNotFoundException {\n\t\tif (productRepository.findByName(product.getName()) == null){\n\t\t\tproductRepository.addProduct(product);\n\t\t}\n\n\t}", "@Override\n\tpublic void add(Product p) {\n\t\tproductRepository.save(p);\n\t}" ]
[ "0.74823666", "0.7384696", "0.72202086", "0.72041744", "0.7196659", "0.71107113", "0.70778465", "0.7077733", "0.7057597", "0.70433336", "0.7027093", "0.69127387", "0.69031525", "0.68544126", "0.6796001", "0.6714306", "0.66847914", "0.66629934", "0.66433793", "0.6634368", "0.6627597", "0.6610996", "0.66071814", "0.65916705", "0.65819263", "0.6579109", "0.6542649", "0.64847696", "0.6480939", "0.64805096", "0.64650303", "0.64469635", "0.6437463", "0.643245", "0.64291847", "0.638214", "0.63690066", "0.6366185", "0.63643146", "0.63639235", "0.63561237", "0.6340933", "0.6325778", "0.63154936", "0.63141483", "0.6287872", "0.6282821", "0.6282323", "0.62803936", "0.6233573", "0.6220005", "0.62116575", "0.6211099", "0.6210346", "0.61991423", "0.6194605", "0.61850554", "0.6159921", "0.6155868", "0.61435413", "0.61399114", "0.613716", "0.61357", "0.61286676", "0.6128624", "0.6127982", "0.6114833", "0.6097987", "0.609342", "0.6090077", "0.60824764", "0.60746247", "0.60651237", "0.6044508", "0.6044289", "0.604419", "0.6041296", "0.60380805", "0.6025039", "0.6011961", "0.60098183", "0.6008602", "0.6000145", "0.59971946", "0.59842074", "0.59800786", "0.59759223", "0.5968292", "0.596511", "0.5947185", "0.5937049", "0.5932732", "0.5929329", "0.5928526", "0.5928497", "0.5926796", "0.5925624", "0.59182835", "0.5915232", "0.59132594" ]
0.69882417
11
Overloading addProductToWishlist method because a customer object can be passed or the account ID. Accounting for both just in case.
public void addProductToWishlist(Product product, long accountId) { wishlistService.addProduct(product, accountId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createWishlist(Customer customer, Product product) {\n wishlistService.createWishlist(customerRepository.findByID(customer.getAccountID()), product);\n }", "public void addProduct(String c, String p){\n\t\ttry {\n\t\t\tif(!hasProduct(c, p)){\n\t\t\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t\t\tif( c.equals(list.get(i).getUsername()) ){\n\t\t\t\t\t\tlist.get(i).getWishlist().add(p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IllegalArgumentException e){\n\t\t\tSystem.out.println(\"Customer\" + c + \"is not in the datavase.\");\n\t\t}\n\t}", "public boolean addProductToWishlist(String productId) throws WishListException {\n\t\t// TODO Auto-generated method stub\n\t\tboolean result=false;\n\t\tif(ProductRepository.productList.get(productId) != null)\n\t\t{ if(WishlistDaoImpl.wlist.containsKey(productId))\n\t \t{\t\n\t\t\t throw new WishListException(\"WishList already contain this PRODUCT\");\n\t \t}\n\t\t else {\n\t\t\t result=WishlistDaoImplObj.addProductToWishlist(productId);\n\t\t return result;\n\t\t }\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new WishListException(\"Product ID not Found in Product List to Add in WishList\\n\");\n\t\t}\n\t \n\t\t\n\t}", "@Override\n\tpublic WishList addProductToWishList(List<String> productName, Long userId) {\n\t\tList<Product> allProduct = productDAO.getallProduct();\n\t\t\n\t\t\n\t\t\n\t\tfor(String p : productName) {\n\t\t\tProduct product = productDAO.getProductByName(p).get(0);\n\t\t\t\n\t\t\t\n\t\t\tif(allProduct.contains(p)) {\n\t\t\t\tUserDetail user = userDetailDAO.getUserById(userId).get(0);\n\t\t\t\tif(user.getWishList().getProducts().contains(p)) {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tWishList wishList = new WishList();\n\t\t\t\t\tList<Product> prod = new ArrayList<>();\n\t\t\t\t\tprod.add(product);\n\t\t\t\t\twishList.setProducts(prod);\n\t\t\t\t\tuser.setWishList(wishList);\n\t\t\t\t\tuserDetailDAO.save(user);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn userDetailDAO.getUserById(userId).get(0).getWishList();\n\t}", "public void addProduct(Product product);", "public void createWishlist(Customer customer, List<Product> products) {\n wishlistService.createWishlist(customer, products);\n }", "void addProduct(Product product);", "public void Addproduct(Product objproduct) {\n\t\t\n\t}", "private void getWishListInfo(final long productId) {\n User user = SettingsMy.getActiveUser();\n if (user != null) {\n // determine if product is in wishlist\n //String wishlistUrl = String.format(EndPoints.WISHLIST_IS_IN_WISHLIST, SettingsMy.getActualNonNullShop(getActivity()).getId(), productId);\n String wishlistUrl = String.format(EndPoints.WISHLIST);\n GsonRequest<WishlistResponse> getWishlistInfo = new GsonRequest<WishlistResponse>(Request.Method.GET, wishlistUrl, null, WishlistResponse.class, new Response.Listener<WishlistResponse>() {\n @Override\n public void onResponse(@NonNull WishlistResponse response) {\n if(response != null) {\n if(response.getStatusText() != null && response.getStatusCode() != null) {\n if (response.getStatusCode().toLowerCase().equals(CONST.RESPONSE_CODE) || response.getStatusText().toLowerCase().equals(CONST.RESPONSE_UNAUTHORIZED)) {\n LoginDialogFragment.logoutUser(true);\n DialogFragment loginExpiredDialogFragment = new LoginExpiredDialogFragment();\n loginExpiredDialogFragment.show(getFragmentManager(), LoginExpiredDialogFragment.class.getSimpleName());\n }\n }\n else\n prepareWishListButton(response, productId);\n }\n else\n Timber.d(\"returned null response during getWishListInfo\");\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n MsgUtils.logAndShowErrorMessage(getActivity(), error);\n }\n }, getFragmentManager(), \"\");\n getWishlistInfo.setRetryPolicy(MyApplication.getDefaultRetryPolice());\n getWishlistInfo.setShouldCache(false);\n MyApplication.getInstance().addToRequestQueue(getWishlistInfo, CONST.PRODUCT_REQUESTS_TAG);\n }\n }", "public void addWishlistItem(WishlistItem wishItem){\n fStore.collection(\"user_profiles\").document(fUser.getUid()).collection(\"wishlist\").document(wishItem.getWishID()).set(wishItem).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n }\n });\n }", "public void addToWish( String product_id, String product_name,String product_brand, String product_img,\n String product_price,String product_desc, String product_discount, String product_varieties )\n {\n boolean isAdded = mDatabaseFavorite.insert(product_id, product_name,product_brand, product_img,\n product_price,product_discount);\n\n if (isAdded == true)\n {\n Toast.makeText(DetailActivity.this,\"Added to Favorite\",Toast.LENGTH_SHORT).show();\n\n }\n\n else {\n\n Toast.makeText(DetailActivity.this,\"Already present in favoriteList\",Toast.LENGTH_SHORT).show();\n\n }\n\n }", "Product addNewProductInStore(Product newProduct);", "private void save_to_wishlist(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws Exception {\n\t\t\n\t\tSystem.out.println(\"inside save to wishlist\");\n\t\tString cart_type = request.getParameter(\"cart_type\");\n\t\tSystem.out.println(cart_type);\n\t\tString quantity[] = request.getParameterValues(\"qty_name\");\n\t\tList lqty = new ArrayList();\n\t\tfor(int i=0;i<quantity.length;i++)\n\t\t{\n\t\t\tSystem.out.println(quantity[i]);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tUaddToCartMstVO mstVO = new UaddToCartMstVO();\n\t\tSystem.out.println(\"cart typw3333333333333333333333333333333\"+cart_type);\n\t\tmstVO.setCart_type(cart_type);\n\t\t\n\t\tHttpSession hs = request.getSession();\n\t\tint user_id=Integer.parseInt(hs.getAttribute(\"userID\").toString());\n\t\tSystem.out.println(\"User............\"+user_id);\n\t\t\n\t\tUaddToCartDAO addCartDAO;\n\t\taddCartDAO=new UaddToCartDAO();\n\n\t\tint BuyerregId = -1;\n\t\tloginVO logVo=new loginVO();\n\t\tlogVo.setLogin_id(user_id);\n\t\tList luser=addCartDAO.search_user_id(logVo);\n\t\tif(luser!=null && luser.size()>0)\n\t\t{\n\t\t\tUregistrationVO regVo=(UregistrationVO)luser.get(0);\n\t\t\tBuyerregId=regVo.getBuyer_user_id();\n\t\t\tSystem.out.println(\"Buyer user Id======================================================\"+BuyerregId);\n\t\t}\n\t\t\n\t\tUregistrationVO regVo=new UregistrationVO();\n\t\tregVo.setBuyer_user_id(BuyerregId);\n\t\t//System.out.println(\"User login id....\"+ regVo.getLoginVoObj().getLogin_id());\n\t\t\n\t\tmstVO.setBuyer_user_id(regVo);\n\t\t\n\t\t\t\t\n\t\taddCartDAO.save_to_wishlist(mstVO);\n\t\t\n\t\tSystem.out.println(\"--------------------------------------------------child Data insertion---------------------------------\");\n\t\t\n\t\t\n\t\tList l= (List)hs.getAttribute(\"product_data_wishlist\");\n\t\t\n\t\tSystem.out.println(\"LIST value::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\"+l.toString());\n\t\t\n\t\t\n\t\tUaddToCartVO addCartVO[]=new UaddToCartVO[l.size()];\n\t\t\n\t\tUaddToCartVO temp=new UaddToCartVO();\n\t\t\n\t\t\n\t\t\n\t\tfor(int i=0;i<l.size();i++)\n\t\t{\n\t\t\t\n\t\t\ttemp=(UaddToCartVO)l.get(i);\n\t\t\taddCartVO[i]=new UaddToCartVO();\n\t\t\taddCartVO[i].setCloth_id(temp.getCloth_id());\n\t\t\taddCartVO[i].setColor_code(temp.getColor_code());\n\t\t\taddCartVO[i].setPrice(temp.getPrice());\n\t\t\taddCartVO[i].setProduct_name(temp.getProduct_name());\n\t\t\taddCartVO[i].setSize(temp.getSize());\n\t\t\taddCartVO[i].setQuantity(Integer.parseInt(quantity[i]));\n\t\t\taddCartVO[i].setDesigner_user_id(temp.getDesigner_user_id());\n\t\t\taddCartVO[i].setCartMstVOObj(mstVO);\n\t\t\taddCartDAO.save_to_cart(addCartVO[i]);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*String type=mstVO.getCart_type();\n\t\tint userId=((UregistrationVO)mstVO.getBuyer_user_id()).getBuyer_user_id();\n\t\t\n\t\tSystem.out.println(\"---------------------------------------------------------------------------------------------------------------\");\n\t\tSystem.out.println(\"TYPE value is ::::::::::::::\"+type);\n\t\tSystem.out.println(\"USERID value is ::::::::::::::\"+userId);\n\n\t\tSystem.out.println(\"---------------------------------------------------------------------------------------------------------------\");\n\t\t\n*/\t\t\n\t\tresponse.sendRedirect(request.getContextPath()+\"/user/add_to_wishlist.jsp\");\n\t}", "static void addCustomer(customer customer) {\n\n }", "public boolean addCustomer(CustomerBean customer);", "public void addProduct(Product p) {\n c.addProduct(p);\n }", "void createOrder(List<Product> products, Customer customer);", "static void addCustomerOrder() {\n\n Customer newCustomer = new Customer(); // create new customer\n\n Product orderedProduct; // initialise ordered product variable\n\n int quantity; // set quantity to zero\n\n String name = Validate.readString(ASK_CST_NAME); // Asks for name of the customer\n\n newCustomer.setName(name); // stores name of the customer\n\n String address = Validate.readString(ASK_CST_ADDRESS); // Asks for address of the customer\n\n newCustomer.setAddress(address); // stores address of the customer\n\n customerList.add(newCustomer); // add new customer to the customerList\n\n int orderProductID = -2; // initialize orderProductID\n\n while (orderProductID != -1) { // keep looping until user enters -1\n\n orderProductID = Validate.readInt(ASK_ORDER_PRODUCTID); // ask for product ID of product to be ordered\n\n if(orderProductID != -1) { // keep looping until user enters -1\n\n quantity = Validate.readInt(ASK_ORDER_QUANTITY); // ask for the quantity of the order\n\n orderedProduct = ProductDB.returnProduct(orderProductID); // Search product DB for product by product ID number, return and store as orderedProduct\n\n Order newOrder = new Order(); // create new order for customer\n\n newOrder.addOrder(orderedProduct, quantity); // add the new order details and quantity to the new order\n\n newCustomer.addOrder(newOrder); // add new order to customer\n\n System.out.println(\"You ordered \" + orderedProduct.getName() + \", and the quantity ordered is \" + quantity); // print order\n }\n }\n }", "@Override\n public void insertIntoAuthBooks(long cartid, long itemid) {\n wishListRepository.insertIntoAuthBooks(cartid, itemid);\n\n }", "AccountModel addByCustomer(AccountModel account,String customerId) throws AccountException, CustomerException;", "public void addUser(Customer user) {}", "BonusResponse add(Long customerId, Long authorizedBy, BonusRequest bonus);", "@Override\n\tpublic boolean addProduct(Products productInfoBean) {\n\t\treturn dao.addProduct(productInfoBean);\n\t}", "@Override\n\tpublic void addCustomer(Customer customer, Branch branch) {\n\t\t\n\t}", "public void addProduct(ProductBarcode barcode) throws IllegalArgumentException;", "public void addCustomer(CustomerAccount acc){\n accountHM.put(acc.getVehicle().getPlate(),acc);\n }", "public void productsToBuy(Product purchase){\n bill.getProducts().add(purchase);\n }", "public void addProduct(MarketObject<?> product) throws IllegalStateException{\n\t\tPlayer sellingPlayer=game.getCurrentPlayer();\n\n\t\tif(product.getObject().getClass().getSuperclass().equals(PoliticsCard.class))\n\t\t\tif(sellingPlayer.getCardsOwned().contains(product.getObject()))\n\t\t\t{\n\t\t\t\tsellingPlayer.getCardsOwned().remove((PoliticsCard)product.getObject());\n\t\t\t\tthis.products.add(product);\n\t\t\t}\n\t\t\telse\n\t\t\t\tthrow new IllegalStateException(\"Impossible to add \"+PoliticsCard.class.getSimpleName()+\n\t\t\t\t\t\t\". You don't own one.\");\n\t\telse if(product.getObject().getClass().equals(Assistant.class))\n\t\t\tif(sellingPlayer.checkAssistants(((Assistant)product.getObject()).getNumber()))\n\t\t\t\tthis.products.add(product);\n\t\t\telse \n\t\t\t\tthrow new IllegalStateException(\"Impossible to add \"+Assistant.class.getSimpleName()+\n\t\t\t\t\t\t\". You own just \"+sellingPlayer.getAssistants()+\" \"+Assistant.class.getSimpleName());\n\t\telse if(product.getObject().getClass().equals(BuildingPermit.class))\n\t\t\tif(sellingPlayer.getAllPermits().contains(product.getObject()))\n\t\t\t{\n\t\t\t\tsellingPlayer.getBuildingPermits().remove((BuildingPermit)product.getObject());\n\t\t\t\tthis.products.add(product);\n\t\t\t}\n\t\t\telse \n\t\t\t\tthrow new IllegalStateException(\"Impossible to add \"+BuildingPermit.class.getSimpleName()+\n\t\t\t\t\t\t\". You don't own one.\");\n\t\tgame.notifyObservers(new ModelChange(game));\n\t}", "void addList(ShoppingList _ShoppingList);", "public void addProductToList(Product aProduct){\n listOfProduct.add(aProduct);\n }", "@Override\r\n\tpublic boolean createAccount(CustomerBean cb) {\n\t\r\n\t\treturn customerList.add(cb);\r\n\t}", "Product storeProduct(Product product);", "@Override\n public void onAddToCart(Product product) {\n }", "@Override\n\tpublic void modifyAccount(Account account, Customer customer) {\n\t\t\n\t}", "public synchronized void clickOnWishList(WebDriver driver) throws Exception {\n\n\t\tutils.isElementPresent(driver, \"Add_To_WishList\");\n\n\t\ttry {\n\n\t\t\tWebElement elem = utils.findElementByLocator(driver, \"Add_To_WishList\", \"Add To Wishlist not clicked\");\n\t\t\telem.click();\n\t\t\tReporterLog.actionMsg(\"Add To WishList clicked\");\n\n\t\t} catch (Exception e) {\n\n\t\t\tCustomException.throwExceptionError(e, \"PDP\", \"Add To WishList action failed\", driver);\n\t\t}\n\t}", "public boolean insertWishlist(ProductDetail productDetail) {\n\n db = helper.getWritableDatabase();\n ContentValues v = new ContentValues();\n v.put(DatabaseConstant.TABLE_WISHLIST_ID, productDetail.getId());\n v.put(DatabaseConstant.TABLE_WISHLIST_TITLE, productDetail.getTitle());\n v.put(DatabaseConstant.TABLE_WISHLIST_PRICE, productDetail.getPrice());\n v.put(DatabaseConstant.TABLE_WISHLIST_ORDER_QUANTITY, productDetail.getOrder_quantity());\n v.put(DatabaseConstant.TABLE_WISHLIST_QUANTITY_TYPE, productDetail.getQuantity_type());\n v.put(DatabaseConstant.TABLE_WISHLIST_MIN_QUAITITY, productDetail.getMin_quantity());\n v.put(DatabaseConstant.TABLE_WISHLIST_AVAILABILITY, productDetail.getAvailability());\n v.put(DatabaseConstant.TABLE_WISHLIST_DISCOUNT, productDetail.getDiscount());\n v.put(DatabaseConstant.TABLE_WISHLIST_IMAGE, productDetail.getImage());\n v.put(DatabaseConstant.TABLE_WISHLIST_RATING, productDetail.getRating());\n v.put(DatabaseConstant.TABLE_WISHLIST_DESCRIPTION, productDetail.getDescription());\n v.put(DatabaseConstant.TABLE_WISHLIST_TYPE, productDetail.getType());\n v.put(DatabaseConstant.TABLE_WISHLIST_QUANTITY, productDetail.getQuantity());\n long isCheck = db.insert(DatabaseConstant.TABLE_NAME_WISHLIST, null, v);\n if (isCheck > 0) {\n return true;\n } else {\n return false;\n }\n }", "public void addIncludedServiceBrand(Integer includedServiceBrand);", "Product updateProductInStore(Product product);", "Product addOneProduct(String name, String imgNameBarcode, String imgName, String barcode) throws Exception;", "public addproduct() {\n\t\tsuper();\n\t}", "@GET\n @Path(\"/addwl/{beerId}\")\n @Produces({MediaType.TEXT_XML, MediaType.APPLICATION_JSON , MediaType.APPLICATION_XML })\n public long addBeerToWishList( @PathParam(\"beerId\") Long beerId) {\n\t\t\n \t\n \thelper = new Helper();\n\t\tsoapService = helper.getSoapService();\n\t\tUser user = helper.getUserByUsername(username);\n Beer beer = soapService.readBeer(beerId);\n \n soapService.addBeerToUser(user, beer);\n \n System.out.println(\"beer added to wishlist...\");\n \n \treturn beerId;\n \t \t\n }", "public Result notifyAllCustomer(Long productID) {\n Coupons coupon = formFactory.form(Coupons.class).bindFromRequest().get();\n List<UserInfo> customers = Product.find.byId(productID).purchaser;\n CouponSendCenter sender = CouponSendCenter.find.byId(session().get(\"email\"));\n\n coupon.sender = sender;\n sender.coupon.add(coupon);\n sender.productID = Product.find.byId(productID).name;\n sender.update();\n\n for(int i = 0; i < customers.size(); i++) {\n CouponReceiveCenter receiver = CouponReceiveCenter.find.byId(customers.get(i).emailID);\n coupon.receiver.add(receiver);\n }\n coupon.save();\n\n return GO_HOME;\n }", "@FXML\r\n\tpublic void addToShoppingCart() {\r\n\t\t\r\n\t\tWatch w = listView.getSelectionModel().getSelectedItem();\r\n\t\tboolean add = controller.addWatchToShoppingCart(w);\r\n\t\tcontroller.deleteWishlistItem(w.getId());\r\n\t\tlistView.setItems(controller.getWishlistWatchesForCurrentUser());\r\n\t\tlistView.getSelectionModel().select(-1);\r\n\t\tcheckSelected();\r\n\t}", "public void addWasher() {\r\n\t\tdo {\r\n\t\t\tString brand = getToken(\"Enter washer brand: \");\r\n\t\t\tString model = getToken(\"Enter washer model: \");\r\n\t\t\tdouble price = getDouble(\"Enter washer price: \");\r\n\t\t\tWasher washer = store.addWasher(brand, model, price);\r\n\t\t\tif (washer != null) {\r\n\t\t\t\tSystem.out.println(washer);\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Washer could not be added.\");\r\n\t\t\t}\r\n\t\t} while (yesOrNo(\"Would you like to add another washer?\"));\r\n\t}", "public boolean addCustomer(Customer customer) throws DatabaseOperationException;", "@Override\n\tpublic boolean addProduct(Product p) {\n\t\treturn false;\n\t}", "public void addAccount(Account account,Person person);", "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 }", "@Override\n public void addProductToFavorites(View view, Intent intent) {\n try {\n if(iProduct != null && view != null && intent != null){\n Context context = view.getContext();\n String jsonProduct = intent.getStringExtra(CommonPresenter.DETAIL_PRODUCT);\n Product product = CommonPresenter.getProductFromJSON(jsonProduct);\n CRUDFavorite crudFavorite = new CRUDFavorite(context);\n boolean isProductExists = crudFavorite.isProductExists(product.getProductId());\n if(isProductExists){\n crudFavorite.deleteByProductId(product.getProductId());\n CommonPresenter.showSnackBarMessage(view, context.getString(R.string.lb_product_delete_to_favorite));\n iProduct.changeImageRightResource(R.drawable.ic_add_to_favorite_32dp);\n }\n else{\n crudFavorite.add(new Favorite(0, product));\n CommonPresenter.showSnackBarMessage(view, context.getString(R.string.lb_product_add_to_favorite));\n iProduct.changeImageRightResource(R.drawable.ic_favorite_32dp);\n }\n }\n }\n catch (Exception ex){\n Log.e(\"TAG_ERROR\", \"ProductPresenter-->addProductToFavorites() : \"+ex.getMessage());\n }\n }", "Cart addToCart(String productCode, Long quantity, String userId);", "@POST\n\t@Path(\"/getWishlist\")\n\t@Consumes(\"application/json\")\n\t@Produces(\"application/json\")\n\tpublic String getWishlist(WishlistProduct user_data) {\n\t\t\n\t\tWishlistProductDAO WishlistProductDao = new WishlistProductDAO();\n\t\tList<WishlistProduct> wishlistedProducts = WishlistProductDao.getWishlistProductsByWishlistID(user_data.getWishlist_id());\n\t\t\n\t\tWishlistDAO WishlistDao = new WishlistDAO();\n\t\tWishlist wishlist = WishlistDao.getWishlistDetailsByID(user_data.getWishlist_id());\n\t\t\n\t\tJSONArray products = new JSONArray();\n\t\t\n\t\tfor(int i=0; i<wishlistedProducts.size();i++)\n\t\t{\n\t\t\tJSONObject product = new JSONObject();\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tproduct.put(\"wishlist_name\", wishlist.getName());\n\t\t\t\tproduct.put(\"req_qty\", wishlistedProducts.get(i).getQuantity());\n\t\t\t\tproduct.put(\"remaining_qty\", wishlistedProducts.get(i).getRemaining_qty());\n\t\t\t\tproduct.put(\"address\", wishlistedProducts.get(i).getAddress());\n\t\t\t\tproduct.put(\"reason\", wishlistedProducts.get(i).getReason());\n\t\t\t\t\t\n\t\t\t\tCatalogDAO CatalogDao = new CatalogDAO();\n\t\t\t\tCatalog productDetails = CatalogDao.getProductByID(wishlistedProducts.get(i).getProduct_id());\n\t\t\t\t\n\t\t\t\tproduct.put(\"product_id\", productDetails.getProduct_id());\n\t\t\t\tproduct.put(\"product_name\", productDetails.getProduct_name());\n\t\t\t\tproduct.put(\"product_qty\", productDetails.getQuantity());\n\t\t\t\tproduct.put(\"brand\", productDetails.getBrand());\n\t\t\t\tproduct.put(\"description\", productDetails.getDescription());\n\t\t\t\tproduct.put(\"price\", productDetails.getPrice());\n\t\t\t\tproduct.put(\"pic_location\", productDetails.getPic_location());\n\t\t\t\t\n\t\t\t\tproducts.put(product);\n\t\t\t\t\n\t\t\t}\n\t\t\tcatch (JSONException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t}\n\t\t\n\t\treturn products.toString();\n\t\t\n\t}", "@Override\n public boolean add(List<Buyer> buyers) {\n return false;\n }", "@Override\n\t@Transactional\n\tpublic String addProduct(Inventory product) {\n\t\treturn null;\n\t}", "@Override\n\tpublic void addProduct(ProductEntity product)\n\t{\n\t\tsave(product);\n\t\tlogger.debug(\"The user added is \" + product.getProductUuid());\n\t}", "@RequestMapping(\n method = RequestMethod.POST,\n consumes = MediaType.APPLICATION_JSON_VALUE,\n path = \"{productId}\"\n )\n public void addProductToShoppingCart(@PathVariable(\"productId\") UUID productId){\n shoppingCartService.insertProduct(productId);\n }", "public void addUserMovie(Long movie, Integer mark, Integer wishlist) throws IllegalOperationException;", "public void removeProductFromWishlist(Product product, long accountId) {\n wishlistService.removeProduct(product, accountId);\n }", "ProductView addProduct(ProductBinding productToAdd) throws ProductException;", "public static MozuUrl addItemToWishlistUrl(String responseFields, String wishlistId)\r\n\t{\r\n\t\tUrlFormatter formatter = new UrlFormatter(\"/api/commerce/wishlists/{wishlistId}/items?responseFields={responseFields}\");\r\n\t\tformatter.formatUrl(\"responseFields\", responseFields);\r\n\t\tformatter.formatUrl(\"wishlistId\", wishlistId);\r\n\t\treturn new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;\r\n\t}", "@Override\n public IProduct byId( String productId )\n {\n return new CustomerProductOperations(this.getPartner(), this.getContext(), productId); \n }", "public static void addCarToExistingCustomer(ArrayList<Customer> customerList)\n\t{\n\t Scanner sc = new Scanner(System.in);\n\t System.out.println(\"Input Customer Id to whom New Car to be added\");\n\t int customerIdInput = sc.nextInt();\n\t\n\t System.out.println(\"Input Car Id, Car Price and Car Model\");\n\t int carIdInput = sc.nextInt();\n\t int carPriceInput = sc.nextInt();\n\t String carModelInput = sc.next();\n\t\n\t System.out.println(\"Input Type of the Car\");\n\t String carTypeInput = sc.next();\n\t\n\t //If car type is Toyota\n\t if(carTypeInput.equals(\"Toyota\"))\n\t {\t\n\t \taddCarToCustomer(customerIdInput, new Toyota(carIdInput, carPriceInput, carModelInput), customerList);\n\t }\n\t //If car type is Maruti\n\t else if(carTypeInput.equals(\"Maruti\"))\n\t {\n\t\t addCarToCustomer(customerIdInput, new Maruti(carIdInput, carPriceInput, carModelInput), customerList);\n\t }\n\t //If car type is Hyundai\n\t else if(carTypeInput.equals(\"Hyundai\"))\n\t {\n\t\t addCarToCustomer(customerIdInput, new Hyundai(carIdInput, carPriceInput, carModelInput), customerList);\n\t }\n\t //If any other type except the three entered\n\t else\n\t {\n\t\t System.out.println(\"Input Car Type not a valid Car Type\");\n \t}\n\t }", "@Override\n public void addCustomer(Customer customer) {\n log.info(\"Inside addCustomer method\");\n customerRepository.save(customer);\n }", "@Override\n\tpublic void findIt(MyCustomer c ,String product){\n\t\tfor(int i=0; i<c.customerNeeds.size(); i++){\n\t\t\tif(product == c.customerNeeds.get(i)){\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic boolean createCustomer(Customer customer) {\n\n\t\tif (customer != null) {\n\t\t\tcustomers.add(customer);\n\t\t\tlogger.info(\"Customer added to the list\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\tlogger.info(\"Failed to add customer to the list: createCustomer()\");\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean hasProduct(String c, String p){\n\t\tif(!containsCustomer(c)) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\tif( c.equals(list.get(i).getUsername()) ){\n\t\t\t\tfor (int j = 0; j < list.get(i).getWishlist().size(); j++) {\n\t\t\t\t\tif( p.equals(list.get(i).getWishlist().get(j)) ){\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Override\n\tpublic void addCustomers(Customer customer) {\n\n\t\tsessionFactory.getCurrentSession().save(customer);\n\t}", "Order addOrder(String orderId, Order order) throws OrderBookOrderException;", "public void addProduct(Product p){\n stock.add(p);\n }", "public static void createAccount(Customer customer) {\n\t\tcustomerList.add(customer);\n\t}", "public ShoppinCard addcard(ShoppinCard shoppingCard, int itemId,Customer customer) throws Exception\r\n\t{\n\t\tif(customer != null) \r\n\t\t{\t\t\r\n\t\tItem item = itemRepository.findById(itemId).orElseThrow(()->new IDNotFoundException(\"Item Are Not Present Into DataBase\"));\r\n\t\tshoppingCard.setItem(item);\r\n\t\tshoppingCard.setCustomer(customer);\r\n\t\treturn shoppingcardRepository.save(shoppingCard);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new ResourceNotFoundException(\"You Can't Login First Do You Login \");\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic boolean addProduct(Product product) {\n\t\treturn dao.addProduct(product);\r\n\t}", "@Then(\"I click on Add to WishList button for the Leica T Mirrorless Digital camara product.\")\n public void i_click_on_add_to_wish_list_button_for_the_leica_t_mirrorless_digital_camara_product() {\n BasePage.driverUtils.waitForWebElementToBeClickable(BasePage.leicaTMirrorlessDigitalCamPage.getLeicaTMirrorlessCamAddToWishListButton());\n BasePage.leicaTMirrorlessDigitalCamPage.getLeicaTMirrorlessCamAddToWishListButton().click();\n }", "public void buySellSmithore(boolean buy, Player customer) {\n if (buy && smithQuantity == 0) {\n GameController.errorMessageBox(\"Not enough Smithore in the store\");\n } else {\n if (buy) {\n if (customer.getMoney() >= smithCost) {\n customer.addSubMoney(-smithCost);\n customer.addSubOre(1);\n smithQuantity--;\n if (smithQuantity == 0) {\n smithCost = 50;\n } else {\n smithCost += 5;\n }\n } else {\n GameController.errorMessageBox(\"You do not have enough money for this item\");\n }\n } else {\n if (customer.getOre() >= 1) {\n customer.addSubMoney(smithCost-8);\n if (smithQuantity == 0) {\n smithCost = 50;\n } else {\n smithCost -= 5;\n }\n customer.addSubOre(-1);\n smithQuantity++;\n } else {\n GameController.errorMessageBox(\"You do not have any of this item to sell\");\n }\n }\n }\n }", "@Override\n\tpublic void affectInsuranceToBuyer(int insId, int buyerId) {\n\n\t}", "public void AddToAccountInfo();", "@Override\r\n\tpublic void updateProduct(String name,int cost,List<Product> custlist) {\n\t\tfor(Product p:custlist) {\r\n\t\tif(name.equals(p.getName())) {\r\n\t\t\t\tp.setCost(cost);\r\n\t\t\t}\r\n\t\t\r\n\t\t\r\n\t}\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t}", "public static void addCarToCustomer(final int customerId, final Car car, ArrayList<Customer> customerList)\n\t{\n\t\tint i, customerFlag = 0;\n\t\t//Search the List of Customers to whom new car to be added\n\t\tfor(i=0;i<customerList.size();i++)\n\t\t{\n\t\t\tif(customerId == customerList.get(i).getCustomerId())\n\t\t\t{\n\t\t\t\t//If customer with entered ID found set the customerFlag\n\t\t\t\tcustomerFlag = 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//If No Customer with entered ID exists in the list\n\t\tif(customerFlag == 0)\n\t\t{\n\t\t\tSystem.out.println(\"No Customer with Inputed Id Found\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tcustomerList.get(i).addCarToCustomer(car);\n\t}", "public com.mozu.api.contracts.productadmin.Product addProduct(com.mozu.api.contracts.productadmin.Product product) throws Exception\r\n\t{\r\n\t\treturn addProduct( product, null);\r\n\t}", "public void addCustomer(String c){\n\t\tif(!containsCustomer(c)){\n\t\t\tCustomer e = new Customer(c);\n\t\t\tlist.add(e);\n\t\t}\n\t}", "public boolean addProductToBasket(Product product, Order order) {\n \tint quantity = orderService.getQuanity(product);\n \treturn orderService.addProductToBasket(order, product, quantity);\n }", "void add(ProductCategory category);", "@PostMapping(\"/wishLists/{custId}/{prodId}\")\r\n\tpublic ResponseEntity<WishList> createWishList(@PathVariable(\"custId\") Integer custId, @PathVariable(\"prodId\") Integer prodId,@PathVariable(\"category3\") String category3) {\r\n\t\tList<Inventory> inventory= inventoryService.getAllInventory();\r\n\t\tList<Inventory> inventory1=new ArrayList();\r\n\t\t\r\n\t\tcategory3=\"Books\";\r\n\t\tfor (Inventory c : inventory) {\r\n\t\t\tCategory category= c.getCategory();\r\n\t\t\tString cat=category.getCategoryName();\r\n\t\t\tif(cat.equals(category3)) {\r\n\t\t\t\r\n\t\t\t\tInventory inv=new Inventory();\r\n\t\t\t\tinv.setProductId(c.getProductId());\r\n\t\t\t\tinv.setProductName(c.getProductName());\r\n\t\t\t\tinv.setPrice(c.getPrice());\r\n\t\t\t\tinv.setCategory(c.getCategory());\r\n\t\t\t\tinv.setDescription(c.getDescription());\r\n\t\t\t\t\r\n\t\t\t\tinventory1.add(inv);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(inventory1==null)\r\n\t\t\treturn new ResponseEntity\r\n\t\t\t\t(\"Sorry! Inventory details not available!\",HttpStatus.NOT_FOUND);\r\n\t\treturn new ResponseEntity<WishList>(HttpStatus.OK);\r\n\t\r\n\t\t\r\n}", "@Override\n\tpublic Bill fetchBillByIdWithCustomerWithBillItemWithProduct(Long id) {\n\t\treturn billDAO.fetchByIdWithCustomerWithBillItemWithProduct(id);\n\t}", "x0401.oecdStandardAuditFileTaxPT1.ProductDocument.Product addNewProduct();", "public void addCustomerMoney(Coin c){\n customerMoney.add(c);\n }", "public void addProduct(Product product) {\n allProducts.add(product);\n }", "public ProductReturnedFromCustomer(final Product product, \n\t\tfinal String customerId, \n\t\tfinal Map<String, Integer> reserved) {\n\t\tsuper(product, customerId, reserved);\n\t}", "@Override\r\n\tpublic int add(Product product) throws Exception {\n\t\treturn this.dao.add(product);\r\n\t}", "public static void addBankAccount(Customer customer) {\r\n\t\tcustomerBankAccountList.add(customer);\t\r\n\t\tcustomer.makeBankAccount();\r\n\t}", "@Override\n\tpublic void showConfirmation(Customer customer, List<Item> items, double totalPrice, int loyaltyPointsEarned) {\n\t}", "public void addToBasket(Product product){\n\n Purchaseitem purchaseitem = new Purchaseitem();\n purchaseitem.setProduct(product.getId());\n purchaseitem.setProductByProduct(product);\n boolean toAdd = false;\n if(basket.isEmpty()){\n purchaseitem.setQuantity(1);\n basket.add(purchaseitem);\n }else {\n for(int i = 0; i < basket.size(); i++){\n if(basket.get(i).getProduct() == product.getId()){\n basket.get(i).setQuantity(basket.get(i).getQuantity() + 1);\n return;\n } else {\n purchaseitem.setQuantity(1);\n toAdd = true;\n }\n }\n }\n if(toAdd){\n basket.add(purchaseitem);\n }\n }", "@Override\n\tpublic void insertProduct(ProductVO dto) {\n\n\t}", "public HashMap<String, ProductDTO> displayProductInWishlist() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\treturn WishlistDaoImpl.wlist ;\n\t}", "@Override\n public void updateProduct(TradingQuote tradingQuote) {\n }", "public void buyProduct(String productName) throws ProductNotFoundException {\r\n\r\n if (doesRecentOrderExist(productName)) {\r\n reorderProduct(productName);\r\n } else {\r\n //Create a new order to be given to the WebMarket\r\n Order newOrder = new Order(this, productName, \"buy\", \"pending\");\r\n\r\n //Acknowlegement print statment\r\n System.out.println(\"CUSTOMER: Request NEW purchase of - \" + newOrder.getProductName());\r\n\r\n //Send the order to WebMarket via placeNewOrder()\r\n market.placeNewOrder(newOrder);\r\n\r\n //Add this order to the customers personel list of orders\r\n orderHistory.add(newOrder);\r\n }\r\n }", "public void purchase(Book book1, Client client1) {\n\t\tclient1.getBuyBookList().add(book1);\n\t\t//book1.getBuyBookClient().add(client1);\n\t}", "@Override\r\n\tpublic boolean addProduct(ProductDAO product) {\n\t\treturn false;\r\n\t}", "public static void askCustomer(Cart cart){\n // Code to read from console the product name, seller,\n // price, number of products, discount and\n // if Buy2Take3 applies.\n // Then create a product of the correct type\n // and add it to the shopping cart\n\n Scanner scanner = new Scanner(System.in);\n\n System.out.print(\"Product name: \");\n String pName = scanner.nextLine();\n\n System.out.print(\"Seller: \");\n String seller = scanner.nextLine();\n\n System.out.print(\"Price: \");\n double price = scanner.nextDouble();\n\n System.out.print(\"How many: \");\n int howMany = scanner.nextInt();\n\n System.out.print(\"Discount (enter 0 if no discount applies): \");\n int discount = scanner.nextInt();\n\n\n System.out.print(\"Does Buy2Take3 apply? Y/N: \");\n String buy2take3 =scanner.next();\n\n\n Product product;\n\n\n if(discount>0&&buy2take3.equals(\"N\")) {\n product=new Product(pName,seller,price);\n DiscountedProduct bt=new DiscountedProduct(product,discount);\n cart.addProduct(bt,howMany);\n }\n else if(discount==0&&buy2take3.equals(\"Y\")) {\n product=new Product(pName,seller,price);\n Buy2Take3Product bt2=new Buy2Take3Product(product);\n cart.addProduct(bt2,howMany);\n }else {\n throw new IllegalArgumentException(\"You can not use both campaign\");\n }\n }", "public void addProduct(Product product){\n // Adding new contact\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_PRODUCT_NAME, product.getName_product());\n values.put(IS_STRIKE_OUT, product.IsStrikeout());\n values.put(KEY_UUID_PRODUCT_NAME, String.valueOf(product.getId()));\n\n\n // Inserting Row\n db.insert(TABLE_PRODUCTS, null, values);\n Log.d(LOG_TAG_ERROR, \"addProduct OK \" + \" \" + product.getName_product() + \" \" + product.getId());\n\n db.close(); // Closing database connection\n }", "@Transactional\n\t@Override\n\tpublic void purchaseCoupon(int couponId, int customerId) throws CustomValidationExepation, CustomDateBaseExepation {\n\n\t\tCoupon coupon = couponRipository.findById(couponId).get();\n\t\tif (coupon == null) {\n\t\t\tthrow new CustomDateBaseExepation(\"no coupon with this id - \" + couponId);\n\t\t}\n\t\tCustomer customer = customerRipository.findById(customerId).get();\n\t\tif (customer == null) {\n\t\t\tthrow new CustomDateBaseExepation(\"no customer with this id - \" + customerId);\n\t\t}\n\t\tif (couponRipository.getCustomer(couponId, customerId).size() > 0) {\n\t\t\tthrow new CustomDateBaseExepation(\"you allredy have this coupon \");\n\t\t}\n\t\tif (coupon.getAmount() <= 0) {\n\t\t\tthrow new CustomValidationExepation(\"this coupon is not avelliballe at the moment - \" + coupon.getTitle());\n\t\t}\n\n\t\tcoupon.getCustomerList().add(customer);\n\t\tcoupon.setAmount(coupon.getAmount() - 1);\n\t\tcustomer.getCouponList().add(coupon);\n\t\tcouponRipository.save(coupon);\n\t\tcustomerRipository.save(customer);\n\n\t}" ]
[ "0.67713076", "0.62201416", "0.62050766", "0.61647797", "0.6045408", "0.59377414", "0.5902292", "0.5842125", "0.5758569", "0.56887805", "0.5681336", "0.5651447", "0.55857253", "0.55750227", "0.55700386", "0.5560664", "0.5537476", "0.5408699", "0.53974277", "0.5374806", "0.5371199", "0.5365692", "0.5363007", "0.53569734", "0.5348034", "0.5339176", "0.53223276", "0.53201514", "0.5297413", "0.52753854", "0.51907694", "0.51746774", "0.5171345", "0.5157977", "0.51439124", "0.51117295", "0.5098111", "0.50816816", "0.5076469", "0.5075486", "0.5073898", "0.50723165", "0.50657815", "0.5062774", "0.5037093", "0.50332904", "0.50224215", "0.5021097", "0.5019425", "0.5006402", "0.5005954", "0.5003004", "0.49784362", "0.4970451", "0.49607393", "0.49569577", "0.49557415", "0.49484983", "0.4948117", "0.49466932", "0.49449912", "0.49445498", "0.4936463", "0.49350718", "0.49301156", "0.4929688", "0.49159563", "0.4914807", "0.49130243", "0.49093843", "0.49063143", "0.4901084", "0.48985898", "0.4897644", "0.48967162", "0.4872492", "0.48634997", "0.48634708", "0.48591366", "0.48575494", "0.4853938", "0.48451334", "0.48397732", "0.48365548", "0.48356816", "0.48350948", "0.48346937", "0.48244172", "0.4820392", "0.4819118", "0.48163548", "0.48113972", "0.48093066", "0.48078454", "0.48051912", "0.48011082", "0.48004064", "0.48002285", "0.47977453", "0.47969693" ]
0.70542073
0
Removes a product from the wishlist
public void removeProductFromWishlist(Product product, long accountId) { wishlistService.removeProduct(product, accountId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void removeProduct(Product product);", "public void removeProductFromWishlist(ProductItem product, User user) {\n this.removeProductFromWishlist(product, this.getWishlistByUser(user));\r\n }", "public boolean removeProductFromWishlist(String productId) {\n\t\t// TODO Auto-generated method stub\n\t\tboolean result=false;\n\t\tif(WishlistDaoImpl.wlist.get(productId) != null)\n\t\t{\n\t\t\n\t\t\tresult=WishlistDaoImplObj.removeProductFromWishlist(productId);\n\t\t\treturn result;\n\t\t}\n\t\telse\n\t\t{ \n\t\t\tint x=3;\n\t\t\tint y=0;\n\t\t\tint z=x/y;\n\t\t\treturn false;\n\t\t\n\t\t\t//throw new WishListException(\"Product ID not found in Wishlist to REMOVE\");\n\t\t}\n\t\n}", "private void removeAllWeightBasedProduct(Product product){\n total-= cartItems.get(product.name).cost();\n noOfItems--;\n cartItems.remove(product.name);\n }", "public static void removeProduct(Scanner input) {\n\n\t\tif (basket.isEmpty()) {\n\t\t\tSystem.out.println(\"No products in you basket yet.\");\n\t\t\treturn;\n\t\t} else {\n\n\t\t\tSystem.out.println(\"In your basket you have:\");\n\n\t\t\tshowBasket();\n\n\t\t\tSystem.out.println(\"Enter the ID of the product you don't want.\");\n\n\t\t\tint productId = productValidation(input, basket);\n\n\t\t\tint productQuantity = 0;\n\n\t\t\tif (basket.get(productId).getQuantity() > 1) {\n\n\t\t\t\tSystem.out.printf(\"You have more than one %s.%n\", basket.get(productId).getName());\n\t\t\t\tSystem.out.println(\"Press 1 to remove all or 2 to remove some.\");\n\n\t\t\t\tif (TwoOptiosValidation.check(input) == 1) {\n\t\t\t\t\tbasket.remove(productId);\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"How many would you like to remove?\");\n\t\t\t\t\tproductQuantity = quantityValidation(input, productId, basket);\n\t\t\t\t\tif (productQuantity == basket.get(productId).getQuantity()) {\n\t\t\t\t\t\tbasket.remove(productId);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbasket.get(productId).setQuantity(basket.get(productId).getQuantity() - productQuantity);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tbasket.remove(productId);\n\t\t\t}\n\n\t\t\tProductsList.cancelOrder(productId, productQuantity);\n\n\t\t\tSystem.out.println(\"Done\");\n\n\t\t}\n\n\t\tSystem.out.println();\n\n\t}", "ShoppingBasket removeProductItem(Long shoppingBasketId, Long productItemId);", "private void removeProduct() {\n\t\tif (!CartController.getInstance().isCartEmpty()) {\n\t\t\tSystem.out.println(\"Enter Product Id - \");\n\t\t\tint productId = getValidInteger(\"Enter Product Id - \");\n\t\t\twhile (!CartController.getInstance().isProductPresentInCart(\n\t\t\t\t\tproductId)) {\n\t\t\t\tSystem.out.println(\"Enter Valid Product Id - \");\n\t\t\t\tproductId = getValidInteger(\"Enter Product Id - \");\n\t\t\t}\n\t\t\tCartController.getInstance().removeProductFromCart(productId);\n\t\t} else {\n\t\t\tDisplayOutput.getInstance().displayOutput(\n\t\t\t\t\t\"\\n-----Cart Is Empty----\\n\");\n\t\t}\n\t}", "public void removeProduct(Product item) {\n inventory.remove(item);\n }", "public void remove(int index){\n if (myBasket.size() == 0)\n System.out.println(\"List is empty.\");\n int i = 0 ;\n boolean isFound = false;\n Product toRemove = null;\n for (Product product: myBasket.keySet())\n {\n i++;\n if (i == index && myBasket.get(product) > 0)\n {\n isFound = true;\n toRemove = product;\n break;\n\n }\n }\n if (!isFound)\n System.out.println(\"Sorry. Invalid index!\");\n\n // now , checking how many of this product is in the basket\n\n else if (myBasket.get(toRemove) > 1){\n System.out.println(\"How many of this product do you want to give back?\");\n Scanner scanner = new Scanner(System.in);\n int num = scanner.nextInt();\n if (num < myBasket.get(toRemove)) {\n totalCost -= toRemove.getPrice() * num;\n myBasket.replace(toRemove,myBasket.get(toRemove) - num);\n for (int j = 0 ; j < num ; j++)\n inventory.updateStock(toRemove , '+');\n }\n else {\n totalCost -= toRemove.getPrice() * myBasket.get(toRemove);\n myBasket.remove(toRemove);\n for (int j = 0 ; j < myBasket.get(toRemove) ; j++)\n inventory.updateStock(toRemove,'+');\n }\n System.out.println(\"Product removed.\");\n }\n\n // there is just one of this product in basket\n\n else {\n totalCost -= toRemove.getPrice();\n myBasket.remove(toRemove);\n System.out.println(\"Product removed.\");\n inventory.updateStock(toRemove , '+');\n }\n }", "public boolean removeProduct(String p){\n\t\tif(containsProduct(p)){\n\t\t\tfor (int i = 0; i < this.list.size(); i++){\n\t\t\t\tfor (int j = 0; j < list.get(i).getWishlist().size(); j++) {\n\t\t\t\t\tif( p.equals(list.get(i).getWishlist().get(j)) ){\n\t\t\t\t\t\tlist.get(i).getWishlist().remove(j);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "void removeProduct(int position) throws ProductNotFoundException;", "public void deletesingleWishlist(ProductDetail productDetail) {\n SQLiteDatabase db = helper.getWritableDatabase();\n db.delete(DatabaseConstant.TABLE_NAME_WISHLIST, DatabaseConstant.TABLE_WISHLIST_ID + \" = ?\",\n new String[]{String.valueOf(productDetail.getId())});\n db.close();\n }", "public void RemoveproductCartSaucedemo() {\n\t\t\t\t\tdriver.findElement(RemoveProduct).click();\n\t\t\n\t\t\t\t}", "public void removeItem(Product p) throws IOException {\n for(Product l: this.cartContents)\n System.out.println(l.getProductName());\n this.cartContents.remove(p);\n this.saveCart();\n }", "public void removeProduct(SiteProduct product) {\n dataProvider.delete(product);\n }", "private void removeProduct(int id)\n {\n manager.removeProduct(id);\n }", "public void unlinkProduct() {\n Product result;\n String supplierID = getToken(\"Enter supplier ID: \");\n if (warehouse.searchSupplier(supplierID) == null) {\n System.out.println(\"No such supplier!\");\n return;\n }\n do {\n String productID = getToken(\"Enter product ID: \");\n result = warehouse.unlinkProduct(supplierID, productID);\n if (result != null) {\n System.out.println(\"Product [\" + productID + \"] unassigned from supplier: [\" + supplierID + \"]\");\n }\n else {\n System.out.println(\"Product could not be unassigned\");\n }\n if (!yesOrNo(\"unassign more products from supplier: [\"+ supplierID + \"]\")) {\n break;\n }\n } while (true);\n }", "public void removeTopProductFromCart() {\n\t\tWebElement result=null;\n\t\tString xpath=buildXPathToRemove(1);\n\t\tresult = selenium.findElement(By.xpath(xpath));\n\t\tresult.click();\n\t}", "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}", "public void removeProduct(int id)\n {\n Product product = findProduct(id);\n \n System.out.println(\"Removing product \" + product.getName() +\n \" from the stock list\");\n \n if(product != null)\n {\n stock.remove(product);\n }\n }", "public void removeItem(Product p) throws ProductNotFoundException {\n\t\tif (!_items.remove(p)) {\n\t\t\tthrow new ProductNotFoundException(\"No existeix producte\");\n\t\t}\n\t}", "@Test\r\n\tpublic void test_9and10_DeleteItemFromWishList() throws Exception {\n\t\tdriver.findElement(By.name(\"submit.deleteItem\")).click();\r\n\t\tThread.sleep(3000);\r\n\t\t\r\n\t\t// check whether the item exists on g-items removed class\r\n\t\tboolean itemExists = false;\r\n\t\t\r\n\t\t// create an array of product titles under g-item-sortable removed\r\n\t\t// get the product title in this list and compare it with selected item\r\n\t\tList<WebElement> productTitles = driver.findElements(By.xpath(\"//div[@id='g-items']//div[@class = 'a-section a-spacing-none g-item-sortable g-item-sortable-removed']/div/div[1]\"));\r\n\t\tfor(WebElement productTitle : productTitles) {\r\n\t\t\t// compare selected item and any item in wish list\r\n\t\t\t// try to find selected item in the list of removed items\r\n\t\t\tString listedItem = productTitle.getText();\r\n\t\t\tif (listedItem.equals(selectedItem)) {\r\n\t\t\t\titemExists = true;\r\n\t\t\t\tSystem.out.println(selectedItem + \" is deleted from wish list\");\r\n\t\t\t\tAssert.assertTrue(itemExists);\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void removeProduct(ProductBarcode code) throws NoSuchElementException;", "@Override\r\n\tpublic void deleteWishList(int wishNo) throws Exception {\n\r\n\t}", "public void deleteBasketItem(String sku) { \n Iterator<BasketItem> iter = basketItems.iterator();\n \n while(iter.hasNext()) {\n BasketItem basketItem = (BasketItem) iter.next();\n if(basketItem.getVariant().getSku().equals(sku)) {\n iter.remove();\n }\n }\n }", "@Override\r\n\tpublic int deleteProduct(Product product) {\n\t\treturn 0;\r\n\t}", "@Override\r\n public void removeProduct(ProductBarcode code) throws NoSuchElementException\r\n {\r\n \tif (products.contains(code))\r\n {\r\n products.remove(code);\r\n }\r\n else\r\n {\r\n throw new NoSuchElementException(\"Product not in this container!\");\r\n }\r\n }", "@Test\r\n\tpublic void remove_items() {\r\n//Go to http://www.automationpractice.com\r\n//Mouse hover on product one\r\n//Click 'Add to Cart'\r\n//Click 'Continue shopping' button\r\n//Verify Cart has text '1 Product'\r\n//Mouse hover over 'Cart 1 product' button\r\n//Verify product listed\r\n//Now mouse hover on another product\r\n//click 'Add to cart' button\r\n//Click on Porceed to checkout\r\n//Mouse hover over 'Cart 2 product' button\r\n//Verify 2 product listed now\r\n//click 'X'button for first product\r\n//Verify 1 product deleted and other remain\r\n\r\n\t}", "public void deleteProduct(Product product) {\n allProducts.remove(product);\n }", "public void removeAllVariantBasedProduct(Product product){\n /*\n Using for loop because we want to delete all the variants of that particular product\n */\n for(Variant variant : product.variants){\n String key = product.name + \" \" + variant.name;\n if(cartItems.containsKey(key)){\n total-= cartItems.get(key).cost();\n noOfItems--;\n cartItems.remove(key);\n }\n }\n }", "public void Deleteproduct(Product objproduct) {\n\t\t\n\t}", "public synchronized void deleteItem(Product product){\n carrito.set(product.getId(), null);\n }", "public void delete(Product product) {\n\t\tif (playerMap.containsKey(product.getOwner())) {\n\t\t\tplayerMap.get(product.getOwner())[product.getSlot()] = null;\n\t\t}\n\t\tMap<Integer, Set<Product>> itemMap = typeMap.get(product.getType()).get(product.getState());\n\t\tif (itemMap.containsKey(product.getItemId())) {\n\t\t\titemMap.get(product.getItemId()).remove(product);\n\t\t}\n\t}", "public boolean removeProduct(Product p) {\n\tsynchronized (this.productList) {\n\t boolean returned = this.productList.remove(p);\n\t this.setChanged();\n\t this.notifyObservers();\n\t return returned;\n\t}\n }", "public int removeProduct(String product) {\n Collection<String> collection = shoppingBasket.keySet();\n\n for (String key : collection) {\n if (key != null) {\n if (product.equals(key) == true) {\n // нашли наше значение равное ключу\n shoppingBasket.remove(product);\n return 1;\n } else {\n return 0;\n }\n }\n }\n return 0;\n }", "private static void removeItemFromCart() {\r\n\t\tString itemName = getValidItemNameInput(scanner);\r\n\t\tfor (Iterator<Map.Entry<Product, Integer>> it = cart.getCartProductsEntries().iterator(); it.hasNext();){\r\n\t\t Map.Entry<Product, Integer> item = it.next();\r\n\t\t if( item.getKey().getName().equals(itemName) ) {\r\n\t\t\t it.remove();\r\n\t\t }\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Item removed from the cart successfully\");\r\n\t\tSystem.out.println();\r\n\t}", "@Override\n\tpublic void deleteProduct(int product_id) {\n\n\t}", "public void deleteProduct(Product product)\n {\n SQLiteDatabase db = this.database.getWritableDatabase();\n\n // Sets up the WHERE condition of the SQL statement\n String condition = String.format(\" %s = ?\", ShoppingListTable.KEY_TPNB);\n\n // Stores the values of the WHERE condition\n String[] conditionArgs = { String.valueOf(product.getTPNB()) };\n\n db.delete(ShoppingListTable.TABLE_NAME, condition, conditionArgs);\n }", "public void removeItem() {\r\n\t\tlog.info(\"Remove item\");\r\n\t\tsu.waitElementClickableAndClick(LocatorType.Xpath, CartSplitViewField.Remove.getName());\r\n\t}", "public void deleteProduct(Product product) throws BackendException;", "public void removeOrderItem(int prodID)\r\n\t{\r\n\t\t//create temporary variables\r\n\t\tOrderItem temp;\r\n\t\tint test = 0;\r\n\r\n\t\t//iterate through list and compare product ID of each item against the \r\n\t\t//parameter, then remove any items that match\r\n\t\tfor (int x = 0; x < orderItemList.size(); x++) \r\n\t\t{\r\n\t\t\ttemp = orderItemList.get(x);\r\n\t\t\ttest = temp.getProductID();\r\n\t\t\tif (test == prodID) \r\n\t\t\t{\r\n\t\t\t\torderItemList.remove(x);\r\n\t\t\t} //end if\r\n\t\t} //end for\t\t\r\n\t}", "void removeList(ShoppingList _ShoppingList);", "public void deleteProduct(Product product_1) {\n\r\n\t}", "void deleteProduct(Integer productId);", "public void deleteWishlistItem(WishlistItem wishItem){\n fStore.collection(\"user_profiles\").document(fUser.getUid()).collection(\"wishlist\").document(wishItem.getWishID()).delete().addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n return;\n }\n });\n }", "public boolean removeAndCheck(String product) {\n\t\tif(this.product.contains(product)) {\n\t\t\tthis.product.remove(product);\n\t\t\tif(!this.product.isEmpty()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"This item is not in the cart.\");\n\t\t\treturn false;\n\t\t}\n\t\t//TODO Create a new method that will check for it.\n\t}", "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 removeByProductType(String productType);", "public void removeItem(Word w)\r\n {\n currentDB.deleteWord(w);\r\n finish();\r\n startActivity(getIntent());\r\n Toast.makeText(getApplicationContext(), getResources().getString(R.string.str_removed_word)+\": \"+w.strNative, Toast.LENGTH_SHORT).show();\r\n }", "public boolean removeProduct(int productToRemove_id) \n\t{\n\t\treturn false;\n\t}", "void deleteProduct(Long id);", "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}", "void removePizza(Pizza p) {\n pizzas.remove(p);\n }", "private void removeItem(int item) {\n\t\tboolean flag = false;\r\n\t\tfor(int i=0; i<index; i++) {\r\n\t\t\tif(products[i].getTag() == item) {\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"없어진 상품:\"+products[i].toString());\r\n\t\t\t\tproducts[i] = null;\r\n\t\t\t\tindex--;\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(flag == false)\r\n\t\t\tSystem.out.println(\"해당하는 상품이 없습니다.\");\r\n\t}", "void removeCartItem(int cartItemId);", "public void eliminar(Producto producto) throws BusinessErrorHelper;", "public void removeAll(Product product){\n if(product.type == ProductType.TYPE_WB){\n removeAllWeightBasedProduct(product);\n }else{\n removeAllVariantBasedProduct(product);\n }\n }", "public void removeSoftware(Software software){\n products.remove (software);\n }", "void removeOrderItem(OrderItem target);", "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 }", "@Override\r\n\tpublic List<Product> deleteProduct(String name, List<Product> custlist) {\n\t\t{\r\n\t\t\tfor (Product x:custlist)\r\n\t\t\t{\r\n\t\t\t\tif(name.equals(x.getName()))\r\n\t\t\t\t{\r\n\t\t\t\t\tcustlist.remove(x);\r\n\t\t\t\t\t break;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn custlist;\r\n\t}\r\n\t\r\n\t}", "void deleteProduct(int productId) throws ProductException;", "public void clickRemoveButton_SPOItem(int noitemremove) {\n for (int i = 1; i <= noitemremove; i++) {\n WebElement clickremove = getDriver().findElement(By.xpath(\"//*[@id='productGroup_2']/li[\" + i + \"]//a[text()='Remove']\"));\n String nameofproduct = getDriver().findElement(By.xpath(\"//*[@id='productGroup_2']/li[\" + i + \"]//*[@class='product_name']/span\")).getText();\n clickremove.click();\n System.out.println(\"=== Name of the product Removed: \" + nameofproduct);\n listOfDeletedItemNameShoppingCart.add(nameofproduct);\n }\n }", "public void eliminar(Producto producto) throws IWDaoException;", "public void removeItem(Carryable g) {\r\n for (int i=0; i<numItems; i++) {\r\n if (cart[i] == g) {\r\n cart[i] = cart[numItems - 1];\r\n numItems -= 1;\r\n return;\r\n }\r\n }\r\n }", "public SimpleProductWithSpecialPriceDetailPage removeProductGalleryFromSimpleProducttWithSpecialPrice() {\n SpriiTestFramework.getInstance().waitForElement(By.xpath(firstImageElement), 20);\n Actions actions = new Actions(driver);\n WebElement target = driver.findElement(By.xpath(firstImageElement));\n actions.moveToElement(target).perform();\n SpriiTestFramework.getInstance().waitForElement(By.xpath(removeElement), 20);\n driver.findElement(By.xpath(removeElement)).click();\n return new SimpleProductWithSpecialPriceDetailPage();\n }", "private void removeProducto(int position) {\n losproductos.remove(position);\n // Notificamos de un item borrado en nuestro array\n eladaptador.notifyItemRemoved(position);\n }", "public void deleteProduct(CartProduct p) {\n\t\tcart.deleteFromCart(p);\n\t}", "public String removeItem() {\n userFacade.printUsersCart(user);\n System.out.println(\"Item to be removed....\" + selectedItem.getName());\n //user.getCart().remove(selectedItem);\n userFacade.removeFromCart(user, selectedItem);\n System.out.println(\"Item to be removed....\" + selectedItem.getName());\n userFacade.printUsersCart(user);\n return \"\";\n }", "void remove(String installedAppId);", "@Override\n\tpublic void remove(Long id) {\n\t\tproductRepository.delete(id);\n\t}", "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 }", "public void removeLine(Product product) {\n\t\tgetCartLineList().removeIf(l -> l.getProduct().getId().equals(product.getId()));\n\t}", "@Override\r\n\t\t\t\t\t\t\tpublic void handle(ActionEvent arg0) {\n\t\t\t\t\t\t\t\troot.getChildren().remove(product);\r\n\t\t\t\t\t\t\t}", "@Override\n\tpublic int deleteProduct(String productNo) {\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic void sellItem(AbstractItemAPI item) {\n\t\titems.remove(item);\r\n\t\t\r\n\t}", "public ConfigProductWithSpecialPriceDetailPage removeProductGalleryFromConfigProductWithSpecialPrice() {\n SpriiTestFramework.getInstance().waitForElement(By.xpath(firstImageElement), 20);\n Actions actions = new Actions(driver);\n WebElement target = driver.findElement(By.xpath(firstImageElement));\n actions.moveToElement(target).perform();\n SpriiTestFramework.getInstance().waitForElement(By.xpath(removeElement), 20);\n driver.findElement(By.xpath(removeElement)).click();\n return new ConfigProductWithSpecialPriceDetailPage();\n }", "@Override\n\tpublic void removeItem(Session session){\n\t\ttry{\n\t\t\tSystem.out.print(\"*--------------Remove Items here--------------*\\n\");\n\t\t\t//scanner class allows the admin to enter his/her input\n\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\t//read input item id\n\t\t\tSystem.out.print(\"Enter Item Id to delete the item: \");\n\t\t\tint itemId = scanner.nextInt();\n\n\t\t\t//pass these input items to client controller\n\t\t\tsamp=mvc.removeItem(session,itemId);\n\t\t\tSystem.out.println(samp);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App- Remove Items Exception: \" +e.getMessage());\n\t\t}\n\t}", "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 deleteWish(long wish_id) {\n SQLiteDatabase db = this.getWritableDatabase();\n db.delete(TABLE_WISH, KEY_ID + \" = ?\",\n new String[] { String.valueOf(wish_id) });\n }", "Boolean remover(String userName, Long idProducto);", "public void removeOrder(){\n foods.clear();\n price = 0;\n }", "private void removeProdutos() {\n Collection<IProduto> prods = this.controller.getProdutos();\n for(IProduto p : prods) System.out.println(\" -> \" + p.getCodigo() + \" \" + p.getNome());\n System.out.println(\"Insira o codigo do produto que pretende remover da lista de produtos?\");\n String codigo = Input.lerString();\n // Aqui devia se verificar se o produto existe mas nao sei fazer isso.\n this.controller.removeProdutoControl(codigo);\n }", "public SimpleProduct3WithSpecialPriceDetailPage removeProductGalleryFromSimpleProduct3tWithSpecialPrice() {\n SpriiTestFramework.getInstance().waitForElement(By.xpath(firstImageElement), 20);\n Actions actions = new Actions(driver);\n WebElement target = driver.findElement(By.xpath(firstImageElement));\n actions.moveToElement(target).perform();\n SpriiTestFramework.getInstance().waitForElement(By.xpath(removeElement), 20);\n driver.findElement(By.xpath(removeElement)).click();\n return new SimpleProduct3WithSpecialPriceDetailPage();\n }", "@Override\r\n public boolean removeProductQuantity(Product product, int quantity) {\r\n int stock;\r\n int i = 0;\r\n for (Product p : this.productList) {\r\n if (p.getId() == product.getId()) {\r\n stock = this.productQuantity.get(i);\r\n\r\n //checks if quantity value is invalid or if not enough stocks\r\n if (quantity <= 0 || stock < quantity) {\r\n this.productQuantity.set(i, 0);\r\n return true;\r\n }\r\n this.productQuantity.set(i, stock - quantity);\r\n return true;\r\n }\r\n i++;\r\n }\r\n return false;\r\n }", "public static void deleteProducts(final Context context) {\n log.info(\"Productos Eliminados\");\n inicializaPreferencias(context);\n sharedPreferencesEdit.remove(Constantes.PRODUCTOS);\n sharedPreferencesEdit.commit();\n }", "@SuppressWarnings(\"unused\")\n\tpublic void removeFromShoppingCart(BarcodedItem item, int quantity) {\n\t\t\n\t\tBarcodedProduct prod = ProductDatabases.BARCODED_PRODUCT_DATABASE.get(item.getBarcode());\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tfor (int j = 0; j < SHOPPING_CART_ARRAY.length; j++) {\n\t\t\t\tif (prod.getDescription().equals(SHOPPING_CART_ARRAY[j][0]) && \n\t\t\t\t\t\tInteger.toString(quantity).equals(SHOPPING_CART_ARRAY[j][1])) {\n\t\t\t\t\tSHOPPING_CART_ARRAY[j][0] = null;\n\t\t\t\t\tSHOPPING_CART_ARRAY[j][1] = null;\n\t\t\t\t\ttotalNumOfItems = totalNumOfItems - quantity;\n\t\t\t\t\tdecreaseTotalPayment(item, quantity);\n\t\t\t\t\tBARCODE_ARRAY[j] = null;\n\t\t\t\t\tBARCODEDITEM_ARRAY[j] = null;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} \n\t\t} catch (NullPointerException e) {\n\t\t\tthrow new SimulationException(e);\n\t\t}\n\n\n\t}", "void delete(Product product) throws IllegalArgumentException;", "private JButton createButtonRemoveProduct() {\n\n this.buttonRemoveProduct = new JButton(\"Remove product\");\n this.buttonRemoveProduct.setEnabled(false);\n\n this.buttonRemoveProduct.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n\n try {\n int index = jListProduct.getSelectedIndex();\n boolean removedProduct = removeProduct(index);\n if (removedProduct) {\n buttonRemoveProduct.setEnabled(false);\n JOptionPane.showMessageDialog(rootPane,\n \"Product removed sucessfully.!\",\n \"Product removal\",\n JOptionPane.INFORMATION_MESSAGE);\n }\n\n } catch (IllegalArgumentException ex) {\n\n JOptionPane.showMessageDialog(DemonstrationApplication.this,\n ex.getMessage(),\n \"Erro a remover produto\",\n JOptionPane.WARNING_MESSAGE);\n }\n }\n });\n\n return this.buttonRemoveProduct;\n }", "void deleteProduct(Product product) throws ServiceException;", "public void removeItem(Item theItem) {\n\t\tinventory.remove(theItem);\t\n\t}", "public void remove(TradeItem newItem) {\n items.remove(newItem);\n }", "public void clickDeleteProductandApply()throws Exception{\r\n SearchPageFactory pageFactory = new SearchPageFactory(driver);\r\n clickElement(pageFactory.wishListItemDeleteButton,Constant.explicitTime);\r\n clickElement(pageFactory.wishListItemDeleteOkButton,Constant.explicitTime);\r\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 }", "private void remove(GroceryItem itemObj, String itemName, double itemPrice) {\n\t\tif (!bag.remove(itemObj)) {\n\t\t\tSystem.out.println(\"Unable to remove, this item is not in the bag.\");\n\t\t} else {\n\t\t\tSystem.out.println(itemName + \" \" + itemPrice + \" removed.\");\n\t\t}\n\t}", "protected abstract void removeItem();", "public void removeItem(int id);", "public boolean removeProduct(int warehouseNumber, String productToRemove) {\n boolean removedProduct = false;\n if (findProduct(warehouseNumber, productToRemove)) {\n ArrayList<Product> warehouseProducts = getProducts(warehouseNumber);\n //System.out.println(\"REMOVING: \" + getProduct(warehouseNumber, productToRemove).getName());\n warehouseProducts.remove(getProduct(warehouseNumber, productToRemove));\n //System.out.println(\"WAREHOUSE AFTER REMOVING: \" + warehouseProducts);\n db.update_warehouse(warehouseNumber, warehouseProducts);\n removedProduct = true;\n }\n return removedProduct;\n }", "public void removeFromCart(final Item item) {\n for (Item f : cart) {\n if (f.getName().equals(item.getName())) {\n if (\n f.getQuantity() == item.getQuantity()) {\n cart.remove(f);\n return;\n }\n f.setQuantity(f.getQuantity() - item.getQuantity());\n return;\n }\n }\n }", "@Override\n public void removeFromCart(Publication book) {\n if(shoppingCart.contains(book)){\n shoppingCart.remove(book);\n } else throw new NoSuchPublicationException();\n }" ]
[ "0.7854557", "0.7781033", "0.7559853", "0.7166714", "0.70788425", "0.69765097", "0.6958109", "0.6921097", "0.6911045", "0.6834603", "0.6821955", "0.681741", "0.6785931", "0.6726021", "0.6723925", "0.6698523", "0.6694231", "0.66266346", "0.6553828", "0.6538818", "0.64892226", "0.6481504", "0.645724", "0.6449181", "0.6427758", "0.63808584", "0.63416415", "0.63247365", "0.6315725", "0.6294542", "0.6291954", "0.62465554", "0.62299067", "0.62248784", "0.62204516", "0.62148184", "0.6214266", "0.62142384", "0.61987615", "0.6166486", "0.61611813", "0.6131247", "0.61230654", "0.61040586", "0.6085956", "0.6075666", "0.60721326", "0.60217303", "0.6015206", "0.6008704", "0.60022885", "0.5982934", "0.59793174", "0.59768564", "0.5976127", "0.5975341", "0.59526473", "0.59505266", "0.59443104", "0.59413975", "0.5932671", "0.5924532", "0.5922726", "0.5915803", "0.5905822", "0.5903351", "0.58903813", "0.5889318", "0.58861244", "0.5883907", "0.58836114", "0.5881923", "0.58792716", "0.58763415", "0.58622915", "0.58609575", "0.58547306", "0.5853652", "0.58488584", "0.5847794", "0.58341146", "0.5824281", "0.5823759", "0.5823459", "0.5814825", "0.58134115", "0.58097553", "0.580964", "0.5806153", "0.5800707", "0.57958335", "0.57955515", "0.5790771", "0.57884294", "0.5774232", "0.5770533", "0.5754928", "0.575448", "0.5744327", "0.57421297" ]
0.73369396
3
Driver a bit forward to help the pulley get on zipline
public void traverseZipline(){ this.driver.setForwardSpeed(150); this.driver.forward(); // Note: rotations are negative because motor is built the wrong way // Rotate slowly for the first third of the rotations this.pulleyMotor.setSpeed(80); this.pulleyMotor.rotate(-2160); // Rotate quicker for the second third of the rotations this.pulleyMotor.setSpeed(120); this.pulleyMotor.rotate(-2160); // Rotate slowly for the last third of the rotations this.pulleyMotor.setSpeed(80); this.pulleyMotor.rotate(-2160); // Move a bit forward to move away from zipline this.driver.forward(2,false); this.driver.setForwardSpeed(120); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int processShipment(AascShipmentOrderInfo aascShipmentOrderInfo, \n AascShipMethodInfo aascShipMethodInfo, \n AascIntlInfo aascIntlInfo, \n AascProfileOptionsBean aascProfileOptionsInfo, \n String fedExCarrierMode, String fedExKey, \n String fedExPassword, \n String cloudLabelPath) { \n logger.info(\"Entered processShipment()\" + fedExCarrierMode);\n String intFlag = \"\";\n if (returnShipment.equalsIgnoreCase(\"PRINTRETURNLABEL\")) {\n fedExWSChkReturnlabelstr = \"PRINTRETURNLABEL\";\n } else {\n fedExWSChkReturnlabelstr = \"NONRETURN\";\n }\n\n\n this.fedExCarrierMode = fedExCarrierMode;\n this.fedExKey = fedExKey;\n this.fedExPassword = fedExPassword;\n\n try {\n \n outputFile = cloudLabelPath;\n try {\n intFlag = aascShipmentHeaderInfo.getInternationalFlag();\n } catch (Exception e) {\n intFlag = \"\";\n }\n\n shipmentRequest = \"\"; // String that holds shipmentRequest \n aascShipmentHeaderInfo = \n aascShipmentOrderInfo.getShipmentHeaderInfo(); // returns header info bean object\n shipPackageInfo = \n aascShipmentOrderInfo.getShipmentPackageInfo(); // returns the linkedlist contains the package info bean objects \n\n int size = shipPackageInfo.size();\n\n Iterator packageIterator = shipPackageInfo.iterator();\n\n while (packageIterator.hasNext()) {\n AascShipmentPackageInfo shipPackageInfo = \n (AascShipmentPackageInfo)packageIterator.next();\n if (\"PRINTRETURNLABEL\".equalsIgnoreCase(shipPackageInfo.getReturnShipment())) {\n size++;\n }\n\n if (\"Y\".equalsIgnoreCase(shipPackageInfo.getHazMatFlag())) {\n size++;\n }\n }\n\n\n calendar = Calendar.getInstance();\n time = calendar.get(Calendar.HOUR_OF_DAY) + \":\" + calendar.get(Calendar.MINUTE) + \":\" + calendar.get(Calendar.SECOND);\n currentDate = new Date(stf.parse(time).getTime());\n shipFlag = aascShipmentHeaderInfo.getShipFlag();\n time = stf.format(currentDate);\n \n Timestamp time1 = aascShipmentHeaderInfo.getShipTimeStamp();\n logger.info(\"TimeStamp =========> ::\" + time1);\n\n String timeStr = time1.toString();\n\n timeStr = timeStr.substring(11, timeStr.length() - 2);\n fedExWsTimeStr = nullStrToSpc(timeStr);\n \n\n //fedExWsTimeStr = \"00:00:00\";\n\n\n orderNumber = \n aascShipmentOrderInfo.getShipmentHeaderInfo().getOrderNumber();\n\n customerTransactionIdentifier = \n aascShipmentOrderInfo.getShipmentHeaderInfo().getOrderNumber();\n\n ListIterator packageInfoIterator = shipPackageInfo.listIterator();\n if (aascShipmentOrderInfo != null && \n aascShipmentHeaderInfo != null && shipPackageInfo != null && \n aascShipMethodInfo != null) {\n carrierId = aascShipmentHeaderInfo.getCarrierId();\n\n if (carrierPayMethodCode.equalsIgnoreCase(\"PP\")) {\n\n senderAccountNumber = \n nullStrToSpc(aascShipmentHeaderInfo.getCarrierAccountNumber()); // FedEx Account number for prepaid from shipment page\n \n if (senderAccountNumber.length() < 9 || \n senderAccountNumber.length() > 12) {\n aascShipmentHeaderInfo.setMainError(\"shipper's account number should not be less than 9 digits and greater than 12 digits \");\n responseStatus = 151;\n return responseStatus;\n }\n } else {\n senderAccountNumber = \n nullStrToSpc(aascShipMethodInfo.getCarrierAccountNumber(carrierId));\n \n\n \n\n if (senderAccountNumber.length() < 9 || \n senderAccountNumber.length() > 12) {\n aascShipmentHeaderInfo.setMainError(\"shipper's account number should not be less than 9 digits and greater than 12 digits \");\n responseStatus = 151;\n return responseStatus;\n }\n\n }\n\n\n fedExTestMeterNumber = \n nullStrToSpc(aascShipMethodInfo.getMeterNumber(carrierId));\n \n shipToCompanyName = \n nullStrToSpc(aascShipmentHeaderInfo.getCustomerName()); // retreiving ship to company name from header bean \n \n shipToCompanyName = encode(shipToCompanyName);\n\n shipToAddressLine1 = \n nullStrToSpc(aascShipmentHeaderInfo.getAddress()); // retreiving ship to address from header bean \n shipToAddressLine1 = \n encode(shipToAddressLine1); //added by Jagadish\n shipToAddressCity = \n nullStrToSpc(aascShipmentHeaderInfo.getCity()); // retreiving ship to city from header bean \n shipToAddressPostalCode = \n nullStrToSpc(nullStrToSpc(aascShipmentHeaderInfo.getPostalCode())); // retreiving ship to postal code from header bean \n\n shipToAddressPostalCode = escape(shipToAddressPostalCode);\n\n shipToCountry = \n nullStrToSpc(aascShipmentHeaderInfo.getCountrySymbol()).toUpperCase(); // retreiving ship to country name from header bean \n \n shipToEMailAddress = nullStrToSpc(aascShipmentHeaderInfo.getShipToEmailId());\n \n shipToAddressState = \n nullStrToSpc(aascShipmentHeaderInfo.getState()).toUpperCase(); // retreiving ship to state from header bean \n \n residentialAddrFlag = aascShipmentHeaderInfo.getResidentialFlag(); \n \n shipDate = \n aascShipmentHeaderInfo.getShipmentDate(); // retreiving ship date from header bean \n shipFromAddressLine1 = \n nullStrToSpc(aascShipmentHeaderInfo.getShipFromAddressLine1()); // indicates ship From address \n shipFromAddressLine1 = \n encode(shipFromAddressLine1); //added by Jagadish\n shipFromAddressLine2 = \n nullStrToSpc(aascShipmentHeaderInfo.getShipFromAddressLine2()); // indicates ship From address \n shipFromAddressLine2 = \n encode(shipFromAddressLine2); //added by Jagadish \n shipFromAddressCity = \n aascShipmentHeaderInfo.getShipFromCity(); // indicates ship From address city \n shipFromAddressPostalCode = \n nullStrToSpc(aascShipmentHeaderInfo.getShipFromPostalCode()); // indicates ship From postal code \n shipFromPersonName = \n aascShipmentHeaderInfo.getShipFromContactName();\n // System.out.println(\":::::::::::::::::::::::::::::::::::::: shipFromPersonName :::::::::::::::::::::: -- > in Fedex shipment \"+shipFromPersonName);\n shipFromAddressPostalCode = escape(shipFromAddressPostalCode);\n\n shipFromCountry = \n aascShipmentHeaderInfo.getShipFromCountry().toUpperCase(); // indicates ship From country \n shipFromAddressState = \n aascShipmentHeaderInfo.getShipFromState().toUpperCase();\n shipFromDepartment = \n nullStrToSpc(aascShipmentHeaderInfo.getDepartment()); // Retrieving the shipfrom department \n shipFromDepartment = encode(shipFromDepartment);\n shipMethodName = \n nullStrToSpc(aascShipmentHeaderInfo.getShipMethodMeaning()); // retreiving ship method meaning from header bean \n carrierCode = \n aascShipMethodInfo.getCarrierName(shipMethodName); // retreiving carrier code from ship method bean \n\n reference1 = \n nullStrToSpc(aascShipmentHeaderInfo.getReference1());\n reference1 = encode(reference1);\n reference2 = \n nullStrToSpc(aascShipmentHeaderInfo.getReference2());\n reference2 = encode(reference2);\n \n receipientPartyName = encode(aascShipmentHeaderInfo.getRecCompanyName());\n recipientPostalCode= encode(aascShipmentHeaderInfo.getRecPostalCode());\n //Mahesh added below code for Third Party development \n tpCompanyName = encode(aascShipmentHeaderInfo.getTpCompanyName());\n tpAddress= encode(aascShipmentHeaderInfo.getTpAddress());\n tpCity= encode(aascShipmentHeaderInfo.getTpCity());\n tpState= encode(aascShipmentHeaderInfo.getTpState());\n tpPostalCode= encode(aascShipmentHeaderInfo.getTpPostalCode());\n tpCountrySymbol= encode(aascShipmentHeaderInfo.getTpCountrySymbol());\n \n // khaja added code \n satShipFlag = \n nullStrToSpc(aascShipmentHeaderInfo.getSaturdayShipFlag()); // retreiving saturday ship flag from header bean \n //System.out.println(\"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ satShipFlag :\"+satShipFlag);\n // khaja added code end\n size = shipPackageInfo.size();\n\n while (packageInfoIterator.hasNext()) {\n AascShipmentPackageInfo aascPackageBean = \n (AascShipmentPackageInfo)packageInfoIterator.next();\n\n pkgWtUom = nullStrToSpc(aascPackageBean.getUom());\n if (pkgWtUom.equalsIgnoreCase(\"LB\") || \n pkgWtUom.equalsIgnoreCase(\"KG\")) {\n pkgWtUom = (pkgWtUom + \"S\").toUpperCase();\n }\n pkgWtVal = aascPackageBean.getWeight();\n //pkgWtVal BY MADHAVI\n\n DecimalFormat fmt = new DecimalFormat();\n fmt.setMaximumFractionDigits(1);\n String str = fmt.format(pkgWtVal);\n if (carrierCode.equalsIgnoreCase(\"FDXG\")) {\n pkgWtVal = Float.parseFloat(str);\n \n } else {\n \n }\n\n dimensions = nullStrToSpc(aascPackageBean.getDimension());\n units = nullStrToSpc(aascPackageBean.getDimensionUnits());\n\n\n if (dimensions != null && !dimensions.equals(\"\")) {\n\n index = dimensions.indexOf(\"*\");\n if (index != -1) {\n length = dimensions.substring(0, index);\n }\n dimensions = dimensions.substring(index + 1);\n index = dimensions.indexOf(\"*\");\n if (index != -1) {\n width = dimensions.substring(0, index);\n }\n dimensions = dimensions.substring(index + 1);\n height = dimensions;\n \n }\n // Email Notification details\n emailFlag = aascShipmentHeaderInfo.getEmailNotificationFlag();\n SenderEmail = aascShipmentHeaderInfo.getShipFromEmailId();\n ShipAlertNotification = aascShipmentHeaderInfo.getShipNotificationFlag();\n ExceptionNotification = aascShipmentHeaderInfo.getExceptionNotification();\n DeliveryNotification = aascShipmentHeaderInfo.getDeliveryNotification();\n Format = aascShipmentHeaderInfo.getFormatType();\n recipientEmailAddress1 = aascShipmentHeaderInfo.getShipToEmailId();\n if(aascShipmentHeaderInfo.getEmailCustomerName().equalsIgnoreCase(\"Y\")){\n message = \"/ Customer : \"+nullStrToSpc(encode(aascShipmentHeaderInfo.getCustomerName()));\n }\n \n if (aascShipmentHeaderInfo.getReference1Flag().equalsIgnoreCase(\"Y\")) {\n message = message + \"/ Ref 1: \"+nullStrToSpc(aascShipmentHeaderInfo.getReference1());\n }\n \n if (aascShipmentHeaderInfo.getReference2Flag().equalsIgnoreCase(\"Y\")) {\n message = message + \"/ Ref 2:\" + nullStrToSpc(aascShipmentHeaderInfo.getReference2());\n }\n \n // Email Notification details\n\n codFlag = nullStrToSpc(aascPackageBean.getCodFlag());\n\n if (codFlag.equalsIgnoreCase(\"Y\")) {\n \n codAmt = aascPackageBean.getCodAmt();\n \n codAmtStr = String.valueOf(codAmt);\n\n int index = codAmtStr.indexOf(\".\");\n\n \n\n if (index < 1) {\n codAmtStr = codAmtStr + \".00\";\n \n } else if ((codAmtStr.length() - index) > 2) {\n codAmtStr = codAmtStr.substring(0, index + 3);\n \n } else {\n while (codAmtStr.length() != (index + 3)) {\n codAmtStr = codAmtStr + \"0\";\n \n }\n }\n codTag = \n \"<COD>\" + \"<CollectionAmount>\" + codAmtStr + \"</CollectionAmount>\" + \n \"<CollectionType>ANY</CollectionType>\" + \n \"</COD>\";\n } else {\n \n codTag = \"\";\n }\n\n halPhone = aascPackageBean.getHalPhone();\n halCity = aascPackageBean.getHalCity();\n halState = aascPackageBean.getHalStateOrProvince();\n halLine1 = aascPackageBean.getHalLine1();\n halLine2 = aascPackageBean.getHalLine2();\n halZip = aascPackageBean.getHalPostalCode();\n halFlag = aascPackageBean.getHalFlag();\n\n dryIceUnits = aascPackageBean.getDryIceUnits();\n chDryIce = aascPackageBean.getDryIceChk();\n dryIceWeight = aascPackageBean.getDryIceWeight();\n \n logger.info(\"DryIce Flag=\" + chDryIce);\n if (chDryIce.equalsIgnoreCase(\"Y\")) {\n logger.info(\"DryIce Flag is Y\");\n dryIceTag = \n \"<DryIce><WeightUnits>\" + dryIceUnits + \"</WeightUnits><Weight>\" + \n dryIceWeight + \"</Weight></DryIce>\";\n } else {\n logger.info(\"DryIce Flag is N\");\n dryIceTag = \"\";\n }\n\n\n\n String halLine2Tag = \"\";\n\n if (halLine2.equalsIgnoreCase(\"\") || halLine2 == null) {\n halLine2Tag = \"\";\n } else {\n halLine2Tag = \"<Line2>\" + halLine2 + \"</Line2>\";\n }\n\n\n if (halFlag.equalsIgnoreCase(\"Y\")) {\n \n hal = \n\"<HoldAtLocation><PhoneNumber>\" + halPhone + \"</PhoneNumber>\" + \n \"<Address><Line1>\" + halLine1 + \"</Line1>\" + halLine2Tag + \"<City>\" + \n halCity + \"</City>\" + \"<StateOrProvinceCode>\" + halState + \n \"</StateOrProvinceCode>\" + \"<PostalCode>\" + halZip + \n \"</PostalCode></Address></HoldAtLocation>\";\n\n } else {\n \n hal = \"\";\n }\n\n HazMatFlag = aascPackageBean.getHazMatFlag();\n HazMatType = aascPackageBean.getHazMatType();\n HazMatClass = aascPackageBean.getHazMatClass();\n \n\n String HazMatCertData = \"\";\n String ShippingName = \"\";\n String ShippingName1 = \"\";\n String ShippingName2 = \"\";\n String ShippingName3 = \"\";\n String Class = \"\";\n\n if (HazMatFlag.equalsIgnoreCase(\"Y\")) {\n \n if (!HazMatClass.equalsIgnoreCase(\"\")) {\n \n int classIndex = HazMatClass.indexOf(\"Class\", 1);\n if (classIndex == -1) {\n classIndex = HazMatClass.indexOf(\"CLASS\", 1);\n \n }\n \n int firstIndex = 0;\n \n\n firstIndex = HazMatClass.indexOf(\"-\");\n \n String HazMatClassStr = \n HazMatClass.substring(0, firstIndex);\n \n if (classIndex == -1) {\n \n ShippingName = \"\";\n \n \n try {\n Class = \n trim(HazMatClassStr.substring(HazMatClassStr.indexOf(\" \"), \n HazMatClassStr.length()));\n } catch (Exception e) {\n Class = \"\";\n firstIndex = -1;\n }\n\n } else {\n \n ShippingName = \n HazMatClass.substring(0, classIndex - \n 1);\n \n Class = \n trim(HazMatClassStr.substring(HazMatClassStr.lastIndexOf(\" \"), \n HazMatClassStr.length()));\n }\n \n if (HazMatClass.length() > firstIndex + 1 + 100) {\n ShippingName1 = \n HazMatClass.substring(firstIndex + 1, \n firstIndex + 1 + \n 50);\n ShippingName2 = \n HazMatClass.substring(firstIndex + 1 + \n 50, \n firstIndex + 1 + \n 100);\n ShippingName3 = \n HazMatClass.substring(firstIndex + 1 + \n 100, \n HazMatClass.length());\n } else if (HazMatClass.length() > \n firstIndex + 1 + 50) {\n ShippingName1 = \n HazMatClass.substring(firstIndex + 1, \n firstIndex + 1 + \n 50);\n ShippingName2 = \n HazMatClass.substring(firstIndex + 1 + \n 50, \n HazMatClass.length());\n } else if (HazMatClass.length() <= \n firstIndex + 1 + 50) {\n ShippingName1 = \n HazMatClass.substring(firstIndex + 1, \n HazMatClass.length());\n }\n \n fedExWsShippingName = ShippingName;\n fedExWsShippingName1 = ShippingName1+ShippingName2+ShippingName3;\n fedExWsShippingName2 = ShippingName2;\n fedExWsShippingName3 = ShippingName3;\n fedExWsClass = Class;\n HazMatCertData = \n \"<HazMatCertificateData>\" + \"<DOTProperShippingName>\" + \n ShippingName + \"</DOTProperShippingName>\" + \n \"<DOTProperShippingName>\" + ShippingName1 + \n \"</DOTProperShippingName>\" + \n \"<DOTProperShippingName>\" + ShippingName2 + \n \"</DOTProperShippingName>\" + \n \"<DOTProperShippingName>\" + ShippingName3 + \n \"</DOTProperShippingName>\" + \n \"<DOTHazardClassOrDivision>\" + Class + \n \"</DOTHazardClassOrDivision>\";\n // \"</HazMatCertificateData>\";\n\n }\n\n\n HazMatQty = aascPackageBean.getHazMatQty();\n HazMatUnit = aascPackageBean.getHazMatUnit();\n\n HazMatIdentificationNo = \n aascPackageBean.getHazMatIdNo();\n HazMatEmergencyContactNo = \n aascPackageBean.getHazMatEmerContactNo();\n HazMatEmergencyContactName = \n aascPackageBean.getHazMatEmerContactName();\n HazardousMaterialPkgGroup = \n nullStrToSpc(aascPackageBean.getHazMatPkgGroup());\n\n // Added on Jul-05-2011\n try {\n hazmatPkgingCnt = \n aascPackageBean.getHazmatPkgingCnt();\n } catch (Exception e) {\n hazmatPkgingCnt = 0.0;\n }\n hazmatPkgingUnits = \n nullStrToSpc(aascPackageBean.getHazmatPkgingUnits());\n hazmatTechnicalName = \n nullStrToSpc(aascPackageBean.getHazmatTechnicalName());\n //End on Jul-05-2011\n hazmatSignatureName = \n nullStrToSpc(aascPackageBean.getHazmatSignatureName());\n\n /* if(HazardousMaterialPkgGroup.equalsIgnoreCase(\"\"))\n {\n HazardousMaterialPkgGroup = aascPackageBean.getHazMatPkgGroup();\n }\n else {\n HazardousMaterialPkgGroup=\"\";\n }*/\n HazMatDOTLabelType = \n aascPackageBean.getHazMatDOTLabel();\n HazardousMaterialId = aascPackageBean.getHazMatId();\n\n String AccessibilityTag = \n \"<Accessibility>\" + HazMatType + \n \"</Accessibility>\";\n String additionalTag = \"\";\n String additionalTag1 = \"\";\n\n if (carrierCode.equalsIgnoreCase(\"FDXG\")) {\n \n AccessibilityTag = \"\";\n additionalTag = \n \"<Quantity>\" + HazMatQty + \"</Quantity><Units>\" + \n HazMatUnit + \n \"</Units></HazMatCertificateData>\";\n additionalTag1 = \n \"<DOTIDNumber>\" + HazMatIdentificationNo + \n \"</DOTIDNumber>\" + \"<PackingGroup>\" + \n HazardousMaterialPkgGroup + \n \"</PackingGroup>\" + \"<DOTLabelType>\" + \n HazMatDOTLabelType + \"</DOTLabelType>\" + \n \"<TwentyFourHourEmergencyResponseContactName>\" + \n HazMatEmergencyContactName + \n \"</TwentyFourHourEmergencyResponseContactName>\" + \n \"<TwentyFourHourEmergencyResponseContactNumber>\" + \n HazMatEmergencyContactNo + \n \" </TwentyFourHourEmergencyResponseContactNumber>\";\n\n additionalTag = \n additionalTag1 + \"<Quantity>\" + HazMatQty + \n \"</Quantity><Units>\" + HazMatUnit + \n \"</Units></HazMatCertificateData>\";\n\n } else {\n \n additionalTag = \"\" + \"</HazMatCertificateData>\";\n }\n\n HazMat = \n \"<DangerousGoods>\" + AccessibilityTag + HazMatCertData + \n additionalTag + \"</DangerousGoods>\";\n\n } else {\n \n HazMat = \"\";\n }\n\n // Added code for dimensions \n packageLength = aascPackageBean.getPackageLength();\n packageWidth = aascPackageBean.getPackageWidth();\n packageHeight = aascPackageBean.getPackageHeight();\n units = nullStrToSpc(aascPackageBean.getDimensionUnits());\n\n //System.out.println(\"packageLength----------------------------in fedex shipment::\"+packageLength);\n // Added for dimensions \n if (packageLength != 0 && packageWidth != 0 && \n packageHeight != 0 && packageLength != 0.0 && \n packageWidth != 0.0 && packageHeight != 0.0) {\n header9 = \n \"<Dimensions>\" + \"<Length>\" + (int)packageLength + \n \"</Length>\" + \"<Width>\" + (int)packageWidth + \n \"</Width>\" + \"<Height>\" + (int)packageHeight + \n \"</Height>\" + \"<Units>\" + units + \"</Units>\" + \n \"</Dimensions>\";\n } else {\n header9 = \"\";\n }\n\n signatureOptions = \n nullStrToSpc(aascPackageBean.getSignatureOptions());\n\n\n returnShipment = \n nullStrToSpc(aascPackageBean.getReturnShipment());\n if (returnShipment.equalsIgnoreCase(\"PRINTRETURNLABEL\")) {\n rtnShipFromCompany = \n encode(nullStrToSpc(aascPackageBean.getRtnShipFromCompany().trim()));\n \n rtnShipToCompany = \n encode(nullStrToSpc(aascPackageBean.getRtnShipToCompany().trim()));\n rtnShipFromContact = \n encode(nullStrToSpc(aascPackageBean.getRtnShipFromContact().trim()));\n rtnShipToContact = \n encode(nullStrToSpc(aascPackageBean.getRtnShipToContact().trim()));\n\n if (rtnShipToContact.equalsIgnoreCase(\"\") || \n rtnShipToContact == null) {\n rtnTagshipToContactPersonName = \"\";\n } else {\n rtnTagshipToContactPersonName = \n \"<PersonName>\" + rtnShipToContact + \n \"</PersonName>\";\n }\n\n rtnShipFromLine1 = \n encode(nullStrToSpc(aascPackageBean.getRtnShipFromLine1().trim()));\n\n rtnShipToLine1 = \n encode(nullStrToSpc(aascPackageBean.getRtnShipToLine1().trim()));\n rtnShipFromLine2 = \n encode(nullStrToSpc(aascPackageBean.getRtnShipFromLine2().trim()));\n\n rtnShipToLine2 = \n encode(nullStrToSpc(aascPackageBean.getRtnShipToLine2().trim()));\n rtnShipFromCity = \n encode(nullStrToSpc(aascPackageBean.getRtnShipFromCity().trim()));\n rtnShipFromSate = \n encode(nullStrToSpc(aascPackageBean.getRtnShipFromSate().trim()));\n rtnShipFromZip = \n encode(nullStrToSpc(aascPackageBean.getRtnShipFromZip()));\n rtnShipToCity = \n encode(nullStrToSpc(aascPackageBean.getRtnShipToCity().trim()));\n rtnShipToState = \n encode(nullStrToSpc(aascPackageBean.getRtnShipToState().trim()));\n rtnShipToZip = \n encode(nullStrToSpc(aascPackageBean.getRtnShipToZip()));\n rtnShipFromPhone = \n encode(nullStrToSpc(aascPackageBean.getRtnShipFromPhone().trim()));\n\n rtnShipFromPhone = rtnShipFromPhone.replace(\"(\", \"\");\n rtnShipFromPhone = rtnShipFromPhone.replace(\")\", \"\");\n rtnShipFromPhone = rtnShipFromPhone.replace(\"-\", \"\");\n\n rtnShipToPhone = \n encode(nullStrToSpc(aascPackageBean.getRtnShipToPhone().trim()));\n\n rtnShipToPhone = rtnShipToPhone.replace(\"(\", \"\");\n rtnShipToPhone = rtnShipToPhone.replace(\")\", \"\");\n rtnShipToPhone = rtnShipToPhone.replace(\"-\", \"\");\n\n rtnShipMethod = \n encode(nullStrToSpc(aascPackageBean.getRtnShipMethod()));\n rtnDropOfType = \n encode(nullStrToSpc(aascPackageBean.getRtnDropOfType()));\n rtnPackageList = \n encode(nullStrToSpc(aascPackageBean.getRtnPackageList()));\n //rtnPayMethod=nullStrToSpc(aascPackageBean.getRtnPayMethod());\n rtnPayMethod = \n encode((String)carrierPayMethodCodeMap.get(nullStrToSpc(aascPackageBean.getRtnPayMethod())));\n rtnPayMethodCode = \n encode(nullStrToSpc(aascPackageBean.getRtnPayMethodCode()));\n rtnACNumber = \n encode(nullStrToSpc(aascPackageBean.getRtnACNumber().trim()));\n rtnRMA = \n encode(nullStrToSpc(aascPackageBean.getRtnRMA().trim()));\n }\n // rtnTrackingNumber=nullStrToSpc(aascPackageBean.getRtnTrackingNumber().trim());\n //18/07/07(end)\n //25/07/07(start)\n String rtnShipTagToContact = \"\";\n String rtnshipToContactPersonName = \"\";\n String rtnShipTagFromContact = \"\";\n String rtnshipFromContactPersonName = \"\";\n if (rtnShipToCompany.equalsIgnoreCase(\"\") || \n rtnShipToCompany == null) {\n\n if (rtnShipToContact.equalsIgnoreCase(\"\") || \n rtnShipToContact == null) {\n rtnShipTagToContact = \"\";\n } else {\n rtnShipTagToContact = \n \"<PersonName>\" + rtnShipToContact + \n \"</PersonName>\";\n }\n\n\n } else {\n\n if (rtnShipToContact.equalsIgnoreCase(\"\") || \n rtnShipToContact == null) {\n rtnshipToContactPersonName = \"\";\n } else {\n rtnshipToContactPersonName = \n \"<PersonName>\" + rtnShipToContact + \n \"</PersonName>\";\n\n }\n rtnShipTagToContact = \n rtnshipToContactPersonName + \"<CompanyName>\" + \n rtnShipToCompany + \"</CompanyName>\";\n\n }\n\n\n if (rtnShipFromCompany.equalsIgnoreCase(\"\") || \n rtnShipFromCompany == null) {\n\n if (rtnShipFromContact.equalsIgnoreCase(\"\") || \n rtnShipFromContact == null) {\n rtnShipTagFromContact = \"\";\n } else {\n rtnShipTagFromContact = \n \"<PersonName>\" + rtnShipFromContact + \n \"</PersonName>\";\n }\n\n\n } else {\n\n if (rtnShipFromContact.equalsIgnoreCase(\"\") || \n rtnShipFromContact == null) {\n rtnshipFromContactPersonName = \"\";\n } else {\n rtnshipFromContactPersonName = \n \"<PersonName>\" + rtnShipFromContact + \n \"</PersonName>\";\n\n }\n rtnShipTagFromContact = \n rtnshipFromContactPersonName + \"<CompanyName>\" + \n rtnShipFromCompany + \"</CompanyName>\";\n\n }\n //25/07/07(end)\n\n\n //24/07/07(start)\n String toLine2Tag = \"\";\n\n if (rtnShipToLine2.equalsIgnoreCase(\"\") || \n rtnShipToLine2 == null) {\n toLine2Tag = \"\";\n } else {\n toLine2Tag = \"<Line2>\" + rtnShipToLine2 + \"</Line2>\";\n }\n\n String fromLine2Tag = \"\";\n\n if (rtnShipFromLine2.equalsIgnoreCase(\"\") || \n rtnShipFromLine2 == null) {\n fromLine2Tag = \"\";\n } else {\n fromLine2Tag = \n \"<Line2>\" + rtnShipFromLine2 + \"</Line2>\";\n }\n //24/07/07(end)\n if (rtnRMA != null && !(rtnRMA.equalsIgnoreCase(\"\"))) {\n rmaTag = \n \"<RMA>\" + \"<Number>\" + rtnRMA + \"</Number>\" + \"</RMA>\";\n } else {\n rmaTag = \"\";\n }\n packageDeclaredValue = \n aascPackageBean.getPackageDeclaredValue();\n \n rtnPackageDeclaredValue = \n aascPackageBean.getRtnDeclaredValue();\n \n rtnPackageDeclaredValueStr = \n String.valueOf(rtnPackageDeclaredValue);\n\n int indexRtr = rtnPackageDeclaredValueStr.indexOf(\".\");\n\n if (indexRtr < 1) {\n rtnPackageDeclaredValueStr = \n rtnPackageDeclaredValueStr + \".00\";\n\n } else if ((rtnPackageDeclaredValueStr.length() - \n indexRtr) > 2) {\n rtnPackageDeclaredValueStr = \n rtnPackageDeclaredValueStr.substring(0, \n index + 3);\n\n } else {\n while (rtnPackageDeclaredValueStr.length() != \n (indexRtr + 3)) {\n rtnPackageDeclaredValueStr = \n rtnPackageDeclaredValueStr + \"0\";\n\n }\n }\n //31/07/07(end)\n\n packageDeclaredValueStr = \n String.valueOf(packageDeclaredValue);\n int index = packageDeclaredValueStr.indexOf(\".\");\n\n\n if (index < 1) {\n packageDeclaredValueStr = \n packageDeclaredValueStr + \".00\";\n\n } else if ((packageDeclaredValueStr.length() - index) > \n 2) {\n packageDeclaredValueStr = \n packageDeclaredValueStr.substring(0, \n index + 3);\n\n } else {\n while (packageDeclaredValueStr.length() != \n (index + 3)) {\n packageDeclaredValueStr = \n packageDeclaredValueStr + \"0\";\n\n }\n }\n /*End 15-04-09 */\n\n\n packageSequence = \n nullStrToSpc(aascPackageBean.getPackageSequence());\n \n packageFlag = nullStrToSpc(aascPackageBean.getVoidFlag());\n \n packageTrackinNumber = \n nullStrToSpc(aascPackageBean.getTrackingNumber());\n\n packageCount = \n nullStrToSpc(aascPackageBean.getPackageCount());\n\n \n\n if (!packageCount.equalsIgnoreCase(\"1\")) {\n\n shipmentWeight = \n nullStrToSpc(String.valueOf(aascPackageBean.getWeight()));\n\n \n\n if (packageSequence.equalsIgnoreCase(\"1\")) {\n if (carrierCode.equalsIgnoreCase(\"FDXG\") || \n (carrierCode.equalsIgnoreCase(\"FDXE\") && \n codFlag.equalsIgnoreCase(\"Y\")) || \n (carrierCode.equalsIgnoreCase(\"FDXE\") && \n intFlag.equalsIgnoreCase(\"Y\"))) {\n shipMultiPieceFlag = 1;\n }\n masterTrackingNumber = \"\";\n masterFormID = \"\";\n /*shipWtTag = \"<ShipmentWeight>\"\n + aascHeaderInfo.getPackageWeight()\n + \"</ShipmentWeight>\"; */\n } else {\n if (shipFlag.equalsIgnoreCase(\"Y\")) {\n masterTrackingNumber = \n nullStrToSpc(String.valueOf(aascShipmentHeaderInfo.getWayBill()));\n masterFormID = \n nullStrToSpc(String.valueOf(aascShipmentHeaderInfo.getMasterFormId()));\n \n } else {\n masterTrackingNumber = \n nullStrToSpc((String)hashMap.get(\"masterTrkNum\"));\n\n \n if (masterTrackingNumber == \"\" || \n masterTrackingNumber.equalsIgnoreCase(\"\")) {\n masterTrackingNumber = \n nullStrToSpc(String.valueOf(aascShipmentHeaderInfo.getWayBill()));\n\n //aascShipmentHeaderInfo.setWayBill(masterTrackingNumber);\n\n }\n //26/07/07(end)\n masterFormID = \n nullStrToSpc((String)hashMap.get(\"masterFormId\"));\n //shipWtTag = \"\";\n }\n\n }\n\n if (shipMultiPieceFlag == \n 1) { //shipWtTag + // \"<ShipmentWeight>\"+aascHeaderInfo.getPackageWeight()+\"</ShipmentWeight>\"+\n part1 = \n \"<MultiPiece>\" + \"<PackageCount>\" + packageCount + \n \"</PackageCount>\" + \n \"<PackageSequenceNumber>\" + \n packageSequence + \n \"</PackageSequenceNumber>\" + \n \"<MasterTrackingNumber>\" + \n masterTrackingNumber + \n \"</MasterTrackingNumber>\";\n part2 = \"\";\n if (carrierCode.equalsIgnoreCase(\"FDXE\")) {\n part2 = \n \"<MasterFormID>\" + masterFormID + \"</MasterFormID></MultiPiece>\";\n } else {\n part2 = \"</MultiPiece>\";\n }\n\n header4 = part1 + part2;\n }\n\n else {\n header4 = \"\";\n }\n }\n\n\n chkReturnlabel = \"NONRETURN\";\n\n responseStatus = \n setCarrierLevelInfo1(aascShipmentHeaderInfo, \n aascPackageBean, \n aascShipMethodInfo, \n chkReturnlabel); //calling local method\n int ctr = 0;\n if (responseStatus == 151 && \n !(shipFlag.equalsIgnoreCase(\"Y\"))) {\n // aascHeaderInfo.setWayBill(\"\"); \n packageInfoIterator = shipPackageInfo.listIterator();\n\n while (packageInfoIterator.hasNext()) {\n ctr = ctr + 1;\n aascPackageBean = \n (AascShipmentPackageInfo)packageInfoIterator.next();\n aascPackageBean.setMasterTrackingNumber(\"\");\n aascPackageBean.setMasterFormID(\"\");\n // aascPackageBean.setTrackingNumber(\"\");\n aascPackageBean.setPkgCost(0.0);\n aascPackageBean.setRtnShipmentCost(0.0);\n aascPackageBean.setRtnTrackingNumber(\"\");\n aascPackageBean.setSurCharges(0.0);\n }\n return responseStatus;\n }\n if (responseStatus == 151 && \n shipFlag.equalsIgnoreCase(\"Y\")) {\n\n packageInfoIterator = shipPackageInfo.listIterator();\n while (packageInfoIterator.hasNext()) {\n ctr = ctr + 1;\n aascPackageBean = \n (AascShipmentPackageInfo)packageInfoIterator.next();\n\n }\n return responseStatus;\n }\n\n // }//End of Iterator \n\n customerCarrierAccountNumber = \n aascShipmentHeaderInfo.getCarrierAccountNumber(); // FedEx Account number of the client \n // Modified to retrieve the Ship From company name from Profile Options instead of from Header Info\n // shipFromCompanyName = nullStrToSpc(aascProfileOptionsInfo.getCompanyName());\n shipFromCompanyName = \n aascShipmentHeaderInfo.getShipFromCompanyName();\n logger.info(\"ship from company name::::\" + \n shipFromCompanyName);\n shipFromCompanyName = encode(shipFromCompanyName);\n \n shipFromPhoneNumber1 = \n nullStrToSpc(aascShipmentHeaderInfo.getShipFromPhoneNumber1());\n //start\n shipFromPhoneNumber1 = \n shipFromPhoneNumber1.replace(\"(\", \"\");\n shipFromPhoneNumber1 = \n shipFromPhoneNumber1.replace(\")\", \"\");\n shipFromPhoneNumber1 = \n shipFromPhoneNumber1.replace(\"-\", \"\");\n\n shipFromPhoneNumber1 = \n shipFromPhoneNumber1.replace(\"(\", \"\");\n shipFromPhoneNumber1 = \n shipFromPhoneNumber1.replace(\")\", \"\");\n shipFromPhoneNumber1 = \n shipFromPhoneNumber1.replace(\"-\", \"\");\n\n shipFromPhoneNumber1 = escape(shipFromPhoneNumber1);\n\n shipToContactPhoneNumber = \n nullStrToSpc(aascShipmentHeaderInfo.getPhoneNumber()); // retreiving phone number from header bean \n\n shipToContactPhoneNumber = \n escape(shipToContactPhoneNumber);\n \n if (shipToContactPhoneNumber.equalsIgnoreCase(\"\")) {\n shipToContactPhoneNumber = shipFromPhoneNumber1;\n }\n\n shipToContactPhoneNumber = \n shipToContactPhoneNumber.replace(\"(\", \"\");\n shipToContactPhoneNumber = \n shipToContactPhoneNumber.replace(\")\", \"\");\n shipToContactPhoneNumber = \n shipToContactPhoneNumber.replace(\"-\", \"\");\n \n shipFromEMailAddress = nullStrToSpc(aascShipmentHeaderInfo.getShipFromEmailId());\n \n carrierPayMethod = \n (String)carrierPayMethodCodeMap.get(nullStrToSpc(aascShipmentHeaderInfo.getCarrierPaymentMethod()));\n carrierPayMethodCode = \n nullStrToSpc(aascShipMethodInfo.getCarrierPayCode(aascShipmentHeaderInfo.getCarrierPaymentMethod()));\n if (\"RECIPIENT\".equalsIgnoreCase(carrierPayMethod) && \n \"FC\".equalsIgnoreCase(carrierPayMethodCode)) {\n carrierPayMethodCode = \"CG\";\n }\n dropoffType = \n nullStrToSpc(aascShipmentHeaderInfo.getDropOfType());\n service = \n aascShipMethodInfo.getConnectShipScsTag(shipMethodName);\n packaging = \n nullStrToSpc(aascShipmentHeaderInfo.getPackaging());\n portString = aascShipMethodInfo.getCarrierPort(carrierId);\n if (portString != null && !(portString.equals(\"\"))) {\n port = Integer.parseInt(portString);\n } else {\n logger.severe(\"portString is null \" + portString);\n }\n host = \naascShipMethodInfo.getCarrierServerIPAddress(carrierId);\n\n if (carrierCode.equalsIgnoreCase(\"FDXE\") && \n carrierPayMethodCode.equalsIgnoreCase(\"FC\")) {\n aascShipmentHeaderInfo.setMainError(\"bill to type of collect is for ground services only \");\n responseStatus = 151;\n return responseStatus;\n }\n //By Madhavi\n String line2Tag = \"\";\n shipToAddressLine2 = \n nullStrToSpc(aascShipmentHeaderInfo.getShipToAddrLine2());\n shipToAddressLine2 = shipToAddressLine2.trim();\n shipToAddressLine2=encode(shipToAddressLine2); //added by Jagadish\n \n if (shipToAddressLine2.equalsIgnoreCase(\"\") || \n shipToAddressLine2 == null) {\n line2Tag = \"\";\n } else {\n line2Tag = \"<Line2>\" + shipToAddressLine2 + \"</Line2>\";\n }\n op900LabelFormat = \n nullStrToSpc(aascShipMethodInfo.getHazmatOp900LabelFormat(carrierId));\n \n intFlag = aascShipmentHeaderInfo.getInternationalFlag();\n LinkedList coList = null;\n try {\n aascIntlHeaderInfo = aascIntlInfo.getIntlHeaderInfo();\n coList = aascIntlInfo.getIntlCommodityInfo();\n } catch (Exception e) {\n aascIntlHeaderInfo = new AascIntlHeaderInfo();\n coList = new LinkedList();\n }\n if (intFlag.equalsIgnoreCase(\"Y\")) {\n \n intPayerType = \n nullStrToSpc(aascIntlHeaderInfo.getIntlPayerType());\n \n intAccNumber = nullStrToSpc(aascShipmentHeaderInfo.getCarrierAccountNumber());\n// nullStrToSpc(aascIntlHeaderInfo.getIntlAccountNumber());\n//logger.info(\"intAccNumber:2167::\"+intAccNumber);\n // logger.info(\"nullStrToSpc(aascIntlHeaderInfo.getIntlAccountNumber()):2168::\"+nullStrToSpc(aascIntlHeaderInfo.getIntlAccountNumber()));\n\n intMaskAccNumber = \n nullStrToSpc(aascIntlHeaderInfo.getIntlMaskAccountNumber());\n intcountryCode = \n nullStrToSpc(aascIntlHeaderInfo.getIntlCountryCode());\n \n intTermsOfSale = \n nullStrToSpc(aascIntlHeaderInfo.getIntlTermsOfSale());\n intTotalCustomsValue = \n nullStrToSpc(aascIntlHeaderInfo.getIntlTotalCustomsValue());\n intFreightCharge = \n aascIntlHeaderInfo.getIntlFreightCharge();\n intInsuranceCharge = \n aascIntlHeaderInfo.getIntlInsuranceCharge();\n intTaxesOrMiscellaneousCharge = \n aascIntlHeaderInfo.getIntlTaxMiscellaneousCharge();\n intPurpose = \n nullStrToSpc(aascIntlHeaderInfo.getIntlPurpose());\n intSenderTINOrDUNS = \n nullStrToSpc(aascIntlHeaderInfo.getIntlSedNumber());\n intSenderTINOrDUNSType = \n nullStrToSpc(aascIntlHeaderInfo.getIntlSedType());\n packingListEnclosed = \n aascIntlHeaderInfo.getPackingListEnclosed();\n shippersLoadAndCount = \n aascIntlHeaderInfo.getShippersLoadAndCount();\n bookingConfirmationNumber = \n aascIntlHeaderInfo.getBookingConfirmationNumber();\n generateCI = aascIntlHeaderInfo.getGenerateCI();\n declarationStmt = \n aascIntlHeaderInfo.getIntlDeclarationStmt();\n \n importerName = aascIntlHeaderInfo.getImporterName();\n importerCompName = \n aascIntlHeaderInfo.getImporterCompName();\n importerAddress1 = \n aascIntlHeaderInfo.getImporterAddress1();\n importerAddress2 = \n aascIntlHeaderInfo.getImporterAddress2();\n importerCity = aascIntlHeaderInfo.getImporterCity();\n importerCountryCode = \n aascIntlHeaderInfo.getImporterCountryCode();\n \n importerPhoneNum = \n aascIntlHeaderInfo.getImporterPhoneNum();\n \n importerPostalCode = \n aascIntlHeaderInfo.getImporterPostalCode();\n importerState = aascIntlHeaderInfo.getImporterState();\n \n impIntlSedNumber = \n aascIntlHeaderInfo.getImpIntlSedNumber();\n \n impIntlSedType = \n aascIntlHeaderInfo.getImpIntlSedType();\n \n recIntlSedNumber = \n aascIntlHeaderInfo.getRecIntlSedNumber();\n recIntlSedType = \n aascIntlHeaderInfo.getRecIntlSedType();\n \n brokerName = aascIntlHeaderInfo.getBrokerName();\n brokerCompName = \n aascIntlHeaderInfo.getBrokerCompName();\n \n brokerAddress1 = \n aascIntlHeaderInfo.getBrokerAddress1();\n \n brokerAddress2 = \n aascIntlHeaderInfo.getBrokerAddress2();\n \n brokerCity = aascIntlHeaderInfo.getBrokerCity();\n \n brokerCountryCode = \n aascIntlHeaderInfo.getBrokerCountryCode();\n \n brokerPhoneNum = \n aascIntlHeaderInfo.getBrokerPhoneNum();\n \n brokerPostalCode = \n aascIntlHeaderInfo.getBrokerPostalCode();\n \n brokerState = aascIntlHeaderInfo.getBrokerState();\n \n\n recIntlSedType = \n aascIntlHeaderInfo.getRecIntlSedType();\n \n\n ListIterator CoInfoIterator = coList.listIterator();\n\n intHeader6 = \"\";\n String harCode = \"\";\n String uPrice = \"\";\n String exportLicense = \"\";\n\n while (CoInfoIterator.hasNext()) {\n AascIntlCommodityInfo aascIntlCommodityInfo = \n (AascIntlCommodityInfo)CoInfoIterator.next();\n\n numberOfPieces = \n aascIntlCommodityInfo.getNumberOfPieces();\n description = \n encode(aascIntlCommodityInfo.getDescription());\n countryOfManufacture = \n aascIntlCommodityInfo.getCountryOfManufacture();\n harmonizedCode = \n aascIntlCommodityInfo.getHarmonizedCode();\n weight = aascIntlCommodityInfo.getWeight();\n quantity = aascIntlCommodityInfo.getQuantity();\n quantityUnits = \n aascIntlCommodityInfo.getQuantityUnits();\n unitPrice = aascIntlCommodityInfo.getUnitPrice();\n customsValue = \n aascIntlCommodityInfo.getCustomsValue();\n exportLicenseNumber = \n aascIntlCommodityInfo.getExportLicenseNumber();\n exportLicenseExpiryDate = \n aascIntlCommodityInfo.getExportLicenseExpiryDate();\n String rdate = \"\";\n\n try {\n //String mon[]={\"\",\"JAN\",\"FEB\",\"MAR\",\"APR\",\"MAY\",\"JUN\",\"JUL\",\"AUG\",\"SEP\",\"OCT\",\"NOV\",\"DEC\"};\n // String exportLicenseExpiryDateStr = \n // exportLicenseExpiryDate.substring(0, 1);\n String convertDate = exportLicenseExpiryDate;\n\n // 18-FEB-08 2008-02-18\n int len = convertDate.length();\n int indexs = convertDate.indexOf('-');\n int index1 = convertDate.lastIndexOf('-');\n\n String syear = \n convertDate.substring(index1 + 1, \n len).trim();\n String sdate = \n convertDate.substring(0, indexs).trim();\n String smon = \n convertDate.substring(indexs + 1, index1).trim();\n String intMonth = \"\";\n if (smon.equalsIgnoreCase(\"JAN\"))\n intMonth = \"01\";\n else if (smon.equalsIgnoreCase(\"FEB\"))\n intMonth = \"02\";\n else if (smon.equalsIgnoreCase(\"MAR\"))\n intMonth = \"03\";\n else if (smon.equalsIgnoreCase(\"APR\"))\n intMonth = \"04\";\n else if (smon.equalsIgnoreCase(\"MAY\"))\n intMonth = \"05\";\n else if (smon.equalsIgnoreCase(\"JUN\"))\n intMonth = \"06\";\n else if (smon.equalsIgnoreCase(\"JUL\"))\n intMonth = \"07\";\n else if (smon.equalsIgnoreCase(\"AUG\"))\n intMonth = \"08\";\n else if (smon.equalsIgnoreCase(\"SEP\"))\n intMonth = \"09\";\n else if (smon.equalsIgnoreCase(\"OCT\"))\n intMonth = \"10\";\n else if (smon.equalsIgnoreCase(\"NOV\"))\n intMonth = \"11\";\n else if (smon.equalsIgnoreCase(\"DEC\"))\n intMonth = \"12\";\n\n rdate = \n \"20\" + syear + '-' + intMonth + '-' + sdate;\n rdate = exportLicenseExpiryDate;\n\n } catch (Exception e) {\n exportLicenseExpiryDate = \"\";\n rdate = \"\";\n }\n\n try {\n // String harmonizedCodeStr = \n // harmonizedCode.substring(0, 1);\n } catch (Exception e) {\n harmonizedCode = \"\";\n }\n if (harmonizedCode.equalsIgnoreCase(\"\")) {\n harCode = \"\";\n } else {\n harCode = \n \"<HarmonizedCode>\" + harmonizedCode + \"</HarmonizedCode>\";\n }\n if (unitPrice.equalsIgnoreCase(\"\")) {\n uPrice = \"\";\n } else {\n uPrice = \n \"<UnitPrice>\" + unitPrice + \"</UnitPrice>\";\n }\n try {\n // String expNoStr = \n // exportLicenseNumber.substring(0, 1);\n\n } catch (Exception e) {\n exportLicenseNumber = \"\";\n }\n if (exportLicenseNumber.equalsIgnoreCase(\"\")) {\n exportLicense = \"\";\n } else {\n exportLicense = \n \"<ExportLicenseNumber>\" + exportLicenseNumber + \n \"</ExportLicenseNumber>\" + \n \"<ExportLicenseExpirationDate>\" + \n rdate + \n \"</ExportLicenseExpirationDate>\";\n }\n\n\n intHeader6 = \n intHeader6 + \"<Commodity>\" + \"<NumberOfPieces>\" + \n numberOfPieces + \"</NumberOfPieces>\" + \n \"<Description>\" + description + \n \"</Description>\" + \n \"<CountryOfManufacture>\" + \n countryOfManufacture + \n \"</CountryOfManufacture>\" + harCode + \n \"<Weight>\" + weight + \"</Weight>\" + \n \"<Quantity>\" + quantity + \"</Quantity> \" + \n \"<QuantityUnits>\" + quantityUnits + \n \"</QuantityUnits>\" + uPrice + \n \"<CustomsValue>\" + customsValue + \n \"</CustomsValue>\" + exportLicense + \n \"</Commodity>\";\n\n\n }\n\n if (intPayerType.equalsIgnoreCase(\"THIRDPARTY\")) {\n intHeader1 = \n \"<DutiesPayor><AccountNumber>\" + intAccNumber + \n \"</AccountNumber>\" + \"<CountryCode>\" + \n intcountryCode + \"</CountryCode>\" + \n \"</DutiesPayor>\";\n intHeader2 = \n \"<DutiesPayment>\" + intHeader1 + \"<PayorType>\" + \n intPayerType + \"</PayorType>\" + \n \"</DutiesPayment>\";\n payorCountryCodeWS = intcountryCode;\n } else {\n intHeader2 = \n \"<DutiesPayment>\" + \"<PayorType>\" + intPayerType + \n \"</PayorType>\" + \"</DutiesPayment>\";\n }\n\n /*\n try{\n String ifc = intFreightCharge.substring(0,1);\n }catch(Exception e)\n {\n intFreightCharge = \"0.0\";\n }\n try{\n String iic = intInsuranceCharge.substring(0,1);\n }catch(Exception e)\n {\n intInsuranceCharge = \"0.0\";\n }\n try{\n String itmc = intTaxesOrMiscellaneousCharge.substring(0,1);\n }catch(Exception e)\n {\n intTaxesOrMiscellaneousCharge = \"0.0\";\n }\n */\n\n if (intPurpose.equalsIgnoreCase(\"\")) { // +\"<Comments>dd</Comments>\"+\n intHeader3 = \n \"<CommercialInvoice>\" + \"<FreightCharge>\" + \n intFreightCharge + \"</FreightCharge>\" + \n \"<InsuranceCharge>\" + intInsuranceCharge + \n \"</InsuranceCharge>\" + \n \"<TaxesOrMiscellaneousCharge>\" + \n intTaxesOrMiscellaneousCharge + \n \"</TaxesOrMiscellaneousCharge>\" + \n \"</CommercialInvoice>\";\n } else { // +\"<Comments>dd</Comments>\"+\n intHeader3 = \n \"<CommercialInvoice>\" + \"<FreightCharge>\" + \n intFreightCharge + \"</FreightCharge>\" + \n \"<InsuranceCharge>\" + intInsuranceCharge + \n \"</InsuranceCharge>\" + \n \"<TaxesOrMiscellaneousCharge>\" + \n intTaxesOrMiscellaneousCharge + \n \"</TaxesOrMiscellaneousCharge>\" + \n \"<Purpose>\" + intPurpose + \"</Purpose>\" + \n \"</CommercialInvoice>\";\n }\n /*\n intHeader4 = \"<Commodity>\"+\n \"<NumberOfPieces>1</NumberOfPieces> \"+\n \"<Description>Computer Keyboards</Description> \"+\n \"<CountryOfManufacture>US</CountryOfManufacture> \"+\n \"<HarmonizedCode>00</HarmonizedCode> \"+\n \"<Weight>5.0</Weight> \"+\n \"<Quantity>1</Quantity> \"+\n \"<QuantityUnits>PCS</QuantityUnits> \"+\n \"<UnitPrice>25.000000</UnitPrice> \"+\n \"<CustomsValue>25.000000</CustomsValue> \"+\n \"<ExportLicenseNumber>25</ExportLicenseNumber> \"+\n \"<ExportLicenseExpirationDate>25</ExportLicenseExpirationDate> \"+\n \"</Commodity>\";\n\n intHeader4 = \"\"; */\n\n if (!intSenderTINOrDUNS.equalsIgnoreCase(\"\")) {\n intHeader5 = \n \"<SED>\" + \"<SenderTINOrDUNS>\" + intSenderTINOrDUNS + \n \"</SenderTINOrDUNS>\" + \n \"<SenderTINOrDUNSType>\" + \n intSenderTINOrDUNSType + \n \"</SenderTINOrDUNSType>\" + \"</SED>\";\n } else {\n intHeader5 = \"\";\n }\n\n internationalTags = \n \"<International>\" + intHeader2 + \"<TermsOfSale>\" + \n intTermsOfSale + \"</TermsOfSale>\" + \n \"<TotalCustomsValue>\" + intTotalCustomsValue + \n \"</TotalCustomsValue>\" + intHeader3 + \n intHeader6 + intHeader5 + \"</International>\";\n\n\n } else {\n internationalTags = \"\";\n }\n\n\n // end of addition on 09/06/08\n\n // end of addition on 09/06/08\n\n // Start on Aug-01-2011\n try {\n shipToContactPersonName = \n nullStrToSpc(aascShipmentHeaderInfo.getContactName());\n shipToContactPersonName = \n encode(shipToContactPersonName); //Added by dedeepya on 28/05/08\n if (shipToContactPersonName.equalsIgnoreCase(\"\")) {\n tagshipToContactPersonName = \"\";\n } else {\n tagshipToContactPersonName = \n \"<PersonName>\" + shipToContactPersonName + \n \"</PersonName>\";\n }\n } catch (Exception e) {\n e.printStackTrace();\n tagshipToContactPersonName = \"\";\n }\n // End on Aug-01-2011\n\n\n \n chkReturnlabel = \"NONRETURN\";\n \n responseStatus = \n setCarrierLevelInfo1(aascShipmentHeaderInfo, \n aascPackageBean, \n aascShipMethodInfo, \n chkReturnlabel);\n sendfedexRequest(aascShipmentOrderInfo, aascShipMethodInfo, \n chkReturnlabel, aascProfileOptionsInfo, \n aascIntlInfo, cloudLabelPath);\n responseStatus = \n Integer.parseInt((String)hashMap.get(\"ResponseStatus\"));\n \n\n if (returnShipment.equals(\"PRINTRETURNLABEL\") && \n responseStatus == 150) {\n \n \n shipmentRequestHdr = \"\";\n\n\n \n\n chkReturnlabel = \"PRINTRETURNLABEL\";\n\n responseStatus = \n setCarrierLevelInfo1(aascShipmentHeaderInfo, \n aascPackageBean, \n aascShipMethodInfo, \n chkReturnlabel); //calling local method\n\n //processReturnShipment();\n //Shiva modified code for FedEx Return Shipment\n \n rtnShipMethod = \n rtnShipMethod.substring(0, rtnShipMethod.indexOf(\"@@\"));\n // System.out.println(\"rtnShipMethod.indexOf(\\\"@@\\\")\"+rtnShipMethod.indexOf(\"@@\")+\"rtnShipMethod:::\"+rtnShipMethod); \n rtnShipMethod = \n aascShipMethodInfo.getShipMethodFromAlt(rtnShipMethod);\n \n carrierCode = \n aascShipMethodInfo.getCarrierName(rtnShipMethod);\n \n rtnShipMethod = \n aascShipMethodInfo.getConnectShipScsTag(rtnShipMethod);\n rtnACNumber = \n nullStrToSpc(aascPackageBean.getRtnACNumber().trim());\n\n \n rntHeader1 = \n \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" ?>\" + \n \"<FDXShipRequest xmlns:api=\\\"http://www.fedex.com/fsmapi\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:noNamespaceSchemaLocation=\\\"FDXShipRequest.xsd\\\">\" + \n \"<RequestHeader>\" + \n \"<CustomerTransactionIdentifier>\" + \n customerTransactionIdentifier + \n \"</CustomerTransactionIdentifier>\" + \n \"<AccountNumber>\" + senderAccountNumber + \n \"</AccountNumber>\" + \"<MeterNumber>\" + \n fedExTestMeterNumber + \"</MeterNumber>\" + \n \"<CarrierCode>\" + carrierCode + \n \"</CarrierCode>\" + \"</RequestHeader>\" + \n \"<ShipDate>\" + shipDate + \"</ShipDate>\" + \n \"<ShipTime>\" + time + \"</ShipTime>\" + \n \"<DropoffType>\" + rtnDropOfType + \n \"</DropoffType>\" + \"<Service>\" + \n rtnShipMethod + \"</Service>\" + \"<Packaging>\" + \n rtnPackageList + \n \"</Packaging>\"; // added for package options\n rntHeader6 = \n \"<Origin>\" + \"<Contact>\" + rtnShipTagFromContact + \n header8 + \"<PhoneNumber>\" + rtnShipFromPhone + \n \"</PhoneNumber>\" + \"</Contact>\" + \"<Address>\" + \n \"<Line1>\" + rtnShipFromLine1 + \"</Line1>\" + \n fromLine2Tag + \"<City>\" + rtnShipFromCity + \n \"</City>\" + \"<StateOrProvinceCode>\" + \n rtnShipFromSate + \"</StateOrProvinceCode>\" + \n \"<PostalCode>\" + rtnShipFromZip + \n \"</PostalCode>\" + \"<CountryCode>\" + \n shipFromCountry + \"</CountryCode>\" + \n \"</Address>\" + \"</Origin>\" + \"<Destination>\" + \n \"<Contact>\" + rtnShipTagToContact + \n \"<PhoneNumber>\" + rtnShipToPhone + \n \"</PhoneNumber>\" + \"</Contact>\" + \"<Address>\" + \n \"<Line1>\" + rtnShipToLine1 + \"</Line1>\" + \n toLine2Tag + \"<City>\" + rtnShipToCity + \n \"</City>\" + \"<StateOrProvinceCode>\" + \n rtnShipToState + \"</StateOrProvinceCode>\" + \n \"<PostalCode>\" + rtnShipToZip + \n \"</PostalCode>\" + \"<CountryCode>\" + \n shipToCountry + \"</CountryCode>\" + \n \"</Address>\" + \"</Destination>\" + \"<Payment>\" + \n \"<PayorType>\" + rtnPayMethod + \"</PayorType>\";\n\n header4 = \"\";\n rntHeader5 = \n \"<ReturnShipmentIndicator>PRINTRETURNLABEL</ReturnShipmentIndicator>\"; // added for package options\n\n header2 = \n \"<WeightUnits>\" + pkgWtUom + \"</WeightUnits>\" + \n \"<Weight>\" + pkgWtVal + \"</Weight>\";\n\n listTag = \"<ListRate>true</ListRate>\";\n\n // added for package options\n header3 = \n \"<CurrencyCode>\" + currencyCode + \"</CurrencyCode>\";\n //Shiva modified code for FedEx Return Shipment\n sendfedexRequest(aascShipmentOrderInfo, \n aascShipMethodInfo, chkReturnlabel, \n aascProfileOptionsInfo, aascIntlInfo, \n cloudLabelPath);\n }\n\n\n \n shipmentDeclaredValueStr = \n String.valueOf(shipmentDeclaredValue);\n \n int i = shipmentDeclaredValueStr.indexOf(\".\");\n\n if (i < 1) {\n shipmentDeclaredValueStr = \n shipmentDeclaredValueStr + \".00\";\n \n } else if ((shipmentDeclaredValueStr.length() - index) > \n 2) {\n shipmentDeclaredValueStr = \n shipmentDeclaredValueStr.substring(0, \n index + 3);\n \n } else {\n while (shipmentDeclaredValueStr.length() != (i + 3)) {\n shipmentDeclaredValueStr = \n shipmentDeclaredValueStr + \"0\";\n\n }\n }\n \n\n\n } //iterator\n\n\n packageInfoIterator = shipPackageInfo.listIterator();\n\n int ctr1 = 0;\n\n while (packageInfoIterator.hasNext()) {\n ctr1 = ctr1 + 1;\n\n AascShipmentPackageInfo aascPackageBean1 = \n (AascShipmentPackageInfo)packageInfoIterator.next();\n\n totalShipmentCost = \n totalShipmentCost + aascPackageBean1.getPkgCost();\n\n totalFreightCost = \n totalFreightCost + aascPackageBean1.getTotalDiscount();\n\n surCharges = surCharges + aascPackageBean1.getSurCharges();\n \n }\n \n\n if (carrierCode.equalsIgnoreCase(\"FDXE\")) {\n\n\n totalShipmentCost = \n (Math.floor(totalShipmentCost * 100)) / 100;\n totalFreightCost = \n (Math.floor(totalFreightCost * 100)) / 100;\n \n }\n\n if (carrierCode.equalsIgnoreCase(\"FDXG\")) {\n totalShipmentCost = \n (Math.floor(totalShipmentCost * 100)) / 100;\n\n totalFreightCost = \n (Math.floor(totalFreightCost * 100)) / 100;\n \n }\n surCharges = (Math.floor(surCharges * 100)) / 100;\n aascShipmentHeaderInfo.setTotalSurcharge(surCharges);\n\n } else {\n responseStatus = 151;\n aascShipmentHeaderInfo.setMainError(\"aascShipmentOrderInfo is null OR aascShipmentHeaderInfo is null\" + \n \"OR aascpackageInfo is null OR aascShipMethodInfo is null \");\n logger.info(\"aascShipmentOrderInfo is null OR aascShipmentHeaderInfo is null\" + \n \"OR aascpackageInfo is null OR aascShipMethodInfo is null \");\n }\n } catch (Exception exception) {\n aascShipmentHeaderInfo.setMainError(\"null values or empty strings passed in request\");\n logger.severe(\"Exception::\"+exception.getMessage());\n }\n logger.info(\"Exit from processShipment()\");\n return responseStatus;\n }", "public void m63703d() {\n Throwable th;\n ZipCoordinator zipCoordinator = this;\n if (getAndIncrement() == 0) {\n C17455a[] c17455aArr = zipCoordinator.f53839c;\n Observer observer = zipCoordinator.f53837a;\n Object obj = zipCoordinator.f53840d;\n boolean z = zipCoordinator.f53841e;\n int i = 1;\n while (true) {\n int length = c17455aArr.length;\n int i2 = 0;\n int i3 = 0;\n int i4 = 0;\n while (i2 < length) {\n int i5;\n C17455a c17455a = c17455aArr[i2];\n if (obj[i3] == null) {\n boolean z2 = c17455a.f53845c;\n Object poll = c17455a.f53844b.poll();\n boolean z3 = poll == null;\n i5 = i2;\n if (!m63700a(z2, z3, observer, z, c17455a)) {\n if (z3) {\n i4++;\n } else {\n obj[i3] = poll;\n }\n } else {\n return;\n }\n }\n C17455a c17455a2 = c17455a;\n i5 = i2;\n if (c17455a2.f53845c && !z) {\n th = c17455a2.f53846d;\n if (th != null) {\n m63698a();\n observer.onError(th);\n return;\n }\n }\n i3++;\n i2 = i5 + 1;\n }\n if (i4 != 0) {\n i = addAndGet(-i);\n if (i == 0) {\n return;\n }\n } else {\n try {\n observer.onNext(C15684a.m58895a(zipCoordinator.f53838b.apply(obj.clone()), \"The zipper returned a null value\"));\n Arrays.fill(obj, null);\n } catch (Throwable th2) {\n th = th2;\n C15678a.m58850b(th);\n m63698a();\n observer.onError(th);\n return;\n }\n }\n }\n }\n }", "public void processReturnShipment() {\n \n }", "public final int zza(com.google.android.gms.internal.ads.zzno r8, com.google.android.gms.internal.ads.zznt r9) throws java.io.IOException, java.lang.InterruptedException {\n /*\n r7 = this;\n r0 = 0\n r7.zzaoo = r0\n r1 = 1\n r2 = 1\n L_0x0005:\n if (r2 == 0) goto L_0x003c\n boolean r3 = r7.zzaoo\n if (r3 != 0) goto L_0x003c\n com.google.android.gms.internal.ads.zzob r2 = r7.zzazx\n boolean r2 = r2.zzb(r8)\n if (r2 == 0) goto L_0x0005\n long r3 = r8.getPosition()\n boolean r5 = r7.zzaob\n if (r5 == 0) goto L_0x0025\n r7.zzaod = r3\n long r3 = r7.zzaoc\n r9.zzahv = r3\n r7.zzaob = r0\n L_0x0023:\n r3 = 1\n goto L_0x0039\n L_0x0025:\n boolean r3 = r7.zzbam\n if (r3 == 0) goto L_0x0038\n long r3 = r7.zzaod\n r5 = -1\n int r3 = (r3 > r5 ? 1 : (r3 == r5 ? 0 : -1))\n if (r3 == 0) goto L_0x0038\n long r3 = r7.zzaod\n r9.zzahv = r3\n r7.zzaod = r5\n goto L_0x0023\n L_0x0038:\n r3 = 0\n L_0x0039:\n if (r3 == 0) goto L_0x0005\n return r1\n L_0x003c:\n if (r2 == 0) goto L_0x003f\n return r0\n L_0x003f:\n r8 = -1\n return r8\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.zzod.zza(com.google.android.gms.internal.ads.zzno, com.google.android.gms.internal.ads.zznt):int\");\n }", "public synchronized void next(int r8) {\n /*\n r7 = this;\n r6 = 4097; // 0x1001 float:5.741E-42 double:2.024E-320;\n r5 = -1;\n monitor-enter(r7);\n r2 = r7.mNextTaskRouter;\t Catch:{ all -> 0x0043 }\n r3 = -1;\n r1 = r2.get(r8, r3);\t Catch:{ all -> 0x0043 }\n r2 = \"DataRequestRouter\";\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0043 }\n r3.<init>();\t Catch:{ all -> 0x0043 }\n r4 = \"pre task id : \";\n r3 = r3.append(r4);\t Catch:{ all -> 0x0043 }\n r3 = r3.append(r8);\t Catch:{ all -> 0x0043 }\n r4 = \",next task id : \";\n r3 = r3.append(r4);\t Catch:{ all -> 0x0043 }\n r3 = r3.append(r1);\t Catch:{ all -> 0x0043 }\n r3 = r3.toString();\t Catch:{ all -> 0x0043 }\n com.gala.video.lib.framework.core.utils.LogUtils.d(r2, r3);\t Catch:{ all -> 0x0043 }\n if (r1 != r5) goto L_0x0034;\n L_0x0032:\n monitor-exit(r7);\n return;\n L_0x0034:\n switch(r1) {\n case 4097: goto L_0x004a;\n case 4098: goto L_0x0037;\n case 4099: goto L_0x0058;\n case 8195: goto L_0x0046;\n default: goto L_0x0037;\n };\n L_0x0037:\n r2 = 4096; // 0x1000 float:5.74E-42 double:2.0237E-320;\n if (r8 == r2) goto L_0x0032;\n L_0x003b:\n if (r8 == r6) goto L_0x0032;\n L_0x003d:\n r2 = r7.mNextTaskRouter;\t Catch:{ all -> 0x0043 }\n r2.delete(r8);\t Catch:{ all -> 0x0043 }\n goto L_0x0032;\n L_0x0043:\n r2 = move-exception;\n monitor-exit(r7);\n throw r2;\n L_0x0046:\n r7.executeApplicationGroupTasks();\t Catch:{ all -> 0x0043 }\n goto L_0x0037;\n L_0x004a:\n r2 = 4097; // 0x1001 float:5.741E-42 double:2.024E-320;\n r0 = com.gala.video.app.epg.home.data.core.HomeDataTaskFactory.makeUpRefreshTimeTaskAction(r2);\t Catch:{ all -> 0x0043 }\n r2 = com.gala.video.app.epg.home.data.hdata.DataRequestTaskStrategy.getInstance();\t Catch:{ all -> 0x0043 }\n r2.addTask(r0);\t Catch:{ all -> 0x0043 }\n goto L_0x0037;\n L_0x0058:\n r7.executeHomeGroupTasks();\t Catch:{ all -> 0x0043 }\n goto L_0x0037;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.gala.video.app.epg.home.data.hdata.DataRequestRouter.next(int):void\");\n }", "public int setCarrierLevelInfo1(AascShipmentHeaderInfo aascShipmentHeaderInfo, \n AascShipmentPackageInfo aascPackageBean, \n AascShipMethodInfo aascShipMethodInfo, \n String chkReturnlabel) {\n\n logger.info(\"Entered setCarrierLevelInfo() method\");\n String intFlag = \n nullStrToSpc(aascShipmentHeaderInfo.getInternationalFlag());\n // AascShipmentPackageInfo aascPackageInfo = aascPackageBean;\n String shipMethod = \"\";\n String declaredValueInternal = \"\";\n if (chkReturnlabel.equalsIgnoreCase(\"NONRETURN\")) {\n shipMethodName = \n nullStrToSpc(aascShipmentHeaderInfo.getShipMethodMeaning()); // retreiving ship method meaning from header bean\n\n carrierCode = aascShipMethodInfo.getCarrierName(shipMethodName);\n\n customerCarrierAccountNumber = \n aascShipmentHeaderInfo.getCarrierAccountNumber(); // FedEx Account number of the client\n\n\n shipMethod = service;\n declaredValueInternal = packageDeclaredValueStr;\n } else {\n\n String shipMethodNameRtn = \n nullStrToSpc(aascPackageBean.getRtnShipMethod()); // retreiving ship method meaning from header bean\n\n carrierCode = aascShipMethodInfo.getCarrierName(shipMethodNameRtn);\n\n customerCarrierAccountNumber = \n rtnACNumber; // FedEx Account number of the client\n carrierPayMethod = rtnPayMethod;\n\n String carrierPaymentTermsStr = \n aascShipMethodInfo.getCarrierPaymentTerm(rtnPayMethodCode);\n\n carrierPayMethodCode = \n aascShipMethodInfo.getCarrierPayCode(carrierPaymentTermsStr);\n\n\n shipMethod = rtnShipMethod;\n declaredValueInternal = rtnPackageDeclaredValueStr;\n }\n\n if (carrierCode.equalsIgnoreCase(\"FDXE\") && \n carrierPayMethodCode.equalsIgnoreCase(\"FC\")) {\n aascShipmentHeaderInfo.setMainError(\"bill to type of collect is for ground services only \");\n responseStatus = 151;\n return responseStatus;\n }\n //*********************\n if (carrierCode.equalsIgnoreCase(\"FDXG\") && \n shipMethod.equalsIgnoreCase(\"GROUNDHOMEDELIVERY\")) {\n\n residentialTag = \"<ResidentialDelivery>true</ResidentialDelivery>\";\n } else {\n residentialTag = \"\";\n }\n\n //*********************\n if (chkReturnlabel.equalsIgnoreCase(\"NONRETURN\")) {\n if (codFlag.equalsIgnoreCase(\"Y\")) {\n codAmt = aascPackageBean.getCodAmt();\n\n codAmtStr = String.valueOf(codAmt);\n\n index = codAmtStr.indexOf(\".\");\n\n\n if (index < 1) {\n codAmtStr = codAmtStr + \".00\";\n\n } else if ((codAmtStr.length() - index) > 2) {\n codAmtStr = codAmtStr.substring(0, index + 3);\n\n } else {\n while (codAmtStr.length() != (index + 3)) {\n codAmtStr = codAmtStr + \"0\";\n\n }\n }\n packageSequenceTest = \n nullStrToSpc(aascPackageBean.getPackageSequence());\n if (carrierCode.equalsIgnoreCase(\"FDXE\") && size != 1 && \n !(packageSequenceTest.equalsIgnoreCase(\"1\"))) {\n\n if (shipFlag.equalsIgnoreCase(\"Y\")) {\n\n codTrackingNum = \n aascShipmentHeaderInfo.getCodTrackingNumber();\n } else {\n\n codTrackingNum = \n nullStrToSpc((String)hashMap.get(\"codTrackingNum\"));\n }\n\n\n \n codReturnTrackingTag = \n \"<CODReturn><TrackingNumber>\" + codTrackingNum + \n \"</TrackingNumber></CODReturn>\";\n }\n\n codTag = \n \"<COD>\" + \"<CollectionAmount>\" + codAmtStr + \"</CollectionAmount>\" + \n \"<CollectionType>ANY</CollectionType>\" + \n codReturnTrackingTag + \"</COD>\";\n } else {\n codTag = \"\";\n }\n //******************\n\n if (!packageCount.equalsIgnoreCase(\"1\")) {\n\n shipmentWeight = \n nullStrToSpc(String.valueOf(aascPackageBean.getWeight()));\n\n \n\n if (packageSequence.equalsIgnoreCase(\"1\")) {\n if (carrierCode.equalsIgnoreCase(\"FDXG\") || \n (carrierCode.equalsIgnoreCase(\"FDXE\") && \n codFlag.equalsIgnoreCase(\"Y\")) || \n (carrierCode.equalsIgnoreCase(\"FDXE\") && \n intFlag.equalsIgnoreCase(\"Y\"))) {\n shipMultiPieceFlag = 1;\n }\n\n masterTrackingNumber = \"\";\n masterFormID = \"\";\n /*shipWtTag = \"<ShipmentWeight>\"\n + aascShipmentHeaderInfo.getPackaging()\n + \"</ShipmentWeight>\";*/\n } else {\n if (shipFlag.equalsIgnoreCase(\"Y\")) {\n masterTrackingNumber = \n nullStrToSpc(String.valueOf(aascShipmentHeaderInfo.getWayBill()));\n masterFormID = \n nullStrToSpc(String.valueOf(aascShipmentHeaderInfo.getMasterFormId()));\n \n shipWtTag = \"\";\n } else {\n masterTrackingNumber = \n nullStrToSpc((String)hashMap.get(\"masterTrkNum\"));\n //26/07/07(start)\n if (masterTrackingNumber == \"\" || \n masterTrackingNumber.equalsIgnoreCase(\"\")) {\n masterTrackingNumber = \n nullStrToSpc(String.valueOf(aascShipmentHeaderInfo.getWayBill()));\n }\n //26/07/07(end)\n masterFormID = \n nullStrToSpc((String)hashMap.get(\"masterFormId\"));\n shipWtTag = \"\";\n }\n }\n\n if (shipMultiPieceFlag == \n 1) { // \"<ShipmentWeight>\"+aascShipmentHeaderInfo.getPackageWeight()+\"</ShipmentWeight>\"+\n part1 = \n \"<MultiPiece>\" + \"<PackageCount>\" + packageCount + \"</PackageCount>\" + \n \"<PackageSequenceNumber>\" + packageSequence + \n \"</PackageSequenceNumber>\" + shipWtTag + \n \"<MasterTrackingNumber>\" + masterTrackingNumber + \n \"</MasterTrackingNumber>\";\n part2 = \"\";\n if (carrierCode.equalsIgnoreCase(\"FDXE\")) {\n part2 = \n \"<MasterFormID>\" + masterFormID + \"</MasterFormID></MultiPiece>\";\n } else {\n part2 = \"</MultiPiece>\";\n }\n\n header4 = part1 + part2;\n }\n\n else {\n header4 = \"\";\n }\n }\n } else {\n codTag = \"\";\n header4 = \"\";\n }\n //**********************\n\n if (!signatureOptions.equalsIgnoreCase(\"NONE\")) {\n signatureOptionString = \n \"<SignatureOption>\" + signatureOptions + \"</SignatureOption>\";\n } else {\n signatureOptionString = \"\";\n }\n\n // added for package options\n // added for package options\n // added for package options\n header7 = \n \"<DeclaredValue>\" + declaredValueInternal + \"</DeclaredValue>\" + \n \"<SpecialServices>\" + signatureOptionString + dryIceTag +\n \"<FutureDayShipment>\" + futureDayShipment + \n \"</FutureDayShipment>\" + codTag + residentialTag + \n satShipFlagTag + hal + HazMat + \n \"</SpecialServices>\"; // added for package options\n\n\n //********************\n\n\n if (carrierCode.equalsIgnoreCase(\"FDXG\") && \n shipMethod.equalsIgnoreCase(\"GROUNDHOMEDELIVERY\")) {\n\n residentialTag = \"<ResidentialDelivery>true</ResidentialDelivery>\";\n } else {\n residentialTag = \"\";\n }\n //********************\n\n if (carrierCode.equalsIgnoreCase(\"FDXE\") && \n satShipFlag.equalsIgnoreCase(\"Y\")) {\n satShipFlag = \"1\";\n\n satShipFlagTag = \n \"<SaturdayDelivery>\" + satShipFlag + \"</SaturdayDelivery>\";\n } else {\n satShipFlagTag = \"\";\n }\n logger.info(\"Exit from setCarrierLevelInfo() method\");\n return responseStatus;\n\n }", "public void request() {\n /*\n r11 = this;\n r0 = 0\n r11.mResponse = r0\n java.lang.String r1 = r11.mUrlString\n java.lang.StringBuilder r2 = new java.lang.StringBuilder\n r2.<init>()\n r3 = 0\n r5 = r0\n r4 = 0\n L_0x000d:\n r6 = 1\n java.lang.String r7 = \"DistanceConfigFetcher\"\n if (r4 == 0) goto L_0x002a\n r1 = 2\n java.lang.Object[] r1 = new java.lang.Object[r1]\n java.lang.String r8 = r11.mUrlString\n r1[r3] = r8\n java.lang.String r8 = \"Location\"\n java.lang.String r9 = r5.getHeaderField(r8)\n r1[r6] = r9\n java.lang.String r9 = \"Following redirect from %s to %s\"\n org.altbeacon.beacon.logging.LogManager.d(r7, r9, r1)\n java.lang.String r1 = r5.getHeaderField(r8)\n L_0x002a:\n int r4 = r4 + 1\n r8 = -1\n r11.mResponseCode = r8\n java.net.URL r8 = new java.net.URL // Catch:{ Exception -> 0x0035 }\n r8.<init>(r1) // Catch:{ Exception -> 0x0035 }\n goto L_0x0044\n L_0x0035:\n r8 = move-exception\n java.lang.Object[] r9 = new java.lang.Object[r6]\n java.lang.String r10 = r11.mUrlString\n r9[r3] = r10\n java.lang.String r10 = \"Can't construct URL from: %s\"\n org.altbeacon.beacon.logging.LogManager.e(r7, r10, r9)\n r11.mException = r8\n r8 = r0\n L_0x0044:\n if (r8 != 0) goto L_0x004e\n java.lang.Object[] r6 = new java.lang.Object[r3]\n java.lang.String r8 = \"URL is null. Cannot make request\"\n org.altbeacon.beacon.logging.LogManager.d(r7, r8, r6)\n goto L_0x00a0\n L_0x004e:\n java.net.URLConnection r8 = r8.openConnection() // Catch:{ SecurityException -> 0x0093, FileNotFoundException -> 0x0086, IOException -> 0x0079 }\n java.net.HttpURLConnection r8 = (java.net.HttpURLConnection) r8 // Catch:{ SecurityException -> 0x0093, FileNotFoundException -> 0x0086, IOException -> 0x0079 }\n java.lang.String r5 = \"User-Agent\"\n java.lang.String r9 = r11.mUserAgentString // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n r8.addRequestProperty(r5, r9) // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n int r5 = r8.getResponseCode() // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n r11.mResponseCode = r5 // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n java.lang.String r5 = \"response code is %s\"\n java.lang.Object[] r6 = new java.lang.Object[r6] // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n int r9 = r8.getResponseCode() // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9) // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n r6[r3] = r9 // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n org.altbeacon.beacon.logging.LogManager.d(r7, r5, r6) // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n goto L_0x009f\n L_0x0073:\n r5 = move-exception\n goto L_0x007c\n L_0x0075:\n r5 = move-exception\n goto L_0x0089\n L_0x0077:\n r5 = move-exception\n goto L_0x0096\n L_0x0079:\n r6 = move-exception\n r8 = r5\n r5 = r6\n L_0x007c:\n java.lang.Object[] r6 = new java.lang.Object[r3]\n java.lang.String r9 = \"Can't reach server\"\n org.altbeacon.beacon.logging.LogManager.w(r5, r7, r9, r6)\n r11.mException = r5\n goto L_0x009f\n L_0x0086:\n r6 = move-exception\n r8 = r5\n r5 = r6\n L_0x0089:\n java.lang.Object[] r6 = new java.lang.Object[r3]\n java.lang.String r9 = \"No data exists at \\\"+urlString\"\n org.altbeacon.beacon.logging.LogManager.w(r5, r7, r9, r6)\n r11.mException = r5\n goto L_0x009f\n L_0x0093:\n r6 = move-exception\n r8 = r5\n r5 = r6\n L_0x0096:\n java.lang.Object[] r6 = new java.lang.Object[r3]\n java.lang.String r9 = \"Can't reach sever. Have you added android.permission.INTERNET to your manifest?\"\n org.altbeacon.beacon.logging.LogManager.w(r5, r7, r9, r6)\n r11.mException = r5\n L_0x009f:\n r5 = r8\n L_0x00a0:\n r6 = 10\n if (r4 >= r6) goto L_0x00b2\n int r6 = r11.mResponseCode\n r8 = 302(0x12e, float:4.23E-43)\n if (r6 == r8) goto L_0x000d\n r8 = 301(0x12d, float:4.22E-43)\n if (r6 == r8) goto L_0x000d\n r8 = 303(0x12f, float:4.25E-43)\n if (r6 == r8) goto L_0x000d\n L_0x00b2:\n java.lang.Exception r0 = r11.mException\n if (r0 != 0) goto L_0x00e2\n java.io.BufferedReader r0 = new java.io.BufferedReader // Catch:{ Exception -> 0x00d8 }\n java.io.InputStreamReader r1 = new java.io.InputStreamReader // Catch:{ Exception -> 0x00d8 }\n java.io.InputStream r4 = r5.getInputStream() // Catch:{ Exception -> 0x00d8 }\n r1.<init>(r4) // Catch:{ Exception -> 0x00d8 }\n r0.<init>(r1) // Catch:{ Exception -> 0x00d8 }\n L_0x00c4:\n java.lang.String r1 = r0.readLine() // Catch:{ Exception -> 0x00d8 }\n if (r1 == 0) goto L_0x00ce\n r2.append(r1) // Catch:{ Exception -> 0x00d8 }\n goto L_0x00c4\n L_0x00ce:\n r0.close() // Catch:{ Exception -> 0x00d8 }\n java.lang.String r0 = r2.toString() // Catch:{ Exception -> 0x00d8 }\n r11.mResponse = r0 // Catch:{ Exception -> 0x00d8 }\n goto L_0x00e2\n L_0x00d8:\n r0 = move-exception\n r11.mException = r0\n java.lang.Object[] r1 = new java.lang.Object[r3]\n java.lang.String r2 = \"error reading beacon data\"\n org.altbeacon.beacon.logging.LogManager.w(r0, r7, r2, r1)\n L_0x00e2:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.altbeacon.beacon.distance.DistanceConfigFetcher.request():void\");\n }", "PaulEigon() {\n\treadCurrentPingisState();\n\tscanState();\n\tprintResult();\n }", "Long tempProcessPoint(OrderDTO orderDTO, RouteDTO routeDTO, RoutePointDTO routePointDTO);", "public static void main(String[] args) {\n\t\tSystem.out.println(zipZap(((\"azbcpppzop\") ) ));\n\t}", "private final int zza(T r18, byte[] r19, int r20, int r21, int r22, int r23, int r24, int r25, int r26, long r27, int r29, com.google.android.gms.internal.clearcut.zzay r30) throws java.io.IOException {\n /*\n r17 = this;\n r0 = r17;\n r1 = r18;\n r3 = r19;\n r4 = r20;\n r2 = r22;\n r8 = r23;\n r5 = r24;\n r9 = r27;\n r6 = r29;\n r11 = r30;\n r12 = zzmh;\n r7 = r0.zzmi;\n r13 = r6 + 2;\n r7 = r7[r13];\n r13 = 1048575; // 0xfffff float:1.469367E-39 double:5.18065E-318;\n r7 = r7 & r13;\n r13 = (long) r7;\n r7 = 5;\n r15 = 2;\n switch(r26) {\n case 51: goto L_0x0168;\n case 52: goto L_0x0158;\n case 53: goto L_0x0148;\n case 54: goto L_0x0148;\n case 55: goto L_0x013b;\n case 56: goto L_0x012f;\n case 57: goto L_0x0124;\n case 58: goto L_0x010e;\n case 59: goto L_0x00e2;\n case 60: goto L_0x00bc;\n case 61: goto L_0x00a4;\n case 62: goto L_0x013b;\n case 63: goto L_0x0076;\n case 64: goto L_0x0124;\n case 65: goto L_0x012f;\n case 66: goto L_0x0068;\n case 67: goto L_0x005a;\n case 68: goto L_0x0028;\n default: goto L_0x0026;\n };\n L_0x0026:\n goto L_0x017c;\n L_0x0028:\n r7 = 3;\n if (r5 != r7) goto L_0x017c;\n L_0x002b:\n r2 = r2 & -8;\n r7 = r2 | 4;\n r2 = r0.zzad(r6);\n r3 = r19;\n r4 = r20;\n r5 = r21;\n r6 = r7;\n r7 = r30;\n r2 = zza(r2, r3, r4, r5, r6, r7);\n r3 = r12.getInt(r1, r13);\n if (r3 != r8) goto L_0x004b;\n L_0x0046:\n r15 = r12.getObject(r1, r9);\n goto L_0x004c;\n L_0x004b:\n r15 = 0;\n L_0x004c:\n if (r15 != 0) goto L_0x0052;\n L_0x004e:\n r3 = r11.zzff;\n goto L_0x0154;\n L_0x0052:\n r3 = r11.zzff;\n r3 = com.google.android.gms.internal.clearcut.zzci.zza(r15, r3);\n goto L_0x0154;\n L_0x005a:\n if (r5 != 0) goto L_0x017c;\n L_0x005c:\n r2 = com.google.android.gms.internal.clearcut.zzax.zzb(r3, r4, r11);\n r3 = r11.zzfe;\n r3 = com.google.android.gms.internal.clearcut.zzbk.zza(r3);\n goto L_0x0150;\n L_0x0068:\n if (r5 != 0) goto L_0x017c;\n L_0x006a:\n r2 = com.google.android.gms.internal.clearcut.zzax.zza(r3, r4, r11);\n r3 = r11.zzfd;\n r3 = com.google.android.gms.internal.clearcut.zzbk.zzm(r3);\n goto L_0x0143;\n L_0x0076:\n if (r5 != 0) goto L_0x017c;\n L_0x0078:\n r3 = com.google.android.gms.internal.clearcut.zzax.zza(r3, r4, r11);\n r4 = r11.zzfd;\n r5 = r0.zzaf(r6);\n if (r5 == 0) goto L_0x009a;\n L_0x0084:\n r5 = r5.zzb(r4);\n if (r5 == 0) goto L_0x008b;\n L_0x008a:\n goto L_0x009a;\n L_0x008b:\n r1 = zzn(r18);\n r4 = (long) r4;\n r4 = java.lang.Long.valueOf(r4);\n r1.zzb(r2, r4);\n r2 = r3;\n goto L_0x017d;\n L_0x009a:\n r2 = java.lang.Integer.valueOf(r4);\n r12.putObject(r1, r9, r2);\n r2 = r3;\n goto L_0x0178;\n L_0x00a4:\n if (r5 != r15) goto L_0x017c;\n L_0x00a6:\n r2 = com.google.android.gms.internal.clearcut.zzax.zza(r3, r4, r11);\n r4 = r11.zzfd;\n if (r4 != 0) goto L_0x00b2;\n L_0x00ae:\n r3 = com.google.android.gms.internal.clearcut.zzbb.zzfi;\n goto L_0x0154;\n L_0x00b2:\n r3 = com.google.android.gms.internal.clearcut.zzbb.zzb(r3, r2, r4);\n r12.putObject(r1, r9, r3);\n L_0x00b9:\n r2 = r2 + r4;\n goto L_0x0178;\n L_0x00bc:\n if (r5 != r15) goto L_0x017c;\n L_0x00be:\n r2 = r0.zzad(r6);\n r5 = r21;\n r2 = zza(r2, r3, r4, r5, r11);\n r3 = r12.getInt(r1, r13);\n if (r3 != r8) goto L_0x00d3;\n L_0x00ce:\n r15 = r12.getObject(r1, r9);\n goto L_0x00d4;\n L_0x00d3:\n r15 = 0;\n L_0x00d4:\n if (r15 != 0) goto L_0x00da;\n L_0x00d6:\n r3 = r11.zzff;\n goto L_0x0154;\n L_0x00da:\n r3 = r11.zzff;\n r3 = com.google.android.gms.internal.clearcut.zzci.zza(r15, r3);\n goto L_0x0154;\n L_0x00e2:\n if (r5 != r15) goto L_0x017c;\n L_0x00e4:\n r2 = com.google.android.gms.internal.clearcut.zzax.zza(r3, r4, r11);\n r4 = r11.zzfd;\n if (r4 != 0) goto L_0x00ef;\n L_0x00ec:\n r3 = \"\";\n goto L_0x0154;\n L_0x00ef:\n r5 = 536870912; // 0x20000000 float:1.0842022E-19 double:2.652494739E-315;\n r5 = r25 & r5;\n if (r5 == 0) goto L_0x0103;\n L_0x00f5:\n r5 = r2 + r4;\n r5 = com.google.android.gms.internal.clearcut.zzff.zze(r3, r2, r5);\n if (r5 == 0) goto L_0x00fe;\n L_0x00fd:\n goto L_0x0103;\n L_0x00fe:\n r1 = com.google.android.gms.internal.clearcut.zzco.zzbp();\n throw r1;\n L_0x0103:\n r5 = new java.lang.String;\n r6 = com.google.android.gms.internal.clearcut.zzci.UTF_8;\n r5.<init>(r3, r2, r4, r6);\n r12.putObject(r1, r9, r5);\n goto L_0x00b9;\n L_0x010e:\n if (r5 != 0) goto L_0x017c;\n L_0x0110:\n r2 = com.google.android.gms.internal.clearcut.zzax.zzb(r3, r4, r11);\n r3 = r11.zzfe;\n r5 = 0;\n r7 = (r3 > r5 ? 1 : (r3 == r5 ? 0 : -1));\n if (r7 == 0) goto L_0x011e;\n L_0x011c:\n r15 = 1;\n goto L_0x011f;\n L_0x011e:\n r15 = 0;\n L_0x011f:\n r3 = java.lang.Boolean.valueOf(r15);\n goto L_0x0154;\n L_0x0124:\n if (r5 != r7) goto L_0x017c;\n L_0x0126:\n r2 = com.google.android.gms.internal.clearcut.zzax.zzc(r19, r20);\n r2 = java.lang.Integer.valueOf(r2);\n goto L_0x0162;\n L_0x012f:\n r2 = 1;\n if (r5 != r2) goto L_0x017c;\n L_0x0132:\n r2 = com.google.android.gms.internal.clearcut.zzax.zzd(r19, r20);\n r2 = java.lang.Long.valueOf(r2);\n goto L_0x0173;\n L_0x013b:\n if (r5 != 0) goto L_0x017c;\n L_0x013d:\n r2 = com.google.android.gms.internal.clearcut.zzax.zza(r3, r4, r11);\n r3 = r11.zzfd;\n L_0x0143:\n r3 = java.lang.Integer.valueOf(r3);\n goto L_0x0154;\n L_0x0148:\n if (r5 != 0) goto L_0x017c;\n L_0x014a:\n r2 = com.google.android.gms.internal.clearcut.zzax.zzb(r3, r4, r11);\n r3 = r11.zzfe;\n L_0x0150:\n r3 = java.lang.Long.valueOf(r3);\n L_0x0154:\n r12.putObject(r1, r9, r3);\n goto L_0x0178;\n L_0x0158:\n if (r5 != r7) goto L_0x017c;\n L_0x015a:\n r2 = com.google.android.gms.internal.clearcut.zzax.zzf(r19, r20);\n r2 = java.lang.Float.valueOf(r2);\n L_0x0162:\n r12.putObject(r1, r9, r2);\n r2 = r4 + 4;\n goto L_0x0178;\n L_0x0168:\n r2 = 1;\n if (r5 != r2) goto L_0x017c;\n L_0x016b:\n r2 = com.google.android.gms.internal.clearcut.zzax.zze(r19, r20);\n r2 = java.lang.Double.valueOf(r2);\n L_0x0173:\n r12.putObject(r1, r9, r2);\n r2 = r4 + 8;\n L_0x0178:\n r12.putInt(r1, r13, r8);\n goto L_0x017d;\n L_0x017c:\n r2 = r4;\n L_0x017d:\n return r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.clearcut.zzds.zza(java.lang.Object, byte[], int, int, int, int, int, int, int, long, int, com.google.android.gms.internal.clearcut.zzay):int\");\n }", "public ArrayList<Coordinate> transportLinePath()\r\n {\r\n Coordinate next_street1 = null;\r\n Coordinate next_street2 = null;\r\n Street next_street = null;\r\n ArrayList<Coordinate> line_coordinates = new ArrayList<Coordinate>();\r\n\r\n for (int i = 0; i < getStreetsMap().size(); i++)\r\n {\r\n Street s = getStreetsMap().get(i);\r\n Coordinate this_street1 = s.getCoordinates().get(0);\r\n Coordinate this_street2 = s.getCoordinates().get(2);\r\n\r\n if (i + 1 < getStreetsMap().size())\r\n {\r\n next_street = getStreetsMap().get(i+1);\r\n next_street1 = next_street.getCoordinates().get(0);\r\n next_street2 = next_street.getCoordinates().get(2);\r\n }\r\n else\r\n {\r\n break;\r\n }\r\n\r\n for (Stop stop : getStopsMap())\r\n {\r\n if (stop.getStreet().equals(s))\r\n {\r\n line_coordinates.add(stop.getCoordinate());\r\n }\r\n }\r\n\r\n if (s.getCoordinates().get(1) != null)\r\n {\r\n line_coordinates.add(s.getCoordinates().get(1));\r\n }\r\n\r\n //11\r\n if (this_street1.getX() == next_street1.getX() && this_street1.getY() == next_street1.getY())\r\n {\r\n line_coordinates.add(this_street1);\r\n }\r\n //12\r\n else if (this_street1.getX() == next_street2.getX() && this_street1.getY() == next_street2.getY())\r\n {\r\n line_coordinates.add(this_street1);\r\n }\r\n // 21\r\n else if (this_street2.getX() == next_street1.getX() && this_street2.getY() == next_street1.getY())\r\n {\r\n line_coordinates.add(this_street2);\r\n }\r\n //22\r\n else if (this_street2.getX() == next_street2.getX() && this_street2.getY() == next_street2.getY())\r\n {\r\n line_coordinates.add(this_street2);\r\n }\r\n\r\n }\r\n\r\n line_coordinates.add(getStopsMap().get(getStopsMap().size()-1).getCoordinate());\r\n return line_coordinates;\r\n }", "static void unwrapIP(byte[] packet, int offset) {\n System.out.println(\"---------IP--------------\");\n\n int i = offset;\n\n System.out.println(\"Version : \" + ((packet[i] & 0xF0) >> 4));\n System.out.println(\"Header Length : \" + (packet[i] & 0x0F) * 4 + \" bytes\");\n int interHeaderLength = packet[i] & 0x0F;\n i += 1;\n\n String[] precedenceValues = {\"Routine\", \"Priority\", \"Immediate\", \"Flash\", \"Flash Override\", \"Critical\",\n \"Internetwork Control\", \"Network Control\"};\n System.out.println(\"Type of Service : \" + String.format(\"0x%02x\", Byte.toUnsignedInt(packet[i])));\n int precedenceNumber = ((packet[i] & 0b11100000) >> 5);\n int delay = ((packet[i] & 0b00010000) >> 4);\n int throughput = ((packet[i] & 0b00001000) >> 3);\n int reliability = ((packet[i] & 0b00000100) >> 2);\n int cost = ((packet[i] & 0b00000010) >> 1);\n int mbz = ((packet[i] & 0b00000001) >> 4);\n System.out.println(\"\\t xxx. .... = \" + precedenceNumber + \"(\" + precedenceValues[precedenceNumber] + \") (Precedence) \");\n System.out.printf(\"\\t ...%d .... = %s\\n\", delay, (delay == 0 ? \"Normal Delay\" : \"Low Delay\"));\n System.out.printf(\"\\t .... %d... = %s\\n\", throughput, (throughput == 0 ? \"Normal Throughput\" : \"High Throughput\"));\n System.out.printf(\"\\t .... .%d.. = %s\\n\", reliability, (reliability == 0 ? \"Normal Reliability\" : \"High Relia\"));\n System.out.printf(\"\\t .... ..%d. = %s\\n\", cost, (cost == 0 ? \"Normal Cost\" : \"Low Cost\"));\n System.out.printf(\"\\t .... ...%d = %s\\n\", mbz, \"Checking bit\");\n i += 1;\n\n System.out.println(\"Total Length : \" + getNextNBytesLong(packet, i, 2) + \" bytes\");\n i += 2;\n System.out.println(\"Identification : \" + getNextNBytesLong(packet, i, 2));\n i += 2;\n\n System.out.println(\"Flags : \" + String.format(\"0x%02X\", (packet[i] & 0b11100000) >> 5));\n int doFrag = ((packet[i] & 0b01000000) >> 6);\n int moreFrag = ((packet[i] & 0b00100000) >> 5);\n System.out.printf(\".%d.. .... = %s\\n\", doFrag, (doFrag == 0 ? \"ok to fragment \" : \"do not fragment\"));\n System.out.printf(\"..%d. .... = %s\\n\", moreFrag, (moreFrag == 1 ? \"more fragments \" : \"last fragment\"));\n\n System.out.println(\"Fragment Offset = \" +\n (((Byte.toUnsignedInt(packet[i]) & 0b00011111) << (3 + 8)) +\n Byte.toUnsignedInt(packet[i + 1]) + \" bytes\")\n );\n i += 2;\n\n System.out.println(\"Time to live: \" + Byte.toUnsignedInt(packet[i]) + \" seconds/hop\");\n i += 1;\n\n // Assuming only ICMP, TCP and UDP packets exist\n String packetProtocol = (packet[i] == 17 ? \"UDP\" : packet[i] == 1 ? \"ICMP\" : \"TCP\");\n System.out.println(\"Protocol : \" + packet[i] + \" (\" + packetProtocol + \")\");\n i += 1;\n\n System.out.println(\"Header Checksum : 0x\" + getNextNBytesHex(packet, i, 2));\n i += 2;\n\n offset = i + 4;\n System.out.print(\"Source Address: \");\n for (; i < offset; i++) {\n System.out.print(Byte.toUnsignedInt(packet[i]) + (i + 1 == offset ? \"\\n\" : \".\"));\n }\n\n offset = i + 4;\n System.out.print(\"Destination Address: \");\n for (; i < offset; i++) {\n System.out.print(Byte.toUnsignedInt(packet[i]) + (i + 1 == offset ? \"\\n\" : \".\"));\n }\n\n if (interHeaderLength > 5) {\n System.exit(42);//TODO add options\n } else {\n System.out.println(\"No Options\");\n }\n\n switch (packetProtocol) {\n case \"UDP\":\n unwrapUDP(packet, offset);\n break;\n case \"TCP\":\n unwrapTCP(packet, offset);\n break;\n case \"ICMP\":\n unwrapICMP(packet, offset);\n break;\n default:\n System.out.println(\"Unknown protocol\");\n System.exit(42);\n }\n }", "public static void main(String[] args) throws Exception {\r\n ZipDatabase zipDB = new ZipDatabase();\r\n\r\n BufferedReader br = \r\n new BufferedReader(new InputStreamReader(System.in));\r\n while (true) {\r\n System.out.print(\"Enter zip: \");\r\n String zip = br.readLine();\r\n System.out.println(\"Input: \" + zip);\r\n\r\n ZipInfo info = zipDB.lookup(zip);\r\n System.out.println(\"Output: \" + info);\r\n }\r\n }", "int FE_Extract(byte[] data1, int w1, int h1,\n int step1, byte[] buffer);", "protected abstract String getUpDateZip();", "void onUnzipCompleted(String output);", "public final void zza(java.lang.String r8, int r9, int r10, int r11, int r12, int[] r13) throws com.google.android.gms.internal.ads.zzis {\n /*\n r7 = this;\n java.lang.String r12 = \"audio/raw\"\n boolean r12 = r12.equals(r8)\n r0 = 1\n r12 = r12 ^ r0\n if (r12 == 0) goto L_0x000f\n int r8 = zzaz(r8)\n goto L_0x0010\n L_0x000f:\n r8 = r11\n L_0x0010:\n r1 = 0\n if (r12 != 0) goto L_0x004a\n int r11 = com.google.android.gms.internal.ads.zzpq.zzg(r11, r9)\n r7.zzakr = r11\n com.google.android.gms.internal.ads.zziz r11 = r7.zzajq\n r11.zzb(r13)\n com.google.android.gms.internal.ads.zzie[] r11 = r7.zzajs\n int r13 = r11.length\n r2 = 0\n r3 = 0\n L_0x0023:\n if (r2 >= r13) goto L_0x0044\n r4 = r11[r2]\n boolean r5 = r4.zzb(r10, r9, r8) // Catch:{ zzih -> 0x003d }\n r3 = r3 | r5\n boolean r5 = r4.isActive()\n if (r5 == 0) goto L_0x003a\n int r9 = r4.zzfj()\n int r8 = r4.zzfk()\n L_0x003a:\n int r2 = r2 + 1\n goto L_0x0023\n L_0x003d:\n r8 = move-exception\n com.google.android.gms.internal.ads.zzis r9 = new com.google.android.gms.internal.ads.zzis\n r9.<init>((java.lang.Throwable) r8)\n throw r9\n L_0x0044:\n if (r3 == 0) goto L_0x004b\n r7.zzfn()\n goto L_0x004b\n L_0x004a:\n r3 = 0\n L_0x004b:\n r11 = 252(0xfc, float:3.53E-43)\n r13 = 12\n switch(r9) {\n case 1: goto L_0x0080;\n case 2: goto L_0x007d;\n case 3: goto L_0x007a;\n case 4: goto L_0x0077;\n case 5: goto L_0x0074;\n case 6: goto L_0x0071;\n case 7: goto L_0x006e;\n case 8: goto L_0x006b;\n default: goto L_0x0052;\n }\n L_0x0052:\n com.google.android.gms.internal.ads.zzis r8 = new com.google.android.gms.internal.ads.zzis\n r10 = 38\n java.lang.StringBuilder r11 = new java.lang.StringBuilder\n r11.<init>(r10)\n java.lang.String r10 = \"Unsupported channel count: \"\n r11.append(r10)\n r11.append(r9)\n java.lang.String r9 = r11.toString()\n r8.<init>((java.lang.String) r9)\n throw r8\n L_0x006b:\n int r2 = com.google.android.gms.internal.ads.zzha.CHANNEL_OUT_7POINT1_SURROUND\n goto L_0x0081\n L_0x006e:\n r2 = 1276(0x4fc, float:1.788E-42)\n goto L_0x0081\n L_0x0071:\n r2 = 252(0xfc, float:3.53E-43)\n goto L_0x0081\n L_0x0074:\n r2 = 220(0xdc, float:3.08E-43)\n goto L_0x0081\n L_0x0077:\n r2 = 204(0xcc, float:2.86E-43)\n goto L_0x0081\n L_0x007a:\n r2 = 28\n goto L_0x0081\n L_0x007d:\n r2 = 12\n goto L_0x0081\n L_0x0080:\n r2 = 4\n L_0x0081:\n int r4 = com.google.android.gms.internal.ads.zzpq.SDK_INT\n r5 = 23\n r6 = 5\n if (r4 > r5) goto L_0x00a8\n java.lang.String r4 = com.google.android.gms.internal.ads.zzpq.DEVICE\n java.lang.String r5 = \"foster\"\n boolean r4 = r5.equals(r4)\n if (r4 == 0) goto L_0x00a8\n java.lang.String r4 = com.google.android.gms.internal.ads.zzpq.MANUFACTURER\n java.lang.String r5 = \"NVIDIA\"\n boolean r4 = r5.equals(r4)\n if (r4 == 0) goto L_0x00a8\n r4 = 3\n if (r9 == r4) goto L_0x00a9\n if (r9 == r6) goto L_0x00a9\n r11 = 7\n if (r9 == r11) goto L_0x00a5\n goto L_0x00a8\n L_0x00a5:\n int r11 = com.google.android.gms.internal.ads.zzha.CHANNEL_OUT_7POINT1_SURROUND\n goto L_0x00a9\n L_0x00a8:\n r11 = r2\n L_0x00a9:\n int r2 = com.google.android.gms.internal.ads.zzpq.SDK_INT\n r4 = 25\n if (r2 > r4) goto L_0x00be\n java.lang.String r2 = com.google.android.gms.internal.ads.zzpq.DEVICE\n java.lang.String r4 = \"fugu\"\n boolean r2 = r4.equals(r2)\n if (r2 == 0) goto L_0x00be\n if (r12 == 0) goto L_0x00be\n if (r9 != r0) goto L_0x00be\n goto L_0x00bf\n L_0x00be:\n r13 = r11\n L_0x00bf:\n if (r3 != 0) goto L_0x00d4\n boolean r11 = r7.isInitialized()\n if (r11 == 0) goto L_0x00d4\n int r11 = r7.zzaka\n if (r11 != r8) goto L_0x00d4\n int r11 = r7.zzahn\n if (r11 != r10) goto L_0x00d4\n int r11 = r7.zzajz\n if (r11 != r13) goto L_0x00d4\n return\n L_0x00d4:\n r7.reset()\n r7.zzaka = r8\n r7.zzakc = r12\n r7.zzahn = r10\n r7.zzajz = r13\n r11 = 2\n if (r12 == 0) goto L_0x00e3\n goto L_0x00e4\n L_0x00e3:\n r8 = 2\n L_0x00e4:\n r7.zzakb = r8\n int r8 = com.google.android.gms.internal.ads.zzpq.zzg(r11, r9)\n r7.zzaku = r8\n if (r12 == 0) goto L_0x00fd\n int r8 = r7.zzakb\n if (r8 == r6) goto L_0x00fa\n r9 = 6\n if (r8 != r9) goto L_0x00f6\n goto L_0x00fa\n L_0x00f6:\n r8 = 49152(0xc000, float:6.8877E-41)\n goto L_0x0133\n L_0x00fa:\n r8 = 20480(0x5000, float:2.8699E-41)\n goto L_0x0133\n L_0x00fd:\n int r8 = r7.zzakb\n int r8 = android.media.AudioTrack.getMinBufferSize(r10, r13, r8)\n r9 = -2\n if (r8 == r9) goto L_0x0107\n goto L_0x0108\n L_0x0107:\n r0 = 0\n L_0x0108:\n com.google.android.gms.internal.ads.zzoz.checkState(r0)\n int r9 = r8 << 2\n r10 = 250000(0x3d090, double:1.235164E-318)\n long r10 = r7.zzdx(r10)\n int r11 = (int) r10\n int r10 = r7.zzaku\n int r10 = r10 * r11\n long r0 = (long) r8\n r2 = 750000(0xb71b0, double:3.70549E-318)\n long r2 = r7.zzdx(r2)\n int r8 = r7.zzaku\n long r4 = (long) r8\n long r2 = r2 * r4\n long r0 = java.lang.Math.max(r0, r2)\n int r8 = (int) r0\n if (r9 >= r10) goto L_0x012f\n r8 = r10\n goto L_0x0133\n L_0x012f:\n if (r9 <= r8) goto L_0x0132\n goto L_0x0133\n L_0x0132:\n r8 = r9\n L_0x0133:\n r7.zzakd = r8\n if (r12 == 0) goto L_0x013d\n r8 = -9223372036854775807(0x8000000000000001, double:-4.9E-324)\n goto L_0x0145\n L_0x013d:\n int r9 = r7.zzaku\n int r8 = r8 / r9\n long r8 = (long) r8\n long r8 = r7.zzdw(r8)\n L_0x0145:\n r7.zzake = r8\n com.google.android.gms.internal.ads.zzhu r8 = r7.zzafh\n r7.zzb(r8)\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.zzio.zza(java.lang.String, int, int, int, int, int[]):void\");\n }", "@Override\n public void downloadWeatherDataHourly(String zipCode){\n\n //make request to get the l\n final OkHttpClient okHttpClient;\n final Request request;\n HttpUrl url = new HttpUrl.Builder()\n .scheme(\"https\")\n .host(WEATHER_URL)\n .addPathSegment(\"api\")\n .addPathSegment(KEY)\n .addPathSegment(\"hourly10day\")\n .addPathSegment(\"q\")\n .addPathSegment(zipCode + \".json\")\n .build();\n\n okHttpClient = new OkHttpClient();\n request = new Request.Builder()\n .url(url)\n .build();\n\n okHttpClient.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(@NonNull Call call, @NonNull IOException e) {\n Toast.makeText(context, \"Failed to make connection\", Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onResponse(@NonNull Call call, @NonNull Response response) throws IOException {\n Gson gson = new Gson();\n hourlyWeatherInfo = gson.fromJson(response.body().string(), HourlyWeatherInfo.class);\n view.hourlyWeatherDownloadedUpdateUI(hourlyWeatherInfo);\n }\n });\n\n }", "private static void processZip(File zip_name, final Histogram class_use, final Histogram method_use) {\n ZipFile zip_file;\n try {\n zip_file = new ZipFile(zip_name);\n } catch (Exception e) {\n throw new IllegalStateException(\"while reading archive '\"+zip_name+\"': \"+e);\n }\n final Enumeration< ? extends ZipEntry> en = zip_file.entries();\n while (en.hasMoreElements()) {\n final ZipEntry e = en.nextElement();\n final String e_name = e.getName();\n if (e.isDirectory()) continue;\n if (e_name.endsWith(\".class\")){\n try {\n final InputStream object_stream=zip_file.getInputStream(e);\n MethodCallEnumerator.analyzeClass(object_stream,class_use,method_use);\n object_stream.close();\n } catch (Exception ex) {\n throw new IllegalStateException(\"while processing: \"+ ex);\n }\n } \n }\n try {\n zip_file.close();\n } catch (Exception e) {\n throw new IllegalStateException(\"while reading archive: \" + e);\n }\n }", "public static void main(String[] args) throws Exception {\n yeepayCallBack();\n// refund();\n// URLConnectionTool.readContentFromPost(\"http://117.78.45.101:8083/pay/lycheepay/reconfileDownload\",\"startDate=20170210&endDate=20170224\",\"60000\",\"60000\");\n// testWhiteListUpload();\n// testWhiteListOneQuery();\n// testWhiteListBatcheQuery();\n// onePayRequest();\n// callBack();\n// onePayCheckBookQuery();\n// payWithRouter();\n// batchPayRequest();\n// batchPayStatQuery();\n// batchPayDetailQuery();\n }", "public void travaille();", "static void call_when_parity(String passed){\n\t\tif(P)\n\t\t\tcomplete_call_req(passed.substring(4));\n\t}", "@Override\n public void onArrivedWayPoint(int arg0) {\n\n }", "public interface GpsBandCallBack extends ISyncDataCallback {\n\n public void onGetGpsInfo(GpsSummaryInfo info);\n public void onEphemerisProgressQurey(int progress, String file_name);\n public void onEphemerisProgressReset();\n public void onEphemerisUpdateSuccess();\n public void onCrcCheckResult(int status);\n// public String getEphemerisFilePath();\n\n\n}", "@Override\n\t\tpublic void onGetWalkingRouteResult(WalkingRouteResult walkingrouteresult) {\n\t\t\tnearby_baidumap.clear();// 清除图层覆盖物\n\t\t\tN_showdatainfotv.setText(\"\");\n\t\t\tSB.delete(0, SB.length());\n\t\t\tif (walkingrouteresult == null || walkingrouteresult.error != SearchResult.ERRORNO.NO_ERROR) {\n\t\t\t\tToastUtil.CreateToastShow(navigation, null, \"温馨提示\", \"没有找到合适的路线\");\n\t\t\t}\n\t\t\tif (walkingrouteresult.error == SearchResult.ERRORNO.AMBIGUOUS_ROURE_ADDR) {\n\t\t\t\t// 起终点或途经点地址有岐义,通过以下接口获取建议查询信息\n\t\t\t\t// result.getSuggestAddrInfo()\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (walkingrouteresult.error == SearchResult.ERRORNO.NO_ERROR) {\n\t\t\t\tN_routeline = walkingrouteresult.getRouteLines().get(0);// 第一方案\n\t\t\t\tLog.e(\"L\", \"显示步行\");\n\n\t\t\t\tSB.append(\"起点\\t\\t\" + N_currentaddress).append(\"\\t\\t\\t----\\t\\t\\t\").append(\"终点\\t\\t\" + N_targetaddress)\n\t\t\t\t\t\t.append(\"\\n\\n\");\n\t\t\t\tfor (int i = 0; i < N_routeline.getAllStep().size(); i++) {\n\t\t\t\t\tWalkingRouteLine.WalkingStep step = (WalkingStep) N_routeline.getAllStep().get(i);\n\t\t\t\t\tSB.append(i + \"\\t入口\\t:\" + step.getEntranceInstructions()).append(\"\\t\\t\\t\")\n\t\t\t\t\t\t\t.append(i + \"\\t出口\\t:\" + step.getExitInstructions()).append(\"\\t\\t\\t\");\n\t\t\t\t}\n\n\t\t\t\tN_showdatainfotv.setText(SB);\n\t\t\t\tWalkingOverlayUtil walkingoverlayutil = new WalkingOverlayUtil(nearby_baidumap, navigation);\n\t\t\t\twalkingoverlayutil.setData(walkingrouteresult.getRouteLines().get(0));\n\t\t\t\twalkingoverlayutil.addToMap();\n\t\t\t\twalkingoverlayutil.zoomToSpan();\n\t\t\t}\n\n\t\t}", "@Override\n\t\tpublic void onGetTransitRouteResult(MKTransitRouteResult arg0, int arg1) {\n\t\t\t\n\t\t}", "private void m10265b(String str) {\n if (!TextUtils.isEmpty(str)) {\n final ArrayList arrayList = new ArrayList();\n boolean a = C1849a.m9641a();\n StringBuilder stringBuilder = new StringBuilder(a ? \"http://maps.google.cn/maps/api/elevation/json?path=\" : \"https://maps.googleapis.com/maps/api/elevation/json?path=\");\n stringBuilder.append(str).append(\"&samples=\").append(this.f8993u);\n if (!a) {\n stringBuilder.append(\"&key=AIzaSyC6rtQRpblQN3RWVE3OCK_c8q4QhWVSnfg\");\n }\n this.f8996x.m13745a(new JsonObjectRequest(stringBuilder.toString(), null, new Listener<JSONObject>(this) {\n /* renamed from: b */\n final /* synthetic */ C1998a f8964b;\n\n public /* synthetic */ void onResponse(Object obj) {\n m10245a((JSONObject) obj);\n }\n\n /* renamed from: a */\n public void m10245a(JSONObject jSONObject) {\n if (\"OK\".equals(jSONObject.optString(\"status\"))) {\n JSONArray optJSONArray = jSONObject.optJSONArray(\"results\");\n for (int i = 0; i < optJSONArray.length(); i++) {\n try {\n arrayList.add(Double.valueOf(((JSONObject) optJSONArray.get(i)).optDouble(\"elevation\")));\n } catch (JSONException e) {\n this.f8964b.f8973a.mo3309a(\"get elevation error\", e.getMessage());\n }\n }\n this.f8964b.f8976d.setMaxAltitude(((Double) Collections.max(arrayList)).doubleValue());\n this.f8964b.f8973a.mo3315b(arrayList);\n } else if (\"INVALID_REQUEST\".equals(jSONObject.optString(\"status\"))) {\n this.f8964b.f8973a.mo3309a(\"get elevation error\", this.f8964b.f8974b.getString(C1373R.string.route_elevation_activity_error));\n this.f8964b.m10259a(this.f8964b.f8990r);\n } else {\n this.f8964b.f8973a.mo3309a(\"get elevation error\", this.f8964b.f8974b.getString(C1373R.string.route_elevation_activity_error));\n this.f8964b.m10259a(this.f8964b.f8990r);\n }\n }\n }, new C19945(this)), this.f8974b);\n }\n }", "public Zip_Code GO_Zip_Code(){\n Reusable_Library_Loggers.click(driver,\"//*[@id ='txtZipCodetxt']\",\"clicking on GO\",logger);\n return new Zip_Code(driver);\n\n }", "@Test\n public void test_zipcode() throws Exception {\n matchInvoke(serviceURL, \"PWDDIC_testSearch_zipcode_req.xml\",\n \"PWDDIC_testSearch_zipcode_res.xml\");\n }", "interface RetrofitService {\n\n\n\n @GET(\"api/7453d2c751a72e01/hourly/lang:EN/pws:0/q/02301.json\")\n Call<ForeCastbyHour> responseback();\n //Call<ForeCastbyHour> responseback(@Path(\"zipcode\")int zipcode);\n }", "@Override\r\n\tpublic void onGetTransitRouteResult(MKTransitRouteResult arg0, int arg1) {\n\t\t\r\n\t}", "com.expedia.www.packagefinder.database.exppackage.ExpPackageProtos.flight getFlightdetails();", "public void run(){\n String searchResultString = getUrlContents(directionsRequestUrl);\n try {\n //Turns the response to a JSON object\n JSONObject directionsResultJSON = new JSONObject(searchResultString);\n\n //Parses the JSON object\n JSONArray routesArray = directionsResultJSON.getJSONArray(\"routes\");\n JSONObject route = routesArray.getJSONObject(0);\n\n //Extract the encodedPolylineString\n JSONObject overviewPolylines = route.getJSONObject(\"overview_polyline\");\n polylineEncodedString = overviewPolylines.getString(\"points\");\n\n //Extract the optimized order of the waypoints\n if(route.has(\"waypoint_order\")) {\n //uses this new order to build the orderedDestinations ArrayList\n JSONArray waypoint_order = route.getJSONArray(\"waypoint_order\");\n int[] order = new int[waypoint_order.length()];\n for(int i = 0; i < waypoint_order.length(); i++){\n order[i] = (Integer)waypoint_order.get(i);\n }\n orderedDestinations = calculateOrderedDestinations(order);\n } else {\n orderedDestinations = destinations;\n }\n\n //Inform the message handler that the request was a success\n Message msg = Message.obtain();\n msg.what = 0;\n handler.sendMessage(msg);\n } catch (JSONException e) {\n //error, probably network related\n e.printStackTrace();\n //inform the message handler that the request was a failure\n Message msg = Message.obtain();\n msg.what = 1;\n handler.sendMessage(msg);\n }\n }", "public void showOneZipMarket(String zip){\n Long lZip = ParserUtils.tryCastStrToLong(zip);\n if(lZip.equals(0l) || !propertyInfo.containsKey(lZip)){\n System.out.println(0);\n }else{\n Property pro = propertyInfo.get(lZip);\n System.out.println(lZip+\" \"+pro.calAvgMarket());\n }\n }", "abstract void initZipper(SynchronizationRequest req, Zipper z) \n throws IOException, ConfigException;", "@Override\n\t\tpublic void onGetBusDetailResult(MKBusLineResult arg0, int arg1) {\n\t\t\t\n\t\t}", "public final void zza(T r25, byte[] r26, int r27, int r28, com.google.android.gms.internal.clearcut.zzay r29) throws java.io.IOException {\n /*\n r24 = this;\n r15 = r24;\n r14 = r25;\n r12 = r26;\n r13 = r28;\n r11 = r29;\n r0 = r15.zzmq;\n if (r0 == 0) goto L_0x01e1;\n L_0x000e:\n r9 = zzmh;\n r0 = r27;\n L_0x0012:\n if (r0 >= r13) goto L_0x01d8;\n L_0x0014:\n r1 = r0 + 1;\n r0 = r12[r0];\n if (r0 >= 0) goto L_0x0024;\n L_0x001a:\n r0 = com.google.android.gms.internal.clearcut.zzax.zza(r0, r12, r1, r11);\n r1 = r11.zzfd;\n r10 = r0;\n r16 = r1;\n goto L_0x0027;\n L_0x0024:\n r16 = r0;\n r10 = r1;\n L_0x0027:\n r6 = r16 >>> 3;\n r7 = r16 & 7;\n r8 = r15.zzai(r6);\n if (r8 < 0) goto L_0x01b8;\n L_0x0031:\n r0 = r15.zzmi;\n r1 = r8 + 1;\n r5 = r0[r1];\n r0 = 267386880; // 0xff00000 float:2.3665827E-29 double:1.321066716E-315;\n r0 = r0 & r5;\n r4 = r0 >>> 20;\n r0 = 1048575; // 0xfffff float:1.469367E-39 double:5.18065E-318;\n r0 = r0 & r5;\n r2 = (long) r0;\n r0 = 17;\n r1 = 2;\n if (r4 > r0) goto L_0x0106;\n L_0x0046:\n r0 = 5;\n r6 = 1;\n switch(r4) {\n case 0: goto L_0x00f9;\n case 1: goto L_0x00ec;\n case 2: goto L_0x00db;\n case 3: goto L_0x00db;\n case 4: goto L_0x00ce;\n case 5: goto L_0x00c1;\n case 6: goto L_0x00b7;\n case 7: goto L_0x00a2;\n case 8: goto L_0x0091;\n case 9: goto L_0x0079;\n case 10: goto L_0x006d;\n case 11: goto L_0x00ce;\n case 12: goto L_0x0069;\n case 13: goto L_0x00b7;\n case 14: goto L_0x00c1;\n case 15: goto L_0x005b;\n case 16: goto L_0x004d;\n default: goto L_0x004b;\n };\n L_0x004b:\n goto L_0x01b8;\n L_0x004d:\n if (r7 != 0) goto L_0x01b8;\n L_0x004f:\n r6 = com.google.android.gms.internal.clearcut.zzax.zzb(r12, r10, r11);\n r0 = r11.zzfe;\n r4 = com.google.android.gms.internal.clearcut.zzbk.zza(r0);\n goto L_0x00e3;\n L_0x005b:\n if (r7 != 0) goto L_0x01b8;\n L_0x005d:\n r0 = com.google.android.gms.internal.clearcut.zzax.zza(r12, r10, r11);\n r1 = r11.zzfd;\n r1 = com.google.android.gms.internal.clearcut.zzbk.zzm(r1);\n goto L_0x00d6;\n L_0x0069:\n if (r7 != 0) goto L_0x01b8;\n L_0x006b:\n goto L_0x00d0;\n L_0x006d:\n if (r7 != r1) goto L_0x01b8;\n L_0x006f:\n r0 = com.google.android.gms.internal.clearcut.zzax.zze(r12, r10, r11);\n L_0x0073:\n r1 = r11.zzff;\n L_0x0075:\n r9.putObject(r14, r2, r1);\n goto L_0x0012;\n L_0x0079:\n if (r7 != r1) goto L_0x01b8;\n L_0x007b:\n r0 = r15.zzad(r8);\n r0 = zza(r0, r12, r10, r13, r11);\n r1 = r9.getObject(r14, r2);\n if (r1 != 0) goto L_0x008a;\n L_0x0089:\n goto L_0x0073;\n L_0x008a:\n r4 = r11.zzff;\n r1 = com.google.android.gms.internal.clearcut.zzci.zza(r1, r4);\n goto L_0x0075;\n L_0x0091:\n if (r7 != r1) goto L_0x01b8;\n L_0x0093:\n r0 = 536870912; // 0x20000000 float:1.0842022E-19 double:2.652494739E-315;\n r0 = r0 & r5;\n if (r0 != 0) goto L_0x009d;\n L_0x0098:\n r0 = com.google.android.gms.internal.clearcut.zzax.zzc(r12, r10, r11);\n goto L_0x0073;\n L_0x009d:\n r0 = com.google.android.gms.internal.clearcut.zzax.zzd(r12, r10, r11);\n goto L_0x0073;\n L_0x00a2:\n if (r7 != 0) goto L_0x01b8;\n L_0x00a4:\n r0 = com.google.android.gms.internal.clearcut.zzax.zzb(r12, r10, r11);\n r4 = r11.zzfe;\n r7 = 0;\n r1 = (r4 > r7 ? 1 : (r4 == r7 ? 0 : -1));\n if (r1 == 0) goto L_0x00b1;\n L_0x00b0:\n goto L_0x00b2;\n L_0x00b1:\n r6 = 0;\n L_0x00b2:\n com.google.android.gms.internal.clearcut.zzfd.zza(r14, r2, r6);\n goto L_0x0012;\n L_0x00b7:\n if (r7 != r0) goto L_0x01b8;\n L_0x00b9:\n r0 = com.google.android.gms.internal.clearcut.zzax.zzc(r12, r10);\n r9.putInt(r14, r2, r0);\n goto L_0x00f5;\n L_0x00c1:\n if (r7 != r6) goto L_0x01b8;\n L_0x00c3:\n r4 = com.google.android.gms.internal.clearcut.zzax.zzd(r12, r10);\n r0 = r9;\n r1 = r25;\n r0.putLong(r1, r2, r4);\n goto L_0x0102;\n L_0x00ce:\n if (r7 != 0) goto L_0x01b8;\n L_0x00d0:\n r0 = com.google.android.gms.internal.clearcut.zzax.zza(r12, r10, r11);\n r1 = r11.zzfd;\n L_0x00d6:\n r9.putInt(r14, r2, r1);\n goto L_0x0012;\n L_0x00db:\n if (r7 != 0) goto L_0x01b8;\n L_0x00dd:\n r6 = com.google.android.gms.internal.clearcut.zzax.zzb(r12, r10, r11);\n r4 = r11.zzfe;\n L_0x00e3:\n r0 = r9;\n r1 = r25;\n r0.putLong(r1, r2, r4);\n r0 = r6;\n goto L_0x0012;\n L_0x00ec:\n if (r7 != r0) goto L_0x01b8;\n L_0x00ee:\n r0 = com.google.android.gms.internal.clearcut.zzax.zzf(r12, r10);\n com.google.android.gms.internal.clearcut.zzfd.zza(r14, r2, r0);\n L_0x00f5:\n r0 = r10 + 4;\n goto L_0x0012;\n L_0x00f9:\n if (r7 != r6) goto L_0x01b8;\n L_0x00fb:\n r0 = com.google.android.gms.internal.clearcut.zzax.zze(r12, r10);\n com.google.android.gms.internal.clearcut.zzfd.zza(r14, r2, r0);\n L_0x0102:\n r0 = r10 + 8;\n goto L_0x0012;\n L_0x0106:\n r0 = 27;\n if (r4 != r0) goto L_0x013e;\n L_0x010a:\n if (r7 != r1) goto L_0x01b8;\n L_0x010c:\n r0 = r9.getObject(r14, r2);\n r0 = (com.google.android.gms.internal.clearcut.zzcn) r0;\n r1 = r0.zzu();\n if (r1 != 0) goto L_0x012a;\n L_0x0118:\n r1 = r0.size();\n if (r1 != 0) goto L_0x0121;\n L_0x011e:\n r1 = 10;\n goto L_0x0123;\n L_0x0121:\n r1 = r1 << 1;\n L_0x0123:\n r0 = r0.zzi(r1);\n r9.putObject(r14, r2, r0);\n L_0x012a:\n r5 = r0;\n r0 = r15.zzad(r8);\n r1 = r16;\n r2 = r26;\n r3 = r10;\n r4 = r28;\n r6 = r29;\n r0 = zza(r0, r1, r2, r3, r4, r5, r6);\n goto L_0x0012;\n L_0x013e:\n r0 = 49;\n if (r4 > r0) goto L_0x0177;\n L_0x0142:\n r0 = (long) r5;\n r17 = r0;\n r0 = r24;\n r1 = r25;\n r19 = r2;\n r2 = r26;\n r3 = r10;\n r5 = r4;\n r4 = r28;\n r21 = r5;\n r5 = r16;\n r22 = r9;\n r15 = r10;\n r9 = r17;\n r11 = r21;\n r12 = r19;\n r14 = r29;\n r0 = r0.zza(r1, r2, r3, r4, r5, r6, r7, r8, r9, r11, r12, r14);\n if (r0 != r15) goto L_0x0169;\n L_0x0166:\n r2 = r0;\n goto L_0x01bc;\n L_0x0169:\n r14 = r25;\n r12 = r26;\n r13 = r28;\n r11 = r29;\n r9 = r22;\n r15 = r24;\n goto L_0x0012;\n L_0x0177:\n r19 = r2;\n r21 = r4;\n r22 = r9;\n r15 = r10;\n r0 = 50;\n r9 = r21;\n if (r9 != r0) goto L_0x019e;\n L_0x0184:\n if (r7 != r1) goto L_0x019c;\n L_0x0186:\n r14 = r15;\n r0 = r24;\n r1 = r25;\n r2 = r26;\n r3 = r14;\n r4 = r28;\n r5 = r8;\n r7 = r19;\n r9 = r29;\n r0 = r0.zza(r1, r2, r3, r4, r5, r6, r7, r9);\n if (r0 != r14) goto L_0x01ca;\n L_0x019b:\n goto L_0x0166;\n L_0x019c:\n r14 = r15;\n goto L_0x01bb;\n L_0x019e:\n r14 = r15;\n r0 = r24;\n r1 = r25;\n r2 = r26;\n r3 = r14;\n r4 = r28;\n r10 = r5;\n r5 = r16;\n r12 = r8;\n r8 = r10;\n r10 = r19;\n r13 = r29;\n r0 = r0.zza(r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r12, r13);\n if (r0 != r14) goto L_0x01ca;\n L_0x01b7:\n goto L_0x0166;\n L_0x01b8:\n r22 = r9;\n r14 = r10;\n L_0x01bb:\n r2 = r14;\n L_0x01bc:\n r0 = r16;\n r1 = r26;\n r3 = r28;\n r4 = r25;\n r5 = r29;\n r0 = zza(r0, r1, r2, r3, r4, r5);\n L_0x01ca:\n r15 = r24;\n r14 = r25;\n r12 = r26;\n r13 = r28;\n r11 = r29;\n r9 = r22;\n goto L_0x0012;\n L_0x01d8:\n r4 = r13;\n if (r0 != r4) goto L_0x01dc;\n L_0x01db:\n return;\n L_0x01dc:\n r0 = com.google.android.gms.internal.clearcut.zzco.zzbo();\n throw r0;\n L_0x01e1:\n r4 = r13;\n r5 = 0;\n r0 = r24;\n r1 = r25;\n r2 = r26;\n r3 = r27;\n r4 = r28;\n r6 = r29;\n r0.zza(r1, r2, r3, r4, r5, r6);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.clearcut.zzds.zza(java.lang.Object, byte[], int, int, com.google.android.gms.internal.clearcut.zzay):void\");\n }", "@Override\n public void downloadWeatherData(String zipCode){\n\n //make request to get the data\n final OkHttpClient okHttpClient;\n final Request request;\n HttpUrl url = new HttpUrl.Builder()\n .scheme(\"https\")\n .host(WEATHER_URL)\n .addPathSegment(\"api\")\n .addPathSegment(KEY)\n .addPathSegment(\"conditions\")\n .addPathSegment(\"q\")\n .addPathSegment(zipCode + \".json\")\n .build();\n\n okHttpClient = new OkHttpClient();\n request = new Request.Builder()\n .url(url)\n .build();\n\n okHttpClient.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(@NonNull Call call, @NonNull IOException e) {\n Toast.makeText(context, \"Failed to make connection\", Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onResponse(@NonNull Call call, @NonNull Response response) throws IOException {\n Gson gson = new Gson();\n weatherInfo = gson.fromJson(response.body().string(), WeatherInfo.class);\n view.weatherDownloadedUpdateUI(weatherInfo);\n }\n });\n\n }", "@Override\n public void process(AS3Parser context) {\n\n String[] result = context.findFileByString(\"init ship manager\");\n if(result.length == 0)\n System.out.println(\"FIX ME: cant find ship manager.\");\n else if(result.length > 1)\n System.out.println(\"FIX ME: multiply results for: ship manager.\");\n else{\n mShipManagerSrc = result[0];\n int moveFuncIndex = mShipManagerSrc.indexOf(\"_.x\");\n if(moveFuncIndex != -1){\n //System.out.println(\"Found player move command.\");\n String xLine = context.findLineByString(mShipManagerSrc,\"_.x\")[0];\n String yLine = context.findLineByString(mShipManagerSrc,\"_.y\")[0];\n\n String var_x = RegexHelper.match(xLine,\"var (.*?):\")[1];\n String var_y = RegexHelper.match(yLine,\"var (.*?):\")[1];\n\n String moveSubSrc = context.findLineByString(mShipManagerSrc,\"(\" + var_x + \",\" + var_y + \");\")[1];\n String moveMessageClass = RegexHelper.match(moveSubSrc,\".(.*?)\\\\.\")[1];\n moveMessageClass = moveMessageClass.trim();\n\n String proxyClassSrc = context.findFileByString(\"class \" + moveMessageClass + \" \")[0];\n String moveMessageClass2 = RegexHelper.match(proxyClassSrc,\"var_.*?\\\\.method_.*?\\\\((class_.*?)\\\\..*?\\\\);\")[1];\n String moveMessageSrc = context.findFileByString(\"class \" + moveMessageClass2 + \" \")[0];\n\n\n //getting infos\n packetId = Integer.parseInt(RegexHelper.match(RegexHelper.getStringBetween(moveMessageSrc,\"method_16()\",\"}\"),\"return (.*?);\")[1]);\n findWrite(moveMessageSrc);\n }else{\n System.out.println(\"FIX ME: cant find player move command.\");\n }\n }\n\n\n\n }", "@Override\n\tpublic void onArrivedWayPoint(int arg0) {\n\n\t}", "@Override\r\n\tpublic void onArrivedWayPoint(int arg0) {\n\r\n\t}", "@Test\n public void test17() {\n List<String> list = response.extract().path(\"data.zip\");\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The storeId of the all stores are:: \" + list);\n System.out.println(\"------------------End of Test---------------------------\");\n }", "public static void massage() {\n int zip = 10_0_17;\n }", "public ZipLineStream() {\n\t\tarchType = ArchiveTypes.ZIP.name();\n\t}", "@Override\n protected WebMap.Info getInfoFromPath(String prepath,\n\t\t\t\t\t String epath,\n\t\t\t\t\t String query,\n\t\t\t\t\t String fragment,\n\t\t\t\t\t WebMap.RequestInfo requestInfo)\n {\n\t// System.out.format(\"prepath = \\\"%s\\\"\\n\", prepath);\n\t// System.out.format(\"epath = \\\"%s\\\"\\n\", epath);\n\ttry {\n\t InputStream is = null;\n\t long length = -1;\n\t String mimeType = null;\n\t boolean compress = false;\n\t if (zipfile != null) {\n\t\tif (epath.startsWith(\"/\")) {\n\t\t epath = epath.substring(1);\n\t\t}\n\t\tif (epath.endsWith(\"/\") || epath.length() == 0) {\n\t\t // System.out.println(\"prepath = \" + prepath);\n\t\t // System.out.println(\"epath = \" + epath);\n\t\t if (getDisplayDir() == false) return null;\n\t\t return EjwsUtilities.printHtmlDir(zipfile, prepath, null,\n\t\t\t\t\t\t epath, \"UTF-8\", this);\n\t\t} else {\n\t\t ZipEntry ze = zipfile.getEntry(epath);\n\t\t if (ze == null) {\n\t\t\tfor (String ep: gzipPaths(epath)) {\n\t\t\t ze = zipfile.getEntry(ep);\n\t\t\t if (ze != null) {\n\t\t\t\tcompress = true;\n\t\t\t\tbreak;\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t if (ze == null) return null;\n\n\t\t is = zipfile.getInputStream(ze);\n\t\t length = (int)ze.getSize();\n\t\t mimeType = getMimeType(epath);\n\t\t URI uri = new URI(null, null, epath, query, fragment);\n\t\t String name =\n\t\t\t\"jar:\" + rootURI.toString() + \"!/\"\n\t\t\t+ uri.toString();\n\t\t // System.out.println(\"name = \" + name);\n\t\t // new URL(\"jar:file:\" + rootURI.toString()\n\t\t //\t + \"!/\" + epath).toString();\n\t\t WebMap.Info result =\n\t\t\tnew WebMap.Info(is, length, mimeType, name);\n\t\t if (compress) {\n\t\t\tresult.setEncoding(\"gzip\");\n\t\t }\n\t\t return result;\n\t\t}\n\t }\n\t return null;\n\t} catch (IOException e) {\n\t return null;\n\t} catch (URISyntaxException ee) {\n\t return null;\n\t} catch (NullPointerException eee) {\n\t eee.printStackTrace();\n\t System.exit(1);\n\t return null;\n\t}\n }", "private final <K, V> int zza(T r7, byte[] r8, int r9, int r10, int r11, int r12, long r13, com.google.android.gms.internal.clearcut.zzay r15) throws java.io.IOException {\n /*\n r6 = this;\n r12 = zzmh;\n r11 = r6.zzae(r11);\n r0 = r12.getObject(r7, r13);\n r1 = r6.zzmz;\n r1 = r1.zzi(r0);\n if (r1 == 0) goto L_0x0021;\n L_0x0012:\n r1 = r6.zzmz;\n r1 = r1.zzk(r11);\n r2 = r6.zzmz;\n r2.zzb(r1, r0);\n r12.putObject(r7, r13, r1);\n r0 = r1;\n L_0x0021:\n r7 = r6.zzmz;\n r7 = r7.zzl(r11);\n r11 = r6.zzmz;\n r11 = r11.zzg(r0);\n r9 = com.google.android.gms.internal.clearcut.zzax.zza(r8, r9, r15);\n r12 = r15.zzfd;\n if (r12 < 0) goto L_0x0094;\n L_0x0035:\n r13 = r10 - r9;\n if (r12 > r13) goto L_0x0094;\n L_0x0039:\n r12 = r12 + r9;\n r13 = r7.zzmc;\n r14 = r7.zzdu;\n L_0x003e:\n if (r9 >= r12) goto L_0x0089;\n L_0x0040:\n r0 = r9 + 1;\n r9 = r8[r9];\n if (r9 >= 0) goto L_0x004c;\n L_0x0046:\n r0 = com.google.android.gms.internal.clearcut.zzax.zza(r9, r8, r0, r15);\n r9 = r15.zzfd;\n L_0x004c:\n r1 = r0;\n r0 = r9 >>> 3;\n r2 = r9 & 7;\n switch(r0) {\n case 1: goto L_0x006f;\n case 2: goto L_0x0055;\n default: goto L_0x0054;\n };\n L_0x0054:\n goto L_0x0084;\n L_0x0055:\n r0 = r7.zzmd;\n r0 = r0.zzel();\n if (r2 != r0) goto L_0x0084;\n L_0x005d:\n r3 = r7.zzmd;\n r9 = r7.zzdu;\n r4 = r9.getClass();\n r0 = r8;\n r2 = r10;\n r5 = r15;\n r9 = zza(r0, r1, r2, r3, r4, r5);\n r14 = r15.zzff;\n goto L_0x003e;\n L_0x006f:\n r0 = r7.zzmb;\n r0 = r0.zzel();\n if (r2 != r0) goto L_0x0084;\n L_0x0077:\n r3 = r7.zzmb;\n r4 = 0;\n r0 = r8;\n r2 = r10;\n r5 = r15;\n r9 = zza(r0, r1, r2, r3, r4, r5);\n r13 = r15.zzff;\n goto L_0x003e;\n L_0x0084:\n r9 = com.google.android.gms.internal.clearcut.zzax.zza(r9, r8, r1, r10, r15);\n goto L_0x003e;\n L_0x0089:\n if (r9 != r12) goto L_0x008f;\n L_0x008b:\n r11.put(r13, r14);\n return r12;\n L_0x008f:\n r7 = com.google.android.gms.internal.clearcut.zzco.zzbo();\n throw r7;\n L_0x0094:\n r7 = com.google.android.gms.internal.clearcut.zzco.zzbl();\n throw r7;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.clearcut.zzds.zza(java.lang.Object, byte[], int, int, int, int, long, com.google.android.gms.internal.clearcut.zzay):int\");\n }", "public final void b(com.tencent.mm.modelgeo.Addr r11) {\n /*\n r10 = this;\n r1 = 0;\n r7 = -1;\n r3 = com.tencent.mm.plugin.location.model.a$a.this;\n r0 = r11.tag;\n if (r0 == 0) goto L_0x01a2;\n L_0x0008:\n r0 = r11.tag;\n r0 = r0 instanceof java.lang.Long;\n if (r0 == 0) goto L_0x01a2;\n L_0x000e:\n r0 = r11.tag;\n r0 = (java.lang.Long) r0;\n r4 = r0.longValue();\n r0 = com.tencent.mm.plugin.messenger.foundation.a.i.class;\n r0 = com.tencent.mm.kernel.g.l(r0);\n r0 = (com.tencent.mm.plugin.messenger.foundation.a.i) r0;\n r0 = r0.bcY();\n r4 = r0.dW(r4);\n r0 = r11.dRH;\n r0 = com.tencent.mm.sdk.platformtools.bi.oW(r0);\n if (r0 != 0) goto L_0x01a2;\n L_0x002e:\n r2 = r4.field_content;\n r0 = r4.field_isSend;\n if (r0 != 0) goto L_0x01a3;\n L_0x0034:\n r0 = 1;\n L_0x0035:\n r5 = r4.field_talker;\n r5 = com.tencent.mm.model.s.fq(r5);\n if (r5 == 0) goto L_0x004f;\n L_0x003d:\n if (r0 == 0) goto L_0x004f;\n L_0x003f:\n r6 = com.tencent.mm.model.bd.iA(r2);\n if (r6 == r7) goto L_0x004f;\n L_0x0045:\n r6 = r6 + 1;\n r2 = r2.substring(r6);\n r2 = r2.trim();\n L_0x004f:\n r6 = com.tencent.mm.storage.bd.b.YW(r2);\n r2 = r11.Oy();\n r6.label = r2;\n r2 = \"\";\n if (r5 == 0) goto L_0x01a8;\n L_0x005e:\n if (r0 == 0) goto L_0x01a8;\n L_0x0060:\n r0 = r4.field_content;\n r0 = com.tencent.mm.model.bd.iA(r0);\n if (r0 == r7) goto L_0x01a8;\n L_0x0068:\n r7 = r4.field_content;\n r0 = r7.substring(r1, r0);\n r0 = r0.trim();\n r1 = r0.length();\n if (r1 <= 0) goto L_0x01a8;\n L_0x0078:\n r1 = r6.tbP;\n if (r1 == 0) goto L_0x0087;\n L_0x007c:\n r1 = r6.tbP;\n r2 = \"\";\n r1 = r1.equals(r2);\n if (r1 == 0) goto L_0x008c;\n L_0x0087:\n r1 = \"\";\n r6.tbP = r1;\n L_0x008c:\n r1 = r6.tbO;\n if (r1 == 0) goto L_0x009b;\n L_0x0090:\n r1 = r6.tbO;\n r2 = \"\";\n r1 = r1.equals(r2);\n if (r1 == 0) goto L_0x00a0;\n L_0x009b:\n r1 = \"\";\n r6.tbP = r1;\n L_0x00a0:\n r1 = r6.tbN;\n if (r1 == 0) goto L_0x00af;\n L_0x00a4:\n r1 = r6.tbN;\n r2 = \"\";\n r1 = r1.equals(r2);\n if (r1 == 0) goto L_0x00b4;\n L_0x00af:\n r1 = \"\";\n r6.tbN = r1;\n L_0x00b4:\n r1 = r6.otZ;\n if (r1 == 0) goto L_0x00c3;\n L_0x00b8:\n r1 = r6.otZ;\n r2 = \"\";\n r1 = r1.equals(r2);\n if (r1 == 0) goto L_0x00c8;\n L_0x00c3:\n r1 = \"\";\n r6.otZ = r1;\n L_0x00c8:\n r1 = r6.label;\n if (r1 == 0) goto L_0x00d7;\n L_0x00cc:\n r1 = r6.label;\n r2 = \"\";\n r1 = r1.equals(r2);\n if (r1 == 0) goto L_0x00dc;\n L_0x00d7:\n r1 = \"\";\n r6.label = r1;\n L_0x00dc:\n r1 = r6.tbM;\n if (r1 == 0) goto L_0x00eb;\n L_0x00e0:\n r1 = r6.tbM;\n r2 = \"\";\n r1 = r1.equals(r2);\n if (r1 == 0) goto L_0x00f0;\n L_0x00eb:\n r1 = \"\";\n r6.tbM = r1;\n L_0x00f0:\n r1 = new java.lang.StringBuilder;\n r2 = \"<msg><location x=\\\"\";\n r1.<init>(r2);\n r8 = r6.kCw;\n r1 = r1.append(r8);\n r2 = \"\\\" y=\\\"\";\n r1 = r1.append(r2);\n r8 = r6.kCx;\n r1 = r1.append(r8);\n r2 = \"\\\" scale=\\\"\";\n r1 = r1.append(r2);\n r2 = r6.bSz;\n r1 = r1.append(r2);\n r2 = \"\\\" label=\\\"\";\n r1 = r1.append(r2);\n r2 = r6.label;\n r1 = r1.append(r2);\n r2 = \"\\\" maptype=\\\"\";\n r1 = r1.append(r2);\n r2 = r6.tbM;\n r1 = r1.append(r2);\n r2 = \"\\\" fromusername=\\\"\";\n r1 = r1.append(r2);\n r2 = r6.otZ;\n r1 = r1.append(r2);\n r2 = \"\\\" /></msg>\";\n r1 = r1.append(r2);\n r1 = r1.toString();\n if (r5 == 0) goto L_0x01a6;\n L_0x014c:\n r2 = \"\";\n r2 = r0.equals(r2);\n if (r2 != 0) goto L_0x01a6;\n L_0x0155:\n r2 = new java.lang.StringBuilder;\n r2.<init>();\n r0 = r2.append(r0);\n r2 = \":\\n\";\n r0 = r0.append(r2);\n r0 = r0.append(r1);\n r0 = r0.toString();\n L_0x016d:\n r1 = \"MicroMsg.LocationServer\";\n r2 = new java.lang.StringBuilder;\n r5 = \"xml: \";\n r2.<init>(r5);\n r2 = r2.append(r0);\n r2 = r2.toString();\n com.tencent.mm.sdk.platformtools.x.d(r1, r2);\n r4.setContent(r0);\n r0 = com.tencent.mm.plugin.messenger.foundation.a.i.class;\n r0 = com.tencent.mm.kernel.g.l(r0);\n r0 = (com.tencent.mm.plugin.messenger.foundation.a.i) r0;\n r0 = r0.bcY();\n r6 = r4.field_msgId;\n r0.a(r6, r4);\n r0 = r3.kCD;\n r2 = r4.field_msgId;\n r1 = java.lang.Long.valueOf(r2);\n r0.remove(r1);\n L_0x01a2:\n return;\n L_0x01a3:\n r0 = r1;\n goto L_0x0035;\n L_0x01a6:\n r0 = r1;\n goto L_0x016d;\n L_0x01a8:\n r0 = r2;\n goto L_0x0078;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.mm.plugin.location.model.a.a.1.b(com.tencent.mm.modelgeo.Addr):void\");\n }", "public String callFedexWS(String key, String password, String intFlag, \n Double totalWeight, AascIntlInfo aascIntlInfo) {\n String reply = \"\";\n String appendStr = \"\";\n try {\n HashMap hm = new HashMap();\n hm.put(\"key\", key);\n \n hm.put(\"password\", password);\n \n hm.put(\"customerCarrierAccountNumber\", \n customerCarrierAccountNumber);\n \n hm.put(\"customerTransactionIdentifier\", \n customerTransactionIdentifier);\n hm.put(\"orderName\", orderName);\n hm.put(\"senderAccountNumber\", senderAccountNumber);\n \n hm.put(\"fedExTestMeterNumber\", fedExTestMeterNumber);\n \n hm.put(\"carrierCode\", carrierCode);\n\n hm.put(\"shipMethodName\", shipMethodName); //added for SmartPost\n hm.put(\"hubid\", hubid); //added for SmartPost\n hm.put(\"indicia\", indicia); //added for SmartPost \n hm.put(\"ancillary\", ancillary); //added for SmartPost\n\n hm.put(\"shipDate\", shipDate);\n \n hm.put(\"fedExWsTimeStr\", fedExWsTimeStr);\n \n hm.put(\"dropoffType\", dropoffType);\n \n hm.put(\"service\", service);\n \n hm.put(\"packaging\", packaging);\n \n hm.put(\"pkgWtUom\", pkgWtUom);\n \n\n hm.put(\"packageDeclaredValue\", packageDeclaredValue);\n \n hm.put(\"pkgWtVal\", Double.parseDouble(Float.toString(pkgWtVal)));\n \n \n hm.put(\"codFlag\", codFlag);\n \n if (codFlag.equalsIgnoreCase(\"Y\")) {\n hm.put(\"codAmtStr\", Double.parseDouble(codAmtStr));\n \n }\n\n //Hold At Location\n hm.put(\"halFlag\", halFlag);\n \n hm.put(\"halPhone\", halPhone);\n \n hm.put(\"halCity\", halCity);\n \n hm.put(\"halState\", halState);\n \n hm.put(\"halLine1\", halLine1);\n \n hm.put(\"halLine2\", halLine2);\n \n hm.put(\"halZip\", halZip);\n \n\n //Ship From Location Details\n hm.put(\"shipFromDepartment\", shipFromDepartment);\n \n hm.put(\"shipFromCompanyName\", shipFromCompanyName);\n \n hm.put(\"shipFromPersonName\", shipFromPersonName);\n \n hm.put(\"shipFromPhoneNumber1\", shipFromPhoneNumber1);\n \n hm.put(\"shipFromEMailAddress\", shipFromEMailAddress);\n \n hm.put(\"shipToContactPhoneNumber\", shipToContactPhoneNumber);\n \n hm.put(\"shipFromAddressLine1\", shipFromAddressLine1);\n \n hm.put(\"shipFromAddressLine2\", shipFromAddressLine2);\n\n hm.put(\"shipFromAddressCity\", shipFromAddressCity);\n hm.put(\"shipFromAddressState\", shipFromAddressState);\n hm.put(\"shipFromAddressPostalCode\", shipFromAddressPostalCode);\n hm.put(\"shipFromCountry\", shipFromCountry);\n\n //Ship To Location Details\n hm.put(\"currencyCode\", currencyCode);\n hm.put(\"shipToCompanyName\", shipToCompanyName);\n \n hm.put(\"shipToContactPersonName\", shipToContactPersonName);\n \n hm.put(\"shipToAddressLine1\", shipToAddressLine1);\n hm.put(\"shipToAddressLine2\", shipToAddressLine2);\n\n \n hm.put(\"shipToAddressCity\", shipToAddressCity);\n \n hm.put(\"shipToAddressState\", shipToAddressState);\n \n hm.put(\"shipToAddressPostalCode\", shipToAddressPostalCode);\n \n hm.put(\"shipToCountry\", shipToCountry);\n \n hm.put(\"shipToEMailAddress\", shipToEMailAddress); \n\n hm.put(\"carrierPayMethod\", carrierPayMethod);\n \n\n hm.put(\"reference1\", reference1);\n \n hm.put(\"reference2\", reference2);\n \n hm.put(\"lpnNumber\", lpnNumber);\n\n\n String pl1 = Double.toString(packageLength);\n String pw1 = Double.toString(packageWidth);\n String ph1 = Double.toString(packageHeight);\n hm.put(\"packageLength\", pl1);\n \n hm.put(\"packageWidth\", pw1);\n \n hm.put(\"packageHeight\", ph1);\n \n hm.put(\"dimunits\", units);\n \n hm.put(\"SenderEmail\", SenderEmail);\n \n\n hm.put(\"ShipAlertNotification\", ShipAlertNotification);\n \n\n hm.put(\"ExceptionNotification\", ExceptionNotification);\n \n\n hm.put(\"DeliveryNotification\", DeliveryNotification);\n \n\n hm.put(\"Format\", Format);\n \n hm.put(\"emailFlag\", emailFlag);\n \n hm.put(\"message\", message);\n \n hm.put(\"recipientEmailAddress1\", recipientEmailAddress1);\n \n hm.put(\"recipientEmailAddress2\", recipientEmailAddress2);\n \n hm.put(\"recipientEmailAddress3\", recipientEmailAddress3);\n \n hm.put(\"recipientEmailAddress5\", recipientEmailAddress5);\n \n hm.put(\"recipientEmailAddress4\", recipientEmailAddress4);\n \n\n hm.put(\"satShipFlag\", satShipFlag);\n \n //Dry Ice\n hm.put(\"chDryIce\", chDryIce);\n \n if (chDryIce.equalsIgnoreCase(\"Y\")) {\n hm.put(\"dryIceUnits\", dryIceUnits);\n \n if (dryIceUnits.equalsIgnoreCase(\"LBS\")) {\n dryIceWeight = dryIceWeight * 0.453;\n }\n hm.put(\"dryIceWeight\", dryIceWeight);\n \n }\n\n //signatureOptions\n hm.put(\"signatureOptions\", signatureOptions);\n \n //Return Shipment\n\n hm.put(\"fedExWSChkReturnlabelstr\", fedExWSChkReturnlabelstr);\n // hm.put(\"NONRETURN\",\"returnlabel\");\n \n\n hm.put(\"outputFile\", outputFile);\n \n\n hm.put(\"packageSequence\", packageSequence);\n \n\n hm.put(\"timeStampStr\", timeStampStr);\n \n\n hm.put(\"residentialAddrFlag\", residentialAddrFlag);\n \n\n\n if (fedExWSChkReturnlabelstr.equals(\"NONRETURN\")) {\n appendStr = \"\";\n\n } else {\n appendStr = \"Return_\";\n\n }\n\n hm.put(\"appendStr\", appendStr);\n \n\n if (!(fedExWSChkReturnlabelstr.equals(\"NONRETURN\"))) {\n\n \n \n\n hm.put(\"rtnACNumber\", rtnACNumber);\n \n\n hm.put(\"rtnMeterNumber\", rtnMeterNumber);\n \n\n hm.put(\"rtnDropOfType\", rtnDropOfType);\n \n\n hm.put(\"rtnShipMethod\", rtnShipMethod);\n \n\n hm.put(\"rtnPackageList\", rtnPackageList);\n \n\n\n hm.put(\"rtnShipFromContact\", rtnShipFromContact);\n hm.put(\"rtnShipFromCompany\", rtnShipFromCompany);\n\n hm.put(\"rtnShipFromPhone\", rtnShipFromPhone);\n \n\n hm.put(\"rtnShipFromLine1\", rtnShipFromLine1);\n \n\n hm.put(\"rtnShipFromLine2\", rtnShipFromLine2);\n \n\n hm.put(\"rtnShipFromCity\", rtnShipFromCity);\n \n\n hm.put(\"rtnShipFromSate\", rtnShipFromSate);\n \n\n hm.put(\"rtnShipFromZip\", rtnShipFromZip);\n \n\n hm.put(\"shipFromCountry\", shipFromCountry);\n \n\n hm.put(\"rtnShipToContact\", rtnShipToContact);\n \n\n hm.put(\"rtnShipToCompany\", rtnShipToCompany);\n \n\n\n hm.put(\"rtnShipToPhone\", rtnShipToPhone);\n \n\n hm.put(\"rtnShipToLine1\", rtnShipToLine1);\n \n\n hm.put(\"rtnShipToLine2\", rtnShipToLine2);\n \n\n hm.put(\"rtnShipToCity\", rtnShipToCity);\n \n\n hm.put(\"rtnShipToState\", rtnShipToState);\n \n\n hm.put(\"rtnShipToZip\", rtnShipToZip);\n \n\n hm.put(\"shipToCountry\", shipToCountry);\n \n\n hm.put(\"rtnPayMethod\", rtnPayMethod);\n \n\n \n hm.put(\"rtnRMA\", rtnRMA);\n \n \n\n }\n\n //Hazardous Material\n \n hm.put(\"HazMatFlag\", HazMatFlag);\n \n hm.put(\"Accessibility\", HazMatType);\n \n hm.put(\"ProperShippingName\", fedExWsShippingName1);\n hm.put(\"HazardClass\", fedExWsClass);\n \n hm.put(\"HazMatIdentificationNo\", HazMatIdentificationNo);\n \n hm.put(\"HazardousMaterialPkgGroup\", HazardousMaterialPkgGroup);\n \n hm.put(\"HazMatDOTLabelType\", HazMatDOTLabelType);\n \n hm.put(\"HazMatEmergencyContactName\", HazMatEmergencyContactName);\n \n hm.put(\"HazMatEmergencyContactNo\", HazMatEmergencyContactNo);\n \n hm.put(\"HazMatQty\", HazMatQty);\n \n hm.put(\"HazMatUnit\", HazMatUnit);\n \n hm.put(\"payorCountryCodeWS\", payorCountryCodeWS);\n //Mahesh added below code for Third Party and Recepient development \n \n hm.put(\"receipientPartyName\", receipientPartyName);\n hm.put(\"recipientPostalCode\", recipientPostalCode);\n \n hm.put(\"tpCompanyName\", tpCompanyName);\n logger.info(\"tpCompanyName :\" + tpCompanyName);\n hm.put(\"tpAddress\", tpAddress);\n logger.info(\"tpAddress :\" + tpAddress);\n hm.put(\"tpCity\", tpCity);\n logger.info(\"tpCity :\" + tpCity);\n hm.put(\"tpState\", tpState);\n logger.info(\"tpState :\" + tpState);\n hm.put(\"tpPostalCode\", tpPostalCode);\n logger.info(\"tpPostalCode :\" + tpPostalCode);\n hm.put(\"tpCountrySymbol\", tpCountrySymbol);\n logger.info(\"tpCountrySymbol :\" + \n tpCountrySymbol); \n\n\n //Added on Jul-05-2011\n hm.put(\"hazmatPkgingCnt\", hazmatPkgingCnt);\n \n\n hm.put(\"hazmatPkgingUnits\", hazmatPkgingUnits);\n \n\n hm.put(\"hazmatTechnicalName\", hazmatTechnicalName);\n \n\n //End on Jul-05-2011\n\n hm.put(\"hazmatSignatureName\", hazmatSignatureName);\n\n // label/doctab values\n hm.put(\"labelFormat\", labelFormat);\n hm.put(\"labelStockOrientation\", labelStockOrientation);\n hm.put(\"docTabLocation\", docTabLocation);\n //\n\n hm.put(\"op900LabelFormat\", op900LabelFormat);\n hm.put(\"intlDocSubType\", intlDocSubType);\n hm.put(\"dutiesAndTaxesFlag\", dutiesAndTaxesFlag);\n\n //International Details\n //String intFlag = nullStrToSpc(aascHeaderInfo.getIntlShipFlag()); commented by rajesh, \n //passing the parameter as method variable\n LinkedList coList = null;\n try {\n aascIntlHeaderInfo = aascIntlInfo.getIntlHeaderInfo();\n coList = aascIntlInfo.getIntlCommodityInfo();\n } catch (Exception e) {\n aascIntlHeaderInfo = new AascIntlHeaderInfo();\n coList = new LinkedList();\n }\n hm.put(\"intFlag\", intFlag);\n if (intFlag.equalsIgnoreCase(\"Y\")) {\n String exemptionNumber = \"\";\n exemptionNumber = \n nullStrToSpc(aascIntlHeaderInfo.getIntlExemptionNumber());\n hm.put(\"exemptionNumber\", exemptionNumber);\n hm.put(\"TPintAccNumber\", intAccNumber);\n hm.put(\"TPintcountryCode\", intcountryCode);\n hm.put(\"intPayerType\", intPayerType);\n hm.put(\"intFreightCharge\", intFreightCharge);\n hm.put(\"intInsuranceCharge\", intInsuranceCharge);\n hm.put(\"intTaxesOrMiscellaneousCharge\", \n intTaxesOrMiscellaneousCharge);\n hm.put(\"intPurpose\", intPurpose);\n hm.put(\"intSenderTINOrDUNS\", intSenderTINOrDUNS);\n hm.put(\"intSenderTINOrDUNSType\", intSenderTINOrDUNSType);\n\n hm.put(\"packingListEnclosed\", packingListEnclosed);\n hm.put(\"shippersLoadAndCount\", shippersLoadAndCount);\n hm.put(\"bookingConfirmationNumber\", bookingConfirmationNumber);\n\n hm.put(\"intTermsOfSale\", intTermsOfSale);\n \n hm.put(\"intTotalCustomsValue\", intTotalCustomsValue);\n \n hm.put(\"declarationStmt\", declarationStmt);\n hm.put(\"generateCI\", generateCI);\n hm.put(\"importerName\", importerName);\n hm.put(\"importerCompName\", importerCompName);\n hm.put(\"importerPhoneNum\", importerPhoneNum);\n hm.put(\"importerAddress1\", importerAddress1);\n hm.put(\"importerAddress2\", importerAddress2);\n hm.put(\"importerCity\", importerCity);\n hm.put(\"importerState\", importerState);\n hm.put(\"importerPostalCode\", importerPostalCode);\n hm.put(\"importerCountryCode\", importerCountryCode);\n hm.put(\"impIntlSedNumber\", impIntlSedNumber);\n hm.put(\"impIntlSedType\", impIntlSedType);\n hm.put(\"recIntlSedNumber\", recIntlSedNumber);\n hm.put(\"recIntlSedType\", recIntlSedType);\n\n hm.put(\"brokerName\", brokerName);\n hm.put(\"brokerCompName\", brokerCompName);\n hm.put(\"brokerPhoneNum\", brokerPhoneNum);\n hm.put(\"brokerAddress1\", brokerAddress1);\n hm.put(\"brokerAddress2\", brokerAddress2);\n hm.put(\"brokerCity\", brokerCity);\n hm.put(\"brokerState\", brokerState);\n hm.put(\"brokerPostalCode\", brokerPostalCode);\n hm.put(\"brokerCountryCode\", brokerCountryCode);\n\n //sc_skp_7.0 end\n ListIterator CoInfoIterator = coList.listIterator();\n\n\n HashMap intlCommodityHM[] = new HashMap[coList.size()];\n\n int index = 0;\n while (CoInfoIterator.hasNext()) {\n AascIntlCommodityInfo aascIntlCommodityInfo = \n (AascIntlCommodityInfo)CoInfoIterator.next();\n\n numberOfPieces = aascIntlCommodityInfo.getNumberOfPieces();\n description = \n encode(aascIntlCommodityInfo.getDescription());\n countryOfManufacture = \n aascIntlCommodityInfo.getCountryOfManufacture();\n harmonizedCode = aascIntlCommodityInfo.getHarmonizedCode();\n weight = aascIntlCommodityInfo.getWeight();\n quantity = aascIntlCommodityInfo.getQuantity();\n quantityUnits = aascIntlCommodityInfo.getQuantityUnits();\n unitPrice = aascIntlCommodityInfo.getUnitPrice();\n customsValue = aascIntlCommodityInfo.getCustomsValue();\n exportLicenseNumber = \n aascIntlCommodityInfo.getExportLicenseNumber();\n exportLicenseExpiryDate = \n aascIntlCommodityInfo.getExportLicenseExpiryDate();\n // String rdate = \"\";\n intlCommodityHM[index] = new HashMap();\n intlCommodityHM[index].put(\"numberOfPieces\", \n numberOfPieces);\n \n intlCommodityHM[index].put(\"description\", description);\n \n intlCommodityHM[index].put(\"countryOfManufacture\", \n countryOfManufacture);\n \n intlCommodityHM[index].put(\"weight\", weight);\n \n intlCommodityHM[index].put(\"quantity\", quantity);\n \n intlCommodityHM[index].put(\"quantityUnits\", quantityUnits);\n \n intlCommodityHM[index].put(\"harmonizedCode\", \n harmonizedCode);\n \n intlCommodityHM[index].put(\"unitPrice\", unitPrice);\n \n intlCommodityHM[index].put(\"exportLicenseNumber\", \n exportLicenseNumber);\n \n intlCommodityHM[index].put(\"exportLicenseExpiryDate\", \n exportLicenseExpiryDate);\n \n intlCommodityHM[index].put(\"customsValue\", customsValue);\n \n index++;\n }\n hm.put(\"intlCommodityHM\", intlCommodityHM);\n }\n\n \n\n if (separateShipFlag.equalsIgnoreCase(\"Y\")) {\n packageCount = \"1\";\n }\n hm.put(\"packageCount\", packageCount);\n if ((fedExWSChkReturnlabelstr.equals(\"NONRETURN\"))) {\n if (updateFlg.equalsIgnoreCase(\"SQ\")) {\n pkgCntWs = Integer.parseInt(packageSequence);\n } else if (separateShipFlag.equalsIgnoreCase(\"Y\")) {\n pkgCntWs = 1;\n } else {\n pkgCntWs = pkgCntWs + 1;\n }\n }\n \n hm.put(\"sequenceNumber\", pkgCntWs);\n hm.put(\"totalWeight\", totalWeight);\n\n //Added code for multiple shipment\n if (!packageCount.equalsIgnoreCase(\"1\")) {\n if (pkgCntWs > 0) {\n \n hm.put(\"masterTrackingNumber\", masterTrackingNumber);\n \n hm.put(\"masterFormID\", masterFormID);\n }\n }\n com.aasc.erp.carrier.fedexws.ShipWebService shipWebService = \n new com.aasc.erp.carrier.fedexws.ShipWebService();\n reply = shipWebService.getShipInfo(hm, host, port);\n \n } catch (Exception e) {\n logger.severe(\"Exception::\"+e.getMessage());\n StringBuffer replySB = new StringBuffer();\n replySB.append(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\");\n replySB.append(\"<FDXShip2Reply xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:noNamespaceSchemaLocation=\\\"FDXShip2Reply.xsd\\\">\");\n replySB.append(\"<ReplyHeader>\");\n replySB.append(\"<CustomerTransactionIdentifier>126972</CustomerTransactionIdentifier>\");\n replySB.append(\"</ReplyHeader>\");\n replySB.append(\"<Error>\");\n replySB.append(\"<Code>9040</Code>\");\n replySB.append(\"<Message>\");\n replySB.append(\"Error Sending request to FedEx. \");\n if (e.getMessage().contains(\"java.net.ConnectException\")) {\n replySB.append(\"Please check the connection details in Carrier Configuration.\");\n } else {\n replySB.append(e.getMessage());\n }\n replySB.append(\"</Message>\");\n replySB.append(\"<Type>Ship</Type>\");\n replySB.append(\"</Error>\");\n replySB.append(\"</FDXShip2Reply>\");\n reply = replySB.toString();\n } finally {\n return reply;\n }\n }", "public PUKEHandlerCallBanker_ABZ_FOUR(){\r\n\t}", "private void next() {\n\t\tParcel pc = Parcel.obtain();\n\t\tParcel pc_reply = Parcel.obtain();\n\t\ttry {\n\t\t\tSystem.out.println(\"DEBUG>>>pc\" + pc.toString());\n\t\t\tSystem.out.println(\"DEBUG>>>pc_replay\" + pc_reply.toString());\n\t\t\tib.transact(2, pc, pc_reply, 0);\n\t\t} catch (RemoteException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void testLongCityStateZip() throws InterruptedException {\n Customer customer = CustomerService.getInstance().getCustomerById(new Integer(5877));\r\n ir.printInvoice(custInv, customer);\r\n }", "@Override\n public void map(LongWritable key, Text value, Mapper.Context context)\n throws IOException, InterruptedException {\n // package (zip) file to be processed\n Project project = Project.getCurrentProject();\n project.resetCurrentMapCount();\n String[] inputs = value.toString().split(\";\");\n String zipFile = inputs[0];\n // no empty or incorrect lines!\n if (zipFile.trim().isEmpty()) {\n return;\n }\n logger.info(\"Processing: {}\", zipFile);\n if (inputs.length >= 3) {\n project.setMapItemStart(Integer.parseInt(inputs[1]));\n project.setMapItemEnd(Integer.parseInt(inputs[2]));\n logger.info(\"From {} to {}\", project.getMapItemStart(), project.getMapItemEnd());\n }\n int filesInZip = new TrueZipUtil().countFiles(zipFile);\n Stats.getInstance().setCurrentItemTotal(filesInZip);\n Stats.getInstance().setZipFileName(zipFile);\n \n project.setupCurrentCustodianFromFilename(zipFile);\n logger.info(\"Will use current custodian: {}\", project.getCurrentCustodian());\n // if we are in Hadoop, copy to local tmp \n if (project.isEnvHadoop()) {\n String extension = org.freeeed.services.Util.getExtension(zipFile);\n String tmpDir = ParameterProcessing.TMP_DIR_HADOOP;\n File tempZip = File.createTempFile(\"freeeed\", (\".\" + extension), new File(tmpDir));\n tempZip.delete();\n if (project.isFsHdfs() || project.isFsLocal()) {\n String cmd = \"hadoop fs -copyToLocal \" + zipFile + \" \" + tempZip.getPath();\n OsUtil.runCommand(cmd);\n } else if (project.isFsS3()) {\n S3Agent s3agent = new S3Agent();\n s3agent.getStagedFileFromS3(zipFile, tempZip.getPath());\n }\n \n zipFile = tempZip.getPath();\n }\n \n if (PstProcessor.isPST(zipFile)) {\n try {\n new PstProcessor(zipFile, context, luceneIndex).process();\n } catch (Exception e) {\n logger.error(\"Problem with PST processing...\", e);\n }\n } else {\n logger.info(\"Will create Zip File processor for: {}\", zipFile);\n // process archive file\n ZipFileProcessor processor = new ZipFileProcessor(zipFile, context, luceneIndex);\n processor.process(false, null);\n }\n }", "public void run() \n\t\t{\n\t\t\tBundle dataBundle = new Bundle(); \n\t\t\tString currTime = Funcs.getCurrentTime( true );\n\t\t\t\n\t\t\t// dataBundle.putSerializable( \"rts\", GTStore.getRoutes( _sourceStopId, _destStopId, Funcs.getCurrentDay(), currTime, Funcs.addTime( currTime, \"00:25:00\" ) ) );\n\t\t\t//dataBundle.putSerializable( \"rts\", GTStore.findRoutes( 40.44938, -3.6912, 40.41876, -3.69263, Funcs.getCurrentDay() ) );\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tString [][] _res = GTStore_sqlite.getDirectRoutes( _sourceStopId, _destStopId );\n\n\t\t\t\t// String [][] _res = GTStore.getDirectRoutes( _sourceStopId, _destStopId );\n\t\t\t\t\n\t\t\t\tdataBundle.putSerializable( \"rts\", _res );\n\t\t\t\tMessage msg = _handler.obtainMessage();\n\t\t\t\tmsg.setData( dataBundle );\n\t\t\t\t_handler.sendMessage( msg );\n\t\t\t\t\n\t\t\t}\n\t\t\tcatch(Exception e){Best.dissmissProcessing(); e.printStackTrace();}\n }", "@Override\n\tpublic long getZip() {\n\t\treturn _candidate.getZip();\n\t}", "public final void zzc(T r7, T r8) {\n /*\n r6 = this;\n if (r8 == 0) goto L_0x0105;\n L_0x0002:\n r0 = 0;\n L_0x0003:\n r1 = r6.zzmi;\n r1 = r1.length;\n if (r0 >= r1) goto L_0x00f2;\n L_0x0008:\n r1 = r6.zzag(r0);\n r2 = 1048575; // 0xfffff float:1.469367E-39 double:5.18065E-318;\n r2 = r2 & r1;\n r2 = (long) r2;\n r4 = r6.zzmi;\n r4 = r4[r0];\n r5 = 267386880; // 0xff00000 float:2.3665827E-29 double:1.321066716E-315;\n r1 = r1 & r5;\n r1 = r1 >>> 20;\n switch(r1) {\n case 0: goto L_0x00de;\n case 1: goto L_0x00d0;\n case 2: goto L_0x00c2;\n case 3: goto L_0x00bb;\n case 4: goto L_0x00ad;\n case 5: goto L_0x00a6;\n case 6: goto L_0x009f;\n case 7: goto L_0x0091;\n case 8: goto L_0x0083;\n case 9: goto L_0x007e;\n case 10: goto L_0x0077;\n case 11: goto L_0x0070;\n case 12: goto L_0x0069;\n case 13: goto L_0x0062;\n case 14: goto L_0x005a;\n case 15: goto L_0x0053;\n case 16: goto L_0x004b;\n case 17: goto L_0x007e;\n case 18: goto L_0x0044;\n case 19: goto L_0x0044;\n case 20: goto L_0x0044;\n case 21: goto L_0x0044;\n case 22: goto L_0x0044;\n case 23: goto L_0x0044;\n case 24: goto L_0x0044;\n case 25: goto L_0x0044;\n case 26: goto L_0x0044;\n case 27: goto L_0x0044;\n case 28: goto L_0x0044;\n case 29: goto L_0x0044;\n case 30: goto L_0x0044;\n case 31: goto L_0x0044;\n case 32: goto L_0x0044;\n case 33: goto L_0x0044;\n case 34: goto L_0x0044;\n case 35: goto L_0x0044;\n case 36: goto L_0x0044;\n case 37: goto L_0x0044;\n case 38: goto L_0x0044;\n case 39: goto L_0x0044;\n case 40: goto L_0x0044;\n case 41: goto L_0x0044;\n case 42: goto L_0x0044;\n case 43: goto L_0x0044;\n case 44: goto L_0x0044;\n case 45: goto L_0x0044;\n case 46: goto L_0x0044;\n case 47: goto L_0x0044;\n case 48: goto L_0x0044;\n case 49: goto L_0x0044;\n case 50: goto L_0x003d;\n case 51: goto L_0x002b;\n case 52: goto L_0x002b;\n case 53: goto L_0x002b;\n case 54: goto L_0x002b;\n case 55: goto L_0x002b;\n case 56: goto L_0x002b;\n case 57: goto L_0x002b;\n case 58: goto L_0x002b;\n case 59: goto L_0x002b;\n case 60: goto L_0x0026;\n case 61: goto L_0x001f;\n case 62: goto L_0x001f;\n case 63: goto L_0x001f;\n case 64: goto L_0x001f;\n case 65: goto L_0x001f;\n case 66: goto L_0x001f;\n case 67: goto L_0x001f;\n case 68: goto L_0x0026;\n default: goto L_0x001d;\n };\n L_0x001d:\n goto L_0x00ee;\n L_0x001f:\n r1 = r6.zza(r8, r4, r0);\n if (r1 == 0) goto L_0x00ee;\n L_0x0025:\n goto L_0x0031;\n L_0x0026:\n r6.zzb(r7, r8, r0);\n goto L_0x00ee;\n L_0x002b:\n r1 = r6.zza(r8, r4, r0);\n if (r1 == 0) goto L_0x00ee;\n L_0x0031:\n r1 = com.google.android.gms.internal.clearcut.zzfd.zzo(r8, r2);\n com.google.android.gms.internal.clearcut.zzfd.zza(r7, r2, r1);\n r6.zzb(r7, r4, r0);\n goto L_0x00ee;\n L_0x003d:\n r1 = r6.zzmz;\n com.google.android.gms.internal.clearcut.zzeh.zza(r1, r7, r8, r2);\n goto L_0x00ee;\n L_0x0044:\n r1 = r6.zzmw;\n r1.zza(r7, r8, r2);\n goto L_0x00ee;\n L_0x004b:\n r1 = r6.zza(r8, r0);\n if (r1 == 0) goto L_0x00ee;\n L_0x0051:\n goto L_0x00c8;\n L_0x0053:\n r1 = r6.zza(r8, r0);\n if (r1 == 0) goto L_0x00ee;\n L_0x0059:\n goto L_0x006f;\n L_0x005a:\n r1 = r6.zza(r8, r0);\n if (r1 == 0) goto L_0x00ee;\n L_0x0060:\n goto L_0x00c8;\n L_0x0062:\n r1 = r6.zza(r8, r0);\n if (r1 == 0) goto L_0x00ee;\n L_0x0068:\n goto L_0x006f;\n L_0x0069:\n r1 = r6.zza(r8, r0);\n if (r1 == 0) goto L_0x00ee;\n L_0x006f:\n goto L_0x00b3;\n L_0x0070:\n r1 = r6.zza(r8, r0);\n if (r1 == 0) goto L_0x00ee;\n L_0x0076:\n goto L_0x00b3;\n L_0x0077:\n r1 = r6.zza(r8, r0);\n if (r1 == 0) goto L_0x00ee;\n L_0x007d:\n goto L_0x0089;\n L_0x007e:\n r6.zza(r7, r8, r0);\n goto L_0x00ee;\n L_0x0083:\n r1 = r6.zza(r8, r0);\n if (r1 == 0) goto L_0x00ee;\n L_0x0089:\n r1 = com.google.android.gms.internal.clearcut.zzfd.zzo(r8, r2);\n com.google.android.gms.internal.clearcut.zzfd.zza(r7, r2, r1);\n goto L_0x00eb;\n L_0x0091:\n r1 = r6.zza(r8, r0);\n if (r1 == 0) goto L_0x00ee;\n L_0x0097:\n r1 = com.google.android.gms.internal.clearcut.zzfd.zzl(r8, r2);\n com.google.android.gms.internal.clearcut.zzfd.zza(r7, r2, r1);\n goto L_0x00eb;\n L_0x009f:\n r1 = r6.zza(r8, r0);\n if (r1 == 0) goto L_0x00ee;\n L_0x00a5:\n goto L_0x00b3;\n L_0x00a6:\n r1 = r6.zza(r8, r0);\n if (r1 == 0) goto L_0x00ee;\n L_0x00ac:\n goto L_0x00c8;\n L_0x00ad:\n r1 = r6.zza(r8, r0);\n if (r1 == 0) goto L_0x00ee;\n L_0x00b3:\n r1 = com.google.android.gms.internal.clearcut.zzfd.zzj(r8, r2);\n com.google.android.gms.internal.clearcut.zzfd.zza(r7, r2, r1);\n goto L_0x00eb;\n L_0x00bb:\n r1 = r6.zza(r8, r0);\n if (r1 == 0) goto L_0x00ee;\n L_0x00c1:\n goto L_0x00c8;\n L_0x00c2:\n r1 = r6.zza(r8, r0);\n if (r1 == 0) goto L_0x00ee;\n L_0x00c8:\n r4 = com.google.android.gms.internal.clearcut.zzfd.zzk(r8, r2);\n com.google.android.gms.internal.clearcut.zzfd.zza(r7, r2, r4);\n goto L_0x00eb;\n L_0x00d0:\n r1 = r6.zza(r8, r0);\n if (r1 == 0) goto L_0x00ee;\n L_0x00d6:\n r1 = com.google.android.gms.internal.clearcut.zzfd.zzm(r8, r2);\n com.google.android.gms.internal.clearcut.zzfd.zza(r7, r2, r1);\n goto L_0x00eb;\n L_0x00de:\n r1 = r6.zza(r8, r0);\n if (r1 == 0) goto L_0x00ee;\n L_0x00e4:\n r4 = com.google.android.gms.internal.clearcut.zzfd.zzn(r8, r2);\n com.google.android.gms.internal.clearcut.zzfd.zza(r7, r2, r4);\n L_0x00eb:\n r6.zzb(r7, r0);\n L_0x00ee:\n r0 = r0 + 4;\n goto L_0x0003;\n L_0x00f2:\n r0 = r6.zzmq;\n if (r0 != 0) goto L_0x0104;\n L_0x00f6:\n r0 = r6.zzmx;\n com.google.android.gms.internal.clearcut.zzeh.zza(r0, r7, r8);\n r0 = r6.zzmo;\n if (r0 == 0) goto L_0x0104;\n L_0x00ff:\n r0 = r6.zzmy;\n com.google.android.gms.internal.clearcut.zzeh.zza(r0, r7, r8);\n L_0x0104:\n return;\n L_0x0105:\n r7 = new java.lang.NullPointerException;\n r7.<init>();\n throw r7;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.clearcut.zzds.zzc(java.lang.Object, java.lang.Object):void\");\n }", "double passer();", "@Override\n\t\tpublic void run() {\n\t\t\tMessage msg = new Message();\n\t\t\ttry {\n\t\t\t\tHippoWebService connect = new HippoWebService();\n\t\t\t\tString[] split = _queryString.split(\",\");\n\t\t\t\t_busStop = split[1];\n\t\t\t\tString api = \"http://pda.5284.com.tw/MQS/businfo4.jsp?SLID=\" + split[0];\n\t\t\t\tString ret = connect.getMethod(api, \"utf-8\");\n\t\t\t if(ret!=null)\n\t\t\t {\n\t\t\t \tmsg.what = 101;\n\t\t\t \tmsg.obj = ret;\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t \tmsg.what = 999;\n\t\t\t \tmsg.obj = \"Error\";\n\t\t\t }\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tmsg.what = 999;\n\t\t\t\tmsg.obj = e.toString();\n\t\t\t}\n\t\t\tmHandler.sendMessage(msg);\n\t\t}", "private synchronized void handleCallPacket() {\n int index = 0;\n try {\n index = this.getInteger();\n this.checkFunction(\"List\");\n }\n catch (MathLinkException e) {\n this.handleCleanException(e);\n return;\n }\n if (index != 14) {\n this.lastExceptionDuringCallPacketHandling = null;\n }\n try {\n StdLink.setup(this);\n StdLink.lastPktWasAllowUIComputations(false);\n this.clearInterrupt();\n switch (index) {\n case 1: {\n this.callJava();\n return;\n }\n case 2: {\n this.loadClass();\n return;\n }\n case 3: {\n this.throwFromMathematica();\n return;\n }\n case 4: {\n this.releaseInstance();\n return;\n }\n case 5: {\n this.val();\n return;\n }\n case 6: {\n this.callOnLoadClass();\n return;\n }\n case 7: {\n this.callOnUnloadClass();\n return;\n }\n case 8: {\n this.setComplexCls();\n return;\n }\n case 9: {\n this.reflect();\n return;\n }\n case 10: {\n this.showInFront();\n return;\n }\n case 11: {\n this.sameObjectQ();\n return;\n }\n case 12: {\n this.instanceOf();\n return;\n }\n case 13: {\n this.allowRaggedArrays();\n return;\n }\n case 14: {\n this.getException();\n return;\n }\n case 15: {\n this.connectToFEServer();\n return;\n }\n case 16: {\n this.disconnectToFEServer();\n return;\n }\n case 17: {\n this.peekClasses();\n return;\n }\n case 18: {\n this.peekObjects();\n return;\n }\n case 21: {\n this.setUserDir();\n return;\n }\n case 19: {\n this.getClassPath();\n return;\n }\n case 20: {\n this.addToClassPath();\n return;\n }\n case 23: {\n this.uiThreadWaiting();\n return;\n }\n case 22: {\n this.allowUIComputations();\n return;\n }\n case 24: {\n this.yieldTime();\n return;\n }\n case 25: {\n this.getConsole();\n return;\n }\n case 26: {\n this.extraLinks(true);\n return;\n }\n case 27: {\n this.getWindowID();\n return;\n }\n case 28: {\n this.addTitleChangeListener();\n return;\n }\n case 29: {\n this.setVMName();\n return;\n }\n case 30: {\n this.setException();\n break;\n }\n }\n return;\n }\n catch (Exception e) {\n this.lastExceptionDuringCallPacketHandling = e;\n return;\n }\n finally {\n StdLink.remove();\n this.clearError();\n this.newPacket();\n try {\n this.endPacket();\n this.flush();\n }\n catch (MathLinkException ee) {}\n }\n }", "@Override\n public void onDelectFlightInfo(ServResrouce info)\n {\n }", "@Override\n public void onDelectFlightInfo(ServResrouce info)\n {\n }", "private void m1654a(p000a.p001a.p002a.p003a.p022i.p024b.C0112x r7, p000a.p001a.p002a.p003a.p034n.C0157e r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/293907205.run(Unknown Source)\n*/\n /*\n r6 = this;\n r0 = r7.m322b();\n r7 = r7.m321a();\n r1 = 0;\n L_0x0009:\n r2 = \"http.request\";\n r8.mo160a(r2, r7);\n r1 = r1 + 1;\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r2 = r2.mo1932c();\t Catch:{ IOException -> 0x002f }\n if (r2 != 0) goto L_0x0020;\t Catch:{ IOException -> 0x002f }\n L_0x0018:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x002f }\n r2.mo2023a(r0, r8, r3);\t Catch:{ IOException -> 0x002f }\n goto L_0x002b;\t Catch:{ IOException -> 0x002f }\n L_0x0020:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x002f }\n r3 = p000a.p001a.p002a.p003a.p032l.C0150c.m428a(r3);\t Catch:{ IOException -> 0x002f }\n r2.mo1931b(r3);\t Catch:{ IOException -> 0x002f }\n L_0x002b:\n r6.m1660a(r0, r8);\t Catch:{ IOException -> 0x002f }\n return;\n L_0x002f:\n r2 = move-exception;\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0035 }\n r3.close();\t Catch:{ IOException -> 0x0035 }\n L_0x0035:\n r3 = r6.f1520h;\n r3 = r3.retryRequest(r2, r1, r8);\n if (r3 == 0) goto L_0x00a0;\n L_0x003d:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x0009;\n L_0x0045:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"I/O exception (\";\n r4.append(r5);\n r5 = r2.getClass();\n r5 = r5.getName();\n r4.append(r5);\n r5 = \") caught when connecting to \";\n r4.append(r5);\n r4.append(r0);\n r5 = \": \";\n r4.append(r5);\n r5 = r2.getMessage();\n r4.append(r5);\n r4 = r4.toString();\n r3.m269d(r4);\n r3 = r6.f1513a;\n r3 = r3.m262a();\n if (r3 == 0) goto L_0x0088;\n L_0x007f:\n r3 = r6.f1513a;\n r4 = r2.getMessage();\n r3.m261a(r4, r2);\n L_0x0088:\n r2 = r6.f1513a;\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r4 = \"Retrying connect to \";\n r3.append(r4);\n r3.append(r0);\n r3 = r3.toString();\n r2.m269d(r3);\n goto L_0x0009;\n L_0x00a0:\n throw r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.a.a.a.i.b.p.a(a.a.a.a.i.b.x, a.a.a.a.n.e):void\");\n }", "public interface IZipStrategy {\n\n void zip();\n}", "@Override\n\t\tpublic void onGetWalkingRouteResult(MKWalkingRouteResult arg0, int arg1) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void run() {\n\t\t\tMessage msg = new Message();\n\t\t\ttry {\n\t\t\t\tHippoWebService connect = new HippoWebService();\n\t\t\t\tString[] split = _queryString.split(\",\");\n\t\t\t\t_busStop = split[1];\n\t\t\t\tString api = \"http://pda.5284.com.tw/MQS/businfo4.jsp?SLID=\" + split[0];\n\t\t\t\tString ret = connect.getMethod(api, \"utf-8\");\n\t\t\t if(ret!=null)\n\t\t\t {\n\t\t\t \tmsg.what = 102;\n\t\t\t \tmsg.obj = ret;\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t \tmsg.what = 999;\n\t\t\t \tmsg.obj = \"Error\";\n\t\t\t }\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tmsg.what = 999;\n\t\t\t\tmsg.obj = e.toString();\n\t\t\t}\n\t\t\tmHandler.sendMessage(msg);\n\t\t}", "public void handleIncoming() {\n\t\t// parse the packet payload\n\t\tPair<Packet,Integer> pp = fwdr.receivePkt();\n\t\tPacket p = pp.left; int lnk = pp.right;\n\n\t\tString[] lines = p.payload.split(\"\\n\");\n\t\tif (!lines[0].equals(\"RPv0\")) return;\n\n\t\tString[] chunks = lines[1].split(\":\");\n\t\tif (!chunks[0].equals(\"type\")) return;\n\t\tString type = chunks[1].trim();\n\t\t\n\t\t// if it's an route advert, call handleAdvert\n\t\tif (type.equals(\"advert\")){\n\t\t\thandleAdvert(lines, lnk);\n\t\t}\n\t\t// if it's an link failure advert, call handleFailureAdvert\n\t\tif (type.equals(\"fadvert\")){\n\t\t\thandleFailureAdvert(lines, lnk);\n\t\t}\n\t\t// if it's a hello, echo it back\n\t\tif (type.equals(\"hello\")){\n\t\t\tchunks = lines[2].split(\":\");\n\t\t\tif (!chunks[0].equals(\"timestamp\")) return;\n\t\t\tString timestamp = chunks[1].trim();\n\t\t\tp.payload = String.format(\"RPv0\\ntype: echo\\n\"\n\t\t\t\t\t+ \"timestamp: %s \\n\", timestamp);\n\t\t\tfwdr.sendPkt(p, lnk);\n\t\t}\n\t\t// else it's a reply to a hello packet\n\t\t// use timestamp to determine round-trip delay\n\t\t// use this to update the link cost using exponential\n\t\t// weighted moving average method\n\t\t// also, update link cost statistics\n\t\t// also, set gotReply to true\n\t\telse {\n\t\t\tchunks = lines[2].split(\":\");\n\t\t\tif (!chunks[0].equals(\"timestamp\")) return;\n\t\t\tString timeString = chunks[1].trim();\n\t\t\tdouble timestamp = Double.parseDouble(timeString);\n\t\t\tdouble rtDelay = now - timestamp;\n\n\t\t\tLinkInfo link = lnkVec.get(lnk);\n\t\t\tlink.helloState = 3;\n\t\t\tlink.cost = rtDelay/2;\n\t\t\tRoute rt = new Route();\n\t\t\trt.outLink = lnk;\n\t\t\tboolean match = false;\n\t\t\tfor (Route rte : rteTbl){\n\t\t\t\tif (rte.outLink == lnk){\n\t\t\t\t\trt = rte;\n\t\t\t\t\tmatch = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t\tRoute newRt = rt;\n\t\t\tlink.count = 0;\n\t\t\tlink.totalCost = 0;\n\t\t\tfor (LinkInfo l : lnkVec){\n\t\t\t\tif(l.helloState != 0){\n\t\t\t\t\tlink.count++;\n\t\t\t\t\tlink.totalCost += l.cost;\n\t\t\t\t}\n\t\t\t}\n\t\t\tnewRt.cost = link.cost;\n\t\t\tif (updateRoute(rt,newRt)){\n\t\t\t\tlink.cost = rt.cost;\n\t\t\t}\n\t\t\tif (link.cost > link.maxCost){\n\t\t\t\tlink.maxCost = link.cost;\n\t\t\t}\n\t\t\tif (link.cost < link.minCost){\n\t\t\t\tlink.minCost = link.cost;\n\t\t\t}\n\t\t\tlink.gotReply = true;\n\t\t\tlnkVec.set(lnk, link);\n\t\t}\n\n\t}", "@Override\n\t\tpublic void onGetTransitRouteResult(TransitRouteResult transitrouteresult) {\n\t\t\tnearby_baidumap.clear();// 清除图层覆盖物\n\t\t\tN_showdatainfotv.setText(\"\");\n\t\t\tSB.delete(0, SB.length());\n\t\t\tif (transitrouteresult == null || transitrouteresult.error != SearchResult.ERRORNO.NO_ERROR) {\n\t\t\t\tToastUtil.CreateToastShow(navigation, null, \"温馨提示\", \"没有找到合适的路线\");\n\t\t\t}\n\t\t\tif (transitrouteresult.error == SearchResult.ERRORNO.AMBIGUOUS_ROURE_ADDR) {\n\t\t\t\t// 起终点或途经点地址有岐义,通过以下接口获取建议查询信息\n\t\t\t\t// result.getSuggestAddrInfo()\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (transitrouteresult.error == SearchResult.ERRORNO.NO_ERROR) {\n\n\t\t\t\tN_routeline = transitrouteresult.getRouteLines().get(0);// 第一方案\n\t\t\t\tSB.append(\"起点\\t\\t\" + N_currentaddress).append(\"\\t\\t\\t----\\t\\t\\t\").append(\"终点\\t\\t\" + N_targetaddress)\n\t\t\t\t\t\t.append(\"\\n\\n\");\n\t\t\t\tfor (int i = 0; i < N_routeline.getAllStep().size(); i++) {\n\t\t\t\t\tTransitRouteLine.TransitStep step = (TransitStep) N_routeline.getAllStep().get(i);\n\t\t\t\t\tSB.append(i + \"\\t\\t:\" + step.getInstructions() + \"\\t\\t\\t\");\n\t\t\t\t}\n\n\t\t\t\tN_showdatainfotv.setText(SB);\n\t\t\t\tTransitOverlayUtil transitoverlayutil = new TransitOverlayUtil(nearby_baidumap, navigation);\n\t\t\t\ttransitoverlayutil.setData(transitrouteresult.getRouteLines().get(0));\n\t\t\t\ttransitoverlayutil.addToMap();\n\t\t\t\ttransitoverlayutil.zoomToSpan();\n\t\t\t}\n\n\t\t}", "public void peep()\n\t{\n\t\tSystem.out.println(\"The data is..\"+arr[top-1]);\n\t}", "@Override\r\n\tpublic void onGetWalkingRouteResult(MKWalkingRouteResult arg0, int arg1) {\n\t\t\r\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\tshowProgress(false, null);\n\t\t\tboolean canRoute = false;\n\t\t\tfor (FloorInfo floorInfo : floorList) {\n\t\t\t\tArrayList<LocatorGeocodeResult> shelfList = floorInfo\n\t\t\t\t\t\t.getShelfList();\n\t\t\t\tif (shelfList.size() > 0) {\n\t\t\t\t\tStopGraphic points[] = new StopGraphic[shelfList.size()];\n\t\t\t\t\tint index = 1;\n\t\t\t\t\tfor (LocatorGeocodeResult result : shelfList) {\n\t\t\t\t\t\tString address = result.getAddress();\n\t\t\t\t\t\tif (index >= shelfList.size()\n\t\t\t\t\t\t\t\t&& !address.equals(floorInfo.getStartPoint())) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tPoint p = (Point) GeometryEngine.project(\n\t\t\t\t\t\t\t\tresult.getLocation(), wm, egs);\n\t\t\t\t\t\tif (address.equals(floorInfo.getStartPoint())) {\n\t\t\t\t\t\t\tpoints[0] = new StopGraphic(p);\n\n\t\t\t\t\t\t\tSystem.out.println(\"起始点x:\" + p.getX() + \" y:\"\n\t\t\t\t\t\t\t\t\t+ p.getY());\n\n\t\t\t\t\t\t} else if (floorInfo.getEndPoint() != null\n\t\t\t\t\t\t\t\t&& address.equals(floorInfo.getEndPoint())) {\n\t\t\t\t\t\t\tpoints[shelfList.size() - 1] = new StopGraphic(p);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpoints[index++] = new StopGraphic(p);\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\tif (points[0] != null && points.length >= 2) {\n\t\t\t\t\t\tcanRoute = true;\n\t\t\t\t\t\trouteCount++;\n\t\t\t\t\t}\n\t\t\t\t\tfloorInfo.setPoints(points);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tclearAll();\n\t\t\tif (!canRoute) {\n\t\t\t\tToast.makeText(MapActivity.this, \"没有找到足够的点,无法导航\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t} else {\n\t\t\t\tQueryDirections();\n\t\t\t}\n\t\t}", "private void poetries() {\n\n\t}", "public static void main(String[] args) throws Exception {\n\n RouteProvider routeProvider = RouteProvider.getInstance();\n Route nJudah = routeProvider.retrieveRoute(\"N\");\n routeProvider.retrievePredictions(nJudah.getOutbound());\n\n System.out.println(nJudah.getName());\n System.out.println(nJudah.getColor());\n System.out.println(nJudah.getOppositeColor());\n System.out.println(nJudah.getOutbound().getStops().get(0).getName());\n System.out.println(nJudah.getInbound().getStops().get(0).getName());\n\n for(Stop stop : nJudah.getOutbound().getStops()) {\n System.out.println(stop.getName() + \" - \" + stop.getPredictionsString());\n }\n\n\n }", "public final boolean zza(int r2, android.os.Parcel r3, android.os.Parcel r4, int r5) {\n /*\n r1 = this;\n switch(r2) {\n case 1: goto L_0x00ee;\n case 2: goto L_0x00db;\n case 3: goto L_0x00c7;\n case 4: goto L_0x00b3;\n case 5: goto L_0x009c;\n case 6: goto L_0x008d;\n case 7: goto L_0x0081;\n case 8: goto L_0x006c;\n case 9: goto L_0x0058;\n case 10: goto L_0x004c;\n case 11: goto L_0x0047;\n case 12: goto L_0x003b;\n case 13: goto L_0x0032;\n case 14: goto L_0x0029;\n case 15: goto L_0x0014;\n case 16: goto L_0x000f;\n case 17: goto L_0x000a;\n case 18: goto L_0x0005;\n default: goto L_0x0003;\n }\n L_0x0003:\n r2 = 0\n return r2\n L_0x0005:\n java.lang.String r2 = r1.getAppIdOrigin()\n goto L_0x0050\n L_0x000a:\n java.lang.String r2 = r1.getCurrentScreenClass()\n goto L_0x0050\n L_0x000f:\n java.lang.String r2 = r1.getCurrentScreenName()\n goto L_0x0050\n L_0x0014:\n android.os.IBinder r2 = r3.readStrongBinder()\n com.google.android.gms.dynamic.IObjectWrapper r2 = com.google.android.gms.dynamic.IObjectWrapper.Stub.asInterface(r2)\n java.lang.String r5 = r3.readString()\n java.lang.String r3 = r3.readString()\n r1.zzb(r2, r5, r3)\n goto L_0x00f9\n L_0x0029:\n java.lang.String r2 = r3.readString()\n r1.endAdUnitExposure(r2)\n goto L_0x00f9\n L_0x0032:\n java.lang.String r2 = r3.readString()\n r1.beginAdUnitExposure(r2)\n goto L_0x00f9\n L_0x003b:\n long r2 = r1.generateEventId()\n r4.writeNoException()\n r4.writeLong(r2)\n goto L_0x00fc\n L_0x0047:\n java.lang.String r2 = r1.getGmpAppId()\n goto L_0x0050\n L_0x004c:\n java.lang.String r2 = r1.getAppInstanceId()\n L_0x0050:\n r4.writeNoException()\n r4.writeString(r2)\n goto L_0x00fc\n L_0x0058:\n java.lang.String r2 = r3.readString()\n java.lang.String r3 = r3.readString()\n java.util.List r2 = r1.getConditionalUserProperties(r2, r3)\n r4.writeNoException()\n r4.writeList(r2)\n goto L_0x00fc\n L_0x006c:\n java.lang.String r2 = r3.readString()\n java.lang.String r5 = r3.readString()\n android.os.Parcelable$Creator r0 = android.os.Bundle.CREATOR\n android.os.Parcelable r3 = com.google.android.gms.internal.ads.zzgv.zza((android.os.Parcel) r3, r0)\n android.os.Bundle r3 = (android.os.Bundle) r3\n r1.clearConditionalUserProperty(r2, r5, r3)\n goto L_0x00f9\n L_0x0081:\n android.os.Parcelable$Creator r2 = android.os.Bundle.CREATOR\n android.os.Parcelable r2 = com.google.android.gms.internal.ads.zzgv.zza((android.os.Parcel) r3, r2)\n android.os.Bundle r2 = (android.os.Bundle) r2\n r1.setConditionalUserProperty(r2)\n goto L_0x00f9\n L_0x008d:\n java.lang.String r2 = r3.readString()\n int r2 = r1.getMaxUserProperties(r2)\n r4.writeNoException()\n r4.writeInt(r2)\n goto L_0x00fc\n L_0x009c:\n java.lang.String r2 = r3.readString()\n java.lang.String r5 = r3.readString()\n boolean r3 = com.google.android.gms.internal.ads.zzgv.zza(r3)\n java.util.Map r2 = r1.getUserProperties(r2, r5, r3)\n r4.writeNoException()\n r4.writeMap(r2)\n goto L_0x00fc\n L_0x00b3:\n java.lang.String r2 = r3.readString()\n java.lang.String r5 = r3.readString()\n android.os.IBinder r3 = r3.readStrongBinder()\n com.google.android.gms.dynamic.IObjectWrapper r3 = com.google.android.gms.dynamic.IObjectWrapper.Stub.asInterface(r3)\n r1.zza(r2, r5, r3)\n goto L_0x00f9\n L_0x00c7:\n java.lang.String r2 = r3.readString()\n java.lang.String r5 = r3.readString()\n android.os.Parcelable$Creator r0 = android.os.Bundle.CREATOR\n android.os.Parcelable r3 = com.google.android.gms.internal.ads.zzgv.zza((android.os.Parcel) r3, r0)\n android.os.Bundle r3 = (android.os.Bundle) r3\n r1.logEvent(r2, r5, r3)\n goto L_0x00f9\n L_0x00db:\n android.os.Parcelable$Creator r2 = android.os.Bundle.CREATOR\n android.os.Parcelable r2 = com.google.android.gms.internal.ads.zzgv.zza((android.os.Parcel) r3, r2)\n android.os.Bundle r2 = (android.os.Bundle) r2\n android.os.Bundle r2 = r1.performActionWithResponse(r2)\n r4.writeNoException()\n com.google.android.gms.internal.ads.zzgv.zzb(r4, r2)\n goto L_0x00fc\n L_0x00ee:\n android.os.Parcelable$Creator r2 = android.os.Bundle.CREATOR\n android.os.Parcelable r2 = com.google.android.gms.internal.ads.zzgv.zza((android.os.Parcel) r3, r2)\n android.os.Bundle r2 = (android.os.Bundle) r2\n r1.performAction(r2)\n L_0x00f9:\n r4.writeNoException()\n L_0x00fc:\n r2 = 1\n return r2\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.zzbge.zza(int, android.os.Parcel, android.os.Parcel, int):boolean\");\n }", "protected java.util.List x (java.lang.String r19){\n /*\n r18 = this;\n r0 = r18;\n r2 = r0.K;\n r0 = r19;\n r2 = r2.getAllSortStackTraces(r0);\n r2 = (java.util.List) r2;\n if (r2 == 0) goto L_0x000f;\n L_0x000e:\n return r2;\n L_0x000f:\n r12 = java.util.Collections.emptyList();\n r2 = r18.bp();\n r3 = r18.TaskHandler(r19);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r4 = r2.setDrawable(r3);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n if (r4 != 0) goto L_0x0026;\n L_0x0021:\n r18.bq();\n r2 = r12;\n goto L_0x000e;\n L_0x0026:\n r13 = r2.getScaledMaximumFlingVelocity(r3);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r14 = new java.io.ByteArrayOutputStream;\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r2 = 2048; // 0x800 float:2.87E-42 double:1.0118E-320;\n r14.<creatCallTask>(r2);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r13, r14);\t Catch:{ all -> 0x00f2 }\n r2 = r14.toByteArray();\t Catch:{ all -> 0x00f2 }\n r2 = com.duokan.kernel.DkUtils.decodeSimpleDrm(r2);\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.String;\t Catch:{ all -> 0x00f2 }\n r4 = \"UTF-8\";\n r3.<creatCallTask>(r2, r4);\t Catch:{ all -> 0x00f2 }\n r2 = new org.json.JSONObject;\t Catch:{ all -> 0x00f2 }\n r2.<creatCallTask>(r3);\t Catch:{ all -> 0x00f2 }\n if (r2 != 0) goto L_0x0055;\n L_0x004a:\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r18.bq();\n r2 = r12;\n goto L_0x000e;\n L_0x0055:\n r3 = \"pictures\";\n r15 = com.duokan.reader.common.getPhysicalYPixels.setDrawable(r2, r3);\t Catch:{ all -> 0x00f2 }\n r16 = new java.util.ArrayList;\t Catch:{ all -> 0x00f2 }\n r2 = r15.length();\t Catch:{ all -> 0x00f2 }\n r0 = r16;\n r0.<creatCallTask>(r2);\t Catch:{ all -> 0x00f2 }\n r2 = 0;\n L_0x0067:\n r3 = r15.length();\t Catch:{ all -> 0x00f2 }\n if (r2 >= r3) goto L_0x00d0;\n L_0x006d:\n r3 = r15.getJSONObject(r2);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_md5\";\n r7 = r3.getString(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_url\";\n r6 = r3.getString(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_size\";\n r8 = r3.getLong(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"width\";\n r10 = r3.getInt(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"height\";\n r11 = r3.getInt(r4);\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00f2 }\n r3.<creatCallTask>();\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r3 = r3.append(r0);\t Catch:{ all -> 0x00f2 }\n r4 = \".\";\n r3 = r3.append(r4);\t Catch:{ all -> 0x00f2 }\n r3 = r3.append(r2);\t Catch:{ all -> 0x00f2 }\n r4 = r3.toString();\t Catch:{ all -> 0x00f2 }\n r5 = new java.lang.String;\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00f2 }\n r3.<creatCallTask>();\t Catch:{ all -> 0x00f2 }\n r17 = \"file:///stuffs/\";\n r0 = r17;\n r3 = r3.append(r0);\t Catch:{ all -> 0x00f2 }\n r3 = r3.append(r7);\t Catch:{ all -> 0x00f2 }\n r3 = r3.toString();\t Catch:{ all -> 0x00f2 }\n r5.<creatCallTask>(r3);\t Catch:{ all -> 0x00f2 }\n r3 = r18;\n r3 = r3.setDrawable(r4, r5, r6, r7, r8, r10, r11);\t Catch:{ all -> 0x00f2 }\n r0 = r16;\n r0.add(r3);\t Catch:{ all -> 0x00f2 }\n r2 = r2 + 1;\n goto L_0x0067;\n L_0x00d0:\n r0 = r18;\n r2 = r0.K;\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r1 = r16;\n r2.putIfAbsent(r0, r1);\t Catch:{ all -> 0x00f2 }\n r0 = r18;\n r2 = r0.K;\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r2 = r2.getAllSortStackTraces(r0);\t Catch:{ all -> 0x00f2 }\n r2 = (java.util.List) r2;\t Catch:{ all -> 0x00f2 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x0106, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x0106, all -> 0x0101 }\n r18.bq();\n goto L_0x000e;\n L_0x00f2:\n r2 = move-exception;\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n throw r2;\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n L_0x00fa:\n r2 = move-exception;\n r2 = r12;\n L_0x00fc:\n r18.bq();\n goto L_0x000e;\n L_0x0101:\n r2 = move-exception;\n r18.bq();\n throw r2;\n L_0x0106:\n r3 = move-exception;\n goto L_0x00fc;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.duokan.reader.domain.bookshelf.jv.MyContextWrapper(java.lang.String):java.util.List\");\n }", "public int getZip() {\n return this.zip;\n }", "static void perform_sphl(String passed){\n\t\tint type = type_of_sphl(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\ttransfer_hl_to_sp(passed);\n\t\t\tbreak;\n\t\t}\n\t}", "public abstract String getZipCode();", "private void inzsr() {\n\t\tid1Ctdta = 1;\n\t\tstrCtdta = \"Each KGS \";\n\t\tfor (int idxCtdta = 1; idxCtdta <= 1; idxCtdta++) {\n\t\t\tum[idxCtdta] = subString(strCtdta, id1Ctdta, 11);\n\t\t\tid1Ctdta = Integer.valueOf(id1Ctdta + 11);\n\t\t}\n\t\t// Initialise message subfile\n\t\tnmfkpinds.setPgmInd32(true);\n\t\tstateVariable.setZzpgm(replaceStr(stateVariable.getZzpgm(), 1, 8, \"WWCONDET\"));\n\t\t// - Set date\n\t\tstateVariable.setZzdate(getDate().toInt());\n\t\t// -\n\t\t// - CONTRACT\n\t\tcontractHeader.retrieve(stateVariable.getXwordn());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// - CUSTOMER\n\t\tpurchases.retrieve(stateVariable.getXwbccd());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00012 Debtor not found on Purchases\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setXwg4tx(all(\"-\", 40));\n\t\t}\n\t\t// - REPRESENTATIVE\n\t\tsalespersons.retrieve(stateVariable.getPerson());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00013 Rep not found on Salespersons\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setPname(all(\"-\", 34));\n\t\t}\n\t\t// - STATUS\n\t\torderStatusDescription.retrieve(stateVariable.getXwstat());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00014 Status not found on Order_status_description\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setXwsdsc(all(\"-\", 20));\n\t\t}\n\t}", "public static void main(String[] args) throws InterruptedException{\n Observable<Flight> flight = rxLookupFlight(\"LOT 783\").subscribeOn(Schedulers.io());\n Observable<Passenger> passenger = rxFindPassenger(42).subscribeOn(Schedulers.io());\n Observable<Ticket> ticket =\n flight.zipWith(passenger, (f, p) -> bookTicket(f, p));\n ticket.subscribe(t -> sendEmail(t));\n\n Thread.sleep(30000);\n }", "private void readGPS() {\n }", "public final com.google.android.gms.internal.dp<?> zza(com.google.android.gms.internal.zzcwa r8, com.google.android.gms.internal.dp<?>... r9) {\n /*\n r7 = this;\n r4 = 2\n r1 = 1\n r2 = 0\n com.google.android.gms.common.internal.zzbo.zzaf(r1)\n int r0 = r9.length\n if (r0 != r4) goto L_0x0050\n r0 = r1\n L_0x000a:\n com.google.android.gms.common.internal.zzbo.zzaf(r0)\n r0 = r9[r2]\n boolean r0 = r0 instanceof com.google.android.gms.internal.eb\n com.google.android.gms.common.internal.zzbo.zzaf(r0)\n r0 = r9[r1]\n java.lang.String r5 = com.google.android.gms.internal.zzcxp.zzd(r0)\n r0 = r9[r2]\n com.google.android.gms.internal.eb r0 = (com.google.android.gms.internal.eb) r0\n java.lang.String r0 = r0.value()\n java.lang.String r0 = (java.lang.String) r0\n r3 = -1\n int r6 = r0.hashCode()\n switch(r6) {\n case 101: goto L_0x0052;\n case 105: goto L_0x005c;\n case 118: goto L_0x0065;\n case 119: goto L_0x006f;\n default: goto L_0x002c;\n }\n L_0x002c:\n r1 = r3\n L_0x002d:\n switch(r1) {\n case 0: goto L_0x0079;\n case 1: goto L_0x007f;\n case 2: goto L_0x0083;\n case 3: goto L_0x0087;\n default: goto L_0x0030;\n }\n L_0x0030:\n java.lang.IllegalArgumentException r1 = new java.lang.IllegalArgumentException\n java.lang.String r3 = \"Invalid logging level: \"\n r0 = r9[r2]\n com.google.android.gms.internal.eb r0 = (com.google.android.gms.internal.eb) r0\n java.lang.String r0 = r0.value()\n java.lang.String r0 = (java.lang.String) r0\n java.lang.String r0 = java.lang.String.valueOf(r0)\n int r2 = r0.length()\n if (r2 == 0) goto L_0x008b\n java.lang.String r0 = r3.concat(r0)\n L_0x004c:\n r1.<init>(r0)\n throw r1\n L_0x0050:\n r0 = r2\n goto L_0x000a\n L_0x0052:\n java.lang.String r1 = \"e\"\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x002c\n r1 = r2\n goto L_0x002d\n L_0x005c:\n java.lang.String r4 = \"i\"\n boolean r0 = r0.equals(r4)\n if (r0 == 0) goto L_0x002c\n goto L_0x002d\n L_0x0065:\n java.lang.String r1 = \"v\"\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x002c\n r1 = r4\n goto L_0x002d\n L_0x006f:\n java.lang.String r1 = \"w\"\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x002c\n r1 = 3\n goto L_0x002d\n L_0x0079:\n com.google.android.gms.internal.zzcvk.e(r5)\n L_0x007c:\n com.google.android.gms.internal.dv r0 = com.google.android.gms.internal.dv.zzbLu\n return r0\n L_0x007f:\n com.google.android.gms.internal.zzcvk.zzaS(r5)\n goto L_0x007c\n L_0x0083:\n com.google.android.gms.internal.zzcvk.v(r5)\n goto L_0x007c\n L_0x0087:\n com.google.android.gms.internal.zzcvk.zzaT(r5)\n goto L_0x007c\n L_0x008b:\n java.lang.String r0 = new java.lang.String\n r0.<init>(r3)\n goto L_0x004c\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ac.zza(com.google.android.gms.internal.zzcwa, com.google.android.gms.internal.dp[]):com.google.android.gms.internal.dp\");\n }", "public static GetRoadwayPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetRoadwayPageResponse object =\n new GetRoadwayPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getRoadwayPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetRoadwayPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public void run() {\n int done = 0;\n int len = 0;\n int off = 0;\n int rv = 0;\n _running = true;\n try {\n edu.hkust.clap.monitor.Monitor.loopBegin(143);\nwhile (_running) { \nedu.hkust.clap.monitor.Monitor.loopInc(143);\n{\n rv = _stream.read(_buffer);\n if (!PushCacheProtocol.instance().isValidProtocolTag(_buffer)) {\n throw new Exception(\"Bad protocol tag\");\n }\n _dataStream = new DataInputStream(new ByteArrayInputStream(_buffer));\n _dataStream.skipBytes(PushCacheProtocol.TAG_LEN);\n short maj = _dataStream.readShort();\n short min = _dataStream.readShort();\n if (maj != PushCacheProtocol.MAJ_PROTO_VERSION || min > PushCacheProtocol.MIN_PROTO_VERSION) {\n throw new Exception(\"Bad protocol version\");\n }\n String command = new String(_buffer, PushCacheProtocol.HEADER_LEN, PushCacheProtocol.COMMAND_LEN);\n int com = PushCacheProtocol.instance().parseCommand(command);\n readPayload();\n switch(com) {\n case PushCacheProtocol.ADD:\n add();\n break;\n case PushCacheProtocol.BYE:\n stopRunning();\n break;\n case PushCacheProtocol.DEL:\n del();\n break;\n case PushCacheProtocol.CLN:\n clean();\n break;\n case PushCacheProtocol.PRS:\n present();\n break;\n case PushCacheProtocol.NOP:\n nop();\n break;\n default:\n throw new Exception(\"Unrecognised command \\\"\" + command + \"\\\"\");\n }\n }} \nedu.hkust.clap.monitor.Monitor.loopEnd(143);\n\n } catch (Exception e) {\n e.printStackTrace();\n _running = false;\n reply_error(e.getMessage());\n }\n cleanup();\n }", "@Override\n public void run() {\n List<LatLng> trailPoints = new ArrayList<>();\n\n // Get a reference of the LatLng that will be used to mark the start of the trail\n LatLng start = null;\n\n try {\n // Create an InputStream from gpxFile\n FileInputStream inStream = new FileInputStream(gpxFile);\n\n // Parse a Gpx from the FileInputStream\n Gpx parsedGpx = new GPXParser().parse(inStream);\n\n // Close the InputStream\n inStream.close();\n\n\n\n if (parsedGpx != null) {\n // Get the individual points from the Gpx\n List<TrackPoint> points = parsedGpx.getTracks().get(0).getTrackSegments().get(0).getTrackPoints();\n\n // Iterate through and convert the point coordinates to a LatLng\n for (TrackPoint point : points) {\n LatLng trailPoint = new LatLng(point.getLatitude(), point.getLongitude(), point.getElevation());\n\n // Add the LatLng to the List\n trailPoints.add(trailPoint);\n\n if (start == null) {\n // Set the LatLng to be used for the starting coordinate\n start = new LatLng(point.getLatitude(), point.getLongitude());\n }\n }\n }\n } catch (XmlPullParserException | IOException e) {\n e.printStackTrace();\n }\n\n // Create a MarkerOptions for marking the beginning of the trail\n MarkerOptions markerOptions = new MarkerOptions().position(start);\n\n // Create a PolylineOptions from the List\n PolylineOptions polylineOptions = new PolylineOptions().addAll(trailPoints);\n\n listener.onOptionReady(markerOptions, polylineOptions);\n }", "@Override\n\t\t\tpublic void onReceivePoi(BDLocation arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\npublic void processDirection() {\n\t\n}", "public static void main(String[] args) \n\t{\n\t\t\tif(getPin()==pin)\n\t\t\t\t{\n\t\t\t\t\twhile (true)\n\t\t\t\t\t{\n\t\t\t\t\t\tgetOptions();\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tincorrectPin();\n\t\t\t}\n\t}", "public final void mo4498a(int i, int i2, int i3, String str, C1929q c1929q, byte[] bArr) {\n AppMethodBeat.m2504i(26085);\n C9649b c9649b = (C9649b) c1929q.mo5618ZS();\n this.elr = c9649b.flZ.wuf;\n C4990ab.m7410d(\"MicroMsg.NetSceneGetVoiceprintTicketRsa\", \"onGYNetEnd errType:\" + i2 + \" errCode:\" + i3 + \" mTicket: \" + this.elr);\n if (i2 == 4 && i3 == -301) {\n C7484ax.m12918a(true, c9649b.flZ.vLL, c9649b.flZ.vLM, c9649b.flZ.vLK);\n this.ftx--;\n if (this.ftx <= 0) {\n C4990ab.m7410d(\"MicroMsg.NetSceneGetVoiceprintTicketRsa\", \"reach redirect limit, invoke callback\");\n this.ehi.onSceneEnd(3, -1, \"\", this);\n AppMethodBeat.m2505o(26085);\n return;\n }\n C4990ab.m7410d(\"MicroMsg.NetSceneGetVoiceprintTicketRsa\", \"redirect IDC\");\n mo4456a(this.ftf, this.ehi);\n AppMethodBeat.m2505o(26085);\n } else if (i2 == 4 && i3 == ZipJNI.UNZ_PARAMERROR) {\n final int i4 = c1929q.acF().vyj.ver;\n C4990ab.m7411d(\"MicroMsg.NetSceneGetVoiceprintTicketRsa\", \"summerauth auth MM_ERR_CERT_EXPIRED getcert now old ver:%d\", Integer.valueOf(i4));\n C9638aw.m17180RS().mo10302aa(new Runnable() {\n\n /* renamed from: com.tencent.mm.plugin.voiceprint.model.e$1$1 */\n class C353421 implements C1202f {\n C353421() {\n }\n\n public final void onSceneEnd(int i, int i2, String str, C1207m c1207m) {\n AppMethodBeat.m2504i(26081);\n C4990ab.m7411d(\"MicroMsg.NetSceneGetVoiceprintTicketRsa\", \"summerauth dkcert getcert type:%d ret [%d,%d]\", Integer.valueOf(c1207m.getType()), Integer.valueOf(i), Integer.valueOf(i2));\n if (i == 0 && i2 == 0) {\n C35343e.this.mo4456a(C35343e.this.ftf, C35343e.this.ehi);\n AppMethodBeat.m2505o(26081);\n return;\n }\n C35343e.this.ehi.onSceneEnd(i, i2, \"\", C35343e.this);\n AppMethodBeat.m2505o(26081);\n }\n }\n\n public final void run() {\n AppMethodBeat.m2504i(26082);\n new C18674i().mo4456a(C35343e.this.ftf, new C353421());\n AppMethodBeat.m2505o(26082);\n }\n });\n AppMethodBeat.m2505o(26085);\n } else if (i2 == 0 || i3 == 0) {\n this.ehi.onSceneEnd(i2, i3, str, this);\n AppMethodBeat.m2505o(26085);\n } else {\n this.ehi.onSceneEnd(i2, i3, str, this);\n AppMethodBeat.m2505o(26085);\n }\n }", "public void MIPSme()\n {\n System.out.println(\"Took func from offset: \" + offset);\n TEMP label_address = TEMP_FACTORY.getInstance().getFreshTEMP();\n sir_MIPS_a_lot.getInstance().load(label_address, src);\n sir_MIPS_a_lot.getInstance().addi(label_address,label_address,4*offset);\n sir_MIPS_a_lot.getInstance().load(dst,label_address); //take the function address to dst\n }", "public final void mo12623a(boolean z) {\n if (mo9140c() != null) {\n C8435g c = new C8435g().mo21597c(\"initiative\");\n if (this.f13394b.getId() == this.f13396d.f11665c) {\n c.mo21594b(this.f13394b.getOwner().getId());\n c.mo21596c(this.f13396d.f11667e);\n } else {\n c.mo21594b(this.f13396d.f11667e);\n c.mo21596c(this.f13394b.getOwner().getId());\n }\n if (this.f13395c && this.f13396d.get(\"data_pk_state\") == PkState.PK) {\n if (LinkCrossRoomDataHolder.m13782a().f11672j > 0 && LinkCrossRoomDataHolder.m13782a().f11680r == 0) {\n c.mo21591a(LinkCrossRoomDataHolder.m13782a().f11669g);\n }\n C8443c a = C8443c.m25663a();\n String str = \"livesdk_pk_end\";\n Object[] objArr = new Object[3];\n objArr[0] = c.mo21597c(z ? \"disconnect\" : \"time_out\").mo21593a(z ? String.valueOf((System.currentTimeMillis() - this.f13396d.f11686x) / 1000) : \"120\");\n objArr[1] = this.f13396d.mo11449b();\n objArr[2] = Room.class;\n a.mo21607a(str, objArr);\n }\n ((C3245ad) ((LinkPKApi) C9178j.m27302j().mo22373b().mo10440a(LinkPKApi.class)).finish(this.f13396d.f11665c, this.f13396d.f11680r, z ? 1 : 0, this.f13396d.f11681s).mo19297a((C7494t<T, ? extends R>) mo13033u())).mo10183a(new C4714gg(this, SystemClock.uptimeMillis(), z), new C4700ft(this, z));\n }\n }", "@Override\n\t\tpublic void onGetBusDetailResult(MKBusLineResult arg0, int arg1) {\n\n\t\t}", "public void parseMXL() {\n try {\n unzipMXL();\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n }", "private void ncpStep(double height) {\n/* 56 */ double posX = mc.field_71439_g.field_70165_t;\n/* 57 */ double posZ = mc.field_71439_g.field_70161_v;\n/* 58 */ double y = mc.field_71439_g.field_70163_u;\n/* 59 */ if (height >= 1.1D) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 80 */ if (height < 1.6D) {\n/* */ double[] offset;\n/* 82 */ for (double off : offset = new double[] { 0.42D, 0.33D, 0.24D, 0.083D, -0.078D }) {\n/* 83 */ mc.field_71439_g.field_71174_a.func_147297_a((Packet)new CPacketPlayer.Position(posX, y += off, posZ, false));\n/* */ }\n/* 85 */ } else if (height < 2.1D) {\n/* */ double[] heights;\n/* 87 */ for (double off : heights = new double[] { 0.425D, 0.821D, 0.699D, 0.599D, 1.022D, 1.372D, 1.652D, 1.869D }) {\n/* 88 */ mc.field_71439_g.field_71174_a.func_147297_a((Packet)new CPacketPlayer.Position(posX, y + off, posZ, false));\n/* */ }\n/* */ } else {\n/* */ double[] heights;\n/* 92 */ for (double off : heights = new double[] { 0.425D, 0.821D, 0.699D, 0.599D, 1.022D, 1.372D, 1.652D, 1.869D, 2.019D, 1.907D })\n/* 93 */ mc.field_71439_g.field_71174_a.func_147297_a((Packet)new CPacketPlayer.Position(posX, y + off, posZ, false)); \n/* */ } \n/* */ return;\n/* */ } \n/* */ double first = 0.42D;\n/* */ double d1 = 0.75D;\n/* */ if (height != 1.0D) {\n/* */ first *= height;\n/* */ d1 *= height;\n/* */ if (first > 0.425D)\n/* */ first = 0.425D; \n/* */ if (d1 > 0.78D)\n/* */ d1 = 0.78D; \n/* */ if (d1 < 0.49D)\n/* */ d1 = 0.49D; \n/* */ } \n/* */ mc.field_71439_g.field_71174_a.func_147297_a((Packet)new CPacketPlayer.Position(posX, y + first, posZ, false));\n/* */ if (y + d1 < y + height)\n/* */ mc.field_71439_g.field_71174_a.func_147297_a((Packet)new CPacketPlayer.Position(posX, y + d1, posZ, false)); \n/* */ }", "public static GetParkPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetParkPage object =\n new GetParkPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getParkPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetParkPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "private List<Point> getPath(int index) {\n\t\t \n\t \n\t\t Node fromNode = oEdge.fromNode;\n\t\t Node toNode = oEdge.toNode;\n\t\t float x1 = fromNode.longitude;\n\t\t float x2 = toNode.longitude;\n\t\t float y1 = fromNode.latitude;\n\t\t float y2 = toNode.latitude;\n\t\t double slope, angle;\n\t\t if(x1!=x2) {\n\t\t\t slope = (y2-y1)/(x2-x1);\n\t\t\t \tangle = Math.atan(slope);\n\t\t\t \t} else {\n\t\t\t \t\tangle = Math.PI/2;\n\t\t\t \t}\n\t\t Double L = Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));\n\t\t float offsetPixels=0;\n\t\t if(Math.toDegrees(angle)>Math.toDegrees(90)) {\n\t\t\t if (index==0){\n\t\t\t\t offsetPixels=roadWidth*6/10;\n\t\t\t }\n\t\t\t else if(index==1){\n\t\t\t\t offsetPixels=roadWidth*11/10;\n\t\t\t }\n\t\t\t else if(index==-1){\n\t\t\t\t offsetPixels=roadWidth*1/10;\n\t\t\t }\n\t\t\t \n\t\t } else {\n\t\t\t \n\t\t\t if (index==0){\n\t\t\t\t offsetPixels=-roadWidth*6/10;\n\t\t\t }\n\t\t\t else if(index==1){\n\t\t\t\t offsetPixels=-roadWidth*11/10;\n\t\t\t }\n\t\t\t else if(index==-1){\n\t\t\t\t offsetPixels=-roadWidth*1/10;\n\t\t\t }\n\t\t }\n\t\t \n\t\t // This is the first parallel line\n\t\t float x1p1 = x1 + offsetPixels * (y2-y1) / L.floatValue();\n\t\t float x2p1 = x2 + offsetPixels * (y2-y1) / L.floatValue();\n\t\t float y1p1 = y1 + offsetPixels * (x1-x2) / L.floatValue();\n\t\t float y2p1 = y2 + offsetPixels * (x1-x2) / L.floatValue();\n//\t\t if(oEdge.edgeID==16) {\n//\t\t\t System.out.println(\"testing\");\n//\t\t }\n\t\t \n\t\t Point P1 = new Point(x1p1,y1p1);\n\t\t Point P2 = new Point(x2p1,y2p1);\n\t\t List<Point> gP = GetPoints(P1, P2);\n\t\t return gP;\n\t \n\t}", "public zzp(int r9, byte[] r10, boolean r11, long r12, java.util.List<com.google.android.gms.internal.ads.zzl> r14) {\n /*\n r8 = this;\n if (r14 != 0) goto L_0x0005\n r0 = 0\n L_0x0003:\n r3 = r0\n goto L_0x0033\n L_0x0005:\n boolean r0 = r14.isEmpty()\n if (r0 == 0) goto L_0x0010\n java.util.Map r0 = java.util.Collections.emptyMap()\n goto L_0x0003\n L_0x0010:\n java.util.TreeMap r0 = new java.util.TreeMap\n java.util.Comparator r1 = java.lang.String.CASE_INSENSITIVE_ORDER\n r0.<init>(r1)\n java.util.Iterator r1 = r14.iterator()\n L_0x001b:\n boolean r2 = r1.hasNext()\n if (r2 == 0) goto L_0x0003\n java.lang.Object r2 = r1.next()\n com.google.android.gms.internal.ads.zzl r2 = (com.google.android.gms.internal.ads.zzl) r2\n java.lang.String r3 = r2.getName()\n java.lang.String r2 = r2.getValue()\n r0.put(r3, r2)\n goto L_0x001b\n L_0x0033:\n r0 = r8\n r1 = r9\n r2 = r10\n r4 = r14\n r5 = r11\n r6 = r12\n r0.<init>(r1, r2, r3, r4, r5, r6)\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.zzp.<init>(int, byte[], boolean, long, java.util.List):void\");\n }", "public void\n doExtraInformation(Ray inRay, double inT, \n GeometryIntersectionInformation outData) {\n outData.p = lastInfo.p;\n\n switch ( lastPlane ) {\n case 1:\n outData.n.x = 0;\n outData.n.y = 0;\n outData.n.z = 1;\n outData.u = outData.p.y / size.y - 0.5;\n outData.v = 1-(outData.p.x / size.x - 0.5);\n outData.t.x = 0;\n outData.t.y = 1;\n outData.t.z = 0;\n break;\n case 2:\n outData.n.x = 0;\n outData.n.y = 0;\n outData.n.z = -1;\n outData.u = outData.p.y / size.y - 0.5;\n outData.v = outData.p.x / size.x - 0.5;\n outData.t.x = 0;\n outData.t.y = 1;\n outData.t.z = 0;\n break;\n case 3:\n outData.n.x = 0;\n outData.n.z = 0;\n outData.n.y = 1;\n outData.u = 1-(outData.p.x / size.x - 0.5);\n outData.v = outData.p.z / size.z - 0.5;\n outData.t.x = -1;\n outData.t.y = 0;\n outData.t.z = 0;\n break;\n case 4:\n outData.n.x = 0;\n outData.n.z = 0;\n outData.n.y = -1;\n outData.u = outData.p.x / size.x - 0.5;\n outData.v = outData.p.z / size.z - 0.5;\n outData.t.x = 1;\n outData.t.y = 0;\n outData.t.z = 0;\n break;\n case 5:\n outData.n.x = 1;\n outData.n.y = 0;\n outData.n.z = 0;\n outData.u = outData.p.y / size.y - 0.5;\n outData.v = outData.p.z / size.z - 0.5;\n outData.t.x = 0;\n outData.t.y = 1;\n outData.t.z = 0;\n break;\n case 6:\n outData.n.x = -1;\n outData.n.y = 0;\n outData.n.z = 0;\n outData.u = 1-(outData.p.y / size.y - 0.5);\n outData.v = outData.p.z / size.z - 0.5;\n outData.t.x = 0;\n outData.t.y = -1;\n outData.t.z = 0;\n break;\n default:\n outData.u = 0;\n outData.v = 0;\n break;\n }\n }", "public static GetRoadwayPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetRoadwayPage object =\n new GetRoadwayPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getRoadwayPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetRoadwayPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "void mo54427b(DownloadInfo downloadInfo);", "protected abstract Deque<Vertex<AtomicReference>> getVehicleRoute(int entry, int exit);" ]
[ "0.55502033", "0.55124986", "0.540913", "0.534908", "0.5249587", "0.5185976", "0.5170498", "0.5167153", "0.51620996", "0.51551324", "0.5154414", "0.5133109", "0.5089098", "0.50843304", "0.5079168", "0.5057817", "0.5056311", "0.5018516", "0.5017369", "0.500986", "0.5004555", "0.4993962", "0.497004", "0.49593785", "0.49533457", "0.49483287", "0.49364123", "0.4934069", "0.49160692", "0.49152386", "0.491239", "0.49032724", "0.4897635", "0.48849908", "0.48766926", "0.48752323", "0.48643714", "0.4855416", "0.48162955", "0.48145515", "0.48113373", "0.48034868", "0.48001662", "0.4792823", "0.47896653", "0.47870743", "0.47685415", "0.47680187", "0.47678074", "0.47674513", "0.4764949", "0.47576332", "0.47497782", "0.47481814", "0.47398388", "0.4738822", "0.47350618", "0.4733413", "0.47280097", "0.4726178", "0.4726178", "0.4725397", "0.4722767", "0.4722529", "0.4722496", "0.47190517", "0.47156927", "0.47068834", "0.46997145", "0.46945572", "0.4693155", "0.46922725", "0.46906602", "0.46906024", "0.46858016", "0.4682445", "0.46765658", "0.46762723", "0.46761164", "0.46728268", "0.46714258", "0.46700284", "0.4667984", "0.46614686", "0.46567002", "0.4656269", "0.4655889", "0.46536407", "0.4651991", "0.4651269", "0.46507004", "0.46491113", "0.4649012", "0.46481708", "0.46468616", "0.464566", "0.46448013", "0.46424413", "0.4641786", "0.4641743" ]
0.6599041
0
If this instance is the cluster leader, it has to notify all other members about unreachable member because this allows the unreachable member to get known about the fact it is not reachable by the cluster. As a consequence, the unreachable member can stop processing events as it is not considered by the cluster anymore.
@Override public void onMemberUnreachable(final Member member) { if(clusterReadView.isLeader()){ LOGGER.info("I AM the LEADER and I am notifying other Scoop aware clients about [unreachableMember={}]", member); final Event event = new Event(); event.setEventType(UNREACHABLE_MEMBER_EVENT_TYPE); event.setOrderingKey("scoop-system"); // TODO better ordering key? final HashMap<String, Object> metadata = Maps.newHashMap(); metadata.put("id", UUID.randomUUID().toString()); final Map<String, String> bodyMap = Maps.newHashMap(); bodyMap.put(UNREACHABLE_MEMBER_EVENT_BODY_KEY, member.address().toString()); event.setBody(bodyMap); postEvent(scoopTopic, event); } else { LOGGER.debug("received event about [unreachableMember={}] but I am NOT the LEADER -> ignored", member); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public synchronized void memberRemoved(MembershipEvent membershipEvent) {\n membershipEvent.getMember().getUuid();\n System.out.println(String.format(\"Member Removed: %s - %s \",\n membershipEvent.getMember().getUuid(), membershipEvent.getMember().toString()));\n\n super.memberRemoved(membershipEvent);\n String masterId = manager.getNodeID(); // master node\n List<String> nodeIdList = manager.getNodes();\n if (nodeIdList.get(0).equals(masterId)) {\n manager.getAsyncMap(KeyDefine.CLUSTER_MAP_NAME, ar -> {\n if (ar.succeeded()) {\n String downNodeId = membershipEvent.getMember().getUuid();\n ar.result().get(downNodeId, obj -> {\n JsonObject json = (JsonObject) obj.result();\n if (json != null) {\n System.out.printf(\"# yes I am manager, and the node %s offline!\\n\",\n membershipEvent.getMember().toString());\n System.out.println(\"## offline node info: \" + obj.result().toString());\n Boolean restartFlag = Boolean.parseBoolean(json.getString(\"restart\", \"false\"));\n if (restartFlag == null || restartFlag == false) return;\n vertx.executeBlocking(h -> {\n restart(ar.result(), nodeIdList, json);\n }, r -> {\n logger.info(\"restart node: {} ok\", json.getString(\"nodeInfo\"));\n });\n }\n });\n }\n });\n }\n }", "@Override\n public void preStart() {\n cluster.subscribe(self(), ClusterEvent.MemberUp.class);\n }", "public void memberJoined(ClusterEvent e) {}", "@Override\r\n public void notLeader() {\n }", "public void memberLeft(ClusterEvent e) {}", "public synchronized void update() {\n localMemberHealth.setHeartbeat(localMemberHealth.getHeartbeat() + 1);\n long currentTime = System.currentTimeMillis();\n List<MemberHealth> removals = new ArrayList<>();\n for (MemberHealth memberHealth : memberHealths) {\n if (currentTime - memberHealth.getLastSeen() > 5500) {\n removals.add(memberHealth);\n } else if (currentTime - memberHealth.getLastSeen() > 2750) {\n if (!memberHealth.hasFailed() && !memberHealth.hasLeft()) {\n memberHealth.setHasFailed(true);\n logger.logLine(Logger.INFO, \"Member: \" + memberHealth.getId() + \" has failed\");\n }\n } else {\n if (memberHealth.hasFailed()) {\n logger.logLine(Logger.INFO, \"Member: \" + memberHealth.getId() + \" has rejoined\");\n }\n memberHealth.setHasFailed(false);\n }\n }\n for (MemberHealth memberHealth : removals) {\n memberHealths.remove(memberHealth);\n logger.logLine(Logger.INFO, \"Member: \" + memberHealth.getId() + \" has been removed\");\n }\n }", "@Override\n public void preStart() {\n //#subscribe\n cluster.subscribe(getSelf(), ClusterEvent.initialStateAsEvents(),\n ClusterEvent.MemberEvent.class, ClusterEvent.UnreachableMember.class);\n //#subscribe\n }", "@Override\n public synchronized void Notify(WatchedEvent e) {\n\n switch (e.getType()) {\n case NodeDeleted:\n if (e.getPath().equals(buildPath(ROOT, watchedLeader))) {\n LOG.info(\"[Notify] The leader before me has died I must find a new Leader!\");\n // the leader before us has died, start an election\n runLeaderElection(zkService);\n }\n break;\n }\n }", "private void markUnreachableConnections(Map<String, AirportNode> airportGraph, List<AirportNode> unreachableAirportNodes) {\n // for each unreachable airport, find all unreachable connections\n for (AirportNode airportNode : unreachableAirportNodes) {\n String airport = airportNode.airport;\n List<String> unreachableConnections = new ArrayList<>();\n Set<String> visitedAirports = new HashSet<>();\n depthFirstAddUnreachableConnections(airportGraph, airport, unreachableConnections, visitedAirports);\n airportNode.unreachableConnections = unreachableConnections;\n }\n }", "public void unassignedMembers() {\n \n unassignedMembers.clear();\n PersistenceManager pm = PMF.get().getPersistenceManager();\n Iterator iter = mMemberCurrentLocation.entrySet().iterator();\n while (iter.hasNext()) {\n Entry<Long, Tracking> pairs = (Entry<Long, Tracking>)iter.next();\n if (pairs.getValue().getresponseType().equalsIgnoreCase(\"manuallyAddMember\")) {\n Member m = pm.getObjectById(Member.class, pairs.getKey());\n unassignedMembers.add(m); \n iter.remove();\n }\n }\n System.out.println(\"unassigned members qty: \" + unassignedMembers.size());\n System.out.println(\"Exit: unassignedMembers\");\n \n }", "@Override\n\tpublic synchronized void run() {\n\t\tif ((infoMessage.getStoredValue() > node.getLeaderValue())\n\t\t\t\t|| ((infoMessage.getStoredValue() == node.getStoredValue())\n\t\t\t\t\t\t&& (infoMessage.getLeaderId() > node.getLeaderID()))) {\n\n\t\t\tnode.setLeaderID(infoMessage.getLeaderId());\n\t\t\tnode.setLeaderValue(infoMessage.getStoredValue());\n\t\t\tnode.setStoredId(node.getNodeID());\n\t\t\tnode.setStoredValue(node.getNodeValue());\n\t\t\tSystem.out.println(\"INFO HANDLER: 1) Leader changed in Node \" + node.getNodeID() + \" to: \"\n\t\t\t\t\t+ node.getLeaderID() + \" due to exchanging messages with \" + infoMessage.getIncomingId());\n\n\t\t\t// End to Exchanging Leaders Timer && Processing\n\t\t\tnode.networkEvaluation.setEndExchangingLeadersTimer(infoMessage.getIncomingId());\n\t\t\tnode.networkEvaluation.getExchangingLeaderTimer(infoMessage.getIncomingId());\n\n\t\t\t// Metric 3 - Without Leader Timer\n\t\t\tnode.networkEvaluation.setEndWithoutLeaderTimer();\n\t\t\tnode.networkEvaluation.getWithoutLeaderTimer();\n\n\t\t\t// send \"special \"Leader message to all neighbours except one that passed the\n\t\t\t// info to me\n\t\t\tIterator<Integer> i = node.getNeighbors().iterator();\n\n\t\t\tHashSet<Integer> toSend = new HashSet<Integer>();\n\t\t\twhile (i.hasNext()) {\n\t\t\t\tInteger temp = i.next();\n\t\t\t\tif (temp != infoMessage.getIncomingId()) {\n\t\t\t\t\ttoSend.add(temp);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If I have no neighbours except node I exchanged info messages with, no need\n\t\t\t// to send leader messages\n\t\t\tif (!(toSend.isEmpty())) {\n\n\t\t\t\tif (DEBUG)\n\t\t\t\t\tSystem.out.println(\"INFO HANDLER: 2) Sending special leader to all nodes.\");\n\n\t\t\t\tsendMessage(logic.MessageType.LEADER_SPECIAL, toSend);\n\t\t\t}\n\t\t\treturn;\n\n\t\t} else if ((infoMessage.getStoredValue() == node.getLeaderValue()) // Prevents infinite message passing\n\t\t\t\t&& (infoMessage.getLeaderId() == node.getLeaderID())) {\n\t\t\tif (DEBUG)\n\t\t\t\tSystem.out.println(\"INFO HANDLER: 3) Same Leader! Agreement Reached.\");\n\n\t\t\t// End to Exchanging Leaders Timer && Processing\n\t\t\tnode.networkEvaluation.setEndExchangingLeadersTimer(infoMessage.getIncomingId());\n\t\t\tnode.networkEvaluation.getExchangingLeaderTimer(infoMessage.getIncomingId());\n\n\t\t\t// Metric 3 - Without Leader Timer\n\t\t\tnode.networkEvaluation.setEndWithoutLeaderTimer();\n\t\t\tnode.networkEvaluation.getWithoutLeaderTimer();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// If not, send a message back saying that the other node should send the leader\n\t\t// message instead with my leader\n\t\telse {\n\n\t\t\tif (DEBUG)\n\t\t\t\tSystem.out.println(\"INFO HANDLER: 4) Sending back stronger leader.\\n-----------------------------\");\n\n\t\t\tsendMessage(logic.MessageType.INFO, infoMessage.getIncomingId());\n\n\t\t}\n\t}", "@Override\n public void processClusterInvalidationsNext() {\n }", "@SneakyThrows\n public HazelcastInstance ignite () { // nice name for starting HZ))\n if (config == null) {\n config = new Config();\n }\n\n if (discoveryClient != null) {\n val selfAddress = discoveryClient.self().getAddress().getHostAddress();\n\n config.setProperty(\"hazelcast.discovery.enabled\", \"true\");\n config.setProperty(\"hazelcast.socket.server.bind.any\", \"true\");\n config.setProperty(\"hazelcast.socket.bind.any\", \"true\");\n\n val networkingConfig = config.getNetworkConfig();\n networkingConfig.setPublicAddress(selfAddress);\n networkingConfig.setPort(discoveryClient.self().getPort());\n networkingConfig.setPortAutoIncrement(false);\n networkingConfig.setInterfaces(new InterfacesConfig().addInterface(selfAddress));\n\n val joinConfig = networkingConfig.getJoin();\n\n joinConfig.getMulticastConfig().setEnabled(false);\n joinConfig.getTcpIpConfig().setEnabled(false);\n joinConfig.getAwsConfig().setEnabled(false);\n\n val discoveryStrategyFactory = new CustomDiscoveryStrategyFactory(discoveryClient);\n val discoveryStrategyConfig = new DiscoveryStrategyConfig(discoveryStrategyFactory);\n joinConfig.getDiscoveryConfig().addDiscoveryStrategyConfig(discoveryStrategyConfig);\n }\n\n ofNullable(userContext)\n .ifPresent(config::setUserContext);\n\n mapConfigs\n .forEach(config::addMapConfig);\n\n val leaderService = new LeaderService();\n val listener = new ClusterFormationChangeListener(leaderService);\n val listenerConfig = new ListenerConfig(listener);\n config.addListenerConfig(listenerConfig);\n\n onBecomeLeaderMemberActions.forEach(leaderService::addOnBecomeLeaderMemberAction);\n onBecomeRegularMemberActions.forEach(leaderService::addOnBecomeRegularMemberAction);\n\n val result = Hazelcast.newHazelcastInstance(config);\n val cluster = result.getCluster();\n val member = cluster.getLocalMember();\n val members = cluster.getMembers();\n val event = new MembershipEvent(cluster, member, MEMBER_ATTRIBUTE_CHANGED, members);\n if (members.iterator().next().localMember()) {\n leaderService.becomeLeaderMember(result, event);\n } else {\n leaderService.becomeRegularMember(result, event);\n }\n\n return result;\n }", "public void testNodeNotReachableFromClusterManager() throws Exception {\n startCluster(3);\n\n String clusterManagerNode = internalCluster().getClusterManagerName();\n String nonClusterManagerNode = null;\n while (nonClusterManagerNode == null) {\n nonClusterManagerNode = randomFrom(internalCluster().getNodeNames());\n if (nonClusterManagerNode.equals(clusterManagerNode)) {\n nonClusterManagerNode = null;\n }\n }\n\n logger.info(\"blocking request from cluster-manager [{}] to [{}]\", clusterManagerNode, nonClusterManagerNode);\n MockTransportService clusterManagerTransportService = (MockTransportService) internalCluster().getInstance(\n TransportService.class,\n clusterManagerNode\n );\n if (randomBoolean()) {\n clusterManagerTransportService.addUnresponsiveRule(\n internalCluster().getInstance(TransportService.class, nonClusterManagerNode)\n );\n } else {\n clusterManagerTransportService.addFailToSendNoConnectRule(\n internalCluster().getInstance(TransportService.class, nonClusterManagerNode)\n );\n }\n\n logger.info(\"waiting for [{}] to be removed from cluster\", nonClusterManagerNode);\n ensureStableCluster(2, clusterManagerNode);\n\n logger.info(\"waiting for [{}] to have no cluster-manager\", nonClusterManagerNode);\n assertNoClusterManager(nonClusterManagerNode);\n\n logger.info(\"healing partition and checking cluster reforms\");\n clusterManagerTransportService.clearAllRules();\n\n ensureStableCluster(3);\n }", "protected Runnable listMembers() {\n return () -> {\n while (enableHa) {\n try {\n if (Thread.currentThread().isInterrupted()) {\n break;\n }\n NotificationServiceOuterClass.ListMembersRequest request =\n NotificationServiceOuterClass.ListMembersRequest.newBuilder()\n .setTimeoutSeconds(listMemberIntervalMs / 1000)\n .build();\n NotificationServiceOuterClass.ListMembersResponse response = notificationServiceStub.listMembers(request);\n if (response.getReturnCode() == NotificationServiceOuterClass.ReturnStatus.SUCCESS) {\n livingMembers = new HashSet<>(response.getMembersList());\n } else {\n logger.warn(response.getReturnMsg());\n selectValidServer();\n }\n } catch (Exception e) {\n e.printStackTrace();\n logger.warn(\"Error while listening notification\");\n selectValidServer();\n }\n }\n };\n }", "private void considerUnavailable() {\n host.makeUnavailable(this::tryReconnect);\n\n // if the host is unavailable then we should release the connections\n connections.forEach(this::definitelyDestroyConnection);\n\n // let the load-balancer know that the host is acting poorly\n this.cluster.loadBalancingStrategy().onUnavailable(host);\n\n }", "@Override\n public void onActorOffline(String remotePkGoOffline) {\n }", "private void notifyNeighbors() {\n final World world = getCasing().getCasingWorld();\n\n scheduledNeighborUpdate = false;\n final Block blockType = world.getBlockState(getCasing().getPosition()).getBlock();\n world.updateNeighborsAlways(getCasing().getPosition(), blockType);\n }", "@Override\n public List<String> getUnreachableNodes() {\n List<String> unreachableNodes = this.nodeProbe.getUnreachableNodes();\n return unreachableNodes;\n }", "@Override\n\tprotected void modify(Locations locations) {\n\t\tfor (PeerAddress toRemove : unreachablePeers) {\n\t\t\tlocations.removePeerAddress(toRemove);\n\t\t}\n\n\t}", "private void handleMembershipEvent(GroupMembershipEvent event) {\n post(new ClusterMembershipEvent(ClusterMembershipEvent.Type.valueOf(event.type().name()), event.member()));\n }", "private void uponNeighbourUp(NeighbourUp notification, short sourceProto) {\n for(Host h: notification.getNeighbours()) {\n neighbours.add(h);\n logger.info(\"New neighbour: \" + h);\n eagerPushPeers.add(h);\n }\n }", "@ForOverride\n public void onNotInUse(InternalSubchannel internalSubchannel) {\n }", "@Override\r\n public void isLeader() {\n }", "public void deadPlayer() {\r\n\t\tthis.nbPlayer --;\r\n\t}", "void tryToFindNextKing()\n {\n if (nodeIds.size() != 0)\n {\n int nextKingId = Collections.max(nodeIds);\n CommunicationLink nextKing = allNodes.get(nextKingId);\n nextKing.sendMessage(new Message(\n Integer.toString(nextKingId), nextKing.getInfo(), myInfo, KING_IS_DEAD));\n }\n }", "public void markDead() {\r\n\t\tsetNodeWasContacted(0);\r\n\t}", "protected void selectValidServer() {\n boolean lastError = false;\n for (NotificationServiceOuterClass.MemberProto livingMember : livingMembers) {\n try {\n currentUri = livingMember.getServerUri();\n initNotificationServiceStub();\n NotificationServiceOuterClass.ListMembersRequest request =\n NotificationServiceOuterClass.ListMembersRequest.newBuilder()\n .setTimeoutSeconds(listMemberIntervalMs / 1000)\n .build();\n NotificationServiceOuterClass.ListMembersResponse response = notificationServiceStub.listMembers(request);\n if (response.getReturnCode() == NotificationServiceOuterClass.ReturnStatus.SUCCESS) {\n livingMembers = new HashSet<>(response.getMembersList());\n lastError = false;\n break;\n } else {\n lastError = true;\n }\n } catch (Exception e) {\n lastError = true;\n }\n }\n if (lastError) {\n logger.warn(\"No available server uri!\");\n }\n }", "public void ping() throws RemoteException{\n return;\n }", "void renewNeighbourClusters() {\n neighbourClusters = new HashMap<Cluster, Integer>();\n\n for (Person p : members) {\n for (Person x : p.getFriends()) {\n if (!members.contains(x)) {\n Cluster xC = x.getCluster();\n if (!neighbourClusters.containsKey(xC)) {\n neighbourClusters.put(xC, 1);\n } else {\n neighbourClusters.put(xC, neighbourClusters.get(xC) + 1);\n }\n }\n }\n }\n\n }", "public void notifyRespawn()\n {\n playerObserver.onRespawn();\n }", "void handleDisconnectedNode(INode remoteNode) {\n\t\t\n\t\tint myMasterPrio = cluster.getConfig().getMasterPriority();\n\t\tsynchronized (services) {\n\t\t\tfor (String name : getInstalledClusterServiceNames()) {\n\t\n\t\t\t\tClusterServiceHandler csWrapper = services.get(name);\n\t\t\t\tIRemoteService rsMaster = csWrapper.getMasterService();\n\t\t\t\tif (rsMaster != null) {\n\t\t\t\t\tif (rsMaster.getNode().sameNode(remoteNode)) {\n\t\t\t\t\t\t// the node that went down was hosting the master service.\n\t\t\t\t\t\t// We need to check if we are the logical next master and if so, become master. If a different, active node\n\t\t\t\t\t\t// is the next master, change to the new master\n\t\t\t\t\t\t\n\t\t\t\t\t\tIRemoteService nextMaster = null;\n\t\t\t\t\t\tfor (IRemoteService rs : csWrapper.getRemoteServices()) {\n\t\t\t\t\t\t\tif (rs.getServiceStatus() != ClusterServiceStatus.NO_SUCH_SERVICE &&\n\t\t\t\t\t\t\t\trs.getNode().getStatus() == NodeStatus.CONNECTED) {\n\t\t\t\t\t\t\t\t// the node is active\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (rs.getNode().getMasterPriority() > myMasterPrio && (nextMaster == null || rs.getNode().getMasterPriority() > nextMaster.getNode().getMasterPriority())) {\n\t\t\t\t\t\t\t\t\tnextMaster = rs;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (nextMaster == null) {\n\t\t\t\t\t\t\t// either no other node exists or we have the highest master priority of all remaining active tasks\n\t\t\t\t\t\t\tcsWrapper.getClusterService().obtainMasterRole(null);\n\t\t\t\t\t\t\tcsWrapper.setMasterService(null);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// simply point to the newly identified master node. We assume that the other node\n\t\t\t\t\t\t\t// also experienced the connection loss to the old master, so the new master node will\n\t\t\t\t\t\t\t// obtain the master role by itself.\n\t\t\t\t\t\t\t((RemoteService)nextMaster).setServiceStatus(ClusterServiceStatus.ACTIVE_MASTER);\n\t\t\t\t\t\t\tcsWrapper.setMasterService(nextMaster);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\t\n\t}", "void dead() { this.alive = false; }", "private void notifyNeighbourOfDead(NodeInfo deadNodeInfo, CommunicationLink neighbour,\n CommunicationLink potentialNewNeighbour)\n {\n if (neighbour != null)\n {\n NodeInfo newNeighbourId = potentialNewNeighbour == null ? myInfo : potentialNewNeighbour.getInfo();\n\n neighbour.sendMessage(new Message(neighbour.serializeId(deadNodeInfo) + \" \" + neighbour.serializeId(newNeighbourId),\n neighbour.getInfo(), myInfo, MessageType.TOPOLOGY_CHANGED));\n }\n }", "public Vote lookForLeader() throws InterruptedException {\n try {\n self.jmxLeaderElectionBean = new LeaderElectionBean();\n MBeanRegistry.getInstance().register(self.jmxLeaderElectionBean, self.jmxLocalPeerBean);\n } catch (Exception e) {\n LOG.warn(\"Failed to register with JMX\", e);\n self.jmxLeaderElectionBean = null;\n }\n\n self.start_fle = Time.currentElapsedTime();\n try {\n /*\n * The votes from the current leader election are stored in recvset. In other words, a vote v is in recvset\n * if v.electionEpoch == logicalclock. The current participant uses recvset to deduce on whether a majority\n * of participants has voted for it.\n */\n Map<Long, Vote> recvset = new HashMap<>();\n\n /*\n * The votes from previous leader elections, as well as the votes from the current leader election are\n * stored in outofelection. Note that notifications in a LOOKING state are not stored in outofelection.\n * Only FOLLOWING or LEADING notifications are stored in outofelection. The current participant could use\n * outofelection to learn which participant is the leader if it arrives late (i.e., higher logicalclock than\n * the electionEpoch of the received notifications) in a leader election.\n */\n Map<Long, Vote> outofelection = new HashMap<>();\n\n int notTimeout = minNotificationInterval;\n\n synchronized (this) {\n logicalclock.incrementAndGet();\n updateProposal(getInitId(), getInitLastLoggedZxid(), getPeerEpoch());\n }\n\n LOG.info(\n \"New election. My id = {}, proposed zxid=0x{}\",\n self.getMyId(),\n Long.toHexString(proposedZxid));\n sendNotifications();\n\n SyncedLearnerTracker voteSet = null;\n\n /*\n * Loop in which we exchange notifications until we find a leader\n */\n\n while ((self.getPeerState() == ServerState.LOOKING) && (!stop)) {\n /*\n * Remove next notification from queue, times out after 2 times\n * the termination time\n */\n Notification n = recvqueue.poll(notTimeout, TimeUnit.MILLISECONDS);\n\n /*\n * Sends more notifications if haven't received enough.\n * Otherwise processes new notification.\n */\n if (n == null) {\n if (manager.haveDelivered()) {\n sendNotifications();\n } else {\n manager.connectAll();\n }\n\n /*\n * Exponential backoff\n */\n notTimeout = Math.min(notTimeout << 1, maxNotificationInterval);\n\n /*\n * When a leader failure happens on a master, the backup will be supposed to receive the honour from\n * Oracle and become a leader, but the honour is likely to be delay. We do a re-check once timeout happens\n *\n * The leader election algorithm does not provide the ability of electing a leader from a single instance\n * which is in a configuration of 2 instances.\n * */\n if (self.getQuorumVerifier() instanceof QuorumOracleMaj\n && self.getQuorumVerifier().revalidateVoteset(voteSet, notTimeout != minNotificationInterval)) {\n setPeerState(proposedLeader, voteSet);\n Vote endVote = new Vote(proposedLeader, proposedZxid, logicalclock.get(), proposedEpoch);\n leaveInstance(endVote);\n return endVote;\n }\n\n LOG.info(\"Notification time out: {} ms\", notTimeout);\n\n } else if (validVoter(n.sid) && validVoter(n.leader)) {\n /*\n * Only proceed if the vote comes from a replica in the current or next\n * voting view for a replica in the current or next voting view.\n */\n switch (n.state) {\n case LOOKING:\n if (getInitLastLoggedZxid() == -1) {\n LOG.debug(\"Ignoring notification as our zxid is -1\");\n break;\n }\n if (n.zxid == -1) {\n LOG.debug(\"Ignoring notification from member with -1 zxid {}\", n.sid);\n break;\n }\n // If notification > current, replace and send messages out\n if (n.electionEpoch > logicalclock.get()) {\n logicalclock.set(n.electionEpoch);\n recvset.clear();\n if (totalOrderPredicate(n.leader, n.zxid, n.peerEpoch, getInitId(), getInitLastLoggedZxid(), getPeerEpoch())) {\n updateProposal(n.leader, n.zxid, n.peerEpoch);\n } else {\n updateProposal(getInitId(), getInitLastLoggedZxid(), getPeerEpoch());\n }\n sendNotifications();\n } else if (n.electionEpoch < logicalclock.get()) {\n LOG.debug(\n \"Notification election epoch is smaller than logicalclock. n.electionEpoch = 0x{}, logicalclock=0x{}\",\n Long.toHexString(n.electionEpoch),\n Long.toHexString(logicalclock.get()));\n break;\n } else if (totalOrderPredicate(n.leader, n.zxid, n.peerEpoch, proposedLeader, proposedZxid, proposedEpoch)) {\n updateProposal(n.leader, n.zxid, n.peerEpoch);\n sendNotifications();\n }\n\n LOG.debug(\n \"Adding vote: from={}, proposed leader={}, proposed zxid=0x{}, proposed election epoch=0x{}\",\n n.sid,\n n.leader,\n Long.toHexString(n.zxid),\n Long.toHexString(n.electionEpoch));\n\n // don't care about the version if it's in LOOKING state\n recvset.put(n.sid, new Vote(n.leader, n.zxid, n.electionEpoch, n.peerEpoch));\n\n voteSet = getVoteTracker(recvset, new Vote(proposedLeader, proposedZxid, logicalclock.get(), proposedEpoch));\n\n if (voteSet.hasAllQuorums()) {\n\n // Verify if there is any change in the proposed leader\n while ((n = recvqueue.poll(finalizeWait, TimeUnit.MILLISECONDS)) != null) {\n if (totalOrderPredicate(n.leader, n.zxid, n.peerEpoch, proposedLeader, proposedZxid, proposedEpoch)) {\n recvqueue.put(n);\n break;\n }\n }\n\n /*\n * This predicate is true once we don't read any new\n * relevant message from the reception queue\n */\n if (n == null) {\n setPeerState(proposedLeader, voteSet);\n Vote endVote = new Vote(proposedLeader, proposedZxid, logicalclock.get(), proposedEpoch);\n leaveInstance(endVote);\n return endVote;\n }\n }\n break;\n case OBSERVING:\n LOG.debug(\"Notification from observer: {}\", n.sid);\n break;\n\n /*\n * In ZOOKEEPER-3922, we separate the behaviors of FOLLOWING and LEADING.\n * To avoid the duplication of codes, we create a method called followingBehavior which was used to\n * shared by FOLLOWING and LEADING. This method returns a Vote. When the returned Vote is null, it follows\n * the original idea to break swtich statement; otherwise, a valid returned Vote indicates, a leader\n * is generated.\n *\n * The reason why we need to separate these behaviors is to make the algorithm runnable for 2-node\n * setting. An extra condition for generating leader is needed. Due to the majority rule, only when\n * there is a majority in the voteset, a leader will be generated. However, in a configuration of 2 nodes,\n * the number to achieve the majority remains 2, which means a recovered node cannot generate a leader which is\n * the existed leader. Therefore, we need the Oracle to kick in this situation. In a two-node configuration, the Oracle\n * only grants the permission to maintain the progress to one node. The oracle either grants the permission to the\n * remained node and makes it a new leader when there is a faulty machine, which is the case to maintain the progress.\n * Otherwise, the oracle does not grant the permission to the remained node, which further causes a service down.\n *\n * In the former case, when a failed server recovers and participate in the leader election, it would not locate a\n * new leader because there does not exist a majority in the voteset. It fails on the containAllQuorum() infinitely due to\n * two facts. First one is the fact that it does do not have a majority in the voteset. The other fact is the fact that\n * the oracle would not give the permission since the oracle already gave the permission to the existed leader, the healthy machine.\n * Logically, when the oracle replies with negative, it implies the existed leader which is LEADING notification comes from is a valid leader.\n * To threat this negative replies as a permission to generate the leader is the purpose to separate these two behaviors.\n *\n *\n * */\n case FOLLOWING:\n /*\n * To avoid duplicate codes\n * */\n Vote resultFN = receivedFollowingNotification(recvset, outofelection, voteSet, n);\n if (resultFN == null) {\n break;\n } else {\n return resultFN;\n }\n case LEADING:\n /*\n * In leadingBehavior(), it performs followingBehvior() first. When followingBehavior() returns\n * a null pointer, ask Oracle whether to follow this leader.\n * */\n Vote resultLN = receivedLeadingNotification(recvset, outofelection, voteSet, n);\n if (resultLN == null) {\n break;\n } else {\n return resultLN;\n }\n default:\n LOG.warn(\"Notification state unrecognized: {} (n.state), {}(n.sid)\", n.state, n.sid);\n break;\n }\n } else {\n if (!validVoter(n.leader)) {\n LOG.warn(\"Ignoring notification for non-cluster member sid {} from sid {}\", n.leader, n.sid);\n }\n if (!validVoter(n.sid)) {\n LOG.warn(\"Ignoring notification for sid {} from non-quorum member sid {}\", n.leader, n.sid);\n }\n }\n }\n return null;\n } finally {\n try {\n if (self.jmxLeaderElectionBean != null) {\n MBeanRegistry.getInstance().unregister(self.jmxLeaderElectionBean);\n }\n } catch (Exception e) {\n LOG.warn(\"Failed to unregister with JMX\", e);\n }\n self.jmxLeaderElectionBean = null;\n LOG.debug(\"Number of connection processing threads: {}\", manager.getConnectionThreadCount());\n }\n }", "private void updateReadyNodeLivenessEvents() {\n try (Mutex lock = nodeRepository().nodes().lockUnallocated()) {\n for (Node node : nodeRepository().nodes().list(Node.State.ready)) {\n Optional<Instant> lastLocalRequest = hostLivenessTracker.lastRequestFrom(node.hostname());\n if (lastLocalRequest.isEmpty()) continue;\n\n if (!node.history().hasEventAfter(History.Event.Type.requested, lastLocalRequest.get())) {\n History updatedHistory = node.history()\n .with(new History.Event(History.Event.Type.requested, Agent.NodeHealthTracker, lastLocalRequest.get()));\n nodeRepository().nodes().write(node.with(updatedHistory), lock);\n }\n }\n }\n }", "private void sendHeartbeats() {\n\t\tHashSet<InetAddress> addresses = new HashSet<>(nodes.keySet());\n\t\t\n for (InetAddress addr : addresses) {\n\t\t\t// Take the mutex to ensure that no modifications are made to nodes\n\t\t\t// or channels while checking this node\n\t\t\tmutexLock.lock();\n\n // Check if the last heartbeat was responded to\n if (!nodes.containsKey(addr)) {\n mutexLock.unlock();\n continue;\n }\n\n NodeStatus node = nodes.get(addr);\n if (!(node.getLastResponse() == heartbeat.get())) {\n\n if (node.isAvailable()) {\n node.setAvailable(false);\n System.out.println(\"[\" + System.currentTimeMillis() + \" :: Node at \" + addr + \" is not available\");\n }\n }\n\n // Send the new heartbeat\n if (!channels.containsKey(addr)) {\n mutexLock.unlock();\n continue;\n }\n\n HeartbeatRequestMessage hrm = new HeartbeatRequestMessage(heartbeat.get()+1);\n SocketChannel channel = channels.get(addr);\n byte[] message = hrm.serialize();\n\n try {\n channel.write(ByteBuffer.wrap(message));\n } catch (ClosedChannelException cce) {\n channels.remove(addr);\n } catch (IOException e) {\n // Do something?\n }\n\n\t\t\t// Release the mutex\n\t\t\tmutexLock.unlock();\n }\n\n heartbeat.getAndIncrement();\n lastHeartbeatTime = System.currentTimeMillis();\n }", "@Override\n public boolean peerFailed(final PeerAddress remotePeer, final PeerException peerException) {\n LOG.debug(\"Peer {} is offline with reason {}.\", remotePeer, peerException);\n \n // TB: ignore ZERO peer Id for the moment, but we should filter for the IP address\n if (remotePeer.peerId().isZero() || self().equals(remotePeer.peerId())) {\n return false;\n }\n final int classMember = classMember(remotePeer.peerId());\n AbortCause reason = peerException.abortCause();\n if (reason != AbortCause.TIMEOUT) {\n if(reason == AbortCause.PROBABLY_OFFLINE) {\n offlineMap.put(remotePeer.peerId(), remotePeer);\n } else if(reason == AbortCause.SHUTDOWN) {\n shutdownMap.put(remotePeer.peerId(), remotePeer);\n } else { // reason is exception\n exceptionMap.put(remotePeer.peerId(), remotePeer);\n }\n Map<Number160, PeerStatistic> tmp = peerMapOverflow.get(classMember);\n if (tmp != null) {\n synchronized (tmp) {\n tmp.remove(remotePeer.peerId());\n }\n }\n tmp = peerMapVerified.get(classMember);\n if (tmp != null) {\n boolean removed = false;\n final PeerStatistic peerStatistic;\n synchronized (tmp) {\n peerStatistic = tmp.remove(remotePeer.peerId());\n if (peerStatistic != null) {\n removed = true;\n }\n }\n if (removed) {\n notifyRemove(remotePeer, peerStatistic);\n return true;\n }\n }\n return false;\n }\n // not forced\n if (updatePeerStatistic(remotePeer, peerMapVerified.get(classMember), offlineCount)) {\n return peerFailed(remotePeer, new PeerException(AbortCause.PROBABLY_OFFLINE, \"Peer failed in verified map.\"));\n }\n if (updatePeerStatistic(remotePeer, peerMapOverflow.get(classMember), offlineCount)) {\n return peerFailed(remotePeer, new PeerException(AbortCause.PROBABLY_OFFLINE, \"Peer failed in overflow map.\"));\n }\n return false;\n }", "private void guardedTakeLeadership(final CuratorFramework curator) throws Exception {\n\n try {\n callback.becameLeader().get(30, TimeUnit.SECONDS);\n } catch (final Exception e) {\n throw new RuntimeException(\"Failed to setup new leader\", e);\n }\n\n final PathChildrenCache members =\n new PathChildrenCache(curator, MEMBERS, false, false, executor);\n\n members.getListenable().addListener(new PathChildrenCacheListener() {\n @Override\n public void childEvent(\n final CuratorFramework client, final PathChildrenCacheEvent event\n ) throws Exception {\n switch (event.getType()) {\n case CHILD_ADDED:\n callback.memberAdded(decodeMemberId(event.getData()));\n break;\n case CHILD_REMOVED:\n callback.memberRemoved(decodeMemberId(event.getData()));\n break;\n default:\n log.info(\"event: {}\", event);\n break;\n }\n }\n\n private String decodeMemberId(final ChildData data) {\n final String path = data.getPath();\n\n final int lastSlash = path.lastIndexOf('/');\n\n if (lastSlash < 0) {\n throw new IllegalArgumentException(\"illegal path: \" + path);\n }\n\n return path.substring(lastSlash + 1);\n }\n });\n\n members.start();\n\n try {\n callback.takeLeadership();\n } catch (final Exception e) {\n log.error(\"Leadership process threw exception\", e);\n }\n\n members.close();\n }", "@Override\n\tpublic long countMemberExcep() {\n\t\treturn 0;\n\t}", "public ProcessEventOnChiefMemberNode(){\r\n this( null );\r\n }", "@Override\r\n\tprotected void collectDisappearingPotential(V v) {\r\n\t\tif (graph.outDegree(v) == 0) {\r\n\t\t\tif (isDisconnectedGraphOK()) {\r\n\t\t\t\tif (v instanceof TopicVertex) {\r\n\t\t\t\t\tpr_disappearing_potential += getCurrentValue(v);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// not necessary for hits-hub\r\n\t\t\t\t\t// disappearing_potential.hub += getCurrentValue(v);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tthrow new IllegalArgumentException(\"Outdegree of \" + v\r\n\t\t\t\t\t\t+ \" must be > 0\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t// not necessary for hits-hub\r\n\t\t// if (graph.inDegree(v) == 0) {\r\n\t\t// if (isDisconnectedGraphOK()) {\r\n\t\t// if (!(v instanceof TopicReferenceVertex)) {\r\n\t\t// disappearing_potential.authority += getCurrentValue(v);\r\n\t\t// }\r\n\t\t// } else {\r\n\t\t// throw new IllegalArgumentException(\"Indegree of \" + v\r\n\t\t// + \" must be > 0\");\r\n\t\t// }\r\n\t\t// }\r\n\t}", "@Override\r\n\tpublic void member() {\n\t\t\r\n\t}", "public void handleNotInUse() {\n InternalSubchannel.this.callback.onNotInUse(InternalSubchannel.this);\n }", "public void leaderElection () {\n leaderID++;\n if (leaderID > numServers) {\n leaderID = 1;\n }\n if (isLeader()) {\n leader = new Leader(combine(index, Constants.LEADER), this,\n acceptors, replicas);\n leader.start();\n } else {\n leader = null;\n }\n }", "public synchronized void prunePeers() {\n\t\tchecker.checkList(this.getPeers());\n\t}", "private void onUnavailable() {\n // TODO: broadcast\n }", "@Override\n\tpublic void forceStateBroadcast() {\n\t\tpeerDiscoveryService.sendStateMulticast();\n\t}", "@Test\n public void testWhenHierarchyContainsUnreachableNodes() {\n ClassInformation info = ClassInformation.postRenameInfoFor(false, \"A\", \"B\", null);\n\n ClassHierarchy hierarchy = new ClassHierarchyBuilder().build();\n hierarchy.add(info);\n\n HierarchyVerificationResult result = verifier.verifyHierarchy(hierarchy);\n assertFalse(result.success);\n assertTrue(result.foundUnreachableNodes);\n assertEquals(2, result.numberOfUnreachableNodes);\n }", "void elect() {\n leader = self;\n state = InstanceState.LEADER;\n }", "public void connectionControl() throws ServerOfflineException {\n\t\tServer.connectionCheck(this.serverTyp, this.connection);\n\t}", "@Override\n public void update() { Ping the connection to see if it is still alive. At\n // some point the ProxyClient class should centralize\n // the connection aliveness monitoring and no longer\n // rely on the custom tabs to ping the connections.\n //\n try {\n getMBeanServerConnection().getDefaultDomain();\n } catch (IOException ex) {\n vmPanel.getProxyClient().markAsDead();\n }\n }", "private void confirmAlive(MessagingAddress statCollectorAddress, IDAddressPair self) {\n\t\tif (this.provider.isReliable()\n\t\t\t\t|| ++this.notificationCount % this.pingFreq != 0) return;\n\t\t// multiple increments can be in race condition w/o synchronization, but it's OK here.\n\n\t\t// ping\n\t\tMessage pingMessage = StatMessageFactory.getStatPingMessage(self);\n\t\tMessage ackMessage = null;\n\n\t\ttry {\n\t\t\tackMessage = this.sender.sendAndReceive(statCollectorAddress, pingMessage);\n\n\t\t\tif (ackMessage.getTag() == Tag.STAT_ACK.getNumber()) {\n\t\t\t\t//synchronized (this) {\n\t\t\t\t\tthis.failureCount = 0;\n\t\t\t\t//}\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tlogger.log(Level.WARNING, \"STAT_PING failed: \" + statCollectorAddress);\n\t\t}\n\t\tcatch (NullPointerException e) {\n\t\t\tlogger.log(Level.WARNING, \"A null message returned. The target is not a stat collector?\");\n\t\t}\n\n\t\tthis.failInReporting();\n\t}", "public void blockUntilUp() {\n while (server == null || !server.isServing()) {\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n // ignore\n }\n }\n }", "public synchronized void nudge() {\n notifyAll();\n }", "Cluster getUpcomingCluster() throws TimeoutException, InterruptedException;", "public boolean notAlive() {\r\n\r\n if (LOG.isLoggable(Level.FINEST)) {\r\n LOG.finest(\"notAlive ( ) called \");\r\n }\r\n\r\n return !alive();\r\n }", "void nodeOnline();", "@Override\n public Flux<ClusterMembershipEvent> watchLeaderElectionProcessUpdates() {\n Flux<ClusterMembershipEvent> lockWatcher = Flux.defer(() -> {\n Scheduler singleScheduler = Schedulers.newSingle(\"LeaderWatcher-\" + WATCHER_THREAD_IDX.getAndIncrement());\n return Flux.interval(LEADER_POLL_INTERVAL, singleScheduler)\n .flatMap(tick -> {\n long started = electedLeaderRefreshAction.start();\n ClusterMembershipRevision<ClusterMemberLeadership> revision;\n try {\n revision = refreshCurrentLeaderRevision();\n electedLeaderRefreshAction.finish(started);\n } catch (Exception e) {\n Throwable unwrapped = e.getCause() != null ? e.getCause() : e;\n electedLeaderRefreshAction.failure(unwrapped);\n return Flux.error(unwrapped);\n }\n return Flux.<ClusterMembershipEvent>just(ClusterMembershipEvent.leaderElected(revision));\n })\n .retryWhen(RetryHandlerBuilder.retryHandler()\n .withRetryCount(LEADER_POLL_RETRIES)\n .withDelay(Math.max(1, leaseDuration.toMillis() / 10), leaseDuration.toMillis(), TimeUnit.MILLISECONDS)\n .withReactorScheduler(Schedulers.parallel())\n .buildRetryExponentialBackoff()\n )\n .doOnCancel(singleScheduler::dispose)\n .doAfterTerminate(singleScheduler::dispose);\n }).distinctUntilChanged();\n\n return lockWatcher.mergeWith(handlerProcessor.flatMap(LeaderElectionHandler::events));\n }", "synchronized void broadcastMessage(Message message) throws InterruptedException {\n for (Neighbor neighbor : node.getNeighbors()) {\n if (!neighbor.getAddress().equals(message.getSender())) {\n neighbor.sendMessage(message);\n }\n }\n }", "private void initEventMembers()\n {\n if(mMarkersMap==null)\n mMarkersMap = new HashMap<>();\n memberPresentFlags= new HashMap<>();\n memberHandler=new Handler();\n\n runnable = new Runnable() {\n @Override\n public void run() {\n for(Map.Entry<String,Boolean> isMemberPresentFlag: memberPresentFlags.entrySet())\n {\n if(!isMemberPresentFlag.getValue())\n {\n //Member not present. Remove marker\n mMarkersMap.get(isMemberPresentFlag.getKey()).remove();\n mMarkersMap.remove(isMemberPresentFlag.getKey());\n }\n else\n {\n //Member present. Set marker to false\n isMemberPresentFlag.setValue(false);\n }\n }\n\n getEventMembers();\n Toast.makeText(getContext(),Double.toString(radius),Toast.LENGTH_SHORT).show();\n memberHandler.postDelayed(this,2500);\n }\n } ;\n\n memberHandler.postDelayed(runnable,2500);\n\n }", "@Override\n public ClusterStatus getCurrentClusterStatus() {\n if (getMemberList().size() > 1) {\n return CLUSTER_FUNCTIONAL;\n }\n // when only one node is connected return degraded\n if (getMemberList().size() == 1) {\n return CLUSTER_DEGRADED;\n }\n // consider all other states as illegal\n return CLUSTER_ILLEGAL;\n }", "private void handleMangerKickUserOut() {\n String userName = EventMessageParser.extractUserName(this.message);\n SocketConnection targetConnection = SocketManager.getInstance()\n .getUserConnection(userName);\n targetConnection.send(this.message);\n }", "public final void reportUncertain() {\n mHandler.post(() -> {\n synchronized (mLock) {\n ITimeZoneProviderManager manager = mManager;\n if (manager != null) {\n try {\n TimeZoneProviderEvent thisEvent =\n TimeZoneProviderEvent.createUncertainEvent(\n SystemClock.elapsedRealtime());\n if (shouldSendEvent(thisEvent)) {\n manager.onTimeZoneProviderEvent(thisEvent);\n mLastEventSent = thisEvent;\n }\n } catch (RemoteException | RuntimeException e) {\n Log.w(TAG, e);\n }\n }\n }\n });\n }", "public DISCARD addIgnoreMember(Address sender) {ignoredMembers.add(sender); return this;}", "private void notifyReplicaNodes(Identifier pid, boolean notifyAuthNode) {\n\n logger.info(buildStandardLogMessage(null, \" Entering notifyReplicaNodes...\"));\n SystemMetadata cnSystemMetadata = hzSystemMetaMap.get(pid);\n if (cnSystemMetadata != null) {\n List<Replica> prevReplicaList = cnSystemMetadata.getReplicaList();\n\n for (Replica replica : prevReplicaList) {\n NodeReference replicaNodeId = replica.getReplicaMemberNode();\n try {\n if (notifyAuthNode) {\n // notify all nodes\n notifyReplicaNode(cnSystemMetadata, replicaNodeId);\n } else {\n // only notify MNs that are not the AuthMN\n if (!replicaNodeId.getValue().equals(task.getNodeId())) {\n notifyReplicaNode(cnSystemMetadata, replicaNodeId);\n }\n }\n } catch (InvalidToken | NotAuthorized | NotImplemented |\n ServiceFailure | NotFound | InvalidRequest be) {\n // failed notifications shouldn't result in a sync failure\n // nor a retry, so we will log the exception and keep going\n logger.error(buildStandardLogMessage(be, \"Failed to notify replica member node \" +\n replicaNodeId.getValue()), be);\n }\n }\n } else {\n logger.error(buildStandardLogMessage(null,\"null returned from Hazelcast \"\n + hzSystemMetaMapString + \" Map\"));\n }\n }", "private void reachable() {\r\n\r\n\t\tSortedSet<String> keys = new TreeSet<String>(vertexMap.keySet());\r\n\t\tIterator it = keys.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tVertex v = vertexMap.get(it.next());\r\n\t\t\tif (v.isStatus()) {\r\n\t\t\t\tSystem.out.println(v.getName());\r\n\t\t\t\tbfs(v);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void removeOldMember(InternalDistributedMember id) {\n super.markDepartedMember(id);\n }", "public IllegalConnectionCheck() {\n listener = new LinkedHashSet<CheckListener>();\n active = true;\n }", "private void updateLocalCommunityAggressive(Node encounteredNode) {\n if (!(encounteredNode.getCommunityInfo() instanceof KClique)) {\n return;\n }\n\n KClique nodeCommunity = (KClique) encounteredNode.getCommunityInfo();\n\n // consider each vertex in the local community of the encountered node\n // to be added to the local community of the current node if the encountered node\n // has been previously added to the local community of the current node\n for (Integer newID : nodeCommunity.localCommunity) {\n int count = 0;\n\n // if a candidate node contains k - 1 nodes in its familiar set\n // than also belong to the local community of the current node,\n // then it is also added to the local community of the current node\n for (int i = 0; i < globalFamiliarSet[newID].length; i++) {\n if (globalFamiliarSet[newID][i] && inLocalCommunity(i)) {\n count++;\n }\n }\n\n if (count >= communityThreshold - 1) {\n if (!inLocalCommunity(newID)) {\n localCommunity.add(newID);\n }\n }\n }\n }", "@Test\n public void testSplitBrainProtectionAbsent_whenHeartbeatsLate() throws Exception {\n long now = System.currentTimeMillis();\n // initialize clock offset +1 minute --> last heartbeat received was too far in the past\n long clockOffset = 60000;\n initClockOffsetTest(clockOffset);\n createSplitBrainProtectionFunctionProxy(1000, 1000);\n heartbeat(now, 5, 500);\n assertFalse(splitBrainProtectionFunction.apply(Arrays.asList(members)));\n }", "private void broadcast(String msg) {\n\t\tIterator i = onlineUsers.entrySet().iterator();\n\t\t\n\t\twhile (i.hasNext()) {\n\t\t\tMap.Entry p = (Map.Entry)i.next();\n\t\t\tUser u = (User)p.getValue();\n\t\t\t\n\t\t\tu.output.println(msg);\n\t\t}\n\t}", "@Override\n public void run() {\n List<Integer> list = new ArrayList<Integer>();\n int num_peer = P.peer_port.length;\n int ind = -1;\n while (P.choke_thread_running) {\n synchronized (P.lock_current_neighbors) { //lock the object\n for (int i = 0; i < num_peer; i++) {\n list.add(i);\n }\n //select randomly.\n java.util.Collections.shuffle(list);\n int[] cn = P.current_neighbors.clone();\n Arrays.sort(cn);\n for (int i = 0; i < num_peer; i++) {\n int ind2 = list.get(i);\n if (P.is_interested[ind2] && Arrays.binarySearch(cn, P.peer_id[ind2]) < 0 && P.peer_id[ind2] != P.id && P.sockets[ind2]!=null) {\n ind = ind2;\n P.current_neighbors[P.current_neighbors.length - 1] = P.peer_id[ind];\n break;\n }\n\n }\n }\n //send unchoke message.\n Message msg = new Message();\n msg.length = 0; //no payload.\n msg.type = 1; //unchoke.\n msg.payload = null; //no payload.\n \n if (ind >= 0) //there is someone interested in my data.\n {\n P.send(P.peer_id[ind], msg);\n P.print(\"OptChoke unchoked peer with id \" + P.peer_id[ind]);\n }\n ind = -1;\n //print debugging info.\n \n //sleep some interval.\n try {\n Thread.sleep(1000 * P.optimistic_unchoking_interval);\n } catch (InterruptedException ex) {\n Thread.currentThread().interrupt();\n }\n }\n }", "@Override\r\n public void run() {\r\n try {\r\n nui.notifyJoinConnecting();\r\n networkPlayer.start();\r\n } catch (NetworkException nex) {\r\n game.abortGame();\r\n if (networkPlayer.getClass() == NetworkClient.class) {\r\n nui.notifyJoinWaiting();\r\n } else if (networkPlayer.getClass() == NetworkHost.class) {\r\n nui.notifyHostWaiting();\r\n } else {\r\n new CriticalException(\"Network player identified itself as neither\"\r\n + \" a client or a server.\");\r\n }\r\n }\r\n }", "private void signalError() {\n Connection connection = connectionRef.get();\n if (connection != null && connection.isDefunct()) {\n Host host = cluster.metadata.getHost(connection.address);\n // Host might be null in the case the host has been removed, but it means this has\n // been reported already so it's fine.\n if (host != null) {\n cluster.signalConnectionFailure(host, connection.lastException());\n return;\n }\n }\n\n // If the connection is not defunct, or the host has left, just reconnect manually\n reconnect();\n }", "private void uponOutConnectionFailed(OutConnectionFailed event, int channelId) {\n passiveView.markDead(event.getNode());\n if(optimizedLayer != null && optimizedLayer.getAddress().equals(event.getNode()))\n optimizedLayer = null;\n if(optimizedTop != null && optimizedTop.getAddress().equals(event.getNode()))\n optimizedTop = null;\n\n\n }", "@Override\n public void run() {\n try {\n Thread.sleep(TimeUnit.MINUTES.toMillis(getSettings().getMinutesStartupPeriod()));\n }\n catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n // Set the last time players were online to now\n setLastTimePlayersOnline(System.currentTimeMillis());\n\n // Start a new thread, report that monitoring is now enabled\n new Thread(\"ThreadDump Monitoring Status\") {\n public void run() {\n new BukkitRunnable() {\n @Override\n public void run() {\n getPlugin().getLogger().info(\"Started monitoring\");\n }\n }.runTask(getPlugin());\n }\n }.start();\n\n // Run in an infinite loop as we're not calling back to the main thread\n while (true) {\n // Create the task here which will be accessed\n FutureTask<Boolean> task = new FutureTask<>(() -> !Bukkit.getOnlinePlayers().isEmpty());\n\n // Start a thread incase just running the BukkitRunnable would encounter a freeze\n new Thread(\"ThreadDump Monitoring Check\") {\n public void run() {\n new BukkitRunnable() {\n @Override\n public void run() {\n // Run the task to check if players are online\n task.run();\n }\n }.runTask(getPlugin());\n }\n }.start();\n\n try {\n // Wait 20 seconds for resolve, otherwise throw error\n boolean playersOnline = task.get(getSettings().getSecondsWaitForBukkit(), TimeUnit.SECONDS);\n\n doPlayersOnline(playersOnline);\n }\n catch (Exception e) {\n // Error was thrown, assumed due to timeout\n\n // If it can dump threads\n if (isTimeToDumpAgain()) {\n // Dump threads\n System.out.println(\"[ThreadDump] Server isn't responding, dumping threads!\");\n dumpThreadsToFile();\n }\n }\n\n try {\n // Wait 10 seconds\n Thread.sleep(TimeUnit.SECONDS.toMillis(getSettings().getSecondsPluginCheck()));\n }\n catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "private Vote receivedFollowingNotification(Map<Long, Vote> recvset, Map<Long, Vote> outofelection, SyncedLearnerTracker voteSet, Notification n) {\n if (n.electionEpoch == logicalclock.get()) {\n recvset.put(n.sid, new Vote(n.leader, n.zxid, n.electionEpoch, n.peerEpoch, n.state));\n voteSet = getVoteTracker(recvset, new Vote(n.version, n.leader, n.zxid, n.electionEpoch, n.peerEpoch, n.state));\n if (voteSet.hasAllQuorums() && checkLeader(recvset, n.leader, n.electionEpoch)) {\n setPeerState(n.leader, voteSet);\n Vote endVote = new Vote(n.leader, n.zxid, n.electionEpoch, n.peerEpoch);\n leaveInstance(endVote);\n return endVote;\n }\n }\n\n /*\n * Before joining an established ensemble, verify that\n * a majority are following the same leader.\n *\n * Note that the outofelection map also stores votes from the current leader election.\n * See ZOOKEEPER-1732 for more information.\n */\n outofelection.put(n.sid, new Vote(n.version, n.leader, n.zxid, n.electionEpoch, n.peerEpoch, n.state));\n voteSet = getVoteTracker(outofelection, new Vote(n.version, n.leader, n.zxid, n.electionEpoch, n.peerEpoch, n.state));\n\n if (voteSet.hasAllQuorums() && checkLeader(outofelection, n.leader, n.electionEpoch)) {\n synchronized (this) {\n logicalclock.set(n.electionEpoch);\n setPeerState(n.leader, voteSet);\n }\n Vote endVote = new Vote(n.leader, n.zxid, n.electionEpoch, n.peerEpoch);\n leaveInstance(endVote);\n return endVote;\n }\n\n return null;\n }", "@Override\n public boolean peerFound(PeerAddress remotePeer, final PeerAddress referrer, final PeerConnection peerConnection, RTT roundTripTime) {\n LOG.debug(\"Peer {} is online. Reporter was {}.\", remotePeer, referrer);\n boolean firstHand = referrer == null;\n //if we got contacted by this peer, but we did not initiate the connection\n boolean secondHand = remotePeer.equals(referrer);\n //if a peer reported about other peers\n boolean thirdHand = !firstHand && !secondHand;\n // always trust first hand information\n if (firstHand) {\n offlineMap.remove(remotePeer.peerId());\n shutdownMap.remove(remotePeer.peerId());\n }\n \n if (secondHand && !peerVerification) {\n \tofflineMap.remove(remotePeer.peerId());\n shutdownMap.remove(remotePeer.peerId());\n }\n \n // don't add nodes with zero node id, do not add myself and do not add\n // nodes marked as bad\n if (remotePeer.peerId().isZero() || self().equals(remotePeer.peerId()) || reject(remotePeer)) {\n \tLOG.debug(\"peer Id is zero, self address, or simply rejected\");\n return false;\n }\n \n //if we have first hand information, that means we send a message to that peer and we received a reply. \n //So its not firewalled. This happens in the discovery phase\n if (remotePeer.unreachable()) {\n \tif(firstHand) {\n \t\tremotePeer = remotePeer.withUnreachable(false);\n \t} else {\n \t\tLOG.debug(\"peer is unreachable, reject\");\n \t\treturn false;\n \t}\n }\n \n final boolean probablyDead = offlineMap.containsKey(remotePeer.peerId()) || \n \t\tshutdownMap.containsKey(remotePeer.peerId()) || \n \t\texceptionMap.containsKey(remotePeer.peerId());\n \n\t\t// don't include secondHand as if we are contacted by an assumed offline\n\t\t// peer and we see the peer is there, assume the peer is not dead.\n\t\tif(thirdHand && probablyDead) {\n \tLOG.debug(\"Most likely offline, reject\");\n \treturn false;\n }\n \n final int classMember = classMember(remotePeer.peerId());\n\n // Update existing PeerStatistic with RTT info and potential new port\n final Pair<PeerStatistic,Boolean> old = updateExistingVerifiedPeerAddress(\n peerMapVerified.get(classMember), remotePeer, firstHand, roundTripTime);\n if (old != null && old.element1()) {\n // we update the peer, so we can exit here and report that we have\n // updated it.\n notifyUpdate(remotePeer, old.element0());\n LOG.debug(\"Update peer information\");\n return true;\n } else if (old != null && !old.element1()) {\n \tLOG.debug(\"Unreliable information, don't update\");\n \t//don't update, as we have second hand information that is not reliabel, we already have it, don't update\n \treturn false;\n }\n else {\n if (firstHand || (secondHand && !peerVerification)) {\n final Map<Number160, PeerStatistic> map = peerMapVerified.get(classMember);\n boolean inserted = false;\n synchronized (map) {\n // check again, now we are synchronized\n if (map.containsKey(remotePeer.peerId())) {\n return peerFound(remotePeer, referrer, peerConnection, roundTripTime);\n }\n if (map.size() < bagSizesVerified[classMember]) {\n final PeerStatistic peerStatistic = new PeerStatistic(remotePeer);\n peerStatistic.successfullyChecked();\n peerStatistic.addRTT(roundTripTime);\n map.put(remotePeer.peerId(), peerStatistic);\n inserted = true;\n }\n }\n\n if (inserted) {\n // if we inserted into the verified map, remove it from the non-verified map\n final Map<Number160, PeerStatistic> mapOverflow = peerMapOverflow.get(classMember);\n synchronized (mapOverflow) {\n mapOverflow.remove(remotePeer.peerId());\n }\n notifyInsert(remotePeer, true);\n LOG.debug(\"Peer inserted\");\n return true;\n }\n }\n }\n LOG.debug(\"Not rejected or inserted, add to overflow map\");\n // if we are here, we did not have this peer, but our verified map was full\n // check if we have it stored in the non verified map.\n final Map<Number160, PeerStatistic> mapOverflow = peerMapOverflow.get(classMember);\n synchronized (mapOverflow) {\n PeerStatistic peerStatistic = mapOverflow.get(remotePeer.peerId());\n if (peerStatistic == null) {\n peerStatistic = new PeerStatistic(remotePeer);\n }\n if (firstHand) {\n peerStatistic.successfullyChecked();\n peerStatistic.addRTT(roundTripTime);\n }\n if (thirdHand && roundTripTime != null) {\n peerStatistic.addRTT(roundTripTime.setEstimated());\n }\n mapOverflow.put(remotePeer.peerId(), peerStatistic);\n }\n\n notifyInsert(remotePeer, false);\n return true;\n }", "private synchronized void neigborStausChanged(Node caller){\n if(this.getStatus().equals(Status.BLUE)) {\n this.setState(Status.YELLOW);\n burner = new StatusChecker(this);\n liveNeighbors.remove(caller);\n }\n }", "@Override\n\t\t\t\tpublic void notifyParallelRoad(int arg0) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\tpublic String ping() {\n\t\treturn null;\n\t}", "@Override\n public long processTimer (long interval)\n {\n state.incVersion ();\n\n Map <String, JiniPeer> peers = agent.getPeers ();\n if (peers.size () > 0)\n {\n GossipMsg.Ping msg = new GossipMsg.Ping ();\n msg.appendDigest (state.getMessage ());\n\n for (JiniPeer peer : peers.values ()) {\n State peerState = (State) peer.getAttached ();\n if (peerState != null)\n msg.appendDigest (peerState.getMessage ());\n }\n\n // Gossip to some random live member\n boolean seed = sendGossip (msg, liveEndpoints);\n\n // Gossip to some unreachable member with some probability to check if he is back up\n sendGossipDead (msg);\n\n if (!seed || liveEndpoints.size() < seeds.size())\n sendGossip (msg, seeds);\n\n checkState ();\n }\n \n return interval;\n }", "private ClusterMonitor sendDummyMessage() {\n\t\tClusterMonitor.Builder cm = ClusterMonitor.newBuilder();\n\t\t//your cluster ID\n\t\tcm.setClusterId(0);\n\t\n\t\tcm.setTick(i++);\n\n\t\t\n\t\t//No of nodes in your cluster\n\t\tcm.setNumNodes(5);\n\t\t\n\t\t//Node Id = Process Id\n\t//\tcm.addProcessId(50);\n\t\t//cm.addProcessId(51);\n\t\t//cm.addProcessId(53);\n\t\t//cm.addProcessId(54);\n\t\t//cm.addProcessId(52);\n\t\t\n//\t\t/cm.set\n\t\t\n\t\t//Set processId,No of EnquedTask for that processId\n\t\t\n\t//\tcm.addEnqueued(19);\n\t\t\n\t//\tcm.addEnqueued(5);\n\t\t//Set processId,No of ProcessedTask for that processId\n\t//\tcm.addProcessed(3);\n\t\t//cm.addProcessed(3);\n\t\t//Set processId,No of StolenTask for that processId\n\t\t//cm.addStolen(2);\n\t\tcm.addStolen(2);\n\t\t\n\t\t//Increment tick every time you send the message, or else it would be ignored\n\t\t// Tick starts from 0\n\t\n\t\t\n\t\treturn cm.build();\n\t}", "public void godNotAdded() {\n notifyGodNotAdded(this.getCurrentTurn().getCurrentPlayer().getNickname());\n }", "public void testClusterJoinDespiteOfPublishingIssues() throws Exception {\n String clusterManagerNode = internalCluster().startClusterManagerOnlyNode();\n String nonClusterManagerNode = internalCluster().startDataOnlyNode();\n\n DiscoveryNodes discoveryNodes = internalCluster().getInstance(ClusterService.class, nonClusterManagerNode).state().nodes();\n\n TransportService clusterManagerTranspotService = internalCluster().getInstance(\n TransportService.class,\n discoveryNodes.getClusterManagerNode().getName()\n );\n\n logger.info(\"blocking requests from non cluster-manager [{}] to cluster-manager [{}]\", nonClusterManagerNode, clusterManagerNode);\n MockTransportService nonClusterManagerTransportService = (MockTransportService) internalCluster().getInstance(\n TransportService.class,\n nonClusterManagerNode\n );\n nonClusterManagerTransportService.addFailToSendNoConnectRule(clusterManagerTranspotService);\n\n assertNoClusterManager(nonClusterManagerNode);\n\n logger.info(\n \"blocking cluster state publishing from cluster-manager [{}] to non cluster-manager [{}]\",\n clusterManagerNode,\n nonClusterManagerNode\n );\n MockTransportService clusterManagerTransportService = (MockTransportService) internalCluster().getInstance(\n TransportService.class,\n clusterManagerNode\n );\n TransportService localTransportService = internalCluster().getInstance(\n TransportService.class,\n discoveryNodes.getLocalNode().getName()\n );\n if (randomBoolean()) {\n clusterManagerTransportService.addFailToSendNoConnectRule(\n localTransportService,\n PublicationTransportHandler.PUBLISH_STATE_ACTION_NAME\n );\n } else {\n clusterManagerTransportService.addFailToSendNoConnectRule(\n localTransportService,\n PublicationTransportHandler.COMMIT_STATE_ACTION_NAME\n );\n }\n\n logger.info(\n \"allowing requests from non cluster-manager [{}] to cluster-manager [{}], waiting for two join request\",\n nonClusterManagerNode,\n clusterManagerNode\n );\n final CountDownLatch countDownLatch = new CountDownLatch(2);\n nonClusterManagerTransportService.addSendBehavior(\n clusterManagerTransportService,\n (connection, requestId, action, request, options) -> {\n if (action.equals(JoinHelper.JOIN_ACTION_NAME)) {\n countDownLatch.countDown();\n }\n connection.sendRequest(requestId, action, request, options);\n }\n );\n\n nonClusterManagerTransportService.addConnectBehavior(clusterManagerTransportService, Transport::openConnection);\n\n countDownLatch.await();\n\n logger.info(\"waiting for cluster to reform\");\n clusterManagerTransportService.clearOutboundRules(localTransportService);\n nonClusterManagerTransportService.clearOutboundRules(localTransportService);\n\n ensureStableCluster(2);\n\n // shutting down the nodes, to avoid the leakage check tripping\n // on the states associated with the commit requests we may have dropped\n internalCluster().stopRandomNonClusterManagerNode();\n }", "public void playerHasInvincibility() {\n\t\tthis.state = canBeKilled;\n\t}", "@ForOverride\n public void onInUse(InternalSubchannel internalSubchannel) {\n }", "public void infect() {\n\t\tPlagueAgent current = this;\n\t\tif (!current.infected) {\n\t\t\tfor (PlagueAgent a : plagueWorld.getNeighbors(current, 5)) {\n\t\t\t\tif (a.infected) {\n\t\t\t\t\tint luck = Utilities.rng.nextInt(100);\n\t\t\t\t\tif (luck < plagueWorld.VIRULENCE) {\n\t\t\t\t\t\tthis.infected = true;\n\t\t\t\t\t\tplagueWorld.newInfection();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tplagueWorld.changed();\n\t}", "private void startPinging() {\n Bukkit.getScheduler().runTaskTimerAsynchronously(plugin, new Runnable() {\n @Override\n public void run() {\n HashSet<Connection> connectionsSet = new HashSet<>(connections); //Create new hashset of connections\n for (Connection connection : connectionsSet) { //Loop thru connections\n boolean stillInConnections = false;\n synchronized (connections) { //Check if connection still in the array\n if (connections.contains(connection)) {\n stillInConnections = true;\n }\n }\n if (stillInConnections) { //If still in array\n try { //Try to ping\n connection.isValid(5);\n } catch (SQLException e) { //If not valid anymore\n synchronized (connections) { //Remove from array\n connections.remove(connection);\n }\n closeConnection(connection); //Close the connection\n }\n }\n }\n }\n }, 17000, 17000);\n }", "public ParseTreeNode visit(MemberNode memberNode) {\n return null;\n }", "private Result checkAllNodesAreUp(ClusterState clusterState) {\n\n for (NodeInfo storageNodeInfo : clusterInfo.getStorageNodeInfo()) {\n State wantedState = storageNodeInfo.getUserWantedState().getState();\n if (wantedState != State.UP && wantedState != State.RETIRED) {\n return Result.createDisallowed(\"Another storage node wants state \" +\n wantedState.toString().toUpperCase() + \": \" + storageNodeInfo.getNodeIndex());\n }\n\n State state = clusterState.getNodeState(storageNodeInfo.getNode()).getState();\n if (state != State.UP && state != State.RETIRED) {\n return Result.createDisallowed(\"Another storage node has state \" + state.toString().toUpperCase() +\n \": \" + storageNodeInfo.getNodeIndex());\n }\n }\n\n for (NodeInfo distributorNodeInfo : clusterInfo.getDistributorNodeInfo()) {\n State wantedState = distributorNodeInfo.getUserWantedState().getState();\n if (wantedState != State.UP && wantedState != State.RETIRED) {\n return Result.createDisallowed(\"Another distributor wants state \" + wantedState.toString().toUpperCase() +\n \": \" + distributorNodeInfo.getNodeIndex());\n }\n\n State state = clusterState.getNodeState(distributorNodeInfo.getNode()).getState();\n if (state != State.UP && state != State.RETIRED) {\n return Result.createDisallowed(\"Another distributor has state \" + state.toString().toUpperCase() +\n \": \" + distributorNodeInfo.getNodeIndex());\n }\n }\n\n return Result.allowSettingOfWantedState();\n }", "@Override\n\tpublic boolean canRespawnHere()\n\t{\n\t\treturn false;\n\t}", "public static void unknownMember(Command command, String id) {\n\t\tString str = command.getSender().getAsMention() + \",\\n\";\n\t\t\n\t\tstr += ConfigManager.getMessage(\"unknown member\").replace(\"%id%\", id);\n\t\tcommand.getChannel().sendMessage(str).complete();\n\t}", "@Override\n\tpublic boolean canRespawnHere() {\n\t\treturn true;\n\t}", "@Override\n public void process(final Object msg) {\n final int candidate = (Integer) msg;\n if (candidate <= 0) {\n \t\tif (nextActor != null) {\n \t\t\tnextActor.send(msg);\n \t\t}\n } else {\n \t\tfinal boolean locallyPrime = isLocallyPrime(candidate);\n \t\tif (locallyPrime) {\n \t\t\tif (nLocalPrimes < maxLocalPrimes) {\n \t\tlocalPrimes[nLocalPrimes] = candidate;\n \t\t\tnLocalPrimes += 1;\n \t\t\t} else if (nextActor == null) {\n \t\t\tnextActor = new SieveActorActor(candidate);\n \t\t} else {\n \t\t\tnextActor.send(candidate);\n \t\t}\n \t\t}\n }\n }", "public boolean canRespawnHere()\n {\n return false;\n }", "protected boolean waitForClusterToStart() throws HoneycombTestException {\n\n Log.INFO(\"Waiting for cluster to come Online...\");\n boolean ready = false;\n int i = MAX_ONLINE_ITERATIONS;\n while (i > 0 && !ready) {\n try {\n i--;\n ArrayList lines = readSysstat();\n if (lines.toString().contains(nodesOnlineString)) {\n ready = true;\n } \n if (!ready)\n pause(SLEEP_WAKEUP_TIMEOUT);\n } catch (Throwable e) {\n pause(SLEEP_WAKEUP_TIMEOUT);\n }\n }\n if (i == 0) {\n Log.WARN(\"Cluster is not Online\");\n }\n if (!ready)\n okToProceed = false;\n return ready;\n }", "@Override\n\tpublic void visit(KeepAlive ka) {\n\t\tSystem.out.println(\"peer keepAlive connection\");\n\t\tph.setAlive(true);\n\t\tthis.lastKeepAlive = System.currentTimeMillis();\n\t}", "public void nodeJoined(final ClusterEvent event) {\n }" ]
[ "0.63174975", "0.59447664", "0.58907473", "0.58026", "0.5784551", "0.57415", "0.56398517", "0.56316185", "0.55382305", "0.5506402", "0.54558736", "0.5369602", "0.536739", "0.5363647", "0.5293856", "0.5263795", "0.5200489", "0.5169342", "0.51601356", "0.51317394", "0.50984037", "0.5089842", "0.5037576", "0.5032766", "0.5031658", "0.50197864", "0.50120693", "0.4985121", "0.4976643", "0.49538192", "0.4951527", "0.49492225", "0.49392325", "0.4931645", "0.49250603", "0.49233577", "0.49220794", "0.490412", "0.48996767", "0.4897707", "0.489648", "0.4894379", "0.48809475", "0.4872678", "0.48667878", "0.48627114", "0.48584753", "0.48566362", "0.48559666", "0.48477015", "0.48351637", "0.48299083", "0.48200813", "0.48146316", "0.48138613", "0.4810585", "0.478051", "0.47790614", "0.47756732", "0.4773834", "0.4771993", "0.47714823", "0.47509077", "0.47251645", "0.47244936", "0.47119725", "0.47118035", "0.47109708", "0.4702715", "0.46937665", "0.46801597", "0.4673523", "0.466959", "0.46684083", "0.46585104", "0.46571526", "0.46570367", "0.46561188", "0.4653747", "0.46532768", "0.46476996", "0.46396112", "0.46372858", "0.4635112", "0.46283755", "0.46273202", "0.46217138", "0.46142876", "0.4613039", "0.46126738", "0.4611595", "0.4611108", "0.46063212", "0.46046746", "0.46039253", "0.46028775", "0.4598142", "0.45962024", "0.4595272", "0.45944437" ]
0.7824962
0
This is called as a part of the startup for the startup. When running an application that is on the web application, the api.reader is started by the startup script.
@Override public boolean initializeIndexReader(String filename) { try { READER = DirectoryReader.open(FSDirectory.open(FileSystems.getDefault().getPath(filename))); } catch (IOException e) { READER = null; log.error("Failed to instantiate the index api.reader with directory: " + filename); } return isInitialized(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void startup() {\n }", "public void start() {\n\t\tinstanceConfigUpdated();\n\n\t\tnew Thread(getUsageData, \"ResourceConsumptionManager : GetUsageData\").start();\n\n\t\tLoggingService.logInfo(MODULE_NAME, \"started\");\n\t}", "@Override\n protected void appStart() {\n }", "public static void init() {\n\n\t\tsnapshot = new SnapshotService();\n\t\tlog.info(\"App init...\");\n\t}", "@Override\r\n\tpublic void startup() {\n\t\t\r\n\t\tString wechatID = \"gh_f49bb9a333b3\";\r\n\t\tString Token = \"spotlight-wechat\";\r\n\t\t\r\n\t\tNoIOClient client = new NoIOClient(\"mg.protel.com.hk\",5010);\r\n\t\tclient.addCRouter(wechatID, Token,null,null);\r\n\t\t\r\n\t\tclient.startup();\r\n\r\n\t}", "public static void main(final String[] args) throws Exception {\n new ApiApplication().run(args);\n }", "public void initApiService() {\n apiService = ApiUtils.getAPIService();\n }", "public static void main(String[] args) {\n\t\tSpringApplication.run(ApiApplication.class, args);\n\t}", "private void startSkeletons() {\n if (this.skeletons_started) return;\n\n this.add_registration_api();\n this.registration_skeleton.start();\n this.add_service_api();\n this.service_skeleton.start();\n\n this.skeletons_started = true;\n }", "public void startApp()\r\n\t{\n\t}", "public void run() {\n final Server server = new Server(8081);\n\n // Setup the basic RestApplication \"context\" at \"/\".\n // This is also known as the handler tree (in Jetty speak).\n final ServletContextHandler context = new ServletContextHandler(\n server, CONTEXT_ROOT);\n final ServletHolder restEasyServlet = new ServletHolder(\n new HttpServletDispatcher());\n restEasyServlet.setInitParameter(\"resteasy.servlet.mapping.prefix\",\n APPLICATION_PATH);\n restEasyServlet.setInitParameter(\"javax.ws.rs.Application\",\n \"de.kad.intech4.djservice.RestApplication\");\n context.addServlet(restEasyServlet, CONTEXT_ROOT);\n\n\n try {\n server.start();\n server.join();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "@Override\n public void initialize() {\n\n try {\n /* Bring up the API server */\n logger.info(\"loading API server\");\n apiServer.start();\n logger.info(\"API server started. Say Hello!\");\n /* Bring up the Dashboard server */\n logger.info(\"Loading Dashboard Server\");\n if (dashboardServer.isStopped()) { // it may have been started when Flux is run in COMBINED mode\n dashboardServer.start();\n }\n logger.info(\"Dashboard server has started. Say Hello!\");\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "@Override\n\tpublic void init() throws Exception {\n //the code present in this method is executed as soon as the application loads that is even before it starts\n\t\tsuper.init(); //super keyword invokes the init methods as per the definition in the Application class\n \n\t}", "private ClientExecutorEngine() {\n ClientConfigReader.readConfig();\n DrillConnector.initConnection();\n HzConfigReader.readConfig();\n }", "public void startup(){}", "public void start() {\n System.out.println(\"OBRMAN started\");\n ApamManagers.addManager(this, 3);\n OBRMan.obr = new OBRManager(null, repoAdmin);\n obr.startWatchingRepository();\n }", "public static void start() {\n assert sListener == null;\n sListener = new ResourceListener();\n ResourceManager.getInstance().addListener(sListener);\n }", "public abstract void startup();", "private static void setupOsgi() {\r\n FrameworkStarter.getInstance().start();\r\n }", "public void startup() {\n\t\tstart();\n }", "@Override\n\tpublic void earlyStartup() {\n\t}", "public static void main(String[] args) {\n RestAdapter restAdapter;\n restAdapter = (RestAdapter) new RestAdapter.Builder().setEndpoint(API_URL)\n .build().create(MyAPI.class);\n\n\n }", "@Override\n protected void startUp() {\n }", "private static void initForProd() {\r\n try {\r\n appTokenManager = new AppTokenManager();\r\n app = new CerberusApp(301L, \"3dd25f8ef8429ffe\",\r\n \"526fbde088cc285a957f8c2b26f4ca404a93a3fb29e0dc9f6189de8f87e63151\");\r\n appTokenManager.addApp(app);\r\n appTokenManager.start();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "@Override\r\n\tpublic void run(ApplicationArguments args) throws Exception {\r\n\t List<Product> productList = DataLoader.createDemoData();\r\n\t stocksService.loadInitialData(productList);\r\n\t}", "public MyDemoApplication(){\n\t\t//System.out.println(\"hi\");\n\t\t/*register(RequestContextFilter.class);\n\t\tregister(RestServiceUsingJersey.class);\n\t\tregister(ServiceYearImpl.class);\n\t\tregister(YearDaoImpl.class);\n\t\tregister(JacksonFeature.class);*/\n\t\t\n\t\t/**\n\t\t * Register JAX-RS application components.\n\t\t */\n\t\t\n\t\t\t\n\t packages(\"com.reporting.webapi\");\n\n\t\t\t// register features\n\t\t\tEncodingFilter.enableFor(this, GZipEncoder.class);\t\t\n\t\t\t\n\t\n\n\t}", "private void startApp(int appID, boolean checkAutomaticStart) {\n\t\tRifidiApp app = this.getApps().get(appID);\n\t\tif (app == null) {\n\t\t\treturn;\n\t\t}\n\t\tProperties properties = new FilePropertyResolver().reolveProperties(app\n\t\t\t\t.getGroup(), app.getName());\n\t\tapp.setAppProperties(properties);\n\n\t\tif (app.getState() == AppState.STOPPED) {\n\t\t\tif (esperService == null) {\n\t\t\t\tqueuedApps.add(appID);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tapp.setEsperService(esperService);\n\t\t\tif (checkAutomaticStart && app.lazyStart()) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tapp.initialize();\n\t\t\t\tapp.start();\n\t\t\t}\n\t\t}\n\t}", "private void appInitialization(){\n openRom();\n openGuide();\n setOffset(0);\n addressChanged();\n }", "public RestApplication() {\n\t\tsingletons.add(new UtilResource());\n\t\tsingletons.add(new StudentResource());\n\t}", "public RunMe() throws IOException {\n\n\t\t// Load data\n\t\tloadDataMap();\n\t\t\n\t\t// Start server\n\t\tcfg = createFreemarkerConfiguration();\n\t\tsetPort(8081);\n\t\tinitializeRoutes();\n\t}", "public void start(){\n CoffeeMakerHelper coffeeMakerHelper = new CoffeeMakerHelper(inputArgs[0]);\n coffeeMakerService = coffeeMakerHelper.parseJsonFile();\n computeCoffeeMaker();\n }", "public void initialize() {\n\n getStartUp();\n }", "private void readApplicationsFromAPIManager(ClientAppFilter filter) throws AppException {\n\t\tif(this.apiManagerResponse !=null && this.apiManagerResponse.get(filter)!=null) return;\n\t\tHttpResponse httpResponse = null;\n\t\ttry {\n\t\t\tString requestedId = \"\";\n\t\t\tif(filter.getApplicationId()!=null) {\n\t\t\t\tif(applicationsCache.containsKey(filter.getApplicationId())) {\n\t\t\t\t\tthis.apiManagerResponse.put(filter, applicationsCache.get(filter.getApplicationId()));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\trequestedId = \"/\"+filter.getApplicationId();\n\t\t\t}\n\t\t\tURI uri = new URIBuilder(cmd.getAPIManagerURL()).setPath(cmd.getApiBasepath() + \"/applications\" + requestedId)\n\t\t\t\t\t.addParameters(filter.getFilters())\n\t\t\t\t\t.build();\n\t\t\tLOG.debug(\"Sending request to find existing applications: \" + uri);\n\t\t\tRestAPICall getRequest = new GETRequest(uri, APIManagerAdapter.hasAdminAccount());\n\t\t\thttpResponse = getRequest.execute();\n\t\t\tString response = EntityUtils.toString(httpResponse.getEntity(), \"UTF-8\");\n\t\t\tif(response.startsWith(\"{\")) { // Got a single response!\n\t\t\t\tresponse = \"[\"+response+\"]\";\n\t\t\t}\n\t\t\tthis.apiManagerResponse.put(filter,response);\n\t\t\tif(filter.getApplicationId()!=null) {\n\t\t\t\tapplicationsCache.put(filter.getApplicationId(), response);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow new AppException(\"Can't initialize API-Manager API-Representation.\", ErrorCode.API_MANAGER_COMMUNICATION, e);\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif(httpResponse!=null) \n\t\t\t\t\t((CloseableHttpResponse)httpResponse).close();\n\t\t\t} catch (Exception ignore) {}\n\t\t}\n\t}", "protected void applicationInitalize() throws OwConfigurationException, OwServerException\r\n {\n OwConfiguration.applicationInitalize(this);\r\n }", "@Test\n public void application_with_document_api() throws IOException {\n String services =\n \"<container version='1.0'>\" +\n \" <http><server port=\\\"\" + findRandomOpenPortOnAllLocalInterfaces() + \"\\\" id=\\\"foobar\\\"/></http>\" +\n \" <document-api/>\" +\n \"</container>\";\n try (Application application = Application.fromServicesXml(services, Networking.enable)) {\n }\n }", "protected void start() {\n }", "public static void main(String[] args) throws Exception {\n\t\tConfigurableApplicationContext c = SpringApplication.run(WebParserRestApplication.class, args); \n\t}", "protected void init() throws Exception {\n\t\t/*\n\t\t * resources section\n\t\t */\n\t\tResourcesManager resourcesManager = ResourcesManager.getInstance();\n\n\t\tif (hibernateResource_ == null) {\n\t\t\t// $-- /application/HibernateResource\n\t\t\t// instantiate and configure 'HibernateResource' resource\n\t\t\tcom.lynxit.fpm.resources.hibernate.HibernateResource hibernateResource = new com.lynxit.fpm.resources.hibernate.HibernateResource(\n\t\t\t\t\t\"HibernateResource\");\n\t\t\thibernateResource.setApplicationDomain(this);\n\t\t\tresourcesManager.addResource(hibernateResource);\n\t\t\t// $-- /application/HibernateResource/\n\t\t\thibernateResource.setUseAnnotation(true);\n\t\t\t// $-- /application/HibernateResource/\n\t\t\thibernateResource.setConfigFilePath(\"hibernate.cfg.xml\");\n\t\t\t// $-- /application/HibernateResource/\n\n\t\t\t// link resources to resources\n\n\t\t\t// add the newly created resource to resources manager\n\t\t\thibernateResource.init();\n\n\t\t\thibernateResource_ = hibernateResource;\n\t\t}\n\n\t\t/*\n\t\t * sub-applications section\n\t\t */\n\n\t\t/*\n\t\t * events section\n\t\t */\n\t\t// $-- /application/StandardEventProducer\n\t\t// instantiate and configure 'StandardEventProducer' event producer\n\t\tcom.lynxspa.fpm.events.StandardEventProducer standardEventProducerEventProducer = Interceptors\n\t\t\t\t.createEventProducer(\n\t\t\t\t\t\tcom.lynxspa.fpm.events.StandardEventProducer.class,\n\t\t\t\t\t\t\"StandardEventProducer\");\n\n\t\t// add the newly created resource to domain\n\t\tthis.addEventProducer(standardEventProducerEventProducer);\n\n\t\t// $-- /application/StandardEventProducer/\n\t\tstandardEventProducerEventProducer.setAllowMultiThreading(false);\n\t\t// $-- /application/StandardEventProducer/\n\t\t// $-- /application/StandardEventProducer/\n\t\tstandardEventProducerEventProducer\n\t\t\t\t.setCronExpression(getMasterRecordCron());\n\n\t\t// link event producer to resources\n\n\t\tstandardEventProducerEventProducer.init();\n\n\t\t/*\n\t\t * business processes section\n\t\t */\n\n\t\t// $-- /application/BusinessProcess\n\t\t// instantiate and configure 'BusinessProcess' business process\n\t\tcom.lynxspa.coac.masterrecord.businessprocess.MasterRecordProcess businessProcessBusinessProcess = Interceptors\n\t\t\t\t.createBusinessProcess(\n\t\t\t\t\t\tcom.lynxspa.coac.masterrecord.businessprocess.MasterRecordProcess.class,\n\t\t\t\t\t\t\"BusinessProcess\", 1);\n\n\t\t// add business process to the processes\n\t\tthis.addBusinessProcess(businessProcessBusinessProcess);\n\n\t\t// $-- /application/BusinessProcess/\n\t\tbusinessProcessBusinessProcess.setLocale(getLocale());\n\t\t// $-- /application/BusinessProcess/\n\t\tbusinessProcessBusinessProcess\n\t\t\t\t.setSelectSize(getMasterRecordSelectSize());\n\t\t// $-- /application/BusinessProcess/\n\t\t// $-- /application/BusinessProcess/\n\t\tbusinessProcessBusinessProcess.setUser(\"MASTERRECORDSELECTOR\");\n\t\t// $-- /application/BusinessProcess/\n\t\tbusinessProcessBusinessProcess\n\t\t\t\t.setEntityDeadLineDays(getEntityDeadLineDays());\n\n\t\t// link process to resources\n\t\t// $-- /application/HibernateResource/resource/application/BusinessProcess/statefullSession\n\t\tbusinessProcessBusinessProcess.setStatefullSession(hibernateResource_);\n\n\t\tbusinessProcessBusinessProcess.initialize();\n\n\t\t// $-- /application/ErrorHandler\n\t\t// instantiate and configure 'ErrorHandler' business process\n\t\tcom.lynxspa.coac.businessprocess.ExceptionHandlerProcess errorHandlerBusinessProcess = Interceptors\n\t\t\t\t.createBusinessProcess(\n\t\t\t\t\t\tcom.lynxspa.coac.businessprocess.ExceptionHandlerProcess.class,\n\t\t\t\t\t\t\"ErrorHandler\", 1);\n\n\t\t// add business process to the processes\n\t\tthis.addBusinessProcess(errorHandlerBusinessProcess);\n\n\t\t// $-- /application/ErrorHandler/\n\t\terrorHandlerBusinessProcess.setLocale(getLocale());\n\t\t// $-- /application/ErrorHandler/\n\t\t// $-- /application/ErrorHandler/\n\t\terrorHandlerBusinessProcess.setUser(\"MASTERRECORDERRORHANDLER\");\n\n\t\t// link process to resources\n\t\t// $-- /application/HibernateResource/resource/application/ErrorHandler/sessionFactory\n\t\terrorHandlerBusinessProcess.setSessionFactory(hibernateResource_);\n\n\t\terrorHandlerBusinessProcess.initialize();\n\n\t\t/*\n\t\t * Link event producers to processes, sub-applications or outputs\n\t\t */\n\t\t// $-- /application/StandardEventProducer/events/application/BusinessProcess/input\n\t\tBusinessProcess.connect(standardEventProducerEventProducer,\n\t\t\t\tbusinessProcessBusinessProcess.asInputInput());\n\n\t\t/*\n\t\t * Link inputs to processes, sub-applications or outputs\n\t\t */\n\n\t\t/*\n\t\t * Link processes to other processes, sub-applications or outputs\n\t\t */\n\t\t// $-- /application/BusinessProcess/exc/application/ErrorHandler/input\n\t\tBusinessProcess.connect(\n\t\t\t\tbusinessProcessBusinessProcess.asExcEventProducer(),\n\t\t\t\terrorHandlerBusinessProcess.asInputInput());\n\n\t\t/*\n\t\t * Link sub applications to other processes, sub-applications or outputs\n\t\t */\n\t}", "public void start() {\n\t\tstartFilesConfig(true);\n\t\tstartSpamFilterTest(false);\n\t}", "@Override\n\tpublic void initApp() throws IOException {\n\t\tdepositAccountInitService.initConfigData();\n\t}", "private void start() {\n\n\t}", "public void init() {\n\n\t\tString rootdir = null;\n\t\ttry {\n\t\t\trootdir = ServletActionContext.getServletContext().getRealPath(\"/\");\n\t\t} catch (Exception ex) {\n\n\t\t}\n\n\t\tif (rootdir == null) {\n\t\t\trootdir = \"/Users/huangic/Documents/jetty-6.1.22/webapps/TransWeb\";\n\t\t}\n\n\t\tlogger.debug(rootdir);\n\t\tString classesdir = rootdir + \"/WEB-INF/classes/\";\n\t\tthis.xmlBatchRule = ReadXML(classesdir\n\t\t\t\t+ \"applicationContext-BatchRule.xml\");\n\t\tthis.xmlDB = ReadXML(classesdir + \"applicationContext-DB.xml\");\n\t\tthis.xmlSystem = ReadXML(classesdir + \"applicationContext-system.xml\");\n\n\t}", "public static void main(String[] args){\n Api api = Factory.createApi(1);\n api.operation(\"using factory now\");\n\n System.out.println(\"--------------using configuration file to get api--------------\");\n Api api2 = Factory.configToCreateApi();\n api2.operation(\"just a test!\");\n }", "@Override\n public void run(final ApiConfiguration configuration, final Environment environment) throws ClassNotFoundException {\n configureServices(environment);\n }", "@PostConstruct\n public void init() {\n rest.put(\"http://authenticationServer:8080/bot\", info);\n AuthServerChecker checker = new AuthServerChecker(name);\n checker.start();\n }", "@Override\n public void firstApplicationStartup()\n {\n System.out.println(\"firstApplicationStartup\");\n \n }", "public static void main(final String[] args) {\n final ConfigurableApplicationContext context = SpringApplication.run(MasterDataApi.class, args);\n\n final DataLoaderConfiguration dataLoaderConfiguration = context.getBean(DataLoaderConfiguration.class);\n if (dataLoaderConfiguration.isRunAtStartup() && dataLoaderConfiguration.isShutdownAfterLoad()) {\n log.info(\"Data load complete, shutting down\");\n System.exit(SpringApplication.exit(context));\n }\n }", "public static void main(final String[] args) throws Exception {\n Resource.setDefaultUseCaches(false);\n Integer SERVER_PORT = Integer.parseInt(ManejadorPropiedades.leerPropiedad(\"app_cfg.properties\", \"app.port\"));\n String SERVER_HOST = ManejadorPropiedades.leerPropiedad(\"app_cfg.properties\", \"app.host\");\n String CONTEXT_PATH = ManejadorPropiedades.leerPropiedad(\"app_cfg.properties\", \"app.context_path\");\n \n final Server server = new Server(SERVER_PORT);\n System.setProperty(AppConfig.SERVER_PORT, SERVER_PORT.toString());\n System.setProperty(AppConfig.SERVER_HOST, SERVER_HOST);\n System.setProperty(AppConfig.CONTEXT_PATH, CONTEXT_PATH);\n \n\n // Configuring Apache CXF servlet and Spring listener \n final ServletHolder servletHolder = new ServletHolder(new CXFServlet());\n final ServletContextHandler context = new ServletContextHandler();\n context.setContextPath(\"/\");\n context.addServlet(servletHolder, \"/\" + CONTEXT_PATH + \"/*\");\n context.addEventListener(new ContextLoaderListener());\n context.setInitParameter(\"contextClass\", AnnotationConfigWebApplicationContext.class.getName());\n context.setInitParameter(\"contextConfigLocation\", AppConfig.class.getName());\n \n FilterHolder filterHolder = context.addFilter(CrossOriginFilter.class,\"/*\",EnumSet.allOf(DispatcherType.class));\n filterHolder.setInitParameter(CrossOriginFilter.ALLOWED_ORIGINS_PARAM,\"*\");\n filterHolder.setInitParameter(CrossOriginFilter.ALLOWED_HEADERS_PARAM,\"Content-Type,Authorization,X-Requested-With,Content-Length,Accept,Origin\");\n filterHolder.setInitParameter(CrossOriginFilter.ALLOWED_METHODS_PARAM,\"GET,PUT,POST,DELETE,OPTIONS\");\n filterHolder.setInitParameter(CrossOriginFilter.PREFLIGHT_MAX_AGE_PARAM,\"5184000\");\n filterHolder.setInitParameter(CrossOriginFilter.ALLOW_CREDENTIALS_PARAM,\"true\");\n\n\n // Configuring Swagger as static web resource\n final ServletHolder swaggerHolder = new ServletHolder(new DefaultServlet());\n final ServletContextHandler swagger = new ServletContextHandler();\n swagger.setContextPath(\"/swagger\");\n swagger.addServlet(swaggerHolder, \"/*\");\n swagger.setResourceBase(new ClassPathResource(\"/webapp\").getURI().toString());\n\n final HandlerList handlers = new HandlerList();\n handlers.addHandler(swagger);\n handlers.addHandler(context);\n\n server.setHandler(handlers);\n server.start();\n server.join();\n }", "public void init()\n {\n _appContext = SubAppContext.createOMM(System.out);\n _serviceName = CommandLine.variable(\"serviceName\");\n initGUI();\n }", "public static void init() {\n client = new OkHttpClient();\n\n //Construct a HTTP builder\n retrofit = new Retrofit.Builder()\n .client(client)\n .baseUrl(apiAddress)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n //Form an API to receive a token\n kedronService = retrofit.create(IKedronService.class);\n }", "private void runBaseInit(HttpServletRequest request, HttpServletResponse response) throws Exception {\n SimApi.initBaseSim();\n }", "@PostConstruct\n public void init() {\n ApiClient client = Config.fromToken(url, token, validateSSL);\n io.kubernetes.client.Configuration.setDefaultApiClient(client);\n }", "public static void main(String[] args) {\n\n SpringApplication.run(CoronavirusAPIApplication.class, args);\n }", "public void init() {\n // TODO start asynchronous download of heavy resources\n }", "public void init() {\r\n\t\tGetRunningProgramsGR request = new GetRunningProgramsGR(\r\n\t\t\t\tRunningServicesListViewAdapter.this.runningServicesActivity.getApplicationContext());\r\n\t\trequest.setServerName(RunningServicesListViewAdapter.this.serverName);\r\n\t\tnew GuiRequestHandler(RunningServicesListViewAdapter.this.runningServicesActivity,\r\n\t\t\t\tRunningServicesListViewAdapter.this, true).execute(request);\r\n\t}", "@Override\n public void run() {\n startup();\n }", "@Override\n public void onRestart() {\n super.onRestart();\n app.connectToPacemakerAPI(this);\n }", "public void initEasyJWeb() {\r\n\t\tlogger.info(I18n.getLocaleMessage(\"core.execute.EasyJWeb.initialization.applications\"));\r\n\t\tif (resourceLoader == null) {\r\n\t\t\tif (servletContext != null)\r\n\t\t\t\tresourceLoader = new ServletContextResourceLoader(\r\n\t\t\t\t\t\tservletContext);\r\n\t\t\telse\r\n\t\t\t\tresourceLoader = new FileResourceLoader();\r\n\t\t}\r\n\t\tinitContainer();\r\n\t\tFrameworkEngine.setWebConfig(webConfig);// 初始化框架工具\r\n\t\tFrameworkEngine.setContainer(container);// 在引擎中安装容器\r\n\t\tAjaxUtil.setServiceContainer(new AjaxServiceContainer(container));// 初始化Ajax容器服务\r\n\t\tinitTemplate(); // 初始化模版\r\n\t\tinvokeApps();// 在应用启动的时候启动一些配置好的应用\r\n\t\thaveInitEasyJWeb = true;\r\n\t\tlogger.info(I18n.getLocaleMessage(\"core.EasyJWeb.initialized\"));\r\n\t}", "@Override\n\t\t\tpublic void start() {\n\t\t\t\tinitResource();\n\t\t\t\t//获取通讯录信息\n\t\t\t\tinitContactsData();\n\t\t\t\t//同步通讯录\n\t\t\t\tupLoadPhones();\n\t\t\t}", "public void start()\n {\n uploadDataFromFile();\n menu.home();\n home();\n }", "private ClientBootstrap() {\r\n init();\r\n }", "public PSFUDApplication()\n {\n loadSnapshot();\n }", "protected StreamsApp() {\n this.streamsConfig = new KafkaStreamsConfig().fromConfig(config);\n this.rocksDbReporter = new RocksDbMetricsReporter(this);\n }", "public static void main(String[] args) { \n\t\t//we are calling a static method and passing it the name of the class where we have our Main method.\t\t\n\t\tSpringApplication.run(CourseApiApp.class, args);\n\t}", "static synchronized String[] startup(String[] cmdArgs, URL r10plugins, String r10app, String metaPath) throws Exception {\n \n \t\t// if BootLoader was invoked directly (rather than via Main), it is possible\n \t\t// to have the plugin-path and application set in 2 ways: (1) via an explicit\n \t\t// argument on the invocation method, or (2) via a command line argument (passed\n \t\t// into this method as the argument String[]). If specified, the explicit\n \t\t// values are used even if the command line arguments were specified as well.\n \t\tcmdPlugins = r10plugins; // R1.0 compatibility\n \t\tcmdApplication = r10app; // R1.0 compatibility\n \n \t\t// process command line arguments\n \t\tString[] passthruArgs = processCommandLine(cmdArgs);\n \t\tif (cmdDev)\n \t\t\tcmdNoUpdate = true; // force -noupdate when in dev mode (eg. PDE)\n \n \t\t// create current configuration\n \t\tif (currentPlatformConfiguration == null)\n \t\t\tcurrentPlatformConfiguration = new PlatformConfiguration(cmdConfiguration, metaPath, cmdPlugins);\n \n \t\t// check if we will be forcing reconciliation\n \t\tpassthruArgs = checkForFeatureChanges(passthruArgs, currentPlatformConfiguration);\n \n \t\t// check if we should indicate new changes\n \t\tpassthruArgs = checkForNewUpdates(currentPlatformConfiguration, passthruArgs);\n \n \t\treturn passthruArgs;\n \t}", "@Override\n protected void onStart() {\n super.onStart();\n ReadTask task = new ReadTask();\n //task.execute(\"http://10.0.2.2:61902/api/GetTicket/GetComments/?ticketId=\" + ticket.getTicketId());\n task.execute(\"http://ticketapp.shiftbook.dk/api/GetTicket/GetComments/?ticketId=\" + flightTickets.getTicketId());\n }", "public void PreAppConfig(Double InputVersion) \n { \n File_Manager Config = new File_Manager(); \n Version = Config.GetVersion(); \n System.out.println(\"Version = \" + Version);\n if (Version != InputVersion)\n {\n System.out.println(\"ERROR: Version Mismatch!\"); \n }\n ServerCount = Config.GetServerCount();\n \n System.out.println(\"Server Count = \" + ServerCount); \n ServerPaths= Config.GetServerPaths(ServerCount);\n \n for (int i = 0; i <= ServerCount - 1 ; i++){ \n System.out.println(\"ServerPath for \" + i + \" = \" + ServerPaths[i]); \n } \n \n if (!Files.isDirectory(Paths.get(\"ServerFiles\"))) \n {\n Config.createFolder(\"ServerFiles\");\n \n } else System.out.println(\"Server Directory Found!\"); \n System.out.println(\"App Initialised: Running.. \\n ________________________________ \\n\" );\n }", "public void autonomousInit() {\n \n }", "private AppConfigLoader() {\r\n\r\n\t\tProperties appConfigPropertySet = new Properties();\r\n\t\tProperties envConfigPropertySet = new Properties();\r\n\r\n\t\ttry {\r\n\r\n\t\t\t// read properties file\r\n\t\t\tInputStream appConfigPropertyStream = AppConfigLoader.class\r\n\t\t\t\t\t.getResourceAsStream(\"/config/baseAppConfig.properties\");\r\n\t\t\tappConfigPropertySet.load(appConfigPropertyStream);\r\n\r\n\t\t\tInputStream envConfigPropertyStream = null;\r\n\r\n\t\t\t// check if current environment is defined (QA, Integration or Staging)\r\n\t\t\tif (System.getProperty(\"environment\") != null) {\r\n\t\t\t\tenvConfigPropertyStream = AppConfigLoader.class\r\n\t\t\t\t\t\t.getResourceAsStream(\"/config/\" + System.getProperty(\"environment\") + \"/appConfig.properties\");\r\n\t\t\t\tSystem.out.println(\"********'ENVIRONMENT Details taken from Runtime'********\");\r\n\t\t\t\tSystem.out.println(\"********'\" + System.getProperty(\"environment\") + \" ENVIRONMENT'********\");\r\n\t\t\t\tenvironment = System.getProperty(\"environment\");\r\n\t\t\t} else {\r\n\t\t\t\tenvConfigPropertyStream = AppConfigLoader.class.getResourceAsStream(\r\n\t\t\t\t\t\t\"/config/\" + appConfigPropertySet.getProperty(\"CurrentEnvironment\") + \"/appConfig.properties\");\r\n\t\t\t\tSystem.out.println(\"********'ENVIRONMENT Details taken from Baseapp config property file'********\");\r\n\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\"********'\" + appConfigPropertySet.getProperty(\"CurrentEnvironment\") + \" ENVIRONMENT'********\");\r\n\t\t\t\tenvironment = appConfigPropertySet.getProperty(\"CurrentEnvironment\");\r\n\t\t\t}\r\n\r\n\t\t\tenvConfigPropertySet.load(envConfigPropertyStream);\r\n\r\n\t\t\tthis.sampleURL = envConfigPropertySet.getProperty(\"SampleUrl\");\r\n\t\t\tthis.sampleAPIURL = envConfigPropertySet.getProperty(\"SampleAPIUrl\");\r\n\r\n\t\t\tthis.sampleDbConnectionString = envConfigPropertySet.getProperty(\"SampleConnectionString\");\r\n\r\n\t\t\tenvConfigPropertyStream.close();\r\n\t\t\tappConfigPropertyStream.close();\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n\r\n try {\r\n BasicConfigurator.configure();\r\n\r\n stopAutoRefreshMenuItem.setDisable(true);\r\n\r\n GetPrefs();\r\n createSensorObj(pref, 1);\r\n createSensorObj(pref, 2);\r\n createSensorObj(pref, 3);\r\n RefreshNum.setVisible(false);\r\n RefreshNumLabel.setVisible(false);\r\n log.info(\"Application startup\");\r\n log.debug(\"Hello this is an debug message\");\r\n log.error(\"Hello this is an error message\");\r\n\r\n } catch (ThingSpeakException | UnirestException | FileNotFoundException ex) {\r\n log.log(Priority.ERROR, ex);\r\n }\r\n\r\n }", "public void run(){\n\t\tinputStreamReader = new InputStreamReader(System.in);\r\n\t\tin = new BufferedReader( inputStreamReader );\r\n\t\t\r\n\t\tSystem.out.println(\"\\n\" + Application.APPLICATION_VENDOR + \" \" + Application.APPLICATION_NAME + \" \" + Application.VERSION_MAJOR + \".\" + Application.VERSION_MINOR + \".\" + Application.VERSION_REVISION + \" (http://ThreatFactor.com)\");\r\n\t\t//System.out.println(\"We are here to help, just go to http://ThreatFactor.com/\");\r\n\t\t\r\n\t\tif( application.getNetworkManager().sslEnabled() )\r\n\t\t{\r\n\t\t\tif( application.getNetworkManager().getServerPort() != 443 )\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Web server running on: https://127.0.0.1:\" + application.getNetworkManager().getServerPort());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"Web server running on: https://127.0.0.1\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif( application.getNetworkManager().getServerPort() != 80 )\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Web server running on: http://127.0.0.1:\" + application.getNetworkManager().getServerPort());\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"Web server running on: http://127.0.0.1\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Interactive console, type help for list of commands\");\r\n\t\t\r\n\t\tcontinueExecuting = true;\r\n\t\twhile( continueExecuting ){\r\n\r\n\t\t\tSystem.out.print(\"> \");\r\n\r\n\t\t\ttry{\r\n\t\t\t\t\r\n\t\t\t\tString text = in.readLine();\r\n\t\t\t\t\r\n\t\t\t\tif( continueExecuting && text != null ){\r\n\t\t\t\t\tcontinueExecuting = runCommand( text.trim() );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(AsynchronousCloseException e){\r\n\t\t\t\t//Do nothing, this was likely thrown because the read-line command was interrupted during the shutdown operation\r\n\t\t\t\tcontinueExecuting = false;\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\t//Catch the exception and move on, the console listener must not be allowed to exit\r\n\t\t\t\tSystem.err.println(\"Operation Failed: \" + e.getMessage());\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\t\r\n\t\t\t\t//Stop listening. Otherwise, an exception loop may occur. \r\n\t\t\t\tcontinueExecuting = false;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void startInternally() {\n log.debug(\"Start internally called.\");\n\n try {\n LumenFacade lumenFacade = new LumenFacadeImpl(LumenConnection\n .getInstance());\n spine = new JmsSpine(JmsClient.REMOTE, SpineConstants.LUMEN_MEDIATOR);\n lumenClient = new LumenClient(lumenFacade, spine);\n lumenClient.start();\n }\n catch (SpineException e) {\n log.error(\"Problem starting the Lumen process: {}\", e.getMessage());\n e.printStackTrace();\n }\n }", "public KafkaBacksideEnvironment() {\n\t\tConfigPullParser p = new ConfigPullParser(\"kafka-props.xml\");\n\t\tproperties = p.getProperties();\n\t\tconnectors = new HashMap<String, IPluginConnector>();\n\t\t//chatApp = new SimpleChatApp(this);\n\t\t//mainChatApp = new ChatApp(this);\n\t\t//elizaApp = new ElizaApp(this);\n\t\tbootPlugins();\n\t\t//TODO other stuff?\n\t\tSystem.out.println(\"Booted\");\n\t\t//Register a shutdown hook so ^c will properly close things\n\t\tRuntime.getRuntime().addShutdownHook(new Thread() {\n\t\t public void run() { shutDown(); }\n\t\t});\n\t}", "public void start() {\n \t\tinit();\n\t\tif(!checkBackend()){\n\t\t\tvertx.createHttpServer().requestHandler(new Handler<HttpServerRequest>() {\n\t\t\t\tpublic void handle(HttpServerRequest req) {\n\t\t\t\t String query_type = req.path();\t\t\n\t\t\t\t req.response().headers().set(\"Content-Type\", \"text/plain\");\n\t\t\t\t\n\t\t\t\t if(query_type.equals(\"/target\")){\n\t\t\t\t\t String key = req.params().get(\"targetID\");\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tprocessRequest(key,req);\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}\n\t\t\t\t\t}\n\t\t\t\t else {\n\t\t\t\t\t String key = \"1\";\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tprocessRequestRange(key,req);\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}\n\t\t\t\t\t}\n\t\t\t } \n\t\t\t}).listen(80);\n\t\t} else {\n\t\t\tSystem.out.println(\"Please make sure that both your DCI are up and running\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public static void main(String[] args) {\n startApplication();\n }", "public void start() {\n\n\t}", "public void start()\n {\n }", "private void init(){\n if(!initializing) {\n Initializer init = new Initializer();\n InitializationDetails initializationDetails = new InitializationDetails(url, download, reset, deviceID, this);\n init.execute(initializationDetails);\n initializing = true;\n }\n }", "private void loadApplication() throws Exception{\n\t\t\n\t\tBufferedReader br = new BufferedReader(new FileReader(this.appfile));\n\t\tString line;\n\t\t\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tif (line.equals(\"Date\")){\n\t\t\t\tline = br.readLine();\n\t\t\t\tsetDate(line);\n\t\t\t}\n\t\t\telse if (line.equals(\"GPA\")){\n\t\t\t\tline = br.readLine();\n\t\t\t\tdouble newGPA = Double.parseDouble(line);\n\t\t\t\tsetGPA(newGPA);\n\t\t\t}\n\t\t\telse if (line.equals(\"Education Level\")){\n\t\t\t\tline = br.readLine();\n\t\t\t\tsetEducationLevel(line);\n\t\t\t}\n\t\t\telse if (line.equals(\"Status\")){\n\t\t\t\tline = br.readLine();\n\t\t\t\tsetStatus(line);\n\t\t\t}\n\t\t\telse if (line.equals(\"Priority\")){\n\t\t\t\tline = br.readLine();\n\t\t\t\tint newPriority = Integer.parseInt(line);\n\t\t\t\tsetPriority(newPriority);\n\t\t\t}\n\t\t}\n\t\tbr.close();\t\n\t}", "public AnalogArchiveApp() {\n jsonWriter = new JsonWriter(\"./data/saveFile.json\");\n jsonReader = new JsonReader(\"./data/saveFile.json\");\n init();\n }", "@Override\n public void run(Configuration configuration, Environment environment) throws Exception {\n environment.jersey().register(new AdminRESTAPI());\n environment.jersey().register(new ProfessorRESTAPI());\n environment.jersey().register(new StudentRESTAPI());\n }", "private void initReader(boolean logging) {\n\t\tthis.reader = new RoutingReader(this.myName, this.remoteName, this.dis,\n\t\t\t\tthis.manager, new MessageReader(this.connName, this, logging));\n\t\tnew Thread(this.reader, \"BTReaderThread\").start();\n\t}", "public static void main(String[] args) {\n\n URL.setURLStreamHandlerFactory(new OurURLStreamHandlerFactory());\n\n new SpringApplicationBuilder(FileDownloaderLauncher.class)\n .web(WebApplicationType.NONE)\n .run(args);\n }", "@Test\n\tpublic void testMain() {\n\t\tProjectManagerRestfulApiApp.main(new String[] {\n\t\t\t\t\"spring.profiles.active=test\"\n\t\t});\n\t}", "public void run() {\n\n ConfigFileURLResolver resolver = new ConfigFileURLResolver(); \n \n try {\n this._domainFile = resolver.getFileURL(this._domainFilename);\n } catch (SessionException sesEx) {\n this._logger.error(ERROR_TAG + \"Error occurred while loading login file: \"+sesEx.getMessage());\n ++this._errorCount;\n return;\n }\n \n //--------------------------\n \n //try to create login file instance\n try {\n _loginReader = new LoginFile();\n } catch (IOException ioEx) {\n this._logger.error(ERROR_TAG + \"Error occurred while loading login file\");\n ++this._errorCount;\n return;\n }\n \n //--------------------------\n \n //try to create encrypter instance\n try {\n _encrypter = new PublicKeyEncrypter();\n } catch (IOException ioEx) {\n this._logger.error(ERROR_TAG + \"Error occurred while loading encrypter\");\n //ioEx.printStackTrace();\n this._logger.trace(null, ioEx);\n ++this._errorCount;\n return;\n }\n \n //--------------------------\n \n //create reconnect throttle \n \n _throttle = new ReconnectThrottle();\n \n //--------------------------\n \n //install shutdown handler to hook\n //Runtime.getRuntime().addShutdownHook(new ShutDownHandler());\n \n //check action id\n if (this._actionId.equals(Constants.NOOPERATION)) {\n this._logger.error(ERROR_TAG + \"Unrecognized user operation: \"\n + this._userOperation);\n ++this._errorCount;\n return;\n }\n\n boolean parseError = false;\n\n try {\n //construct parser and parser\n this._parser.parse(this._actionId, this._args);\n } catch (ParseException pEx) {\n parseError = true;\n\n //if no arguments were provided and exception is missing args,\n //then just send message to debug and rely on help message\n if (this._args.length == 0 && \n pEx.getErrorOffset() == UtilCmdParser.CODE_MISSING_ARGUMENTS)\n this._logger.debug(ERROR_TAG + pEx.getMessage());\n else\n this._logger.error(ERROR_TAG + pEx.getMessage());\n this._logger.debug(null, pEx);\n } catch (Exception ex) {\n parseError = true;\n this._logger.error(ERROR_TAG + ex.getMessage());\n this._logger.debug(null, ex);\n }\n\n if (parseError) {\n //attempt to logout\n try {\n this._logout();\n } catch (Exception le) {\n this._logger.debug(null, le);\n }\n ++this._errorCount;\n }\n\n //-------------------------\n\n boolean help = parseError || \n (this._parser == null) || this._parser.printHelp();\n\n //if help is true, print usage and return\n if (help) {\n this._logger.info(this._getUsage());\n return;\n }\n\n \n //-------------------------\n\n// FileEventHandlerManager fehManager = new FileEventHandlerManager(\n// this._argTable, this._actionId); \n// this._fileEventHandlerSet = fehManager.getFileEventHandlers();\n \n //-------------------------\n\n this._using = (this._parser.getOptionsFilename() != null);\n\n try {\n //iterate over number of argument sets, processing each\n\n Hashtable argTable;\n this._parser.reset();\n int iterations = this._parser.iterations();\n for (int i = 0; i < iterations; ++i) {\n argTable = (Hashtable) this._parser.getCurrentArguments();\n \n try {\n _process(argTable);\n } catch (SessionException sesEx) {\n this._logger.error(ERROR_TAG + sesEx.getMessage());\n this._logger.debug(null, sesEx);\n try {\n this._logout();\n } catch (Exception le) {\n this._logger.debug(null, le);\n }\n ++this._errorCount;\n //return;\n }\n this._parser.advance();\n }\n\n //-------------------------\n\n //logout successfully\n this._logout();\n\n //-------------------------\n\n } catch (Exception ex) {\n this._logger.error(ERROR_TAG + ex.getMessage());\n this._logger.debug(null, ex);\n try {\n this._logout();\n } catch (Exception le) {\n this._logger.debug(null, le);\n }\n ++this._errorCount;\n return;\n }\n\n }", "public static void setApplicationInitialized() {\n applicationInitialized = true;\n }", "public void startOnNewTread() {\n stop();\n\n mReadLogsHandler = new ReadLogsHandler();\n\n mReadLogThread = new ReadLogsThread();\n mReadLogThread.start();\n }", "public void start()\n/* 354: */ {\n/* 355:434 */ onStartup();\n/* 356: */ }", "public MainEntryPoint() {\r\n\r\n }", "void startup();", "void startup();", "@Override\n public void preProcess(ApiConfigurator c) {\n if(null != rsc && rsc.isEnabled()) {\n c.enableOAuth();\n \n //TODO : scopes\n }\n \n ApiConfig conf = c.config();\n OAuthConfig oauthConfig = conf.getOAuthConfig();\n if(oauthConfig == null ||\n (Strings.isEmpty(oauthConfig.getAuthzEndpointUrl()) && Strings.isEmpty(oauthConfig.getTokenEndpointUrl()))) {\n \n //auto set endpoint url if oauth2 client app is enabled locally.\n if(null != owc && owc.isEnabled()) {\n String authzUrl = owc.getServerAuthorizationEndpointUrl();\n String tokenUrl = owc.getServerTokenEndpointUrl();\n if(oauthConfig == null){\n oauthConfig = new OAuthConfig(false, authzUrl,tokenUrl);\n c.setOAuthConfig(oauthConfig);\n return;\n }\n oauthConfig.setAuthzEndpointUrl(authzUrl);\n oauthConfig.setTokenEndpointUrl(tokenUrl);\n return;\n }\n\n //auto set endpoint url if authz server is enabled locally.\n if(null != asc && asc.isEnabled()) {\n //we cannot know the host name and port of local server.\n String contextPath = app.getContextPath();\n String authzUrl = contextPath + asc.getAuthzEndpointPath();\n String tokenUrl = contextPath + asc.getTokenEndpointPath();\n if(oauthConfig == null){\n oauthConfig = new OAuthConfig(false,authzUrl,tokenUrl);\n c.setOAuthConfig(oauthConfig);\n return;\n }\n oauthConfig.setAuthzEndpointUrl(authzUrl);\n oauthConfig.setTokenEndpointUrl(tokenUrl);\n }\n }\n }", "public static void main(String[] args){\n // app.run(args);\r\n new SpringApplicationBuilder(MainApplication.class).web(true).run(args);\r\n }", "private void init() {\n String METHOD = Thread.currentThread().getStackTrace()[1].getMethodName();\n String msg = null;\n String type = ConstantsIF.RESOURCE;\n ConfigurationIF config = null;\n JSONObject json = null;\n Map<String, String> map = null;\n\n _logger.entering(CLASS, METHOD);\n\n /*\n * Get JSON data from the Config object via the Config Manager\n */\n config = _configMgr.getConfiguration(type);\n\n if (config != null) {\n json = config.getJSON();\n if (json == null) {\n msg = CLASS + \": \" + METHOD + \": JSON data for '\" + type + \"' is null\";\n this.setError(true);\n }\n } else {\n msg = CLASS + \": \" + METHOD + \": Configuration for '\" + type + \"' is null\";\n this.setError(true);\n }\n\n /*\n * setup the Mongo Data Access Object\n */\n if (_MongoDAO == null) {\n map = JSON.convertToParams(JSON.getObject(json, ConfigIF.RS_NOSQL));\n\n try {\n _MongoDAO = MongoFactory.getInstance(map);\n } catch (Exception ex) {\n msg = CLASS + \": \" + METHOD + \": Mongo DAO:\" + ex.getMessage();\n this.setError(true);\n }\n }\n\n if (!this.isError()) {\n this.setState(STATE.READY);\n } else {\n this.setState(STATE.ERROR);\n this.setStatus(msg);\n _logger.log(Level.SEVERE, msg);\n }\n\n _logger.exiting(CLASS, METHOD);\n\n return;\n }", "private void tryInitialize() throws IOException, ParseException, org.apache.commons.cli.ParseException {\n log.log(Level.FINE, MessageNames.STARTER_SERVICE_DEPLOYER_STARTING, myName);\n\n /*\n Establish the deployment directory.\n */\n deploymentDirectoryFile = fileUtility.getProfileDirectory().resolveFile(deployDirectory);\n if (deploymentDirectoryFile == null\n || deploymentDirectoryFile.getType() != FileType.FOLDER) {\n log.log(Level.WARNING, MessageNames.NO_DEPLOYMENT_DIRECTORY,\n new Object[]{deployDirectory, fileUtility.getProfileDirectory()});\n }\n /*\n * Find the name of the client we need to deploy. \n */\n /* First argument was the profile name. Second argument is the name of \n * the client app to run. All the rest are parameters to the client\n * app.\n */\n if (clientAppName == null && commandLineArguments.length < 2) {\n System.out.println(messages.getString(MessageNames.CLIENT_APP_USAGE));\n System.exit(1);\n }\n String[] clientAppArgs = new String[0];\n String additionalApps = Strings.EMPTY;\n if (clientAppName == null) {\n String[] argsWithoutProfile = new String[commandLineArguments.length - 1];\n System.arraycopy(commandLineArguments, 1, argsWithoutProfile, 0,\n argsWithoutProfile.length);\n CommandLine cl = CommandLineParsers.parseCommandLineAppRunnerLine(argsWithoutProfile);\n // At this point, any remaining args after -with are in getArgs()\n // The first of those is the app name.\n clientAppName = cl.getArgs()[0];\n clientAppArgs = new String[cl.getArgs().length - 1];\n System.arraycopy(cl.getArgs(), 1, clientAppArgs, 0, clientAppArgs.length);\n if (cl.hasOption(CommandLineParsers.WITH)) {\n additionalApps = cl.getOptionValue(CommandLineParsers.WITH);\n }\n } else {\n clientAppArgs = new String[commandLineArguments.length - 1];\n System.arraycopy(commandLineArguments, 1, clientAppArgs, 0,\n clientAppArgs.length);\n }\n if (!Strings.EMPTY.equals(additionalApps)) {\n startAdditionalApps(additionalApps);\n }\n\n /*\n See if the clientAppName happens to be a 'jar' name and refers to a \n jar file. If so, that's the service archive.\n */\n FileObject serviceArchive = null;\n if (isAppArchive(clientAppName)) {\n serviceArchive = fileUtility.resolveFile(clientAppName);\n } else {\n serviceArchive = findServiceArchiveForName(clientAppName);\n }\n\n if (serviceArchive == null) {\n System.err.println(MessageFormat.format(messages.getString(MessageNames.NO_SUCH_CLIENT_APP), clientAppName));\n System.exit(1);\n }\n // Deploy the service\n deployServiceArchive(serviceArchive, clientAppArgs);\n // Run the main method with the remaining command line parameters.\n }", "public DocumentReader ()\n {\n this.instanceStatus = new ServiceInstanceStatus(serviceStatus);\n this.instanceStatus.notifyCreation();\n }", "public void setup() {\r\n\t\ttry {\r\n\t\t\trecentFiles = new RecentFilesHandler();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tsetupRecentFiles();\r\n\t}", "public static void init() {\n startTime = System.currentTimeMillis();\n if (clientExecutorEngine == null) {\n clientExecutorEngine = new ClientExecutorEngine();\n HzClient.initClient();\n }\n }", "private void initService() {\r\n\t}", "@Override\n public void start() throws LifecycleException {\n logger.info(\"Start http server ... \");\n\n\n try {\n // create a resource config that scans for JAX-RS resources and providers\n final ResourceConfig rc = new ResourceConfig()\n .packages(PACKAGES_SCAN) // packages path for resources loading\n .property(MvcFeature.TEMPLATE_BASE_PATH, FREEMARKER_BASE) // config freemarker view files's base path\n .register(LoggingFeature.class)\n .register(FreemarkerMvcFeature.class)\n .register(JettisonFeature.class)\n .packages(\"org.glassfish.jersey.examples.multipart\")\n .register(MultiPartFeature.class)\n .registerInstances(new ApplicationBinder()); //\n\n // create and start a new instance of grizzly http server\n // exposing the Jersey application at BASE_URI\n httpServer = GrizzlyHttpServerFactory.createHttpServer(URI.create(BASE_URI), rc);\n\n // Set StaticHttpHandler to handle http server's static resources\n String htmlPath = this.getClass().getResource(HTML_BASE).getPath(); // TODO, 部署后要根据实际目录修正!classes 同级目录下的 html 目录\n HttpHandler handler = new StaticHttpHandler(htmlPath);\n httpServer.getServerConfiguration().addHttpHandler(handler, \"/\");\n\n logger.info(\"Jersey app started with WADL available at {} application.wadl\\n \", BASE_URI);\n } catch (Exception e) {\n throw new LifecycleException(e); // just convert to self defined exception\n }\n }" ]
[ "0.571409", "0.5669818", "0.5668037", "0.56441724", "0.5624003", "0.5619296", "0.5548093", "0.55429476", "0.55394584", "0.552132", "0.5490218", "0.54795563", "0.5477608", "0.5454746", "0.5448295", "0.542936", "0.5397698", "0.5393064", "0.53754324", "0.5372027", "0.53670126", "0.5360553", "0.53382945", "0.53359354", "0.53253424", "0.5320268", "0.53194535", "0.53155947", "0.5309777", "0.53023374", "0.5302024", "0.5299192", "0.5296205", "0.52953285", "0.5270594", "0.52652663", "0.525394", "0.5252636", "0.5251683", "0.52454257", "0.52404994", "0.52387136", "0.52323705", "0.5225003", "0.5224221", "0.52172446", "0.5212992", "0.51902455", "0.5177424", "0.517673", "0.51756424", "0.5173169", "0.5161891", "0.5156525", "0.51555276", "0.51541704", "0.51507014", "0.5149942", "0.5145086", "0.51406676", "0.51386786", "0.5137775", "0.51343197", "0.51238817", "0.51180667", "0.51160777", "0.5112834", "0.5098466", "0.50969803", "0.5092435", "0.5090714", "0.50905496", "0.5090139", "0.50858337", "0.5069378", "0.50565696", "0.5054266", "0.50533265", "0.5049294", "0.5048094", "0.50470287", "0.5046585", "0.50462776", "0.504405", "0.5044045", "0.5037579", "0.50360584", "0.5034103", "0.5032895", "0.50235075", "0.50235075", "0.5023283", "0.5022457", "0.5022003", "0.50200844", "0.50192684", "0.5017357", "0.50127697", "0.5007806", "0.5007143" ]
0.53032213
29
Default initializer for the index api.reader. Initializes the index to the default index directory.
public boolean initializeIndexReader() { return initializeIndexReader(Constants.INDEX_DIRECTORY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static RDFIndex createDefaultIndex() {\n defaultIndex = new RDFIndex(com.hp.hpl.jena.graph.Factory.createGraphMem());\n try {\n File indexFile = new File(INDEX_FILE);\n if(indexFile.exists()) {\n defaultIndex.read(new FileReader(indexFile),Constants.RESOURCE_URL);\n }\n } catch(Throwable t) {\n t.printStackTrace();\n }\n return defaultIndex;\n }", "@Override\n public boolean initializeIndexReader(String filename) {\n try {\n READER = DirectoryReader.open(FSDirectory.open(FileSystems.getDefault().getPath(filename)));\n } catch (IOException e) {\n READER = null;\n log.error(\"Failed to instantiate the index api.reader with directory: \" + filename);\n }\n return isInitialized();\n }", "public KrillIndex () throws IOException {\n this((Directory) new RAMDirectory());\n }", "public Indexer() {\n }", "public SimpleIndexFactory() {\n\t}", "private Indexers()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "public IndexWriter(String indexDir) {\n\t\t//TODO : YOU MUST IMPLEMENT THIS\n\tif (indexDir!=null)\n\t{System.setProperty(\"INDEX.DIR\",(this.indexDir=indexDir));\n\tisvaliddir=true;\n\tiutil=new IndexUtil(indexDir);\n\t}\n\t\n\t}", "private LuceneManager(String indexDir) {\n this.indexDir = indexDir;\n }", "public URIIndex(File indexRootDir, boolean readOnly) throws IOException {\n this(indexRootDir, readOnly, DEFAULT_BYTES_PER_ID, DEFAULT_BYTES_PER_TYPE, DEFAULT_BYTES_PER_PATH);\n }", "protected IndexReader getIndexReader(String indexFolder) throws IOException {\n return DirectoryReader.open(FSDirectory.open(Paths.get(indexFolder)));\n }", "private void configuration() throws IOException {\n IndexReader reader = DirectoryReader.open(FSDirectory.open(new File(\n luceneIndexDir)));\n\n analyzer = new SimpleAnalyzer(Version.LUCENE_47);\n searcher = new IndexSearcher(reader);\n\n // Creates the directory for Storing the search results.\n File file = new File(SEARCH_RESULT_DIR);\n file.mkdir();\n\n }", "public SimpleIndexFactory(Directory directory,Analyzer analyzer) {\n\t\tsetDirectory(directory);\n\t\tsetAnalyzer(analyzer);\n\t}", "private BrowseIndex(String baseName) {\n this(baseName, \"item\");\n }", "private BrowseIndex() {\n }", "public IndexReader getIndexReader() {\n\t\ttry {\n\t\t\tcheckDirectory();\n\t\t\tcheckIndexLocking();\n\n\t\t\tboolean exist = IndexReader.indexExists(getDirectory());\n\t\t\tif( exist ) {\n\t\t\t\treturn IndexReader.open(getDirectory());\n\t\t\t} else {\n\t\t\t\tthrow new LuceneIndexAccessException(\"The index doesn't exist for the specified directory\");\n\t\t\t}\n\t\t} catch(IOException ex) {\n\t\t\tthrow new LuceneIndexAccessException(\"Error during opening the reader\",ex);\n\t\t}\n\t}", "public H_index() {\n\t\tsuper();\n\t}", "public synchronized void setNewReader(File indexDir) throws IOException{\r\n \tsynchronized (mReaders) {\r\n \t\ttry{\r\n \tList<ReaderContainer> lReader;\r\n \tif (!mReaders.containsKey(indexDir)){\r\n \t\tlReader = new ArrayList<ReaderContainer>();\r\n \t\tlReader.add(new ReaderContainer(IndexReader.open(FSDirectory.open(indexDir))));\r\n \t\tmReaders.put(indexDir, lReader);\r\n \t} else {\r\n \t\tlReader = mReaders.get(indexDir);\r\n \t\t\r\n \t\tif (lReader.size() > 0){\r\n \t\t\tlog.debug(\"setNewReader-STEP1 :: lReader.size() = \" + lReader.size());\r\n// \t\t\tfor (int i = lReader.size() - 1; i >= 0 ; i--) {\r\n// \t\t\t\tReaderContainer readerContainer = lReader.get(i);\r\n \t\t\tReaderContainer readerContainer = lReader.get(lReader.size() - 1);\r\n \t\t\t\r\n \tif (readerContainer.isClosable()){\r\n \t\treaderContainer.close();\r\n \t\tlReader.remove(readerContainer);\r\n \t}\r\n// \t\t\t}\r\n \t}\r\n \t\tlReader.add(new ReaderContainer(IndexReader.open(FSDirectory.open(indexDir))));\r\n \t\tlog.debug(\"setNewReader :: lReader.size() = \" + lReader.size());\r\n \t}\r\n \t\r\n \t\t} catch(Exception ex){\r\n \t\tlog.fatal(\"setNewReader :: mReaders.containsKey(indexDir)\" +mReaders.containsKey(indexDir)+\" indexDir \"+indexDir.getCanonicalPath()+\" ERR:\"+ex);\r\n \t}\r\n\t\t}\r\n }", "public static void initialize() throws IOException {\n\t\tString config_path = \"./configure.txt\";\n\t\tFile config = new File(config_path);\n\t\tif (!config.exists()) {\n\t\t\tSystem.err.println(\"Cannot find configuration file\");\n\t\t\treturn;\n\t\t}\n\t\tBufferedReader reader = new BufferedReader(new FileReader(config));\n\t\tString data_path = reader.readLine();\n\t\treader.close();\n\n\t\t/* Compression method */\n\t\tString compression = \"Gamma\";\n\t\t/* Get index */\n\t\tString className = \"dm341.index.\" + compression + \"Index\";\n\t\ttry {\n\t\t\tClass<?> indexClass = Class.forName(className);\n\t\t\tindex = (BaseIndex) indexClass.newInstance();\n\t\t} catch (Exception e) {\n\t\t\tSystem.err\n\t\t\t\t\t.println(\"Index method must be \\\"Basic\\\", \\\"VB\\\", or \\\"Gamma\\\"\");\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\n\t\t/* Get index directory */\n\t\tString input_path = data_path + \"/FEC/output\";\n\t\tFile inputdir = new File(input_path);\n\t\tif (!inputdir.exists() || !inputdir.isDirectory()) {\n\t\t\tSystem.err.println(\"Invalid index directory: \" + input_path);\n\t\t\treturn;\n\t\t}\n\n\t\t/* Index file */\n\t\tindexFile = new RandomAccessFile(new File(input_path,\n\t\t\t\t\"corpus.index\"), \"r\");\n\t\tfc = indexFile.getChannel();\n\n\t\tString line = null;\n\t\t/* Term dictionary */\n\t\tBufferedReader termReader = new BufferedReader(new FileReader(new File(\n\t\t\t\tinput_path, \"term.dict\")));\n\t\twhile ((line = termReader.readLine()) != null) {\n\t\t\tString[] tokens = line.split(\"\\t\");\n\t\t\ttermDict.put(tokens[0], Integer.parseInt(tokens[1]));\n\t\t}\n\t\ttermReader.close();\n\n\t\t/* Com dictionary */\n\t\tBufferedReader docReader = new BufferedReader(new FileReader(new File(\n\t\t\t\tinput_path, \"com.dict\")));\n\t\twhile ((line = docReader.readLine()) != null) {\n\t\t\tString[] tokens = line.split(\"\\t\");\n\t\t\tdocDict.put(Integer.parseInt(tokens[2]), tokens[0] + \"\\t\" + tokens[1]);\n\t\t}\n\t\tdocReader.close();\n\n\t\t/* Posting dictionary */\n\t\tBufferedReader postReader = new BufferedReader(new FileReader(new File(\n\t\t\t\tinput_path, \"posting.dict\")));\n\t\twhile ((line = postReader.readLine()) != null) {\n\t\t\tString[] tokens = line.split(\"\\t\");\n\t\t\tposDict.put(Integer.parseInt(tokens[0]), Long.parseLong(tokens[1]));\n\t\t\tfreqDict.put(Integer.parseInt(tokens[0]),\n\t\t\t\t\tInteger.parseInt(tokens[2]));\n\t\t}\n\t\tpostReader.close();\n\t}", "public String getIndexDir() { return this.indexDir; }", "public IndexSearchSharderManager() {\n log = LoggerFactory.getLogger(IndexSearchSharderManager.class);\n }", "public URIIndex(File indexRootDir, boolean readOnly, int pathLengthInBytes)\n throws IOException {\n this(indexRootDir, readOnly, DEFAULT_BYTES_PER_ID, DEFAULT_BYTES_PER_TYPE, pathLengthInBytes);\n }", "public generateIndex() {\n\n\t\tthis.analyzer = \"StandardAnalyzer\";\n\t}", "private void init(int bytesPerId, int bytesPerType, int bytesPerPath) throws IOException {\n this.indexVersion = INDEX_VERSION;\n this.bytesPerId = bytesPerId;\n this.bytesPerType = bytesPerType;\n this.bytesPerPath = bytesPerPath;\n this.bytesPerSlot = bytesPerId + bytesPerType + bytesPerPath;\n this.entries = 0;\n \n logger.info(\"Creating uri index with {} bytes per entry\", bytesPerSlot);\n \n // Write header\n idx.seek(IDX_START_OF_HEADER);\n idx.writeInt(indexVersion);\n idx.writeInt(bytesPerId);\n idx.writeInt(bytesPerType);\n idx.writeInt(bytesPerPath);\n idx.writeLong(slots);\n idx.writeLong(entries);\n \n // If this file used to contain entries, we just null out the rest\n try {\n byte[] bytes = new byte[bytesPerSlot - 2];\n while (idx.getFilePointer() < idx.length()) {\n idx.writeChar('\\n');\n idx.write(bytes);\n }\n } catch (EOFException e) {\n // That's ok, we wanted to write until the very end\n }\n \n logger.debug(\"Uri index created\");\n }", "protected synchronized void init(LiveIndexWriterConfig indexWriterConfig) {\n this.indexWriterConfig = indexWriterConfig;\n infoStream = indexWriterConfig.getInfoStream();\n }", "public void start() throws Exception {\n\n createIndex();\n }", "@SuppressWarnings(\"unused\")\n public void buildIndex() throws IOException {\n indexWriter = getIndexWriter(indexDir);\n ArrayList <JSONObject> jsonArrayList = parseJSONFiles(JSONdir);\n indexTweets(jsonArrayList, indexWriter);\n indexWriter.close();\n }", "public BlackLabIndex open(File indexDir) throws ErrorOpeningIndex {\n IndexType indexType = determineIndexType(indexDir, false, null);\n return indexType == IndexType.INTEGRATED ?\n new BlackLabIndexIntegrated(indexDir.getName(), this, null, indexDir, false, false, null):\n new BlackLabIndexExternal(this, indexDir, false, false, (File) null);\n }", "public indexing() {\n initComponents();\n }", "@Override\n\tpublic void init() {\n Objects.requireNonNull(mtbw, \"Freetext indexer failed to initialize temporal index, setMultiTableBatchWriter() was not set.\");\n Objects.requireNonNull(conf, \"Freetext indexer failed to initialize temporal index, setConf() was not set.\");\n try {\n\t\t\tdocTableBw = mtbw.getBatchWriter(getFreeTextDocTablename(conf));\n\t\t\ttermTableBw = mtbw.getBatchWriter(getFreeTextTermTablename(conf));\n\t\t} catch (AccumuloException | AccumuloSecurityException | TableNotFoundException e) {\n\t\t\tlogger.error(\"Unable to initialize index. Throwing Runtime Exception. \", e);\n throw new RuntimeException(e);\t\t\n }\n\t}", "public AutoIndexMap()\n\t\t{\n\t\t\t// Initialise instance variables\n\t\t\tindices = new IdentityHashMap<>();\n\t\t}", "private IndexHandler (boolean test) throws IOException {\n analyzer = new StandardAnalyzer();\n indexDir = test ? new RAMDirectory() : new DistributedDirectory(new MongoDirectory(mongoClient, \"search-engine\", \"index\"));\n //storePath = storedPath;\n config = new IndexWriterConfig(analyzer);\n\n // write separate IndexWriter to RAM for each IndexHandler\n // writer will have to be manually closed with each instance call\n // see IndexWriter documentation for .close()\n // explaining continuous closing of IndexWriter is an expensive operation\n try {\n writer = new IndexWriter(indexDir, config);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public SimpleDirectory() {\n this.container = new Entry[SimpleDirectory.DEFAULT_SIZE];\n this.loadFactor = SimpleDirectory.DEFAULT_LOAD_FACTOR;\n }", "public IndexType getDefaultIndexType() {\n return BlackLab.isFeatureEnabled(BlackLab.FEATURE_INTEGRATE_EXTERNAL_FILES) ?\n IndexType.INTEGRATED :\n IndexType.EXTERNAL_FILES;\n }", "public URIIndex(File indexRootDir, boolean readOnly, int idLengthInBytes,\n int typeLengthInBytes, int pathLengthInBytes) throws IOException {\n \n this.idxFile = new File(indexRootDir, URI_IDX_NAME);\n this.isReadOnly = readOnly;\n \n String mode = readOnly ? \"r\" : \"rwd\";\n try {\n idxFile.getParentFile().mkdirs();\n if (!idxFile.exists())\n idxFile.createNewFile();\n idx = new RandomAccessFile(idxFile, mode);\n } catch (FileNotFoundException e) {\n throw new IllegalArgumentException(\"Index file \" + idxFile + \" does not exist\");\n }\n \n // Read index header information\n try {\n idx.seek(IDX_START_OF_HEADER);\n this.indexVersion = idx.readInt();\n if (indexVersion != INDEX_VERSION)\n logger.warn(\"URI index version mismatch (found {}, expected {}), consider reindex\", indexVersion, INDEX_VERSION);\n this.bytesPerId = idx.readInt();\n this.bytesPerType = idx.readInt();\n this.bytesPerPath = idx.readInt();\n this.slots = idx.readLong();\n this.entries = idx.readLong();\n this.bytesPerSlot = bytesPerId + bytesPerType + bytesPerPath;\n \n // If the index contains entries, we can't reduce the index size \n if (this.entries > 0) {\n idLengthInBytes = Math.max(this.bytesPerId, idLengthInBytes);\n typeLengthInBytes = Math.max(this.bytesPerType, typeLengthInBytes);\n pathLengthInBytes = Math.max(this.bytesPerPath, pathLengthInBytes);\n }\n \n if (this.bytesPerId != idLengthInBytes || this.bytesPerType != typeLengthInBytes || this.bytesPerPath != pathLengthInBytes)\n bytesPerSlot = resize(idLengthInBytes, typeLengthInBytes, pathLengthInBytes);\n } catch (EOFException e) {\n if (readOnly) {\n throw new IllegalStateException(\"Readonly index cannot be empty\");\n }\n init(idLengthInBytes, typeLengthInBytes, pathLengthInBytes);\n } catch (IOException e) {\n logger.error(\"Error reading from path index: \" + e.getMessage());\n throw e;\n }\n }", "private SolrIndexer()\n {\n fieldMap = new HashMap<String, String[]>();\n transMapMap = new HashMap<String, Map<String, String>>();\n customMethodMap = new HashMap<String, Method>();\n customMixinMap = new HashMap<String, SolrIndexerMixin>();\n indexDate = new Date();\n }", "private Reindex() {}", "private Reindex() {}", "public Index initIndex(String indexName) {\n return new Index(this, indexName);\n }", "@Override\n\tpublic void build(Index index) {\n\t\tthis.indexdir = index.getPath();\n\t\tLuceneIndex luceneIndex = (LuceneIndex) index;\n\t\tthis.indexSearcher = new IndexSearcher(luceneIndex.getReader());\n\n\t}", "public void setUp() throws Exception {\n Project project = new Project();\n\n IndexTask task = new IndexTask();\n FileSet fs = new FileSet();\n fs.setDir(new File(docsDir));\n task.addFileset(fs);\n task.setOverwrite(true);\n task.setDocumentHandler(docHandler);\n task.setIndex(new File(indexDir));\n task.setProject(project);\n task.execute();\n\n searcher = new IndexSearcher(indexDir);\n analyzer = new StopAnalyzer();\n }", "public SearchDocuments(String indexPath) throws IOException{\r\n this.setIndexPath(indexPath); \r\n \r\n //TO DO : add config.properties file\r\n //read configuration file and update static variables adequately\r\n// readConf();\r\n\r\n // Supported index Fields and their pubmed counterpart (\"Title\",\"ArticleTitle\") \r\n supportedIndexFields.put(\"Title\", \"ArticleTitle\");\r\n supportedIndexFields.put(\"TI\", \"ArticleTitle\");\r\n supportedIndexFields.put(\"Abstract\", \"AbstractText\");\r\n supportedIndexFields.put(\"AB\", \"AbstractText\");\r\n supportedIndexFields.put(\"PMID\", \"PMID\");\r\n supportedIndexFields.put(\"UID\", \"PMID\");\r\n //TO DO : add all supported index fields\r\n //TO DO : special words (i.e. nothascommenton etc) \r\n \r\n // Lucene objects\r\n \r\n /* Sorting */\r\n // Fields used for reverse chronological sorting of results\r\n // This Fields are indexed with no tokenization (for each element a StringField AND a SortedDocValuesField are added)\r\n // Using SortField.Type.STRING is valid (as an exception) beacause years are 4-digit numbers resulting in identical String-sorting and number-sorting.\r\n SortField sortFieldYear = new SortField(\"PubDate-Year\", SortField.Type.STRING, true);\r\n \r\n //TO DO : make custom comparators for the rest fields where lexilogical comparison is not valid\r\n // OR, store Pud Date as Date and use date comparison\r\n // Idealy one \"complex-field\" should be used for sorting, taking into account Year, Month, Day, Season and MedlineDate together)\r\n// SortField sortFieldMonth = new SortField(\"PubDate-Month\",SortField.Type.STRING,true);\r\n// SortField sortFieldDay = new SortField(\"PubDate-Day\",SortField.Type.STRING,true);\r\n// SortField sortFieldSeason = new SortField(\"PubDate-Season\",SortField.Type.STRING,true);\r\n// SortField sortFieldMedlineDate = new SortField(\"PubDate-MedlineDate\",SortField.Type.STRING,true);\r\n// this.setSort(new Sort(sortFieldYear, sortFieldMonth, sortFieldDay, sortFieldSeason, sortFieldMedlineDate));\r\n this.setSort(new Sort(sortFieldYear));\r\n \r\n /* Reading the index */\r\n// this.setReader(DirectoryReader.open(FSDirectory.open(Paths.get(getIndexPath()))));\r\n this.setReader(DirectoryReader.open(MMapDirectory.open(Paths.get(getIndexPath()))));\r\n this.setSearcher(new IndexSearcher(getReader()));\r\n this.setAnalyzer(new StandardAnalyzer());\r\n \r\n /* Caching */\r\n // these cache and policy instances can be shared across several queries and readers\r\n // it is fine to eg. store them into static variables\r\n // TO DO: Use stored (old) expert-queries (from mongoDB) and MESH terms to \"prepare\" cache.\r\n queryCache = new LRUQueryCache(maxNumberOfCachedQueries, maxRamBytesUsed);\r\n// defaultCachingPolicy = new UsageTrackingQueryCachingPolicy();\r\n defaultCachingPolicy = new QueryCachingPolicy.CacheOnLargeSegments(minIndexSize, minSizeRatio);\r\n this.getSearcher().setQueryCache(queryCache);\r\n this.getSearcher().setQueryCachingPolicy(defaultCachingPolicy);\r\n \r\n /* All fields as default for search */\r\n Iterator <String> allFieldsIterator = org.apache.lucene.index.MultiFields.getFields(reader).iterator();\r\n ArrayList <String> a = new ArrayList();\r\n String current = \"\";\r\n while(allFieldsIterator.hasNext()){\r\n current = allFieldsIterator.next();\r\n if(!current.startsWith(\"PubDate-\")){\r\n a.add(current);\r\n }\r\n }\r\n \r\n String[] allFields = new String[a.size()];\r\n allFields = a.toArray(allFields); //All index fields to be used as default search fields\r\n this.setParser( new MultiFieldQueryParser( allFields, getAnalyzer())); \r\n }", "public void testCreIdx(){\r\n\t \r\n\t String dataDir = \"C:\\\\study\\\\Lucene\\\\Data\";\r\n\t String idxDir = \"C:\\\\study\\\\Lucene\\\\Index\";\r\n\t \r\n\t LuceneUtils.delAll(idxDir);\r\n\t \r\n\t CreateIndex ci = new CreateIndex();\r\n\t \r\n\t ci.Indexer(new File(idxDir), new File(dataDir));\r\n\t \r\n\t\t\r\n\t}", "public void openIndex(String indexPath) throws IOException {\n\n }", "public static IndexReader open(String path) throws IOException {\n return open(FSDirectory.getDirectory(path, false));\n }", "public IndexBeans() {\r\n }", "private BrowseIndex(String baseName, String type) {\n try {\n number = -1;\n tableBaseName = baseName;\n displayType = type;\n sortOption = SortOption.getDefaultSortOption();\n } catch (SortException se) {\n // FIXME Exception handling\n }\n }", "public PPIndexManager(FileHelper file_helper) {\n\t\tthis.file_helper = file_helper;\n\t}", "public static IndexReader open(File path) throws IOException {\n return open(FSDirectory.getDirectory(path, false));\n }", "LuceneMemoryIndex createLuceneMemoryIndex();", "public IndexRecord()\n {\n }", "public void setDefaultSettings()\n {\n this.IndexerEffort = 0;\n this.indexZIPFiles = true;\n this.thumbnailsMatrix = \"64\";\n this.SaveThumbnails = false;\n }", "protected TreeIndex(@Nullable File indexParentDir,\n\t @NotNull File rootFile) {\n\t\tUtil.checkNotNull(rootFile);\n\t\tthis.indexParentDir = indexParentDir;\n\t\t\n\t\t// Create config\n\t\tthis.config = new IndexingConfig() {\n\t\t\t@Override\n\t\t\tprotected void onStoreRelativePathsChanged() {\n\t\t\t\tFile oldFile = rootFolder.getPath().getCanonicalFile();\n\t\t\t\tPath newPath = config.getStorablePath(oldFile);\n\t\t\t\trootFolder.setPath(newPath);\n\t\t\t}\n\t\t\tprotected void onWatchFoldersChanged() {\n\t\t\t\tLuceneIndex.evtWatchFoldersChanged.fire(TreeIndex.this);\n\t\t\t}\n\t\t};\n\t\t\n\t\t// Create root folder\n\t\trootFile = Util.getCanonicalFile(rootFile);\n\t\tPath newPath = config.getStorablePath(rootFile);\n\t\trootFolder = createRootFolder(newPath);\n\t\tUtil.checkNotNull(rootFolder);\n\t\t\n\t\t// Create index directory or RAM directory\n\t\tcreated = Util.getTimestamp();\n\t\tif (indexParentDir == null) {\n\t\t\tfileIndexDirPath = null;\n\t\t\tramIndexDir = new RAMDirectory();\n\t\t}\n\t\telse {\n\t\t\tString indexDirName = getIndexDirName(rootFile) + \"_\" + created;\n\t\t\tFile indexDir = new File(indexParentDir, indexDirName);\n\t\t\tif (AppUtil.isPortable())\n\t\t\t\tfileIndexDirPath = new Path(UtilModel.getRelativePathIfPossible(indexDir));\n\t\t\telse\n\t\t\t\tfileIndexDirPath = new Path(indexDir);\n\t\t}\n\t}", "public IndexFile(String url) throws IOException {\n\n /*\n * creates raf\n */\n raf = new RandomAccessFile(url + _shx, \"r\");\n\n /*\n * construct Header as ShapeFileHeader\n */\n fh = new FileHeader(raf);\n\n fileMBR = fh.getFileMBR();\n\n /*\n * construct indexArray\n */\n setIndexArray();\n\n }", "public void createIndex() throws IOException {\n\t\tLOGGER.info(\"creating photo index...\");\n\t\tCreateIndexRequest request = new CreateIndexRequest(\"files\");\n\t\tInputStream in = getClass().getClassLoader().getResourceAsStream(\"photo.json\");\n\t\tString mapping = new String(in.readAllBytes());\n\t\tin.close();\n\t\trequest.mapping(\"photo\", mapping, XContentType.JSON);\n\t\tCreateIndexResponse response = client.indices().create(request);\n\t\tLOGGER.info(\"photo index created: \" + response.toString());\n\t}", "@Test\n public void testGetDefaultIndex() throws Exception {\n testRequest(HttpMethod.GET, \"\", 200, \"OK\", \"<html><body>Index page</body></html>\");\n\n // with slash\n testRequest(HttpMethod.GET, \"/\", 200, \"OK\", \"<html><body>Index page</body></html>\");\n\n // and directly\n testRequest(HttpMethod.GET, \"/index.html\", 200, \"OK\", \"<html><body>Index page</body></html>\");\n }", "public synchronized IndexReader getReader(File indexDir) throws Exception{\r\n \tif (!mReaders.containsKey(indexDir)){\r\n \t\tsetNewReader(indexDir);\r\n \t\treturn getReader(indexDir);\r\n \t}\r\n \tsynchronized (mReaders) {\r\n \t\ttry{\r\n \t\t\t\r\n \t\tList<ReaderContainer> lReader = mReaders.get(indexDir);\r\n \t\tlog.debug(\"getReader :: lReader size = \"+lReader.size()+\" | nb index files= \"+indexDir.listFiles().length);\r\n \t\t\r\n \t\tif (lReader.size() == 0) {\r\n \t\t\tsetNewReader(indexDir);\r\n \t\t} else {\r\n \t\t\tReaderContainer readerContainer = lReader.get(lReader.size()-1);\r\n \t\t\tif (readerContainer.isClosable()){\r\n \t \t\treaderContainer.close();\r\n \t \t\tlReader.remove(readerContainer);\r\n \t \t\tlog.debug(\"getReader :: closed = (unRegister) size lreader = \"+lReader.size());\r\n \t \t\tsetNewReader(indexDir);\r\n \t \t\t\r\n \t \t}\r\n \t\t}\r\n\r\n \t\tReaderContainer readerContainer = lReader.get(lReader.size()-1);\r\n readerContainer.incNbSearch();\r\n \t\treturn readerContainer.getReader();\r\n \t\t\r\n \t\t} catch(Exception ex){\r\n \t\tlog.fatal(\"getReader :: mReaders.containsKey(indexDir)\" +mReaders.containsKey(indexDir)+\" ERR:\"+ex);\r\n \t\tif (mReaders.containsKey(indexDir)){\r\n \t\t\tList<ReaderContainer> lReader = mReaders.get(indexDir);\r\n \t\t\tlog.fatal(\"getReader :: size reader for this index : \"+lReader.size() +\" index: \"+indexDir.getCanonicalPath());\r\n \t}\r\n \t\treturn null;\r\n \t}\r\n\t\t}\r\n }", "public static Index open(String name, Path path) {\n if (!Files.isDirectory(path.resolve(INDEX))) {\n throw new InvalidRepositoryPathException();\n }\n try {\n return new Index(name, path);\n\n } catch (IOException ex) {\n throw new IOFailureException(ex);\n }\n }", "public InnodbIndexStatsExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public static void loadWikipediaIndex() throws IOException {\n\t\tSystem.out.println(\"Wikpedia index: \" + WikipediaIndexEn_location);\t\t\n\t\tDirectory WikiIndexDirectory = FSDirectory.open(new File(WikipediaIndexEn_location));\t\t\n\t\twikipediaEn = new IndexSearcher((IndexReader.open(WikiIndexDirectory)));\t\n\t}", "public void testBasic() throws IOException {\n Set<String> fileExtensions = new HashSet<String>();\n fileExtensions.add(IndexFileNames.FIELDS_EXTENSION);\n fileExtensions.add(IndexFileNames.FIELDS_INDEX_EXTENSION);\n \n Directory primaryDir = new MockDirectoryWrapper(new RAMDirectory());\n Directory secondaryDir = new MockDirectoryWrapper(new RAMDirectory());\n \n FileSwitchDirectory fsd = new FileSwitchDirectory(fileExtensions, primaryDir, secondaryDir, true);\n IndexWriter writer = new IndexWriter(fsd, new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer()));\n ((LogMergePolicy) writer.getConfig().getMergePolicy()).setUseCompoundFile(false);\n ((LogMergePolicy) writer.getConfig().getMergePolicy()).setUseCompoundDocStore(false);\n TestIndexWriterReader.createIndexNoClose(true, \"ram\", writer);\n IndexReader reader = IndexReader.open(writer);\n assertEquals(100, reader.maxDoc());\n writer.commit();\n // we should see only fdx,fdt files here\n String[] files = primaryDir.listAll();\n assertTrue(files.length > 0);\n for (int x=0; x < files.length; x++) {\n String ext = FileSwitchDirectory.getExtension(files[x]);\n assertTrue(fileExtensions.contains(ext));\n }\n files = secondaryDir.listAll();\n assertTrue(files.length > 0);\n // we should not see fdx,fdt files here\n for (int x=0; x < files.length; x++) {\n String ext = FileSwitchDirectory.getExtension(files[x]);\n assertFalse(fileExtensions.contains(ext));\n }\n reader.close();\n writer.close();\n\n files = fsd.listAll();\n for(int i=0;i<files.length;i++) {\n assertNotNull(files[i]);\n }\n fsd.close();\n }", "public IndexableDocument() {\n\t\tthis.id=new ObjectId();\n\t}", "public SourceLister() {\n this(defaultSrcDirs);\n }", "public static void init(String configFile){\n\t\tSystem.err.println(\"Reading config file...\");\n\t\tConfigurationHandler.init(configFile);\n\t\t\n\t\t//setting paths\n\t\tYASEMIR_HOME=ConfigurationHandler.YASEMIR_HOME;\n\t\tINDEX_DIR=YASEMIR_HOME+System.getProperty(\"file.separator\")+ConfigurationHandler.INDEXDIR;\n\t\tTERM_DIR=YASEMIR_HOME+System.getProperty(\"file.separator\")+ConfigurationHandler.TERMIDXDIR;\n\t\t//TERM_DIR=INDEX_DIR+System.getProperty(\"file.separator\")+ConfigurationHandler.TERMIDXDIR;\n\t\tCOLLECTION_DIR=ConfigurationHandler.CORPUSDIR;\n\t\tidField=ConfigurationHandler.DOCIDFIELD;\n\t\tID_ASATTR=ConfigurationHandler.IDFIELD_ASATTR;\n\t\tDOC_DELIM=ConfigurationHandler.DOC_DELIM;\n\t\tCOLLECTION_LANG=ConfigurationHandler.CORPUSLANG;\n\t\t\n\t\tif(COLLECTION_LANG.equals(\"fr\")) analyzer = new FrenchAnalyzer(Version.LUCENE_44);\n\t else if(COLLECTION_LANG.equals(\"it\")) analyzer = new ItalianAnalyzer(Version.LUCENE_44);\n\t else if(COLLECTION_LANG.equals(\"es\")) analyzer = new SpanishAnalyzer(Version.LUCENE_44);\n\t else if(COLLECTION_LANG.equals(\"de\")) analyzer = new GermanAnalyzer(Version.LUCENE_44);\n\t else if(COLLECTION_LANG.equals(\"pt\")) analyzer = new PortugueseAnalyzer(Version.LUCENE_44);\n\t else if(COLLECTION_LANG.equals(\"ca\")) analyzer = new CatalanAnalyzer(Version.LUCENE_44);\n\t else if(COLLECTION_LANG.equals(\"nl\")) analyzer = new DutchAnalyzer(Version.LUCENE_44);\n\t else if(COLLECTION_LANG.equals(\"ar\")) analyzer = new ArabicAnalyzer(Version.LUCENE_44);\n\t else analyzer = new EnglishAnalyzer(Version.LUCENE_44);\n\t\t\n\t\t//setting search mode\n\t\tString sm = ConfigurationHandler.SEARCH_MODE;\n\t\tif(sm!=null){\n\t\t\tif(sm.equalsIgnoreCase(\"semantic\")) MODE=SEMANTIC;\n\t\t\telse if(sm.equalsIgnoreCase(\"hybrid\")) MODE=HYBRID;\n\t\t\telse MODE=CLASSIC;\n\t\t}\n\t\t\n\t\t//setting concept similarity measure\n\t\tString smm = ConfigurationHandler.SIM_MEASURE;\n\t\tif(smm!=null){\n\t\t\tif(smm.equalsIgnoreCase(\"pg1\")) SIM_MEASURE=ConceptSimilarity.PROXYGENEA1;\n\t\t\telse if(smm.equalsIgnoreCase(\"pg2\")) SIM_MEASURE=ConceptSimilarity.PROXYGENEA2;\n\t\t\telse if(smm.equalsIgnoreCase(\"pg3\")) SIM_MEASURE=ConceptSimilarity.PROXYGENEA3;\n\t\t\telse SIM_MEASURE=ConceptSimilarity.WU;\n\t\t}\n\t\t\n\t\t//setting concept weights\n\t\tString cw = ConfigurationHandler.CONCEPTWEIGHT;\n\t\tif(cw!=null){\n\t\t\tif(cw.equalsIgnoreCase(\"fixed\")) CONCEPT_WEIGHTS=ClassWeightHandler.FIXED;\n\t\t\telse if(cw.equalsIgnoreCase(\"idf\")) CONCEPT_WEIGHTS=ClassWeightHandler.IDF;\n\t\t\telse if(cw.equalsIgnoreCase(\"prob\")) CONCEPT_WEIGHTS=ClassWeightHandler.PROB;\n\t\t\telse if(cw.equalsIgnoreCase(\"gauss\")) CONCEPT_WEIGHTS=ClassWeightHandler.GAUSSPROB;\n\t\t}\n\t\t\n\t\t//setting annotator\n\t\tANNOTATOR=ConfigurationHandler.ANNOTENGINE;\n\t\tannotator=new SentenceBasedAnnotator(TERM_DIR);\n\t\t//annotator=new KNNAnnotator(TERM_DIR); //TODO: not finished (select annotator depending on configuration file)\n\t\ttry{\n\t\t\tClass<?> cls = Class.forName(ANNOTATOR);\n\t\t\tConstructor<?> constructor = cls.getConstructor(String.class);\n\t\t\tannotator = (SemanticAnnotator) constructor.newInstance(TERM_DIR);\n\t\t\t//Object instance = constructor.newInstance(\"stringparam\");\n\t\t} catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t\tSystem.err.println(\"[YaSemIR]: failed to load the specified annotator, falling back to IndexBasedAnnotator\");\n\t\t\tannotator=annotator=new SentenceBasedAnnotator(TERM_DIR);\n\t\t}\n\t\t//setting ngrams enabled or not\n\t\tCKPD_ENABLED=ConfigurationHandler.NGRAMS_ENABLED;\n\t\t\n\t\t//setting semantic fields\n\t\tsemBalises=new HashSet<String>();\n\t\tsemBalises.addAll(ConfigurationHandler.getSemanticFields());\n\t\t\n\t\t//setting classic fields\n\t\tclsBalises=new HashSet<String>();\n\t\tclsBalises.addAll(ConfigurationHandler.getClassicFields());\n\t\t\n\t\t//setting score type\n\t\tSCORE=ConfigurationHandler.SCORE;\n\t\t\n\t\t//setting ontologies and terminologies\n\t\tSystem.err.println(\"[YaSemIR]: Loading Knowledge Battery...\");\n\t\t\n\t\tHashMap<String, String> ontoSKOSconf=ConfigurationHandler.getOntologySKOSMap();\n\t\tHashMap<String, String> ontoRootconf = ConfigurationHandler.getOntologyRootMap();\t\t\n\n\t\tfor(String ontoLoc : ontoSKOSconf.keySet()){\n\t\t\tString ontoRoot = ontoRootconf.get(ontoLoc);\n\t\t\tOntology o = null;\n\t\t\tif(ontoRoot.trim().isEmpty()) o = new Ontology(ontoLoc);\n\t\t\telse o = new Ontology(ontoLoc, ontoRoot);\n\t\t\tSystem.err.println(\"[YaSemIR]: loaded ontology: \"+o.getBaseAddr()+\" at \"+ontoLoc);\n\t\t\tString termPath=ontoSKOSconf.get(ontoLoc);\n\t\t\tSKOSTerminology t=null;\n\t\t\tif(!termPath.trim().isEmpty()) {\n\t\t\t\tSystem.err.println(\"[YaSemIR]: loading terminology from \"+termPath);\n\t\t\t\tt = new SKOSTerminology(o.getOntologyID(), termPath);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.err.println(\"[YaSemIR]: no terminology provided: generating trivial terminology from \"+o.getBaseAddr()+\"...\");\n\t\t\t\tt = o.generateTerminology();\n\t\t\t}\n\t\t\tSystem.err.println(\"[YaSemIR]: loaded terminology: \"+t.getTerminologyID());\n\t\t\tKnowledgeBattery.addOntology(o, t);\n\t\t\t\n\t\t}\n\t\tif(INDEXING_MODE) KnowledgeBattery.createTermIndex();\n\t\tSystem.err.println(\"[YaSemIR]: Done.\");\n\t\t\n\t\t\n\t\t\n\t}", "protected void index()\r\n\t{\n\t}", "public IndexReader getIndexReader() {\n return indexReader;\n }", "@Override\n\tpublic synchronized void initialize() {\n\t\tFile[] files = mRootDirectory.listFiles();\n\t\tif (files == null) {\n\t\t\treturn;\n\t\t}\n\t\tfor (File file : files) {\n\t\t\tFileInputStream fis = null;\n\t\t\ttry {\n\t\t\t\tfis = new FileInputStream(file);\n\t\t\t\tCacheHeader entry = CacheHeader.readHeader(fis);\n\t\t\t\tentry.size = file.length();\n\t\t\t\tputEntry(entry.key, entry);\n\t\t\t} catch (IOException e) {\n\t\t\t\tif (file != null) {\n\t\t\t\t\tfile.delete();\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (fis != null) {\n\t\t\t\t\t\tfis.close();\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException ignored) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void createIndex(String dataDirPath){\n\t\tFile[] files = new File(dataDirPath).listFiles();\n\n\t\tfor (File file : files) {\n\t\t\tif(!file.isDirectory()\n\t\t\t\t\t&& !file.isHidden()\n\t\t\t\t\t&& file.exists()\n\t\t\t\t\t){\n\t\t\t\t//add to Map\n\t\t\t\t// m.put(file.getAbsolutePath(), new RankModel(file,0,getOutLinks(file.getAbsolutePath())));\n\t\t\t\tallFiles.add(file.getAbsolutePath());\n\t\t\t}else{\n\t\t\t\tcreateIndex(file.getAbsolutePath());\n\t\t\t}\n\t\t}\n\t\t// return writer.numDocs();\n\t}", "public void init() {\n File file=new File(\"D:\\\\lucene\\\\index\");\n if(file.isDirectory())\n { //否则如果它是一个目录\n File files[] = file.listFiles(); //声明目录下所有的文件 files[];\n for(int i=0;i<files.length;i++)\n { //遍历目录下所有的文件\n files[i].delete(); //把每个文件 用这个方法进行迭代\n }\n }\n String indexPath = \"D:\\\\lucene\\\\index\";\n //String docsPath = \"D:\\\\lucene\\\\data\";\n boolean create = true;\n try\n {\n Session session=factory.openSession();\n String hql = \"from Book\";\n org.hibernate.Query query = session.createQuery(hql);\n List<Book> list=query.list();\n Directory indexDir = FSDirectory.open(Paths.get(\"D:\\\\lucene\\\\index\"));\n Analyzer luceneAnalyzer = new StandardAnalyzer(); //新建一个分词器实例 \n IndexWriterConfig config = new IndexWriterConfig(luceneAnalyzer); \n IndexWriter indexWriter = new IndexWriter(indexDir,config);\n for(int i=0;i<list.size();i++)\n {\n Document document = new Document();\n Field field1 = new StringField(\"id\",list.get(i).getBookid().toString(),Field.Store.YES); \n Field field2 = new StringField(\"bookname\",list.get(i).getBookname(),Field.Store.YES); \n Field field3 = new StringField(\"author\",list.get(i).getAuthor(),Field.Store.YES); \n Field field4 = new StringField(\"category\",list.get(i).getCategory(),Field.Store.YES); \n Field field5 = new StringField(\"price\", Double.toString(list.get(i).getPrice()),Field.Store.YES); \n document.add(field1); \n document.add(field2); \n document.add(field3); \n document.add(field4);\n document.add(field5);\n indexWriter.addDocument(document);\n }\n indexWriter.close();\n }\n catch(IOException e)\n {\n System.out.println(\"error\");\n return;\n }\n }", "public void createIndex(String dirPath) throws IOException {\n\n\t\tFile[] files = new File(dirPath).listFiles();\n\n\t\tfor (File f : files) {\n\t\t\tindexDocument(f);\n\t\t}\n\n\t\tclose();\n\t\tprintStatistics();\n\t}", "public DefaultLoaderDefinition() {\n\t\t// nothing to do\n\t}", "public IndexDatabase(String index_path) {\n int k;\n long p;\n try {\n pre_file = new RandomAccessFile(index_path + \"/sorted.kmc_pre\", \"r\");\n pre_file.seek(pre_file.length() - 8);\n header_pos = read_int(pre_file);\n pre_file.seek(pre_file.length() - 8 - header_pos);\n // read the index properties \n K = read_int(pre_file);\n mode = read_int(pre_file);\n ctr_size = read_int(pre_file);\n pre_len = read_int(pre_file);\n min_count = read_int(pre_file);\n max_count = read_int(pre_file);\n kmers_num = read_long(pre_file);\n suf_len = K - pre_len;\n key = new kmer(K, pre_len, suf_len);\n System.out.println(\"Indexing \" + kmers_num + \" kmers... \");\n // load the prefix file into the memory \n pre_file.seek(4);\n int q, len = 1 << (2 * pre_len);\n prefix_ptr = new long[len];\n MappedByteBuffer pre_buff;\n for (q = 0, p = 0; p < 8; ++p) {\n pre_buff = pre_file.getChannel().map(FileChannel.MapMode.READ_ONLY, 4 + p * len, len);\n for (k = 0; k < len / 8; ++k, ++q) {\n prefix_ptr[q] = read_long(pre_buff);\n }\n pre_buff = null;\n }\n pre_file.close();\n // mapping suffix file into the memory\n suf_rec_size = ctr_size + suf_len / 4;\n MAX_BYTE_COUNT = MAX_BYTE_COUNT / suf_rec_size * suf_rec_size;\n suf_parts_num = (int) ((kmers_num * suf_rec_size) % MAX_BYTE_COUNT == 0 ? (kmers_num * suf_rec_size) / MAX_BYTE_COUNT : (kmers_num * suf_rec_size) / MAX_BYTE_COUNT + 1);\n suf_parts_size = new long[suf_parts_num];\n suf_file = new RandomAccessFile(index_path + \"/sorted.kmc_suf\", \"r\");\n suf_buff = new MappedByteBuffer[suf_parts_num];\n for (k = 0; k < suf_parts_num; ++k) {\n suf_parts_size[k] = (int) (k == suf_parts_num - 1 ? (kmers_num * suf_rec_size) % MAX_BYTE_COUNT : MAX_BYTE_COUNT);\n suf_buff[k] = suf_file.getChannel().map(FileChannel.MapMode.READ_ONLY, 4 + k * suf_parts_size[0], suf_parts_size[k]);\n }\n // mapping pointers file into the memory\n MAX_BYTE_COUNT = MAX_BYTE_COUNT / POINTER_LENGTH * POINTER_LENGTH;\n ptr_parts_num = (int) ((kmers_num * POINTER_LENGTH) % MAX_BYTE_COUNT == 0 ? (kmers_num * POINTER_LENGTH) / MAX_BYTE_COUNT : (kmers_num * POINTER_LENGTH) / MAX_BYTE_COUNT + 1);\n ptr_parts_size = new long[ptr_parts_num];\n ptr_file = new RandomAccessFile(index_path + \"/pointers.db\", \"rw\");\n ptr_buff = new MappedByteBuffer[ptr_parts_num];\n for (k = 0; k < ptr_parts_num; ++k) {\n ptr_parts_size[k] = (int) (k == ptr_parts_num - 1 ? (kmers_num * POINTER_LENGTH) % MAX_BYTE_COUNT : MAX_BYTE_COUNT);\n ptr_buff[k] = ptr_file.getChannel().map(FileChannel.MapMode.READ_WRITE, k * ptr_parts_size[0], ptr_parts_size[k]);\n }\n } catch (IOException e) {\n System.out.println(e.getMessage());\n System.exit(1);\n }\n }", "public void run() {\n System.out.println(\"Running Indexing\");\n Indexer.index();\n }", "public static IndexReader open(Directory directory) throws IOException {\n synchronized (directory) {\n SegmentInfos infos = new SegmentInfos();\n infos.read(directory);\n if (infos.size() == 1)\t\t\t // index is optimized\n\treturn new SegmentReader(infos.info(0), true);\n \n SegmentReader[] readers = new SegmentReader[infos.size()];\n for (int i = 0; i < infos.size(); i++)\n\treaders[i] = new SegmentReader(infos.info(i), i == infos.size() - 1);\n return new SegmentsReader(readers);\n }\n }", "public InfinispanDirectory(Cache<?, ?> metadataCache, Cache<?, ?> chunksCache, Cache<?, ?> distLocksCache, String indexName, int chunkSize) {\n this(metadataCache, chunksCache, indexName, makeDefaultLockFactory(distLocksCache, indexName),\n chunkSize, makeDefaultSegmentReadLocker(metadataCache, chunksCache, distLocksCache, indexName));\n }", "@SuppressWarnings(\"WeakerAccess\")\n public ClinicalTrialSearchEngine(String indexPath, String defaultFieldName,\n DocumentFactory<T> factory) {\n super(indexPath,\n new EnglishAnalyzer(),\n defaultFieldName,\n factory);\n }", "protected IndexReader getReader() {\n\t\treturn indexReader;\n\t}", "public Index getIndex() {\r\n // TODO: Implement this!\r\n return new WebIndex();\r\n }", "public SimpleDocReader() { }", "void testSetup() {\n\t\t// Delete any existing index\n\t\tdeleteIndex();\n\n\t\t// Create the index\n\t\tcreateIndex();\n\n\t\t// Apply mappings for type and subtypes\n\t\tBufferedReader br;\n\t\tString line;\n\t\tStringBuffer sb;\n\t\ttry {\n\t\t\t// Mappings for index + type\n\t\t\tbr = new BufferedReader(new FileReader(\n\t\t\t\t\t\"./data/mappings_domeo_v2.json\"));\n\t\t\tsb = new StringBuffer();\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tsb.append(line + NEWLINE);\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tdoMapping(sb.toString(), false, HTTP_POST);\n\n\t\t\t// Mappings for index + sub-type\n\t\t\tbr = new BufferedReader(new FileReader(\n\t\t\t\t\t\"./data/mappings_domeo_subtype_v2.json\"));\n\t\t\tsb = new StringBuffer();\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tsb.append(line + NEWLINE);\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tdoMapping(sb.toString(), true, HTTP_POST);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Index a doc\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(\"./data/sample_docs.json\"));\n\t\t\tif ((line = br.readLine()) != null) {\n\t\t\t\tinsertDocument(line);\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\trefreshIndex();\n\t}", "public OreAPI() {\n\t\tthis(DEFAULT_URL, null);\n\t}", "public Storage() {\n\t\tstorageReader = new StorageReader();\n\t\tstorageWriter = new StorageWriter();\n\t\tdirectoryManager = new DirectoryManager();\n\n\t\tFile loadedDirectory = storageReader.loadDirectoryConfigFile(FILENAME_DIRCONFIG);\n\t\tif (loadedDirectory != null) {\n\t\t\tif (directoryManager.createDirectory(loadedDirectory) == true) {\n\t\t\t\tdirectory = loadedDirectory;\n\t\t\t\tSystem.out.println(\"{Storage} Directory loaded | \" + directory.getAbsolutePath());\n\t\t\t} else { //loaded directory was invalid or could not be created\n\t\t\t\tdirectoryManager.createDirectory(DEFAULT_DIRECTORY);\n\t\t\t\tdirectory = DEFAULT_DIRECTORY;\n\t\t\t}\n\t\t} else { //directory config file was not found\n\t\t\tdirectoryManager.createDirectory(DEFAULT_DIRECTORY);\n\t\t\tdirectory = DEFAULT_DIRECTORY;\n\t\t}\n\t}", "public CoreRestClientImpl(final File cacheDirectory) {\n CoreLog.d(\"Initialising the Rest Client\");\n\n final OkHttpClient client = new OkHttpClient();\n\n // initialise the cache directory if the parameter is not null\n if (cacheDirectory != null) {\n final Cache cache = new Cache(cacheDirectory, 10 * 1024 * 1024);\n client.setCache(cache);\n CoreLog.d(\"Client initialised with cache\");\n } else {\n CoreLog.d(\"Client initialised without cache\");\n }\n }", "public TinySearchEngine()\n {\n this.myIndex = new HashMap();\n this.documentData = new HashMap();\n this.sorted = false;\n this.sort = new Sort();\n this.search = new BinarySearch();\n }", "public static void start() throws IOException {\n\n\t\t/* if relation aliases are already cached, ignore */\n\t\tif(relationAliasIndex.size() > 0) {\n\n\t\t\treturn;\n\t\t}\n\n\t\tfinal String filePath = singleton.getClass().getResource(localFileRepositoryPath)\n\t\t\t\t.getFile();\n\n\t\t// if file path contains jar, it means we are executing from a jar file\n\t\tif(filePath.contains(\".jar\")) {\n\n\t\t\tindexFromJarFile(\n\t\t\t\t\tnew BufferedInputStream(\n\t\t\t\t\t\t\tnew FileInputStream(filePath.substring\n\t\t\t\t\t(filePath.indexOf(\":\") + 1, filePath.indexOf(\"!\")))));\n\t\t} else {\n\n\t\t\tnew java.io.File(filePath).listFiles(new java.io.FileFilter() {\n\n\t\t\t\tpublic boolean accept(java.io.File file) {\n\n\t\t\t\t\tif(file.isFile() && file.getName().endsWith(classExtension)) {\n\n\t\t\t\t\t\taddToIndex(file.getName());\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "@Inject\n\tpublic LuceneIndex(final Directory luceneDirectory,\n\t\t\t\t\t final Analyzer analyzer) {\n\t\ttry {\n\t\t\t// [1]: Create the indexWriter\n\t\t\t_indexWriter = new IndexWriter(luceneDirectory,\n\t\t\t\t\t\t\t\t\t\t new IndexWriterConfig(LuceneConstants.VERSION,\n\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t \t analyzer));\n\t\t\t\n\t\t\t// [2a]: Create the TrackingIndexWriter to track changes to the delegated previously created IndexWriter \n\t\t\t_trackingIndexWriter = new TrackingIndexWriter(_indexWriter);\n\t\t\t\n\t\t\t// [2b]: Create an IndexSearcher ReferenceManager to safely share IndexSearcher instances across\n\t\t\t//\t\t multiple threads\n\t\t\t_indexSearcherReferenceManager = new SearcherManager(_indexWriter,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t null);\n\t\t\t\n\t\t\t// [3]: Create the ControlledRealTimeReopenThread that reopens the index periodically having into \n\t\t\t//\t\taccount the changes made to the index and tracked by the TrackingIndexWriter instance\n\t\t\t// \t\tThe index is refreshed every 60sc when nobody is waiting \n\t\t\t//\t\tand every 100 millis whenever is someone waiting (see search method)\n\t\t\t//\t\t(see http://lucene.apache.org/core/4_3_0/core/org/apache/lucene/search/NRTManagerReopenThread.html)\n\t\t\t_indexSearcherReopenThread = new ControlledRealTimeReopenThread<IndexSearcher>(_trackingIndexWriter,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t _indexSearcherReferenceManager,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t 60.00,\t// when there is nobody waiting\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t 0.1); \t// when there is someone waiting\n\t\t\t_indexSearcherReopenThread.start();\t// start the refresher thread\n\t\t} catch (IOException ioEx) {\n\t\t\tthrow new IllegalStateException(\"Lucene index could not be created: \" + ioEx.getMessage());\n\t\t}\n\t}", "public static synchronized IndexingManager getInstance() {\n if (indexManager == null) {\n indexManager = new IndexingManager();\n return indexManager;\n } else {\n return indexManager;\n }\n }", "public Object run() {\n String bn = baseName.endsWith(\"/\")\n ? baseName\n : baseName + \"/\";\n\n // look for prebuilt indices first\n try {\n InputStream s = root.getResourceAsStream(bn + ICU_RESOURCE_INDEX + \".txt\");\n if (s != null) {\n ArrayList lst = new ArrayList();\n BufferedReader br = new BufferedReader(new InputStreamReader(s, \"ASCII\"));\n String line;\n while ((line = br.readLine()) != null) {\n if (line.length() != 0 && !line.startsWith(\"#\")) {\n lst.add(line);\n }\n }\n return lst;\n }\n } catch (IOException e) {\n // swallow it\n }\n\n URL url = root.getResource(bn);\n /*\n URLHandler handler = URLHandler.get(url);\n if (handler != null) {\n final ArrayList lst = new ArrayList();\n URLVisitor v = new URLVisitor() {\n public void visit(String s) {\n if (s.endsWith(\".res\") && !\"res_index.res\".equals(s)) {\n lst.add(s.substring(0, s.length() - 4)); // strip '.res'\n }\n }\n };\n handler.guide(v, false);\n return lst;\n }\n \t*/\n return null;\n }", "@Test\n public void testProcessAll() throws TikaException, SAXException, IOException, Exception {\n PaperIndexer indexer = new PaperIndexer(BaseDirInfo.getPath(\"test.properties\"));\n indexer.processAll();\n\n Properties prop = indexer.getProperties();\n String paraIndexPath = prop.getProperty(\"para.index\");\n prop.setProperty(\"para.index\", paraIndexPath + \"/1\");\n\n final String[] indexes = { \"index\", \"para.index\", \"para.index.all\" };\n\n // Test global index and para index\n for (String indexPath : indexes) {\n File indexDir = new File(BaseDirInfo.getPath(indexer.getProperties().getProperty(indexPath)));\n try (Directory dir = FSDirectory.open(indexDir.toPath());\n IndexReader reader = DirectoryReader.open(dir)) {\n assertNotNull(reader); // reader must not be null\n\n int nDocs = reader.numDocs();\n assertNotEquals(nDocs, 0); // Number of docs must not be zero\n }\n }\n\n // Since we put one document in the test folder, we should have one folder in the para index\n prop.setProperty(\"para.index\", paraIndexPath);\n File[] dirs = new File(prop.getProperty(\"para.index\")).listFiles();\n assertEquals(dirs.length, 1);\n\n // clean folders\n indexer.removeIndexDirs();\n }", "@Override\n protected void initializeReader() {\n this.fileList = new ArrayList<>();\n this.fileListPosition = new AtomicInteger(0);\n this.currentTextAnnotation = new AtomicReference<>();\n }", "public void createIndex(Configuration configuration){\n }", "private static void createIndexDocument(String path, Configuration c, LODEParser l, Properties lang){\n //the boolean valuas come from the configuration.\n String textToWrite = Constants.getIndexDocument(\"resources\",c, l, lang);\n saveDocument(path+File.separator+\"index-\"+c.getCurrentLanguage()+\".html\", textToWrite,c);\n }", "public DataRepository() throws IOException {\n\t\tthis.init();\n\t}", "private ConfigReader() {\r\n\t\tsuper();\r\n\t}", "public interface IndexMetadata extends Freezable<IndexMetadata> {\n\t\n\tAnnotatedFields annotatedFields();\n\t\n\tdefault AnnotatedField mainAnnotatedField() {\n\t return annotatedFields().main();\n\t}\n\t\n default AnnotatedField annotatedField(String name) {\n return annotatedFields().get(name);\n }\n \n\tMetadataFields metadataFields();\n\t\n\tdefault MetadataField metadataField(String name) {\n\t return metadataFields().get(name);\n\t}\n\n\t/**\n\t * Get the display name for the index.\n\t *\n\t * If no display name was specified, returns the name of the index directory.\n\t *\n\t * @return the display name\n\t */\n\tString displayName();\n\n\t/**\n\t * Get a description of the index, if specified\n\t * @return the description\n\t */\n\tString description();\n\n\t/**\n\t * Is the content freely viewable by all users, or is it restricted?\n\t * @return true if the full content may be retrieved by anyone\n\t */\n\tboolean contentViewable();\n\n /**\n * What's the text direction of this corpus?\n * @return text direction\n */\n\tTextDirection textDirection();\n\n\t/**\n\t * What format(s) is/are the documents in?\n\t *\n\t * This is in the form of a format identifier as understood\n\t * by the DocumentFormats class (either an abbreviation or a\n\t * (qualified) class name).\n\t *\n\t * @return the document format(s)\n\t */\n\tString documentFormat();\n\n\t/**\n\t * What version of the index format is this?\n\t * @return the index format version\n\t */\n\tString indexFormat();\n\n\t/**\n\t * When was this index created?\n\t * @return date/time\n\t */\n\tString timeCreated();\n\n\t/**\n\t * When was this index last modified?\n\t * @return date/time\n\t */\n\tString timeModified();\n\n\t/**\n\t * When was the BlackLab.jar used for indexing built?\n\t * @return date/time\n\t */\n\tString indexBlackLabBuildTime();\n\n\t/**\n\t * When was the BlackLab.jar used for indexing built?\n\t * @return date/time stamp\n\t */\n\tString indexBlackLabVersion();\n\n\t/**\n\t * How many tokens are in the index?\n\t * @return number of tokens\n\t */\n\tlong tokenCount();\n\n\t/**\n\t * Is this a new, empty index?\n\t *\n\t * An empty index is one that doesn't have a main contents field yet,\n\t * or has a main contents field but no indexed tokens yet.\n\t *\n\t * @return true if it is, false if not.\n\t */\n\tboolean isNewIndex();\n\n default boolean subannotationsStoredWithParent() {\n return false;\n }\n\t\n}", "private IndexWriter getIndexWriter() throws IOException {\n\n\t\tAnalyzer a = getAnaLyzer();\n\n\t\tif (idxWriter == null) {\n\n\t\t\tindexPath = this.analyzer + \" index-directory\";\n\t\t\tDirectory indexDir = FSDirectory.open(Paths.get(indexPath));\n\t\t\tIndexWriterConfig config = new IndexWriterConfig(a);\n\n\t\t\tconfig.setOpenMode(OpenMode.CREATE);\n\n\t\t\tidxWriter = new IndexWriter(indexDir, config);\n\t\t}\n\n\t\treturn idxWriter;\n\t}", "private static PlaceIndex buildIndex(File repo) throws RepositoryException, SailException {\n PlaceIndex index = new PlaceIndex();\n\n // start repository\n NativeStore store = new NativeStore(repo);\n Repository repository = new SailRepository(store);\n repository.initialize();\n RepositoryConnection connection = repository.getConnection();\n\n // create the root place\n ValueFactory factory = repository.getValueFactory();\n Value root = factory.createURI(Place.ROOT.toURL().toString());\n\n try {\n\n // prepare SPARQL queries\n TupleQuery queryChildren = connection.prepareTupleQuery(QueryLanguage.SPARQL, QUERY_CHILDREN);\n TupleQuery queryNamesOff = connection.prepareTupleQuery(QueryLanguage.SPARQL, QUERY_NAMES_OFF);\n TupleQuery queryNamesAlt = connection.prepareTupleQuery(QueryLanguage.SPARQL, QUERY_NAMES_ALT);\n\n // add children recursively, starting from the root\n queryChildren.setBinding(\"parent\", root);\n addChildren(index, Place.ROOT, queryChildren, queryNamesOff, queryNamesAlt);\n\n } catch (RepositoryException e) {\n LOGGER.error(\"exception while building index\", e);\n } finally {\n connection.close();\n repository.shutDown();\n store.shutDown();\n return index;\n }\n }", "public void init()\r\n {\n readFile(inputFile);\r\n writeInfoFile();\r\n }", "@Override\n public void setupIndex() {\n List lst = DBClient.getList(\"SELECT a FROM AppMenu a WHERE a.moduleName='MyBranchMemberExt'\");\n if (lst!=null && !lst.isEmpty()) {\n return;\n }\n AppMenu.createAppMenuObj(\"MyBranchMemberExt\", \"Main\", \"Branch Member\", 110).save();\n AppMenu.createAppMenuObj(\"MyCenterMemberExt\", \"Main\", \"Center Member\", 120).save();\n AppMenu.createAppMenuObj(\"SearchAllMembersOnlyExt\", \"Main\", \"Search Member\", 130).save();\n AppMenu.createAppMenuObj(\"ReferenceForm\", \"Reference\", \"Reference\", 200).save();\n runUniqueIndex(8, \"firstName\", \"lastName\");\n }", "public BlackLabIndex wrapIndexReader(String indexName, IndexReader reader, boolean indexMode) throws ErrorOpeningIndex {\n return new BlackLabIndexIntegrated(indexName, this, reader, null, indexMode, false,\n null);\n }", "protected IndexSearcher getIndexSearcher(IndexReader reader) {\n return new IndexSearcher(reader);\n }" ]
[ "0.7367817", "0.719441", "0.709601", "0.67163837", "0.6704583", "0.64590293", "0.63617086", "0.63259465", "0.63155323", "0.626168", "0.62450707", "0.6160141", "0.61351204", "0.61067873", "0.6072199", "0.60606515", "0.59928656", "0.5974996", "0.5955831", "0.59224844", "0.5906844", "0.5893166", "0.5801302", "0.5794968", "0.5771305", "0.5766032", "0.575731", "0.57571137", "0.57552934", "0.5724342", "0.5723292", "0.5714354", "0.56807184", "0.5662668", "0.5639325", "0.56352824", "0.56352824", "0.56267285", "0.56202835", "0.5605446", "0.5603594", "0.5598045", "0.5588373", "0.5551801", "0.55400234", "0.5536094", "0.5527084", "0.5493878", "0.5465073", "0.5457458", "0.5455106", "0.5415192", "0.53952956", "0.5394927", "0.5392125", "0.5368", "0.53637654", "0.5358784", "0.5342555", "0.5326895", "0.5323996", "0.5312152", "0.5311513", "0.530461", "0.5293038", "0.52593976", "0.5254691", "0.5249383", "0.5238746", "0.52257615", "0.52174264", "0.5215106", "0.5195839", "0.5189743", "0.518416", "0.51786375", "0.51745844", "0.5171341", "0.51636314", "0.5155566", "0.51461154", "0.5141321", "0.51408833", "0.51365125", "0.51318765", "0.51307535", "0.51242244", "0.5114184", "0.51131916", "0.5112537", "0.511109", "0.51059765", "0.51057017", "0.5103156", "0.50969213", "0.5088115", "0.50880945", "0.50773126", "0.5077184", "0.5055488" ]
0.6667731
5
Create the wizard panel descriptor.
public CreateProjectPanel() { isFinished = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GuidedWizardPanel()\r\n\t{\t\r\n\t\tVerticalPanel panel = new VerticalPanel();\r\n\t\t\r\n\t\twizardPanel = new WizardPanel(panelList, groupLabels);\r\n\t\twizardPanel.addSaveListener(this);\r\n\t\tpanel.add(wizardPanel);\r\n\r\n\t\t// set up listener relationships\r\n\t\tsolvingForPanel.addSolvingForListener(powerPanel);\r\n\t\tsolvingForPanel.addSolvingForListener(perGroupSampleSizePanel);\r\n\t\tsolvingForPanel.addSolvingForListener(resultsPanel);\r\n\t\t// listeners for outcome measures\r\n\t\toutcomesPanel.addOutcomesListener(hypothesisIndependentPanel);\r\n\t\toutcomesPanel.addOutcomesListener(hypothesisRepeatedPanel);\r\n\t\toutcomesPanel.addOutcomesListener(meanDifferencesIndependentPanel);\r\n\t\toutcomesPanel.addOutcomesListener(meanDifferencesPanel);\r\n\t\toutcomesPanel.addOutcomesListener(variabilityIndependentPanel);\r\n\t\toutcomesPanel.addOutcomesListener(variabilityRepeatedPanel);\r\n\t\toutcomesPanel.addOutcomesListener(variabilityCovariateOutcomePanel);\r\n\t\t// listeners for predictor information\r\n\t\tcatPredictorsPanel.addPredictorsListener(relativeGroupSizePanel);\r\n\t\tcatPredictorsPanel.addPredictorsListener(hypothesisIndependentPanel);\r\n\t\tcatPredictorsPanel.addPredictorsListener(hypothesisRepeatedPanel);\r\n\t\tcatPredictorsPanel.addPredictorsListener(meanDifferencesIndependentPanel);\r\n\t\tcatPredictorsPanel.addPredictorsListener(meanDifferencesPanel);\r\n\t\t// listeners for relative group sizes\r\n\t\trelativeGroupSizePanel.addRelativeGroupSizeListener(hypothesisIndependentPanel);\r\n\t\trelativeGroupSizePanel.addRelativeGroupSizeListener(hypothesisRepeatedPanel);\r\n\t\t// listeners for baseline covariates\r\n\t\tcovariatePanel.addCovariateListener(meanDifferencesIndependentPanel);\r\n\t\tcovariatePanel.addCovariateListener(meanDifferencesPanel);\r\n\t\t// TODO: covariatePanel.addCovariateListener(meanDifferencesRepeatedPanel);\r\n\t\tcovariatePanel.addCovariateListener(hypothesisIndependentPanel);\r\n\t\tcovariatePanel.addCovariateListener(hypothesisRepeatedPanel);\r\n\t\tcovariatePanel.addCovariateListener(variabilityIndependentPanel);\r\n\t\t// TODO: covariatePanel.addCovariateListener(variabilityRepeatedPanel);\r\n\t\tcovariatePanel.addCovariateListener(variabilityCovariatePanel);\r\n\t\tcovariatePanel.addCovariateListener(variabilityCovariateOutcomePanel);\r\n\t\tcovariatePanel.addCovariateListener(optionsTestsPanel);\r\n\t\tcovariatePanel.addCovariateListener(optionsPowerMethodsPanel);\r\n\t\t// listeners for repeated measures \r\n\t\trepeatedMeasuresPanel.addRepeatedMeasuresListener(hypothesisIndependentPanel);\r\n\t\trepeatedMeasuresPanel.addRepeatedMeasuresListener(hypothesisRepeatedPanel);\r\n\t\t// listeners for hypotheses\r\n\t\thypothesisIndependentPanel.addHypothesisListener(meanDifferencesIndependentPanel);\r\n\t\thypothesisRepeatedPanel.addHypothesisListener(meanDifferencesRepeatedPanel);\r\n\t\t// group size listeners\r\n\t\trelativeGroupSizePanel.addRelativeGroupSizeListener(hypothesisIndependentPanel);\r\n\t\t// variability listeners\r\n\t\tvariabilityIndependentPanel.addVariabilityListener(variabilityCovariateOutcomePanel);\r\n\t\tvariabilityCovariatePanel.addVariabilityListener(variabilityCovariateOutcomePanel);\r\n\t\toptionsDisplayPanel.addChartOptionsListener(resultsPanel);\r\n\t\t// callbacks to fill in the power curve options screen\r\n\t\talphaPanel.addAlphaListener(optionsDisplayPanel);\r\n\t\toptionsTestsPanel.addTestListener(optionsDisplayPanel);\r\n\t\toptionsPowerMethodsPanel.addPowerMethodListener(optionsDisplayPanel);\r\n\t\toptionsPowerMethodsPanel.addQuantileListener(optionsDisplayPanel);\r\n\t\toptionsPowerMethodsPanel.addQuantileCheckboxListener(optionsDisplayPanel);\r\n\t\toptionsPowerMethodsPanel.addPowerCheckboxListener(optionsDisplayPanel);\r\n\t\tmeanDifferencesScalePanel.addBetaScaleListener(optionsDisplayPanel);\r\n\t\tperGroupSampleSizePanel.addPerGroupSampleSizeListener(optionsDisplayPanel);\r\n\t\trelativeGroupSizePanel.addRelativeGroupSizeListener(optionsDisplayPanel);\r\n\t\tvariabilityScalePanel.addSigmaScaleListener(optionsDisplayPanel);\r\n\t\t// initialize\r\n\t\tinitWidget(panel);\r\n\t}", "protected abstract AbstractPerfCakeEditWizard createWizard(IStructuredSelection selection);", "public WizardModel(){ \n wp = new HashMap<Object,WizardPanelDescriptor>();\n step = 1;\n }", "private void initDescriptor(WizardDescriptor settings) {\n settings.putProperty(ConfigureProjectPanel.IS_PROJECT_DIR_USED, null);\n settings.putProperty(ConfigureProjectPanel.PROJECT_DIR, null);\n settings.putProperty(ConfigureProjectPanel.PROJECT_NAME, null);\n settings.putProperty(ConfigureProjectPanel.SOURCES_FOLDER, null);\n settings.putProperty(ConfigureProjectPanel.LOCAL_SERVERS, null);\n settings.putProperty(ConfigureProjectPanel.PHP_VERSION, null);\n settings.putProperty(ConfigureProjectPanel.ENCODING, null);\n settings.putProperty(RunConfigurationPanel.VALID, null);\n settings.putProperty(RunConfigurationPanel.RUN_AS, null);\n settings.putProperty(RunConfigurationPanel.COPY_SRC_FILES, null);\n settings.putProperty(RunConfigurationPanel.COPY_SRC_TARGET, null);\n settings.putProperty(RunConfigurationPanel.COPY_SRC_TARGETS, null);\n settings.putProperty(RunConfigurationPanel.COPY_SRC_ON_OPEN, null);\n settings.putProperty(RunConfigurationPanel.URL, null);\n settings.putProperty(RunConfigurationPanel.INDEX_FILE, null);\n settings.putProperty(RunConfigurationPanel.REMOTE_CONNECTION, null);\n settings.putProperty(RunConfigurationPanel.REMOTE_DIRECTORY, null);\n settings.putProperty(RunConfigurationPanel.REMOTE_UPLOAD, null);\n settings.putProperty(RunConfigurationPanel.HOSTNAME, null);\n settings.putProperty(RunConfigurationPanel.PORT, null);\n settings.putProperty(RunConfigurationPanel.ROUTER, null);\n settings.putProperty(PhpFrameworksPanel.VALID, null);\n settings.putProperty(PhpFrameworksPanel.EXTENDERS, null);\n settings.putProperty(PhpExtenderPanel.VALID, null);\n settings.putProperty(RemoteConfirmationPanel.REMOTE_FILES, null);\n settings.putProperty(RemoteConfirmationPanel.REMOTE_CLIENT, null);\n }", "private Wizard(final FXFinder javafxFinder) {\n this.javafxFinder = javafxFinder;\n wizard = new JFrame(\"Apache SIS setup\");\n final Container content = wizard.getContentPane();\n content.setLayout(new BorderLayout());\n /*\n * Back, Next, Cancel button.\n */\n { // For keeping variables in a local scope.\n final Box buttons = Box.createHorizontalBox();\n buttons.setBorder(new EmptyBorder(9, 12, 9, 15)); // Top, left, bottom, right.\n backButton = createButton(buttons, BACK); buttons.add(Box.createHorizontalStrut(10));\n nextButton = createButton(buttons, NEXT); buttons.add(Box.createHorizontalStrut(30));\n cancelButton = createButton(buttons, CANCEL);\n backButton.setEnabled(false);\n\n final JPanel bottom = new JPanel(new BorderLayout());\n bottom.add(new JSeparator(), BorderLayout.NORTH);\n bottom.add(buttons, java.awt.BorderLayout.EAST);\n content.add(bottom, BorderLayout.SOUTH);\n }\n /*\n * Navigation panel on the left side with the following titles\n * (currently shown page is highlighted):\n *\n * - Introduction\n * - Download\n * - Set directory\n * - Summary\n */\n final WizardPage[] pages = WizardPage.values();\n {\n titles = new JLabel[pages.length];\n final EmptyBorder padding = new EmptyBorder(3, 0, 3, 0);\n final Box summary = Box.createVerticalBox();\n for (int i=0; i<pages.length; i++) {\n final String title = (i == 0 ? SELECTED_TITLE_BULLET : TITLE_BULLET) + pages[i].title;\n final JLabel label = new JLabel(title, JLabel.LEFT);\n label.setForeground(i == 0 ? SELECTED_TITLE_COLOR : TITLE_COLOR);\n label.setBorder(padding);\n summary.add(titles[i] = label);\n }\n final JPanel pane = new JPanel();\n pane.setBackground(new Color(169, 204, 227));\n pane.setBorder(new EmptyBorder(40, 15, 9, 24)); // Top, left, bottom, right.\n pane.add(summary);\n content.add(pane, BorderLayout.WEST);\n }\n /*\n * The main content where text is shown, together with download button, directory chooser, etc.\n * The content of each page is created by `createPage(…)`. They all have in common to start with\n * a description text formatted in HTML.\n */\n {\n final Font font = new Font(Font.SERIF, Font.PLAIN, 14);\n javafxPath = new JLabel();\n javafxPath.setBorder(JAVAFX_PATH_BORDER);\n javafxPathError = new JLabel();\n javafxPathError.setForeground(Color.RED);\n javafxPathError.setFont(font);\n inflateProgress = new JProgressBar();\n cardPanel = new JPanel(new CardLayout());\n cardPanel.setBorder(new EmptyBorder(30, 30, 9, 30)); // Top, left, bottom, right.\n cardPanel.setBackground(Color.WHITE);\n for (final WizardPage page : pages) {\n cardPanel.add(createPage(page, font), page.name());\n // The initially visible component is the first added.\n }\n currentPage = pages[0];\n content.add(cardPanel, BorderLayout.CENTER);\n }\n wizard.setSize(WIDTH, 500); // Must be before `setLocationRelativeTo(…)`.\n wizard.setResizable(false);\n wizard.setLocationRelativeTo(null);\n wizard.addWindowListener(new WindowAdapter() {\n @Override public void windowClosing(WindowEvent event) {\n javafxFinder.cancel();\n }\n });\n }", "@Override\n\tpublic void create(IWizardEntity entity, WizardRunner runner) {\n\t\t\n\t}", "private WizardDescriptor.Panel[] getPanels() {\n Project project = Templates.getProject(wizard);\n File f1 = new File(\"src\");\n \n // Templates.setTargetFolder(wizard);\n\n Sources sources = project.getLookup().lookup(Sources.class);\n SourceGroup[] sg = sources.getSourceGroups(Sources.TYPE_GENERIC);\n \n if (panels == null) {\n targetChooserPanel = \n Templates.createSimpleTargetChooser(project, sg);\n panels = new WizardDescriptor.Panel[]{\n targetChooserPanel\n };\n String[] steps = createSteps();\n for (int i = 0; i < panels.length; i++) {\n Component c = panels[i].getComponent();\n if (steps[i] == null) {\n // Default step name to component name of panel. Mainly\n // useful for getting the name of the target chooser to\n // appear in the list of steps.\n steps[i] = c.getName();\n }\n if (c instanceof JComponent) { // assume Swing components\n JComponent jc = (JComponent) c;\n // Sets step number of a component\n // TODO if using org.openide.dialogs >= 7.8, can use WizardDescriptor.PROP_*:\n jc.putClientProperty(\"WizardPanel_contentSelectedIndex\", Integer.valueOf(i));\n // Sets steps names for a panel\n jc.putClientProperty(\"WizardPanel_contentData\", steps);\n // Turn on subtitle creation on each step\n jc.putClientProperty(\"WizardPanel_autoWizardStyle\", Boolean.TRUE);\n // Show steps on the left side with the image on the background\n jc.putClientProperty(\"WizardPanel_contentDisplayed\", Boolean.TRUE);\n // Turn on numbering of all steps\n jc.putClientProperty(\"WizardPanel_contentNumbered\", Boolean.TRUE);\n }\n }\n }\n return panels;\n }", "public void testRegisterWizardPanel() {\n System.out.println(\"registerWizardPanel\");\n Object id = null;\n WizardPanelDescriptor panel = null;\n Wizard instance = new Wizard();\n instance.registerWizardPanel(id, panel);\n }", "private WizardDescriptor.Panel[] getPanels() {\n if (panels == null) {\n panels = new WizardDescriptor.Panel[]{\n new TCRWizardPanel1(),\n// new TCRWizardPanel2(),\n new UtilWizardPanel1(),\n new UtilWizardPanel2()\n };\n String[] steps = createSteps();\n for (int i = 0; i < panels.length; i++) {\n Component c = panels[i].getComponent();\n if (steps[i] == null) {\n // Default step name to component name of panel. Mainly\n // useful for getting the name of the target chooser to\n // appear in the list of steps.\n steps[i] = c.getName();\n }\n if (c instanceof JComponent) { // assume Swing components\n JComponent jc = (JComponent) c;\n // Sets step number of a component\n // TODO if using org.openide.dialogs >= 7.8, can use WizardDescriptor.PROP_*:\n jc.putClientProperty(\"WizardPanel_contentSelectedIndex\", new Integer(i));\n // Sets steps names for a panel\n jc.putClientProperty(\"WizardPanel_contentData\", steps);\n // Turn on subtitle creation on each step\n jc.putClientProperty(\"WizardPanel_autoWizardStyle\", Boolean.TRUE);\n // Show steps on the left side with the imageWithChars on the background\n jc.putClientProperty(\"WizardPanel_contentDisplayed\", Boolean.TRUE);\n // Turn on numbering of all steps\n jc.putClientProperty(\"WizardPanel_contentNumbered\", Boolean.TRUE);\n }\n }\n }\n return panels;\n }", "public IWizard getWizard();", "public AddValidatorWizard() {\n super();\n initPages();\n setWindowTitle(Messages.title_newValidator);\n }", "public WizardPanelDescriptor getPanelDesc(Object id){\n return (WizardPanelDescriptor) wp.get(id);\n }", "private WizardDescriptor.Panel[] getPanels() {\n if (panels == null) {\n panels = new WizardDescriptor.Panel[] {\n new WebLogicDDWizardPanel()\n };\n String[] steps = createSteps();\n for (int i = 0; i < panels.length; i++) {\n Component c = panels[i].getComponent();\n if (steps[i] == null) {\n // Default step name to component name of panel. Mainly\n // useful for getting the name of the target chooser to\n // appear in the list of steps.\n steps[i] = c.getName();\n }\n if (c instanceof JComponent) { // assume Swing components\n JComponent jc = (JComponent) c;\n // Sets step number of a component\n jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, i); // NOI18N\n // Sets steps names for a panel\n jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DATA, steps); // NOI18N\n // Turn on subtitle creation on each step\n jc.putClientProperty(WizardDescriptor.PROP_AUTO_WIZARD_STYLE, Boolean.TRUE); // NOI18N\n // Show steps on the left side with the image on the background\n jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DISPLAYED, Boolean.TRUE); // NOI18N\n // Turn on numbering of all steps\n jc.putClientProperty(WizardDescriptor.PROP_CONTENT_NUMBERED, Boolean.TRUE); // NOI18N\n }\n }\n }\n return panels;\n }", "@Override\n public void storeSettings(WizardDescriptor wiz) {\n wiz.putProperty(NewDetectorWizardAction.PROP_NAME_CREATE_VIA_TEMPLATE, getComponent().getViaDetectorTemplate().isSelected());\n wiz.putProperty(PROP_NAME_DETECTOR_NAME, getComponent().getDetectorName().getText());\n wiz.putProperty(PROP_NAME_DETECTOR_DESCRIPTION, getComponent().getDetectorDescription().getText());\n wiz.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, null);\n }", "protected JPanel createCsvSchemaConfigPanel() {\n\t\tJLabel lblSkip = new JLabel(RunnerMessages.getInstance().GenericInputSchemaEditDlg_lbl_SkipRecords + \" : \");\n\t\tSpinnerNumberModel model = new SpinnerNumberModel(0, MIN_SKIP_RECORDS, MAX_SKIP_RECORDS, 1);\n\t\t_spinSkipRecords = new JSpinner(model);\n\t\t\n\t\t// create desc textbox\n\t\tJLabel lblDesc = new JLabel(RunnerMessages.getInstance().GenericFilterEditDlg_name_Desc + \" : \");\n\t\t_txtDesc = new JTextField();\n\t\t\n\t\t// create buttons\n\t\t_btnComposeByFile = new JButton(RunnerMessages.getInstance().GenericInputSchemaEditDlg_btn_ComposeByCsv);\n\t\t_btnFieldAdd = CommonResources.createIconButton(CommonResources.ICON_ADD, RunnerMessages.getInstance().GenericInputSchemaEditDlg_btn_AddField);\n\t\t_btnFieldDelete = CommonResources.createIconButton(CommonResources.ICON_DELETE, CommonMessages.getInstance().Button_Delete);\n\t\t_btnFieldMoveLeft = CommonResources.createIconButton(CommonResources.ICON_ARROW_LEFT, CommonMessages.getInstance().Button_Left);\n\t\t_btnFieldMoveRight = CommonResources.createIconButton(CommonResources.ICON_ARROW_RIGHT, CommonMessages.getInstance().Button_Right);\n\t\t\n\t\t// create box\n\t\tBox box = Box.createHorizontalBox();\n\t\tbox.add(Box.createGlue());\n\t\tbox.add(Box.createHorizontalStrut(5));\n\t\tbox.add(_btnComposeByFile);\n\t\tbox.add(Box.createHorizontalStrut(5));\n\t\tbox.add(_btnFieldAdd);\n\t\tbox.add(Box.createHorizontalStrut(2));\n\t\tbox.add(_btnFieldDelete);\n\t\tbox.add(Box.createHorizontalStrut(2));\n\t\tbox.add(_btnFieldMoveLeft);\n\t\tbox.add(Box.createHorizontalStrut(2));\n\t\tbox.add(_btnFieldMoveRight);\n\t\t\n\t\t// cretae panel\n\t\tJPanel pnl = new JPanel(new GridBagLayout());\n\t\tGridBagConstraints gbc = new GridBagConstraints();\n\t\tgbc.gridwidth = 1;\n\t\tgbc.gridheight = 1;\n\t\tgbc.weightx = 0;\n\t\tgbc.weighty = 0;\n\t\tgbc.anchor = GridBagConstraints.EAST;\n\t\tgbc.fill = GridBagConstraints.NONE;\n\t\tgbc.gridx = 0;\n\t\tgbc.gridy = 0;\n\t\tgbc.insets = new Insets(0, 0, 5, 0);\n\t\t//--- txtbox\n\t\tpnl.add(lblDesc, gbc);\n\t\tgbc.gridx++;\n\t\tgbc.gridwidth = 2;\n\t\tgbc.weightx = 1;\n\t\tgbc.fill = GridBagConstraints.HORIZONTAL;\n\t\tpnl.add(_txtDesc, gbc);\n\t\tgbc.weightx = 0;\n\t\tgbc.fill = GridBagConstraints.NONE;\n\t\tgbc.gridwidth = 1;\n\t\tgbc.gridy++;\n\t\tgbc.gridx = 0;\n\t\tgbc.insets = new Insets(0, 0, 0, 0);\n\t\t//--- spin\n\t\tpnl.add(lblSkip, gbc);\n\t\tgbc.gridx++;\n\t\tpnl.add(_spinSkipRecords, gbc);\n\t\tgbc.gridx++;\n\t\t//--- buttons\n\t\tgbc.weightx = 1;\n\t\tgbc.fill = GridBagConstraints.HORIZONTAL;\n\t\tpnl.add(box, gbc);\n\t\t\n\t\treturn pnl;\n\t}", "@Override\r\n\tpublic void createControl(Composite parent) {\n\t\t\r\n\t\tComposite container = new Composite(parent, SWT.NONE);\r\n\t\tGridData gd = new GridData(GridData.FILL_HORIZONTAL);\r\n\t\tcontainer.setLayout(new GridLayout(2, false));\r\n\t\t\r\n\t\tLabel nameLabel = new Label(container, SWT.NULL);\r\n\t\tnameText = new Text(container, SWT.BORDER | SWT.SINGLE);\r\n\t\tnameLabel.setText(BundleInternationalization.getString(\"NameLabel\")+\":\");\r\n\t\tnameText.setLayoutData(gd);\r\n\t\t// Listener to validate the project name when user finishes writing\r\n\t\tnameText.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tLabel descriptionLabel = new Label(container, SWT.NULL);\r\n\t\tdescriptionText = new Text(container, SWT.BORDER | SWT.SINGLE);\r\n\t\tdescriptionLabel.setText(BundleInternationalization.getString(\"DescriptionLabel\")+\":\");\r\n\t\tdescriptionText.setLayoutData(gd);\r\n\t\t// Listener to validate the project description when user finishes writing\r\n\t\tdescriptionText.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t}\r\n\t\t});\t\t\r\n\t\t\r\n\t\tLabel startDateLabel = new Label(container, SWT.NULL);\r\n\t\tstartDateText = new DateTime(container, SWT.DATE | SWT.BORDER | SWT.SINGLE);\r\n\t\tstartDateLabel.setText(BundleInternationalization.getString(\"StartDateLabel\")+\":\");\t\r\n\t\tstartDateText.setLayoutData(gd);\r\n\t\t\r\n\r\n\t\tLabel endDateLabel = new Label(container, SWT.NULL);\r\n\t\tendDateText = new DateTime(container, SWT.DATE | SWT.BORDER | SWT.SINGLE);\r\n\t\tendDateLabel.setText(BundleInternationalization.getString(\"EndDateLabel\")+\":\");\t\r\n\t\tendDateText.setLayoutData(gd);\r\n\t\t\r\n\t\tLabel budgetLabel = new Label(container, SWT.NULL);\r\n\t\tbudgetText = new Text(container, SWT.BORDER | SWT.SINGLE);\r\n\t\tbudgetLabel.setText(BundleInternationalization.getString(\"BudgetLabel\")+\":\");\r\n\t\tbudgetText.setLayoutData(gd);\r\n\t\tbudgetText.addListener (SWT.Verify, new Listener () {\r\n public void handleEvent (Event event) {\r\n \tvalidateDouble(event);\r\n }\r\n\t\t}); \r\n\t\tbudgetText.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tLabel quantityLinesLabel = new Label(container, SWT.NULL);\r\n\t\tquantityLinesText = new Text(container, SWT.BORDER | SWT.SINGLE);\r\n\t\tquantityLinesLabel.setText(BundleInternationalization.getString(\"NumberCodeLinesLabel\")+\":\");\r\n\t\tquantityLinesText.setLayoutData(gd);\r\n\t\tquantityLinesText.addListener (SWT.Verify, new Listener () {\r\n public void handleEvent (Event event) {\r\n \tvalidateInt(event);\r\n }\r\n\r\n\t\t});\r\n\t\tquantityLinesText.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tLabel domainLabel = new Label(container, SWT.NULL);\r\n\t\tdomainText = new Text(container, SWT.BORDER | SWT.SINGLE);\r\n\t\tdomainLabel.setText(BundleInternationalization.getString(\"DomainLabel\")+\":\");\r\n\t\tdomainText.setLayoutData(gd);\r\n\t\t// Listener to validate the domain text when user finishes writing\r\n\t\tdomainText.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tLabel progLanguageLabel = new Label(container, SWT.NULL);\r\n\t\tprogLanguageCombo = new Combo(container, SWT.DROP_DOWN | SWT.READ_ONLY);\r\n\t\tprogLanguageLabel.setText(BundleInternationalization.getString(\"ProgrammingLanguageLabel\")+\":\");\r\n\t\t// progLanguageCombo.setLayoutData(gd);\t\r\n\t\tprogLanguageCombo.setItems (new String [] {\"Java\", \"Ada\", \"C++\", \"C#\", \"Cobol\", \"ASP\", \"JSP\"});\r\n\t\tprogLanguageCombo.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tLabel estimatedHoursLabel = new Label(container, SWT.NULL);\r\n\t\testimatedHoursText = new Text(container, SWT.BORDER | SWT.SINGLE);\r\n\t\testimatedHoursLabel.setText(BundleInternationalization.getString(\"EstimatedHoursLabel\")+\":\");\r\n\t\testimatedHoursText.setLayoutData(gd);\r\n\t\testimatedHoursText.addListener (SWT.Verify, new Listener () {\r\n public void handleEvent (Event event) {\r\n \tvalidateInt(event);\r\n }\r\n\r\n\t\t});\r\n\t\testimatedHoursText.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\twizardChanged();\r\n\t\tsetControl(container);\r\n\r\n\t}", "public WizardPanel(String wizardTitle, String wizardDescription, Icon wizardIcon, Icon welcomeIcon, Dimension wizarddimensions,\n\t\t\tJLabel welcomeLabel) {\n\t\tthis.wizardIcon = wizardIcon;\n\t\tthis.welcomeTitle = wizardTitle;\n\t\tthis.welcomeDescription = wizardDescription;\n\t\twelcomePage = new WizardWelcomePanel(welcomeTitle, welcomeDescription, welcomeIcon, welcomeLabel);\n\t\tthis.finishedPage = new WizardFinishPanel();\n\t\tfinishedPage.setIcon(welcomeIcon);\n\t\ttry {\n\t\t\tjbInit();\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "private void setUpPanel() {\n\n this.add(nameLabel);\n this.add(showMetadataButton);\n this.add(compressFilesButton);\n this.add(decompressFilesButton);\n this.add(compressionResultLabel);\n this.add(messageShorteningButton);\n this.add(messageShorteningResultLabel);\n }", "public void setCurrentPanelDesc(Object id){ \n currentPanel = (WizardPanelDescriptor) wp.get(id);\n }", "public NewTestWizardPage() {\n\t\tsuper(true, \"New Groovy Test Settings\");\n\n\t\tsetTitle(\"Groovy Test Class\");\n\t\tsetDescription(\"Create a new Groovy unit test class\");\n\t}", "public WizardPanelDescriptor getCurrentPanelDesc(){\n return currentPanel;\n }", "protected DummyWizardPage()\n {\n super( \"\" ); //$NON-NLS-1$\n setTitle( Messages.getString( \"NewEntryWizard.NoConnectonSelected\" ) ); //$NON-NLS-1$\n setDescription( Messages.getString( \"NewEntryWizard.NoConnectonSelectedDescription\" ) ); //$NON-NLS-1$\n setImageDescriptor( BrowserCommonActivator.getDefault().getImageDescriptor(\n BrowserCommonConstants.IMG_ENTRY_WIZARD ) );\n setPageComplete( true );\n }", "public ProjectWizardModel(WizardDescriptor wiz, String wizType) {\n super(wiz,wizType);\n }", "@Override\n\tpublic void createControl(Composite parent) {\n\t\tComposite container = new Composite(parent, SWT.NULL);\n\n\t\tsetControl(container);\n\n\t\tString username = \"\";\n\t\tString password = \"\";\n\t\ttry {\n\t\t\tString[] array = window.ds.getURI().getUserInfo().split(\":\");\n\t\t\tusername = array[0];\n\t\t\tpassword = array[1];\n\t\t} catch (Exception e) {\n\t\t}\n\n\t\tLabel lblUsername = new Label(container, SWT.NONE);\n\t\tlblUsername.setBounds(10, 52, 75, 13);\n\t\tlblUsername.setText(\"Username\");\n\n\t\tusernameText = new Text(container, SWT.BORDER);\n\t\tusernameText.setText(username);\n\t\tusernameText.addModifyListener(new ModifyListener() {\n\t\t\t@Override\n\t\t\tpublic void modifyText(ModifyEvent arg0) {\n\t\t\t\tgetWizard().getContainer().updateButtons();\n\t\t\t}\n\t\t});\n\n\t\tusernameText.setBounds(10, 71, 187, 19);\n\t\tusernameText.setFocus();\n\n\t\tLabel lblPassword = new Label(container, SWT.NONE);\n\t\tlblPassword.setBounds(10, 96, 75, 13);\n\t\tlblPassword.setText(\"Password\");\n\n\t\tpasswordText = new Text(container, SWT.BORDER | SWT.PASSWORD);\n\t\tpasswordText.setText(password);\n\t\tpasswordText.addModifyListener(new ModifyListener() {\n\t\t\t@Override\n\t\t\tpublic void modifyText(ModifyEvent arg0) {\n\t\t\t\tgetWizard().getContainer().updateButtons();\n\t\t\t}\n\t\t});\n\n\t\tpasswordText.setBounds(10, 115, 187, 19);\n\t\tControl[] list = null;\n\t\t\n\t\tif (window.ds.usesComponent(IUserCreation.class)) {\n\t\t\tbtnCreateAnNew = new Button(container, SWT.NONE);\n\t\t\tbtnCreateAnNew.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\tLOG.info(\"Create an account\");\n\t\t\t\t\tSignInWithAuthenticationWizard wizard = (SignInWithAuthenticationWizard) getWizard();\n\t\t\t\t\twizard.getWizardDialog().close();\n\t\t\t\t\twindow.newUserAction.run();\n\t\t\t\t\tLOG.info(\"Create an account 2\");\n\t\t\t\t}\n\t\t\t});\n\t\t\tbtnCreateAnNew.setBounds(10, 10, 152, 25);\n\t\t\tbtnCreateAnNew.setText(\"Create a new account\");\n\t\t\tlist = new Control[] { btnCreateAnNew, usernameText,\n\t\t\t\t\tpasswordText };\n\t\t\tcontainer.setTabList(list);\n\t\t} else {\n\t\t\tlist = new Control[] { usernameText,\n\t\t\t\t\tpasswordText };\n\t\t\tcontainer.setTabList(list);\n\t\t}\n\n\t\t\n\t\t\n\t}", "public CreateAccountPanel() {\n initComponents();\n initializeDateChooser();\n }", "public AbstractWizardPage()\n {\n super(true);\n }", "protected WizardDescriptor.Panel[] getPanels() {\n if (panels == null) {\n panels = new WizardDescriptor.Panel[]{\n new ProjectImportWizardPanel1()\n };\n String[] steps = new String[panels.length];\n for (int i = 0; i < panels.length; i++) {\n Component c = panels[i].getComponent();\n // Default step name to component name of panel. Mainly useful\n // for getting the name of the target chooser to appear in the\n // list of steps.\n steps[i] = c.getName();\n if (c instanceof JComponent) { // assume Swing components\n JComponent jc = (JComponent) c;\n // Sets step number of a component\n jc.putClientProperty(\"WizardPanel_contentSelectedIndex\", new Integer(i));\n // Sets steps names for a panel\n jc.putClientProperty(\"WizardPanel_contentData\", steps);\n // Turn on subtitle creation on each step\n jc.putClientProperty(\"WizardPanel_autoWizardStyle\", Boolean.TRUE);\n // Show steps on the left side with the image on the background\n jc.putClientProperty(\"WizardPanel_contentDisplayed\", Boolean.FALSE);\n // Turn on numbering of all steps\n jc.putClientProperty(\"WizardPanel_contentNumbered\", Boolean.TRUE);\n }\n }\n }\n return panels;\n }", "public WizardPanel(String wizardTitle, String wizardDescription, Icon wizardIcon, Icon welcomeIcon,\n\t\t\tDimension wizarddimensions) {\n\t\tthis(wizardTitle, wizardDescription, wizardIcon, welcomeIcon, wizarddimensions, null);\n\t}", "public void createControl(Composite parent) {\n\t\tComposite comp = new Composite(parent, SWT.NONE);\r\n\t\tsetControl(comp);\r\n\r\n\t\tLaunchUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(), ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_MAIN_TAB);\r\n\r\n\t\tGridLayout topLayout = new GridLayout();\r\n\t\ttopLayout.marginHeight = 10;\r\n\t\tcomp.setLayout(topLayout);\r\n\t\t\r\n\t\tcreateTargetCommGroup(comp, 1);\r\n\t\tcreateVerticalSpacer(comp, 1);\r\n\t\tcreateTargetInfoGroup(comp, 1);\r\n\t\t\r\n\t\tLaunchUIPlugin.setDialogShell(parent.getShell());\r\n\t}", "private Panel designPanel() {\n Panel panel = new Panel();\n contentLayout = new FormLayout();\n wrapperLayout = new VerticalLayout();\n numberOfDatasetsBox = new ComboBox<>();\n numberOfReplicatesBox = new ComboBox<>(\"Select number of Replicates\");\n\n\n List<Integer> possibleDatasetNumber =\n IntStream.rangeClosed(1, 100).boxed().collect(Collectors.toList());\n numberOfDatasetsBox.setItems(possibleDatasetNumber);\n\n List<Integer> possibleReplicateNumber =\n IntStream.rangeClosed(1, 100).boxed().collect(Collectors.toList());\n numberOfReplicatesBox.setItems(possibleReplicateNumber);\n\n datasetAccordion = new Accordion();\n datasetAccordion.setWidth(\"100%\");\n\n panel.setContent(wrapperLayout);\n return panel;\n }", "private FactoryViewPanel buildAdvancedPanel()\r\n {\r\n FactoryViewPanel panel = new FactoryViewPanel();\r\n if (myIsImport)\r\n {\r\n addField(panel, myDataSourceModel.getIncludeInTimeline());\r\n }\r\n JPanel refreshPanel = buildRefreshPanel();\r\n panel.addLabelComponent(ControllerFactory.createLabel(myDataSourceModel.getAutoRefresh(), refreshPanel.getComponent(0)),\r\n refreshPanel);\r\n addField(panel, myDataSourceModel.getPointType());\r\n addField(panel, myDataSourceModel.getFeatureAltitude());\r\n addField(panel, myDataSourceModel.getPolygonFill());\r\n addField(panel, myDataSourceModel.getScalingMethod());\r\n addField(panel, myDataSourceModel.getShowLabels());\r\n return panel;\r\n }", "public ProjectWizardModel(WizardDescriptor wiz) {\n this(wiz, PROJECT_WIZARD_TYPE );\n }", "public StepPanel() {\r\n\t\t\tsetPreferredSize(new Dimension(100, 100));\r\n\t\t}", "protected ProjectCreationDescriptor() {\n\t}", "public void createControl(Composite parent) {\r\n \t\tinitializeDialogUnits(parent);\r\n \r\n \t\tComposite root = new Composite(parent, SWT.NONE);\r\n \t\tGridData gd = new GridData();\r\n \r\n \t\tgd.horizontalSpan = 1;\r\n \t\tgd.horizontalAlignment = GridData.FILL;\r\n \t\tgd.grabExcessHorizontalSpace = true;\r\n \t\tgd.grabExcessVerticalSpace = false;\r\n \r\n \t\tGridLayout gridLayout = new GridLayout(1, false);\r\n \t\troot.setLayout(gridLayout);\r\n \t\tGroup generalGroup = new Group(root, SWT.NONE);\r\n \t\tgeneralGroup.setLayoutData(gd);\r\n \t\tgeneralGroup.setText(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_GENERAL);\r\n \t\tgridLayout = new GridLayout(3, false);\r\n \r\n \t\tgeneralGroup.setLayout(gridLayout);\r\n \t\tregisterEditor(jBossSeamHomeEditor, generalGroup, 3);\r\n \t\tregisterEditor(jBossAsDeployAsEditor, generalGroup, 3);\r\n \r\n \t\tgd = new GridData();\r\n \t\tgd.horizontalSpan = 1;\r\n \t\tgd.horizontalAlignment = GridData.FILL;\r\n \t\tgd.grabExcessHorizontalSpace = true;\r\n \t\tgd.grabExcessVerticalSpace = false;\r\n \r\n \t\tGroup databaseGroup = new Group(root, SWT.NONE);\r\n \t\tdatabaseGroup.setLayoutData(gd);\r\n \t\tdatabaseGroup.setText(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_DATABASE);\r\n \t\tgridLayout = new GridLayout(4, false);\r\n \t\tdatabaseGroup.setLayout(gridLayout);\r\n \t\tregisterEditor(jBossHibernateDbTypeEditor, databaseGroup, 4);\r\n \t\tregisterEditor(connProfileSelEditor, databaseGroup, 4);\r\n \t\tregisterEditor(dbSchemaName, databaseGroup, 4);\r\n \t\tregisterEditor(dbCatalogName, databaseGroup, 4);\r\n \t\tregisterEditor(dbTablesExists, databaseGroup, 4);\r\n \t\tregisterEditor(recreateTablesOnDeploy, databaseGroup, 4);\r\n \t\t// registerEditor(pathToJdbcDriverJar,databaseGroup, 4);\r\n \r\n \t\tGroup generationGroup = new Group(root, SWT.NONE);\r\n \t\tgd = new GridData();\r\n \t\tgd.horizontalSpan = 1;\r\n \t\tgd.horizontalAlignment = GridData.FILL;\r\n \t\tgd.grabExcessHorizontalSpace = true;\r\n \t\tgd.grabExcessVerticalSpace = false;\r\n \r\n \t\tgenerationGroup.setLayoutData(gd);\r\n \t\tgenerationGroup.setText(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_CODE_GENERATION);\r\n \t\tgridLayout = new GridLayout(3, false);\r\n \t\tgenerationGroup.setLayout(gridLayout);\r\n \t\tregisterEditor(sessionBeanPkgNameditor, generationGroup, 3);\r\n \t\tregisterEditor(entityBeanPkgNameditor, generationGroup, 3);\r\n \t\tregisterEditor(testsPkgNameditor, generationGroup, 3);\r\n \r\n \t\tsetControl(root);\r\n \t\tNewProjectDataModelFacetWizard wizard = (NewProjectDataModelFacetWizard) getWizard();\r\n \r\n \t\tIDataModel model = wizard.getDataModel();\r\n \r\n \t\tif (validatorDelegate == null) {\r\n \t\t\tvalidatorDelegate = new DataModelValidatorDelegate(this.model, this);\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(jBossSeamHomeEditor\r\n \t\t\t\t\t.getName(),\r\n \t\t\t\t\tValidatorFactory.SEAM_RUNTIME_NAME_VALIDATOR);\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(connProfileSelEditor\r\n \t\t\t\t\t.getName(),\r\n \t\t\t\t\tValidatorFactory.CONNECTION_PROFILE_VALIDATOR);\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(testsPkgNameditor\r\n \t\t\t\t\t.getName(), new PackageNameValidator(testsPkgNameditor\r\n \t\t\t\t\t.getName(), \"tests\")); //$NON-NLS-1$\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(entityBeanPkgNameditor\r\n \t\t\t\t\t.getName(), new PackageNameValidator(entityBeanPkgNameditor\r\n \t\t\t\t\t.getName(), \"entity beans\")); //$NON-NLS-1$\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(sessionBeanPkgNameditor\r\n \t\t\t\t\t.getName(), new PackageNameValidator(\r\n \t\t\t\t\tsessionBeanPkgNameditor.getName(), \"session beans\")); //$NON-NLS-1$\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(\r\n \t\t\t\t\tIFacetDataModelProperties.FACET_PROJECT_NAME, \r\n \t\t\t\t\tnew ProjectNamesDuplicationValidator(\r\n \t\t\t\t\t\t\tIFacetDataModelProperties.FACET_PROJECT_NAME));\r\n \t\t}\r\n \r\n \t\tjBossHibernateDbTypeEditor\r\n \t\t\t\t.addPropertyChangeListener(new PropertyChangeListener() {\r\n \t\t\t\t\tpublic void propertyChange(PropertyChangeEvent evt) {\r\n \t\t\t\t\t\tSeamInstallWizardPage.this.model.setProperty(ISeamFacetDataModelProperties.HIBERNATE_DIALECT,\r\n \t\t\t\t\t\tHIBERNATE_HELPER.getDialectClass(evt.getNewValue().toString()));\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t);\r\n \r\n\r\n\r\n Dialog.applyDialogFont(parent);\r\n \t}", "private void initComponents() {\n wizardManager = new JPanel();\n\n //======== this ========\n setTitle(\"Create New Event\");\n setResizable(false);\n setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);\n Container contentPane = getContentPane();\n contentPane.setLayout(new CardLayout(10, 10));\n\n //======== wizardManager ========\n {\n wizardManager.setBorder(new EmptyBorder(0, 0, 0, 0));\n wizardManager.setLayout(new CardLayout());\n }\n contentPane.add(wizardManager, \"card1\");\n pack();\n setLocationRelativeTo(getOwner());\n // JFormDesigner - End of component initialization //GEN-END:initComponents\n }", "@Override\n public List<UpdatableItem> createPopup() {\n final List<UpdatableItem> items = new ArrayList<UpdatableItem>();\n \n /* host wizard */\n final MyMenuItem newHostWizardItem =\n new MyMenuItem(Tools.getString(\"EmptyBrowser.NewHostWizard\"),\n HOST_ICON,\n null,\n new AccessMode(ConfigData.AccessType.RO, false),\n new AccessMode(ConfigData.AccessType.RO, false)) {\n private static final long serialVersionUID = 1L;\n \n @Override\n public String enablePredicate() {\n return null;\n }\n \n @Override\n public void action() {\n final AddHostDialog dialog = new AddHostDialog(new Host());\n dialog.showDialogs();\n }\n };\n items.add(newHostWizardItem);\n Tools.getGUIData().registerAddHostButton(newHostWizardItem);\n return items;\n }", "public NewEntryWizard()\n {\n setNeedsProgressMonitor( true );\n }", "public NewReviewWizard() {\n super();\n setNeedsProgressMonitor(true);\n setWindowTitle(\"New Review\");\n setHelpAvailable(false);\n }", "public ButtonWizard(DialogueSystem system) {\n this.system = system;\n currentAction = new JLabel();\n currentJoint = new JLabel();\n }", "private void setupPanel()\n\t{\n\t\tthis.setLayout(baseLayout);\n\t\tthis.add(firstButton);\n\t\tthis.add(firstField);\n\t}", "public CartogramWizard ()\n\t{\n\t\n\t\t// Set the window parameters.\n\t\tthis.setTitle(AppContext.shortProgramName + \" _ Cartogram Wizard\");\n\t\tthis.setSize(640, 480);\n\t\tthis.setLocation(30, 40);\n\t\tthis.setResizable(false);\n\t\tthis.setLayout(null);\n\t\t//this.setModal(true);\n\t\tthis.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);\n\t\tthis.addWindowListener(new CartogramWizardWindowListener());\n\t\t\n\t\t\n\t\t// Adding the cartogram wizard to the app context.\n\t\tAppContext.cartogramWizard = this;\n\t\t\n\t\t\n\t\t// Add icon panel at the left of the wizard window.\n\t\t// This panel contains the ScapeToad icon.\n\t\tif (mScapeToadIconPanel == null)\n\t\t{\n\t\t\tmScapeToadIconPanel = new ScapeToadIconPanel(this);\n\t\t}\n\t\t\n\t\tmScapeToadIconPanel.setLocation(30, 90);\n\t\tthis.add(mScapeToadIconPanel);\n\t\t\n\t\t\n\t\t\n\t\t// Add title panel.\n\t\tCartogramWizardTitlePanel titlePanel =\n\t\t\tnew CartogramWizardTitlePanel(this);\n\t\t\n\t\ttitlePanel.setLocation(30, 20);\n\t\tthis.add(titlePanel);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Add icon panel at the left of the wizard window.\n\t\t// This panel contains the ScapeToad icon.\n\t\tmWizardStepIconPanel = new WizardStepIconPanel(this);\n\t\tmWizardStepIconPanel.setLocation(380, 20);\n\t\tthis.add(mWizardStepIconPanel);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Ajouter l'introduction au wizard.\n\t\t// Explication des étapes à suivre :\n\t\t// 1. Sélectionner la couche des polygones (master layer).\n\t\t// 2. Sélectionner l'information statistique.\n\t\t// 3. Sélection des couches à transformer simultanément.\n\t\t\n\t\tmPanelZero = new CartogramWizardPanelZero(this);\n\t\tthis.getContentPane().add(mPanelZero);\n\t\t\n\t\tmCurrentStep = 0;\n\t\t\n\t\t\n\t\t\n\t\t// Add the running panel which is already created.\n\t\tmRunningPanel.setVisible(false);\n\t\tthis.add(mRunningPanel);\n\t\t\n\t\t\n\t\t// Add the finished panel which is already created.\n\t\tmFinishedPanel.setVisible(false);\n\t\tthis.add(mFinishedPanel);\n\t\t\n\t\t\t\t\n\t\t// Add the Cancel button.\n\t\tmCancelButton = new JButton(\"Cancel\");\n\t\tmCancelButton.setLocation(30, 404);\n\t\tmCancelButton.setSize(100, 26);\n\t\tmCancelButton.addActionListener(new CartogramWizardCloseAction());\n\t\tthis.getContentPane().add(mCancelButton);\n\t\t\n\t\t\n\t}", "protected Panel createToolPalette() {\n Panel palette = new Panel();\n palette.setLayout(new PaletteLayout(2,new Point(2,2)));\n return palette;\n }", "public void addPages() {\n //super.addPages(); //<--- notice we're overriding here\n mainPage = new NewTargetWizardPage(\"newFilePage1\", getSelection());//$NON-NLS-1$\n mainPage.setTitle(TITLE);\n mainPage.setDescription(DESCRIPTION); \n addPage(mainPage);\n }", "@Override\n public void setupPanel()\n {\n\n }", "public NewTargetFileWizard() {\n super();\n }", "public abstract Dialog createDialog(DialogDescriptor descriptor);", "private void createWizard(String persoName, String persoImage, int persoLife, int attack) {\n\t\tpersoList.add(new Wizard(persoName, persoImage, persoLife, attack));\n\t}", "protected Panel createButtonPanel() {\n Panel panel = new Panel();\n panel.setLayout(new PaletteLayout(2, new Point(2,2), false));\n return panel;\n }", "@Override\r\n\tpublic void createControl(Composite parent) {\n\t\tinitializeDialogUnits(parent);\r\n\r\n\t\tint sectionStyle = Section.TITLE_BAR | Section.CLIENT_INDENT\r\n\t\t\t\t| Section.EXPANDED;\r\n\t\tSection section = toolkit.createSection(parent, sectionStyle);\r\n\t\tsection.setText(\"Bind all parameters to values\");\r\n\t\tsection.setLayout(new GridLayout());\r\n\t\tComposite comp = toolkit.createComposite(section);\r\n\t\tcomp.setLayout(new GridLayout(2, false));\r\n\r\n\t\tcomp.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL\r\n\t\t\t\t| GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));\r\n\t\tsection.setClient(comp);\r\n\t\tselectionLabel = toolkit.createLabel(comp, \"\");\r\n\t\tGridData gridData = new GridData(GridData.VERTICAL_ALIGN_FILL\r\n\t\t\t\t| GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);\r\n\t\tgridData.horizontalSpan = 2;\r\n\t\tselectionLabel.setLayoutData(gridData);\r\n\r\n\t\tmainComp = comp;\r\n\t\t// PatternToProtocolExportWizard wizard =\r\n\t\t// (PatternToProtocolExportWizard) this\r\n\t\t// .getWizard();\r\n\t\t// assume there are not more than 10 parameters\r\n\t\tint max = 10;\r\n\t\t/*\r\n\t\t * for(CoordinationPattern pattern : wizard.getPatternList()) { int\r\n\t\t * parametersize = pattern.getPatternParameters().size();\r\n\t\t * if(parametersize > max) { max = parametersize; } }\r\n\t\t */\r\n\r\n\t\tif (max > Integer.MIN_VALUE) {\r\n\t\t\tfor (int i = 0; i < max; i++) {\r\n\t\t\t\tLabel l = toolkit.createLabel(mainComp, \"\");\r\n\t\t\t\tl.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL\r\n\t\t\t\t\t\t| GridData.HORIZONTAL_ALIGN_FILL\r\n\t\t\t\t\t\t| GridData.GRAB_HORIZONTAL));\r\n\t\t\t\tText t = toolkit.createText(mainComp, \"\");\r\n\r\n\t\t\t\tt.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL\r\n\t\t\t\t\t\t| GridData.HORIZONTAL_ALIGN_FILL\r\n\t\t\t\t\t\t| GridData.GRAB_HORIZONTAL));\r\n\t\t\t\tl.setVisible(true);\r\n\t\t\t\tt.setVisible(true);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tthis.setControl(section);\r\n\r\n\t}", "CartogramWizardPanelFour (JFrame contentFrame)\n\t{\n\t\n\t\tmCartogramWizard = (CartogramWizard)contentFrame;\n\t\t\n\t\tthis.setLocation(160, 90);\n\t\tthis.setSize(440, 340);\n\t\tthis.setLayout(null);\n\t\n\t\tClassLoader cldr = this.getClass().getClassLoader();\n\n\t\t// Add the slider for the amount of deformation.\n\t\tFont smallFont = new Font(null, Font.PLAIN, 11);\n\t\tmDeformationSlider = new JSlider(SwingConstants.HORIZONTAL, 0, 100, 50);\n\t\tmDeformationSlider.setMajorTickSpacing(25);\n\t\tmDeformationSlider.setMinorTickSpacing(5);\n\t\tmDeformationSlider.setPaintTicks(true);\n\t\tmDeformationSlider.setFont(smallFont);\n\t\tmDeformationSlider.setSize(440, 40);\n\t\tmDeformationSlider.setLocation(0, 20);\n\t\t\n\t\tHashtable labelTable = new Hashtable();\n\t\tJLabel sliderLabel = new JLabel(\"Low\");\n\t\tsliderLabel.setFont(smallFont);\n\t\tlabelTable.put(new Integer(0), sliderLabel);\n\t\tsliderLabel = new JLabel(\"Medium\");\n\t\tsliderLabel.setFont(smallFont);\n\t\tlabelTable.put(new Integer(50), sliderLabel);\n\t\tsliderLabel = new JLabel(\"High\");\n\t\tsliderLabel.setFont(smallFont);\n\t\tlabelTable.put(new Integer(100), sliderLabel);\n\t\t\n\t\tmDeformationSlider.setLabelTable(labelTable);\n\t\tmDeformationSlider.setPaintLabels(true);\n\t\tthis.add(mDeformationSlider);\n\t\t\n\t\t\n\t\t// Add the label for the amount of deformation.\n\t\tJLabel deformationLabel = new JLabel(\"Transformation quality:\");\n\t\tdeformationLabel.setSize(440, 14);\n\t\tdeformationLabel.setFont(new Font(null, Font.BOLD, 11));\n\t\tdeformationLabel.setLocation(0, 0);\n\t\tthis.add(deformationLabel);\n\n\n\n\n\t\t// Create the text pane which displays the help text for the\n\t\t// amount of deformation.\n\t\tJTextPane deformationTextPane = new JTextPane();\n\t\tString deformationText = null;\n\t\ttry\n\t\t{\n\t\t\tInputStream inStream = \n\t\t\t\tcldr.getResource(\"AmountOfDeformationText.rtf\").openStream();\n\t\t\tStringBuffer inBuffer = new StringBuffer();\n\t\t\tint c;\n\t\t\twhile ((c = inStream.read()) != -1)\n\t\t\t{\n\t\t\t\tinBuffer.append((char)c);\n\t\t\t}\n\t\t\tinStream.close();\n\t\t\tdeformationText = inBuffer.toString();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace(); \n\t\t}\n\t\tdeformationTextPane.setContentType(\"text/rtf\");\n\t\tdeformationTextPane.setText(deformationText);\n\t\tdeformationTextPane.setEditable(false);\n\t\tdeformationTextPane.setFont(new Font(null, Font.PLAIN, 11));\n\t\tdeformationTextPane.setBackground(null);\n\t\tdeformationTextPane.setLocation(40, 70);\n\t\tdeformationTextPane.setSize(400, 70);\n\t\tthis.add(deformationTextPane);\n\t\t\n\t\t\n\t\t\n\t\t// ADVANCED OPTIONS\n\t\t\n\t\t// A button and an explanatory text for the advanced options.\n\t\tJButton advancedButton = \n\t\t\tnew JButton(\"Advanced options...\");\n\t\tadvancedButton.setLocation(0, 170);\n\t\tadvancedButton.setSize(240, 26);\n\t\tadvancedButton.addActionListener(\n\t\t\tnew CartogramWizardAdvancedOptionsAction(\"showDialog\", null));\n\t\tthis.add(advancedButton);\n\t\t\n\t\t// Create the text pane which displays the help text for the\n\t\t// simultaneous layers.\n\t\tJTextPane advancedTextPane = new JTextPane();\n\t\tString advancedText = null;\n\t\ttry\n\t\t{\n\t\t\tInputStream inStream = \n\t\t\t\tcldr.getResource(\"AdvancedOptionsText.rtf\").openStream();\n\t\t\tStringBuffer inBuffer = new StringBuffer();\n\t\t\tint c;\n\t\t\twhile ((c = inStream.read()) != -1)\n\t\t\t{\n\t\t\t\tinBuffer.append((char)c);\n\t\t\t}\n\t\t\tinStream.close();\n\t\t\tadvancedText = inBuffer.toString();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace(); \n\t\t}\n\t\tadvancedTextPane.setContentType(\"text/rtf\");\n\t\tadvancedTextPane.setText(advancedText);\n\t\tadvancedTextPane.setEditable(false);\n\t\tadvancedTextPane.setFont(new Font(null, Font.PLAIN, 11));\n\t\tadvancedTextPane.setBackground(null);\n\t\tadvancedTextPane.setLocation(40, 205);\n\t\tadvancedTextPane.setSize(400, 60);\n\t\tthis.add(advancedTextPane);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Add the Compute button\n\t\tJButton computeButton = new JButton(\"Compute\");\n\t\tcomputeButton.setLocation(340, 314);\n\t\tcomputeButton.setSize(100, 26);\n\t\tcomputeButton.setMnemonic(KeyEvent.VK_ENTER);\n\t\tcomputeButton.addActionListener(new \n\t\t\tCartogramWizardComputeAction((CartogramWizard)contentFrame));\n\t\tthis.add(computeButton);\n\t\t\n\t\t\n\t\t\n\t\t// Add the Back button\n\t\tJButton backButton = new JButton(\"< Back\");\n\t\tbackButton.setLocation(235, 314);\n\t\tbackButton.setSize(100, 26);\n\t\tbackButton.addActionListener(new\n\t\t\tCartogramWizardGoToStepAction((CartogramWizard)contentFrame, 3));\n\t\tthis.add(backButton);\n\n\n\n\n\n\t\t// ADD THE HELP BUTTON\n\t\t\n\t\t//ClassLoader cldr = this.getClass().getClassLoader();\n\t\t\n\t\tjava.net.URL imageURL = cldr.getResource(\"help-22.png\");\n\t\tImageIcon helpIcon = new ImageIcon(imageURL);\n\n\t\tJButton helpButton = \n\t\t\tnew JButton(helpIcon);\n\t\t\n\t\thelpButton.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\thelpButton.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\thelpButton.setSize(30, 30);\n\t\thelpButton.setLocation(0, 312);\n\t\thelpButton.setFocusable(false);\n\t\thelpButton.setContentAreaFilled(false);\n\t\thelpButton.setBorderPainted(false);\n\t\t\n\t\thelpButton.addActionListener(new CartogramWizardShowURL(\n\t\t\t\"http://chorogram.choros.ch/scapetoad/help/c-transformation-parameters.php\"));\n\t\t\n\t\tthis.add(helpButton);\n\n\n\t\t\n\t\n\t}", "public JPanel getWizardManager() {\n return wizardManager;\n }", "public void addPages() {\n\t\twizardPage = new WizardNewProjectCreationPage(\n\t\t\"NewExampleComSiteProject\");\n\t\twizardPage.setDescription(\"Create a new Example.com Site Project.\");\n\t\twizardPage.setTitle(\"New Example.com Site Project\");\n\t\taddPage(wizardPage);\n\t}", "@Override\r\n\t\tpublic void create() {\n\t\t\tsuper.create();\r\n\t\t\tsuper.getOKButton().setEnabled(false);\r\n\t\t\tsuper.setTitle(Messages.MoveUnitsWizardPage1_Topolog__2);\r\n\t\t\tsuper.setMessage(Messages.MoveUnitsWizardPage1_Select_a_name_source_folder_and_a_);\r\n\t\t\tsuper.getShell().setText(Messages.MoveUnitsWizardPage1_Topolog__2);\r\n\t\t}", "ProjectSelectionPanel(ProjectWizardPanel wizard) {\n this.wizard = wizard;\n initComponents();\n init();\n destination.getDocument().addDocumentListener(new DocumentListener() {\n public void insertUpdate(DocumentEvent e) { updateValidity(); }\n public void removeUpdate(DocumentEvent e) { updateValidity(); }\n public void changedUpdate(DocumentEvent e) {}\n });\n updateValidity();\n jRadioInsideEclipse.setSelected(true);\n enableLocation(false);\n TableColumn column = projectTable.getColumnModel().getColumn(0);\n column.setMaxWidth(25);\n column.setMinWidth(25);\n }", "public MetadataPanel()\n {\n fieldMap = new HashMap<String, Component>();\n initialiseUI();\n }", "private FactoryViewPanel buildBasicPanel()\r\n {\r\n FactoryViewPanel panel = new FactoryViewPanel();\r\n JComponent pathComponent = addField(panel, myDataSourceModel.getPath());\r\n if (pathComponent instanceof JTextComponent)\r\n {\r\n ((JTextComponent)pathComponent).setEditable(false);\r\n }\r\n addField(panel, myDataSourceModel.getSourceName());\r\n return panel;\r\n }", "private String[] createSteps() {\n String[] res = new String[panels.size()];\n for (int i = 0; i < res.length; i++) {\n res[i] = panels.get(i).getComponent().getName();\n }\n return res;\n }", "private String[] createSteps() {\n String[] res = new String[panels.size()];\n for (int i = 0; i < res.length; i++) {\n res[i] = panels.get(i).getComponent().getName();\n }\n return res;\n }", "private JPanel getJPanel() {\r\n\t\tif (jPanel == null) {\r\n\t\t\ttitleFieldImage = new JLabel();\r\n\t\t\ttitleFieldImage.setBounds(new Rectangle(480, 75, 280, 60));\r\n\t\t\ttitleFieldImage.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\ttitleFieldImage.setText(\"Image\");\r\n\t\t\ttitleFieldImage.setBackground(new Color(255, 204, 204));\r\n\t\t\tpageInfoLbl = new JLabel();\r\n\t\t\tpageInfoLbl.setBounds(new java.awt.Rectangle(224,480,315,30));\r\n\t\t\tpageInfoLbl.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\tpageInfoLbl.setText(\"\");\r\n\t\t\ttitleFieldName = new JLabel();\r\n\t\t\ttitleFieldName.setBounds(new Rectangle(190, 75, 170, 60));\r\n\t\t\ttitleFieldName.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\ttitleFieldName.setBackground(new Color(255,204,204));\r\n\t\t\ttitleFieldName.setText(\"Field name\");\r\n\t\t\ttitleFieldId = new JLabel();\r\n\t\t\ttitleFieldId.setBounds(new Rectangle(90, 75, 70, 60));\r\n\t\t\ttitleFieldId.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\ttitleFieldId.setBackground(new Color(255,160,204));\r\n\t\t\ttitleFieldId.setText(\"Field ID\");\r\n\t\t\tlblPageName = new JLabel();\r\n\t\t\tlblPageName.setBounds(new Rectangle(10, 40, 120, 20));\r\n\t\t\tlblPageName.setText(\"Page Name\");\r\n\t\t\tjLabel = new JLabel();\r\n\t\t\tjLabel.setBounds(new java.awt.Rectangle(10,10,500,24));\r\n\t\t\tjLabel.setText(\"Select the field you want to add\");\r\n\t\t\tjPanel = new JPanel();\r\n\t\t\tjPanel.setLayout(null);\r\n\t\t\tjPanel.add(jLabel, null);\r\n\t\t\tjPanel.add(getJButton(), null);\r\n\t\t\tjPanel.add(getPageSheet(), null);\r\n\t\t\tjPanel.add(getPreButton(), null);\r\n\t\t\tjPanel.add(getAfterButton(), null);\r\n\t\t\tjPanel.add(lblPageName, null);\r\n\t\t\tjPanel.add(titleFieldId, null);\r\n\t\t\tjPanel.add(titleFieldName, null);\r\n\t\t\tjPanel.add(pageInfoLbl, null);\r\n\t\t\tjPanel.add(titleFieldImage, null);\r\n\t\t\t\r\n\t\t\tJLabel titleFiledType = new JLabel();\r\n\t\t\ttitleFiledType.setText(\"Field Type\");\r\n\t\t\ttitleFiledType.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\ttitleFiledType.setBounds(new Rectangle(10, 75, 90, 60));\r\n\t\t\ttitleFiledType.setBackground(new Color(255, 160, 204));\r\n\t\t\ttitleFiledType.setBounds(360, 75, 120, 60);\r\n\t\t\tjPanel.add(titleFiledType);\r\n\t\t\t\r\n\t\t\tJButton btnSelect = new JButton();\r\n\t\t\tbtnSelect.addActionListener(new ActionListener() {\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\treturnValue.clear();\r\n\t\t\t\t\tgrid.freshData();\r\n\t\t\t\t\tList<Map<String, String>> valueList = grid.getValueList();\r\n\t\t\t\t\t\r\n\t\t\t\t\tSelectBean bean = (SelectBean)pageIdSelect.getSelectedItem();\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (Map<String, String> map : valueList) {\r\n\t\t\t\t\t\tString strSelect = map.get(\"SELECT\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (Boolean.valueOf(strSelect)) {\r\n\t\t\t\t\t\t\tMap<String, String> temp = new HashMap<String, String>(map);\r\n\t\t\t\t\t\t\ttemp.put(\"PAGE_ID\", bean.getCode());\r\n\t\t\t\t\t\t\tString strName = bean.getName();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (strName.indexOf(\":\") > 0 && strName.length() > strName.indexOf(\":\") + 2) {\r\n\t\t\t\t\t\t\t\tstrName = strName.substring(strName.indexOf(\":\") + 2);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ttemp.put(\"PAGE_NAME\", strName);\r\n\t\t\t\t\t\t\treturnValue.add(temp);\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 (returnValue.size() > 0) {\r\n\t\t\t\t\t\tsetVisible(false);\r\n\t\t\t\t\t\t_parent.addSelectFields(PageSelectDialog.this);\r\n\t\t\t\t\t\tUtils.removeWindow(PageSelectDialog.this);\r\n\t\t\t\t\t\t_parent.setVisible(true);\r\n\t\t\t\t\t\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(PageSelectDialog.this, \"Plese select field!\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t});\r\n\t\t\tbtnSelect.setText(\"Select\");\r\n\t\t\tbtnSelect.setSize(new Dimension(90, 30));\r\n\t\t\tbtnSelect.setLocation(new Point(10, 480));\r\n\t\t\tbtnSelect.setBounds(10, 520, 120, 30);\r\n\t\t\tjPanel.add(btnSelect);\r\n\t\t\t\r\n\t\t\ttitleSelect = new JLabel();\r\n\t\t\ttitleSelect.setText(\"Select\");\r\n\t\t\ttitleSelect.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\ttitleSelect.setBounds(new Rectangle(90, 75, 70, 60));\r\n\t\t\ttitleSelect.setBackground(new Color(255, 160, 204));\r\n\t\t\ttitleSelect.setBounds(10, 75, 80, 60);\r\n\t\t\tjPanel.add(titleSelect);\r\n\t\t\t\r\n\t\t\tpageIdSelect = new JComboBox<DefaultComboBoxModel>();\r\n\t\t\tpageIdSelect.addItemListener(new ItemListener() {\r\n\t\t\t\tpublic void itemStateChanged(ItemEvent e) {\r\n\t\t\t\t\tsearchDetailList();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tpageIdSelect.setBounds(140, 40, 300, 20);\r\n\t\t\tjPanel.add(pageIdSelect);\r\n\t\t}\r\n\t\treturn jPanel;\r\n\t}", "public TableEditorWizard(Table table) {\t\n\t\tcreateDialog(table);\n\t}", "public void setupUI() {\r\n\t\t\r\n\t\tvPanel = new VerticalPanel();\r\n\t\thPanel = new HorizontalPanel();\r\n\t\t\r\n\t\titemName = new Label();\r\n\t\titemName.addStyleName(Styles.page_title);\r\n\t\titemDesc = new Label();\r\n\t\titemDesc.addStyleName(Styles.quest_desc);\r\n\t\titemType = new Label();\r\n\t\titemType.addStyleName(Styles.quest_lvl);\r\n\t\t\r\n\t\tVerticalPanel img = new VerticalPanel();\r\n\t\timg.add(new Image(imgDir));\r\n\t\t\r\n\t\tvPanel.add(itemName);\r\n\t\tvPanel.add(itemDesc);\r\n\t\tvPanel.add(img);\r\n\t\tvPanel.add(hPanel);\r\n\t\t\r\n\t\tVerticalPanel mainPanel = new VerticalPanel();\r\n\t\tmainPanel.setWidth(\"100%\");\r\n\t\tvPanel.addStyleName(NAME);\r\n\t\t\r\n\t\tmainPanel.add(vPanel);\r\n \tinitWidget(mainPanel);\r\n }", "private void createContents() {\n shell = new Shell(getParent(), SWT.BORDER | SWT.TITLE | SWT.APPLICATION_MODAL);\n shell.setSize(FORM_WIDTH, 700);\n shell.setText(getText());\n shell.setLayout(new GridLayout(1, false));\n\n TabFolder tabFolder = new TabFolder(shell, SWT.NONE);\n tabFolder.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n\n // STRUCTURE PARAMETERS\n\n TabItem tbtmStructure = new TabItem(tabFolder, SWT.NONE);\n tbtmStructure.setText(\"Structure\");\n\n Composite grpStructure = new Composite(tabFolder, SWT.NONE);\n tbtmStructure.setControl(grpStructure);\n grpStructure.setLayout(TAB_GROUP_LAYOUT);\n grpStructure.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n\n ParmDialogText.load(grpStructure, parms, \"meta\");\n ParmDialogText.load(grpStructure, parms, \"col\");\n ParmDialogText.load(grpStructure, parms, \"id\");\n ParmDialogChoices.load(grpStructure, parms, \"init\", Activation.values());\n ParmDialogChoices.load(grpStructure, parms, \"activation\", Activation.values());\n ParmDialogFlag.load(grpStructure, parms, \"raw\");\n ParmDialogFlag.load(grpStructure, parms, \"batch\");\n ParmDialogGroup cnn = ParmDialogText.load(grpStructure, parms, \"cnn\");\n ParmDialogGroup filters = ParmDialogText.load(grpStructure, parms, \"filters\");\n ParmDialogGroup strides = ParmDialogText.load(grpStructure, parms, \"strides\");\n ParmDialogGroup subs = ParmDialogText.load(grpStructure, parms, \"sub\");\n if (cnn != null) {\n if (filters != null) cnn.setGrouped(filters);\n if (strides != null) cnn.setGrouped(strides);\n if (subs != null) cnn.setGrouped(subs);\n }\n ParmDialogText.load(grpStructure, parms, \"lstm\");\n ParmDialogGroup wGroup = ParmDialogText.load(grpStructure, parms, \"widths\");\n ParmDialogGroup bGroup = ParmDialogText.load(grpStructure, parms, \"balanced\");\n if (bGroup != null && wGroup != null) {\n wGroup.setExclusive(bGroup);\n bGroup.setExclusive(wGroup);\n }\n\n // SEARCH CONTROL PARAMETERS\n\n TabItem tbtmSearch = new TabItem(tabFolder, SWT.NONE);\n tbtmSearch.setText(\"Training\");\n\n ScrolledComposite grpSearch0 = new ScrolledComposite(tabFolder, SWT.V_SCROLL);\n grpSearch0.setLayout(new FillLayout());\n grpSearch0.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n tbtmSearch.setControl(grpSearch0);\n Composite grpSearch = new Composite(grpSearch0, SWT.NONE);\n grpSearch0.setContent(grpSearch);\n grpSearch.setLayout(TAB_GROUP_LAYOUT);\n grpSearch.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n\n Enum<?>[] preferTypes = (this.modelType == TrainingProcessor.Type.CLASS ? RunStats.OptimizationType.values()\n : RunStats.RegressionType.values());\n ParmDialogChoices.load(grpSearch, parms, \"prefer\", preferTypes);\n ParmDialogChoices.load(grpSearch, parms, \"method\", Trainer.Type.values());\n ParmDialogText.load(grpSearch, parms, \"bound\");\n ParmDialogChoices.load(grpSearch, parms, \"lossFun\", LossFunctionType.values());\n ParmDialogText.load(grpSearch, parms, \"weights\");\n ParmDialogText.load(grpSearch, parms, \"iter\");\n ParmDialogText.load(grpSearch, parms, \"batchSize\");\n ParmDialogText.load(grpSearch, parms, \"testSize\");\n ParmDialogText.load(grpSearch, parms, \"maxBatches\");\n ParmDialogText.load(grpSearch, parms, \"earlyStop\");\n ParmDialogChoices.load(grpSearch, parms, \"regMode\", Regularization.Mode.values());\n ParmDialogText.load(grpSearch, parms, \"regFactor\");\n ParmDialogText.load(grpSearch, parms, \"seed\");\n ParmDialogChoices.load(grpSearch, parms, \"start\", WeightInit.values());\n ParmDialogChoices.load(grpSearch, parms, \"gradNorm\", GradientNormalization.values());\n ParmDialogChoices.load(grpSearch, parms, \"updater\", GradientUpdater.Type.values());\n ParmDialogText.load(grpSearch, parms, \"learnRate\");\n ParmDialogChoices.load(grpSearch, parms, \"bUpdater\", GradientUpdater.Type.values());\n ParmDialogText.load(grpSearch, parms, \"updateRate\");\n\n grpSearch.setSize(grpSearch.computeSize(FORM_WIDTH - 50, SWT.DEFAULT));\n\n // BOTTOM BUTTON BAR\n\n Composite grpButtonBar = new Composite(shell, SWT.NONE);\n grpButtonBar.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));\n grpButtonBar.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n Button btnSave = new Button(grpButtonBar, SWT.NONE);\n btnSave.setText(\"Save\");\n btnSave.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent evt) {\n try {\n parms.save(parmFile);\n } catch (IOException e) {\n ShellUtils.showErrorBox(getParent(), \"Error Saving Parm File\", e.getMessage());\n }\n }\n });\n\n Button btnClose = new Button(grpButtonBar, SWT.NONE);\n btnClose.setText(\"Cancel\");\n btnClose.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent evt) {\n shell.close();\n }\n });\n\n Button btnOK = new Button(grpButtonBar, SWT.NONE);\n btnOK.setText(\"Save and Close\");\n btnOK.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent evt) {\n try {\n parms.save(parmFile);\n shell.close();\n } catch (IOException e) {\n ShellUtils.showErrorBox(getParent(), \"Error Saving Parm File\", e.getMessage());\n }\n }\n });\n\n }", "public NewPageWizard(IXWikiSpace sapce)\n {\n super();\n setWindowTitle(\"Add New Page...\");\n setNeedsProgressMonitor(false);\n this.space = sapce;\n }", "private void createComponents() {\n\n add(createSetDataPanel(), BorderLayout.NORTH);\n add(createResourcesListAndButtonsPanel(), BorderLayout.CENTER);\n }", "public NewReactionAcquisitionWizardPage() {\n\t\tsuper(\"SpectrumWizardPage\");\n\t\tsetTitle(\"Predicted from MEDEA wizard\");\n\t\tsetDescription(\"This wizard specifies he name of the file of the\" +\n\t\t\t\t\"predicted reaction. It is need to have into this folder other \" +\n\t\t\t\t\"folder with the name: -\");\n\t}", "public void setWizard(IWizard newWizard);", "public JComponent createContentPanel() {\n\t\t// Separating the component initialization and configuration\n\t\t// from the layout code makes both parts easier to read.\n\t\tinitControls();\n\t\t//TODO set minimum size\n\t\tFormLayout layout = new FormLayout(\"default, 3dlu, default\", // cols\n\t\t\t\t\"p, 3dlu,p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu\"); // rows\n\t\tDefaultFormBuilder builder = new DefaultFormBuilder(layout);\n\t\tbuilder.setDefaultDialogBorder();\n\t\tCellConstraints cc = new CellConstraints();\n\t\t\n\t\tIterator l=labels.iterator();\n\t\tIterator c=valueComponents.iterator();\n\t\twhile (l.hasNext()){\n\t\t String name=(String)l.next();\n\t\t JComponent comp=(JComponent)c.next();\n\t\t builder.append(name,comp);\n\t\t builder.nextLine(2);\n\t\t}\n\t\treturn builder.getPanel();\n\t}", "public JComponent createContentPanel() {\n\t\t// Separating the component initialization and configuration\n\t\t// from the layout code makes both parts easier to read.\n\t\tinitControls();\n\t\t//TODO set minimum size\n\t\tFormLayout layout = new FormLayout(\"default, 3dlu, 120dlu:grow\", // cols //$NON-NLS-1$\n\t\t\t\t\"p, 3dlu,p,3dlu,p\"); // rows //$NON-NLS-1$\n\n\t\t// Create a builder that assists in adding components to the container.\n\t\t// Wrap the panel with a standardized border.\n\t\tDefaultFormBuilder builder = new DefaultFormBuilder(layout);\n\t\tbuilder.setDefaultDialogBorder();\n\t\tbuilder.append(Messages.getString(\"RenameDialog.CurrentName\"), oldName); //$NON-NLS-1$\n\t\tbuilder.nextLine(2);\n\t\tbuilder.append(Messages.getString(\"RenameDialog.NewName\"), newName); //$NON-NLS-1$\n\t\treturn builder.getPanel();\n\t}", "@Override\n public PluginDescriptor getPluginDescriptor()\n {\n GuiConfigDescriptor guiDescriptor = new GuiConfigDescriptor(\"Complete the configuration below and enable this instance in your dynamic client registration policy to support Open Banking conformant client registration requests.\");\n\n FieldDescriptor issuer = new TextFieldDescriptor(Constants.ISSUER_FIELD_NAME, \"Value of the iss claim expected in the received software statement JWT.\");\n issuer.addValidator(new RequiredFieldValidator());\n issuer.setDefaultValue(Constants.DEFAULT_OPEN_BANKING_ISSUER);\n guiDescriptor.addField(issuer);\n\n FieldDescriptor jwksEndpointUrl = new TextFieldDescriptor(Constants.JWKS_URL_FIELD_NAME, \"A set of JSON Web Keys (JWKs) are downloaded from this endpoint and used for software statement JWT signature verification.\");\n jwksEndpointUrl.addValidator(new RequiredFieldValidator());\n jwksEndpointUrl.setDefaultValue(Constants.DEFAULT_JWKS_URL_FIELD_NAME);\n guiDescriptor.addField(jwksEndpointUrl);\n\n FieldDescriptor requestJwtAudienceField = new TextFieldDescriptor(Constants.AUDIENCE_FIELD_NAME, \"Value of the aud claim expected in the received request JWT.\");\n guiDescriptor.addField(requestJwtAudienceField);\n\n FieldDescriptor ecAlgorithm = new CheckBoxFieldDescriptor(Constants.ECDSA_ALGORITHM_FIELD_NAME,\n \"Allow the \" + Constants.ECDSA_ALGORITHM_FIELD_NAME + \" algorithm to be used for signatures.\");\n //The Open Banking specification states that PS256 or ES256 algorithms should be used for signing.\n //ECDSA is the only algorithm type enabled by default as PingFederate supports RSA-PSS only when configured with a Hardware Security Module (HSM).\n ecAlgorithm.setDefaultValue(Boolean.TRUE.toString());\n guiDescriptor.addField(ecAlgorithm);\n\n FieldDescriptor pssAlgorithm = new CheckBoxFieldDescriptor(Constants.RSA_PSS_ALGORITHM_FIELD_NAME,\n \"Allow the \" + Constants.RSA_PSS_ALGORITHM_FIELD_NAME + \" algorithm to be used for signatures.\");\n guiDescriptor.addField(pssAlgorithm);\n\n FieldDescriptor rsaAlgorithm = new CheckBoxFieldDescriptor(Constants.RSA_ALGORITHM_FIELD_NAME,\n \"Allow the \" + Constants.RSA_ALGORITHM_FIELD_NAME + \" algorithm to be used for signatures.\");\n guiDescriptor.addField(rsaAlgorithm);\n\n FieldDescriptor enableRevokedJwksValidation = new CheckBoxFieldDescriptor(Constants.ENABLE_REVOKED_JWKS_VALIDATION_FIELD_NAME,\n \"Consider revoked JWKS during signature validation.\");\n enableRevokedJwksValidation.setDefaultValue(Boolean.TRUE.toString());\n guiDescriptor.addAdvancedField(enableRevokedJwksValidation);\n\n\n guiDescriptor.addValidator(configuration -> {\n\n Field jwksUrlField = configuration.getField(Constants.JWKS_URL_FIELD_NAME);\n String jwksUriValue = jwksUrlField.getValue();\n\n List<String> errors = new ArrayList<>();\n\n if (StringUtils.isBlank(jwksUriValue))\n {\n errors.add(Constants.JWKS_URL_FIELD_NAME + \" is required to verify the request payload.\");\n }\n else\n {\n FieldValidator httpURLValidator = new HttpURLValidator();\n httpURLValidator.validate(jwksUrlField);\n }\n\n if(!(configuration.getBooleanFieldValue(Constants.ECDSA_ALGORITHM_FIELD_NAME) ||\n configuration.getBooleanFieldValue(Constants.RSA_PSS_ALGORITHM_FIELD_NAME) ||\n configuration.getBooleanFieldValue(Constants.RSA_ALGORITHM_FIELD_NAME)))\n {\n errors.add(\"At least one of the signature algorithms should be selected.\");\n }\n\n if (!errors.isEmpty())\n {\n throw new ValidationException(errors);\n }\n });\n\n DynamicClientRegistrationPluginDescriptor pluginDescriptor = new DynamicClientRegistrationPluginDescriptor(TYPE, this, guiDescriptor, VERSION);\n pluginDescriptor.setSupportsExtendedContract(false);\n\n return pluginDescriptor;\n }", "@Override\n\tpublic void addPages() {\n\t\t_fileWizard = new NewPlotFilenameWizardPage(selection);\n\t\t_scaleWizard = new ScaleWizardPage(selection);\n\t\t_coastWizard = new CoastWizardPage(selection);\n\t\t_gridWizard = new GridWizardPage(selection);\n\n\t\t// check there's ETOPO data before we add the page\n\t\t_etopoWizard = new ETOPOWizardPage(selection);\n\n\t\taddPage(_fileWizard);\n\t\taddPage(_scaleWizard);\n\t\taddPage(_coastWizard);\n\t\taddPage(_gridWizard);\n\t\tif (_etopoWizard.isAvailable())\n\t\t\taddPage(_etopoWizard);\n\t}", "private void setup(){\n\t\t\n\t\t//set the dialog title\n\t\tsetText(LocaleText.get(\"createSPSSFileDialog\"));\n\t\t//create the status text\n\t\tstatusLabel = new Label();\n\t\t\n\t\t//create the buttons\n\t\tButton btnCancel = new Button(LocaleText.get(\"close\"), new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton btnCreate = new Button(LocaleText.get(\"createSPSSFileDialog\"), new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tcreateSPSSFile();\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton btnSave = new Button(LocaleText.get(\"save\"), new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tsave();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\t\t\n\t\t\n\t\t//update the languages in the form.\n\t\tFormHandler.updateLanguage(Context.getLocale(), Context.getLocale(), form);\n\t\t//add the languages to the language drop down\n\t\tfor(Locale l : form.getLocales())\n\t\t{\n\t\t\tlistBoxLanguages.addItem(l.getName());\n\t\t}\n\t\t\n\t\t//setup the text area\n\t\tspssText.setCharacterWidth(30);\n\t\tspssText.setPixelSize(300, 300);\n\t\t\n\t\t\n\t\tFlexCellFormatter formatter = table.getFlexCellFormatter();\n\t\t\n\t\t//now add stuff to the UI\n\t\tint row = 0;\n\t\ttable.setWidget(row, 0, new Label(LocaleText.get(\"language\")));\n\t\ttable.setWidget(row, 1, listBoxLanguages);\n\t\trow++;\n\t\ttable.setWidget(row, 0, spssText);\n\t\tformatter.setColSpan(row, 0, 2);\n\t\tformatter.setHeight(row, 0, \"300px\");\n\t\tformatter.setWidth(row, 0, \"300px\");\n\t\trow++;\n\t\ttable.setWidget(row, 0, statusLabel);\n\t\trow++;\n\t\ttable.setWidget(row, 0, btnCreate);\n\t\trow++;\n\t\ttable.setWidget(row, 0, btnSave);\n\t\ttable.setWidget(row, 1, btnCancel);\n\t\trow++;\n\t\ttable.setWidget(row, 0, appletHtml);\n\t\t\n\t\t\t\t\t\t\n\t\t//some random UI stuff to make everything nice and neat\n\t\tVerticalPanel panel = new VerticalPanel();\n\t\tFormUtil.maximizeWidget(panel);\n\t\tpanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);\n\t\tpanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);\n\t\tpanel.add(table);\n\t\t\n\t\tsetWidget(panel);\n\t\t\n\t\tsetWidth(\"200px\");\t\t\n\t}", "protected IFlowControl createWizard( InputStream in ){\r\n\t\tXMLWizardBuilder<T> builder = new XMLWizardBuilder<T>( in );\r\n\t\ttry{\r\n\t\t\tbuilder.build( this);\r\n\t\t}\r\n\t\tcatch( Exception ex ){\r\n\t\t\tex.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tflow = new FlowControl(); \r\n\t\tsuper.setFlow(flow);\r\n\t\treturn flow;\r\n\t}", "static public Wizard createWizard (){\n System.out.println(\"Enter the name of your wizard : \");\n Scanner sc = new Scanner(System.in);\n String nameCharacter = sc.next();\n\n // enter and get the HP value of the character\n System.out.println(\"Enter the healpoint of your wizard : \");\n Scanner scan = new Scanner(System.in);\n String healPointCharacter = scan.next();\n int hpCharacter = Integer.parseInt(healPointCharacter);\n\n // get the power value\n System.out.println(\"Enter the power of your wizard : \");\n Scanner sca = new Scanner(System.in);\n String powerCharacter = sca.next();\n int pcCharacter = Integer.parseInt(powerCharacter);\n\n\n // get the initiative (turn order)\n System.out.println(\"Enter the initiative of your wizard : \");\n Scanner scann = new Scanner(System.in);\n String initiativeCharacter = scann.next();\n int iniCharacter = Integer.parseInt(initiativeCharacter);\n\n System.out.println(\"Enter the wizard damage value of your wizard : \");\n Scanner scanS = new Scanner(System.in);\n String wizardDamage = scann.next();\n int wiz = Integer.parseInt(wizardDamage);\n\n Wizard createWizard = new Wizard(nameCharacter, pcCharacter, hpCharacter, iniCharacter, wiz);\n System.out.println(\"Your wizard has been created with success!\");\n\n return createWizard;\n }", "private void createManualJPanel() {\r\n createJPanelWithManual();\r\n JFrame frame = new JFrame();\r\n customizeFrame(frame);\r\n }", "private HorizontalPanel createContent() {\n\t\tfinal HorizontalPanel panel = new HorizontalPanel();\n\t\tfinal VerticalPanel form = new VerticalPanel();\n\t\tpanel.add(form);\n\t\t\n\t\tfinal Label titleLabel = new Label(CONSTANTS.actorLabel());\n\t\ttitleLabel.addStyleName(AbstractField.CSS.cbtAbstractPopupLabel());\n\t\tform.add(titleLabel);\n\t\t\n\t\tfinal Label closeButton = new Label();\n\t\tcloseButton.addClickHandler(new ClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tActorPopup.this.hide();\n\t\t\t}\n\t\t});\n\t\tcloseButton.addStyleName(AbstractField.CSS.cbtAbstractPopupClose());\n\t\tform.add(closeButton);\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Party field\n\t\t//-----------------------------------------------\n\t\tpartyField = new SuggestField(this, null,\n\t\t\t\tnew NameIdAction(Service.PARTY),\n\t\t\t\tCONSTANTS.partynameLabel(),\n\t\t\t\t20,\n\t\t\t\ttab++);\n\t\tpartyField.setReadOption(Party.CREATED, true);\n\t\tpartyField.setDoubleclickable(true);\n\t\tpartyField.setHelpText(CONSTANTS.partynameHelp());\n\t\tform.add(partyField);\n\n\t\t//-----------------------------------------------\n\t\t// Email Address field\n\t\t//-----------------------------------------------\n\t\temailaddressField = new TextField(this, null,\n\t\t\t\tCONSTANTS.emailaddressLabel(),\n\t\t\t\ttab++);\n\t\temailaddressField.setMaxLength(100);\n\t\temailaddressField.setHelpText(CONSTANTS.emailaddressHelp());\n\t\tform.add(emailaddressField);\n\n\t\t//-----------------------------------------------\n\t\t// Password field\n\t\t//-----------------------------------------------\n\t\tpasswordField = new PasswordField(this, null,\n\t\t\t\tCONSTANTS.passwordLabel(),\n\t\t\t\ttab++);\n\t\tpasswordField.setSecure(true);\n\t\tpasswordField.setHelpText(CONSTANTS.passwordHelp());\n\t\tform.add(passwordField);\n\n\t\t//-----------------------------------------------\n\t\t// Check Password field\n\t\t//-----------------------------------------------\n\t\tcheckpasswordField = new PasswordField(this, null,\n\t\t\t\tCONSTANTS.checkpasswordLabel(),\n\t\t\t\ttab++);\n\t\tcheckpasswordField.setSecure(true);\n\t\tcheckpasswordField.setHelpText(CONSTANTS.checkpasswordHelp());\n\t\tform.add(checkpasswordField);\n\n\t\t//-----------------------------------------------\n\t\t// Date Format field\n\t\t//-----------------------------------------------\n\t\tformatdateField = new ListField(this, null,\n\t\t\t\tNameId.getList(Party.DATE_FORMATS, Party.DATE_FORMATS),\n\t\t\t\tCONSTANTS.formatdateLabel(),\n\t\t\t\tfalse,\n\t\t\t\ttab++);\n\t\tformatdateField.setDefaultValue(Party.MM_DD_YYYY);\n\t\tformatdateField.setFieldHalf();\n\t\tformatdateField.setHelpText(CONSTANTS.formatdateHelp());\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Phone Format field\n\t\t//-----------------------------------------------\n\t\tformatphoneField = new TextField(this, null,\n\t\t\t\tCONSTANTS.formatphoneLabel(),\n\t\t\t\ttab++);\n\t\tformatphoneField.setMaxLength(25);\n\t\tformatphoneField.setFieldHalf();\n\t\tformatphoneField.setHelpText(CONSTANTS.formatphoneHelp());\n\n\t\tHorizontalPanel ff = new HorizontalPanel();\n\t\tff.add(formatdateField);\n\t\tff.add(formatphoneField);\n\t\tform.add(ff);\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Roles option selector\n\t\t//-----------------------------------------------\n\t\trolesField = new OptionField(this, null,\n\t\t\t\tAbstractRoot.hasPermission(AccessControl.AGENCY) ? getAgentroles() : getOrganizationroles(),\n\t\t\t\tCONSTANTS.roleLabel(),\n\t\t\t\ttab++);\n\t\trolesField.setHelpText(CONSTANTS.roleHelp());\n\t\tform.add(rolesField);\n\n\t\tform.add(createCommands());\n\t\t\n\t\tonRefresh();\n\t\tonReset(Party.CREATED);\n\t\treturn panel;\n\t}", "public WizardContainer getWizardContainer()\n {\n return wizardContainer;\n }", "interface WithDescription {\n /**\n * Specifies the description property: The description of the lab..\n *\n * @param description The description of the lab.\n * @return the next definition stage.\n */\n WithCreate withDescription(String description);\n }", "private void buildView() {\n this.setHeaderInfo(model.getHeaderInfo());\n\n CWButtonPanel buttonPanel = this.getButtonPanel();\n \n buttonPanel.add(saveButton);\n buttonPanel.add(saveAndCloseButton);\n buttonPanel.add(cancelButton);\n \n FormLayout layout = new FormLayout(\"pref, 4dlu, 200dlu, 4dlu, min\",\n \"pref, 2dlu, pref, 2dlu, pref, 2dlu, pref\"); // rows\n\n layout.setRowGroups(new int[][]{{1, 3, 5}});\n \n CellConstraints cc = new CellConstraints();\n this.getContentPanel().setLayout(layout);\n \n this.getContentPanel().add(nameLabel, cc.xy (1, 1));\n this.getContentPanel().add(nameTextField, cc.xy(3, 1));\n this.getContentPanel().add(descLabel, cc.xy(1, 3));\n this.getContentPanel().add(descTextField, cc.xy(3, 3));\n this.getContentPanel().add(amountLabel, cc.xy(1, 5));\n this.getContentPanel().add(amountTextField, cc.xy(3, 5));\n }", "public void addPages() {\n\t\t\n\t\tProjectUtils projectUtils = new ProjectUtils();\n\t\tIProject proj = projectUtils.getProject(selection);\n\t\t\n\t\t\n\t\t\n\t\tDb db = loadDBParams();\n\t\tDBConnection dbConn = new DBConnection();\n\t\tConnection connection = null;\n\t\t\n\t\t\n\t\ttry {\n\t\t\tconnection = dbConn.loadDriver(proj.getLocation()+\"/\"+db.getDriverClassPath(), db.getDriverClass(), db.getDatabaseURL(), db.getUserName(), db.getPassWord());\n\t\t} catch (MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InstantiationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalAccessException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\tpage = new SmartNewWizardPage(selection, connection, proj.getLocation().toString());\n\t\taddPage(page);\n\n\t}", "protected void createContents() {\r\n\t\tsetText(Messages.getString(\"HMS.PatientManagementShell.title\"));\r\n\t\tsetSize(900, 700);\r\n\r\n\t}", "Designator getDesgnator();", "@Override\r\n\tpublic void addPages() {\n\t\tprojectPage = new NewProjectWizardPage();\r\n\t\taddPage(projectPage);\r\n\t}", "public DemoPanel() {\n }", "private void createPanel() {\n JPanel panel = new JPanel();\n \n for(int i = 0; i < button.size(); i++){\n panel.add(button.get(i));\n }\n panel.add(label);\n \n add(panel);\n }", "private void $$$setupUI$$$() {\n myMainPanel = new JPanel();\n myMainPanel.setLayout(new GridLayoutManager(3, 3, new Insets(0, 0, 0, 0), -1, -1));\n myArchetypesPanel = new JPanel();\n myArchetypesPanel.setLayout(new BorderLayout(0, 0));\n myArchetypesPanel.setInheritsPopupMenu(true);\n myMainPanel.add(myArchetypesPanel, new GridConstraints(2, 0, 1, 3, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n alsoDownloadExampleSourceCheckBox = new JCheckBox();\n this.$$$loadButtonText$$$(alsoDownloadExampleSourceCheckBox, ResourceBundle.getBundle(\"Bundle\").getString(\"AsposeWizardPanel.WizardStep.ExampleChkbox\"));\n myArchetypesPanel.add(alsoDownloadExampleSourceCheckBox, BorderLayout.SOUTH);\n fieldTextPane = new JTextPane();\n fieldTextPane.setText(\"\");\n myArchetypesPanel.add(fieldTextPane, BorderLayout.WEST);\n bannerLbl = new JLabel();\n bannerLbl.setAlignmentY(0.0f);\n bannerLbl.setHorizontalAlignment(2);\n bannerLbl.setHorizontalTextPosition(2);\n bannerLbl.setIcon(new ImageIcon(getClass().getResource(\"/resources/long_bannerIntelliJ.png\")));\n bannerLbl.setIconTextGap(0);\n bannerLbl.setText(\"\");\n bannerLbl.setVerticalAlignment(1);\n bannerLbl.setVerticalTextPosition(1);\n myMainPanel.add(bannerLbl, new GridConstraints(0, 0, 1, 2, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, new Dimension(10, -1), new Dimension(390, -1), new Dimension(66666, -1), 1, false));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(3, 2, new Insets(10, 10, 10, 10), -1, -1));\n panel1.setAlignmentX(0.0f);\n panel1.setAlignmentY(0.0f);\n panel1.setOpaque(true);\n myMainPanel.add(panel1, new GridConstraints(1, 0, 1, 2, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n panel1.setBorder(BorderFactory.createTitledBorder(null, ResourceBundle.getBundle(\"Bundle\").getString(\"AsposeWizardPanel.WizardStep.headingMavn\"), TitledBorder.LEFT, TitledBorder.DEFAULT_POSITION, new Font(panel1.getFont().getName(), panel1.getFont().getStyle(), panel1.getFont().getSize()), new Color(-16777216)));\n final JLabel label1 = new JLabel();\n label1.setText(\"GroupId\");\n panel1.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n myGroupIdField = new JTextField();\n panel1.add(myGroupIdField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(444, 24), null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setText(\"ArtifactId\");\n panel1.add(label2, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n myArtifactIdField = new JTextField();\n panel1.add(myArtifactIdField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(444, 24), null, 0, false));\n final JLabel label3 = new JLabel();\n label3.setText(\"Version\");\n panel1.add(label3, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n myVersionField = new JTextField();\n myVersionField.setText(\"\");\n panel1.add(myVersionField, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(444, 24), null, 0, false));\n }", "public BlackPanel() \r\n {\r\n super(\"Seeds\", \"Seeds\");\r\n initComponents();\r\n \r\n // Set up some defaults variables\r\n putWizardData(\"blackWords\", \" \");\r\n }", "public MakeDogPanel(DoggyDayCareGui doggyDayCareGui) {\n this.doggyDayCareGui = doggyDayCareGui;\n startPanel();\n createLabels();\n addInputFields();\n buttonInitiation();\n imageInitiation();\n listenersInitiation();\n }", "private JPanel createResourcesListAndButtonsPanel() {\n\n JPanel panel = new JPanel(new BorderLayout());\n panel.setBorder(PADDING_BORDER);\n\n panel.add(createResourcesPanel(), BorderLayout.NORTH);\n panel.add(createConfirmButtons(), BorderLayout.SOUTH);\n\n return panel;\n }", "public CreateNewEventJPanel() {\n }", "protected String generatePanelDetails(PanelInfo panel)\n {\n\tStringBuffer buffer = new StringBuffer(2048);\n\tbuffer.append(\"<a name=\\\"\" + panel.getDetailsLink() + \"\\\">\");\n\tbuffer.append(\"<h3 align=center>\" + panel.getTitle() + \"</h3></a>\");\n\tbuffer.append(\"<table>\\n\");\n\tVector fields = panel.getAllFields();\n\tfor (int i = 0; i < fields.size(); i++)\n\t {\n\t FieldInfo fld = (FieldInfo) fields.get(i);\n\t if (fld.isDummyControl())\n\t continue;\n\t String pSpec = fld.getPSpecifier();\n\t if ((pSpec == null) || (pSpec.length() == 0))\n\t continue;\n //buffer.append(\"<tr><td><table>\\n\");\n\t buffer.append(\"<tr><th nowrap align=left>\" + pSpec + \"</th>\\n\");\n\t buffer.append(\"<th></th><th></th>\\n\");\n\t buffer.append(\"<th align=right>\"+fld.getLabelText() + \"</th></tr>\\n\");\n\t buffer.append(\"<tr><td></td><td nowrap valign=top><b>Description:</b></td>\");\n\t buffer.append(\"<td colspan=2>\");\n\t buffer.append(fld.getHelpString());\n buffer.append(\"</td></tr>\");\n\t buffer.append(\"<tr><td></td><td nowrap valign=top><b>Required:</b></td>\");\n\t buffer.append(\"<td>\");\n\t buffer.append(fld.isRequired() ? \"Yes\" : \"No\");\n\t buffer.append(\"</td></tr>\\n\");\n\t String choices = null;\n\t ValueLimits limits = fld.getValueLimits();\n\t if ((fld.isChoiceControl()) && (fld.areChoicesFixed()))\n {\n\t\t choices = fld.getAppendedChoices();\n\t\t }\n\t else if (fld.isFileField())\n\t {\n if (fld.isExisting())\n\t\t choices = \"Input (existing) path and filename\";\n\t\t else\n\t\t choices = \"Output path and filename\";\n\t\t }\n\t else if (limits != null)\n\t {\n\t\t if (limits.bInteger)\n choices =\"Integer value between \" +\n\t\t Integer.toString((int)limits.minValue) + \" and \" +\n\t\t Integer.toString((int)limits.maxValue);\n\t\t else\n choices =\"Real number between \" +\n\t\t Double.toString(limits.minValue) + \" and \" +\n\t\t Double.toString(limits.maxValue);\n\t\t }\n\t if (choices != null)\n\t {\n\t buffer.append(\"<tr><td></td><td nowrap valign=top><b>Values:</b></td>\");\n\t buffer.append(\"<td colspan=2>\" + choices + \"</td></tr>\\n\");\n\t\t }\n String dflt = fld.getDefaultValue();\n\t if ((dflt != null) && (dflt.length() > 0))\n\t {\n\t buffer.append(\"<tr><td></td><td><b>Default:</b></td><td>\" + dflt);\n\t\t buffer.append(\"</td></tr>\\n\");\n\t\t }\n\t buffer.append(\"<tr><td colspan=4><hr></td></tr>\\n\");\n\t //buffer.append(\"</table></td></tr>\");\n\t }\n\tbuffer.append(\"</table>\\n\");\n\tbuffer.append(\"<META name=\\\"PageBreak\\\" content=\\\"\\\">\\n\");\n\treturn buffer.toString();\n\t}", "private void makePanelTask() {\r\n if (panelTask == null) {\r\n panelTask = makePanel(jframe, BorderLayout.CENTER,\r\n \"Task Details\", 180, 50, 200, 25);\r\n\r\n JLabel createLabelName = makeJLabel(\"Name: \", 10, 100, 80, 25);\r\n JLabel createLabelDescription = makeJLabel(\"Description: \", 10, 130, 80, 25);\r\n JLabel createLabelDueDate = makeJLabel(\"Due Date: \", 10, 160, 80, 25);\r\n JLabel createLabelPriority = makeJLabel(\"Priority Level: \", 10, 190, 80, 25);\r\n\r\n addToTodoTaskGui(createLabelName, createLabelDescription, createLabelDueDate, createLabelPriority);\r\n\r\n JButton clickSave = makeButton(\"saveTask\", \"Save\", 80, 250, 150, 25,\r\n JComponent.BOTTOM_ALIGNMENT, \"cli.wav\");\r\n panelTask.add(clickSave);\r\n\r\n JButton clickCancel = makeButton(\"cancelTask\", \"Cancel\", 280, 250, 150, 25,\r\n JComponent.BOTTOM_ALIGNMENT, \"cli.wav\");\r\n panelTask.add(clickCancel);\r\n }\r\n }", "@ThreadConfined(type = ThreadConfined.ThreadType.AWT)\n DomainDetailsPanel() {\n initComponents();\n MiniTimelinePanel timelinePanel = new MiniTimelinePanel();\n DiscoveryEventUtils.getDiscoveryEventBus().register(timelinePanel);\n jTabbedPane1.add(Bundle.DomainDetailsPanel_miniTimelineTitle_text(), timelinePanel);\n for (BlackboardArtifact.ARTIFACT_TYPE type : SearchData.Type.DOMAIN.getArtifactTypes()) {\n jTabbedPane1.add(type.getDisplayName(), new DomainArtifactsTabPanel(type));\n }\n }", "public abstract WizardPageConfiguration getConfiguration();", "public void createProbleemWizard() throws InstantiationException,\n\t\t\tIllegalAccessException {\n\n\t\tif (getMelding().getProbleem() != null) {\n\t\t\tmodelRepository.evictObject(getMelding().getProbleem());\n\t\t}\n\t\tprobleem = null;\n\t\tif (\"bord\".equals(probleemType)) {\n\n\t\t\tif (trajectType.endsWith(\"Route\")) {\n\t\t\t\tprobleem = (Probleem) modelRepository.createObject(\n\t\t\t\t\t\t\"RouteBordProbleem\", null);\n\n\t\t\t} else if (trajectType.contains(\"Netwerk\")) {\n\t\t\t\tprobleem = (Probleem) modelRepository.createObject(\n\t\t\t\t\t\t\"NetwerkBordProbleem\", null);\n\n\t\t\t}\n\n\t\t} else if (\"ander\".equals(probleemType)) {\n\n\t\t\tif (trajectType.endsWith(\"Route\")) {\n\t\t\t\tprobleem = (Probleem) modelRepository.createObject(\n\t\t\t\t\t\t\"RouteAnderProbleem\", null);\n\n\t\t\t} else if (trajectType.contains(\"Netwerk\")) {\n\t\t\t\tprobleem = (Probleem) modelRepository.createObject(\n\t\t\t\t\t\t\"NetwerkAnderProbleem\", null);\n\t\t\t}\n\t\t}\n\t\tgetMelding().setProbleem(probleem);\n\t}", "public void testGenericWizards() {\n // open new project wizard\n NewProjectWizardOperator npwo = NewProjectWizardOperator.invoke();\n npwo.selectCategory(\"Java Web\");\n npwo.selectProject(\"Web Application\");\n npwo.next();\n // create operator for next page\n WizardOperator wo = new WizardOperator(\"Web Application\");\n JTextFieldOperator txtName = new JTextFieldOperator((JTextField) new JLabelOperator(wo, \"Project Name:\").getLabelFor());\n txtName.clearText();\n txtName.typeText(\"MyApp\");\n wo.cancel();\n }", "PiviDiagram createPiviDiagram();", "private void createFrame(){\n JPanel jPanelID = new JPanel();\n jPanelID.setLayout(new GridBagLayout());\n JLabel labelText = new JLabel(this.dialogName);\n labelText.setHorizontalAlignment(JLabel.CENTER);\n AddComponent.add(jPanelID,labelText, 0, 0, 2, 1);\n for (int field = 0; field < labelString.length; field++) {\n labelText = new JLabel(labelString[field]);\n AddComponent.add(jPanelID, labelText, 0, field + 1, 1, 1);\n AddComponent.add(jPanelID, fieldID.get(labelString[field]), 1, field + 1, 1, 1);\n }\n int offset = labelString.length + 1;\n labelText = new JLabel(DATE_OF_BIRTH);\n AddComponent.add(jPanelID, labelText, 0, offset, 1, 1);\n AddComponent.add(jPanelID, jDateChooser, 1, offset, 1, 1);\n offset++;\n labelText = new JLabel(GROUP);\n AddComponent.add(jPanelID, labelText, 0, offset, 1, 1);\n AddComponent.add(jPanelID, group, 1, offset, 1, 1);\n dialog.add(jPanelID, BorderLayout.NORTH);\n JButton okButton = new JButton(dialogName);\n okButton.addActionListener(actionEvent -> checkAndSave());\n dialog.add(okButton, BorderLayout.SOUTH);\n }", "ReportGenerationPanel() {\n initComponents();\n reportPanel.setLayout(new GridBagLayout());\n constraints = new GridBagConstraints();\n constraints.fill = GridBagConstraints.BOTH;\n constraints.gridx = 0;\n constraints.gridy = 0;\n constraints.weightx = 1.0;\n glue = Box.createVerticalGlue();\n progressPanel = new ReportProgressPanel();\n }", "public CreateJPanel(ProfileInfo profileInfo) {\n initComponents();\n \n this.profileInfo = profileInfo;\n btnSave.setEnabled(false);\n \n }" ]
[ "0.6532063", "0.649443", "0.6451428", "0.64321166", "0.63148355", "0.6274365", "0.61855626", "0.6086988", "0.6071722", "0.60396606", "0.6017307", "0.599177", "0.5957932", "0.59572333", "0.5918871", "0.58403766", "0.5807674", "0.57938355", "0.5781276", "0.57465565", "0.57339793", "0.5695949", "0.5683882", "0.5679268", "0.56778324", "0.566812", "0.565483", "0.5652461", "0.56296724", "0.5617157", "0.5608676", "0.56069124", "0.5604332", "0.5602012", "0.5578493", "0.55753493", "0.55554044", "0.5544118", "0.55327433", "0.5528694", "0.5504572", "0.5495176", "0.5492935", "0.5488896", "0.54850864", "0.54810184", "0.5480371", "0.5479896", "0.54776", "0.54693633", "0.5465453", "0.54624516", "0.5449279", "0.544728", "0.54437435", "0.54303735", "0.54261696", "0.54242456", "0.54242456", "0.54204744", "0.5414977", "0.5409398", "0.5387541", "0.53806853", "0.5373424", "0.5365688", "0.5361564", "0.53594255", "0.5331755", "0.5322328", "0.5320518", "0.5319229", "0.5297817", "0.52689165", "0.5265282", "0.5243312", "0.5237555", "0.5233815", "0.5231075", "0.52291006", "0.5225404", "0.5225317", "0.5220911", "0.5209418", "0.52022374", "0.51899195", "0.5188196", "0.51854485", "0.51808184", "0.5177423", "0.5172797", "0.51709527", "0.517087", "0.5154725", "0.5152975", "0.51441795", "0.51425534", "0.51410884", "0.51235014", "0.5122048" ]
0.51873195
87
add wings first so that the body is on top (stacking order)
@Override protected void buildGraphics() { GArc rightWing = new GArc(100, 100, -60, 120); rightWing.setColor(Color.magenta); rightWing.setFilled(true); rightWing.setFillColor(Color.magenta); // position in format (cx - r, cy - r) for arc getGraphics().add(rightWing, (-15 - 50), (0 - 50)); GArc leftWing = new GArc(100, 100, 120, 120); leftWing.setColor(Color.magenta); leftWing.setFilled(true); leftWing.setFillColor(Color.magenta); getGraphics().add(leftWing, (-15 - 50), (0 - 50)); GOval rightWingDot = new GOval(-3, -15, 30, 30); rightWingDot.setColor(Color.blue); rightWingDot.setFilled(true); rightWingDot.setFillColor(Color.blue); getGraphics().add(rightWingDot); GOval rightWingDot2 = new GOval(7, -5, 10, 10); rightWingDot2.setColor(Color.cyan); rightWingDot2.setFilled(true); rightWingDot2.setFillColor(Color.cyan); getGraphics().add(rightWingDot2); GLine rightWingLine = new GLine(-15, 0, 35, 0); rightWingLine.setColor(Color.green); getGraphics().add(rightWingLine); GOval leftWingDot = new GOval(-57, -15, 30, 30); leftWingDot.setColor(Color.blue); leftWingDot.setFilled(true); leftWingDot.setFillColor(Color.blue); getGraphics().add(leftWingDot); GOval leftWingDot2 = new GOval(-47, -5, 10, 10); leftWingDot2.setColor(Color.cyan); leftWingDot2.setFilled(true); leftWingDot2.setFillColor(Color.cyan); getGraphics().add(leftWingDot2); GLine leftWingLine = new GLine(-15, 0, -65, 0); leftWingLine.setColor(Color.green); getGraphics().add(leftWingLine); GOval body = new GOval(-20, -30, 10, 60); body.setColor(Color.black); body.setFilled(true); body.setFillColor(Color.black); getGraphics().add(body); GOval head = new GOval(-23, -43, 16, 16); head.setColor(Color.black); head.setFilled(true); head.setFillColor(Color.black); getGraphics().add(head); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void forward() {\n\t\t\n\t\tif(hasEaten()) {\n\t\t\taddBodyPart();\n\t\t} else {\n\t\t\tshuffleBody();\n\t\t}\n\t\t\n\t\tthis.setLocation(this.getX()+dX, this.getY()+dY); // move head\n\t\tthis.display(w); \n\t}", "private void addStackBlocks() {\n\n for (int x = numBlocks; x > 0; x--) {\n\n double blockHeight = totalBLockHeight / numBlocks;\n double blockWidthChange = (maxBlockWidth - minBlockWidth) / numBlocks;\n double blockWidth = minBlockWidth + ((x - 1) * blockWidthChange);\n\n TowerBlock newBlock = new TowerBlock(blockWidth, blockHeight, x);\n towerOne.push(newBlock);\n\n }\n addBlocks = false;\n\n }", "private void wrap() {\n if (myCurrentLeftX % (Grass.TILE_WIDTH * Grass.CYCLE) == 0) {\n if (myLeft) {\n myCowboy.move(Grass.TILE_WIDTH * Grass.CYCLE, 0);\n myCurrentLeftX += (Grass.TILE_WIDTH * Grass.CYCLE);\n for (int i = 0; i < myLeftTumbleweeds.length; i++) {\n myLeftTumbleweeds[i]\n .move(Grass.TILE_WIDTH * Grass.CYCLE, 0);\n }\n for (int i = 0; i < myRightTumbleweeds.length; i++) {\n myRightTumbleweeds[i].move(Grass.TILE_WIDTH * Grass.CYCLE,\n 0);\n }\n } else {\n myCowboy.move(-(Grass.TILE_WIDTH * Grass.CYCLE), 0);\n myCurrentLeftX -= (Grass.TILE_WIDTH * Grass.CYCLE);\n for (int i = 0; i < myLeftTumbleweeds.length; i++) {\n myLeftTumbleweeds[i].move(-Grass.TILE_WIDTH * Grass.CYCLE,\n 0);\n }\n for (int i = 0; i < myRightTumbleweeds.length; i++) {\n myRightTumbleweeds[i].move(-Grass.TILE_WIDTH * Grass.CYCLE,\n 0);\n }\n }\n }\n }", "private void placeBombs() {\n\t\tfor (int i = 0; i < NUM_BOMBS; i++) {\n\t\t\tplaceBomb();\n\t\t}\n\t}", "private void putEveryOtherBeeper() {\n\t\twhile (frontIsClear()) {\n\t\t\tif (beepersPresent()) {\n\t\t\t\tmove();\n\t\t\t\tif (frontIsClear()) {\n\t\t\t\t\tmove();\n\t\t\t\t\tputBeeper();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmove();\n\t\t\t\tputBeeper();\n\t\t\t}\n\t\t}\t\n\t}", "public void preyMovement(WallBuilding wb, int x1, int x2, int y1, int y2){\r\n int b1 = wb.block.get(wb.block.stx(x1), wb.block.sty(y1));//one away\r\n int b2 = wb.block.get(wb.block.stx(x2), wb.block.sty(y2));//two away\r\n if(b1 == 0){//if there are no blocks, we can move normally\r\n if(wb.food.getObjectsAtLocation(x1, y1) == null){//if there is no food in that space\r\n wb.prey.setObjectLocation(this, wb.prey.stx(x1),wb.prey.sty(y1));\r\n }\r\n }else if(b1 == 1){//if there is one block\r\n if(b2 == 0){//if the space after is empty, we can move too!\r\n if(wb.food.getObjectsAtLocation(x2, y2) == null){//if there is no food in that space\r\n wb.block.set(wb.block.stx(x2), wb.block.sty(y2), b2+1);\r\n wb.block.set(wb.block.stx(x1), wb.block.sty(y1), b1-1);\r\n wb.prey.setObjectLocation(this, wb.prey.stx(x1),wb.prey.sty(y1));\r\n }\r\n }else if(b2 < 3){//there is space to move the block\r\n wb.block.set(wb.block.stx(x2), wb.block.sty(y2), b2+1);\r\n wb.block.set(wb.block.stx(x1), wb.block.sty(y1), b1-1);\r\n }\r\n }else{//if there are 2 or 3 blocks\r\n if(b2 < 3){//there is space to move the block\r\n if(wb.food.getObjectsAtLocation(x2, y2) == null){//if there is no food in that space\r\n wb.block.set(wb.block.stx(x2), wb.block.sty(y2), b2+1);\r\n wb.block.set(wb.block.stx(x1), wb.block.sty(y1), b1-1);\r\n }\r\n }\r\n }\r\n }", "public void showBowlingOrder()\n\t{\n\t\twhile(bowlers.size()!=0)\n\t\t{\n\t\t\tbowlers.get(0).setBall(bowlers.get(0).getBall()-1);\n\t\t\tSystem.out.println(bowlers.get(0).getName()+\" throw this ball and left with \"+bowlers.get(0).getBall());\n\t\t\tif(bowlers.get(0).getBall()==0)\n\t\t\t{\n\t\t\t\tbowlers.remove(0);\n\t\t\t}\n\t\t\tthis.shortSort();\n\t\t}\n\t}", "void toyPlacingfStuff(){\n //nu stiu daca asta ramane\n gettingBackToInitial();\n nearingTheWallBefore();\n parallelToTheWall();\n actualToyPlacing();\n }", "@Override\n\tpublic void placeOrder() {\n\t\t\n\t}", "private void push() {\n ImmutableSortedSet<T> myAvailable = _outstanding.apply(\n new Syncd.Transformer<ImmutableSortedSet<T>, ImmutableSortedSet<T>>() {\n public Tuple<ImmutableSortedSet<T>, ImmutableSortedSet<T>> apply(ImmutableSortedSet<T> aBefore) {\n final SortedSet<T> myRemaining = new TreeSet<>(new MessageComparator<T>());\n\n // Identify those messages that are sequentially contiguous from _floor and can be passed on\n //\n ImmutableSortedSet<T> myAccessible =\n new ImmutableSortedSet.Builder<>(new MessageComparator<T>()).addAll(\n Iterables.filter(aBefore, new Predicate<T>() {\n public boolean apply(T aMessage) {\n Long myCurrent = _floor.get();\n\n if (aMessage.getSeq() == myCurrent) {\n // This message can be sent out to listeners so long as we're first to try\n //\n if (_floor.testAndSet(myCurrent, myCurrent + 1))\n return true;\n } else\n // This message must remain\n //\n myRemaining.add(aMessage);\n\n // Couldn't send message out or it must remain\n //\n return false;\n }\n })\n ).build();\n\n return new Tuple<>(new ImmutableSortedSet.Builder<>(\n new MessageComparator<T>()).addAll(myRemaining).build(),\n myAccessible);\n }\n }\n );\n\n send(myAvailable);\n archive(myAvailable);\n }", "private void insertWest(State state)\r\n\t{\r\n\t\tif (westElem == 0)\r\n\t\t{\r\n\t\t\twestQueue[westElem++] = state;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n int i;\r\n\t\t\tfor (i = westElem - 1; i >= 0; i--)\r\n\t\t\t{\r\n\t\t\t\tif (state.getPopulation() > westQueue[i].getPopulation())\r\n\t\t\t\t\twestQueue[i+1] = westQueue[i];\r\n\t\t\t\telse\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\twestQueue[i+1] = state;\r\n westElem++;\r\n\t\t}\r\n\t}", "public void assignStackOrdering(SurfaceControl.Transaction t) {\n int layer;\n int layer2;\n SurfaceControl surfaceControl;\n SurfaceControl surfaceControl2;\n int HOME_STACK_STATE = 0;\n int layer3 = 0;\n int layerForAnimationLayer = 0;\n int layerForBoostedAnimationLayer = 0;\n int layerForHomeAnimationLayer = 0;\n boolean isInHwFreeFormAnimation = false;\n int layerForHwFreeFormAnimationLayer = 0;\n int layerForHwFreeFormAnimationImeLayer = 0;\n int layerForBoostedHwFreeFormAnimationLayer = 0;\n int state = 0;\n while (state <= 2) {\n int i = 0;\n while (i < this.mChildren.size()) {\n TaskStack s = (TaskStack) this.mChildren.get(i);\n boolean notFreeform = s.isAlwaysOnTop() && HwFreeFormUtils.isFreeFormEnable() && !s.inFreeformWindowingMode() && !s.inHwFreeFormWindowingMode();\n if ((state != 0 || s.isActivityTypeHome()) && ((state != 1 || (!s.isActivityTypeHome() && !notFreeform && !s.inHwFreeFormMoveBackState())) && (state != 2 || s.isAlwaysOnTop() || s.inHwFreeFormMoveBackState()))) {\n int layer4 = layer3 + 1;\n s.assignLayer(t, layer3);\n if ((s.inSplitScreenWindowingMode() || s.inHwSplitScreenWindowingMode() || s.inHwMagicWindowingMode()) && s.isVisible() && (surfaceControl2 = this.mSplitScreenDividerAnchor) != null) {\n t.setLayer(surfaceControl2, layer4);\n layer4++;\n }\n if (s.isTaskAnimating() || s.isAppAnimating()) {\n if (state != 2) {\n int layer5 = layer4 + 1;\n layerForAnimationLayer = layer4;\n layerForHwFreeFormAnimationLayer = layerForAnimationLayer;\n if (!s.inHwMagicWindowingMode() || !s.isVisible() || (surfaceControl = this.mSplitScreenDividerAnchor) == null) {\n layer4 = layer5;\n } else {\n t.setLayer(surfaceControl, layer5);\n layer4 = layer5 + 1;\n }\n } else if (s.inHwFreeFormWindowingMode() && s.isAlwaysOnTop()) {\n int layer6 = layer4 + 1;\n layerForHwFreeFormAnimationLayer = layer4;\n layer4 = layer6 + 1;\n layerForHwFreeFormAnimationImeLayer = layer6;\n isInHwFreeFormAnimation = true;\n }\n }\n if (s.inHwFreeFormWindowingMode() && s.getTopChild() != null && ((Task) s.getTopChild()).isHwFreeFormScaleAnimating()) {\n layerForAnimationLayer = layer4;\n layerForHwFreeFormAnimationLayer = layerForAnimationLayer;\n layer4++;\n }\n layer2 = 2;\n if (state != 2) {\n layer = layer4 + 1;\n layerForBoostedAnimationLayer = layer4;\n layerForBoostedHwFreeFormAnimationLayer = layerForBoostedAnimationLayer;\n } else if (!s.inHwFreeFormWindowingMode() || !s.isAlwaysOnTop()) {\n layer = layer4;\n } else {\n layer = layer4 + 1;\n layerForBoostedHwFreeFormAnimationLayer = layer4;\n }\n } else {\n layer = layer3;\n layer2 = 2;\n }\n i++;\n layer3 = layer;\n HOME_STACK_STATE = HOME_STACK_STATE;\n }\n if (state == 0) {\n layerForHomeAnimationLayer = layer3;\n layer3++;\n }\n state++;\n HOME_STACK_STATE = HOME_STACK_STATE;\n }\n SurfaceControl surfaceControl3 = this.mAppAnimationLayer;\n if (surfaceControl3 != null) {\n t.setLayer(surfaceControl3, layerForAnimationLayer);\n }\n SurfaceControl surfaceControl4 = this.mBoostedAppAnimationLayer;\n if (surfaceControl4 != null) {\n t.setLayer(surfaceControl4, layerForBoostedAnimationLayer);\n }\n SurfaceControl surfaceControl5 = this.mAppHwFreeFormAnimationLayer;\n if (surfaceControl5 != null) {\n t.setLayer(surfaceControl5, layerForHwFreeFormAnimationLayer);\n updateImeLayer(isInHwFreeFormAnimation, t, layerForHwFreeFormAnimationImeLayer);\n }\n SurfaceControl surfaceControl6 = this.mBoostedHwFreeFormAnimationLayer;\n if (surfaceControl6 != null) {\n t.setLayer(surfaceControl6, layerForBoostedHwFreeFormAnimationLayer);\n }\n SurfaceControl surfaceControl7 = this.mHomeAppAnimationLayer;\n if (surfaceControl7 != null) {\n t.setLayer(surfaceControl7, layerForHomeAnimationLayer);\n }\n }", "@Override\n\tpublic void inorder() {\n\n\t}", "@Override\r\n\tpublic void setBuildOrder() {\n\t\tqueueBuild(false, UpgradeType.Protoss_Ground_Armor);\r\n\t}", "private void prepare()\n {\n /**build the outer wall actor\n * width of wall: 50\n */\n //top wall\n for(int top = 0; top < 59; top++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(25 + top * 50, 25);\n }\n //down wall\n for(int down = 0; down < 59; down++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(25 + down * 50, 675);\n }\n //left wall\n for(int left = 1; left < 13; left++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(25, 25 + left * 50);\n }\n //right wall\n for(int right = 1; right < 13; right++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(2925, 25 + right * 50);\n }\n \n /**starting point of the cat */\n P1 p1 = new P1();\n addObject(p1, 133, 321);\n p1.setLocation(575, 125);\n \n //attach obsever to the cat\n HealthPointObserver hpObserver = new HealthPointObserver(p1);\n addObject(hpObserver, 800, 100);\n \n \n \n \n \n /**first page\n * x: 25 - 1025\n */\n //starting location\n for(int start = 0; start < 17; start++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(175 + start * 50, 175);\n }\n //page seperator\n for(int right = 1; right < 10; right++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1025, 25 + right * 50);\n }\n //jumpers\n Wall wall1 = new Wall();\n addObject(wall1, 32, 382);\n wall1.setLocation(175, 625);\n for(int jump = 0; jump < 2; jump++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(275, 575 + jump * 50);\n }\n for(int jump = 0; jump < 4; jump++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(375, 475 + jump * 50);\n }\n for(int jump = 0; jump < 4; jump++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(525, 475 + jump * 50);\n }\n //set thorn\n Thorn thorn1 = new Thorn();\n addObject(thorn1, 32, 382);\n thorn1.setLocation(625, 625);\n Thorn thorn2 = new Thorn();\n addObject(thorn2, 32, 382);\n thorn2.setLocation(775, 625);\n Thorn thorn3 = new Thorn();\n addObject(thorn3, 32, 382);\n thorn3.setLocation(825, 625);\n \n /**second page \n * x: 1025 - 1975\n */\n //steps for left-top area\n for(int step = 0; step < 2; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1225 + step * 50, 575);\n }\n for(int step = 0; step < 3; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1075 + step * 50, 475);\n }\n for(int step = 0; step < 2; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1225 + step * 50, 375);\n }\n for(int step = 0; step < 3; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1075 + step * 50, 275);\n }\n Wall step1 = new Wall();\n addObject(step1, 32, 382);\n step1.setLocation(1225, 175);\n Wall step2 = new Wall();\n addObject(step2, 32, 382);\n step2.setLocation(1775, 125);\n for(int step = 0; step < 2; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1875 + step * 50, 125);\n }\n //area seperator\n for(int right = 3; right < 13; right++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1325, 25 + right * 50);\n }\n for(int right = 0; right < 8; right++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1375 + right * 50, 175);\n }\n //steps for right-down area\n for(int step = 0; step < 4; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1575 + step * 50, 575);\n }\n for(int step = 0; step < 4; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1375 + step * 50, 475);\n }\n for(int step = 0; step < 2; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1825, step * 50 + 275);\n }\n for(int step = 0; step < 7; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1575 + step * 50, 375);\n }\n for(int step = 0; step < 5; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1775, step * 50 + 425);\n }\n //page seperator\n for(int right = 1; right < 11; right++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(1975, 25 + right * 50);\n }\n //set thorn\n Thorn thorn4 = new Thorn();\n addObject(thorn4, 32, 382);\n thorn4.setLocation(1125, 225);\n Thorn thorn5 = new Thorn();\n addObject(thorn5, 32, 382);\n thorn5.setLocation(1275, 325);\n Thorn thorn6 = new Thorn();\n addObject(thorn6, 32, 382);\n thorn6.setLocation(1875, 325);\n Thorn thorn7 = new Thorn();\n addObject(thorn7, 32, 382);\n thorn7.setLocation(1825, 625);\n Thorn thorn8 = new Thorn();\n addObject(thorn8, 32, 382);\n thorn8.setLocation(1825, 225);\n \n /**third page \n * x: 1975 - 2925\n */\n for(int step = 0; step < 4; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(2125 + step * 150, 625);\n }\n //jumper\n for(int step = 0; step < 3; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(2025, step * 150 + 225);\n }\n for(int step = 0; step < 3; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(2125, step * 150 + 175);\n }\n // Wall jump1 = new Wall();\n //addObject(jump1, 32, 382);\n //jump1.setLocation(2125, 525);\n for(int step = 0; step < 8; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(2175, step * 50 + 175);\n }\n //hidden thorn\n Thorn thorn9 = new Thorn();\n addObject(thorn9, 32, 382);\n thorn9.setLocation(2225, 165);\n Wall jump2 = new Wall();\n addObject(jump2, 32, 382);\n jump2.setLocation(2275, 175);\n Wall jump3 = new Wall();\n addObject(jump3, 32, 382);\n jump3.setLocation(2225, 175);\n Wall jump4 = new Wall();\n addObject(jump4, 32, 382);\n jump4.setLocation(2325, 275);\n Wall jump5 = new Wall();\n addObject(jump5, 32, 382);\n jump5.setLocation(2525, 275);\n Wall jump6 = new Wall();\n addObject(jump6, 32, 382);\n jump6.setLocation(2225, 375);\n Wall jump7 = new Wall();\n addObject(jump7, 32, 382);\n jump7.setLocation(2275, 425);\n for(int step = 0; step < 6; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(2425 + step * 50, 425);\n }\n for(int step = 0; step < 3; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(2625 + step * 50, 375);\n }\n for(int step = 0; step < 2; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(2725 + step * 50, 325);\n }\n Wall jump8 = new Wall();\n addObject(jump8, 32, 382);\n jump8.setLocation(2825, 275);\n for(int step = 0; step < 2; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(2825 + step * 50, 125);\n }\n for(int step = 0; step < 3; step++)\n {\n Wall wall = new Wall();\n addObject(wall, 32, 382);\n wall.setLocation(2675, step * 50 + 475);\n }\n //set thorn\n Thorn thorn10 = new Thorn();\n addObject(thorn10, 32, 382);\n thorn10.setLocation(2825, 175);\n Thorn thorn11 = new Thorn();\n addObject(thorn11, 32, 382);\n thorn11.setLocation(2825, 625);\n Thorn thorn12 = new Thorn();\n addObject(thorn12, 32, 382);\n thorn12.setLocation(2775, 275);\n Thorn thorn13 = new Thorn();\n addObject(thorn13, 32, 382);\n thorn13.setLocation(2675, 325);\n Thorn thorn14 = new Thorn();\n addObject(thorn14, 32, 382);\n thorn14.setLocation(2875, 425);\n for(int sharp = 0; sharp < 2; sharp++)\n {\n Thorn thorn = new Thorn();\n addObject(thorn, 32, 382);\n thorn.setLocation(2025, sharp * 150 + 275);\n }\n for(int sharp = 0; sharp < 2; sharp++)\n {\n Thorn thorn = new Thorn();\n addObject(thorn, 32, 382);\n thorn.setLocation(2125, sharp * 150 + 225);\n }\n //wheel-thorn\n for(int sharp = 0; sharp < 2; sharp++)\n {\n Thorn thorn = new Thorn();\n addObject(thorn, 32, 382);\n thorn.setLocation(2275 + sharp * 200, 275);\n }\n for(int sharp = 0; sharp < 2; sharp++)\n {\n Thorn thorn = new Thorn();\n addObject(thorn, 32, 382);\n thorn.setLocation(2325 + sharp * 200, 225);\n }\n for(int sharp = 0; sharp < 2; sharp++)\n {\n Thorn thorn = new Thorn();\n addObject(thorn, 32, 382);\n thorn.setLocation(2375 + sharp * 200, 275);\n }\n for(int sharp = 0; sharp < 2; sharp++)\n {\n Thorn thorn = new Thorn();\n addObject(thorn, 32, 382);\n thorn.setLocation(2325 + sharp * 200, 325);\n }\n //three-limit\n for(int sharp = 0; sharp < 3; sharp++)\n {\n Thorn thorn = new Thorn();\n addObject(thorn, 32, 382);\n thorn.setLocation(2275 + sharp * 150, 475);\n }\n for(int sharp = 0; sharp < 3; sharp++)\n {\n Thorn thorn = new Thorn();\n addObject(thorn, 32, 382);\n thorn.setLocation(2275 + sharp * 150, 575);\n }\n for(int sharp = 0; sharp < 3; sharp++)\n {\n Thorn thorn = new Thorn();\n addObject(thorn, 32, 382);\n thorn.setLocation(2225 + sharp * 150, 525);\n }\n for(int sharp = 0; sharp < 3; sharp++)\n {\n Thorn thorn = new Thorn();\n addObject(thorn, 32, 382);\n thorn.setLocation(2325 + sharp * 150, 525);\n }\n }", "protected void moveFrontAndLaterally() {\n\n dbugThis(\"================================= NEW TRY ====================================================\");\n botTop.swing(BotTop.SWING_UP_COMMAND, true);\n autonomousIdleTasks();\n botTop.openClaw();\n autonomousIdleTasks();\n justWait(1000);\n moveXInchesFromFrontObject(DISTANCE_TO_STONEWALL, 10000, 0.2);\n boolean right = true;\n while (opModeIsActive()) {\n justWait(1000);\n if (right) {\n moveRight(40.0, 0.4);\n right = false;\n }\n else {\n moveLeft(40.0, 0.4);\n right = true;\n }\n }\n return;\n }", "private void insertMidwest(State state)\r\n\t{\r\n\t\tif (midwestElem == 0)\r\n\t\t{\r\n\t\t\tmidwestQueue[midwestElem++] = state;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n int i;\r\n\t\t\tfor (i = midwestElem - 1; i >= 0; i--)\r\n\t\t\t{\r\n\t\t\t\tif (state.getPopulation() > midwestQueue[i].getPopulation())\r\n\t\t\t\t\tmidwestQueue[i+1] = midwestQueue[i];\r\n\t\t\t\telse\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tmidwestQueue[i+1] = state;\r\n midwestElem++;\r\n\t\t}\r\n\t}", "private void pump_water() {\n\t\t\r\n\t}", "private void buildBoatsInOrder(List<Boat> boats) {\n List<Boat> newList = new ArrayList<>(boats);\n newList.add(player);\n boatsInOrder = new ArrayList<>();\n while (!newList.isEmpty()) {\n Boat highest = null;\n for (Boat boat:newList) {\n\n if (highest == null) {\n highest = boat;\n }else if (boat.getCumulativeLegTime() < highest.getCumulativeLegTime()) {\n highest = boat;\n }\n }\n boatsInOrder.add(boatsInOrder.size(),highest);\n newList.remove(highest);\n }\n }", "private void putToTop()\r\n {\r\n OrderManager manager = myOrderManagerRegistry.getOrderManager(ourKey);\r\n manager.activateParticipant(ourKey);\r\n manager.moveToTop(ourKey);\r\n }", "void bottom() {\n startAnimation(bottomSubCubes(), Axis.Y, Direction.ANTICLOCKWISE);\n bottomCubeSwap();\n }", "private void addFromQueue()\n\t{\n\t\twhile( humanQueue.size()>0 )\n\t\t\thumans.add(humanQueue.remove(0));\n\t\twhile( zombieQueue.size()>0 )\n\t\t\tzombies.add(zombieQueue.remove(0));\n\t}", "public void assignStackOrdering() {\n this.mTaskStackContainers.assignStackOrdering(getPendingTransaction());\n }", "public void placeWormOnAgar()\n {\n for (int x = 0; x < Agar.GRID_SIZE.width; x++)\n {\n for (int y = 0; y < Agar.GRID_SIZE.height; y++)\n {\n agar.wormCells[x][y] = SectorDisplay.EMPTY_CELL_VALUE;\n }\n }\n agar.wormCells[headSegment.x][headSegment.y] = Agar.WORM_SEGMENT_VALUE;\n for (int i = 0; i < NUM_BODY_SEGMENTS; i++)\n {\n BodySegment segment = bodySegments[i];\n agar.wormCells[segment.x][segment.y] = Agar.WORM_SEGMENT_VALUE;\n }\n }", "private void insertSouth(State state)\r\n\t{\r\n\t\tif (southElem == 0)\r\n\t\t{\r\n\t\t\tsouthQueue[southElem++] = state;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint i;\t\r\n for (i = southElem - 1; i >= 0; i--)\r\n\t\t\t{\r\n\t\t\t\tif (state.getPopulation() > southQueue[i].getPopulation())\r\n\t\t\t\t\tsouthQueue[i+1] = southQueue[i];\r\n\t\t\t\telse\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tsouthQueue[i+1] = state;\r\n southElem++;\r\n\t\t}\r\n\t}", "public void alignTop() {\n\t\ttop.top();\n\t}", "private void settleNest()\n\t{\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tif(nestslots[i] == null && nestslots[i+1]!= null){\n\t\t\t\tnestslots[i] = nestslots[i+1];\n\t\t\t\tnestslots[i+1] = null;\n\t\t\t\tif(i==0)\n\t\t\t\t\tneststate = NestStatus.needCheck;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif(nestslots[7]==null && extraparts.size()>0){\n\t\t\tnestslots[7]=extraparts.get(0);\n\t\t\textraparts.remove(0);\n\t\t}\n\t\t\n\t\t//if(lanestate == LaneStatus.hasPart && nestslots[7]==null){\n\t\t//\tacceptPart();\n\t\t//}\n\t}", "public void lowerFlatbed(){\n flatbed.lowerFlatbed();\n }", "public final /* synthetic */ void zzy() {\n zzbu zzw = zzw();\n if (zzw != null) {\n this.zzbb.add(zzw);\n }\n }", "private FlyWithWings(){\n\t\t\n\t}", "private void addNewHead() {\t\t\n\t\tif(currentDirection == Direction.RIGHT) {\n\t\t\tsnake.addLast(new HeadComponent(\n\t\t\t\t\tsnake.getLast().getX() + SnakeComponent.imageSize, \n\t\t\t\t\tsnake.getLast().getY(),\n\t\t\t\t\tcurrentDirection\n\t\t\t));\n\t\t\tsnakeDirection = Direction.RIGHT;\n\t\t\t\n\t\t} else if(currentDirection == Direction.LEFT) {\n\t\t\tsnake.addLast(new HeadComponent(\n\t\t\t\t\tsnake.getLast().getX() - SnakeComponent.imageSize, \n\t\t\t\t\tsnake.getLast().getY(), \n\t\t\t\t\tcurrentDirection\n\t\t\t));\n\t\t\tsnakeDirection = Direction.LEFT;\n\t\t\t\n\t\t} else if(currentDirection == Direction.DOWN) {\n\t\t\tsnake.addLast(new HeadComponent(\n\t\t\t\t\tsnake.getLast().getX(), \n\t\t\t\t\tsnake.getLast().getY()+SnakeComponent.imageSize, \n\t\t\t\t\tcurrentDirection\n\t\t\t));\n\t\t\tsnakeDirection = Direction.DOWN;\n\t\t\t\n\t\t} else if(currentDirection == Direction.UP) {\n\t\t\tsnake.addLast(new HeadComponent(\n\t\t\t\t\tsnake.getLast().getX(), \n\t\t\t\t\tsnake.getLast().getY()-SnakeComponent.imageSize,\n\t\t\t\t\tcurrentDirection\n\t\t\t));\n\t\t\tsnakeDirection = Direction.UP;\n\t\t}\n\t}", "private void CreatingBeautyContentTopK() {\n\t\t\tConstraintsPlacement objConstraints= new ConstraintsPlacement(this);\r\n\t\t\t//Creating array with states\r\n\t\t\tArrayList<BlockNode> states = new ArrayList<BlockNode>();\r\n\t\t\t//Building the graph in a deph way\r\n\t \tGraphBuilder objGrapB= new GraphBuilder(1);\r\n\t \tint numElements=objElem.getNumberObjects();\r\n\t \tint numEnemies=objElem.getNumberObjectsEnemies();\r\n\t \tint globalControlSearch=0;\r\n\t \t//Beststates=objGrapB.basicDepthSearch(mediumStraight,height,numElements,numElements,states,objConstraints, objElem.getFinalList(),objElem);\r\n\t \tbestBranches=objGrapB.relativePositionDepthSearchTopK(mediumStraight,height,numElements-numEnemies,numElements-numEnemies,states,objConstraints, objElem.getFinalList(),objElem,-mediumStraight+1,mediumStraight-1,floorTileHeight,0,0,maxScreens,numEnemies,random,globalControlSearch);\r\n\t \t//Beststates=objGrapB.relativeTransPositionDepthSearch(mediumStraight,height,numElements,numElements,states,objConstraints, objElem.getFinalList(),objElem,-mediumStraight+1,mediumStraight-1,floorTileHeight,0,0,currentState,hTable);\r\n\t \r\n\t \tBranch objBranch=new Branch();\r\n\t \t//bestBranches=objBranch.sortBranches(bestBranches);\r\n\t \t\r\n\t \t//System.out.print( \"CounterStates\"+objGrapB.getCounterIDs() );\r\n\t \r\n\t //imprimiendo los estados visitados\r\n\t /*\r\n\t Iterator<BlockNode> nombreIterator = states.iterator();\r\n\t while(nombreIterator.hasNext()){\r\n\t \tBlockNode elemento = nombreIterator.next();\r\n\t \tSystem.out.print(elemento.getID()+\" / \");\r\n\t }*/\r\n\t \r\n\t //here we are painting as the best branches foundeded\r\n\t \r\n\t Iterator<Branch> nombreIterator = bestBranches.iterator();\r\n\t while(nombreIterator.hasNext()){\r\n\t \tBranch elemento = nombreIterator.next();\r\n\t \t//System.out.print(elemento.getHeuristicValue()+ \" / \");\r\n\t }\r\n\t \r\n\t \r\n\t //Here we will put the elements on the tile\r\n\t \t//Just here to implement the n screens!\r\n\t for(int i=0;i<maxScreens;i++)\r\n\t {//block from Lelis and Reis (>class GeradorDeFasses)\r\n/*\t \ttry {\r\n\t \t\tLevel levelScreen=PaintElements(((Branch)bestBranches.get(i)).getStates(),this.clone());\t\t\t\t\t\r\n\t\t\t\t\tScreen objScreen=new Screen();\r\n\t\t\t\t\tobjScreen.SaveScreen(levelScreen,odds,objElem);\r\n\t \t\tInformacoesTelas info = new InformacoesTelas();\r\n\t\t\t CopiaArquivos copiador = new CopiaArquivos();\r\n\t\t\t \r\n\t\t\t info = info.carregaInfoTela(\"infoTela\");\r\n\t\t\t\t\tinfo.setOutrasVariaveis(0, 0); // Salva outras informacoes da Tela\r\n\t\t\t\t\tinfo.salvaInfoTela(\"infoTela\", info);\t\t\t\t\t\r\n\t\t\t\t\tcopiador.copy(\"\" + i, \"Screens/\");\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (CloneNotSupportedException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}*/\r\n\t }\r\n\t \r\n\t\t\t\r\n\t\t}", "public void addWrestler(Wrestler w) {\r\n\t\tboolean s = false;\r\n\t\tif (teamList == null) {\r\n\t\t\tteamList = new ListNode(w, null);\r\n\t\t\ts = true;\r\n\t\t}\r\n\t\telse if(w.getWeight() < ((Wrestler) teamList.getValue()).getWeight()) {\r\n\t\t\tListNode a = new ListNode(w , teamList);\r\n\t\t\tteamList = a;\r\n\t\t\ts = true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tListNode over;\r\n\t\t\tListNode initial = teamList;\r\n\t\t\tListNode t = teamList;\r\n\t\t\twhile (t.getNext() != null) {\r\n\t\t\t\tt = teamList.getNext();\r\n\t\t\t\tif (((Wrestler) t.getValue()).getWeight() > w.getWeight()) {\r\n\t\t\t\t\tover = t;\r\n\t\t\t\t\twhile (!initial.getNext().equals(over))\r\n\t\t\t\t\t\tinitial = initial.getNext();\r\n\t\t\t\t\tinitial.setNext(new ListNode(w, initial.getNext()));\r\n\t\t\t\t\ts = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!s) {\r\n\t\t\tListNode t = teamList;\r\n\t\t\twhile (t.getNext() != null) {\r\n\t\t\t\tt = teamList.getNext();\r\n\t\t\t}\r\n\t\t\tt.setNext(new ListNode(w, null));\r\n\t\t}\r\n\t}", "@Override\n\tpublic void preorder() {\n\n\t}", "void push(RtfCompoundObject state) {\r\n _top = new RtfCompoundObjectStackCell(_top, state);\r\n }", "public void overflow (ByteBufferWithInfo bbwi)\n {\n // Set the fragment's moreFragments field to true\n MessageBase.setFlag(bbwi.buf, Message.MORE_FRAGMENTS_BIT);\n\n // Enqueue the previous fragment\n queue.enqueue(bbwi);\n\n // Create a new bbwi\n ByteBufferWithInfo newBbwi = new ByteBufferWithInfo(getInitialBufferSize());\n newBbwi.fragmented = true;\n\n stream.setByteBufferWithInfo(newBbwi);\n\n // Now we must marshal in the fragment header/GIOP header\n\n // REVISIT - we can optimize this by not creating the fragment message\n // each time. \n\n FragmentMessage header = stream.getMessage().createFragmentMessage();\n\n header.write(stream);\n }", "public static void craft() {\r\n\t\t\r\n\t\tif (ths.page == 5) {\r\n\t\t\tths.page++;\r\n\t\t}\r\n\t}", "void top() {\n startAnimation(topSubCubes(), Axis.Y, Direction.CLOCKWISE);\n topCubeSwap();\n }", "private void shiftTilesBottomToTop(int colNum, int rowNum, FloorTile tile, int rotation) {\n tile.rotate(rotation);\n for (int i = 0; i < nRows - 1; i++) {\n board[i][colNum] = board[i + 1][colNum];\n if (activeEffects.get(new Position(i + 1, colNum)) != null) {\n activeEffects.put(new Position(i, colNum), activeEffects.get(new Position(i + 1, colNum)));\n activeEffects.remove(new Position(i + 1, colNum));\n }\n }\n board[rowNum - 1][colNum] = tile;\n }", "private void snack() {\n\t\t\tsynchronized (left) {\n\t\t\t\tsynchronized (right) {\n\t\t\t\t\tSystem.out.println(this.name + \" start to snack\");\n\t\t\t\t\tUtils.pause(1_000);\n\t\t\t\t\t// System.out.println(this.name + \" finished to snack\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t// System.out.println(this.name + \" is not hungry\");\n\t\t}", "private void prepare()\n {\n Block block = new Block(10);\n addObject(block,372,150);\n Wall wall = new Wall();\n addObject(wall,52,167);\n Wall wall2 = new Wall();\n addObject(wall2,160,167);\n Wall wall3 = new Wall();\n addObject(wall3,550,167);\n Wall wall4 = new Wall();\n addObject(wall4,650,167);\n Wall wall5 = new Wall();\n addObject(wall5,750,167);\n block.setLocation(306,171);\n Robot robot = new Robot();\n addObject(robot,48,51);\n Pizza pizza = new Pizza();\n addObject(pizza,550,60);\n Pizza pizza2 = new Pizza();\n addObject(pizza2,727,53);\n Pizza pizza3 = new Pizza();\n addObject(pizza3,364,303);\n Pizza pizza4 = new Pizza();\n addObject(pizza4,224,400);\n Pizza pizza5 = new Pizza();\n addObject(pizza5,622,395);\n ScorePanel scorePanel = new ScorePanel();\n addObject(scorePanel,106,525);\n Home home = new Home();\n addObject(home,717,521);\n\n block.setLocation(344,173);\n pizza3.setLocation(394,297);\n Pizza pizza6 = new Pizza();\n addObject(pizza6,711,265);\n Pizza pizza7 = new Pizza();\n addObject(pizza7,68,276);\n\n }", "@Override\n public boolean isGoodForTop()\n {\n return false;\n }", "public void beforeFirst() {\n\t\tmoveTo(0);\n\t}", "public void makeTop()\n {\n top250 = new Movie[TOP_LENGTH];\n for (final Movie m : this)\n {\n final int rank = m.getRank();\n if (rank > 0 && rank <= TOP_LENGTH)\n {\n top250[rank - 1] = m;\n }\n }\n }", "public void addWerker(Worker w)\n {\n if(aantalWerkers < 5)\n {\n boolean geplaatst = false; // plaatselijke parameter die zegt of de workers al gepaatst is of niet\n for(int i=0; i<5;i++)\n {\n \n if( geplaatst == false)\n {\n if(workers[i] == null)\n {\n workers[i] = w;\n geplaatst = true;\n }\n }\n }\n aantalWerkers++;\n w.setInStructure(true);\n }\n }", "public void addAllToFront(List<UnitOfWork> workUnits) {\n synchronized (addedFrontWork) {\n addedFrontWork.addAll(0, workUnits);\n }\n }", "void push() {\n\t\t// push logic here\n\t\t_pushes++;\n\t\t_money += _bet;\n\t\tclearHand();\n\t\t_bet = 0;\n\t}", "public void packBags() {\r\n GroceryBag[] packedBags = new GroceryBag[numItems];\r\n int bagCount = 0;\r\n\r\n GroceryBag currentBag = new GroceryBag();\r\n for (int i=0; i<numItems; i++) {\r\n GroceryItem item = (GroceryItem) cart[i];\r\n if (item.getWeight() <= GroceryBag.MAX_WEIGHT) {\r\n if (!currentBag.canHold(item)) {\r\n packedBags[bagCount++] = currentBag;\r\n currentBag = new GroceryBag();\r\n }\r\n currentBag.addItem(item);\r\n removeItem(item);\r\n i--;\r\n }\r\n }\r\n // Check this in case there were no bagged items\r\n if (currentBag.getWeight() > 0)\r\n packedBags[bagCount++] = currentBag;\r\n\r\n // Now create a new bag array which is just the right size\r\n pBags = new GroceryBag[bagCount];\r\n for (int i=0; i<bagCount; i++) {\r\n pBags[i] = packedBags[i];\r\n }\r\n\r\n // Add all grocery bags bag into cart\r\n for (int i = 0; i < bagCount; i++) {\r\n addItem(pBags[i]);\r\n }\r\n }", "public void partBroughtToTop(IWorkbenchPartReference partRef) {\n\t\t\t\t\n\t\t\t}", "private void enterToRunwayQueue() {\n\t\tqueue.insert(this);\n\t}", "public final /* synthetic */ void zzx() {\n zzbu zzw = zzw();\n if (zzw != null) {\n this.zzbb.add(zzw);\n }\n }", "public void bottomPlatform()\r\n {\r\n //Bottom platform/ floor\r\n addObject (platforms[0], 141, 555);\r\n addObject (platforms[1], 424, 555);\r\n addObject (platforms[2], 700, 555);\r\n addObject (platforms[3], 950, 555);\r\n }", "public void stealStick(Warrior w){\n\t\tSystem.out.println(w.getName()+ \" has caught by Innocent Monster \"+ this.getName());\n\t\tWalkingStick ws = w.looseStick();\n\t\tStolenSticks.add(ws);\n\t}", "private void moveStack1ToStack2() \n {\n while (!stack1.isEmpty())\n stack2.push(stack1.pop());\n }", "public void startOrder() {\n\t\tDeck tempDeck = new Deck();\n\t\tArrayList<Player> highPlayerList = new ArrayList<Player>();\n\t\tStrategy3 testPlayer = new Strategy3();\n\t\tint temp = 0;\n\t\tfor (Player p : this.playerList) {\n\t\t\ttemp++;\n\t\t\tp.hand.add(tempDeck.dealTile());\n\t\t}\n\t\t\n\t\twhile (playerList.isEmpty() == false) {\t\n\t\t\tPlayer min = playerList.get(0);\n\t\t\tfor(Player i : playerList) {\n\t\t\t\tif (i.getHandValue() > min.getHandValue()) {min = i;}\n\t\t\t}\n\t\t\thighPlayerList.add(min);\n\t\t\tplayerList.remove(min);\n\t\t}\n\t\tthis.playerList = highPlayerList;\t\n\t\ttemp = 0; \n\t\tfor(Player p : this.playerList) {\n\t\t\ttemp++;\n\t\t}\n\t\t\n\t\tfor (Player p : playerList) {\n\t\t\tp.hand.clear();\n\t\t}\t\t\n\t}", "public void updateTopWeight(){\r\n\t \tif(this.topNode != null)\r\n\t \t{\r\n\t \t\tif(this.topNode.isNoGoZone() == true)\r\n\t \t{\r\n\t \t\t\t//set edge weight to 9999999 if the next node is NO go zone or\r\n\t \t\t\t//boundary node\r\n\t \t\tthis.topWeight = weightOfNoGoZone;\r\n\t \t}\r\n\t \telse if(this.topNode.road == true && this.topNode.isNoGoZone() == false)\r\n\t \t{\r\n\t \t\t//set edge weight to 1 if the next node is a road node\r\n\t \t\tthis.topWeight = this.topNode.getOwnElevation();\r\n\t \t}\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\t//set edge weight to INF if the next node is NULL\r\n\t \t\tthis.topWeight = weightOfMapEdge;\r\n\t \t}\r\n\t }", "void writeStackToRecentsBlocking() {\n final ContentResolver resolver = getContentResolver();\n final ContentValues values = new ContentValues();\n\n final byte[] rawStack = DurableUtils.writeToArrayOrNull(mState.stack);\n\n // Remember location for next app launch\n final String packageName = getCallingPackageMaybeExtra();\n values.clear();\n values.put(ResumeColumns.STACK, rawStack);\n values.put(ResumeColumns.EXTERNAL, 0);\n resolver.insert(RecentsProvider.buildResume(packageName), values);\n }", "public void addFrame(Frame frame) throws BowlingException\r\n\t{\r\n\t\tif(frames.size()==10)\r\n\t\t\tthrow new BowlingException();\r\n\t\telse\r\n\t\t\tframes.add(frame);\r\n\t\t\t\r\n\t\t//to be implemented\r\n\t\t\r\n\t\t\r\n\t}", "public void drawTop(GameCanvas canvas) {\n if (texture == null) {\n System.out.println(\"draw() called on wall with null texture\");\n return;\n }\n\n // Draw the top of the wall\n drawWall(canvas, false, opacity);\n\n // Draw the back edge\n if(backEdgeFrame != NO_SIDE) {\n wallStrip.setFrame(backEdgeFrame);\n wallNightStrip.setFrame(backEdgeFrame);\n// canvas.draw(texture, Color.WHITE,(int)origin.x,(int)origin.y,getX()*drawScale.x,(getY() + TILE_WIDTH)*drawScale.y,getAngle(),getWidth() * drawScale.x / texture.getRegionWidth(), getHeight() * drawScale.y / texture.getRegionHeight());\n\n setScaling(wallStrip);\n canvas.draw(texture, Color.WHITE,(int)origin.x,(int)origin.y,(int)(getX()*drawScale.x),(int)((getY() + TILE_WIDTH)*drawScale.y),getAngle(),sx,sy);\n setScaling(wallNightStrip);\n canvas.draw(textureNight, opacity,(int)origin.x,(int)origin.y,(int)(getX()*drawScale.x),(int)((getY() + TILE_WIDTH)*drawScale.y),getAngle(),sx,sy);\n // Draw the line behind the back edge and the wall, if this is a top wall\n if(!isFrontWall()) {\n wallStrip.setFrame(BACK_LINE);\n wallNightStrip.setFrame(BACK_LINE);\n// canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),getWidth() * drawScale.x / texture.getRegionWidth(), getHeight() * drawScale.y / texture.getRegionHeight());\n\n setScaling(wallStrip);\n canvas.draw(texture, Color.WHITE,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n setScaling(wallNightStrip);\n canvas.draw(textureNight, opacity,origin.x,origin.y,getX()*drawScale.x,getY()*drawScale.y,getAngle(),sx,sy);\n }\n }\n }", "private void createBallsOnTopOfPaddle() {\r\n for (int i = 0; i < levelInformation.numberOfBalls(); i++) {\r\n Ball ball = new Ball((guiWidth / 2) - ((levelInformation.numberOfBalls() - 1) * ballRadius)\r\n + (i * (ballRadius * 2)), 550, ballRadius, Color.WHITE, environment);\r\n ball.setVelocity(levelInformation.initialBallVelocities().get(i));\r\n ball.addToGame(this);\r\n }\r\n ballCounter.increase(levelInformation.numberOfBalls());\r\n }", "private void lowerPriority(String s) {\n\t\tqueue.add(stack.pop());\n\t\tstack.add(s);\n\t}", "public void preWiz(Wiz wiz, WizContext con) throws Exception\n{\n\twiz.pre(con);\n}", "void bottomInv() {\n startAnimation(bottomSubCubes(), Axis.Y, Direction.CLOCKWISE);\n bottomCubeSwap();\n bottomCubeSwap();\n bottomCubeSwap();\n }", "private void drawHeart2 (float sx, float sy, float sz, Appearance[] app)\n {\n\tfloat x, y, z, r;\n \n BranchGroup tBG = new BranchGroup();\n\ttBG.setCapability (BranchGroup.ALLOW_DETACH);\n\n System.out.println(\"Aqui\");\n \n\tx = sx+0f; y = sy+0.04f; z = sz+0f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[0]);\n\t//tBG.addChild (makeText (new Vector3d (sx+0,sy+1.1,sz+0), \"AP\"));\n\n\tx = sx-0.2f; y = sy-0.1f; z = sz+0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[1]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2,sy+0,sz+1.5), \"IS_\"));\n\n\tx = sx+0.2f; y = sy-0.1f; z = sz+0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[2]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2,sy+0,sz+1.5), \"IL\"));\n\n\tx = sx-0.32f; y = sy-0.1f; z = sz+0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[3]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2.5,sy+0,sz+0.5), \"SI\"));\n\n\tx = sx+0.32f; y = sy-0.1f; z = sz+0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[4]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2.5,sy+0,sz+0.5), \"LI\"));\n\n\tx = sx-0.32f; y = sy-0.1f; z = sz-0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[5]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2.5,sy+0,sz-0.5), \"SA\"));\n\n\tx = sx+0.32f; y = sy-0.1f; z = sz-0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[6]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2.5,sy+0,sz-0.5), \"LA\"));\n\n\tx = sx-0.2f; y = sy-0.1f; z = sz-0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[7]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2,sy+0,sz-1.5), \"AS_\"));\n\n\tx = sx+0.2f; y = sy-0.1f; z = sz-0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[8]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2,sy+0,sz-1.5), \"AL\"));\n\n\tsceneBG.addChild (tBG);\n }", "private void addBoundingWalls() {\n\t\taddWall(new Line(new Vector2(0,0),new Vector2(getWidth(),0)));\n\t\taddWall(new Line(new Vector2(getWidth(),0), new Vector2(getWidth(),getHeight())));\n\t\taddWall(new Line(new Vector2(getWidth(),getHeight()),new Vector2(0,getHeight())));\n\t\taddWall(new Line(new Vector2(0,getHeight()),new Vector2(0,0)));\n\t}", "@Override\n\tpublic void buildWalls() {\n\t\tSystem.out.println(\"Building Glass Walls\");\t\n\t}", "private void addWalls() {\n wallList.add(new RectF(0, 0, wallSize, screenHeight / 2 - doorSize));\n wallList.add(new RectF(0, screenHeight / 2 + doorSize, wallSize, screenHeight));\n wallList.add(new RectF(0, 0, screenWidth / 2 - doorSize, wallSize));\n wallList.add(new RectF(screenWidth / 2 + doorSize, 0, screenWidth, wallSize));\n wallList.add(new RectF(screenWidth - wallSize, 0, screenWidth, screenHeight / 2 - doorSize));\n wallList.add(new RectF(screenWidth - wallSize, screenHeight / 2 + doorSize, screenWidth, screenHeight));\n wallList.add(new RectF(0, screenHeight - wallSize, screenWidth / 2 - doorSize, screenHeight));\n wallList.add(new RectF(screenWidth / 2 + doorSize, screenHeight - wallSize, screenWidth, screenHeight));\n }", "public void placeMandatoryObjects()\r\n {\r\n Random rng = new Random();\r\n //Adds an endgame chest somewhere (NOT in spawn)\r\n Room tempRoom = getRoom(rng.nextInt(dungeonWidth - 1) +1, rng.nextInt(dungeonHeight - 1) +1);\r\n tempRoom.addObject(new RoomObject(\"Endgame Chest\", \"overflowing with coolness!\"));\r\n if (tempRoom.getMonster() != null)\r\n {\r\n tempRoom.removeMonster();\r\n }\r\n tempRoom.addMonster(new Monster(\"Pelo Den Stygge\", \"FINAL BOSS\", 220, 220, 12));\r\n //Adds a merchant to the spawn room\r\n getRoom(0,0).addObject(new RoomObject(\"Merchant\", \"like a nice fella with a lot of goods (type \\\"wares\\\" to see his goods)\"));\r\n }", "private void anyBeepersInMiddle() {\n\t\t// while (frontIsClear())\n\t\t// for (int i = 0; i < 2; i++) // This is a test\n\t\twhile (frontIsClear()) {\n\t\t\tif (beepersPresent()) {\n\t\t\t\tmove();\n\t\t\t\tmove();\n\t\t\t} else {\n\t\t\t\tcleaningBallot();\n\t\t\t}\n\t\t}\n\t}", "private static void consolidateStackPage(BlockData bd, PageData pd){\n if(!bd.getPageOf().equals(pd)){\n pd.setPageWidth(pd.getInitPageWidth()+bd.getXCor()+10);\n bd.setXCor(pd.getInitPageWidth() + bd.getXCor());\n bd.getPageOf().removeBlockData(bd);\n pd.addBlockData(bd);\n }\n \n //make sure socket blocks are the same page as this\n if(bd.getSocketData() != null && bd.getSocketData().size() > 0){\n for(ConnectorData cd : bd.getSocketData()){\n if(cd.getConnId() > -1){\n consolidateStackPage(BlockData.getBlockData(cd.getConnId()), pd);\n }\n }\n }\n \n //make sure after block is the same page as this\n if(bd.getAfterBlock() != null){\n consolidateStackPage(bd.getAfterBlock(), pd);\n }\n \n }", "protected void putMonsters() {\n\t\tRandom rand = new Random();\n\t\tfor (int monsterCount = 0; monsterCount < 4; monsterCount++){\n\t\t\tint x, y;\n\t\t\tdo {\n\t\t\t\tx = rand.nextInt(xSize);\n\t\t\t\ty = rand.nextInt(ySize);\n\t\t\t} while((levelSetup[x][y] instanceof SimpleRoom) && (x == 0 & y == 0) && !levelSetup[x][y].hasItem());\n\t\t\tlevelSetup[x][y].putMonster(new BasicMonster());\n\t\t}\n\t}", "private void prepareCoinRacks() {\n\t\t\n\t}", "private Location[] overrunsTop () {\n Location nextLocation;\n Location nextCenter;\n \n // exact calculation for exact 90 degree heading directions (don't want trig functions\n // handling this)\n if (getHeading() == THREE_QUARTER_TURN_DEGREES) {\n nextLocation = new Location(getX(), 0);\n nextCenter = new Location(getX(), myCanvasBounds.getHeight());\n return new Location[] { nextLocation, nextCenter };\n }\n \n double angle = FULL_TURN_DEGREES - getHeading();\n if (getHeading() < THREE_QUARTER_TURN_DEGREES) {\n angle = -(getHeading() - HALF_TURN_DEGREES);\n }\n angle = Math.toRadians(angle);\n nextLocation = new Location(getX() + getY() / Math.tan(angle), 0);\n nextCenter = new Location(getX() + getY() / Math.tan(angle),\n myCanvasBounds.getHeight());\n \n // eliminates race condition - if next location overruns left/right AND top/bottom it checks\n // to see which is overrun first and corrects\n if (nextLocation.getX() > myCanvasBounds.getWidth())\n // right\n return overrunRight();\n else if (nextLocation.getX() < 0) // left\n return overrunLeft();\n \n return new Location[] { nextLocation, nextCenter };\n }", "void generateTrunk(World world, BlockPos pos) {\n\t\tBlockPos bottom = pos;\n\t\tBlockPos top = pos.up(this.height);\n\t\tgenerateLimb(world, bottom, top);\n\n\t\tif (this.trunkSize == 2) {\n\t\t\tgenerateLimb(world, bottom.south(), top.south());\n\t\t\tgenerateLimb(world, bottom.east(), top.east());\n\t\t\tgenerateLimb(world, bottom.south().east(), top.south().east());\n\t\t}\n\t}", "public void addShadow() {\n startShadow();\n }", "public void PutTopUp()\n\t{\n\t\tif(!isStateTop)\n\t\t{\n\t\t\tSystem.out.println(\"Putting top up\");\n\t\t\tisStateTop=true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Top is already up\");\n\t\t}\n\t}", "public void insertInorderBarrier() {\n\t\t\n\t}", "private void alternateBeeper(){\n\t\tputBeeper();\n\t\tif(frontIsClear()){\n\t\tmove();\n\t\t}\n\t\tif(frontIsClear()){\n\t\t\tmove();\n\t\t} \n\t}", "private void decorate(int xStart, int xLength, int floor, ArrayList finalListElements, ArrayList states)\r\n\t {\n\t if (floor < 1)\r\n\t \treturn;\r\n\r\n\t // boolean coins = random.nextInt(3) == 0;\r\n\t boolean rocks = true;\r\n\r\n\t //add an enemy line above the box\r\n\t Random r = new Random();\r\n\t boolean enemyAdded=addEnemyLine(xStart + 1, xLength - 1, floor - 1);\r\n\r\n\t int s = 1;\r\n\t int e = 1;\r\n\r\n\t if(enemyAdded==false)\r\n\t {\r\n\t if (floor - 2 > 0){\r\n\t \tif ((xLength - e) - (xStart + s) > 0){\r\n\t \t\tfor(int x = xStart + s; x < xLength- e; x++){\r\n\t \tboolean flag=true;\r\n\t \tfor(int i=0;i<states.size();i++)\r\n\t \t{\r\n\t \t\tElements element=(Elements)finalListElements.get(i);\r\n\t \t\t\tBlockNode state=(BlockNode)states.get(i);\r\n\t \t\t\t\r\n\t \t\t\tint xElement = (int)(initialStraight+state.getX());\r\n\t \t int floorC= (int)state.getY()+1;\r\n\t \t int widthElement=element.getWidth();\r\n\t \t int heigthElement=element.getHeigth()+2;\r\n\t \t \r\n\t \t int widthElementNext=1;\r\n\t \t int heigthElementNext=0;\r\n\t \t \r\n\t \t if(x+(widthElementNext-1)>=xElement && x<xElement+widthElement && (floor-1)-heigthElementNext<=floorC && (floor-1)>= floorC-heigthElement )\r\n\t \t {\r\n\t \t \tflag=false;\r\n\t \t \tbreak;\r\n\t \t }\r\n\t \t \t \t \t\t \t \r\n\t \t } \r\n\t \tif(flag==true)\r\n\t \t{\r\n\t \t\tsetBlock(x, floor - 1, COIN);\r\n\t \t}\r\n\t \r\n\t //COINS++;\r\n\t }\r\n\t }\r\n\t }\r\n\t }\r\n\r\n\t s = random.nextInt(4);\r\n\t e = random.nextInt(4);\r\n\t \r\n\t //this fills the set of blocks and the hidden objects inside them\r\n\t /*\r\n\t if (floor - 4 > 0)\r\n\t {\r\n\t if ((xLength - 1 - e) - (xStart + 1 + s) > 2)\r\n\t {\r\n\t for (int x = xStart + 1 + s; x < xLength - 1 - e; x++)\r\n\t {\r\n\t if (rocks)\r\n\t {\r\n\t if (x != xStart + 1 && x != xLength - 2 && random.nextInt(3) == 0)\r\n\t {\r\n\t if (random.nextInt(4) == 0)\r\n\t {\r\n\t setBlock(x, floor - 4, BLOCK_POWERUP);\r\n\t //BLOCKS_POWER++;\r\n\t }\r\n\t else\r\n\t {\t//the fills a block with a hidden coin\r\n\t setBlock(x, floor - 4, BLOCK_COIN);\r\n\t //BLOCKS_COINS++;\r\n\t }\r\n\t }\r\n\t else if (random.nextInt(4) == 0)\r\n\t {\r\n\t if (random.nextInt(4) == 0)\r\n\t {\r\n\t setBlock(x, floor - 4, (byte) (2 + 1 * 16));\r\n\t }\r\n\t else\r\n\t {\r\n\t setBlock(x, floor - 4, (byte) (1 + 1 * 16));\r\n\t }\r\n\t }\r\n\t else\r\n\t {\r\n\t setBlock(x, floor - 4, BLOCK_EMPTY);\r\n\t //BLOCKS_EMPTY++;\r\n\t }\r\n\t }\r\n\t }\r\n\t //additionElementToList(\"Block\", 1,(xLength - 1 - e)-(xStart + 1 + s));\r\n\t }\r\n\t \r\n\t }*/\r\n\t }", "public static void sortStack2(Stack s){\n Stack ordered = new Stack();\n while(s.isEmpty() == false){\n Node top = s.pop();\n while(ordered.isEmpty() == false && ordered.peek() >= top.data){\n s.push(ordered.pop());\n }\n ordered.push(top);\n }\n while(ordered.isEmpty()==false){\n s.push(ordered.pop());\n }\n }", "public static void buildWorkStack(Basic basic) {\n\n\t\tb = basic;\n\t\tStack<Object> stack = b.getCurrentWorkFrame();\n\t\tif ((stack.size() == 0) || (stack.isEmpty())) {\n\t\t\tWorkFrame wf = getFrameToExecute(b.getWorkFrames()); // global prior\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// wf\n\t\t\tif (wf == null) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\twf.setLevel(0);\n\t\t\twf.setExecuted(true);\n\t\t\tstack.push(wf);\n\t\t\tb.setCurrentWorkFrame(stack);\n\t\t\tb.setActualWorkFrame(wf);\n\t\t\t\n\t\t} /*else {\n\t\t\tcheckRestOfStack(0, null);\n\t\t\tif (!(b.getCurrentWorkFrame().isEmpty())) {\n\t\t\t\tCompositeActivity comp = findHighestCompositeForTopWF();\n\t\t\t\tpushNextEvent(basic, comp);\n\t\t\t}\n\t\t}*/\n\t\t//resetVarsNotInUse(); // TODO this needs to be here? how to reset ALL?\n\n\t}", "public void pushCards(int j)\n {\n for( int i = 0; i < warPile.getSize(); i++)\n {\n Card addMe = warPile.dequeue(); \n \n if(j == P1)\n dw.enqueue(addMe);\n if(j == P2)\n de.enqueue(addMe); \n \n }\n }", "public void addToFront(UnitOfWork workUnit) {\n synchronized (addedFrontWork) {\n addedFrontWork.addFirst(workUnit);\n }\n }", "public void setWallElementsFromEvent(){\r\n\t\twallElements.addAll(event.getPosts());\r\n\t\tCollections.sort(wallElements, new Comparator<Object>() {\r\n\t\t\t\r\n\t\t\tpublic int compare(Object o1, Object o2) {\r\n\t\t\t\tDate o1createDate = ((EventPostSO)o1).getCreateDate();\r\n\t\t\t\t\t\t\r\n\t\t\t\tDate o2createDate = ((EventPostSO)o2).getCreateDate();\r\n\t\t\t\tif (o1createDate == null || o2createDate == null)\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\treturn o2createDate.compareTo(o1createDate);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}", "@Override\r\n\tpublic void turnUpToEleven() {\n\t\t\r\n\t}", "public Tower() {\n this.top = ' ';\n this.rest = null;\n }", "private void shiftPlayerPiecesBottomToTop(int colNum) {\n for (int i = 0; i < playerPiecePositions.length; i++) {\n Position pos = playerPiecePositions[i];\n if (pos.getColNum() == colNum) {\n playerPiecePositions[i] = nextPositionBottomToTop(pos);\n playerPieces[i].addPreviousPlayerPosition(pos);\n }\n }\n }", "public void moveFromHandToStartOfWord() {\n\t\t//check letters in hand\n\t\tif(hand.size() == 0) {\n\t\t\treturn;\n\t\t}\n\t\t// remove letter from hand\n\t\tLetter temp = hand.leftmost;\n\t\thand.remove();\n\t\ttemp.next = null;\n\n\t\t// add letter to start of word\n\t\tword.addToStart(temp);\n\t}", "public void move(int tick) {\n moveMade = true;\n Location newTail;\n if (grow) {\n\n switch (body.getLast().direction) {\n case RIGHT:\n newTail = new Location(body.getLast().locX - GraphicsBounds.spriteSize,\n body.getLast().locY, body.getLast().direction);\n break;\n case LEFT:\n newTail = new Location(body.getLast().locX + GraphicsBounds.spriteSize,\n body.getLast().locY, body.getLast().direction);\n break;\n case UP:\n newTail = new Location(body.getLast().locX, body.getLast().locY\n + GraphicsBounds.spriteSize, body.getLast().direction);\n break;\n case DOWN:\n newTail = new Location(body.getLast().locX, body.getLast().locY\n - GraphicsBounds.spriteSize, body.getLast().direction);\n break;\n default:\n newTail = new Location(0,0);\n break;\n\n }\n\n\n body.addLast(newTail);\n }\n\n for (int i = body.size() - 1; i > 0; i--) {\n body.get(i).direction = body.get(i - 1).direction;\n }\n\n switch (direction) {\n case RIGHT:\n body.getFirst().direction = Direction.RIGHT;\n break;\n case LEFT:\n body.getFirst().direction = Direction.LEFT;\n break;\n case UP:\n body.getFirst().direction = Direction.UP;\n break;\n case DOWN:\n body.getFirst().direction = Direction.DOWN;\n break;\n default:\n break;\n }\n\n\n\n for (int i = body.size() - 1; i >= 0; i--) {\n Direction dir = body.get(i).direction;\n Location segment = body.get(i);\n switch (dir) {\n case RIGHT:\n segment.locX += snakeSpeed;\n break;\n case LEFT:\n segment.locX -= snakeSpeed;\n break;\n case UP:\n segment.locY -= snakeSpeed;\n break;\n case DOWN:\n segment.locY += snakeSpeed;\n break;\n default:\n break;\n }\n }\n\n\n\n grow = false;\n }", "@Override\n public int getOrder() {\n return 0;\n }", "public void addPatty() {\n\t\tMyStack newBurger = new MyStack();\n\t\tif (pattyCount < MAX_PATTY) {\n\t\t\twhile (myBurger.size() != 0) {\n\t\t\t\tString top = (String) myBurger.peek();\n\t\t\t\tif (pattyCount > 0) {\n\t\t\t\t\tif (top.equals(\"Cheddar\") || top.equals(\"Mozzarella\") || top.equals(\"Pepperjack\")\t\n\t\t\t\t\t\t\t|| top.equals(\"Beef\") || top.equals(\"Chicken\") || top.equals(\"Veggie\")) {\t\n\t\t\t\t\t\tnewBurger.push(\"Beef\");\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tString ingredient = (String) myBurger.pop();\t\t\t\t\t\n\t\t\t\t\t\tnewBurger.push(ingredient);\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\n\t\t\t\t\t} \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tString ingredient = (String) myBurger.pop();\t\t\t\t\t\t\n\t\t\t\t\tnewBurger.push(ingredient);\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t} else if (pattyCount == 0) {\n\t\t\t\t\tif (top.equals(\"Mushrooms\") || top.equals(\"Mustard\") || top.equals(\"Ketchup\")\n\t\t\t\t\t\t\t|| top.equals(\"Bottom Bun\")) {\n\t\t\t\t\t\tnewBurger.push(\"Beef\");\n\t\t\t\t\t\tString ingredient = (String) myBurger.pop();\n\t\t\t\t\t\tnewBurger.push(ingredient);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} \n\t\t\t\t\tString ingredient = (String) myBurger.pop();\n\t\t\t\t\tnewBurger.push(ingredient);\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile (myBurger.size() != 0) {\n\t\t\t\tString ingredient = (String) myBurger.pop();\n\t\t\t\tnewBurger.push(ingredient);\n\t\t\t}\n\t\t\twhile (newBurger.size() != 0) {\n\t\t\t\tString ingredient = (String) newBurger.pop();\n\t\t\t\tmyBurger.push(ingredient);\n\t\t\t}\n\t\t\tpattyCount++;\n\t\t} else {\n\t\t\tSystem.out.println(\"cant add anymore patties\");\n\t\t}\n\t}", "private void startHeavyLifting(int first, int count)\n {\n }", "void lowerNumberOfStonesLeftToPlace();", "void initFirstTower() {\n for (int i = 0; i < numDisks; i++) {\n towers[0].push(numDisks - i + 1);\n }\n }", "private void shiftBottomToTop(int colNum, int rowNum, FloorTile tile, int rotation) {\n shiftTilesBottomToTop(colNum, rowNum, tile, rotation);\n shiftPlayerPiecesBottomToTop(colNum);\n }", "@Override\n public void populate(Game game) {\n super.populate(game);\n\n Level1.background1Music.stop();\n background2Music.loop();\n voiceOver2.play();\n\n Shape groundShape = new BoxShape(100, 0.5f);\n Body ground = new StaticBody(this, groundShape);\n ground.setPosition(new Vec2(0, -18));\n\n Shape wallShape = new BoxShape(0.5f, 100);\n Body leftWall = new StaticBody(this, wallShape);\n leftWall.setPosition(new Vec2(-25f, -6));\n leftWall.setName(\"leftWall\");\n Body rightWall = new StaticBody(this, wallShape);\n rightWall.setPosition(new Vec2(25f, -6));\n rightWall.setName(\"rightWall\");\n Body TopWall = new StaticBody(this, groundShape);\n TopWall.setPosition(new Vec2(25f, 18f));\n\n\n Shape platformShape = new BoxShape(3, 0.5f);\n Shape platformShape2= new BoxShape(5,0.5f);\n Shape platformShape3= new BoxShape(12,0.5f);\n Shape platformShape4= new BoxShape(16,0.5f);\n Shape platformShape5= new BoxShape(0.5f,2);\n Body platform1 = new StaticBody(this, platformShape);\n platform1.setPosition(new Vec2(20, -10));\n Body platform2 = new StaticBody(this, platformShape);\n platform2.setPosition(new Vec2(13, -5));\n Body platform3 = new StaticBody(this, platformShape2);\n platform3.setPosition(new Vec2(4, 0));\n Body platform4 = new StaticBody(this, platformShape);\n platform4.setPosition(new Vec2(-15, -5));\n Body platform5 = new StaticBody(this, platformShape);\n platform5.setPosition(new Vec2(20, 3));\n Body platform6 = new StaticBody(this, platformShape3);\n platform6.setPosition(new Vec2(8, 11));\n Body platform7 = new StaticBody(this, platformShape4);\n platform7.setPosition(new Vec2(12, 16.5f));\n Body platform8 = new StaticBody(this,platformShape);\n platform8.setPosition(new Vec2(-10f,10));\n Body platform9 = new StaticBody(this,platformShape2);\n platform9.setPosition(new Vec2(-19.5f,12));\n Body platform10 = new StaticBody(this,platformShape);\n platform10.setPosition(new Vec2(0,-9));\n\n Enemy2 enemy2 = new Enemy2(this);\n enemy2.setPosition(new Vec2(-20, 14));\n enemy2.addCollisionListener(new Collisions(timothyDalton, game));\n\n destroyablePlatform = new StaticBody(this,platformShape5);\n destroyablePlatform.setPosition(new Vec2(-3,13.75f));\n destroyablePlatform.setName(\"destroyablePlatform\");\n\n Heart heart= new Heart(this);\n heart.setPosition(new Vec2(-15,-4));\n heart.addCollisionListener(new Collisions(timothyDalton,game));\n\n GunCoin coin = new GunCoin(this);\n coin.setPosition(new Vec2(0, -8));\n coin.addCollisionListener(new Collisions(timothyDalton,game));\n\n Button1 button= new Button1(this);\n button.setPosition(new Vec2(-24,0));\n button.addCollisionListener(new Collisions(timothyDalton,game));\n }", "private void doAsTopOfStack() {\n int activePos = pos + inputUsed;\n int leftoverLength = length - inputUsed;\n\n if (rule.rhs.length == rhsUsed) { // rule exhausted\n if (leftoverLength == 0) { // input exhausted\n TD.knownRuleGoals.recordParsing(this);\n TD.dottedGoalStack.pop();\n ((RuleGoal)this).doWorkAfterDone();\n TD.dottedGoalStack.push(this);\n }\n } else {\n Symbol rhsAtDot = rule.rhs[rhsUsed];\n if (leftoverLength > 0) {\n Symbol inputAtDot = TD.input.symbolAt(activePos);\n if (rhsAtDot.equals(inputAtDot)) doWorkAfterMatch(1);\n }\n for (int len = 0; len <= leftoverLength; len++)\n (new Goal(rhsAtDot, activePos, len)).doWork();\n }\n }", "private synchronized void create_head(){\n\t\t// Take current time\n\t\thead_time = System.currentTimeMillis();\n\t\tdouble lcl_head_time = head_time/1000.0;\n\t\tString time = Double.toString(lcl_head_time);\n\t\t \n\t\theader.append(\"protocol: 1\\n\");\n\t\theader.append(\"experiment-id: \" + oml_exp_id + \"\\n\");\n\t\theader.append(\"start_time: \" + time + \"\\n\");\n\t\theader.append(\"sender-id: \" + oml_name + \"-sender\\n\");\n\t\theader.append(\"app-name: \" + oml_app_name + \"\\n\");\n\t}", "public void addOrder ()\n\t\t{\n\t\t\t//Creates a new cone\n\t\t\tIceCreamCone newCone = new IceCreamCone();\n\t\t\t\n\t\t\t//Creates a random number from 1-4\n\t\t\tint rand = (int) (Math.random()*4) + 1;\n\t\t\t\n\t\t\t//Adds a random number from 1-4 of randomly flavoured scoops to the new cone and adds the new cone to the ice cream line queue\n\t\t\tif(rand == 1)\n\t\t\t{\n\t\t\t\tnewCone.addRandScoop();\n\t\t\t\ticeCreamLine.enqueue(newCone);\n\t\t\t}\n\t\t\telse if(rand == 2)\n\t\t\t{\n\t\t\t\tnewCone.addRandScoop();\n\t\t\t\tnewCone.addRandScoop();\n\t\t\t\ticeCreamLine.enqueue(newCone);\n\t\t\t}\n\t\t\telse if(rand == 3)\n\t\t\t{\n\t\t\t\tnewCone.addRandScoop();\n\t\t\t\tnewCone.addRandScoop();\n\t\t\t\tnewCone.addRandScoop();\n\t\t\t\ticeCreamLine.enqueue(newCone);\n\t\t\t}\n\t\t\telse if(rand == 4)\n\t\t\t{\n\t\t\t\tnewCone.addRandScoop();\n\t\t\t\tnewCone.addRandScoop();\n\t\t\t\tnewCone.addRandScoop();\n\t\t\t\tnewCone.addRandScoop();\n\t\t\t\ticeCreamLine.enqueue(newCone);\n\t\t\t}\n\t\t\t\n\t\t\t//Creates a new view for this new cone\n\t\t\tIceCreamConeView view = new IceCreamConeView(newCone);\n\t\t\t//Adds the view JComponent to the box JPanel\n\t\t\tconeList.add(view);\n\t\t}", "public void setup() {\n\t\tsize(1300, 800);\n\t\tint seed = 4346;\n\t\tran = new Random(seed);\n\t\trandompolys = randomPolygons(210);// prepare the input polygons\n\n\t\tDouble segment_len = useAbey ? null : segment_max_length;\n\t\tPack pack = new Pack(randompolys, margin, segment_len, rotSteps, WID, HEI, preferX);\n\t\tpack.packOneSheet(useAbey);\n\t\tpacks.add(pack);\n\n\t\tfor (int i = 0; i < 100; i++) { // packing one sheet after another, 100 is estimated\n\t\t\tint size = packs.size();\n\t\t\tif (packs.get(size - 1).isEmpty()) {\n\t\t\t\tprintln(size + \" sheets\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tpack = packs.get(size - 1).clone();\n\t\t\tpack.packOneSheet(useAbey);\n\t\t\tpacks.add(pack);\n\t\t}\n\t\treport();\n\t}", "private void Add_Bottom_Top(String s) {\n\t\tBottom_Layout b = new Bottom_Layout(s);\n\t\tScrollPane sc = new ScrollPane();\n\t\t\n\t\tthis.mainPanel.add(b.getBottom(), BorderLayout.CENTER);\n\t\t\n\t}" ]
[ "0.55779785", "0.5492563", "0.53148717", "0.530275", "0.5290536", "0.5208017", "0.51921946", "0.5145585", "0.5141743", "0.50715643", "0.5031577", "0.50275064", "0.49745455", "0.49604023", "0.49486077", "0.4883306", "0.4868216", "0.48657545", "0.48567796", "0.4855657", "0.4841842", "0.4828169", "0.4817923", "0.4784435", "0.47602597", "0.47599426", "0.47550148", "0.47492898", "0.47327557", "0.47249895", "0.47142234", "0.4710895", "0.47076327", "0.47073048", "0.47056898", "0.4703415", "0.4701195", "0.46983957", "0.46911737", "0.46910918", "0.46786758", "0.46641147", "0.46493375", "0.46481335", "0.46421143", "0.46159622", "0.4612472", "0.46104932", "0.4605252", "0.45975196", "0.45956862", "0.45893478", "0.45829442", "0.45823562", "0.45701674", "0.45627996", "0.4562321", "0.4559511", "0.45593718", "0.45586917", "0.45563376", "0.45506084", "0.45499295", "0.4547633", "0.45470455", "0.45456767", "0.4544085", "0.45412624", "0.45345318", "0.4531776", "0.45307368", "0.45255664", "0.4521589", "0.45179898", "0.45170975", "0.45167646", "0.45151186", "0.4509206", "0.4502528", "0.44989595", "0.44956672", "0.44940078", "0.44925636", "0.44910064", "0.44899213", "0.44891804", "0.4486362", "0.44837102", "0.44816402", "0.4476671", "0.44681048", "0.4464139", "0.44614413", "0.44598612", "0.44570306", "0.44551146", "0.4449982", "0.4448846", "0.44458765", "0.44457832", "0.44438678" ]
0.0
-1
TODO Autogenerated method stub
@Override public void mouseEntered(MouseEvent e) { }
{ "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 mouseExited(MouseEvent e) { }
{ "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 mousePressed(MouseEvent e) { }
{ "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 mouseReleased(MouseEvent e) { }
{ "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
Native methods for encryption and decryption (called from library)
private native void dll_encrypt(String path_in, String path_out, byte[] npub, byte[] key, int alg);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Encryption encryption();", "private native int native_crypt(long cookie, byte[] in, int inOffset,\n byte[] out, int outOffset, boolean encrypt);", "public interface AES {\n\n public String encrypt(String strToEncrypt);\n\n public String decrypt(String strToDecrypt);\n\n public String getSecretKeyWord();\n}", "public interface ICryptoEngine \n{\n\t/**\n\t * Initialize the \n\t * \n\t * @param forEncryption should the engine be initialized for encryption (true) or decryption (false)\n\t * @param key - symmetric encryption key\n\t * \n\t * @throws IllegalStateException - if any initialization parameters are invalid\n\t */\n\tpublic void init(boolean forEncryption, byte[] key) throws IllegalStateException;\n\t\n\t/**\n\t * @return name of the encryption algorithm\n\t */\n\tpublic String getAlgorithmName();\n\t\n\t/**\n\t * @return block size of the encryption algorithm\n\t */\n\tpublic int getBlockSize();\n\t\n\t/**\n\t * Performs an encryption or decryption of a block.\n\t * The amount of processed data depends on the actual algorithm's block size \n\t * \n\t * @param in - buffer with the data to be processed\n\t * @param inOff - starting position of the data at 'in'\n\t * @param out - preallocated buffer to store the processed data\n\t * @param outOff - starting position at 'out'\n\t * \n\t * @return size of processed data (typically algorithm's block size)\n\t * \n\t * @throws IllegalStateException if engine was not initialized or buffers are invalid\n\t */\n\tpublic int processBlock(byte[] in, int inOff, byte[] out, int outOff) throws IllegalStateException;\n\t\n\t/**\n\t * Resets the encryption engine (if required by the implementation)\n\t */\n\tpublic void reset();\n}", "@Test\r\n public void testEncryptDecryptPlaintext() throws SodiumException, CryptoException {\r\n\r\n byte[] data = \"Hola caracola\".getBytes();\r\n byte[] add = \"Random authenticated additional data\".getBytes();\r\n\r\n CryptoService instance = new CryptoService();\r\n Keys keys = instance.createKeys(null);\r\n CryptoDetached result = instance.encryptPlaintext(data, add, keys);\r\n String message = instance.decryptPlaintext(result, add, keys);\r\n assertEquals(message, \"Hola caracola\");\r\n }", "public static byte[] encryptText(String plainText,SecretKey secKey) throws Exception{\n\r\n Cipher aesCipher = Cipher.getInstance(\"AES\");\r\n\r\n aesCipher.init(Cipher.ENCRYPT_MODE, secKey);\r\n\r\n byte[] byteCipherText = aesCipher.doFinal(plainText.getBytes());\r\n\r\n return byteCipherText;\r\n\r\n}", "String encryption(Long key, String encryptionContent);", "public interface EncryptionAlgorithm {\n\n public String encrypt(String plaintext);\n\n}", "public interface SuperEncryption {\n String encrypt(String s);\n String decrypt(String s);\n}", "@Test\r\n public void testEncrypt()\r\n {\r\n System.out.println(\"encrypt\");\r\n String input = \"Hello how are you?\";\r\n KeyMaker km = new KeyMaker();\r\n SecretKeySpec sks = new SecretKeySpec(km.makeKeyDriver(\"myPassword\"), \"AES\");\r\n EncyptDecrypt instance = new EncyptDecrypt();\r\n String expResult = \"0fqylTncsgycZJQ+J5pS7v6/fj8M/fz4bavB/SnIBOQ=\";\r\n String result = instance.encrypt(input, sks);\r\n assertEquals(expResult, result);\r\n }", "public CryptObject reencrypt(Ciphertext ciphertext);", "byte[] encrypt(String plaintext);", "public String Crypt(String s);", "public EncryptorReturn encrypt(String in) throws CustomizeEncryptorException;", "public String Decrypt(String s);", "public String encrypt(String plainText);", "public interface ICrypto\n{\n\t/**\n\t *\n\t * @return\ttrue for Public/Private key and false for password style encryption\n\t */\n\tboolean isPublic();\n\n\t/**\n\t * @param clearText\t\tClear text\n\t * @return\t\t\t\tStringized (BasicBase64) version of the cipher for the clear text\n\t */\n\tString encrypt(String clearText);\n\n\t/**\n\t * @param cipherText\tClear text\n\t * @return\t\t\t\tClear text from the stringized (BasicBase64) version of the cipherTetxt\n\t */\n\tString decrypt(String cipherText);\n\n\t/**\n\t * @return\tThe cryptography algorithm\n\t */\n\tString getAlgorithm();\n\n\t/**\n\t *\n\t * @return\tThe name by which this combination algorithm/key are known.\n\t */\n\tString getAliasName();\n}", "private EncryptionUtility(){\r\n\t\treturn;\t\t\r\n\t}", "public void test() {\n\t\t// super.onCreate(savedInstanceState);\n\t\t// setContentView(R.layout.main);\n\t\tString masterPassword = \"abcdefghijklmn\";\n\t\tString originalText = \"i see qinhubao eat milk!\";\n\t\tbyte[] text = new byte[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };\n\t\tbyte[] password = new byte[] { 'a' };\n\t\ttry {\n\t\t\tString encryptingCode = encrypt(masterPassword, originalText);\n\t\t\t// System.out.println(\"加密结果为 \" + encryptingCode);\n\t\t\tLog.i(\"加密结果为 \", encryptingCode);\n\t\t\tString decryptingCode = decrypt(masterPassword, encryptingCode);\n\t\t\tSystem.out.println(\"解密结果为 \" + decryptingCode);\n\t\t\tLog.i(\"解密结果\", decryptingCode);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public doEncryptNotifdeEncode() {\n\t}", "public interface IFileCrypter\n{\n\tpublic void encrypt( int pPartNumber , byte[] pData , int pOffset , int pLength );\n\t\n\tpublic void decrypt( int pPartNumber , byte[] pData , int pOffset , int pLength );\n}", "public abstract void setEncryptMode();", "@Test\r\n public void testDecrypt()\r\n {\r\n System.out.println(\"decrypt\");\r\n String input = \"0fqylTncsgycZJQ+J5pS7v6/fj8M/fz4bavB/SnIBOQ=\";\r\n KeyMaker km = new KeyMaker();\r\n SecretKeySpec sks = new SecretKeySpec(km.makeKeyDriver(\"myPassword\"), \"AES\");\r\n EncyptDecrypt instance = new EncyptDecrypt();\r\n String expResult = \"Hello how are you?\";\r\n String result = instance.decrypt(input, sks);\r\n assertEquals(expResult, result);\r\n }", "public interface Cipher {\n\n /*\n return key of the cipher\n */\n int getKey();\n\n /*\n set key of the cipher\n */\n void setKey(int key);\n\n /*\n cipher text/char based on the key\n */\n char cipher(int charToCipher);\n\n /*\n decipher text/char based on the key\n */\n char decipher(int charToDeCipher);\n}", "public interface CryptoService {\n /**\n * Read encrypted password file.\n *\n * @param file Encrypted file instance.\n * @param password Password to decrypt file.\n *\n * @return file content.\n *\n * */\n String readFile(File file, String password);\n\n /**\n * Write and encrypt content to file.\n *\n * @param file encrypted file location.\n * @param password password which will be used to encrypt file.\n * @param cnt file content.\n * */\n void writeFile(File file, String password, String cnt);\n\n /**\n * Encrypt content\n *\n * @param password password which will be used to encrypt file.\n * @param textToEncrypt text which will be encrypted\n * @return encrypted content\n * */\n String encrypt(String password, String textToEncrypt);\n\n /**\n * Decrypt content\n *\n * @param password password which will be used to encrypt file.\n * @param textToDecrypt text which will be decrypted\n * @return decrypted content\n * */\n String decrypt(String password, String textToDecrypt);\n\n /**\n * Write and encrypt the password database.\n *\n * @param passwordDatabase passwords database which will be saved to encrypted file.\n * */\n void writeFile(PasswordDatabase passwordDatabase) throws JsonConversionException;\n}", "OpenSSLKey mo134201a();", "public interface Encryptor {\n void encrypt();\n\n}", "@Test\n public void testAesEncryptForInputKey() throws Exception {\n byte[] key = Cryptos.generateAesKey();\n String input = \"foo message\";\n\n byte[] encryptResult = Cryptos.aesEncrypt(input.getBytes(\"UTF-8\"), key);\n String descryptResult = Cryptos.aesDecrypt(encryptResult, key);\n\n System.out.println(key);\n System.out.println(descryptResult);\n }", "public EncryptorReturn decrytp(String in) throws CustomizeEncryptorException;", "public interface EncryptionService {\n\n String decryptValue(String encrypted);\n String encryptValue(String value, String userName);\n}", "@Test\r\n public void testEncryptDecryptPlaintextBadKey() throws SodiumException, CryptoException {\r\n\r\n byte[] data = \"\".getBytes();\r\n byte[] add = \"Random authenticated additional data\".getBytes();\r\n\r\n CryptoService instance = new CryptoService();\r\n Keys keys = instance.createKeys(null);\r\n CryptoDetached result = instance.encryptPlaintext(data, add, keys);\r\n Keys keys1 = instance.createKeys(null);\r\n String message = instance.decryptPlaintext(result, add, keys);\r\n Assertions.assertThrows(SodiumException.class, new Executable() {\r\n @Override\r\n public void execute() throws Throwable {\r\n instance.decryptPlaintext(result, add, keys1);\r\n }\r\n });\r\n }", "public String encrypt(String geheimtext);", "public abstract void setDecryptMode();", "@Test\r\n public void testEncryptDecryptPlaintextNull() throws SodiumException, CryptoException {\r\n\r\n byte[] data = \"\".getBytes();\r\n byte[] add = \"Random authenticated additional data\".getBytes();\r\n\r\n CryptoService instance = new CryptoService();\r\n Keys keys = instance.createKeys(null);\r\n CryptoDetached result = instance.encryptPlaintext(data, add, keys);\r\n String message = instance.decryptPlaintext(result, add, keys);\r\n assertEquals(message, \"\");\r\n }", "@Test\n\tpublic void doEncrypt() {\n\t\tString src = \"18903193260\";\n\t\tString des = \"9oytDznWiJfLkOQspiKRtQ==\";\n\t\tAssert.assertEquals(Encryptor.getEncryptedString(KEY, src), des);\n\n\t\t/* Encrypt some plain texts */\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.add(\"18963144219\");\n\t\tlist.add(\"13331673185\");\n\t\tlist.add(\"18914027730\");\n\t\tlist.add(\"13353260117\");\n\t\tlist.add(\"13370052053\");\n\t\tlist.add(\"18192080531\");\n\t\tlist.add(\"18066874640\");\n\t\tlist.add(\"15357963496\");\n\t\tlist.add(\"13337179174\");\n\t\tfor (String str : list) {\n\t\t\tSystem.out.println(Encryptor.getEncryptedString(KEY, str));\n\t\t}\n\t}", "Update withEncryption(Encryption encryption);", "@Test\r\n\tpublic void testSimple() throws IOException, URISyntaxException, IllegalKeyException{\r\n\t\tbyte data [] = {97,98,99,100};\r\n\t\tbyte [] keys = {50};\r\n\t\tEncryptionDecryptionManager man = new AlgoritemManaging();\r\n\t\tCaesarEncryption ce = new CaesarEncryption(man);\r\n\t\tbyte[] encData = ce.Encrypt(keys,data);\r\n\t\t\r\n\t\tCaesarDecryption c = new CaesarDecryption(man);\r\n\t\tbyte[] decData = c.Decrypt(keys,encData);\r\n\t\tassert decData [0] == (byte)(97);\r\n\t\tassert decData [1] == (byte)(98);\r\n\t\tassert decData [2] == (byte)(99);\r\n\t\tassert decData [3] == (byte)(100);\r\n\t}", "java.lang.String getCryptProvider();", "@Test\n public void testEncryptDecrypt3() throws InvalidCipherTextException {\n\n // password generation using KDF\n String password = \"Aa1234567890#\";\n byte[] kdf = Password.generateKeyDerivation(password.getBytes(), 32);\n\n byte[] plain = \"0123456789\".getBytes();\n byte[] plainBytes = new byte[100000000];\n for (int i = 0; i < plainBytes.length / plain.length; i++) {\n System.arraycopy(plain, 0, plainBytes, i * plain.length, plain.length);\n }\n\n byte[] encData = AESEncrypt.encrypt(plainBytes, kdf);\n byte[] plainData = AESEncrypt.decrypt(encData, kdf);\n\n assertArrayEquals(plainBytes, plainData);\n\n }", "@Component\npublic interface Crypto {\n // returns a new secret key\n String newKey();\n\n // encrypts a plain text\n byte[] encrypt(String plaintext);\n\n // decrypts a cipher\n byte[] decrypt(byte[] encryptedData, short keyIx);\n\n // gets the index of the encryption key to use - 0 = no key, 1 or 2 for the two available keys\n short getKeyIx();\n\n // gets the index of the default key\n short getDefaultKeyIx();\n\n // gets the date after which the default key is no longer valid\n String getDefaultKeyExpiry();\n}", "@Test public void useAppContext() throws Exception {\n Endecrypt test = new Endecrypt();\r\n String oldString = \"lingyang1218yj@\";\r\n System.out.println(\"1、SPKEY为: \" + SPKEY);\r\n System.out.println(\"2、明文密码为: \" + oldString);\r\n String reValue = test.get3DESEncrypt(oldString, SPKEY);\r\n reValue = reValue.trim().intern();\r\n System.out.println(\"3、进行3-DES加密后的内容: \" + reValue);\r\n String reValue2 = test.get3DESDecrypt(reValue, SPKEY);\r\n System.out.println(\"4、进行3-DES解密后的内容: \" + reValue2);\r\n }", "public static void main(String[] args) {\n\n /* \n algorithms to choose:\n\n 0 - ASCON\n 1 - AESOTRS\n 2 - AESOTRP\n\n ------ not yet supported ------\n 3 - Acorn\n 4 - Keyak\n 5 - OCB\n 6 - Norx\n 7 - Deoxys\n 8 - Ketje\n 9 - AEZ\n 10 - MORUS\n */\n\n\n // enter input file path\n String path_in = args[0];\n\n // enter encrypted output file path\n String path_out = args[1];\n\n // enter decrypted output file path\n String path_out2 = args[2];\n\n // Algorithm number\n int alg = Integer.parseInt(args[3]);\n\n // enter key (in this case 16B)\n byte[] key = hexStringToByteArray(\"00112233445566778899aabbccddeeff\");\n\n // enter nonce (int his case 16B)\n byte[] nonce = hexStringToByteArray(\"00112233445566778899aabbccddeeff\");\n\n // call encryption function which will do the rest and output the file\n new JNI().dll_encrypt(path_in, path_out, nonce, key, alg); // invoke the native method\n\n new JNI().dll_decrypt(path_out, path_out2, nonce, key, alg);\n\n }", "private static java.io.File a(java.io.File r8, java.lang.String r9, java.lang.String r10) {\n /*\n r0 = 0;\n r1 = 0;\n r2 = r8.getName();\t Catch:{ Exception -> 0x006b, all -> 0x0067 }\n r3 = \".decrypt\";\n r4 = r8.getParentFile();\t Catch:{ Exception -> 0x006b, all -> 0x0067 }\n r2 = java.io.File.createTempFile(r2, r3, r4);\t Catch:{ Exception -> 0x006b, all -> 0x0067 }\n r3 = new javax.crypto.spec.IvParameterSpec;\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r4 = \"UTF-8\";\n r10 = r10.getBytes(r4);\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r3.<init>(r10);\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r10 = new javax.crypto.spec.SecretKeySpec;\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r4 = \"UTF-8\";\n r9 = r9.getBytes(r4);\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r4 = \"AES\";\n r10.<init>(r9, r4);\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r9 = \"AES/CBC/PKCS7PADDING\";\n r9 = javax.crypto.Cipher.getInstance(r9);\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r4 = 2;\n r9.init(r4, r10, r3);\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r10 = new java.io.FileInputStream;\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r10.<init>(r8);\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r3 = new javax.crypto.CipherInputStream;\t Catch:{ Exception -> 0x005e, all -> 0x005a }\n r3.<init>(r10, r9);\t Catch:{ Exception -> 0x005e, all -> 0x005a }\n r9 = new java.io.FileOutputStream;\t Catch:{ Exception -> 0x0057, all -> 0x0054 }\n r9.<init>(r2);\t Catch:{ Exception -> 0x0057, all -> 0x0054 }\n r4 = 1024; // 0x400 float:1.435E-42 double:5.06E-321;\n r4 = new byte[r4];\t Catch:{ Exception -> 0x0052 }\n L_0x0045:\n r5 = r3.read(r4);\t Catch:{ Exception -> 0x0052 }\n r6 = -1;\n if (r5 == r6) goto L_0x0050;\n L_0x004c:\n r9.write(r4, r0, r5);\t Catch:{ Exception -> 0x0052 }\n goto L_0x0045;\n L_0x0050:\n r0 = 1;\n goto L_0x007e;\n L_0x0052:\n r4 = move-exception;\n goto L_0x0070;\n L_0x0054:\n r8 = move-exception;\n r9 = r1;\n goto L_0x008f;\n L_0x0057:\n r4 = move-exception;\n r9 = r1;\n goto L_0x0070;\n L_0x005a:\n r8 = move-exception;\n r9 = r1;\n r3 = r9;\n goto L_0x008f;\n L_0x005e:\n r4 = move-exception;\n r9 = r1;\n r3 = r9;\n goto L_0x0070;\n L_0x0062:\n r4 = move-exception;\n r9 = r1;\n r10 = r9;\n r3 = r10;\n goto L_0x0070;\n L_0x0067:\n r8 = move-exception;\n r9 = r1;\n r3 = r9;\n goto L_0x0090;\n L_0x006b:\n r4 = move-exception;\n r9 = r1;\n r10 = r9;\n r2 = r10;\n r3 = r2;\n L_0x0070:\n r5 = \"DecryptUtils\";\n r6 = \"decryptByPair decrypt hotfix patch file error\";\n r7 = new java.lang.Object[r0];\t Catch:{ all -> 0x008e }\n com.taobao.sophix.e.d.a(r5, r6, r4, r7);\t Catch:{ all -> 0x008e }\n if (r2 == 0) goto L_0x007e;\n L_0x007b:\n r2.delete();\t Catch:{ all -> 0x008e }\n L_0x007e:\n com.taobao.sophix.e.b.a(r10);\n com.taobao.sophix.e.b.a(r3);\n com.taobao.sophix.e.b.a(r9);\n if (r0 == 0) goto L_0x008d;\n L_0x0089:\n r8.delete();\n return r2;\n L_0x008d:\n return r1;\n L_0x008e:\n r8 = move-exception;\n L_0x008f:\n r1 = r10;\n L_0x0090:\n com.taobao.sophix.e.b.a(r1);\n com.taobao.sophix.e.b.a(r3);\n com.taobao.sophix.e.b.a(r9);\n throw r8;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.taobao.sophix.e.a.a(java.io.File, java.lang.String, java.lang.String):java.io.File\");\n }", "@Test\r\n public void testEncryptDecryptPlaintextBadCipher() throws SodiumException, CryptoException {\r\n\r\n byte[] data = \"\".getBytes();\r\n byte[] add = \"Random authenticated additional data\".getBytes();\r\n\r\n CryptoService instance = new CryptoService();\r\n Keys keys = instance.createKeys(null);\r\n CryptoDetached result = instance.encryptPlaintext(data, add, keys);\r\n result.cipher = Base64.getEncoder().encodeToString(\"bad cipher\".getBytes());\r\n\r\n Assertions.assertThrows(SodiumException.class, () -> {\r\n instance.decryptPlaintext(result, add, keys);\r\n });\r\n }", "public static void main(String[] args) \r\n {\r\n /*\r\n String data = \"This is a very important statement.\";\r\n String key = \"How old is my computer?\";\r\n KeyGenerator kGen = new KeyGenerator(key);\r\n String nK = kGen.getNumericKey();\r\n \r\n ArmstrongManager aMgr = new ArmstrongManager(nK);\r\n ColorManager cMgr = new ColorManager(nK);\r\n \r\n String encData =\"\";\r\n int temp;\r\n int i;\r\n for(i =0 ; i < data.length(); i++)\r\n {\r\n temp = aMgr.encrypt(data.charAt(i));\r\n temp = cMgr.encrypt(temp);\r\n encData = encData + (char)temp;\r\n }\r\n \r\n String decData= \"\";\r\n for(i =0 ; i < encData.length(); i++)\r\n {\r\n temp = cMgr.decrypt(encData.charAt(i));\r\n temp = aMgr.decrypt(temp);\r\n \r\n decData = decData + (char)temp;\r\n }\r\n \r\n \r\n System.out.println(\"data: \"+ data + \" \" + data.length());\r\n System.out.println(\"enc data: \"+ encData + \" \" + encData.length());\r\n System.out.println(\"dec data: \"+ decData + \" \" + decData.length());\r\n */\r\n \r\n try\r\n {\r\n //String src = \"d:/a.txt\";//images/kids.jpg\";\r\n //String enc = \"d:/e_a.txt\";//images/e_kids.jpg\";\r\n //String dec = \"d:/d_a.txt\";//images/d_kids.jpg\";\r\n String src = \"d:/images/kids.jpg\";\r\n String enc = \"d:/images/e_kids.jpg\";\r\n String dec = \"d:/images/d_kids.jpg\";\r\n\r\n String key = \"How old is my computer?\";\r\n\r\n Encryptor objEnc = new Encryptor(key);\r\n Decryptor objDec = new Decryptor(key);\r\n\r\n objEnc.encrypt(src, enc);\r\n System.out.println(\"Encryption Done\");\r\n \r\n objDec.decrypt(enc, dec);\r\n System.out.println(\"Decryption Done\");\r\n \r\n\r\n }\r\n catch(Exception ex)\r\n {\r\n System.out.println(\"Err: \" +ex.getMessage());\r\n }\r\n }", "public abstract String encryptMsg(String msg);", "@Test\n\tpublic void testEncryptDecrypt() {\n\t\tfor (int i = 0; i < CONFIDENCE; ++i) {\n\t\t\tP plain = getRandomPlaintext();\n\t\t\tR rnd = getPK().getRandom(getRand());\n\t\t\tC cipher = getPK().encrypt(plain, rnd);\n\t\t\t\n\t\t\tP plain2 = getSK().decrypt(cipher);\n\t\t\t\n\t\t\tassertTrue(\"Decryption didn't work\", plain.equals(plain2));\n\t\t}\n\t}", "public interface EncryptionCommonBusiness\n{\n // ---------------------------------------------------------------------------||\n // Contracts -----------------------------------------------------------------||\n // ---------------------------------------------------------------------------||\n\n /**\n * Encrypts the specified String, returning the result \n * \n * @param input\n * @return\n * @throws IllegalArgumentException If no input was provided (null)\n * @throws EncryptionException If some problem occurred with encryption\n */\n String encrypt(String input) throws IllegalArgumentException, EncryptionException;\n\n /**\n * Decrypts the specified String, returning the result. The general\n * contract is that the result of decrypting a String encrypted with\n * {@link EncryptionCommonBusiness#encrypt(String)} will be equal \n * by value to the original input (round trip).\n * \n * @param input\n * @return\n * @throws IllegalArgumentException If no input was provided (null)\n * @throws EncryptionException If some problem occurred with decryption\n */\n String decrypt(String input) throws IllegalArgumentException, EncryptionException;\n\n /**\n * Returns a one-way hash of the specified argument. Useful\n * for safely storing passwords.\n * \n * @param input\n * @return\n * @throws IllegalArgumentException If no input was provided (null)\n * @throws EncryptionException If some problem occurred making the hash\n */\n String hash(String input) throws IllegalArgumentException, EncryptionException;\n\n /**\n * Returns whether or not the specified input matches the specified \n * hash. Useful for validating passwords against a \n * securely-stored hash. \n * \n * @param hash\n * @param input\n * @return\n * @throws IllegalArgumentException If either the hash or input is not provided (null)\n * @throws EncryptionException If some problem occurred making the hash\n */\n boolean compare(String hash, String input) throws IllegalArgumentException, EncryptionException;\n\n /*\n * This comment applies to all below this marker.\n * \n * In real life it's a security risk to expose these internals, \n * but they're in place here for testing and to show \n * functionality described by the examples.\n */\n\n /**\n * Obtains the passphrase to be used in the key for\n * the symmetric encryption/decryption ciphers\n * \n * @return\n */\n String getCiphersPassphrase();\n\n /**\n * Obtains the algorithm to be used in performing\n * one-way hashing\n * \n * @return\n */\n String getMessageDigestAlgorithm();\n\n}", "public static String decryptText(byte[] byteCipherText, SecretKey secKey) throws Exception {\n\r\n Cipher aesCipher = Cipher.getInstance(\"AES\");\r\n\r\n aesCipher.init(Cipher.DECRYPT_MODE, secKey);\r\n\r\n byte[] bytePlainText = aesCipher.doFinal(byteCipherText);\r\n\r\n return new String(bytePlainText);\r\n\r\n}", "public byte[] encrypto(String base) throws Exception {\n\t\tSecretKeyFactory keyFactory = SecretKeyFactory.getInstance(PBKDF2);\r\n\t\tKeySpec pbeKeySpec = new PBEKeySpec(\"password\".toCharArray(), \"salt\".getBytes(), 1023, 128);\r\n\t\tSecretKey pbeSecretKey = keyFactory.generateSecret(pbeKeySpec);\r\n\t\t// Create SecretKey for AES by KeyFactory-With-Hmac\r\n\t\tSecretKey aesSecretKey = new SecretKeySpec(pbeSecretKey.getEncoded(), AES);\r\n\t\t\r\n\t\tCipher cipher = Cipher.getInstance(AES_CBC_PKCS5PADDING);\r\n//\t\tcipher.init(Cipher.ENCRYPT_MODE, aesSecretKey, SecureRandom.getInstance(\"SHA1PRNG\"));\r\n\t\tcipher.init(Cipher.ENCRYPT_MODE, aesSecretKey);\r\n\t\tbyte[] encrypted = cipher.doFinal(base.getBytes());\r\n\r\n\t\tSystem.out.println(\"IV: \" + new String(cipher.getIV()));\r\n\t\tSystem.out.println(\"AlgorithmParameter: \" + cipher.getParameters().getEncoded());\r\n\t\tCipher decryptor = Cipher.getInstance(AES_CBC_PKCS5PADDING);\r\n\t\tdecryptor.init(Cipher.DECRYPT_MODE, aesSecretKey, new IvParameterSpec(cipher.getIV()));\r\n\t\tSystem.out.println(\"Decrypted: \" + new String(decryptor.doFinal(encrypted)));\r\n\t\t\r\n\t\treturn encrypted;\r\n\t}", "@Override\n\tpublic void Encrypt(Object key) {\n\n\t}", "public static String Encrypt(String inputText, String key) {\n String retVal = \"\";\n try {\n Cipher cipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n byte[] keyBytes = new byte[16];\n byte[] b = key.getBytes();\n int len = b.length;\n if (len > keyBytes.length) {\n len = keyBytes.length;\n }\n System.arraycopy(b, 0, keyBytes, 0, len);\n SecretKeySpec keySpec = new SecretKeySpec(keyBytes, \"AES\");\n IvParameterSpec ivSpec = new IvParameterSpec(keyBytes);\n cipher.init(Cipher.ENCRYPT_MODE, keySpec, ivSpec);\n BASE64Encoder _64e = new BASE64Encoder();\n byte[] encryptedData = cipher.doFinal(inputText.getBytes());\n retVal = _64e.encode(encryptedData);\n\n } catch (Exception ex) {\n ApiLog.One.WriteException(ex);\n }\n return retVal;\n }", "public interface EncryptionMethod {\n /**\n * Returns the algorithm applied to the cipher data.\n *\n * @return the encryption algorithm.\n */\n String getAlgorithm();\n\n /**\n * Returns the key size of the key of the algorithm applied to the cipher\n * data.\n *\n * @return the key size.\n */\n int getKeySize();\n\n /**\n * Sets the size of the key of the algorithm applied to the cipher data.\n *\n * @param size the key size.\n */\n void setKeySize(int size);\n\n /**\n * Returns the OAEP parameters of the algorithm applied applied to the\n * cipher data.\n *\n * @return the OAEP parameters.\n */\n byte[] getOAEPparams();\n\n /**\n * Sets the OAEP parameters.\n *\n * @param parameters the OAEP parameters.\n */\n void setOAEPparams(byte[] parameters);\n\n /**\n * Set the Digest Algorithm to use\n * @param digestAlgorithm the Digest Algorithm to use\n */\n void setDigestAlgorithm(String digestAlgorithm);\n\n /**\n * Get the Digest Algorithm to use\n * @return the Digest Algorithm to use\n */\n String getDigestAlgorithm();\n\n /**\n * Set the MGF Algorithm to use\n * @param mgfAlgorithm the MGF Algorithm to use\n */\n void setMGFAlgorithm(String mgfAlgorithm);\n\n /**\n * Get the MGF Algorithm to use\n * @return the MGF Algorithm to use\n */\n String getMGFAlgorithm();\n\n /**\n * Returns an iterator over all the additional elements contained in the\n * <code>EncryptionMethod</code>.\n *\n * @return an <code>Iterator</code> over all the additional information\n * about the <code>EncryptionMethod</code>.\n */\n Iterator<Element> getEncryptionMethodInformation();\n\n /**\n * Adds encryption method information.\n *\n * @param information additional encryption method information.\n */\n void addEncryptionMethodInformation(Element information);\n\n /**\n * Removes encryption method information.\n *\n * @param information the information to remove from the\n * <code>EncryptionMethod</code>.\n */\n void removeEncryptionMethodInformation(Element information);\n}", "public String encrypt(final String clearText)\n throws GeneralSecurityException, IOException {\n final String methodName = \":encrypt\";\n Logger.v(TAG + methodName, \"Starting encryption\");\n\n if (StringExtensions.isNullOrBlank(clearText)) {\n throw new IllegalArgumentException(\"Input is empty or null\");\n }\n\n // load key for encryption if not loaded\n mKey = loadSecretKeyForEncryption();\n mHMACKey = getHMacKey(mKey);\n\n Logger.i(TAG + methodName, \"\", \"Encrypt version:\" + mBlobVersion);\n final byte[] blobVersion = mBlobVersion.getBytes(AuthenticationConstants.ENCODING_UTF8);\n final byte[] bytes = clearText.getBytes(AuthenticationConstants.ENCODING_UTF8);\n\n // IV: Initialization vector that is needed to start CBC\n final byte[] iv = new byte[DATA_KEY_LENGTH];\n mRandom.nextBytes(iv);\n final IvParameterSpec ivSpec = new IvParameterSpec(iv);\n\n // Set to encrypt mode\n final Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM);\n final Mac mac = Mac.getInstance(HMAC_ALGORITHM);\n cipher.init(Cipher.ENCRYPT_MODE, mKey, ivSpec);\n\n final byte[] encrypted = cipher.doFinal(bytes);\n\n // Mac output to sign encryptedData+IV. Keyversion is not included\n // in the digest. It defines what to use for Mac Key.\n mac.init(mHMACKey);\n mac.update(blobVersion);\n mac.update(encrypted);\n mac.update(iv);\n final byte[] macDigest = mac.doFinal();\n\n // Init array to store blobVersion, encrypted data, iv, macdigest\n final byte[] blobVerAndEncryptedDataAndIVAndMacDigest = new byte[blobVersion.length\n + encrypted.length + iv.length + macDigest.length];\n System.arraycopy(blobVersion, 0, blobVerAndEncryptedDataAndIVAndMacDigest, 0,\n blobVersion.length);\n System.arraycopy(encrypted, 0, blobVerAndEncryptedDataAndIVAndMacDigest,\n blobVersion.length, encrypted.length);\n System.arraycopy(iv, 0, blobVerAndEncryptedDataAndIVAndMacDigest, blobVersion.length\n + encrypted.length, iv.length);\n System.arraycopy(macDigest, 0, blobVerAndEncryptedDataAndIVAndMacDigest, blobVersion.length\n + encrypted.length + iv.length, macDigest.length);\n\n final String encryptedText = new String(Base64.encode(blobVerAndEncryptedDataAndIVAndMacDigest,\n Base64.NO_WRAP), AuthenticationConstants.ENCODING_UTF8);\n Logger.v(TAG + methodName, \"Finished encryption\");\n\n return getEncodeVersionLengthPrefix() + ENCODE_VERSION + encryptedText;\n }", "String encrypt(String input) throws IllegalArgumentException, EncryptionException;", "@Test\n public void testAesForInputKeyMode() throws Exception {\n//TODO: Test goes here... \n/* \ntry { \n Method method = Cryptos.getClass().getMethod(\"aes\", byte[].class, byte[].class, int.class); \n method.setAccessible(true); \n method.invoke(<Object>, <Parameters>); \n} catch(NoSuchMethodException e) { \n} catch(IllegalAccessException e) { \n} catch(InvocationTargetException e) { \n} \n*/\n }", "public static String encrypt(String seed, String plain) throws Exception {\r\nbyte[] rawKey = getRawKey(seed.getBytes());\r\nbyte[] encrypted = encrypt(rawKey, plain.getBytes());\r\nreturn Base64.encodeToString(encrypted, Base64.DEFAULT);\r\n}", "public MediaEncryption getMediaEncryption();", "OutputFile encryptingOutputFile();", "String encryptString(String toEncrypt) throws NoUserSelectedException;", "WithCreate withEncryption(Encryption encryption);", "@Override\n int doCryptoOperation(byte[] arrby, byte[] object) throws BadPaddingException, IllegalBlockSizeException {\n if (this.encrypting) {\n if (!this.usingPrivateKey) return NativeCrypto.RSA_public_encrypt(arrby.length, arrby, (byte[])object, this.key.getNativeRef(), this.padding);\n return NativeCrypto.RSA_private_encrypt(arrby.length, arrby, (byte[])object, this.key.getNativeRef(), this.padding);\n }\n try {\n if (!this.usingPrivateKey) return NativeCrypto.RSA_public_decrypt(arrby.length, arrby, (byte[])object, this.key.getNativeRef(), this.padding);\n return NativeCrypto.RSA_private_decrypt(arrby.length, arrby, (byte[])object, this.key.getNativeRef(), this.padding);\n }\n catch (SignatureException signatureException) {\n object = new IllegalBlockSizeException();\n ((Throwable)object).initCause(signatureException);\n throw object;\n }\n }", "private void encryptionAlgorithm() {\n\t\ttry {\n\t\t\t\n\t\t\tFileInputStream fileInputStream2=new FileInputStream(\"D:\\\\program\\\\key.txt\");\n\t\t\tchar key=(char)fileInputStream2.read();\n\t\t\tSystem.out.println(key);\n\t\t\tFileInputStream fileInputStream1=new FileInputStream(\"D:\\\\program\\\\message.txt\");\n\t\t\tint i=0;\n\t\t\t\n\t\t\tStringBuilder message=new StringBuilder();\n\t\t\twhile((i= fileInputStream1.read())!= -1 )\n\t\t\t{\n\t\t\t\tmessage.append((char)i);\n\t\t\t}\n\t\t\tString s=message.toString();\n\t\t\tchar[] letters=new char[s.length()];\n\t\t\tStringBuilder en=new StringBuilder();\n\t\t\tfor(int j = 0;j < letters.length;j++)\n\t\t\t{\n\t\t\t\ten.append((char)(byte)letters[j]+key);\n\t\t\t}\t\t\n\t\t\tFileOutputStream fileoutput=new FileOutputStream(\"D:\\\\program\\\\encryptedfile.txt\");\n\t\t\t\n\t\t\tfileInputStream1.close();\n\t\t\tfileInputStream2.close();\n\t\t\t\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t\n\t}", "public static boolean a(java.lang.String r7, java.lang.String r8) {\n /*\n r0 = new java.io.File;\n r0.<init>(r7);\n r7 = 0;\n r1 = 0;\n r2 = r0.getName();\t Catch:{ Exception -> 0x0078, all -> 0x0074 }\n r3 = \".ldecrypt\";\n r4 = r0.getParentFile();\t Catch:{ Exception -> 0x0078, all -> 0x0074 }\n r2 = java.io.File.createTempFile(r2, r3, r4);\t Catch:{ Exception -> 0x0078, all -> 0x0074 }\n r3 = \"AES/ECB/PKCS5Padding\";\n r3 = javax.crypto.Cipher.getInstance(r3);\t Catch:{ Exception -> 0x0071, all -> 0x0074 }\n r4 = new javax.crypto.spec.SecretKeySpec;\t Catch:{ Exception -> 0x0071, all -> 0x0074 }\n r5 = \"UTF-8\";\n r8 = r8.getBytes(r5);\t Catch:{ Exception -> 0x0071, all -> 0x0074 }\n r5 = \"AES\";\n r4.<init>(r8, r5);\t Catch:{ Exception -> 0x0071, all -> 0x0074 }\n r8 = 2;\n r5 = new java.security.SecureRandom;\t Catch:{ Exception -> 0x0071, all -> 0x0074 }\n r5.<init>();\t Catch:{ Exception -> 0x0071, all -> 0x0074 }\n r3.init(r8, r4, r5);\t Catch:{ Exception -> 0x0071, all -> 0x0074 }\n r8 = new java.io.FileInputStream;\t Catch:{ Exception -> 0x0071, all -> 0x0074 }\n r8.<init>(r0);\t Catch:{ Exception -> 0x0071, all -> 0x0074 }\n r4 = new javax.crypto.CipherInputStream;\t Catch:{ Exception -> 0x006c, all -> 0x0067 }\n r4.<init>(r8, r3);\t Catch:{ Exception -> 0x006c, all -> 0x0067 }\n r3 = new java.io.FileOutputStream;\t Catch:{ Exception -> 0x0064, all -> 0x0061 }\n r3.<init>(r2);\t Catch:{ Exception -> 0x0064, all -> 0x0061 }\n r1 = 1024; // 0x400 float:1.435E-42 double:5.06E-321;\n r1 = new byte[r1];\t Catch:{ Exception -> 0x005f, all -> 0x005d }\n L_0x0044:\n r5 = r4.read(r1);\t Catch:{ Exception -> 0x005f, all -> 0x005d }\n r6 = -1;\n if (r5 == r6) goto L_0x004f;\n L_0x004b:\n r3.write(r1, r7, r5);\t Catch:{ Exception -> 0x005f, all -> 0x005d }\n goto L_0x0044;\n L_0x004f:\n r0 = r2.renameTo(r0);\t Catch:{ Exception -> 0x005f, all -> 0x005d }\n com.taobao.sophix.e.b.a(r8);\n com.taobao.sophix.e.b.a(r4);\n com.taobao.sophix.e.b.a(r3);\n return r0;\n L_0x005d:\n r7 = move-exception;\n goto L_0x006a;\n L_0x005f:\n r0 = move-exception;\n goto L_0x006f;\n L_0x0061:\n r7 = move-exception;\n r3 = r1;\n goto L_0x006a;\n L_0x0064:\n r0 = move-exception;\n r3 = r1;\n goto L_0x006f;\n L_0x0067:\n r7 = move-exception;\n r3 = r1;\n r4 = r3;\n L_0x006a:\n r1 = r8;\n goto L_0x0097;\n L_0x006c:\n r0 = move-exception;\n r3 = r1;\n r4 = r3;\n L_0x006f:\n r1 = r8;\n goto L_0x007c;\n L_0x0071:\n r0 = move-exception;\n r3 = r1;\n goto L_0x007b;\n L_0x0074:\n r7 = move-exception;\n r3 = r1;\n r4 = r3;\n goto L_0x0097;\n L_0x0078:\n r0 = move-exception;\n r2 = r1;\n r3 = r2;\n L_0x007b:\n r4 = r3;\n L_0x007c:\n if (r2 == 0) goto L_0x0084;\n L_0x007e:\n r2.delete();\t Catch:{ all -> 0x0082 }\n goto L_0x0084;\n L_0x0082:\n r7 = move-exception;\n goto L_0x0097;\n L_0x0084:\n r8 = \"DecryptUtils\";\n r2 = \"aesDecrypt\";\n r5 = new java.lang.Object[r7];\t Catch:{ all -> 0x0082 }\n com.taobao.sophix.e.d.b(r8, r2, r0, r5);\t Catch:{ all -> 0x0082 }\n com.taobao.sophix.e.b.a(r1);\n com.taobao.sophix.e.b.a(r4);\n com.taobao.sophix.e.b.a(r3);\n return r7;\n L_0x0097:\n com.taobao.sophix.e.b.a(r1);\n com.taobao.sophix.e.b.a(r4);\n com.taobao.sophix.e.b.a(r3);\n throw r7;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.taobao.sophix.e.a.a(java.lang.String, java.lang.String):boolean\");\n }", "public String encrypt() throws LRException\n\t{\n\t\treturn LUEncrypt.encrypt(getFields(),\n\t\t\t((DataHRecordData)getData()).encryptKey.getStringValue());\n\t}", "public String decrypt(String cipherText);", "public interface AsymmetricBlockCipher {\n /**\n * initialise the cipher.\n *\n * @param forEncryption if true the cipher is initialised for\n * encryption, if false for decryption.\n * @param param the key and other data required by the cipher.\n */\n public void init(boolean forEncryption, CipherParameters param);\n\n /**\n * returns the largest size an input block can be.\n *\n * @return maximum size for an input block.\n */\n public int getInputBlockSize();\n\n /**\n * returns the maximum size of the block produced by this cipher.\n *\n * @return maximum size of the output block produced by the cipher.\n */\n public int getOutputBlockSize();\n\n /**\n * process the block of len bytes stored in in from offset inOff.\n *\n * @param in the input data\n * @param inOff offset into the in array where the data starts\n * @param len the length of the block to be processed.\n * @return the resulting byte array of the encryption/decryption process.\n * @throws InvalidCipherTextException data decrypts improperly.\n * @throws DataLengthException the input data is too large for the cipher.\n */\n public byte[] processBlock(byte[] in, int inOff, int len)\n throws InvalidCipherTextException;\n}", "public static byte[] getEncryptRawKey() {\n\n try {\n /*byte[] bytes64Key = App.RealmEncryptionKey.getBytes(\"UTF-8\");\n KeyGenerator kgen = KeyGenerator.getInstance(\"AES\");\n SecureRandom sr = SecureRandom.getInstance(\"SHA1PRNG\");\n sr.setSeed(bytes64Key);\n kgen.init(128, sr);\n SecretKey skey = kgen.generateKey();\n byte[] raw = skey.getEncoded();*/\n\n byte[] key = new BigInteger(App.RealmEncryptionKey, 16).toByteArray();\n return key;\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "@Test\n public void testAesForInputKeyIvMode() throws Exception {\n//TODO: Test goes here... \n/* \ntry { \n Method method = Cryptos.getClass().getMethod(\"aes\", byte[].class, byte[].class, byte[].class, int.class); \n method.setAccessible(true); \n method.invoke(<Object>, <Parameters>); \n} catch(NoSuchMethodException e) { \n} catch(IllegalAccessException e) { \n} catch(InvocationTargetException e) { \n} \n*/\n }", "public String encrypt(String plaintext) {\n\t\tCipher rsaCipher, aesCipher;\n\t\ttry {\n\t\t\t// Create AES key\n\t\t\tKeyGenerator keyGen = KeyGenerator.getInstance(\"AES\");\n\t\t\tkeyGen.init(AES_BITS);\n\t\t\tKey aesKey = keyGen.generateKey();\n\n\t\t\t// Create Random IV\n\t\t\tbyte[] iv = SecureRandom.getSeed(16);\n\t\t\tIvParameterSpec ivSpec = new IvParameterSpec(iv);\n\n\t\t\t// Encrypt data using AES\n\t\t\taesCipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n\t\t\taesCipher.init(Cipher.ENCRYPT_MODE, aesKey, ivSpec);\n\t\t\tbyte[] data = aesCipher.doFinal(plaintext.getBytes());\n\n\t\t\t// Encrypt AES key using RSA public key\n\t\t\trsaCipher = Cipher.getInstance(\"RSA/NONE/PKCS1Padding\");\n\t\t\trsaCipher.init(Cipher.ENCRYPT_MODE, this.pubKey);\n\t\t\tbyte[] encKey = rsaCipher.doFinal(aesKey.getEncoded());\n\n\t\t\t// Create output\n\t\t\tString keyResult = new String(Base64.encodeBytes(encKey, 0));\n\t\t\tString ivResult = new String(Base64.encodeBytes(iv, 0));\n\t\t\tString dataResult = new String(Base64.encodeBytes(data, 0));\n\t\t\tString result = FORMAT_ID + \"|\" + VERSION + \"|\" + this.keyId + \"|\"\n\t\t\t\t\t+ keyResult + \"|\" + ivResult + \"|\" + dataResult;\n\t\t\treturn Base64.encodeBytes(result.getBytes(), Base64.URL_SAFE);\n\t\t} catch (InvalidKeyException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (NoSuchPaddingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalBlockSizeException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (BadPaddingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InvalidAlgorithmParameterException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn \"Encryption_Failed\";\n\t}", "public void testCaesar(){\n String msg = \"At noon be in the conference room with your hat on for a surprise party. YELL LOUD!\";\n \n /*String encrypted = encrypt(msg, key);\n System.out.println(\"encrypted \" +encrypted);\n \n String decrypted = encrypt(encrypted, 26-key);\n System.out.println(\"decrypted \" + decrypted);*/\n \n \n String encrypted = encrypt(msg, 15);\n System.out.println(\"encrypted \" +encrypted);\n \n }", "public interface TextEncryptor {\n\n /**\n * Returns encrypted text.\n * @param text - text to be encrypted.\n * @return encrypted text.\n */\n String encrypt(String text);\n}", "@Test\r\n public void testEncryptDecryptPlaintextBadTag() throws SodiumException, CryptoException {\r\n\r\n byte[] data = \"\".getBytes();\r\n byte[] add = \"Random authenticated additional data\".getBytes();\r\n\r\n CryptoService instance = new CryptoService();\r\n Keys keys = instance.createKeys(null);\r\n CryptoDetached result = instance.encryptPlaintext(data, add, keys);\r\n result.tag = Base64.getEncoder().encodeToString(\"bad tag\".getBytes());\r\n Assertions.assertThrows(SodiumException.class, () -> {\r\n instance.decryptPlaintext(result, add, keys);\r\n });\r\n }", "PBEncryptStorage encrypt(String inputString, String password, byte[] salt);", "public interface Cipher<R, E> {\n\n /**\n * Encrypts a message.\n *\n * @param raw the message to be encrypted\n * @return the encrypted message\n */\n E encrypt(R raw);\n\n /**\n * Decrypts a message.\n *\n * @param encrypted the encrypted message\n * @return the decrypted message\n */\n R decrypt(E encrypted);\n}", "public CryptObject encrypt(BigIntegerMod message);", "public static String encryptDecryptXOR(String rawString) {\n if (Config.getEncryption()) {\n\n\n\n // The key is predefined and hidden in code\n // TODO: Create a more complex code and store it somewhere better FIX\n\n\n // Stringbuilder enables you to play around with strings and make useful stuff\n StringBuilder thisIsEncrypted = new StringBuilder();\n\n // TODO: This is where the magic of XOR is happening. Are you able to explain what is going on?\n // Krypteringen foregår ved brug af XOR, som tager den første karakter i den\n // streng man ønsker at kryptere, omdanner den til binærtal, kombinere den med den første karakter\n // i XOR-nøglen hvorefter den omdanner til binærysl igen, for til sidst at omdanne hele kombinationen til en karakter igen.\n // Processen forsætter for hele strengen ønsket krypteret. Hvis strengen er længere end XOR-nøglen,\n // vil den starte forfra på XOR-nøglens karakterer. Muligt eksempel: Det første bogstav der\n // skal krypteres, er ''a'' og det første bogstav i krypteringsnøglen er ’'b’'. Den binære værdi af disse\n // er henholdsvis 0110 0001 og 0110 0010. Ved XOR krypteringen bliver 0000 0011, som svarer\n // til tallet ’'3'’.\n for (int i = 0; i < rawString.length(); i++) {\n thisIsEncrypted.append((char) (rawString.charAt(i) ^ Config.getEncKey()[i % Config.getEncKey().length]));\n }\n\n // We return the encrypted string\n return thisIsEncrypted.toString();\n\n } else {\n // We return without having done anything\n return rawString;\n }\n }", "public CryptObject reencrypt(Ciphertext ciphertext, BigIntegerMod r);", "String decrypt(PBEncryptStorage pbeStorage, String password, byte[] salt);", "public String getSecretKey();", "private void initKey() {\n String del = \":\";\n byte[] key;\n if (MainGame.applicationType == Application.ApplicationType.Android) {\n key = StringUtils.rightPad(Build.SERIAL + del + Build.ID + del, 32, \"~\").getBytes();\n } else if (MainGame.applicationType == Application.ApplicationType.Desktop) {\n key = new byte[]{0x12, 0x2d, 0x2f, 0x6c, 0x1f, 0x7a, 0x4f, 0x10, 0x48, 0x56, 0x17, 0x4b, 0x4f, 0x48, 0x3c, 0x17, 0x04, 0x06, 0x4b, 0x6d, 0x1d, 0x68, 0x4b, 0x52, 0x50, 0x50, 0x1f, 0x06, 0x29, 0x68, 0x5c, 0x65};\n } else {\n key = new byte[]{0x77, 0x61, 0x6c, 0x0b, 0x04, 0x5a, 0x4f, 0x4b, 0x65, 0x48, 0x52, 0x68, 0x1f, 0x1d, 0x3c, 0x4a, 0x5c, 0x06, 0x1f, 0x2f, 0x12, 0x32, 0x50, 0x19, 0x3c, 0x52, 0x04, 0x17, 0x48, 0x4f, 0x6d, 0x4b};\n }\n for (int i = 0; i < key.length; ++i) {\n key[i] = (byte) ((key[i] << 2) ^ magic);\n }\n privateKey = key;\n }", "public interface AESEncryptionService {\n\n\t/**\n\t * The API method to encrypt the data using AES Algorithm\n\t * \n\t * @param dataToEncrypt\n\t * @return encrypted data as byte array\n\t * @throws RegBaseCheckedException\n\t */\n\tbyte[] encrypt(final byte[] dataToEncrypt) throws RegBaseCheckedException;\n}", "public String decrypt(String key);", "public CaesarCipherOne(int key) {this.key=key;}", "public String encrypt() {\n StringBuilder encryptedText = new StringBuilder();\n //Make sure the key is valid.\n if (key < 0 || key > 25) {\n Log.d(\"TAG\", \"encrypt: Error in Keu=y \");\n return \"Key Must be 0 : 25\";\n }\n if (plaintext.length() <= 0) {\n Log.d(\"TAG\", \"encrypt: Error in Plain\");\n return \"Error in Plaintext\";\n }\n //Eliminates any whitespace and non alpha char's.\n plaintext = plaintext.trim();\n plaintext = plaintext.replaceAll(\"\\\\W\", \"\");\n if (plaintext.contains(\" \")) {\n plaintext = plaintext.replaceAll(\" \", \"\");\n }\n //Makes sure that all the letters are uppercase.\n plaintext = plaintext.toUpperCase();\n Log.i(\"Caesar\", \"encrypt: plainis : \" + plaintext);\n for (int i = 0; i < plaintext.length(); i++) {\n char letter = plaintext.charAt(i);\n if (charMap.containsKey(letter) && charMap.get(letter) != null) {\n int lookUp = (charMap.get(letter) + key) % 26;\n encryptedText.append(encryptionArr[lookUp]);\n }\n }\n Log.d(\"Caesar.java\", \"encrypt: the Data is \" + encryptedText.toString());\n return encryptedText.toString();\n }", "public static void main(String[] args) throws ClassNotFoundException, BadPaddingException, IllegalBlockSizeException,\n IOException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException {\n KeyPairGenerator kpg = KeyPairGenerator.getInstance(\"RSA\");\n // Generate the keys — might take sometime on slow computers\n KeyPair myPair = kpg.generateKeyPair();\n\n /*\n * This will give you a KeyPair object, which holds two keys: a private\n * and a public. In order to make use of these keys, you will need to\n * create a Cipher object, which will be used in combination with\n * SealedObject to encrypt the data that you are going to end over the\n * network. Here’s how you do that:\n */\n\n // Get an instance of the Cipher for RSA encryption/decryption\n Cipher c = Cipher.getInstance(\"RSA\");\n // Initiate the Cipher, telling it that it is going to Encrypt, giving it the public key\n c.init(Cipher.ENCRYPT_MODE, myPair.getPublic());\n\n /*\n * After initializing the Cipher, we’re ready to encrypt the data.\n * Since after encryption the resulting data will not make much sense if\n * you see them “naked”, we have to encapsulate them in another\n * Object. Java provides this, by the SealedObject class. SealedObjects\n * are containers for encrypted objects, which encrypt and decrypt their\n * contents with the help of a Cipher object.\n *\n * The following example shows how to create and encrypt the contents of\n * a SealedObject:\n */\n\n // Create a secret message\n String myMessage = new String(\"Secret Message\");\n // Encrypt that message using a new SealedObject and the Cipher we created before\n SealedObject myEncryptedMessage= new SealedObject( myMessage, c);\n\n /*\n * The resulting object can be sent over the network without fear, since\n * it is encrypted. The only one who can decrypt and get the data, is the\n * one who holds the private key. Normally, this should be the server. In\n * order to decrypt the message, we’ll need to re-initialize the Cipher\n * object, but this time with a different mode, decrypt, and use the\n * private key instead of the public key.\n *\n * This is how you do this in Java:\n */\n\n // Get an instance of the Cipher for RSA encryption/decryption\n Cipher dec = Cipher.getInstance(\"RSA\");\n // Initiate the Cipher, telling it that it is going to Decrypt, giving it the private key\n dec.init(Cipher.DECRYPT_MODE, myPair.getPrivate());\n\n /*\n * Now that the Cipher is ready to decrypt, we must tell the SealedObject\n * to decrypt the held data.\n */\n\n // Tell the SealedObject we created before to decrypt the data and return it\n String message = (String) myEncryptedMessage.getObject(dec);\n System.out.println(\"foo = \"+message);\n\n /*\n * Beware when using the getObject method, since it returns an instance\n * of an Object (even if it is actually an instance of String), and not\n * an instance of the Class that it was before encryption, so you’ll\n * have to cast it to its prior form.\n *\n * The above is from: http:andreas.louca.org/2008/03/20/java-rsa-\n * encryption-an-example/\n *\n * [msj121] [so/q/13500368] [cc by-sa 3.0]\n */\n }", "public Cipher()\n {\n CodecInterface base64UriCodec = new Base64UriCodec();\n AsymmetricBlockCipher rsaCipher = new OAEPEncoding(\n new RSAEngine(),\n new SHA1Digest()\n );\n BufferedBlockCipher aesCipher = new PaddedBufferedBlockCipher(\n new CBCBlockCipher(new AESEngine()),\n new PKCS7Padding()\n );\n Digest sha1Digest = new SHA1Digest();\n SecureRandom random = new SecureRandom();\n\n this.encryptionCipher = new EncryptionCipher(\n base64UriCodec,\n rsaCipher,\n aesCipher,\n sha1Digest,\n random\n );\n this.decryptionCipher = new DecryptionCipher(\n base64UriCodec,\n rsaCipher,\n aesCipher,\n sha1Digest\n );\n }", "public abstract String decryptMsg(String msg);", "public byte[] encrypt(byte[] decryptedInput) throws CryptoException, IncompatibleDeviceException {\n try {\n SecretKey key = new SecretKeySpec(getAESKey(), ALGORITHM_AES);\n Cipher cipher = Cipher.getInstance(AES_TRANSFORMATION);\n cipher.init(Cipher.ENCRYPT_MODE, key);\n byte[] encrypted = cipher.doFinal(decryptedInput);\n byte[] encodedIV = Base64.encode(cipher.getIV(), Base64.DEFAULT);\n //Save IV for Decrypt stage\n storage.store(KEY_IV_ALIAS, new String(encodedIV, StandardCharsets.UTF_8));\n return encrypted;\n } catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException e) {\n /*\n * This exceptions are safe to be ignored:\n *\n * - NoSuchPaddingException:\n * Thrown if NOPADDING is not available. Was introduced in API 1.\n * - NoSuchAlgorithmException:\n * Thrown if the transformation is null, empty or invalid, or if no security provider\n * implements it. Was introduced in API 1.\n * - InvalidKeyException:\n * Thrown if the given key is inappropriate for initializing this cipher.\n * - InvalidAlgorithmParameterException:\n * If the IV parameter is null.\n * - BadPaddingException:\n * Thrown only on decrypt mode.\n *\n * Read more in https://developer.android.com/reference/javax/crypto/Cipher\n */\n Log.e(TAG, \"Error while encrypting the input.\", e);\n throw new IncompatibleDeviceException(e);\n } catch (IllegalBlockSizeException | BadPaddingException e) {\n /*\n * - IllegalBlockSizeException:\n * Thrown if no padding has been requested and the length is not multiple of block size.\n * - BadPaddingException:\n * Thrown only on decrypt mode.\n */\n throw new CryptoException(\"The AES decrypted input is invalid.\", e);\n }\n }", "@VisibleForTesting\n byte[] getAESKey() throws IncompatibleDeviceException, CryptoException {\n String encodedEncryptedAES = storage.retrieveString(KEY_ALIAS);\n if (TextUtils.isEmpty(encodedEncryptedAES)) {\n encodedEncryptedAES = storage.retrieveString(OLD_KEY_ALIAS);\n }\n if (encodedEncryptedAES != null) {\n //Return existing key\n byte[] encryptedAES = Base64.decode(encodedEncryptedAES, Base64.DEFAULT);\n byte[] existingAES = RSADecrypt(encryptedAES);\n final int aesExpectedLengthInBytes = AES_KEY_SIZE / 8;\n //Prevent returning an 'Empty key' (invalid/corrupted) that was mistakenly saved\n if (existingAES != null && existingAES.length == aesExpectedLengthInBytes) {\n //Key exists and has the right size\n return existingAES;\n }\n }\n //Key doesn't exist. Generate new AES\n try {\n KeyGenerator keyGen = KeyGenerator.getInstance(ALGORITHM_AES);\n keyGen.init(AES_KEY_SIZE);\n byte[] aes = keyGen.generateKey().getEncoded();\n //Save encrypted encoded version\n byte[] encryptedAES = RSAEncrypt(aes);\n String encodedEncryptedAESText = new String(Base64.encode(encryptedAES, Base64.DEFAULT), StandardCharsets.UTF_8);\n storage.store(KEY_ALIAS, encodedEncryptedAESText);\n return aes;\n } catch (NoSuchAlgorithmException e) {\n /*\n * This exceptions are safe to be ignored:\n *\n * - NoSuchAlgorithmException:\n * Thrown if the Algorithm implementation is not available. AES was introduced in API 1\n *\n * Read more in https://developer.android.com/reference/javax/crypto/KeyGenerator\n */\n Log.e(TAG, \"Error while creating the AES key.\", e);\n throw new IncompatibleDeviceException(e);\n }\n }", "private AES() {\r\n\r\n }", "public int decryptStorage(String password) throws RemoteException;", "default Cipher cipher() {\n return null;\n }", "@Test\n public void testCryptographyNegative()\n {\n byte[] sensitiveBytes = sensitiveString.getBytes();\n byte[] secure = StateUtils.encrypt(sensitiveBytes, externalContext);\n \n secure[secure.length-5] = (byte) 1;\n try\n {\n byte[] insecure = StateUtils.decrypt(secure, externalContext);\n Assertions.assertFalse(Arrays.equals(insecure, sensitiveBytes));\n }\n catch (Exception e)\n {\n // do nothing\n }\n }", "public static String decrypt(String seed, String encrypted)\r\nthrows Exception {\r\nbyte[] rawKey = getRawKey(seed.getBytes());\r\nbyte[] enc = Base64.decode(encrypted.getBytes(), Base64.DEFAULT);\r\nbyte[] result = decrypt(rawKey, enc);\r\nreturn new String(result);\r\n}", "public EnScrypt() {}", "public interface ExoMediaCrypto {\n}", "void encrypt(ChannelBuffer buffer, Channel c);", "protected int\n engineUpdate(byte[] in, int inOffset, int inLen, byte[] out, int outOffset) {\n if (inLen < 0) throw new IllegalArgumentException(\"inLen < 0\");\n int blockCount = inLen / BLOCK_SIZE;\n inLen = blockCount * BLOCK_SIZE;\n\n boolean doEncrypt = (getState() == ENCRYPT);\n\n // Avoid overlapping input and output regions.\n if (in == out && (outOffset >= inOffset && outOffset < (long)inOffset+inLen ||\n inOffset >= outOffset && inOffset < (long)outOffset+inLen)) {\n byte[] newin = new byte[inLen];\n System.arraycopy(in, inOffset, newin, 0, inLen);\n in = newin;\n inOffset = 0;\n }\n if (native_lock != null) {\n synchronized(native_lock) {\n // If in == null || out == 0, evaluating their lengths will throw a\n // NullPointerException.\n\n if (inOffset < 0 || (long)inOffset + inLen > in.length ||\n outOffset < 0 || (long)outOffset + inLen > out.length)\n throw new ArrayIndexOutOfBoundsException(getAlgorithm() +\n \": Arguments to native_crypt would cause a buffer overflow\");\n\n // In future, we may pass more than one block to native_crypt to reduce\n // native method overhead.\n\n for (int i = 0; i < blockCount; i++) {\n if (0 == native_crypt(native_cookie, in, inOffset, out, outOffset,\n doEncrypt))\n throw new CryptixException(getAlgorithm() + \": Error in native code\");\n\n inOffset += BLOCK_SIZE;\n outOffset += BLOCK_SIZE;\n }\n }\n } else if (doEncrypt) { // state == ENCRYPT\n for (int i = 0; i < blockCount; i++) {\n blockEncrypt(in, inOffset, out, outOffset);\n inOffset += BLOCK_SIZE;\n outOffset += BLOCK_SIZE;\n }\n } else { // state == DECRYPT\n for (int i = 0; i < blockCount; i++) {\n blockDecrypt(in, inOffset, out, outOffset);\n inOffset += BLOCK_SIZE;\n outOffset += BLOCK_SIZE;\n }\n }\n return inLen;\n }", "public static String decrypt(String encrypted, Keys keys) throws GeneralSecurityException {\n Cipher cipher = Cipher.getInstance(ENC_SYSTEM);\n String[] data = COLON.split(encrypted);\n if (data.length != 3) {\n throw new GeneralSecurityException(\"Invalid encrypted data!\");\n }\n String mac = data[0];\n String iv = data[1];\n String cipherText = data[2];\n\n // Verify that the ciphertext and IV haven't been tampered with first\n String dataToAuth = iv + \":\" + cipherText;\n if (!computeMac(dataToAuth, keys.getMacKey()).equals(mac)) {\n throw new GeneralSecurityException(\"Incorrect MAC!\");\n }\n\n // Decrypt the ciphertext\n byte[] ivBytes = decodeBase64(iv);\n cipher.init(Cipher.DECRYPT_MODE, keys.getEncKey(), new IvParameterSpec(ivBytes));\n byte[] bytes = cipher.doFinal(decodeBase64(cipherText));\n\n // Decode the plaintext bytes into a String\n CharsetDecoder decoder = Charset.defaultCharset().newDecoder();\n decoder.onMalformedInput(CodingErrorAction.REPORT);\n decoder.onUnmappableCharacter(CodingErrorAction.REPORT);\n /*\n * We are coding UTF-8 (guaranteed to be the default charset on\n * Android) to Java chars (UTF-16, 2 bytes per char). For valid UTF-8\n * sequences, then:\n * 1 byte in UTF-8 (US-ASCII) -> 1 char in UTF-16\n * 2-3 bytes in UTF-8 (BMP) -> 1 char in UTF-16\n * 4 bytes in UTF-8 (non-BMP) -> 2 chars in UTF-16 (surrogate pair)\n * The decoded output is therefore guaranteed to fit into a char\n * array the same length as the input byte array.\n */\n CharBuffer out = CharBuffer.allocate(bytes.length);\n CoderResult result = decoder.decode(ByteBuffer.wrap(bytes), out, true);\n if (result.isError()) {\n /* The input was supposed to be the result of encrypting a String,\n * so something is very wrong if it cannot be decoded into one! */\n throw new GeneralSecurityException(\"Corrupt decrypted data!\");\n }\n decoder.flush(out);\n return out.flip().toString();\n }" ]
[ "0.78033316", "0.7196333", "0.68628544", "0.6835665", "0.66329694", "0.6607961", "0.65652496", "0.65434116", "0.6518727", "0.6513501", "0.6512354", "0.64939916", "0.6480463", "0.6478903", "0.6467168", "0.6441225", "0.6413682", "0.6352005", "0.63429195", "0.63272333", "0.63031405", "0.62695175", "0.61733806", "0.6169191", "0.6152515", "0.61515296", "0.6116188", "0.60977876", "0.60942006", "0.6080139", "0.6073052", "0.60657156", "0.604844", "0.6037723", "0.60314417", "0.60173386", "0.60164726", "0.6008811", "0.60034305", "0.59926265", "0.5987303", "0.5975879", "0.5973999", "0.5945803", "0.59394693", "0.59317654", "0.5930242", "0.5928741", "0.5926973", "0.5923741", "0.5923171", "0.59205055", "0.5909284", "0.59078884", "0.5898279", "0.5893655", "0.5888327", "0.5866085", "0.5847103", "0.58418995", "0.58291024", "0.58128", "0.5807511", "0.5806894", "0.5780218", "0.57792705", "0.5778538", "0.57730174", "0.5772154", "0.57687443", "0.57687134", "0.5762154", "0.5729386", "0.57234204", "0.57223976", "0.57209486", "0.57197434", "0.5719116", "0.5715861", "0.57157683", "0.57099134", "0.57076275", "0.5704242", "0.5697496", "0.56970584", "0.5696037", "0.5687668", "0.5683422", "0.5680343", "0.5673071", "0.56689215", "0.5652925", "0.56510955", "0.5649662", "0.56464005", "0.5646078", "0.56439596", "0.56265223", "0.56245506", "0.5624216" ]
0.74556035
1
hex string => byte array
public static byte[] hexStringToByteArray(String s) { int len = s.length(); byte[] data = new byte[len / 2]; for (int i = 0; i < len; i += 2) { data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4) + Character.digit(s.charAt(i+1), 16)); } return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static byte[] hexStringToByteArray(String s) {\n\t\tint len = s.length();\n\t\tbyte[] data = new byte[len / 2];\n\t\tfor (int i = 0; i < len; i += 2) {\n\t\t\tdata[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4)\n\t\t\t\t\t+ Character.digit(s.charAt(i+1), 16));\n\t\t}\n\t\treturn data;\n\t}", "private static byte[] hexStringToByteArray(String s) {\n final int len = s.length();\n final byte[] data = new byte[len / 2];\n \n for (int i = 0; i < len; i += 2) {\n data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4)\n + Character.digit(s.charAt(i + 1), 16));\n }\n \n return data;\n }", "private static byte[] fromHex(String hex) {\n byte[] bytes = new byte[hex.length() / 2];\n for (int i = 0; i < bytes.length; i++) {\n bytes[i] = (byte) Integer.parseInt(hex.substring(2 * i, 2 * i + 2), 16);\n }\n return bytes;\n }", "private static byte[] fromHex(String hex) throws NoSuchAlgorithmException {\n byte[] bytes = new byte[hex.length() / 2];\n for (int i = 0; i < bytes.length; i++) {\n bytes[i] = (byte) Integer.parseInt(hex.substring(2 * i, 2 * i + 2), 16);\n }\n return bytes;\n }", "private static byte[] fromHex(String hex) throws NoSuchAlgorithmException\n {\n byte[] bytes = new byte[hex.length() / 2];\n for(int i = 0; i<bytes.length ;i++)\n {\n bytes[i] = (byte)Integer.parseInt(hex.substring(2 * i, 2 * i + 2), 16);\n }\n return bytes;\n }", "public static byte[] toBytes(String strhex ){\r\n\t\t \r\n\t\t String hexString = strhex.trim();\t\t \r\n\t int length = hexString.length();\r\n\t if ( length % 2 != 0 ) {\r\n\t \thexString = \"0\" ;\r\n\t \thexString += strhex.trim();\r\n\t }\r\n\t length = hexString.length();\r\n\t byte[] data = new byte[ length / 2 ];\r\n\t char highChar, lowChar;\r\n\t byte highNibble, lowNibble;\r\n\t for (int i = 0, offset = 0; i < length; i += 2, offset ++ )\r\n\t {\r\n\t highChar = hexString.charAt( i );\r\n\t if ( highChar >= '0' && highChar <= '9')\r\n\t {\r\n\t highNibble = (byte)(highChar - '0');\r\n\t }\r\n\t else if (highChar >= 'A' && highChar <= 'F')\r\n\t {\r\n\t highNibble = (byte)(10 + highChar - 'A');\r\n\t }\r\n\t else if (highChar >= 'a' && highChar <= 'f')\r\n\t {\r\n\t highNibble = (byte)(10 + highChar - 'a');\r\n\t }\r\n\t else\r\n\t {\r\n\t throw new NumberFormatException( \"Invalid hex char: \" + highChar );\r\n\t }\r\n\r\n\t lowChar = hexString.charAt( i + 1 );\r\n\t if ( lowChar >= '0' && lowChar <= '9')\r\n\t {\r\n\t lowNibble = (byte)(lowChar - '0');\r\n\t }\r\n\t else if (lowChar >= 'A' && lowChar <= 'F')\r\n\t {\r\n\t lowNibble = (byte)(10 + lowChar - 'A');\r\n\t }\r\n\t else if (lowChar >= 'a' && lowChar <= 'f')\r\n\t {\r\n\t lowNibble = (byte)(10 + lowChar - 'a');\r\n\t }\r\n\t else\r\n\t {\r\n\t throw new NumberFormatException( \"Invalid hex char: \" + lowChar );\r\n\t }\r\n //System.out.println(\"len = \" + length +\", offset = \" + offset);\r\n\t data[ offset ] = (byte)(highNibble << 4 | lowNibble);\r\n\t }\r\n\t return data;\r\n\t}", "public static byte[] convert(String hex) {\n/* 51 */ ByteArrayOutputStream baos = new ByteArrayOutputStream();\n/* 52 */ for (int i = 0; i < hex.length(); i += 2) {\n/* 53 */ char c1 = hex.charAt(i);\n/* 54 */ if (i + 1 >= hex.length())\n/* 55 */ throw new IllegalArgumentException(); \n/* 56 */ char c2 = hex.charAt(i + 1);\n/* 57 */ byte b = 0;\n/* 58 */ if (c1 >= '0' && c1 <= '9') {\n/* 59 */ b = (byte)(b + (c1 - 48) * 16);\n/* 60 */ } else if (c1 >= 'a' && c1 <= 'f') {\n/* 61 */ b = (byte)(b + (c1 - 97 + 10) * 16);\n/* 62 */ } else if (c1 >= 'A' && c1 <= 'F') {\n/* 63 */ b = (byte)(b + (c1 - 65 + 10) * 16);\n/* */ } else {\n/* 65 */ throw new IllegalArgumentException();\n/* 66 */ } if (c2 >= '0' && c2 <= '9') {\n/* 67 */ b = (byte)(b + c2 - 48);\n/* 68 */ } else if (c2 >= 'a' && c2 <= 'f') {\n/* 69 */ b = (byte)(b + c2 - 97 + 10);\n/* 70 */ } else if (c2 >= 'A' && c2 <= 'F') {\n/* 71 */ b = (byte)(b + c2 - 65 + 10);\n/* */ } else {\n/* 73 */ throw new IllegalArgumentException();\n/* 74 */ } baos.write(b);\n/* */ } \n/* 76 */ return baos.toByteArray();\n/* */ }", "private static byte[] HexStringToByteArray(String input){\n\n\t\tint len = input.length();\n\n\t\tbyte[] inputByte = new byte[len/2];\n\n\t\tfor(int i=0; i< len; i+=2){\n\t\t\tinputByte[i/2] = (byte) ((Character.digit(input.charAt(i), 16) << 4)\n\t\t\t\t\t+(Character.digit(input.charAt(i+1), 16)));\n\t\t}\n\n\t\treturn inputByte;\n\t}", "@NotNull\n public static byte[] convertHexToBytes(@NotNull String s) {\n checkNotNull(s);\n int len = s.length();\n checkArgument(len % 2 == 0);\n\n len /= 2;\n byte[] buff = new byte[len];\n for (int i = 0; i < len; i++) {\n buff[i] = (byte) ((getHexDigit(s, i + i) << 4) | getHexDigit(s, i + i + 1));\n }\n return buff;\n }", "private static byte[] fromHex(final String hex) {\n final byte[] binary = new byte[hex.length() / 2];\n for (int i = 0; i < binary.length; i++) {\n binary[i] = (byte) Integer.parseInt(hex.substring(2 * i, 2 * i + 2), 16);\n }\n return binary;\n }", "private static byte[] fromHex(String hex)\n\t {\n\t byte[] binary = new byte[hex.length() / 2];\n\t for(int i = 0; i < binary.length; i++)\n\t {\n\t binary[i] = (byte)Integer.parseInt(hex.substring(2*i, 2*i+2), 16);\n\t }\n\t return binary;\n\t }", "public static byte[] hexStringToByteArray(String hex) \r\n{\r\n\tif((hex.length()%2)==1) // Falls die Länge des Strings ungerade ist, wird eine 1 angehängt\r\n\t{\r\n\t\tchar c = '1';\r\n\t\thex += c;\r\n\t\tSystem.out.println(\"Fehler in Convert.hexStringToByteArray: Ungerade String-Zeichenfolge!\");\r\n\t}\r\n\tint l = hex.length();\r\n\tbyte[] data = new byte[l/2];\r\n\tfor (int i = 0; i < l; i += 2) \r\n\t{\r\n\t\tdata[i/2] = (byte) ((Character.digit(hex.charAt(i), 16) << 4) + Character.digit(hex.charAt(i+1), 16));\r\n\t}\r\n\treturn data;\r\n}", "public static byte[] hexStringToByteArray(String s) {\r\n\t int len = s.length();\r\n\t byte[] data = new byte[len / 2];\r\n\t for (int i = 0; i < len; i += 2) {\r\n\t data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4)\r\n\t + Character.digit(s.charAt(i+1), 16));\r\n\t }\r\n\t return data;\r\n\t}", "public static byte[] hexToArray(String hex) {\n byte[] result = new byte[hex.length()/2];\n for (int i=0; i<hex.length(); i+=2) {\n result[i/2] = (byte) Integer.parseInt(hex.substring(i, i+2), 16);\n }\n return result;\n }", "public static byte[] HexStringToByteArray(String s) {\n int len = s.length();\n byte[] data = new byte[len / 2];\n for (int i = 0; i < len; i += 2) {\n data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4)\n + Character.digit(s.charAt(i+1), 16));\n }\n return data;\n }", "private byte[] fromHex(String hex)\n {\n byte[] binary = new byte[hex.length() / 2];\n for(int i = 0; i < binary.length; i++)\n {\n binary[i] = (byte)Integer.parseInt(hex.substring(2*i, 2*i+2), 16);\n }\n return binary;\n }", "private static byte[] fromHex(String hex) {\r\n byte[] binary = new byte[hex.length() / 2];\r\n for (int i = 0; i < binary.length; i++) {\r\n binary[i] = (byte) Integer.parseInt(hex.substring(2 * i, 2 * i + 2), 16);\r\n }\r\n return binary;\r\n }", "public static byte[] hexStringToByteArray(String s) {\n int len = s.length();\n byte[] data = new byte[len / 2];\n for (int i = 0; i < len; i += 2) {\n data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4)\n + Character.digit(s.charAt(i+1), 16));\n }\n return data;\n }", "public static byte[] hexStringToByteArray(String s) {\n\t\tint len = s.length();\n\t\tbyte[] data = new byte[len / 2];\n\t\tfor (int i = 0; i < len; i += 2) {\n\t\t\tdata[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4) + Character.digit(s.charAt(i + 1), 16));\n\t\t}\n\t\treturn data;\n\t}", "public static byte[] fromHex(String hex) {\n\t\tbyte[] bytes = new byte[hex.length() / 2];\n\t\tfor (int i = 0; i < bytes.length; i++) {\n\t\t\tbytes[i] = (byte) Integer.parseInt(hex.substring(2 * i, 2 * i + 2), 16);\n\t\t}\n\t\treturn bytes;\n\t}", "public static byte[] fromHex(String hex) {\n hex = hex.toUpperCase();\n byte[] b = new byte[hex.length() / 2];\n for (int i = 0; i < b.length; i++) {\n b[i] = (byte)((toBinaryFromHex((byte)hex.charAt(2 * i)) << 4) +\n toBinaryFromHex((byte)hex.charAt((2 * i + 1))));\n }\n return b;\n }", "public static byte[] hexStringToByteArray(String s) {\n if (s == null)\n return null;\n\n byte[] b = new byte[s.length() / 2];\n for (int i = 0; i < b.length; i++) {\n int index = i * 2;\n int v = Integer.parseInt(s.substring(index, index + 2), 16);\n b[i] = (byte) v;\n }\n return b;\n }", "public static byte[] hexStringToByteArray(String text) {\r\n StringBuilder builder = new StringBuilder();\r\n for (int i = 0; i < text.length(); i++) {\r\n char c = text.charAt(i);\r\n if (Character.isLetterOrDigit(c))\r\n builder.append(c);\r\n }\r\n String data = builder.toString();\r\n if (data.length() % 2 != 0)\r\n return null;\r\n byte[] ret = new byte[data.length() / 2];\r\n int c = 0;\r\n for (int i = 0; i < data.length(); i += 2) {\r\n String hex = data.substring(i, i + 2);\r\n ret[c] = (byte) Integer.parseInt(hex, 16);\r\n c++;\r\n }\r\n return ret;\r\n }", "public static byte[] fromHex(String hex) {\n byte[] binary = new byte[hex.length() / 2];\n for (int i = 0; i < binary.length; i++) {\n binary[i] = (byte) Integer.parseInt(hex.substring(2 * i, 2 * i + 2), 16);\n }\n return binary;\n }", "public static byte[] hexStringToBytes(String hexString) {\n if (hexString == null || hexString.equals(\"\")) {\n return null;\n }\n //2A51704910EA2922\n hexString = hexString.toUpperCase();\n //8\n int length = hexString.length() / 2;\n //\n char[] hexChars = hexString.toCharArray();\n LogUtils.e(\"ANKUR\", \"hexChars : \" + hexChars);\n byte[] d = new byte[length];\n for (int i = 0; i < length; i++) {\n int pos = i * 2;\n d[i] = (byte) (charToByte(hexChars[pos]) << 4 | charToByte(hexChars[pos + 1]));\n }\n LogUtils.e(\"ANKUR\", \"byteArray d : \" + d);\n return d;\n }", "public static byte[] fromHexString( String s ) \r\n { \r\n int stringLength = s.length(); \r\n if ( ( stringLength & 0x1 ) != 0 ) \r\n { \r\n throw new IllegalArgumentException( \"fromHexString requires an even number of hex characters\" ); \r\n } \r\n byte[] bytes = new byte[stringLength / 2]; \r\n \r\n for ( int i = 0, j = 0; i < stringLength; i += 2, j++ ) \r\n { \r\n int high = charToNibble( s.charAt( i ) ); \r\n int low = charToNibble( s.charAt( i + 1 ) ); \r\n // You can store either unsigned 0..255 or signed -128..127 bytes in a byte type. \r\n bytes[ j ] = ( byte ) ( ( high << 4 ) | low ); \r\n } \r\n return bytes; \r\n }", "public static byte[] HexStringToBytes(String s) {\n\n int size = s.length();\n byte[] b = new byte[size / 2];\n\n for (int i = 0; i < size; i += 2) {\n b[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4)\n + Character.digit(s.charAt(i + 1), 16));\n }\n return b;\n }", "public static byte[] hexToBytes(String hex) {\n\t\tbyte[] bytes = new byte[hex.length() / 2];\n\t\tfor (int i = 0; i < bytes.length; i++) {\n\t\t\tbytes[i] = (byte) ((Character.digit(hex.charAt(i * 2), 16) << 4)\n\t\t\t\t\t+ Character.digit(hex.charAt(i * 2 + 1), 16));\n\t\t}\n\t\treturn bytes;\n\t}", "public static byte[] bytesFromHexString(String hex) throws NumberFormatException {\n if (hex.length() == 0) return null;\n String myhex = hex + \" \";\n int len = myhex.length();\n if ((len % 3) != 0) throw new NumberFormatException();\n byte[] buf = new byte[len / 3];\n int i = 0, j = 0;\n while (i < len) {\n try {\n buf[j++] = (byte) ((fromDigit(myhex.charAt(i++)) << 4) |\n fromDigit(myhex.charAt(i++)));\n } catch (IllegalArgumentException e) {\n throw new NumberFormatException();\n }\n if (myhex.charAt(i++) != ' ') throw new NumberFormatException();\n }\n return buf;\n }", "public static final byte[] hexStrToBytes(String s) {\n\t\tbyte[] bytes;\n\n\t\tbytes = new byte[s.length() / 2];\n\n\t\tfor (int i = 0; i < bytes.length; i++) {\n\t\t\tbytes[i] = (byte) Integer.parseInt(s.substring(2 * i, (2 * i) + 2), 16);\n\t\t}\n\n\t\treturn bytes;\n\t}", "public static byte[] hexToBytes(String s) {\n int len = s.length();\n byte[] data = new byte[len / 2];\n for (int i = 0; i < len; i += 2) {\n data[i / 2] =\n (byte) ((Character.digit(s.charAt(i), 16) << 4) + Character.digit(s.charAt(i + 1), 16));\n }\n return data;\n }", "public static byte[]\n hexStringToBytes(String s) {\n byte[] ret;\n\n if (s == null) return null;\n\n int sz = s.length();\n\n ret = new byte[sz/2];\n\n for (int i=0 ; i <sz ; i+=2) {\n ret[i/2] = (byte) ((hexCharToInt(s.charAt(i)) << 4)\n | hexCharToInt(s.charAt(i+1)));\n }\n\n return ret;\n }", "private byte[] fromHex(String hexString) {\n int len = hexString.length() / 2;\n byte[] ret = new byte[len];\n for (int i = 0; i < len; i++) {\n ret[i] = (byte) Short.parseShort(hexString.substring(i * 2, i *\n 2 + 2), 16);\n }\n return ret;\n }", "private static byte[] hexStr2Bytes(String hex) {\n // Adding one byte to get the right conversion\n // values starting with \"0\" can be converted\n byte[] bArray = new BigInteger(\"10\" + hex, 16).toByteArray();\n\n // Copy all the REAL bytes, not the \"first\"\n byte[] ret = new byte[bArray.length - 1];\n for (int i = 0; i < ret.length; i++)\n ret[i] = bArray[i + 1];\n return ret;\n }", "ByteArray(String s) {\n\tdata = StringConverter.hexToByte(s);\n }", "private byte[] toByteArray(String s)\r\n\t\t{\n\t\t\tlong l = 0;\r\n\t\t\tif (s.startsWith(\"0x\") || s.startsWith(\"0X\")) {\r\n\t\t\t\tfinal byte[] d = new byte[(s.length() - 1) / 2];\r\n\t\t\t\tint k = (s.length() & 0x01) != 0 ? 3 : 4;\r\n\t\t\t\tfor (int i = 2; i < s.length(); i = k, k += 2)\r\n\t\t\t\t\td[(i - 1) / 2] = (byte) Short.parseShort(s.substring(i, k), 16);\r\n\t\t\t\treturn d;\r\n\t\t\t}\r\n\t\t\telse if (s.length() > 1 && s.startsWith(\"0\"))\r\n\t\t\t\tl = Long.parseLong(s, 8);\r\n\t\t\telse if (s.startsWith(\"b\"))\r\n\t\t\t\tl = Long.parseLong(s.substring(1), 2);\r\n\t\t\telse\r\n\t\t\t\tl = Long.parseLong(s);\r\n\t\t\tint i = 0;\r\n\t\t\tfor (long test = l; test != 0; test /= 0x100)\r\n\t\t\t\t++i;\r\n\t\t\tfinal byte[] d = new byte[i == 0 ? 1 : i];\r\n\t\t\tfor (; i-- > 0; l /= 0x100)\r\n\t\t\t\td[i] = (byte) (l & 0xff);\r\n\t\t\treturn d;\r\n\t\t}", "public static byte[] hexStringToBytes(String str) {\n\t\treturn hexStringToBytes(str,str.length()/2); \n\t}", "public static byte[] hexStringToByte(String command) {\n\t\tString[] s = command.split(\" \");\r\n\t\tbyte []bs=new byte[s.length];\r\n\t\tfor(int i=0;i<s.length;i++) {\r\n\t\t\tint temp=hexTool(s[i]);\r\n\t\t\tbyte bt=(byte) (temp&0xff);\r\n//\t\t\tSystem.out.print(bt);\r\n\t\t\tbs[i]=bt;\r\n\t\t}\r\n\t\treturn bs;\r\n//\t\tSystem.out.println(bs);\r\n\t}", "public static byte[] hextobyte(String keyText) {\n\t\tif (Objects.requireNonNull(keyText).length() == 0) {\n\t\t\treturn new byte[0];\n\t\t}\n\t\tif (keyText.length() % 2 == 1) {\n\t\t\tthrow new IllegalArgumentException(\"keyText is odd-sized.\");\n\t\t}\n\t\tbyte[] bytearray = new byte[keyText.length() / 2];\n\t\tfor (int index = 0, length = keyText.length(); index < length; index += 2) {\n\t\t\tbytearray[index / 2] = (byte) (toNibble(keyText.charAt(index)) << 4 | toNibble(keyText.charAt(index+1)));\n\t\t}\n\t\treturn bytearray;\n\t}", "public static byte[] hexToBytes(String txtInHex) {\n byte[] txtInBytes = new byte[txtInHex.length() / 2];\n for (int i = 0; i < txtInBytes.length; i++) {\n int index = i * 2;\n int v = Integer.parseInt(txtInHex.substring(index, index + 2), 16);\n txtInBytes[i] = (byte) v;\n }\n return txtInBytes;\n }", "public static byte[] hexString2bytes(String s)\r\n\t{\r\n\t\tif (null == s)\r\n\t\t\treturn null;\r\n\t\ts = trimSpace(s);\r\n\t\treturn hex2byte(s, 0, s.length() >> 1);\r\n\t}", "public static byte[] hextobyte(String keyText) {\n\t\tif (keyText.length() % 2 == 1) {\n\t\t\tthrow new IllegalArgumentException(\"Invalid string format --> invalid size\");\n\t\t}\n\n\t\tbyte[] byteArray = new byte[keyText.length() / 2];\n\t\tchar[] charArray = keyText.toCharArray();\n\n\t\tfor (int i = 0; i < charArray.length;) {\n\t\t\tchar c1 = charArray[i++];\n\t\t\tchar c2 = charArray[i];\n\n\t\t\tif (checkChar(c1) && checkChar(c2)) {\n\t\t\t\tint value = Integer.parseInt(new StringBuilder().append(c1).append(c2).toString(), 16);\n\t\t\t\tbyteArray[i / 2] = (byte) value;\n\t\t\t} else {\n\t\t\t\tthrow new IllegalArgumentException(\"Invalid string format --> invalid character\");\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\n\t\treturn byteArray;\n\t}", "public static byte[] fromHex(String hex)\n {\n if (hex == null)\n {\n return null;\n }\n\n int length = hex.length();\n if ((length & 0x01) != 0)\n {\n return null;\n }\n\n byte[] result = new byte[length / 2];\n\n for (int i = 0; i < length; i += 2)\n {\n int c1 = fromHex(hex.charAt(i));\n if (c1 < 0)\n {\n return null;\n }\n\n int c2 = fromHex(hex.charAt(i + 1));\n if (c2 < 0)\n {\n return null;\n }\n\n result[i / 2] = (byte) (c1 * 16 + c2);\n }\n\n return result;\n }", "public static byte[] hextobyte(String keyText) {\n\t\tif (keyText.length() % 2 != 0) throw new IllegalArgumentException(\"Length must be even.\");\n\t\tchar[] hexInput = keyText.toCharArray();\n\t\tbyte[] byteOutput = new byte[keyText.length() / 2];\n\t\tfor (int i = 0; i < hexInput.length; i += 2) {\n\t\t\tbyteOutput[i / 2] = (byte) ((Character.digit(hexInput[i], HEX_BASE) * HEX_BASE)\n\t\t\t\t\t+ Character.digit(hexInput[i + 1], HEX_BASE));\n\t\t}\n\t\treturn byteOutput;\n\t}", "public static byte[] toByteArray(String s) {\n return DatatypeConverter.parseHexBinary(s.toUpperCase());\n }", "public static byte[] hexStringToBytes(String hexString) {\n if (hexString == null || hexString.equals(\"\")) {\n return null;\n }\n hexString = hexString.toUpperCase();\n int length = hexString.length() / 2;\n char[] hexChars = hexString.toCharArray();\n byte[] d = new byte[length];\n for (int i = 0; i < length; i++) {\n int pos = i * 2;\n d[i] = (byte) (charToByte(hexChars[pos]) << 4 | charToByte(hexChars[pos + 1]));\n }\n return d;\n }", "public static byte[] hexStringToBytes(String hexString) {\n if (hexString == null || hexString.equals(\"\")) {\n return null;\n }\n hexString = hexString.toUpperCase();\n int length = hexString.length() / 2;\n char[] hexChars = hexString.toCharArray();\n byte[] d = new byte[length];\n for (int i = 0; i < length; i++) {\n int pos = i * 2;\n d[i] = (byte) (charToByte(hexChars[pos]) << 4 | charToByte(hexChars[pos + 1]));\n }\n return d;\n }", "public static byte[] hexStringToBytes(String hexString) {\r\n\t\tif (hexString == null || hexString.equals(\"\")) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\thexString = hexString.toUpperCase();\r\n\t\tint length = hexString.length() / 2;\r\n\t\tchar[] hexChars = hexString.toCharArray();\r\n\t\tbyte[] d = new byte[length];\r\n\t\tfor (int i = 0; i < length; i++) {\r\n\t\t\tint pos = i * 2;\r\n\t\t\td[i] = (byte) (charToByte(hexChars[pos]) << 4 | charToByte(hexChars[pos + 1]));\r\n\t\t}\r\n\t\treturn d;\r\n\t}", "public static byte[] hex2byte(String s, int offset, int len)\r\n\t{\r\n\t\tbyte[] d = new byte[len];\r\n\t\tint byteLen = len * 2;\r\n\t\tfor (int i = 0; i < byteLen; i++)\r\n\t\t{\r\n\t\t\tint shift = (i % 2 == 1) ? 0 : 4;\r\n\t\t\td[i >> 1] |= Character.digit(s.charAt(offset + i), 16) << shift;\r\n\t\t}\r\n\t\treturn d;\r\n\t}", "public static byte[] hexStringToByteArray(String digits) {\n int len = digits.length();\n // Check if string is valid hex\n if (!RegEx.VALID_HEX.matcher(digits).matches() || (len & 0x1) != 0) {\n Logger.warn(\"Invalid hexadecimal string: {}\", digits);\n return new byte[0];\n }\n byte[] data = new byte[len / 2];\n for (int i = 0; i < len; i += 2) {\n data[i / 2] = (byte) (Character.digit(digits.charAt(i), Normal._16) << 4\n | Character.digit(digits.charAt(i + 1), Normal._16));\n }\n return data;\n }", "public static byte[] hexStringToBytes(String hexString) {\n\t\tif (hexString == null || hexString.equals(\"\")) {\n\t\t\treturn null;\n\t\t}\n\t\thexString = hexString.toUpperCase();\n\t\tint length = hexString.length() / 2;\n\t\tchar[] hexChars = hexString.toCharArray();\n\t\tbyte[] d = new byte[length];\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tint pos = i * 2;\n\t\t\td[i] = (byte) (charToByte(hexChars[pos]) << 4 | charToByte(hexChars[pos + 1]));\n\t\t}\n\t\treturn d;\n\t}", "public static byte[] convertFromHex(String otp) throws SaslException {\n final CodePointIterator cpi = CodePointIterator.ofString(otp);\n final CodePointIterator di = cpi.delimitedBy(DELIMS);\n // Remove any white space\n final StringBuilder sb = new StringBuilder();\n while (di.hasNext()) {\n di.drainTo(sb);\n skipDelims(di, cpi);\n }\n return CodePointIterator.ofString(sb.toString()).hexDecode().drain();\n }", "public static byte[] toBytes(final String hexadecimal) {\n\t\treturn toBytes(hexadecimal.toCharArray());\n\t}", "public static byte[] hexToBytes(String hexString) {\n int len = hexString.length();\n Preconditions.checkArgument(len % 2 == 0);\n int nBytes = len / 2;\n byte[] decoded = new byte[nBytes];\n int j = 0;\n for (int i = 0; i < nBytes; i += 1) {\n int d1 = Character.digit(hexString.charAt(j++), 16);\n int d2 = Character.digit(hexString.charAt(j++), 16);\n if (d1 < 0 || d2 < 0) {\n throw new IllegalArgumentException(\"Non-hexadecimal character in string: \" + hexString);\n }\n decoded[i] = (byte) ((d1 << 4) + d2);\n }\n return decoded;\n }", "public static byte[] toAscii(String hex) {\n\t\thex = hex.toLowerCase().replaceAll(\"[^0-9a-f]\", \"\");\n\t\tbyte[] res = new byte[hex.length() >> 1];\n\t\tbyte currentByte = 0;\n\t\tfor (int i = 0; i < hex.length(); i++) {\n\t\t\tchar c = hex.charAt(i);\n\t\t\tif ('0' <= c && c <= '9') {\n\t\t\t\tcurrentByte |= (byte) ((c - '0') << ((i + 1) & 1) * 4);\n\t\t\t} else if ('a' <= c && c <= 'f') {\n\t\t\t\tcurrentByte |= (byte) ((10 + c - 'a') << ((i + 1) & 1) * 4);\n\t\t\t}\n\t\t\tif ((i & 1) == 1) {\n\t\t\t\tres[i >> 1] = currentByte;\n\t\t\t\tcurrentByte = 0;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}", "static public byte[] hexToByteArr(String hex, boolean complete) {\n\n\t\tif ( (hex.length() % 2 > 0) && (complete))\n\t\t\thex+=\"0\"+hex;\n\n\t\tif ( (hex.length() % 2 > 0) && (!complete))\n\t\t\tthrow new NumberFormatException(\"Odd number of digits: \"+hex);\n\n\t\tbyte[] b = new byte[hex.length() / 2];\n\t\tfor(int i=0; i<b.length; i++) {\n\t\t\tint i1 = digit(hex.charAt(i*2));\n\t\t\tint i2 = digit(hex.charAt(i*2+1));\n\t\t\tif(i1 < 0 || i2 < 0)\n\t\t\t\tthrow new NumberFormatException(\"Invalid digit\");\n\t\t\tb[i] = (byte)(i1 * 16 + i2);\n\t\t}\n\t\t// b[i] = (byte)Integer.parseInt(hex.substring(i*2, i*2 + 2), 16);\n\t\t// Have to use parseInt: parseByte doesn't like\n\t\t// too large values, e.g. 0x81 since that is supposed\n\t\t// to be negative.\n\n\t\treturn b;\n\t}", "@Test\n public void testHexAndBytesTransformation() {\n byte[] bytes = ByteUtils.stringToBytes(ByteUtils.bytesToHexString(testBytes));\n assertArrayEquals(testBytes, bytes); \n }", "public static byte[] hexStringToBytes(String str, int n) {\n\t\tif (str.indexOf(\":\")>=0) {\n\t\t\t// the string is in the form of xx:yy:zz:ww.., so remove all ':' first\n\t\t\tString aux=\"\";\n\t\t\tchar c;\n\t\t\tfor (int i=0; i<str.length(); i++)\n\t\t\t\tif ((c=str.charAt(i))!=':') aux+=c;\n\t\t\tstr=aux; \n\t\t} \n\t\tbyte[] b=new byte[n];\n\t\tfor (int i=0; i<n; i++) {\n\t\t\t//int lo=Integer.parseInt(String.valueOf(str.charAt(i*2)),16);\n\t\t\t//int hi=Integer.parseInt(String.valueOf(str.charAt(i*2+1)),16);\n\t\t\t//b[i]=hi*16+lo;\n\t\t\tif (n<str.length()/2) b[i]=(byte)Integer.parseInt(str.substring(i*2,i*2+2),16);\n\t\t\telse b[i]=0;\n\t\t}\n\t\treturn b;\n\t}", "public static byte[] toByteArray(String hexStr) throws UnsignedBigIntUtilsException {\n return DatatypeConverter.parseHexBinary(UnsignedBigIntUtils.validateHexStr(hexStr));\n }", "public static byte [] toBytesBinary(String in) {\n byte [] b = new byte[in.length()];\n int size = 0;\n for (int i = 0; i < in.length(); ++i) {\n char ch = in.charAt(i);\n if (ch == '\\\\' && in.length() > i+1 && in.charAt(i+1) == 'x') {\n // ok, take next 2 hex digits.\n char hd1 = in.charAt(i+2);\n char hd2 = in.charAt(i+3);\n\n // they need to be A-F0-9:\n if (!isHexDigit(hd1) ||\n !isHexDigit(hd2)) {\n // bogus escape code, ignore:\n continue;\n }\n // turn hex ASCII digit -> number\n byte d = (byte) ((toBinaryFromHex((byte)hd1) << 4) + toBinaryFromHex((byte)hd2));\n\n b[size++] = d;\n i += 3; // skip 3\n } else {\n b[size++] = (byte) ch;\n }\n }\n // resize:\n byte [] b2 = new byte[size];\n System.arraycopy(b, 0, b2, 0, size);\n return b2;\n }", "public abstract byte[] mo32305a(String str);", "private String toHex(byte[] data) {\r\n char[] chars = new char[data.length * 2];\r\n for (int i = 0; i < data.length; i++) {\r\n chars[i * 2] = HEX_DIGITS[(data[i] >> 4) & 0xf];\r\n chars[i * 2 + 1] = HEX_DIGITS[data[i] & 0xf];\r\n }\r\n return new String(chars);\r\n}", "public byte[] getHexString(String key) {\n Object value = get(key);\n return ((value instanceof String) ? Utils.parseHexString(((String)value).trim()) : null);\n }", "protected static byte[] toByteArray(String str) {\n byte[] bytes = new byte[str.length()];\n for (int i = 0; i < bytes.length; i++) {\n bytes[i] = (byte) str.charAt(i);\n }\n return bytes;\n }", "public static byte[] hex2byte(byte[] b) {\n if ((b.length % 2) != 0)\n throw new IllegalArgumentException(\"hello\");\n byte[] b2 = new byte[b.length / 2];\n for (int n = 0; n < b.length; n += 2) {\n String item = new String(b, n, 2);\n b2[n / 2] = (byte) Integer.parseInt(item, 16);\n }\n return b2;\n }", "protected byte[] createMacBytes(String macStr) throws NumberFormatException {\n byte[] bytes = new byte[6];\n \n String[] hex = macStr.split(\"(\\\\:|\\\\-)\");\n \n if (hex.length != 6) {\n throw new IllegalArgumentException(\"Invalid MAC address.\");\n }\n try {\n for (int i = 0; i < 6; i++) {\n bytes[i] = (byte) Integer.parseInt(hex[i], 16);\n }\n } catch (NumberFormatException e) {\n throw new IllegalArgumentException(\"Invalid hex digit in MAC address.\");\n }\n return bytes;\n }", "private byte[] stringToArrayOfByte(String string)\n\t\t\tthrows NumberFormatException {\n\n\t\tbyte[] bytes = new byte[string.length() + 1];\n\n\t\tfor (int i = 0; i < string.length(); i++) {\n\t\t\tbytes[i] = charToByte(string.charAt(i));\n\t\t}\n\n\t\tbytes[string.length()] = nullByte;\n\n\t\treturn bytes;\n\n\t}", "private byte[] stringToBytes(String bytesInStringForm) {\n byte[] bytes = new byte[16];\n String[] byteValues = bytesInStringForm.split(\",\");\n for (int byteIndex = 0; byteIndex < 16; byteIndex++) {\n bytes[byteIndex] = (byte) Integer.parseInt(byteValues[byteIndex]);\n }\n return bytes;\n\n }", "@Test\n public void stringFromBytesArray() {\n byte[] input = new byte[]{\n 12,\n -68,\n 102,\n 17,\n -11,\n 84,\n 11,\n -48,\n -128,\n -102,\n 56,\n -115,\n -55,\n 90,\n 97,\n 91\n };\n\n assertEquals(\n \"0cbc6611f5540bd0809a388dc95a615b\",\n JdkHashTools.getStringFromByteArray(input)\n );\n }", "static int[] hexStringToBits(String hex) {\n int[] bits = new int[128];\n for (int i = 0; i < hex.length(); i++) {\n int n = (int)hex.charAt(i);\n for (int j = 0; j < 4; j++) {\n bits[4 * i + j] = (n >> (3 - j)) & 1;\n }\n }\n return bits;\n }", "public static byte[] dataStringToByteArray(String inDataString) throws JCavernInternalError\n\t{\n\t\tStringTokenizer aTokenizer = new StringTokenizer(inDataString);\n\t\tint\t\t\t\tindex = 0;\n\t\tbyte[]\t\t\ttheBytes = new byte[aTokenizer.countTokens()];\n\n\t\twhile (aTokenizer.hasMoreTokens())\n\t\t{\n\t\t\tString\taToken = aTokenizer.nextToken();\n\t\t\ttheBytes[index] = (byte) Integer.parseInt(aToken, 16);\n\t\t\tindex++;\n\t\t}\n\t\t\n\t\treturn theBytes;\n\t}", "private static String convertToHex(byte[] data) throws IOException {\n //create new instance of string buffer\n StringBuffer stringBuffer = new StringBuffer();\n String hex = \"\";\n\n //encode byte data with base64\n hex = Base64.getEncoder().encodeToString(data);\n stringBuffer.append(hex);\n\n //return string\n return stringBuffer.toString();\n }", "public static byte[] toBytes(final char[] hexadecimal) {\n\t\tbyte[] bytes = new byte[hexadecimal.length / 2];\n\t\tfor (int i = 0, j = 0; i < bytes.length; i++, j += 2) {\n\t\t\tbytes[i] = (byte) ((fromHexChar(hexadecimal[j]) << 4) | fromHexChar(hexadecimal[j + 1]));\n\t\t}\n\t\treturn bytes;\n\t}", "public static byte[] convertToByteArray(String key)\n\t{\n\t byte[] b = new byte[key.length()/2];\n\t\n\t for(int i=0, bStepper=0; i<key.length()+2; i+=2)\n\t if(i !=0)\n\t b[bStepper++]=((byte) Integer.parseInt((key.charAt(i-2)+\"\"+key.charAt(i-1)), 16));\n\t\n\t return b;\n\t}", "public static String asHex(byte[] buf) {\n \t char[] HEX_CHARS = \"0123456789abcdef\".toCharArray();\n \t char[] chars = new char[2 * buf.length];\n \t for (int i = 0; i < buf.length; ++i) {\n \t chars[2 * i] = HEX_CHARS[(buf[i] & 0xF0) >>> 4];\n \t chars[2 * i + 1] = HEX_CHARS[buf[i] & 0x0F];\n \t }\n \t return new String(chars);\n \t}", "@Test\n public void testToHex_byteArr() {\n System.out.println(\"toHex\");\n byte[] buf = null;\n String expResult = \"\";\n String result = Crypto.toHex(buf);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public byte[] toByteArray() {\n final byte[] data = new byte[maxIndex];\n for (Map.Entry<Integer, String> entry : addr2str.entrySet()) {\n final String str = entry.getValue();\n final int addr = entry.getKey();\n for (int k = 0; k < str.length(); k++) {\n data[addr + k] = (byte) str.charAt(k);\n }\n }\n return data;\n }", "public static byte[] stringToHash (String hash)\n {\n if (hash == null || hash.length() % 2 != 0) {\n return null;\n }\n\n hash = hash.toLowerCase();\n byte[] data = new byte[hash.length() / 2];\n for (int ii = 0; ii < hash.length(); ii += 2) {\n int value = (byte) (HEX.indexOf(hash.charAt(ii)) << 4);\n value += HEX.indexOf(hash.charAt(ii + 1));\n\n // values over 127 are wrapped around, restoring negative bytes\n data[ii / 2] = (byte) value;\n }\n\n return data;\n }", "private static byte[] convertToBytes(final String macNumber) {\n byte[] bytes = new byte[6];\n String[] hex = macNumber.split(\"(\\\\:|\\\\-)\");\n if (hex.length != 6) {\n return new byte[0];\n }\n try {\n for (int i = 0; i < 6; i++) {\n bytes[i] = (byte) Integer.parseInt(hex[i], 16);\n }\n } catch (NumberFormatException e) {\n LOG.error(e);\n return new byte[0];\n }\n return bytes;\n }", "private byte[] macStringToByteArray(String dstMac) {\n byte[] dstMAC = new byte[6];\n if (dstMac != null) {\n for (int i = 0; i < 6; i++) {\n dstMAC[i] = (byte) Integer.parseInt(dstMac.substring(i * 3, (i * 3) + 2), 16);\n }\n }\n return dstMAC;\n }", "public abstract byte[] toByteArray();", "public abstract byte[] toByteArray();", "private byte[] convertingTobyteArray(String result) {\n String[] splited = result.split(\"\\\\s+\");\n byte[] valueByte = new byte[splited.length];\n for (int i = 0; i < splited.length; i++) {\n if (splited[i].length() > 2) {\n String trimmedByte = splited[i].split(\"x\")[1];\n valueByte[i] = (byte) convertstringtobyte(trimmedByte);\n }\n\n }\n return valueByte;\n\n }", "public void convert_Hex_To_Binary(String hex) {\n String binary_string = hexToBinary(hex, true);\n int[] data = new int[64];\n for (int k = 0; k < data.length; k++)\n data[k] = Character.getNumericValue(binary_string.charAt(k));\n key_user = data;\n }", "public abstract byte[] parse(String input);", "private String hexify(byte bytes[]) {\n\n char[] hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7',\n '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};\n\n StringBuilder buf = new StringBuilder(bytes.length * 2);\n\n for (byte aByte : bytes) {\n buf.append(hexDigits[(aByte & 0xf0) >> 4]);\n buf.append(hexDigits[aByte & 0x0f]);\n }\n\n return buf.toString();\n }", "private static String hexify(byte bytes[]) {\n\n char[] hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7',\n '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};\n\n StringBuilder buf = new StringBuilder(bytes.length * 2);\n for (byte aByte : bytes) {\n buf.append(hexDigits[(aByte & 0xf0) >> 4]);\n buf.append(hexDigits[aByte & 0x0f]);\n }\n return buf.toString();\n }", "public static byte[] GetBytesFromOctetString(String p) throws IOException {\n Charset encoding = StandardCharsets.UTF_8;\n return StringUtility.GetBytesFromOctetString(p, encoding);\n }", "private static void decodeBytesFromHex(byte[] hexArray, int hexArrayOffset, byte[] outputArray, int outputOffset,\n int length) throws HyracksDataException {\n try {\n for (int i = hexArrayOffset; i < hexArrayOffset + length;) {\n int hi = transformHexCharToInt(hexArray[i++]);\n outputArray[outputOffset++] = (byte) (hi << 4 | transformHexCharToInt(hexArray[i++]));\n }\n } catch (Exception ex) {\n // Can also happen in case of invalid length, out of bound exception\n throw new RuntimeDataException(ErrorCode.INVALID_FORMAT, \"uuid\", UTF8StringUtil.toString(hexArray, 1));\n }\n }", "public abstract byte[] getEncoded();", "public static byte[] array(final String binary_str)\n\t{\n\t\tfinal String[] split_binary = binary_str.split(BYTE_DELIMITER);\n\t\tfinal ByteBuffer decoded_binary_str = ByteBuffer.allocate(split_binary.length);\n\t\tfinal byte base = 2;\n\t\tfor(int byte_index = 0 ; byte_index < split_binary.length; byte_index ++)\n\t\t\tdecoded_binary_str.put((byte)Long.parseLong(split_binary[byte_index], base));\n\t\t\n\t\treturn decoded_binary_str.array();\n\t}", "private static String pasarAHexadecimal(byte[] digest){\n String hash = \"\";\n for(byte aux : digest) {\n int b = aux & 0xff;\n if (Integer.toHexString(b).length() == 1) hash += \"0\";\n hash += Integer.toHexString(b);\n }\n return hash;\n }", "public static char[] toHexadecimalChars(final byte[] bytes) {\n\t\tfinal char[] chars = new char[bytes.length * 2];\n\t\tfor (int i = 0, j = 0; i < bytes.length; i++, j += 2) {\n\t\t\tfinal int v = bytes[i] & 0xFF;\n\t\t\tchars[j] = toHexChar(v >>> 4);\n\t\t\tchars[j + 1] = toHexChar(v & 0x0F);\n\t\t}\n\t\treturn chars;\n\t}", "byte[] getBytes();", "byte[] getBytes();", "@Test\n public void testBytesToHexString() {\n String testHex = ByteUtils.bytesToHexString(testBytes); \n assertEquals(testHex.length(), testBytes.length * 2);\n }", "byte[] mo38566a();", "public static ByteBuffer toBytes(String hexString) {\n\t\tint length = hexString.length() / 2;\n\t\tbyte bytes[] = new byte[length];\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tbytes[i] = (byte) ( getValueE(hexString.charAt(2 * i)) + \n\t\t\t\t\tgetValueD(hexString.charAt(2 * i + 1)) );\n\t\t}\n\t\treturn ByteBuffer.wrap(bytes);\t\n\t}", "static String hexToBin(String s) {\n\t\treturn new BigInteger(s, 16).toString(2);\n\t}", "private String toHex(byte[] bytes) {\n StringBuilder s = new StringBuilder(bytes.length * 2);\n for (byte b : bytes) {\n s.append(String.format(\"%02x\", b));\n }\n return s.toString();\n }" ]
[ "0.78981173", "0.7844114", "0.77499837", "0.77304935", "0.77235943", "0.7703884", "0.7696479", "0.76925945", "0.7656743", "0.7644211", "0.7643416", "0.76340324", "0.76316345", "0.76299196", "0.762399", "0.7619368", "0.76151603", "0.76082146", "0.76049924", "0.74738836", "0.74574226", "0.7441565", "0.74408966", "0.7430146", "0.74053717", "0.7402077", "0.73806906", "0.7379124", "0.73304176", "0.73293597", "0.73250544", "0.7317521", "0.7298615", "0.7271778", "0.72103995", "0.7188137", "0.7178021", "0.7172215", "0.71327466", "0.71267587", "0.70982516", "0.7093142", "0.70870656", "0.70463693", "0.70405483", "0.6967554", "0.6967554", "0.6883102", "0.6848219", "0.6818953", "0.68165135", "0.677556", "0.6731306", "0.6724401", "0.6689096", "0.66232", "0.6564486", "0.6552208", "0.6508518", "0.64979", "0.64611393", "0.6460243", "0.6458112", "0.64482546", "0.64403284", "0.6439132", "0.6414351", "0.63844657", "0.6376156", "0.63606614", "0.63570833", "0.63451993", "0.63290554", "0.6261594", "0.6244923", "0.62081724", "0.6201173", "0.6192041", "0.6183784", "0.614333", "0.6140886", "0.6140886", "0.6127423", "0.6127357", "0.6112552", "0.61038774", "0.6091291", "0.60563534", "0.6034179", "0.6018497", "0.6015294", "0.5983712", "0.59718966", "0.59514886", "0.59514886", "0.5938557", "0.5937211", "0.5932041", "0.59209555", "0.5913435" ]
0.76296306
14
/ Main function arg0 file to encrypt arg1 path to encrypted file storage arg2 path to decrypted file storage arg3 algorithm number to choose (0,1,2 supported for now)
public static void main(String[] args) { /* algorithms to choose: 0 - ASCON 1 - AESOTRS 2 - AESOTRP ------ not yet supported ------ 3 - Acorn 4 - Keyak 5 - OCB 6 - Norx 7 - Deoxys 8 - Ketje 9 - AEZ 10 - MORUS */ // enter input file path String path_in = args[0]; // enter encrypted output file path String path_out = args[1]; // enter decrypted output file path String path_out2 = args[2]; // Algorithm number int alg = Integer.parseInt(args[3]); // enter key (in this case 16B) byte[] key = hexStringToByteArray("00112233445566778899aabbccddeeff"); // enter nonce (int his case 16B) byte[] nonce = hexStringToByteArray("00112233445566778899aabbccddeeff"); // call encryption function which will do the rest and output the file new JNI().dll_encrypt(path_in, path_out, nonce, key, alg); // invoke the native method new JNI().dll_decrypt(path_out, path_out2, nonce, key, alg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args){\n\n String mode = \"enc\";\n String data = \"\";\n String out = \"\";\n String path;\n String alg = \"unicode\";\n int key = 0;\n\n try {\n for (int i = 0; i < args.length; i++) {\n if (args[i].equals(\"-data\") || args[i].equals(\"-in\")) {\n data = args[i + 1];\n }\n if (args[i].equals(\"-mode\")) {\n mode = args[i + 1];\n }\n if (args[i].equals(\"-key\")) {\n key = Integer.parseInt(args[i + 1]);\n }\n if (args[i].equals(\"-out\")) {\n out = args[i + 1];\n }\n if (args[i].equals(\"-alg\")) {\n alg = args[i + 1];\n }\n }\n } catch (ArrayIndexOutOfBoundsException e) {\n System.out.println(\"Missing option\");\n }\n\n File file = new File(data);\n\n if (file.exists() && !file.isDirectory()) {\n path = data;\n\n switch (mode){\n case \"enc\":\n EncryptionContext encryptionContext = new EncryptionContext();\n if(alg.equals(\"shift\")) {\n encryptionContext.setMethod(new ShiftEncryptionMethod());\n } else {\n encryptionContext.setMethod(new UnicodeTableEncryptionMethod());\n }\n data = encryptionContext.encryptFromFile(path, key);\n break;\n\n case \"dec\":\n DecryptionContext decryptionContext = new DecryptionContext();\n if(alg.equals(\"shift\")) {\n decryptionContext.setMethod(new ShiftDecryptionMethod());\n } else {\n decryptionContext.setMethod(new UnicodeTableDecryptionMethod());\n }\n data = decryptionContext.decryptFromFile(path,key);\n break;\n }\n\n } else {\n switch (mode){\n case \"enc\":\n EncryptionContext encryptionContext = new EncryptionContext();\n if(alg.equals(\"shift\")) {\n encryptionContext.setMethod(new ShiftEncryptionMethod());\n } else {\n encryptionContext.setMethod(new UnicodeTableEncryptionMethod());\n }\n data = encryptionContext.encrypt(key, data);\n break;\n\n case \"dec\":\n DecryptionContext decryptionContext = new DecryptionContext();\n if(alg.equals(\"shift\")) {\n decryptionContext.setMethod(new ShiftDecryptionMethod());\n } else {\n decryptionContext.setMethod(new UnicodeTableDecryptionMethod());\n }\n data = decryptionContext.decrypt(key, data);\n break;\n }\n }\n\n if (out.isEmpty()) {\n System.out.println(data);\n } else {\n writeIntoFile(out, data);\n }\n\n }", "public static void main(String[] args) {\n if (args.length < 2) {\n System.out.println(\"The first argument must be -e or -d\");\n System.out.println(\n \"while the second argument must be -ECB, -CBC. or -CTR\");\n System.exit(1);\n }\n if (args[1].equals(\"-ECB\")) {\n if (args.length == 4) {\n String filename = args[2];\n String key = args[3];\n if (args[0].equals(\"-e\")) {\n encryptECB(filename,key);\n }\n else if (args[0].equals(\"-d\")) {\n decryptECB(filename,key);\n } else {\n System.out.println(\"The first argument must be -e or -d\");\n System.exit(1);\n }\n } else {\n System.out.println(\"Usage: java ImageCipher [-e or -d] -ECB \" +\n \"<image file name without .pgm> <key>\");\n System.exit(1);\n }\n } else if (args[1].equals(\"-CBC\")) {\n if (args.length == 5) {\n String filename = args[2];\n String key = args[3];\n String IV = args[4];\n if (args[0].equals(\"-e\")) {\n encryptCBC(filename,key,IV);\n }\n else if (args[0].equals(\"-d\")) {\n decryptCBC(filename,key,IV);\n } else {\n System.out.println(\"The first argument must be -e or -d\");\n System.exit(1);\n }\n } else {\n System.out.println(\"Usage: java ImageCipher [-e or -d] -CBC \" +\n \"<image file name without .pgm> <key> <IV>\");\n System.exit(1);\n }\n } else if (args[1].equals(\"-CTR\")) {\n if (args.length == 5) {\n String filename = args[2];\n String key = args[3];\n String counter = args[4];\n if (args[0].equals(\"-e\")) {\n encryptCTR(filename,key,counter);\n }\n else if (args[0].equals(\"-d\")) {\n decryptCTR(filename,key,counter);\n } else {\n System.out.println(\"The first argument must be -e or -d\");\n System.exit(1);\n }\n } else {\n System.out.println(\"Usage: java ImageCipher [-e or -d] -CTR \" +\n \"<image file name without .pgm> <key> <IV>\");\n System.exit(1);\n }\n } else {\n System.out.println(\"The second argument must be -ECB, -CBC, or \" +\n \"-CTR\");\n System.exit(1);\n }\n\n }", "private static void crypto(String filePath1, String filePath2) {\n\n\t\t// Retrieve the cipher\n\t\tCipher cipher;\n\t\ttry {\n\t\t\tcipher = obtainCipher();\n\n\t\t} catch (InvalidKeyException | InvalidAlgorithmParameterException | NoSuchAlgorithmException\n\t\t\t\t| NoSuchPaddingException e) {\n\t\t\tSystem.out.println(\"Exception while obtaining cypher: \" + e.getMessage());\n\t\t\treturn;\n\t\t}\n\n\t\tPath p = Paths.get(filePath1);\n\t\tPath p2 = Paths.get(filePath2);\n\n\t\t// Open the file input and output stream\n\t\ttry (InputStream is = Files.newInputStream(p); OutputStream os = Files.newOutputStream(p2)) {\n\t\t\tbyte[] buff = new byte[4096];\n\n\t\t\twhile (true) {\n\t\t\t\tint r = is.read(buff);\n\n\t\t\t\tif (r == -1) {\n\t\t\t\t\t// Finishing the cipher\n\t\t\t\t\ttry {\n\t\t\t\t\t\tos.write(cipher.doFinal());\n\t\t\t\t\t} catch (IllegalBlockSizeException | BadPaddingException e) {\n\t\t\t\t\t\tSystem.out.println(\"Exception while finalizaing cipher: \" + e.getMessage());\n\t\t\t\t\t\tSystem.exit(1);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Update cipher and write into new file\n\t\t\t\tos.write(cipher.update(buff, 0, r));\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Exception while opening the file: \" + e.getMessage());\n\t\t\tSystem.exit(1);\n\n\t\t}\n\n\t\tSystem.out.println((encrypt ? \"Encryption\" : \"Decryption\") + \" completed. Generated file \" + filePath2\n\t\t\t\t+ \" based on file \" + filePath1 + \".\");\n\n\t}", "private static java.io.File a(java.io.File r8, java.lang.String r9, java.lang.String r10) {\n /*\n r0 = 0;\n r1 = 0;\n r2 = r8.getName();\t Catch:{ Exception -> 0x006b, all -> 0x0067 }\n r3 = \".decrypt\";\n r4 = r8.getParentFile();\t Catch:{ Exception -> 0x006b, all -> 0x0067 }\n r2 = java.io.File.createTempFile(r2, r3, r4);\t Catch:{ Exception -> 0x006b, all -> 0x0067 }\n r3 = new javax.crypto.spec.IvParameterSpec;\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r4 = \"UTF-8\";\n r10 = r10.getBytes(r4);\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r3.<init>(r10);\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r10 = new javax.crypto.spec.SecretKeySpec;\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r4 = \"UTF-8\";\n r9 = r9.getBytes(r4);\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r4 = \"AES\";\n r10.<init>(r9, r4);\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r9 = \"AES/CBC/PKCS7PADDING\";\n r9 = javax.crypto.Cipher.getInstance(r9);\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r4 = 2;\n r9.init(r4, r10, r3);\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r10 = new java.io.FileInputStream;\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r10.<init>(r8);\t Catch:{ Exception -> 0x0062, all -> 0x0067 }\n r3 = new javax.crypto.CipherInputStream;\t Catch:{ Exception -> 0x005e, all -> 0x005a }\n r3.<init>(r10, r9);\t Catch:{ Exception -> 0x005e, all -> 0x005a }\n r9 = new java.io.FileOutputStream;\t Catch:{ Exception -> 0x0057, all -> 0x0054 }\n r9.<init>(r2);\t Catch:{ Exception -> 0x0057, all -> 0x0054 }\n r4 = 1024; // 0x400 float:1.435E-42 double:5.06E-321;\n r4 = new byte[r4];\t Catch:{ Exception -> 0x0052 }\n L_0x0045:\n r5 = r3.read(r4);\t Catch:{ Exception -> 0x0052 }\n r6 = -1;\n if (r5 == r6) goto L_0x0050;\n L_0x004c:\n r9.write(r4, r0, r5);\t Catch:{ Exception -> 0x0052 }\n goto L_0x0045;\n L_0x0050:\n r0 = 1;\n goto L_0x007e;\n L_0x0052:\n r4 = move-exception;\n goto L_0x0070;\n L_0x0054:\n r8 = move-exception;\n r9 = r1;\n goto L_0x008f;\n L_0x0057:\n r4 = move-exception;\n r9 = r1;\n goto L_0x0070;\n L_0x005a:\n r8 = move-exception;\n r9 = r1;\n r3 = r9;\n goto L_0x008f;\n L_0x005e:\n r4 = move-exception;\n r9 = r1;\n r3 = r9;\n goto L_0x0070;\n L_0x0062:\n r4 = move-exception;\n r9 = r1;\n r10 = r9;\n r3 = r10;\n goto L_0x0070;\n L_0x0067:\n r8 = move-exception;\n r9 = r1;\n r3 = r9;\n goto L_0x0090;\n L_0x006b:\n r4 = move-exception;\n r9 = r1;\n r10 = r9;\n r2 = r10;\n r3 = r2;\n L_0x0070:\n r5 = \"DecryptUtils\";\n r6 = \"decryptByPair decrypt hotfix patch file error\";\n r7 = new java.lang.Object[r0];\t Catch:{ all -> 0x008e }\n com.taobao.sophix.e.d.a(r5, r6, r4, r7);\t Catch:{ all -> 0x008e }\n if (r2 == 0) goto L_0x007e;\n L_0x007b:\n r2.delete();\t Catch:{ all -> 0x008e }\n L_0x007e:\n com.taobao.sophix.e.b.a(r10);\n com.taobao.sophix.e.b.a(r3);\n com.taobao.sophix.e.b.a(r9);\n if (r0 == 0) goto L_0x008d;\n L_0x0089:\n r8.delete();\n return r2;\n L_0x008d:\n return r1;\n L_0x008e:\n r8 = move-exception;\n L_0x008f:\n r1 = r10;\n L_0x0090:\n com.taobao.sophix.e.b.a(r1);\n com.taobao.sophix.e.b.a(r3);\n com.taobao.sophix.e.b.a(r9);\n throw r8;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.taobao.sophix.e.a.a(java.io.File, java.lang.String, java.lang.String):java.io.File\");\n }", "private static void crypting(boolean encrypt, String filename, String cryptedFilename) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tSystem.out.println(\"Please provide password as hex-encoded text (16 bytes, i.e. 32 hex-digits): \");\n\t\tSystem.out.print(\">\");\n\t\tString keyText = sc.nextLine();\n\n\t\tSystem.out.println(\"Please provide initialization vector as hex-encoded text (32 hex-digits): \");\n\t\tSystem.out.print(\">\");\n\t\tString ivText = sc.nextLine();\n\t\tsc.close();\n\n\t\tSecretKeySpec keySpec = new SecretKeySpec(Util.hextobyte(keyText), \"AES\");\n\t\tAlgorithmParameterSpec paramSpec = new IvParameterSpec(Util.hextobyte(ivText));\n\t\tCipher cipher = null;\n\n\t\ttry {\n\t\t\tcipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n\t\t\tcipher.init(encrypt ? Cipher.ENCRYPT_MODE : Cipher.DECRYPT_MODE, keySpec, paramSpec);\n\n\t\t} catch (NoSuchAlgorithmException | NoSuchPaddingException exc) {\n\t\t\tSystem.out.println(\"Transformation is in invalid format or contains padding scheme that is unavailable. \");\n\t\t\tSystem.exit(1);\n\t\t} catch (InvalidKeyException | InvalidAlgorithmParameterException exc) {\n\t\t\tSystem.out.println(\"Given key or algorithm is invalid for this cipher.\");\n\t\t\tSystem.exit(1);\n\n\t\t}\n\n\t\ttry (InputStream inputStream = new BufferedInputStream(new FileInputStream(filename));\n\t\t\t\tOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(cryptedFilename))) {\n\n\t\t\tint nRead;\n\t\t\tbyte[] buffer = new byte[4096];\n\t\t\tbyte[] inputfile = null;\n\n\t\t\twhile ((nRead = inputStream.read(buffer, 0, buffer.length)) != -1) {\n\t\t\t\tinputfile = cipher.update(buffer, 0, nRead);\n\t\t\t\toutputStream.write(inputfile);\n\t\t\t}\n\n\t\t\tinputfile = cipher.doFinal();\n\t\t\toutputStream.write(inputfile);\n\n\t\t} catch (FileNotFoundException exc) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"File does not exist, is a directory rather than a regular file, or cannot be opened for reading because of some other reason. \");\n\t\t\tSystem.exit(1);\n\n\t\t} catch (IOException exc) {\n\t\t\tSystem.out.println(\"Input stream couldn't be initialized.\");\n\t\t\tSystem.exit(1);\n\n\t\t} catch (IllegalBlockSizeException | BadPaddingException e) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"Encryption algorithm is unable to process the input data provided or the decrypted data is not bounded by the appropriate padding bytes. \");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\tif (encrypt) {\n\t\t\tSystem.out.printf(\"Encryption completed. Generated file %s based on file %s.\\n\", cryptedFilename, filename);\n\t\t} else {\n\t\t\tSystem.out.printf(\"Decryption completed. Generated file %s based on file %s.\\n\", cryptedFilename, filename);\n\t\t}\n\n\t}", "public void runDecrypt(String filePath) {\n try {\n byte[] paramArrayOfbyte = Files.readAllBytes(Paths.get(filePath));\n if (paramArrayOfbyte.length >= 1024 && ((paramArrayOfbyte[0] == 73 && paramArrayOfbyte[1] == 71\n && paramArrayOfbyte[2] == 69 && paramArrayOfbyte[3] == 70)\n || (paramArrayOfbyte[0] == 67 && paramArrayOfbyte[1] == 68 && paramArrayOfbyte[2] == 69\n && paramArrayOfbyte[3] == 70))) {\n // TODO: figure out why it only selects 1024 bytes.\n if (paramArrayOfbyte.length != 1024) {\n byte[] arrayOfByte = new byte[1024];\n System.arraycopy(paramArrayOfbyte, 0, arrayOfByte, 0, 1024);\n paramArrayOfbyte = arrayOfByte;\n }\n\n // Not sure why needing this section?\n byte[] arrayOfByte1 = new byte[12];\n byte[] arrayOfByte2 = new byte[12];\n System.arraycopy(paramArrayOfbyte, 4, arrayOfByte1, 0, 12);\n System.arraycopy(paramArrayOfbyte, 16, arrayOfByte2, 0, 12);\n\n // Init the most important object.\n com.b.a.b.aa.a h = new com.b.a.b.aa.a(new com.b.a.b.aa.b() {\n public byte[] a() {\n return null;\n }\n\n public int b() {\n return 3;\n }\n });\n\n String str1 = (new String(paramArrayOfbyte, 28, 32)).intern();\n // String str2 = a.a(this.n, str1);\n String str2 = Decrypt.DECRYPTION_KEY;\n int i = h.a(str2.getBytes());\n byte[] guessResult = h.b();\n h.b(guessResult); // Digest, this also sets com.b.a.a.aa.a.b. (The hashmap)\n if (i != 0)\n System.out.println(Dumper.dump(h.a(i)));\n else\n System.out.println(\"error in i.\");\n\n // Using the official file reader.\n net.zamasoft.reader.book.a.b randomAccessFile = new net.zamasoft.reader.book.a.b(new File(filePath));\n System.out.println(\"file length: \" + randomAccessFile.length());\n System.out.println(\"key: \" + com.b.a.a.a.c.a.getBLatest());\n ArrayList<Byte> bytes = new ArrayList<>();\n while (!randomAccessFile.isEOF()) {\n byte b = (byte) randomAccessFile.read();\n bytes.add(b);\n }\n assert randomAccessFile.length() == bytes.size();\n byte[] bs = new byte[bytes.size()];\n for (int ii = 0; ii < bs.length; ii++) {\n bs[ii] = bytes.get(ii);\n }\n System.out.println(\"bytes length: \" + bytes.size());\n System.out.println(new String(bs, \"utf-8\"));\n } else {\n System.out.println(\"NOOOOOOOO!\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "private void encryptionAlgorithm() {\n\t\ttry {\n\t\t\t\n\t\t\tFileInputStream fileInputStream2=new FileInputStream(\"D:\\\\program\\\\key.txt\");\n\t\t\tchar key=(char)fileInputStream2.read();\n\t\t\tSystem.out.println(key);\n\t\t\tFileInputStream fileInputStream1=new FileInputStream(\"D:\\\\program\\\\message.txt\");\n\t\t\tint i=0;\n\t\t\t\n\t\t\tStringBuilder message=new StringBuilder();\n\t\t\twhile((i= fileInputStream1.read())!= -1 )\n\t\t\t{\n\t\t\t\tmessage.append((char)i);\n\t\t\t}\n\t\t\tString s=message.toString();\n\t\t\tchar[] letters=new char[s.length()];\n\t\t\tStringBuilder en=new StringBuilder();\n\t\t\tfor(int j = 0;j < letters.length;j++)\n\t\t\t{\n\t\t\t\ten.append((char)(byte)letters[j]+key);\n\t\t\t}\t\t\n\t\t\tFileOutputStream fileoutput=new FileOutputStream(\"D:\\\\program\\\\encryptedfile.txt\");\n\t\t\t\n\t\t\tfileInputStream1.close();\n\t\t\tfileInputStream2.close();\n\t\t\t\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t\n\t}", "OutputFile encryptingOutputFile();", "public interface IFileCrypter\n{\n\tpublic void encrypt( int pPartNumber , byte[] pData , int pOffset , int pLength );\n\t\n\tpublic void decrypt( int pPartNumber , byte[] pData , int pOffset , int pLength );\n}", "public static void encrypt() throws IOException{\n\t\tBufferedInputStream in = new BufferedInputStream(new FileInputStream(inFilename));\n\t\tBufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(outFilename));\n\n\t\tSecureRandom randomGen = new SecureRandom(); //used for the salt and the padding\n\t\tbyte[] key; //holds the encryption key\n\n\t\t//get the file length\n\t\tlong fileLength = (new File(inFilename)).length();\n\n\t\t//write the file header marker\n\t\tout.write(FILE_HEADER);\n\n\t\t/* STAGE 1 - generate encryption key */\n\t\t//find the number of bytes we have to pad and write it to the file\n\t\tint numPad;\n\t\tif (fileLength % 8 == 0)\n\t\t\tnumPad = 0;\n\t\telse\n\t\t\tnumPad = (int)(8 - (fileLength % 8));\n\t\tout.write(numPad);\n\t\t//generate a 128-byte random salt and write it to the file\n\t\tbyte[] salt = new byte[128];\n\t\trandomGen.nextBytes(salt);\n\t\tout.write(salt);\n\t\t//generate the message for CubeHash: (password + #padded bits + random salt)\n\t\tbyte[] message = new byte[password.length + 1 + salt.length];\n\t\tSystem.arraycopy(password, 0, message, 0, password.length); //add the password\n\t\tmessage[password.length] = (byte)numPad; //add #padded bits\n\t\tSystem.arraycopy(salt, 0, message, password.length + 1, salt.length); //add random salt\n\t\t//finally, generate the encryption key\n\t\tkey = CryptoLib.CubeHash.doCubeHash(message);\n\n\t\t/* STAGE 2 - apply encryption */\n\t\tint currPiece = 0; //keeps track of which piece of the key is being used\n\t\tbyte[] currData = new byte[8]; //holds the piece of data currently being encrypted\n\n\t\t//split the key into 4 pieces of 128 bits each\n\t\tbyte[][] keyPieces = new byte[4][16];\n\t\tfor (int i = 0; i < 4; i++){\n\t\t\tSystem.arraycopy(key, i*16, keyPieces[i], 0, 16);\n\t\t}\n\n\t\t//loop through the file (except the last block), 8 bytes at a time\n\t\tfor (long i = 0; i < fileLength - 8; i += 8){\n\t\t\t//put a chunk of data in currData\n\t\t\tin.read(currData);\n\n\t\t\t//do TEA(key, RC4(key, data)), then write to file\n\t\t\tout.write(CryptoLib.TEA.doTEA(keyPieces[currPiece],\n\t\t\t\t\t\tCryptoLib.RC4.doRC4(keyPieces[currPiece], currData)));\n\n\t\t\t//increment currPiece\n\t\t\tcurrPiece = (currPiece + 1) % 4;\n\t\t}\n\n\t\t//deal with the last block of data:\n\t\t//first, read it..\n\t\tin.read(currData);\n\t\t//..pad it with random data..\n\t\tfor (int i = 7; i >= (8 - numPad); i--){\n\t\t\tcurrData[i] = (byte)randomGen.nextInt();\n\t\t}\n\t\t//..then encrypt it\n\t\tout.write(CryptoLib.TEA.doTEA(keyPieces[currPiece],\n\t\t\t\t\tCryptoLib.RC4.doRC4(keyPieces[currPiece], currData)));\n\n\t\t/* STAGE 3 - done! */\n\t\tin.close();\n\t\tout.close();\n\t\tSystem.out.println(\"\\nEncryption complete.\");\n\t}", "private void encryptFile() {\r\n\t\tisEncryptComplete = false;\r\n\t\tlogger.encryStart = System.currentTimeMillis();\r\n\t\tif(file == null || !file.exists())\r\n\t\t\treturn;\r\n\t\t\r\n\t\tMDFSEncoder encoder = new MDFSEncoder(file, n1, n2, k1, k2);\r\n\t\t/*\r\n\t\t * n1=4;n2=4;k1=3;k2=4; MDFSEncoder encoder = new MDFSEncoder(file, 4,\r\n\t\t * 4, 3, 2);\r\n\t\t */\r\n\t\tif (!encoder.encode()) {\r\n\t\t\tlistener.onError(\"File Encryption Failed\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tlogger.encryStop = System.currentTimeMillis();\r\n\t\tList<FragmentInfo> fragInfos = encoder.getFileFragments();\r\n\t\tkeyShares = encoder.getKeyShares();\r\n\r\n\t\t// Store the file fragments in local SDCard\r\n\t\tFile fragsDir = AndroidIOUtils.getExternalFile(Constants.DIR_ROOT + \"/\"\r\n\t\t\t\t+ MDFSFileInfo.getDirName(file.getName(), file.lastModified()));\r\n\r\n\t\tMDFSDirectory directory = serviceHelper.getDirectory();\r\n\t\t// Create file fragments\r\n\t\tfor (FragmentInfo frag : fragInfos) {\r\n\t\t\tFile tmp = IOUtilities.createNewFile(fragsDir, frag.getFileName()\r\n\t\t\t\t\t+ \"__frag__\" + frag.getFragmentNumber());\r\n\t\t\tif (IOUtilities.writeObjectToFile(frag, tmp)) {\r\n\t\t\t\tdirectory.addFileFragment(file.lastModified(),\r\n\t\t\t\t\t\tfrag.getFragmentNumber());\r\n\t\t\t}\r\n\t\t}\r\n\t\tlistener.statusUpdate(\"Encryption Complete\");\r\n\t\tisEncryptComplete = true;\r\n\t\tdistributeFragments();\r\n\t}", "public static void main(String[] args) \r\n {\r\n /*\r\n String data = \"This is a very important statement.\";\r\n String key = \"How old is my computer?\";\r\n KeyGenerator kGen = new KeyGenerator(key);\r\n String nK = kGen.getNumericKey();\r\n \r\n ArmstrongManager aMgr = new ArmstrongManager(nK);\r\n ColorManager cMgr = new ColorManager(nK);\r\n \r\n String encData =\"\";\r\n int temp;\r\n int i;\r\n for(i =0 ; i < data.length(); i++)\r\n {\r\n temp = aMgr.encrypt(data.charAt(i));\r\n temp = cMgr.encrypt(temp);\r\n encData = encData + (char)temp;\r\n }\r\n \r\n String decData= \"\";\r\n for(i =0 ; i < encData.length(); i++)\r\n {\r\n temp = cMgr.decrypt(encData.charAt(i));\r\n temp = aMgr.decrypt(temp);\r\n \r\n decData = decData + (char)temp;\r\n }\r\n \r\n \r\n System.out.println(\"data: \"+ data + \" \" + data.length());\r\n System.out.println(\"enc data: \"+ encData + \" \" + encData.length());\r\n System.out.println(\"dec data: \"+ decData + \" \" + decData.length());\r\n */\r\n \r\n try\r\n {\r\n //String src = \"d:/a.txt\";//images/kids.jpg\";\r\n //String enc = \"d:/e_a.txt\";//images/e_kids.jpg\";\r\n //String dec = \"d:/d_a.txt\";//images/d_kids.jpg\";\r\n String src = \"d:/images/kids.jpg\";\r\n String enc = \"d:/images/e_kids.jpg\";\r\n String dec = \"d:/images/d_kids.jpg\";\r\n\r\n String key = \"How old is my computer?\";\r\n\r\n Encryptor objEnc = new Encryptor(key);\r\n Decryptor objDec = new Decryptor(key);\r\n\r\n objEnc.encrypt(src, enc);\r\n System.out.println(\"Encryption Done\");\r\n \r\n objDec.decrypt(enc, dec);\r\n System.out.println(\"Decryption Done\");\r\n \r\n\r\n }\r\n catch(Exception ex)\r\n {\r\n System.out.println(\"Err: \" +ex.getMessage());\r\n }\r\n }", "public static void main(String[] args) throws Exception {\n String dataToEncrypt, key1, key2;\n byte[] keyBytes;\n int cryptoMode, algorithm;\n try {\n cryptoMode = ENCRYPT_MODE;//Integer.valueOf(args[0]);\n algorithm = T3DES_ALGORITHM;// Integer.valueOf(args[1]);\n dataToEncrypt = \"0433646FD6976AAF\";//args[2];\n key1 = \"ADB876C4FF8A187D372B42A4A7B693F8\";//args[3];\n try {\n key2 = args[4];\n keyBytes = ConvertUtils.XORToBytes(key1, key2);\n System.out.println(\"Two keys supplied, using two keys...\");\n } catch (ArrayIndexOutOfBoundsException ex) {\n keyBytes = ConvertUtils.hexToBytes(key1);\n System.out.println(\"One key supplied, using one key...\");\n }\n\n } catch (ArrayIndexOutOfBoundsException ex) {//D64F31B0C96128CC\n System.out.println(\"Usage: \\n1. java KeyGen cryptionMode algorithm dataToEncrypt key1InHEX\\t or \\n. java KeyGen dataToEncrypt key1InHEX keyInHEX\");\n return;\n }\n \n Cryptor encryptor, decryptor;\n \n encryptor = new Cryptor(T3DES_ALGORITHM, ENCRYPT_MODE);\n System.out.println(\"Key passed in\\t\"+ConvertUtils.bytesToHex(keyBytes));\n encryptor.processData(keyBytes, ConvertUtils.hexToBytes(dataToEncrypt));\n\n decryptor = new Cryptor(T3DES_ALGORITHM, DECRYPT_MODE);\n decryptor.processData(keyBytes, ConvertUtils.hexToBytes(encryptor.getResult()));\n decryptor.getResult();\n }", "public static void main(String[] args)\n\t\t\tthrows FileNotFoundException, IOException {\n\t\tFileReader reader=new FileReader();\n\t\tEncryptDencrypt enDencrypt=new EncryptDencrypt();\n\t\tFileWriter writer=new FileWriter();\n\t\t\n\t\tSystem.out.println(\"加密文件:\");\n\t\tString plainStr=reader.read(\"src.txt\");\n\t\tString encryptStr=enDencrypt.encrypt(plainStr);\n\t\twriter.write(encryptStr, \"desprotype.txt\");\n\t\t\n\t\tSystem.out.println(\"解密文件:\");\n\t\tString enStr=reader.read(\"desprotype.txt\");\n\t\tString proStr=enDencrypt.deencrypyt(enStr);\n\t\twriter.write(proStr, \"srcprotype.txt\");\n\t}", "public void opentextfile(String path1)\n {\n FileInputStream fin,fin1;\n \tint i,j=0;\n String s=JOptionPane.showInputDialog(this,\"Enter key with 16 letters\");\n char ch[]=new char[s.length()];\n ch=s.toCharArray();\n try\n {\n FileOutputStream f=new FileOutputStream(\"key1.txt\");\n for(i=0;i<ch.length;i++)\n f.write(ch[i]);\n f.close();\n ideaalgo a=new ideaalgo(path1);\n a.procedure();\n a.encrypt();\n BufferedReader d;\n StringBuffer sb=new StringBuffer();\n d=new BufferedReader(new FileReader(path1));\n String line;\n while((line=d.readLine())!=null)\n sb.append(line+\"\\n\");\n ta.setText(sb.toString());\n d.close();\n fin=new FileInputStream(\"enc.txt\");\n do\n \t {\n\t i=fin.read();\n \t if(i!=-1)\n \t\t{\n bytes[j++]=i;\n }\n } while(i!=-1);\n max=j;\n fin.close();\n binarycon();\n }\n catch(Exception e)\n {\n System.out.println(e);\n }\n }", "public static void encryptFile(File in, File out, Key pubKey) throws Exception {\n FileInputStream fin;\n FileOutputStream fout;\n int nread = 0; \n byte[] inbuf = new byte[1024];\n fout = new FileOutputStream(out);\n fin = new FileInputStream(in);\n\n SecureRandom random = new SecureRandom();\n // symmetric wrapping\n Key sKey = createKeyForAES(Config.SYM_CRYPTO_STR, random);\n IvParameterSpec sIvSpec = createCtrIvForAES(0, random);\n\n // encrypt symmetric key with RSA/pub key\n Cipher xCipher = Cipher.getInstance(Config.RSA_INSTANCE);\n xCipher.init(Cipher.ENCRYPT_MODE, pubKey, random);\n byte[] keyBlock = xCipher.doFinal(packKeyAndIv(sKey, sIvSpec));\n\n fout.write(keyBlock);\n\n // encrypt data with symmetric key\n Cipher sCipher = Cipher.getInstance(Config.AES_INSTANCE);\n sCipher.init(Cipher.ENCRYPT_MODE, sKey, sIvSpec);\n\n // Now read our file and encrypt it.\n while((nread = fin.read(inbuf)) > 0) {\n fout.write(sCipher.update(inbuf, 0, nread)); // cannot be null, by construction\n }\n // NB doFinal() cannot return null, but can return a zero-length array, which is benign below.\n fout.write(sCipher.doFinal());\n\n fout.flush();\n fin.close();\n fout.close();\n}", "public static void main(String[] args) throws Exception {\n\n String inFile = args[0];\n String outFile = args[1];\n\n CryptoEngine cryptoEngine = new CryptoEngine(inFile, outFile);\n cryptoEngine.encrypt();\n cryptoEngine.decrypt();\n }", "private static AlgorithmParameters fileEncryption(File fileToEncrypt, SecretKey symmetricKey, File fileAfterEncrypt)\n\t{\n\t\tCipherOutputStream cipherOutputStream = null;\n\t\tAlgorithmParameters algoParams = null;\n\t\tCipher cipher;\n\n\t\ttry\n\t\t{\n\t\t\tif (inputProviderForFile.equals(\"non\"))\n\t\t\t{\n\t\t\t\tcipher = Cipher.getInstance(inputAlgorithmForFileEncryption + \"/\" + inputAlgorithmMode + \"/\" + inputAlgorithmPadding);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcipher = Cipher.getInstance(inputAlgorithmForFileEncryption + \"/\" + inputAlgorithmMode + \"/\" + inputAlgorithmPadding, inputProviderForFile);\n\t\t\t}\n\t\t\tif (cipher != null && symmetricKey != null)\n\t\t\t{\n\t\t\t\tcipher.init(Cipher.ENCRYPT_MODE, symmetricKey);\n\t\t\t\tcipherOutputStream = new CipherOutputStream(new FileOutputStream(fileAfterEncrypt), cipher);\n\t\t\t\tPath path = Paths.get(fileToEncrypt.getPath());\n\t\t\t\tbyte[] dataFromFile = Files.readAllBytes(path);\n\t\t\t\tcipherOutputStream.write(dataFromFile);\n\t\t\t\talgoParams = cipher.getParameters();\n\t\t\t}\n\t\t} catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException | IOException | NoSuchProviderException e2)\n\t\t{\n\t\t\te2.printStackTrace();\n\t\t} finally\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (cipherOutputStream != null)\n\t\t\t\t{\n\t\t\t\t\tcipherOutputStream.flush();\n\t\t\t\t\tcipherOutputStream.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\treturn algoParams;\n\t}", "public static boolean a(java.lang.String r7, java.lang.String r8) {\n /*\n r0 = new java.io.File;\n r0.<init>(r7);\n r7 = 0;\n r1 = 0;\n r2 = r0.getName();\t Catch:{ Exception -> 0x0078, all -> 0x0074 }\n r3 = \".ldecrypt\";\n r4 = r0.getParentFile();\t Catch:{ Exception -> 0x0078, all -> 0x0074 }\n r2 = java.io.File.createTempFile(r2, r3, r4);\t Catch:{ Exception -> 0x0078, all -> 0x0074 }\n r3 = \"AES/ECB/PKCS5Padding\";\n r3 = javax.crypto.Cipher.getInstance(r3);\t Catch:{ Exception -> 0x0071, all -> 0x0074 }\n r4 = new javax.crypto.spec.SecretKeySpec;\t Catch:{ Exception -> 0x0071, all -> 0x0074 }\n r5 = \"UTF-8\";\n r8 = r8.getBytes(r5);\t Catch:{ Exception -> 0x0071, all -> 0x0074 }\n r5 = \"AES\";\n r4.<init>(r8, r5);\t Catch:{ Exception -> 0x0071, all -> 0x0074 }\n r8 = 2;\n r5 = new java.security.SecureRandom;\t Catch:{ Exception -> 0x0071, all -> 0x0074 }\n r5.<init>();\t Catch:{ Exception -> 0x0071, all -> 0x0074 }\n r3.init(r8, r4, r5);\t Catch:{ Exception -> 0x0071, all -> 0x0074 }\n r8 = new java.io.FileInputStream;\t Catch:{ Exception -> 0x0071, all -> 0x0074 }\n r8.<init>(r0);\t Catch:{ Exception -> 0x0071, all -> 0x0074 }\n r4 = new javax.crypto.CipherInputStream;\t Catch:{ Exception -> 0x006c, all -> 0x0067 }\n r4.<init>(r8, r3);\t Catch:{ Exception -> 0x006c, all -> 0x0067 }\n r3 = new java.io.FileOutputStream;\t Catch:{ Exception -> 0x0064, all -> 0x0061 }\n r3.<init>(r2);\t Catch:{ Exception -> 0x0064, all -> 0x0061 }\n r1 = 1024; // 0x400 float:1.435E-42 double:5.06E-321;\n r1 = new byte[r1];\t Catch:{ Exception -> 0x005f, all -> 0x005d }\n L_0x0044:\n r5 = r4.read(r1);\t Catch:{ Exception -> 0x005f, all -> 0x005d }\n r6 = -1;\n if (r5 == r6) goto L_0x004f;\n L_0x004b:\n r3.write(r1, r7, r5);\t Catch:{ Exception -> 0x005f, all -> 0x005d }\n goto L_0x0044;\n L_0x004f:\n r0 = r2.renameTo(r0);\t Catch:{ Exception -> 0x005f, all -> 0x005d }\n com.taobao.sophix.e.b.a(r8);\n com.taobao.sophix.e.b.a(r4);\n com.taobao.sophix.e.b.a(r3);\n return r0;\n L_0x005d:\n r7 = move-exception;\n goto L_0x006a;\n L_0x005f:\n r0 = move-exception;\n goto L_0x006f;\n L_0x0061:\n r7 = move-exception;\n r3 = r1;\n goto L_0x006a;\n L_0x0064:\n r0 = move-exception;\n r3 = r1;\n goto L_0x006f;\n L_0x0067:\n r7 = move-exception;\n r3 = r1;\n r4 = r3;\n L_0x006a:\n r1 = r8;\n goto L_0x0097;\n L_0x006c:\n r0 = move-exception;\n r3 = r1;\n r4 = r3;\n L_0x006f:\n r1 = r8;\n goto L_0x007c;\n L_0x0071:\n r0 = move-exception;\n r3 = r1;\n goto L_0x007b;\n L_0x0074:\n r7 = move-exception;\n r3 = r1;\n r4 = r3;\n goto L_0x0097;\n L_0x0078:\n r0 = move-exception;\n r2 = r1;\n r3 = r2;\n L_0x007b:\n r4 = r3;\n L_0x007c:\n if (r2 == 0) goto L_0x0084;\n L_0x007e:\n r2.delete();\t Catch:{ all -> 0x0082 }\n goto L_0x0084;\n L_0x0082:\n r7 = move-exception;\n goto L_0x0097;\n L_0x0084:\n r8 = \"DecryptUtils\";\n r2 = \"aesDecrypt\";\n r5 = new java.lang.Object[r7];\t Catch:{ all -> 0x0082 }\n com.taobao.sophix.e.d.b(r8, r2, r0, r5);\t Catch:{ all -> 0x0082 }\n com.taobao.sophix.e.b.a(r1);\n com.taobao.sophix.e.b.a(r4);\n com.taobao.sophix.e.b.a(r3);\n return r7;\n L_0x0097:\n com.taobao.sophix.e.b.a(r1);\n com.taobao.sophix.e.b.a(r4);\n com.taobao.sophix.e.b.a(r3);\n throw r7;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.taobao.sophix.e.a.a(java.lang.String, java.lang.String):boolean\");\n }", "public static void decrypt() throws IOException{\n\t\tBufferedInputStream in = new BufferedInputStream(new FileInputStream(inFilename));\n\t\tBufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(outFilename));\n\n\t\tbyte[] key; //holds the encryption key\n\n\t\t//get the file length\n\t\tlong fileLength = (new File(inFilename)).length();\n\n\t\t//check the file header marker\n\t\tbyte[] actualHeader = new byte[FILE_HEADER.length];\n\t\tin.read(actualHeader); //read header from the file\n\t\tif (!Arrays.equals(actualHeader, FILE_HEADER)){\n\t\t\tSystem.out.println(\"The file was not encrypted with this program.\");\n\t\t\tSystem.exit(-1); //-1 is an error code\n\t\t}\n\n\t\t/* STAGE 1 - generate decryption key */\n\t\t//read the #padded bits and random salt from the file\n\t\tbyte[] dataFromFile = new byte[129]; //1 byte for #padded bits + 128 bytes for salt\n\t\tin.read(dataFromFile);\n\t\t//separate the #padded bits for use later\n\t\tint numPad = (int)(dataFromFile[0]);\n\t\t//next, generate the message for CubeHash: (password + dataFromFile)\n\t\tbyte[] message = new byte[password.length + dataFromFile.length];\n\t\tSystem.arraycopy(password, 0, message, 0, password.length); //add the password\n\t\tSystem.arraycopy(dataFromFile, 0, message, password.length, dataFromFile.length); //add dataFromFile\n\t\t//finally, (re)generate the encryption key\n\t\tkey = CryptoLib.CubeHash.doCubeHash(message);\n\n\t\t/* STAGE 2 - apply decryption */\n\t\tint currPiece = 0; //keeps track of which piece of the key is being used\n\t\tbyte[] currData = new byte[8]; //holds the data currently being decrypted\n\n\t\t//split the key into 4 pieces of 128 bits each\n\t\tbyte[][] keyPieces = new byte[4][16];\n\t\tfor (int i = 0; i < 4; i++){\n\t\t\tSystem.arraycopy(key, i*16, keyPieces[i], 0, 16);\n\t\t}\n\n\t\t//loop through the rest of the file (except the last block), 8 bytes at a time\n\t\tfor (long i = FILE_HEADER.length + 129; i < fileLength - 8; i += 8){\n\t\t\t//put a chunk of data in currData\n\t\t\tin.read(currData);\n\n\t\t\t//do RC4(key, unTEA(key, data)), then write to file\n\t\t\tout.write(CryptoLib.RC4.doRC4(keyPieces[currPiece],\n\t\t\t\t\t\tCryptoLib.TEA.doUnTEA(keyPieces[currPiece], currData)));\n\n\t\t\t//increment currPiece\n\t\t\tcurrPiece = (currPiece + 1) % 4;\n\t\t}\n\n\t\t//deal with the last chunk of data:\n\t\t//first, read it..\n\t\tin.read(currData);\n\t\t//..decrypt it..\n\t\tcurrData = CryptoLib.RC4.doRC4(keyPieces[currPiece],\n\t\t\t\tCryptoLib.TEA.doUnTEA(keyPieces[currPiece], currData));\n\t\t//..then write it to the file\n\t\tout.write(currData, 0, (8 - numPad));\n\n\t\t/* STAGE 3 - done! */\n\t\tin.close();\n\t\tout.close();\n\t\tSystem.out.println(\"\\nDecryption complete.\");\n\t}", "public static void main(String[] args) {\n\t\tDesFunctionClass obj=new DesFunctionClass();\n\n\t\tScanner chscanner =new Scanner(System.in);\t\t\n\n\t\twhile(flag){\n\t\t\tSystem.out.println(\"\\n===============================================================\\n 1.ENCRYPT a file \\t 2.DECRYPT a file \\t 3.Exit Program\\n===============================================================\");\n\t\t \tSystem.out.println(\"Enter Your Choice:\\t\");\n\t\t \t\tif(chscanner.hasNextInt())\n\t\t\t \tch=chscanner.nextInt();\n\t\t \tswitch(ch)\n\t\t \t{\n\t\t \tcase 1:\n\t\t \t\t//Checks infinitely for valid file type.\n\t\t \t\tdo {\n\t\t \t\tSystem.out.println(\"Enter Name of the File to be Encrypted(include path if outside):\");\n\t\t\t\t\tfilename=chscanner.next();\n\t\t\t\t\tfilename=filename.replaceAll(\"\\\\\\\\\", \"/\");\t\t//for windows dir scheme\n\t\t\t\t\tchk= HelperFunctions.check(filename);\n\t\t\t\t\t}while(chk!=1);\n\n\t\t \t\t//Checks for valid Directory type to store encrypted file.\n\t\t\t\t\tdo {\n\t\t\t\t\tSystem.out.println(\"Enter Name of Directory to store Encrypted file:\");\n\t\t\t\t\tdirname=chscanner.next();\n\t\t\t\t\tdirname=dirname.replaceAll(\"\\\\\\\\\", \"/\");\n\t\t\t\t\tchk= HelperFunctions.check(dirname);\n\t\t\t\t\t}while(chk!=2);\n\n\t\t\t\t\t//Takes Valid private input key of size>10\n\t\t\t\t\tdo{\n\t\t\t\t\tSystem.out.println(\"Enter Your Private Key (length>10):)\");\n\t\t\t\t\tDESKEY=chscanner.nextLine();\n\t\t\t\t\tif(DESKEY.length()<10)\n\t\t\t\t\t\tSystem.out.println(\"\\t\\t--Private Key Size should be > 10!--\");\n\t\t\t\t\t}while(DESKEY.length()<10);\n\t\t\t\t\n\t\t\t\t\tDESKEY= HelperFunctions.KeyGen(DESKEY);//generating random key from input key.\n\n\t\t\t\t\tBigInteger k=new BigInteger(DESKEY);\t//convert key from string type to BigInteger type\n\t\t\t\t\tBigInteger RSAKEY=RsaFunctionClass.EncDec(k, RsaFunctionClass.e,RsaFunctionClass.n);\t//RSA-Encryption of the DES-key\n\t\t\t\t\tString keyloc=RsaFunctionClass.WriteEncKey(RSAKEY, dirname, filename);\t//write encrypted key to file for further use\n\t\t\t\t\n\t\t\t\t\t//Encrypting the File using DESKEY and DES algorithm.\n\t\t\t\t\tobj.encrypt(filename,dirname,DESKEY);\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"\\nFile ENCRYPTED Successfully, Stored at\"+\"'\"+dirname+\"'\");\n\t\t\t\t\tSystem.out.println(\"ATTENTION! NOW Your Encrypted Private Key is:\"+RSAKEY+\"\\n\\tIt is Saved for You at '\"+keyloc+\"'\");\n\t\t \t\tbreak;\n\t\t \t\n\t\t \tcase 2:\n\t\t\t\t\t//Checks infinitely for valid file type.\n\t\t \t\tdo{\n\t\t\t\t\t\tSystem.out.println(\"Enter Name of the Encrypted File that is to be Decrypted(include path if outside):\");\n\t\t\t\t\t\tfilename=chscanner.next();\n\t\t\t\t\t\tfilename=filename.replaceAll(\"\\\\\\\\\", \"/\");\n\t\t\t\t\t\tchk= HelperFunctions.check(filename);\n\t\t\t\t\t\t}while(chk!=1);\n\n\t\t\t\t\t//Get Original Extension for Decryption\n\t\t\t\t\tSystem.out.println(\"Enter EXTENSION to which file is to be Decrypted(e.g txt,pdf,jpg,mp3,mp4,etc):\");\n\t\t\t\t\tString extname = chscanner.next();\n\t\t\t\t\textname=extname.substring(extname.lastIndexOf(\".\") + 1);\t//if user provided a '.' with extension\n\n\t\t\t\t\t//Checks for valid Directory type to store decrypted file.\n\t\t\t\t\tdo{\n\t\t\t\t\t\tSystem.out.println(\"Enter Name of Directory where Decrypted file will be Stored:\");\n\t\t\t\t\t\tdirname=chscanner.next();\n\t\t\t\t\t\tdirname=dirname.replaceAll(\"\\\\\\\\\", \"/\");\n\t\t\t\t\t\tchk= HelperFunctions.check(dirname);\n\t\t\t\t\t}while(chk!=2);\n\t\t\t\t\n\t\t\t\t\tString regex = \"[0-9]+\";//Regular Expression for string to make sure key contains only numbers\n\n\t\t\t\t\tdo{\n\t\t\t\t\t\tSystem.out.println(\"Enter Your Encrypted Private Key of the file:\");\n\t\t\t\t\t\tDESKEY=chscanner.next();\n\t\t\t\t\t\tif(DESKEY.length()<500||!(DESKEY.matches(regex)))\n\t\t\t\t\t\t\tSystem.out.println(\"\\t\\t--Encrypted-Key Size must be > 500 and Must only contain Numeric Values!\");\n\t\t\t\t\t}while((DESKEY.length()<500)||!(DESKEY.matches(regex)));\n\t\t\t\t\n\t\t\t\t\tBigInteger c=new BigInteger(DESKEY);//convert to BI\n\t\t\t\t\tBigInteger Deckey=RsaFunctionClass.EncDec(c, RsaFunctionClass.d,RsaFunctionClass.n);\t//UNHANDLED>> make regex seq for key in EncDec fxn\n\t\t\t\t\tDESKEY=Deckey.toString();\n\t\t\t\t\n\t\t\t\t\tobj.decrypt(filename,extname,dirname,DESKEY);\n\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"\\nFile DECRYPTED Successfully,' Stored at \"+\"'\"+dirname+\"'\");\n\t \t\t\tbreak;\n\t\t \t\t\n\t \t\t\tcase 3:\n\t\t \t\t\tflag=false;\n\t\t \t\t\tSystem.out.println(\"Good Bye!\");\n\t\t \t\t\tchscanner.close();\n\t\t \t\t\tbreak;\n\t\t \t\t\t\n\t\t\t\tdefault:\n\t \t\t\t\tSystem.out.println(\"No Such Option... Try Again!\");\n\t\t \t}\t\n\t\t}\t\n\t}", "public static void main(String[] args) {\n\t\tFileEncryptor fe = new FileEncryptor();\n\t\tfe.encryptMessage();\n\t}", "public void encrypt() throws Exception {\n\t\tLogWriter = new BufferedWriter(new FileWriter(localWorkingDirectoryPath + \"\\\\Log_Encryption.txt\"));\n\t\tFileOutputStream configurationFileOutputStream = null;\n\n\t\t// Loading the store with the giving arguments\n\t\twriteToLog(\"Step 1: Loading the store with the giving arguments\");\n\t\tloadStore();\n\n\t\t// Getting the receiver's public-key\n\t\twriteToLog(\"Step 2: Getting the receiver's public-key\");\n\t\tCertificate receiverCert = keyStore.getCertificate(receiverSelfSignedCertAlias);\n\t\tif (receiverCert == null) {\n\t\t\twriteToLog(\"The entered certificate alias: \\\"\" + receiverSelfSignedCertAlias\n\t\t\t\t\t+ \"\\\" dose not exist in the keys store.\");\n\t\t\tLogWriter.close();\n\t\t\tthrow new Exception(\"The entered certificate alias: \\\"\" + receiverSelfSignedCertAlias\n\t\t\t\t\t+ \"\\\" dose not exist in the keys store.\");\n\t\t}\n\t\tPublicKey receiverPublicKey = receiverCert.getPublicKey();\n\n\t\t// Getting my private key in order to generate a signature\n\t\twriteToLog(\"Step 3: Getting the encryptor's private-key\");\n\t\tPrivateKey myPrivateKey = getMyPrivateKey();\n\t\t\n\t\t// Generating a symmetric key\n\t\twriteToLog(\"Step 4: Generating a symmetric key\");\n\t\tKeyGenerator kg = KeyGenerator.getInstance(\"AES\");\n\t\tSecretKey semetricKey = kg.generateKey();\n\n\t\t// Generating a random IV\n\t\twriteToLog(\"Step 5: Generating a random IV\");\n\t\tbyte[] iv = generateRandomIV();\n\n\t\t// Initializing the cipher\n\t\twriteToLog(\"Step 6: Initilatzing the cipher Object\");\n\t\ttry {\n\t\t\tmyCipher = createCipher();\n\t\t\tmyCipher.init(Cipher.ENCRYPT_MODE, semetricKey, new IvParameterSpec(iv));\n\t\t}catch(Exception e) {\n\t\t\twriteToLog(\"Error While tring to Initializing the cipher with the giving arguments: \" + e.getMessage());\n\t\t\tLogWriter.close();\n\t\t\tthrow new Exception(\"Error: While tring to Initializing the cipher with the giving arguments\",e);\n\t\t}\n\t\t\n\n\t\t// Initializing the signature with my private-key\n\t\twriteToLog(\"Step 7: Initilatzing the signature Object with the encryptor's private-key\");\n\t\tSignature dataSigner = Signature.getInstance(\"SHA256withRSA\");\n\t\tdataSigner.initSign(myPrivateKey);\n\n\t\t// Encrypting\n\t\twriteToLog(\"Step 8: Encrypting... \");\n\t\tFile fileToEncrrypt = new File(fileToEncryptPath);\n\t\tencryptingData(fileToEncrrypt, dataSigner);\n\n\t\t// Signing on the encrypted data\n\t\twriteToLog(\"Step 9: Signing on the encrypted data \");\n\t\tbyte[] mySignature = dataSigner.sign();\n\n\t\t// Encrypt the symmetric key with the public of the receiver\n\t\twriteToLog(\"Step 10: Encrypt the symmetric key with the public of the receiver \");\n\t\tbyte[] encryptedSymmetricKey = encryptSymmetricKey(receiverPublicKey, semetricKey);\n\n\t\t// Saving the IV, Encrypted Symmetric-Key and Signature to the configurations file\n\t\twriteToLog(\"Step 11: Saving the IV, Encrypted Semetric-Key and Signature to the configurations file \");\n\t\tsavingToConfigurationsFile(configurationFileOutputStream, iv, encryptedSymmetricKey, mySignature);\n\n\t\tLogWriter.write(\"Encryption completed, No Errors Were Found\");\n\t\tLogWriter.close();\n\t}", "private static void encryptFile(String fileInput, String publicKeyFilename) throws Exception {\n\n\t\t// Load the public key bytes\n\t\tFileInputStream fis = new FileInputStream(publicKeyFilename);\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\n\t\tint theByte = 0;\n\t\twhile ((theByte = fis.read()) != -1) {\n\t\t\tbaos.write(theByte);\n\t\t}\n\t\tfis.close();\n\n\t\tbyte[] keyBytes = baos.toByteArray();\n\t\tbaos.close();\n\n\t\t// Turn the encoded key into a real RSA public key.\n\t\t// Public keys are encoded in X.509.\n\t\tX509EncodedKeySpec keySpec = new X509EncodedKeySpec(keyBytes);\n\t\tKeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n\t\tPublicKey publicKey = keyFactory.generatePublic(keySpec);\n\n\t\t// Open up an output file for the output of the encryption\n\t\tString fileOutput = fileInput + ENCRYPTED_FILENAME_SUFFIX;\n\t\tDataOutputStream output = new DataOutputStream(new FileOutputStream(fileOutput));\n\n\t\t// Create a cipher using that key to initialize it\n\t\tCipher rsaCipher = Cipher.getInstance(\"RSA/ECB/PKCS1Padding\");\n\t\trsaCipher.init(Cipher.ENCRYPT_MODE, publicKey);\n\n\t\t// Now create a new 256 bit Rijndael key to encrypt the file itself.\n\t\t// This will be the session key.\n\t\tKeyGenerator rijndaelKeyGenerator = KeyGenerator.getInstance(\"Rijndael\");\n\t\trijndaelKeyGenerator.init(256);\n\t\tSystem.out.println(\"Generating session key...\");\n\t\tKey rijndaelKey = rijndaelKeyGenerator.generateKey();\n\t\tSystem.out.println(\"Done generating key.\");\n\n\t\t// Encrypt the Rijndael key with the RSA cipher\n\t\t// and write it to the beginning of the file.\n\t\tbyte[] encodedKeyBytes = rsaCipher.doFinal(rijndaelKey.getEncoded());\n\t\toutput.writeInt(encodedKeyBytes.length);\n\t\toutput.write(encodedKeyBytes);\n\n\t\t// Now we need an Initialization Vector for the symmetric cipher in CBC mode\n\t\tSecureRandom random = new SecureRandom();\n\t\tbyte[] iv = new byte[16];\n\t\trandom.nextBytes(iv);\n\n\t\t// Write the IV out to the file.\n\t\toutput.write(iv);\n\t\tIvParameterSpec spec = new IvParameterSpec(iv);\n\n\t\t// Create the cipher for encrypting the file itself.\n\t\tCipher symmetricCipher = Cipher.getInstance(\"Rijndael/CBC/PKCS5Padding\");\n\t\tsymmetricCipher.init(Cipher.ENCRYPT_MODE, rijndaelKey, spec);\n\n\t\tCipherOutputStream cos = new CipherOutputStream(output, symmetricCipher);\n\n\t\tSystem.out.println(\"Encrypting the file...\");\n\n\t\tFileInputStream input = new FileInputStream(fileInput);\n\n\t\ttheByte = 0;\n\t\twhile ((theByte = input.read()) != -1) {\n\t\t\tcos.write(theByte);\n\t\t}\n\t\tinput.close();\n\t\tcos.close();\n\t\tSystem.out.println(\"File encrypted.\");\n\t\treturn;\n\t}", "private native void dll_encrypt(String path_in, String path_out, byte[] npub, byte[] key, int alg);", "Encryption encryption();", "public static void execEnkripsi(File fileTemp, String pathTempFileEncryptName, String pathEncryptedSecretKeyFile, String pemContent, SimpleDateFormat sdf, String outputFileNameZip) throws Exception{\n String secretKey=RandomStringUtils.randomAlphanumeric(16);\r\n System.out.println(\"Generated Secret Key :\"+secretKey);\r\n File exportedFile;\r\n CompressingUtils compressingUtils = new CompressingUtils();\r\n String tmpPlainZipped = lokasiHasil+\"/tmp\"+outputFileNameZip;\r\n List<File> lsFile = new ArrayList<>();\r\n lsFile.add(fileTemp);\r\n if(compressingUtils.createZipWithoutPassword(lsFile, tmpPlainZipped)){\r\n exportedFile = new File(tmpPlainZipped);\r\n //delete file awal yang telah dikompresi\r\n for(File dfile : lsFile){\r\n dfile.delete();\r\n }\r\n }else{\r\n throw new Exception(\"gagal melakukan kompresi file\");\r\n }\r\n System.out.println(\"file kompresi berhasil dibuat \"+ outputFileNameZip);\r\n\r\n /*Step 3 : enkripsi file dengan kunci acak */\r\n System.out.println(\"Step 3 : enkripsi file dengan kunci acak\");\r\n\r\n\r\n String fileOutputEcnryptedname = lokasiHasil+\"/\"+outputFileNameZip;\r\n\r\n File tempFileEncryptName = new File(pathTempFileEncryptName);\r\n try {\r\n CryptoUtils.encrypt(secretKey, exportedFile, tempFileEncryptName);\r\n } catch (CryptoException e) {\r\n throw new Exception(\"Enkripsi file gagal : \" + e.getMessage());\r\n }\r\n\r\n EncryptionUtils utils = new EncryptionUtils();\r\n PublicKey publicKey = utils.getPublicKeyFromX509(pemContent);\r\n\r\n /*Step 4 : Enkripsi kunci acak dengan public key dari DJP*/\r\n System.out.println(\"Step 4 : enkripsi kunci acak dengan public key dari DJP\");\r\n\r\n String encryptedSecretKey;\r\n try{\r\n encryptedSecretKey = CryptoUtils.encrypt(secretKey, publicKey);\r\n }catch (CryptoException e) {\r\n throw new Exception(\"Enkripsi kunci gagal : \" + e.getMessage());\r\n }\r\n File encryptedSecretKeyFile = new File(pathEncryptedSecretKeyFile);\r\n try {\r\n FileOutputStream outputStream = new FileOutputStream(encryptedSecretKeyFile);\r\n outputStream.write(encryptedSecretKey.getBytes());\r\n outputStream.close();\r\n }catch (FileNotFoundException e){\r\n throw new Exception(\"kunci yang dienkripsi tidak ditemukan : \" + pathEncryptedSecretKeyFile);\r\n } catch (IOException e) {\r\n throw new Exception(\"gagal membentuk kunci enkripsi\");\r\n }\r\n\r\n /*Step 5: Compress data dan key kedalam file zip dan menjadi hasil akhir*/\r\n System.out.println(\"Step 5: Compress enkripsi file dan kunci kedalam file zip\");\r\n\r\n List<File> listFiles = new ArrayList<File>();\r\n listFiles.add(tempFileEncryptName);\r\n listFiles.add(encryptedSecretKeyFile);\r\n\r\n if(listFiles.size() != 2){\r\n for (File file : listFiles) {\r\n file.delete();\r\n }\r\n throw new Exception(\"file enkripsi dan/atau key enkripsi salah satunya tidak ada\");\r\n }\r\n\r\n compressingUtils = new CompressingUtils();\r\n if (compressingUtils.createZip(listFiles, fileOutputEcnryptedname)) {\r\n /*Step 6 : hapus file data dan key, hasil dari step 3 dan 4 */\r\n System.out.println(\"Step 6 : hapus file data dan key, hasil dari step 3 dan 4\");\r\n\r\n for (File file : listFiles) {\r\n file.delete();\r\n }\r\n /*Step 7: hapus file zip, hasil dari step 2 */\r\n System.out.println(\"Step 7: hapus file zip, hasil dari step 2\");\r\n\r\n exportedFile.delete();\r\n }\r\n\r\n System.out.println(\"Proses enkripsi selesai, nama file : \" + fileOutputEcnryptedname);\r\n }", "public void jiemi(String pathin, String pathout) {\n\t\ttry {\n\t\t\tRuntime.getRuntime().exec(new String[]{\"openssl\",\"enc\", \"-d\",\"-aes-128-cbc\", \"-in\",pathin,\"-out\",pathout,\"-k\",\"123abc\"});\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tSystem.out.println(\"-------------------jiemi end------------------------\");\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "@Test\r\n\tpublic void testSimple() throws IOException, URISyntaxException, IllegalKeyException{\r\n\t\tbyte data [] = {97,98,99,100};\r\n\t\tbyte [] keys = {50};\r\n\t\tEncryptionDecryptionManager man = new AlgoritemManaging();\r\n\t\tCaesarEncryption ce = new CaesarEncryption(man);\r\n\t\tbyte[] encData = ce.Encrypt(keys,data);\r\n\t\t\r\n\t\tCaesarDecryption c = new CaesarDecryption(man);\r\n\t\tbyte[] decData = c.Decrypt(keys,encData);\r\n\t\tassert decData [0] == (byte)(97);\r\n\t\tassert decData [1] == (byte)(98);\r\n\t\tassert decData [2] == (byte)(99);\r\n\t\tassert decData [3] == (byte)(100);\r\n\t}", "void decryption(String file)\n {\n try\n {\n fdec=new DataOutputStream(new FileOutputStream(\"dec.txt\"));\n fenc1=new FileInputStream(file);\n }\n catch(Exception e)\n {\n System.out.println(e);\n }\n try\n {\n size=fenc1.available();\n np=0;\n p=size%8;\n if(p!=0)\n np=8-p;\n size+=np;\n if(p==0)\n nl=size/8;\n else\n nl=size/8+1;\n buf1=new byte[size+10];\n buf=new byte[8];\n fenc1.read(buf1);\n mark=-8;\n int arr[]=new int [8];\n for(k1=0;k1<nl;k1++)\n {\n mark+=8;\n for(int k2=0;k2<8;k2++)\n buf[k2]=buf1[mark+k2];\n for(int k2=0;k2<8;k2++)\n\t {\n\t arr[k2]=0;\n\t if(buf[k2]>=0)\n\t arr[k2]=buf[k2];\n\t else\n\t arr[k2]=buf[k2]+256;\n }\n\t j1=0;i1=0;\n while( i1<=3)\n\t\t {\n\t\t if((j1+1)%2==0)\n\t {\n x[i1]|=arr[j1]; // dividing 64 bit cypher block into four 16 bit registers\n\t i1++;\n\t\t }\n\t else\n\t {\n\t \t x[i1]=arr[j1];\n\t x[i1]<<=8;\n\t }\n\t j1++;\n\t }\n for(int t=0;t<4;t++)\n {\n\t ft1 =x[t]&255;\n\t ft=x[t]>>8;\n\t }\n step1=mul( x[0] , minverse( z[48] ));\n step2=( x[1] + ainverse( z[49] )) % 65536;\n step3=( x[2] + ainverse( z[50] )) % 65536;\n step4=mul( x[3] , minverse( z[51] ));\n step5=step1^step3;\n step6=step2^step4;\n step7=mul(step5,z[46]);\n step8=(step6+step7)%65536;\n step9=mul(step8,z[47]);\n step10=(step7+step9)%65536;\n step11=step1^step9;\n step12=step3^step9;\n step13=step2^step10;\n step14=step4^step10;\n x[0]=step11;\n x[1]=step12;\n x[2]=step13;\n x[3]=step14;\n// 2nd round\n\tint j2=40;\n\t\tfor(j1=1;j1<=7;j1++)\n \t\t {\n step1=mul( x[0] , minverse( z[j2+2] ));\n step2=( x[1] + ainverse( z[j2+4] )) % 65536;\n step3=( x[2] + ainverse( z[j2+3] )) % 65536;\n t=step2;\n step2=step3;\n step3=t;\n step4=mul( x[3] , minverse( z[j2+5] ));\n step5=step1^step3;\n step6=step2^step4;\n step7=mul(step5,z[j2+0]);\n step8=(step6+step7)%65536;\n step9=mul(step8,z[j2+1]);\n step10=(step7+step9)%65536;\n step11=step1^step9;\n step12=step3^step9;\n step13=step2^step10;\n step14=step4^step10;\n x[0]=step11;\n x[1]=step12;\n x[2]=step13;\n x[3]=step14;\n j2=j2-6;\n }\n x[0]=mul(x[0],minverse(z[0]));\n x[1]=(x[1]+ainverse(z[2]))%65536;\n x[2]=(x[2]+ainverse(z[1]))%65536;\n x[3]=mul(x[3],minverse(z[3]));\n t=x[1];\n x[1]=x[2];\n x[2]=t;\n\t for(int t=0;t<4;t++)\n {\n\t ft1 =x[t]&255;\n\t ft=x[t]>>8;\n\t fdec.write((char)ft);\n\t fdec.write((char)ft1);\n\t }\n }\n\n }\n catch(Exception e)\n {\n System.out.println(e);\n }\n }", "public interface CryptoService {\n /**\n * Read encrypted password file.\n *\n * @param file Encrypted file instance.\n * @param password Password to decrypt file.\n *\n * @return file content.\n *\n * */\n String readFile(File file, String password);\n\n /**\n * Write and encrypt content to file.\n *\n * @param file encrypted file location.\n * @param password password which will be used to encrypt file.\n * @param cnt file content.\n * */\n void writeFile(File file, String password, String cnt);\n\n /**\n * Encrypt content\n *\n * @param password password which will be used to encrypt file.\n * @param textToEncrypt text which will be encrypted\n * @return encrypted content\n * */\n String encrypt(String password, String textToEncrypt);\n\n /**\n * Decrypt content\n *\n * @param password password which will be used to encrypt file.\n * @param textToDecrypt text which will be decrypted\n * @return decrypted content\n * */\n String decrypt(String password, String textToDecrypt);\n\n /**\n * Write and encrypt the password database.\n *\n * @param passwordDatabase passwords database which will be saved to encrypted file.\n * */\n void writeFile(PasswordDatabase passwordDatabase) throws JsonConversionException;\n}", "public void stringcon()\n {\n int i,j,k;\n int temp[]=new int[8];\n int a[]=new int[32];\n i=0;\n j=0;\n for(i=0;i<10000;i++)\n bytes[i]=0;\n i=0;\n maxbinary1=0;\n for(i=0;i<24;i++)\n a[i]=binary[i];\n for(i=0;i<24;i++)\n maxbinary1+=a[i]*Math.pow(2,23-i);\n maxbinary2=maxbinary1*8;\n ivalue=0;\n for(i=24,j=0;i<32;i++,j++)\n {\n a[j]=binary[i];\n ivalue+=a[j]*Math.pow(2,7-j);\n }\n if(ivalue==73)\n {\n i=32;\n while(i<maxbinary2)\n {\n for(k=0;k<=7;k++)\n temp[k]=binary[i++];\n for(k=0;k<=7;k++)\n bytes[j]+=temp[k]*Math.pow(2,7-k);\n j++;\n }\n String s=JOptionPane.showInputDialog(this,\"Enter key with 16 letters\");\n char ch[]=new char[s.length()];\n ch=s.toCharArray();\n try\n {\n FileOutputStream f=new FileOutputStream(\"key1.txt\");\n for(i=0;i<ch.length;i++)\n f.write(ch[i]);\n f.close();\n FileOutputStream fout=new FileOutputStream(\"enc1.txt\");\n DataOutputStream d=new DataOutputStream(fout);\n \t\ti=8;\n while(i<(maxbinary1))\n \t\t {\n \t\t\td.write(bytes[i]);\n\t\t i++;\n \t\t }\n fout.close();\n }\n catch(Exception e)\n {\n System.out.println(e);\n }\n\n ideaalgo b=new ideaalgo();\n b.procedure();\n b.decryption(\"enc1.txt\");\n try\n {\n BufferedReader d;\n StringBuffer sb=new StringBuffer();\n d=new BufferedReader(new FileReader(\"dec.txt\"));\n String line;\n while((line=d.readLine())!=null)\n sb.append(line+\"\\n\");\n ta.setText(sb.toString());\n d.close();\n }\ncatch(Exception e)\n {\n System.out.println(e);\n }\n }\n}", "void encrypt()\n {\n try\n {\n size=fin.available();\n p=size%8;\n if(p!=0)\n np=8-p;\n size+=np;\n if(p==0)\n nl=size/8;\n else\n nl=size/8+1;\n buf=new byte[8];\n buf1=new byte[size+10];\n fin.read(buf1);\n int enc[]=new int[size];\n mark=-8;\n k2=0;\n for(k=0;k<nl;k++)\n {\n mark+=8;\n for(int k1=0;k1<8;k1++)\n buf[k1]=buf1[mark+k1];\n i=0;\n\t for(i=0;i<4;i++)\n x[i]=0;\n\t j1=0;i1=0;\n while( i1<=3)\n {\n\t if((j1+1)%2==0)\n\t {\n\t x[i1]|=buf[j1]; // dividing 64 bit cipher block into four 16 bit registers\n\t i1++;\n\t\t }\n\t else\n {\n\t x[i1]=buf[j1];\n\t x[i1]<<=8;\n }\n j1++;\n\t }\n // 7 rounds and 14 steps\n for(i=0 ; i <48 ; )\n {\n step1=mul(x[0],z[i+0]);\n step2=(x[1]+z[i+1])%65536;\n step3=(x[2]+z[i+2])%65536;\n step4=mul(x[3],z[i+3]);\n step5=step1^step3;\n step6=step2^step4;\n step7=mul(step5,z[i+4]);\n step8=(step6+step7)%65536;\n step9=mul(step8,z[i+5]);\n step10=(step7+step9)%65536;\n step11=step1^step9;\n step12=step3^step9;\n step13=step2^step10;\n step14=step4^step10;\n x[0]=step11;\n x[1]=step13;\n x[2]=step12;\n x[3]=step14;\n i=i+6;\n }\n x[0]=mul(x[0],z[48]);\n x[1]=(x[1]+z[49])%65536;\n x[2]=(x[2]+z[50])%65536;\n x[3]=mul(x[3],z[51]);\n for(int t=0;t<4;t++)\n {\n ft1 =x[t]&255;\n ft=x[t]>>8;\n fenc.write((char)ft);\n fenc.write((char)ft1);\n }\n}\nfin.close();\n }\n catch(Exception e)\n {\n System.out.println(e);\n }\n}", "public interface ICryptoEngine \n{\n\t/**\n\t * Initialize the \n\t * \n\t * @param forEncryption should the engine be initialized for encryption (true) or decryption (false)\n\t * @param key - symmetric encryption key\n\t * \n\t * @throws IllegalStateException - if any initialization parameters are invalid\n\t */\n\tpublic void init(boolean forEncryption, byte[] key) throws IllegalStateException;\n\t\n\t/**\n\t * @return name of the encryption algorithm\n\t */\n\tpublic String getAlgorithmName();\n\t\n\t/**\n\t * @return block size of the encryption algorithm\n\t */\n\tpublic int getBlockSize();\n\t\n\t/**\n\t * Performs an encryption or decryption of a block.\n\t * The amount of processed data depends on the actual algorithm's block size \n\t * \n\t * @param in - buffer with the data to be processed\n\t * @param inOff - starting position of the data at 'in'\n\t * @param out - preallocated buffer to store the processed data\n\t * @param outOff - starting position at 'out'\n\t * \n\t * @return size of processed data (typically algorithm's block size)\n\t * \n\t * @throws IllegalStateException if engine was not initialized or buffers are invalid\n\t */\n\tpublic int processBlock(byte[] in, int inOff, byte[] out, int outOff) throws IllegalStateException;\n\t\n\t/**\n\t * Resets the encryption engine (if required by the implementation)\n\t */\n\tpublic void reset();\n}", "void encryptFile(String path) throws IOException {\n try (BufferedReader reader = new BufferedReader(new FileReader(path))) {\n PrintWriter writer = new PrintWriter(System.out);\n encryptFile(reader, writer);\n } catch (FileNotFoundException e) {\n System.out.println(\"Error: Input file not found\");\n }\n }", "public static void execEnkripsiBulk(List<File> lsFileTemp, String pathZippedFile, String pathTempFileEncryptName, String pathEncryptedSecretKeyFile, SimpleDateFormat sdf, String pemContent) throws Exception{\r\n /*Step 2 : kompresi file*/\r\n// System.out.println(\"Step 2 : kompresi file\");\r\n\r\n //Generate Secret Key untuk setiap file yang dienkripsi\r\n /**\r\n * Kunci acak 16 Digit, dan setiap pengekripsian harus beda\r\n * contoh : A1b2C3D4E5F6G7h8\r\n * */\r\n String secretKey=RandomStringUtils.randomAlphanumeric(16);\r\n System.out.println(\"Generated Secret Key :\"+secretKey);\r\n\r\n File exportedFile;\r\n CompressingUtils compressingUtils = new CompressingUtils();\r\n String outputTmpFileNameZip = pathZippedFile.replace(\".\",\"\")+\"Tmp.zip\";\r\n String outputFileNameZip = pathZippedFile.replace(\".\",\"\")+sdf.format(new Date())+\".zip\";\r\n\r\n compressingUtils = new CompressingUtils();\r\n if(compressingUtils.createZipWithoutPassword(lsFileTemp, outputTmpFileNameZip)){\r\n exportedFile = new File(outputTmpFileNameZip);\r\n }else{\r\n throw new Exception(\"gagal melakukan kompresi file tanpa password\");\r\n }\r\n\r\n\r\n //delete file hasil enkripsi per file yang telah dimasukan ke dalam file kompresi untuk enkripsi tahap gabungan file\r\n for(File file : lsFileTemp){\r\n file.delete();\r\n }\r\n\r\n System.out.println(\"file kompresi berhasil dibuat \"+ outputFileNameZip);\r\n\r\n /*Step 3 : enkripsi file dengan kunci acak */\r\n System.out.println(\"Step 3 : enkripsi file dengan kunci acak\");\r\n\r\n\r\n String fileOutputEcnryptedname = outputFileNameZip;\r\n\r\n File tempFileEncryptName = new File(pathTempFileEncryptName);\r\n try {\r\n CryptoUtils.encrypt(secretKey, exportedFile, tempFileEncryptName);\r\n } catch (CryptoException e) {\r\n throw new Exception(\"Enkripsi file gagal : \" + e.getMessage());\r\n }\r\n\r\n\r\n EncryptionUtils utils = new EncryptionUtils();\r\n PublicKey publicKey = utils.getPublicKeyFromX509(pemContent);\r\n\r\n /*Step 4 : Enkripsi kunci acak dengan public key dari DJP*/\r\n System.out.println(\"Step 4 : enkripsi kunci acak dengan public key dari DJP\");\r\n\r\n String encryptedSecretKey;\r\n try{\r\n encryptedSecretKey = CryptoUtils.encrypt(secretKey, publicKey);\r\n }catch (CryptoException e) {\r\n throw new Exception(\"Enkripsi kunci gagal : \" + e.getMessage());\r\n }\r\n File encryptedSecretKeyFile = new File(pathEncryptedSecretKeyFile);\r\n try {\r\n FileOutputStream outputStream = new FileOutputStream(encryptedSecretKeyFile);\r\n outputStream.write(encryptedSecretKey.getBytes());\r\n outputStream.close();\r\n }catch (FileNotFoundException e){\r\n throw new Exception(\"kunci yang dienkripsi tidak ditemukan : \" + pathEncryptedSecretKeyFile);\r\n } catch (IOException e) {\r\n throw new Exception(\"gagal membentuk kunci enkripsi\");\r\n }\r\n\r\n /*Step 5: Compress data dan key kedalam file zip dan menjadi hasil akhir*/\r\n System.out.println(\"Step 5: Compress enkripsi file dan kunci kedalam file zip\");\r\n\r\n List<File> listFiles = new ArrayList<File>();\r\n listFiles.add(tempFileEncryptName);\r\n listFiles.add(encryptedSecretKeyFile);\r\n\r\n if(listFiles.size() != 2){\r\n for (File file : listFiles) {\r\n file.delete();\r\n }\r\n throw new Exception(\"file enkripsi dan/atau key enkripsi salah satunya tidak ada\");\r\n }\r\n\r\n compressingUtils = new CompressingUtils();\r\n if (compressingUtils.createZip(listFiles, fileOutputEcnryptedname)) {\r\n /*Step 6 : hapus file data dan key, hasil dari step 3 dan 4 */\r\n System.out.println(\"Step 6 : hapus file data dan key, hasil dari step 3 dan 4\");\r\n\r\n for (File file : listFiles) {\r\n file.delete();\r\n }\r\n /*Step 7: hapus file zip, hasil dari step 2 */\r\n System.out.println(\"Step 7: hapus file zip, hasil dari step 2\");\r\n\r\n exportedFile.delete();\r\n }\r\n\r\n System.out.println(\"Proses enkripsi selesai, nama file : \" + fileOutputEcnryptedname);\r\n }", "public interface EncryptionAlgorithm {\n\n public String encrypt(String plaintext);\n\n}", "static void encryptCBC(String filename, String key, String IV) {\n try {\n Scanner s = new Scanner(new File(filename + EXT), \"UTF-8\");\n File newFile = new File(filename + \"_CBC\" + EXT);\n newFile.delete();\n newFile.createNewFile();\n PrintWriter w = new PrintWriter(newFile);\n processHeader(s, w);\n cipherBlock = hexStringToBits(IV);\n while (s.hasNext()) {\n readBlock(s);\n block = xor(block, cipherBlock);\n block = stateToBits(AES.encrypt(bitsToHexString(block), key));\n for (int i = 0; i < block.length; i++) {\n cipherBlock[i] = block[i];\n }\n writeBlock(w);\n }\n w.flush();\n w.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) {\n\t\n\tFileEncryptor enc = new FileEncryptor();\n\tString use = enc.Encyrpt();String ans = \"\";\n\tfor(int i = 0; i<use.length();i++) {\n\t\tchar c = use.charAt(i);\n\t\tc--;\n\t\t\n\t\t ans +=c;\n\t\n\t}\tSystem.out.println(ans);\n}", "String encode(File message, File key,File crypted);", "public void encryptChkFile(User user, String inputFile)\n\t\t\tthrows NoSuchAlgorithmException, NoSuchPaddingException,\n\t\t\tInvalidKeyException, InvalidAlgorithmParameterException,\n\t\t\tIOException, NoSuchProviderException {// same as above but for singular file, for creating\n\t\t\t\t\t\t\t// consistant files to check against\n\t\tFile ivread = new File(user.name + \"_iv\");\n\t\tboolean exists = ivread.exists();\n\t\tCipher cipher = generateCipher();\n\t\tif (exists) {\n\t\t\tFileInputStream in = new FileInputStream(ivread);\n\t\t\tbyte[] iv = new byte[(int) ivread.length()];\n\t\t\tin.read(iv);\n\t\t\tcipher.init(Cipher.ENCRYPT_MODE, user.passwordKey,\n\t\t\t\t\tnew IvParameterSpec(iv));\n\t\t\tin.close();\n\t\t} else {\n\t\t\tcipher.init(Cipher.ENCRYPT_MODE, user.passwordKey);\n\t\t\tbyte[] iv = cipher.getIV();\n\t\t\tFileOutputStream ivout = new FileOutputStream(user.configDirectory + \"\\\\\" + user.name + \"_iv\");\n\t\t\tivout.write(iv);\n\t\t\tivout.close();\n\t\t}\n\t\tfinal Charset ENCODING = StandardCharsets.UTF_8;\n\t\tFile usersFile = user.referenceFile;// possibly gets sent\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to the wrong\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// directory, write\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// test to check\n\t\tBufferedWriter ow = Files.newBufferedWriter(usersFile.toPath(),//output stream is all wrong should be using cpher output stream/\n\t\t\t\tENCODING);\n\t\tow.write(inputFile);\n\t\tow.close();\n\t\t\n\t\tint i = cipher.getBlockSize();\n\t\tBufferedInputStream is = new BufferedInputStream(new FileInputStream(user.referenceFile));\n\t\tCipherOutputStream os = new CipherOutputStream(new FileOutputStream(user.referenceFile+\".out\"), cipher);\n\t\tcopy(is, os);\n\t\tis.close();\n\t\tos.close();\n\n\t\t// TODO insert code to create then encrypt a simple phrase e.g. 1234567\n\t}", "public void encryptFile(User user) throws InvalidKeyException,\n\t\t\tInvalidAlgorithmParameterException, NoSuchAlgorithmException,\n\t\t\tNoSuchPaddingException, IOException, NoSuchProviderException {\n\t\t\n\t\tCipher cipher = generateCipher();\n\t\t/*if (ivread.exists()) {\n\t\t\tFileInputStream in = new FileInputStream(ivread);\n\t\t\tbyte[] iv = new byte[(int) ivread.length()];\n\t\t\tin.read(iv);\n\t\t\tcipher.init(Cipher.ENCRYPT_MODE, user.passwordKey,\n\t\t\t\t\tnew IvParameterSpec(iv));\n\t\t\tin.close();\n\t\t} else {\n\t\t\tcipher.init(Cipher.ENCRYPT_MODE, user.passwordKey);\n\t\t\tbyte[] iv = cipher.getIV();\n\t\t\tFileOutputStream ivout = new FileOutputStream(user.configDirectory + \"\\\\\" + user.name + \".iv\");\n\t\t\tivout.write(iv);\n\t\t\tivout.close();\n\t\t}*/\n\t\tfor (int counter = 0; counter < user.unencryptedDirectory.containedFiles\n\t\t\t\t.size(); counter++) {// Iterates through directory and ignores a file if it is a directory\n\t\t\tif(!user.unencryptedDirectory.containedFiles.get(counter).isDirectory()){\n\t\t\t\tcipher.init(Cipher.ENCRYPT_MODE, user.passwordKey);\n\t\t\t\tbyte[] iv = cipher.getIV();\n\t\t\t\tFileOutputStream ivout = new FileOutputStream(user.configDirectory + \"\\\\\" + user.unencryptedDirectory.containedFiles.get(counter).toPath().getFileName() + user.name + \"_iv\");\n\t\t\t\tSystem.out.println(user.unencryptedDirectory.containedFiles.get(counter).toPath().getFileName());\n\t\t\t\tivout.write(iv);\n\t\t\t\tivout.close();\n\t\t\t\tBufferedInputStream is = new BufferedInputStream(\n\t\t\t\t\t\tnew FileInputStream(\tuser.unencryptedDirectory.containedFiles.get(counter)));\n\t\t\t\tCipherOutputStream os = new CipherOutputStream(\tnew FileOutputStream(\tuser.encryptedDirectory.location.toAbsolutePath()\t+ \"\\\\\"\n\t\t\t\t\t\t\t\t\t\t+ user.unencryptedDirectory.containedFiles\t.get(counter).getName() + \"\"), cipher);\n\t\t\t\tcopy(is, os);\n\t\t\t\tis.close();\n\t\t\t\tos.close();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\n\t\t}\n\n\t}", "public static void main(String[] args) throws FileNotFoundException, NullPointerException{\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.print(\"Date Encryption:\\n\\tMessage: \");\n\t\tString message = RunLengthEncoding.encodeRLE8(scanner.nextLine(), RunLengthEncoding.Encode.Binary);\n\t\tSystem.out.print( \"\\tKey: \");\n\t\tString key = scanner.nextLine();\n\t\tscanner.close();\n\t\t\n\t\tSystem.out.print(\"\\nBitMessage:\\t\\t\" + message);\n\t\tSystem.out.print(\"\\nKeyMessage:\\t\\t\" + TextToBinary(key));\n\t\t\n\t\tmessage = encrypt(message, key);\n\t\tSystem.out.println(\"\\nEncryptedMessage:\\t\" + message);\n\n\t\tFileHandler.createFile(\"data/encrypted\");\n\t\tFileHandler.writeFile(\"data/encrypted\", message);\n\n\t\tSystem.out.println(\"\\n\" + RunLengthEncoding.decodeRLE8(encrypt(FileHandler.getStrings(\"data/encrypted\"), key), RunLengthEncoding.Encode.Binary));\n\t}", "public String dcryptFile(String filename) {\n\t\tEncryption encryptFile = new Encryption();\r\n\t\tencryptFile\r\n\t\t\t\t.decrypt(directoryPath + filename, directoryPath2 + filename);\r\n\t\tdcryptedFilePath = directoryPath2 + filename;\r\n\t\t\r\n\t\tFileService service=new FileService();\r\n\t\tservice.delete(directoryPath+filename);//deleting old encrypted file from server.\r\n\t\t\r\n\t\treturn dcryptedFilePath;\r\n\t}", "@Test\n public void testEncryptDecrypt3() throws InvalidCipherTextException {\n\n // password generation using KDF\n String password = \"Aa1234567890#\";\n byte[] kdf = Password.generateKeyDerivation(password.getBytes(), 32);\n\n byte[] plain = \"0123456789\".getBytes();\n byte[] plainBytes = new byte[100000000];\n for (int i = 0; i < plainBytes.length / plain.length; i++) {\n System.arraycopy(plain, 0, plainBytes, i * plain.length, plain.length);\n }\n\n byte[] encData = AESEncrypt.encrypt(plainBytes, kdf);\n byte[] plainData = AESEncrypt.decrypt(encData, kdf);\n\n assertArrayEquals(plainBytes, plainData);\n\n }", "void procedure()\n {\n try\n {\n fkey=new FileInputStream(file2);\n }\n catch(Exception e)\n {\n System.out.println(e);\n }\n keybuf= new byte[16];\n try\n {\n fkey.read(keybuf);\n z= new int[52];\n j1=0;\n i1=0;\n for(i=0;i<52;i++)\n z[i]=0;\n while( i1<8)\n {\n if((j1+1)%2==0)\n {\n z[i1]|=keybuf[j1]; // dividing 64 bit cypher block into four 16 bit registers\n\t i1++;\n }\n else\n \t {\n\t z[i1]=keybuf[j1];\n\t z[i1]<<=8;\n }\n\t j1++;\n }\n i=0;\n\t for(j1=1;j1<=5;j1++)\n\t {\n\t i++;\n\t z[i+7]=((z[i]<<9)&0xfe00)|((z[i+1]>>7)&0x1ff);\n\t z[i+8]=((z[i+1]<<9)&0xfe00)|((z[i+2]>>7)&0x1ff);\n\t z[i+9]=((z[i+2]<<9)&0xfe00)|((z[i+3]>>7)&0x1ff);\n\t z[i+10]=((z[i+3]<<9)&0xfe00)|((z[i+4]>>7)&0x1ff);\n\t z[i+11]=((z[i+4]<<9)&0xfe00)|((z[i+5]>>7)&0x1ff);\n\t z[i+12]=((z[i+5]<<9)&0xfe00)|((z[i+6]>>7)&0x1ff);\n z[i+13]=((z[i+6]<<9)&0xfe00)|((z[i-1]>>7)&0x1ff);\n\t z[i+14]=((z[i-1]<<9)&0xfe00)|((z[i]>>7)&0x1ff);\n\t i=i+7;\n\t }\n i1=41;\n\t z[48]=((z[i1]<<9)&0xfe00)|((z[i1+1]>>7)&0x1ff);\n\t z[49]=((z[i1+1]<<9)&0xfe00)|((z[i1+2]>>7)&0x1ff);\n\t z[50]=((z[i1+2]<<9)&0xfe00)|((z[i1+3]>>7)&0x1ff);\n\t z[51]=((z[i1+3]<<9)&0xfe00)|((z[i1+4]>>7)&0x1ff);\n}\ncatch(Exception e)\n{\nSystem.out.println(e);\n}\n}", "public static void main(String[] args) throws IOException \r\n\t{\n\t\tFile matrixData = new File(\"matrixData.txt\");\r\n\t\tScanner matrixIn = new Scanner(matrixData);\r\n\t\tString key = matrixIn.nextLine();\r\n\t\tmatrixIn.close();\r\n\t\r\n\r\n\t\t// read the text to encipher\r\n\t\tFile inFile = new File(\"textToEncipher.txt\");\r\n\t\tFileInputStream fis = new FileInputStream(inFile);\r\n\t\tBufferedInputStream bis = new BufferedInputStream(fis);\r\n\t\tStringBuilder plain = new StringBuilder(\"\");\r\n\t\twhile (bis.available() > 0)\r\n\t\t{\r\n\t\t\tplain.append((char)bis.read());\r\n\t\t}\r\n\t\t\r\n\t\t// initialize the output file PrintWriter\r\n\t\tFile outFile = new File(\"hillEncipherOutput.txt\");\r\n\t\tPrintWriter dataOut = new PrintWriter(outFile);\r\n\t\t\r\n\t\tHillEncipherer hill = new HillEncipherer(key, plain.toString());\r\n\t\tdataOut.print(hill.encipher());\r\n\t\t\r\n\t\tfis.close();\r\n\t\tbis.close();\r\n\t\tdataOut.close();\r\n\t}", "public void runAES(String infoFilePath) {\n System.out.println(\"test\");\n try {\n FileInputStream fileInputStream = new FileInputStream(infoFilePath);\n StringBuffer stringBuffer = new StringBuffer();\n for (int i = fileInputStream.read(); i != 19; i = fileInputStream.read())\n stringBuffer.append((char) i);\n // long l = Long.parseLong(stringBuffer.toString());\n\n // This is the Long object in the `info` file.\n // byte[] builtSecretKey = buildSecretKey(-345585222195293739L);\n byte[] builtSecretKey = buildSecretKey(6874628185188049249L);\n\n MessageDigest messageDigest = MessageDigest.getInstance(\"MD5\");\n SecretKeySpec secretKeySpec = new SecretKeySpec(messageDigest.digest(builtSecretKey), \"AES\");\n Cipher cipher = Cipher.getInstance(\"AES\");\n cipher.init(2, secretKeySpec);\n ObjectInputStream objectInputStream = new ObjectInputStream(new CipherInputStream(fileInputStream, cipher));\n\n long secretKey = objectInputStream.readLong();\n HashMap<String, com.b.a.b.a> n = (HashMap<String, com.b.a.b.a>) objectInputStream.readObject();\n String k = (String) objectInputStream.readObject();\n String l = (String) objectInputStream.readObject();\n Boolean p = ((Boolean) objectInputStream.readObject()).booleanValue();\n Boolean o = ((Boolean) objectInputStream.readObject()).booleanValue();\n\n // Print everything\n System.out.println(secretKey);\n System.out.println(\"key_info:\");\n for (String key : n.keySet()) {\n com.b.a.b.a a = n.get(key);\n System.out.println(\" \" + key + \":\");\n System.out.println(\" a.a: \" + a.a.a());\n System.out.println(\" b: \" + a.a.b());\n System.out.println(\" c: \" + a.a.c());\n System.out.println(\" d: \" + a.a.d());\n System.out.println(\" e: \" + a.a.e().toString());\n System.out.println(\" f: \" + a.a.f());\n System.out.println(\" a.b: \" + a.b); // This is my key, existing in every file.\n System.out.println(\" a.c: \" + a.c);\n }\n System.out.println(k);\n System.out.println(l);\n System.out.println(p);\n System.out.println(o);\n\n objectInputStream.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) {\n System.out.println(decryptFunction());\n //decryptFunction();\n\n }", "void encryptFile(String inPath, String outPath) throws IOException {\n try (BufferedReader reader = new BufferedReader(new FileReader(inPath))) {\n try (PrintWriter writer = new PrintWriter(outPath)) {\n encryptFile(reader, writer);\n } catch (FileNotFoundException e) {\n System.out.println(\"Error: Output file not found\");\n }\n } catch (FileNotFoundException e) {\n System.out.println(\"Error: Input file not found\");\n }\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttxtContent.setText(\"\");\n\t\t\t\tif (filename == null) {\n\t\t\t\t\tJOptionPane.showMessageDialog(frame, \"You haven't selected any files yet!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse if (cbOption.getSelectedItem().toString() == \"Encrypt\") {\n\t\t\t\t\tswitch (cbAlgorithm.getSelectedItem().toString()) {\n\t\t\t\t\tcase \"AES\":\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tAES.encrypt(keyStr, filename, new File(\"document.encrypted\"));\n\t\t\t\t\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"document.encrypted\"));\n\t\t\t\t\t\t\tString line;\n\t\t\t\t\t\t\twhile((line = br.readLine()) != null) {\n\t\t\t\t\t\t \ttxtContent.append(line + \"\\n\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbr.close();\n\t\t\t\t\t\t} catch (CryptoException | IOException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(frame, \"Wrong key size. Your key must contain exactly \" + String.valueOf(keyLength/4) +\n\t\t\t\t\t\t\t\t\t\" characters including WS!\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"DES\":\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tDES.encrypt(keyStr, filename, new File(\"document.encrypted\"));\n\t\t\t\t\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"document.encrypted\"));\n\t\t\t\t\t\t\tString line;\n\t\t\t\t\t\t\twhile((line = br.readLine()) != null) {\n\t\t\t\t\t\t \ttxtContent.append(line + \"\\n\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbr.close();\n\t\t\t\t\t\t} catch (InvalidKeySpecException | CryptoException | IOException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(frame, \"Wrong key size. Your key must contain exactly 16 characters including WS!\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tkeyPath = cbSelectKey.getSelectedItem().toString();\n\t\t\t\t\t\t\tkeyStr = Base64.getEncoder().encodeToString(RSA.loadPublicKey(URL_DIR + keyPath).getEncoded());\n\t\t\t\t\t\t\tRSA.encrypt(keyStr, filename, new File(\"document.encrypted\"));\n\t\t\t\t\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"document.encrypted\"));\n\t\t\t\t\t\t\tString line;\n\t\t\t\t\t\t\twhile((line = br.readLine()) != null) {\n\t\t\t\t\t\t\t\ttxtContent.append(line + \"\\n\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbr.close();\n\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tswitch (cbAlgorithm.getSelectedItem().toString()) {\n\t\t\t\t\tcase \"AES\":\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tAES.decrypt(keyStr, filename, new File(\"document.decrypted\"));\n\t\t\t\t\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"document.decrypted\"));\n\t\t\t\t\t\t\tString line;\n\t\t\t\t\t\t\twhile((line = br.readLine()) != null) {\n\t\t\t\t\t\t\t\ttxtContent.append(line + \"\\n\");\n\t\t\t\t\t\t \thMACLine = line;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbr.close();\n\t\t\t\t\t\t\ttxtFileMac.setText(hMACLine.substring(hMACLine.length() - 64));\n\t\t\t\t\t\t\ttxtCalculatedMac.setText(HMAC.hmacDigestDecrypt(new File(\"document.decrypted\"), keyStr));\n\t\t\t\t\t\t\tlblPercent.setVisible(true);\n\t\t\t\t\t\t\tlblPercent.setText(Integer.toString(ByteDifference(txtFileMac.getText().toCharArray(), txtCalculatedMac.getText().toCharArray())) + \"%\");\n\t\t\t\t\t\t\trewritingHashedFile(new File(\"document.decrypted\"));\n\t\t\t\t\t\t} catch (CryptoException | IOException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(frame, \"Wrong key size. Your key must contain exactly \" + String.valueOf(keyLength/4) +\n\t\t\t\t\t\t\t\t\t\" characters including WS!\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"DES\":\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tDES.decrypt(keyStr, filename, new File(\"document.decrypted\"));\n\t\t\t\t\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"document.decrypted\"));\n\t\t\t\t\t\t\tString line;\n\t\t\t\t\t\t\twhile((line = br.readLine()) != null) {\n\t\t\t\t\t\t\t\ttxtContent.append(line + \"\\n\");\n\t\t\t\t\t\t \thMACLine = line;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbr.close();\n\t\t\t\t\t\t\ttxtFileMac.setText(hMACLine.substring(hMACLine.length() - 64));\n\t\t\t\t\t\t\ttxtCalculatedMac.setText(HMAC.hmacDigestDecrypt(new File(\"document.decrypted\"), keyStr));\n\t\t\t\t\t\t\tlblPercent.setVisible(true);\n\t\t\t\t\t\t\tlblPercent.setText(Integer.toString(ByteDifference(txtFileMac.getText().toCharArray(), txtCalculatedMac.getText().toCharArray())) + \"%\");\n\t\t\t\t\t\t\trewritingHashedFile(new File(\"document.decrypted\"));\n\t\t\t\t\t\t} catch (InvalidKeySpecException | CryptoException | IOException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(frame, \"Wrong key size. Your key must contain exactly 16 characters including WS!\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tkeyPath = cbSelectKey.getSelectedItem().toString();\n\t\t\t\t\t\t\tkeyStr = Base64.getEncoder().encodeToString(RSA.loadPrivateKey(URL_DIR + keyPath).getEncoded());\n\t\t\t\t\t\t\tpubKeyStr = Base64.getEncoder().encodeToString(RSA.loadPublicKey(URL_DIR + keyPath.replace(\"PrivateKey\", \"PublicKey\")).getEncoded());\n\t\t\t\t\t\t\tRSA.decrypt(keyStr, filename, new File(\"document.decrypted\"));\n\t\t\t\t\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"document.decrypted\"));\n\t\t\t\t\t\t\tString line;\n\t\t\t\t\t\t\twhile((line = br.readLine()) != null) {\n\t\t\t\t\t\t \ttxtContent.append(line);\n\t\t\t\t\t\t \ttxtContent.append(\"\\n\");\n\t\t\t\t\t\t \thMACLine = line;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbr.close();\n\t\t\t\t\t\t\ttxtFileMac.setText(hMACLine.substring(hMACLine.length() - 64));\n\t\t\t\t\t\t\ttxtCalculatedMac.setText(HMAC.hmacDigestDecrypt(new File(\"document.decrypted\"), pubKeyStr));\n\t\t\t\t\t\t\tlblPercent.setVisible(true);\n\t\t\t\t\t\t\tlblPercent.setText(Integer.toString(ByteDifference(txtFileMac.getText().toCharArray(), txtCalculatedMac.getText().toCharArray())) + \"%\");\n\t\t\t\t\t\t\trewritingHashedFile(new File(\"document.decrypted\"));\n\t\t\t\t\t\t} catch (InvalidKeySpecException | CryptoException | IOException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "public void encryptFile(String fitxer, SecretKey clau) throws FileNotFoundException, InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, IOException, IllegalBlockSizeException, BadPaddingException {\r\n //Creamos el FileInput Stream para leer el archivo.\r\n FileInputStream fis = new FileInputStream(fitxer);\r\n //Creamos el FileOutputStream para escribir en el fichero.\r\n FileOutputStream fos = new FileOutputStream(new File(\"mensajeCifrado.txt\"));\r\n \r\n //Creamos un cifrador para cifrar el texto.\r\n Cipher cifrador = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\r\n IvParameterSpec iv = new IvParameterSpec(cadena_iv.getBytes());\r\n cifrador.init(Cipher.ENCRYPT_MODE, clau);\r\n \r\n //Creamos un buffer que es un array de bytes donde almacenaremos el texto.\r\n byte[] buffer = new byte[1024];\r\n \r\n int bytes;\r\n //Utilizamos un bucle para ir leyendo el archivo de texto que le hemos pasado.\r\n while((bytes = fis.read(buffer, 0, buffer.length))!=-1){\r\n byte [] update = cifrador.update(buffer, 0, bytes);\r\n fos.write(cifrador.doFinal());\r\n }\r\n \r\n //Cerramos recursos.\r\n fos.write(cifrador.doFinal());\r\n fis.close();\r\n fos.close();\r\n \r\n \r\n }", "public static void main(String[] args) throws IOException {\n String command, file, destination;\n Scanner in = new Scanner(System.in);\n System.out.print(\"Enter: command file destination\\n\");\n command = in.next();\n file = in.next();\n destination = in.next();\n\n Process process = new ProcessBuilder(\"EncryptionUtil\", command, file, destination).start();\n InputStream is = process.getInputStream();\n InputStreamReader isr = new InputStreamReader(is);\n BufferedReader br = new BufferedReader(isr);\n String line;\n\n System.out.printf(\"Output of running %s is:\", Arrays.toString(args));\n\n while ((line = br.readLine()) != null) {\n System.out.println(line);\n }\n// EncryptionUtil sec = null;\n// sec = new EncryptionUtil();\n//\n//\n// try {\n//\n// System.out.println(\"Testing file encrypting: \");\n// File input = new File(\"To Encrypt.txt\");\n// File output = new File(\"Encrypted Output.txt\");\n//\n// sec.encrypt(input, output);\n//\n// File deOut = new File(\"Decrypted Output.txt\");\n//\n// sec.decrypt(output, deOut);\n//\n//\n// } catch (Exception e) {\n// e.printStackTrace();\n// }\n }", "private void encryptingData(File fileToEncrrypt, Signature dataSigner) throws Exception {\n\t\tFileOutputStream fos = null;\n\t\tFileInputStream fis = null;\n\t\tCipherInputStream cis = null;\n\t\ttry {\n\t\t\tfos = new FileOutputStream(localWorkingDirectoryPath + \"\\\\Encrypted_File.txt\");\n\t\t\tfis = new FileInputStream(fileToEncrrypt);\n\t\t\tbyte[] encryptedDataByteArray = new byte[8];\n\t\t\tcis = new CipherInputStream(fis, myCipher);\n\t\t\tint i = cis.read(encryptedDataByteArray);\n\t\t\twhile (i != -1) {\n\t\t\t\t// Updating the data inside the Signer\n\t\t\t\tdataSigner.update(encryptedDataByteArray);\n\t\t\t\t// writing the encrypted data to the file\n\t\t\t\tfos.write(encryptedDataByteArray, 0, i);\n\t\t\t\ti = cis.read(encryptedDataByteArray);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\twriteToLog(\"Error While trying to encrypt the data: \" + e.getMessage());\n\t\t\tLogWriter.close();\n\t\t\tthrow new Exception(\"Error: While trying to encrypt the data\", e);\n\t\t} finally {\n\t\t\tcis.close();\n\t\t\tfis.close();\n\t\t\tfos.close();\n\t\t}\n\t}", "private void prga(){\n int i = 0;\n int a = 0;\n int b = 0;\n StringBuilder sb = new StringBuilder();\n fileEncrypted.clear();\n\n byte[] code = new byte[filePlain.size()];\n while (i<filePlain.size()){\n a = (a + 1) % 256;\n b = (b + s_box.get(a)) % 256;\n Collections.swap(s_box, a, b);\n\n int key_int = s_box.get((s_box.get(a) + s_box.get(b))% 256);\n byte cypher = (byte) (key_int^filePlain.get(i));\n\n fileEncrypted.add(cypher);\n sb.append((char)cypher);\n code[i] = cypher;\n i++;\n }\n\n System.out.println(\"aaa\");\n// export file\n Helper.exportFile(code, extension, true);\n }", "public AES(String filePath, boolean isShred)\r\n throws UnsupportedEncodingException, NoSuchAlgorithmException, Exception\r\n {\r\n AES.filePath = filePath;\r\n AES.isShred = isShred;\r\n SecureRandom rand = new SecureRandom(SecureRandom.getSeed((int)System.currentTimeMillis()));\r\n key = keyGen(hash(String.valueOf(rand.nextLong())));\r\n }", "public static void main(String[] args) throws Exception {\n String keyString = \"1bobui76m677W1eCxjFM79mJ189G2zxo\";\n String input = \"john doe i a dead man sdhfhdshfihdoifo\";\n\n // setup AES cipher in CBC mode with PKCS #5 padding\n Cipher cipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n\n // setup an IV (initialization vector) that should be\n // randomly generated for each input that's encrypted\n byte[] iv = new byte[cipher.getBlockSize()];\n new SecureRandom().nextBytes(iv);\n IvParameterSpec ivSpec = new IvParameterSpec(iv);\n\n // hash keyString with SHA-256 and crop the output to 128-bit for key\n MessageDigest digest = MessageDigest.getInstance(\"SHA-256\");\n digest.update(keyString.getBytes());\n byte[] key = new byte[16];\n System.arraycopy(digest.digest(), 0, key, 0, key.length);\n SecretKeySpec keySpec = new SecretKeySpec(key, \"AES\");\n\n // encrypt\n cipher.init(Cipher.ENCRYPT_MODE, keySpec, ivSpec);\n byte[] encrypted = cipher.doFinal(input.getBytes(\"UTF-8\"));\n System.out.println(\"encrypted: \" + new String(encrypted));\n\n // include the IV with the encrypted bytes for transport, you'll\n // need the same IV when decrypting (it's safe to send unencrypted)\n\n // decrypt\n cipher.init(Cipher.DECRYPT_MODE, keySpec, ivSpec);\n byte[] decrypted = cipher.doFinal(encrypted);\n System.out.println(\"decrypted: \" + new String(decrypted, \"UTF-8\"));\n }", "String encryption(Long key, String encryptionContent);", "public static void main(String[] args) \r\n {\n String message1 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\r\n System.out.println(encrypt (message1, 3));\r\n System.out.println(decrypt (encrypt(message1,3) ,3));\r\n System.out.println(encrypt(message1.toLowerCase(),5));\r\n \r\n System.out.println(decrypt(encrypt(message1.toLowerCase() ,5 ) ,5));\r\n }", "public static void Encrypt(File file, Boolean sign, PGPSecretKey secretKey, char[] pass, Boolean encrpyt, PGPPublicKey publicKey)\n {\n\tSecurity.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());\n\t\n\t// fajl koji kriptujem\n\tInputStream fileToEncrypt = null;\n\ttry {\n\t\tfileToEncrypt = new FileInputStream(file);\n\t} catch (FileNotFoundException e) {\n\t}\n\t// fajl u koji cemo smestiti kriptovanu poruku\n\tOutputStream targetFileStream = null;\n\ttry {\n\t\ttargetFileStream = new FileOutputStream(new File(\"C:\\\\Users\\\\Korisnik\\\\Desktop\\\\test.pgp\"));\n\t} catch (FileNotFoundException e) {\n\n\t}\n\t\n\tString targetFileName = \"decript.txt\";\n\tString outputFileName = \"test.pgp\";\n\t\n\t\n\ttry {\n\t\tfEncryptOnePassSignatureLocal(file.getName(), outputFileName, \n\t\t\t\tsecretKey, targetFileStream, pass, publicKey, fileToEncrypt);\n\t} catch (Exception e) {\n // TODO Auto-generated catch block\n\n\t}\n }", "public String encrypt(final String clearText)\n throws GeneralSecurityException, IOException {\n final String methodName = \":encrypt\";\n Logger.v(TAG + methodName, \"Starting encryption\");\n\n if (StringExtensions.isNullOrBlank(clearText)) {\n throw new IllegalArgumentException(\"Input is empty or null\");\n }\n\n // load key for encryption if not loaded\n mKey = loadSecretKeyForEncryption();\n mHMACKey = getHMacKey(mKey);\n\n Logger.i(TAG + methodName, \"\", \"Encrypt version:\" + mBlobVersion);\n final byte[] blobVersion = mBlobVersion.getBytes(AuthenticationConstants.ENCODING_UTF8);\n final byte[] bytes = clearText.getBytes(AuthenticationConstants.ENCODING_UTF8);\n\n // IV: Initialization vector that is needed to start CBC\n final byte[] iv = new byte[DATA_KEY_LENGTH];\n mRandom.nextBytes(iv);\n final IvParameterSpec ivSpec = new IvParameterSpec(iv);\n\n // Set to encrypt mode\n final Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM);\n final Mac mac = Mac.getInstance(HMAC_ALGORITHM);\n cipher.init(Cipher.ENCRYPT_MODE, mKey, ivSpec);\n\n final byte[] encrypted = cipher.doFinal(bytes);\n\n // Mac output to sign encryptedData+IV. Keyversion is not included\n // in the digest. It defines what to use for Mac Key.\n mac.init(mHMACKey);\n mac.update(blobVersion);\n mac.update(encrypted);\n mac.update(iv);\n final byte[] macDigest = mac.doFinal();\n\n // Init array to store blobVersion, encrypted data, iv, macdigest\n final byte[] blobVerAndEncryptedDataAndIVAndMacDigest = new byte[blobVersion.length\n + encrypted.length + iv.length + macDigest.length];\n System.arraycopy(blobVersion, 0, blobVerAndEncryptedDataAndIVAndMacDigest, 0,\n blobVersion.length);\n System.arraycopy(encrypted, 0, blobVerAndEncryptedDataAndIVAndMacDigest,\n blobVersion.length, encrypted.length);\n System.arraycopy(iv, 0, blobVerAndEncryptedDataAndIVAndMacDigest, blobVersion.length\n + encrypted.length, iv.length);\n System.arraycopy(macDigest, 0, blobVerAndEncryptedDataAndIVAndMacDigest, blobVersion.length\n + encrypted.length + iv.length, macDigest.length);\n\n final String encryptedText = new String(Base64.encode(blobVerAndEncryptedDataAndIVAndMacDigest,\n Base64.NO_WRAP), AuthenticationConstants.ENCODING_UTF8);\n Logger.v(TAG + methodName, \"Finished encryption\");\n\n return getEncodeVersionLengthPrefix() + ENCODE_VERSION + encryptedText;\n }", "public static void main (String args[]) {\n System.out.println(\"PDF document encryptor\");\n if (args.length <= STRENGTH || args[PERMISSIONS].length() != 8) {\n usage();\n return;\n }\n try {\n int permissions = 0;\n String p = args[PERMISSIONS];\n for (int k = 0; k < p.length(); ++k) {\n permissions |= (p.charAt(k) == '0' ? 0 : permit[k]);\n }\n System.out.println(\"Reading \" + args[INPUT_FILE]);\n PdfReader reader = new PdfReader(args[INPUT_FILE]);\n System.out.println(\"Writing \" + args[OUTPUT_FILE]);\n HashMap moreInfo = new HashMap();\n for (int k = MOREINFO; k < args.length - 1; k += 2)\n moreInfo.put(args[k], args[k + 1]);\n PdfEncryptor.encrypt(reader, new FileOutputStream(args[OUTPUT_FILE]),\n args[USER_PASSWORD].getBytes(), args[OWNER_PASSWORD].getBytes(), permissions, args[STRENGTH].equals(\"128\"), moreInfo);\n System.out.println(\"Done.\");\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) throws IOException {\n char[][] key = new char[8][8];\n\n String[] lines = new String[8];\n\n File fileCardan = new File(\"cardan.txt\");\n\n Scanner fileScanner = new Scanner(fileCardan);\n\n for (int i = 0; i < 8; i++) {\n lines[i] = fileScanner.nextLine();\n }\n\n for (int i = 0; i < 8; i++) {\n for (int j = 0; j < 8; j++) {\n key[i][j] = lines[i].charAt(j);\n }\n\n }\n\n // reading text from input.txt file and getting count of 64 char blocks\n String text = new String(Files.readAllBytes(Paths.get(\"input.txt\")));\n\n int blocksCount = text.length() / 64 + 1;\n\n FileWriter fw = new FileWriter(\"encode.txt\");\n\n // encoding all 64 char blocks\n for (int i = 0; i < blocksCount; i++) {\n\n char[][] res;\n if(64+i*64 > text.length())\n res = encode(key, text.substring(i*64));\n else\n res = encode(key, text.substring(i*64,64+i*64));\n fileWrite(res,fw);\n\n }\n\n fw.close();\n\n text = new String(Files.readAllBytes(Paths.get(\"encode.txt\")));\n\n fw = new FileWriter(\"decode.txt\");\n\n for (int i = 0; i < blocksCount; i++) {\n\n fw.write(decode(text.substring(i*64,i*64+64),key));\n\n }\n\n fw.close();\n\n\n\n }", "public static void main(String[] args) throws FileNotFoundException\n\t{\n\t\tString input;\n//\t\tString output = \"\";\n\t\tFile f = new File(\"PlayfairKey.txt\");\n\t\tScanner reader = new Scanner(f);\n\t\tScanner in = new Scanner(System.in);\n\t\t//fills in the key array\n\t\tfor(int y = 0; y < 5; y++)\n\t\t{\n\t//\t\tSystem.out.println(\"Reached x\");\n\t\t\tfor(int x = 0; x < 5; x++)\n\t\t\t{\n\t\t\t\tString temp = reader.nextLine();\n\t//\t\t\tSystem.out.println(\"Reached y\");\n\t\t\t\tkey[x][y] = temp.charAt(0);\n\t\t\t}\n\t\t}\n\t\t\n\t\treader.close();\n\t\t/*\n\t\tfor(int y = 0; y < 5; y++)\n\t\t{\n\t\t\tfor(int x = 0; x < 5; x++)\n\t\t\t{\n\t\t\t\tSystem.out.print(key[x][y]+\" \");\n\t\t\t\t//System.out.print(x+\",\"+y+\" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\\t\");\n\t\t}\n\t\t*/\n\t\t\n\t\t/*\n\t\tfor(int y = 0; y < 5; y++)\n\t\t{\n\t\t\tfor(int x = 0; x < 5; x++)\n\t\t\t{\n\t\t\t\t//System.out.print(key[x][y]+\" \");\n\t\t\t\tSystem.out.print(x+\",\"+y+\" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\\t\");\n\t\t}\n\t\t*/\n\t\t\n\t\t\n\t\t\n\t\t//test\n\t//\tSystem.out.println(\"Enter 1 to encrypt, 2 to decrypt, -1 to end the program\");\n\t\twhile(condition != -1)\n\t\t{\n\t\t\t\n\t\t\tSystem.out.println(\"Enter 1 to encrypt, 2 to decrypt, -1 to end the program\");\n\t\t\n\t\t\tcondition = in.nextInt();\n\t\t\n\t\t\tif(condition == -1)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Enter a String:\");\n\t\t\tin.nextLine();\n\t\t\tinput = in.nextLine();\n\t\t\t\n\t\t\tinput = input.replaceAll(\" \",\"\");\n\t\t\n\t\t\tinput = input.toLowerCase();\n\t\t\t\n\t\t\t\n\t\t\tif(condition == 1)\n\t\t\t{\n\t\t\t\tinput = input.replaceAll(\"j\",\"i\");\n\t\t\t\tchar[] tempInputArray = input.toCharArray();\n\t\t\t\tint found = 1;\n\t\t\t\t\n\t\t\t\tfor(int i =0; i < tempInputArray.length-1; i++)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tif(tempInputArray[i] == tempInputArray[i+1])\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\tinput = input.substring(0, i+found) + \"x\" + input.substring(i+found, input.length());\n\t\t\t\t\t\tfound++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(input.length() % 2 != 0)\n\t\t\t\t{\n\t\t\t\t\tinput+=\"x\";\n\t\t\t\t}\n\t\t\t\t\n//\t\t\t\tSystem.out.println(input);\n\t\t\t\t\n\t\t\t\tchar[] inputArray = input.toCharArray();\n\t\t\t\tSystem.out.println(\"Encrypted:\");\n\t\t\t\tencrypt(inputArray);\n\t\t\t}\n\t\t\telse if(condition == 2)\n\t\t\t{\n//\t\t\t\tSystem.out.println(input);\n\t\t\t\tchar[] inputArray = input.toCharArray();\n\t\t\t\tSystem.out.println(\"Decrypted:\");\n\t\t\t\tdecrypt(inputArray);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"\\n\\n\");\n\t\t\t\n\t\t}\n\n\t\t\n\t}", "public void decrypt() {\n try {\n // Create input and output streams\n System.out.println(\"Loading files\");\n FileInputStream in = new FileInputStream(this.input);\n FileOutputStream out = new FileOutputStream(this.output);\n\n // Skip IV values\n in.getChannel().position(cipher.getBlockSize());\n\n /*\n Using CipherInputStream object to read from encrypted file\n cipherIn reads data from input stream and and returns the decrypted value\n */\n System.out.println(\"Creating cipher stream\");\n CipherInputStream cipherIn = new CipherInputStream(in, this.cipher);\n\n System.out.println(\"Starting file decryption\");\n byte[] buffer = new byte[Common.BLOCK_SIZE];\n int len;\n // Reading from the input stream\n while ((len = cipherIn.read(buffer)) != -1)\n // Write the decrypted message to output stream\n out.write(buffer, 0, len);\n\n // Close all streams\n System.out.println(\"Closing file streams\");\n cipherIn.close();\n out.flush();\n out.close();\n\n System.out.println(\"Decryption complete\");\n } catch (Exception e) {\n System.out.println(\"Error: \" + e.getMessage());\n }\n }", "public static void main(String[] args) throws ClassNotFoundException, BadPaddingException, IllegalBlockSizeException,\n IOException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException {\n KeyPairGenerator kpg = KeyPairGenerator.getInstance(\"RSA\");\n // Generate the keys — might take sometime on slow computers\n KeyPair myPair = kpg.generateKeyPair();\n\n /*\n * This will give you a KeyPair object, which holds two keys: a private\n * and a public. In order to make use of these keys, you will need to\n * create a Cipher object, which will be used in combination with\n * SealedObject to encrypt the data that you are going to end over the\n * network. Here’s how you do that:\n */\n\n // Get an instance of the Cipher for RSA encryption/decryption\n Cipher c = Cipher.getInstance(\"RSA\");\n // Initiate the Cipher, telling it that it is going to Encrypt, giving it the public key\n c.init(Cipher.ENCRYPT_MODE, myPair.getPublic());\n\n /*\n * After initializing the Cipher, we’re ready to encrypt the data.\n * Since after encryption the resulting data will not make much sense if\n * you see them “naked”, we have to encapsulate them in another\n * Object. Java provides this, by the SealedObject class. SealedObjects\n * are containers for encrypted objects, which encrypt and decrypt their\n * contents with the help of a Cipher object.\n *\n * The following example shows how to create and encrypt the contents of\n * a SealedObject:\n */\n\n // Create a secret message\n String myMessage = new String(\"Secret Message\");\n // Encrypt that message using a new SealedObject and the Cipher we created before\n SealedObject myEncryptedMessage= new SealedObject( myMessage, c);\n\n /*\n * The resulting object can be sent over the network without fear, since\n * it is encrypted. The only one who can decrypt and get the data, is the\n * one who holds the private key. Normally, this should be the server. In\n * order to decrypt the message, we’ll need to re-initialize the Cipher\n * object, but this time with a different mode, decrypt, and use the\n * private key instead of the public key.\n *\n * This is how you do this in Java:\n */\n\n // Get an instance of the Cipher for RSA encryption/decryption\n Cipher dec = Cipher.getInstance(\"RSA\");\n // Initiate the Cipher, telling it that it is going to Decrypt, giving it the private key\n dec.init(Cipher.DECRYPT_MODE, myPair.getPrivate());\n\n /*\n * Now that the Cipher is ready to decrypt, we must tell the SealedObject\n * to decrypt the held data.\n */\n\n // Tell the SealedObject we created before to decrypt the data and return it\n String message = (String) myEncryptedMessage.getObject(dec);\n System.out.println(\"foo = \"+message);\n\n /*\n * Beware when using the getObject method, since it returns an instance\n * of an Object (even if it is actually an instance of String), and not\n * an instance of the Class that it was before encryption, so you’ll\n * have to cast it to its prior form.\n *\n * The above is from: http:andreas.louca.org/2008/03/20/java-rsa-\n * encryption-an-example/\n *\n * [msj121] [so/q/13500368] [cc by-sa 3.0]\n */\n }", "public static void main(String[] args) throws IOException, CryptoException{\n\t\t\n\t\tSocket proxySocket = null;\n\t\tPrintStream out = null;\n\t\tBufferedInputStream in = null;\n\t\t\n\t\ttry{\n\t\t\tproxySocket = new Socket(\"localhost\",2222);\n\t\t\tout = new PrintStream(proxySocket.getOutputStream(),true);\n\t\t\tin = new BufferedInputStream (proxySocket.getInputStream());\n\t\t}catch (UnknownHostException e){\n\t\t\tSystem.err.println(\"Don't know about the host\");\n\t\t\tSystem.exit(1);\n\t\t}catch (IOException e){\n\t\t\tSystem.err.println(\"Couldn't get I/O for the connection\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"connection setup @ main\");\n\t\n\t\tlong starttime = System.currentTimeMillis();\n\t\tkeyRequest(in,out);\n\t\tlong t1 = System.currentTimeMillis();\n\t\tSystem.out.println(\"Keys@Main: \"+N+\" \"+G+\" \"+H);\n\t\tscm = new Scheme(N,G,H);\t// new encryption scheme generated!\n\t\tSystem.out.println(\"Encryption scheme setup!\");\n\n\t\t\n\t\t//mock computation of similarity without l and w paras\n\t\t/*data that should be stored elsewhere in some database*/\n\t\tBigInteger[] dataA = new BigInteger[500];\n\t\tBigInteger[] dataB = new BigInteger[500];\n\t\tfor(int i=0; i<dataA.length;i++)\n\t\t\tdataA[i]=new BigInteger(2,new Random());\n\t\tfor(int i=0; i<dataB.length;i++)\n\t\t\tdataB[i]=new BigInteger(2,new Random());\n\t\tBigInteger[] sqr_dataA = new BigInteger[500];\n\t\tBigInteger[] sqr_dataB = new BigInteger[500];\n\t\tfor(int i=0; i<dataA.length; i++)\n\t\t\tsqr_dataA[i] = dataA[i].modPow(BigInteger.valueOf(2), N);\n\t\tfor(int i=0; i<dataB.length; i++)\n\t\t\tsqr_dataB[i] = dataB[i].modPow(BigInteger.valueOf(2), N);\n\t\tBigInteger[] Numerator,Denominator,d1,d2;\n\t\tint len = 0;\n\t\t//calculate numerator\n\t\tBigInteger[] temp;\n\t\tlen = dataA.length; //to be modified later\n\t\tBigInteger[] p1,p2;\n\t\tp1 = scm.encrypt(dataA[0]);\n\t\tp2 = scm.encrypt(dataB[0]);\n\t\tNumerator = secureMul(p1,p2,in,out);\n\t\tfor(int i = 1;i<len; i++)\n\t\t{\n\t\t\tp1 = scm.encrypt(dataA[0]);\n\t\t\tp2 = scm.encrypt(dataB[0]);\n\t\t\ttemp = secureMul(p1,p2,in,out);\n\t\t\tNumerator = scm.homo_add(temp,Numerator);\n\t\t}\n\t\tSystem.out.println(\"Numerator got!@Main\");\n\t\t//calculate denominator\n\t\td1 = scm.encrypt(sqr_dataA[0]);\n\t\td2 = scm.encrypt(sqr_dataA[1]);\n\t\tfor (int i =1; i<len; i++)\n\t\t{\n\t\t\td1 = scm.homo_add(d1, scm.encrypt(sqr_dataA[i]));\n\t\t\td1 = scm.homo_add(d1, scm.encrypt(sqr_dataB[i]));\n\t\t}\n\t\tDenominator = secureMul(d1,d2,in,out);\n\t\tSystem.out.println(\"Denominator got!@Main\");\n\t\t//calculate similarity\n\t\tBigInteger[] sim =pro_div(Numerator,Denominator,in,out);\n\t\tSystem.out.println(\"Similarity got!@Main \"+sim);\n\t\tlong stoptime = System.currentTimeMillis();\n\t\tlong totaltime = stoptime-starttime;\n\t\tSystem.out.println(\"Total time: \"+ totaltime + \"Key: \"+ (t1-starttime));\n\t\t\t\t\n\t\tSystem.out.println(\"Close connection @Main\");\n\t\tSystem.out.println(\"Send: \"+sent_overhead+\" Receive: \"+receive_overhead);\n\t\tout.close();\n\t\tin.close();\n\t\tproxySocket.close();\n\t}", "public EncryptorReturn encrypt(String in) throws CustomizeEncryptorException;", "static void encryptECB(String filename, String key) {\n try {\n Scanner s = new Scanner(new File(filename + EXT), \"UTF-8\");\n File newFile = new File(filename + \"_ECB\" + EXT);\n newFile.delete();\n newFile.createNewFile();\n PrintWriter w = new PrintWriter(newFile);\n processHeader(s, w);\n while (s.hasNext()) {\n readBlock(s);\n block = stateToBits(AES.encrypt(bitsToHexString(block), key));\n writeBlock(w);\n }\n w.flush();\n w.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public interface AES {\n\n public String encrypt(String strToEncrypt);\n\n public String decrypt(String strToDecrypt);\n\n public String getSecretKeyWord();\n}", "public static byte[] readFile(File file, int valueType) {\n if (!file.exists()) {\n Log.e(TAG, \"The file doesn't exist\");\n }\n try {\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n FileInputStream fileInputStream = new FileInputStream(file);\n BufferedInputStream bufferedInputStream = new BufferedInputStream(fileInputStream);\n byte[] buf = new byte[4096];\n switch (valueType) {\n case 0:\n case 1:\n case 2:\n case 3:\n while (bufferedInputStream.read(buf) != -1) {\n byteArrayOutputStream.write(buf, 16 * valueType, 16);\n }\n break;\n case 4:\n if (!file.getName().equals(\"E_SK2\")) {\n if (!file.getName().equals(\"E_PIN2\")) {\n while (true) {\n int len = bufferedInputStream.read(buf);\n if (len == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, 16 * 1, (len - 32) - (16 * 1));\n }\n }\n } else {\n while (true) {\n int len2 = bufferedInputStream.read(buf);\n if (len2 == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, 16 * 1, ((len2 - 32) - (16 * 1)) - PKLENGTH);\n }\n }\n }\n } else {\n while (true) {\n int len3 = bufferedInputStream.read(buf);\n if (len3 == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, 16 * 4, (len3 - 32) - (16 * 4));\n }\n }\n }\n case 5:\n while (true) {\n int len4 = bufferedInputStream.read(buf);\n if (len4 == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, len4 - 32, 32);\n }\n }\n case PUBLICKEY /* 7 */:\n while (true) {\n int len5 = bufferedInputStream.read(buf);\n if (len5 == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, (len5 - 32) - PKLENGTH, PKLENGTH);\n }\n }\n case 8:\n while (true) {\n int len6 = bufferedInputStream.read(buf);\n if (len6 == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, 0, len6 - 32);\n }\n }\n }\n byte[] buffer = byteArrayOutputStream.toByteArray();\n bufferedInputStream.close();\n fileInputStream.close();\n byteArrayOutputStream.close();\n return buffer;\n } catch (IOException e) {\n Log.e(TAG, \"read file exception!\" + e.getMessage());\n return new byte[0];\n }\n }", "public void readDataFromFile(View view) throws GeneralSecurityException, IOException {\n encryptedFile = new EncryptedFile.Builder(\n context,\n new File(MainActivity.this.getFilesDir(),\"test.txt\"), // File want to read\n mainKey, // Master key for encryption\n EncryptedFile.FileEncryptionScheme.AES256_GCM_HKDF_4KB) // Algorithm or FileEncryptionScheme for encryption\n .build();\n\n\n InputStream inputStream = encryptedFile.openFileInput(); // Open the encrypted file to read\n int next = inputStream.read(); // Read the encrypted file\n\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); // ByteArrayOutputStream to print the content of file to read\n\n while (next != -1){\n byteArrayOutputStream.write(next); // Write the file content in byteArrayOutputStream object\n next = inputStream.read(); // Read the next character until it encounter the end (-1)\n }\n\n byte[] plainText = byteArrayOutputStream.toByteArray(); // Convert into byte array\n\n String textString = new String(plainText); // Create a new string with converted plain text byte array\n\n textView.setText(textString); // display the file content in textView\n }", "public static void main(String[] args)\n {\n\n CaesarCipherTwo cipher = new CaesarCipherTwo( 14, 24);\n //String encrypt = cipher.encrypt(message);\n //System.out.println(\"Encrypted message: \" + encrypt);\n System.out.println();\n String decrypt = cipher.decrypt(\"Hfs cpwewloj loks cd Hoto kyg Cyy.\");\n System.out.println(\"Decrypted message: \" + decrypt);\n\n }", "void setCryptAlgorithmClass(org.openxmlformats.schemas.presentationml.x2006.main.STAlgClass.Enum cryptAlgorithmClass);", "void setCryptAlgorithmType(org.openxmlformats.schemas.presentationml.x2006.main.STAlgType.Enum cryptAlgorithmType);", "static void decryptCBC(String filename, String key, String IV) {\n try {\n Scanner s = new Scanner(new File(filename + EXT), \"UTF-8\");\n File newFile = new File(filename + \"_dec\" + EXT);\n newFile.delete();\n newFile.createNewFile();\n PrintWriter w = new PrintWriter(newFile);\n processHeader(s, w);\n cipherBlock = hexStringToBits(IV);\n while (s.hasNext()) {\n readBlock(s);\n int[] temp = new int[128];\n for (int i = 0; i < block.length; i++) {\n temp[i] = block[i];\n }\n block = stateToBits(AES.decrypt(bitsToHexString(block), key));\n block = xor(block, cipherBlock);\n cipherBlock = temp;\n writeBlock(w);\n }\n w.flush();\n w.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "void decryptFile(String path) throws IOException {\n try (BufferedReader reader = new BufferedReader(new FileReader(path))) {\n PrintWriter writer = new PrintWriter(System.out);\n decryptFile(reader, writer);\n } catch (FileNotFoundException e) {\n System.out.println(\"Error: Input file not found\");\n }\n }", "public interface AsymmetricBlockCipher {\n /**\n * initialise the cipher.\n *\n * @param forEncryption if true the cipher is initialised for\n * encryption, if false for decryption.\n * @param param the key and other data required by the cipher.\n */\n public void init(boolean forEncryption, CipherParameters param);\n\n /**\n * returns the largest size an input block can be.\n *\n * @return maximum size for an input block.\n */\n public int getInputBlockSize();\n\n /**\n * returns the maximum size of the block produced by this cipher.\n *\n * @return maximum size of the output block produced by the cipher.\n */\n public int getOutputBlockSize();\n\n /**\n * process the block of len bytes stored in in from offset inOff.\n *\n * @param in the input data\n * @param inOff offset into the in array where the data starts\n * @param len the length of the block to be processed.\n * @return the resulting byte array of the encryption/decryption process.\n * @throws InvalidCipherTextException data decrypts improperly.\n * @throws DataLengthException the input data is too large for the cipher.\n */\n public byte[] processBlock(byte[] in, int inOff, int len)\n throws InvalidCipherTextException;\n}", "protected void resolveAndPopulateCredentialsAndAlgorithms(@Nonnull final EncryptionParameters params, \n @Nonnull final CriteriaSet criteria, @Nonnull final Predicate<String> includeExcludePredicate) {\n \n // Pre-resolve these for efficiency\n final List<Credential> keyTransportCredentials = getEffectiveKeyTransportCredentials(criteria);\n final List<String> keyTransportAlgorithms =\n getEffectiveKeyTransportAlgorithms(criteria, includeExcludePredicate);\n log.trace(\"Resolved effective key transport algorithms: {}\", keyTransportAlgorithms);\n \n final List<Credential> dataEncryptionCredentials = getEffectiveDataEncryptionCredentials(criteria);\n final List<String> dataEncryptionAlgorithms = getEffectiveDataEncryptionAlgorithms(criteria, \n includeExcludePredicate);\n log.trace(\"Resolved effective data encryption algorithms: {}\", dataEncryptionAlgorithms);\n \n // Select the data encryption algorithm, and credential if exists\n if (dataEncryptionCredentials.isEmpty()) {\n // This is probably the most typical case\n params.setDataEncryptionAlgorithm(resolveDataEncryptionAlgorithm(null, dataEncryptionAlgorithms));\n } else {\n for (final Credential dataEncryptionCredential : dataEncryptionCredentials) {\n assert dataEncryptionCredential != null;\n if (checkAndProcessKeyAgreement(params, criteria, dataEncryptionCredential, dataEncryptionAlgorithms,\n CollectionSupport.emptyList())) {\n return;\n }\n \n final String dataEncryptionAlgorithm = resolveDataEncryptionAlgorithm(dataEncryptionCredential, \n dataEncryptionAlgorithms);\n if (dataEncryptionAlgorithm != null) {\n params.setDataEncryptionCredential(dataEncryptionCredential);\n params.setDataEncryptionAlgorithm(dataEncryptionAlgorithm);\n break;\n }\n if (log.isDebugEnabled()) {\n final Key key = CredentialSupport.extractEncryptionKey(dataEncryptionCredential); \n log.debug(\"Unable to resolve data encryption algorithm for credential with key type '{}', \" \n + \"considering other credentials\", key != null ? key.getAlgorithm() : null);\n }\n }\n }\n \n final KeyTransportAlgorithmPredicate keyTransportPredicate = resolveKeyTransportAlgorithmPredicate(criteria);\n \n // Select key encryption cred and algorithm\n for (final Credential keyTransportCredential : keyTransportCredentials) {\n assert keyTransportCredential != null;\n if (checkAndProcessKeyAgreement(params, criteria, keyTransportCredential, dataEncryptionAlgorithms,\n keyTransportAlgorithms)) {\n return;\n }\n \n final String keyTransportAlgorithm = resolveKeyTransportAlgorithm(keyTransportCredential,\n keyTransportAlgorithms, params.getDataEncryptionAlgorithm(), keyTransportPredicate);\n \n if (keyTransportAlgorithm != null) {\n params.setKeyTransportEncryptionCredential(keyTransportCredential);\n params.setKeyTransportEncryptionAlgorithm(keyTransportAlgorithm);\n break;\n }\n if (log.isDebugEnabled()) {\n final Key key = CredentialSupport.extractEncryptionKey(keyTransportCredential);\n log.debug(\"Unable to resolve key transport algorithm for credential with key type '{}', \" \n + \"considering other credentials\", key != null ? key.getAlgorithm() : null);\n }\n }\n \n resolveAndPopulateRSAOAEPParams(params, criteria, includeExcludePredicate);\n \n // Auto-generate data encryption cred if configured and possible\n processDataEncryptionCredentialAutoGeneration(params);\n }", "private static java.io.File c(java.lang.String r8, java.lang.String r9) {\n /*\n r0 = 0;\n r1 = 0;\n r2 = new java.io.File;\t Catch:{ Exception -> 0x00e8, all -> 0x00e4 }\n r2.<init>(r8);\t Catch:{ Exception -> 0x00e8, all -> 0x00e4 }\n r8 = r2.exists();\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n if (r8 != 0) goto L_0x001d;\n L_0x000d:\n r8 = \"DecryptUtils\";\n r9 = \"unZipSingleFile file don't exist\";\n r3 = new java.lang.Object[r0];\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n com.taobao.sophix.e.d.e(r8, r9, r3);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n com.taobao.sophix.e.b.a(r1);\n r2.delete();\n return r1;\n L_0x001d:\n r8 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r8.<init>();\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r8.append(r9);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r9 = java.io.File.separator;\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r8.append(r9);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r9 = \"unzip\";\n r8.append(r9);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r8 = r8.toString();\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r9 = new java.io.File;\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r9.<init>(r8);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n com.taobao.sophix.e.b.a(r9);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r3 = r9.exists();\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n if (r3 != 0) goto L_0x0044;\n L_0x0041:\n r9.mkdirs();\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n L_0x0044:\n r9 = new java.util.zip.ZipInputStream;\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r3 = new java.io.FileInputStream;\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r3.<init>(r2);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r9.<init>(r3);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n L_0x004e:\n r3 = r9.getNextEntry();\t Catch:{ Exception -> 0x00dc }\n if (r3 == 0) goto L_0x00f4;\n L_0x0054:\n r4 = r3.getName();\t Catch:{ Exception -> 0x00dc }\n r3 = r3.isDirectory();\t Catch:{ Exception -> 0x00dc }\n if (r3 == 0) goto L_0x0085;\n L_0x005e:\n r3 = r4.length();\t Catch:{ Exception -> 0x00dc }\n r3 = r3 + -1;\n r3 = r4.substring(r0, r3);\t Catch:{ Exception -> 0x00dc }\n r4 = new java.io.File;\t Catch:{ Exception -> 0x00dc }\n r5 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x00dc }\n r5.<init>();\t Catch:{ Exception -> 0x00dc }\n r5.append(r8);\t Catch:{ Exception -> 0x00dc }\n r6 = java.io.File.separator;\t Catch:{ Exception -> 0x00dc }\n r5.append(r6);\t Catch:{ Exception -> 0x00dc }\n r5.append(r3);\t Catch:{ Exception -> 0x00dc }\n r3 = r5.toString();\t Catch:{ Exception -> 0x00dc }\n r4.<init>(r3);\t Catch:{ Exception -> 0x00dc }\n r4.mkdirs();\t Catch:{ Exception -> 0x00dc }\n goto L_0x004e;\n L_0x0085:\n r3 = new java.io.File;\t Catch:{ Exception -> 0x00dc }\n r5 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x00dc }\n r5.<init>();\t Catch:{ Exception -> 0x00dc }\n r5.append(r8);\t Catch:{ Exception -> 0x00dc }\n r6 = java.io.File.separator;\t Catch:{ Exception -> 0x00dc }\n r5.append(r6);\t Catch:{ Exception -> 0x00dc }\n r5.append(r4);\t Catch:{ Exception -> 0x00dc }\n r4 = r5.toString();\t Catch:{ Exception -> 0x00dc }\n r3.<init>(r4);\t Catch:{ Exception -> 0x00dc }\n r3.createNewFile();\t Catch:{ Exception -> 0x00dc }\n r4 = new java.io.FileOutputStream;\t Catch:{ Exception -> 0x00c7, all -> 0x00c4 }\n r4.<init>(r3);\t Catch:{ Exception -> 0x00c7, all -> 0x00c4 }\n r5 = 1024; // 0x400 float:1.435E-42 double:5.06E-321;\n r5 = new byte[r5];\t Catch:{ Exception -> 0x00c2 }\n L_0x00aa:\n r6 = r9.read(r5);\t Catch:{ Exception -> 0x00c2 }\n r7 = -1;\n if (r6 == r7) goto L_0x00b8;\n L_0x00b1:\n r4.write(r5, r0, r6);\t Catch:{ Exception -> 0x00c2 }\n r4.flush();\t Catch:{ Exception -> 0x00c2 }\n goto L_0x00aa;\n L_0x00b8:\n com.taobao.sophix.e.b.a(r4);\t Catch:{ Exception -> 0x00dc }\n com.taobao.sophix.e.b.a(r9);\n r2.delete();\n return r3;\n L_0x00c2:\n r3 = move-exception;\n goto L_0x00c9;\n L_0x00c4:\n r8 = move-exception;\n r4 = r1;\n goto L_0x00d8;\n L_0x00c7:\n r3 = move-exception;\n r4 = r1;\n L_0x00c9:\n r5 = \"DecryptUtils\";\n r6 = \"unZipSingleFile unZip hotfix patch file error\";\n r7 = new java.lang.Object[r0];\t Catch:{ all -> 0x00d7 }\n com.taobao.sophix.e.d.a(r5, r6, r3, r7);\t Catch:{ all -> 0x00d7 }\n com.taobao.sophix.e.b.a(r4);\t Catch:{ Exception -> 0x00dc }\n goto L_0x004e;\n L_0x00d7:\n r8 = move-exception;\n L_0x00d8:\n com.taobao.sophix.e.b.a(r4);\t Catch:{ Exception -> 0x00dc }\n throw r8;\t Catch:{ Exception -> 0x00dc }\n L_0x00dc:\n r8 = move-exception;\n goto L_0x00eb;\n L_0x00de:\n r8 = move-exception;\n r9 = r1;\n goto L_0x00fc;\n L_0x00e1:\n r8 = move-exception;\n r9 = r1;\n goto L_0x00eb;\n L_0x00e4:\n r8 = move-exception;\n r9 = r1;\n r2 = r9;\n goto L_0x00fc;\n L_0x00e8:\n r8 = move-exception;\n r9 = r1;\n r2 = r9;\n L_0x00eb:\n r3 = \"DecryptUtils\";\n r4 = \"unZipSingleFile unZip hotfix patch file error\";\n r0 = new java.lang.Object[r0];\t Catch:{ all -> 0x00fb }\n com.taobao.sophix.e.d.a(r3, r4, r8, r0);\t Catch:{ all -> 0x00fb }\n L_0x00f4:\n com.taobao.sophix.e.b.a(r9);\n r2.delete();\n return r1;\n L_0x00fb:\n r8 = move-exception;\n L_0x00fc:\n com.taobao.sophix.e.b.a(r9);\n r2.delete();\n throw r8;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.taobao.sophix.e.a.c(java.lang.String, java.lang.String):java.io.File\");\n }", "@org.junit.Test\n public void testCipher() {\n Assert.assertEquals(\"DITISGEHEIM\", Vigenere.cipher(\"DITISGEHEIM\", \"A\", true));\n Assert.assertEquals(\"DITISGEHEIM\", Vigenere.cipher(\"DITISGEHEIM\", \"A\", false));\n\n Assert.assertEquals(\"B\", Vigenere.cipher(\"A\", \"B\", true));\n Assert.assertEquals(\"A\", Vigenere.cipher(\"B\", \"B\", false));\n\n String plain = \"DUCOFIJMA\";\n String key = \"ABC\";\n String shouldEncryptTo = \"DVEOGKJNC\";\n String actualEncrypted = Vigenere.cipher(plain, key, true);\n Assert.assertEquals(shouldEncryptTo, actualEncrypted);\n String decrypted = Vigenere.cipher(shouldEncryptTo, key, false);\n Assert.assertEquals(plain, decrypted);\n }", "public static void main(String[] args) {\n\n\t\tif (args.length != 2 && args.length != 3) {\n\t\t\tSystem.out.println(\"Wrong number of command line arguments!\");\n\t\t\treturn;\n\t\t}\n\n\t\tswitch (args[0]) {\n\t\t// Do message digest\n\t\tcase \"checksha\":\n\t\t\tcheckCmdArgs(2, args);\n\t\t\tchecksha(args[1]);\n\t\t\tbreak;\n\n\t\t// Do encrypting or decrypting\n\t\tcase \"encrypt\":\n\t\tcase \"decrypt\":\n\t\t\tcheckCmdArgs(3, args);\n\t\t\tencrypt = args[0].equals(\"encrypt\");\n\n\t\t\tcrypto(args[1], args[2]);\n\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tSystem.out.println(\"No such command is supported!\");\n\t\t\treturn;\n\t\t}\n\n\t}", "public static void main(String[] args) throws IOException {\n String param1, param2, param3;\n BufferedReader r1 = new BufferedReader(new InputStreamReader(System.in));\n param1 = r1.readLine();\n param2 = r1.readLine();\n param3 = r1.readLine();\n FileOutputStream fileOutputStream = new FileOutputStream(param1);\n FileInputStream fileInputStream2 = new FileInputStream(param2);\n FileInputStream fileInputStream3 = new FileInputStream(param3);\n while (fileInputStream2.available() > 0){\n int data = fileInputStream2.read();\n fileOutputStream.write(data);\n }\n while (fileInputStream3.available() > 0){\n int data = fileInputStream3.read();\n fileOutputStream.write(data);\n }\n fileInputStream2.close();\n fileInputStream3.close();\n fileOutputStream.close();\n }", "protected void deleteCipherAndIVFile(String filename) throws DataNotAvailableException {\n super.deleteFile(filename + CIPHER_PART);\n super.deleteFile(filename + IV_PART);\n }", "public static void main(String[] args) {\n\t\tString input_1 = \"All-convoYs-9-be:Alert1.\";\n\t\tint rotationFactor_1 = 4;\n\n\t\t// \tExpected output_2 = \"stuvRPQrpq-999.@\";\n\t\tString input_2 = \"abcdZXYzxy-999.@\";\n\t\tint rotationFactor_2 = 200;\n\n\t\tString result = rotationalCipher(input_1, rotationFactor_1);\n\t\tSystem.out.println(\" Output of median : \" + result);\n\t}", "public VCipher(String keyword, String fileName, boolean actionB)\n\t{\n\t\talphabet = new char [SIZE];\n\t\tfor (int i = 0; i < SIZE; i++) \n\t\t{\n\t\t\talphabet[i] = (char)('A' + i);\n\t\t}\n\t\tStringBuilder keybuilder = new StringBuilder(keyword);\t\t\n\t\tint k = (int)keybuilder.length();\n\t\tcipher = new char [k][SIZE];\n\t\tfor (int i=0;i<k;i++)\n\t\t{\n\t\t\tint j=0;\n\t\t\tcipher[i][j] = keybuilder.charAt(i);\n\t\t\tint position = Character.getNumericValue(keybuilder.charAt(i))-9;\n\t\t\tint t =SIZE - position;\n\t\t\tfor (j=1;j<=t;j++)\n\t\t\t{\n\t\t\t\tcipher[i][j] = alphabet[position];\n\t\t\t\tposition ++;\n\t\t\t}\n\t\t\tposition=0;\n\t\t\tfor(j=t+1;j<SIZE;j++)\n\t\t\t{\n\t\t\t\tcipher[i][j] = alphabet[position];\n\t\t\t\tposition ++;\n\t\t\t}\n\t\t}\n\t\tString inFile = fileName+\".txt\";\n\t\tString outFile = this.fileProcessVigenere(fileName, actionB);\n\t\ttry{\t\n\t\t\tFileReader reader = new FileReader(inFile);\n\t\t\tFileWriter writer = new FileWriter(outFile);\n\t\t\tScanner in = new Scanner(reader);\n\t\t\twhile (in.hasNextLine()) {\n\t\t\t\tStringBuilder line = new StringBuilder(in.nextLine());\n\t\t\t\t//System.err.println(\"\\n\"+line+\"\\nCIBE JMGRI XNQJICBVKW\");\n\t\t\t\tint b=0;\n\t\t\t\tchar chr;\n\t\t\t\tint p=0;\n\t\t\t\twhile (b < line.length()) {\n\t\t\t\t\tif (p==k)\n\t\t\t\t\t{\n\t\t\t\t\t\tp=0;\n\t\t\t\t\t}\n\t\t\t\t\tif ((chr = line.charAt(b)) >= 'A' && (chr = line.charAt(b)) <= 'Z') \n\t\t\t\t\t{\n\t\t\t\t\t\tif (actionB==false)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tchar temp = this.encode(chr,p);\n\t\t\t\t\t\t\twriter.write(temp);\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\twriter.write(this.decode(chr,p));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tp +=1;\n\t\t\t\t\t}else{\n\t\t\t\t\t\twriter.write(line.charAt(b));\n\t\t\t\t\t}\n\t\t\t\t\tb +=1;\n\t\t\t\t}\n\t\t\t\twriter.write(\"\\r\\n\");\n\t\t\t}\n\t\t\t\treader.close();\n\t\t\t\twriter.close();\n\t\t\t\tnew LetterFrequencies(outFile);\n\t\t\t}\n\t\tcatch (IOException e)\n\t\t\t{\n\t\t\t\tSystem.err.println(\"File not Found\");\n\t\t\t}\n\t}", "public static void main(String[] args) {\n \n byte[] cadena = null;\n byte[] cadenaEncriptada = null;\n byte[] cadenaDencriptada = null;\n String cadena2=\"Hola, bona tarda!, com estas? qqoepoepoepoepooepoepoepoepoepoe\";\n \n SecretKey key=null;\n \n cadena=cadena2.getBytes();\n key=keygenKeyGeneration(128);\n cadenaEncriptada=encryptData(key,cadena);\n System.out.println(cadena2);\n cadena2=cadenaEncriptada.toString();\n System.out.println(cadena2);\n cadenaDencriptada=dencryptData(key,cadenaEncriptada);\n String misstageDencriptat = new String(cadenaDencriptada);\n System.out.println(misstageDencriptat);\n \n }", "public void encrypt() {\n // JOptionPane.showMessageDialog(null, \"Encrypting ... Action-Type = \" + DES_action_type);\n int[] flipped_last2_cipher_rounds = new int[64];\n for (int i = 0; i < 32; i++) {\n flipped_last2_cipher_rounds[i] = DES_cipher_sequence[17][i];\n flipped_last2_cipher_rounds[32 + i] = DES_cipher_sequence[16][i];\n }\n DES_ciphertext = select(flipped_last2_cipher_rounds, FP);\n }", "private native int native_crypt(long cookie, byte[] in, int inOffset,\n byte[] out, int outOffset, boolean encrypt);", "public static void encryptFile(File inFile, String pass) throws IOException, GeneralSecurityException {\n\t\tbyte[] decData;\n\t\tbyte[] encData;\n\n\t\tCipher cipher = FileEncryptor.makeCipher(pass, true);\n\t\tif (cipher == null) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tFileInputStream inStream = new FileInputStream(inFile);\n\t\tint blockSize = 8;\n\t\tint paddedCount = blockSize - ((int) inFile.length() % blockSize);\n\t\tint padded = (int) inFile.length() + paddedCount;\n\n\t\tdecData = new byte[padded];\n\t\tinStream.read(decData);\n\t\tinStream.close();\n\n\t\tfor (int i = (int) inFile.length(); i < padded; ++i) {\n\t\t\tdecData[i] = (byte) paddedCount;\n\t\t}\n\n\t\tencData = cipher.doFinal(decData);\n\t\tFileOutputStream outStream = new FileOutputStream(inFile);\n\t\toutStream.write(encData);\n\t\toutStream.close();\n\t}", "public interface EncryptionCommonBusiness\n{\n // ---------------------------------------------------------------------------||\n // Contracts -----------------------------------------------------------------||\n // ---------------------------------------------------------------------------||\n\n /**\n * Encrypts the specified String, returning the result \n * \n * @param input\n * @return\n * @throws IllegalArgumentException If no input was provided (null)\n * @throws EncryptionException If some problem occurred with encryption\n */\n String encrypt(String input) throws IllegalArgumentException, EncryptionException;\n\n /**\n * Decrypts the specified String, returning the result. The general\n * contract is that the result of decrypting a String encrypted with\n * {@link EncryptionCommonBusiness#encrypt(String)} will be equal \n * by value to the original input (round trip).\n * \n * @param input\n * @return\n * @throws IllegalArgumentException If no input was provided (null)\n * @throws EncryptionException If some problem occurred with decryption\n */\n String decrypt(String input) throws IllegalArgumentException, EncryptionException;\n\n /**\n * Returns a one-way hash of the specified argument. Useful\n * for safely storing passwords.\n * \n * @param input\n * @return\n * @throws IllegalArgumentException If no input was provided (null)\n * @throws EncryptionException If some problem occurred making the hash\n */\n String hash(String input) throws IllegalArgumentException, EncryptionException;\n\n /**\n * Returns whether or not the specified input matches the specified \n * hash. Useful for validating passwords against a \n * securely-stored hash. \n * \n * @param hash\n * @param input\n * @return\n * @throws IllegalArgumentException If either the hash or input is not provided (null)\n * @throws EncryptionException If some problem occurred making the hash\n */\n boolean compare(String hash, String input) throws IllegalArgumentException, EncryptionException;\n\n /*\n * This comment applies to all below this marker.\n * \n * In real life it's a security risk to expose these internals, \n * but they're in place here for testing and to show \n * functionality described by the examples.\n */\n\n /**\n * Obtains the passphrase to be used in the key for\n * the symmetric encryption/decryption ciphers\n * \n * @return\n */\n String getCiphersPassphrase();\n\n /**\n * Obtains the algorithm to be used in performing\n * one-way hashing\n * \n * @return\n */\n String getMessageDigestAlgorithm();\n\n}", "public interface EncryptorInterface {\n\n\t/**\n\t * Encrypts given string and returns assistant class EncryptorReturn object\n\t * with encrypted strings - to display and to save in file.\n\t * \n\t * @param in\n\t * String to encrypt\n\t * @return EncryptorReturn object with encrypted strings - to display and to\n\t * save in file.\n\t * @throws CustomizeEncryptorException\n\t */\n\tpublic EncryptorReturn encrypt(String in) throws CustomizeEncryptorException;\n\n\t/**\n\t * Decrypts given string and returns assistant class EncryptorReturn object\n\t * with decrypted strings - to display and to save in file.\n\t * \n\t * @param in\n\t * String to decrypt\n\t * @return EncryptorReturn object with decrypted strings - to display and to\n\t * save in file.\n\t * @throws CustomizeEncryptorException\n\t */\n\tpublic EncryptorReturn decrytp(String in) throws CustomizeEncryptorException;\n\n\t/**\n\t * Preprocessing of read from file string intended to be encrypted for\n\t * making it available to display.\n\t * \n\t * @param in\n\t * String which shoul be processed.\n\t * @return Preprocessed string.\n\t */\n\tpublic String preprocessingEncryptToDisplay(String in);\n\n\t/**\n\t * Preprocessing of read from file string intended to be decrypted for\n\t * making it available to display.\n\t * \n\t * @param in\n\t * String which shoul be processed.\n\t * @return Preprocessed string.\n\t */\n\tpublic String preprocessingDecryptToDisplay(String in);\n\n\t/**\n\t * Prepares JDialog widged for customizing this encryptor for being\n\t * available to encrypt file, like providing a password.\n\t * \n\t * @param master\n\t * Master frame on which widget will be displayed.\n\t * @return JDialog with fields needed for customizing encryptor.\n\t */\n\tpublic JDialog getParametersWidget(JFrame master);\n\n}", "public static void main(String[] args) {\n\t\tAffinCipher ac = new AffinCipher();\r\n\t\tString p,e,Encrypt,Decrypt;\r\n\t\tint n;\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Choose one option\\n 1.Encryption\\n 2.Decryption\\n 3.brute force\");\r\n\t\tn = sc.nextInt();\r\n\t\tswitch(n)\r\n\t\t{\r\n\t\tcase 1 : System.out.println(\"Enter plaintext\");\r\n\t\t p = sc.next();\r\n\t\t Encrypt = ac.encrypt(p);\r\n\t\t System.out.println(\"Encrypted text : \"+Encrypt);\r\n\t\t ac.bruteforce(Encrypt);\r\n\t\t break;\r\n\t\tcase 2 : System.out.println(\"Enter encrypted text\");\r\n\t\t e = sc.next();\r\n\t\t Decrypt = ac.decrypt(e);\r\n\t\t System.out.println(\"Decrypted text : \"+Decrypt);\r\n\t\t //break;\r\n\t\t//case 3 : System.out.println(\"Enter encrypted text\");\r\n // e = sc.next();\r\n ac.bruteforce(e);\r\n break;\r\n\t\t}\r\n\t\t\r\n\t\tsc.close();\r\n \r\n\t}", "public static void main(String args []) throws Exception\n {\n decryptor myEncryptor= new decryptor();\n \n String stringToEncrypt=\"Sanjaal.com\";\n String encrypted=myEncryptor.encrypt(stringToEncrypt);\n String enctptor=\"qsYVyDFK624cSomY9Ob9lw==\";\n String decrypted=myEncryptor.decrypt(enctptor);\n \n System.out.println(\"String To Encrypt: \"+stringToEncrypt);\n System.out.println(\"Encrypted Value :\" + encrypted);\n System.out.println(\"Decrypted Value :\"+decrypted);\n \n }", "public void gen_encrypted_image(double mat[][])\n\t{\n\t\tif(orderflag)\n\t\t{\n\t\t\tgetpixel_1(mat);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgetpixel_2(mat);\n\t\t}\n\t\ttry\n\t\t{\n\t\t\tImageIO.write(img, \"jpg\", new File(folder+\"Encrypted_\"+name));\n\t\t\tRuntime.getRuntime().exec(folder+\"Encrypted_\"+name);\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t}\t\t\n }", "public static byte[] encryptText(String plainText,SecretKey secKey) throws Exception{\n\r\n Cipher aesCipher = Cipher.getInstance(\"AES\");\r\n\r\n aesCipher.init(Cipher.ENCRYPT_MODE, secKey);\r\n\r\n byte[] byteCipherText = aesCipher.doFinal(plainText.getBytes());\r\n\r\n return byteCipherText;\r\n\r\n}", "public String encrypt(String plaintext) {\n\t\tCipher rsaCipher, aesCipher;\n\t\ttry {\n\t\t\t// Create AES key\n\t\t\tKeyGenerator keyGen = KeyGenerator.getInstance(\"AES\");\n\t\t\tkeyGen.init(AES_BITS);\n\t\t\tKey aesKey = keyGen.generateKey();\n\n\t\t\t// Create Random IV\n\t\t\tbyte[] iv = SecureRandom.getSeed(16);\n\t\t\tIvParameterSpec ivSpec = new IvParameterSpec(iv);\n\n\t\t\t// Encrypt data using AES\n\t\t\taesCipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n\t\t\taesCipher.init(Cipher.ENCRYPT_MODE, aesKey, ivSpec);\n\t\t\tbyte[] data = aesCipher.doFinal(plaintext.getBytes());\n\n\t\t\t// Encrypt AES key using RSA public key\n\t\t\trsaCipher = Cipher.getInstance(\"RSA/NONE/PKCS1Padding\");\n\t\t\trsaCipher.init(Cipher.ENCRYPT_MODE, this.pubKey);\n\t\t\tbyte[] encKey = rsaCipher.doFinal(aesKey.getEncoded());\n\n\t\t\t// Create output\n\t\t\tString keyResult = new String(Base64.encodeBytes(encKey, 0));\n\t\t\tString ivResult = new String(Base64.encodeBytes(iv, 0));\n\t\t\tString dataResult = new String(Base64.encodeBytes(data, 0));\n\t\t\tString result = FORMAT_ID + \"|\" + VERSION + \"|\" + this.keyId + \"|\"\n\t\t\t\t\t+ keyResult + \"|\" + ivResult + \"|\" + dataResult;\n\t\t\treturn Base64.encodeBytes(result.getBytes(), Base64.URL_SAFE);\n\t\t} catch (InvalidKeyException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (NoSuchPaddingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalBlockSizeException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (BadPaddingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InvalidAlgorithmParameterException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn \"Encryption_Failed\";\n\t}", "String encrypt(String input) throws IllegalArgumentException, EncryptionException;", "public Cipher()\n {\n CodecInterface base64UriCodec = new Base64UriCodec();\n AsymmetricBlockCipher rsaCipher = new OAEPEncoding(\n new RSAEngine(),\n new SHA1Digest()\n );\n BufferedBlockCipher aesCipher = new PaddedBufferedBlockCipher(\n new CBCBlockCipher(new AESEngine()),\n new PKCS7Padding()\n );\n Digest sha1Digest = new SHA1Digest();\n SecureRandom random = new SecureRandom();\n\n this.encryptionCipher = new EncryptionCipher(\n base64UriCodec,\n rsaCipher,\n aesCipher,\n sha1Digest,\n random\n );\n this.decryptionCipher = new DecryptionCipher(\n base64UriCodec,\n rsaCipher,\n aesCipher,\n sha1Digest\n );\n }", "public interface ICrypto\n{\n\t/**\n\t *\n\t * @return\ttrue for Public/Private key and false for password style encryption\n\t */\n\tboolean isPublic();\n\n\t/**\n\t * @param clearText\t\tClear text\n\t * @return\t\t\t\tStringized (BasicBase64) version of the cipher for the clear text\n\t */\n\tString encrypt(String clearText);\n\n\t/**\n\t * @param cipherText\tClear text\n\t * @return\t\t\t\tClear text from the stringized (BasicBase64) version of the cipherTetxt\n\t */\n\tString decrypt(String cipherText);\n\n\t/**\n\t * @return\tThe cryptography algorithm\n\t */\n\tString getAlgorithm();\n\n\t/**\n\t *\n\t * @return\tThe name by which this combination algorithm/key are known.\n\t */\n\tString getAliasName();\n}" ]
[ "0.73419243", "0.71161914", "0.70042616", "0.6918492", "0.6894503", "0.6742086", "0.6739729", "0.67135674", "0.66428137", "0.65915114", "0.65852773", "0.65426207", "0.64657515", "0.6444077", "0.6435011", "0.63888204", "0.6348294", "0.63410646", "0.63036776", "0.6291497", "0.61556196", "0.6132806", "0.6113842", "0.60665387", "0.605374", "0.60052735", "0.59838486", "0.59343857", "0.5903113", "0.58991414", "0.5892389", "0.5882994", "0.5837793", "0.58041644", "0.5749807", "0.5738581", "0.5706109", "0.567434", "0.56347984", "0.56003255", "0.5600256", "0.55631894", "0.5553094", "0.5548819", "0.55375427", "0.5524047", "0.5504228", "0.5502405", "0.54756546", "0.54686356", "0.5467654", "0.5467527", "0.5467094", "0.546348", "0.54509836", "0.5449396", "0.54462373", "0.54458684", "0.5417126", "0.53996015", "0.5399216", "0.5376027", "0.5333298", "0.5325411", "0.5317501", "0.5307353", "0.52934617", "0.52748495", "0.5267638", "0.52572125", "0.5238493", "0.5237286", "0.52208865", "0.52122635", "0.5207429", "0.5203713", "0.52002716", "0.5199532", "0.5199362", "0.51892287", "0.5182162", "0.51803946", "0.5175905", "0.5175388", "0.5158317", "0.5149839", "0.5140387", "0.51321626", "0.51227015", "0.510762", "0.5106737", "0.51039636", "0.5103783", "0.5095361", "0.50914913", "0.50838536", "0.5057258", "0.5053793", "0.50506514", "0.50437737" ]
0.72211325
1
computes distance between two points. Latitude and longitude are defined in decimal degree, integer (float value multiply by 100000)
public static int getDistance(int paramLatSrc, int paramLongSrc, int paramLatDest, int paramLongDest) { double longSrc,latSrc,longDest,latDest, sinLongDist, sinLatDist, a, b; latSrc = Math.toRadians((double) paramLatSrc / 100000); longSrc = Math.toRadians((double)paramLongSrc / 100000); latDest = Math.toRadians((double)paramLatDest / 100000); longDest = Math.toRadians((double)paramLongDest / 100000); sinLongDist = Math.sin((longDest - longSrc)/2); sinLatDist = Math.sin((latDest - latSrc)/2); a = (sinLatDist*sinLatDist) + (Math.cos(latSrc)*Math.cos(latDest)*sinLongDist*sinLongDist); b = 2 * atan2(Math.sqrt(a) , Math.sqrt(1-a)); return (int) Math.floor(6378137 * b); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double distance(double lat1, double lon1, double lat2, double lon2) {\n double theta = lon1 - lon2;\r\n double dist = Math.sin(deg2rad(lat1)) * Math.sin(deg2rad(lat2)) + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) * Math.cos(deg2rad(theta));\r\n dist = Math.acos(dist);\r\n dist = rad2deg(dist);\r\n dist = dist * 60 * 1.1515;\r\n dist = dist * 1.609344;\r\n return (dist); // return distance in kilometers\r\n }", "final public static int dist(float lat1, float lon1,\n \t\tfloat lat2, float lon2) {\n \tdouble latSin = Math.sin((lat2-lat1)/2d);\n \tdouble longSin = Math.sin((lon2-lon1)/2d);\n \tdouble a = (latSin * latSin) + (Math.cos(lat1)*Math.cos(lat2)*longSin*longSin);\n \tdouble c = 2d * atan2(Math.sqrt(a),Math.sqrt(1d-a));\n \treturn (int)(PLANET_RADIUS_D * (c + 0.5d));\n }", "private double distance(double lat1, double lat2, double lon1, double lon2)\n {\n lon1 = Math.toRadians(lon1);\n lon2 = Math.toRadians(lon2);\n lat1 = Math.toRadians(lat1);\n lat2 = Math.toRadians(lat2);\n\n // Haversine formula\n double dlon = lon2 - lon1;\n double dlat = lat2 - lat1;\n double a = Math.pow(Math.sin(dlat / 2), 2)\n + Math.cos(lat1) * Math.cos(lat2)\n * Math.pow(Math.sin(dlon / 2),2);\n\n double c = 2 * Math.asin(Math.sqrt(a));\n\n // Radius of earth in kilometers. Use 3956\n // for miles\n double r = 6371;\n\n // calculate the result\n return(c * r);\n }", "public double calculateDistance(double latitude1, double longitude1, double latitude2, double longitude2)\n {\n latitude1 = Math.toRadians(latitude1);\n longitude1 = Math.toRadians(longitude1);\n latitude2 = Math.toRadians(latitude2);\n longitude2 = Math.toRadians(longitude2);\n\n double dlon = longitude2 - longitude1;\n double dlat = latitude2 - latitude1;\n\n double a = Math.pow((Math.sin(dlat/2)),2) + Math.cos(latitude1) * Math.cos(latitude2) * Math.pow(Math.sin(dlon/2),2);\n\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\n //System.out.println(\"a: \" + a + \";c: \" + c + \";result: \" + (r*c));\n return r * c;\n }", "private double distance(double lat1, double lon1, double lat2, double lon2) {\r\n double theta = lon1 - lon2;\r\n double dist = Math.sin(deg2rad(lat1))\r\n * Math.sin(deg2rad(lat2))\r\n + Math.cos(deg2rad(lat1))\r\n * Math.cos(deg2rad(lat2))\r\n * Math.cos(deg2rad(theta));\r\n dist = Math.acos(dist);\r\n dist = rad2deg(dist);\r\n dist = dist * 60 * 1.1515;\r\n return (dist);\r\n }", "private double distFrom(double lat1, double lng1, double lat2, double lng2) {\n\t\tdouble dist = Math.pow(lat1 - lat2, 2) + Math.pow(lng1 - lng2, 2);\n\n\t\treturn dist;\n\t}", "public static double distance(double latitude,double longitude,double latitude2,double longitude2){\n\n \t double deltalat = Math.toRadians(latitude2 - latitude);\n \t double deltalog = Math.toRadians(longitude2 - longitude);\n\n \t double a = Math.pow(Math.sin(deltalat/2),2) +\n \t\t\t\t Math.pow(Math.sin(deltalog/2),2) *\n \t\t\t\t Math.cos(latitude) *\n \t\t\t\t Math.cos(latitude2);\n \t double c = 2 * Math.asin(Math.sqrt(a));\n\n \t return EARTH_RADIUS * c;\n\n }", "public static double distance(double lat1, double lon1, double lat2, double lon2) {\n\n\n float[] dist = new float[1];\n Location.distanceBetween(lat1, lon1, lat2, lon2, dist);\n //Log.d(\"*******dist\", \":\" + dist[0]);\n return (dist[0]);\n //\n // double theta = lon1 - lon2;\n // double dist = Math.sin(deg2rad(lat1)) * Math.sin(deg2rad(lat2))\n // + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2))\n // * Math.cos(deg2rad(theta));\n // dist = Math.acos(dist);\n // dist = rad2deg(dist);\n // dist = dist * 60; // 60 nautical miles per degree of seperation\n // dist = dist * 1852; // 1852 meters per nautical mile\n // return (dist);\n //\n }", "public static double GetDistance(double lat1, double lon1, double lat2, double lon2) {\n double radLat1 = rad(lat1);\n double radLat2 = rad(lat2);\n double a = radLat1 - radLat2;\n double b = rad(lon1) - rad(lon2);\n double s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +\n Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));\n s = s * EARTH_RADIUS;//km\n// Log.e(\"s\", \"s=\" + s);\n return s;\n }", "public int distance(Coord coord1, Coord coord2);", "public static double distance(double latitude1, double longitude1, double latitude2, double longitude2) {\n\n\t\tdouble a,c,d; // fjern = 1.0\n\t\t\n\t\t// TODO:\n\t\t// OPPGAVE - START\n\t\tdouble phi1 = toRadians(latitude1);\n\t\tdouble phi2 = toRadians(latitude2);\n\t\tdouble dphi1 = toRadians(latitude2 - latitude1);\n\t\tdouble dLamd1 = toRadians(longitude2 - longitude1);\n\t\t\n\t\ta = Math.pow((sin(dphi1/2)),2)+ cos(phi1)*cos(phi2)*Math.pow(sin(dLamd1/2),2);\n\t\tc = 2*atan2(sqrt(a), sqrt((1-a)));\n\t\td = R*c;\n\t\t// OPPGAVE - SLUTT\n\n\t\treturn d;\n\t}", "public double GetDistanceBetweenTwoGPSPoints(double lat1,\n double lat2, double lon1,\n double lon2, gpsUnits unit) {\n\n double lat1Radians = Math.toRadians(lat1);\n double lat2Radians = Math.toRadians(lat2);\n double deltaLatInRadians = Math.toRadians(lat2 - lat1);\n double deltaLonInRadians = Math.toRadians(lon2 - lon1);\n\n double a;\n a = Math.sin(deltaLatInRadians / 2) * Math.sin(deltaLatInRadians / 2) +\n Math.cos(lat1Radians) * Math.cos(lat2Radians) *\n Math.sin(deltaLonInRadians / 2) * Math.sin(deltaLonInRadians / 2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\n double distance = 0;\n\n switch (unit) {\n case KILOMETERS:\n distance = c * R_IN_KILOMETERS;\n break;\n case NAUTICAL_MILES:\n distance = c * R_IN_NAUTICAL_MILES;\n break;\n case MILES:\n distance = c * R_IN_MILES;\n break;\n }\n\n return distance;\n }", "@SuppressLint(\"UseValueOf\")\n\tpublic static double distFrom(double lat1, double lng1, double lat2, double lng2) {\n\t double earthRadius = 3958.75;\n\t double dLat = Math.toRadians(lat2-lat1);\n\t double dLng = Math.toRadians(lng2-lng1);\n\t double a = Math.sin(dLat/2) * Math.sin(dLat/2) +\n\t Math.cos(Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2)) *\n\t Math.sin(dLng/2) * Math.sin(dLng/2);\n\t double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\n\t double dist = earthRadius * c;\n\n\t int meterConversion = 1609;\n\t \n\t return new Double(dist * meterConversion).doubleValue();\n\t }", "public int distanceInMeters (double degLon1, double degLat1\n , double degLon2, double degLat2) {\n\n double radLonDelta = Math.toRadians(degLon2-degLon1);\n double radLat1 = Math.toRadians(degLat1);\n double radLat2 = Math.toRadians(degLat2);\n\n double d = issAverageOrbit\n *Math.acos(Math.sin(radLat1)\n *Math.sin(radLat2)\n +Math.cos(radLat1)\n *Math.cos(radLat2)\n *Math.cos(radLonDelta));\n return (int) Math.round(d);\n }", "public static double distance(double lat1, double lat2, double lon1, double lon2) {\n lon1 = Math.toRadians(lon1);\n lon2 = Math.toRadians(lon2);\n lat1 = Math.toRadians(lat1);\n lat2 = Math.toRadians(lat2);\n\n // Haversine formula\n double dlon = lon2 - lon1;\n double dlat = lat2 - lat1;\n double a = Math.pow(Math.sin(dlat / 2), 2) + Math.cos(lat1) * Math.cos(lat2) * Math.pow(Math.sin(dlon / 2),2);\n\n double c = 2 * Math.asin(Math.sqrt(a));\n\n // Radius of earth in miles.\n double r = 3956;\n\n // calculate the result\n return(c * r);\n }", "private static Double getDistance(Double lng1, Double lat1, Double lng2, Double lat2) {\n double radLat1 = lat1 * RAD;\n double radLat2 = lat2 * RAD;\n double a = radLat1 - radLat2;\n double b = (lng1 - lng2) * RAD;\n double s = 2 * Math.asin(Math.sqrt(\n Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));\n s = s * EARTH_RADIUS;\n s = Math.round(s * 10000) / 10000000.0;\n return s;\n }", "private double distanceBetweenLatLongPoints(double lat1, double long1, double lat2, double long2) {\r\n // radius of the Earth in km\r\n double R = 6378.137;\r\n double dLat = (lat2 * Math.PI / 180) - (lat1 * Math.PI / 180);\r\n double dLong = (long2 * Math.PI / 180) - (long1 * Math.PI / 180);\r\n double a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +\r\n Math.cos(lat1 * Math.PI / 180) * Math.cos(lat2 * Math.PI / 180) *\r\n Math.sin(dLong / 2) * Math.sin(dLong / 2);\r\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\r\n double d = R * c;\r\n return d * 1000;\r\n }", "private int getDistance(double lat1, double lng1, double lat2, double lng2) {\n\n double earthRadius = 6371; // kilometer output\n double dLat = Math.toRadians(lat2-lat1);\n double dLng = Math.toRadians(lng2-lng1);\n double sindLat = Math.sin(dLat / 2);\n double sindLng = Math.sin(dLng / 2);\n\n double a = Math.pow(sindLat, 2) + Math.pow(sindLng, 2)\n * Math.cos(Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2));\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\n double dist = earthRadius * c;\n\n int distance = (int)dist / 20; // output distance\n return distance;\n }", "public static double distanciaCoord(double lat1, double lng1, double lat2, double lng2) {\n\n double radioTierra = 6371;//en kilómetros \n double dLat = Math.toRadians(lat2 - lat1);\n double dLng = Math.toRadians(lng2 - lng1);\n double sindLat = Math.sin(dLat / 2);\n double sindLng = Math.sin(dLng / 2);\n double va1 = Math.pow(sindLat, 2) + Math.pow(sindLng, 2)\n * Math.cos(Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2));\n double va2 = 2 * Math.atan2(Math.sqrt(va1), Math.sqrt(1 - va1));\n double distancia = radioTierra * va2;\n\n return distancia * 1000;\n }", "private Integer getDistance(double lat1, double lon1, double lat2, double lon2) {\n Location locationA = new Location(\"Source\");\n locationA.setLatitude(lat1);\n locationA.setLongitude(lon1);\n Location locationB = new Location(\"Destination\");\n locationB.setLatitude(lat2);\n locationB.setLongitude(lon2);\n distance = Math.round(locationA.distanceTo(locationB));\n return distance;\n }", "public static double distance(double latit1, double longit1, double latit2, double longit2)\n\t{\n\t\tdouble latitude1 = Math.toRadians(latit1); //latitude of the first location\n\t\tdouble latitude2 = Math.toRadians(latit2);\t//latitude of the second location\n\t\t\n\t\tdouble longitude1 = Math.toRadians(longit1); //longitude of the first location\n\t\tdouble longitude2 = Math.toRadians(longit2); //longitude of the second location\n\t\t\n\t\tdouble radiusOfEarth = 6371; //km\n\t\tdouble distance;\n\t\t\n\t\tdouble sinSquaredLatitude = Math.pow(Math.sin((latitude1-latitude2)/2),2);\n\t\tdouble cosCalculations = Math.cos(latitude1)*Math.cos(latitude2);\n\t\tdouble sinSquaredLongitude = Math.pow(Math.sin((longitude1-longitude2)/2),2);\n\t\t\n\t\tdistance = 2*radiusOfEarth * Math.asin(Math.sqrt(sinSquaredLatitude + cosCalculations * sinSquaredLongitude));\n\t\t\n\t\t//distance = Math.round(distance);\n\t\treturn distance;\n\t\t\n\t\t//System.out.println(\"Distance is: \"+distance+\"km\");\n\t}", "public double calcDistance(double lat1, double lon1, double lat2, double lon2) {\n \t//Calculate great-circle distance\n \tdouble radius = 6371000;\t//radius of earth in meters\n \tdouble deltaLat = Math.toRadians(lat2 - lat1);\n \tdouble deltaLong = Math.toRadians(lon2 - lon1);\n\t\n \tlat1 = Math.toRadians(lat1);\n \tlat2 = Math.toRadians(lat2);\n\t\t\n \tdouble a = Math.sin(deltaLat / 2.0) * Math.sin(deltaLat / 2.0) +\n \t\t\tMath.cos(lat1) * Math.cos(lat2) * Math.sin(deltaLong / 2.0) *\n \t\t\tMath.sin(deltaLong / 2.0);\n \tdouble c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1.0 - a));\n\t\n \treturn radius * c;\n }", "public static double computeDistance(GeoPoint point1, GeoPoint point2) {\n return Math.sqrt(Math.pow(point1.getLatitudeE6()\n - point2.getLatitudeE6(), 2d)\n + Math.pow(point1.getLongitudeE6() - point2.getLongitudeE6(),\n 2d));\n }", "public double calculateDistance(LatLng other) {\n return Math.sqrt( (this.x - other.x) * (this.x - other.x) + (this.y - other.y) * (this.y - other.y) );\n }", "public static double distanceFromLatLon(double dLat1, double dLon1, double dLat2, double dLon2)\n\t{\n\t\tdouble dLat = (dLat2 - dLat1) * PIOVER180;\n\t\tdouble dLon = (dLon2 - dLon1) * PIOVER180;\n\t\tdouble dA = Math.sin(dLat / 2) * Math.sin(dLat /2) + Math.cos(dLat1 * PIOVER180) * Math.cos(dLat2 * PIOVER180) * Math.sin(dLon / 2) * Math.sin(dLon / 2);\n\t\treturn 2 * EARTH_RADIUS_KM * Math.asin(Math.sqrt(dA));\n\t}", "double distance(double x1, double y1, double x2, double y2) {\r\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\r\n }", "private static double distance(double lat1, double lon1, double lat2, double lon2, String unit) {\n double theta = lon1 - lon2;\n double dist = Math.sin(deg2rad(lat1)) * Math.sin(deg2rad(lat2)) + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) * Math.cos(deg2rad(theta));\n dist = Math.acos(dist);\n dist = rad2deg(dist);\n dist = dist * 60 * 1.1515;\n if (unit.equals(\"K\")) {\n dist = dist * 1.609344;\n } else if (unit.equals(\"N\")) {\n dist = dist * 0.8684;\n }\n //default miles\n return (dist);\n }", "public double distance(double x, double y);", "public double calculateDistance(MapLocation a, MapLocation b) {\r\n\t\treturn Math.sqrt((double) ( Math.pow((b.x - a.x),2) + Math.pow((b.y - a.y),2) ));\r\n\t}", "public double calcDistance(GpsCoordinate other)\n\t{\n\t\tdouble lat1 = degToRadian(this.latitude);\n\t\tdouble lng1 = degToRadian(this.longitude);\n\t\tdouble lat2 = degToRadian(other.latitude);\n\t\tdouble lng2 = degToRadian(other.longitude);\n\t\t\n\t\t/*\n\t\t * use haversine Formula to calc the distance\n\t\t * @see: http://en.wikipedia.org/wiki/Haversine_formula\n\t\t */\n\t\tdouble inRootFormula = Math.sqrt(\n\t\t\t\tMath.sin((lat1 - lat2)/2)*Math.sin((lat1 - lat2)/2)+\n\t\t\t\tMath.cos(lat1)*Math.cos(lat2)*Math.sin((lng1-lng2)/2)*Math.sin((lng1-lng2)/2));\n\t\t\n\t\treturn 2* EARTH_RADIUS * Math.asin(inRootFormula);\n\n\t\n\t}", "private double distance (double lata, double lona, double latb, double lonb) { \r\n return Math.acos(Math.sin(lata)*Math.sin(latb)+Math.cos(lata)*Math.cos(latb)*Math.cos(lonb-lona))*6371;\r\n }", "public static double distanceInMeter(double lat1, double long1, double lat2, double long2) {\n\t\t// Compute difference of latitude, longitude and convert to radians\n\t\tdouble diffLat = Math.toRadians(lat2 - lat1);\n\t\tdouble diffLong = Math.toRadians(long2 - long1);\n\t\t\n\t\t// Convert single latitude values to radiant\n\t\tlat1 = Math.toRadians(lat1);\n\t\tlat2 = Math.toRadians(lat2);\n\t\t\n\t\tdouble diffLatSin = Math.sin(diffLat/2);\n\t\tdouble diffLongSin = Math.sin(diffLong/2);\n\t\t\n\t\tdouble a = \tdiffLatSin * diffLatSin +\n\t\t\t\t\tdiffLongSin * diffLongSin *\n\t\t\t\t\tMath.cos(lat1) * Math.cos(lat2);\n\t\t\n\t\tdouble greatCircleDistanceRad = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\t\t\n\t\treturn EARTH_RADIUS * greatCircleDistanceRad;\n\t}", "private double Distance(Point first, Point second){ // distance between two points \n\t\treturn Math.sqrt(Math.pow(second.getY()-first.getY(),2) + Math.pow(second.getX()-first.getX(),2));\n\t}", "public static double measureDistance(double lat1, double lon1, double lat2, double lon2){ // generally used geo measurement function\n\t\tdouble R = 6378.137; // Radius of earth in KM\n\t\tdouble dLat = (lat2 - lat1) * Math.PI / 180;\n\t\tdouble dLon = (lon2 - lon1) * Math.PI / 180;\n\t\tdouble a = Math.sin(dLat/2) * Math.sin(dLat/2) +\n\t Math.cos(lat1 * Math.PI / 180) * Math.cos(lat2 * Math.PI / 180) *\n\t Math.sin(dLon/2) * Math.sin(dLon/2);\n\t\tdouble c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\n\t\tdouble d = R * c;\n\t return d * 1000; // meters\n\t}", "public final double calcDistance( Point a, Point b )\r\n {\r\n return( Math.sqrt( (Math.pow(a.y - b.y, 2)) +\r\n (Math.pow(a.x - b.x, 2)) ) );\r\n }", "public static double distCalc(double long1, double long2, double lat1,\n\t\t\tdouble lat2) {\n\t\tdouble theta = long1 - long2;\n\t\tdouble dist = Math.sin(deg2rad(lat1)) * Math.sin(deg2rad(lat2))\n\t\t\t\t+ Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2))\n\t\t\t\t* Math.cos(deg2rad(theta));\n\t\tdist = rad2deg(Math.acos(dist));\n\t\treturn (dist * 60 * 1.1515);\n\t}", "private double getDistanceInKM(LatLong latLongA, LatLong latLongB)\n {\n double distance = 500;\n\n double lat;\n double dx;\n double dy;\n\n if(latLongA != null && latLongB != null){\n lat = (latLongA.latitude + latLongB.latitude) / 2 * 0.01745;\n dx = 111.3 * Math.cos(lat) * (latLongA.longitude - latLongB.longitude);\n dy = 111.3 * (latLongA.latitude - latLongB.latitude);\n distance = Math.sqrt(dx * dx + dy * dy);\n }\n\n return distance;\n }", "public double getDistance(double latitude1, double latitude2, double longitude1, double longitude2) {\n final int EarthRadius = 6371000; // It is in meters scale.\n double latitude_difference = Math.toRadians(latitude2 - latitude1);\n double longitude_difference = Math.toRadians(longitude2 - longitude1);\n double a = (Math.sin(latitude_difference / 2) * Math.sin(latitude_difference / 2))\n + (Math.cos(Math.toRadians(latitude1)) * Math.cos(Math.toRadians(latitude2))\n * Math.sin(longitude_difference / 2) * Math.sin(longitude_difference / 2));\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n double distance = EarthRadius * c;\n return distance;\n }", "public double ComputeDistance(){ \n\t\tdouble lat1 = this.depAirportCity.getLatDegs() + (double)(this.depAirportCity.getLatMins())/60; \n\t\tdouble lon1 = this.depAirportCity.getLongDegs() + (double)(this.depAirportCity.getLongMins())/60;\n\t\tdouble lat2 = this.arrAirportCity.getLatDegs() + (double)(this.arrAirportCity.getLatMins())/60; \n\t\tdouble lon2 = this.arrAirportCity.getLongDegs() + (double)(this.arrAirportCity.getLongMins())/60;\n\t\t\n\t\tdouble distance = Haversine.getMiles(lat1, lon1, lat2, lon2);\n\t\treturn distance;\n\t}", "public static double distance(Position p1, Position p2){\n\t\t\n\t\tdouble lat1 = p1.getLat(); \n\t\tdouble lon1 = p1.getLon();\n\t\tdouble lat2 = p2.getLat(); \n\t\tdouble lon2 = p2.getLon();\n\t\t\n\t\tdouble r = 6371; // km\n\t\tdouble dLat = Math.toRadians(lat2-lat1);\n\t\tdouble dLon = Math.toRadians(lon2-lon1);\n\t\tdouble nlat1 = Math.toRadians(lat1);\n\t\tdouble nlat2 = Math.toRadians(lat2);\n\n\t\tdouble a = Math.sin(dLat/2) * Math.sin(dLat/2) + \n\t\t Math.sin(dLon/2) * Math.sin(dLon/2) * Math.cos(nlat1) * Math.cos(nlat2); \n\t\tdouble c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); \n\t\tdouble d = r * c;\n\t\treturn d;\n\t\t\n\t}", "private static double get_distance ( String one, String two){\n String temp[] = one.split(\" \");\n double lat1 = Double.parseDouble(temp[0]);\n double long1 = Double.parseDouble(temp[1]);\n\n String temp2[] = two.split(\" \");\n double lat2 = Double.parseDouble(temp2[0]);\n double long2 = Double.parseDouble(temp2[1]);\n\n// Get distance between two lats and two lans\n double latDistance = Math.toRadians(lat1 - lat2);\n double lngDistance = Math.toRadians(long1 - long2);\n\n// Step 1\n double a = (Math.sin ( latDistance / 2 ) * Math.sin (latDistance / 2)) +\n (Math.cos ( Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2)) )\n * ( Math.sin (lngDistance /2 ) * Math.sin(lngDistance / 2) );\n// Step 2\n double c = ( 2 * (Math.atan2( Math.sqrt(a), Math.sqrt(1-a))));\n// Step 3\n double d = ( EARTH_RADIUS * c );\n return d;\n }", "public static Double getDistanceFromLatLonInKm(Double firstPointLatitude,\n Double firstPointLongitude,\n Double secondPointLatitude,\n Double secondPointLongitude) {\n final int radiusOfEarth = 6371;\n Double latitudeDistance = Math.toRadians(secondPointLatitude - firstPointLatitude);\n Double longitudeDistance = Math.toRadians(secondPointLongitude - firstPointLongitude);\n\n double a = Math.sin(latitudeDistance / 2) * Math.sin(latitudeDistance / 2)\n + Math.cos(Math.toRadians(firstPointLatitude)) * Math.cos(Math.toRadians(secondPointLatitude))\n * Math.sin(longitudeDistance / 2) * Math.sin(longitudeDistance / 2);\n\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n // convert to meters\n\n double distnce = radiusOfEarth * c * 1000;\n distnce = Math.pow(distnce, 2) + Math.pow(0.0, 2);\n\n return Math.sqrt(distnce);\n }", "private static double distance(double lat1, double lat2, double lon1, double lon2,\n\t double el1, double el2) {\n\n\t final int R = 6371; // Radius of the earth\n\n\t Double latDistance = deg2rad(lat2 - lat1);\n\t Double lonDistance = deg2rad(lon2 - lon1);\n\t Double a = Math.sin(latDistance / 2) * Math.sin(latDistance / 2)\n\t + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2))\n\t * Math.sin(lonDistance / 2) * Math.sin(lonDistance / 2);\n\t Double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\t double distance = R * c * 1000; // convert to meters\n\n\t double height = el1 - el2;\n\t distance = Math.pow(distance, 2) + Math.pow(height, 2);\n\t return Math.sqrt(distance);\n\t}", "static double distance(double x1, double y1, double x2, double y2)\n {\n double x_dist = x2 - x1;\n double y_dist = y2 - y1;\n double dist = Math.sqrt(Math.pow(x_dist, 2) + Math.pow(y_dist, 2));\n return dist;\n }", "public double distance(double x1, double y1, double x2, double y2)\n {\n return Math.sqrt(Math.pow((x2 - x1), 2) + Math.pow(y2 - y1, 2));\n }", "public double calcDist(double lat2, double lon2, ArrayList<Record> cCentres)\n {\n double dist = 0;\n if (lat1==lat2 && lon1==lon2)\n dist = 0;\n else {\n double theta = lon1 - lon2;\n dist = Math.sin(Math.toRadians(lat1)) * Math.sin(Math.toRadians(lat2)) + Math.cos(Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2)) * Math.cos(Math.toRadians(theta));\n dist = Math.acos(dist);\n dist = Math.toDegrees(dist);\n dist = dist * 60 * 1.1515;\n dist = dist * 1.609344; //km\n }\n return (dist);\n }", "double distance (double px, double py);", "double getDistanceInMiles();", "double getDistance();", "public static double distance(LatLng one, LatLng two, char unit) {\n double theta = one.longitude - two.longitude;\n double dist = Math.sin(deg2rad(one.latitude)) * Math.sin(deg2rad(two.latitude)) + Math.cos(deg2rad(one.latitude)) * Math.cos(deg2rad(two.latitude)) * Math.cos(deg2rad(theta));\n dist = Math.acos(dist);\n dist = rad2deg(dist);\n dist = dist * 60 * 1.1515;\n if (unit == 'K') {\n dist = dist * 1.609344;\n } else if (unit == 'N') {\n dist = dist * 0.8684;\n }\n return (dist);\n }", "@Override\n public double distance(NumberVector o1, NumberVector o2) {\n double dt = Math.abs(o1.doubleValue(0) - o2.doubleValue(0));\n // distance value of earth coordinates in meter\n double dc = getDistance(o1.doubleValue(1), o1.doubleValue(2), o2.doubleValue(1), o2.doubleValue(2));\n return dt + dc;\n }", "public static double getDistance(GPSPosition first, GPSPosition second) {\n\t\tdouble distance = 0;\n\t\t\n\t\tdouble latitude_distance_in_radians = \n\t\t\t\tMath.toRadians(second.getLatitude() - first.getLatitude());\n\t\tdouble longitude_distance_in_radians = \n\t\t\t\tMath.toRadians(second.getLongitude() - first.getLongitude());\n\t\t// harvesin(d / R) = harvesin(lat1 - lat2) + cos(lat1) * cos(lat2) * harvesin(lng1 - lng2);\n\t\t// harvesin(angle) = sin(angle / 2) ^ 2;\n\t\t// d = 2 * R * arcsin(sqrt(harvesin));\n\t\tdouble harvesin_diff_lat = Math.pow(Math.sin(latitude_distance_in_radians / 2), 2);\n\t\tdouble harvesin_diff_lng = Math.pow(Math.sin(longitude_distance_in_radians / 2), 2);\n\t\tdouble cos_lat1 = Math.cos(Math.toRadians(first.getLatitude()));\n\t\tdouble cos_lat2 = Math.cos(Math.toRadians(second.getLatitude()));\n\t\tdouble harvesin = harvesin_diff_lat + cos_lat1 * cos_lat2 * harvesin_diff_lng;\n\n\t\tdistance = 2 * kEarthRadius * Math.atan2(Math.sqrt(harvesin), Math.sqrt(1 - harvesin));\n\t\treturn distance;\n\t}", "static double distance(Point a, Point b) {\n\t\tint xDiff = a.x - b.x;\n\t\tint yDiff = a.y - b.y;\n\t\treturn Math.sqrt((xDiff * xDiff) + (yDiff * yDiff));\n\t}", "private static double getDistance(final WayNodeOSM a, final WayNodeOSM b) {\n \t\tdouble latA = a.getLatitude()/180*Math.PI;\n \t\tdouble latB = b.getLatitude()/180*Math.PI;\n \t\tdouble lonDif = (b.getLongitude() - a.getLongitude())/180*Math.PI;\n \t\treturn (Math.acos((Math.sin(latA) * Math.sin(latB)) + (Math.cos(latA) * Math.cos(latB) * Math.cos(lonDif))) * 6367500);\n \t}", "private static double calculateDistance(Position A, Position B) {\n\t\tdouble x = (B.m_dLongitude - A.m_dLongitude) * Math.cos( (A.m_dLatitude + B.m_dLatitude) / 2.0d);\n\t\tdouble y = B.m_dLatitude - A.m_dLatitude;\n\t\treturn Math.sqrt(Math.pow(x, 2.0d) + Math.pow(y, 2.0d)) * 6371;\n\t}", "public int calculateDistance(GraphNodeAL<MapPoint> l1, GraphNodeAL<MapPoint> l2){\n double x1 = l1.data.getxCo();\n double y1 = l1.data.getyCo();\n double x2 = l2.data.getxCo();\n double y2 = l2.data.getyCo();\n double dist = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n return (int) dist;\n }", "public static int distanceBetween(double latA, double lonA, double latB, double lonB) {\n // translates degrees to radians\n latA = latA * Math.PI / 180;\n lonA = lonA * Math.PI / 180;\n latB = latB * Math.PI / 180;\n lonB = lonB * Math.PI / 180;\n\n double lonDelta = abs(lonA - lonB);\n double result = acos(sin(latA) * sin(latB) + cos(latA) * cos(latB) * cos(lonDelta));\n\n if (isNaN(result) || isInfinite(result)) {\n throw new ArithmeticException(\"Error in distance calculation, try different values of coordinates\");\n }\n\n return (int) (result * EARTH_RADIUS_METERS);\n }", "private double getDistanceBetweenLocationsInMeters(double sourceLat, double sourceLong, double destLat, double destLong) {\n String distanceStr = \"\";\n double R = 6371000f; // Default Radius of the earth in meters\n double dLat = (sourceLat - destLat) * Math.PI / 180f;\n double dLon = (sourceLong - destLong) * Math.PI / 180f;\n double a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(dLat) * Math.cos(dLon) * Math.sin(dLon / 2) * Math.sin(dLon / 2);\n double c = 2f * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n double distance = R * c;\n //System.out.println(\"DISTANCE IN METERS::: \" + Math.round(distance));\n return distance;\n }", "public abstract double distanceFrom(double x, double y);", "private double getDistance(float x, float y, float x1, float y1) {\n double distanceX = Math.abs(x - x1);\n double distanceY = Math.abs(y - y1);\n return Math.sqrt(distanceX * distanceX + distanceY * distanceY);\n }", "public static int calculateDistanceInKilometer(double srcLat, double srcLng,double dstLat, double dstLng) {\n double latDistance = Math.toRadians(srcLat - dstLat);\n double lngDistance = Math.toRadians(srcLng - dstLng);\n\n double a = Math.sin(latDistance / 2) * Math.sin(latDistance / 2)\n + Math.cos(Math.toRadians(srcLat)) * Math.cos(Math.toRadians(dstLat))\n * Math.sin(lngDistance / 2) * Math.sin(lngDistance / 2);\n\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\n return (int) (Math.round(AVERAGE_RADIUS_OF_EARTH_KM * c));\n\t }", "private Double euclidean(LatitudeLongitude point1, LatitudeLongitude point2) {\n return Double.valueOf(Math.sqrt(Math.pow(point1.getLatitude() - point2.getLatitude(), 2)\n + Math.pow(point1.getLongitude() - point2.getLongitude(), 2)));\n }", "private double distanceResult(double preLng, double preLat, double nextLng, double nextLat) {\n\t\treturn Math.sqrt((preLng - nextLng) * (preLng - nextLng) + (preLat - nextLat) * (preLat - nextLat));\n\t}", "public static double getDistance(int x1, int y1, int x2, int y2)\n {\n double dx = x2 - x1;\n double dy = y2 - y1;\n\n // return Math.hypot(x2 - x1, y2 - y1); // Extremely slow\n // return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)); // 20 times faster than hypot\n return Math.sqrt(dx * dx + dy * dy); // 10 times faster then previous line\n }", "private double distance(Point a, Point b) {\n\t\tDouble xdist = new Double( a.x - b.x );\n\t\tDouble ydist = new Double( a.y - b.y );\n\t\treturn Math.sqrt( Math.pow(xdist, 2.0) + Math.pow(ydist, 2.0) );\n\t}", "private double haversineDist(CityNode a, CityNode b) {\n\n double distLat = Math.toRadians(a.getLat() - b.getLat());\n double distLong = Math.toRadians(a.getLong() - b.getLong());\n\n // Convert latitudes to radians\n double startLat = Math.toRadians(b.getLat());\n double endLat = Math.toRadians(a.getLat());\n\n double calc = Math.pow(Math.sin(distLat / 2), 2)\n + Math.pow(Math.sin(distLong / 2), 2) * Math.cos(startLat) * Math.cos(endLat);\n double calc2 = 2 * Math.asin(Math.sqrt(calc));\n return 3959 * calc2;\n }", "public static float getDistance(float x1, float y1, float x2, float y2)\r\n\t{\r\n\t\treturn (float) Math.sqrt(getSquareDistance(x1, y1, x2, y2));\r\n\t}", "public static int dist(Location loc1, Location loc2)\n\t{\n\t\treturn Math.abs(loc1.x - loc2.x) + Math.abs(loc1.y - loc2.y);\n\t}", "double getDistance(Point p);", "public static double distance(\n\t\t\tdouble x1, double y1, double x2, double y2) {\n\t\treturn Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n\t}", "public double getDistance() {\n\n final int R = 6371; // Radius of the earth\n double lat1 = latitude;\n double lon1 = longitude;\n double lat2 = 41.917715; //lat2, lon2 is location of St.Charles, IL\n double lon2 = -88.266027;\n double el1=0,el2 = 0;\n double latDistance = Math.toRadians(lat2 - lat1);\n double lonDistance = Math.toRadians(lon2 - lon1);\n double a = Math.sin(latDistance / 2) * Math.sin(latDistance / 2)\n + Math.cos(Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2))\n * Math.sin(lonDistance / 2) * Math.sin(lonDistance / 2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n double distance = R * c * 1000; // convert to meters\n\n double height = el1 - el2;\n\n distance = Math.pow(distance, 2) + Math.pow(height, 2);\n\n return Math.sqrt(distance);\n }", "public static double CalculateDistance(double latitude1, double longitude1,\n\t\t\tdouble latitude2, double longitude2) {\n\t\t/*\n\t\t * Haversine formula: A = sin²(Δlat/2) +\n\t\t * cos(lat1).cos(lat2).sin²(Δlong/2) C = 2.atan2(√a, √(1−a)) D =\n\t\t * R.c R = radius of earth, 6371 km. All angles are in radians\n\t\t */\n\n\t\tdouble deltaLatitude = Math.toRadians(Math.abs(latitude1 - latitude2));\n\t\tdouble deltaLongitude = Math.toRadians(Math\n\t\t\t\t.abs(longitude1 - longitude2));\n\t\tdouble latitude1Rad = Math.toRadians(latitude1);\n\t\tdouble latitude2Rad = Math.toRadians(latitude2);\n\n\t\tdouble a = Math.pow(Math.sin(deltaLatitude / 2), 2)\n\t\t\t\t+ (Math.cos(latitude1Rad) * Math.cos(latitude2Rad) * Math.pow(\n\t\t\t\t\t\tMath.sin(deltaLongitude / 2), 2));\n\n\t\tdouble c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\n\t\treturn 6371 * c * 1000; // Distance in meters\n\n\t}", "private static double distance(double x, double y, double x1, double x2,\n\t\t\tdouble y1, double y2) {\n\t\tPoint p = new Point(x, y);\n\t\tPoint p1 = new Point(x1, y1);\n\t\tPoint p2 = new Point(x2, y2);\n\t\treturn p.distance(p1, p2);\n\t}", "public static int distance(Location l1, Location l2) {\r\n\t\treturn (int) (Math.pow((l1.getX() - l2.getX()), 2) + Math.pow((l1.getY() - l2.getY()), 2) + Math.pow((l1.getZ() - l2.getZ()), 2));\r\n\t}", "public float getDistance();", "public static double getDistance(GPSCoordinates point1, GPSCoordinates point2) {\r\n\t\t\r\n\t\treturn EARTH_RADIUS * 2 * Math.atan2( Math.sqrt( getHaversinePart(point1, point2)), Math.sqrt( getHaversinePart(point1, point2) ) );\r\n\t}", "public static double distance(double x1, double y1, double x2, double y2) {\n\t\tdouble r1 = x2 - x1;\n\t\tdouble r2 = y2 - y1;\n\t\treturn Math.sqrt(r1 * r1 + r2 * r2);\n\t}", "private double calculateDistance(Circle point1, Circle point2) {\r\n double x = point1.getCenterX() - point2.getCenterX();\r\n double y = point1.getCenterY() - point2.getCenterY();\r\n\r\n return Math.sqrt(x*x + y*y);\r\n }", "public static final double distance(final float x1, final float x2, final float y1, final float y2) {\r\n return Math.sqrt( ( (x2 - x1) * (x2 - x1)) + ( (y2 - y1) * (y2 - y1)));\r\n }", "public double distanceBetween2Points(double x1,double y1,double x2, double y2){\n\t\treturn Math.sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1));\n\t}", "public void calcDistance() {\n if (DataManager.INSTANCE.getLocation() != null && location.getLength() == 2) {\n Log.e(\"asdf\", DataManager.INSTANCE.getLocation().getLength() + \"\");\n Log.e(\"asdf\", DataManager.INSTANCE.getLocation().getLength() + \"\");\n double dLat = Math.toRadians(location.getLatitude() - DataManager.INSTANCE.getLocation().getLatitude()); // deg2rad below\n double dLon = Math.toRadians(location.getLongitude() - DataManager.INSTANCE.getLocation().getLongitude());\n double a =\n Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos(Math.toRadians(location.getLatitude()))\n * Math.cos(Math.toRadians(location.getLatitude()))\n * Math.sin(dLon / 2)\n * Math.sin(dLon / 2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n double d = KM_IN_RADIUS * c; // Distance in km\n distance = (float) d;\n } else distance = null;\n }", "static public double calcDistance(IPointGeo aFromPoint, IPointGeo aToPoint) {\n\t\t\treturn calcDistance(aFromPoint,aToPoint,RADIUS_EARTH_KM);\n\t\t}", "public double arcDistance(double lat1, double lon1, double lat2, double lon2) {\n return UmxSloppyMath.haversinMeters(lat1, lon1, lat2, lon2);\n }", "public static double distanceBetween(Pair<Double, Double> p1, Pair<Double, Double> p2) {\n float[] result = new float[1];\n android.location.Location.distanceBetween(p1.first, p1.second, p2.first, p2.second, result);\n return result[0];\n }", "private double haversineDist(CityNode a, CityNode b) {\n\n double distLat = Math.toRadians(a.getLat() - b.getLat());\n double distLong = Math.toRadians(a.getLong() - b.getLong());\n\n // Convert latitudes to radians\n double startLat = Math.toRadians(b.getLat());\n double endLat = Math.toRadians(a.getLat());\n\n double calc = Math.pow(Math.sin(distLat / 2), 2)\n + Math.pow(Math.sin(distLong / 2), 2) * Math.cos(startLat) * Math.cos(endLat);\n double calc2 = 2 * Math.asin(Math.sqrt(calc));\n return earthRadius * calc2;\n }", "private double calculateDis(double lata, double lona, double latb, double lonb){\n\t\tdouble lon2latRatio = Math.cos(lata * 3.14159 / 180.0);\n\t\tdouble milesperDegreeLat = 69.0;\n\t\tdouble milesperDegreeLon = milesperDegreeLat * lon2latRatio;\n\t\tdouble distance = 0.0;\n\t\tdistance = Math.sqrt((milesperDegreeLat * (latb - lata))\n\t\t\t\t* (milesperDegreeLat * (latb - lata))\n\t\t\t\t+ (milesperDegreeLon * (lonb - lona))\n\t\t\t\t* (milesperDegreeLon * (lonb - lona)));\n\t\treturn distance;\n\t}", "public double getDistanceBetween_2points(double initialLat, double initialLon, double finalLat, double finalLon){\n\n //https://stackoverflow.com/questions/8049612/calculating-distance-between-two-geographic-locations\n Location startPoint = new Location(\"initial\");\n startPoint.setLatitude(initialLat);\n startPoint.setLongitude(initialLon);\n\n Location endPoint = new Location(\"final\");\n endPoint.setLatitude(finalLat);\n endPoint.setLongitude(finalLon);\n\n double distance = startPoint.distanceTo(endPoint);\n Log.d(TAG, \"getDistanceBetween_2points: \" + distance);\n\n return distance;\n\n }", "public static double getDistance( GameObject one, GameObject two )\n {\n double deltaX = getDeltaX( one, two );\n double deltaY = getDeltaY( one, two );\n return Math.sqrt( deltaX * deltaX + deltaY * deltaY );\n }", "private static int dist(int x1, int y1, int x2, int y2) {\n\t\treturn (int) Math.sqrt(Math.abs(((x2-x1) * (x2-x1)) + ((y2-y1) * (y2-y1))));\n\t}", "public static double calculateDistance(Point point1, Point point2){\n\n if (point1.getX() > point2.getX() || point1.getY() > point2.getY()){\n Point tmp = point1;\n point1 = point2;\n point2 = tmp;\n }\n\n double distance = Math.abs(Math.sqrt((point2.x - point1.x) * (point2.x - point1.x) + (point2.y - point1.y) * (point2.y - point1.y)));\n\n return distance;\n //return Math.ceil(distance * scale) / scale;\n }", "double distance(Point p1,Point p2){\n\t\tdouble dx = p1.x - p2.x;\n\t\tdouble dy = p1.y - p2.y;\n\t\treturn Math.sqrt(dx*dx+dy*dy);\n\t}", "private int distance(Point p1, Point p2) {\n return (int) Math.sqrt(Math.pow(p1.getCenterX() - p2.getCenterX(), 2) + Math.pow(p1.getCenterY() - p2.getCenterY(), 2));\n }", "public static final double distance(final double x1, final double x2, final double y1, final double y2) {\r\n return Math.sqrt( ( (x2 - x1) * (x2 - x1)) + ( (y2 - y1) * (y2 - y1)));\r\n }", "private double getWeight(LatLng point1, LatLng point2) {\n\t\tdouble distance = (point1.latitude - point2.latitude) * (point1.latitude - point2.latitude )\n\t\t\t\t+ (point1.longitude - point2.longitude) * (point1.longitude - point2.longitude);\n\t\tSystem.out.print(String.valueOf(distance));\n\t\treturn distance;\n\t}", "public static double getDisplacementBetweenCoordinates(double lat1, double lon1, double lat2, double lon2) {\n Location locationA = new Location(\"point A\");\n locationA.setLatitude(lat1);\n locationA.setLongitude(lon1);\n Location locationB = new Location(\"point B\");\n locationB.setLatitude(lat2);\n locationB.setLongitude(lon2);\n return locationA.distanceTo(locationB) ;\n }", "public double distance(Point a, Point b) {\n\t\tdouble dx = a.x - b.x;\n\t\tdouble dy = a.y - b.y;\n\t\treturn Math.sqrt(dx * dx + dy * dy);\n\t}", "private double distance(Double lat1, Double lon1, String userName){\r\n\t\t//fetch the potential match\r\n\t\tString command = \"SELECT latitude, longitude FROM location WHERE userName = \\\"\" + userName + \"\\\";\";\r\n\t\trs = null;//clear previous results\r\n\t\tdouble lon2 = 0.0;//will hold the match's longitude\r\n\t\tdouble lat2 = 0.0;//will hold the match's latitude\r\n\r\n\t\ttry {//try block\r\n\t\t\trs = stmt.executeQuery(command);//send command\r\n\t\t\twhile(rs.next()){//parse the results\r\n\t\t\t\tlon2 = Double.valueOf(rs.getString(\"longitude\"));\r\n\t\t\t\tlat2 = Double.valueOf(rs.getString(\"latitude\"));\r\n\t\t\t}\r\n\t\t} catch (NumberFormatException | SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tout.println(\"Server error\");//server error\r\n\t\t}\r\n\r\n\t\t//compute distance\r\n\t\tdouble theta = lon1 - lon2;\r\n\t\tdouble dist = Math.sin(deg2rad(lat1)) * Math.sin(deg2rad(lat2)) + Math.cos(deg2rad(lat1))\r\n\t\t\t\t\t* Math.cos(deg2rad(lat2)) * Math.cos(deg2rad(theta));\r\n\t\tdist = Math.acos(dist);\r\n\t\tdist = rad2deg(dist);\r\n\t\tdist = dist * 60 * 1.1515;\r\n\t\trs = null;\r\n\t\t\r\n\t\treturn dist;//the distance computed\r\n\t}", "public double getDistance(double x, double y) {\n double xdist = 0;\n if (x < x1 && x < x2) xdist = Math.min(x1, x2) - x;\n else if (x > x1 && x > x2) xdist = x - Math.max(x1, x2);\n double ydist = 0;\n if (y < y1 && y < y2) ydist = Math.min(y1, y2) - y;\n else if (y > y1 && y > y2) ydist = y - Math.max(y1, y2);\n return Math.sqrt(xdist * xdist + ydist * ydist);\n }", "public abstract double getDistance(T o1, T o2) throws Exception;", "private double DistancePoint(Point a, Point b) {\n\t\tdouble ab = Math.sqrt( \n\t\t\t\tMath.pow( (b.getX() - a.getX()) , 2) +\n\t\t\t\tMath.pow( (b.getY() - a.getY()) , 2)\n\t\t);\n\t\treturn ab;\n\t}" ]
[ "0.7448692", "0.73552454", "0.72768337", "0.7235169", "0.7186779", "0.71532345", "0.7147838", "0.7106134", "0.71013844", "0.70739937", "0.7070854", "0.70641035", "0.7031217", "0.7031127", "0.7025441", "0.7017174", "0.7001896", "0.6988134", "0.6970832", "0.6955408", "0.69158673", "0.68958014", "0.68375844", "0.68368345", "0.6819905", "0.6795055", "0.6776268", "0.67642075", "0.67551214", "0.6752337", "0.669399", "0.66892946", "0.66772574", "0.66675395", "0.66279244", "0.6617861", "0.6578096", "0.6573698", "0.6572617", "0.6569562", "0.6566474", "0.65639657", "0.6559737", "0.6548129", "0.65111613", "0.65005267", "0.64931864", "0.6492455", "0.64768666", "0.6473285", "0.6461618", "0.6460954", "0.64324117", "0.6430286", "0.6427942", "0.64270157", "0.64042467", "0.6400462", "0.63944334", "0.63935894", "0.63819516", "0.6350793", "0.63468504", "0.63368946", "0.63352066", "0.63322717", "0.6315667", "0.63143235", "0.6310642", "0.63093764", "0.63081276", "0.6306671", "0.6299604", "0.6299273", "0.62882876", "0.62799466", "0.6269893", "0.6264736", "0.6255867", "0.62514687", "0.61992", "0.61991537", "0.6188123", "0.6188092", "0.6182419", "0.61821395", "0.61781216", "0.6168664", "0.6159857", "0.61414534", "0.6138826", "0.6121814", "0.6117808", "0.6117373", "0.6108082", "0.6098285", "0.6094726", "0.60838956", "0.60818857", "0.6075011" ]
0.61967987
82
Get specialties objects available to the patient
@FXML public void specialtyCombo() throws ClassNotFoundException, NullPointerException, SQLException, InstantiationException, IllegalAccessException { DAODoctorSpecialty dao = new DAODoctorSpecialty(); specialtyList = dao.getAllDescription(this.userId); //Prevent onChange behavior specialtyComboBox.setOnAction(null); //Clear items specialtyComboBox.getItems().clear(); //Set converter specialtyComboBox.setConverter(new StringConverter<Specialty>() { @Override public String toString(Specialty object) { return object.getDescription(); } @Override public Specialty fromString(String string) { return null; } }); //Set items specialtyComboBox.setItems(FXCollections.observableArrayList(specialtyList)); //Select one item in the combo specialtyComboBox.getSelectionModel().select(selectedComboSpecialty); //Set onChange behavior specialtyComboBox.setOnAction((event) -> { try { switchSpecialty(); } catch (ClassNotFoundException | SQLException | IllegalAccessException | InstantiationException | FileNotFoundException e) { e.printStackTrace(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Specialisation> getAllSpecialisations() {\n\t\tSession session = factory.openSession();\r\n\t\tList<Specialisation> specialisations = new ArrayList<Specialisation>();\r\n\r\n\t\ttry {\r\n\t\t\tspecialisations= session.createQuery(\"FROM Specialisation\").list();\r\n\t\t} catch (HibernateException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tsession.close();\r\n\t\t}\r\n\t\treturn specialisations;\r\n\t}", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n public List<Dummy> getIt() {\n\n \tCriterion cr = Restrictions.conjunction().add(Restrictions.gt(\"a\", 9));\n \tList<Dummy> dummies = BaseModel.getInstance().findByCriteria(Dummy.class, cr);\n \treturn dummies;\n\n }", "public List<SpecialContainer> getSpecialContainers(){\n return this.specialContainers;\n }", "public List<Doctor> acceptingNewPatients(String specialty);", "public java.util.List<CodeableConcept> specialCourtesy() {\n return getList(CodeableConcept.class, FhirPropertyNames.PROPERTY_SPECIAL_COURTESY);\n }", "public Collection getSpecialisation()\n {\n \tModelFacade instance = ModelFacade.getInstance(this.refOutermostPackage().refMofId());\n \tif (instance != null && \n \t\tinstance.isRepresentative(this.refMofId())&&\n \t\tinstance.hasRefObject(this.refMofId()))\n \t{\n \t\tCollection col = new ArrayList();\n \t\tcol = instance.getSpecialization(this.refMofId());\n \t\t\n \t\treturn col; \t\t\n \t}\n \n \treturn ((Uml15Package)this.refOutermostPackage()).getCore().getAParentSpecialization().getSpecialization(this);\n }", "public Collection getRegisteredObjects() {\n return usedByObjects;\n }", "public String getSpecialty() {\r\n\t\treturn specialty;\r\n\t}", "public Set<MindObject> getDirectSubComponents(){\n return new HashSet<>();\n }", "@Override\n\tpublic List<Patientstreatments> getallpatienttreat() {\n\t\treturn patreatrep.findAll();\n\t}", "List<BasicEquipment> selectAll();", "Collection<? extends Equipment> getUses();", "Collection<? extends Object> getHasAlcoholBloodContent();", "public Collection getAllAuxClasss();", "Collection<? extends Object> getHasAlcohol();", "public abstract Collection<Interest> getInterests();", "List<SoftObjectReference> getObjects();", "public Collection<Experiment> getExperiments();", "protected static List<Critter> getBabies() {\n return babies;\n }", "public @RequestMapping(\n\t\t\tvalue = \"/party/all\",\n\t\t\tmethod = GET,\n\t\t\tproduces = JSON\n\t) Party[] getAllParties() {\n\t\treturn partyService.getAllParties();\n\t}", "@Override\r\n\tpublic List<Object[]> searchPlantDetails() {\n\t\tList<Object[]> list = null;\r\n\t\ttry {\r\n\t\t\tsql = \"select p.plantId ,p.plantName,p.add1,p.add2,p.add3,p.city,p.state,p.phone,p.fax,p.mobile,p.organization,p.countrysList from Plant p\";\r\n\t\t\tlist = getHibernateTemplate().find(sql);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn list;\r\n\t}", "@Override\n\tpublic List<PropertyRooms> findRoomByTenancyDetails(TenancyForm occupiedBy) {\n\t\tList<PropertyRooms> rooms=hibernateTemplate.find(\"from PropertyRooms where occupiedBy=?\",occupiedBy);\n\t\treturn rooms;\n\t}", "java.util.List<UserOuterClass.ExperimentInfo> \n getExperimentsList();", "Collection<? extends Object> getFullHadith();", "List<Especialidad> getEspecialidades();", "Collection<Patient> findAll();", "public ReactorResult<DataObject> getAllGeneralEncapsulatedObject_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), GENERALENCAPSULATEDOBJECT, DataObject.class);\r\n\t}", "@Override\n\tpublic List<Patient> listOfPatients() {\n\t\treturn null;\n\t}", "public List<Patient> getPatients() {\n List<Patient> patients = new ArrayList<>();\n String query = \"SELECT * FROM PATIENTS\";\n try (PreparedStatement ps = this.transaction.prepareStatement(query); ResultSet rs = ps.executeQuery()) {\n while (rs.next()) {\n patients.add(new Patient(rs));\n }\n } catch (SQLException ex) {\n ex.printStackTrace(System.out);\n }\n\n return patients;\n }", "private Collection getInstances() {\n \t\tCollection instances=null;\r\n\r\n //instances = cls.getInstances();\r\n \t\tRDFProperty ready = owlModel.getRDFProperty(oTab.namespacePrefix + \":\" + oTab.pReady);\r\n\r\n \t\tif ( ready != null )\r\n \t\t{\r\n \t\t\tinstances = owlModel.getRDFResourcesWithPropertyValue(ready, true);\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\tSystem.out.println(\"*** Could not lookup property defintion for \" + oTab.namespacePrefix + \":\" + oTab.pReady + \" Ontology not imported\");\r\n \t\t}\r\n\r\n return instances;\r\n }", "Collection<? extends WrappedIndividual> getHas();", "@Override\r\n\tpublic List<Crew> getAllCrew() {\r\n\t\tList<Crew> crew = new ArrayList<>();\r\n\t\tcrew.addAll(pilots);\r\n\t\tcrew.addAll(cabinCrew);\r\n\t\treturn crew;\r\n\t}", "ArrayList<RecipeObject> getRecipes();", "public abstract List<Patient> getAllPatientNode();", "Collection<T> getSimpleModelObjects();", "@Override\r\n public List<Damagething> damfindAll() {\n return userMapper.damfindAll();\r\n }", "@GetMapping ( BASE_PATH + \"/pharmacies\" )\n public List<Pharmacy> getPharmacies () {\n final List<Pharmacy> all = Pharmacy.getPharmacies();\n for ( final Pharmacy pharmacy : all ) {\n pharmacy.nullPrescriptions();\n }\n return all;\n }", "public List<Registery> getAllRegisteryItems() {\n\t\treturn allRegisteryItems;\n\t}", "public Collection<GObject> getObjects();", "public List<Patient> getFHIR() {\n IGenericClient client;\n FhirContext ctx;\n ctx = FhirContext.forDstu3();\n ctx.setRestfulClientFactory(new OkHttpRestfulClientFactory(ctx));\n client = ctx.newRestfulGenericClient(\"http://fhirtest.uhn.ca/baseDstu3\");\n\n // .lastUpdated(new DateRangeParam(\"2011-01-01\",\"2018-11-25\")) - to get latest data\n // Not used since unable to get proper records with names\n Bundle bundle = client.search().forResource(Patient.class)\n .where(Patient.NAME.isMissing(false))\n .and(Patient.BIRTHDATE.isMissing(false))\n .and(Patient.GENDER.isMissing(false))\n .sort().ascending(Patient.NAME)\n .count(10)\n .returnBundle(Bundle.class)\n .execute();\n return BundleUtil.toListOfResourcesOfType(ctx, bundle, Patient.class);\n }", "public abstract List<Object> getAll();", "Collection<? extends Object> getHadithNo();", "protected static List<Critter> getBabies() {\n\t\t\treturn babies;\n\t\t}", "protected static List<Critter> getBabies() {\n\t\t\treturn babies;\n\t\t}", "@Override\n\tpublic Set<OWLEntity> getAllConcepts() {\n\t\tSet<OWLEntity> result = new HashSet<OWLEntity>();\n\t\tresult.addAll(ontology.getClassesInSignature());\n\t\tresult.addAll(ontology.getIndividualsInSignature());\n\t\treturn result;\n\t}", "@Override\r\n\tpublic List<Item> getAllHomework() {\n\t\t\r\n\t\treturn itemdao.find(\"from Item\");\r\n\t}", "@Override\n\tpublic List<Resident> getAll() {\n\t\tList<Resident> list = null;\n\t\ttry {\n\t\t\tlist = repository.findAll();\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn list;\n\t}", "@Override\n\tpublic List<ComBorrowings> getAllComBorrowingsInfo() {\n\t\treturn comBorrowingsMapper.selectByExample(new ComBorrowingsExample());\n\t}", "public Iterable<Boat> boatsOwnedByMember(){ return this.boats; }", "Collection<? extends WrappedIndividual> getHasPart();", "public ArrayList <TreasureKind> getSpecificVisibleTreasures () {\n \n return this.specificVisibleTreasures; \n }", "@Programmatic\n public Collection<ObjectSpecification> allSpecifications() {\n return Lists.newArrayList(allCachedSpecifications());\n }", "Collection<? extends Computer> getProduces();", "public List<SamplePerson> getAllPeople() {\n //TODO\n throw new NotImplementedException();\n }", "public List<Guitar> getAll() {\n\t\tResultSet rs=GuitarJDBC.executeQuery(\"select * from guitar;\",new Object[]{});\n\t\tList<Guitar> guitars=new ArrayList<Guitar>();\n\t\ttry{\n\t\t\twhile(rs.next()){\n\t\t\t\tGuitar guitar=new Guitar();\n\t\t\t\tguitar.setSerialNumber(rs.getString(1));\n\t\t\t\tguitar.setPrice(rs.getDouble(2));\n\t\t\t\tguitar.setBuilder(rs.getString(3));\n\t\t\t\tguitar.setModel(rs.getString(4));\n\t\t\t\tguitar.setType(rs.getString(5));\n\t\t\t\tguitar.setBackWood(rs.getString(6));\n\t\t\t\tguitar.setTopWood(rs.getString(7));\n\t\t\t\tguitars.add(guitar);\n\t\t\t}\n\t\t\t\n\t\t}catch(SQLException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn guitars;\n}", "org.hl7.fhir.ObservationRelated[] getRelatedArray();", "public List<Patient> listAllPatient() {\n\t\treturn null;\n\t}", "public void getSpecialtiesByTopicID(final String topicID,\n final ServiceClientCompletion<ResponseResult> completion)\n {\n final HashMap<String, String> headers =\n getHeaderWithAccessToken(mSharecareToken.accessToken);\n final String endPoint =\n String.format(GET_SPECIALTIES_ENDPOINT, topicID);\n this.beginRequest(endPoint, ServiceMethod.GET, headers, null,\n (String)null, ServiceResponseFormat.GSON,\n new ServiceResponseTransform<JsonElement, ResponseResult>()\n {\n @Override\n public ResponseResult transformResponseData(\n final JsonElement json)\n throws ServiceResponseTransformException\n {\n final ResponseResult result =\n checkResultFromAuthService(json);\n final JsonElement response = getResponseFromJson(json);\n if (result.success && response != null\n && response.isJsonArray())\n {\n final ArrayList<Specialty> specialties =\n new ArrayList<Specialty>();\n for (final JsonElement element : response\n .getAsJsonArray())\n {\n if (element.isJsonObject())\n {\n final JsonObject specialtyJson =\n element.getAsJsonObject();\n final String identifier =\n getStringFromJson(specialtyJson, ID);\n final String name =\n getStringFromJson(specialtyJson, NAME);\n final ArrayList<SpecialtyTag> tags =\n new ArrayList<SpecialtyTag>();\n if (getJsonArrayFromJson(specialtyJson, TAGS) != null)\n {\n for (final JsonElement tagElement : getJsonArrayFromJson(\n specialtyJson, TAGS))\n {\n if (tagElement.isJsonObject())\n {\n final JsonObject tagJson =\n tagElement.getAsJsonObject();\n final String tagID =\n getStringFromJson(tagJson, ID);\n final String tagType =\n getStringFromJson(tagJson, TYPE);\n final SpecialtyTag tag =\n new SpecialtyTag(tagID, tagType);\n tags.add(tag);\n }\n }\n }\n final Specialty specialty =\n new Specialty(identifier, name, tags);\n specialties.add(specialty);\n }\n }\n if (specialties.size() > 0)\n {\n final HashMap<String, Object> parameters =\n new HashMap<String, Object>(1);\n parameters.put(\"specialties\", specialties);\n result.parameters = parameters;\n }\n }\n else if (response != null)\n {\n try\n {\n result.errorMessage = response.getAsString();\n }\n catch (final ClassCastException e)\n {\n// Crashlytics.logException(e);\n }\n }\n LogError(\"getSpecialtiesByTopicID\", result);\n return result;\n }\n }, completion);\n }", "public abstract Set<Genome> getAvailableGenomes();", "@Override\n public ArrayList<Thing> getNonCurrentUserThings() {\n User owner = new User();\n owner.setFirstName(\"Bob\");\n owner.setLastName(\"Jones\");\n owner.setEmail(\"bjones@ualberta.ca\");\n\n ArrayList<Thing> things = new ArrayList<>();\n for (int i = 0; i < 15; ++i) {\n Thing thing = new Thing(owner);\n thing.setOwner(owner); // ???\n thing.setTitle(\"Thing \" + (i + 1));\n thing.setDescription(\"The description of Thing \" + (i + 1));\n\n things.add(thing);\n }\n\n return things;\n }", "public List getAll(){\n\t\tList<Person> personList = personRepository.getAll();\n\t\treturn personList;\n\t}", "public List getChildren(){\n List result = new ArrayList();\n Iterator it = getSpecialisation().iterator();\n while(it.hasNext()){\n Generalization g = (Generalization)it.next(); \n result.add(g.getChild());\n //System.out.println(\" \"+getName()+\" Parent:\" +g.getParent().getName());\n }\n return result;\n }", "public Collection<Question> getQuestions();", "Collection<? extends Object> getHas_certainty();", "@Override\r\n\tpublic List<Supplies> findall() {\n\t\treturn suppliesDao.findall();\r\n\t}", "@GetMapping(\"/parties\")\n\tpublic ResponseEntity<List<Party>> getAllParties() {\n\t\treturn new ResponseEntity<>(dataFetchService.getAllParties(), HttpStatus.OK);\n\t}", "@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 }", "public abstract List<AbstractCapability> getCapabilities();", "public StateVariable getRelevantObjects () {\n return relevantObjects;\n }", "public java.util.ArrayList<Species> getAllSpecies() {\n ArrayList<Species> answer = new ArrayList<Species>();\n getAllDescendantSpecies(overallRoot, answer);\n return answer;\n \n }", "public Vector getListSpecializations(){\n Vector listQualifications = new Vector();\n try{\n String sqlGet = \"SELECT * FROM qualification ORDER BY qualification_name\";\n\n ResultSet rsGet = this.queryData(sqlGet);\n int order = 0;\n while(rsGet.next()){\n order++;\n Vector dataSet = new Vector();\n dataSet.add(rsGet.getInt(\"qualification_id\"));\n dataSet.add(rsGet.getString(\"qualification_name\"));\n\n listQualifications.add(dataSet);\n }\n } catch(Exception e){\n System.out.println(e.getMessage());\n }\n return listQualifications;\n }", "public Collection<T> getOthers() {\n return others;\n }", "@Override\n\tpublic List<PropertyRooms> findRoomByTenancyDetailsIncludingVacantRooms(\n\t\t\tTenancyForm occupiedBy) {\n\t\tList<PropertyRooms> rooms1=hibernateTemplate.find(\"from PropertyRooms where occupiedBy=? \",occupiedBy);\n\t\tList<PropertyRooms> rooms2=hibernateTemplate.find(\"from PropertyRooms where isOccupied=?\",'N');\n\t\t\n\t\trooms1.addAll(rooms2);\n\t\t\n\t\treturn rooms1;\n\t}", "public List<Resident> getAllResidents();", "public List<People> getPeople();", "private void getItems() {\n getComputers();\n getPrinters();\n }", "List<Question> getQuestionsUsed();", "public ArrayList<Human> getResidents(){\n return this.residents;\n }", "public abstract Collection<Turtle> getAllTurtles();", "public List getGonePatients() {\n\t\treturn _gonePatients;\n\t}", "public String getQualities() {\n \treturn \"Icy \"+super.getQualities();\n }", "public People getMyPeople()\n {\n return myCamp;\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 }", "@Override\n\tpublic List<Equipment> getAllEquipmet() {\n\t\treturn dao.getAllEquipmet();\n\t}", "public List<Treasure> giveInventory() {\r\n return treasures;\r\n }", "boolean findSpecialtyContainers(){\n\t\t\tif (this.receptacle != null)//checks and sees if there's any containers in the location.\n\t\t\t\tfor (int i = 0; i < this.receptacle.size(); i++)\n\t\t\t\t\tif ((this.receptacle.get(i) instanceof SpecialtyContainer))\n\t\t\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}", "public SpecialDepot() {\n specialContainers = new ArrayList<>();\n }", "public List<Objective> getObjectives() {\n return this.tracker.getObjectives();\n }", "public List<MLocoBoggie> getboogie() {\n\t\t\t\tList<MLocoBoggie> getboogies = new ArrayList<>();\n\t\t\t\tobj_boogierepo.findAll()\n\t\t\t\t.forEach(getboogies::add);\n\n\t\t\t\treturn getboogies;\t\t\t\t\n\t\t\t\t\t\t}", "public List<equipment> getAllEquipments (){\n return equiomentResprositery.findAll();\n }", "public ArrayList<Patient> getPatients() {\n return this.patients;\n }", "private void getObjects() {\n\t\tmeteors = go.getMeteors();\n\t\texplosions = go.getExplosions();\n\t\ttargets = go.getTargets();\n\t\tcrosses = go.getCrosses();\n\t\trockets = go.getRockets();\n\t\tearth = go.getEarth();\n\t}", "@GET\n @Produces(\"application/json\")\n public static List<CRoom> roomAll() {\n return (List<CRoom>) sCrudRoom.findWithNamedQuery(CRoom.FIND_ROOM_BY_ALL);\n }", "@SuppressWarnings(\"unchecked\")\n\t@PersistenceContext\n\tpublic static List<KoeficientObject> getInListAllValueKoeficientObject() {\n\t\tEntityManagerFactory emfactory = GlobalVariableForSQL_DBase.getDBase();\n\t\tEntityManager entitymanager = GlobalVariableForSQL_DBase.getEntityManagerDBase(emfactory);\n\t\tentitymanager.getTransaction().begin();\n\t\tQuery query = entitymanager.createNamedQuery(\"getListAllKoeficientObject\");\n\t\tList<KoeficientObject> list = query.getResultList();\n\t\tentitymanager.close();\n\t\temfactory.close();\n\t\treturn list;\n\t}", "public List<Supplier> getSuppliers(){ \n\t List<Supplier> list=new ArrayList<Supplier>(); \n\t list=template.loadAll(Supplier.class); \n\t return list; \n\t}", "public abstract Collection<Integer> getActiveTurtlesByID();", "@Override\n\tpublic List<Patient> findAll() {\n\t\t// setting logger info\n\t\tlogger.info(\"Find the details of the patient\");\n\t\treturn patientRepo.findAll();\n\t}", "List<BInformation> findAll();", "@Override\n public List<Information> findAllInfo() {\n return infoDao.findAll();\n }", "public List<Qualification> getQualifications() {\n return qualifications;\n }", "Collection<Item> getInventory();" ]
[ "0.6367863", "0.6066509", "0.5967917", "0.58578324", "0.58364964", "0.56016546", "0.5554539", "0.5481184", "0.5444588", "0.5422911", "0.53991765", "0.5393651", "0.53870726", "0.5337464", "0.53299826", "0.532691", "0.5279058", "0.52604544", "0.52322835", "0.52233505", "0.52178884", "0.5208629", "0.52004737", "0.5187003", "0.5185471", "0.5182412", "0.51811385", "0.5174579", "0.5174027", "0.51457524", "0.5136476", "0.5117519", "0.5100163", "0.50995594", "0.5099164", "0.5092157", "0.5080481", "0.5075718", "0.5065651", "0.50576043", "0.5049833", "0.50366175", "0.5035984", "0.5035984", "0.50198877", "0.5013791", "0.50125843", "0.50119585", "0.5006888", "0.5005956", "0.49967852", "0.49931052", "0.49909812", "0.49871323", "0.49812874", "0.49774066", "0.4977295", "0.4967768", "0.4966892", "0.49656484", "0.49653217", "0.4955799", "0.49514234", "0.49474734", "0.49462527", "0.49401745", "0.49362904", "0.493576", "0.49313286", "0.49301904", "0.49292326", "0.49267313", "0.49224642", "0.49216908", "0.49174333", "0.49112546", "0.49111214", "0.49103257", "0.49098638", "0.49077922", "0.49076962", "0.49042577", "0.489919", "0.48970184", "0.48965913", "0.48941803", "0.48895445", "0.4887343", "0.48847654", "0.48805535", "0.48732764", "0.48719737", "0.4869577", "0.48688218", "0.48613432", "0.48603442", "0.48375636", "0.48359478", "0.4832983", "0.48298565", "0.4829723" ]
0.0
-1
/ Get the username with two first names
@Override public void initialize(URL url, ResourceBundle rb) { String name; String[] nameSplitted = user.getUserName().split(" "); if (nameSplitted.length > 1) { name = nameSplitted[0] + " " + nameSplitted[1]; } else { name = nameSplitted[0]; } userName.setText(name); /* * Specialty ComboBox */ try { specialtyCombo(); } catch (ClassNotFoundException | NullPointerException | InstantiationException | SQLException | IllegalAccessException e) { e.printStackTrace(); } /* * Doctor ComboBox */ try { doctorCombo(); } catch (ClassNotFoundException | NullPointerException | InstantiationException | SQLException | IllegalAccessException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getFirstName();", "java.lang.String getFirstName();", "public java.lang.String getFirstName();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getSurname();", "public void getFirstAndLastName( String name ){//\r\n String nameNew = name.trim();\r\n String[] arr = nameNew.split(\"\\\\s\");\r\n firstName = arr[0];\r\n lastName = arr[1];\r\n }", "java.lang.String getUserName();", "java.lang.String getUserName();", "java.lang.String getUserName();", "public String getPlayerTwoUserName() {\n if (gameStatus == null) return \"\";\n if (gameStatus.getPlayerTwoUserName() == null) return \"\";\n return gameStatus.getPlayerTwoUserName();\n }", "public static String getShortName(String longName) {\n StringTokenizer strtok = new StringTokenizer(longName,\",\");\n String shortUserName = null;\n if (strtok.countTokens() > 1) {\n while ((null!=strtok) && (strtok.hasMoreTokens())) {\n\n String mytok1 = strtok.nextToken();\n if (null!=mytok1) {\n //filter for the shortened name\n StringTokenizer innerToken = new StringTokenizer(mytok1,\"=\");\n if ((null!=innerToken)&&(innerToken.countTokens()==2)) {\n String key = innerToken.nextToken();\n if (null!=key) {\n if ((key.equalsIgnoreCase(\"cn\"))||(key.equalsIgnoreCase(\"uid\"))) {\n shortUserName = innerToken.nextToken();\n break;\n }\n }\n }\n } //end:if (null!=mytok1) {\n } //end: while\n } else if (longName.contains(\"@\")) {\n shortUserName = longName.substring(0, longName.indexOf(\"@\"));\n }\n return shortUserName;\n }", "String getSurname();", "String getFirstName();", "String getFirstName();", "String getFirstName();", "protected void validateFirstName(){\n Boolean firstName = Pattern.matches(\"[A-Z][a-z]{2,}\",getFirstName());\n System.out.println(nameResult(firstName));\n }", "String getUserUsername();", "String getUserName();", "String getUserName();", "@Override\n\tpublic java.lang.String getUserName() {\n\t\treturn _second.getUserName();\n\t}", "private static void RecommendedUserNames(String first, String last) {\n\t\tString [][] usernames = new String [2][2];\n\t\tint [] RandomNumbers = new int [4];\n\t\tfor (int i=0; i < 4; i++) {\n\t\t\tRandomNumbers[i]=(int)(Math.random()*100);\n\t\t}\n\t\tint k = 0;\n\t\tSystem.out.println(\"Choose a unique username, some of the recommended ones for you are below\");\n\t\tfor (int i = 0; i < 2; i++)\n\t\t\tfor (int j = 0; j < 2; j++) {\n\t\t\t\tif (k%2==0) usernames[i][j] = first+last+RandomNumbers[k];\n\t\t\t\telse usernames[i][j] = last+first+RandomNumbers[k];\n\t\t\t\tk++;\n\t\t\t\tSystem.out.println(usernames[i][j]+ \" \");\n\t\t\t}\n\t\tSystem.out.println();\n\t}", "String getUsername();", "String getUsername();", "String getUsername();", "String getUsername();", "String getUsername();", "String getUsername();", "String extractUserNameFromData(String userInfoDataFromServer);", "public String getGoogleUserFirstName(){\n return (String) attributes.get(GOOGLE_USER_FIRST_NAME);\n }", "@Override\n\tpublic List<String> findFirstNames() {\n\t\treturn userDao.findFirstNames(true);\n\t}", "public static String getFirstName() {\n String firstName = \"George\";\n String lastName = \"Washington\";\n return lastName;\n }", "java.lang.String getLastName();", "java.lang.String getLastName();", "String getLastName();", "String getLastName();", "public String getFirstName();", "public User getUserByName(String username);", "public User getUserByName(String username);", "public java.lang.String getUserFirstName() {\r\n return userFirstName;\r\n }", "Collection<String> getUsernames();", "public static String getNameTwo() {\n\tString name;\n\tname = playerTwoName.getText();\n\treturn name;\n\n }", "public String getFirstname() {\n return (String) get(\"firstname\");\n }", "public String getFirstname() throws Exception\r\n\t{\r\n\t\tString SQL_USER = \"SELECT firstname FROM user WHERE id=?;\";\r\n\t\tString returnValue=\"\";\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\t\t\tstatement.setInt(1, userId);\r\n\t\t\tResultSet result = statement.executeQuery();\r\n\r\n\t\t\t// If this returns true, then the user already exists.\r\n\t\t\tif (!result.next())\r\n\t\t\t{\r\n\t\t\t\tthrow new Exception(\"No student found! (getFirstname)\");\r\n\t\t\t}\r\n\r\n\t\t\t// Return the successfully user.\r\n\t\t\treturnValue = result.getString(\"firstname\");\r\n\t\t} catch (Exception e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in getFirstname()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t\treturn returnValue;\r\n\t}", "@AutoEscape\n\tpublic String getFirstName();", "@Override\n\tpublic List<User> getFirstNamesLike(String username) {\n\t\tQuery query = entityManager.createNativeQuery(\"SELECT em.* FROM spring_data_jpa_example.username as em \" +\n \"WHERE em.username LIKE ?\", User.class);\n query.setParameter(1, username + \"%\");\n return query.getResultList();\n\t}", "String fullName();", "private String[] getFullName(String nameTag) {\r\n try {\r\n String firstName = \"-\", lastName = \"-\";\r\n String fullName[] = new String[2];\r\n\r\n String filter = \"uid=\" + nameTag;\r\n\r\n String[] attrIDs = {\"givenName\", \"sn\", \"status\"};\r\n SearchControls sc = new SearchControls();\r\n sc.setReturningAttributes(attrIDs);\r\n sc.setSearchScope(SearchControls.SUBTREE_SCOPE);\r\n\r\n NamingEnumeration<?> items = ctx.search(BASE, filter, sc);\r\n\r\n if (items != null && items.hasMore()) {\r\n SearchResult sr = (SearchResult) items.next();\r\n String dn = sr.getName();\r\n\r\n if (dn.equals(filter + \",ou=Users\")) {\r\n Attributes attrs = sr.getAttributes();\r\n NamingEnumeration<?> attributs = attrs.getAll();\r\n\r\n while (attributs != null && attributs.hasMore()) {\r\n Attribute attr = (Attribute) attributs.next();\r\n String attrId = attr.getID();\r\n\r\n Object value = attr.get();\r\n\r\n switch (attrId) {\r\n case \"givenName\":\r\n firstName = value.toString();\r\n break;\r\n case \"sn\":\r\n lastName = value.toString();\r\n break;\r\n case \"status\":\r\n if (!value.toString().equals(\"SCHUELER\")) {\r\n continue;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n fullName[0] = firstName;\r\n fullName[1] = lastName;\r\n\r\n return fullName;\r\n } catch (NamingException e) {\r\n Logger.getLogger(LdapDataProvider.class.getSimpleName())\r\n .log(Level.SEVERE, \"Folloging NamingException occured: \\n{0}\", e.getExplanation());\r\n return null;\r\n }\r\n }", "private String getFirstName() {\n System.out.println(\"Enter Your Last Name Of First Letter In Capital \");\n return sc.next();\n }", "@AutoEscape\n\tpublic String getFirst_name();", "String usernameLabel();", "private void updateUserName() {\n\t\t// if the customer has a first and last name update their username to be\n\t\t// the concatenation of their first and last name (in lower case)\n\t\t// else, make their username their first name\n\t\tif (!this.lastName.equals(Customer.EMPTY_LAST_NAME)) {\n\t\t\tthis.userName = (this.firstName + this.lastName).toLowerCase();\n\t\t} else {\n\t\t\tthis.userName = this.firstName.toLowerCase();\n\t\t}\n\t}", "protected void validateLastName(){\n Boolean lastName = Pattern.matches(\"[A-Z][a-z]{2,}\",getLastName());\n System.out.println(nameResult(lastName));\n }", "private void getUserName() {\n if (mAuth.getCurrentUser() != null) {\n nameOfCurrentUser = mAuth.getCurrentUser().getDisplayName();\n Log.d(TAG, \"getUserName: getDisplayName is not null\");\n if (nameOfCurrentUser != null && nameOfCurrentUser.contains(\" \")) {\n String[] nameArray = nameOfCurrentUser.split(\" \");\n personalWelcomeMessage.setText(\"Hello, \" + nameArray[0]);\n Log.d(TAG, \"Name is: \" + personalWelcomeMessage.getText().toString());\n }\n else if (nameOfCurrentUser != null && !nameOfCurrentUser.contains(\" \")) {\n personalWelcomeMessage.setText(\"Hello, \" + nameOfCurrentUser);\n Log.d(TAG, \"Name is: \" + personalWelcomeMessage.getText().toString());\n }\n else if (nameOfCurrentUser==null){\n personalWelcomeMessage.setText(\"Hello\");\n }\n }\n }", "java.lang.String getNickname();", "public String getLastName();", "@Override\r\n\tpublic String getFistName() {\n\t\treturn first_name;\r\n\t}", "public String getFirstname() {\r\n\t\treturn firstname;\r\n\t}", "String getUserName(String userId);", "public List<com.ims.dataAccess.tables.pojos.User> fetchByFirstname(String... values) {\n return fetch(User.USER.FIRSTNAME, values);\n }", "public java.lang.CharSequence getFirstName() {\n return first_name;\n }", "java.lang.String getUserIdTwo();", "public String getFirstName() {\n return userItem.getFirstName();\n }", "public String firstName() { return firstName; }", "String getFirstName( String key ) {\n return developer.firstName;\n }", "List<User> findByFirstname(String firstName);", "@Test\r\n\tpublic void findUserByFirstLetter(){\n\t\tSystem.out.println(userMapper.findUserByFirstLetter('c'));\r\n\t}", "public String generateUsername(String firstname, String lastname) throws SQLException, ClassNotFoundException {\n\t\t//Setup the connection if it does not already exist\n\t\tif(database == null)\n\t\t\tdatabase = new DatabaseHandler();\n\t\t//Sanitize firstname and last name just to be safe\n\t\tString generated = Sanitizer.sanitizeInput(firstname.substring(0,2) + lastname.substring(0,4));\n\t\tStatement findUsernameIfExists;\n \tResultSet Result;\n \tfindUsernameIfExists = database.getConnection().createStatement();\n \t//Loop until we find a username that does not exist.\n \twhile(true) {\n \t//query the database for the generated username\n String query = \"SELECT username FROM personnel WHERE username= \" + generated + \";\";\n \tResult = findUsernameIfExists.executeQuery(query);\n \t//if that username is not occupied then return it to the callee\n \tif(Result.wasNull())\n \t\treturn generated.toLowerCase(); // we only return if we find a unique username\n \telse\n \t{\n \t\t//otherwise mess with it.\n \t\tRandom rand = new Random();\n \t\t//pick a random position to switch the character\n \t\tint position = rand.nextInt(6);\n \t\t//pick a random character to switch with\n \t\tchar c = (char)(rand.nextInt(26) + 'a');\n \t\tchar[] cs = generated.toCharArray();\n \t\t//change the character from a random position with a new random character\n \t\tcs[position] = c;\n \t\tgenerated = new String(cs);\n \t}\n \t//and then check again if that exists.\n \t}\n\t}", "public String getUserName();", "public java.lang.String getLastName();", "public static String getFirstName() {\r\n\t\treturn firstName;\r\n\t}", "public java.lang.CharSequence getFirstName() {\n return first_name;\n }", "@Override\r\n\tpublic String getUsername(String thirdType, String thirdUsername) {\n\t\treturn null;\r\n\t}", "private String extractUsername() {\n return SwingUtil.extract(usernameJTextField, Boolean.TRUE);\n }", "public static String getNameKeyForAssociateMatchKey(String lastname, String firstname) {\n if (lastname == null) {\n lastname = \"\";\n }\n String lastnameFirstword = lastname.split(\"[-]\")[0].toUpperCase();\n\n if (firstname == null) {\n firstname = \"\";\n }\n String firstTwoFirstname = firstname.substring(0, min(2, firstname.length())).toUpperCase();\n\n String name_key = lastnameFirstword + firstTwoFirstname;\n return name_key;\n }", "Optional<String> username();", "com.google.protobuf.ByteString getFirstNameBytes();", "public List<com.ims.dataAccess.tables.pojos.User> fetchRangeOfFirstname(String lowerInclusive, String upperInclusive) {\n return fetchRange(User.USER.FIRSTNAME, lowerInclusive, upperInclusive);\n }", "String getUsernameFromToken(String token);", "public static String getUserName (String name) {\r\n\r\n char intial = name.charAt (0);\r\n String intialString = \"\";\r\n intialString = intialString.valueOf (intial);\r\n name = intialString.toUpperCase () + name;\r\n\r\n return name;\r\n }", "public String getFirstname() {\n\t\treturn firstname;\n\t}", "public String getFirstName(){\r\n\t\treturn firstName;\r\n\t}", "public StringFilter getFirstName() {\n\t\treturn firstName;\n\t}", "@java.lang.Override\n public java.lang.String getFirstName() {\n java.lang.Object ref = firstName_;\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 firstName_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getFirstName() {\n java.lang.Object ref = firstName_;\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 firstName_ = s;\n return s;\n }\n }", "Optional<String> getFirstname();", "public String getFirst_name() {\n return first_name;\n }", "public void getName(ArrayList<String> document) {\r\n name = \"\";\r\n int atIndex = address.indexOf('@');\r\n String username = address.substring(0, atIndex);\r\n for(int i = 0; i < document.size(); i++)\r\n {\r\n String[] words = document.get(i).split(\" \");\r\n for(int j = 0; j < words.length; j++)\r\n {\r\n if(username.contains(words[j].toLowerCase()))\r\n {\r\n name = document.get(i);\r\n break;\r\n }\r\n }\r\n if(!name.equals(\"\"))\r\n {\r\n break;\r\n }\r\n } \r\n }", "public String getFirstName()\r\n\t{\r\n\t\treturn firstName;\r\n\t}", "public String getFirstName() {\n return firstNameField.getText();\n }", "public String getFirstName()\n\t{\n\t\t//local consants\n\n\t\t//local variables\n\n\t\t/*******************************************************************************/\n\n\t\t//Return the firstName.\n\t\treturn firstName;\n\n\t}", "java.lang.String getUser();", "@java.lang.Override\n public java.lang.String getFirstName() {\n java.lang.Object ref = firstName_;\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 firstName_ = s;\n return s;\n }\n }", "public List<User> findUsersByFirstNameContainsOrLastNameContains(String firstName, String lastName);" ]
[ "0.7238141", "0.7238141", "0.6812666", "0.6785645", "0.6785645", "0.6785645", "0.6785645", "0.6785645", "0.6785645", "0.6785645", "0.6785645", "0.6785645", "0.6736211", "0.66744924", "0.66576666", "0.66576666", "0.66576666", "0.665363", "0.66450286", "0.66160715", "0.6610462", "0.6610462", "0.6610462", "0.65900636", "0.64894664", "0.63834083", "0.63834083", "0.6380036", "0.6375917", "0.63627", "0.63627", "0.63627", "0.63627", "0.63627", "0.63627", "0.6350071", "0.63487184", "0.6314761", "0.629275", "0.62898207", "0.62898207", "0.6287266", "0.6287266", "0.622975", "0.62225664", "0.62225664", "0.62031883", "0.61939764", "0.6191779", "0.6190429", "0.6167777", "0.6167655", "0.61368906", "0.6095838", "0.6091775", "0.6080378", "0.60699934", "0.6067606", "0.60668117", "0.6042579", "0.6041817", "0.6038862", "0.6029767", "0.6029543", "0.60294527", "0.60259736", "0.60226345", "0.60202086", "0.60166067", "0.60120267", "0.600545", "0.59977114", "0.5994202", "0.5966214", "0.5960351", "0.59552747", "0.59545326", "0.5951497", "0.59474695", "0.5945177", "0.5930224", "0.59253085", "0.5924976", "0.5918159", "0.59172463", "0.591558", "0.5912208", "0.5909828", "0.5908209", "0.5899084", "0.589768", "0.589768", "0.5894715", "0.58921057", "0.5888842", "0.587382", "0.58730316", "0.58700395", "0.58573055", "0.58554363", "0.5855312" ]
0.0
-1
Encode the user information as a string.
public String encode() { if (password != null) return new StringBuffer() .append(user) .append(COLON) .append(password) .toString(); else return user; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String encode(User user) {\n StringBuilder out = new StringBuilder();\n out.append(user.id).append(FIELD_SEPARATOR);\n out.append(user.isEnabled()).append(FIELD_SEPARATOR);\n out.append(Base64.encodeBase64String(user.name.getBytes())).append(FIELD_SEPARATOR);\n out.append(user.getContext().getAuthenticationMethod().getType().getUniqueIdentifier())\n .append(FIELD_SEPARATOR);\n out.append(user.authenticationCredentials.encode(FIELD_SEPARATOR));\n LOGGER.debug(\"Encoded user: {}\", out);\n return out.toString();\n }", "@Override\n public String toString() {\n return \"userName \" + this.userName + \", pasword \" + this.passWord + \"sex \" + userSex.name();\n }", "@Override\n\tpublic String toString () {\n\t\tString pUser = \"User: \" + getID();\n\t\tString pPass = \"Pass: \" + getPass();\n\t\treturn pUser + \" \" + pPass;\n\t}", "@Override\n public String toString() {\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd'@'HH:mm:ss\");\n String userInformation = new String();\n Date date = new Date();\n userInformation = \"[\" + username + \" - \" +\n socket.getInetAddress().getHostAddress() +\n \":\" + socket.getPort() + \" - \" + formatter.format(date)\n + \"]: \";\n return userInformation;\n }", "@Override\r\n\tpublic String toString() {\r\n\t\t//new toString method for using possible fail checks (validation) later\r\n\t\t//it will not print PASSWORD\r\n\t\treturn String.format(\"UserID: \"+ userID +\"\\nUsername: \"+ username +\"\\nWeight: \"+ weight);\r\n\t}", "@Override\n public String toString() {\n StringBuffer sb = new StringBuffer(\"[User |\");\n sb.append(\" iduser=\").append(getIduser());\n sb.append(\"]\");\n return sb.toString();\n }", "@Override\n public String toString() {\n String output = \"User Info for: \" + getId();\n output += \"\\n\\tName: \" + getFirstName() + \" \" + getLastName();\n output += \"\\n\\tCreated on: \" + DF.format(getEnrolDate());\n output += \"\\n\\tLast access: \" + DF.format(getLastAccess());\n \n return output;\n }", "public String toString () {\n\t\treturn \"User, name = \" + this.getName() + \" id = \" + this.getId();\n \t}", "public String toString(){\r\n\t\treturn this.username+\"(\"+this.firstname+\" \"+this.lastname+\")\";\r\n\t}", "@Override\n public String toString() {\n return \"User{\" + \"userId=\" + userId + \", userName=\" + userName + \", password=\" + password + \", email=\" + email + \", loggedIn=\" + loggedIn + '}';\n }", "@Override\n public String toString() {\n return \"User{\" +\n \"id=\" + id +\n \", imgUser=\" + imgUser +\n \", firstName='\" + firstName + '\\'' +\n \", lastName='\" + lastName + '\\'' +\n \", username='\" + username + '\\'' +\n \", email='\" + email + '\\'' +\n \", password='\" + password + '\\'' +\n \", city='\" + city + '\\'' +\n \", country='\" + country + '\\'' +\n \", gender='\" + gender + '\\'' +\n \", birthdate=\" + birthdate +\n \", age=\" + age +\n \", last_access=\" + last_access +\n \", registration_date=\" + registration_date +\n '}';\n }", "@Override\n public String toString() {\n return \"User [id=\" + userId + \", userName=\" + userName + \", password=\" + password\n + \", firstName=\" + firstName + \", lastName=\" + lastName\n + \", email=\" + email + \"]\";\n }", "@Override\n public String toString() {\n return \"User{\" +\n \"Id=\" + Id +\n \", name='\" + name + '\\'' +\n \", email='\" + email + '\\'' +\n \", phoneNumber=\" + phoneNumber +\n \", gender=\" + gender +\n \", age=\" + age +\n \", boardingPass=\" + boardingPass +\n \"'}'\\n\";\n }", "@Override\n public String toString() {\n return \"Username: \" + this.username + \"\\n\";\n }", "public String toString()\r\n/* 61: */ {\r\n/* 62:75 */ return \"User [username=\" + this.username + \", password=\" + this.password + \", email=\" + this.email + \", phone=\" + this.phone + \"]\";\r\n/* 63: */ }", "@Override\n public String toString() {\n return \"User{\" +\n \"id=\" + id +\n \", name='\" + name + '\\'' +\n \", username='\" + username + '\\'' +\n \", password='\" + \"*******\" + '\\'' +\n '}';\n }", "@java.lang.Override\n public java.lang.String toString() {\n return \"User{\"\n + \"id= \"\n + id\n + \"username='\"\n + username\n + '\\''\n + \", password='\"\n + password\n + '\\''\n + \", email='\"\n + email\n + '\\''\n + \", type=\"\n + type\n + '}';\n }", "@Override\n public String toString() {\n \treturn this.getUsername()+\"\\t\\t\"+this.getTel()+\"\\t\\t\"+this.getPassword()+\"\\t\"+this.getMembertypeid()+\"\\t\\t\"+this.getIntegral()+\"\\t\\t\"+this.getAddress();\n }", "@Override\n public String toString(){\n return String.format(\"ApplicationUser ehrId: '%s', shimmerId: '%s', shimKey: '%s', is logged in: '%s'\", applicationUserId.getEhrId(), shimmerId, getApplicationUserId().getShimKey());\n }", "@Override\n public String toString() {\n return username;\n }", "@Override\n\tpublic String toString() {\n\t\treturn username;\n\t}", "@Override\n public String toString() {\n return getUsername();\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn this.id + \">>>>>>\" + this.name+\">>>>>>>\"+this.password;\r\n\t}", "public String toString() {\n\t\treturn \"{\\\"username\\\":\\\"\" + this.username + \"\\\",\\\"apiKey\\\":\\\"\"\n\t\t\t\t+ this.apiKey + \"\\\",\\\"apiSecret:\\\"\" + this.apiSecret\n\t\t\t\t+ \"\\\",\\\"nonce:\\\"\" + this.nonce + \"\\\"}\";\n\t}", "public String toString(){\n return username;\n\n }", "@Override\n public String toString() {\n return \"UserManager{\";\n //+ \"allUsers=\" + allUsers +\n //\"\\n, allPasswords=\" + allPasswords +\n //\"\\n, allUserNames=\" + allUserNames +\n //'}';\n }", "public String getUserinfo() {\n return m_userinfo;\n }", "@Override\n public String toString() {\n return \"--------------------------------------------\\n\"+\n \"username: \" + username + \"\\n\" + \n \"fullName: \" + lastName + \" \" + firstName + \"\\n\" + \n \"password: \" + password + \"\\n\" +\n \"phone: \" + phone + \"\\n\" + \n \"email: \" + email + \"\\n\";\n }", "@Override\n public String toString() {\n return \"User{\" +\n \"id=\" + this.getId() +\n \", name='\" + this.getName() + '\\'' +\n \", password='\" + this.getPassword() + '\\'' +\n \", title='\" + this.getTitle() + '\\'' +\n \", username='\" + this.getUsername() + '\\'' +\n '}';\n }", "@Override\n\tpublic String convertToString(Map context, Object o) {\n\t\tList<User> list=(List<User>)o;\n\t\tStringBuffer sb=new StringBuffer();\n\t\tfor(User user :list){\n\t\t\tString username = user.getUsername();\n\t\t\tString password = user.getPassword();\n\n\t\t\tsb.append(\"username: \").append(username).append(\" ,password: \")\n\t\t\t\t\t.append(password).append(\" \");\n\t\t}\n\t\t\n\t\treturn sb.toString();\n\t}", "public String toString() {\n return userName+\"==\"+firstName+\"==\"+lastName+\"==\"+winPercentage+\"==\"+profileImage;\n }", "@Override\r\n public String toString() {\r\n\t\tStringBuilder sb=new StringBuilder();\r\n\t\tsb.append(\"Usuario{\");\r\n\t\tsb.append(\"emailUsuario\" ).append(\"=\").append(emailUsuario).append(\"|\");\r\n\t\tsb.append(\"contrasenia\" ).append(\"=\").append(contrasenia).append(\"|\");\r\n\t\tsb.append(\"fechaCreacion\" ).append(\"=\").append(fechaCreacion).append(\"|\");\r\n\t\tsb.append(\"nombre\" ).append(\"=\").append(nombre).append(\"|\");\r\n\t\tsb.append(\"apellidoPaterno\" ).append(\"=\").append(apellidoPaterno).append(\"|\");\r\n\t\tsb.append(\"apellidoMaterno\" ).append(\"=\").append(apellidoMaterno).append(\"|\");\r\n\t\tsb.append(\"estatus\" ).append(\"=\").append(estatus).append(\"|\");\r\n\t\tsb.append(\"serialVersionUID=\").append(serialVersionUID).append(\"}\");\r\n\t\treturn sb.toString();\r\n\t}", "@Override\n public String toString() {\n return \"UserEntity{\" +\n \"id=\" + id +\n \", peerId=\" + peerId +\n \", gender=\" + gender +\n \", mainName='\" + mainName + '\\'' +\n \", pinyinName='\" + pinyinName + '\\'' +\n \", realName='\" + realName + '\\'' +\n \", avatar='\" + avatar + '\\'' +\n \", phone='\" + phone + '\\'' +\n \", email='\" + email + '\\'' +\n \", departmentId=\" + departmentId +\n \", status=\" + status +\n \", created=\" + created +\n \", updated=\" + updated +\n \", pinyinElement=\" + pinyinElement +\n \", searchElement=\" + searchElement +\n '}';\n }", "public String showUser(){\n String dataUser = \"\";\n for(int i = 0; i<MAX_USER; i++){\n if(user[i] != null){\n dataUser += user[i].showDataUser();\n }\n }\n return dataUser;\n }", "public static String encodePassword( String object )\n\t{\n\t\tBASE64Encoder encoder = new BASE64Encoder();\n\t\tif ( object != null ) {\n\t\t\ttry {\n\t\t\t\tString encodedPassword = encoder.encode(object.getBytes(\"UTF-8\"));\n\t\t\t\tLOGGER.info(\"encode '\" + object + \"' password as base64 -> '\" + encodedPassword + \"'\");\n\t\t\t\treturn encodedPassword;\n\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\tLOGGER.severe(\"UTF-8 not supported\");\n\t\t\t}\n\t\t}\n\n\n\t\treturn \"\";\n\t}", "@Override\n public String toString() {\n \treturn \"lastname : \"+this.userLastname+\" firstname: \"+this.userFirstname+\" username: \"+this.userLogin+\" email: \"+this.userEmail+\" role: \"+this.roles;\n }", "public String encode() {\n return encodeToBase64(encKey.getEncoded()) + \":\" + encodeToBase64(macKey.getEncoded());\n }", "java.lang.String getUser();", "public String getUser() {\n\treturn strUser;\n }", "@java.lang.Override\n public java.lang.String getUser() {\n java.lang.Object ref = user_;\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 user_ = s;\n return s;\n }\n }", "@Override\n public String toString() {\n return \"\\r\\nUser: \" + user + \" Message: \" + message +\" \\r\\n\" ;\n }", "String getUser();", "String getUser();", "public String toString() {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(this.getClass().getName());\r\n sb.append(\"(\");\r\n\r\n sb.append(\", \").append(\"username=\").append(username);\r\n\r\n sb.append(\", \").append(\"email=\").append(email);\r\n\r\n sb.append(\", \").append(\"ragione_sociale=\").append(ragione_sociale);\r\n\r\n sb.append(\", \").append(\"nome=\").append(nome);\r\n\r\n sb.append(\", \").append(\"cognome=\").append(cognome);\r\n\r\n sb.append(\", \").append(\"immagine=\").append(immagine);\r\n\r\n sb.append(\", \").append(\"data_ultima_modifica=\").append(data_ultima_modifica);\r\n\r\n sb.append(\", \").append(\"oggetti=\").append(oggetti);\r\n\r\n sb.append(\", \").append(\"prestiti=\").append(prestiti);\r\n\r\n sb.append(\")\");\r\n return sb.toString();\r\n }", "public String toEncryptedString() {\r\n\t\t\r\n\t\t// puts the optional fields as \"??\" if they were blanks.\r\n\t\tif(this.getAddress().length()==0)\r\n\t\t\tthis.setAddress(\"??\");\r\n\t\t\r\n\t\tif(this.getCity().length()==0)\r\n\t\t\tthis.setCity(\"??\");\t\t\r\n\t\t\r\n\t\t// encrypt contact info.\r\n\t\tString line = Method.encrypt(this.getLastName(), true)+\",\"\r\n\t\t\t+Method.encrypt(this.getFirstName(),true)+\",\"\r\n\t\t\t+Method.encrypt(this.getAddress(),true)+\",\"\r\n\t\t\t+Method.encrypt(this.getCity(),true)+\",\"\r\n\t\t\t+Method.encrypt(this.getPhoneNumber(),true);\r\n\t\t\r\n\t\treturn line;\r\n\t}", "public String getUser() {\n if(user == null)\n return \"\"; \n return user;\n }", "@Override\n public String toString() {\n StringBuilder result = new StringBuilder();\n result.append(\"userProfile.id=[\").append(getId()).append(\"]\\n\");\n result.append(\"userProfile.city=[\").append(getCity()).append(\"]\\n\");\n result.append(\"userProfile.country=[\").append(getCountry()).append(\"]\\n\");\n result.append(\"userProfile.title=[\").append(getTitle()).append(\"]\\n\");\n result.append(\"userProfile.firstName=[\").append(getFirstName()).append(\"]\\n\");\n result.append(\"userProfile.lastName=[\").append(getLastName()).append(\"]\\n\");\n result.append(\"userProfile.gender=[\").append(getGender()).append(\"]\\n\");\n return result.toString();\n }", "public String toString() {\r\n\t\tif (!error)\r\n\t\t\treturn \"Username: \" + userName + \"\\nID: \" + id + \"\\nAuthToken: \" + authToken;\r\n\t\telse\r\n\t\t\treturn \"Error: \" + message; \r\n\t}", "@AutoEscape\n\tpublic String getUser_name();", "@Override\n public String toString(){\n StringBuilder s = new StringBuilder();\n\n s.append(\"User\\n\");\n s.append(\"User's name: \" + this.name + \"\\n\");\n s.append(\"User's email: \" + this.email + \"\\n\");\n s.append(\"User's projects:\\n\");\n for(Project p : this.projects.getProjects().values()){\n s.append(\" -> \" + p.toString() + \"\\n\");\n }\n\n return s.toString();\n }", "@Override\n public String toString() {\n return toStringHelper(this)\n .addValue(id)\n .addValue(firstName)\n .addValue(lastName)\n .addValue(email)\n .addValue(activities)\n .addValue(password).toString();\n }", "public java.lang.String getUser() {\n java.lang.Object ref = user_;\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 user_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "String encode(Object obj);", "@Override\n\tpublic String toString() {\n\t\treturn String.format(\"%s %s %s %b %s\", this.email, this.photoURL, this.getDisplayName(), this.isEmailVerified(),\n\t\t\t\tthis.getAccessToken());\n\t}", "public java.lang.String getUser(){\r\n return localUser;\r\n }", "public java.lang.String getUser(){\r\n return localUser;\r\n }", "public java.lang.String getUser(){\r\n return localUser;\r\n }", "public String toString() \r\n {\r\n\t\treturn getLoginID() + \" [Age=\" + getAge() + \", Income=\" + getIncome() + \", Gender=\" + getGender() + \"]\";\r\n\t\t\t\t\r\n\t}", "public String getUser(){\n \treturn user;\n }", "public static String toJson(User user) {\n\n\t\tHashMap<String, Object> obj = new HashMap<String, Object>();\n\t\tobj.put(\"username\", user.getUsername());\n\t\tobj.put(\"session\", user.getSession());\n\t\treturn new Gson().toJson(obj);\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getMlUserDataEncryption() != null)\n sb.append(\"MlUserDataEncryption: \").append(getMlUserDataEncryption()).append(\",\");\n if (getTaskRunSecurityConfigurationName() != null)\n sb.append(\"TaskRunSecurityConfigurationName: \").append(getTaskRunSecurityConfigurationName());\n sb.append(\"}\");\n return sb.toString();\n }", "public String toString() {\r\n\t\tStringBuffer out = new StringBuffer(\"toString: \");\r\n\t\tout.append(\"\\nclass User, mapping to table user\\n\");\r\n\t\tout.append(\"Persistent attributes: \\n\");\r\n\t\tout.append(\"id = \" + this.id + \"\\n\");\r\n\t\tout.append(\"password = \" + this.password + \"\\n\");\r\n\t\tout.append(\"name = \" + this.name + \"\\n\");\r\n\t\tout.append(\"role = \" + this.roles.get(0).getRole() + \"\\n\");\r\n\t\treturn out.toString();\r\n\t}", "public String toString() {\n\t\tStringBuffer sb;\n\t\tsb = new StringBuffer(\"\\nlogin : \" + login);\n\t\tsb.append(\"\\npass : \" + passwd);\n\t\tif (admin) sb.append(\"admin\");\n\t\tif (pcreator) sb.append(\"pcreator\");\n\t\treturn sb.toString();\n\t}", "public UTF8String getUserPass() {\n return this.userPass;\n }", "@Override\n public String toString() {\n return \"User{\" + \"id=\" + id + \", name=\" + name + \", cash=\" + cash + \", skills=\" + skills + \", potions=\" + potions + '}';\n }", "private String getUserData() { \n\t\t \n\t\tString userName;\n\t\tObject principial = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\t\n\t\tif(principial instanceof UserDetails) {\n\t\t\tuserName = ((UserDetails) principial).getUsername();\n\t\t} else {\n\t\t\tuserName = principial.toString(); \n\t\t}\n\t\treturn userName; \n\t}", "java.lang.String getXUsersInfo();", "public String encode( String password );", "public UTF8String getUserName() {\n return this.userName;\n }", "@Override\n\tpublic String toString(){\n\t\treturn \"Account{\"+\n\t\t\t\t\"id=\"+id+\n\t\t\t\t\", email='\"+email+'\\''+\n\t\t\t\t\", user=\"+user+\n\t\t\t\t\", accessLevel=\"+accessLevel+\n\t\t\t\t\", prefs=\"+prefs+\n\t\t\t\t\", createdAt=\"+createdAt+\n\t\t\t\t\", lastActive=\"+lastActive+\n\t\t\t\t\", banInfo=\"+banInfo+\n\t\t\t\t\", activationInfo=\"+activationInfo+\n\t\t\t\t\", invitedBy=\"+invitedBy+\n\t\t\t\t'}';\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", id=\").append(id);\n sb.append(\", encrptPassword=\").append(encrptPassword);\n sb.append(\", userId=\").append(userId);\n sb.append(\", serialVersionUID=\").append(serialVersionUID);\n sb.append(\"]\");\n return sb.toString();\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getName() != null)\n sb.append(\"Name: \").append(getName()).append(\",\");\n if (getPhoneNumber() != null)\n sb.append(\"PhoneNumber: \").append(\"***Sensitive Data Redacted***\").append(\",\");\n if (getEmail() != null)\n sb.append(\"Email: \").append(\"***Sensitive Data Redacted***\").append(\",\");\n if (getIdentificationNumber() != null)\n sb.append(\"IdentificationNumber: \").append(getIdentificationNumber()).append(\",\");\n if (getIdentificationExpirationDate() != null)\n sb.append(\"IdentificationExpirationDate: \").append(getIdentificationExpirationDate()).append(\",\");\n if (getIdentificationIssuingOrg() != null)\n sb.append(\"IdentificationIssuingOrg: \").append(getIdentificationIssuingOrg()).append(\",\");\n if (getDevicePickupId() != null)\n sb.append(\"DevicePickupId: \").append(getDevicePickupId());\n sb.append(\"}\");\n return sb.toString();\n }", "@Override\n public String toString() {\n return \"ID: \" + userID + \" Name: \" + name;\n }", "@Override\n public String toString() {\n return encodedHash.get();\n }", "public synchronized String getUserJSON(String uID) {\n YelpUser u = this.userMap.get(uID);\n if (u == null) {\n return \"ERR: NO_SUCH_USER\";\n } else {\n return gson.toJson(u);\n }\n }", "@Override \n public String toString() \n { \n return \"user\" + \n \"\\n\\t RecordNo: \" + this.recordNo + \n \"\\n\\t EmployeeName: \" + this.name + \n \"\\n\\t Age: \" + this.age + \n \"\\n\\t Sex: \" + this.sex + \n \"\\n\\t Date of Birth: \" + this.dob + \n \"\\n\\t Remark: \" + this.remark; \n }", "private String convertToJson(Users user) throws JsonProcessingException{\n\t ObjectMapper objectMapper = new ObjectMapper();\n\t return objectMapper.writeValueAsString(user); \n\t}", "public String serialize() throws IOException \r\n\t{\r\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\r\n\t\tObjectOutputStream oos = new ObjectOutputStream(baos);\r\n\t\toos.writeObject(this);\r\n\t\toos.close();\r\n\t\treturn new String(Base64Coder.encode(baos.toByteArray()));\r\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getUserBytes() {\n java.lang.Object ref = user_;\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 user_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\r\n public String toString(){\r\n String out = \"Login - \";\r\n out += login;\r\n out += \" Password - \";\r\n out += Encryptor.decrypt(password,login);\r\n return out;\r\n }", "@Override\n public String toString() {\n return String.format(\"[id = %d, PIN: %s, LastName = %s, gender=%s, FirstName: %s]\", id, pin,LastName, gender, FirstName);\n }", "public String getUser() {\r\n return user;\r\n }", "public static String getUser() {\r\n return user;\r\n }", "public String toString() {\n StringBuffer buffer = new StringBuffer();\n\n buffer.append(getClass().getName());\n buffer.append(\"@\");\n buffer.append(Integer.toHexString(hashCode()));\n buffer.append(\" [\");\n buffer.append(\"userId\").append(\"='\").append(userId).append(\"' \");\n buffer.append(\"role\").append(\"='\").append(role).append(\"' \");\n buffer.append(\"]\");\n\n return buffer.toString();\n }", "public String encode() {\n\t\tString encoded_string = ATTRIBUTE_FIELD;\n\t\tif (attribute != null)\n\t\t\tencoded_string += attribute.encode();\n\t\treturn encoded_string + Separators.NEWLINE;\n\t}", "com.google.protobuf.ByteString\n getUserBytes();", "@Override\n public String toString() {\n return getUserName() + \" on \" + getDate() + \"\\n\" + message + \"\\nType: \" + getType();\n }", "public static String getUser() {\n return user;\n }", "public java.lang.String getCreateUser() {\n java.lang.Object ref = createUser_;\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 createUser_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getUser() {\n return user;\n }", "public static String toStringCurrentUser() {\n return new StringBuilder()\n .append(CURRENT_USER.getName())\n .append(\" - \")\n .append(CURRENT_USER.getEmployee().getName())\n .toString();\n }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n // user name\n\n user.put(KEY_ID, pref.getString(KEY_ID, null));\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n user.put(KEY_NAME, pref.getString(KEY_NAME, null));\n return user;\n }", "public String saveUser(User entity) {\n\t\treturn null;\r\n\t}", "private String encodeHeaders( String email, String password) {\n String credentials = email + \":\" + password;\n return Base64.encodeToString(credentials.getBytes(), Base64.DEFAULT).replace(\"\\n\", \"\");\n }", "public String getUser() {\n return user;\n }", "public String getUser() {\n return user;\n }", "public String getUser() {\n return user;\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", coreUserId=\").append(coreUserId);\n sb.append(\", userName=\").append(userName);\n sb.append(\", password=\").append(password);\n sb.append(\", realName=\").append(realName);\n sb.append(\", sex=\").append(sex);\n sb.append(\", birthday=\").append(birthday);\n sb.append(\", mobile=\").append(mobile);\n sb.append(\", email=\").append(email);\n sb.append(\", comment=\").append(comment);\n sb.append(\", status=\").append(status);\n sb.append(\", coreDeptId=\").append(coreDeptId);\n sb.append(\", createdTime=\").append(createdTime);\n sb.append(\", modifiedTime=\").append(modifiedTime);\n sb.append(\", serialVersionUID=\").append(serialVersionUID);\n sb.append(\"]\");\n return sb.toString();\n }", "private String getUsersToString()\n {\n ArrayList<String> list = new ArrayList<>();\n Iterator iterator = userList.entrySet().iterator();\n while (iterator.hasNext())\n {\n Map.Entry mapEntry = (Map.Entry) iterator.next();\n list.add(\"\" + mapEntry.getKey());\n }\n \n String returnString = \"\";\n if(list.size() > 0)\n {\n returnString = list.get(0);\n for(int i = 1; i < list.size(); i++)\n {\n returnString = returnString + \",\" + list.get(i);\n }\n }\n return returnString;\n }", "public String myToString() {\n\t\treturn \t\"User: \" + ((User)value1).toString() +\r\n\t\t\t\t\" | Job: \" + ((Job)key).name +\r\n\t\t\t\t\" | Recruiter: \" + ((Recruiter)value2).toString() +\r\n\t\t\t\t\" | Score: \" + df2.format(score);\r\n\t}" ]
[ "0.72077155", "0.68546", "0.68457186", "0.67812496", "0.67386264", "0.6697105", "0.66965896", "0.65885544", "0.6566731", "0.65517944", "0.6532273", "0.6528184", "0.649604", "0.6491248", "0.6452366", "0.6449778", "0.64443773", "0.64211726", "0.64191675", "0.64027923", "0.63859344", "0.6376375", "0.637347", "0.636031", "0.6329276", "0.63283294", "0.62986314", "0.6287223", "0.627032", "0.6251298", "0.61852425", "0.6126782", "0.6096139", "0.609201", "0.60477185", "0.6036778", "0.6026281", "0.6024106", "0.59966314", "0.5995084", "0.59924656", "0.599182", "0.599182", "0.59698886", "0.59696305", "0.59671015", "0.59602594", "0.59464747", "0.59404933", "0.5939514", "0.59264016", "0.59213793", "0.5908445", "0.58900654", "0.5875702", "0.5875702", "0.5875702", "0.58678", "0.5867039", "0.5861165", "0.58422035", "0.5825075", "0.5816701", "0.5811171", "0.5790745", "0.57811636", "0.5773023", "0.57687813", "0.57559425", "0.5753626", "0.57454425", "0.5741429", "0.573837", "0.57355994", "0.5733779", "0.57247174", "0.57132274", "0.57118994", "0.57097393", "0.5708259", "0.5707221", "0.56859064", "0.5685218", "0.5678141", "0.567421", "0.56591946", "0.5659095", "0.5657037", "0.56524366", "0.5650296", "0.56493586", "0.56466174", "0.5645311", "0.5644588", "0.5643721", "0.5643721", "0.5643721", "0.563892", "0.56307036", "0.5629921" ]
0.78947437
0
Clear the password field.
public void clearPassword() { this.password = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clearPassword() {\n\t\tpassword.setValue(\"\");\n\t}", "private void clearPassword() {\n \n password_ = getDefaultInstance().getPassword();\n }", "private void clearPassword() {\n \n password_ = getDefaultInstance().getPassword();\n }", "public Builder clearPassword() {\n\n password_ = getDefaultInstance().getPassword();\n onChanged();\n return this;\n }", "public Builder clearPassword() {\n bitField0_ = (bitField0_ & ~0x00000002);\n password_ = getDefaultInstance().getPassword();\n onChanged();\n return this;\n }", "public Builder clearPassword() {\n bitField0_ = (bitField0_ & ~0x00000002);\n password_ = getDefaultInstance().getPassword();\n onChanged();\n return this;\n }", "public Builder clearPassword() {\n\n password_ = getDefaultInstance().getPassword();\n onChanged();\n return this;\n }", "public void clearPassword() throws RemoteException;", "public Builder clearPassword() {\n \n password_ = getDefaultInstance().getPassword();\n onChanged();\n return this;\n }", "public Builder clearPassword() {\n \n password_ = getDefaultInstance().getPassword();\n onChanged();\n return this;\n }", "public Builder clearPassword() {\n \n password_ = getDefaultInstance().getPassword();\n onChanged();\n return this;\n }", "private void resetPassword()\n {\n password = null;\n currentPasswdField.setText(\"\");\n currentPasswdField.requestFocusInWindow();\n okButton.setEnabled(false);\n }", "public synchronized void clear() {\n int i;\n int len = password.length;\n\n for(i=0; i < len; i++) {\n password[i] = 0;\n }\n cleared = true;\n }", "private void clearNewPassword() {\n \n newPassword_ = getDefaultInstance().getNewPassword();\n }", "public void passLimpiar(JPasswordField passField){\n passField.setText(\"\");\n }", "public Builder clearPassword() {\n copyOnWrite();\n instance.clearPassword();\n return this;\n }", "public Builder clearPassword() {\n copyOnWrite();\n instance.clearPassword();\n return this;\n }", "public void clearText() {\n\t\tthis.pass.setText(\"\");\n\t}", "public void deletePassword() {\n for (int i=0; i < password.length; i++) {\n password[i] = '0';\n }\n }", "public Builder clearAccountPassword() {\n accountPassword = null;\n fieldSetFlags()[4] = false;\n return this;\n }", "public Builder clearPwd() {\n \n pwd_ = getDefaultInstance().getPwd();\n onChanged();\n return this;\n }", "private void resetFields() {\n userText.setText(\"\");\n passwordText.setText(\"\");\n userText.clearFocus();\n passwordText.clearFocus();\n }", "private void clearJButtonActionPerformed(ActionEvent event) {\n securityCodeJPasswordField.setText(\"\");\n\n }", "public void clearFields(){\n PlayerID.setText(\"\");\n passwordField.setText(\"\");\n }", "@Override\n public void onClick(View v) {\n passwordEt.setInputType(InputType.TYPE_CLASS_TEXT |\n InputType.TYPE_TEXT_VARIATION_PASSWORD);\n passwordEt.setText(\"\");\n\n }", "public Builder clearNewPassword() {\n copyOnWrite();\n instance.clearNewPassword();\n return this;\n }", "@Override\r\n\tpublic void removeField() {\n\t\tusernameField.setText(\"\");\r\n\t\tpassField.setText(\"\");\r\n\t}", "private void clearFields() {\n login.clear();\n password.clear();\n\n }", "public Builder clearPasswd() {\n bitField0_ = (bitField0_ & ~0x00000004);\n passwd_ = getDefaultInstance().getPasswd();\n onChanged();\n return this;\n }", "@Override\n public void onClick(View v) {\n passwordEt.setInputType(InputType.TYPE_CLASS_NUMBER |\n InputType.TYPE_NUMBER_VARIATION_PASSWORD);\n passwordEt.setText(\"\");\n }", "public final GetHTTP removePassword() {\n properties.remove(PASSWORD_PROPERTY);\n return this;\n }", "private void clearField(){\n passwordField.setText(\"\");\n mailField.setText(\"\");\n stateImg.setImage( crossImg);\n stateImg.setVisible(false);\n\n }", "protected void resetFocus() {\r\n passwordField.requestFocusInWindow();\r\n }", "private void resetText() {\n\t\tpass.setText(\"\");\n\t}", "public Builder clearBankPassword() {\n bankPassword = null;\n fieldSetFlags()[9] = false;\n return this;\n }", "public Builder clearFundPassword() {\n fundPassword = null;\n fieldSetFlags()[5] = false;\n return this;\n }", "private void clear() {\n\t\tmRegister.setText(\"\");\n\t\tmName.setText(\"\");\n\t\tmUsername.setText(\"\");\n\t\tmPassword.setText(\"\");\n\t\tmPhone.setText(\"\");\n\t\tmEmail.setText(\"\");\n\t}", "public void clearAll() {\n usernameField.setText(\"\");\n passwordField.setText(\"\");\n errorMessageLabel.clear();\n }", "public void setPassword(String pw) {\n password = pw.toCharArray();\n cleared = false;\n }", "protected void resetFocus() {\n passwordPF.requestFocusInWindow();\n }", "private void clear() {//将文本框等状态置零\n\t\tusername.setText(\"\");\n\t\tpass.setText(\"\");\n\t\tname.setText(\"\");\n\t\tsex1.setSelected(true);\n\t\ttel.setText(\"\");\n\t\taddr.setText(\"\");\n\t\trole.setSelectedIndex(0);\n\t\tusername.grabFocus();\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tuser.setText(\"\");\n\t\t\t\tpwd.setText(\"\");\n\t\t\t\t\n\t\t\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n tf_user.setText(\"\");\n tf_password.setText(\"\");\n }", "@Override\r\n public void onFocusChange(View v, boolean hasFocus) {\r\n if (hasFocus)\r\n passwordEditText.setText(\"\");\r\n }", "void clear()\n {\n captcha.reset();\n requestToken.setEnabled(false);\n username.setValue(\"\");\n greeting.setValue(\"\");\n token.setValue(\"\");\n newPassword.setValue(\"\");\n newPasswordRepeat.setValue(\"\");\n show(REQUEST_TOKEN);\n }", "public Builder clearPass() {\n bitField0_ = (bitField0_ & ~0x00000002);\n pass_ = getDefaultInstance().getPass();\n onChanged();\n return this;\n }", "public Builder clearPass() {\n bitField0_ = (bitField0_ & ~0x00000002);\n pass_ = getDefaultInstance().getPass();\n onChanged();\n return this;\n }", "private void clearChangePasswordRsp() {\n if (rspCase_ == 15) {\n rspCase_ = 0;\n rsp_ = null;\n }\n }", "public void clearStatus(){\r\n\t\tmsgActionResult=null;\r\n\t\tcurrentPasswordConfirmed = false;\r\n\t\tpassword = \"\";\r\n\t}", "@Override\n public void focusGained(FocusEvent arg0) {\n if(jpassword.getPassword().equals(\"password\")){\n jpassword.setText(\"\");\n }\n }", "protected void resetValue(ActionEvent e) {\n\t\toldPasswordTextField.setText(\"\");\r\n\t\tnewPasswordTextField.setText(\"\");\r\n\t\tconfirmPasswordTextField.setText(\"\");\r\n\t}", "public void reset() {\n\t\t\t// clear the field\n\t\t\ttextField.setValue(null);\n\t\t}", "@Override\n public String getPassword() {\n return null;\n }", "private void reset() {\n usernameTextField.setText(\"Username\");\n usernameTextField.setForeground(new Color(153,153,153));\n passwordTextField.setText(\"Password\");\n passwordTextField.setForeground(new Color(153,153,153));\n }", "public void resetPassword(MouseEvent e){\n\t\tPassword.setStyle(\"-fx-text-box-border: white; -fx-focus-color: #008ED6;\");\n\t\tPassword.clear();\n\t\tpasswrong.setStyle(\"-fx-opacity: 0;\");\n\t}", "@Test\n public void clear() {\n page.textInput.sendKeys(\"coffee\");\n waiter.waitForElementAttributeEqualsString(page.textInput, \"value\", \"coffee\", driver);\n //clear the textInput field, retype the String \"coffee\"\n page.textInput.clear();\n page.textInput.sendKeys(\"coffee\");\n waiter.waitForElementAttributeEqualsString(page.textInput, \"value\", \"coffee\", driver);\n\n page.textarea.sendKeys(\"1234567890\");\n //after typing, the text in the field will be \"1234567890\"\n waiter.waitForElementAttributeEqualsString(page.textarea, \"value\", \"1234567890\", driver); //clear the field\n page.textarea.clear();\n //type the same text again and the text in the field becomes \"1234567890\"\n page.textarea.sendKeys(\"1234567890\");\n waiter.waitForElementAttributeEqualsString(page.textarea, \"value\", \"1234567890\", driver);\n }", "@Override\npublic String getPassword() {\n\treturn null;\n}", "private void clearTextFields() {\r\n\r\n\t\ttxfLoginEmail.clear();\r\n\t\ttxfLoginEmail.setPromptText(\"bartsimpson@lyit.ie\");\r\n\t\tpwfLoginPassword.clear();\r\n\t\ttxfFName.clear();\r\n\t\ttxfFName.setPromptText(\"Enter First Name\");\r\n\t\ttxfSName.clear();\r\n\t\ttxfSName.setPromptText(\"Enter Surname\");\r\n\t\ttxfEmail.clear();\r\n\t\ttxfEmail.setPromptText(\"Enter Email Address\");\r\n\t\ttxfPassword.clear();\r\n\t\ttxfPassword.setPromptText(\"Enter Password\");\r\n\t}", "public void resetField() {\n txtFirstname.setText(\"\");\n txtLastname.setText(\"\");\n txtEmail.setText(\"\");\n }", "public void setPassword(String text) {\n txtPassword().setText(text);\n }", "public void logOut() {\n\t\tToken.getIstance().setHashPassword(null);\n\t}", "@Override\n\t\t\t\tpublic String getPassword() {\n\t\t\t\t\treturn null;\n\t\t\t\t}", "@Override\n\tpublic String getPassword() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getPassword() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getPassword() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getPassword() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getPassword() {\n\t\treturn null;\n\t}", "public void setPassword(java.lang.String newPassword);", "public void setPassword(String password) {\n setObject(\"password\", (password != null) ? password : \"\");\n }", "private void emptyInputEditText() {\n textInputEditTextUsername.setText(null);\n textInputEditTextPassword.setText(null);\n }", "private void clearTextInput() {\n\t\ttextInput.setText(\"\");\n\t}", "public Builder clearSecuPwdFlag() {\n secuPwdFlag = null;\n fieldSetFlags()[11] = false;\n return this;\n }", "private void clearEditTexts() {\n mEmail_Edt.setText(\"\");\n mPassword_Edt.setText(\"\");\n }", "public void sendPassword(String password) {\r\n\t\tthis.password.clear(); \r\n\t\tthis.password.sendKeys(password); \r\n\t}", "private void setPassword(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n password_ = value;\n }", "private void setPassword(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n password_ = value;\n }", "void setPassword(Password newPassword, String plainPassword) throws NoUserSelectedException;", "void txtClear () {\r\n\r\n\t\ttxtNo.setText (\"\");\r\n\t\ttxtName.setText (\"\");\r\n\t\ttxtDeposit.setText (\"\");\r\n\t\ttxtNo.requestFocus ();\r\n\r\n\t}", "@ZAttr(id=254)\n public void unsetAuthLdapSearchBindPassword() throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraAuthLdapSearchBindPassword, \"\");\n getProvisioning().modifyAttrs(this, attrs);\n }", "private void eraseFieldsContent() {\r\n\t\ttxPassword.setText(\"\");\r\n\t\ttxUsuario.setText(\"\");\r\n\t\tcheckAdmin.setIndeterminate(true);\r\n\t\tcheckTPV.setIndeterminate(true);\r\n\t}", "public void setPasswordValue(String value) {\r\n\t\ttxtPassword.setValue(value);\r\n\t}", "void setPassword(String password);", "void setPassword(String password);", "void setPassword(String password);", "public Builder clearChangePasswordRsp() {\n copyOnWrite();\n instance.clearChangePasswordRsp();\n return this;\n }", "private void clearChangePasswordReq() {\n if (reqCase_ == 11) {\n reqCase_ = 0;\n req_ = null;\n }\n }", "@Override\n public void focusGained(FocusEvent arg0) {\n if(jTextField_Create_Savings_Acc_pass.getPassword().equals(\"xxx\")){\n jTextField_Create_Savings_Acc_pass.setText(\"\");\n }\n }", "public Builder clearChangePasswordReq() {\n copyOnWrite();\n instance.clearChangePasswordReq();\n return this;\n }", "public void setPassword(String password) {\r\n this.password = password == null ? null : password.trim();\r\n }", "public void setPassword(String password) {\r\n this.password = password == null ? null : password.trim();\r\n }", "public void setPassword(String password) {\r\n this.password = password == null ? null : password.trim();\r\n }", "public void setPassword(String password) {\r\n this.password = password == null ? null : password.trim();\r\n }", "public void typePassword(String text) {\n txtPassword().typeText(text);\n }", "public void clearAnswer(){\r\n textField1.setText(\"\");\r\n }", "private void clearTextBox(){\n txtBox.setText(\"\");\n }", "public void setPassword(String password) {\n this.password = password == null ? null : password.trim();\n }", "public void setPassword(String password) {\n this.password = password == null ? null : password.trim();\n }", "public void setPassword(String password) {\n this.password = password == null ? null : password.trim();\n }", "public void setPassword(String password) {\n this.password = password == null ? null : password.trim();\n }", "public void setPassword(String password) {\n this.password = password == null ? null : password.trim();\n }" ]
[ "0.9028416", "0.877828", "0.877828", "0.8229203", "0.809782", "0.809782", "0.80965424", "0.8051325", "0.8015859", "0.8015859", "0.8015859", "0.79919153", "0.7978757", "0.793601", "0.77924675", "0.76381725", "0.76381725", "0.7588451", "0.74913067", "0.73385704", "0.72797364", "0.72691756", "0.72641754", "0.72465265", "0.71546435", "0.70435154", "0.69929314", "0.69821256", "0.6970564", "0.69269335", "0.6923504", "0.6922872", "0.6921938", "0.6913173", "0.68707246", "0.68286514", "0.66183597", "0.66166455", "0.66155607", "0.6612726", "0.6582117", "0.6548713", "0.65368867", "0.65335286", "0.65066355", "0.6489313", "0.6489313", "0.6489226", "0.6481171", "0.6478795", "0.63970834", "0.638194", "0.636772", "0.6343117", "0.6306769", "0.6274835", "0.62654936", "0.6259701", "0.62482166", "0.6244465", "0.62410384", "0.6199346", "0.6181882", "0.6181882", "0.6181882", "0.6181882", "0.6181882", "0.61762005", "0.61753064", "0.6173577", "0.61431384", "0.6142712", "0.61391515", "0.6120262", "0.611668", "0.611668", "0.61061925", "0.60871226", "0.6074385", "0.60680646", "0.6060095", "0.60568416", "0.60568416", "0.60568416", "0.6054059", "0.6039965", "0.60397613", "0.60374326", "0.603388", "0.603388", "0.603388", "0.603388", "0.601596", "0.6015509", "0.59991574", "0.5996892", "0.5996892", "0.5996892", "0.5996892", "0.5996892" ]
0.8706472
3
Gets the user type (which can be set to TELEPHONE_SUBSCRIBER or USER)
public int getUserType() { return userType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getUserType() {\n\t\treturn _userType;\n\t}", "public String getUserType() {\n return userType;\n }", "public String getUserType() {\n return userType;\n }", "public String getUserType() {\n return userType;\n }", "public String getUserType() {\n return userType;\n }", "public pl.stormit.protobuf.UserProtos.User.UserType getUserType() {\n pl.stormit.protobuf.UserProtos.User.UserType result = pl.stormit.protobuf.UserProtos.User.UserType.valueOf(userType_);\n return result == null ? pl.stormit.protobuf.UserProtos.User.UserType.NORMAL : result;\n }", "public pl.stormit.protobuf.UserProtos.User.UserType getUserType() {\n pl.stormit.protobuf.UserProtos.User.UserType result = pl.stormit.protobuf.UserProtos.User.UserType.valueOf(userType_);\n return result == null ? pl.stormit.protobuf.UserProtos.User.UserType.NORMAL : result;\n }", "public UserType getUserType() {\n\t\tif (userType == CustomerControl.dummyUserType)\n\t\t\tuserType = CustomerControl.getUserTypeById(userTypeID);\n\t\treturn userType;\n\t}", "public static String getUserType()\n {\n try\n {\n if (userType == \"\")\n {\n System.out.println(\"User type not set\");\n return \"\";\n }\n else\n {\n return userType;\n }\n }\n catch (Exception exc)\n {\n System.out.println(\"User type error: \" + exc.toString());\n return \"\";\n }\n }", "@NotNull\n\tpublic UserType getType() {\n\t\treturn super.getTypeEnum();\n\t}", "public Byte getUserType() {\n return userType;\n }", "public Short getUserType() {\r\n return userType;\r\n }", "public Byte getUserType() {\r\n return userType;\r\n }", "UserType getType();", "public String getUsertype() {\n return usertype;\n }", "public PersonUserType getUserType() throws NotLoadedException {\n return userType.getValue();\n }", "pl.stormit.protobuf.UserProtos.User.UserType getUserType();", "public java.lang.String getUsertype() {\n return usertype;\n }", "public String getRcTypeUser() {\r\n return rcTypeUser;\r\n }", "@Override\n public String userType(int userId) {\n logger.info(\"Retrieving user type\");\n return userDaoInterface.userType(userId);\n }", "public UserType getUserType(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.usertype.v1.UserType res){\n\t\tif( res.getCode().intValue() == 1 ){\n\t\t\treturn UserType.CUSTOMER;\n\t\t}\n\t\tif( res.getCode().intValue() == 4 ){\n\t\t\treturn UserType.TRAVEL_AGENT;\n\t\t}\n\t\tif( res.getCode().intValue() == 9 ){\n\t\t\treturn UserType.RESERVATION_AGENT;\n\t\t}\n\t\tif( res.getCode().intValue() == 22 ){\n\t\t\treturn UserType.ADMINISTRATOR;\n\t\t}\n\t\tif( res.getCode().intValue() == 23 ){\n\t\t\treturn UserType.SKED_DESK;\n\t\t}\n\t\treturn null;\n\t}", "public String getUsercomtype() {\n\t\treturn usercomtype;\n\t}", "public Integer getUsertype() {\n return usertype;\n }", "@Override\n\tpublic int getUserType(String userId) {\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tmap.put(\"userId\", userId);\n\t\tMap<String, Object> result = joaSimpleDao.retrieve(\"tp_users\", map);\n\t\tif(null != result) {\n\t\t\treturn Integer.parseInt( result.get(\"USERTYPE\").toString());\n\t\t}\n\t\telse {\n\t\t\treturn 0;\n\t\t}\n\t}", "public java.lang.Integer getUserCalltype() {\r\n return userCalltype;\r\n }", "public Integer getUserTypeId() {\n return userTypeId;\n }", "public Integer getUserTypeId()\n {\n return userTypeId;\n }", "public void setUserType(String userType) {\n this.userType = userType;\n }", "public static String businessGetUserType(FormUser formUser)\n\t\t\tthrows SQLException {\n\n\t\tIUserDAO user = new UserDAO();\n\t\tString userType = user.getValidUser(formUser.getEmailID(),\n\t\t\t\tformUser.getPassword());\n\t\treturn userType;\n\n\t}", "public void setUserType(String userType) {\n\t\t_userType = userType;\n\t}", "public boolean userType()\n {\n return false;\n }", "protected String getType(){\n sharedPref = getSharedPreferences(AppCSTR.PREF_NAME, Context.MODE_PRIVATE);\n //Log.d(\"TYPE\", sharedPref.getString(\"accountType\", null));\n return sharedPref.getString(AppCSTR.ACCOUNT_TYPE, null);\n }", "public Integer getJuserType() {\n return juserType;\n }", "@Override\n\tpublic TLEType getType() {\n\t\ttry {\n\t\t\tUser current_user = AccountManager.current_account.getUser();\n\t\t\tif (this.user.id == current_user.id) {\n\t\t\t\treturn TLEType.OWN;\n\t\t\t}\n\t\t\tif (this.mentionsUser(current_user)) {\n\t\t\t\treturn TLEType.MENTION;\n\t\t\t}\n\t\t\tif (this.id > AccountManager.current_account.getMaxReadTweetID()) {\n\t\t\t\treturn TLEType.UNREAD;\n\t\t\t}\n\t\t} catch (NullPointerException e) {\n\n\t\t}\n\t\treturn TLEType.READ;\n\t}", "public String getType() {\n return \"uid\";\n }", "public void setUserType(String userType) {\n this.userType = userType == null ? null : userType.trim();\n }", "public void setUserType(String userType) {\n this.userType = userType == null ? null : userType.trim();\n }", "public void setUserType(String userType) {\n this.userType = userType == null ? null : userType.trim();\n }", "public static int userType(int user_id) {\n\t\tString userType = \"SELECT user_user_type_id\" + \" FROM Users\"\r\n\t\t\t\t+ \" WHERE user_id = \" + user_id + \"\";\r\n\r\n\t\ttry {\r\n\t\t\tConnection conn = DBConnection.getConnection();\r\n\r\n\t\t\tStatement st = conn.createStatement();\r\n\t\t\tResultSet rs;\r\n\r\n\t\t\trs = st.executeQuery(userType);\r\n\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\treturn rs.getInt(\"user_user_type_id\");\r\n\t\t\t}\r\n\r\n\t\t\tconn.close();\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.err.println(\"Got an exception! userTypeQuery\");\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t}\r\n\r\n\t\treturn 0;\r\n\t}", "public void setUserType(Byte userType) {\n this.userType = userType;\n }", "public void setUserType(Byte userType) {\r\n this.userType = userType;\r\n }", "public com.demo.springprotobuff.Demoproto.Student.PhoneType getType() {\n\t\t\t\t@SuppressWarnings(\"deprecation\")\n\t\t\t\tcom.demo.springprotobuff.Demoproto.Student.PhoneType result = com.demo.springprotobuff.Demoproto.Student.PhoneType\n\t\t\t\t\t\t.valueOf(type_);\n\t\t\t\treturn result == null ? com.demo.springprotobuff.Demoproto.Student.PhoneType.UNRECOGNIZED : result;\n\t\t\t}", "public com.demo.springprotobuff.Demoproto.Student.PhoneType getType() {\n\t\t\t\t\t@SuppressWarnings(\"deprecation\")\n\t\t\t\t\tcom.demo.springprotobuff.Demoproto.Student.PhoneType result = com.demo.springprotobuff.Demoproto.Student.PhoneType\n\t\t\t\t\t\t\t.valueOf(type_);\n\t\t\t\t\treturn result == null ? com.demo.springprotobuff.Demoproto.Student.PhoneType.UNRECOGNIZED : result;\n\t\t\t\t}", "void setType(final UserType type);", "public void setUserType(String type) {\r\n switch(type) {\r\n case (\"admin\"): \r\n this.userType = 0;\r\n break;\r\n case (\"seller\"):\r\n this.userType = 1;\r\n break;\r\n case (\"buyer\"):\r\n this.userType = 2;\r\n break;\r\n \r\n }\r\n }", "int getLoginType();", "public com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.usertype.v1.UserType getUserTypeReq(UserType userType){\n\t\tcom.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.usertype.v1.UserType userTypeReq = \n\t\t\tnew com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.usertype.v1.UserType();\n\t\t\n\t\tuserTypeReq.setCode(new Integer(userType.getCode()));\n\t\t\n\t\treturn userTypeReq;\n\t}", "public UserType getType(int ID)\n\t{\n\t\t\n\t\tVector<String[]> risultato = DbConnection.getInstance().eseguiQuery(\"SELECT ID_Cliente FROM cliente WHERE ID_Cliente='\"+ID+\"'\");\n\t\tif(risultato.size() != 0) return UserType.CLIENTE;\n\t\t\n\t\trisultato = DbConnection.getInstance().eseguiQuery(\"SELECT ID_Addetto_Vendite FROM addetti_vendite WHERE ID_Addetto_Vendite='\"+ID+\"'\");\n\t\tif(risultato.size() != 0) return UserType.VENDITE;\n\t\t\n\t\trisultato = DbConnection.getInstance().eseguiQuery(\"SELECT ID_Addetto_Scaffali FROM addetti_scaffali WHERE ID_Addetto_Scaffali='\"+ID+\"'\");\n\t\tif(risultato.size() != 0) return UserType.SCAFFALI;\n\t\t\n\t\treturn UserType.NESSUNO;\n\t}", "public String getType() {\n if (this.mInvitation != null) return TYPE_INVITATION;\n else if (this.mChatMessageFragment != null) return TYPE_CHAT_MESSAGE;\n else return null;\n }", "public cb.Careerbuilder.Company.PhoneType getType() {\n return type_;\n }", "public static String getUserType(String email){\n Connection connect = null;\n ResultSet set = null;\n String userType = null;\n String getUserTypeSQL = \"SELECT user_type FROM users WHERE email= ?\";\n\n // Get User Type Try Block:\n try {\n // Set Connection:\n connect = DBConfig.getConnection();\n // Prepare SQL Statement:\n PreparedStatement statement = connect.prepareStatement(getUserTypeSQL);\n // Set Attributes / Parameters:\n statement.setString(1, email);\n // Execute Statement:\n set = statement.executeQuery();\n // Check For Results:\n while (set.next()){\n userType = set.getString(\"user_type\");\n }\n // End Of Check For Results:.\n\n }catch (Exception e){\n e.printStackTrace();\n }\n\n // End Of Get User Type Try Block.\n return userType;\n }", "public java.lang.String getShareUserType() {\n return shareUserType;\n }", "public com.rightrez.PassportType getType() {\r\n return type;\r\n }", "public void setUserType(int type) throws IllegalArgumentException {\n\t\tif (type != TELEPHONE_SUBSCRIBER && type != USER) {\n\t\t\tthrow new IllegalArgumentException(\"Parameter not in range\");\n\t\t}\n\t\tuserType = type;\n\t}", "UmType getUserManager();", "public cb.Careerbuilder.Company.PhoneType getType() {\n return type_;\n }", "public final String getUserType(final String email,\n final String tok)\n throws BackendRequestException {\n if ((email == null) || (tok == null)) {\n throw new InvalidDataException(\n \"one or more parameters was null or empty\");\n }\n\n final Map<String, String> attribs = new HashMap<>(2);\n attribs.put(\"email\", email);\n attribs.put(\"tok\", tok);\n attribs.put(\"property\", \"type\");\n final RESTReport rr = RESTHandler.apiRequest(\n RESTHandler.RestAction.GET,\n RESTHandler.ACCOUNT_USER_ENTRY_POINT,\n attribs);\n delegateExceptionGeneration(rr);\n return rr.getResponseValue(\"type\");\n }", "@Override\n public String getTypeForDisplay() {\n return \"User\";\n }", "public java.lang.String getVideoUserUserTypeName() {\n return videoUserUserTypeName;\n }", "@Test\n\tpublic void testGetUserType() {\n\t\tString userType = rmitAnalyticsModel.getUserType();\n\t\tAssert.assertNotNull(userType);\n\t\tAssert.assertEquals(\"unknown\", userType);\n\t}", "UserType[] getUserTypes();", "public org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type getType() {\n org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type result = org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type.valueOf(type_);\n return result == null ? org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type.AUTH_QUERY : result;\n }", "public static String getType() {\n\t\treturn type;\n\t}", "public void askForUserType() {\n System.out.println(\"What type of User would you like to make? (Type Attendee, Speaker, VIP, or Organizer)\");\n }", "public org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type getType() {\n org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type result = org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type.valueOf(type_);\n return result == null ? org.graylog.plugins.dnstap.protos.DnstapOuterClass.Message.Type.AUTH_QUERY : result;\n }", "@Override\n public io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType getType() {\n @SuppressWarnings(\"deprecation\")\n io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType result = io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.valueOf(type_);\n return result == null ? io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.UNRECOGNIZED : result;\n }", "public so.sao.test.protobuf.TestServer.PhoneType getPhoneType() {\n so.sao.test.protobuf.TestServer.PhoneType result = so.sao.test.protobuf.TestServer.PhoneType.valueOf(phoneType_);\n return result == null ? so.sao.test.protobuf.TestServer.PhoneType.UNRECOGNIZED : result;\n }", "public so.sao.test.protobuf.TestServer.PhoneType getPhoneType() {\n so.sao.test.protobuf.TestServer.PhoneType result = so.sao.test.protobuf.TestServer.PhoneType.valueOf(phoneType_);\n return result == null ? so.sao.test.protobuf.TestServer.PhoneType.UNRECOGNIZED : result;\n }", "public String getType()\r\n {\r\n return type;\r\n }", "public String userTypeValidation(String arg_userType) {\n\t\tString userType = null;\n\n\t\tswitch (arg_userType) {\n\t\tcase \"AD\":\n\t\tcase \"ad\":\n\t\t\tuserType = \"ADMIN\";\n\t\t\tbreak;\n\t\tcase \"CC\":\n\t\tcase \"cc\":\n\t\t\tuserType = \"COORDINATOR\";\n\t\t\tbreak;\n\t\tcase \"AP\":\n\t\tcase \"ap\":\n\t\t\tuserType = \"APPROVER\";\n\t\t\tbreak;\n\t\tcase \"CA\":\n\t\tcase \"ca\":\n\t\t\tuserType = \"CASUAL\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t\treturn userType;\n\t}", "public String getType()\r\n {\r\n return mType;\r\n }", "public String getUser() {\n\n return (String) comboCreateBox.getSelectedItem();\n }", "@Override public io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType getType() {\n @SuppressWarnings(\"deprecation\")\n io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType result = io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.valueOf(type_);\n return result == null ? io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.UNRECOGNIZED : result;\n }", "public String getType()\r\n\t{\r\n\t\treturn type;\r\n\t}", "public synchronized String getType() {\n\t\treturn type;\n\t}", "public String getType()\n {\n return type;\n }", "public String getPersonType() {\r\n return (String) getAttributeInternal(PERSONTYPE);\r\n }", "public String getType() {\r\r\n\t\treturn type;\r\r\n\t}", "public String obtenirType() {\n\t\treturn this.type;\n\t}", "public String get_type()\r\n\t{\r\n\t\treturn this.type;\r\n\t}", "public __Type getSubscriptionType() {\n return (__Type) get(\"subscriptionType\");\n }", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();" ]
[ "0.842639", "0.8386166", "0.8386166", "0.8386166", "0.8386166", "0.79563415", "0.7947286", "0.79265535", "0.7910455", "0.7596263", "0.75579125", "0.75351155", "0.75025004", "0.7255982", "0.7239858", "0.7225479", "0.71619004", "0.7083694", "0.70784795", "0.7018042", "0.7001887", "0.69937503", "0.6973451", "0.68768823", "0.685993", "0.6822504", "0.67315257", "0.66921157", "0.6653233", "0.6637964", "0.6532159", "0.6471868", "0.63592213", "0.6353961", "0.6289297", "0.6278855", "0.6278855", "0.6278855", "0.62540877", "0.6210159", "0.6198069", "0.61908835", "0.617158", "0.61552006", "0.6121059", "0.6117995", "0.6112972", "0.6107911", "0.60813713", "0.60777783", "0.6069672", "0.6038536", "0.60353464", "0.60350424", "0.6025678", "0.60013604", "0.5955807", "0.5954834", "0.5913677", "0.5906953", "0.5902706", "0.5898833", "0.58981144", "0.58865833", "0.5876361", "0.5866453", "0.58624566", "0.58561295", "0.5851761", "0.5850485", "0.584837", "0.5834982", "0.5833616", "0.5830624", "0.5819585", "0.5812783", "0.5810274", "0.58047086", "0.5801183", "0.5799433", "0.57944787", "0.5794198", "0.5794198", "0.5794198", "0.5794198", "0.5794198", "0.5794198", "0.5794198", "0.5794198", "0.5794198", "0.5794198", "0.5794198", "0.5794198", "0.5794198", "0.5794198", "0.5794198", "0.5794198", "0.5794198", "0.5794198", "0.5794198" ]
0.8313722
5