{ // 获取包含Hugging Face文本的span元素 const spans = link.querySelectorAll('span.whitespace-nowrap, span.hidden.whitespace-nowrap'); spans.forEach(span => { if (span.textContent && span.textContent.trim().match(/Hugging\s*Face/i)) { span.textContent = 'AI快站'; } }); }); // 替换logo图片的alt属性 document.querySelectorAll('img[alt*="Hugging"], img[alt*="Face"]').forEach(img => { if (img.alt.match(/Hugging\s*Face/i)) { img.alt = 'AI快站 logo'; } }); } // 替换导航栏中的链接 function replaceNavigationLinks() { // 已替换标记,防止重复运行 if (window._navLinksReplaced) { return; } // 已经替换过的链接集合,防止重复替换 const replacedLinks = new Set(); // 只在导航栏区域查找和替换链接 const headerArea = document.querySelector('header') || document.querySelector('nav'); if (!headerArea) { return; } // 在导航区域内查找链接 const navLinks = headerArea.querySelectorAll('a'); navLinks.forEach(link => { // 如果已经替换过,跳过 if (replacedLinks.has(link)) return; const linkText = link.textContent.trim(); const linkHref = link.getAttribute('href') || ''; // 替换Spaces链接 - 仅替换一次 if ( (linkHref.includes('/spaces') || linkHref === '/spaces' || linkText === 'Spaces' || linkText.match(/^s*Spacess*$/i)) && linkText !== 'PDF TO Markdown' && linkText !== 'PDF TO Markdown' ) { link.textContent = 'PDF TO Markdown'; link.href = 'https://fast360.xyz'; link.setAttribute('target', '_blank'); link.setAttribute('rel', 'noopener noreferrer'); replacedLinks.add(link); } // 删除Posts链接 else if ( (linkHref.includes('/posts') || linkHref === '/posts' || linkText === 'Posts' || linkText.match(/^s*Postss*$/i)) ) { if (link.parentNode) { link.parentNode.removeChild(link); } replacedLinks.add(link); } // 替换Docs链接 - 仅替换一次 else if ( (linkHref.includes('/docs') || linkHref === '/docs' || linkText === 'Docs' || linkText.match(/^s*Docss*$/i)) && linkText !== 'Voice Cloning' ) { link.textContent = 'Voice Cloning'; link.href = 'https://vibevoice.info/'; replacedLinks.add(link); } // 删除Enterprise链接 else if ( (linkHref.includes('/enterprise') || linkHref === '/enterprise' || linkText === 'Enterprise' || linkText.match(/^s*Enterprises*$/i)) ) { if (link.parentNode) { link.parentNode.removeChild(link); } replacedLinks.add(link); } }); // 查找可能嵌套的Spaces和Posts文本 const textNodes = []; function findTextNodes(element) { if (element.nodeType === Node.TEXT_NODE) { const text = element.textContent.trim(); if (text === 'Spaces' || text === 'Posts' || text === 'Enterprise') { textNodes.push(element); } } else { for (const child of element.childNodes) { findTextNodes(child); } } } // 只在导航区域内查找文本节点 findTextNodes(headerArea); // 替换找到的文本节点 textNodes.forEach(node => { const text = node.textContent.trim(); if (text === 'Spaces') { node.textContent = node.textContent.replace(/Spaces/g, 'PDF TO Markdown'); } else if (text === 'Posts') { // 删除Posts文本节点 if (node.parentNode) { node.parentNode.removeChild(node); } } else if (text === 'Enterprise') { // 删除Enterprise文本节点 if (node.parentNode) { node.parentNode.removeChild(node); } } }); // 标记已替换完成 window._navLinksReplaced = true; } // 替换代码区域中的域名 function replaceCodeDomains() { // 特别处理span.hljs-string和span.njs-string元素 document.querySelectorAll('span.hljs-string, span.njs-string, span[class*="hljs-string"], span[class*="njs-string"]').forEach(span => { if (span.textContent && span.textContent.includes('huggingface.co')) { span.textContent = span.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 替换hljs-string类的span中的域名(移除多余的转义符号) document.querySelectorAll('span.hljs-string, span[class*="hljs-string"]').forEach(span => { if (span.textContent && span.textContent.includes('huggingface.co')) { span.textContent = span.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 替换pre和code标签中包含git clone命令的域名 document.querySelectorAll('pre, code').forEach(element => { if (element.textContent && element.textContent.includes('git clone')) { const text = element.innerHTML; if (text.includes('huggingface.co')) { element.innerHTML = text.replace(/huggingface.co/g, 'aifasthub.com'); } } }); // 处理特定的命令行示例 document.querySelectorAll('pre, code').forEach(element => { const text = element.innerHTML; if (text.includes('huggingface.co')) { // 针对git clone命令的专门处理 if (text.includes('git clone') || text.includes('GIT_LFS_SKIP_SMUDGE=1')) { element.innerHTML = text.replace(/huggingface.co/g, 'aifasthub.com'); } } }); // 特别处理模型下载页面上的代码片段 document.querySelectorAll('.flex.border-t, .svelte_hydrator, .inline-block').forEach(container => { const content = container.innerHTML; if (content && content.includes('huggingface.co')) { container.innerHTML = content.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 特别处理模型仓库克隆对话框中的代码片段 try { // 查找包含"Clone this model repository"标题的对话框 const cloneDialog = document.querySelector('.svelte_hydration_boundary, [data-target="MainHeader"]'); if (cloneDialog) { // 查找对话框中所有的代码片段和命令示例 const codeElements = cloneDialog.querySelectorAll('pre, code, span'); codeElements.forEach(element => { if (element.textContent && element.textContent.includes('huggingface.co')) { if (element.innerHTML.includes('huggingface.co')) { element.innerHTML = element.innerHTML.replace(/huggingface.co/g, 'aifasthub.com'); } else { element.textContent = element.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } } }); } // 更精确地定位克隆命令中的域名 document.querySelectorAll('[data-target]').forEach(container => { const codeBlocks = container.querySelectorAll('pre, code, span.hljs-string'); codeBlocks.forEach(block => { if (block.textContent && block.textContent.includes('huggingface.co')) { if (block.innerHTML.includes('huggingface.co')) { block.innerHTML = block.innerHTML.replace(/huggingface.co/g, 'aifasthub.com'); } else { block.textContent = block.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } } }); }); } catch (e) { // 错误处理但不打印日志 } } // 当DOM加载完成后执行替换 if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', () => { replaceHeaderBranding(); replaceNavigationLinks(); replaceCodeDomains(); // 只在必要时执行替换 - 3秒后再次检查 setTimeout(() => { if (!window._navLinksReplaced) { console.log('[Client] 3秒后重新检查导航链接'); replaceNavigationLinks(); } }, 3000); }); } else { replaceHeaderBranding(); replaceNavigationLinks(); replaceCodeDomains(); // 只在必要时执行替换 - 3秒后再次检查 setTimeout(() => { if (!window._navLinksReplaced) { console.log('[Client] 3秒后重新检查导航链接'); replaceNavigationLinks(); } }, 3000); } // 增加一个MutationObserver来处理可能的动态元素加载 const observer = new MutationObserver(mutations => { // 检查是否导航区域有变化 const hasNavChanges = mutations.some(mutation => { // 检查是否存在header或nav元素变化 return Array.from(mutation.addedNodes).some(node => { if (node.nodeType === Node.ELEMENT_NODE) { // 检查是否是导航元素或其子元素 if (node.tagName === 'HEADER' || node.tagName === 'NAV' || node.querySelector('header, nav')) { return true; } // 检查是否在导航元素内部 let parent = node.parentElement; while (parent) { if (parent.tagName === 'HEADER' || parent.tagName === 'NAV') { return true; } parent = parent.parentElement; } } return false; }); }); // 只在导航区域有变化时执行替换 if (hasNavChanges) { // 重置替换状态,允许再次替换 window._navLinksReplaced = false; replaceHeaderBranding(); replaceNavigationLinks(); } }); // 开始观察document.body的变化,包括子节点 if (document.body) { observer.observe(document.body, { childList: true, subtree: true }); } else { document.addEventListener('DOMContentLoaded', () => { observer.observe(document.body, { childList: true, subtree: true }); }); } })(); \";\n public static final Pattern PATTERN_BODY = Pattern.compile(PATTERN_BODY_STR);\n\n public static final String PATTERN_DIV_CELL_VIEW_STR = \"
\";\n public static final Pattern PATTERN_DIV_CELL_VIEW = Pattern.compile(PATTERN_DIV_CELL_VIEW_STR);\n\n public static final String PATTERN_DIV_RICH_TYPE_STR = \"
\";\n public static final Pattern PATTERN_DIV_RICH_TYPE = Pattern.compile(PATTERN_DIV_RICH_TYPE_STR);\n\n public static StringBuilder parseToHtml(WRichEditor scrollView) {\n\n StringBuilder out = new StringBuilder();\n\n if (scrollView == null || scrollView.getContainerView() == null) {\n return out;\n }\n\n ViewGroup containerView = scrollView.getContainerView();\n int childCount = containerView.getChildCount();\n ArrayList dataList = new ArrayList<>(childCount);\n for (int i = 0; i < childCount; i++) {\n View childView = containerView.getChildAt(i);\n if (childView instanceof IRichCellView) {\n IRichCellView richCellView = (IRichCellView) childView;\n IRichCellData iRichCellData = richCellView.getCellData();\n if (iRichCellData == null) {\n continue;\n }\n dataList.add(iRichCellData);\n }\n }\n\n for (IRichCellData richCellData : dataList) {\n out.append(P_TAG_PREV + richCellData.toHtml() + P_TAG_POST);\n }\n\n return out;\n }\n\n public static StringBuilder parseToJson(WRichEditor scrollView) {\n\n StringBuilder out = new StringBuilder();\n\n if (scrollView == null || scrollView.getContainerView() == null) {\n return out;\n }\n\n ViewGroup containerView = scrollView.getContainerView();\n int childCount = containerView.getChildCount();\n ArrayList dataList = new ArrayList<>(childCount);\n for (int i = 0; i < childCount; i++) {\n View childView = containerView.getChildAt(i);\n if (childView instanceof IRichCellView) {\n IRichCellView richCellView = (IRichCellView) childView;\n IRichCellData iRichCellData = richCellView.getCellData();\n if (iRichCellData == null) {\n continue;\n }\n dataList.add(iRichCellData);\n }\n }\n\n int listCount = dataList.size();\n\n out.append(P_JSON_PREV);\n for (int j = 0; j < listCount; j++) {\n out.append(dataList.get(j).toJson());\n if (j < listCount - 1) {\n out.append(\",\");\n }\n }\n out.append(P_JSON_POST);\n return out;\n }\n\n // TODO 由html转换回富文本编辑器比较复杂,因此先使用json的方式\n public static void inflateFromHtml(Context context, WRichEditor scrollView, String html, CustomViewProvider provider) {\n if (html == null || html.trim().length() == 0 || scrollView == null) {\n return;\n }\n\n String bodyContent;\n Matcher matcherBody = PATTERN_BODY.matcher(html);\n if (matcherBody.find()) {\n String bodyHtml = matcherBody.group(0);\n bodyContent = getBodyContent(bodyHtml);\n } else {\n bodyContent = html;\n }\n\n ArrayList cellStringList = new ArrayList<>();\n\n Matcher matcherCellView = PATTERN_DIV_CELL_VIEW.matcher(bodyContent);\n while (matcherCellView.find()) {\n for (int i = 0; i <= matcherCellView.groupCount(); i++) {\n //
文字
\n //
\n String cellString = matcherCellView.group(i);\n cellStringList.add(cellString);\n }\n }\n\n for (String cellString : cellStringList) {\n IRichCellView cellView = inflateCellViewByCellHtml(context, cellString, provider);\n LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n scrollView.addRichCell(cellView, lp, -1);\n }\n scrollView.addNoneTypeTailOptionally();\n }\n\n // TODO 由html转换回富文本编辑器比较复杂,因此先使用json的方式\n public static void inflateFromJson(Context context, WRichEditor scrollView, String json, CustomViewProvider provider) {\n if (json == null || json.trim().length() == 0 || scrollView == null) {\n return;\n }\n\n LinkedList cellDataList = new LinkedList<>();\n\n try {\n JSONArray jsonArray = new JSONArray(json);\n int length = jsonArray.length();\n for (int i = 0; i < length; i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n BaseCellData cellData = getCellDataByJSONObject(jsonObject);\n if (cellData != null) {\n cellDataList.add(cellData);\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n for (BaseCellData cellData : cellDataList) {\n IRichCellView cellView = inflateCellViewByCellData(context, cellData, provider);\n LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n scrollView.addRichCell(cellView, lp, -1);\n }\n scrollView.addNoneTypeTailOptionally();\n\n }\n\n private static BaseCellData getCellDataByJSONObject(JSONObject jsonObject) {\n BaseCellData cellData = null;\n try {\n String type = jsonObject.getString(BaseCellData.JSON_KEY_TYPE);\n RichType richType = RichType.valueOf(type);\n if (richType == RichType.NONE) {\n cellData = new RichCellData();\n } else if (richType == RichType.QUOTE) {\n cellData = new RichCellData();\n } else if (richType == RichType.LIST_UNORDERED) {\n cellData = new RichCellData();\n } else if (richType == RichType.LIST_ORDERED) {\n cellData = new RichCellData();\n } else if (richType == RichType.IMAGE) {\n cellData = new ImageCellData();\n } else if (richType == RichType.VIDEO) {\n cellData = new VideoCellData();\n } else if (richType == RichType.AUDIO) {\n cellData = new AudioCellData();\n } else if (richType == RichType.NETDISK) {\n cellData = new NetDiskCellData();\n } else if (richType == RichType.LINE) {\n cellData = new LineCellData();\n }\n if (cellData != null) {\n // 数据填充\n cellData.fromJson(jsonObject);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return cellData;\n }\n\n private static String getBodyContent(String bodyHtml) {\n if (bodyHtml == null) {\n return \"\";\n }\n try {\n return bodyHtml.substring(6, bodyHtml.length() - 7);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return \"\";\n }\n\n private static IRichCellView inflateCellViewByCellHtml(Context context, String cellHtml, CustomViewProvider provider) {\n int[] cellContentHtmlStart = new int[1];\n RichType cellRichType = getRichTypeByCellHtml(cellHtml, cellContentHtmlStart);\n return inflateCellViewByRichTypeAndHtml(context, cellRichType, cellHtml, cellContentHtmlStart[0], provider);\n }\n\n private static IRichCellView inflateCellViewByCellData(Context context, BaseCellData cellData, CustomViewProvider provider) {\n RichType richType = cellData.getRichType();\n if (richType == null || context == null) {\n return null;\n }\n IRichCellView iRichCellView = null;\n if (richType == RichType.NONE) {\n // 普通的富文本\n iRichCellView = new WEditTextWrapperView(context);\n } else if (richType == RichType.QUOTE) {\n iRichCellView = new WEditTextWrapperView(context);\n } else if (richType == RichType.LIST_UNORDERED) {\n iRichCellView = new WEditTextWrapperView(context);\n } else if (richType == RichType.LIST_ORDERED) {\n iRichCellView = new WEditTextWrapperView(context);\n } else if (richType == RichType.IMAGE) {\n if (provider == null || provider.getCellViewByRichType(richType) == null) {\n iRichCellView = new RichImageView(context);\n } else {\n iRichCellView = provider.getCellViewByRichType(richType);\n }\n } else if (richType == RichType.LINE) {\n if (provider == null || provider.getCellViewByRichType(richType) == null) {\n iRichCellView = new RichLineView(context);\n } else {\n iRichCellView = provider.getCellViewByRichType(richType);\n }\n } else if (richType == RichType.VIDEO) {\n if (provider == null || provider.getCellViewByRichType(richType) == null) {\n iRichCellView = new RichVideoView(context);\n } else {\n iRichCellView = provider.getCellViewByRichType(richType);\n }\n } else if (richType == RichType.AUDIO) {\n if (provider == null || provider.getCellViewByRichType(richType) == null) {\n iRichCellView = new RichAudioView(context);\n } else {\n iRichCellView = provider.getCellViewByRichType(richType);\n }\n } else if (richType == RichType.NETDISK) {\n if (provider == null || provider.getCellViewByRichType(richType) == null) {\n iRichCellView = new RichNetDiskView(context);\n } else {\n iRichCellView = provider.getCellViewByRichType(richType);\n }\n }\n // 这里为View填充数据\n iRichCellView.setCellData(cellData);\n return iRichCellView;\n }\n\n // 注册自定义 CellView\n private static IRichCellView inflateCellViewByRichTypeAndHtml(Context context, RichType richType, String cellHtml, int contentStart, CustomViewProvider provider) {\n if (richType == null || context == null) {\n return null;\n }\n IRichCellView iRichCellView = null;\n if (richType == RichType.NONE) {\n // 普通的富文本\n iRichCellView = new WEditTextWrapperView(context);\n } else if (richType == RichType.QUOTE) {\n iRichCellView = new WEditTextWrapperView(context);\n } else if (richType == RichType.LIST_UNORDERED) {\n iRichCellView = new WEditTextWrapperView(context);\n } else if (richType == RichType.LIST_ORDERED) {\n iRichCellView = new WEditTextWrapperView(context);\n } else if (richType == RichType.IMAGE) {\n if (provider == null || provider.getCellViewByRichType(richType) == null) {\n iRichCellView = new RichImageView(context);\n } else {\n iRichCellView = provider.getCellViewByRichType(richType);\n }\n } else if (richType == RichType.LINE) {\n if (provider == null || provider.getCellViewByRichType(richType) == null) {\n iRichCellView = new RichLineView(context);\n } else {\n iRichCellView = provider.getCellViewByRichType(richType);\n }\n } else if (richType == RichType.VIDEO) {\n if (provider == null || provider.getCellViewByRichType(richType) == null) {\n iRichCellView = new RichVideoView(context);\n } else {\n iRichCellView = provider.getCellViewByRichType(richType);\n }\n } else if (richType == RichType.AUDIO) {\n if (provider == null || provider.getCellViewByRichType(richType) == null) {\n iRichCellView = new RichAudioView(context);\n } else {\n iRichCellView = provider.getCellViewByRichType(richType);\n }\n } else if (richType == RichType.NETDISK) {\n if (provider == null || provider.getCellViewByRichType(richType) == null) {\n iRichCellView = new RichNetDiskView(context);\n } else {\n iRichCellView = provider.getCellViewByRichType(richType);\n }\n }\n // 去掉div\n iRichCellView.setHtmlData(richType, cellHtml.substring(contentStart, cellHtml.length() - 6));\n return iRichCellView;\n }\n\n private static RichType getRichTypeByCellHtml(String cellHtml, int[] start) {\n//
\n Matcher matcherRichType = PATTERN_DIV_RICH_TYPE.matcher(cellHtml);\n if (matcherRichType.find()) {\n //
文字
\n //
\n String cellRichTypeDivStr = matcherRichType.group(0);\n start[0] = cellRichTypeDivStr.length();\n if (cellRichTypeDivStr != null) {\n String richTypeStr = cellRichTypeDivStr.substring(15, cellRichTypeDivStr.length() - 2);\n return RichType.valueOf(richTypeStr);\n }\n }\n return null;\n }\n\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2942,"cells":{"blob_id":{"kind":"string","value":"ce60340176143aa314c0e7038dce4caa5734766a"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"apache/lucene"},"path":{"kind":"string","value":"/lucene/core/src/java/org/apache/lucene/util/LongsRef.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":5231,"string":"5,231"},"score":{"kind":"number","value":2.875,"string":"2.875"},"int_score":{"kind":"number","value":3,"string":"3"},"detected_licenses":{"kind":"list like","value":["Apache-2.0","MIT","NAIST-2003","BSD-3-Clause","BSD-2-Clause","LicenseRef-scancode-unicode","LGPL-2.0-or-later","ICU","LicenseRef-scancode-unicode-mappings","CC-BY-SA-3.0","Python-2.0","LicenseRef-scancode-other-copyleft"],"string":"[\n \"Apache-2.0\",\n \"MIT\",\n \"NAIST-2003\",\n \"BSD-3-Clause\",\n \"BSD-2-Clause\",\n \"LicenseRef-scancode-unicode\",\n \"LGPL-2.0-or-later\",\n \"ICU\",\n \"LicenseRef-scancode-unicode-mappings\",\n \"CC-BY-SA-3.0\",\n \"Python-2.0\",\n \"LicenseRef-scancode-other-copyleft\"\n]"},"license_type":{"kind":"string","value":"permissive"},"text":{"kind":"string","value":"/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.lucene.util;\n\nimport java.util.Arrays;\n\n/**\n * Represents long[], as a slice (offset + length) into an existing long[]. The {@link #longs}\n * member should never be null; use {@link #EMPTY_LONGS} if necessary.\n *\n * @lucene.internal\n */\npublic final class LongsRef implements Comparable, Cloneable {\n /** An empty long array for convenience */\n public static final long[] EMPTY_LONGS = new long[0];\n\n /** The contents of the LongsRef. Should never be {@code null}. */\n public long[] longs;\n /** Offset of first valid long. */\n public int offset;\n /** Length of used longs. */\n public int length;\n\n /** Create a LongsRef with {@link #EMPTY_LONGS} */\n public LongsRef() {\n longs = EMPTY_LONGS;\n }\n\n /**\n * Create a LongsRef pointing to a new array of size capacity. Offset and length will\n * both be zero.\n */\n public LongsRef(int capacity) {\n longs = new long[capacity];\n }\n\n /** This instance will directly reference longs w/o making a copy. longs should not be null */\n public LongsRef(long[] longs, int offset, int length) {\n this.longs = longs;\n this.offset = offset;\n this.length = length;\n assert isValid();\n }\n\n /**\n * Returns a shallow clone of this instance (the underlying longs are not copied and will\n * be shared by both the returned object and this object.\n *\n * @see #deepCopyOf\n */\n @Override\n public LongsRef clone() {\n return new LongsRef(longs, offset, length);\n }\n\n @Override\n public int hashCode() {\n final int prime = 31;\n int result = 0;\n final long end = (long) offset + length;\n for (int i = offset; i < end; i++) {\n result = prime * result + (int) (longs[i] ^ (longs[i] >>> 32));\n }\n return result;\n }\n\n @Override\n public boolean equals(Object other) {\n if (other == null) {\n return false;\n }\n if (other instanceof LongsRef) {\n return this.longsEquals((LongsRef) other);\n }\n return false;\n }\n\n public boolean longsEquals(LongsRef other) {\n return Arrays.equals(\n this.longs,\n this.offset,\n this.offset + this.length,\n other.longs,\n other.offset,\n other.offset + other.length);\n }\n\n /** Signed int order comparison */\n @Override\n public int compareTo(LongsRef other) {\n return Arrays.compare(\n this.longs,\n this.offset,\n this.offset + this.length,\n other.longs,\n other.offset,\n other.offset + other.length);\n }\n\n @Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append('[');\n final long end = (long) offset + length;\n for (int i = offset; i < end; i++) {\n if (i > offset) {\n sb.append(' ');\n }\n sb.append(Long.toHexString(longs[i]));\n }\n sb.append(']');\n return sb.toString();\n }\n\n /**\n * Creates a new LongsRef that points to a copy of the longs from other\n *\n *

The returned IntsRef will have a length of other.length and an offset of zero.\n */\n public static LongsRef deepCopyOf(LongsRef other) {\n return new LongsRef(\n ArrayUtil.copyOfSubArray(other.longs, other.offset, other.offset + other.length),\n 0,\n other.length);\n }\n\n /** Performs internal consistency checks. Always returns true (or throws IllegalStateException) */\n public boolean isValid() {\n if (longs == null) {\n throw new IllegalStateException(\"longs is null\");\n }\n if (length < 0) {\n throw new IllegalStateException(\"length is negative: \" + length);\n }\n if (length > longs.length) {\n throw new IllegalStateException(\n \"length is out of bounds: \" + length + \",longs.length=\" + longs.length);\n }\n if (offset < 0) {\n throw new IllegalStateException(\"offset is negative: \" + offset);\n }\n if (offset > longs.length) {\n throw new IllegalStateException(\n \"offset out of bounds: \" + offset + \",longs.length=\" + longs.length);\n }\n if (offset + length < 0) {\n throw new IllegalStateException(\n \"offset+length is negative: offset=\" + offset + \",length=\" + length);\n }\n if (offset + length > longs.length) {\n throw new IllegalStateException(\n \"offset+length out of bounds: offset=\"\n + offset\n + \",length=\"\n + length\n + \",longs.length=\"\n + longs.length);\n }\n return true;\n }\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2943,"cells":{"blob_id":{"kind":"string","value":"1ee20ff566e5f0d646477abd8a37b2b3a74206fc"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"HsuJv/Note"},"path":{"kind":"string","value":"/Code/Java/Se2/Chapter 03/Exercise 01/Solution/TaskProcessor.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":199,"string":"199"},"score":{"kind":"number","value":2.4375,"string":"2.4375"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package chapter03;\n\npublic class TaskProcessor \n{\n private X value;\n\n public TaskProcessor(X v) \n {\n value = v;\n }\n\n public X getTaskP() \n {\n return value;\n }\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2944,"cells":{"blob_id":{"kind":"string","value":"66f8e8f7c1d11a2d4415b9b0e116a0af0c4db43a"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"JarekSobczak/fileToDataBaseManager"},"path":{"kind":"string","value":"/src/main/java/pl/brite/ownProject/fileToDb/service/JsonService.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":807,"string":"807"},"score":{"kind":"number","value":2.328125,"string":"2.328125"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package pl.brite.ownProject.fileToDb.service;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;\nimport pl.brite.ownProject.fileToDb.model.Customer;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.util.List;\n\npublic class JsonService {\n\n private List customers;\n\n public JsonService(List customers) {\n this.customers = customers;\n }\n\n void mapJson(File file) {\n ObjectMapper om = new ObjectMapper();\n om.registerModule(new JavaTimeModule());\n\n try {\n customers.addAll(om.readValue(file, new com.fasterxml.jackson.core.type.TypeReference>() {\n }));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2945,"cells":{"blob_id":{"kind":"string","value":"0c0c603c601244ee1fbac28b6666879301ee603e"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"gbonk/HermesJMS"},"path":{"kind":"string","value":"/src/java/org/objectweb/joram/client/jms/admin/Subscription.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":332,"string":"332"},"score":{"kind":"number","value":1.5234375,"string":"1.523438"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":["LicenseRef-scancode-unknown-license-reference","Apache-2.0"],"string":"[\n \"LicenseRef-scancode-unknown-license-reference\",\n \"Apache-2.0\"\n]"},"license_type":{"kind":"string","value":"permissive"},"text":{"kind":"string","value":"package org.objectweb.joram.client.jms.admin;\n\npublic class Subscription {\n\n\tpublic Object getTopicId() {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\t}\n\n\tpublic String getName() {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\t}\n\n\tpublic String isDurable() {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\t}\n\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2946,"cells":{"blob_id":{"kind":"string","value":"ce63d05923adc9a735f3c88694e58ecb6b2e5ed0"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"tahametal/HR-Manager"},"path":{"kind":"string","value":"/src/main/java/com/sqli/rh_manager/entities/Bu.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":1561,"string":"1,561"},"score":{"kind":"number","value":2.1875,"string":"2.1875"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package com.sqli.rh_manager.entities;\n// Generated Dec 19, 2013 6:37:54 PM by Hibernate Tools 3.2.1.GA\n\n\nimport java.util.HashSet;\nimport java.util.Set;\nimport javax.persistence.CascadeType;\nimport javax.persistence.Column;\nimport javax.persistence.Entity;\nimport javax.persistence.FetchType;\nimport javax.persistence.Id;\nimport javax.persistence.OneToMany;\nimport javax.persistence.Table;\n\n/**\n * Bu generated by hbm2java\n */\n@Entity\n@Table(name=\"bu\"\n ,catalog=\"rh_manager\"\n)\npublic class Bu implements java.io.Serializable {\n\n\n private int id;\n private String bu;\n private Set collaborateurs = new HashSet(0);\n\n public Bu() {\n }\n\n\t\n public Bu(int id) {\n this.id = id;\n }\n public Bu(int id, String bu, Set collaborateurs) {\n this.id = id;\n this.bu = bu;\n this.collaborateurs = collaborateurs;\n }\n \n @Id \n \n @Column(name=\"Id\", unique=true, nullable=false)\n public int getId() {\n return this.id;\n }\n \n public void setId(int id) {\n this.id = id;\n }\n \n @Column(name=\"BU\", length=254)\n public String getBu() {\n return this.bu;\n }\n \n public void setBu(String bu) {\n this.bu = bu;\n }\n@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy=\"bu\")\n public Set getCollaborateurs() {\n return this.collaborateurs;\n }\n \n public void setCollaborateurs(Set collaborateurs) {\n this.collaborateurs = collaborateurs;\n }\n\n\n\n\n}\n\n\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2947,"cells":{"blob_id":{"kind":"string","value":"daecaa36d9c7e52db7c2a0d782757d54905b7930"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"wjW901314/ERP"},"path":{"kind":"string","value":"/src/main/java/com/wd/erp/service/impl/BasisUserRoleServiceImpl.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":2391,"string":"2,391"},"score":{"kind":"number","value":2.171875,"string":"2.171875"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package com.wd.erp.service.impl;\n\nimport com.wd.erp.mapper.BasisUserRoleMapper;\nimport com.wd.erp.model.BasisUserRole;\nimport com.wd.erp.model.ResultJson;\nimport com.wd.erp.service.BasisUserRoleService;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.stereotype.Service;\nimport org.springframework.util.StringUtils;\n\nimport java.util.List;\n\n@Service\npublic class BasisUserRoleServiceImpl implements BasisUserRoleService {\n\n @Autowired\n BasisUserRoleMapper basisUserRoleMapper;\n\n @Override\n public ResultJson addUserRole(BasisUserRole recode) {\n ResultJson resultJson = new ResultJson();\n resultJson.setCode(-1);\n resultJson.setSuccess(false);\n resultJson.setMsg(\"添加用户角色失败!\");\n if(StringUtils.isEmpty(recode.getLoginName())){\n resultJson.setMsg(\"用户名不能为空!\");\n return resultJson;\n }\n int i = basisUserRoleMapper.insert(recode);\n if(i == 1){\n resultJson.setCode(0);\n resultJson.setSuccess(true);\n resultJson.setMsg(\"添加用户角色成功!\");\n resultJson.setData(i);\n }\n return resultJson;\n }\n\n @Override\n public ResultJson getAll() {\n ResultJson resultJson = new ResultJson();\n resultJson.setCode(-1);\n resultJson.setMsg(\"查询失败!\");\n resultJson.setSuccess(false);\n List list = basisUserRoleMapper.getAll();\n if(list.size() >= 0){\n resultJson.setCode(0);\n resultJson.setSuccess(true);\n resultJson.setMsg(\"查询成功!\");\n resultJson.setData(list);\n }\n return resultJson;\n }\n\n @Override\n public ResultJson deleteUserRole(String id) {\n ResultJson resultJson = new ResultJson();\n resultJson.setCode(-1);\n resultJson.setSuccess(false);\n resultJson.setMsg(\"删除用户角色失败!\");\n if(StringUtils.isEmpty(id)){\n resultJson.setMsg(\"id不能为空!\");\n return resultJson;\n }\n int i = basisUserRoleMapper.deleteByPrimaryKey(id);\n if(i == 1){\n resultJson.setCode(0);\n resultJson.setSuccess(true);\n resultJson.setMsg(\"删除用户角色成功!\");\n resultJson.setData(i);\n }\n return resultJson;\n }\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2948,"cells":{"blob_id":{"kind":"string","value":"70ad9d5fb464df2f0e488069af37e7ed46d37829"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"termxz/LiveReport"},"path":{"kind":"string","value":"/src/main/java/io/termxz/bungee/LiveBridge.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":1180,"string":"1,180"},"score":{"kind":"number","value":2.21875,"string":"2.21875"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package io.termxz.bungee;\n\nimport net.md_5.bungee.api.event.PluginMessageEvent;\nimport net.md_5.bungee.api.plugin.Listener;\nimport net.md_5.bungee.api.plugin.Plugin;\nimport net.md_5.bungee.event.EventHandler;\n\npublic class LiveBridge extends Plugin implements Listener {\n\n private static final String CHANNEL_NAME_IN = \"livereport:bungee\";\n private static final String CHANNEL_NAME_OUT = \"livereport:spigot\";\n\n @Override\n public void onEnable() {\n getProxy().registerChannel(CHANNEL_NAME_IN);\n getProxy().registerChannel(CHANNEL_NAME_OUT);\n getProxy().getPluginManager().registerListener(this, this);\n }\n\n @Override\n public void onDisable() {\n getProxy().unregisterChannel(CHANNEL_NAME_IN);\n getProxy().registerChannel(CHANNEL_NAME_OUT);\n }\n\n /*\n\n Data Received & Distributed:\n\n 0 SERVER_NAME\n 1 REPORTER\n 2 OFFENDER\n 3 REASON\n 4 TYPE\n\n */\n\n @EventHandler\n public void onReceive(PluginMessageEvent e) {\n if(!e.getTag().equals(CHANNEL_NAME_IN)) return;\n getProxy().getServers().values().forEach(serverInfo -> serverInfo.sendData(CHANNEL_NAME_OUT, e.getData(), true));\n }\n\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2949,"cells":{"blob_id":{"kind":"string","value":"4276af7283af57483fd96e343177a8741f496a7c"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"NicoCometta/TP1_AlgoBay_java"},"path":{"kind":"string","value":"/src/fiuba/algo3/AlgoBay/AlgoBay.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":1760,"string":"1,760"},"score":{"kind":"number","value":2.953125,"string":"2.953125"},"int_score":{"kind":"number","value":3,"string":"3"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package fiuba.algo3.AlgoBay;\n\nimport com.sun.org.apache.regexp.internal.RE;\n\nimport java.util.ArrayList;\n\n/**\n * Created by nico on 29/10/17.\n */\npublic class AlgoBay {\n\n private ArrayList listaProductos;\n\n public AlgoBay(){\n this.listaProductos = new ArrayList<>();\n }\n\n public int getCantidadDeProductos() {\n return this.listaProductos.size();\n }\n\n public Producto agregarProductoConPrecio(String nombreProducto, double precioProducto) {\n Producto nuevoProducto = new Producto(nombreProducto, precioProducto);\n\n this.listaProductos.add(nuevoProducto);\n\n return nuevoProducto;\n }\n\n public Producto getProducto(String nombreProducto) {\n\n for (Producto unProducto: this.listaProductos) {\n if (unProducto.Eres(nombreProducto))\n return unProducto;\n }\n\n return null;\n }\n\n public Compra crearNuevaCompra() {\n return Compra.crearCompraSimple();\n }\n\n public void agregarProductoEnCompra(Producto unProducto, Compra unaCompra) {\n unaCompra.agregarProducto(unProducto);\n }\n\n public double getPrecioTotalDe(Compra unaCompra) {\n return unaCompra.getPrecio();\n }\n\n public Compra crearNuevaCompraConEnvio() {\n return Compra.crearCompraConEnvio();\n }\n\n public Compra crearNuevaCompraConGarantia() {\n return Compra.crearCompraConGarantia();\n }\n\n public Compra crearNuevaCompraConEnvioYGarantia() {\n return Compra.crearCompraConGarantiaYEnvio();\n }\n\n public Cupon crearCuponConPorcentaje(int unDescuento) {\n return (new Cupon(unDescuento));\n }\n\n public void agregarCuponEnCompra(Cupon unCupon, Compra unaCompra) {\n unaCompra.agregarCupon(unCupon);\n }\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2950,"cells":{"blob_id":{"kind":"string","value":"f29d2698e0b9287c7488e897be92d41fd1d1aae7"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"pcieszynski/tablettop-rpg"},"path":{"kind":"string","value":"/src/main/java/com/ender/tablettop/service/dto/PlayerMessageDTO.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":2840,"string":"2,840"},"score":{"kind":"number","value":2.484375,"string":"2.484375"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package com.ender.tablettop.service.dto;\n\nimport java.io.Serializable;\nimport java.util.Objects;\nimport javax.persistence.Lob;\n\n/**\n * A DTO for the PlayerMessage entity.\n */\npublic class PlayerMessageDTO implements Serializable {\n\n private Long id;\n\n @Lob\n private String message;\n\n private String attack;\n\n private Integer heal;\n\n private Integer difficulty;\n\n private Boolean success;\n\n private String attribute;\n\n private Long playerId;\n\n private Long eventId;\n\n public Long getId() {\n return id;\n }\n\n public void setId(Long id) {\n this.id = id;\n }\n\n public String getMessage() {\n return message;\n }\n\n public void setMessage(String message) {\n this.message = message;\n }\n\n public String getAttack() {\n return attack;\n }\n\n public void setAttack(String attack) {\n this.attack = attack;\n }\n\n public Integer getHeal() {\n return heal;\n }\n\n public void setHeal(Integer heal) {\n this.heal = heal;\n }\n\n public Integer getDifficulty() {\n return difficulty;\n }\n\n public void setDifficulty(Integer difficulty) {\n this.difficulty = difficulty;\n }\n\n public Boolean isSuccess() {\n return success;\n }\n\n public void setSuccess(Boolean success) {\n this.success = success;\n }\n\n public String getAttribute() {\n return attribute;\n }\n\n public void setAttribute(String attribute) {\n this.attribute = attribute;\n }\n\n public Long getPlayerId() {\n return playerId;\n }\n\n public void setPlayerId(Long playerId) {\n this.playerId = playerId;\n }\n\n public Long getEventId() {\n return eventId;\n }\n\n public void setEventId(Long eventId) {\n this.eventId = eventId;\n }\n\n @Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (o == null || getClass() != o.getClass()) {\n return false;\n }\n\n PlayerMessageDTO playerMessageDTO = (PlayerMessageDTO) o;\n if (playerMessageDTO.getId() == null || getId() == null) {\n return false;\n }\n return Objects.equals(getId(), playerMessageDTO.getId());\n }\n\n @Override\n public int hashCode() {\n return Objects.hashCode(getId());\n }\n\n @Override\n public String toString() {\n return \"PlayerMessageDTO{\" +\n \"id=\" + getId() +\n \", message='\" + getMessage() + \"'\" +\n \", attack='\" + getAttack() + \"'\" +\n \", heal=\" + getHeal() +\n \", difficulty=\" + getDifficulty() +\n \", success='\" + isSuccess() + \"'\" +\n \", attribute='\" + getAttribute() + \"'\" +\n \", player=\" + getPlayerId() +\n \", event=\" + getEventId() +\n \"}\";\n }\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2951,"cells":{"blob_id":{"kind":"string","value":"5fea233b097ff9edc5685c7e060b20ae5979e813"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"miguellysanchez/realmexamples"},"path":{"kind":"string","value":"/app/src/main/java/com/example/realmexample/part2/realmobjects/DogRO.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":690,"string":"690"},"score":{"kind":"number","value":2.625,"string":"2.625"},"int_score":{"kind":"number","value":3,"string":"3"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package com.example.realmexample.part2.realmobjects;\n\nimport io.realm.RealmObject;\nimport io.realm.annotations.PrimaryKey;\n\n/**\n * Created by miguellysanchez on 8/7/17.\n */\n\npublic class DogRO extends RealmObject {\n\n @PrimaryKey\n private String name;\n private String breed;\n private int age;\n\n public String getName() {\n return name;\n }\n\n public void setName(String name) {\n this.name = name;\n }\n\n public String getBreed() {\n return breed;\n }\n\n public void setBreed(String breed) {\n this.breed = breed;\n }\n\n public int getAge() {\n return age;\n }\n\n public void setAge(int age) {\n this.age = age;\n }\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2952,"cells":{"blob_id":{"kind":"string","value":"98f1e6263111d3fd85a0f3ada284d889ab2d535d"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"apotukareon/hibersap"},"path":{"kind":"string","value":"/hibersap-core/src/main/java/org/hibersap/configuration/xml/Property.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":3039,"string":"3,039"},"score":{"kind":"number","value":2.1875,"string":"2.1875"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"license_type":{"kind":"string","value":"permissive"},"text":{"kind":"string","value":"/*\n * Copyright (c) 2008-2019 akquinet tech@spree GmbH\n *\n * This file is part of Hibersap.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this software except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage org.hibersap.configuration.xml;\n\nimport java.io.Serializable;\nimport javax.annotation.Generated;\nimport javax.xml.bind.annotation.XmlAccessType;\nimport javax.xml.bind.annotation.XmlAccessorType;\nimport javax.xml.bind.annotation.XmlAttribute;\nimport javax.xml.bind.annotation.XmlType;\n\n@XmlAccessorType(XmlAccessType.FIELD)\n@XmlType(name = \"\")\npublic class Property implements Serializable {\n\n @XmlAttribute(required = true)\n protected String name;\n @XmlAttribute(required = true)\n protected String value;\n\n @SuppressWarnings({\"UnusedDeclaration\"})\n public Property() {\n }\n\n public Property(final String name, final String value) {\n this.name = name;\n this.value = value;\n }\n\n /**\n * Gets the value of the name properties.\n *\n * @return possible object is\n * {@link String }\n */\n public String getName() {\n return name;\n }\n\n /**\n * Sets the value of the name properties.\n *\n * @param value allowed object is\n * {@link String }\n */\n public void setName(final String value) {\n this.name = value;\n }\n\n /**\n * Gets the value of the value properties.\n *\n * @return possible object is\n * {@link String }\n */\n public String getValue() {\n return value;\n }\n\n /**\n * Sets the value of the value properties.\n *\n * @param value allowed object is\n * {@link String }\n */\n public void setValue(final String value) {\n this.value = value;\n }\n\n @Override\n public String toString() {\n return \"(\" + name + \" => \" + value + \")\";\n }\n\n @Override\n @Generated(\"\")\n public boolean equals(final Object o) {\n if (this == o) {\n return true;\n }\n if (o == null || getClass() != o.getClass()) {\n return false;\n }\n\n Property property = (Property) o;\n\n if (name != null ? !name.equals(property.name) : property.name != null) {\n return false;\n }\n if (value != null ? !value.equals(property.value) : property.value != null) {\n return false;\n }\n\n return true;\n }\n\n @Override\n @Generated(\"\")\n public int hashCode() {\n int result = name != null ? name.hashCode() : 0;\n result = 31 * result + (value != null ? value.hashCode() : 0);\n return result;\n }\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2953,"cells":{"blob_id":{"kind":"string","value":"622cf2cfc24e77fd2cd0b5650b519ef77bac29d2"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"percussion/percussioncms"},"path":{"kind":"string","value":"/projects/sitemanage/src/main/java/com/percussion/sitemanage/data/PSSiteImportCtx.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":6337,"string":"6,337"},"score":{"kind":"number","value":1.875,"string":"1.875"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":["LicenseRef-scancode-dco-1.1","Apache-2.0","OFL-1.1","LGPL-2.0-or-later"],"string":"[\n \"LicenseRef-scancode-dco-1.1\",\n \"Apache-2.0\",\n \"OFL-1.1\",\n \"LGPL-2.0-or-later\"\n]"},"license_type":{"kind":"string","value":"permissive"},"text":{"kind":"string","value":"/*\n * Copyright 1999-2023 Percussion Software, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage com.percussion.sitemanage.data;\n\nimport com.percussion.sitemanage.importer.IPSSiteImportLogger;\nimport com.percussion.sitesummaryservice.service.IPSSiteImportSummaryService;\nimport com.percussion.theme.data.PSThemeSummary;\n\nimport java.util.Map;\n\n/**\n * @author LucasPiccoli\n *\n */\npublic class PSSiteImportCtx\n{\n\n String siteUrl;\n \n PSSite site;\n \n IPSSiteImportLogger logger;\n \n IPSSiteImportSummaryService summaryService;\n \n Map summaryStats;\n\n PSThemeSummary themeSummary;\n \n String themesRootDirectory;\n \n String templateId = null;\n \n String pageName;\n \n String catalogedPageId;\n\n String templateName;\n\t\n\tString statusMessagePrefix;\n\t \n String userAgent;\n\n boolean isCanceled = false;\n \n /**\n * @return the siteUrl\n */\n public String getSiteUrl()\n {\n return siteUrl;\n }\n\n /**\n * @param siteUrl the siteUrl to set\n */\n public void setSiteUrl(String siteUrl)\n {\n this.siteUrl = siteUrl;\n }\n\n /**\n * @return the site\n */\n public PSSite getSite()\n {\n return site;\n }\n\n /**\n * @param site the site to set\n */\n public void setSite(PSSite site)\n {\n this.site = site;\n }\n \n /**\n * Set logger on the context.\n * \n * @param logger The logger, never null\n */\n public void setLogger(IPSSiteImportLogger logger)\n {\n this.logger = logger; \n }\n \n /**\n * Get the current logger.\n * \n * @return The logger, never null.\n * @throws IllegalStateException if no logger has been set.\n */\n public IPSSiteImportLogger getLogger()\n {\n if (logger == null)\n throw new IllegalStateException(\"logger has not been set\");\n \n return logger;\n }\n\n public IPSSiteImportSummaryService getSummaryService()\n {\n return summaryService;\n }\n\n public void setSummaryService(IPSSiteImportSummaryService summaryService)\n {\n this.summaryService = summaryService;\n }\n\n \n /**\n * @return the theme summary\n */\n public PSThemeSummary getThemeSummary()\n {\n return themeSummary;\n }\n \n /**\n * @param themeSummary the new summary to assign\n */\n public void setThemeSummary(PSThemeSummary themeSummary)\n {\n this.themeSummary = themeSummary;\n }\n \n /**\n * @return the themes root directory absolute path\n */\n public String getThemesRootDirectory()\n {\n return themesRootDirectory;\n }\n\n /**\n * @param themesRootDirectory the themes root directory absolute path\n */\n public void setThemesRootDirectory(String themesRootDirectory)\n {\n this.themesRootDirectory = themesRootDirectory;\n }\n\n /**\n * Get the id of the template if one was created during the import process.\n * \n * @return The id, or null if a template was not created.\n */\n public String getTemplateId()\n {\n return templateId;\n }\n\n /**\n * Set the id of the template if one was created during the import process, must\n * be called in order for an import log to be saved.\n * \n * @param templateId The template id.\n */\n public void setTemplateId(String templateId)\n {\n this.templateId = templateId;\n }\n\n /**\n * @return the pageName\n */\n public String getPageName()\n {\n return pageName;\n }\n\n /**\n * @param pageName the pageName to set\n */\n public void setPageName(String pageName)\n {\n this.pageName = pageName;\n }\n\n /**\n * @return the templateName\n */\n public String getTemplateName()\n {\n return templateName;\n }\n\n /**\n * @param templateName the templateName to set\n */\n public void setTemplateName(String templateName)\n {\n this.templateName = templateName;\n } \n \n /**\n * @return the statusMessagePrefix\n */\n public String getStatusMessagePrefix()\n {\n return statusMessagePrefix;\n }\n\n /**\n * @param statusMessagePrefix the statusMessagePrefix to set\n */\n public void setStatusMessagePrefix(String statusMessagePrefix)\n {\n this.statusMessagePrefix = statusMessagePrefix;\n } \n \n /**\n * @return the userAgent\n */\n public String getUserAgent()\n {\n return userAgent;\n }\n\n /**\n * @param userAgent the userAgent to set\n */\n public void setUserAgent(String userAgent)\n {\n this.userAgent = userAgent;\n }\n\n /**\n * Used when importing cataloged pages. Is the id of the page being\n * imported.\n * \n * @return {@link String} may be null.\n */\n public String getCatalogedPageId()\n {\n return catalogedPageId;\n }\n\n public void setCatalogedPageId(String catalogedPageId)\n {\n this.catalogedPageId = catalogedPageId;\n }\n \n public void setCanceled(boolean cancelFlag)\n {\n isCanceled = cancelFlag;\n }\n \n /**\n * Determines if the current import process has been canceled.\n * \n * @return true if the import process has been canceled. \n */\n public boolean isCanceled()\n {\n return isCanceled;\n }\n /**\n * @return May be null if not set.\n */\n public Map getSummaryStats()\n {\n return summaryStats;\n }\n\n public void setSummaryStats(Map summaryStats)\n {\n this.summaryStats = summaryStats;\n }\n\n\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2954,"cells":{"blob_id":{"kind":"string","value":"eca53c9debdc0f1a31ef40d48eebdea81e0c9278"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"cpchu/heps-db-param_list"},"path":{"kind":"string","value":"/src/java/heps/db/param_list/ejb/ReferenceFacade.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":1708,"string":"1,708"},"score":{"kind":"number","value":2.375,"string":"2.375"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"/*\r\n * To change this license header, choose License Headers in Project Properties.\r\n * To change this template file, choose Tools | Templates\r\n * and open the template in the editor.\r\n */\r\npackage heps.db.param_list.ejb;\r\n\r\nimport static heps.db.param_list.ejb.UnitFacade.em;\r\nimport heps.db.param_list.entity.Reference;\r\nimport heps.db.param_list.entity.Unit;\r\nimport java.util.List;\r\nimport javax.ejb.Stateless;\r\nimport javax.persistence.EntityManager;\r\nimport javax.persistence.EntityManagerFactory;\r\nimport javax.persistence.Persistence;\r\nimport javax.persistence.PersistenceContext;\r\nimport javax.persistence.PersistenceUnit;\r\nimport javax.persistence.Query;\r\n\r\n/**\r\n *\r\n * @author Lvhuihui\r\n */\r\n@Stateless\r\npublic class ReferenceFacade {\r\n\r\n @PersistenceUnit\r\n static EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"param_listPU\");\r\n static EntityManager em = emf.createEntityManager();\r\n\r\n @PersistenceContext\r\n\r\n public void setReference(String title, String author, String publication, String url, String keywords) {\r\n Reference r = new Reference();\r\n r.setTitle(title);\r\n r.setAuthor(author);\r\n r.setPublication(publication);\r\n r.setUrl(url);\r\n r.setKeywords(keywords);\r\n\r\n em.getTransaction().begin();\r\n em.persist(r);\r\n em.getTransaction().commit();\r\n }\r\n\r\n public Reference getReferenceByTitle(String title) {\r\n Query q;\r\n q = em.createNamedQuery(\"Reference.findByTitle\").setParameter(\"title\", title);\r\n List l = q.getResultList();\r\n if (l.isEmpty()) {\r\n return null;\r\n } else {\r\n return l.get(0);\r\n }\r\n }\r\n\r\n}\r\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2955,"cells":{"blob_id":{"kind":"string","value":"2af89a6e10d3321d74020cfd50609d267c346f12"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"haikelei/ChaoKe"},"path":{"kind":"string","value":"/app/src/main/java/luyuan/tech/com/chaoke/activity/AddHouseActivity.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":6709,"string":"6,709"},"score":{"kind":"number","value":1.8359375,"string":"1.835938"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package luyuan.tech.com.chaoke.activity;\n\nimport android.content.Intent;\nimport android.os.Bundle;\nimport android.support.annotation.Nullable;\nimport android.text.TextUtils;\nimport android.view.View;\nimport android.widget.Button;\nimport android.widget.ImageView;\n\nimport com.zhouyou.http.callback.SimpleCallBack;\nimport com.zhouyou.http.exception.ApiException;\nimport com.zhouyou.http.request.PostRequest;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\n\nimport butterknife.BindView;\nimport butterknife.ButterKnife;\nimport butterknife.OnClick;\nimport luyuan.tech.com.chaoke.R;\nimport luyuan.tech.com.chaoke.base.BaseActivity;\nimport luyuan.tech.com.chaoke.bean.ItemBean;\nimport luyuan.tech.com.chaoke.bean.StringDataResponse;\nimport luyuan.tech.com.chaoke.bean.XiaoQuBean;\nimport luyuan.tech.com.chaoke.net.HttpManager;\nimport luyuan.tech.com.chaoke.net.NetParser;\nimport luyuan.tech.com.chaoke.utils.T;\nimport luyuan.tech.com.chaoke.utils.UserInfoUtils;\nimport luyuan.tech.com.chaoke.widget.InputLayout;\nimport luyuan.tech.com.chaoke.widget.SelectDialogFragment;\nimport luyuan.tech.com.chaoke.widget.SelectLayout;\n\nimport static com.zhouyou.http.EasyHttp.getContext;\n\n/**\n * @author: lujialei\n * @date: 2019/6/10\n * @describe:\n */\n\n\npublic class AddHouseActivity extends BaseActivity {\n @BindView(R.id.iv_back)\n ImageView ivBack;\n @BindView(R.id.sl_unity_name)\n SelectLayout slUnityName;\n @BindView(R.id.input_unity_address)\n InputLayout inputUnityAddress;\n @BindView(R.id.sl_house_from)\n SelectLayout slHouseFrom;\n @BindView(R.id.sl_house_state)\n SelectLayout slHouseState;\n @BindView(R.id.input_host_name)\n InputLayout inputHostName;\n @BindView(R.id.input_host_tel)\n InputLayout inputHostTel;\n @BindView(R.id.btn_next)\n Button btnNext;\n @BindView(R.id.input_lou)\n InputLayout inputLou;\n @BindView(R.id.input_danyuan)\n InputLayout inputDanyuan;\n @BindView(R.id.input_hao)\n InputLayout inputHao;\n @BindView(R.id.sl_chuzufangshi)\n SelectLayout slChuzufangshi;\n private String houseId;\n private XiaoQuBean bean;\n\n @Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_add_house);\n ButterKnife.bind(this);\n\n String[] arr = {\"中介合作\", \"转介绍\", \"老客户\", \"网络端口\", \"地推\", \"房东上门\", \"名单获取\", \"销冠\", \"其他\"};\n setSelectLListener(slHouseFrom,arr);\n\n String[] arr1 = {\"业主待租\", \"非自营在租\", \"业主自用\"};\n setSelectLListener(slHouseState,arr1);\n\n String[] arr2 = {\"整租\", \"分租\"};\n setSelectLListener(slChuzufangshi,arr2);\n }\n\n @OnClick({R.id.iv_back, R.id.sl_unity_name, R.id.btn_next})\n public void onViewClicked(View view) {\n switch (view.getId()) {\n case R.id.iv_back:\n onBackPressed();\n break;\n case R.id.sl_unity_name:\n startActivityForResult(new Intent(getActivity(),XuanZeXiaoQuActivity.class),133);\n break;\n case R.id.btn_next:\n loadData();\n break;\n }\n }\n\n private void loadData() {\n if (!checkEmptyInfo()) {\n return;\n }\n PostRequest postRequest = HttpManager.post(HttpManager.FABUONE)\n .params(\"token\", UserInfoUtils.getInstance().getToken())\n .params(\"address\", inputUnityAddress.getText().toString().trim())\n .params(\"source\", getValue(slHouseFrom))\n .params(\"rent_state\", getValue(slHouseState))\n .params(\"landlady_name\", inputHostName.getText().toString().trim())\n .params(\"mode\",getValue(slChuzufangshi))\n .params(\"floor_count\",inputLou.getText().toString().trim())\n .params(\"unit\",inputDanyuan.getText().toString().trim())\n .params(\"number\",inputHao.getText().toString().trim())\n .params(\"landlady_phone\", inputHostTel.getText().toString().trim());\n\n if (bean!=null){\n postRequest.params(\"rid\", bean.getId()+\"\");\n }\n if (!TextUtils.isEmpty(houseId)) {\n postRequest.params(\"first_id\", houseId);\n }\n postRequest.execute(new SimpleCallBack() {\n\n @Override\n public void onError(ApiException e) {\n T.showShort(getContext(), e.getMessage());\n }\n\n @Override\n public void onSuccess(String s) {\n if (NetParser.isOk(s)) {\n StringDataResponse response = NetParser.parse(s, StringDataResponse.class);\n houseId = response.getData();\n if (!TextUtils.isEmpty(response.getMsg())){\n T.showShort(getActivity(),response.getMsg());\n return;\n }\n Intent intent = new Intent(getBaseContext(), AddHouseOtherInfoActivity.class);\n intent.putExtra(\"id\", houseId);\n startActivityForResult(intent, 199);\n }else {\n StringDataResponse dataResponse = NetParser.parse(s,StringDataResponse.class);\n T.showShort(getActivity(),dataResponse.getMsg());\n }\n }\n });\n }\n\n private void createDialog(String[] arr, final SelectLayout sl) {\n ArrayList datas = new ArrayList<>();\n for (int i = 0; i < arr.length; i++) {\n ItemBean itemBean = new ItemBean();\n itemBean.setTitle(arr[i]);\n itemBean.setChecked(sl.getText().equals(arr[i]));\n datas.add(itemBean);\n }\n SelectDialogFragment dialogFragment = SelectDialogFragment.create(datas);\n dialogFragment.show(getSupportFragmentManager());\n dialogFragment.setOnSelectListener(new SelectDialogFragment.OnSelectListener() {\n @Override\n public void onSelect(String s) {\n sl.setText(s);\n }\n });\n }\n\n @Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 199) {\n if (resultCode == RESULT_OK) {\n setResult(RESULT_OK);\n finish();\n }\n }else if (requestCode==133){\n if (resultCode == RESULT_OK) {\n bean = (XiaoQuBean) data.getSerializableExtra(\"data\");\n slUnityName.setText(bean.getReside_name());\n }\n }\n }\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2956,"cells":{"blob_id":{"kind":"string","value":"56d8f4f2dc097ef87d708b13abc8c88c19a9016b"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"ljsnake/RSERP"},"path":{"kind":"string","value":"/src/com/fudan/rserp/module/yhgl/YhglService.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":3037,"string":"3,037"},"score":{"kind":"number","value":2,"string":"2"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package com.fudan.rserp.module.yhgl;\n\nimport java.util.List;\n\nimport com.fudan.rserp.config.model.TbErpUser;\nimport com.fudan.rserp.module.base.BaseGetSessionValue;\nimport com.fudan.rserp.util.PageSet;\nimport com.hp.ipg.security.PasswordManager;\nimport com.hp.ipg.security.PasswordManagerException;\n\npublic class YhglService {\n\tprivate YhglDao dao;\n\tpublic PageSet getYhList(PageSet ps,ListCondition lc){\n\t\tif(ps==null){\n\t\t\tps = new PageSet();\n\t\t}\n\t\tps = dao.getYhList(ps, lc);\n\t\treturn ps;\n\t}\n\tpublic int addUser(TbErpUser user){\n\t\tif(user!=null){\n\t\t\tif(user.getLoginName()!=null&&!\"\".equals(user.getLoginName())){\n\t\t\t\tif(dao.checkPropertyInEntityHasExist(\"TbErpUser\",\"loginName\",user.getLoginName())){\n\t\t\t\t\treturn 2;//登录名已存在\n\t\t\t\t}\n\t\t\t\tif(user.getPassword()!=null&&!\"\".equals(user.getPassword())){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tuser.setPassword(PasswordManager.encryptAndEncodeString(user.getPassword()));\n\t\t\t\t\t} catch (PasswordManagerException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\treturn 10;//异常\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdao.saveOrUpdateObject(user);\n\t\t\t\treturn 0;//操作成功.\n\t\t\t}\n\t\t}\n\t\treturn 1;//传入参数不合法.\n\t}\n\tpublic TbErpUser getUser(TbErpUser uservo){\n\t\tif(uservo!=null){\n\t\t\treturn (TbErpUser)dao.getObjectById(TbErpUser.class, uservo.getId());\n\t\t}\n\t\treturn uservo;\n\t}\n\tpublic TbErpUser getUserById(Integer id){\n\t\treturn (TbErpUser)dao.getObjectById(TbErpUser.class, id);\n\t}\n\tpublic void updateUser(TbErpUser uservo){\n\t\tTbErpUser user = (TbErpUser)dao.getObjectById(TbErpUser.class, uservo.getId());\n\t\tuser.setName(uservo.getName());\n\t\tuser.setEmail(uservo.getEmail());\n\t\tif(uservo.getPassword()!=null&&!\"\".equals(uservo.getPassword())){\n\t\t\ttry {\n\t\t\t\tuser.setPassword(PasswordManager.encryptAndEncodeString(uservo.getPassword()));\n\t\t\t} catch (PasswordManagerException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tdao.updateObject(user);\n\t}\n\tpublic int updatePassword(TbErpUser uservo,String passwordold){\n\t\tif(uservo==null || passwordold==null || \"\".equals(passwordold)\n\t\t\t\t||uservo.getPassword()==null || \"\".equals(uservo.getPassword())){\n\t\t\treturn 1;//传入值不合法或旧密码为空.\n\t\t}\n\t\ttry {\n\t\t\tpasswordold = PasswordManager.encryptAndEncodeString(passwordold);\n\t\t\tString loginName = BaseGetSessionValue.getUserLoginName();\n\t\t\tif(loginName!=null&&!\"\".equals(loginName)){\n\t\t\t\tList ls = dao.checkUserLoginNamePasswordExist(loginName,passwordold);\n\t\t\t\tif(ls==null||ls.size()<1){\n\t\t\t\t\treturn 2;//原密码错误.\n\t\t\t\t}\n\t\t\t}\n\t\t\tString id = BaseGetSessionValue.getUserId();\n\t\t\tif(id!=null&&!\"\".equals(id)){\n\t\t\t\tTbErpUser user = (TbErpUser)dao.getObjectById(TbErpUser.class, id);\n\t\t\t\ttry {\n\t\t\t\t\tuser.setPassword(PasswordManager.encryptAndEncodeString(uservo.getPassword()));\n\t\t\t\t\tdao.updateObject(user);\n\t\t\t\t\treturn 0;//操作成功.\n\t\t\t\t} catch (PasswordManagerException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (PasswordManagerException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn 10;//异常.\n\t}\n\t\n\tpublic YhglDao getDao() {\n\t\treturn dao;\n\t}\n\tpublic void setDao(YhglDao dao) {\n\t\tthis.dao = dao;\n\t}\n\t\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2957,"cells":{"blob_id":{"kind":"string","value":"54cb2b4662f09165e1c245d52bae39fd93fcc390"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"StandCN/Project-M"},"path":{"kind":"string","value":"/service/user/src/main/java/com/hellcat/user/UserApplication.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":720,"string":"720"},"score":{"kind":"number","value":1.6953125,"string":"1.695313"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"license_type":{"kind":"string","value":"permissive"},"text":{"kind":"string","value":"package com.hellcat.user;\n\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.context.annotation.EnableAspectJAutoProxy;\nimport org.springframework.data.mongodb.repository.config.EnableReactiveMongoRepositories;\nimport org.springframework.transaction.annotation.EnableTransactionManagement;\nimport org.springframework.web.reactive.config.EnableWebFlux;\n\n@SpringBootApplication\n@EnableReactiveMongoRepositories\n@EnableTransactionManagement\n@EnableWebFlux\n@EnableAspectJAutoProxy\npublic class UserApplication {\n\n public static void main(String[] args) {\n SpringApplication.run(UserApplication.class, args);\n }\n\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2958,"cells":{"blob_id":{"kind":"string","value":"aaa4a361384c04c5524cfcd94d4bdc010f83cae2"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"aysenurcelik/NorthWindFinal"},"path":{"kind":"string","value":"/northWindProject/src/main/java/com/northWind/northWindProject/entities/conretes/Cart.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":821,"string":"821"},"score":{"kind":"number","value":2.125,"string":"2.125"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package com.northWind.northWindProject.entities.conretes;\n\n\nimport javax.persistence.Column;\n\nimport javax.persistence.Entity;\nimport javax.persistence.GeneratedValue;\nimport javax.persistence.GenerationType;\nimport javax.persistence.Id;\nimport javax.persistence.Table;\n\nimport com.northWind.northWindProject.entities.abstracts.IEntity;\n\nimport lombok.Data;\n\n\n@Entity\n@Table(name=\"cart\")\n@Data\n\npublic class Cart implements IEntity {\n\t\n\t@Id\n\t@GeneratedValue(strategy = GenerationType.AUTO)\n\t@Column(name=\"cart_id\")\n\tint cartId;\n\t@Column(name=\"product_id\")\n\tint prodcutId;\n\t@Column(name=\"customer_id\")\n\tString customerId;\n\tpublic int custId = Integer.parseInt(customerId); \n\t@Column(name=\"quantity\")\n\tint quantity;\n\t@Column(name=\"item_cost\")\n\tString cartItemCost; \n\t@Column(name =\"item_name\")\n\tString itemName;\n\n\t\n\t\n\t\n\t\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2959,"cells":{"blob_id":{"kind":"string","value":"fc2513b334d258f879bc900e1bed00354f6c62f1"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"cengizgoren/facebook_apk_crack"},"path":{"kind":"string","value":"/app/com/facebook/katana/activity/media/vault/VaultOptInControlFragment.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":787,"string":"787"},"score":{"kind":"number","value":1.5703125,"string":"1.570313"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package com.facebook.katana.activity.media.vault;\n\nimport android.os.Bundle;\nimport android.text.Html;\nimport android.view.View;\nimport android.widget.TextView;\nimport com.facebook.orca.common.util.StringLocaleUtil;\n\npublic class VaultOptInControlFragment extends VaultSimpleOptInFragment\n{\n public void d(Bundle paramBundle)\n {\n super.d(paramBundle);\n String str1 = \"\" + e(2131363601) + \"\";\n String str2 = StringLocaleUtil.b(e(2131363600), new Object[] { str1 });\n ((TextView)A().findViewById(2131297948)).setText(Html.fromHtml(str2));\n }\n}\n\n/* Location: /data1/software/jd-gui/com.facebook.katana_2.0_liqucn.com-dex2jar.jar\n * Qualified Name: com.facebook.katana.activity.media.vault.VaultOptInControlFragment\n * JD-Core Version: 0.6.0\n */"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2960,"cells":{"blob_id":{"kind":"string","value":"adc3ff2c8c8736729b60983610d661c190bc483f"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"zuzya/proxyTest"},"path":{"kind":"string","value":"/src/me/proxy/storage/impl/DBStorageReader.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":3976,"string":"3,976"},"score":{"kind":"number","value":2.265625,"string":"2.265625"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package me.proxy.storage.impl;\r\n\r\nimport java.io.ByteArrayInputStream;\r\nimport java.io.ByteArrayOutputStream;\r\nimport java.io.IOException;\r\nimport java.io.InputStream;\r\nimport java.io.InputStreamReader;\r\nimport java.io.OutputStream;\r\nimport java.io.UnsupportedEncodingException;\r\nimport java.sql.Blob;\r\nimport java.sql.Connection;\r\nimport java.sql.DriverManager;\r\nimport java.sql.PreparedStatement;\r\nimport java.sql.ResultSet;\r\nimport java.sql.SQLException;\r\nimport java.sql.Statement;\r\nimport java.text.DateFormat;\r\nimport java.text.SimpleDateFormat;\r\n\r\nimport me.proxy.storage.common.StorageReader;\r\n\r\npublic class DBStorageReader extends StorageReader {\r\n\r\n\tpublic DBStorageReader(OutputStream streamFrom, boolean isRequest) {\r\n\t\tsuper(streamFrom, isRequest);\r\n\t}\r\n\r\n\tprotected InputStream inputStream;\r\n\tprotected ByteArrayOutputStream outputStream;\r\n\t\r\n\tprivate static final String DB_DRIVER = \"com.mysql.jdbc.Driver\";\r\n\tprivate static final String DB_CONNECTION = \"jdbc:mysql://localhost:3306/proxydb\";\r\n\tprivate static final String DB_USER = \"root\";\r\n\tprivate static final String DB_PASSWORD = \"\";\r\n\tprivate static final DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\t\r\n\t\t\t\r\n\t\r\n\t@Override\r\n\tpublic InputStream readRow() {\r\n\r\n\t\tConnection dbConnection = null;\r\n\t\tPreparedStatement preparedStatement = null;\r\n\t\tStatement statement = null;\r\n\t\tResultSet rs = null;\r\n\t\tInputStream stream = null;\r\n\t\t\r\n\t\toutputStream = new ByteArrayOutputStream();\r\n\t\t\r\n\t\tString tableName = null;\r\n\t\tif(isRequest){\r\n\t\t\ttableName = \"REQUEST\";\r\n\t\t} else {\r\n\t\t\ttableName = \"ANSWER\";\r\n\t\t}\r\n\t\t\r\n\t\tString insertTableSQL = \"SELECT * FROM proxydb.\" +tableName+ \" r WHERE r.Readed = 0 ORDER BY r.DATE \";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tdbConnection = getDBConnection();\r\n\t\t\tpreparedStatement = dbConnection.prepareStatement(insertTableSQL,ResultSet.TYPE_SCROLL_SENSITIVE,\r\n\t ResultSet.CONCUR_UPDATABLE);\r\n\t\r\n\t\t\twhile(true){\t\t\t\t\r\n\t\t\t\t// execute insert SQL stetement\r\n\t\t\t\trs = preparedStatement.executeQuery();\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(rs.isBeforeFirst())\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\t\r\n\t\t\t\tint id = rs.getInt(1);\r\n\t\t\t\tbyte[] body = rs.getBytes(3);\r\n//\t\t\t\tBlob blob = rs.getBlob(3);\r\n//\t\t\t\tstream = blob.getBinaryStream();\r\n//\t\t\t\t\r\n//\t\t\t\tstream = new ByteArrayInputStream(body); \r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\toutputStream.write(body);\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Body: \");\r\n\t\t\t\tSystem.out.println(new String(body));\r\n\t\t\t\t\r\n\t\t\t\tboolean b = rs.getBoolean(5);\r\n\t\t\t\trs.updateBoolean(\"Readed\", true);\r\n\t\t\t\trs.updateRow();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\tSystem.out.println(\"Record is readed into REQUEST table!\");\r\n\r\n\t\t\treturn new ByteArrayInputStream(outputStream.toByteArray());\r\n\t\t} catch (SQLException e) {\r\n\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\r\n\t\t} finally {\r\n\r\n\t\t\tif (preparedStatement != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tpreparedStatement.close();\r\n\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (dbConnection != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tdbConnection.close();\r\n\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn new ByteArrayInputStream(outputStream.toByteArray());\r\n\r\n\t}\r\n\r\n\r\n\tprivate static Connection getDBConnection() {\r\n\r\n\t\tConnection dbConnection = null;\r\n\r\n\t\ttry {\r\n\r\n\t\t\tClass.forName(DB_DRIVER);\r\n\r\n\t\t} catch (ClassNotFoundException e) {\r\n\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\r\n\t\t}\r\n\r\n\t\ttry {\r\n\r\n\t\t\tdbConnection = DriverManager.getConnection(\r\n DB_CONNECTION, DB_USER,DB_PASSWORD);\r\n\t\t\treturn dbConnection;\r\n\r\n\t\t} catch (SQLException e) {\r\n\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\r\n\t\t}\r\n\r\n\t\treturn dbConnection;\r\n\r\n\t}\r\n\r\n\tprivate static String getCurrentTimeStamp() {\r\n\r\n\t\tjava.util.Date today = new java.util.Date();\r\n\t\treturn dateFormat.format(today.getTime());\r\n\r\n\t}\r\n\r\n\t\t\t\r\n\t\t\t\r\n}\r\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2961,"cells":{"blob_id":{"kind":"string","value":"07397b073768c30bcce266eb015d86cf85a86366"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"salmawardha/Pemrograman-1"},"path":{"kind":"string","value":"/flipLines.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":502,"string":"502"},"score":{"kind":"number","value":3.109375,"string":"3.109375"},"int_score":{"kind":"number","value":3,"string":"3"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"import java.io.*; \r\nimport java.util.*; \r\n\r\npublic class flipLines {\r\npublic static void main(String[] args) throws FileNotFoundException {\r\n Scanner input = new Scanner(new File(\"fliplines.txt\"));\r\n flipLines(input);\r\n}\r\n\r\npublic static void flipLines(Scanner input) {\r\n while (input.hasNextLine()) {\r\n String line = input.nextLine();\r\n if (input.hasNextLine()) {\r\n System.out.println(input.nextLine());\r\n }\r\n System.out.println(line);\r\n }\r\n }\r\n}\r\n\r\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2962,"cells":{"blob_id":{"kind":"string","value":"6a2280f53f66905f2110280fafe9bc9fc2b15fdd"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"Zumbalamambo/PullLayout"},"path":{"kind":"string","value":"/app/src/main/java/com/d/pulllayout/pull/activity/RecyclerViewActivity.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":1392,"string":"1,392"},"score":{"kind":"number","value":2.25,"string":"2.25"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"license_type":{"kind":"string","value":"permissive"},"text":{"kind":"string","value":"package com.d.pulllayout.pull.activity;\n\nimport android.os.Bundle;\nimport android.support.annotation.NonNull;\nimport android.support.annotation.Nullable;\nimport android.support.v7.app.AppCompatActivity;\nimport android.support.v7.widget.LinearLayoutManager;\nimport android.support.v7.widget.RecyclerView;\n\nimport com.d.pulllayout.R;\nimport com.d.pulllayout.pull.adapter.RecyclerAdapter;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\n/**\n * RecyclerViewActivity\n * Created by D on 2018/5/31.\n */\npublic class RecyclerViewActivity extends AppCompatActivity {\n private RecyclerView rv_list;\n\n @Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_pull_recyclerview);\n rv_list = (RecyclerView) findViewById(R.id.rv_list);\n init();\n }\n\n private void init() {\n LinearLayoutManager layoutManager = new LinearLayoutManager(this);\n layoutManager.setOrientation(LinearLayoutManager.VERTICAL);\n rv_list.setLayoutManager(layoutManager);\n rv_list.setAdapter(new RecyclerAdapter(this, getDatas(), R.layout.adapter_item));\n }\n\n @NonNull\n private List getDatas() {\n List datas = new ArrayList<>();\n for (int i = 0; i < 20; i++) {\n datas.add(\"\" + i);\n }\n return datas;\n }\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2963,"cells":{"blob_id":{"kind":"string","value":"81a12a48c10ea1555f095596ad5a727126f1dda8"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"3ntropia/ProgramacionIII"},"path":{"kind":"string","value":"/TP1/src/indiceN/MainIndiceN.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":543,"string":"543"},"score":{"kind":"number","value":3.015625,"string":"3.015625"},"int_score":{"kind":"number","value":3,"string":"3"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package indiceN;\r\n\r\nimport Implementaciones.Vector;\r\nimport TDA.VectorTDA;\r\n\r\n/**\r\n * @author martinh\r\n *\r\n */\r\npublic class MainIndiceN {\r\n\r\n\tpublic static void main(String[] args) {\r\n\t\ttry {\r\n\t\t\tVectorTDA vec = new Vector();\r\n\t\t\tvec.inicializarVector(50);\r\n\t\t\tfor (int i = 0; i < 50; i++) {\r\n\t\t\t\tvec.agregarElemento(i, i + 1);\r\n\t\t\t}\r\n\t\t\tvec.agregarElemento(20, 20);\r\n\t\t\tint a = Metodo.indiceNatural(vec, 0, 50);\r\n\t\t\tSystem.out.print(a);\r\n\t\t} catch (\r\n\r\n\t\tException e) {\r\n\t\t\tSystem.out.print(e.getMessage());\r\n\t\t}\r\n\t}\r\n\r\n}\r\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2964,"cells":{"blob_id":{"kind":"string","value":"cbabc4c1c064a697af743d24cf39963395adb2c0"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"SpongePowered/SpongeAPI"},"path":{"kind":"string","value":"/src/main/java/org/spongepowered/api/entity/EntitySnapshot.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":6257,"string":"6,257"},"score":{"kind":"number","value":1.78125,"string":"1.78125"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":["LicenseRef-scancode-unknown-license-reference","MIT"],"string":"[\n \"LicenseRef-scancode-unknown-license-reference\",\n \"MIT\"\n]"},"license_type":{"kind":"string","value":"permissive"},"text":{"kind":"string","value":"/*\n * This file is part of SpongeAPI, licensed under the MIT License (MIT).\n *\n * Copyright (c) SpongePowered \n * Copyright (c) contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\npackage org.spongepowered.api.entity;\n\nimport org.spongepowered.api.Game;\nimport org.spongepowered.api.Sponge;\nimport org.spongepowered.api.data.DataHolderBuilder;\nimport org.spongepowered.api.data.persistence.DataBuilder;\nimport org.spongepowered.api.util.Transform;\nimport org.spongepowered.api.world.LocatableSnapshot;\nimport org.spongepowered.api.world.World;\nimport org.spongepowered.api.world.schematic.Schematic;\nimport org.spongepowered.api.world.server.ServerLocation;\nimport org.spongepowered.api.world.server.storage.ServerWorldProperties;\nimport org.spongepowered.api.world.storage.WorldProperties;\nimport org.spongepowered.math.vector.Vector3d;\nimport org.spongepowered.math.vector.Vector3i;\n\nimport java.util.Optional;\nimport java.util.UUID;\nimport java.util.function.Supplier;\n\n/**\n * Represents a snapshot of an {@link Entity} and all of it's related data in\n * the form of {@link org.spongepowered.api.data.DataManipulator.Immutable}s and {@link org.spongepowered.api.data.value.Value.Immutable}s.\n * While an {@link Entity} is a live instance and resides in a\n * {@link World}, an {@link EntitySnapshot} may be snapshotted of a\n * {@link World} that is not currently loaded, or may not exist any longer.\n *\n *

All data associated with the {@link EntitySnapshot} should be separated\n * from the {@link Game} instance such that external processing, building,\n * and manipulation can take place.

\n */\npublic interface EntitySnapshot extends LocatableSnapshot {\n\n /**\n * Creates a new {@link Builder} to build an {@link EntitySnapshot}.\n *\n * @return The new builder\n */\n static Builder builder() {\n return Sponge.game().builderProvider().provide(Builder.class);\n }\n\n /**\n * Gets an {@link Optional} containing the {@link UUID} of the\n * {@link Entity} that this {@link EntitySnapshot} is representing. If the\n * {@link Optional} is {@link Optional#empty()}, then this snapshot must\n * have been created by an {@link Builder} without an {@link Entity} as a\n * source.\n *\n * @return The Optional where the UUID may be present\n */\n Optional uniqueId();\n\n /**\n * Gets the {@link Transform} as an {@link Optional} as the {@link ServerLocation}\n * may be undefined if this {@link EntitySnapshot} was built without a\n * location. This method is linked to {@link #location()} such that if\n * there is a {@link ServerLocation}, there is usually a {@link Transform}.\n *\n * @return The transform, if available\n */\n Optional transform();\n\n /**\n * Gets the {@link EntityType}.\n *\n * @return The EntityType\n */\n EntityType type();\n\n /**\n * Restores the {@link EntitySnapshot} to the {@link ServerLocation} stored within\n * the snapshot. If the {@link ServerLocation} is not available, the snapshot will\n * not be restored.\n *\n * @return the restored entity if successful\n */\n Optional restore();\n\n /**\n * Creates a new {@link EntityArchetype} for use with {@link Schematic}s and\n * placing the archetype in multiple locations.\n *\n * @return The created archetype for re-creating this entity\n */\n EntityArchetype createArchetype();\n\n /**\n * An {@link org.spongepowered.api.data.DataHolderBuilder.Immutable} for building {@link EntitySnapshot}s. The\n * requirements\n */\n interface Builder extends DataHolderBuilder.Immutable, DataBuilder {\n\n /**\n * Sets the {@link WorldProperties} for this {@link EntitySnapshot}.\n *\n *

This is used to grab the {@link UUID} of the World for this\n * snapshot.

\n *\n * @param worldProperties The WorldProperties\n * @return This builder, for chaining\n */\n Builder world(ServerWorldProperties worldProperties);\n\n /**\n * Sets the {@link EntityType} for this {@link EntitySnapshot}.\n *\n * @param entityType The EntityType\n * @return This builder, for chaining\n */\n default Builder type(Supplier> entityType) {\n return this.type(entityType.get());\n }\n\n /**\n * Sets the {@link EntityType} for this {@link EntitySnapshot}.\n *\n * @param entityType The EntityType\n * @return This builder, for chaining\n */\n Builder type(EntityType entityType);\n\n /**\n * Sets the coordinates of this {@link EntitySnapshot} from a\n * {@link Vector3i}.\n *\n * @param position The Vector3i representing the coordinates\n * @return This builder, for chaining\n */\n Builder position(Vector3d position);\n\n /**\n * Copies over data from an {@link Entity}.\n *\n * @param entity The Entity\n * @return This builder, for chaining\n */\n Builder from(Entity entity);\n\n }\n\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2965,"cells":{"blob_id":{"kind":"string","value":"bba6542ae66d079608a9d53629e38351c622af12"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"FaNaTiKoRn/SB"},"path":{"kind":"string","value":"/src/sb_jtorres/DBConnect.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":3803,"string":"3,803"},"score":{"kind":"number","value":2.515625,"string":"2.515625"},"int_score":{"kind":"number","value":3,"string":"3"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"/*\r\n * To change this license header, choose License Headers in Project Properties.\r\n * To change this template file, choose Tools | Templates\r\n * and open the template in the editor.\r\n */\r\n\r\n/*\r\nIn general, to process any SQL statement with JDBC, you follow these steps:\r\n\r\n 1.- Establishing a connection.\r\n 2.- Create a statement.\r\n 3.- Execute the query.\r\n 4.- Process the ResultSet object.\r\n 5.- Close the connection.\r\n*/\r\npackage sb_jtorres;\r\nimport java.sql.*;\r\nimport java.util.*;\r\nimport java.util.logging.Level;\r\nimport java.util.logging.Logger;\r\nimport javax.swing.Icon;\r\nimport javax.swing.ImageIcon;\r\n/*\r\nimport java.sql.Connection; \r\nimport java.sql.DriverManager;\r\nimport java.sql.ResultSet;\r\nimport java.sql.SQLException;\r\nimport java.sql.Statement;\r\n*/\r\nimport javax.swing.JOptionPane;\r\n/**\r\n *\r\n * @author FaNaTiKoRn\r\n */\r\npublic class DBConnect {\r\n /*private String db = \"CaC\";\r\n private String url = \"WOLVERINE\\\\SQLEXPRESS:1433\"+db;\r\n private String user = \"sa\";\r\n private String pass = \"sa2017\";\r\n*/\r\n public String Conectar() throws ClassNotFoundException, SQLException{\r\n //Class.forName(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\"); //Para SQLServer\r\n Class.forName(\"com.mysql.jdbc.Driver\"); //Para MySQL\r\n //String server = \"WOLVERINE\\\\MSSQL14.SQLEXPRESS:1433\"; // MsSQL SERVER\r\n String db = \"SB_JTorres\";\r\n String server = \"127.0.0.1/\" + db; // MySQL SERVER //Servidor + DB\r\n String user = \"root\"; //'sa' para MsSQLServer //'adm' (abc123) para PHPMySQLServer // bejerman (tiMCLmu27qtQwD) para ambas plataformas\r\n String pass = \"\";\r\n //String connectionURL = \"jdbc:sqlserver://\" + server + \";databaseName=\" + db + \";user=\" + user + \";password=\" + pass + \";\"; //Conexión a MsSQLServer\r\n String connectionURL = \"jdbc:mysql://\" + server; //Conexión a PHPMySQLServer\r\n Connection cnx = DriverManager.getConnection(connectionURL,user,pass);//Conectado\r\n //cnx.setAutoCommit(false);\r\n //cnx.commit();\r\n //cnx.rollback();\r\n Statement st = null;\r\n st = cnx.createStatement();\r\n ResultSet rs = st.executeQuery(\"select * from usu\");\r\n /* // o bien...\r\n Connection cnx = null;\r\n cnx = DriverManager.getConnection(url, user, pass);\r\n */\r\n while (rs.next())\r\n {\r\n int usu_id = rs.getInt(1);\r\n String usu_codigo = rs.getString(2);\r\n String usu_clave = rs.getString(3);\r\n String usu_nombre = rs.getString(4);\r\n int usu_status = rs.getInt(5);\r\n System.out.println(\"ID:\" + usu_id + \" - Nombre:\" + usu_nombre + \" - Código:\" + usu_codigo + \" - clave:\" + usu_clave + \" - Estado:\" + usu_status);\r\n }\r\n //st = cnx.createStatement();\r\n rs.close();\r\n cnx.close();\r\n return db;\r\n }\r\n public void Desconectar()\r\n {\r\n /*\r\n \r\n public void cierraConexion() {\r\n try {\r\n Conector.close();\r\n } catch (SQLException sqle) {\r\n JOptionPane.showMessageDialog(null, \"Error al cerrar conexion\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n Logger.getLogger(ConexionDAO.class.getName()).log(Level.SEVERE, null, sqle);\r\n }\r\n }\r\n \r\n */\r\n \r\n /*\r\n public void cierraConsultas() {\r\n try {\r\n if (Rs != null) {\r\n Rs.close();\r\n }\r\n if (St != null) {\r\n St.close();\r\n }\r\n if (Conector != null) {\r\n Conector.close();\r\n }\r\n } catch (SQLException sqle) {\r\n JOptionPane.showMessageDialog(null, \"Error cerrando la conexion!\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n Logger.getLogger(LicoreriasDAO.class.getName()).log(Level.SEVERE, null, sqle);\r\n }\r\n}\r\n */\r\n \r\n }\r\n}\r\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2966,"cells":{"blob_id":{"kind":"string","value":"e0f6ce12de624d849177b1f54489bb92944f399b"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"fmisiarz/kodilla-testing"},"path":{"kind":"string","value":"/kodilla-testing/src/main/java/com/kodilla/testing/collection/OddNumbersExterminator.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":417,"string":"417"},"score":{"kind":"number","value":3.046875,"string":"3.046875"},"int_score":{"kind":"number","value":3,"string":"3"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package com.kodilla.testing.collection;\n\nimport java.util.ArrayList;\n\npublic class OddNumbersExterminator {\n\n public ArrayList exterminate(ArrayList number) {\n ArrayList numbers2 = new ArrayList();\n for (Integer numbers : number) {\n if (numbers % 2 == 0) {\n numbers2.add(numbers);\n }\n }\n\n return numbers2;\n }\n}"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2967,"cells":{"blob_id":{"kind":"string","value":"ab82202b0d53a66a14402c3f8ef98b1e711b090f"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"vishal1975/ATM"},"path":{"kind":"string","value":"/AtmMachine/src/atm/Account.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":1206,"string":"1,206"},"score":{"kind":"number","value":2.984375,"string":"2.984375"},"int_score":{"kind":"number","value":3,"string":"3"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package atm;\n\npublic class Account {\n\tprivate int AccountNo;\n\tprivate int age;\n private String name;\n\tprivate int CurrentAmount;\n\tprivate int password;\n\t\n\tAccount(int AccountNo,int age,String name,int CurrentAmount,int password){\n\t\tthis.AccountNo=AccountNo;\n\t\tthis.age=age;\n\t\tthis.CurrentAmount=CurrentAmount;\n\t\tthis.name=name;\n\t\tthis.password=password;\n\t}\n\tpublic String toString() {\n\t\tString s=\" \";\n\t\ts=s+\"YOUR ACCOUNT NO: \"+ getAccountNo() +\"\\n\";\n\t\ts+=\"YOUR AGE : \" + getAge() +\"\\n\";\n\t\ts+=\"YOUR NAME : \" + getName() +\"\\n\";\n\t\ts+=\"YOUR CURRENTAMOUNT : \" + getCurrentAmount()+\"\\n\";\n\t\treturn s;\n\t}\n\n\tpublic int getAccountNo() {\n\t\treturn AccountNo;\n\t}\n\n\tpublic void setAccountNo(int accountNo) {\n\t\tAccountNo = accountNo;\n\t}\n\n\tpublic int getAge() {\n\t\treturn age;\n\t}\n\n\tpublic void setAge(int age) {\n\t\tthis.age = age;\n\t}\n\n\tpublic String getName() {\n\t\treturn name;\n\t}\n\n\tpublic void setName(String name) {\n\t\tthis.name = name;\n\t}\n\n\tpublic int getCurrentAmount() {\n\t\treturn CurrentAmount;\n\t}\n\n\tpublic void setCurrentAmount(int currentAmount) {\n\t\tCurrentAmount = currentAmount;\n\t}\n\n\tpublic int getPassword() {\n\t\treturn password;\n\t}\n\n\tpublic void setPassword(int password) {\n\t\tthis.password = password;\n\t}\n\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2968,"cells":{"blob_id":{"kind":"string","value":"dc0c98951e3a7c85592380a28eb792fb0420862d"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"wasadmin/ewallet"},"path":{"kind":"string","value":"/CentralSwitchClient/src/zw/co/esolutions/ewallet/merchantservices/service/ObjectFactory.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":74890,"string":"74,890"},"score":{"kind":"number","value":1.609375,"string":"1.609375"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"//\n// Generated By:JAX-WS RI IBM 2.1.6 in JDK 6 (JAXB RI IBM JAXB 2.1.10 in JDK 6)\n//\n\n\npackage zw.co.esolutions.ewallet.merchantservices.service;\n\nimport javax.xml.bind.JAXBElement;\nimport javax.xml.bind.annotation.XmlElementDecl;\nimport javax.xml.bind.annotation.XmlRegistry;\nimport javax.xml.namespace.QName;\n\n\n/**\n * This object contains factory methods for each \n * Java content interface and Java element interface \n * generated in the zw.co.esolutions.ewallet.merchantservices.service package. \n *

An ObjectFactory allows you to programatically \n * construct new instances of the Java representation \n * for XML content. The Java representation of XML \n * content can consist of schema derived interfaces \n * and classes representing the binding of schema \n * type definitions, element declarations and model \n * groups. Factory methods for each of these are \n * provided in this class.\n * \n */\n@XmlRegistry\npublic class ObjectFactory {\n\n private final static QName _GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumber_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumber\");\n private final static QName _ApproveCustomerMerchantResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"approveCustomerMerchantResponse\");\n private final static QName _GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatus_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getCustomerMerchantByCustomerIdAndMerchantShortNameAndStatus\");\n private final static QName _ApproveMerchantResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"approveMerchantResponse\");\n private final static QName _DeleteCustomerMerchant_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"deleteCustomerMerchant\");\n private final static QName _ApproveBankMerchant_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"approveBankMerchant\");\n private final static QName _FindCustomerMerchantById_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"findCustomerMerchantById\");\n private final static QName _GetBankMerchantByBankIdAndMerchantIdResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getBankMerchantByBankIdAndMerchantIdResponse\");\n private final static QName _DeleteMerchant_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"deleteMerchant\");\n private final static QName _FindMerchantById_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"findMerchantById\");\n private final static QName _GetCustomerMerchantByCustomerIdResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getCustomerMerchantByCustomerIdResponse\");\n private final static QName _GetMerchantByCustomerIdResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getMerchantByCustomerIdResponse\");\n private final static QName _GetCustomerMerchantByBankId_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getCustomerMerchantByBankId\");\n private final static QName _GetCustomerMerchantByStatus_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getCustomerMerchantByStatus\");\n private final static QName _GetCustomerMerchantByCustomerAccountNumberResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getCustomerMerchantByCustomerAccountNumberResponse\");\n private final static QName _GetMerchantByStatus_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getMerchantByStatus\");\n private final static QName _GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumberResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumberResponse\");\n private final static QName _GetAllMerchants_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getAllMerchants\");\n private final static QName _ApproveMerchant_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"approveMerchant\");\n private final static QName _GetBankMerchantByBankIdAndMerchantId_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getBankMerchantByBankIdAndMerchantId\");\n private final static QName _ApproveCustomerMerchant_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"approveCustomerMerchant\");\n private final static QName _GetCustomerMerchantByCustomerId_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getCustomerMerchantByCustomerId\");\n private final static QName _GetMerchantByCustomerId_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getMerchantByCustomerId\");\n private final static QName _EditBankMerchantResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"editBankMerchantResponse\");\n private final static QName _Exception_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"Exception\");\n private final static QName _DisapproveBankMerchantResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"disapproveBankMerchantResponse\");\n private final static QName _GetCustomerMerchantByCustomerAccountNumber_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getCustomerMerchantByCustomerAccountNumber\");\n private final static QName _CreateBankMerchantResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"createBankMerchantResponse\");\n private final static QName _GetBankMerchantByMerchantIdResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getBankMerchantByMerchantIdResponse\");\n private final static QName _GetBankMerchantByStatusAndBankIdAndMerchantIdResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getBankMerchantByStatusAndBankIdAndMerchantIdResponse\");\n private final static QName _DeleteBankMerchantResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"deleteBankMerchantResponse\");\n private final static QName _FindBankMerchantByIdResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"findBankMerchantByIdResponse\");\n private final static QName _EditCustomerMerchantResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"editCustomerMerchantResponse\");\n private final static QName _GetBankMerchantByBankIdAndShortNameAndStatusResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getBankMerchantByBankIdAndShortNameAndStatusResponse\");\n private final static QName _GetMerchantByShortNameResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getMerchantByShortNameResponse\");\n private final static QName _GetCustomerMerchantByBankMerchantIdResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getCustomerMerchantByBankMerchantIdResponse\");\n private final static QName _EditMerchantResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"editMerchantResponse\");\n private final static QName _EditBankMerchant_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"editBankMerchant\");\n private final static QName _DisapproveMerchantResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"disapproveMerchantResponse\");\n private final static QName _GetBankMerchantByBankIdResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getBankMerchantByBankIdResponse\");\n private final static QName _GetBankMerchantByStatusResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getBankMerchantByStatusResponse\");\n private final static QName _CreateMerchantResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"createMerchantResponse\");\n private final static QName _DisapproveCustomerMerchantResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"disapproveCustomerMerchantResponse\");\n private final static QName _CreateBankMerchant_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"createBankMerchant\");\n private final static QName _GetMerchantByNameResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getMerchantByNameResponse\");\n private final static QName _DisapproveBankMerchant_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"disapproveBankMerchant\");\n private final static QName _CreateCustomerMerchantResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"createCustomerMerchantResponse\");\n private final static QName _GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatus_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getCustomerMerchantByCustomerIdAndBankMerchantIdAndStatus\");\n private final static QName _GetBankMerchantByMerchantId_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getBankMerchantByMerchantId\");\n private final static QName _FindMerchantByIdResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"findMerchantByIdResponse\");\n private final static QName _DeleteMerchantResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"deleteMerchantResponse\");\n private final static QName _GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatusResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getCustomerMerchantByCustomerIdAndMerchantShortNameAndStatusResponse\");\n private final static QName _EditCustomerMerchant_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"editCustomerMerchant\");\n private final static QName _GetBankMerchantByBankIdAndShortNameAndStatus_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getBankMerchantByBankIdAndShortNameAndStatus\");\n private final static QName _FindCustomerMerchantByIdResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"findCustomerMerchantByIdResponse\");\n private final static QName _EditMerchant_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"editMerchant\");\n private final static QName _ApproveBankMerchantResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"approveBankMerchantResponse\");\n private final static QName _DeleteCustomerMerchantResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"deleteCustomerMerchantResponse\");\n private final static QName _GetCustomerMerchantByBankMerchantId_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getCustomerMerchantByBankMerchantId\");\n private final static QName _GetMerchantByShortName_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getMerchantByShortName\");\n private final static QName _GetBankMerchantByStatusAndBankIdAndMerchantId_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getBankMerchantByStatusAndBankIdAndMerchantId\");\n private final static QName _FindBankMerchantById_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"findBankMerchantById\");\n private final static QName _DeleteBankMerchant_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"deleteBankMerchant\");\n private final static QName _GetBankMerchantByBankId_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getBankMerchantByBankId\");\n private final static QName _GetMerchantByStatusResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getMerchantByStatusResponse\");\n private final static QName _GetCustomerMerchantByBankIdResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getCustomerMerchantByBankIdResponse\");\n private final static QName _CreateMerchant_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"createMerchant\");\n private final static QName _DisapproveCustomerMerchant_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"disapproveCustomerMerchant\");\n private final static QName _GetCustomerMerchantByStatusResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getCustomerMerchantByStatusResponse\");\n private final static QName _DisapproveMerchant_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"disapproveMerchant\");\n private final static QName _GetMerchantByName_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getMerchantByName\");\n private final static QName _GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatusResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getCustomerMerchantByCustomerIdAndBankMerchantIdAndStatusResponse\");\n private final static QName _GetAllMerchantsResponse_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getAllMerchantsResponse\");\n private final static QName _CreateCustomerMerchant_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"createCustomerMerchant\");\n private final static QName _GetBankMerchantByStatus_QNAME = new QName(\"http://service.merchantservices.ewallet.esolutions.co.zw/\", \"getBankMerchantByStatus\");\n\n /**\n * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: zw.co.esolutions.ewallet.merchantservices.service\n * \n */\n public ObjectFactory() {\n }\n\n /**\n * Create an instance of {@link GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatus }\n * \n */\n public GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatus createGetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatus() {\n return new GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatus();\n }\n\n /**\n * Create an instance of {@link GetAllMerchantsResponse }\n * \n */\n public GetAllMerchantsResponse createGetAllMerchantsResponse() {\n return new GetAllMerchantsResponse();\n }\n\n /**\n * Create an instance of {@link DeleteMerchant }\n * \n */\n public DeleteMerchant createDeleteMerchant() {\n return new DeleteMerchant();\n }\n\n /**\n * Create an instance of {@link GetBankMerchantByStatusAndBankIdAndMerchantIdResponse }\n * \n */\n public GetBankMerchantByStatusAndBankIdAndMerchantIdResponse createGetBankMerchantByStatusAndBankIdAndMerchantIdResponse() {\n return new GetBankMerchantByStatusAndBankIdAndMerchantIdResponse();\n }\n\n /**\n * Create an instance of {@link GetBankMerchantByStatusResponse }\n * \n */\n public GetBankMerchantByStatusResponse createGetBankMerchantByStatusResponse() {\n return new GetBankMerchantByStatusResponse();\n }\n\n /**\n * Create an instance of {@link GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatusResponse }\n * \n */\n public GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatusResponse createGetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatusResponse() {\n return new GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatusResponse();\n }\n\n /**\n * Create an instance of {@link CreateCustomerMerchant }\n * \n */\n public CreateCustomerMerchant createCreateCustomerMerchant() {\n return new CreateCustomerMerchant();\n }\n\n /**\n * Create an instance of {@link FindBankMerchantByIdResponse }\n * \n */\n public FindBankMerchantByIdResponse createFindBankMerchantByIdResponse() {\n return new FindBankMerchantByIdResponse();\n }\n\n /**\n * Create an instance of {@link CreateMerchantResponse }\n * \n */\n public CreateMerchantResponse createCreateMerchantResponse() {\n return new CreateMerchantResponse();\n }\n\n /**\n * Create an instance of {@link CreateMerchant }\n * \n */\n public CreateMerchant createCreateMerchant() {\n return new CreateMerchant();\n }\n\n /**\n * Create an instance of {@link Merchant }\n * \n */\n public Merchant createMerchant() {\n return new Merchant();\n }\n\n /**\n * Create an instance of {@link GetBankMerchantByStatusAndBankIdAndMerchantId }\n * \n */\n public GetBankMerchantByStatusAndBankIdAndMerchantId createGetBankMerchantByStatusAndBankIdAndMerchantId() {\n return new GetBankMerchantByStatusAndBankIdAndMerchantId();\n }\n\n /**\n * Create an instance of {@link GetBankMerchantByStatus }\n * \n */\n public GetBankMerchantByStatus createGetBankMerchantByStatus() {\n return new GetBankMerchantByStatus();\n }\n\n /**\n * Create an instance of {@link DisapproveCustomerMerchant }\n * \n */\n public DisapproveCustomerMerchant createDisapproveCustomerMerchant() {\n return new DisapproveCustomerMerchant();\n }\n\n /**\n * Create an instance of {@link DisapproveCustomerMerchantResponse }\n * \n */\n public DisapproveCustomerMerchantResponse createDisapproveCustomerMerchantResponse() {\n return new DisapproveCustomerMerchantResponse();\n }\n\n /**\n * Create an instance of {@link GetCustomerMerchantByCustomerAccountNumber }\n * \n */\n public GetCustomerMerchantByCustomerAccountNumber createGetCustomerMerchantByCustomerAccountNumber() {\n return new GetCustomerMerchantByCustomerAccountNumber();\n }\n\n /**\n * Create an instance of {@link GetAllMerchants }\n * \n */\n public GetAllMerchants createGetAllMerchants() {\n return new GetAllMerchants();\n }\n\n /**\n * Create an instance of {@link EditCustomerMerchant }\n * \n */\n public EditCustomerMerchant createEditCustomerMerchant() {\n return new EditCustomerMerchant();\n }\n\n /**\n * Create an instance of {@link GetBankMerchantByMerchantIdResponse }\n * \n */\n public GetBankMerchantByMerchantIdResponse createGetBankMerchantByMerchantIdResponse() {\n return new GetBankMerchantByMerchantIdResponse();\n }\n\n /**\n * Create an instance of {@link GetBankMerchantByBankIdAndMerchantIdResponse }\n * \n */\n public GetBankMerchantByBankIdAndMerchantIdResponse createGetBankMerchantByBankIdAndMerchantIdResponse() {\n return new GetBankMerchantByBankIdAndMerchantIdResponse();\n }\n\n /**\n * Create an instance of {@link DisapproveMerchantResponse }\n * \n */\n public DisapproveMerchantResponse createDisapproveMerchantResponse() {\n return new DisapproveMerchantResponse();\n }\n\n /**\n * Create an instance of {@link GetCustomerMerchantByBankIdResponse }\n * \n */\n public GetCustomerMerchantByBankIdResponse createGetCustomerMerchantByBankIdResponse() {\n return new GetCustomerMerchantByBankIdResponse();\n }\n\n /**\n * Create an instance of {@link GetCustomerMerchantByBankMerchantId }\n * \n */\n public GetCustomerMerchantByBankMerchantId createGetCustomerMerchantByBankMerchantId() {\n return new GetCustomerMerchantByBankMerchantId();\n }\n\n /**\n * Create an instance of {@link GetCustomerMerchantByStatus }\n * \n */\n public GetCustomerMerchantByStatus createGetCustomerMerchantByStatus() {\n return new GetCustomerMerchantByStatus();\n }\n\n /**\n * Create an instance of {@link ApproveCustomerMerchantResponse }\n * \n */\n public ApproveCustomerMerchantResponse createApproveCustomerMerchantResponse() {\n return new ApproveCustomerMerchantResponse();\n }\n\n /**\n * Create an instance of {@link GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumberResponse }\n * \n */\n public GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumberResponse createGetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumberResponse() {\n return new GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumberResponse();\n }\n\n /**\n * Create an instance of {@link GetMerchantByName }\n * \n */\n public GetMerchantByName createGetMerchantByName() {\n return new GetMerchantByName();\n }\n\n /**\n * Create an instance of {@link GetMerchantByShortNameResponse }\n * \n */\n public GetMerchantByShortNameResponse createGetMerchantByShortNameResponse() {\n return new GetMerchantByShortNameResponse();\n }\n\n /**\n * Create an instance of {@link GetBankMerchantByBankIdAndShortNameAndStatusResponse }\n * \n */\n public GetBankMerchantByBankIdAndShortNameAndStatusResponse createGetBankMerchantByBankIdAndShortNameAndStatusResponse() {\n return new GetBankMerchantByBankIdAndShortNameAndStatusResponse();\n }\n\n /**\n * Create an instance of {@link DeleteCustomerMerchantResponse }\n * \n */\n public DeleteCustomerMerchantResponse createDeleteCustomerMerchantResponse() {\n return new DeleteCustomerMerchantResponse();\n }\n\n /**\n * Create an instance of {@link EditBankMerchant }\n * \n */\n public EditBankMerchant createEditBankMerchant() {\n return new EditBankMerchant();\n }\n\n /**\n * Create an instance of {@link EditMerchant }\n * \n */\n public EditMerchant createEditMerchant() {\n return new EditMerchant();\n }\n\n /**\n * Create an instance of {@link GetBankMerchantByBankIdResponse }\n * \n */\n public GetBankMerchantByBankIdResponse createGetBankMerchantByBankIdResponse() {\n return new GetBankMerchantByBankIdResponse();\n }\n\n /**\n * Create an instance of {@link Exception }\n * \n */\n public Exception createException() {\n return new Exception();\n }\n\n /**\n * Create an instance of {@link DeleteBankMerchant }\n * \n */\n public DeleteBankMerchant createDeleteBankMerchant() {\n return new DeleteBankMerchant();\n }\n\n /**\n * Create an instance of {@link ApproveBankMerchantResponse }\n * \n */\n public ApproveBankMerchantResponse createApproveBankMerchantResponse() {\n return new ApproveBankMerchantResponse();\n }\n\n /**\n * Create an instance of {@link GetCustomerMerchantByCustomerIdResponse }\n * \n */\n public GetCustomerMerchantByCustomerIdResponse createGetCustomerMerchantByCustomerIdResponse() {\n return new GetCustomerMerchantByCustomerIdResponse();\n }\n\n /**\n * Create an instance of {@link GetBankMerchantByBankIdAndMerchantId }\n * \n */\n public GetBankMerchantByBankIdAndMerchantId createGetBankMerchantByBankIdAndMerchantId() {\n return new GetBankMerchantByBankIdAndMerchantId();\n }\n\n /**\n * Create an instance of {@link ApproveMerchant }\n * \n */\n public ApproveMerchant createApproveMerchant() {\n return new ApproveMerchant();\n }\n\n /**\n * Create an instance of {@link GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatusResponse }\n * \n */\n public GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatusResponse createGetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatusResponse() {\n return new GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatusResponse();\n }\n\n /**\n * Create an instance of {@link FindMerchantById }\n * \n */\n public FindMerchantById createFindMerchantById() {\n return new FindMerchantById();\n }\n\n /**\n * Create an instance of {@link GetCustomerMerchantByStatusResponse }\n * \n */\n public GetCustomerMerchantByStatusResponse createGetCustomerMerchantByStatusResponse() {\n return new GetCustomerMerchantByStatusResponse();\n }\n\n /**\n * Create an instance of {@link ApproveCustomerMerchant }\n * \n */\n public ApproveCustomerMerchant createApproveCustomerMerchant() {\n return new ApproveCustomerMerchant();\n }\n\n /**\n * Create an instance of {@link FindCustomerMerchantByIdResponse }\n * \n */\n public FindCustomerMerchantByIdResponse createFindCustomerMerchantByIdResponse() {\n return new FindCustomerMerchantByIdResponse();\n }\n\n /**\n * Create an instance of {@link EditBankMerchantResponse }\n * \n */\n public EditBankMerchantResponse createEditBankMerchantResponse() {\n return new EditBankMerchantResponse();\n }\n\n /**\n * Create an instance of {@link CreateBankMerchant }\n * \n */\n public CreateBankMerchant createCreateBankMerchant() {\n return new CreateBankMerchant();\n }\n\n /**\n * Create an instance of {@link FindBankMerchantById }\n * \n */\n public FindBankMerchantById createFindBankMerchantById() {\n return new FindBankMerchantById();\n }\n\n /**\n * Create an instance of {@link DisapproveMerchant }\n * \n */\n public DisapproveMerchant createDisapproveMerchant() {\n return new DisapproveMerchant();\n }\n\n /**\n * Create an instance of {@link DeleteMerchantResponse }\n * \n */\n public DeleteMerchantResponse createDeleteMerchantResponse() {\n return new DeleteMerchantResponse();\n }\n\n /**\n * Create an instance of {@link GetMerchantByCustomerIdResponse }\n * \n */\n public GetMerchantByCustomerIdResponse createGetMerchantByCustomerIdResponse() {\n return new GetMerchantByCustomerIdResponse();\n }\n\n /**\n * Create an instance of {@link GetCustomerMerchantByCustomerId }\n * \n */\n public GetCustomerMerchantByCustomerId createGetCustomerMerchantByCustomerId() {\n return new GetCustomerMerchantByCustomerId();\n }\n\n /**\n * Create an instance of {@link GetCustomerMerchantByCustomerAccountNumberResponse }\n * \n */\n public GetCustomerMerchantByCustomerAccountNumberResponse createGetCustomerMerchantByCustomerAccountNumberResponse() {\n return new GetCustomerMerchantByCustomerAccountNumberResponse();\n }\n\n /**\n * Create an instance of {@link GetMerchantByNameResponse }\n * \n */\n public GetMerchantByNameResponse createGetMerchantByNameResponse() {\n return new GetMerchantByNameResponse();\n }\n\n /**\n * Create an instance of {@link DeleteCustomerMerchant }\n * \n */\n public DeleteCustomerMerchant createDeleteCustomerMerchant() {\n return new DeleteCustomerMerchant();\n }\n\n /**\n * Create an instance of {@link GetMerchantByStatusResponse }\n * \n */\n public GetMerchantByStatusResponse createGetMerchantByStatusResponse() {\n return new GetMerchantByStatusResponse();\n }\n\n /**\n * Create an instance of {@link GetCustomerMerchantByBankMerchantIdResponse }\n * \n */\n public GetCustomerMerchantByBankMerchantIdResponse createGetCustomerMerchantByBankMerchantIdResponse() {\n return new GetCustomerMerchantByBankMerchantIdResponse();\n }\n\n /**\n * Create an instance of {@link FindMerchantByIdResponse }\n * \n */\n public FindMerchantByIdResponse createFindMerchantByIdResponse() {\n return new FindMerchantByIdResponse();\n }\n\n /**\n * Create an instance of {@link CreateBankMerchantResponse }\n * \n */\n public CreateBankMerchantResponse createCreateBankMerchantResponse() {\n return new CreateBankMerchantResponse();\n }\n\n /**\n * Create an instance of {@link GetBankMerchantByBankIdAndShortNameAndStatus }\n * \n */\n public GetBankMerchantByBankIdAndShortNameAndStatus createGetBankMerchantByBankIdAndShortNameAndStatus() {\n return new GetBankMerchantByBankIdAndShortNameAndStatus();\n }\n\n /**\n * Create an instance of {@link GetMerchantByStatus }\n * \n */\n public GetMerchantByStatus createGetMerchantByStatus() {\n return new GetMerchantByStatus();\n }\n\n /**\n * Create an instance of {@link ApproveBankMerchant }\n * \n */\n public ApproveBankMerchant createApproveBankMerchant() {\n return new ApproveBankMerchant();\n }\n\n /**\n * Create an instance of {@link DisapproveBankMerchant }\n * \n */\n public DisapproveBankMerchant createDisapproveBankMerchant() {\n return new DisapproveBankMerchant();\n }\n\n /**\n * Create an instance of {@link GetMerchantByCustomerId }\n * \n */\n public GetMerchantByCustomerId createGetMerchantByCustomerId() {\n return new GetMerchantByCustomerId();\n }\n\n /**\n * Create an instance of {@link GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumber }\n * \n */\n public GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumber createGetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumber() {\n return new GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumber();\n }\n\n /**\n * Create an instance of {@link EditMerchantResponse }\n * \n */\n public EditMerchantResponse createEditMerchantResponse() {\n return new EditMerchantResponse();\n }\n\n /**\n * Create an instance of {@link EditCustomerMerchantResponse }\n * \n */\n public EditCustomerMerchantResponse createEditCustomerMerchantResponse() {\n return new EditCustomerMerchantResponse();\n }\n\n /**\n * Create an instance of {@link CustomerMerchant }\n * \n */\n public CustomerMerchant createCustomerMerchant() {\n return new CustomerMerchant();\n }\n\n /**\n * Create an instance of {@link ApproveMerchantResponse }\n * \n */\n public ApproveMerchantResponse createApproveMerchantResponse() {\n return new ApproveMerchantResponse();\n }\n\n /**\n * Create an instance of {@link DisapproveBankMerchantResponse }\n * \n */\n public DisapproveBankMerchantResponse createDisapproveBankMerchantResponse() {\n return new DisapproveBankMerchantResponse();\n }\n\n /**\n * Create an instance of {@link CreateCustomerMerchantResponse }\n * \n */\n public CreateCustomerMerchantResponse createCreateCustomerMerchantResponse() {\n return new CreateCustomerMerchantResponse();\n }\n\n /**\n * Create an instance of {@link BankMerchant }\n * \n */\n public BankMerchant createBankMerchant() {\n return new BankMerchant();\n }\n\n /**\n * Create an instance of {@link GetBankMerchantByBankId }\n * \n */\n public GetBankMerchantByBankId createGetBankMerchantByBankId() {\n return new GetBankMerchantByBankId();\n }\n\n /**\n * Create an instance of {@link GetMerchantByShortName }\n * \n */\n public GetMerchantByShortName createGetMerchantByShortName() {\n return new GetMerchantByShortName();\n }\n\n /**\n * Create an instance of {@link FindCustomerMerchantById }\n * \n */\n public FindCustomerMerchantById createFindCustomerMerchantById() {\n return new FindCustomerMerchantById();\n }\n\n /**\n * Create an instance of {@link GetBankMerchantByMerchantId }\n * \n */\n public GetBankMerchantByMerchantId createGetBankMerchantByMerchantId() {\n return new GetBankMerchantByMerchantId();\n }\n\n /**\n * Create an instance of {@link GetCustomerMerchantByBankId }\n * \n */\n public GetCustomerMerchantByBankId createGetCustomerMerchantByBankId() {\n return new GetCustomerMerchantByBankId();\n }\n\n /**\n * Create an instance of {@link DeleteBankMerchantResponse }\n * \n */\n public DeleteBankMerchantResponse createDeleteBankMerchantResponse() {\n return new DeleteBankMerchantResponse();\n }\n\n /**\n * Create an instance of {@link GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatus }\n * \n */\n public GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatus createGetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatus() {\n return new GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatus();\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumber }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumber\")\n public JAXBElement createGetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumber(GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumber value) {\n return new JAXBElement(_GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumber_QNAME, GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumber.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link ApproveCustomerMerchantResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"approveCustomerMerchantResponse\")\n public JAXBElement createApproveCustomerMerchantResponse(ApproveCustomerMerchantResponse value) {\n return new JAXBElement(_ApproveCustomerMerchantResponse_QNAME, ApproveCustomerMerchantResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatus }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getCustomerMerchantByCustomerIdAndMerchantShortNameAndStatus\")\n public JAXBElement createGetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatus(GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatus value) {\n return new JAXBElement(_GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatus_QNAME, GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatus.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link ApproveMerchantResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"approveMerchantResponse\")\n public JAXBElement createApproveMerchantResponse(ApproveMerchantResponse value) {\n return new JAXBElement(_ApproveMerchantResponse_QNAME, ApproveMerchantResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link DeleteCustomerMerchant }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"deleteCustomerMerchant\")\n public JAXBElement createDeleteCustomerMerchant(DeleteCustomerMerchant value) {\n return new JAXBElement(_DeleteCustomerMerchant_QNAME, DeleteCustomerMerchant.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link ApproveBankMerchant }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"approveBankMerchant\")\n public JAXBElement createApproveBankMerchant(ApproveBankMerchant value) {\n return new JAXBElement(_ApproveBankMerchant_QNAME, ApproveBankMerchant.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link FindCustomerMerchantById }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"findCustomerMerchantById\")\n public JAXBElement createFindCustomerMerchantById(FindCustomerMerchantById value) {\n return new JAXBElement(_FindCustomerMerchantById_QNAME, FindCustomerMerchantById.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetBankMerchantByBankIdAndMerchantIdResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getBankMerchantByBankIdAndMerchantIdResponse\")\n public JAXBElement createGetBankMerchantByBankIdAndMerchantIdResponse(GetBankMerchantByBankIdAndMerchantIdResponse value) {\n return new JAXBElement(_GetBankMerchantByBankIdAndMerchantIdResponse_QNAME, GetBankMerchantByBankIdAndMerchantIdResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link DeleteMerchant }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"deleteMerchant\")\n public JAXBElement createDeleteMerchant(DeleteMerchant value) {\n return new JAXBElement(_DeleteMerchant_QNAME, DeleteMerchant.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link FindMerchantById }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"findMerchantById\")\n public JAXBElement createFindMerchantById(FindMerchantById value) {\n return new JAXBElement(_FindMerchantById_QNAME, FindMerchantById.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByCustomerIdResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getCustomerMerchantByCustomerIdResponse\")\n public JAXBElement createGetCustomerMerchantByCustomerIdResponse(GetCustomerMerchantByCustomerIdResponse value) {\n return new JAXBElement(_GetCustomerMerchantByCustomerIdResponse_QNAME, GetCustomerMerchantByCustomerIdResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetMerchantByCustomerIdResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getMerchantByCustomerIdResponse\")\n public JAXBElement createGetMerchantByCustomerIdResponse(GetMerchantByCustomerIdResponse value) {\n return new JAXBElement(_GetMerchantByCustomerIdResponse_QNAME, GetMerchantByCustomerIdResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByBankId }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getCustomerMerchantByBankId\")\n public JAXBElement createGetCustomerMerchantByBankId(GetCustomerMerchantByBankId value) {\n return new JAXBElement(_GetCustomerMerchantByBankId_QNAME, GetCustomerMerchantByBankId.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByStatus }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getCustomerMerchantByStatus\")\n public JAXBElement createGetCustomerMerchantByStatus(GetCustomerMerchantByStatus value) {\n return new JAXBElement(_GetCustomerMerchantByStatus_QNAME, GetCustomerMerchantByStatus.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByCustomerAccountNumberResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getCustomerMerchantByCustomerAccountNumberResponse\")\n public JAXBElement createGetCustomerMerchantByCustomerAccountNumberResponse(GetCustomerMerchantByCustomerAccountNumberResponse value) {\n return new JAXBElement(_GetCustomerMerchantByCustomerAccountNumberResponse_QNAME, GetCustomerMerchantByCustomerAccountNumberResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetMerchantByStatus }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getMerchantByStatus\")\n public JAXBElement createGetMerchantByStatus(GetMerchantByStatus value) {\n return new JAXBElement(_GetMerchantByStatus_QNAME, GetMerchantByStatus.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumberResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumberResponse\")\n public JAXBElement createGetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumberResponse(GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumberResponse value) {\n return new JAXBElement(_GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumberResponse_QNAME, GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumberResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetAllMerchants }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getAllMerchants\")\n public JAXBElement createGetAllMerchants(GetAllMerchants value) {\n return new JAXBElement(_GetAllMerchants_QNAME, GetAllMerchants.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link ApproveMerchant }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"approveMerchant\")\n public JAXBElement createApproveMerchant(ApproveMerchant value) {\n return new JAXBElement(_ApproveMerchant_QNAME, ApproveMerchant.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetBankMerchantByBankIdAndMerchantId }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getBankMerchantByBankIdAndMerchantId\")\n public JAXBElement createGetBankMerchantByBankIdAndMerchantId(GetBankMerchantByBankIdAndMerchantId value) {\n return new JAXBElement(_GetBankMerchantByBankIdAndMerchantId_QNAME, GetBankMerchantByBankIdAndMerchantId.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link ApproveCustomerMerchant }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"approveCustomerMerchant\")\n public JAXBElement createApproveCustomerMerchant(ApproveCustomerMerchant value) {\n return new JAXBElement(_ApproveCustomerMerchant_QNAME, ApproveCustomerMerchant.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByCustomerId }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getCustomerMerchantByCustomerId\")\n public JAXBElement createGetCustomerMerchantByCustomerId(GetCustomerMerchantByCustomerId value) {\n return new JAXBElement(_GetCustomerMerchantByCustomerId_QNAME, GetCustomerMerchantByCustomerId.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetMerchantByCustomerId }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getMerchantByCustomerId\")\n public JAXBElement createGetMerchantByCustomerId(GetMerchantByCustomerId value) {\n return new JAXBElement(_GetMerchantByCustomerId_QNAME, GetMerchantByCustomerId.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link EditBankMerchantResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"editBankMerchantResponse\")\n public JAXBElement createEditBankMerchantResponse(EditBankMerchantResponse value) {\n return new JAXBElement(_EditBankMerchantResponse_QNAME, EditBankMerchantResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link Exception }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"Exception\")\n public JAXBElement createException(Exception value) {\n return new JAXBElement(_Exception_QNAME, Exception.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link DisapproveBankMerchantResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"disapproveBankMerchantResponse\")\n public JAXBElement createDisapproveBankMerchantResponse(DisapproveBankMerchantResponse value) {\n return new JAXBElement(_DisapproveBankMerchantResponse_QNAME, DisapproveBankMerchantResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByCustomerAccountNumber }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getCustomerMerchantByCustomerAccountNumber\")\n public JAXBElement createGetCustomerMerchantByCustomerAccountNumber(GetCustomerMerchantByCustomerAccountNumber value) {\n return new JAXBElement(_GetCustomerMerchantByCustomerAccountNumber_QNAME, GetCustomerMerchantByCustomerAccountNumber.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link CreateBankMerchantResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"createBankMerchantResponse\")\n public JAXBElement createCreateBankMerchantResponse(CreateBankMerchantResponse value) {\n return new JAXBElement(_CreateBankMerchantResponse_QNAME, CreateBankMerchantResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetBankMerchantByMerchantIdResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getBankMerchantByMerchantIdResponse\")\n public JAXBElement createGetBankMerchantByMerchantIdResponse(GetBankMerchantByMerchantIdResponse value) {\n return new JAXBElement(_GetBankMerchantByMerchantIdResponse_QNAME, GetBankMerchantByMerchantIdResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetBankMerchantByStatusAndBankIdAndMerchantIdResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getBankMerchantByStatusAndBankIdAndMerchantIdResponse\")\n public JAXBElement createGetBankMerchantByStatusAndBankIdAndMerchantIdResponse(GetBankMerchantByStatusAndBankIdAndMerchantIdResponse value) {\n return new JAXBElement(_GetBankMerchantByStatusAndBankIdAndMerchantIdResponse_QNAME, GetBankMerchantByStatusAndBankIdAndMerchantIdResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link DeleteBankMerchantResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"deleteBankMerchantResponse\")\n public JAXBElement createDeleteBankMerchantResponse(DeleteBankMerchantResponse value) {\n return new JAXBElement(_DeleteBankMerchantResponse_QNAME, DeleteBankMerchantResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link FindBankMerchantByIdResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"findBankMerchantByIdResponse\")\n public JAXBElement createFindBankMerchantByIdResponse(FindBankMerchantByIdResponse value) {\n return new JAXBElement(_FindBankMerchantByIdResponse_QNAME, FindBankMerchantByIdResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link EditCustomerMerchantResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"editCustomerMerchantResponse\")\n public JAXBElement createEditCustomerMerchantResponse(EditCustomerMerchantResponse value) {\n return new JAXBElement(_EditCustomerMerchantResponse_QNAME, EditCustomerMerchantResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetBankMerchantByBankIdAndShortNameAndStatusResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getBankMerchantByBankIdAndShortNameAndStatusResponse\")\n public JAXBElement createGetBankMerchantByBankIdAndShortNameAndStatusResponse(GetBankMerchantByBankIdAndShortNameAndStatusResponse value) {\n return new JAXBElement(_GetBankMerchantByBankIdAndShortNameAndStatusResponse_QNAME, GetBankMerchantByBankIdAndShortNameAndStatusResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetMerchantByShortNameResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getMerchantByShortNameResponse\")\n public JAXBElement createGetMerchantByShortNameResponse(GetMerchantByShortNameResponse value) {\n return new JAXBElement(_GetMerchantByShortNameResponse_QNAME, GetMerchantByShortNameResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByBankMerchantIdResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getCustomerMerchantByBankMerchantIdResponse\")\n public JAXBElement createGetCustomerMerchantByBankMerchantIdResponse(GetCustomerMerchantByBankMerchantIdResponse value) {\n return new JAXBElement(_GetCustomerMerchantByBankMerchantIdResponse_QNAME, GetCustomerMerchantByBankMerchantIdResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link EditMerchantResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"editMerchantResponse\")\n public JAXBElement createEditMerchantResponse(EditMerchantResponse value) {\n return new JAXBElement(_EditMerchantResponse_QNAME, EditMerchantResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link EditBankMerchant }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"editBankMerchant\")\n public JAXBElement createEditBankMerchant(EditBankMerchant value) {\n return new JAXBElement(_EditBankMerchant_QNAME, EditBankMerchant.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link DisapproveMerchantResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"disapproveMerchantResponse\")\n public JAXBElement createDisapproveMerchantResponse(DisapproveMerchantResponse value) {\n return new JAXBElement(_DisapproveMerchantResponse_QNAME, DisapproveMerchantResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetBankMerchantByBankIdResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getBankMerchantByBankIdResponse\")\n public JAXBElement createGetBankMerchantByBankIdResponse(GetBankMerchantByBankIdResponse value) {\n return new JAXBElement(_GetBankMerchantByBankIdResponse_QNAME, GetBankMerchantByBankIdResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetBankMerchantByStatusResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getBankMerchantByStatusResponse\")\n public JAXBElement createGetBankMerchantByStatusResponse(GetBankMerchantByStatusResponse value) {\n return new JAXBElement(_GetBankMerchantByStatusResponse_QNAME, GetBankMerchantByStatusResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link CreateMerchantResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"createMerchantResponse\")\n public JAXBElement createCreateMerchantResponse(CreateMerchantResponse value) {\n return new JAXBElement(_CreateMerchantResponse_QNAME, CreateMerchantResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link DisapproveCustomerMerchantResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"disapproveCustomerMerchantResponse\")\n public JAXBElement createDisapproveCustomerMerchantResponse(DisapproveCustomerMerchantResponse value) {\n return new JAXBElement(_DisapproveCustomerMerchantResponse_QNAME, DisapproveCustomerMerchantResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link CreateBankMerchant }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"createBankMerchant\")\n public JAXBElement createCreateBankMerchant(CreateBankMerchant value) {\n return new JAXBElement(_CreateBankMerchant_QNAME, CreateBankMerchant.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetMerchantByNameResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getMerchantByNameResponse\")\n public JAXBElement createGetMerchantByNameResponse(GetMerchantByNameResponse value) {\n return new JAXBElement(_GetMerchantByNameResponse_QNAME, GetMerchantByNameResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link DisapproveBankMerchant }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"disapproveBankMerchant\")\n public JAXBElement createDisapproveBankMerchant(DisapproveBankMerchant value) {\n return new JAXBElement(_DisapproveBankMerchant_QNAME, DisapproveBankMerchant.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link CreateCustomerMerchantResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"createCustomerMerchantResponse\")\n public JAXBElement createCreateCustomerMerchantResponse(CreateCustomerMerchantResponse value) {\n return new JAXBElement(_CreateCustomerMerchantResponse_QNAME, CreateCustomerMerchantResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatus }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getCustomerMerchantByCustomerIdAndBankMerchantIdAndStatus\")\n public JAXBElement createGetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatus(GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatus value) {\n return new JAXBElement(_GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatus_QNAME, GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatus.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetBankMerchantByMerchantId }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getBankMerchantByMerchantId\")\n public JAXBElement createGetBankMerchantByMerchantId(GetBankMerchantByMerchantId value) {\n return new JAXBElement(_GetBankMerchantByMerchantId_QNAME, GetBankMerchantByMerchantId.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link FindMerchantByIdResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"findMerchantByIdResponse\")\n public JAXBElement createFindMerchantByIdResponse(FindMerchantByIdResponse value) {\n return new JAXBElement(_FindMerchantByIdResponse_QNAME, FindMerchantByIdResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link DeleteMerchantResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"deleteMerchantResponse\")\n public JAXBElement createDeleteMerchantResponse(DeleteMerchantResponse value) {\n return new JAXBElement(_DeleteMerchantResponse_QNAME, DeleteMerchantResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatusResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getCustomerMerchantByCustomerIdAndMerchantShortNameAndStatusResponse\")\n public JAXBElement createGetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatusResponse(GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatusResponse value) {\n return new JAXBElement(_GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatusResponse_QNAME, GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatusResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link EditCustomerMerchant }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"editCustomerMerchant\")\n public JAXBElement createEditCustomerMerchant(EditCustomerMerchant value) {\n return new JAXBElement(_EditCustomerMerchant_QNAME, EditCustomerMerchant.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetBankMerchantByBankIdAndShortNameAndStatus }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getBankMerchantByBankIdAndShortNameAndStatus\")\n public JAXBElement createGetBankMerchantByBankIdAndShortNameAndStatus(GetBankMerchantByBankIdAndShortNameAndStatus value) {\n return new JAXBElement(_GetBankMerchantByBankIdAndShortNameAndStatus_QNAME, GetBankMerchantByBankIdAndShortNameAndStatus.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link FindCustomerMerchantByIdResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"findCustomerMerchantByIdResponse\")\n public JAXBElement createFindCustomerMerchantByIdResponse(FindCustomerMerchantByIdResponse value) {\n return new JAXBElement(_FindCustomerMerchantByIdResponse_QNAME, FindCustomerMerchantByIdResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link EditMerchant }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"editMerchant\")\n public JAXBElement createEditMerchant(EditMerchant value) {\n return new JAXBElement(_EditMerchant_QNAME, EditMerchant.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link ApproveBankMerchantResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"approveBankMerchantResponse\")\n public JAXBElement createApproveBankMerchantResponse(ApproveBankMerchantResponse value) {\n return new JAXBElement(_ApproveBankMerchantResponse_QNAME, ApproveBankMerchantResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link DeleteCustomerMerchantResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"deleteCustomerMerchantResponse\")\n public JAXBElement createDeleteCustomerMerchantResponse(DeleteCustomerMerchantResponse value) {\n return new JAXBElement(_DeleteCustomerMerchantResponse_QNAME, DeleteCustomerMerchantResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByBankMerchantId }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getCustomerMerchantByBankMerchantId\")\n public JAXBElement createGetCustomerMerchantByBankMerchantId(GetCustomerMerchantByBankMerchantId value) {\n return new JAXBElement(_GetCustomerMerchantByBankMerchantId_QNAME, GetCustomerMerchantByBankMerchantId.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetMerchantByShortName }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getMerchantByShortName\")\n public JAXBElement createGetMerchantByShortName(GetMerchantByShortName value) {\n return new JAXBElement(_GetMerchantByShortName_QNAME, GetMerchantByShortName.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetBankMerchantByStatusAndBankIdAndMerchantId }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getBankMerchantByStatusAndBankIdAndMerchantId\")\n public JAXBElement createGetBankMerchantByStatusAndBankIdAndMerchantId(GetBankMerchantByStatusAndBankIdAndMerchantId value) {\n return new JAXBElement(_GetBankMerchantByStatusAndBankIdAndMerchantId_QNAME, GetBankMerchantByStatusAndBankIdAndMerchantId.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link FindBankMerchantById }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"findBankMerchantById\")\n public JAXBElement createFindBankMerchantById(FindBankMerchantById value) {\n return new JAXBElement(_FindBankMerchantById_QNAME, FindBankMerchantById.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link DeleteBankMerchant }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"deleteBankMerchant\")\n public JAXBElement createDeleteBankMerchant(DeleteBankMerchant value) {\n return new JAXBElement(_DeleteBankMerchant_QNAME, DeleteBankMerchant.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetBankMerchantByBankId }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getBankMerchantByBankId\")\n public JAXBElement createGetBankMerchantByBankId(GetBankMerchantByBankId value) {\n return new JAXBElement(_GetBankMerchantByBankId_QNAME, GetBankMerchantByBankId.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetMerchantByStatusResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getMerchantByStatusResponse\")\n public JAXBElement createGetMerchantByStatusResponse(GetMerchantByStatusResponse value) {\n return new JAXBElement(_GetMerchantByStatusResponse_QNAME, GetMerchantByStatusResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByBankIdResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getCustomerMerchantByBankIdResponse\")\n public JAXBElement createGetCustomerMerchantByBankIdResponse(GetCustomerMerchantByBankIdResponse value) {\n return new JAXBElement(_GetCustomerMerchantByBankIdResponse_QNAME, GetCustomerMerchantByBankIdResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link CreateMerchant }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"createMerchant\")\n public JAXBElement createCreateMerchant(CreateMerchant value) {\n return new JAXBElement(_CreateMerchant_QNAME, CreateMerchant.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link DisapproveCustomerMerchant }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"disapproveCustomerMerchant\")\n public JAXBElement createDisapproveCustomerMerchant(DisapproveCustomerMerchant value) {\n return new JAXBElement(_DisapproveCustomerMerchant_QNAME, DisapproveCustomerMerchant.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByStatusResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getCustomerMerchantByStatusResponse\")\n public JAXBElement createGetCustomerMerchantByStatusResponse(GetCustomerMerchantByStatusResponse value) {\n return new JAXBElement(_GetCustomerMerchantByStatusResponse_QNAME, GetCustomerMerchantByStatusResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link DisapproveMerchant }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"disapproveMerchant\")\n public JAXBElement createDisapproveMerchant(DisapproveMerchant value) {\n return new JAXBElement(_DisapproveMerchant_QNAME, DisapproveMerchant.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetMerchantByName }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getMerchantByName\")\n public JAXBElement createGetMerchantByName(GetMerchantByName value) {\n return new JAXBElement(_GetMerchantByName_QNAME, GetMerchantByName.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatusResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getCustomerMerchantByCustomerIdAndBankMerchantIdAndStatusResponse\")\n public JAXBElement createGetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatusResponse(GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatusResponse value) {\n return new JAXBElement(_GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatusResponse_QNAME, GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatusResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetAllMerchantsResponse }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getAllMerchantsResponse\")\n public JAXBElement createGetAllMerchantsResponse(GetAllMerchantsResponse value) {\n return new JAXBElement(_GetAllMerchantsResponse_QNAME, GetAllMerchantsResponse.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link CreateCustomerMerchant }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"createCustomerMerchant\")\n public JAXBElement createCreateCustomerMerchant(CreateCustomerMerchant value) {\n return new JAXBElement(_CreateCustomerMerchant_QNAME, CreateCustomerMerchant.class, null, value);\n }\n\n /**\n * Create an instance of {@link JAXBElement }{@code <}{@link GetBankMerchantByStatus }{@code >}}\n * \n */\n @XmlElementDecl(namespace = \"http://service.merchantservices.ewallet.esolutions.co.zw/\", name = \"getBankMerchantByStatus\")\n public JAXBElement createGetBankMerchantByStatus(GetBankMerchantByStatus value) {\n return new JAXBElement(_GetBankMerchantByStatus_QNAME, GetBankMerchantByStatus.class, null, value);\n }\n\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2969,"cells":{"blob_id":{"kind":"string","value":"07267c6c8f3d425ca0dee853c3766d78eb3ee7ad"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"smaharjan99/coffee"},"path":{"kind":"string","value":"/CollectionDEMO/src/com/cubic/training/collectionexercise/PriorityQueueDemo.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":696,"string":"696"},"score":{"kind":"number","value":3.234375,"string":"3.234375"},"int_score":{"kind":"number","value":3,"string":"3"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package com.cubic.training.collectionexercise;\n\nimport java.util.PriorityQueue;\n\npublic class PriorityQueueDemo {\n\n\tpublic static void main(String[] args) {\n\t\t\n\t\tPriorityQueue pq = new PriorityQueue();\n\t\tpq.add(\"abid\");\n\t\tpq.add(\"azeem\");\n\t\tpq.add(\"lokesh\");\n\t\tpq.add(\"brad\");\n\t\t//pq.add(\"abid\");\n\t\tSystem.out.println(\"Head element is - \"+ pq.element());\n\t\tSystem.out.println(\"Head element is - \"+ pq.peek());\n\t\t\n\t\tSystem.out.println(\"Iterating\");\n\t\tfor(String s:pq){\n\t\t\tSystem.out.println(s);\n\t\t}\n\t\t\n\t\tpq.remove();\n\t\tpq.poll();\n\t\t\n\t\tSystem.out.println(\"After removing two elements\");\n\t\tSystem.out.println(\"Iterating\");\n\t\tfor(String s:pq){\n\t\t\tSystem.out.println(s);\n\t\t}\n\t\t\n\t}\n\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2970,"cells":{"blob_id":{"kind":"string","value":"e80ba6d1934ecf08d0cff1be88ce041a30c88f24"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"t051506/alloy-common"},"path":{"kind":"string","value":"/alloy-common-sentinel/src/main/java/com/alloy/cloud/common/sentinel/handle/CloudUrlBlockHandler.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":1260,"string":"1,260"},"score":{"kind":"number","value":2.015625,"string":"2.015625"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"\npackage com.alloy.cloud.common.sentinel.handle;\n\nimport cn.hutool.http.ContentType;\nimport com.alibaba.csp.sentinel.adapter.spring.webmvc.callback.BlockExceptionHandler;\nimport com.alibaba.csp.sentinel.slots.block.BlockException;\nimport com.alibaba.fastjson.JSON;\nimport com.alibaba.fastjson.serializer.SerializerFeature;\nimport com.alloy.cloud.common.core.base.R;\nimport lombok.extern.slf4j.Slf4j;\nimport org.springframework.http.HttpStatus;\n\nimport javax.servlet.http.HttpServletRequest;\nimport javax.servlet.http.HttpServletResponse;\n\n/**\n * sentinel统一降级限流策略\n *

\n * {@link com.alibaba.csp.sentinel.adapter.spring.webmvc.callback.DefaultBlockExceptionHandler}\n */\n@Slf4j\npublic class CloudUrlBlockHandler implements BlockExceptionHandler {\n\n @Override\n public void handle(HttpServletRequest request, HttpServletResponse response, BlockException e) throws Exception {\n log.error(\"sentinel 降级 资源名称{}\", e.getRule().getResource(), e);\n\n response.setContentType(ContentType.JSON.toString());\n response.setStatus(HttpStatus.TOO_MANY_REQUESTS.value());\n response.getWriter().print(JSON.toJSONString(R.failed(\"sentinel denied.\"+ e.getMessage()), SerializerFeature.WriteNullStringAsEmpty));\n }\n\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2971,"cells":{"blob_id":{"kind":"string","value":"5bf0c04de1bf96cc98910350fa571bb73869a0a6"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"AHeartMan/simple-java"},"path":{"kind":"string","value":"/simple-java-nio/src/main/java/com/alsace/simplejavanio/blockingnio/Main.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":308,"string":"308"},"score":{"kind":"number","value":2,"string":"2"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package com.alsace.simplejavanio.blockingnio;\n\n/**\n *

\n *\n *

\n *\n * @author sangmingming\n * @since 2019/10/25 0025\n */\npublic class Main {\n\n public static void main(String[] args) throws Exception {\n TestBlockingNio blockingNio = new TestBlockingNio();\n blockingNio.client();\n }\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2972,"cells":{"blob_id":{"kind":"string","value":"9de9eed952eafa942e2032f7b529f056fff0e16f"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"honglou2001/ejb1"},"path":{"kind":"string","value":"/ejbpro1/src/com/watch/ejb/LocElectfenceBean.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":17392,"string":"17,392"},"score":{"kind":"number","value":2.21875,"string":"2.21875"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package com.watch.ejb;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.UUID;\nimport java.util.logging.Logger;\n\nimport javax.ejb.Stateless;\nimport javax.persistence.EntityManager;\nimport javax.persistence.PersistenceContext;\nimport javax.persistence.Query;\n\n/**\n *

\n * Title: ejb title\n *

\n *

\n * Description: t_loc_electfence EJB Interface Bean 处理类\n *

\n * \n * @author yangqinxu 电话:137****5317\n * @version 1.0 时间 2015-6-25 9:51:03\n */\n@Stateless(mappedName = \"LocElectfenceService\")\npublic class LocElectfenceBean implements LocElectfenceService {\n\n\tprivate final static Logger logger = Logger.getLogger(LocElectfenceBean.class.getName()); \n\t\n\t@PersistenceContext(unitName = \"ejbpro1\")\n\tprivate EntityManager manager;\n\n\t@Override\n\tpublic void Add(LocElectfence locElectfenceInfo) {\n\t\tlocElectfenceInfo.setFlocfenid(UUID.randomUUID().toString());\n\t\tmanager.persist(locElectfenceInfo);\n\t}\n\n\t@Override\n\tpublic void Update(LocElectfence locElectfenceInfo) {\n\t\tmanager.merge(locElectfenceInfo);\n\t}\n\n\t@Override\n\tpublic void Delete(String id) {\n\t\tLocElectfence locElectfenceInfo = manager.find(LocElectfence.class, id);\n\n\t\tmanager.remove(locElectfenceInfo);\n\t}\n\n\t@Override\n\tpublic LocElectfence find(String id) {\n\t\tLocElectfence locElectfenceInfo = manager.find(LocElectfence.class, id);\n\t\treturn locElectfenceInfo;\n\t}\n\n\tprivate String GetWhere(HashMap map) {\n\t\tString where = \"\";\n\n\t\t// queryMap.put(\"serialNumber\", serialNumber);\n\t\t// queryMap.put(\"areaNumber\", areaNumber);\n\t\t// queryMap.put(\"areaName\", areaName);\n\n\t\tif (map != null && map.size() > 0) {\n\t\t\tif (map.containsKey(\"serialNumber\")\n\t\t\t\t\t&& map.get(\"serialNumber\") != null\n\t\t\t\t\t&& !map.get(\"serialNumber\").toString().equals(\"\")) {\n\t\t\t\twhere += \" and a.FSerialnumber = '\" + map.get(\"serialNumber\")\n\t\t\t\t\t\t+ \"' \";\n\t\t\t}\n\t\t\tif (map.containsKey(\"areaNumber\") && map.get(\"areaNumber\") != null\n\t\t\t\t\t&& !map.get(\"areaNumber\").toString().equals(\"\")) {\n\t\t\t\twhere += \" and b.id = \" + map.get(\"areaNumber\") + \" \";\n\t\t\t}\n\t\t\tif (map.containsKey(\"areaName\") && map.get(\"areaName\") != null\n\t\t\t\t\t&& !map.get(\"areaName\").toString().equals(\"\")) {\n\t\t\t\twhere += \" and b.name like '%\" + map.get(\"areaName\") + \"%' \";\n\t\t\t}\n\t\t\t// a.FUpdateTime>='2015-02-12 22:12:23' and FUpdateTime<='2015-08-12 22:12:23'\n\t\t\t \n\t\t\tif (map.containsKey(\"startTime\") && map.get(\"startTime\") != null\n\t\t\t\t\t&& !map.get(\"startTime\").toString().equals(\"\")) {\n\t\t\t\twhere += \" and a.FUpdateTime >= '\" + map.get(\"startTime\") + \"' \";\n\t\t\t}\n\t\t\tif (map.containsKey(\"endTime\") && map.get(\"endTime\") != null\n\t\t\t\t\t&& !map.get(\"endTime\").toString().equals(\"\")) {\n\t\t\t\twhere += \" and a.FUpdateTime <= '\" + map.get(\"endTime\") + \"' \";\n\t\t\t}\n\t\t\t\n\t\t\tif (map.containsKey(\"fdatastatus\") && map.get(\"fdatastatus\") != null\n\t\t\t\t\t&& !map.get(\"fdatastatus\").toString().equals(\"\")) {\n\t\t\t\twhere += \" and a.fdatastatus = \" + map.get(\"fdatastatus\") + \" \";\n\t\t\t}\n\t\t\t\n\t\t\tif (map.containsKey(\"frecordcount\") && map.get(\"frecordcount\") != null\n\t\t\t\t\t&& map.get(\"frecordcount\").toString().equals(\"frecordcount=1\")) {\n\t\t\t\twhere += \" and a.frecordcount = 1 \";\n\t\t\t}\t\t\t\t\t\n\t\t\t\n\t\t}\n\t\treturn where;\n\t}\n\n\t@Override\n\tpublic int GetCount(HashMap map) {\n\n\t\tString where = GetWhere(map);\n\n\t\tStringBuffer sql = new StringBuffer();\n\t\tsql.append(\" SELECT count(*) \");\n\t\tsql.append(\" FROM T_LOC_ELECTFENCE a left join electfence b on a.FEltFenceID = b.id \");\t\t\n\t\tsql.append(\" WHERE 1 = 1 \");\n\t\tsql.append(where);\n\n\n\t\tQuery query = manager.createNativeQuery(sql.toString());\n\t\tint total = (new Integer(query.getSingleResult().toString()));\n\n\t\treturn total;\n\t\t\n//\t\tString hql = \"select count(*) from LocElectfence\";\n//\t\tQuery query = manager.createQuery(hql);\n//\t\tint total = (new Integer(query.getSingleResult().toString()));\n//\t\treturn total;\n\t}\n\n\n\n\tprivate List GetSerialAreaList(HashMap map) {\n\n\t\t//String where = \"and a.serialnumber='\" + serialnumber + \"'\";\n\t\t\n\t\tString where = \"\";\n\n\t\tif (map.containsKey(\"serialNumber\") && map.get(\"serialNumber\") != null\n\t\t\t\t&& !map.get(\"serialNumber\").toString().equals(\"\")) {\n\t\t\twhere += \" and a.serialnumber = '\" + map.get(\"serialNumber\")\n\t\t\t\t\t+ \"' \";\n\t\t}\n\t\tif (map.containsKey(\"areaNumber\") && map.get(\"areaNumber\") != null\n\t\t\t\t&& !map.get(\"areaNumber\").toString().equals(\"\")) {\n\t\t\twhere += \" and a.id = \" + map.get(\"areaNumber\") + \" \";\n\t\t}\n\t\t\n\t\tStringBuffer sql = new StringBuffer();\n\n\t\tsql.append(\" SELECT a.id,a.serialnumber,a.areanum,a.name,a.locationbd,a.locationgd,a.model,a.scope,a.createtime,a.updatetime,a.status \");\n\t\tsql.append(\" FROM ELECTFENCE a \");\n\t\tsql.append(\" WHERE 1 = 1 \");\n\t\tsql.append(where);\n\n\t\tQuery query = manager.createNativeQuery(sql.toString());\n\n\t\tList rows = query.getResultList();\n\t\tList LocElectfences = new ArrayList();\n\n\t\tfor (Object row : rows) {\n\t\t\tObject[] cells = (Object[]) row;\n\t\t\tElectfence item = new Electfence();\n\t\t\titem.setAreanum((Integer) cells[0]);\n\t\t\tLocElectfences.add(item);\n\t\t}\n\n\t\treturn LocElectfences;\n\t}\n\n\n\tprivate List getTop1ByElectfence(HashMap map) {\n\n\t\tString where = \"\";\n\n\t\tif (map.containsKey(\"serialNumber\") && map.get(\"serialNumber\") != null\n\t\t\t\t&& !map.get(\"serialNumber\").toString().equals(\"\")) {\n\t\t\twhere += \" and a.FSerialnumber = '\" + map.get(\"serialNumber\")\n\t\t\t\t\t+ \"' \";\n\t\t}\n\t\tif (map.containsKey(\"areaNumber\") && map.get(\"areaNumber\") != null\n\t\t\t\t&& !map.get(\"areaNumber\").toString().equals(\"\")) {\n\t\t\twhere += \" and b.id = \" + map.get(\"areaNumber\") + \" \";\n\t\t}\n\n\t\tStringBuffer sql = new StringBuffer();\n\t\tsql.append(\" SELECT a.FLocFenID,a.FIncreaseID,a.FEltFenceID,a.FSerialnumber,a.FDataStatus,a.FFieldStatus,a.FEltLongitude,a.FEltLatitude,a.FEltScope,a.FEltAddress,a.FLongitude,a.FLatitude,a.FAddress,a.FDistance,a.FAddTime,a.FUpdateTime,a.FRemark \");\n\t\tsql.append(\" ,a.FReadCount,b.id,b.name \");\n//\t\tsql.append(\" ,IFNULL(b.areanum,0),IFNULL(b.name,'') \");\n\n\t\tsql.append(\" FROM T_LOC_ELECTFENCE a inner join electfence b on a.FEltFenceID = b.id \");\n\t\tsql.append(\" WHERE 1 = 1 \");\n\n\t\tsql.append(where);\n\t\tsql.append(\" order by a.FIncreaseID desc \");\n\t\tsql.append(\"limit 0,1\");\n\n\t\tQuery query = manager.createNativeQuery(sql.toString());\n\n\t\tList rows = query.getResultList();\n\t\tList LocElectfences = new ArrayList();\n\n\t\tfor (Object row : rows) {\n\t\t\tObject[] cells = (Object[]) row;\n\n\t\t\tLocElectfence item = new LocElectfence();\n\n\t\t\titem.setFlocfenid((String) cells[0]);\n\t\t\titem.setFincreaseid((Integer) cells[1]);\n\t\t\titem.setFeltfenceid((Integer) cells[2]);\n\t\t\titem.setFserialnumber((String) cells[3]);\n\t\t\titem.setFdatastatus((Integer) cells[4]);\n\t\t\titem.setFfieldstatus((Integer) cells[5]);\n\t\t\titem.setFeltlongitude((String) cells[6]);\n\t\t\titem.setFeltlatitude((String) cells[7]);\n\t\t\titem.setFeltscope((Double) cells[8]);\n\t\t\titem.setFeltaddress((String) cells[9]);\n\t\t\titem.setFlongitude((String) cells[10]);\n\t\t\titem.setFlatitude((String) cells[11]);\n\t\t\titem.setFaddress((String) cells[12]);\n\t\t\titem.setFdistance((Double) cells[13]);\n\t\t\titem.setFaddtime((java.sql.Timestamp) cells[14]);\n\t\t\titem.setFupdatetime((java.sql.Timestamp) cells[15]);\n\t\t\titem.setFremark((String) cells[16]);\n\t\t\t\n//\t\t\tif(cells[17]!=null && !cells[17].toString().equals(\"\"))\n//\t\t\t{\n//\t\t\t\t\n//\t\t\t}\n\t\t\titem.setFreadCount((Integer) cells[17]);\n\t\t\titem.setFareanumber((Integer) cells[18]);\n\t\t\titem.setFareaname((String) cells[19]);\n\n\t\t\tLocElectfences.add(item);\n\t\t\t\n\t\t\t\n\t\t\t//更新读写次数\n\t\t\tString updateSql = \"update T_LOC_ELECTFENCE set FReadCount=FReadCount+1 WHERE FLocFenID= :FLocFenID \";\n\t\t\tQuery updateQuery = manager.createNativeQuery(updateSql);\n\t\t\tupdateQuery.setParameter(\"FLocFenID\", item.getFlocfenid());\n\t\t\tupdateQuery.executeUpdate();\n\t\t\t\n\t\t}\n\t\treturn LocElectfences;\n\t}\n\n\t@Override\n\tpublic List ListLocElectfenceTop1(int offset, int length,\n\t\t\tHashMap map) {\n\n\t\tList locEltReturn = new ArrayList();\n\t\tif(map == null || map.size()==0)\n\t\t{\n\t\t\treturn locEltReturn;\n\t\t}\n\t\t\n\t\tif(map.get(\"serialNumber\") ==null || map.get(\"serialNumber\").toString().equals(\"\"))\n\t\t{\n\t\t\treturn locEltReturn;\n\t\t}\n\t\t\n\t\tList elct = this.GetSerialAreaList(map);\n\n\t\t\n\t\tif (elct != null && elct.size() > 0) {\n\t\t\tfor (int i = 0; i < elct.size(); i++) {\n\t\t\t\t\n\t\t\t\tElectfence item = elct.get(i);\n\n\t\t\t\tHashMap map1 = new HashMap();\n\t\t\t\tmap1.put(\"serialNumber\", map.get(\"serialNumber\"));\n\t\t\t\tmap1.put(\"areaNumber\", item.getAreanum().toString());\n\n\t\t\t\tList locelts = this.getTop1ByElectfence(map1);\n\t\t\t\tif (locelts != null && locelts.size() > 0) {\n\t\t\t\t\tlocEltReturn.add(locelts.get(0));\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\treturn locEltReturn;\n\n\t}\n\n\t@Override\n\tpublic List ListLocElectfence(int offset, int length,\n\t\t\tHashMap map) {\n\n\t\t\n\t\tString where = GetWhere(map);\n\t\t\n\t\tString ordersc = \" desc \";\n\t\t\n\t\tif(map!=null && map.size()>0){\n\t\t\tif (map.containsKey(\"frecordcount\") && map.get(\"frecordcount\") != null\n\t\t\t\t\t&& map.get(\"frecordcount\").toString().equals(\"frecordcount=1\")) {\n\t\t\t\tordersc = \" asc \";\n\t\t\t}\t\n\t\t}\n\n\t\tStringBuffer sql = new StringBuffer();\n\t\tsql.append(\" SELECT a.FLocFenID,a.FIncreaseID,a.FEltFenceID,a.FSerialnumber,a.FDataStatus,a.FFieldStatus,a.FEltLongitude,a.FEltLatitude,a.FEltScope,a.FEltAddress,a.FLongitude,a.FLatitude,a.FAddress,a.FDistance,a.FAddTime,a.FUpdateTime,a.FRemark \");\n\t\tsql.append(\" ,b.id,b.name \");\n\t\tsql.append(\" FROM T_LOC_ELECTFENCE a left join electfence b on a.FEltFenceID = b.id \");\t\t\n\t\tsql.append(\" WHERE 1 = 1 \");\n\t\tsql.append(where);\n\t\tsql.append(\" order by a.FIncreaseID \"+ordersc);\n\t\tsql.append(\"limit \"+offset+\",\" + length + \"\");\n\n\t\tQuery query = manager.createNativeQuery(sql.toString());\n\n\t\tList rows = query.getResultList();\n\t\tList LocElectfences = new ArrayList();\n\n\t\tfor (Object row : rows) {\n\t\t\tObject[] cells = (Object[]) row;\n\n\t\t\tLocElectfence item = new LocElectfence();\n\n\t\t\titem.setFlocfenid((String) cells[0]);\n\t\t\titem.setFincreaseid((Integer) cells[1]);\n\t\t\titem.setFeltfenceid((Integer) cells[2]);\n\t\t\titem.setFserialnumber((String) cells[3]);\n\t\t\titem.setFdatastatus((Integer) cells[4]);\n\t\t\titem.setFfieldstatus((Integer) cells[5]);\n\t\t\titem.setFeltlongitude((String) cells[6]);\n\t\t\titem.setFeltlatitude((String) cells[7]);\n\t\t\titem.setFeltscope((Double) cells[8]);\n\t\t\titem.setFeltaddress((String) cells[9]);\n\t\t\titem.setFlongitude((String) cells[10]);\n\t\t\titem.setFlatitude((String) cells[11]);\n\t\t\titem.setFaddress((String) cells[12]);\n\t\t\titem.setFdistance((Double) cells[13]);\n\t\t\titem.setFaddtime((java.sql.Timestamp) cells[14]);\n\t\t\titem.setFupdatetime((java.sql.Timestamp) cells[15]);\n\t\t\titem.setFremark((String) cells[16]);\t\t\t\n\t\t\titem.setFareanumber((Integer) cells[17]);\n\t\t\titem.setFareaname((String) cells[18]);\n\n\t\t\tLocElectfences.add(item);\n\t\t}\n\t\treturn LocElectfences;\n\t}\n\t\n\tprivate List ListUser(int offset, int length,HashMap map) {\n\n\t\tString where = \" \";\n\t\t\n\t\tif(map!=null && map.size() > 0)\n\t\t{\n\n//\t\t\tif(map.containsKey(\"funiqueid\") && map.get(\"funiqueid\")!=null && !map.get(\"funiqueid\").toString().equals(\"\"))\n//\t\t\t{\n//\t\t\t\twhere += \" and a.funiqueid = '\"+map.get(\"funiqueid\")+\"' \";\n//\t\t\t}\t\n//\t\t\t\n\t\t\tif (map.containsKey(\"user.funiqueid\") && map.get(\"user.funiqueid\") != null\n\t\t\t\t\t&& !map.get(\"user.funiqueid\").toString().equals(\"\")) {\n\t\t\t\twhere += \" and a.funiqueid = '\" + map.get(\"user.funiqueid\") + \"' \";\n\t\t\t}\t\t\t\t\n\t\t}\t\t\n\t\t\t\t\n\t StringBuffer sql = new StringBuffer();\n sql.append(\" SELECT a.funiqueid,a.id,c.serialnumber,a.username,a.phone,a.password,a.sex,a.status,a.createtime,a.fmobile,a.nickname,a.birthday,a.height,a.weight,a.picture,a.flogcount,a.floglasttime,a.floglaspip,a.fienabled,a.fdatastatus,a.fremark,a.femail,a.furl,a.faddress \"); \n sql.append(\" FROM USER a inner join t_user_snrelate b \"); \n sql.append(\" on a.funiqueid=b.FUserIDStr inner join serialnumber c on c.funiqueid = b.FSNIDStr \"); \n\t\tsql.append(\" WHERE b.FDataStatus=1 | b.FDataStatus \");\n\t\tsql.append(where);\n\n\t\tQuery query = manager.createNativeQuery(sql.toString());\n\n\t\tList rows = query.getResultList();\n\t\tList Users = new ArrayList();\n\t\t\n\t\tfor (Object row : rows) {\n\t\t\tObject[] cells = (Object[]) row;\n\t\t\t\n\t\t\tUserWatch item = new UserWatch();\t\n \n item.setFuniqueid((String)cells[0]); \n item.setId((Integer)cells[1]); \n item.setSerialnumber((String)cells[2]); \n item.setUsername((String)cells[3]); \n item.setPhone((String)cells[4]); \n item.setPassword((String)cells[5]); \n item.setSex((String)cells[6]); \n item.setStatus((String)cells[7]); \n item.setCreatetime((String)cells[8]); \n item.setFmobile((String)cells[9]); \n item.setNickname((String)cells[10]); \n item.setBirthday((String)cells[11]); \n item.setHeight((String)cells[12]); \n item.setWeight((String)cells[13]); \n item.setPicture((String)cells[14]); \n item.setFlogcount((Integer)cells[15]); \n item.setFloglasttime((java.sql.Timestamp)cells[16]); \n item.setFloglaspip((String)cells[17]); \n item.setFienabled((Integer)cells[18]); \n item.setFdatastatus((Integer)cells[19]); \n item.setFremark((String)cells[20]); \n item.setFemail((String)cells[21]); \n item.setFurl((String)cells[22]); \n item.setFaddress((String)cells[23]); \n \t\t\t\n\t\t\tUsers.add(item);\t\t\t\n\t\t}\n\t\treturn Users;\n\t}\n\t\n\t\t\n\tprivate List ListLatestLocaltion1(HashMap map) {\t\t\n\t\tString where = \"\";\n\t\tif (map.containsKey(\"user.funiqueid\") && map.get(\"user.funiqueid\") != null\n\t\t\t\t&& !map.get(\"user.funiqueid\").toString().equals(\"\")) {\n\t\t\twhere += \" and e.funiqueid = '\" + map.get(\"user.funiqueid\") + \"' \";\n\t\t}\n\t\tif (map.containsKey(\"serialnumber\") && map.get(\"serialnumber\") != null\n\t\t\t\t&& !map.get(\"serialnumber\").toString().equals(\"\")) {\n\t\t\twhere += \" and c.serialnumber = '\" + map.get(\"serialnumber\") + \"' \";\n\t\t\t\n\t\t\tif(where.equals(\"\"))\n\t\t\t{\n\t\t\t\twhere = \" and 1=0 \";\n\t\t\t}\n\t\t}\n\t\t\n\t\tStringBuffer sql = new StringBuffer();\n\t\tsql.append(\" SELECT a.FLocFenID,a.FIncreaseID,a.FEltFenceID,a.FSerialnumber,a.FDataStatus,a.FFieldStatus,a.FEltLongitude,a.FEltLatitude,a.FEltScope,a.FEltAddress,a.FLongitude,a.FLatitude,a.FAddress,a.FDistance,a.FAddTime,a.FUpdateTime,a.FRemark \");\n\t\tsql.append(\" ,b.id,b.name,c.fpicture,f.battery \");\n\t\tsql.append(\" FROM T_LOC_ELECTFENCE a left join electfence b on a.FEltFenceID = b.id and a.FFieldStatus=1 \");\t\t\t\n\t\tsql.append(\" inner join serialnumber c on c.serialnumber = a.FSerialnumber \");\n\t\tsql.append(\" inner join t_user_snrelate d on d.FSNIDStr = c.funiqueid \");\t\n\t\tsql.append(\" inner join user e on d.FUserIDStr = e.funiqueid \");\t\t\t\n\t\tsql.append(\" left join locationinfo f on f.serialnumber = c.serialnumber \");\t\n\t\t\n\t\tsql.append(\" WHERE 1 = 1 \");\n\t\tsql.append(where);\n\t\tsql.append(\" order by a.FIncreaseID desc \");\n\t\tsql.append(\"limit 0,1\");\n\n\t\tQuery query = manager.createNativeQuery(sql.toString());\n\n\t\tList rows = query.getResultList();\n\t\tList LocElectfences = new ArrayList();\n\n\t\tfor (Object row : rows) {\n\t\t\tObject[] cells = (Object[]) row;\n\n\t\t\tLocElectfence item = new LocElectfence();\n\n\t\t\titem.setFlocfenid((String) cells[0]);\n\t\t\titem.setFincreaseid((Integer) cells[1]);\n\t\t\titem.setFeltfenceid((Integer) cells[2]);\n\t\t\titem.setFserialnumber((String) cells[3]);\n\t\t\titem.setFdatastatus((Integer) cells[4]);\n\t\t\titem.setFfieldstatus((Integer) cells[5]);\n\t\t\titem.setFeltlongitude((String) cells[6]);\n\t\t\titem.setFeltlatitude((String) cells[7]);\n\t\t\titem.setFeltscope((Double) cells[8]);\n\t\t\titem.setFeltaddress((String) cells[9]);\n\t\t\titem.setFlongitude((String) cells[10]);\n\t\t\titem.setFlatitude((String) cells[11]);\n\t\t\titem.setFaddress((String) cells[12]);\n\t\t\titem.setFdistance((Double) cells[13]);\n\t\t\titem.setFaddtime((java.sql.Timestamp) cells[14]);\n\t\t\titem.setFupdatetime((java.sql.Timestamp) cells[15]);\n\t\t\titem.setFremark((String) cells[16]);\t\t\t\n\t\t\titem.setFareanumber((Integer) cells[17]);\n\t\t\titem.setFareaname((String) cells[18]);\t\t\t\n\t\t\titem.setFpicture((String) cells[19]);\n\n\t\t\titem.setBattery((String) cells[20]);\n\t\t\t\n\t\t\tLocElectfences.add(item);\n\t\t}\n\t\treturn LocElectfences;\n\t}\n\t\n\t@Override\n\tpublic List ListLatestLocaltion(HashMap map) {\n\n\t\tList listUser =this.ListUser(0, 100,map);\n\t\t\n\t\tList listData = new ArrayList();\n\t\t\n\t\tif(listUser!=null && listUser.size()>0)\n\t\t{\n\t\t\tfor(int i=0;i map1 = new HashMap();\n\t\t\t\tmap1.put(\"user.funiqueid\", listUser.get(i).getFuniqueid());\n\t\t\t\tmap1.put(\"serialnumber\", listUser.get(i).getSerialnumber());\n\t\t\t\t\n//\t\t\t\tlogger.info(String.format(\"yang info funiqueid:%s,serialnumber:%s\", listUser.get(i).getFuniqueid(),listUser.get(i).getSerialnumber()));\n\t\t\t\t\n\t\n\t\t\t\tList childloc = this.ListLatestLocaltion1(map1);\n\t\t\t\tlistData.addAll(childloc);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t}\t\n\t\t\n\t\treturn listData;\n\t\t\n\t}\n}"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2973,"cells":{"blob_id":{"kind":"string","value":"485613810274083d277d424e00b8b99bead1ea70"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"noatmc-archived/jigokusense-leak"},"path":{"kind":"string","value":"/botnet/auth/jigokusense/manager/RotationManager.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":2654,"string":"2,654"},"score":{"kind":"number","value":2.375,"string":"2.375"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"//Deobfuscated with https://github.com/SimplyProgrammer/Minecraft-Deobfuscator3000 using mappings \"C:\\Users\\autty\\Downloads\\Minecraft-Deobfuscator3000-master\\Minecraft-Deobfuscator3000-master\\1.12 stable mappings\"!\n\n/*\n * Decompiled with CFR 0.151.\n * \n * Could not load the following classes:\n * net.minecraft.entity.player.EntityPlayer\n * net.minecraft.network.play.client.CPacketPlayer\n * net.minecraftforge.common.MinecraftForge\n */\npackage botnet.auth.jigokusense.manager;\n\nimport botnet.auth.jigokusense.event.events.PacketEvent;\nimport botnet.auth.jigokusense.util.Global;\nimport java.util.function.Predicate;\nimport me.zero.alpine.listener.EventHandler;\nimport me.zero.alpine.listener.Listener;\nimport net.minecraft.entity.player.EntityPlayer;\nimport net.minecraft.network.play.client.CPacketPlayer;\nimport net.minecraftforge.common.MinecraftForge;\n\npublic class RotationManager\nimplements Global {\n private float yaw = 0.0f;\n private float pitch = 0.0f;\n private boolean shouldRotate = false;\n @EventHandler\n private final Listener receiveListener = new Listener(event -> {\n if (event.getPacket() instanceof CPacketPlayer) {\n CPacketPlayer packet = (CPacketPlayer)event.getPacket();\n if (this.shouldRotate) {\n packet.yaw = this.yaw;\n packet.pitch = this.pitch;\n }\n }\n }, new Predicate[0]);\n\n public RotationManager() {\n MinecraftForge.EVENT_BUS.register((Object)this);\n }\n\n public void reset() {\n this.shouldRotate = false;\n if (RotationManager.mc.player == null) {\n return;\n }\n this.yaw = RotationManager.mc.player.rotationYaw;\n this.pitch = RotationManager.mc.player.rotationPitch;\n }\n\n public void rotate(double x, double y, double z) {\n if (RotationManager.mc.player == null) {\n return;\n }\n Double[] v = this.calculateLookAt(x, y, z, (EntityPlayer)RotationManager.mc.player);\n this.shouldRotate = true;\n this.yaw = v[0].floatValue();\n this.pitch = v[1].floatValue();\n }\n\n private Double[] calculateLookAt(double px, double py, double pz, EntityPlayer me) {\n double dirx = me.posX - px;\n double diry = me.posY - py;\n double dirz = me.posZ - pz;\n double len = Math.sqrt(dirx * dirx + diry * diry + dirz * dirz);\n double pitch = Math.asin(diry /= len);\n double yaw = Math.atan2(dirz /= len, dirx /= len);\n pitch = pitch * 180.0 / Math.PI;\n yaw = yaw * 180.0 / Math.PI;\n return new Double[]{yaw += 90.0, pitch};\n }\n}\n\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2974,"cells":{"blob_id":{"kind":"string","value":"3620a22a3cc0a9fe4a74e703459b664d01fd2b2f"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"sopiseiro/pdv"},"path":{"kind":"string","value":"/src/pdvjonatas/buscar_cliente.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":8422,"string":"8,422"},"score":{"kind":"number","value":2.09375,"string":"2.09375"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"/*\n * To change this template, choose Tools | Templates\n * and open the template in the editor.\n */\n\n/*\n * buscar_cliente.java\n *\n * Created on 13/08/2011, 09:32:02\n */\n\npackage pdvjonatas;\n\nimport utilitarios.bd;\nimport utilitarios.mySql;\nimport java.awt.event.ActionEvent;\nimport java.awt.event.KeyEvent;\nimport java.text.DecimalFormat;\nimport java.text.NumberFormat;\nimport java.util.Locale;\nimport javax.swing.AbstractAction;\nimport javax.swing.DefaultListModel;\nimport javax.swing.JComponent;\nimport javax.swing.JOptionPane;\nimport javax.swing.KeyStroke;\nimport javax.swing.table.DefaultTableModel;\nimport javax.swing.text.AttributeSet;\nimport javax.swing.text.PlainDocument;\n/**\n *\n * @author AGENCIA GLOBO\n */\npublic class buscar_cliente extends javax.swing.JDialog {\n\n public String nome, cpf, codigo;\n /** Creates new form buscar_cliente */\n public buscar_cliente(java.awt.Frame parent, boolean modal) {\n super(parent, modal);\n initComponents();\n busca.requestFocus();\n\n busca.setDocument( new PlainDocument(){\n @Override\n\t\tprotected void insertUpdate( DefaultDocumentEvent chng, AttributeSet attr ){\n\n super.insertUpdate( chng, attr );\n\n DefaultTableModel model = ((DefaultTableModel)clientes.getModel());\n model.setNumRows(0);\n\n bd b = new bd();\n b.connect();\n mySql f = new mySql(b.conn);\n String sql = \"Select * FROM CLIENTE WHERE nome LIKE '%\"+busca.getText().toLowerCase()+\"%' OR nome LIKE '%\"+busca.getText().toUpperCase()+\"%' OR cnpj_cnpf = '\"+busca.getText() +\"' OR codigo ='\"+busca.getText()+\"' ORDER BY nome ASC\";\n f.open(sql);\n while (f.next()){\n model.addRow(new Object [] {f.fieldbyname(\"codigo\"), f.fieldbyname(\"nome\"),f.fieldbyname(\"cnpj_cnpf\")} );\n }\n\n\n \n\t\t}\n });\n }\n\n\n public String getNome(){\n return nome;\n }\n\n public String getCpf(){\n return cpf;\n }\n\n public String getCodigo(){\n return codigo;\n }\n\n /** This method is called from within the constructor to\n * initialize the form.\n * WARNING: Do NOT modify this code. The content of this method is\n * always regenerated by the Form Editor.\n */\n @SuppressWarnings(\"unchecked\")\n // //GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n busca = new javax.swing.JTextField();\n jScrollPane1 = new javax.swing.JScrollPane();\n clientes = new javax.swing.JTable();\n jButton1 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jLabel1.setText(\"Nome ou CPF:\");\n\n clientes.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Código\", \"Nome\", \"CPF\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, true\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n clientes.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n clientesMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(clientes);\n\n jButton1.setText(\"Selecionar\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(busca))\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 375, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton1)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(busca, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton1)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 275, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(14, Short.MAX_VALUE))\n );\n\n pack();\n }// //GEN-END:initComponents\n\n private void clientesMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clientesMouseClicked\n if (evt.getClickCount() == 2){\n DefaultTableModel model = ((DefaultTableModel)clientes.getModel());\n try{\n nome = model.getValueAt(clientes.getSelectedRow(), 1).toString();\n cpf = model.getValueAt(clientes.getSelectedRow(), 2).toString();\n codigo = model.getValueAt(clientes.getSelectedRow(), 0).toString();\n }catch (Exception e){\n nome = model.getValueAt(clientes.getSelectedRow(), 1).toString();\n cpf = \"\";\n codigo = model.getValueAt(clientes.getSelectedRow(), 0).toString();\n }\n dispose();\n }\n }//GEN-LAST:event_clientesMouseClicked\n\n private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed\n DefaultTableModel model = ((DefaultTableModel)clientes.getModel());\n try{\n nome = model.getValueAt(clientes.getSelectedRow(), 1).toString();\n cpf = model.getValueAt(clientes.getSelectedRow(), 2).toString();\n codigo = model.getValueAt(clientes.getSelectedRow(), 0).toString();\n dispose();\n }catch (Exception e){\n nome = model.getValueAt(clientes.getSelectedRow(), 1).toString();\n cpf = \"\";\n codigo = model.getValueAt(clientes.getSelectedRow(), 0).toString();\n }\n }//GEN-LAST:event_jButton1ActionPerformed\n\n /**\n * @param args the command line arguments\n */\n public static void main(String args[]) {\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n buscar_cliente dialog = new buscar_cliente(new javax.swing.JFrame(), true);\n dialog.addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosing(java.awt.event.WindowEvent e) {\n System.exit(0);\n }\n });\n dialog.setVisible(true);\n }\n });\n }\n\n // Variables declaration - do not modify//GEN-BEGIN:variables\n private javax.swing.JTextField busca;\n private javax.swing.JTable clientes;\n private javax.swing.JButton jButton1;\n private javax.swing.JLabel jLabel1;\n private javax.swing.JScrollPane jScrollPane1;\n // End of variables declaration//GEN-END:variables\n\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2975,"cells":{"blob_id":{"kind":"string","value":"c79836c0e7c6f66817dcecb503ee11344b584175"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"tian-qingzhao/design-pattern"},"path":{"kind":"string","value":"/src/main/java/com/tqz/pattern/decorator/batterback/v2/BaseBattercake.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":298,"string":"298"},"score":{"kind":"number","value":2.46875,"string":"2.46875"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package com.tqz.pattern.decorator.batterback.v2;\n\n/**\n * @Author: tian\n * @Date: 2020/4/22 21:26\n * @Desc:\n */\npublic class BaseBattercake extends Battercake {\n\n @Override\n public String msg() {\n return \"煎饼\";\n }\n\n @Override\n public int price() {\n return 5;\n }\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2976,"cells":{"blob_id":{"kind":"string","value":"b5ce9e2047697d59209909e65b71c908bbd12e2a"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"RevatureRobert/pet-tribble-lopezjronald"},"path":{"kind":"string","value":"/src/main/java/net/revature/enterprise/pettribble/service/PetTribbleImpl.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":7122,"string":"7,122"},"score":{"kind":"number","value":2.796875,"string":"2.796875"},"int_score":{"kind":"number","value":3,"string":"3"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package net.revature.enterprise.pettribble.service;\n\nimport net.revature.enterprise.pettribble.model.PetTribble;\n\nimport java.sql.*;\nimport java.util.ArrayList;\nimport java.util.Scanner;\n\npublic class PetTribbleImpl implements PetTribbleDao {\n\n public static final String COLUMN_ID = \"id\";\n public static final String COLUMN_NAME = \"name\";\n public static final String TABLE_NAME = \"tribble\";\n /*\n Query to retrieve Pet Tribble by id\n */\n public static final String QUERY_SEARCH_ID = \"SELECT \" +\n COLUMN_ID + \", \" +\n COLUMN_NAME + \" FROM \" +\n TABLE_NAME + \" WHERE \" +\n COLUMN_ID + \" = ?\";\n /*\n Query to retrieve all pet tribble by name\n */\n public static final String QUERY_SEARCH_NAME = \"SELECT \" +\n COLUMN_ID + \", \" +\n COLUMN_NAME + \" FROM \" +\n TABLE_NAME + \" WHERE \" +\n COLUMN_NAME + \" = ? ORDER BY \" +\n COLUMN_NAME;\n public static final String QUERY_GET_ALL_PET_TRIBBLES = \"SELECT \" +\n COLUMN_ID + \", \" +\n COLUMN_NAME + \" FROM \" +\n TABLE_NAME;\n\n /*\n GET ALL PET TRIBBLE\n */\n public static final String QUERY_DELETE_BY_ID = \"DELETE FROM \" +\n TABLE_NAME + \" WHERE \" +\n COLUMN_ID + \" = ?\";\n\n /*\n QUERY TO DELETE BY ID\n */\n public static final String QUERY_CREATE = \"INSERT INTO \" +\n TABLE_NAME + \" (\" +\n COLUMN_NAME + \") VALUES (?)\";\n\n /*\n CREATE A NEW PET tribble\n */\n public final static Scanner scanner = new Scanner(System.in);\n public static Integer id;\n\n @Override\n public PetTribble getById(int id, Connection connection) {\n try {\n PetTribble petTribble = new PetTribble();\n PreparedStatement preparedStatement = connection.prepareStatement(QUERY_SEARCH_ID);\n preparedStatement.setInt(1, id);\n ResultSet resultSet = preparedStatement.executeQuery();\n if (resultSet != null) {\n while (resultSet.next()) {\n petTribble.setId(resultSet.getInt(1));\n petTribble.setName(resultSet.getString(2));\n }\n resultSet.close();\n }\n preparedStatement.close();\n return petTribble;\n } catch (SQLException e) {\n System.out.println(\"There was a problem with your transaction\");\n return null;\n } catch (Exception e) {\n System.out.println(\"ID does not exist or is no longer in the system.\");\n return null;\n }\n }\n\n @Override\n public ArrayList getByName(Connection connection, String name) {\n try {\n ArrayList petTribbles = new ArrayList<>();\n PreparedStatement preparedStatement = connection.prepareStatement(QUERY_SEARCH_NAME);\n preparedStatement.setString(1, name.toLowerCase().trim());\n ResultSet resultSet = preparedStatement.executeQuery();\n if (resultSet != null) {\n while (resultSet.next()) {\n PetTribble petTribble = new PetTribble();\n petTribble.setId(resultSet.getInt(1));\n petTribble.setName(resultSet.getString(2));\n petTribbles.add(petTribble);\n }\n resultSet.close();\n }\n preparedStatement.close();\n return petTribbles;\n } catch (SQLException e) {\n System.out.println(\"Name does not exist or is no longer in the system\");\n }\n return null;\n }\n\n @Override\n public ArrayList getAllPetTribbles(Connection connection) {\n try {\n ArrayList petTribbles = new ArrayList<>();\n PreparedStatement preparedStatement = connection.prepareStatement(QUERY_GET_ALL_PET_TRIBBLES);\n ResultSet resultSet = preparedStatement.executeQuery();\n if (resultSet != null) {\n while (resultSet.next()) {\n PetTribble petTribble = new PetTribble();\n petTribble.setId(resultSet.getInt(1));\n petTribble.setName(resultSet.getString(2));\n petTribbles.add(petTribble);\n }\n resultSet.close();\n }\n preparedStatement.close();\n return petTribbles;\n } catch (SQLException e) {\n return new ArrayList<>();\n }\n }\n\n @Override\n public int deleteById(Connection connection, int id) {\n try {\n connection.setAutoCommit(false);\n PreparedStatement preparedStatement = connection.prepareStatement(QUERY_DELETE_BY_ID);\n int result = -1;\n preparedStatement.setInt(1, id);\n try {\n result = preparedStatement.executeUpdate();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n if (result != 0) {\n connection.commit();\n System.out.println(\"Deletion of ID: \" + id + \" was successful.\");\n preparedStatement.close();\n } else {\n connection.rollback();\n System.out.println(\"ID #: \" + id + \" does not exist or is no longer available.\");\n }\n connection.setAutoCommit(true);\n return result;\n } catch (SQLException e) {\n System.out.println(\"ID #: \" + id + \" does not exist or is no longer available.\");\n return -1;\n }\n }\n\n @Override\n public PetTribble createPetTribble(Connection connection, String name) {\n try {\n while (true) {\n name = name.trim();\n if (name != \"\" || name != null) {\n break;\n } else {\n System.out.print(\"Invalid entry. Please enter a first name: \");\n }\n }\n\n PreparedStatement preparedStatement = connection.prepareStatement(QUERY_CREATE, Statement.RETURN_GENERATED_KEYS);\n int result = -1;\n preparedStatement.setString(1, name.trim().toLowerCase());\n try {\n result = preparedStatement.executeUpdate();\n } catch (Exception e) {\n e.printStackTrace();\n }\n ResultSet resultSet = preparedStatement.getGeneratedKeys();\n PetTribble petTribble = new PetTribble();\n if (resultSet.next()) {\n petTribble = getById(resultSet.getInt(1), connection);\n }\n\n if (result != 0) {\n System.out.println(\"Entry was successful\");\n preparedStatement.close();\n return petTribble;\n } else {\n System.out.println(\"ID #: \" + id + \" does not exist or is no longer available.\");\n return new PetTribble();\n }\n } catch (SQLException e) {\n System.out.println(\"Sorry, unable to create the query due to syntax.\");\n return null;\n }\n }\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2977,"cells":{"blob_id":{"kind":"string","value":"941e4d114daa537e6245b16458dc6a15e213a51a"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"jczapiewski/Design-Patterns"},"path":{"kind":"string","value":"/src/main/java/co/devfoundry/designpatterns/command/Main.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":881,"string":"881"},"score":{"kind":"number","value":2.59375,"string":"2.59375"},"int_score":{"kind":"number","value":3,"string":"3"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package co.devfoundry.designpatterns.command;\n\nimport co.devfoundry.designpatterns.command.command.MusicPlayerRemote;\nimport co.devfoundry.designpatterns.command.command.PlayFirstTrack;\nimport co.devfoundry.designpatterns.command.command.PlayNextTrack;\nimport co.devfoundry.designpatterns.command.command.PlayRandomTrack;\n\npublic class Main {\n\n public static void main(String[] args) {\n\n MusicPlayer player = new MusicPlayer();\n MusicPlayerRemote remote = new MusicPlayerRemote();\n remote.setCommand(new PlayFirstTrack(player));\n remote.pressButton();\n remote.setCommand(new PlayNextTrack(player));\n remote.pressButton();\n remote.pressButton();\n remote.pressButton();\n remote.pressButton();\n remote.setCommand(new PlayRandomTrack(player));\n remote.pressButton();\n remote.pressButton();\n }\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2978,"cells":{"blob_id":{"kind":"string","value":"1ef738f32d0fbef2204d575d88ab2878c593dd97"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"GerardoUPM/dsvp-rest"},"path":{"kind":"string","value":"/src/main/java/edu/ctb/upm/midas/client_modules/extraction/wikipedia/texts_extraction/api_response/WikipediaTextsExtractionService.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":763,"string":"763"},"score":{"kind":"number","value":1.921875,"string":"1.921875"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package edu.ctb.upm.midas.client_modules.extraction.wikipedia.texts_extraction.api_response;\n\nimport edu.ctb.upm.midas.model.extraction.wikipedia.texts_extraction.request.Request;\nimport edu.ctb.upm.midas.model.extraction.common.request.RequestJSON;\nimport edu.ctb.upm.midas.model.extraction.common.response.Response;\n\n/**\n * Created by gerardo on 12/02/2018.\n *\n * @author Gerardo Lagunes G. ${EMAIL}\n * @version ${}\n * @project dgsvp-rest\n * @className MayoClinicTextsExtractionService\n * @see\n */\npublic interface WikipediaTextsExtractionService {\n\n Response getTexts(Request request);\n\n Response getResources(Request request);\n\n Response getWikipediaTextsByJSON( RequestJSON request);\n\n Response getWikipediaResourcesByJSON( RequestJSON request);\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2979,"cells":{"blob_id":{"kind":"string","value":"6312c141cb57461dcb34dd632e9bf09054df6e66"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"N-Ibrahimi/Java"},"path":{"kind":"string","value":"/Tree/BinarySearchTree.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":2130,"string":"2,130"},"score":{"kind":"number","value":3.5625,"string":"3.5625"},"int_score":{"kind":"number","value":4,"string":"4"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package binarysearchtree;\n\npublic class tre {\n\tpublic Node root;\n\tpublic int nelms;\n\t\n\tpublic tre(){\n\t\troot = null;\n\t\tnelms = 0;\n\t}\n\t\n\tpublic void display(){\n\t\tinorder(root);\n\t}\n\t\n\tpublic void inorder(Node c){\n\t\tif(c != null){\n\t\t\tinorder(c.left);\n\t\t\tSystem.out.println(c.data);\n\t\t\tinorder(c.right);\n\t\t}\n\t}\n\t\n\tpublic void insertelement(int val){\n\t\tNode newnode = new Node(val);\n\t\tNode cur = root;\n\t\tNode parent = null;\n\t\tif(cur == null){\n\t\t\troot = newnode;\n\t\t}\n\t\twhile(cur != null){\n\t\t\tparent = cur;\n\t\t\tif(newnode.data < cur.data){\n\t\t\t\tcur = cur.left;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcur = cur.right;\n\t\t\t}\n\t\t}\n\t\tif(parent == null){\n\t\t\troot = newnode;\n\t\t}\n\t\telse if(newnode.data < parent.data){\n\t\t\tparent.left = newnode;\n\t\t}\n\t\telse{\n\t\t\tparent.right = newnode;\n\t\t}\n\t\tnelms++;\n\t}\n\t\n\tpublic int successor(Node x){\n\t\tNode cur = root;\n\t\tNode parent = cur;\n\t\twhile(cur.data != x.data){\n\t\t\tparent = cur;\n\t\t\tif(x.data < cur.data){\n\t\t\t\tcur = cur.left;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcur = cur.right;\n\t\t\t}\n\t\t}\n\t\tif(cur.right != null ){\n\t\t\tNode n = cur.right;\n\t\t\twhile(n.left != null && n.data > x.data){\n\t\t\t\tn = n.left;\n\t\t\t}\n\t\t\treturn n.data;\n\t\t}\n\t\treturn parent.data;\n\t}\n\t\n\tpublic int deleteNode(int val){\n\t\tNode cur = root;\n\t\tNode parent = null;\n\t\twhile(cur != null ){\n\t\t\tparent = cur;\n\t\t\tif(val < cur.data && val != cur.data){\n\t\t\t\tcur = cur.left;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcur = cur.right;\n\t\t\t}\n\t\t}\n\t\tcur = root;\n\t\tNode suc = null;\n\t\twhile(cur != null && cur.data != val){\n\t\t\tsuc = cur;\n\t\t}\n\t\tsuc.left = null;\n\t\tsuc.right = null;\n\t\treturn val;\n\t}\n\t\n\t\n\tpublic int totalelements(){\n\t\treturn nelms;\n\t}\n\t\n\tpublic static void main(String[] args){\n\t\ttre btr = new tre();\n\t\tbtr.insertelement(15);\n\t\tbtr.insertelement(6);\n\t\tbtr.insertelement(18);\n\t\tbtr.insertelement(3);\n\t\tbtr.insertelement(7);\n\t\tbtr.insertelement(17);\n\t\tbtr.insertelement(20);\n\t\tbtr.insertelement(2);\n\t\tbtr.insertelement(4);\n\t\tbtr.insertelement(13);\n\t\tbtr.insertelement(9);\n\t\t\n\t\tNode x = new Node(9);\n\t\t//System.out.println(btr.totalelements());\n\t\t//btr.display();\n\t\tSystem.out.println(\"Sucessor \" + btr.successor(x));\n\t\tSystem.out.println(\"deleted element is \" + btr.deleteNode(x.data));\n\t\tbtr.display();\n\t}\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2980,"cells":{"blob_id":{"kind":"string","value":"c34da563f0958bcf773e8a532cee4ad75b2574e0"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"37bhushan/Google-Applied-CS-With-Android-Exercises"},"path":{"kind":"string","value":"/Ghost Single Player/ghost_starter/app/src/main/java/com/google/engedu/ghost/TrieNode.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":1754,"string":"1,754"},"score":{"kind":"number","value":2.953125,"string":"2.953125"},"int_score":{"kind":"number","value":3,"string":"3"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package com.google.engedu.ghost;\n\nimport java.util.LinkedList;\n\n\npublic class TrieNode {\n char content;\n boolean isEnd;\n int count;\n LinkedList childList;\n // private HashMap children;\n //private boolean isWord;\n\n public TrieNode(char c) {\n// children = new HashMap<>();\n// isWord = false;\n childList = new LinkedList();\n isEnd = false;\n content = c;\n count = 0;\n }\n public TrieNode subNode(char c)\n {\n// if (childList != null)\n// for (TrieNode eachChild : childList)\n// if (eachChild.content == c)\n// return eachChild;\n return null;\n }\n public void add(String s) {\n// HashMapchild = this.children;\n// for (int i= 0 ; ichild = this.children;\n// for (int i=0 ;i listItem=null;\n ArrayAdapter adapter=null;\n \n int itemselect=0;\n\n @Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.traditional);\n\n \n list = (ListView) findViewById(R.id.traditional_listView1); \n listItem = SmsFilter.gettfilter(getApplicationContext()); \n adapter = new ArrayAdapter(this,\n \t android.R.layout.simple_list_item_single_choice, listItem);\n \n list.setItemsCanFocus(true);\n list.setChoiceMode(ListView.CHOICE_MODE_SINGLE);\n list.setAdapter(adapter);\n list.setItemChecked(0, true);\n \n list.setOnItemLongClickListener(new ListView.OnItemLongClickListener() {\n\t\t\tpublic boolean onItemLongClick(AdapterView arg0, View arg1,\n\t\t\t\t\tfinal int arg2, long arg3) {\n\t\t\t\tif (arg2==0)\n\t\t\t\t\treturn false;\n\t AlertDialog dlg=new AlertDialog.Builder(TraditionalActivity.this) \n\t .setMessage(\"是否删除该条过滤器?\") \n\t .setPositiveButton(\"确定\", \n\t new DialogInterface.OnClickListener() {\t\t \n\t \tpublic void onClick(DialogInterface dialog, int which) { \n\t \t\tSmsFilter.modifytfilter(getApplicationContext(),listItem.get(arg2),\"\");\n\t \t\tlistItem = SmsFilter.gettfilter(getApplicationContext());\n\t adapter = new ArrayAdapter(TraditionalActivity.this,\n\t \t android.R.layout.simple_list_item_single_choice, listItem); \n\t list.setItemsCanFocus(true);\n\t list.setChoiceMode(ListView.CHOICE_MODE_SINGLE);\n\t list.setAdapter(adapter);\n\t list.setItemChecked(0, true);\n\t \t} \n\t }).setNegativeButton(\"取消\",null).create(); \n\t dlg.show();\n\t\t\t\treturn false;\n\t\t\t}}\n );\n \n \n list.setOnItemClickListener(new ListView.OnItemClickListener(){\n\n\t\t\tpublic void onItemClick(AdapterView arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\titemselect=arg2;\n \t\t\tEditText edittext= (EditText)findViewById(R.id.traditional_editText1);\n \t \tButton button1 = (Button) findViewById(R.id.traditional_button1);\n \t\t\tif(itemselect==0){\n \t\t\t\tbutton1.setText(\"Add\");\n \t\t\t\tedittext.setText(\"\");\n \t\t\t}else{\n \t\t\t\tbutton1.setText(\"Edit\");\n \t\t\t\tedittext.setText(listItem.get(itemselect));\n \t\t\t}\t\t\t\t\n\t\t\t}\n\n \t\n });\n\n \tButton button1 = (Button) findViewById(R.id.traditional_button1);\n \tbutton1.setOnClickListener(new Button.OnClickListener() {\n \t\tpublic void onClick(View arg0) {\n \t\t\tEditText edittext= (EditText)findViewById(R.id.traditional_editText1);\n \t\t\tif(itemselect==0){\n \t\t\t\tSmsFilter.createtfilter(getApplicationContext(),edittext.getText().toString());\n \t\t\t\tedittext.setText(\"\");\n \t\t\t}else{\n \t\tSmsFilter.modifytfilter(getApplicationContext(),listItem.get(itemselect),edittext.getText().toString());\n \t\t\t}\n \t\tlistItem = SmsFilter.gettfilter(getApplicationContext());\n adapter = new ArrayAdapter(TraditionalActivity.this,\n \t android.R.layout.simple_list_item_single_choice, listItem); \n list.setItemsCanFocus(true);\n list.setChoiceMode(ListView.CHOICE_MODE_SINGLE);\n list.setAdapter(adapter);\n list.setItemChecked(itemselect, true);\n \n \t\t}\n \t});\n \t\n }\n \n} "},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2986,"cells":{"blob_id":{"kind":"string","value":"a95e408ee21cbe7b2b41a72fef04f50a526a444e"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"heartforest/yc-case-report"},"path":{"kind":"string","value":"/src/main/java/com/ycmvp/casereport/entity/ccase/TabCaseUser.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":2073,"string":"2,073"},"score":{"kind":"number","value":1.6015625,"string":"1.601563"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package com.ycmvp.casereport.entity.ccase;\n\nimport com.fasterxml.jackson.annotation.JsonFormat;\nimport lombok.Data;\n\nimport java.io.Serializable;\n\n@Data\npublic class TabCaseUser implements Serializable {\n\n private static final long serialVersionUID = 1L;\n\n private String id;\n @JsonFormat(pattern = \"yyyy-MM-dd\", timezone = \"Asia/Shanghai\")\n private java.time.LocalDate caseDate;\n private String userid;\n @JsonFormat(pattern = \"yyyy-MM-dd HH:mm:ss\", timezone = \"Asia/Shanghai\")\n private java.time.LocalDateTime optTime;\n private String strokeDest;\n @JsonFormat(pattern = \"yyyy-MM-dd\", timezone = \"Asia/Shanghai\")\n private java.time.LocalDate strokeDateGo;\n @JsonFormat(pattern = \"yyyy-MM-dd\", timezone = \"Asia/Shanghai\")\n private java.time.LocalDate strokeDateBack;\n private String strokeDescription;\n private String bodySign;\n private String bodycase;\n private String doctorSign;\n private String hospital;\n @JsonFormat(pattern = \"yyyy-MM-dd\", timezone = \"Asia/Shanghai\")\n private java.time.LocalDate doctorTime;\n private String dectorInfo;\n private String caseExplain;\n private String userCity;\n private String userCommunity;\n private String userBuilding;\n private String userCallCommunity;\n private String touchingSign;\n private String strokeVia;\n private String userMeet;\n private String userPubPlace;\n private String bodyTemperature;\n private String isolationTag;\n @JsonFormat(pattern = \"yyyy-MM-dd\", timezone = \"Asia/Shanghai\")\n private java.time.LocalDate isolationDate;\n @JsonFormat(pattern = \"yyyy-MM-dd\", timezone = \"Asia/Shanghai\")\n private java.time.LocalDate unisolationDate;\n private String isolationStatus;\n private String isolationDescription;\n private String workStatus;\n private Integer epidemicCommunityCount;\n private String strandedSign;\n private String examineName;\n @JsonFormat(pattern = \"yyyy-MM-dd HH:mm:ss\", timezone = \"Asia/Shanghai\")\n private java.time.LocalDateTime examineTime;\n private String examineUserid;\n\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2987,"cells":{"blob_id":{"kind":"string","value":"cc7d6821e6ded993496d9f9037a2699bfa6d6956"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"sufadi/decompile-hw"},"path":{"kind":"string","value":"/decompile/app/HwSystemManager/src/main/java/com/huawei/harassmentinterception/engine/HwEngineCallerManager.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":780,"string":"780"},"score":{"kind":"number","value":2.53125,"string":"2.53125"},"int_score":{"kind":"number","value":3,"string":"3"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package com.huawei.harassmentinterception.engine;\n\npublic class HwEngineCallerManager {\n private static HwEngineCallerManager sInstance = null;\n private HwEngineCaller mCaller = null;\n\n public static synchronized HwEngineCallerManager getInstance() {\n HwEngineCallerManager hwEngineCallerManager;\n synchronized (HwEngineCallerManager.class) {\n if (sInstance == null) {\n sInstance = new HwEngineCallerManager();\n }\n hwEngineCallerManager = sInstance;\n }\n return hwEngineCallerManager;\n }\n\n public synchronized HwEngineCaller getEngineCaller() {\n return this.mCaller;\n }\n\n public synchronized void setEngineCaller(HwEngineCaller caller) {\n this.mCaller = caller;\n }\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2988,"cells":{"blob_id":{"kind":"string","value":"22eabad34cbe221e96c473c388374c23a61307a4"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"ZYYBOSS/1"},"path":{"kind":"string","value":"/shop/src/main/java/com/java2/web/entity/AddressEntity.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":1048,"string":"1,048"},"score":{"kind":"number","value":2.4375,"string":"2.4375"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package com.java2.web.entity;\n\nimport javax.persistence.Entity;\nimport javax.persistence.FetchType;\nimport javax.persistence.GeneratedValue;\nimport javax.persistence.GenerationType;\nimport javax.persistence.Id;\nimport javax.persistence.JoinColumn;\nimport javax.persistence.ManyToOne;\nimport javax.persistence.Table;\n\nimport com.fasterxml.jackson.annotation.JsonIgnore;\n\n@Entity\n@Table(name = \"address\")\npublic class AddressEntity {\n\t@Id\n\t@GeneratedValue(strategy = GenerationType.IDENTITY)\n\tprivate Long id;\n\t\n\tprivate String address;\n\t\n\t@ManyToOne(fetch=FetchType.EAGER)\n\t@JoinColumn(name=\"user_id\")\n\t//忽略某个元素,不加会死循环不停读取list\n\t@JsonIgnore\n\tprivate UserEntity userEntity;\n\n\tpublic Long getId() {\n\t\treturn id;\n\t}\n\n\tpublic void setId(Long id) {\n\t\tthis.id = id;\n\t}\n\n\tpublic String getAddress() {\n\t\treturn address;\n\t}\n\n\tpublic void setAddress(String address) {\n\t\tthis.address = address;\n\t}\n\n\tpublic UserEntity getUser() {\n\t\treturn userEntity;\n\t}\n\n\tpublic void setUser(UserEntity user) {\n\t\tthis.userEntity = user;\n\t}\n\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2989,"cells":{"blob_id":{"kind":"string","value":"f61ce7a57e17cb7ed8e255e8ecd2e874f5bce022"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"borisemoreno/mutant-hunter"},"path":{"kind":"string","value":"/src/main/java/com/xmen/mutanthunter/repository/DnaVerificationsRepository.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":711,"string":"711"},"score":{"kind":"number","value":2.015625,"string":"2.015625"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package com.xmen.mutanthunter.repository;\n\nimport com.xmen.mutanthunter.model.StatsDto;\nimport com.xmen.mutanthunter.model.db.DnaVerifications;\nimport org.springframework.data.jpa.repository.Query;\nimport org.springframework.data.repository.CrudRepository;\n\nimport java.util.List;\nimport java.util.Optional;\nimport java.util.UUID;\n\npublic interface DnaVerificationsRepository extends CrudRepository {\n @Query(value = \"FROM DnaVerifications d where d.dna = ?1\")\n Optional findByDna(String dna);\n\n @Query(value = \"select new com.xmen.mutanthunter.model.StatsDto(count(d.id), d.mutant) from DnaVerifications d group by d.mutant\")\n List getStats();\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2990,"cells":{"blob_id":{"kind":"string","value":"f70231ac285caaa27e82019bccaba7aa5bb46500"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"crashtheparty/EnchantmentSolution"},"path":{"kind":"string","value":"/src/org/ctp/enchantmentsolution/events/player/PlayerChangeCoordsEvent.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":992,"string":"992"},"score":{"kind":"number","value":2.359375,"string":"2.359375"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package org.ctp.enchantmentsolution.events.player;\n\nimport org.bukkit.Location;\nimport org.bukkit.entity.Player;\nimport org.bukkit.event.Cancellable;\nimport org.bukkit.event.HandlerList;\nimport org.bukkit.event.player.PlayerEvent;\n\npublic class PlayerChangeCoordsEvent extends PlayerEvent implements Cancellable {\n\n\tprivate static final HandlerList handlers = new HandlerList();\n\n\tpublic static HandlerList getHandlerList() {\n\t\treturn handlers;\n\t}\n\n\t@Override\n\tpublic HandlerList getHandlers() {\n\t\treturn handlers;\n\t}\n\n\tprivate final Location fromLoc, toLoc;\n\tprivate boolean cancelled;\n\n\tpublic PlayerChangeCoordsEvent(Player who, Location fromLoc, Location toLoc) {\n\t\tsuper(who);\n\t\tthis.fromLoc = fromLoc;\n\t\tthis.toLoc = toLoc;\n\t}\n\n\tpublic Location getFrom() {\n\t\treturn fromLoc;\n\t}\n\n\tpublic Location getTo() {\n\t\treturn toLoc;\n\t}\n\n\t@Override\n\tpublic boolean isCancelled() {\n\t\treturn cancelled;\n\t}\n\n\t@Override\n\tpublic void setCancelled(boolean cancelled) {\n\t\tthis.cancelled = cancelled;\n\t}\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2991,"cells":{"blob_id":{"kind":"string","value":"92ca27b7fc5d40a15533c8c7cda385de7f326d3e"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"AlessioMercuriali/QBorrow"},"path":{"kind":"string","value":"/src/main/java/it/quix/academy/qborrow/core/model/QborrowUserContext.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":1746,"string":"1,746"},"score":{"kind":"number","value":2.03125,"string":"2.03125"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package it.quix.academy.qborrow.core.model;\r\n\r\nimport java.util.ArrayList;\r\n\r\nimport it.quix.framework.core.model.Language;\r\nimport it.quix.framework.core.model.Organization;\r\nimport it.quix.framework.core.model.Role;\r\nimport it.quix.framework.core.model.User;\r\nimport it.quix.framework.core.model.UserContext;\r\nimport it.quix.puma.core.PumaFinderException;\r\n\r\n/**\r\n * Inserire all'interno di questa classe le proprieta' e i metodi\r\n * che si vogliono associare all'utente dell'applicazione\r\n */\r\npublic class QborrowUserContext extends UserContext {\r\n\r\n private static final long serialVersionUID = 1L;\r\n\r\n public QborrowUserContext() {\r\n super();\r\n }\r\n\r\n @Override\r\n public Boolean authCodeLogin(String arg0) throws PumaFinderException {\r\n // TODO Auto-generated method stub\r\n return null;\r\n }\r\n\r\n @Override\r\n public String getCodCompany() {\r\n // TODO Auto-generated method stub\r\n return null;\r\n }\r\n\r\n @Override\r\n public Language getLanguageForSysAttribute() {\r\n // TODO Auto-generated method stub\r\n return null;\r\n }\r\n\r\n @Override\r\n public Organization getOrganizationForSysSysAttribute() {\r\n // TODO Auto-generated method stub\r\n return null;\r\n }\r\n\r\n @Override\r\n public void login(String user) throws Exception {\r\n final String userId = user;\r\n User userMode1 = new User() {\r\n\r\n public String getPassword() {\r\n return null;\r\n }\r\n\r\n public String getName() {\r\n return null;\r\n }\r\n\r\n public String getDn() {\r\n return null;\r\n }\r\n };\r\n super.login(userMode1, new ArrayList());\r\n }\r\n\r\n}\r\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2992,"cells":{"blob_id":{"kind":"string","value":"3c0101add0450a9356180da8d2bc85b0a533906b"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"Tongqinwei/hhlab_ser2"},"path":{"kind":"string","value":"/src/com/servlet/CreateSessionServlet.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":4125,"string":"4,125"},"score":{"kind":"number","value":2.53125,"string":"2.53125"},"int_score":{"kind":"number","value":3,"string":"3"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package com.servlet;\n\n\nimport com.Login.Bean.SessionUser;\nimport com.Login.Handler.MyJsonParser;\nimport com.Login.Handler.WechatSessionHandler;\nimport com.Login.Sessions.SessionManager;\nimport com.google.gson.JsonElement;\nimport com.google.gson.JsonObject;\n\nimport javax.servlet.ServletException;\nimport javax.servlet.annotation.WebServlet;\nimport javax.servlet.http.HttpServlet;\nimport javax.servlet.http.HttpServletRequest;\nimport javax.servlet.http.HttpServletResponse;\nimport java.io.*;\n\n/**\n * Created by lee on 2017/6/17.\n *\n * @author: lee\n * create time: 下午1:43\n */\n@WebServlet(name = \"CreateSessionServlet\")\npublic class CreateSessionServlet extends HttpServlet {\n\n public static String getBody(HttpServletRequest request) throws IOException {\n // get the body of the request object to a string\n\n String body = null;\n StringBuilder stringBuilder = new StringBuilder();\n BufferedReader bufferedReader = null;\n\n try {\n InputStream inputStream = request.getInputStream();\n if (inputStream != null) {\n bufferedReader = new BufferedReader(new InputStreamReader(inputStream));\n char[] charBuffer = new char[128];\n int bytesRead = -1;\n while ((bytesRead = bufferedReader.read(charBuffer)) > 0) {\n stringBuilder.append(charBuffer, 0, bytesRead);\n }\n } else {\n stringBuilder.append(\"\");\n }\n } catch (IOException ex) {\n throw ex;\n } finally {\n if (bufferedReader != null) {\n try {\n bufferedReader.close();\n } catch (IOException ex) {\n throw ex;\n }\n }\n }\n\n body = stringBuilder.toString();\n return body;\n }\n\n\n protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n // get the request pay load\n String session_code = getBody(request);\n\n // get response writer\n Writer out = response.getWriter();\n response.setContentType(\"application/json\");\n\n if(!session_code.contentEquals(\"\")){\n // if the code is not send return the error json\n session_code = MyJsonParser.CodeJsonToString(session_code);\n log(\"receive session code from js is \" + session_code);\n\n if(session_code.contentEquals(\"\")){\n// failed to parse\n out.write(MyJsonParser.GetSessionError());\n } else {\n// session code get success\n\n String result = WechatSessionHandler.getSessionKey(session_code);\n log(\"receive from weChat server \" + result);\n JsonObject jsonObject = MyJsonParser.String2Json(result);\n\n JsonElement element = jsonObject.get(\"openid\");\n\n if(element != null){\n // 成功调用到微信的状态,为用户建立一个session 对象 方便进行管理\n log(\"receive session key success! \");\n\n SessionUser user = new SessionUser();\n\n element = jsonObject.get(\"openid\");\n user.setOpenID(element.getAsString());\n\n element = jsonObject.get(\"session_key\");\n user.setSessionKey(element.getAsString());\n\n SessionManager manager = SessionManager.getInstance();\n manager.AddUser(user);\n // 返回成功的json\n out.write(MyJsonParser.GetSessionSuccess(user.getSessionID(),user.getOpenID()));\n\n } else {\n out.write(MyJsonParser.GetSessionError());\n }\n }\n\n } else {\n out.write(MyJsonParser.GetSessionError());\n }\n\n out.flush();\n response.flushBuffer();\n }\n\n protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n response.sendError(404);\n }\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2993,"cells":{"blob_id":{"kind":"string","value":"262f3d6cf9a076d9e3bc0f90afd3600c23c76fed"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"RaviThejaGoud/hospital"},"path":{"kind":"string","value":"/hms-common/src/main/java/com/hyniva/sms/ws/vo/cashbook/CashBookVO.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":5044,"string":"5,044"},"score":{"kind":"number","value":2.0625,"string":"2.0625"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package com.hyniva.sms.ws.vo.cashbook;\r\n\r\nimport java.util.Date;\r\n\r\n \r\npublic class CashBookVO {\r\n\t\r\n\tpublic long id;\r\n\tpublic Date transactionDate;\r\n\tpublic long accountId;\r\n\tpublic String accountName;\r\n\tpublic String place;\t\r\n\tpublic String narration;\r\n\tpublic String vocherNumber;\r\n\tpublic String transactionType;\r\n\tpublic double amount;\r\n\t/*This are dummy variables to manipulate trail balance sheet */\r\n\tpublic double crAmount;\r\n\tpublic String crTtransactionType;\r\n\tpublic String transactionDateStr;\r\n\tpublic long clientId;\r\n\tpublic String entryType;\r\n\t/*C - Cash, D - DD , CH - Cheque, BD - Bank Deposit*/\r\n protected String paymentType;\r\n\tprotected String branchName;\r\n protected String chequeNumber;\r\n protected String ddNumber;\r\n protected long bankId;\r\n protected String bookType;\r\n protected String transactionNumber;\r\n protected String accountNumber;\r\n \r\n \r\n\tpublic String getAccountNumber() {\r\n\t\treturn accountNumber;\r\n\t}\r\n\r\n\tpublic void setAccountNumber(String accountNumber) {\r\n\t\tthis.accountNumber = accountNumber;\r\n\t}\r\n\r\n\tpublic String getTransactionNumber() {\r\n\t\treturn transactionNumber;\r\n\t}\r\n\r\n\tpublic void setTransactionNumber(String transactionNumber) {\r\n\t\tthis.transactionNumber = transactionNumber;\r\n\t}\r\n\r\n\tpublic String getBookType() {\r\n\t\treturn bookType;\r\n\t}\r\n\r\n\tpublic void setBookType(String bookType) {\r\n\t\tthis.bookType = bookType;\r\n\t}\r\n \r\n\tpublic String getPaymentType() {\r\n\t\treturn paymentType;\r\n\t}\r\n\tpublic void setPaymentType(String paymentType) {\r\n\t\tthis.paymentType = paymentType;\r\n\t}\r\n\tpublic String getBranchName() {\r\n\t\treturn branchName;\r\n\t}\r\n\tpublic void setBranchName(String branchName) {\r\n\t\tthis.branchName = branchName;\r\n\t}\r\n\tpublic String getChequeNumber() {\r\n\t\treturn chequeNumber;\r\n\t}\r\n\tpublic void setChequeNumber(String chequeNumber) {\r\n\t\tthis.chequeNumber = chequeNumber;\r\n\t}\r\n\tpublic String getDdNumber() {\r\n\t\treturn ddNumber;\r\n\t}\r\n\tpublic void setDdNumber(String ddNumber) {\r\n\t\tthis.ddNumber = ddNumber;\r\n\t}\r\n\tpublic long getBankId() {\r\n\t\treturn bankId;\r\n\t}\r\n\tpublic void setBankId(long bankId) {\r\n\t\tthis.bankId = bankId;\r\n\t}\r\n\tpublic String getEntryType() {\r\n\t\treturn entryType;\r\n\t}\r\n\tpublic void setEntryType(String entryType) {\r\n\t\tthis.entryType = entryType;\r\n\t}\r\n\tpublic double getCrAmount() {\r\n\t\treturn crAmount;\r\n\t}\r\n\tpublic void setCrAmount(double crAmount) {\r\n\t\tthis.crAmount = crAmount;\r\n\t}\r\n\tpublic String getCrTtransactionType() {\r\n\t\treturn crTtransactionType;\r\n\t}\r\n\tpublic void setCrTtransactionType(String crTtransactionType) {\r\n\t\tthis.crTtransactionType = crTtransactionType;\r\n\t}\r\n\t/**\r\n\t * @return the id\r\n\t */\r\n\tpublic long getId() {\r\n\t\treturn id;\r\n\t}\r\n\t/**\r\n\t * @param id the id to set\r\n\t */\r\n\tpublic void setId(long id) {\r\n\t\tthis.id = id;\r\n\t}\r\n\t/**\r\n\t * @return the transactionDate\r\n\t */\r\n\tpublic Date getTransactionDate() {\r\n\t\treturn transactionDate;\r\n\t}\r\n\t/**\r\n\t * @param transactionDate the transactionDate to set\r\n\t */\r\n\tpublic void setTransactionDate(Date transactionDate) {\r\n\t\tthis.transactionDate = transactionDate;\r\n\t}\r\n\t/**\r\n\t * @return the accountNumber\r\n\t */\r\n\tpublic long getAccountId() {\r\n\t\treturn accountId;\r\n\t}\r\n\t/**\r\n\t * @param accountNumber the accountNumber to set\r\n\t */\r\n\tpublic void setAccountId(long accountId) {\r\n\t\tthis.accountId = accountId;\r\n\t}\r\n\t/**\r\n\t * @return the accountName\r\n\t */\r\n\tpublic String getAccountName() {\r\n\t\treturn accountName;\r\n\t}\r\n\t/**\r\n\t * @param accountName the accountName to set\r\n\t */\r\n\tpublic void setAccountName(String accountName) {\r\n\t\tthis.accountName = accountName;\r\n\t}\r\n\t/**\r\n\t * @return the place\r\n\t */\r\n\tpublic String getPlace() {\r\n\t\treturn place;\r\n\t}\r\n\t/**\r\n\t * @param place the place to set\r\n\t */\r\n\tpublic void setPlace(String place) {\r\n\t\tthis.place = place;\r\n\t}\r\n\t/**\r\n\t * @return the narration\r\n\t */\r\n\tpublic String getNarration() {\r\n\t\treturn narration;\r\n\t}\r\n\t/**\r\n\t * @param narration the narration to set\r\n\t */\r\n\tpublic void setNarration(String narration) {\r\n\t\tthis.narration = narration;\r\n\t}\r\n\t/**\r\n\t * @return the vocherNumber\r\n\t */\r\n\tpublic String getVocherNumber() {\r\n\t\treturn vocherNumber;\r\n\t}\r\n\t/**\r\n\t * @param vocherNumber the vocherNumber to set\r\n\t */\r\n\tpublic void setVocherNumber(String vocherNumber) {\r\n\t\tthis.vocherNumber = vocherNumber;\r\n\t}\r\n\t/**\r\n\t * @return the transactionType\r\n\t */\r\n\tpublic String getTransactionType() {\r\n\t\treturn transactionType;\r\n\t}\r\n\t/**\r\n\t * @param transactionType the transactionType to set\r\n\t */\r\n\tpublic void setTransactionType(String transactionType) {\r\n\t\tthis.transactionType = transactionType;\r\n\t}\r\n\t/**\r\n\t * @return the amount\r\n\t */\r\n\tpublic double getAmount() {\r\n\t\treturn amount;\r\n\t}\r\n\t/**\r\n\t * @param amount the amount to set\r\n\t */\r\n\tpublic void setAmount(double amount) {\r\n\t\tthis.amount = amount;\r\n\t}\r\n\tpublic String getTransactionDateStr() {\r\n\t\treturn transactionDateStr;\r\n\t}\r\n\tpublic void setTransactionDateStr(String transactionDateStr) {\r\n\t\tthis.transactionDateStr = transactionDateStr;\r\n\t}\r\n\tpublic long getClientId() {\r\n\t\treturn clientId;\r\n\t}\r\n\tpublic void setClientId(long clientId) {\r\n\t\tthis.clientId = clientId;\r\n\t}\r\n\t\r\n\t\r\n\t\r\n}\r\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2994,"cells":{"blob_id":{"kind":"string","value":"59398b63fca8b3539348ae17e36bcdba7c46c0a5"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"damnedGod/Indonesia_Que"},"path":{"kind":"string","value":"/app/src/main/java/com/example/android/indonesiaqu/WelcomeScreen.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":989,"string":"989"},"score":{"kind":"number","value":1.96875,"string":"1.96875"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package com.example.android.indonesiaqu;\n\nimport android.content.Intent;\nimport android.content.pm.ActivityInfo;\nimport android.support.v7.app.AppCompatActivity;\nimport android.os.Bundle;\nimport android.view.View;\nimport android.widget.Button;\n\npublic class WelcomeScreen extends AppCompatActivity {\n\n public Button startButton;\n\n public void init(){\n\n startButton=(Button)findViewById(R.id.start_button);\n startButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n Intent tombol = new Intent(WelcomeScreen.this,MainActivity.class);\n\n startActivity(tombol);\n\n }\n });\n\n }\n\n\n\n\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_welcome_screen);\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n\n init();\n }\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2995,"cells":{"blob_id":{"kind":"string","value":"5bbc4efeb38b44b45db9b25d57478c9a851e01b7"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"drmmx/MVPAndroidLang"},"path":{"kind":"string","value":"/app/src/main/java/com/example/dev3rema/mvpandroidlang/data/source/local/dao/LangDao.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":754,"string":"754"},"score":{"kind":"number","value":2.0625,"string":"2.0625"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package com.example.dev3rema.mvpandroidlang.data.source.local.dao;\n\nimport android.arch.persistence.room.Dao;\nimport android.arch.persistence.room.Delete;\nimport android.arch.persistence.room.Insert;\nimport android.arch.persistence.room.OnConflictStrategy;\nimport android.arch.persistence.room.Query;\n\nimport com.example.dev3rema.mvpandroidlang.data.entity.Lang;\n\nimport java.util.List;\n\n@Dao\npublic interface LangDao {\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void saveLang(Lang lang);\n\n @Insert\n void insertAll(Lang... langs);\n\n @Delete\n void deleteLang(Lang lang);\n\n @Query(\"SELECT * FROM android_lang\")\n List getLangs();\n\n @Query(\"SELECT * FROM android_lang WHERE id = :id\")\n Lang getLangById(int id);\n}"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2996,"cells":{"blob_id":{"kind":"string","value":"de7ba2c8db5d7c0f53b60242f402b3f824230e81"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"cckmit/event-manager"},"path":{"kind":"string","value":"/src/main/java/ob1/eventmanager/service/CategoryService.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":325,"string":"325"},"score":{"kind":"number","value":1.8046875,"string":"1.804688"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package ob1.eventmanager.service;\n\nimport ob1.eventmanager.entity.CategoryEntity;\n\nimport java.util.List;\nimport java.util.Optional;\n\npublic interface CategoryService {\n\n List getCategories();\n\n Optional getById(long id);\n\n Optional getCategoryByName(String name);\n\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2997,"cells":{"blob_id":{"kind":"string","value":"726a2cec437874e8812ce969422aae9596ce8562"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"uNouss/ap"},"path":{"kind":"string","value":"/td8/Morpion.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":6947,"string":"6,947"},"score":{"kind":"number","value":2.84375,"string":"2.84375"},"int_score":{"kind":"number","value":3,"string":"3"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"//import extensions.*;\n\nclass Morpion extends Program {\n final int TAILLE = 5;\n final char O = 'O';\n final char X = 'X';\n final char V = ' ';\n\n final String PROMPT = \"$: \";\n\n char [][] grille = new char[TAILLE][TAILLE];\n\n void testInitalize(){\n initialize();\n char[][] grilleVide = new char[TAILLE][];\n for(int idxL = 0; idxL < length(grilleVide, 1); idxL++){\n grilleVide[idxL] = new char[length(grilleVide, 1)];\n for(int idxC = 0; idxC < length(grilleVide[idxL]); idxC++){\n grilleVide[idxL][idxC] = V;\n }\n }\n assertArrayEquals(grilleVide, grille);\n }\n\n void initialize(){\n for(int idxL = 0; idxL < length(grille, 1); idxL++)\n for(int idxC = 0; idxC < length(grille, 2); idxC++)\n grille[idxL][idxC] = V;\n }\n\n void testSet(){\n set(1, 2, O);\n assertEquals(O, grille[1][2]);\n set(1, 1, X);\n assertEquals(X, grille[1][1]);\n set(2, 2, O);\n assertEquals(O, grille[2][2]);\n }\n\n void set(int idxL, int idxC, char car){\n grille[idxL][idxC] = car;\n }\n\n void testIsAlignement(){\n initialize();\n set(0,0,X);\n set(1,1,X);\n set(2,2,X);\n //println();printGrid();\n assertTrue(isAlignement());\n\n initialize();\n set(0,2,O);\n set(1,1,O);\n set(2,0,O);\n //println();printGrid();\n assertTrue(isAlignement());\n\n initialize();\n set(0,2,O);\n set(0,1,O);\n set(0,0,O);\n //println();printGrid();\n assertTrue(isAlignement());\n\n initialize();\n set(0,2,O);\n set(1,2,O);\n set(2,2,O);\n //println();printGrid();\n assertTrue(isAlignement());\n\n initialize();\n set(0,2,O);\n set(1,2,X);\n set(2,2,O);\n //println();printGrid();\n assertFalse(isAlignement());\n }\n\n boolean isAlignement(){\n char current, next = V, nextNext = V;\n for(int idxL = 0; idxL < length(grille,1); idxL++){\n for(int idxC = 0; idxC < length(grille,2); idxC++){\n current = grille[idxL][idxC];\n if(current != V){\n if(idxL+1 < length(grille, 1)){\n next = grille[idxL+1][idxC];\n if(idxL+2 < length(grille, 1)){\n nextNext = grille[idxL+2][idxC];\n if( current == next && next == nextNext) return true;\n }\n }\n if(idxC+1 < length(grille, 2)){\n next = grille[idxL][idxC+1];\n if(idxC+2 < length(grille, 2)){\n nextNext = grille[idxL][idxC+2];\n if( current == next && next == nextNext) return true;\n }\n }\n if(idxL+1 < length(grille,1) && idxC+1 < length(grille, 2)){\n next = grille[idxL+1][idxC+1];\n if(idxL+2 < length(grille, 1) && idxC+2 < length(grille, 2)){\n nextNext = grille[idxL+2][idxC+2];\n if( current == next && next == nextNext) return true;\n }\n }\n if(idxL+1 < length(grille,1) && idxC-1 >= 0){\n next = grille[idxL+1][idxC-1];\n if(idxL+2 < length(grille,1) && idxC-2 >= 0){\n nextNext = grille[idxL+2][idxC-2];\n if( current == next && next == nextNext) return true;\n }\n }\n //if( current == next && next == nextNext) return true;\n }\n }\n }\n return false;\n }\n\n\n void testIsFilled(){\n initialize();\n char[][] uneGrille = new char[TAILLE][];\n for(int idxL = 0; idxL < length(uneGrille, 1); idxL++){\n uneGrille[idxL] = new char[length(uneGrille, 1)];\n for(int idxC = 0; idxC < length(uneGrille[idxL]); idxC++){\n uneGrille[idxL][idxC] = ((int)(random()*2)==1)?O:X;\n }\n }\n grille = uneGrille;\n println();printGrid();\n assertTrue(isFilled());\n initialize();\n assertFalse(isFilled());\n set(2,0,O);\n assertFalse(isFilled());\n grille = uneGrille;\n set(1,1,V);\n assertFalse(isFilled());\n }\n boolean isFilled(){\n for(int idxL = 0; idxL < length(grille, 1); idxL++)\n for(int idxC = 0; idxC < length(grille, 2); idxC++)\n if(grille[idxL][idxC] == V) return false;\n return true;\n }\n\n void testSwap(){\n assertEquals('X', swap('O'));\n assertEquals('O', swap('X'));\n }\n\n char swap(char c){\n return ( c == X) ? O: X;\n }\n\n void printGrid(){\n afficherEntete(length(grille, 2));\n for(int idxL = 0; idxL < length(grille, 1); idxL++){\n afficheSeparateur(length(grille, 2));\n for(int idxC = 0; idxC < length(grille, 2); idxC++){\n //print(grille[idxL][idxC] + \" \");\n print(String.format(\"|%3s\", grille[idxL][idxC]+\" \"));\n }\n println(\"| \" + idxL);\n }\n afficheSeparateur(length(grille,1));\n println();\n }\n\n void afficherEntete(int n){\n for (int i = 0; i < n; i++){\n print(\" \"+i+\" \");\n }\n println(\" \");\n }\n void afficheSeparateur(int n) {\n for (int i = 0; i < n; i++){\n print(\"+---\");\n }\n println(\"+\");\n }\n // verification de la valider du jeu\n boolean isValid(int row, int col){\n return row >= 0 && row < length(grille, 1) && col >= 0 && col < length(grille, 2) && grille[row][col] == V;\n }\n\n void jouer(char player){\n int row;\n int col;\n do{\n print(\"JOUEUR_[\" + player + \"] , num_case [1; \" + (TAILLE*TAILLE) + \"] : \");\n int numCase = readInt();// utiliser la division et le modulo pour trouver les coordonnées\n row = (numCase - 1)/length(grille, 1);\n col = (numCase - 1) % length(grille, 1);\n //est-ce que je peux jouer à cette case ?\n }while(!isValid(row, col));\n set(row, col, player);\n }\n\n void algorithm(){\n initialize();\n //Image ihm = newImage(640,640);\n char player = ((int)(random()*2)==1)?O:X; // tirage au sort du debutant\n do{\n printGrid();\n jouer(player);\n player = swap(player);\n }while(!isFilled() && ! isAlignement());\n printGrid();\n //show(ihm);\n //readString();\n if(isAlignement()) println(swap(player) + \" gagne\"); // il faut swaper pour avoir le bon gagnant ?\n else println(\"match nul\");\n }\n\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2998,"cells":{"blob_id":{"kind":"string","value":"240b8456dfee29cbaf53bcf7e5b7283b0ea48565"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"busipallavi-reddy/cmpe202"},"path":{"kind":"string","value":"/lab8/inputmask/src/main/java/CreditCardNum.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":813,"string":"813"},"score":{"kind":"number","value":2.71875,"string":"2.71875"},"int_score":{"kind":"number","value":3,"string":"3"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"/* (c) Copyright 2018 Paul Nguyen. All Rights Reserved */\n\npublic class CreditCardNum implements IDisplayComponent, IKeyEventHandler\n{\n\n\tprivate IKeyEventHandler nextHandler ;\n\tprivate IDisplayFormatter number = new CardNumDisplayDecorator(new DisplayFormatter()) ;\n\n public void setNext( IKeyEventHandler next) {\n \tthis.nextHandler = next ;\n }\t\n\n\tpublic String display() {\n \treturn number.display();\n\t}\t\n\n\tpublic void key(String ch, int cnt) {\n\t\tif ( cnt <= 16 )\n\t\t\tnumber.addKey(ch);\n\t\telse if ( nextHandler != null )\n\t\t\tnextHandler.key(ch, cnt) ;\n\t}\n\n\t@Override\n\tpublic void removeKey(int cnt) {\n\t\tif (cnt <= 15) {\n\t\t\tnumber.removeLastKey();\n\t\t} else if ( nextHandler != null ) {\n\t\t\tnextHandler.removeKey(cnt);\n\t\t}\n\t}\n\n\tpublic void addSubComponent( IDisplayComponent c ) {\n\t\treturn ; // do nothing\n\t}\n\n}"},"download_success":{"kind":"bool","value":true,"string":"true"}}},{"rowIdx":2999,"cells":{"blob_id":{"kind":"string","value":"9d0c45c674013ca9f57e689762c32ce971b3fe30"},"language":{"kind":"string","value":"Java"},"repo_name":{"kind":"string","value":"Leirach/BdDPF"},"path":{"kind":"string","value":"/app/src/main/java/itesm/mx/bddpf/TicketAdapter.java"},"src_encoding":{"kind":"string","value":"UTF-8"},"length_bytes":{"kind":"number","value":1369,"string":"1,369"},"score":{"kind":"number","value":2.421875,"string":"2.421875"},"int_score":{"kind":"number","value":2,"string":"2"},"detected_licenses":{"kind":"list like","value":[],"string":"[]"},"license_type":{"kind":"string","value":"no_license"},"text":{"kind":"string","value":"package itesm.mx.bddpf;\n\nimport android.content.Context;\nimport android.support.annotation.NonNull;\nimport android.support.annotation.Nullable;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.ArrayAdapter;\nimport android.widget.TextView;\n\nimport java.text.SimpleDateFormat;\nimport java.util.ArrayList;\n\npublic class TicketAdapter extends ArrayAdapter {\n public TicketAdapter(Context context, ArrayList tickets) {\n super(context, 0, tickets);\n }\n\n @NonNull\n @Override\n public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {\n Ticket ticket = getItem(position);\n convertView = LayoutInflater.from(getContext()).inflate(R.layout.row_tickets, parent, false);\n TextView tvTicket = convertView.findViewById(R.id.text_ticket);\n TextView tvPassenger = convertView.findViewById(R.id.text_passenger);\n TextView tvReservation = convertView.findViewById(R.id.text_reservation);\n TextView tvPrice = convertView.findViewById(R.id.text_price);\n\n tvPassenger.setText(ticket.getPassenger());\n tvPrice.setText(Double.toString(ticket.getPrice()));\n tvTicket.setText(ticket.getTicketNumber());\n tvReservation.setText(ticket.getReservation());\n return convertView;\n }\n}\n"},"download_success":{"kind":"bool","value":true,"string":"true"}}}],"truncated":false,"partial":false},"paginationData":{"pageIndex":29,"numItemsPerPage":100,"numTotalItems":44990155,"offset":2900,"length":100}},"jwt":"eyJhbGciOiJFZERTQSJ9.eyJyZWFkIjp0cnVlLCJwZXJtaXNzaW9ucyI6eyJyZXBvLmNvbnRlbnQucmVhZCI6dHJ1ZX0sImlhdCI6MTc1ODA3MjQ4OCwic3ViIjoiL2RhdGFzZXRzL2hvbmdsaXU5OTAzL3N0YWNrX2VkdV9qYXZhIiwiZXhwIjoxNzU4MDc2MDg4LCJpc3MiOiJodHRwczovL2h1Z2dpbmdmYWNlLmNvIn0.51ipdEtg8lmhO-zSsMvEZ3A2V3O4EDlx0ET1gxL052-Q4K4UIw1MwyWi5URLBF7_rJt0d1C2HwZXLkriSKUCDA","displayUrls":true},"discussionsStats":{"closed":0,"open":0,"total":0},"fullWidth":true,"hasGatedAccess":true,"hasFullAccess":true,"isEmbedded":false,"savedQueries":{"community":[],"user":[]}}">
blob_id
stringlengths
40
40
language
stringclasses
1 value
repo_name
stringlengths
5
132
path
stringlengths
2
382
src_encoding
stringclasses
34 values
length_bytes
int64
9
3.8M
score
float64
1.5
4.94
int_score
int64
2
5
detected_licenses
listlengths
0
142
license_type
stringclasses
2 values
text
stringlengths
9
3.8M
download_success
bool
1 class
87e87a209012452c78ede2fd6c7bb40ef32e725a
Java
iosdouble/support-admin
/ruoyi-admin/src/main/java/com/zk/web/controller/kaquan/WxkqLaunchCardController.java
UTF-8
2,730
1.960938
2
[ "MIT" ]
permissive
package com.zk.web.controller.kaquan; import com.zk.common.core.controller.BaseController; import com.zk.common.core.domain.AjaxResult; import com.zk.common.utils.http.HttpClientUtil; import com.zk.common.utils.json.JsonUtil; import com.zk.system.domain.weixin.accesstoken.AccessToken; import com.zk.system.domain.weixin.accesstoken.WeixinGetToken; import com.zk.system.domain.weixin.domain.bean.entity.CardItem; import com.zk.system.domain.weixin.domain.req.CardShopRsq; import org.aspectj.weaver.loadtime.Aj; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RestController; import java.util.ArrayList; import java.util.List; /** * @Classname WxkqLaunchCardController * @Description TODO 投放卡券相关内容 * @Date 2020/8/18 6:25 PM * @Created by nihui * @Version 1.0 * @Description WxkqLaunchCardController @see ruoyi */ @RestController public class WxkqLaunchCardController extends BaseController { @Autowired private WeixinGetToken weixinGetToken; /** * 生成微信卡券货架 */ @PostMapping("/initCardShop") public AjaxResult createCardShop(){ AccessToken token = weixinGetToken.getToken(); String url = "https://api.weixin.qq.com/card/landingpage/create?access_token=" + token.getAccess_token(); CardShopRsq cardShopRsq = new CardShopRsq(); cardShopRsq.setBanner("http://mmbiz.qpic.cn/mmbiz_png/B3zBXUpXXBX3y9ibfqWvN7NerZ86CtjT960IjMMOaiaEaNHjBPBicaGo6tMtIn0rqUJp4wuR24PjcO5WgLbNlJORQ/0"); cardShopRsq.setCan_share(true); cardShopRsq.setPage_title("普惠服务"); cardShopRsq.setScene("SCENE_NEAR_BY"); CardItem cardItem = new CardItem("pWHBzsx2ZPlC64IvXYe9t4iKNwm0","null"); CardItem cardItem1 = new CardItem("pWHBzsyP1l8p7_Szp15SH5nv3UC4","null"); CardItem cardItem2 = new CardItem("pWHBzs9bUHwU56R8idTgwyV62gXM","null"); CardItem cardItem3 = new CardItem("pWHBzs5NLhP0MYMn4Ia1IUdrbN6s","null"); List<CardItem> cardItemList = new ArrayList<>(); cardItemList.add(cardItem); cardItemList.add(cardItem1); cardItemList.add(cardItem2); cardItemList.add(cardItem3); cardShopRsq.setCard_list(cardItemList); String s = HttpClientUtil.sendPostJsonBody(url, JsonUtil.toJson(cardShopRsq)); System.out.println(s); return AjaxResult.success("OK"); } /** * 获取到微信页面方式展示的卡券列表 */ @GetMapping("/getCardList") public AjaxResult getSelfCardShopList(){ return AjaxResult.success("OK"); } }
true
6ced87ca328e6e647beb348cdbf980bc27ebaa43
Java
miqreh/pandocreondivinae
/src/vue/VueTexte.java
UTF-8
671
2.59375
3
[]
no_license
package vue; import java.awt.Color; import javax.swing.BoxLayout; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextArea; import modele.Partie; public class VueTexte extends JPanel{ private Partie partie; private JScrollPane jsp; public VueTexte(Partie partie){ this.setLayout(new BoxLayout(this,BoxLayout.Y_AXIS)); this.partie=partie; jsp = new JScrollPane(); this.add(jsp); } public Partie getPartie() { return partie; } public void setPartie(Partie partie) { this.partie = partie; } public JScrollPane getJsp() { return jsp; } public void setJsp(JScrollPane jsp) { this.jsp = jsp; } }
true
6333fd7fdae0847624a7557be6b7d9cac3e13b01
Java
camilomolina/plcbus-app
/src/common/src/main/java/cl/bennu/plcbus/common/domain/MovementActionDetail.java
UTF-8
998
2.15625
2
[]
no_license
package cl.bennu.plcbus.common.domain; import cl.bennu.plcbus.common.enums.MovementActionTypeEnum; /** * Created with IntelliJ IDEA. * User: _Camilo * Date: 08-07-13 * Time: 08:41 AM */ public class MovementActionDetail extends BaseDomain { private MovementAction movementAction; private Device device; private MovementActionTypeEnum movementActionTypeEnum; public MovementAction getMovementAction() { return movementAction; } public void setMovementAction(MovementAction movementAction) { this.movementAction = movementAction; } public Device getDevice() { return device; } public void setDevice(Device device) { this.device = device; } public MovementActionTypeEnum getMovementActionTypeEnum() { return movementActionTypeEnum; } public void setMovementActionTypeEnum(MovementActionTypeEnum movementActionTypeEnum) { this.movementActionTypeEnum = movementActionTypeEnum; } }
true
7bf408494b42713b6370fd00c86c0a57b841815a
Java
skltp-anpassningstjanster/riv.insuranceprocess.healthreporting.ForsakringskassanAdapterService
/FkEintygAdapterIC-validator/src/main/java/se/skl/skltpservices/adapter/fk/sendmedcertanswer/VardRequest2FkValidator.java
UTF-8
5,108
1.859375
2
[]
no_license
/** * Copyright (c) 2014 Inera AB, <http://inera.se/> * * This file is part of SKLTP. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ package se.skl.skltpservices.adapter.fk.sendmedcertanswer; import static se.skl.skltpservices.adapter.fk.util.ValidatorUtil.getValidationErrors; import static se.skl.skltpservices.adapter.fk.util.ValidatorUtil.validateAdressVard; import static se.skl.skltpservices.adapter.fk.util.ValidatorUtil.validateLakarutlatande; import java.util.ArrayList; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import se.inera.ifv.insuranceprocess.healthreporting.qa.v1.Amnetyp; import se.inera.ifv.insuranceprocess.healthreporting.qa.v1.LakarutlatandeEnkelType; import se.inera.ifv.insuranceprocess.healthreporting.qa.v1.VardAdresseringsType; import se.inera.ifv.insuranceprocess.healthreporting.sendmedicalcertificateanswerresponder.v1.AnswerToFkType; import se.inera.ifv.insuranceprocess.healthreporting.sendmedicalcertificateanswerresponder.v1.SendMedicalCertificateAnswerType; public class VardRequest2FkValidator { private final Logger logger = LoggerFactory.getLogger(getClass()); public void validateRequest(SendMedicalCertificateAnswerType parameters) throws Exception { // List of validation errors ArrayList<String> validationErrors = new ArrayList<String>(); // Validate incoming request try { // Check that we got any data at all if (parameters == null) { validationErrors.add("No SendMedicalCertificateAnswer found in incoming data!"); throw new Exception(); } // Check that we got an answer element if (parameters.getAnswer() == null) { validationErrors.add("No Answer element found in incoming request data!"); throw new Exception(); } AnswerToFkType inAnswer = parameters.getAnswer(); /** * Check meddelande data + lakarutlatande reference */ // Meddelande id vården - mandatory if (inAnswer.getVardReferensId() == null || inAnswer.getVardReferensId().length() < 1) { validationErrors.add("No vardReferens-id found!"); } // Meddelande id FK - mandatory if (inAnswer.getFkReferensId() == null || inAnswer.getFkReferensId().length() < 1) { validationErrors.add("No fkReferens-id found!"); } // Ämne - mandatory Amnetyp inAmne = inAnswer.getAmne(); if (inAmne == null) { validationErrors.add("No Amne element found!"); } /** * Check that we got a question */ if (inAnswer.getFraga() == null) { validationErrors.add("No Answer fraga element found!"); throw new Exception(); } if (inAnswer.getFraga().getMeddelandeText() == null || inAnswer.getFraga().getMeddelandeText().length() < 1) { validationErrors.add("No Answer fraga meddelandeText elements found or set!"); } if (inAnswer.getFraga().getSigneringsTidpunkt() == null) { validationErrors.add("No Answer fraga signeringsTidpunkt elements found or set!"); } /** * Check that we got an answer */ if (inAnswer.getSvar() == null) { validationErrors.add("No Answer svar element found!"); throw new Exception(); } if (inAnswer.getSvar().getMeddelandeText() == null || inAnswer.getSvar().getMeddelandeText().length() < 1) { validationErrors.add("No Answer svar meddelandeText elements found or set!"); } if (inAnswer.getSvar().getSigneringsTidpunkt() == null) { validationErrors.add("No Answer svar signeringsTidpunkt elements found or set!"); } // Avsänt tidpunkt - mandatory if (inAnswer.getAvsantTidpunkt() == null) { validationErrors.add("No or wrong avsantTidpunkt found!"); } LakarutlatandeEnkelType inLakarUtlatande = inAnswer.getLakarutlatande(); validateLakarutlatande(validationErrors, inLakarUtlatande); /** * Check avsändar data. */ VardAdresseringsType inAddressVard = inAnswer.getAdressVard(); validateAdressVard(validationErrors, inAddressVard); // Check if we got any validation errors that not caused an // Exception if (validationErrors.size() > 0) { logger.error("Validate exception:" + getValidationErrors(validationErrors)); throw new Exception(); } // No validation errors! } catch (Exception e) { throw new Exception(getValidationErrors(validationErrors)); } } }
true
f65ae33f62857dcb645e130b13c15db309ed7935
Java
lastfreeacc/try-event-proc
/consumer/src/main/java/ru/lastfreeacc/consumer/Runner.java
UTF-8
705
2.0625
2
[]
no_license
package ru.lastfreeacc.consumer; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class Runner implements CommandLineRunner { private final LogConsumer logConsumer; @Autowired public Runner(LogConsumer logConsumer) { this.logConsumer = logConsumer; } public static void main(String[] args) { SpringApplication.run(Runner.class, args); } @Override public void run(String... args) throws Exception { logConsumer.consume(); } }
true
2df6281fa602a22f0c491ab25553ab4ac0db7b55
Java
RomainChrfz/GestionBudgetApp
/app/src/main/java/fr/romaincharfaz/mapremiereapp/controleur/Dashboard.java
UTF-8
17,856
1.648438
2
[ "MIT" ]
permissive
package fr.romaincharfaz.mapremiereapp.controleur; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.ListPopupWindow; import androidx.core.content.ContextCompat; import androidx.lifecycle.Observer; import androidx.lifecycle.ViewModelProvider; import androidx.recyclerview.widget.ItemTouchHelper; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import android.content.Intent; import android.graphics.Canvas; import android.graphics.Color; import android.os.Build; import android.os.Bundle; import android.text.SpannableString; import android.text.Spanned; import android.text.style.ForegroundColorSpan; import android.view.LayoutInflater; import android.view.View; import android.widget.AdapterView; import android.widget.EditText; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.NumberPicker; import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; import com.google.android.material.bottomsheet.BottomSheetDialog; import com.google.android.material.snackbar.Snackbar; import java.util.ArrayList; import java.util.Calendar; import java.util.List; import fr.romaincharfaz.mapremiereapp.R; import fr.romaincharfaz.mapremiereapp.model.Gain; import fr.romaincharfaz.mapremiereapp.view.CategoryAdapter; import fr.romaincharfaz.mapremiereapp.view.CategoryItem; import fr.romaincharfaz.mapremiereapp.view.GainAdapter; import fr.romaincharfaz.mapremiereapp.view.GainViewModel; import it.xabaras.android.recyclerview.swipedecorator.RecyclerViewSwipeDecorator; import static java.lang.Math.abs; public class Dashboard extends AppCompatActivity { public static final String CURRENT_LIVRET = "fr.romaincharfaz.mapremiereapp.controleur.Dashboard.CURRENT_LIVRET"; public static final String CURRENT_LIVRET_NAME = "fr.romaincharfaz.mapremiereapp.controleur.Dashboard.CURRENT_LIVRET_NAME"; public static final String CURRENT_USER = "fr.romaincharfaz.mapremiereapp.controleur.Dashboard.CURRENT_USER"; private GainViewModel gainViewModel; private ArrayList<CategoryItem> mCategoryList; public static boolean edit; public static boolean expense; public static int categoryselected = 0; private Gain deletedGain; private Gain modifiedGain; private long currentLivret; private String currentUser; private TextView perc_txt; private ProgressBar progressBar; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //requestWindowFeature(1); //getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); //getWindow().setStatusBarColor(Color.TRANSPARENT); setContentView(R.layout.activity_dashboard); Intent intent = getIntent(); currentUser = intent.getStringExtra(CURRENT_USER); currentLivret = intent.getLongExtra(CURRENT_LIVRET,-1); String currentLivretName = intent.getStringExtra(CURRENT_LIVRET_NAME); setTitle(currentLivretName); initList(); perc_txt = findViewById(R.id.txt_percentage); progressBar = findViewById(R.id.progressBar); ImageView add_expense = findViewById(R.id.add_expense_btn); ImageView add_income = findViewById(R.id.add_income_btn); add_expense.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { edit = false; expense = true; categoryselected = 0; Gain gainclicked = new Gain(0.0,"",0,0,0,0,"",0,""); bottomsheetconfiguration(gainclicked); } }); add_income.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { edit = false; expense = false; categoryselected = 10; Gain gainclicked = new Gain(0.0,"",0,0,0,0,"",0,""); bottomsheetconfiguration(gainclicked); } }); final RecyclerView recyclerView_expense = findViewById(R.id.recycler_expense); recyclerView_expense.setLayoutManager(new LinearLayoutManager(this)); recyclerView_expense.setHasFixedSize(true); final RecyclerView recyclerView_income = findViewById(R.id.recycler_income); recyclerView_income.setLayoutManager(new LinearLayoutManager(this)); //recyclerView_income.setHasFixedSize(true); final GainAdapter adapter_expense = new GainAdapter(); final GainAdapter adapter_income = new GainAdapter(); recyclerView_income.setAdapter(adapter_income); adapter_income.setOnItemClickListener(new GainAdapter.OnItemClickListener() { @Override public void OnItemClick(int position) { Gain gainclicked = adapter_income.getGainAt(position); edit = true; expense = false; categoryselected = gainclicked.getCategory(); bottomsheetconfiguration(gainclicked); } @Override public void OnCatClick(int position, View view) { } }); recyclerView_expense.setAdapter(adapter_expense); adapter_expense.setOnItemClickListener(new GainAdapter.OnItemClickListener() { @Override public void OnItemClick(int position) { Gain gainclicked = adapter_expense.getGainAt(position); edit = true; expense = true; categoryselected = gainclicked.getCategory(); bottomsheetconfiguration(gainclicked); } @Override public void OnCatClick(int position, View view) { modifiedGain = adapter_expense.getGainAt(position); showPopup(view); } }); gainViewModel = new ViewModelProvider(Dashboard.this).get(GainViewModel.class); gainViewModel.getAllGains(currentLivret,currentUser).observe(this, new Observer<List<Gain>>() { @Override public void onChanged(List<Gain> gains) { List<Gain> gain_pos = new ArrayList<>(); List<Gain> gain_neg = new ArrayList<>(); for (int i=0; i<gains.size(); i++) { Gain currentGain = gains.get(i); if (currentGain.getGainValue() >= 0) { gain_pos.add(currentGain); }else { gain_neg.add(currentGain); } } adapter_expense.submitList(gain_neg); adapter_income.submitList(gain_pos); total_calcul(gains); } }); new ItemTouchHelper((new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT) { @Override public boolean onMove(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder, @NonNull RecyclerView.ViewHolder target) { return false; } @Override public void onSwiped(@NonNull RecyclerView.ViewHolder viewHolder, int direction) { int position = viewHolder.getAdapterPosition(); switch (direction) { case ItemTouchHelper.LEFT : deletedGain = adapter_expense.getGainAt(position); gainViewModel.delete(deletedGain); Snackbar.make(recyclerView_expense, getString(R.string.expense_deleted), Snackbar.LENGTH_LONG).setAction(getString(R.string.undo), new View.OnClickListener() { @Override public void onClick(View v) { gainViewModel.insert(deletedGain); } }).show(); break; } } @Override public void onChildDraw(@NonNull Canvas c, @NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder, float dX, float dY, int actionState, boolean isCurrentlyActive) { new RecyclerViewSwipeDecorator.Builder(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive) .addSwipeLeftBackgroundColor(ContextCompat.getColor(Dashboard.this,R.color.red)) .addSwipeLeftActionIcon(R.drawable.ic_delete_sweep_white) .addSwipeLeftLabel(getString(R.string.delete)) .setSwipeLeftLabelColor(Color.WHITE) .create() .decorate(); super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive); } })).attachToRecyclerView(recyclerView_expense); new ItemTouchHelper((new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT) { @Override public boolean onMove(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder, @NonNull RecyclerView.ViewHolder target) { return false; } @Override public void onSwiped(@NonNull RecyclerView.ViewHolder viewHolder, int direction) { int position = viewHolder.getAdapterPosition(); switch (direction) { case ItemTouchHelper.LEFT : deletedGain = adapter_income.getGainAt(position); gainViewModel.delete(deletedGain); Snackbar.make(recyclerView_income, getString(R.string.expense_deleted), Snackbar.LENGTH_LONG).setAction(getString(R.string.undo), new View.OnClickListener() { @Override public void onClick(View v) { gainViewModel.insert(deletedGain); } }).show(); break; } } @Override public void onChildDraw(@NonNull Canvas c, @NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder, float dX, float dY, int actionState, boolean isCurrentlyActive) { new RecyclerViewSwipeDecorator.Builder(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive) .addSwipeLeftBackgroundColor(ContextCompat.getColor(Dashboard.this,R.color.red)) .addSwipeLeftActionIcon(R.drawable.ic_delete_sweep_white) .addSwipeLeftLabel(getString(R.string.delete)) .setSwipeLeftLabelColor(Color.WHITE) .create() .decorate(); super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive); } })).attachToRecyclerView(recyclerView_income); } //@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) private void showPopup(View view) { final ListPopupWindow listPopupWindow = new ListPopupWindow(this); initList(); CategoryAdapter mAdapter = new CategoryAdapter(this, mCategoryList); listPopupWindow.setAdapter(mAdapter); listPopupWindow.setAnchorView(view); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { listPopupWindow.setBackgroundDrawable(getDrawable(R.drawable.custom_spinner)); } listPopupWindow.setContentWidth(800); listPopupWindow.setModal(true); listPopupWindow.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { try { Gain gain = new Gain(modifiedGain.getGainValue(), modifiedGain.getDescription(), modifiedGain.getDay(), modifiedGain.getMonth(), modifiedGain.getYear(), position, modifiedGain.getUrlJustif(), modifiedGain.getUserId(), modifiedGain.getUsernameId()); gain.setId(modifiedGain.getId()); gainViewModel.update(gain); listPopupWindow.dismiss(); }catch (Exception e){ Toast.makeText(Dashboard.this, e.toString(), Toast.LENGTH_LONG).show(); } } }); listPopupWindow.show(); } private void initList() { mCategoryList = new ArrayList<>(); mCategoryList.add(new CategoryItem(getString(R.string.cat_base), R.drawable.ic_cat_unknown)); mCategoryList.add(new CategoryItem(getString(R.string.cat_courses), R.drawable.ic_cat_courses)); mCategoryList.add(new CategoryItem(getString(R.string.cat_fuel), R.drawable.ic_cat_fuel)); mCategoryList.add(new CategoryItem(getString(R.string.cat_gift), R.drawable.ic_cat_gift)); mCategoryList.add(new CategoryItem(getString(R.string.cat_phone), R.drawable.ic_cat_phone)); mCategoryList.add(new CategoryItem(getString(R.string.cat_transport_commun), R.drawable.ic_cat_transport_commun)); mCategoryList.add(new CategoryItem(getString(R.string.cat_trip), R.drawable.ic_cat_trip)); mCategoryList.add(new CategoryItem(getString(R.string.cat_diy), R.drawable.ic_cat_diy)); mCategoryList.add(new CategoryItem(getString(R.string.cat_cinema), R.drawable.ic_cat_cinema)); mCategoryList.add(new CategoryItem(getString(R.string.cat_restaurant), R.drawable.ic_cat_restaurant)); } private void bottomsheetconfiguration(final Gain gainclicked) { final BottomSheetDialog bottomSheetDialog = new BottomSheetDialog(Dashboard.this, R.style.BottomSheetDialogTheme); final View bottomSheetView = LayoutInflater.from(getApplicationContext()).inflate(R.layout.layout_bottom_sheet, (LinearLayout) findViewById(R.id.bottom_sheet_container)); final NumberPicker day = bottomSheetView.findViewById(R.id.day_picker); final EditText mDescription = bottomSheetView.findViewById(R.id.et_description); final EditText mValue = bottomSheetView.findViewById(R.id.et_valeur); day.setFormatter(new NumberPicker.Formatter() { @Override public String format(int value) { return String.format("%02d",value); } }); final NumberPicker month = bottomSheetView.findViewById(R.id.month_picker); final NumberPicker year = bottomSheetView.findViewById(R.id.year_picker); final String[] months = new String[]{"jan.","fév.","mar.","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."}; day.setMinValue(1); day.setMaxValue(31); month.setDisplayedValues(months); month.setMinValue(0); month.setMaxValue(months.length-1); year.setMinValue(1789); year.setMaxValue(2100); Calendar c = Calendar.getInstance(); if(edit) { day.setValue(gainclicked.getDay()); month.setValue(gainclicked.getMonth()); year.setValue(gainclicked.getYear()); mDescription.setText(gainclicked.getDescription()); mValue.setText(String.valueOf(abs(gainclicked.getGainValue()))); }else { day.setValue(c.get(Calendar.DAY_OF_MONTH)); month.setValue(c.get(Calendar.MONTH)); year.setValue(c.get(Calendar.YEAR)); } bottomSheetView.findViewById(R.id.btn_valider).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String description = mDescription.getText().toString().trim(); String value = mValue.getText().toString().trim(); if (description.isEmpty() || value.isEmpty()) { Toast.makeText(Dashboard.this,"Ces champs ne peuvent pas être vide",Toast.LENGTH_SHORT).show(); return; } double nvalue = Double.parseDouble(value); if (expense) { nvalue = - nvalue; } Gain newGain = new Gain(nvalue, description, day.getValue(), month.getValue(),year.getValue(),categoryselected, "", currentLivret,currentUser); if (edit) { newGain.setId(gainclicked.getId()); gainViewModel.update(newGain); }else{ gainViewModel.insert(newGain); } bottomSheetDialog.dismiss(); } }); bottomSheetDialog.setContentView(bottomSheetView); bottomSheetDialog.show(); } private void total_calcul(List<Gain> totgain) { double tot = 0.0; double pos = 0.0; for (int i=0; i<totgain.size(); i++) { double val = totgain.get(i).getGainValue(); tot += val; if(val >= 0.0) { pos += val; } } tot = Math.round(tot * 100d) / 100d; pos = Math.round(pos * 100d) / 100d; int percentage = (int) (tot*100/pos); String tot_ss = String.valueOf(tot); SpannableString ss = new SpannableString(tot_ss); if (tot >= 0) { ForegroundColorSpan fcsg = new ForegroundColorSpan(Color.GREEN); ss.setSpan(fcsg,0,tot_ss.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); }else { ForegroundColorSpan fcsr = new ForegroundColorSpan(Color.RED); ss.setSpan(fcsr,0,tot_ss.length(),Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); } progressBar.setProgress(percentage); perc_txt.setText("Reste : " + ss + " | " + percentage + " %"); } }
true
a3933edd5890e96f2ce4d0d9be6e13e3ff1a90c8
Java
abdelmonaimsalhaoui/Java_Revision
/RuntimePolymorphism/src/example/OverloadingError.java
UTF-8
510
2.984375
3
[]
no_license
package example; public class OverloadingError { public static void aMethod(byte a) { System.out.println("byte"); } public static void aMethod(short b) { System.out.println("short"); } public static void aMethod(double c) { System.out.println("double"); } public static void aMethod(int a, long b) { System.out.println("int, long"); } public static void aMethod(long a, int b) { System.out.println("long, int"); } public static void main(String[] args) { aMethod(9); } }
true
5fc3423427950000258c3f3d63485e74bdccd6c7
Java
AaronMelcher/IndividualWork
/src/objectOrientedProgramming/GreeterTest.java
UTF-8
245
2.9375
3
[]
no_license
package objectOrientedProgramming; public class GreeterTest { public static void main(String[] args) { // TODO Auto-generated method stub Greeter bob = new Greeter(); bob.setAge(99); System.out.print(bob.getAge()); } }
true
88e9f71a936e871a1c65d14ba665683085862c83
Java
CocoaK/java-project-source
/smarthome-web_lqh/src/main/java/com/biencloud/smarthome/web/log/service/impl/ClientLogServiceImpl.java
UTF-8
3,974
1.929688
2
[]
no_license
package com.biencloud.smarthome.web.log.service.impl; import java.util.Date; import java.util.List; import com.biencloud.smarthome.web.base.service.BaseService; import com.biencloud.smarthome.web.common.util.DateTimeUtil; import com.biencloud.smarthome.web.common.util.MapUtil; import com.biencloud.smarthome.web.common.vo.PagingVO; import com.biencloud.smarthome.web.hdfstask.vo.HdfsTaskVO; import com.biencloud.smarthome.web.log.service.IClientLogService; import com.biencloud.smarthome.web.log.vo.ClientLogVO; import com.biencloud.smarthome.web.wsclient.stub.ClientLog; import com.biencloud.smarthome.web.wsclient.stub.Paging; /** * * 类名称:ClientLogServiceImpl 类描述:终端日志业务接口实现类 * * @author: kouy * @version: 0.1 * @date: 2012-7-24 下午4:15:52 */ public class ClientLogServiceImpl extends BaseService<ClientLogVO> implements IClientLogService { @Override public PagingVO<ClientLogVO> queryClientLogForPaging(int pageNum, int pageSize, ClientLogVO clientLogVO) { PagingVO<ClientLogVO> pv = new PagingVO<ClientLogVO>(); MapUtil.clearMap(); String hql = null; List<Object> list = null; if (clientLogVO != null) { if (!"".equals(clientLogVO.getDataType()) && clientLogVO.getDataType() != null) { MapUtil.addKeyValueToMap("dataType like", "%"+ clientLogVO.getDataType().trim().replace("%", "\\%").replace("_", "\\_") + "%"); } if (!"".equals(clientLogVO.getAreaName()) && clientLogVO.getAreaName() != null) { MapUtil.addKeyValueToMap("areaName like", "%" + clientLogVO.getAreaName().trim().replace("%", "\\%").replace("_", "\\_") + "%"); } if (!"".equals(clientLogVO.getDeviceName())&& clientLogVO.getDeviceName() != null) { MapUtil.addKeyValueToMap("deviceName like", "%" + clientLogVO.getDeviceName().trim().replace("%", "\\%").replace("_", "\\_") + "%"); } if (!"".equals(clientLogVO.getDeviceMac()) && clientLogVO.getDeviceMac() != null) { MapUtil.addKeyValueToMap("deviceMac like", "%" + clientLogVO.getDeviceMac().trim().replace("%", "\\%").replace("_", "\\_") + "%"); } if (!"".equals(clientLogVO.getDeviceNo()) && clientLogVO.getDeviceNo() != null) { MapUtil.addKeyValueToMap("deviceNo like", "%" + clientLogVO.getDeviceNo().trim().replace("%", "\\%").replace("_", "\\_") + "%"); } if (!"".equals(clientLogVO.getIp()) && clientLogVO.getIp() != null) { MapUtil.addKeyValueToMap("ip like", "%" + clientLogVO.getIp().trim().replace("%", "\\%").replace("_", "\\_") + "%"); } hql = MapUtil.covertMapKeyToCondition(); list = MapUtil.covertMapValueToObjectList(); } pv = this.queryClientLogForPaging(pageNum, pageSize, hql, "addTime", "desc", list); return pv; } /** * * 方法的描述: 分页查询 * @author: kouy * @version: 0.1 * @date: 2012-7-24 下午4:23:48 * @param pageNum * @param pageSize * @param condition * @param orderString * @param orderBy * @param conditionValue * @return */ public PagingVO<ClientLogVO> queryClientLogForPaging(int pageNum, int pageSize, String condition, String orderString, String orderBy, List<Object> conditionValue) { String order = null; if (orderString != null && orderBy != null) { order = " order by " + orderString + " " + orderBy; } Paging paging = getSmartHomeService().queryClientLogForPaging(pageNum, pageSize, condition, order, conditionValue); PagingVO<ClientLogVO> pv = super.convertToPagingVO(paging, "addTime"); return pv; } @Override public ClientLogVO queryClientLogById(Long id) { ClientLogVO clv=null; ClientLog cl=getSmartHomeService().queryClientLogById(id); if(cl!=null) { clv=new ClientLogVO(cl.getId(), cl.getDeviceNo(), cl.getDeviceMac(), cl.getDeviceName(), cl.getDataType(), cl.getDataContent(),DateTimeUtil.convertXMLGregorianCalendarToDate(cl.getAddTime(), "yyyy-MM-dd HH:mm:ss"), cl.getIp(), cl.getAreaName(),cl.getLaunch()); } return clv; } }
true
6619f6d92698b63f5fd728610ad13d83a8428ea1
Java
crismdq22/Compiler
/src/CodigoIntermedio/ConvertidorAssembler.java
UTF-8
7,476
2.578125
3
[]
no_license
package CodigoIntermedio; import java.io.BufferedWriter; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import AnalizadorLexico.TablaSimbolos; public class ConvertidorAssembler { public static final String labelDivCero = "LabelDivCero"; public static final String labelOverflow = "LabelOverflow"; public static final String labelFueraRango = "LabelIndiceFueraDeRango"; private String archivo; static ControladorTercetos controladorTercetos; static TablaSimbolos tablaSimb; static File arch; public ConvertidorAssembler( ControladorTercetos controladorTercetos ) throws IOException { ConvertidorAssembler.controladorTercetos = controladorTercetos; tablaSimb = null; } public void setTablaSimb(TablaSimbolos tablaSimb) { ConvertidorAssembler.tablaSimb = tablaSimb; } public void setArchivo(String archivo) { this.archivo=archivo; } public void generarAssembler () throws IOException{ arch = new File(archivo.substring(0,archivo.length()-4)+".asm"); writeFile1(); String comc = "cmd /c .\\masm32\\bin\\ml /c /Zd /coff"+archivo.substring(0,archivo.length()-4)+ ".asm"; Process ptasm32 = Runtime.getRuntime().exec(comc); ptasm32.getInputStream(); String coml = "cmd /c \\masm32\\bin\\Link /SUBSYSTEM:CONSOLE"+archivo.substring(0,archivo.length()-4)+".obj "; Process ptlink32 = Runtime.getRuntime().exec(coml); ptlink32.getInputStream(); } public static void writeFile1() throws IOException { FileOutputStream fos = new FileOutputStream(arch); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(fos)); bw.write(".386" + System.lineSeparator() + ".model flat, stdcall" + System.lineSeparator() + "option casemap :none" + System.lineSeparator() + "include \\masm32\\include\\windows.inc" + System.lineSeparator() + "include \\masm32\\include\\kernel32.inc" + System.lineSeparator() + "include \\masm32\\include\\user32.inc" + System.lineSeparator() + "includelib \\masm32\\lib\\kernel32.lib" + System.lineSeparator() + "includelib \\masm32\\lib\\user32.lib" + System.lineSeparator() + "include \\masm32\\include\\masm32rt.inc"+ System.lineSeparator() + "dll_dllcrt0 PROTO C"+ System.lineSeparator() + "printf PROTO C :VARARG"+ System.lineSeparator() +".data" + System.lineSeparator()); String data = tablaSimb.getAssembler() ; data = data + "@param DWORD ?"+System.lineSeparator(); data = data + "@retI DW ?"+System.lineSeparator(); data = data + "@retD QWORD ?"+System.lineSeparator(); data = data + "@printI DWORD ?"+System.lineSeparator(); data = data + "@printD QWORD ?"+System.lineSeparator(); data = data + "@maxD QWORD 1.7976931348623157D308"+System.lineSeparator(); data = data + "@minD QWORD 2.2250738585072014D-308"+System.lineSeparator(); data = data + controladorTercetos.getPrintsAssembler(); data = data + "DividirCero db \"Error al dividir por cero!\", 0" + System.lineSeparator(); data = data + "errorOverflow db \"Se produce overflow en una multiplicacion\", 0" + System.lineSeparator(); data = data + "FueraRango db \"Se intento acceder a una posicion de coleccion fuera de rango!\", 0" + System.lineSeparator(); data = data + "estado DW ? "+System.lineSeparator(); data = data + System.lineSeparator() + ".code"+ System.lineSeparator(); bw.write( data ); //Inicia el codigo String code = "start:" + System.lineSeparator() + (String) controladorTercetos.generarAssembler(); code = code + "invoke ExitProcess, 0" + System.lineSeparator(); bw.write( code ); String errores = getErroresRunTime(); bw.write(errores); bw.write( "end start" ); bw.close(); } private static String getErroresRunTime() { StringBuilder errores =new StringBuilder(labelDivCero + ":" + System.lineSeparator()); errores.append( "invoke MessageBox, NULL, addr DividirCero, addr DividirCero, MB_OK" + System.lineSeparator()); errores.append("invoke ExitProcess, 0" + System.lineSeparator()); errores.append(labelOverflow + ":" + System.lineSeparator()); errores.append("invoke MessageBox, NULL, addr errorOverflow, addr errorOverflow, MB_OK" + System.lineSeparator()); errores.append("invoke ExitProcess, 0" + System.lineSeparator()); errores.append(labelFueraRango + ":" + System.lineSeparator()); errores.append("invoke MessageBox, NULL, addr FueraRango, addr FueraRango, MB_OK" + System.lineSeparator()); errores.append( "invoke ExitProcess, 0" + System.lineSeparator()); errores.append("@FUNCTION_FirstI:"+System.lineSeparator() +"MOV EAX, @param"+System.lineSeparator() +"MOV CX, [EAX+2]"+System.lineSeparator() +"MOV @retI, CX"+System.lineSeparator() +"RET"+System.lineSeparator()); errores.append("@FUNCTION_FirstD:"+System.lineSeparator() +"MOV EAX, @param"+System.lineSeparator() +"FLD QWORD PTR [EAX+8]"+System.lineSeparator() +"FSTP @retD"+System.lineSeparator() +"RET"+System.lineSeparator()); errores.append( "@FUNCTION_LastI:"+System.lineSeparator() +"CALL @FUNCTION_LengthI"+System.lineSeparator() +"MOV AX, @retI"+System.lineSeparator() +"MOVZX EAX, AX"+System.lineSeparator() +"IMUL EAX, 2"+System.lineSeparator() +"ADD EAX, @param"+System.lineSeparator() +"MOV CX, [EAX]"+System.lineSeparator() +"MOV @retI, CX"+System.lineSeparator() +"RET"+System.lineSeparator()); errores.append("@FUNCTION_LastD:"+System.lineSeparator() +"CALL @FUNCTION_LengthD"+System.lineSeparator() +"MOV AX, @retI"+System.lineSeparator() +"MOVZX EAX, AX"+System.lineSeparator() +"IMUL EAX, 8"+System.lineSeparator() +"ADD EAX, @param"+System.lineSeparator() +"FLD QWORD PTR [EAX]"+System.lineSeparator() +"FSTP @retD"+System.lineSeparator() +"RET"+System.lineSeparator()); errores.append("@FUNCTION_LengthI:"+System.lineSeparator()+ "MOV EAX, @param"+System.lineSeparator() +"MOV CX, [EAX]"+System.lineSeparator() +"MOV @retI, CX"+System.lineSeparator() +"RET"+System.lineSeparator()); errores.append("@FUNCTION_LengthD:"+System.lineSeparator()+ "MOV EAX, @param"+System.lineSeparator() + "FLD QWORD PTR [EAX]"+System.lineSeparator() +"FISTP @retI"+System.lineSeparator() +"RET"+System.lineSeparator()); errores.append("@FUNCTION_MulCheck:"+System.lineSeparator()); errores.append("FTST "+System.lineSeparator()); errores.append("FSTSW estado "+System.lineSeparator()); errores.append("MOV AX,estado "+System.lineSeparator()); errores.append("SAHF "+System.lineSeparator()); errores.append("JE LabelZero"+System.lineSeparator()); errores.append("FABS"+System.lineSeparator()); errores.append("FCOM @maxD"+System.lineSeparator()); errores.append("FSTSW estado "+System.lineSeparator()); errores.append("MOV AX,estado "+System.lineSeparator()); errores.append("SAHF "+System.lineSeparator()); errores.append("JA "+ ConvertidorAssembler.labelOverflow+ System.lineSeparator()); errores.append("FCOM @minD"+System.lineSeparator()); errores.append("FSTSW estado "+System.lineSeparator()); errores.append("MOV AX,estado "+System.lineSeparator()); errores.append("SAHF "+System.lineSeparator()); errores.append("JB "+ ConvertidorAssembler.labelOverflow+ System.lineSeparator()); errores.append("LabelZero:"+System.lineSeparator()); errores.append("FCOMPP"+System.lineSeparator()); errores.append("RET"+System.lineSeparator()); return errores.toString(); } }
true
2afa279f71ca41f282416a8468d7cbb39e024db9
Java
AlvaroZapata/Dominos
/src/main/java/pizzas/propertyeditors/IngredientePropertyEditor.java
UTF-8
609
2.359375
2
[]
no_license
package pizzas.propertyeditors; import java.beans.PropertyEditorSupport; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import pizzas.modelo.entidades.Ingredientes; import pizzas.modelo.repositorio.IngredienteRepositorio; @Component public class IngredientePropertyEditor extends PropertyEditorSupport{ @Autowired private IngredienteRepositorio repo; @Override public void setAsText(String text) { long idIngrediente = Long.parseLong(text); Ingredientes ingrediente = repo.findOne(idIngrediente); setValue(ingrediente); } }
true
054edb561203d10028787cb762a7bcbadde45105
Java
Celicath/CopycatMod
/src/main/java/TheCopycat/cards/monster/SummonMonsterCard.java
UTF-8
6,288
2.078125
2
[ "MIT" ]
permissive
package TheCopycat.cards.monster; import TheCopycat.CopycatModMain; import TheCopycat.actions.SummonCopycatMinionAction; import TheCopycat.friendlyminions.MirrorMinion; import TheCopycat.utils.GameLogicUtils; import TheCopycat.utils.MonsterCardMoveInfo; import basemod.AutoAdd; import basemod.helpers.TooltipInfo; import com.megacrit.cardcrawl.actions.animations.TalkAction; import com.megacrit.cardcrawl.cards.AbstractCard; import com.megacrit.cardcrawl.characters.AbstractPlayer; import com.megacrit.cardcrawl.core.AbstractCreature; import com.megacrit.cardcrawl.core.CardCrawlGame; import com.megacrit.cardcrawl.localization.CardStrings; import com.megacrit.cardcrawl.monsters.AbstractMonster; import com.megacrit.cardcrawl.monsters.beyond.SnakeDagger; import com.megacrit.cardcrawl.monsters.city.BronzeOrb; import com.megacrit.cardcrawl.monsters.city.TorchHead; import com.megacrit.cardcrawl.monsters.exordium.*; import java.util.ArrayList; import java.util.List; @AutoAdd.Seen public class SummonMonsterCard extends AbstractMonsterCard { private static final String RAW_ID = "SummonMonsterCard"; public static final String ID = CopycatModMain.makeID(RAW_ID); private static final CardStrings cardStrings = CardCrawlGame.languagePack.getCardStrings(ID); public static final String NAME = cardStrings.NAME; public static final String DESCRIPTION = cardStrings.DESCRIPTION; public static final String[] EXTENDED_DESCRIPTION = cardStrings.EXTENDED_DESCRIPTION; private static final int COST = 1; private static final CardType TYPE = CardType.SKILL; private static final CardRarity RARITY = CardRarity.SPECIAL; private static final CardTarget TARGET = CardTarget.SELF; public String summonID = null; public String summonName = null; public int baseCost; public boolean initialized = false; public boolean smallFont = false; ArrayList<TooltipInfo> tooltips = new ArrayList<>(); public SummonMonsterCard() { super(ID, NAME, COST, DESCRIPTION, TYPE, RARITY, TARGET); exhaust = true; } public static AbstractMonster makeMonster(String ID) { if (ID == null) { return null; } switch (ID) { case AcidSlime_M.ID: return new AcidSlime_M(0.0f, 0.0f); case AcidSlime_L.ID: return new AcidSlime_L(0.0f, 0.0f); case SpikeSlime_M.ID: return new SpikeSlime_M(0.0f, 0.0f); case SpikeSlime_L.ID: return new SpikeSlime_L(0.0f, 0.0f); case GremlinWarrior.ID: return new GremlinWarrior(0.0f, 0.0f); case GremlinFat.ID: return new GremlinFat(0.0f, 0.0f); case GremlinThief.ID: return new GremlinThief(0.0f, 0.0f); case GremlinTsundere.ID: return new GremlinTsundere(0.0f, 0.0f); case GremlinWizard.ID: return new GremlinWizard(0.0f, 0.0f); case SnakeDagger.ID: return new SnakeDagger(0.0f, 0.0f); case BronzeOrb.ID: return new BronzeOrb(0.0f, 0.0f, 0); case TorchHead.ID: return new TorchHead(0.0f, 0.0f); default: return null; } } @Override public void use(AbstractPlayer p, AbstractMonster m) { AbstractMonster summon = makeMonster(summonID); if (summon == null) { addToBot(new TalkAction(true, "This minion is not supported. Please ask Celicath to add this monster.", 0.5f, 4.0f)); } else { addToBot(new SummonCopycatMinionAction(new MirrorMinion(summon.name, summon, magicNumber))); } } public void calculateMonsterCardID() { ArrayList<String> result = new ArrayList<>(); result.add(ID); result.add(originalName); result.add(String.valueOf(summonID)); result.add(String.valueOf(summonName)); result.add(String.valueOf(baseCost)); result.add(String.valueOf(baseMagicNumber)); result.add(String.valueOf(smallFont)); monsterCardID = String.join(GameLogicUtils.metricIdSeparator, result); } public void updateDescriptionAndInitialize() { rawDescription = EXTENDED_DESCRIPTION[1] + summonName.replaceAll("(?<=\\s|^)(\\S+)(?=\\s|$)", "*$1") + EXTENDED_DESCRIPTION[2]; initializeDescription(); initialized = true; tooltips.clear(); tooltips.add(new TooltipInfo(summonName, EXTENDED_DESCRIPTION[3])); rarity = CardRarity.COMMON; } @Override public List<TooltipInfo> getCustomTooltipsTop() { return tooltips; } @Override public void loadFromTokens(String[] tokens) { if (tokens.length >= 7) { try { int shouldUpgrade = 0; if (upgraded) { upgraded = false; shouldUpgrade = timesUpgraded > 0 ? timesUpgraded : 1; } originalName = name = tokens[1]; summonID = tokens[2]; summonName = tokens[3]; baseCost = cost = costForTurn = Integer.parseInt(tokens[4]); baseMagicNumber = magicNumber = Integer.parseInt(tokens[5]); smallFont = tokens[6].equals("true"); updateDescriptionAndInitialize(); for (int i = 0; i < shouldUpgrade; i++) { upgrade(); } } catch (Exception e) { e.printStackTrace(); } } } public void setName(String cardName, AbstractMonster m) { if (cardName == null) { originalName = name = EXTENDED_DESCRIPTION[0] + m.name; smallFont = true; } else { originalName = name = cardName; smallFont = false; } } public void setSummon(AbstractMonster m, int cost, int hp) { summonID = m.id; summonName = m.name; baseCost = this.cost = costForTurn = cost; baseMagicNumber = magicNumber = hp; updateDescriptionAndInitialize(); } @Override public AbstractCard makeCopy() { SummonMonsterCard c = new SummonMonsterCard(); if (initialized) { c.loadFromMonsterCardID(monsterCardID); c.loadTexture(monsterModelID); } return c; } @Override public float getTitleFontSize() { if (smallFont) { return 20; } else { return super.getTitleFontSize(); } } @Override public void upgrade() { if (!upgraded) { upgradeName(); upgradeMagicNumber(4); } } @Override public MonsterCardMoveInfo createMoveInfo(boolean isAlly) { return new MonsterCardMoveInfo(AbstractMonster.Intent.UNKNOWN, this); } @Override public void monsterTakeTurn(AbstractMonster owner, AbstractCreature target, boolean isAlly) { if (isAlly) { AbstractMonster summon = makeMonster(summonID); if (summon != null) { addToBot(new SummonCopycatMinionAction(new MirrorMinion(summon.name, summon, magicNumber))); } } else { // TODO: what happens if an enemy uses this card?? } } }
true
6abf60ef6f0b1c960fee6b7dd7fcbb7be9cf62dc
Java
tgrundtvig/LegoWiFiTrainProject
/NetbeansProject/LegoWiFiTrainProjectV1.1/src/legotrainproject/locomotive/LocomotiveListener.java
UTF-8
258
1.882813
2
[]
no_license
/* * Not licensed yet, use at your own risk, no warrenties! */ package legotrainproject.locomotive; /** * * @author Tobias Grundtvig <[email protected]> */ public interface LocomotiveListener { public void onPositionChange(Locomotive loco, int pos, int magnetTime); }
true
f6aec79e4205d48cc2b801799e9a4bc7db8f0b69
Java
doep-manual/CMON-App
/cmon-app-portlet/docroot/WEB-INF/service/org/oep/cmon/dao/report/model/Lephi_tonghopSoap.java
UTF-8
3,648
1.875
2
[ "Apache-2.0" ]
permissive
/** * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */ package org.oep.cmon.dao.report.model; import org.oep.cmon.dao.report.service.persistence.Lephi_tonghopPK; import java.io.Serializable; import java.util.ArrayList; import java.util.List; /** * This class is used by SOAP remote services. * * @author VIENPN * @generated */ public class Lephi_tonghopSoap implements Serializable { public static Lephi_tonghopSoap toSoapModel(Lephi_tonghop model) { Lephi_tonghopSoap soapModel = new Lephi_tonghopSoap(); soapModel.setNHOMTHUTUCHANHCHINHID(model.getNHOMTHUTUCHANHCHINHID()); soapModel.setTONGHOSO(model.getTONGHOSO()); soapModel.setLEPHI(model.getLEPHI()); soapModel.setPHIHOSO(model.getPHIHOSO()); soapModel.setTONGLEPHI(model.getTONGLEPHI()); soapModel.setTHANGNHAN(model.getTHANGNHAN()); return soapModel; } public static Lephi_tonghopSoap[] toSoapModels(Lephi_tonghop[] models) { Lephi_tonghopSoap[] soapModels = new Lephi_tonghopSoap[models.length]; for (int i = 0; i < models.length; i++) { soapModels[i] = toSoapModel(models[i]); } return soapModels; } public static Lephi_tonghopSoap[][] toSoapModels(Lephi_tonghop[][] models) { Lephi_tonghopSoap[][] soapModels = null; if (models.length > 0) { soapModels = new Lephi_tonghopSoap[models.length][models[0].length]; } else { soapModels = new Lephi_tonghopSoap[0][0]; } for (int i = 0; i < models.length; i++) { soapModels[i] = toSoapModels(models[i]); } return soapModels; } public static Lephi_tonghopSoap[] toSoapModels(List<Lephi_tonghop> models) { List<Lephi_tonghopSoap> soapModels = new ArrayList<Lephi_tonghopSoap>(models.size()); for (Lephi_tonghop model : models) { soapModels.add(toSoapModel(model)); } return soapModels.toArray(new Lephi_tonghopSoap[soapModels.size()]); } public Lephi_tonghopSoap() { } public Lephi_tonghopPK getPrimaryKey() { return new Lephi_tonghopPK(_NHOMTHUTUCHANHCHINHID, _THANGNHAN); } public void setPrimaryKey(Lephi_tonghopPK pk) { setNHOMTHUTUCHANHCHINHID(pk.NHOMTHUTUCHANHCHINHID); setTHANGNHAN(pk.THANGNHAN); } public int getNHOMTHUTUCHANHCHINHID() { return _NHOMTHUTUCHANHCHINHID; } public void setNHOMTHUTUCHANHCHINHID(int NHOMTHUTUCHANHCHINHID) { _NHOMTHUTUCHANHCHINHID = NHOMTHUTUCHANHCHINHID; } public String getTONGHOSO() { return _TONGHOSO; } public void setTONGHOSO(String TONGHOSO) { _TONGHOSO = TONGHOSO; } public String getLEPHI() { return _LEPHI; } public void setLEPHI(String LEPHI) { _LEPHI = LEPHI; } public String getPHIHOSO() { return _PHIHOSO; } public void setPHIHOSO(String PHIHOSO) { _PHIHOSO = PHIHOSO; } public String getTONGLEPHI() { return _TONGLEPHI; } public void setTONGLEPHI(String TONGLEPHI) { _TONGLEPHI = TONGLEPHI; } public String getTHANGNHAN() { return _THANGNHAN; } public void setTHANGNHAN(String THANGNHAN) { _THANGNHAN = THANGNHAN; } private int _NHOMTHUTUCHANHCHINHID; private String _TONGHOSO; private String _LEPHI; private String _PHIHOSO; private String _TONGLEPHI; private String _THANGNHAN; }
true
767be1ab5eccdbf5af73dd16799bc898fb992dde
Java
cha63506/CompSecurity
/JC-Penney/src/com/jcp/activities/SameDayPickUpCustomerServiceWebView.java
UTF-8
2,301
1.585938
2
[]
no_license
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.jcp.activities; import android.app.ActionBar; import android.app.ProgressDialog; import android.content.Intent; import android.content.res.Resources; import android.os.Bundle; import android.webkit.WebSettings; import android.webkit.WebView; import android.widget.TextView; import butterknife.ButterKnife; import com.jcp.b.b; // Referenced classes of package com.jcp.activities: // an, bk public class SameDayPickUpCustomerServiceWebView extends an { private ProgressDialog a; protected TextView headerTitle; protected WebView mWebView; public SameDayPickUpCustomerServiceWebView() { } static ProgressDialog a(SameDayPickUpCustomerServiceWebView samedaypickupcustomerservicewebview) { return samedaypickupcustomerservicewebview.a; } static ProgressDialog a(SameDayPickUpCustomerServiceWebView samedaypickupcustomerservicewebview, ProgressDialog progressdialog) { samedaypickupcustomerservicewebview.a = progressdialog; return progressdialog; } protected String a() { return "SAMEDAYPICKUPCUSTOMERSERVICEWEBVIEW"; } public void onBackPressed() { if (mWebView.canGoBack()) { mWebView.goBack(); return; } else { super.onBackPressed(); return; } } protected void onCreate(Bundle bundle) { super.onCreate(bundle); setContentView(0x7f03005c); ButterKnife.inject(this); if (getActionBar() != null) { getActionBar().hide(); } mWebView.setVisibility(8); mWebView.getSettings().setJavaScriptEnabled(true); mWebView.setWebViewClient(new bk(this, null)); if (getIntent().getExtras().getInt("ITEM_OPTION", 1) == 1) { headerTitle.setText(getResources().getString(0x7f070420)); mWebView.loadUrl(b.R()); return; } else { headerTitle.setText(getResources().getString(0x7f0701cf)); mWebView.loadUrl(b.S()); return; } } }
true
ff5a31cb15a0b1e73324d933517a2f8d95a4caae
Java
mswiderski/qs-playground
/jbpm/jbpm-flow/src/main/java/org/jbpm/process/instance/LightProcessRuntimeServiceProvider.java
UTF-8
1,229
2.109375
2
[ "Apache-2.0" ]
permissive
package org.jbpm.process.instance; import java.util.Optional; import org.jbpm.process.instance.impl.DefaultProcessInstanceManager; import org.kie.services.signal.LightSignalManager; import org.kie.services.signal.SignalManager; import org.kie.services.time.TimerService; import org.kie.services.time.impl.JDKTimerService; public class LightProcessRuntimeServiceProvider implements ProcessRuntimeServiceProvider { private final TimerService timerService; private final ProcessInstanceManager processInstanceManager; private final SignalManager signalManager; public LightProcessRuntimeServiceProvider() { timerService = new JDKTimerService(); processInstanceManager = new DefaultProcessInstanceManager(); signalManager = new LightSignalManager( id -> Optional.ofNullable( processInstanceManager.getProcessInstance(id))); } @Override public TimerService getTimerService() { return timerService; } @Override public ProcessInstanceManager getProcessInstanceManager() { return processInstanceManager; } @Override public SignalManager getSignalManager() { return signalManager; } }
true
99e0aaee2abb695f9d114d617a15eceb46a4928c
Java
nevella/alcina
/framework/gwt/src/cc/alcina/framework/gwt/persistence/client/KeyValueStore.java
UTF-8
1,451
2.21875
2
[]
no_license
package cc.alcina.framework.gwt.persistence.client; import java.util.List; import com.google.gwt.user.client.rpc.AsyncCallback; import cc.alcina.framework.common.client.logic.reflection.Registration; import cc.alcina.framework.common.client.logic.reflection.registry.Registry; @Registration.Singleton public class KeyValueStore { public static KeyValueStore createNonStandardKeyValueStore(PersistenceObjectStore delegate) { KeyValueStore store = new KeyValueStore(); store.registerDelegate(delegate); return store; } public static KeyValueStore get() { return Registry.impl(KeyValueStore.class); } protected PersistenceObjectStore objectStore; public KeyValueStore() { super(); } public void get(String key, AsyncCallback<String> valueCallback) { this.objectStore.get(key, valueCallback); } public void getKeysPrefixedBy(String keyPrefix, AsyncCallback<List<String>> completedCallback) { this.objectStore.getKeysPrefixedBy(keyPrefix, completedCallback); } public PersistenceObjectStore getObjectStore() { return this.objectStore; } public void put(String key, String value, AsyncCallback<Integer> idCallback) { this.objectStore.put(key, value, idCallback); } public void registerDelegate(PersistenceObjectStore objectStore) { this.objectStore = objectStore; } public void remove(String key, AsyncCallback<Integer> completedCallback) { this.objectStore.remove(key, completedCallback); } }
true
a8f650ce4ee03113ffa78ab4e5c12c6477854c24
Java
boris9264/concurrent
/src/main/java/com/boris/learn/concurrent/part1/demo06/render/ImageInfo.java
UTF-8
796
3.140625
3
[]
no_license
package com.boris.learn.concurrent.part1.demo06.render; public class ImageInfo { private String imgName; private ImageData imageData; public ImageInfo(String imgName, ImageData imageData) { this.imgName = imgName; this.imageData = imageData; } public String getImgName() { return imgName; } public void setImgName(String imgName) { this.imgName = imgName; } public ImageData getImageData() { try { Thread.sleep(5000); System.out.println(Thread.currentThread() + " init...."); } catch (InterruptedException e) { e.printStackTrace(); } return imageData; } public void setImageData(ImageData imageData) { this.imageData = imageData; } }
true
2b21322c3b2893924e29def8f43e955d3eca0a10
Java
dnkilic/android-karabasan
/app/src/main/java/com/dnkilic/karabasan/Candidate.java
UTF-8
514
2.46875
2
[]
no_license
package com.dnkilic.karabasan; public class Candidate { String name; Integer age; Integer height; public String getName() { return name; } public void setName(String name) { this.name = name; } public void setAge(Integer age) { this.age = age; } public Integer getAge() { return age; } public void setHeight(Integer height) { this.height = height; } public Integer getHeight() { return height; } }
true
3afaf08380e2e7ab8f8dfb9a32ab82881c5aeada
Java
Antonisiy/ListTaskAndroid
/app/src/main/java/com/example/anton/listtask/SectionListView.java
UTF-8
616
2.34375
2
[]
no_license
package com.example.anton.listtask; import android.app.ListActivity; import android.os.Bundle; public class SectionListView extends ListActivity { private CustomAdapter mAdapter; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); /* mAdapter = new CustomAdapter(this); for (int i = 1; i < 30; i++) { mAdapter.addItem("Row Item #" + i); if (i % 4 == 0) { mAdapter.addSectionHeaderItem("Section #" + i); } } setListAdapter(mAdapter);*/ } }
true
a7a3087b3a08172d157c80eeaba5ff7863cb324a
Java
led-os/SeexLove
/app/src/main/java/com/chat/seecolove/widget/CustomAttachment.java
UTF-8
1,372
2.40625
2
[]
no_license
package com.chat.seecolove.widget; import com.netease.nimlib.sdk.msg.attachment.MsgAttachment; import org.json.JSONException; import org.json.JSONObject; import com.chat.seecolove.constants.Constants; public class CustomAttachment implements MsgAttachment { private int type = 0; private String data = null; public CustomAttachment(String jsonObject,int type){ this.data = jsonObject; this.type = type; try { JSONObject json = new JSONObject(this.data); if(type== Constants.GIFT_ORTHER){ json.put("conmbCount","1"); this.data = json.toString(); } } catch (JSONException e) { e.printStackTrace(); } } @Override public String toJson(boolean b) { return CustomAttachParser.packData(type,data); } public int getType() { return type; } public void setType(int type) { this.type = type; } public JSONObject getData() { JSONObject jsonObject = null; try { jsonObject = new JSONObject(this.data); } catch (JSONException e) { e.printStackTrace(); } return jsonObject; } public void setData(String data) { this.data = data; } }
true
e276edb64b21d46a3886bffba240e547b805617c
Java
mjparrott/Lumines
/src/Lumines.java
UTF-8
326
2.546875
3
[]
no_license
/** * Name: Michael Parrott * Date: June 17, 2011 * Course code: ICS4U1 * Title: Lumines * Description: A Lumines game coded in Java * Notes: * * @author Michael Parrott */ public class Lumines { public static void main( String[] args ) throws Exception { LuminesGUI game = new LuminesGUI(); //Run the game game.run(); } }
true
9eec7d6dd59972d520c625fe53197ba3bfbb7142
Java
jesushernandez/MapReduceQoS
/src/scheduler/SimulatorConfig.java
UTF-8
2,629
2.859375
3
[]
no_license
package scheduler; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.util.ArrayList; import java.util.List; import java.util.Random; import com.thoughtworks.xstream.XStream; public class SimulatorConfig { // XStream for object (de)serialization private static XStream xstream; /** * Writes configuration file. Only for testing purposes. Creates two * simulations with the same clients and nodes. */ private static void writeConfigurationFile(String simulationName, int numberOfClients, int numberOfNodes, int clientQos) { Simulation simulation = null; List<Client> clients = new ArrayList<Client>(); List<Node> nodes = new ArrayList<Node>(); QoSSpec qos = null; Client client = null; Node node = null; Random randomGenerator = new Random(); if (clientQos == 0) { int randomQos; for (int i = 0; i < numberOfClients; i++) { randomQos = randomGenerator.nextInt(3) + 1; qos = new QoSSpec(randomQos); client = new Client(i, qos); clients.add(client); } } else { for (int i = 0; i < numberOfClients; i++) { qos = new QoSSpec(clientQos); client = new Client(i, qos); clients.add(client); } } for (int i = 0; i < numberOfNodes; i++) { node = new Node(i); nodes.add(node); } simulation = new Simulation(1, clients, nodes); try { FileOutputStream fs = new FileOutputStream("./config.xml"); xstream.toXML(simulation, fs); } catch (FileNotFoundException e) { e.printStackTrace(); } } /** * Configures the XStream object */ private static void configureXStream() { xstream = new XStream(); xstream.alias("simulation", Simulation.class); xstream.alias("client", Client.class); xstream.alias("qos", QoSSpec.class); xstream.alias("nodes", Node.class); xstream.alias("nodequeue", NodeQueue.class); xstream.alias("joblist", java.util.concurrent.ConcurrentLinkedQueue.class); } /** * @param args */ public static void main(String[] args) { configureXStream(); // args[0] - filename // args[1] - number of clients // args[2] - number of nodes // args[3] - QoS specs (0 for random) if (args.length > 4) { if (args[4].contains("duration=")) { Task.setDuration(Integer.parseInt(args[4].split("=")[1])); } if (args[4].contains("nTasks=")) { Simulator.setMeanTasks(Integer.parseInt(args[4].split("=")[1])); } } writeConfigurationFile(args[0], Integer.parseInt(args[1]), Integer.parseInt(args[2]), Integer.parseInt(args[3])); } }
true
3a93de6bb2062a1909949c630b61aac74eb981f3
Java
richiejk/VT
/app/src/main/java/com/richiejk/voyagetales/api/APIManager.java
UTF-8
2,364
2.25
2
[]
no_license
package com.richiejk.voyagetales.api; import android.content.Context; import android.util.Log; import com.richiejk.voyagetales.common.Finals; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.DefaultHttpClient; import org.json.JSONException; import org.json.JSONObject; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; /** * Created by richie on 1/16/14. */ public class APIManager { Context APIcontext; APIListener mListener; public APIManager(Context context) { this.APIcontext = context; } public JSONObject loginAPI(String posturl){ HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost(Finals.BASE_URL); try { httppost.setEntity(new StringEntity(posturl)); HttpResponse resp = httpclient.execute(httppost); HttpEntity ent = resp.getEntity(); // Log.i("loginresp1",EntityUtils.toString(ent)); String jsonString= convertStreamToString(ent.getContent()); Log.i("loginresp", jsonString); JSONObject jsonObject=new JSONObject(jsonString); return jsonObject; } catch (UnsupportedEncodingException e) { e.printStackTrace(); } catch (ClientProtocolException e) { e.printStackTrace(); return null; } catch (IOException e) { e.printStackTrace(); return null; } catch (JSONException e) { e.printStackTrace(); return null; } // adasdas return null; } //asdasdasdsdasdasddasd public static String convertStreamToString(InputStream is) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(is)); StringBuilder sb = new StringBuilder(); String line = null; //dfsd while ((line = reader.readLine()) != null) { sb.append(line); } is.close(); return sb.toString().trim(); } }
true
0ec406094aa1caadb753373167c23d02f8f900ce
Java
vmarpadge/SGPA-Calculator
/sgpa.java
UTF-8
642
3.171875
3
[]
no_license
import java.util.Scanner; public class sgpa { public static void main(String[] args){ System.out.println("Welcome To The SGPA Calculator"); Scanner scanner = new Scanner(System.in); System.out.println("Enter The Number OF Credit Elements"); int x = scanner.nextInt(); double sum =0; System.out.println("Enter the Credit Points"); int[] arr =new int[x]; for(int i=0;i<x;i++){ int y = scanner.nextInt(); arr[i]= y; sum += arr[i]; } System.out.println("Enter The Credit points Earned"); double z = scanner.nextDouble(); double sgpa =(sum/z); System.out.println("your SGPA Is "+sgpa); } }
true
0c04f31f240edefabd7d435eb1f07e4ecf02e65e
Java
zanikolov/KalafcheRepo
/KalafcheBackend/src/main/java/com/kalafche/model/PastPeriodSaleReport.java
UTF-8
2,109
2.25
2
[]
no_license
package com.kalafche.model; import java.util.List; public class PastPeriodSaleReport { Integer selectedMonthDay; Integer selectedMonthMonth; Integer selectedMonthYear; Integer prevMonthDay; Integer prevMonthMonth; Integer prevMonthYear; Integer prevYearDay; Integer prevYearMonth; Integer prevYearYear; List<PastPeriodTurnover> pastPeriodTurnovers; public Integer getSelectedMonthDay() { return selectedMonthDay; } public void setSelectedMonthDay(Integer selectedMonthDay) { this.selectedMonthDay = selectedMonthDay; } public Integer getSelectedMonthMonth() { return selectedMonthMonth; } public void setSelectedMonthMonth(Integer selectedMonthMonth) { this.selectedMonthMonth = selectedMonthMonth; } public Integer getSelectedMonthYear() { return selectedMonthYear; } public void setSelectedMonthYear(Integer selectedMonthYear) { this.selectedMonthYear = selectedMonthYear; } public Integer getPrevMonthDay() { return prevMonthDay; } public void setPrevMonthDay(Integer prevMonthDay) { this.prevMonthDay = prevMonthDay; } public Integer getPrevMonthMonth() { return prevMonthMonth; } public void setPrevMonthMonth(Integer prevMonthMonth) { this.prevMonthMonth = prevMonthMonth; } public Integer getPrevMonthYear() { return prevMonthYear; } public void setPrevMonthYear(Integer prevMonthYear) { this.prevMonthYear = prevMonthYear; } public Integer getPrevYearDay() { return prevYearDay; } public void setPrevYearDay(Integer prevYearDay) { this.prevYearDay = prevYearDay; } public Integer getPrevYearMonth() { return prevYearMonth; } public void setPrevYearMonth(Integer prevYearMonth) { this.prevYearMonth = prevYearMonth; } public Integer getPrevYearYear() { return prevYearYear; } public void setPrevYearYear(Integer prevYearYear) { this.prevYearYear = prevYearYear; } public List<PastPeriodTurnover> getPastPeriodTurnovers() { return pastPeriodTurnovers; } public void setPastPeriodTurnovers(List<PastPeriodTurnover> pastPeriodTurnovers) { this.pastPeriodTurnovers = pastPeriodTurnovers; } }
true
38003729e2682ca90f026579e8b35207c10e55bf
Java
jdayih/RecipebookAPI
/src/main/java/com/example/demo/rest/RecipeController.java
UTF-8
1,619
2.203125
2
[]
no_license
package com.example.demo.rest; import java.util.List; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import com.example.demo.domain.Recipe; import com.example.demo.service.RecipeService; @RestController public class RecipeController { private RecipeService service; public RecipeController(RecipeService service) { super(); this.service = service; } @PostMapping("/createRecipe") public ResponseEntity<Recipe> createPenguin(@RequestBody Recipe recipe) { return new ResponseEntity<Recipe>(this.service.createRecipe(recipe), HttpStatus.CREATED); } @GetMapping("/getRecipes") public ResponseEntity<List<Recipe>> getRecipe() { return ResponseEntity.ok(this.service.getRecipes()); } @GetMapping("/getRecipeById/{id}") public Recipe getRecipeById(@PathVariable long id) { return this.service.getRecipeById(id); } @DeleteMapping("/removeRecipe/{id}") public boolean removeRecipe(@PathVariable long id) { return this.service.removeRecipe(id); } @PutMapping("/updateRecipe/{id}") public Recipe updateRecipe(@PathVariable Long id, @RequestBody Recipe newRecipe) { return this.service.updateRecipe(id, newRecipe); } }
true
a9535d195984905651319bc79c2f37941032fd50
Java
FlorianPatzer/symp_analysis_hub
/src/main/java/de/fraunhofer/iosb/svs/analysishub/data/service/PhaseService.java
UTF-8
2,928
2.578125
3
[ "MIT" ]
permissive
package de.fraunhofer.iosb.svs.analysishub.data.service; import de.fraunhofer.iosb.svs.analysishub.URIUtil; import de.fraunhofer.iosb.svs.analysishub.data.entity.Phase; import de.fraunhofer.iosb.svs.analysishub.exceptions.ResourceNotFoundException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.Arrays; import java.util.List; import static de.fraunhofer.iosb.svs.analysishub.data.entity.PolicyBasedAnalysis.POLICY_BASED_ANALYSIS_NAMESPACE; /** * A service handling the phase nodes. * <p> * Phases are the already 6 set phases plus one phase for "any phase". Therefore no phase generation is needed. * The given phases are represented as the {@link StaticPhase} enum. */ @Service public class PhaseService { private final PhaseRepository phaseRepository; @Autowired public PhaseService(PhaseRepository phaseRepository) { this.phaseRepository = phaseRepository; } public List<Phase> getPhases() { return phaseRepository.findAll(); } /** * Given a static phase return the real phase node. */ public Phase getPhaseByStaticPhase(StaticPhase staticPhase) { return phaseRepository.findByUri(URIUtil.assemble(POLICY_BASED_ANALYSIS_NAMESPACE, staticPhase.getLocalName())) .orElseThrow(() -> new ResourceNotFoundException("Phase not found. This should not be possible")); } /** * Given a real phase node get the static phase. */ public StaticPhase getStaticPhaseByPhase(Phase phase) { if (phase != null) { return Arrays.stream(StaticPhase.values()).filter(staticPhase -> phase.getLocalName().equals(staticPhase.getLocalName())) .findAny() .orElseThrow(() -> new ResourceNotFoundException("Phase not found. This should not be possible")); } return null; } public Phase getPhaseByUri(String uri) { return phaseRepository.findByUri(uri).orElseThrow(() -> new ResourceNotFoundException("Phase not found")); } /** * An enum containing the local names and uris of all 7 phases. */ public enum StaticPhase { KNOWLEDGE_COLLECTION("KnowledgeCollection"), KNOWLEDGE_FUSION("KnowledgeFusion"), MODEL_CLEANING("ModelCleaning"), STATIC_KNOWLEDGE_EXTENSION("StaticKnowledgeExtension"), DYNAMIC_KNOWLEDGE_EXTENSION("DynamicKnowledgeExtension"), ANALYSIS("Analysis"), ANY_PHASE("AnyPhase"); private final String uri; private final String localName; StaticPhase(String localName) { this.localName = localName; this.uri = POLICY_BASED_ANALYSIS_NAMESPACE + localName; } public String getUri() { return uri; } public String getLocalName() { return localName; } } }
true
7a49671c60d7a8e85f33f2765407d328d34297c1
Java
JavaAdore/Restaurant-Management-System
/src/main/java/com/itigeeks/restaurant/dataaccess/dao/ResUserDAO.java
UTF-8
1,508
1.960938
2
[]
no_license
package com.itigeeks.restaurant.dataaccess.dao; import java.util.List; import java.util.Map; import org.springframework.stereotype.Repository; import com.itigeeks.restaurant.common.entity.schema.ResUser; import com.itigeeks.restaurant.common.enums.QueryConjunctionType; /** * * @author ITI GEEKS * */ @Repository public interface ResUserDAO { public void delete(ResUser resUser); public ResUser saveOrUpdate(ResUser resUser); public ResUser load(Long id); public List<ResUser> loadAll(); public List<ResUser> loadAll(Integer startPage, Integer pageSize); public List<ResUser> loadByNamedQuery(String queryName); public List<ResUser> loadByNamedQuery(String queryName, Map<String, Object> queryParameters); public List<ResUser> load(Map<String, Object> criteria); public List<ResUser> load(Map<String, Object> criteria, QueryConjunctionType queryConjunctionType); public List<ResUser> load(Map<String, Object> criteria, Integer firstPage, Integer pageSize); public List<ResUser> load(Map<String, Object> criteria, Integer startPage, Integer pageSize, QueryConjunctionType conjuncationType); public List<ResUser> load(Map<String, Object> criteria, Integer startPage, Integer pageSize, String sortField, Boolean ascending, QueryConjunctionType conjuncationType); public Integer countAll(); public Integer getCount(Map<String, Object> criteria); public Integer getCount(Map<String, Object> criteria, QueryConjunctionType conjuncationType); }
true
ea49b4d0ded6a82522c57af7d21c86aeb8f4e9d7
Java
jasonzhoumj/lac3
/lac3/lac3-web/src/main/java/com/linkallcloud/web/face/processor/PackageXmlProcessor.java
UTF-8
764
2.015625
2
[]
no_license
package com.linkallcloud.web.face.processor; import java.lang.reflect.Type; import com.linkallcloud.web.face.annotation.Face; import com.linkallcloud.core.exception.BaseException; import com.linkallcloud.core.face.message.FaceMessage; public class PackageXmlProcessor extends PackageRequestProcessor { public PackageXmlProcessor() { super(); } @Override protected FaceMessage doConvert2RealRequest(String xmlMessagePkg, Type type, Face faceAnno) throws BaseException { // TODO convert xmlMessagePkg to FaceMessage return null; } @Override public Object packageResult(Object message, Face faceAnno) throws BaseException { // TODO Auto-generated method stub return null; } }
true
fe94013b030cf77f11a76bbfc0ce4b7b91cd4a99
Java
tdk928/futureAngularProject
/future/src/main/java/softuni/shop/future/product/controller/TagController.java
UTF-8
1,199
2.1875
2
[]
no_license
package softuni.shop.future.product.controller; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RestController; import softuni.shop.future.product.service.api.TagService; @RestController public class TagController { private final TagService tagService; public TagController(TagService tagService) { this.tagService = tagService; } @GetMapping("/product/allGenres") public ResponseEntity<?> getAllUsers() { return new ResponseEntity<>(this.tagService.getAllGenres(), HttpStatus.OK); } @GetMapping("/product/tags/{id}") public ResponseEntity<?> getTagsForCurrentProduct(@PathVariable("id") String id) { return new ResponseEntity<>(this.tagService.getAllTagsForProduct(id), HttpStatus.OK); } @GetMapping("/product/colors/{id}") public ResponseEntity<?> getColorsForCurrentProduct(@PathVariable("id") String id) { return new ResponseEntity<>(this.tagService.getAllColorsForProduct(id), HttpStatus.OK); } }
true
cb1b0e5f16db3660cc3937a13ce92ead1461ec7f
Java
iluoyi/datastr-algorithms
/src/leetcode/SwapNodesInPairs.java
UTF-8
995
3.546875
4
[]
no_license
package leetcode; public class SwapNodesInPairs { public ListNode swapPairs(ListNode head) { return reverseKGroup(head, 2); } public ListNode reverseKGroup(ListNode head, int k) { if (head == null || k <= 0) { return head; } int len = 0; // the length of the list ListNode crt = head; ListNode next, pre, last, newHead; while (crt != null) { len++; crt = crt.next; } int iteration = len / k; newHead = null; if (iteration > 0) { last = null; for (int i = 0; i < iteration; i++) { crt = head; next = crt.next; head.next = null; for (int j = 0; j < k - 1; j++) { pre = crt; crt = next; next = crt.next; crt.next = pre; } if (last != null) { last.next = crt; } last = head; head = next; if (i == 0) { newHead = crt; } } if (head != null) { // if there are remaining nodes last.next = head; } return newHead; } else { return head; } } }
true
bf8b40521c238964c36ba75c1b803c4ab8da6ad2
Java
FaraRashid/lesson
/src/ATMPackage/MainATM.java
UTF-8
2,251
3.15625
3
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package ATMPackage; import ATMPackage.ATM; import java.util.Scanner; import javax.swing.JOptionPane; /** * * @author izyan rosni */ public class MainATM { public static void main(String[] args) { //Make two bank accounts Account account1 = new Account("NURIZYAN AMIRA BT ROSNI", 12345); Account account2 = new Account("NAIM BIN TARMIZI", 67891); Account account3 = new Account("NAIM BIN ROSLAN", 43345); //Set the balance of account1 and account2 account1.setBalance(20000); account2.setBalance(30000); account3.setBalance(40000); //account number account1.setAccountnumber(123439943); account2.setAccountnumber(454563445); account3.setAccountnumber(232463249); //Set the annual interest rate of account1 and account2 account1.setAnnualInterestRate(5); account2.setAnnualInterestRate(5); account3.setAnnualInterestRate(5); String s1; int id = 1; while (true) { s1 = JOptionPane.showInputDialog("Enter an account ID: "); try { id = Integer.parseInt(s1); // id = Integer.parseInt(s1); ATM atm = new ATM(); //The ID has to be 67891, 12345, and 43345 if (id == 12345) { atm.displayMenu(account1); } else if (id == 67891) { atm.displayMenu(account2); } else if (id == 43345) { atm.displayMenu(account3); } else { //If the customer input number is not 101 or 102, JOptionPane.showMessageDialog(null,"\n*******Please enter a valid number*******"); } //Catch the input is not a number. } catch (Exception ex) { JOptionPane.showMessageDialog(null, "\n*******Please enter a valid number*******"); } } } }
true
9910ce23d82b09997db4495352ce6e7a83c119f5
Java
RationaleEmotions/SimpleSe
/src/main/java/com/rationaleemotions/page/WebElementType.java
UTF-8
1,631
3.203125
3
[ "Apache-2.0" ]
permissive
package com.rationaleemotions.page; /** * Represents the types of webelements that are supported by this library. */ public enum WebElementType { /** * Represents a button. */ BUTTON("button"), /** * Represents a checkbox */ CHECKBOX("checkbox"), /** * Represents a form element. */ FORM("form"), /** * Represents any other element that is not mentioned here (for e.g., div/td/tr) */ GENERIC("generic"), /** * Represents an image */ IMAGE("image"), /** * Represents a label */ LABEL("label"), /** * Represents a link */ LINK("link"), /** * Represents a radio button */ RADIO("radio"), /** * Represents a select list */ SELECT("select"), /** * Represents a textbox */ TEXTFIELD("text"); WebElementType(String type) { this.type = type; } private String type; @Override public String toString() { return type; } /** * A factory method that helps with parsing a type into a recognized {@link WebElementType} * * @param type - The raw text that needs to be parsed. * @return - A {@link WebElementType} that represents the recognized type. If an unrecognized * value is encountered (or) a null value (or) an empty string the type gets identified as {@link * WebElementType#GENERIC} */ public static WebElementType identifyType(String type) { if (type == null || type.trim().isEmpty()) { return GENERIC; } for (WebElementType each : WebElementType.values()) { if (each.type.equalsIgnoreCase(type)) { return each; } } return GENERIC; } }
true
40369dde294952adc018ec4c94bcb0f2e5117d09
Java
craigenn/CS2004
/CS2004_Lab12/src/CS2004.java
UTF-8
2,814
3.25
3
[]
no_license
import java.util.*; import java.io.*; //Some useful code that we will probably reuse in later laboratories... public class CS2004 { static String filename = "1000Primes.txt"; public static void main(String args[]) { ArrayList<Double> res = new ArrayList<Double>(); //relative file path since it is in the project directory //System.out.println(ScalesSolution.RandomBinaryString(10)); //System.out.println("done"); //above code was done to quickly check it was working correctly //changed method to public when checking //the below is the original code supplied moved into its own method //original(); //the below will create a new solution to the Scales problem of 5 weights //called x with the odd weights on the right hand side of the scales //and the even weights on the left hand side. //Scales(); //the below method inputs a nonbinary so it gets replaced //Scalesbreak(); // res = ReadNumberFile(filename); // checkread(res); } public static void original() { for(int i=0;i<10;++i) { int x = CS2004.UI(-1, 1); System.out.println(x); } } //Shared random object static private Random rand; //Create a uniformly distributed random integer between aa and bb inclusive static public int UI(int aa,int bb) { int a = Math.min(aa,bb); int b = Math.max(aa,bb); if (rand == null) { rand = new Random(); rand.setSeed(System.nanoTime()); } int d = b - a + 1; int x = rand.nextInt(d) + a; return(x); } //Create a uniformly distributed random double between a and b inclusive static public double UR(double a,double b) { if (rand == null) { rand = new Random(); rand.setSeed(System.nanoTime()); } return((b-a)*rand.nextDouble()+a); } //This method reads in a text file and parses all of the numbers in it //This code is not very good and can be improved! //But it should work!!! //It takes in as input a string filename and returns an array list of Doubles static public ArrayList<Double> ReadNumberFile(String filename) { ArrayList<Double> res = new ArrayList<Double>(); Reader r; try { r = new BufferedReader(new FileReader(filename)); StreamTokenizer stok = new StreamTokenizer(r); stok.parseNumbers(); stok.nextToken(); while (stok.ttype != StreamTokenizer.TT_EOF) { if (stok.ttype == StreamTokenizer.TT_NUMBER) { res.add(stok.nval); } stok.nextToken(); } } catch(Exception E) { System.out.println("+++ReadFile: "+E.getMessage()); } return(res); } static public void checkread(ArrayList<Double> res) { for(int i=0;i<res.size();i++) { System.out.print(res.get(i) + ", "); } } }
true
f311cfebf8661b0c1bf0e30a1bbc6f2fb7084044
Java
hiivenky/labbook
/JpaLabbook/src/main/java/com/cg/jpalabbook/dao/BookDaoImpl.java
UTF-8
1,986
2.640625
3
[]
no_license
package com.cg.jpalabbook.dao; import java.util.List; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.EntityTransaction; import javax.persistence.Persistence; import javax.persistence.Query; import com.cg.jpalabbook.dto.Author; import com.cg.jpalabbook.dto.Book; public class BookDaoImpl implements BookDao{ private static EntityManagerFactory emf; private static EntityManager em; static { emf = Persistence.createEntityManagerFactory("jpalabbook"); em = emf.createEntityManager(); } @Override public Book addBook(Book book) { // TODO Auto-generated method stub Author author = em.find(Author.class, book.getAuthor().getAuthorId()); EntityTransaction trans = em.getTransaction(); trans.begin(); if(author!=null) { book.setAuthor(author); } em.persist(book); trans.commit(); return book; } @Override public Book deleteBook(Integer bookId) { // TODO Auto-generated method stub Book book = em.find(Book.class, bookId); if(book!=null) { em.remove(book); return book; } return null; } public List<Book> getBooks(Integer authorId){ Author author = em.find(Author.class, authorId); if(author!=null) { return author.getBooks(); } return null; } @Override public List<Book> getBooks(Double min, Double max) { // TODO Auto-generated method stub String sql="from Book b where b.cost >= :first AND b.cost <= :second"; Query query = em.createQuery(sql); query.setParameter("first", min); query.setParameter("second", max); return query.getResultList(); } public Author getAuthor(Integer bookId) { Book book = em.find(Book.class, bookId); if(book!=null) { return book.getAuthor(); } return null; } public List<Book> getBooks(){ String sql = "select b from Book b"; Query query = em.createQuery(sql); return query.getResultList(); } }
true
eed8c9b2e9739b65c1c12a2a35874ede31f84bdb
Java
belonesox/stas-candlepin
/common/src/test/java/org/candlepin/common/config/MapConfigurationTest.java
UTF-8
11,604
2.234375
2
[]
no_license
/** * Copyright (c) 2009 - 2012 Red Hat, Inc. * * This software is licensed to you under the GNU General Public License, * version 2 (GPLv2). There is NO WARRANTY for this software, express or * implied, including the implied warranties of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2 * along with this software; if not, see * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. * * Red Hat trademarks are not licensed under GPLv2. No permission is * granted to use or replicate Red Hat trademarks that are incorporated * in this software or its documentation. */ package org.candlepin.common.config; import static org.junit.Assert.*; import org.candlepin.common.config.Configuration.TrimMode; import org.hamcrest.core.IsInstanceOf; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.mockito.runners.MockitoJUnitRunner; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.NoSuchElementException; import java.util.Properties; import java.util.Set; /** * MapConfigurationTest */ @RunWith(MockitoJUnitRunner.class) public class MapConfigurationTest { @SuppressWarnings("checkstyle:visibilitymodifier") @Rule public ExpectedException ex = ExpectedException.none(); private MapConfiguration config; @Before public void init() { config = new MapConfiguration(); } @Test public void testSubset() { config.setProperty("x.1", "y"); config.setProperty("x.2", "y"); config.setProperty("x.3", "y"); config.setProperty("a.1", "b"); config.setProperty("a.2", "b"); config.setProperty("a.3", "b"); Configuration newConfig = config.subset("x"); config.clear(); Set<String> keySet = (Set<String>) newConfig.getKeys(); assertEquals(new HashSet<String>(Arrays.asList("x.1", "x.2", "x.3")), keySet); } public void testNullInHashMapProhibited() { ex.expect(RuntimeException.class); ex.expectCause(IsInstanceOf.<Throwable>instanceOf(ConfigurationException.class)); HashMap<String, String> m = new HashMap<String, String>(); m.put(null, "x"); m.put("hello", "world"); assertTrue(m.containsKey(null)); new MapConfiguration(m); } @Test public void testStrippedSubset() { config.setProperty("a.b.a.b", "value"); config.setProperty("a.b.c.d", "value"); config.setProperty("a.c.a.b", "value"); config.setProperty("a.d.a.b", "value"); Configuration stripped = config.strippedSubset("a.b."); assertFalse(stripped.containsKey("a.b.a.b")); assertTrue(stripped.containsKey("a.b")); assertTrue(stripped.containsKey("c.d")); assertFalse(stripped.containsKey("a.c.a.b")); assertFalse(stripped.containsKey("a.d.a.b")); } @Test public void testMerge() { config.setProperty("x.1", "y"); config.setProperty("x.2", "y"); Configuration config2 = new MapConfiguration(); config2.setProperty("a.1", "b"); // Add a conflicting property; config will trump config2 config2.setProperty("x.1", "b"); Configuration mergedConfig = MapConfiguration.merge(config, config2); assertNotSame(config, mergedConfig); Set<String> keySet = (Set<String>) mergedConfig.getKeys(); assertEquals(new HashSet<String>(Arrays.asList("x.1", "x.2", "a.1")), keySet); assertEquals("y", mergedConfig.getProperty("x.1")); } @Test public void testIsEmpty() { assertTrue(config.isEmpty()); config.setProperty("x", "y"); assertFalse(config.isEmpty()); } @Test public void testContainsKey() { assertFalse(config.containsKey("x")); config.setProperty("x", "y"); assertTrue(config.containsKey("x")); } @Test public void testSetProperty() { config.setProperty("x", "y"); assertTrue(config.containsKey("x")); assertEquals("y", config.getProperty("x")); } @Test public void testClear() { config.setProperty("x", "y"); config.setProperty("a", "b"); assertTrue(config.containsKey("x")); assertTrue(config.containsKey("a")); config.clear(); assertFalse(config.containsKey("x")); assertFalse(config.containsKey("a")); } @Test public void testClearProperty() { config.setProperty("x", "y"); config.setProperty("a", "b"); assertTrue(config.containsKey("x")); assertTrue(config.containsKey("a")); config.clearProperty("x"); assertFalse(config.containsKey("x")); assertTrue(config.containsKey("a")); } @Test public void testGetKeys() { config.setProperty("x", "y"); config.setProperty("a", "b"); Set<String> keySet = (Set<String>) config.getKeys(); assertEquals(new HashSet<String>(Arrays.asList("x", "a")), keySet); } @Test public void testGetBoolean() { config.setProperty("x", "true"); config.setProperty("bar", "false"); config.setProperty("bar1", "1"); config.setProperty("bar2", "yes"); config.setProperty("no", "n"); assertTrue(config.getBoolean("x")); assertTrue(config.getBoolean("bar1")); assertTrue(config.getBoolean("bar2")); assertFalse(config.getBoolean("bar")); assertFalse(config.getBoolean("no")); } @Test public void testGetMissingBoolean() { ex.expect(NoSuchElementException.class); ex.expectMessage(config.doesNotMapMessage("x")); config.getBoolean("x"); } @Test public void testGetBooleanWithDefault() { assertFalse(config.getBoolean("missing", Boolean.FALSE)); } @Test public void testGetInteger() { config.setProperty("x", "1"); assertEquals(1, config.getInt("x")); } @Test public void testGetMissingInteger() { ex.expect(NoSuchElementException.class); ex.expectMessage(config.doesNotMapMessage("x")); config.getInt("x"); } @Test public void testGetIntWithDefault() { config.setProperty("threshold", "10"); assertEquals(5, config.getInt("nothere", 5)); assertEquals(10, config.getInt("threshold", 5)); } @Test public void testGetLong() { config.setProperty("x", "1"); assertEquals(1L, config.getLong("x")); } @Test public void testGetMissingLong() { ex.expect(NoSuchElementException.class); ex.expectMessage(config.doesNotMapMessage("x")); config.getLong("x"); } @Test public void testGetLongWithDefault() { assertEquals(1L, config.getLong("x", 1L)); } @Test public void testGetString() { config.setProperty("x", "y"); assertEquals("y", config.getString("x")); } @Test public void testGetMissingString() { ex.expect(NoSuchElementException.class); ex.expectMessage(config.doesNotMapMessage("x")); config.getString("x"); } @Test public void testGetStringWithDefault() { assertEquals("y", config.getString("x", "y")); } @Test public void testGetStringTrimsByDefault() { config.setProperty("x", "\t y \t"); assertEquals("y", config.getString("x")); } @Test public void testGetStringTrims() { config.setProperty("x", "\t y \t"); assertEquals("y", config.getString("x", null, TrimMode.TRIM)); } @Test public void testGetStringWithNoTrim() { config.setProperty("x", "\t y \t"); assertEquals("\t y \t", config.getString("x", null, TrimMode.NO_TRIM)); } @Test public void testGetList() { config.setProperty("x", "a, b, c"); assertEquals(Arrays.asList("a", "b", "c"), config.getList("x")); } @Test public void testGetMissingList() { ex.expect(NoSuchElementException.class); ex.expectMessage(config.doesNotMapMessage("x")); config.getList("x"); } @Test public void testGetListWithDefault() { assertEquals(null, config.getList("x", null)); } @Test public void testGetMissingProperty() { ex.expect(NoSuchElementException.class); ex.expectMessage(config.doesNotMapMessage("x")); config.getProperty("x"); } @Test public void testGetPropertyWithDefault() { assertEquals("z", config.getProperty("x", "z")); } @SuppressWarnings("serial") @Test public void toPropertiesWithDefaults() { Map<String, String> defaults = new HashMap<String, String>(); defaults.put("a", "defaultvalue"); defaults.put("z", "should have a value"); config.setProperty("a", "value1"); config.setProperty("b", "value2"); config.setProperty("c", "value3"); config.setProperty("d", "value4"); Properties p = config.toProperties(defaults); assertEquals(5, p.size()); assertTrue(p.containsKey("a")); assertTrue(p.containsKey("b")); assertTrue(p.containsKey("c")); assertTrue(p.containsKey("d")); assertEquals("value1", p.getProperty("a")); assertEquals("should have a value", p.getProperty("z")); } @SuppressWarnings("serial") @Test public void returnAllKeysWithAPrefixFromTail() { config.setProperty("a.b.a.b", "value"); config.setProperty("a.b.c.d", "value"); config.setProperty("a.c.a.b", "value"); config.setProperty("a.c.c.d", "value"); config.setProperty("a.c.e.f", "value"); Map<String, String> withPrefix = config.subsetMap("a.c"); assertEquals(3, withPrefix.size()); assertTrue(withPrefix.containsKey("a.c.a.b")); assertTrue(withPrefix.containsKey("a.c.c.d")); assertTrue(withPrefix.containsKey("a.c.e.f")); } @SuppressWarnings("serial") @Test public void returnAllKeysWithAPrefixInTheMiddle() { config.setProperty("a.b.a.b", "value"); config.setProperty("a.b.c.d", "value"); config.setProperty("a.c.a.b", "value"); config.setProperty("a.c.c.d", "value"); config.setProperty("a.c.e.f", "value"); config.setProperty("a.d.a.b", "value"); Map<String, String> withPrefix = config.subsetMap("a.c"); assertEquals(3, withPrefix.size()); assertTrue(withPrefix.containsKey("a.c.a.b")); assertTrue(withPrefix.containsKey("a.c.c.d")); assertTrue(withPrefix.containsKey("a.c.e.f")); } @Test public void returnAllKeysWithAPrefixFromHead() { config.setProperty("a.b.a.b", "value"); config.setProperty("a.b.c.d", "value"); config.setProperty("a.b.e.f", "value"); config.setProperty("a.c.a.a", "value"); Map<String, String> withPrefix = config.subsetMap("a.b"); assertEquals(3, withPrefix.size()); assertTrue(withPrefix.containsKey("a.b.a.b")); assertTrue(withPrefix.containsKey("a.b.c.d")); assertTrue(withPrefix.containsKey("a.b.e.f")); } @Test public void testTrimSpaces() { config.setProperty("good", "good"); config.setProperty("bad", " bad "); assertEquals("good", config.getString("good")); assertEquals("bad", config.getString("bad")); } }
true
92cb021c25d9361e4f1b053deaa050145ed8e986
Java
deshamtejasvi/NJITmoodle
/src/update.java
UTF-8
3,124
2.390625
2
[]
no_license
import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import java.util.Date; import java.util.List; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import javax.servlet.ServletException; import java.io.*; public class update extends HttpServlet { /** * */ private static final long serialVersionUID = 1L; Connection connection = null; Statement statement = null; Statement statement1 = null; Connection connection1 = null; String[] courseName = null; protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println("hi"); //DataBaseConnect dataBaseConnect = new DataBaseConnect(); String url = "jdbc:mysql://localhost:3306/score_card"; //String url = "jdbc:mysql://sql9.000webhost.com/"; /** * The MySQL user. */ String user = "root"; //String user="a5137510_andrdu2"; /** * Password for the above MySQL user. If no password has been * set (as is the default for the root user in XAMPP's MySQL), * an empty string can be used. */ String password = ""; //String password="P3000webhost"; try{ Class.forName("com.mysql.jdbc.Driver").newInstance(); //Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); // STEP 3: Open a connection System.out.println("Connecting to database..."); connection = DriverManager.getConnection(url, user, password); System.out.println("Creating statement..."); statement = connection.createStatement(); String userid=request.getParameter("type"); System.out.println(userid); String password1=request.getParameter("password1"); //System.out.println(userid); //HttpSession session1=request.getSession(); //request.getSession().setAttribute("userName", userid); //System.out.println(password1); ResultSet rs=statement.executeQuery("Select count(user_id) as count,designation from user_login where user_name='"+userid+"' and password='"+password1+"'"); //System.out.println("login check"); while(rs.next()){ if (rs.getInt("count") == 0){ request.setAttribute("errorMessage", "Invalid username and password"); request.getRequestDispatcher("/testFile.jsp").forward(request, response); }else{ String designation = rs.getString("designation"); System.out.println(designation); if(designation.equals("student")){ System.out.println("student profile"); request.getRequestDispatcher("/marks.jsp").forward(request, response); } else{ //System.out.println("proceed to login"); //System.out.println(userid); //MyCourse course = new MyCourse(userid); request.getRequestDispatcher("/frame.jsp").forward(request, response); //String courseName=MyCourse(userid); } } } statement.close(); connection.close(); }catch(Exception e){ e.printStackTrace(); } } }
true
2e875042efea51c3ee2d49e271a101493876866e
Java
Xia-24/MyFlinkDemo
/src/main/java/com/meituan/flinkdemo/MafkaOrKafka/LocalKafakProducer.java
UTF-8
1,854
2.578125
3
[]
no_license
package com.meituan.flinkdemo.MafkaOrKafka; import org.apache.kafka.clients.producer.KafkaProducer; import org.apache.kafka.clients.producer.ProducerRecord; import java.util.Properties; import java.util.Random; public class LocalKafakProducer { private Random r = new Random(); public static final String[] HBDM = {"BEF", "CNY", "DEM", "EUR", "HKD", "USD", "ITL"}; public static void main(String[] args) throws InterruptedException { Properties props = new Properties(); props.put("bootstrap.servers", "localhost:9092"); props.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer"); props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer"); KafkaProducer<String, String> producer = new KafkaProducer<>(props); // ProducerRecord<String, String> record = new ProducerRecord<>(“Kafka”, “Kafka_Products”, “测试”);//Topic Key Value int hbdmindex = 0; int num = 0; int cnt = 0; String msg; try { while (true) { //ProducerRecord有多个构造器,这里使用了三个参数的,topic、key、value。 Thread.sleep(1000); if (cnt < 100) { cnt++; msg = String.format("%d,%s,%d", System.currentTimeMillis(), HBDM[hbdmindex], num); } else { cnt = 0; hbdmindex = (hbdmindex + 1) % 7; num = (num + 1) % 10; msg = String.format("%d,%s,%d", System.currentTimeMillis(), HBDM[hbdmindex], num); } producer.send(new ProducerRecord<String, String>("test", "key", msg)); } } catch (Exception e) { producer.close(); } } }
true
23fe61cf956504530c733a7043a79d3a315f4ee9
Java
Kevine97/Prograamacion-en-JAVA
/POO_Sistematico/src/poo_sistematico/POO_Sistematico.java
UTF-8
8,219
3.4375
3
[]
no_license
package poo_sistematico; import java.util.Scanner; public class POO_Sistematico { //Metodo para verificar si el numero de cuenta existe public static int buscarCuenta(Cuenta t[], int numeroCuenta, int contadorCuenta) { int indice = 0; boolean encontrado = false; for (int i = 0; i < contadorCuenta; i++) { if (t[i].getNumeroCuenta() == numeroCuenta) { indice = i; encontrado = true; } } if (encontrado == false) { indice = -1; } return indice; } public static void main(String[] args) { Scanner entrada = new Scanner(System.in); String nombre, dni, sexo; double saldo, cantidad, cantidad1; int numeroCuenta, opc, opc1; int contador = 0, edad; int contadorPersona = 0; int indiceCuenta; //Clase menu Menus menu = new Menus(); Persona persona = new Persona(); Cuenta cuenta[] = new Cuenta[60]; Persona persona2[] = new Persona[60]; try { do { menu.menu(); menu.consultar1(); menu.menu2(); opc = entrada.nextInt(); switch (opc) { case 1: menu.cliente(); entrada.nextLine(); System.out.print("\n\t\tIngrese el Nombre: "); nombre = entrada.nextLine(); System.out.print("\t\tIngrese DNI: "); dni = entrada.nextLine(); System.out.print("\t\tIngrese Edad: "); edad = entrada.nextInt(); if (persona.mayorEdad(edad) == true) { entrada.nextLine(); System.out.print("\t\tIngrese el Sexo(H-M): "); sexo = entrada.nextLine(); menu.cuenta1(); System.out.print("\n\t\tNumero de cuenta: "); numeroCuenta = entrada.nextInt(); System.out.print("\t\tSaldo a depositar: "); saldo = entrada.nextDouble(); cuenta[contador++] = new Cuenta(saldo, numeroCuenta); persona2[contadorPersona] = new Persona(nombre, edad, dni, sexo, cuenta); System.out.println("\n\t\t═════════════════════════════════════"); System.out.println("\t\t\tRealizado correctamente ..."); System.out.println("\t\t\tSaldo: " + persona2[contadorPersona].consultarSaldo(contadorPersona)); System.out.println("\t\t═════════════════════════════════════"); contadorPersona++; } else { System.out.println("\t\tNo es mayor de edad para crear una cuenta"); } break; case 2: menu.cuenta(); for (int i = 0; i < contador; i++) { System.out.println("Cuenta: " + (i + 1)); System.out.println(cuenta[i].mostrarCuenta()); System.out.println(persona2[i].persona()); System.out.println("\t═════════════════════════════════"); } break; case 3: menu.consultar1(); menu.menu3(); opc1 = entrada.nextInt(); System.out.print("\t\tIngrese el numero de cuenta: "); numeroCuenta = entrada.nextInt(); indiceCuenta = buscarCuenta(cuenta, numeroCuenta, contador); if (indiceCuenta == -1) { System.out.println("\t\tNumero de cuenta incorrecto"); } else { switch (opc1) { case 1: menu.ingresar(); System.out.print("\n\n\t\tSaldo a ingresar: "); cantidad = entrada.nextDouble(); persona2[indiceCuenta].ingresarDinero(indiceCuenta, cantidad); System.out.println("\n\t\t═════════════════════════════════════"); System.out.println("\t\t\tRealizado correctamente ..."); System.out.println("\t\t\tSaldo: " + persona2[indiceCuenta].consultarSaldo(indiceCuenta)); System.out.println("\t\t═════════════════════════════════════"); break; case 2: menu.retirar(); System.out.print("\n\n\t\tSaldo a retirar: "); cantidad1 = entrada.nextDouble(); if (cantidad1 > persona2[indiceCuenta].consultarSaldo(indiceCuenta)) { System.out.println("\n\t\t S A L D O I N S U F I C I E N T E"); } else { persona2[indiceCuenta].retirarDinero(indiceCuenta, cantidad1); System.out.println("\n\t\t═════════════════════════════════════"); System.out.println("\t\t\tRealizado correctamente ..."); System.out.println("\t\t\tSaldo: " + persona2[indiceCuenta].consultarSaldo(indiceCuenta)); System.out.println("\t\t═════════════════════════════════════"); } break; case 3: menu.consultar(); System.out.println("\n\t\t═════════════════════════════════════"); System.out.println("\t\t\tRealizado correctamente ..."); System.out.println("\t\t\tSaldo: " + persona2[indiceCuenta].consultarSaldo(indiceCuenta)); System.out.println("\t\t═════════════════════════════════════"); break; case 4: break; default: System.out.println("\t\tOpcion Incorrecta"); } break; } case 4: break; default: System.out.println("Opcion Incorrecta"); } system("pause"); } while (opc != 4); } catch (Exception e) { System.out.println("Error: " + e); } } public static void system(String command) { try { new ProcessBuilder("cmd", "/c", command) .inheritIO().start().waitFor(); } catch (Exception e) { } } }
true
43445238614f2aca36e7b10460d9331c0b6302a0
Java
gengrz/standard
/src/com/fox/FollowTest.java
UTF-8
906
2.4375
2
[]
no_license
package com.fox; import java.util.HashSet; import java.util.List; import java.util.Set; import com.alibaba.fastjson.JSONObject; import cn.hutool.core.io.FileUtil; public class FollowTest { public static void main(String[] args) { String listStr = FileUtil.readString("./follow.json", "utf-8"); List<PhoneData> pd = JSONObject.parseArray(listStr, PhoneData.class); pd.sort((o1, o2) -> o1.getDataTime() .compareTo(o2.getDataTime())); System.out.println(pd.size()); int id = 0; for (PhoneData phoneData : pd) { System.out.println(phoneData.toString()); phoneData.setId(id); id++; } // for (PhoneData phoneData : pd) { // System.out.println(phoneData.getId() ); // } // for (PhoneData phoneData : pd) { // System.out.println( phoneData.getLatitude() ); // } // for (PhoneData phoneData : pd) { // System.out.println(phoneData.getLongitude()); // } } }
true
46b8780700bb188c846960e423db5fc2c03ec62d
Java
GuoEH/WRichEditor-Android
/library/src/main/java/cn/carbs/wricheditor/library/utils/ParserUtil.java
UTF-8
15,183
2.046875
2
[ "Apache-2.0" ]
permissive
package cn.carbs.wricheditor.library.utils; import android.content.Context; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import org.json.JSONArray; import org.json.JSONObject; import java.util.ArrayList; import java.util.LinkedList; import java.util.regex.Matcher; import java.util.regex.Pattern; import cn.carbs.wricheditor.library.WRichEditor; import cn.carbs.wricheditor.library.WEditTextWrapperView; import cn.carbs.wricheditor.library.interfaces.BaseCellData; import cn.carbs.wricheditor.library.interfaces.IRichCellData; import cn.carbs.wricheditor.library.interfaces.IRichCellView; import cn.carbs.wricheditor.library.models.cell.AudioCellData; import cn.carbs.wricheditor.library.models.cell.ImageCellData; import cn.carbs.wricheditor.library.models.cell.LineCellData; import cn.carbs.wricheditor.library.models.cell.NetDiskCellData; import cn.carbs.wricheditor.library.models.cell.RichCellData; import cn.carbs.wricheditor.library.models.cell.VideoCellData; import cn.carbs.wricheditor.library.providers.CustomViewProvider; import cn.carbs.wricheditor.library.types.RichType; import cn.carbs.wricheditor.library.views.RichAudioView; import cn.carbs.wricheditor.library.views.RichImageView; import cn.carbs.wricheditor.library.views.RichLineView; import cn.carbs.wricheditor.library.views.RichNetDiskView; import cn.carbs.wricheditor.library.views.RichVideoView; public class ParserUtil { public static final String P_JSON_PREV = "["; public static final String P_JSON_POST = "]"; public static final String P_TAG_PREV = "<p>"; public static final String P_TAG_POST = "</p>"; public static final String PATTERN_BODY_STR = "<body>.*</body>"; public static final Pattern PATTERN_BODY = Pattern.compile(PATTERN_BODY_STR); public static final String PATTERN_DIV_CELL_VIEW_STR = "<div richType=\".*?</div>"; public static final Pattern PATTERN_DIV_CELL_VIEW = Pattern.compile(PATTERN_DIV_CELL_VIEW_STR); public static final String PATTERN_DIV_RICH_TYPE_STR = "<div richType=\".*?\">"; public static final Pattern PATTERN_DIV_RICH_TYPE = Pattern.compile(PATTERN_DIV_RICH_TYPE_STR); public static StringBuilder parseToHtml(WRichEditor scrollView) { StringBuilder out = new StringBuilder(); if (scrollView == null || scrollView.getContainerView() == null) { return out; } ViewGroup containerView = scrollView.getContainerView(); int childCount = containerView.getChildCount(); ArrayList<IRichCellData> dataList = new ArrayList<>(childCount); for (int i = 0; i < childCount; i++) { View childView = containerView.getChildAt(i); if (childView instanceof IRichCellView) { IRichCellView richCellView = (IRichCellView) childView; IRichCellData iRichCellData = richCellView.getCellData(); if (iRichCellData == null) { continue; } dataList.add(iRichCellData); } } for (IRichCellData richCellData : dataList) { out.append(P_TAG_PREV + richCellData.toHtml() + P_TAG_POST); } return out; } public static StringBuilder parseToJson(WRichEditor scrollView) { StringBuilder out = new StringBuilder(); if (scrollView == null || scrollView.getContainerView() == null) { return out; } ViewGroup containerView = scrollView.getContainerView(); int childCount = containerView.getChildCount(); ArrayList<IRichCellData> dataList = new ArrayList<>(childCount); for (int i = 0; i < childCount; i++) { View childView = containerView.getChildAt(i); if (childView instanceof IRichCellView) { IRichCellView richCellView = (IRichCellView) childView; IRichCellData iRichCellData = richCellView.getCellData(); if (iRichCellData == null) { continue; } dataList.add(iRichCellData); } } int listCount = dataList.size(); out.append(P_JSON_PREV); for (int j = 0; j < listCount; j++) { out.append(dataList.get(j).toJson()); if (j < listCount - 1) { out.append(","); } } out.append(P_JSON_POST); return out; } // TODO 由html转换回富文本编辑器比较复杂,因此先使用json的方式 public static void inflateFromHtml(Context context, WRichEditor scrollView, String html, CustomViewProvider provider) { if (html == null || html.trim().length() == 0 || scrollView == null) { return; } String bodyContent; Matcher matcherBody = PATTERN_BODY.matcher(html); if (matcherBody.find()) { String bodyHtml = matcherBody.group(0); bodyContent = getBodyContent(bodyHtml); } else { bodyContent = html; } ArrayList<String> cellStringList = new ArrayList<>(); Matcher matcherCellView = PATTERN_DIV_CELL_VIEW.matcher(bodyContent); while (matcherCellView.find()) { for (int i = 0; i <= matcherCellView.groupCount(); i++) { // <div richType="NONE">文字</div> // <div richType="IMAGE"><picture><img src="https://xx.com/xx.jpg"></picture></div> String cellString = matcherCellView.group(i); cellStringList.add(cellString); } } for (String cellString : cellStringList) { IRichCellView cellView = inflateCellViewByCellHtml(context, cellString, provider); LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); scrollView.addRichCell(cellView, lp, -1); } scrollView.addNoneTypeTailOptionally(); } // TODO 由html转换回富文本编辑器比较复杂,因此先使用json的方式 public static void inflateFromJson(Context context, WRichEditor scrollView, String json, CustomViewProvider provider) { if (json == null || json.trim().length() == 0 || scrollView == null) { return; } LinkedList<BaseCellData> cellDataList = new LinkedList<>(); try { JSONArray jsonArray = new JSONArray(json); int length = jsonArray.length(); for (int i = 0; i < length; i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); BaseCellData cellData = getCellDataByJSONObject(jsonObject); if (cellData != null) { cellDataList.add(cellData); } } } catch (Exception e) { e.printStackTrace(); } for (BaseCellData cellData : cellDataList) { IRichCellView cellView = inflateCellViewByCellData(context, cellData, provider); LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); scrollView.addRichCell(cellView, lp, -1); } scrollView.addNoneTypeTailOptionally(); } private static BaseCellData getCellDataByJSONObject(JSONObject jsonObject) { BaseCellData cellData = null; try { String type = jsonObject.getString(BaseCellData.JSON_KEY_TYPE); RichType richType = RichType.valueOf(type); if (richType == RichType.NONE) { cellData = new RichCellData(); } else if (richType == RichType.QUOTE) { cellData = new RichCellData(); } else if (richType == RichType.LIST_UNORDERED) { cellData = new RichCellData(); } else if (richType == RichType.LIST_ORDERED) { cellData = new RichCellData(); } else if (richType == RichType.IMAGE) { cellData = new ImageCellData(); } else if (richType == RichType.VIDEO) { cellData = new VideoCellData(); } else if (richType == RichType.AUDIO) { cellData = new AudioCellData(); } else if (richType == RichType.NETDISK) { cellData = new NetDiskCellData(); } else if (richType == RichType.LINE) { cellData = new LineCellData(); } if (cellData != null) { // 数据填充 cellData.fromJson(jsonObject); } } catch (Exception e) { e.printStackTrace(); } return cellData; } private static String getBodyContent(String bodyHtml) { if (bodyHtml == null) { return ""; } try { return bodyHtml.substring(6, bodyHtml.length() - 7); } catch (Exception e) { e.printStackTrace(); } return ""; } private static IRichCellView inflateCellViewByCellHtml(Context context, String cellHtml, CustomViewProvider provider) { int[] cellContentHtmlStart = new int[1]; RichType cellRichType = getRichTypeByCellHtml(cellHtml, cellContentHtmlStart); return inflateCellViewByRichTypeAndHtml(context, cellRichType, cellHtml, cellContentHtmlStart[0], provider); } private static IRichCellView inflateCellViewByCellData(Context context, BaseCellData cellData, CustomViewProvider provider) { RichType richType = cellData.getRichType(); if (richType == null || context == null) { return null; } IRichCellView iRichCellView = null; if (richType == RichType.NONE) { // 普通的富文本 iRichCellView = new WEditTextWrapperView(context); } else if (richType == RichType.QUOTE) { iRichCellView = new WEditTextWrapperView(context); } else if (richType == RichType.LIST_UNORDERED) { iRichCellView = new WEditTextWrapperView(context); } else if (richType == RichType.LIST_ORDERED) { iRichCellView = new WEditTextWrapperView(context); } else if (richType == RichType.IMAGE) { if (provider == null || provider.getCellViewByRichType(richType) == null) { iRichCellView = new RichImageView(context); } else { iRichCellView = provider.getCellViewByRichType(richType); } } else if (richType == RichType.LINE) { if (provider == null || provider.getCellViewByRichType(richType) == null) { iRichCellView = new RichLineView(context); } else { iRichCellView = provider.getCellViewByRichType(richType); } } else if (richType == RichType.VIDEO) { if (provider == null || provider.getCellViewByRichType(richType) == null) { iRichCellView = new RichVideoView(context); } else { iRichCellView = provider.getCellViewByRichType(richType); } } else if (richType == RichType.AUDIO) { if (provider == null || provider.getCellViewByRichType(richType) == null) { iRichCellView = new RichAudioView(context); } else { iRichCellView = provider.getCellViewByRichType(richType); } } else if (richType == RichType.NETDISK) { if (provider == null || provider.getCellViewByRichType(richType) == null) { iRichCellView = new RichNetDiskView(context); } else { iRichCellView = provider.getCellViewByRichType(richType); } } // 这里为View填充数据 iRichCellView.setCellData(cellData); return iRichCellView; } // 注册自定义 CellView private static IRichCellView inflateCellViewByRichTypeAndHtml(Context context, RichType richType, String cellHtml, int contentStart, CustomViewProvider provider) { if (richType == null || context == null) { return null; } IRichCellView iRichCellView = null; if (richType == RichType.NONE) { // 普通的富文本 iRichCellView = new WEditTextWrapperView(context); } else if (richType == RichType.QUOTE) { iRichCellView = new WEditTextWrapperView(context); } else if (richType == RichType.LIST_UNORDERED) { iRichCellView = new WEditTextWrapperView(context); } else if (richType == RichType.LIST_ORDERED) { iRichCellView = new WEditTextWrapperView(context); } else if (richType == RichType.IMAGE) { if (provider == null || provider.getCellViewByRichType(richType) == null) { iRichCellView = new RichImageView(context); } else { iRichCellView = provider.getCellViewByRichType(richType); } } else if (richType == RichType.LINE) { if (provider == null || provider.getCellViewByRichType(richType) == null) { iRichCellView = new RichLineView(context); } else { iRichCellView = provider.getCellViewByRichType(richType); } } else if (richType == RichType.VIDEO) { if (provider == null || provider.getCellViewByRichType(richType) == null) { iRichCellView = new RichVideoView(context); } else { iRichCellView = provider.getCellViewByRichType(richType); } } else if (richType == RichType.AUDIO) { if (provider == null || provider.getCellViewByRichType(richType) == null) { iRichCellView = new RichAudioView(context); } else { iRichCellView = provider.getCellViewByRichType(richType); } } else if (richType == RichType.NETDISK) { if (provider == null || provider.getCellViewByRichType(richType) == null) { iRichCellView = new RichNetDiskView(context); } else { iRichCellView = provider.getCellViewByRichType(richType); } } // 去掉div iRichCellView.setHtmlData(richType, cellHtml.substring(contentStart, cellHtml.length() - 6)); return iRichCellView; } private static RichType getRichTypeByCellHtml(String cellHtml, int[] start) { // <div richType="IMAGE"> Matcher matcherRichType = PATTERN_DIV_RICH_TYPE.matcher(cellHtml); if (matcherRichType.find()) { // <div richType="NONE">文字</div> // <div richType="IMAGE"><picture><img src="https://xx.com/xx.jpg"></picture></div> String cellRichTypeDivStr = matcherRichType.group(0); start[0] = cellRichTypeDivStr.length(); if (cellRichTypeDivStr != null) { String richTypeStr = cellRichTypeDivStr.substring(15, cellRichTypeDivStr.length() - 2); return RichType.valueOf(richTypeStr); } } return null; } }
true
ce60340176143aa314c0e7038dce4caa5734766a
Java
apache/lucene
/lucene/core/src/java/org/apache/lucene/util/LongsRef.java
UTF-8
5,231
2.875
3
[ "Apache-2.0", "MIT", "NAIST-2003", "BSD-3-Clause", "BSD-2-Clause", "LicenseRef-scancode-unicode", "LGPL-2.0-or-later", "ICU", "LicenseRef-scancode-unicode-mappings", "CC-BY-SA-3.0", "Python-2.0", "LicenseRef-scancode-other-copyleft" ]
permissive
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.lucene.util; import java.util.Arrays; /** * Represents long[], as a slice (offset + length) into an existing long[]. The {@link #longs} * member should never be null; use {@link #EMPTY_LONGS} if necessary. * * @lucene.internal */ public final class LongsRef implements Comparable<LongsRef>, Cloneable { /** An empty long array for convenience */ public static final long[] EMPTY_LONGS = new long[0]; /** The contents of the LongsRef. Should never be {@code null}. */ public long[] longs; /** Offset of first valid long. */ public int offset; /** Length of used longs. */ public int length; /** Create a LongsRef with {@link #EMPTY_LONGS} */ public LongsRef() { longs = EMPTY_LONGS; } /** * Create a LongsRef pointing to a new array of size <code>capacity</code>. Offset and length will * both be zero. */ public LongsRef(int capacity) { longs = new long[capacity]; } /** This instance will directly reference longs w/o making a copy. longs should not be null */ public LongsRef(long[] longs, int offset, int length) { this.longs = longs; this.offset = offset; this.length = length; assert isValid(); } /** * Returns a shallow clone of this instance (the underlying longs are <b>not</b> copied and will * be shared by both the returned object and this object. * * @see #deepCopyOf */ @Override public LongsRef clone() { return new LongsRef(longs, offset, length); } @Override public int hashCode() { final int prime = 31; int result = 0; final long end = (long) offset + length; for (int i = offset; i < end; i++) { result = prime * result + (int) (longs[i] ^ (longs[i] >>> 32)); } return result; } @Override public boolean equals(Object other) { if (other == null) { return false; } if (other instanceof LongsRef) { return this.longsEquals((LongsRef) other); } return false; } public boolean longsEquals(LongsRef other) { return Arrays.equals( this.longs, this.offset, this.offset + this.length, other.longs, other.offset, other.offset + other.length); } /** Signed int order comparison */ @Override public int compareTo(LongsRef other) { return Arrays.compare( this.longs, this.offset, this.offset + this.length, other.longs, other.offset, other.offset + other.length); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append('['); final long end = (long) offset + length; for (int i = offset; i < end; i++) { if (i > offset) { sb.append(' '); } sb.append(Long.toHexString(longs[i])); } sb.append(']'); return sb.toString(); } /** * Creates a new LongsRef that points to a copy of the longs from <code>other</code> * * <p>The returned IntsRef will have a length of other.length and an offset of zero. */ public static LongsRef deepCopyOf(LongsRef other) { return new LongsRef( ArrayUtil.copyOfSubArray(other.longs, other.offset, other.offset + other.length), 0, other.length); } /** Performs internal consistency checks. Always returns true (or throws IllegalStateException) */ public boolean isValid() { if (longs == null) { throw new IllegalStateException("longs is null"); } if (length < 0) { throw new IllegalStateException("length is negative: " + length); } if (length > longs.length) { throw new IllegalStateException( "length is out of bounds: " + length + ",longs.length=" + longs.length); } if (offset < 0) { throw new IllegalStateException("offset is negative: " + offset); } if (offset > longs.length) { throw new IllegalStateException( "offset out of bounds: " + offset + ",longs.length=" + longs.length); } if (offset + length < 0) { throw new IllegalStateException( "offset+length is negative: offset=" + offset + ",length=" + length); } if (offset + length > longs.length) { throw new IllegalStateException( "offset+length out of bounds: offset=" + offset + ",length=" + length + ",longs.length=" + longs.length); } return true; } }
true
1ee20ff566e5f0d646477abd8a37b2b3a74206fc
Java
HsuJv/Note
/Code/Java/Se2/Chapter 03/Exercise 01/Solution/TaskProcessor.java
UTF-8
199
2.4375
2
[]
no_license
package chapter03; public class TaskProcessor<X> { private X value; public TaskProcessor(X v) { value = v; } public X getTaskP() { return value; } }
true
66f8e8f7c1d11a2d4415b9b0e116a0af0c4db43a
Java
JarekSobczak/fileToDataBaseManager
/src/main/java/pl/brite/ownProject/fileToDb/service/JsonService.java
UTF-8
807
2.328125
2
[]
no_license
package pl.brite.ownProject.fileToDb.service; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import pl.brite.ownProject.fileToDb.model.Customer; import java.io.File; import java.io.IOException; import java.util.List; public class JsonService { private List<Customer> customers; public JsonService(List<Customer> customers) { this.customers = customers; } void mapJson(File file) { ObjectMapper om = new ObjectMapper(); om.registerModule(new JavaTimeModule()); try { customers.addAll(om.readValue(file, new com.fasterxml.jackson.core.type.TypeReference<List<Customer>>() { })); } catch (IOException e) { e.printStackTrace(); } } }
true
0c0c603c601244ee1fbac28b6666879301ee603e
Java
gbonk/HermesJMS
/src/java/org/objectweb/joram/client/jms/admin/Subscription.java
UTF-8
332
1.523438
2
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
package org.objectweb.joram.client.jms.admin; public class Subscription { public Object getTopicId() { // TODO Auto-generated method stub return null; } public String getName() { // TODO Auto-generated method stub return null; } public String isDurable() { // TODO Auto-generated method stub return null; } }
true
ce63d05923adc9a735f3c88694e58ecb6b2e5ed0
Java
tahametal/HR-Manager
/src/main/java/com/sqli/rh_manager/entities/Bu.java
UTF-8
1,561
2.1875
2
[]
no_license
package com.sqli.rh_manager.entities; // Generated Dec 19, 2013 6:37:54 PM by Hibernate Tools 3.2.1.GA import java.util.HashSet; import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id; import javax.persistence.OneToMany; import javax.persistence.Table; /** * Bu generated by hbm2java */ @Entity @Table(name="bu" ,catalog="rh_manager" ) public class Bu implements java.io.Serializable { private int id; private String bu; private Set<Collaborateur> collaborateurs = new HashSet<Collaborateur>(0); public Bu() { } public Bu(int id) { this.id = id; } public Bu(int id, String bu, Set<Collaborateur> collaborateurs) { this.id = id; this.bu = bu; this.collaborateurs = collaborateurs; } @Id @Column(name="Id", unique=true, nullable=false) public int getId() { return this.id; } public void setId(int id) { this.id = id; } @Column(name="BU", length=254) public String getBu() { return this.bu; } public void setBu(String bu) { this.bu = bu; } @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="bu") public Set<Collaborateur> getCollaborateurs() { return this.collaborateurs; } public void setCollaborateurs(Set<Collaborateur> collaborateurs) { this.collaborateurs = collaborateurs; } }
true
daecaa36d9c7e52db7c2a0d782757d54905b7930
Java
wjW901314/ERP
/src/main/java/com/wd/erp/service/impl/BasisUserRoleServiceImpl.java
UTF-8
2,391
2.171875
2
[]
no_license
package com.wd.erp.service.impl; import com.wd.erp.mapper.BasisUserRoleMapper; import com.wd.erp.model.BasisUserRole; import com.wd.erp.model.ResultJson; import com.wd.erp.service.BasisUserRoleService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.StringUtils; import java.util.List; @Service public class BasisUserRoleServiceImpl implements BasisUserRoleService { @Autowired BasisUserRoleMapper basisUserRoleMapper; @Override public ResultJson addUserRole(BasisUserRole recode) { ResultJson resultJson = new ResultJson(); resultJson.setCode(-1); resultJson.setSuccess(false); resultJson.setMsg("添加用户角色失败!"); if(StringUtils.isEmpty(recode.getLoginName())){ resultJson.setMsg("用户名不能为空!"); return resultJson; } int i = basisUserRoleMapper.insert(recode); if(i == 1){ resultJson.setCode(0); resultJson.setSuccess(true); resultJson.setMsg("添加用户角色成功!"); resultJson.setData(i); } return resultJson; } @Override public ResultJson getAll() { ResultJson resultJson = new ResultJson(); resultJson.setCode(-1); resultJson.setMsg("查询失败!"); resultJson.setSuccess(false); List<BasisUserRole> list = basisUserRoleMapper.getAll(); if(list.size() >= 0){ resultJson.setCode(0); resultJson.setSuccess(true); resultJson.setMsg("查询成功!"); resultJson.setData(list); } return resultJson; } @Override public ResultJson deleteUserRole(String id) { ResultJson resultJson = new ResultJson(); resultJson.setCode(-1); resultJson.setSuccess(false); resultJson.setMsg("删除用户角色失败!"); if(StringUtils.isEmpty(id)){ resultJson.setMsg("id不能为空!"); return resultJson; } int i = basisUserRoleMapper.deleteByPrimaryKey(id); if(i == 1){ resultJson.setCode(0); resultJson.setSuccess(true); resultJson.setMsg("删除用户角色成功!"); resultJson.setData(i); } return resultJson; } }
true
70ad9d5fb464df2f0e488069af37e7ed46d37829
Java
termxz/LiveReport
/src/main/java/io/termxz/bungee/LiveBridge.java
UTF-8
1,180
2.21875
2
[]
no_license
package io.termxz.bungee; import net.md_5.bungee.api.event.PluginMessageEvent; import net.md_5.bungee.api.plugin.Listener; import net.md_5.bungee.api.plugin.Plugin; import net.md_5.bungee.event.EventHandler; public class LiveBridge extends Plugin implements Listener { private static final String CHANNEL_NAME_IN = "livereport:bungee"; private static final String CHANNEL_NAME_OUT = "livereport:spigot"; @Override public void onEnable() { getProxy().registerChannel(CHANNEL_NAME_IN); getProxy().registerChannel(CHANNEL_NAME_OUT); getProxy().getPluginManager().registerListener(this, this); } @Override public void onDisable() { getProxy().unregisterChannel(CHANNEL_NAME_IN); getProxy().registerChannel(CHANNEL_NAME_OUT); } /* Data Received & Distributed: 0 SERVER_NAME 1 REPORTER 2 OFFENDER 3 REASON 4 TYPE */ @EventHandler public void onReceive(PluginMessageEvent e) { if(!e.getTag().equals(CHANNEL_NAME_IN)) return; getProxy().getServers().values().forEach(serverInfo -> serverInfo.sendData(CHANNEL_NAME_OUT, e.getData(), true)); } }
true
4276af7283af57483fd96e343177a8741f496a7c
Java
NicoCometta/TP1_AlgoBay_java
/src/fiuba/algo3/AlgoBay/AlgoBay.java
UTF-8
1,760
2.953125
3
[]
no_license
package fiuba.algo3.AlgoBay; import com.sun.org.apache.regexp.internal.RE; import java.util.ArrayList; /** * Created by nico on 29/10/17. */ public class AlgoBay { private ArrayList<Producto> listaProductos; public AlgoBay(){ this.listaProductos = new ArrayList<>(); } public int getCantidadDeProductos() { return this.listaProductos.size(); } public Producto agregarProductoConPrecio(String nombreProducto, double precioProducto) { Producto nuevoProducto = new Producto(nombreProducto, precioProducto); this.listaProductos.add(nuevoProducto); return nuevoProducto; } public Producto getProducto(String nombreProducto) { for (Producto unProducto: this.listaProductos) { if (unProducto.Eres(nombreProducto)) return unProducto; } return null; } public Compra crearNuevaCompra() { return Compra.crearCompraSimple(); } public void agregarProductoEnCompra(Producto unProducto, Compra unaCompra) { unaCompra.agregarProducto(unProducto); } public double getPrecioTotalDe(Compra unaCompra) { return unaCompra.getPrecio(); } public Compra crearNuevaCompraConEnvio() { return Compra.crearCompraConEnvio(); } public Compra crearNuevaCompraConGarantia() { return Compra.crearCompraConGarantia(); } public Compra crearNuevaCompraConEnvioYGarantia() { return Compra.crearCompraConGarantiaYEnvio(); } public Cupon crearCuponConPorcentaje(int unDescuento) { return (new Cupon(unDescuento)); } public void agregarCuponEnCompra(Cupon unCupon, Compra unaCompra) { unaCompra.agregarCupon(unCupon); } }
true
f29d2698e0b9287c7488e897be92d41fd1d1aae7
Java
pcieszynski/tablettop-rpg
/src/main/java/com/ender/tablettop/service/dto/PlayerMessageDTO.java
UTF-8
2,840
2.484375
2
[]
no_license
package com.ender.tablettop.service.dto; import java.io.Serializable; import java.util.Objects; import javax.persistence.Lob; /** * A DTO for the PlayerMessage entity. */ public class PlayerMessageDTO implements Serializable { private Long id; @Lob private String message; private String attack; private Integer heal; private Integer difficulty; private Boolean success; private String attribute; private Long playerId; private Long eventId; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public String getAttack() { return attack; } public void setAttack(String attack) { this.attack = attack; } public Integer getHeal() { return heal; } public void setHeal(Integer heal) { this.heal = heal; } public Integer getDifficulty() { return difficulty; } public void setDifficulty(Integer difficulty) { this.difficulty = difficulty; } public Boolean isSuccess() { return success; } public void setSuccess(Boolean success) { this.success = success; } public String getAttribute() { return attribute; } public void setAttribute(String attribute) { this.attribute = attribute; } public Long getPlayerId() { return playerId; } public void setPlayerId(Long playerId) { this.playerId = playerId; } public Long getEventId() { return eventId; } public void setEventId(Long eventId) { this.eventId = eventId; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } PlayerMessageDTO playerMessageDTO = (PlayerMessageDTO) o; if (playerMessageDTO.getId() == null || getId() == null) { return false; } return Objects.equals(getId(), playerMessageDTO.getId()); } @Override public int hashCode() { return Objects.hashCode(getId()); } @Override public String toString() { return "PlayerMessageDTO{" + "id=" + getId() + ", message='" + getMessage() + "'" + ", attack='" + getAttack() + "'" + ", heal=" + getHeal() + ", difficulty=" + getDifficulty() + ", success='" + isSuccess() + "'" + ", attribute='" + getAttribute() + "'" + ", player=" + getPlayerId() + ", event=" + getEventId() + "}"; } }
true
5fea233b097ff9edc5685c7e060b20ae5979e813
Java
miguellysanchez/realmexamples
/app/src/main/java/com/example/realmexample/part2/realmobjects/DogRO.java
UTF-8
690
2.625
3
[]
no_license
package com.example.realmexample.part2.realmobjects; import io.realm.RealmObject; import io.realm.annotations.PrimaryKey; /** * Created by miguellysanchez on 8/7/17. */ public class DogRO extends RealmObject { @PrimaryKey private String name; private String breed; private int age; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getBreed() { return breed; } public void setBreed(String breed) { this.breed = breed; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } }
true
98f1e6263111d3fd85a0f3ada284d889ab2d535d
Java
apotukareon/hibersap
/hibersap-core/src/main/java/org/hibersap/configuration/xml/Property.java
UTF-8
3,039
2.1875
2
[ "Apache-2.0" ]
permissive
/* * Copyright (c) 2008-2019 akquinet tech@spree GmbH * * This file is part of Hibersap. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.hibersap.configuration.xml; import java.io.Serializable; import javax.annotation.Generated; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "") public class Property implements Serializable { @XmlAttribute(required = true) protected String name; @XmlAttribute(required = true) protected String value; @SuppressWarnings({"UnusedDeclaration"}) public Property() { } public Property(final String name, final String value) { this.name = name; this.value = value; } /** * Gets the value of the name properties. * * @return possible object is * {@link String } */ public String getName() { return name; } /** * Sets the value of the name properties. * * @param value allowed object is * {@link String } */ public void setName(final String value) { this.name = value; } /** * Gets the value of the value properties. * * @return possible object is * {@link String } */ public String getValue() { return value; } /** * Sets the value of the value properties. * * @param value allowed object is * {@link String } */ public void setValue(final String value) { this.value = value; } @Override public String toString() { return "(" + name + " => " + value + ")"; } @Override @Generated("") public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Property property = (Property) o; if (name != null ? !name.equals(property.name) : property.name != null) { return false; } if (value != null ? !value.equals(property.value) : property.value != null) { return false; } return true; } @Override @Generated("") public int hashCode() { int result = name != null ? name.hashCode() : 0; result = 31 * result + (value != null ? value.hashCode() : 0); return result; } }
true
622cf2cfc24e77fd2cd0b5650b519ef77bac29d2
Java
percussion/percussioncms
/projects/sitemanage/src/main/java/com/percussion/sitemanage/data/PSSiteImportCtx.java
UTF-8
6,337
1.875
2
[ "LicenseRef-scancode-dco-1.1", "Apache-2.0", "OFL-1.1", "LGPL-2.0-or-later" ]
permissive
/* * Copyright 1999-2023 Percussion Software, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * limitations under the License. */ package com.percussion.sitemanage.data; import com.percussion.sitemanage.importer.IPSSiteImportLogger; import com.percussion.sitesummaryservice.service.IPSSiteImportSummaryService; import com.percussion.theme.data.PSThemeSummary; import java.util.Map; /** * @author LucasPiccoli * */ public class PSSiteImportCtx { String siteUrl; PSSite site; IPSSiteImportLogger logger; IPSSiteImportSummaryService summaryService; Map<IPSSiteImportSummaryService.SiteImportSummaryTypeEnum, Integer> summaryStats; PSThemeSummary themeSummary; String themesRootDirectory; String templateId = null; String pageName; String catalogedPageId; String templateName; String statusMessagePrefix; String userAgent; boolean isCanceled = false; /** * @return the siteUrl */ public String getSiteUrl() { return siteUrl; } /** * @param siteUrl the siteUrl to set */ public void setSiteUrl(String siteUrl) { this.siteUrl = siteUrl; } /** * @return the site */ public PSSite getSite() { return site; } /** * @param site the site to set */ public void setSite(PSSite site) { this.site = site; } /** * Set logger on the context. * * @param logger The logger, never <code>null</code> */ public void setLogger(IPSSiteImportLogger logger) { this.logger = logger; } /** * Get the current logger. * * @return The logger, never <code>null</code>. * @throws IllegalStateException if no logger has been set. */ public IPSSiteImportLogger getLogger() { if (logger == null) throw new IllegalStateException("logger has not been set"); return logger; } public IPSSiteImportSummaryService getSummaryService() { return summaryService; } public void setSummaryService(IPSSiteImportSummaryService summaryService) { this.summaryService = summaryService; } /** * @return the theme summary */ public PSThemeSummary getThemeSummary() { return themeSummary; } /** * @param themeSummary the new summary to assign */ public void setThemeSummary(PSThemeSummary themeSummary) { this.themeSummary = themeSummary; } /** * @return the themes root directory absolute path */ public String getThemesRootDirectory() { return themesRootDirectory; } /** * @param themesRootDirectory the themes root directory absolute path */ public void setThemesRootDirectory(String themesRootDirectory) { this.themesRootDirectory = themesRootDirectory; } /** * Get the id of the template if one was created during the import process. * * @return The id, or <code>null</code> if a template was not created. */ public String getTemplateId() { return templateId; } /** * Set the id of the template if one was created during the import process, must * be called in order for an import log to be saved. * * @param templateId The template id. */ public void setTemplateId(String templateId) { this.templateId = templateId; } /** * @return the pageName */ public String getPageName() { return pageName; } /** * @param pageName the pageName to set */ public void setPageName(String pageName) { this.pageName = pageName; } /** * @return the templateName */ public String getTemplateName() { return templateName; } /** * @param templateName the templateName to set */ public void setTemplateName(String templateName) { this.templateName = templateName; } /** * @return the statusMessagePrefix */ public String getStatusMessagePrefix() { return statusMessagePrefix; } /** * @param statusMessagePrefix the statusMessagePrefix to set */ public void setStatusMessagePrefix(String statusMessagePrefix) { this.statusMessagePrefix = statusMessagePrefix; } /** * @return the userAgent */ public String getUserAgent() { return userAgent; } /** * @param userAgent the userAgent to set */ public void setUserAgent(String userAgent) { this.userAgent = userAgent; } /** * Used when importing cataloged pages. Is the id of the page being * imported. * * @return {@link String} may be <code>null</code>. */ public String getCatalogedPageId() { return catalogedPageId; } public void setCatalogedPageId(String catalogedPageId) { this.catalogedPageId = catalogedPageId; } public void setCanceled(boolean cancelFlag) { isCanceled = cancelFlag; } /** * Determines if the current import process has been canceled. * * @return <code>true</code> if the import process has been canceled. */ public boolean isCanceled() { return isCanceled; } /** * @return May be null if not set. */ public Map<IPSSiteImportSummaryService.SiteImportSummaryTypeEnum, Integer> getSummaryStats() { return summaryStats; } public void setSummaryStats(Map<IPSSiteImportSummaryService.SiteImportSummaryTypeEnum, Integer> summaryStats) { this.summaryStats = summaryStats; } }
true
eca53c9debdc0f1a31ef40d48eebdea81e0c9278
Java
cpchu/heps-db-param_list
/src/java/heps/db/param_list/ejb/ReferenceFacade.java
UTF-8
1,708
2.375
2
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package heps.db.param_list.ejb; import static heps.db.param_list.ejb.UnitFacade.em; import heps.db.param_list.entity.Reference; import heps.db.param_list.entity.Unit; import java.util.List; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; import javax.persistence.PersistenceContext; import javax.persistence.PersistenceUnit; import javax.persistence.Query; /** * * @author Lvhuihui */ @Stateless public class ReferenceFacade { @PersistenceUnit static EntityManagerFactory emf = Persistence.createEntityManagerFactory("param_listPU"); static EntityManager em = emf.createEntityManager(); @PersistenceContext public void setReference(String title, String author, String publication, String url, String keywords) { Reference r = new Reference(); r.setTitle(title); r.setAuthor(author); r.setPublication(publication); r.setUrl(url); r.setKeywords(keywords); em.getTransaction().begin(); em.persist(r); em.getTransaction().commit(); } public Reference getReferenceByTitle(String title) { Query q; q = em.createNamedQuery("Reference.findByTitle").setParameter("title", title); List<Reference> l = q.getResultList(); if (l.isEmpty()) { return null; } else { return l.get(0); } } }
true
2af89a6e10d3321d74020cfd50609d267c346f12
Java
haikelei/ChaoKe
/app/src/main/java/luyuan/tech/com/chaoke/activity/AddHouseActivity.java
UTF-8
6,709
1.835938
2
[]
no_license
package luyuan.tech.com.chaoke.activity; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.text.TextUtils; import android.view.View; import android.widget.Button; import android.widget.ImageView; import com.zhouyou.http.callback.SimpleCallBack; import com.zhouyou.http.exception.ApiException; import com.zhouyou.http.request.PostRequest; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import luyuan.tech.com.chaoke.R; import luyuan.tech.com.chaoke.base.BaseActivity; import luyuan.tech.com.chaoke.bean.ItemBean; import luyuan.tech.com.chaoke.bean.StringDataResponse; import luyuan.tech.com.chaoke.bean.XiaoQuBean; import luyuan.tech.com.chaoke.net.HttpManager; import luyuan.tech.com.chaoke.net.NetParser; import luyuan.tech.com.chaoke.utils.T; import luyuan.tech.com.chaoke.utils.UserInfoUtils; import luyuan.tech.com.chaoke.widget.InputLayout; import luyuan.tech.com.chaoke.widget.SelectDialogFragment; import luyuan.tech.com.chaoke.widget.SelectLayout; import static com.zhouyou.http.EasyHttp.getContext; /** * @author: lujialei * @date: 2019/6/10 * @describe: */ public class AddHouseActivity extends BaseActivity { @BindView(R.id.iv_back) ImageView ivBack; @BindView(R.id.sl_unity_name) SelectLayout slUnityName; @BindView(R.id.input_unity_address) InputLayout inputUnityAddress; @BindView(R.id.sl_house_from) SelectLayout slHouseFrom; @BindView(R.id.sl_house_state) SelectLayout slHouseState; @BindView(R.id.input_host_name) InputLayout inputHostName; @BindView(R.id.input_host_tel) InputLayout inputHostTel; @BindView(R.id.btn_next) Button btnNext; @BindView(R.id.input_lou) InputLayout inputLou; @BindView(R.id.input_danyuan) InputLayout inputDanyuan; @BindView(R.id.input_hao) InputLayout inputHao; @BindView(R.id.sl_chuzufangshi) SelectLayout slChuzufangshi; private String houseId; private XiaoQuBean bean; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_add_house); ButterKnife.bind(this); String[] arr = {"中介合作", "转介绍", "老客户", "网络端口", "地推", "房东上门", "名单获取", "销冠", "其他"}; setSelectLListener(slHouseFrom,arr); String[] arr1 = {"业主待租", "非自营在租", "业主自用"}; setSelectLListener(slHouseState,arr1); String[] arr2 = {"整租", "分租"}; setSelectLListener(slChuzufangshi,arr2); } @OnClick({R.id.iv_back, R.id.sl_unity_name, R.id.btn_next}) public void onViewClicked(View view) { switch (view.getId()) { case R.id.iv_back: onBackPressed(); break; case R.id.sl_unity_name: startActivityForResult(new Intent(getActivity(),XuanZeXiaoQuActivity.class),133); break; case R.id.btn_next: loadData(); break; } } private void loadData() { if (!checkEmptyInfo()) { return; } PostRequest postRequest = HttpManager.post(HttpManager.FABUONE) .params("token", UserInfoUtils.getInstance().getToken()) .params("address", inputUnityAddress.getText().toString().trim()) .params("source", getValue(slHouseFrom)) .params("rent_state", getValue(slHouseState)) .params("landlady_name", inputHostName.getText().toString().trim()) .params("mode",getValue(slChuzufangshi)) .params("floor_count",inputLou.getText().toString().trim()) .params("unit",inputDanyuan.getText().toString().trim()) .params("number",inputHao.getText().toString().trim()) .params("landlady_phone", inputHostTel.getText().toString().trim()); if (bean!=null){ postRequest.params("rid", bean.getId()+""); } if (!TextUtils.isEmpty(houseId)) { postRequest.params("first_id", houseId); } postRequest.execute(new SimpleCallBack<String>() { @Override public void onError(ApiException e) { T.showShort(getContext(), e.getMessage()); } @Override public void onSuccess(String s) { if (NetParser.isOk(s)) { StringDataResponse response = NetParser.parse(s, StringDataResponse.class); houseId = response.getData(); if (!TextUtils.isEmpty(response.getMsg())){ T.showShort(getActivity(),response.getMsg()); return; } Intent intent = new Intent(getBaseContext(), AddHouseOtherInfoActivity.class); intent.putExtra("id", houseId); startActivityForResult(intent, 199); }else { StringDataResponse dataResponse = NetParser.parse(s,StringDataResponse.class); T.showShort(getActivity(),dataResponse.getMsg()); } } }); } private void createDialog(String[] arr, final SelectLayout sl) { ArrayList<ItemBean> datas = new ArrayList<>(); for (int i = 0; i < arr.length; i++) { ItemBean itemBean = new ItemBean(); itemBean.setTitle(arr[i]); itemBean.setChecked(sl.getText().equals(arr[i])); datas.add(itemBean); } SelectDialogFragment dialogFragment = SelectDialogFragment.create(datas); dialogFragment.show(getSupportFragmentManager()); dialogFragment.setOnSelectListener(new SelectDialogFragment.OnSelectListener() { @Override public void onSelect(String s) { sl.setText(s); } }); } @Override protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == 199) { if (resultCode == RESULT_OK) { setResult(RESULT_OK); finish(); } }else if (requestCode==133){ if (resultCode == RESULT_OK) { bean = (XiaoQuBean) data.getSerializableExtra("data"); slUnityName.setText(bean.getReside_name()); } } } }
true
56d8f4f2dc097ef87d708b13abc8c88c19a9016b
Java
ljsnake/RSERP
/src/com/fudan/rserp/module/yhgl/YhglService.java
UTF-8
3,037
2
2
[]
no_license
package com.fudan.rserp.module.yhgl; import java.util.List; import com.fudan.rserp.config.model.TbErpUser; import com.fudan.rserp.module.base.BaseGetSessionValue; import com.fudan.rserp.util.PageSet; import com.hp.ipg.security.PasswordManager; import com.hp.ipg.security.PasswordManagerException; public class YhglService { private YhglDao dao; public PageSet getYhList(PageSet ps,ListCondition lc){ if(ps==null){ ps = new PageSet(); } ps = dao.getYhList(ps, lc); return ps; } public int addUser(TbErpUser user){ if(user!=null){ if(user.getLoginName()!=null&&!"".equals(user.getLoginName())){ if(dao.checkPropertyInEntityHasExist("TbErpUser","loginName",user.getLoginName())){ return 2;//登录名已存在 } if(user.getPassword()!=null&&!"".equals(user.getPassword())){ try { user.setPassword(PasswordManager.encryptAndEncodeString(user.getPassword())); } catch (PasswordManagerException e) { e.printStackTrace(); return 10;//异常 } } dao.saveOrUpdateObject(user); return 0;//操作成功. } } return 1;//传入参数不合法. } public TbErpUser getUser(TbErpUser uservo){ if(uservo!=null){ return (TbErpUser)dao.getObjectById(TbErpUser.class, uservo.getId()); } return uservo; } public TbErpUser getUserById(Integer id){ return (TbErpUser)dao.getObjectById(TbErpUser.class, id); } public void updateUser(TbErpUser uservo){ TbErpUser user = (TbErpUser)dao.getObjectById(TbErpUser.class, uservo.getId()); user.setName(uservo.getName()); user.setEmail(uservo.getEmail()); if(uservo.getPassword()!=null&&!"".equals(uservo.getPassword())){ try { user.setPassword(PasswordManager.encryptAndEncodeString(uservo.getPassword())); } catch (PasswordManagerException e) { e.printStackTrace(); } } dao.updateObject(user); } public int updatePassword(TbErpUser uservo,String passwordold){ if(uservo==null || passwordold==null || "".equals(passwordold) ||uservo.getPassword()==null || "".equals(uservo.getPassword())){ return 1;//传入值不合法或旧密码为空. } try { passwordold = PasswordManager.encryptAndEncodeString(passwordold); String loginName = BaseGetSessionValue.getUserLoginName(); if(loginName!=null&&!"".equals(loginName)){ List<?> ls = dao.checkUserLoginNamePasswordExist(loginName,passwordold); if(ls==null||ls.size()<1){ return 2;//原密码错误. } } String id = BaseGetSessionValue.getUserId(); if(id!=null&&!"".equals(id)){ TbErpUser user = (TbErpUser)dao.getObjectById(TbErpUser.class, id); try { user.setPassword(PasswordManager.encryptAndEncodeString(uservo.getPassword())); dao.updateObject(user); return 0;//操作成功. } catch (PasswordManagerException e) { e.printStackTrace(); } } } catch (PasswordManagerException e) { e.printStackTrace(); } return 10;//异常. } public YhglDao getDao() { return dao; } public void setDao(YhglDao dao) { this.dao = dao; } }
true
54cb2b4662f09165e1c245d52bae39fd93fcc390
Java
StandCN/Project-M
/service/user/src/main/java/com/hellcat/user/UserApplication.java
UTF-8
720
1.695313
2
[ "Apache-2.0" ]
permissive
package com.hellcat.user; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.data.mongodb.repository.config.EnableReactiveMongoRepositories; import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.web.reactive.config.EnableWebFlux; @SpringBootApplication @EnableReactiveMongoRepositories @EnableTransactionManagement @EnableWebFlux @EnableAspectJAutoProxy public class UserApplication { public static void main(String[] args) { SpringApplication.run(UserApplication.class, args); } }
true
aaa4a361384c04c5524cfcd94d4bdc010f83cae2
Java
aysenurcelik/NorthWindFinal
/northWindProject/src/main/java/com/northWind/northWindProject/entities/conretes/Cart.java
UTF-8
821
2.125
2
[]
no_license
package com.northWind.northWindProject.entities.conretes; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; import com.northWind.northWindProject.entities.abstracts.IEntity; import lombok.Data; @Entity @Table(name="cart") @Data public class Cart implements IEntity { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name="cart_id") int cartId; @Column(name="product_id") int prodcutId; @Column(name="customer_id") String customerId; public int custId = Integer.parseInt(customerId); @Column(name="quantity") int quantity; @Column(name="item_cost") String cartItemCost; @Column(name ="item_name") String itemName; }
true
fc2513b334d258f879bc900e1bed00354f6c62f1
Java
cengizgoren/facebook_apk_crack
/app/com/facebook/katana/activity/media/vault/VaultOptInControlFragment.java
UTF-8
787
1.570313
2
[]
no_license
package com.facebook.katana.activity.media.vault; import android.os.Bundle; import android.text.Html; import android.view.View; import android.widget.TextView; import com.facebook.orca.common.util.StringLocaleUtil; public class VaultOptInControlFragment extends VaultSimpleOptInFragment { public void d(Bundle paramBundle) { super.d(paramBundle); String str1 = "<b><u>" + e(2131363601) + "</u></b>"; String str2 = StringLocaleUtil.b(e(2131363600), new Object[] { str1 }); ((TextView)A().findViewById(2131297948)).setText(Html.fromHtml(str2)); } } /* Location: /data1/software/jd-gui/com.facebook.katana_2.0_liqucn.com-dex2jar.jar * Qualified Name: com.facebook.katana.activity.media.vault.VaultOptInControlFragment * JD-Core Version: 0.6.0 */
true
adc3ff2c8c8736729b60983610d661c190bc483f
Java
zuzya/proxyTest
/src/me/proxy/storage/impl/DBStorageReader.java
UTF-8
3,976
2.265625
2
[]
no_license
package me.proxy.storage.impl; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.UnsupportedEncodingException; import java.sql.Blob; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.text.DateFormat; import java.text.SimpleDateFormat; import me.proxy.storage.common.StorageReader; public class DBStorageReader extends StorageReader { public DBStorageReader(OutputStream streamFrom, boolean isRequest) { super(streamFrom, isRequest); } protected InputStream inputStream; protected ByteArrayOutputStream outputStream; private static final String DB_DRIVER = "com.mysql.jdbc.Driver"; private static final String DB_CONNECTION = "jdbc:mysql://localhost:3306/proxydb"; private static final String DB_USER = "root"; private static final String DB_PASSWORD = ""; private static final DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); @Override public InputStream readRow() { Connection dbConnection = null; PreparedStatement preparedStatement = null; Statement statement = null; ResultSet rs = null; InputStream stream = null; outputStream = new ByteArrayOutputStream(); String tableName = null; if(isRequest){ tableName = "REQUEST"; } else { tableName = "ANSWER"; } String insertTableSQL = "SELECT * FROM proxydb." +tableName+ " r WHERE r.Readed = 0 ORDER BY r.DATE "; try { dbConnection = getDBConnection(); preparedStatement = dbConnection.prepareStatement(insertTableSQL,ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE); while(true){ // execute insert SQL stetement rs = preparedStatement.executeQuery(); if(rs.isBeforeFirst()) break; } while(rs.next()){ int id = rs.getInt(1); byte[] body = rs.getBytes(3); // Blob blob = rs.getBlob(3); // stream = blob.getBinaryStream(); // // stream = new ByteArrayInputStream(body); try { outputStream.write(body); } catch (IOException e1) { e1.printStackTrace(); } System.out.println("Body: "); System.out.println(new String(body)); boolean b = rs.getBoolean(5); rs.updateBoolean("Readed", true); rs.updateRow(); } System.out.println("Record is readed into REQUEST table!"); return new ByteArrayInputStream(outputStream.toByteArray()); } catch (SQLException e) { System.out.println(e.getMessage()); } finally { if (preparedStatement != null) { try { preparedStatement.close(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } if (dbConnection != null) { try { dbConnection.close(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } return new ByteArrayInputStream(outputStream.toByteArray()); } private static Connection getDBConnection() { Connection dbConnection = null; try { Class.forName(DB_DRIVER); } catch (ClassNotFoundException e) { System.out.println(e.getMessage()); } try { dbConnection = DriverManager.getConnection( DB_CONNECTION, DB_USER,DB_PASSWORD); return dbConnection; } catch (SQLException e) { System.out.println(e.getMessage()); } return dbConnection; } private static String getCurrentTimeStamp() { java.util.Date today = new java.util.Date(); return dateFormat.format(today.getTime()); } }
true
07397b073768c30bcce266eb015d86cf85a86366
Java
salmawardha/Pemrograman-1
/flipLines.java
UTF-8
502
3.109375
3
[]
no_license
import java.io.*; import java.util.*; public class flipLines { public static void main(String[] args) throws FileNotFoundException { Scanner input = new Scanner(new File("fliplines.txt")); flipLines(input); } public static void flipLines(Scanner input) { while (input.hasNextLine()) { String line = input.nextLine(); if (input.hasNextLine()) { System.out.println(input.nextLine()); } System.out.println(line); } } }
true
6a2280f53f66905f2110280fafe9bc9fc2b15fdd
Java
Zumbalamambo/PullLayout
/app/src/main/java/com/d/pulllayout/pull/activity/RecyclerViewActivity.java
UTF-8
1,392
2.25
2
[ "Apache-2.0" ]
permissive
package com.d.pulllayout.pull.activity; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import com.d.pulllayout.R; import com.d.pulllayout.pull.adapter.RecyclerAdapter; import java.util.ArrayList; import java.util.List; /** * RecyclerViewActivity * Created by D on 2018/5/31. */ public class RecyclerViewActivity extends AppCompatActivity { private RecyclerView rv_list; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_pull_recyclerview); rv_list = (RecyclerView) findViewById(R.id.rv_list); init(); } private void init() { LinearLayoutManager layoutManager = new LinearLayoutManager(this); layoutManager.setOrientation(LinearLayoutManager.VERTICAL); rv_list.setLayoutManager(layoutManager); rv_list.setAdapter(new RecyclerAdapter(this, getDatas(), R.layout.adapter_item)); } @NonNull private List<String> getDatas() { List<String> datas = new ArrayList<>(); for (int i = 0; i < 20; i++) { datas.add("" + i); } return datas; } }
true
81a12a48c10ea1555f095596ad5a727126f1dda8
Java
3ntropia/ProgramacionIII
/TP1/src/indiceN/MainIndiceN.java
UTF-8
543
3.015625
3
[]
no_license
package indiceN; import Implementaciones.Vector; import TDA.VectorTDA; /** * @author martinh * */ public class MainIndiceN { public static void main(String[] args) { try { VectorTDA<Integer> vec = new Vector<Integer>(); vec.inicializarVector(50); for (int i = 0; i < 50; i++) { vec.agregarElemento(i, i + 1); } vec.agregarElemento(20, 20); int a = Metodo.indiceNatural(vec, 0, 50); System.out.print(a); } catch ( Exception e) { System.out.print(e.getMessage()); } } }
true
cbabc4c1c064a697af743d24cf39963395adb2c0
Java
SpongePowered/SpongeAPI
/src/main/java/org/spongepowered/api/entity/EntitySnapshot.java
UTF-8
6,257
1.78125
2
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
/* * This file is part of SpongeAPI, licensed under the MIT License (MIT). * * Copyright (c) SpongePowered <https://www.spongepowered.org> * Copyright (c) contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package org.spongepowered.api.entity; import org.spongepowered.api.Game; import org.spongepowered.api.Sponge; import org.spongepowered.api.data.DataHolderBuilder; import org.spongepowered.api.data.persistence.DataBuilder; import org.spongepowered.api.util.Transform; import org.spongepowered.api.world.LocatableSnapshot; import org.spongepowered.api.world.World; import org.spongepowered.api.world.schematic.Schematic; import org.spongepowered.api.world.server.ServerLocation; import org.spongepowered.api.world.server.storage.ServerWorldProperties; import org.spongepowered.api.world.storage.WorldProperties; import org.spongepowered.math.vector.Vector3d; import org.spongepowered.math.vector.Vector3i; import java.util.Optional; import java.util.UUID; import java.util.function.Supplier; /** * Represents a snapshot of an {@link Entity} and all of it's related data in * the form of {@link org.spongepowered.api.data.DataManipulator.Immutable}s and {@link org.spongepowered.api.data.value.Value.Immutable}s. * While an {@link Entity} is a live instance and resides in a * {@link World}, an {@link EntitySnapshot} may be snapshotted of a * {@link World} that is not currently loaded, or may not exist any longer. * * <p>All data associated with the {@link EntitySnapshot} should be separated * from the {@link Game} instance such that external processing, building, * and manipulation can take place.</p> */ public interface EntitySnapshot extends LocatableSnapshot<EntitySnapshot> { /** * Creates a new {@link Builder} to build an {@link EntitySnapshot}. * * @return The new builder */ static Builder builder() { return Sponge.game().builderProvider().provide(Builder.class); } /** * Gets an {@link Optional} containing the {@link UUID} of the * {@link Entity} that this {@link EntitySnapshot} is representing. If the * {@link Optional} is {@link Optional#empty()}, then this snapshot must * have been created by an {@link Builder} without an {@link Entity} as a * source. * * @return The Optional where the UUID may be present */ Optional<UUID> uniqueId(); /** * Gets the {@link Transform} as an {@link Optional} as the {@link ServerLocation} * may be undefined if this {@link EntitySnapshot} was built without a * location. This method is linked to {@link #location()} such that if * there is a {@link ServerLocation}, there is usually a {@link Transform}. * * @return The transform, if available */ Optional<Transform> transform(); /** * Gets the {@link EntityType}. * * @return The EntityType */ EntityType<?> type(); /** * Restores the {@link EntitySnapshot} to the {@link ServerLocation} stored within * the snapshot. If the {@link ServerLocation} is not available, the snapshot will * not be restored. * * @return the restored entity if successful */ Optional<Entity> restore(); /** * Creates a new {@link EntityArchetype} for use with {@link Schematic}s and * placing the archetype in multiple locations. * * @return The created archetype for re-creating this entity */ EntityArchetype createArchetype(); /** * An {@link org.spongepowered.api.data.DataHolderBuilder.Immutable} for building {@link EntitySnapshot}s. The * requirements */ interface Builder extends DataHolderBuilder.Immutable<EntitySnapshot, Builder>, DataBuilder<EntitySnapshot> { /** * Sets the {@link WorldProperties} for this {@link EntitySnapshot}. * * <p>This is used to grab the {@link UUID} of the World for this * snapshot.</p> * * @param worldProperties The WorldProperties * @return This builder, for chaining */ Builder world(ServerWorldProperties worldProperties); /** * Sets the {@link EntityType} for this {@link EntitySnapshot}. * * @param entityType The EntityType * @return This builder, for chaining */ default Builder type(Supplier<? extends EntityType<?>> entityType) { return this.type(entityType.get()); } /** * Sets the {@link EntityType} for this {@link EntitySnapshot}. * * @param entityType The EntityType * @return This builder, for chaining */ Builder type(EntityType<?> entityType); /** * Sets the coordinates of this {@link EntitySnapshot} from a * {@link Vector3i}. * * @param position The Vector3i representing the coordinates * @return This builder, for chaining */ Builder position(Vector3d position); /** * Copies over data from an {@link Entity}. * * @param entity The Entity * @return This builder, for chaining */ Builder from(Entity entity); } }
true
bba6542ae66d079608a9d53629e38351c622af12
Java
FaNaTiKoRn/SB
/src/sb_jtorres/DBConnect.java
UTF-8
3,803
2.515625
3
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* In general, to process any SQL statement with JDBC, you follow these steps: 1.- Establishing a connection. 2.- Create a statement. 3.- Execute the query. 4.- Process the ResultSet object. 5.- Close the connection. */ package sb_jtorres; import java.sql.*; import java.util.*; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.Icon; import javax.swing.ImageIcon; /* import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; */ import javax.swing.JOptionPane; /** * * @author FaNaTiKoRn */ public class DBConnect { /*private String db = "CaC"; private String url = "WOLVERINE\\SQLEXPRESS:1433"+db; private String user = "sa"; private String pass = "sa2017"; */ public String Conectar() throws ClassNotFoundException, SQLException{ //Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); //Para SQLServer Class.forName("com.mysql.jdbc.Driver"); //Para MySQL //String server = "WOLVERINE\\MSSQL14.SQLEXPRESS:1433"; // MsSQL SERVER String db = "SB_JTorres"; String server = "127.0.0.1/" + db; // MySQL SERVER //Servidor + DB String user = "root"; //'sa' para MsSQLServer //'adm' (abc123) para PHPMySQLServer // bejerman (tiMCLmu27qtQwD) para ambas plataformas String pass = ""; //String connectionURL = "jdbc:sqlserver://" + server + ";databaseName=" + db + ";user=" + user + ";password=" + pass + ";"; //Conexión a MsSQLServer String connectionURL = "jdbc:mysql://" + server; //Conexión a PHPMySQLServer Connection cnx = DriverManager.getConnection(connectionURL,user,pass);//Conectado //cnx.setAutoCommit(false); //cnx.commit(); //cnx.rollback(); Statement st = null; st = cnx.createStatement(); ResultSet rs = st.executeQuery("select * from usu"); /* // o bien... Connection cnx = null; cnx = DriverManager.getConnection(url, user, pass); */ while (rs.next()) { int usu_id = rs.getInt(1); String usu_codigo = rs.getString(2); String usu_clave = rs.getString(3); String usu_nombre = rs.getString(4); int usu_status = rs.getInt(5); System.out.println("ID:" + usu_id + " - Nombre:" + usu_nombre + " - Código:" + usu_codigo + " - clave:" + usu_clave + " - Estado:" + usu_status); } //st = cnx.createStatement(); rs.close(); cnx.close(); return db; } public void Desconectar() { /* public void cierraConexion() { try { Conector.close(); } catch (SQLException sqle) { JOptionPane.showMessageDialog(null, "Error al cerrar conexion", "Error", JOptionPane.ERROR_MESSAGE); Logger.getLogger(ConexionDAO.class.getName()).log(Level.SEVERE, null, sqle); } } */ /* public void cierraConsultas() { try { if (Rs != null) { Rs.close(); } if (St != null) { St.close(); } if (Conector != null) { Conector.close(); } } catch (SQLException sqle) { JOptionPane.showMessageDialog(null, "Error cerrando la conexion!", "Error", JOptionPane.ERROR_MESSAGE); Logger.getLogger(LicoreriasDAO.class.getName()).log(Level.SEVERE, null, sqle); } } */ } }
true
e0f6ce12de624d849177b1f54489bb92944f399b
Java
fmisiarz/kodilla-testing
/kodilla-testing/src/main/java/com/kodilla/testing/collection/OddNumbersExterminator.java
UTF-8
417
3.046875
3
[]
no_license
package com.kodilla.testing.collection; import java.util.ArrayList; public class OddNumbersExterminator { public ArrayList<Integer> exterminate(ArrayList<Integer> number) { ArrayList<Integer> numbers2 = new ArrayList<Integer>(); for (Integer numbers : number) { if (numbers % 2 == 0) { numbers2.add(numbers); } } return numbers2; } }
true
ab82202b0d53a66a14402c3f8ef98b1e711b090f
Java
vishal1975/ATM
/AtmMachine/src/atm/Account.java
UTF-8
1,206
2.984375
3
[]
no_license
package atm; public class Account { private int AccountNo; private int age; private String name; private int CurrentAmount; private int password; Account(int AccountNo,int age,String name,int CurrentAmount,int password){ this.AccountNo=AccountNo; this.age=age; this.CurrentAmount=CurrentAmount; this.name=name; this.password=password; } public String toString() { String s=" "; s=s+"YOUR ACCOUNT NO: "+ getAccountNo() +"\n"; s+="YOUR AGE : " + getAge() +"\n"; s+="YOUR NAME : " + getName() +"\n"; s+="YOUR CURRENTAMOUNT : " + getCurrentAmount()+"\n"; return s; } public int getAccountNo() { return AccountNo; } public void setAccountNo(int accountNo) { AccountNo = accountNo; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getCurrentAmount() { return CurrentAmount; } public void setCurrentAmount(int currentAmount) { CurrentAmount = currentAmount; } public int getPassword() { return password; } public void setPassword(int password) { this.password = password; } }
true
dc0c98951e3a7c85592380a28eb792fb0420862d
Java
wasadmin/ewallet
/CentralSwitchClient/src/zw/co/esolutions/ewallet/merchantservices/service/ObjectFactory.java
UTF-8
74,890
1.609375
2
[]
no_license
// // Generated By:JAX-WS RI IBM 2.1.6 in JDK 6 (JAXB RI IBM JAXB 2.1.10 in JDK 6) // package zw.co.esolutions.ewallet.merchantservices.service; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlElementDecl; import javax.xml.bind.annotation.XmlRegistry; import javax.xml.namespace.QName; /** * This object contains factory methods for each * Java content interface and Java element interface * generated in the zw.co.esolutions.ewallet.merchantservices.service package. * <p>An ObjectFactory allows you to programatically * construct new instances of the Java representation * for XML content. The Java representation of XML * content can consist of schema derived interfaces * and classes representing the binding of schema * type definitions, element declarations and model * groups. Factory methods for each of these are * provided in this class. * */ @XmlRegistry public class ObjectFactory { private final static QName _GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumber_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumber"); private final static QName _ApproveCustomerMerchantResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "approveCustomerMerchantResponse"); private final static QName _GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatus_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getCustomerMerchantByCustomerIdAndMerchantShortNameAndStatus"); private final static QName _ApproveMerchantResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "approveMerchantResponse"); private final static QName _DeleteCustomerMerchant_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "deleteCustomerMerchant"); private final static QName _ApproveBankMerchant_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "approveBankMerchant"); private final static QName _FindCustomerMerchantById_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "findCustomerMerchantById"); private final static QName _GetBankMerchantByBankIdAndMerchantIdResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getBankMerchantByBankIdAndMerchantIdResponse"); private final static QName _DeleteMerchant_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "deleteMerchant"); private final static QName _FindMerchantById_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "findMerchantById"); private final static QName _GetCustomerMerchantByCustomerIdResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getCustomerMerchantByCustomerIdResponse"); private final static QName _GetMerchantByCustomerIdResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getMerchantByCustomerIdResponse"); private final static QName _GetCustomerMerchantByBankId_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getCustomerMerchantByBankId"); private final static QName _GetCustomerMerchantByStatus_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getCustomerMerchantByStatus"); private final static QName _GetCustomerMerchantByCustomerAccountNumberResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getCustomerMerchantByCustomerAccountNumberResponse"); private final static QName _GetMerchantByStatus_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getMerchantByStatus"); private final static QName _GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumberResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumberResponse"); private final static QName _GetAllMerchants_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getAllMerchants"); private final static QName _ApproveMerchant_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "approveMerchant"); private final static QName _GetBankMerchantByBankIdAndMerchantId_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getBankMerchantByBankIdAndMerchantId"); private final static QName _ApproveCustomerMerchant_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "approveCustomerMerchant"); private final static QName _GetCustomerMerchantByCustomerId_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getCustomerMerchantByCustomerId"); private final static QName _GetMerchantByCustomerId_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getMerchantByCustomerId"); private final static QName _EditBankMerchantResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "editBankMerchantResponse"); private final static QName _Exception_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "Exception"); private final static QName _DisapproveBankMerchantResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "disapproveBankMerchantResponse"); private final static QName _GetCustomerMerchantByCustomerAccountNumber_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getCustomerMerchantByCustomerAccountNumber"); private final static QName _CreateBankMerchantResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "createBankMerchantResponse"); private final static QName _GetBankMerchantByMerchantIdResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getBankMerchantByMerchantIdResponse"); private final static QName _GetBankMerchantByStatusAndBankIdAndMerchantIdResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getBankMerchantByStatusAndBankIdAndMerchantIdResponse"); private final static QName _DeleteBankMerchantResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "deleteBankMerchantResponse"); private final static QName _FindBankMerchantByIdResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "findBankMerchantByIdResponse"); private final static QName _EditCustomerMerchantResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "editCustomerMerchantResponse"); private final static QName _GetBankMerchantByBankIdAndShortNameAndStatusResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getBankMerchantByBankIdAndShortNameAndStatusResponse"); private final static QName _GetMerchantByShortNameResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getMerchantByShortNameResponse"); private final static QName _GetCustomerMerchantByBankMerchantIdResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getCustomerMerchantByBankMerchantIdResponse"); private final static QName _EditMerchantResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "editMerchantResponse"); private final static QName _EditBankMerchant_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "editBankMerchant"); private final static QName _DisapproveMerchantResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "disapproveMerchantResponse"); private final static QName _GetBankMerchantByBankIdResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getBankMerchantByBankIdResponse"); private final static QName _GetBankMerchantByStatusResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getBankMerchantByStatusResponse"); private final static QName _CreateMerchantResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "createMerchantResponse"); private final static QName _DisapproveCustomerMerchantResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "disapproveCustomerMerchantResponse"); private final static QName _CreateBankMerchant_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "createBankMerchant"); private final static QName _GetMerchantByNameResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getMerchantByNameResponse"); private final static QName _DisapproveBankMerchant_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "disapproveBankMerchant"); private final static QName _CreateCustomerMerchantResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "createCustomerMerchantResponse"); private final static QName _GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatus_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getCustomerMerchantByCustomerIdAndBankMerchantIdAndStatus"); private final static QName _GetBankMerchantByMerchantId_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getBankMerchantByMerchantId"); private final static QName _FindMerchantByIdResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "findMerchantByIdResponse"); private final static QName _DeleteMerchantResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "deleteMerchantResponse"); private final static QName _GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatusResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getCustomerMerchantByCustomerIdAndMerchantShortNameAndStatusResponse"); private final static QName _EditCustomerMerchant_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "editCustomerMerchant"); private final static QName _GetBankMerchantByBankIdAndShortNameAndStatus_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getBankMerchantByBankIdAndShortNameAndStatus"); private final static QName _FindCustomerMerchantByIdResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "findCustomerMerchantByIdResponse"); private final static QName _EditMerchant_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "editMerchant"); private final static QName _ApproveBankMerchantResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "approveBankMerchantResponse"); private final static QName _DeleteCustomerMerchantResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "deleteCustomerMerchantResponse"); private final static QName _GetCustomerMerchantByBankMerchantId_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getCustomerMerchantByBankMerchantId"); private final static QName _GetMerchantByShortName_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getMerchantByShortName"); private final static QName _GetBankMerchantByStatusAndBankIdAndMerchantId_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getBankMerchantByStatusAndBankIdAndMerchantId"); private final static QName _FindBankMerchantById_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "findBankMerchantById"); private final static QName _DeleteBankMerchant_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "deleteBankMerchant"); private final static QName _GetBankMerchantByBankId_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getBankMerchantByBankId"); private final static QName _GetMerchantByStatusResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getMerchantByStatusResponse"); private final static QName _GetCustomerMerchantByBankIdResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getCustomerMerchantByBankIdResponse"); private final static QName _CreateMerchant_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "createMerchant"); private final static QName _DisapproveCustomerMerchant_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "disapproveCustomerMerchant"); private final static QName _GetCustomerMerchantByStatusResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getCustomerMerchantByStatusResponse"); private final static QName _DisapproveMerchant_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "disapproveMerchant"); private final static QName _GetMerchantByName_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getMerchantByName"); private final static QName _GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatusResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getCustomerMerchantByCustomerIdAndBankMerchantIdAndStatusResponse"); private final static QName _GetAllMerchantsResponse_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getAllMerchantsResponse"); private final static QName _CreateCustomerMerchant_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "createCustomerMerchant"); private final static QName _GetBankMerchantByStatus_QNAME = new QName("http://service.merchantservices.ewallet.esolutions.co.zw/", "getBankMerchantByStatus"); /** * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: zw.co.esolutions.ewallet.merchantservices.service * */ public ObjectFactory() { } /** * Create an instance of {@link GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatus } * */ public GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatus createGetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatus() { return new GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatus(); } /** * Create an instance of {@link GetAllMerchantsResponse } * */ public GetAllMerchantsResponse createGetAllMerchantsResponse() { return new GetAllMerchantsResponse(); } /** * Create an instance of {@link DeleteMerchant } * */ public DeleteMerchant createDeleteMerchant() { return new DeleteMerchant(); } /** * Create an instance of {@link GetBankMerchantByStatusAndBankIdAndMerchantIdResponse } * */ public GetBankMerchantByStatusAndBankIdAndMerchantIdResponse createGetBankMerchantByStatusAndBankIdAndMerchantIdResponse() { return new GetBankMerchantByStatusAndBankIdAndMerchantIdResponse(); } /** * Create an instance of {@link GetBankMerchantByStatusResponse } * */ public GetBankMerchantByStatusResponse createGetBankMerchantByStatusResponse() { return new GetBankMerchantByStatusResponse(); } /** * Create an instance of {@link GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatusResponse } * */ public GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatusResponse createGetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatusResponse() { return new GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatusResponse(); } /** * Create an instance of {@link CreateCustomerMerchant } * */ public CreateCustomerMerchant createCreateCustomerMerchant() { return new CreateCustomerMerchant(); } /** * Create an instance of {@link FindBankMerchantByIdResponse } * */ public FindBankMerchantByIdResponse createFindBankMerchantByIdResponse() { return new FindBankMerchantByIdResponse(); } /** * Create an instance of {@link CreateMerchantResponse } * */ public CreateMerchantResponse createCreateMerchantResponse() { return new CreateMerchantResponse(); } /** * Create an instance of {@link CreateMerchant } * */ public CreateMerchant createCreateMerchant() { return new CreateMerchant(); } /** * Create an instance of {@link Merchant } * */ public Merchant createMerchant() { return new Merchant(); } /** * Create an instance of {@link GetBankMerchantByStatusAndBankIdAndMerchantId } * */ public GetBankMerchantByStatusAndBankIdAndMerchantId createGetBankMerchantByStatusAndBankIdAndMerchantId() { return new GetBankMerchantByStatusAndBankIdAndMerchantId(); } /** * Create an instance of {@link GetBankMerchantByStatus } * */ public GetBankMerchantByStatus createGetBankMerchantByStatus() { return new GetBankMerchantByStatus(); } /** * Create an instance of {@link DisapproveCustomerMerchant } * */ public DisapproveCustomerMerchant createDisapproveCustomerMerchant() { return new DisapproveCustomerMerchant(); } /** * Create an instance of {@link DisapproveCustomerMerchantResponse } * */ public DisapproveCustomerMerchantResponse createDisapproveCustomerMerchantResponse() { return new DisapproveCustomerMerchantResponse(); } /** * Create an instance of {@link GetCustomerMerchantByCustomerAccountNumber } * */ public GetCustomerMerchantByCustomerAccountNumber createGetCustomerMerchantByCustomerAccountNumber() { return new GetCustomerMerchantByCustomerAccountNumber(); } /** * Create an instance of {@link GetAllMerchants } * */ public GetAllMerchants createGetAllMerchants() { return new GetAllMerchants(); } /** * Create an instance of {@link EditCustomerMerchant } * */ public EditCustomerMerchant createEditCustomerMerchant() { return new EditCustomerMerchant(); } /** * Create an instance of {@link GetBankMerchantByMerchantIdResponse } * */ public GetBankMerchantByMerchantIdResponse createGetBankMerchantByMerchantIdResponse() { return new GetBankMerchantByMerchantIdResponse(); } /** * Create an instance of {@link GetBankMerchantByBankIdAndMerchantIdResponse } * */ public GetBankMerchantByBankIdAndMerchantIdResponse createGetBankMerchantByBankIdAndMerchantIdResponse() { return new GetBankMerchantByBankIdAndMerchantIdResponse(); } /** * Create an instance of {@link DisapproveMerchantResponse } * */ public DisapproveMerchantResponse createDisapproveMerchantResponse() { return new DisapproveMerchantResponse(); } /** * Create an instance of {@link GetCustomerMerchantByBankIdResponse } * */ public GetCustomerMerchantByBankIdResponse createGetCustomerMerchantByBankIdResponse() { return new GetCustomerMerchantByBankIdResponse(); } /** * Create an instance of {@link GetCustomerMerchantByBankMerchantId } * */ public GetCustomerMerchantByBankMerchantId createGetCustomerMerchantByBankMerchantId() { return new GetCustomerMerchantByBankMerchantId(); } /** * Create an instance of {@link GetCustomerMerchantByStatus } * */ public GetCustomerMerchantByStatus createGetCustomerMerchantByStatus() { return new GetCustomerMerchantByStatus(); } /** * Create an instance of {@link ApproveCustomerMerchantResponse } * */ public ApproveCustomerMerchantResponse createApproveCustomerMerchantResponse() { return new ApproveCustomerMerchantResponse(); } /** * Create an instance of {@link GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumberResponse } * */ public GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumberResponse createGetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumberResponse() { return new GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumberResponse(); } /** * Create an instance of {@link GetMerchantByName } * */ public GetMerchantByName createGetMerchantByName() { return new GetMerchantByName(); } /** * Create an instance of {@link GetMerchantByShortNameResponse } * */ public GetMerchantByShortNameResponse createGetMerchantByShortNameResponse() { return new GetMerchantByShortNameResponse(); } /** * Create an instance of {@link GetBankMerchantByBankIdAndShortNameAndStatusResponse } * */ public GetBankMerchantByBankIdAndShortNameAndStatusResponse createGetBankMerchantByBankIdAndShortNameAndStatusResponse() { return new GetBankMerchantByBankIdAndShortNameAndStatusResponse(); } /** * Create an instance of {@link DeleteCustomerMerchantResponse } * */ public DeleteCustomerMerchantResponse createDeleteCustomerMerchantResponse() { return new DeleteCustomerMerchantResponse(); } /** * Create an instance of {@link EditBankMerchant } * */ public EditBankMerchant createEditBankMerchant() { return new EditBankMerchant(); } /** * Create an instance of {@link EditMerchant } * */ public EditMerchant createEditMerchant() { return new EditMerchant(); } /** * Create an instance of {@link GetBankMerchantByBankIdResponse } * */ public GetBankMerchantByBankIdResponse createGetBankMerchantByBankIdResponse() { return new GetBankMerchantByBankIdResponse(); } /** * Create an instance of {@link Exception } * */ public Exception createException() { return new Exception(); } /** * Create an instance of {@link DeleteBankMerchant } * */ public DeleteBankMerchant createDeleteBankMerchant() { return new DeleteBankMerchant(); } /** * Create an instance of {@link ApproveBankMerchantResponse } * */ public ApproveBankMerchantResponse createApproveBankMerchantResponse() { return new ApproveBankMerchantResponse(); } /** * Create an instance of {@link GetCustomerMerchantByCustomerIdResponse } * */ public GetCustomerMerchantByCustomerIdResponse createGetCustomerMerchantByCustomerIdResponse() { return new GetCustomerMerchantByCustomerIdResponse(); } /** * Create an instance of {@link GetBankMerchantByBankIdAndMerchantId } * */ public GetBankMerchantByBankIdAndMerchantId createGetBankMerchantByBankIdAndMerchantId() { return new GetBankMerchantByBankIdAndMerchantId(); } /** * Create an instance of {@link ApproveMerchant } * */ public ApproveMerchant createApproveMerchant() { return new ApproveMerchant(); } /** * Create an instance of {@link GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatusResponse } * */ public GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatusResponse createGetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatusResponse() { return new GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatusResponse(); } /** * Create an instance of {@link FindMerchantById } * */ public FindMerchantById createFindMerchantById() { return new FindMerchantById(); } /** * Create an instance of {@link GetCustomerMerchantByStatusResponse } * */ public GetCustomerMerchantByStatusResponse createGetCustomerMerchantByStatusResponse() { return new GetCustomerMerchantByStatusResponse(); } /** * Create an instance of {@link ApproveCustomerMerchant } * */ public ApproveCustomerMerchant createApproveCustomerMerchant() { return new ApproveCustomerMerchant(); } /** * Create an instance of {@link FindCustomerMerchantByIdResponse } * */ public FindCustomerMerchantByIdResponse createFindCustomerMerchantByIdResponse() { return new FindCustomerMerchantByIdResponse(); } /** * Create an instance of {@link EditBankMerchantResponse } * */ public EditBankMerchantResponse createEditBankMerchantResponse() { return new EditBankMerchantResponse(); } /** * Create an instance of {@link CreateBankMerchant } * */ public CreateBankMerchant createCreateBankMerchant() { return new CreateBankMerchant(); } /** * Create an instance of {@link FindBankMerchantById } * */ public FindBankMerchantById createFindBankMerchantById() { return new FindBankMerchantById(); } /** * Create an instance of {@link DisapproveMerchant } * */ public DisapproveMerchant createDisapproveMerchant() { return new DisapproveMerchant(); } /** * Create an instance of {@link DeleteMerchantResponse } * */ public DeleteMerchantResponse createDeleteMerchantResponse() { return new DeleteMerchantResponse(); } /** * Create an instance of {@link GetMerchantByCustomerIdResponse } * */ public GetMerchantByCustomerIdResponse createGetMerchantByCustomerIdResponse() { return new GetMerchantByCustomerIdResponse(); } /** * Create an instance of {@link GetCustomerMerchantByCustomerId } * */ public GetCustomerMerchantByCustomerId createGetCustomerMerchantByCustomerId() { return new GetCustomerMerchantByCustomerId(); } /** * Create an instance of {@link GetCustomerMerchantByCustomerAccountNumberResponse } * */ public GetCustomerMerchantByCustomerAccountNumberResponse createGetCustomerMerchantByCustomerAccountNumberResponse() { return new GetCustomerMerchantByCustomerAccountNumberResponse(); } /** * Create an instance of {@link GetMerchantByNameResponse } * */ public GetMerchantByNameResponse createGetMerchantByNameResponse() { return new GetMerchantByNameResponse(); } /** * Create an instance of {@link DeleteCustomerMerchant } * */ public DeleteCustomerMerchant createDeleteCustomerMerchant() { return new DeleteCustomerMerchant(); } /** * Create an instance of {@link GetMerchantByStatusResponse } * */ public GetMerchantByStatusResponse createGetMerchantByStatusResponse() { return new GetMerchantByStatusResponse(); } /** * Create an instance of {@link GetCustomerMerchantByBankMerchantIdResponse } * */ public GetCustomerMerchantByBankMerchantIdResponse createGetCustomerMerchantByBankMerchantIdResponse() { return new GetCustomerMerchantByBankMerchantIdResponse(); } /** * Create an instance of {@link FindMerchantByIdResponse } * */ public FindMerchantByIdResponse createFindMerchantByIdResponse() { return new FindMerchantByIdResponse(); } /** * Create an instance of {@link CreateBankMerchantResponse } * */ public CreateBankMerchantResponse createCreateBankMerchantResponse() { return new CreateBankMerchantResponse(); } /** * Create an instance of {@link GetBankMerchantByBankIdAndShortNameAndStatus } * */ public GetBankMerchantByBankIdAndShortNameAndStatus createGetBankMerchantByBankIdAndShortNameAndStatus() { return new GetBankMerchantByBankIdAndShortNameAndStatus(); } /** * Create an instance of {@link GetMerchantByStatus } * */ public GetMerchantByStatus createGetMerchantByStatus() { return new GetMerchantByStatus(); } /** * Create an instance of {@link ApproveBankMerchant } * */ public ApproveBankMerchant createApproveBankMerchant() { return new ApproveBankMerchant(); } /** * Create an instance of {@link DisapproveBankMerchant } * */ public DisapproveBankMerchant createDisapproveBankMerchant() { return new DisapproveBankMerchant(); } /** * Create an instance of {@link GetMerchantByCustomerId } * */ public GetMerchantByCustomerId createGetMerchantByCustomerId() { return new GetMerchantByCustomerId(); } /** * Create an instance of {@link GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumber } * */ public GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumber createGetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumber() { return new GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumber(); } /** * Create an instance of {@link EditMerchantResponse } * */ public EditMerchantResponse createEditMerchantResponse() { return new EditMerchantResponse(); } /** * Create an instance of {@link EditCustomerMerchantResponse } * */ public EditCustomerMerchantResponse createEditCustomerMerchantResponse() { return new EditCustomerMerchantResponse(); } /** * Create an instance of {@link CustomerMerchant } * */ public CustomerMerchant createCustomerMerchant() { return new CustomerMerchant(); } /** * Create an instance of {@link ApproveMerchantResponse } * */ public ApproveMerchantResponse createApproveMerchantResponse() { return new ApproveMerchantResponse(); } /** * Create an instance of {@link DisapproveBankMerchantResponse } * */ public DisapproveBankMerchantResponse createDisapproveBankMerchantResponse() { return new DisapproveBankMerchantResponse(); } /** * Create an instance of {@link CreateCustomerMerchantResponse } * */ public CreateCustomerMerchantResponse createCreateCustomerMerchantResponse() { return new CreateCustomerMerchantResponse(); } /** * Create an instance of {@link BankMerchant } * */ public BankMerchant createBankMerchant() { return new BankMerchant(); } /** * Create an instance of {@link GetBankMerchantByBankId } * */ public GetBankMerchantByBankId createGetBankMerchantByBankId() { return new GetBankMerchantByBankId(); } /** * Create an instance of {@link GetMerchantByShortName } * */ public GetMerchantByShortName createGetMerchantByShortName() { return new GetMerchantByShortName(); } /** * Create an instance of {@link FindCustomerMerchantById } * */ public FindCustomerMerchantById createFindCustomerMerchantById() { return new FindCustomerMerchantById(); } /** * Create an instance of {@link GetBankMerchantByMerchantId } * */ public GetBankMerchantByMerchantId createGetBankMerchantByMerchantId() { return new GetBankMerchantByMerchantId(); } /** * Create an instance of {@link GetCustomerMerchantByBankId } * */ public GetCustomerMerchantByBankId createGetCustomerMerchantByBankId() { return new GetCustomerMerchantByBankId(); } /** * Create an instance of {@link DeleteBankMerchantResponse } * */ public DeleteBankMerchantResponse createDeleteBankMerchantResponse() { return new DeleteBankMerchantResponse(); } /** * Create an instance of {@link GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatus } * */ public GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatus createGetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatus() { return new GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatus(); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumber }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumber") public JAXBElement<GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumber> createGetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumber(GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumber value) { return new JAXBElement<GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumber>(_GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumber_QNAME, GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumber.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link ApproveCustomerMerchantResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "approveCustomerMerchantResponse") public JAXBElement<ApproveCustomerMerchantResponse> createApproveCustomerMerchantResponse(ApproveCustomerMerchantResponse value) { return new JAXBElement<ApproveCustomerMerchantResponse>(_ApproveCustomerMerchantResponse_QNAME, ApproveCustomerMerchantResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatus }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getCustomerMerchantByCustomerIdAndMerchantShortNameAndStatus") public JAXBElement<GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatus> createGetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatus(GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatus value) { return new JAXBElement<GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatus>(_GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatus_QNAME, GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatus.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link ApproveMerchantResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "approveMerchantResponse") public JAXBElement<ApproveMerchantResponse> createApproveMerchantResponse(ApproveMerchantResponse value) { return new JAXBElement<ApproveMerchantResponse>(_ApproveMerchantResponse_QNAME, ApproveMerchantResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link DeleteCustomerMerchant }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "deleteCustomerMerchant") public JAXBElement<DeleteCustomerMerchant> createDeleteCustomerMerchant(DeleteCustomerMerchant value) { return new JAXBElement<DeleteCustomerMerchant>(_DeleteCustomerMerchant_QNAME, DeleteCustomerMerchant.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link ApproveBankMerchant }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "approveBankMerchant") public JAXBElement<ApproveBankMerchant> createApproveBankMerchant(ApproveBankMerchant value) { return new JAXBElement<ApproveBankMerchant>(_ApproveBankMerchant_QNAME, ApproveBankMerchant.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link FindCustomerMerchantById }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "findCustomerMerchantById") public JAXBElement<FindCustomerMerchantById> createFindCustomerMerchantById(FindCustomerMerchantById value) { return new JAXBElement<FindCustomerMerchantById>(_FindCustomerMerchantById_QNAME, FindCustomerMerchantById.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetBankMerchantByBankIdAndMerchantIdResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getBankMerchantByBankIdAndMerchantIdResponse") public JAXBElement<GetBankMerchantByBankIdAndMerchantIdResponse> createGetBankMerchantByBankIdAndMerchantIdResponse(GetBankMerchantByBankIdAndMerchantIdResponse value) { return new JAXBElement<GetBankMerchantByBankIdAndMerchantIdResponse>(_GetBankMerchantByBankIdAndMerchantIdResponse_QNAME, GetBankMerchantByBankIdAndMerchantIdResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link DeleteMerchant }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "deleteMerchant") public JAXBElement<DeleteMerchant> createDeleteMerchant(DeleteMerchant value) { return new JAXBElement<DeleteMerchant>(_DeleteMerchant_QNAME, DeleteMerchant.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link FindMerchantById }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "findMerchantById") public JAXBElement<FindMerchantById> createFindMerchantById(FindMerchantById value) { return new JAXBElement<FindMerchantById>(_FindMerchantById_QNAME, FindMerchantById.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByCustomerIdResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getCustomerMerchantByCustomerIdResponse") public JAXBElement<GetCustomerMerchantByCustomerIdResponse> createGetCustomerMerchantByCustomerIdResponse(GetCustomerMerchantByCustomerIdResponse value) { return new JAXBElement<GetCustomerMerchantByCustomerIdResponse>(_GetCustomerMerchantByCustomerIdResponse_QNAME, GetCustomerMerchantByCustomerIdResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetMerchantByCustomerIdResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getMerchantByCustomerIdResponse") public JAXBElement<GetMerchantByCustomerIdResponse> createGetMerchantByCustomerIdResponse(GetMerchantByCustomerIdResponse value) { return new JAXBElement<GetMerchantByCustomerIdResponse>(_GetMerchantByCustomerIdResponse_QNAME, GetMerchantByCustomerIdResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByBankId }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getCustomerMerchantByBankId") public JAXBElement<GetCustomerMerchantByBankId> createGetCustomerMerchantByBankId(GetCustomerMerchantByBankId value) { return new JAXBElement<GetCustomerMerchantByBankId>(_GetCustomerMerchantByBankId_QNAME, GetCustomerMerchantByBankId.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByStatus }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getCustomerMerchantByStatus") public JAXBElement<GetCustomerMerchantByStatus> createGetCustomerMerchantByStatus(GetCustomerMerchantByStatus value) { return new JAXBElement<GetCustomerMerchantByStatus>(_GetCustomerMerchantByStatus_QNAME, GetCustomerMerchantByStatus.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByCustomerAccountNumberResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getCustomerMerchantByCustomerAccountNumberResponse") public JAXBElement<GetCustomerMerchantByCustomerAccountNumberResponse> createGetCustomerMerchantByCustomerAccountNumberResponse(GetCustomerMerchantByCustomerAccountNumberResponse value) { return new JAXBElement<GetCustomerMerchantByCustomerAccountNumberResponse>(_GetCustomerMerchantByCustomerAccountNumberResponse_QNAME, GetCustomerMerchantByCustomerAccountNumberResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetMerchantByStatus }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getMerchantByStatus") public JAXBElement<GetMerchantByStatus> createGetMerchantByStatus(GetMerchantByStatus value) { return new JAXBElement<GetMerchantByStatus>(_GetMerchantByStatus_QNAME, GetMerchantByStatus.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumberResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumberResponse") public JAXBElement<GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumberResponse> createGetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumberResponse(GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumberResponse value) { return new JAXBElement<GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumberResponse>(_GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumberResponse_QNAME, GetCustomerMerchantByBankMerchantIdAndCustomerIdAndCustomerAccountNumberResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetAllMerchants }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getAllMerchants") public JAXBElement<GetAllMerchants> createGetAllMerchants(GetAllMerchants value) { return new JAXBElement<GetAllMerchants>(_GetAllMerchants_QNAME, GetAllMerchants.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link ApproveMerchant }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "approveMerchant") public JAXBElement<ApproveMerchant> createApproveMerchant(ApproveMerchant value) { return new JAXBElement<ApproveMerchant>(_ApproveMerchant_QNAME, ApproveMerchant.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetBankMerchantByBankIdAndMerchantId }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getBankMerchantByBankIdAndMerchantId") public JAXBElement<GetBankMerchantByBankIdAndMerchantId> createGetBankMerchantByBankIdAndMerchantId(GetBankMerchantByBankIdAndMerchantId value) { return new JAXBElement<GetBankMerchantByBankIdAndMerchantId>(_GetBankMerchantByBankIdAndMerchantId_QNAME, GetBankMerchantByBankIdAndMerchantId.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link ApproveCustomerMerchant }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "approveCustomerMerchant") public JAXBElement<ApproveCustomerMerchant> createApproveCustomerMerchant(ApproveCustomerMerchant value) { return new JAXBElement<ApproveCustomerMerchant>(_ApproveCustomerMerchant_QNAME, ApproveCustomerMerchant.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByCustomerId }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getCustomerMerchantByCustomerId") public JAXBElement<GetCustomerMerchantByCustomerId> createGetCustomerMerchantByCustomerId(GetCustomerMerchantByCustomerId value) { return new JAXBElement<GetCustomerMerchantByCustomerId>(_GetCustomerMerchantByCustomerId_QNAME, GetCustomerMerchantByCustomerId.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetMerchantByCustomerId }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getMerchantByCustomerId") public JAXBElement<GetMerchantByCustomerId> createGetMerchantByCustomerId(GetMerchantByCustomerId value) { return new JAXBElement<GetMerchantByCustomerId>(_GetMerchantByCustomerId_QNAME, GetMerchantByCustomerId.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link EditBankMerchantResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "editBankMerchantResponse") public JAXBElement<EditBankMerchantResponse> createEditBankMerchantResponse(EditBankMerchantResponse value) { return new JAXBElement<EditBankMerchantResponse>(_EditBankMerchantResponse_QNAME, EditBankMerchantResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link Exception }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "Exception") public JAXBElement<Exception> createException(Exception value) { return new JAXBElement<Exception>(_Exception_QNAME, Exception.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link DisapproveBankMerchantResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "disapproveBankMerchantResponse") public JAXBElement<DisapproveBankMerchantResponse> createDisapproveBankMerchantResponse(DisapproveBankMerchantResponse value) { return new JAXBElement<DisapproveBankMerchantResponse>(_DisapproveBankMerchantResponse_QNAME, DisapproveBankMerchantResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByCustomerAccountNumber }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getCustomerMerchantByCustomerAccountNumber") public JAXBElement<GetCustomerMerchantByCustomerAccountNumber> createGetCustomerMerchantByCustomerAccountNumber(GetCustomerMerchantByCustomerAccountNumber value) { return new JAXBElement<GetCustomerMerchantByCustomerAccountNumber>(_GetCustomerMerchantByCustomerAccountNumber_QNAME, GetCustomerMerchantByCustomerAccountNumber.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link CreateBankMerchantResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "createBankMerchantResponse") public JAXBElement<CreateBankMerchantResponse> createCreateBankMerchantResponse(CreateBankMerchantResponse value) { return new JAXBElement<CreateBankMerchantResponse>(_CreateBankMerchantResponse_QNAME, CreateBankMerchantResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetBankMerchantByMerchantIdResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getBankMerchantByMerchantIdResponse") public JAXBElement<GetBankMerchantByMerchantIdResponse> createGetBankMerchantByMerchantIdResponse(GetBankMerchantByMerchantIdResponse value) { return new JAXBElement<GetBankMerchantByMerchantIdResponse>(_GetBankMerchantByMerchantIdResponse_QNAME, GetBankMerchantByMerchantIdResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetBankMerchantByStatusAndBankIdAndMerchantIdResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getBankMerchantByStatusAndBankIdAndMerchantIdResponse") public JAXBElement<GetBankMerchantByStatusAndBankIdAndMerchantIdResponse> createGetBankMerchantByStatusAndBankIdAndMerchantIdResponse(GetBankMerchantByStatusAndBankIdAndMerchantIdResponse value) { return new JAXBElement<GetBankMerchantByStatusAndBankIdAndMerchantIdResponse>(_GetBankMerchantByStatusAndBankIdAndMerchantIdResponse_QNAME, GetBankMerchantByStatusAndBankIdAndMerchantIdResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link DeleteBankMerchantResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "deleteBankMerchantResponse") public JAXBElement<DeleteBankMerchantResponse> createDeleteBankMerchantResponse(DeleteBankMerchantResponse value) { return new JAXBElement<DeleteBankMerchantResponse>(_DeleteBankMerchantResponse_QNAME, DeleteBankMerchantResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link FindBankMerchantByIdResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "findBankMerchantByIdResponse") public JAXBElement<FindBankMerchantByIdResponse> createFindBankMerchantByIdResponse(FindBankMerchantByIdResponse value) { return new JAXBElement<FindBankMerchantByIdResponse>(_FindBankMerchantByIdResponse_QNAME, FindBankMerchantByIdResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link EditCustomerMerchantResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "editCustomerMerchantResponse") public JAXBElement<EditCustomerMerchantResponse> createEditCustomerMerchantResponse(EditCustomerMerchantResponse value) { return new JAXBElement<EditCustomerMerchantResponse>(_EditCustomerMerchantResponse_QNAME, EditCustomerMerchantResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetBankMerchantByBankIdAndShortNameAndStatusResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getBankMerchantByBankIdAndShortNameAndStatusResponse") public JAXBElement<GetBankMerchantByBankIdAndShortNameAndStatusResponse> createGetBankMerchantByBankIdAndShortNameAndStatusResponse(GetBankMerchantByBankIdAndShortNameAndStatusResponse value) { return new JAXBElement<GetBankMerchantByBankIdAndShortNameAndStatusResponse>(_GetBankMerchantByBankIdAndShortNameAndStatusResponse_QNAME, GetBankMerchantByBankIdAndShortNameAndStatusResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetMerchantByShortNameResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getMerchantByShortNameResponse") public JAXBElement<GetMerchantByShortNameResponse> createGetMerchantByShortNameResponse(GetMerchantByShortNameResponse value) { return new JAXBElement<GetMerchantByShortNameResponse>(_GetMerchantByShortNameResponse_QNAME, GetMerchantByShortNameResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByBankMerchantIdResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getCustomerMerchantByBankMerchantIdResponse") public JAXBElement<GetCustomerMerchantByBankMerchantIdResponse> createGetCustomerMerchantByBankMerchantIdResponse(GetCustomerMerchantByBankMerchantIdResponse value) { return new JAXBElement<GetCustomerMerchantByBankMerchantIdResponse>(_GetCustomerMerchantByBankMerchantIdResponse_QNAME, GetCustomerMerchantByBankMerchantIdResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link EditMerchantResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "editMerchantResponse") public JAXBElement<EditMerchantResponse> createEditMerchantResponse(EditMerchantResponse value) { return new JAXBElement<EditMerchantResponse>(_EditMerchantResponse_QNAME, EditMerchantResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link EditBankMerchant }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "editBankMerchant") public JAXBElement<EditBankMerchant> createEditBankMerchant(EditBankMerchant value) { return new JAXBElement<EditBankMerchant>(_EditBankMerchant_QNAME, EditBankMerchant.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link DisapproveMerchantResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "disapproveMerchantResponse") public JAXBElement<DisapproveMerchantResponse> createDisapproveMerchantResponse(DisapproveMerchantResponse value) { return new JAXBElement<DisapproveMerchantResponse>(_DisapproveMerchantResponse_QNAME, DisapproveMerchantResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetBankMerchantByBankIdResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getBankMerchantByBankIdResponse") public JAXBElement<GetBankMerchantByBankIdResponse> createGetBankMerchantByBankIdResponse(GetBankMerchantByBankIdResponse value) { return new JAXBElement<GetBankMerchantByBankIdResponse>(_GetBankMerchantByBankIdResponse_QNAME, GetBankMerchantByBankIdResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetBankMerchantByStatusResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getBankMerchantByStatusResponse") public JAXBElement<GetBankMerchantByStatusResponse> createGetBankMerchantByStatusResponse(GetBankMerchantByStatusResponse value) { return new JAXBElement<GetBankMerchantByStatusResponse>(_GetBankMerchantByStatusResponse_QNAME, GetBankMerchantByStatusResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link CreateMerchantResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "createMerchantResponse") public JAXBElement<CreateMerchantResponse> createCreateMerchantResponse(CreateMerchantResponse value) { return new JAXBElement<CreateMerchantResponse>(_CreateMerchantResponse_QNAME, CreateMerchantResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link DisapproveCustomerMerchantResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "disapproveCustomerMerchantResponse") public JAXBElement<DisapproveCustomerMerchantResponse> createDisapproveCustomerMerchantResponse(DisapproveCustomerMerchantResponse value) { return new JAXBElement<DisapproveCustomerMerchantResponse>(_DisapproveCustomerMerchantResponse_QNAME, DisapproveCustomerMerchantResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link CreateBankMerchant }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "createBankMerchant") public JAXBElement<CreateBankMerchant> createCreateBankMerchant(CreateBankMerchant value) { return new JAXBElement<CreateBankMerchant>(_CreateBankMerchant_QNAME, CreateBankMerchant.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetMerchantByNameResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getMerchantByNameResponse") public JAXBElement<GetMerchantByNameResponse> createGetMerchantByNameResponse(GetMerchantByNameResponse value) { return new JAXBElement<GetMerchantByNameResponse>(_GetMerchantByNameResponse_QNAME, GetMerchantByNameResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link DisapproveBankMerchant }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "disapproveBankMerchant") public JAXBElement<DisapproveBankMerchant> createDisapproveBankMerchant(DisapproveBankMerchant value) { return new JAXBElement<DisapproveBankMerchant>(_DisapproveBankMerchant_QNAME, DisapproveBankMerchant.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link CreateCustomerMerchantResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "createCustomerMerchantResponse") public JAXBElement<CreateCustomerMerchantResponse> createCreateCustomerMerchantResponse(CreateCustomerMerchantResponse value) { return new JAXBElement<CreateCustomerMerchantResponse>(_CreateCustomerMerchantResponse_QNAME, CreateCustomerMerchantResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatus }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getCustomerMerchantByCustomerIdAndBankMerchantIdAndStatus") public JAXBElement<GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatus> createGetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatus(GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatus value) { return new JAXBElement<GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatus>(_GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatus_QNAME, GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatus.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetBankMerchantByMerchantId }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getBankMerchantByMerchantId") public JAXBElement<GetBankMerchantByMerchantId> createGetBankMerchantByMerchantId(GetBankMerchantByMerchantId value) { return new JAXBElement<GetBankMerchantByMerchantId>(_GetBankMerchantByMerchantId_QNAME, GetBankMerchantByMerchantId.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link FindMerchantByIdResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "findMerchantByIdResponse") public JAXBElement<FindMerchantByIdResponse> createFindMerchantByIdResponse(FindMerchantByIdResponse value) { return new JAXBElement<FindMerchantByIdResponse>(_FindMerchantByIdResponse_QNAME, FindMerchantByIdResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link DeleteMerchantResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "deleteMerchantResponse") public JAXBElement<DeleteMerchantResponse> createDeleteMerchantResponse(DeleteMerchantResponse value) { return new JAXBElement<DeleteMerchantResponse>(_DeleteMerchantResponse_QNAME, DeleteMerchantResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatusResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getCustomerMerchantByCustomerIdAndMerchantShortNameAndStatusResponse") public JAXBElement<GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatusResponse> createGetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatusResponse(GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatusResponse value) { return new JAXBElement<GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatusResponse>(_GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatusResponse_QNAME, GetCustomerMerchantByCustomerIdAndMerchantShortNameAndStatusResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link EditCustomerMerchant }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "editCustomerMerchant") public JAXBElement<EditCustomerMerchant> createEditCustomerMerchant(EditCustomerMerchant value) { return new JAXBElement<EditCustomerMerchant>(_EditCustomerMerchant_QNAME, EditCustomerMerchant.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetBankMerchantByBankIdAndShortNameAndStatus }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getBankMerchantByBankIdAndShortNameAndStatus") public JAXBElement<GetBankMerchantByBankIdAndShortNameAndStatus> createGetBankMerchantByBankIdAndShortNameAndStatus(GetBankMerchantByBankIdAndShortNameAndStatus value) { return new JAXBElement<GetBankMerchantByBankIdAndShortNameAndStatus>(_GetBankMerchantByBankIdAndShortNameAndStatus_QNAME, GetBankMerchantByBankIdAndShortNameAndStatus.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link FindCustomerMerchantByIdResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "findCustomerMerchantByIdResponse") public JAXBElement<FindCustomerMerchantByIdResponse> createFindCustomerMerchantByIdResponse(FindCustomerMerchantByIdResponse value) { return new JAXBElement<FindCustomerMerchantByIdResponse>(_FindCustomerMerchantByIdResponse_QNAME, FindCustomerMerchantByIdResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link EditMerchant }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "editMerchant") public JAXBElement<EditMerchant> createEditMerchant(EditMerchant value) { return new JAXBElement<EditMerchant>(_EditMerchant_QNAME, EditMerchant.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link ApproveBankMerchantResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "approveBankMerchantResponse") public JAXBElement<ApproveBankMerchantResponse> createApproveBankMerchantResponse(ApproveBankMerchantResponse value) { return new JAXBElement<ApproveBankMerchantResponse>(_ApproveBankMerchantResponse_QNAME, ApproveBankMerchantResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link DeleteCustomerMerchantResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "deleteCustomerMerchantResponse") public JAXBElement<DeleteCustomerMerchantResponse> createDeleteCustomerMerchantResponse(DeleteCustomerMerchantResponse value) { return new JAXBElement<DeleteCustomerMerchantResponse>(_DeleteCustomerMerchantResponse_QNAME, DeleteCustomerMerchantResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByBankMerchantId }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getCustomerMerchantByBankMerchantId") public JAXBElement<GetCustomerMerchantByBankMerchantId> createGetCustomerMerchantByBankMerchantId(GetCustomerMerchantByBankMerchantId value) { return new JAXBElement<GetCustomerMerchantByBankMerchantId>(_GetCustomerMerchantByBankMerchantId_QNAME, GetCustomerMerchantByBankMerchantId.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetMerchantByShortName }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getMerchantByShortName") public JAXBElement<GetMerchantByShortName> createGetMerchantByShortName(GetMerchantByShortName value) { return new JAXBElement<GetMerchantByShortName>(_GetMerchantByShortName_QNAME, GetMerchantByShortName.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetBankMerchantByStatusAndBankIdAndMerchantId }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getBankMerchantByStatusAndBankIdAndMerchantId") public JAXBElement<GetBankMerchantByStatusAndBankIdAndMerchantId> createGetBankMerchantByStatusAndBankIdAndMerchantId(GetBankMerchantByStatusAndBankIdAndMerchantId value) { return new JAXBElement<GetBankMerchantByStatusAndBankIdAndMerchantId>(_GetBankMerchantByStatusAndBankIdAndMerchantId_QNAME, GetBankMerchantByStatusAndBankIdAndMerchantId.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link FindBankMerchantById }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "findBankMerchantById") public JAXBElement<FindBankMerchantById> createFindBankMerchantById(FindBankMerchantById value) { return new JAXBElement<FindBankMerchantById>(_FindBankMerchantById_QNAME, FindBankMerchantById.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link DeleteBankMerchant }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "deleteBankMerchant") public JAXBElement<DeleteBankMerchant> createDeleteBankMerchant(DeleteBankMerchant value) { return new JAXBElement<DeleteBankMerchant>(_DeleteBankMerchant_QNAME, DeleteBankMerchant.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetBankMerchantByBankId }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getBankMerchantByBankId") public JAXBElement<GetBankMerchantByBankId> createGetBankMerchantByBankId(GetBankMerchantByBankId value) { return new JAXBElement<GetBankMerchantByBankId>(_GetBankMerchantByBankId_QNAME, GetBankMerchantByBankId.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetMerchantByStatusResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getMerchantByStatusResponse") public JAXBElement<GetMerchantByStatusResponse> createGetMerchantByStatusResponse(GetMerchantByStatusResponse value) { return new JAXBElement<GetMerchantByStatusResponse>(_GetMerchantByStatusResponse_QNAME, GetMerchantByStatusResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByBankIdResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getCustomerMerchantByBankIdResponse") public JAXBElement<GetCustomerMerchantByBankIdResponse> createGetCustomerMerchantByBankIdResponse(GetCustomerMerchantByBankIdResponse value) { return new JAXBElement<GetCustomerMerchantByBankIdResponse>(_GetCustomerMerchantByBankIdResponse_QNAME, GetCustomerMerchantByBankIdResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link CreateMerchant }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "createMerchant") public JAXBElement<CreateMerchant> createCreateMerchant(CreateMerchant value) { return new JAXBElement<CreateMerchant>(_CreateMerchant_QNAME, CreateMerchant.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link DisapproveCustomerMerchant }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "disapproveCustomerMerchant") public JAXBElement<DisapproveCustomerMerchant> createDisapproveCustomerMerchant(DisapproveCustomerMerchant value) { return new JAXBElement<DisapproveCustomerMerchant>(_DisapproveCustomerMerchant_QNAME, DisapproveCustomerMerchant.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByStatusResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getCustomerMerchantByStatusResponse") public JAXBElement<GetCustomerMerchantByStatusResponse> createGetCustomerMerchantByStatusResponse(GetCustomerMerchantByStatusResponse value) { return new JAXBElement<GetCustomerMerchantByStatusResponse>(_GetCustomerMerchantByStatusResponse_QNAME, GetCustomerMerchantByStatusResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link DisapproveMerchant }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "disapproveMerchant") public JAXBElement<DisapproveMerchant> createDisapproveMerchant(DisapproveMerchant value) { return new JAXBElement<DisapproveMerchant>(_DisapproveMerchant_QNAME, DisapproveMerchant.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetMerchantByName }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getMerchantByName") public JAXBElement<GetMerchantByName> createGetMerchantByName(GetMerchantByName value) { return new JAXBElement<GetMerchantByName>(_GetMerchantByName_QNAME, GetMerchantByName.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatusResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getCustomerMerchantByCustomerIdAndBankMerchantIdAndStatusResponse") public JAXBElement<GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatusResponse> createGetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatusResponse(GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatusResponse value) { return new JAXBElement<GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatusResponse>(_GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatusResponse_QNAME, GetCustomerMerchantByCustomerIdAndBankMerchantIdAndStatusResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetAllMerchantsResponse }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getAllMerchantsResponse") public JAXBElement<GetAllMerchantsResponse> createGetAllMerchantsResponse(GetAllMerchantsResponse value) { return new JAXBElement<GetAllMerchantsResponse>(_GetAllMerchantsResponse_QNAME, GetAllMerchantsResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link CreateCustomerMerchant }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "createCustomerMerchant") public JAXBElement<CreateCustomerMerchant> createCreateCustomerMerchant(CreateCustomerMerchant value) { return new JAXBElement<CreateCustomerMerchant>(_CreateCustomerMerchant_QNAME, CreateCustomerMerchant.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetBankMerchantByStatus }{@code >}} * */ @XmlElementDecl(namespace = "http://service.merchantservices.ewallet.esolutions.co.zw/", name = "getBankMerchantByStatus") public JAXBElement<GetBankMerchantByStatus> createGetBankMerchantByStatus(GetBankMerchantByStatus value) { return new JAXBElement<GetBankMerchantByStatus>(_GetBankMerchantByStatus_QNAME, GetBankMerchantByStatus.class, null, value); } }
true
07267c6c8f3d425ca0dee853c3766d78eb3ee7ad
Java
smaharjan99/coffee
/CollectionDEMO/src/com/cubic/training/collectionexercise/PriorityQueueDemo.java
UTF-8
696
3.234375
3
[]
no_license
package com.cubic.training.collectionexercise; import java.util.PriorityQueue; public class PriorityQueueDemo { public static void main(String[] args) { PriorityQueue<String> pq = new PriorityQueue<String>(); pq.add("abid"); pq.add("azeem"); pq.add("lokesh"); pq.add("brad"); //pq.add("abid"); System.out.println("Head element is - "+ pq.element()); System.out.println("Head element is - "+ pq.peek()); System.out.println("Iterating"); for(String s:pq){ System.out.println(s); } pq.remove(); pq.poll(); System.out.println("After removing two elements"); System.out.println("Iterating"); for(String s:pq){ System.out.println(s); } } }
true
e80ba6d1934ecf08d0cff1be88ce041a30c88f24
Java
t051506/alloy-common
/alloy-common-sentinel/src/main/java/com/alloy/cloud/common/sentinel/handle/CloudUrlBlockHandler.java
UTF-8
1,260
2.015625
2
[]
no_license
package com.alloy.cloud.common.sentinel.handle; import cn.hutool.http.ContentType; import com.alibaba.csp.sentinel.adapter.spring.webmvc.callback.BlockExceptionHandler; import com.alibaba.csp.sentinel.slots.block.BlockException; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.serializer.SerializerFeature; import com.alloy.cloud.common.core.base.R; import lombok.extern.slf4j.Slf4j; import org.springframework.http.HttpStatus; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * sentinel统一降级限流策略 * <p> * {@link com.alibaba.csp.sentinel.adapter.spring.webmvc.callback.DefaultBlockExceptionHandler} */ @Slf4j public class CloudUrlBlockHandler implements BlockExceptionHandler { @Override public void handle(HttpServletRequest request, HttpServletResponse response, BlockException e) throws Exception { log.error("sentinel 降级 资源名称{}", e.getRule().getResource(), e); response.setContentType(ContentType.JSON.toString()); response.setStatus(HttpStatus.TOO_MANY_REQUESTS.value()); response.getWriter().print(JSON.toJSONString(R.failed("sentinel denied."+ e.getMessage()), SerializerFeature.WriteNullStringAsEmpty)); } }
true
5bf0c04de1bf96cc98910350fa571bb73869a0a6
Java
AHeartMan/simple-java
/simple-java-nio/src/main/java/com/alsace/simplejavanio/blockingnio/Main.java
UTF-8
308
2
2
[]
no_license
package com.alsace.simplejavanio.blockingnio; /** * <p> * * </p> * * @author sangmingming * @since 2019/10/25 0025 */ public class Main { public static void main(String[] args) throws Exception { TestBlockingNio blockingNio = new TestBlockingNio(); blockingNio.client(); } }
true
9de9eed952eafa942e2032f7b529f056fff0e16f
Java
honglou2001/ejb1
/ejbpro1/src/com/watch/ejb/LocElectfenceBean.java
UTF-8
17,392
2.21875
2
[]
no_license
package com.watch.ejb; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.UUID; import java.util.logging.Logger; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.Query; /** * <p> * Title: ejb title * </p> * <p> * Description: t_loc_electfence EJB Interface Bean 处理类 * </p> * * @author yangqinxu 电话:137****5317 * @version 1.0 时间 2015-6-25 9:51:03 */ @Stateless(mappedName = "LocElectfenceService") public class LocElectfenceBean implements LocElectfenceService { private final static Logger logger = Logger.getLogger(LocElectfenceBean.class.getName()); @PersistenceContext(unitName = "ejbpro1") private EntityManager manager; @Override public void Add(LocElectfence locElectfenceInfo) { locElectfenceInfo.setFlocfenid(UUID.randomUUID().toString()); manager.persist(locElectfenceInfo); } @Override public void Update(LocElectfence locElectfenceInfo) { manager.merge(locElectfenceInfo); } @Override public void Delete(String id) { LocElectfence locElectfenceInfo = manager.find(LocElectfence.class, id); manager.remove(locElectfenceInfo); } @Override public LocElectfence find(String id) { LocElectfence locElectfenceInfo = manager.find(LocElectfence.class, id); return locElectfenceInfo; } private String GetWhere(HashMap<String, String> map) { String where = ""; // queryMap.put("serialNumber", serialNumber); // queryMap.put("areaNumber", areaNumber); // queryMap.put("areaName", areaName); if (map != null && map.size() > 0) { if (map.containsKey("serialNumber") && map.get("serialNumber") != null && !map.get("serialNumber").toString().equals("")) { where += " and a.FSerialnumber = '" + map.get("serialNumber") + "' "; } if (map.containsKey("areaNumber") && map.get("areaNumber") != null && !map.get("areaNumber").toString().equals("")) { where += " and b.id = " + map.get("areaNumber") + " "; } if (map.containsKey("areaName") && map.get("areaName") != null && !map.get("areaName").toString().equals("")) { where += " and b.name like '%" + map.get("areaName") + "%' "; } // a.FUpdateTime>='2015-02-12 22:12:23' and FUpdateTime<='2015-08-12 22:12:23' if (map.containsKey("startTime") && map.get("startTime") != null && !map.get("startTime").toString().equals("")) { where += " and a.FUpdateTime >= '" + map.get("startTime") + "' "; } if (map.containsKey("endTime") && map.get("endTime") != null && !map.get("endTime").toString().equals("")) { where += " and a.FUpdateTime <= '" + map.get("endTime") + "' "; } if (map.containsKey("fdatastatus") && map.get("fdatastatus") != null && !map.get("fdatastatus").toString().equals("")) { where += " and a.fdatastatus = " + map.get("fdatastatus") + " "; } if (map.containsKey("frecordcount") && map.get("frecordcount") != null && map.get("frecordcount").toString().equals("frecordcount=1")) { where += " and a.frecordcount = 1 "; } } return where; } @Override public int GetCount(HashMap<String, String> map) { String where = GetWhere(map); StringBuffer sql = new StringBuffer(); sql.append(" SELECT count(*) "); sql.append(" FROM T_LOC_ELECTFENCE a left join electfence b on a.FEltFenceID = b.id "); sql.append(" WHERE 1 = 1 "); sql.append(where); Query query = manager.createNativeQuery(sql.toString()); int total = (new Integer(query.getSingleResult().toString())); return total; // String hql = "select count(*) from LocElectfence"; // Query query = manager.createQuery(hql); // int total = (new Integer(query.getSingleResult().toString())); // return total; } private List<Electfence> GetSerialAreaList(HashMap<String, String> map) { //String where = "and a.serialnumber='" + serialnumber + "'"; String where = ""; if (map.containsKey("serialNumber") && map.get("serialNumber") != null && !map.get("serialNumber").toString().equals("")) { where += " and a.serialnumber = '" + map.get("serialNumber") + "' "; } if (map.containsKey("areaNumber") && map.get("areaNumber") != null && !map.get("areaNumber").toString().equals("")) { where += " and a.id = " + map.get("areaNumber") + " "; } StringBuffer sql = new StringBuffer(); sql.append(" SELECT a.id,a.serialnumber,a.areanum,a.name,a.locationbd,a.locationgd,a.model,a.scope,a.createtime,a.updatetime,a.status "); sql.append(" FROM ELECTFENCE a "); sql.append(" WHERE 1 = 1 "); sql.append(where); Query query = manager.createNativeQuery(sql.toString()); List rows = query.getResultList(); List<Electfence> LocElectfences = new ArrayList<Electfence>(); for (Object row : rows) { Object[] cells = (Object[]) row; Electfence item = new Electfence(); item.setAreanum((Integer) cells[0]); LocElectfences.add(item); } return LocElectfences; } private List<LocElectfence> getTop1ByElectfence(HashMap<String, String> map) { String where = ""; if (map.containsKey("serialNumber") && map.get("serialNumber") != null && !map.get("serialNumber").toString().equals("")) { where += " and a.FSerialnumber = '" + map.get("serialNumber") + "' "; } if (map.containsKey("areaNumber") && map.get("areaNumber") != null && !map.get("areaNumber").toString().equals("")) { where += " and b.id = " + map.get("areaNumber") + " "; } StringBuffer sql = new StringBuffer(); sql.append(" SELECT a.FLocFenID,a.FIncreaseID,a.FEltFenceID,a.FSerialnumber,a.FDataStatus,a.FFieldStatus,a.FEltLongitude,a.FEltLatitude,a.FEltScope,a.FEltAddress,a.FLongitude,a.FLatitude,a.FAddress,a.FDistance,a.FAddTime,a.FUpdateTime,a.FRemark "); sql.append(" ,a.FReadCount,b.id,b.name "); // sql.append(" ,IFNULL(b.areanum,0),IFNULL(b.name,'') "); sql.append(" FROM T_LOC_ELECTFENCE a inner join electfence b on a.FEltFenceID = b.id "); sql.append(" WHERE 1 = 1 "); sql.append(where); sql.append(" order by a.FIncreaseID desc "); sql.append("limit 0,1"); Query query = manager.createNativeQuery(sql.toString()); List rows = query.getResultList(); List<LocElectfence> LocElectfences = new ArrayList<LocElectfence>(); for (Object row : rows) { Object[] cells = (Object[]) row; LocElectfence item = new LocElectfence(); item.setFlocfenid((String) cells[0]); item.setFincreaseid((Integer) cells[1]); item.setFeltfenceid((Integer) cells[2]); item.setFserialnumber((String) cells[3]); item.setFdatastatus((Integer) cells[4]); item.setFfieldstatus((Integer) cells[5]); item.setFeltlongitude((String) cells[6]); item.setFeltlatitude((String) cells[7]); item.setFeltscope((Double) cells[8]); item.setFeltaddress((String) cells[9]); item.setFlongitude((String) cells[10]); item.setFlatitude((String) cells[11]); item.setFaddress((String) cells[12]); item.setFdistance((Double) cells[13]); item.setFaddtime((java.sql.Timestamp) cells[14]); item.setFupdatetime((java.sql.Timestamp) cells[15]); item.setFremark((String) cells[16]); // if(cells[17]!=null && !cells[17].toString().equals("")) // { // // } item.setFreadCount((Integer) cells[17]); item.setFareanumber((Integer) cells[18]); item.setFareaname((String) cells[19]); LocElectfences.add(item); //更新读写次数 String updateSql = "update T_LOC_ELECTFENCE set FReadCount=FReadCount+1 WHERE FLocFenID= :FLocFenID "; Query updateQuery = manager.createNativeQuery(updateSql); updateQuery.setParameter("FLocFenID", item.getFlocfenid()); updateQuery.executeUpdate(); } return LocElectfences; } @Override public List<LocElectfence> ListLocElectfenceTop1(int offset, int length, HashMap<String, String> map) { List<LocElectfence> locEltReturn = new ArrayList<LocElectfence>(); if(map == null || map.size()==0) { return locEltReturn; } if(map.get("serialNumber") ==null || map.get("serialNumber").toString().equals("")) { return locEltReturn; } List<Electfence> elct = this.GetSerialAreaList(map); if (elct != null && elct.size() > 0) { for (int i = 0; i < elct.size(); i++) { Electfence item = elct.get(i); HashMap<String, String> map1 = new HashMap<String, String>(); map1.put("serialNumber", map.get("serialNumber")); map1.put("areaNumber", item.getAreanum().toString()); List<LocElectfence> locelts = this.getTop1ByElectfence(map1); if (locelts != null && locelts.size() > 0) { locEltReturn.add(locelts.get(0)); } } } return locEltReturn; } @Override public List<LocElectfence> ListLocElectfence(int offset, int length, HashMap<String, String> map) { String where = GetWhere(map); String ordersc = " desc "; if(map!=null && map.size()>0){ if (map.containsKey("frecordcount") && map.get("frecordcount") != null && map.get("frecordcount").toString().equals("frecordcount=1")) { ordersc = " asc "; } } StringBuffer sql = new StringBuffer(); sql.append(" SELECT a.FLocFenID,a.FIncreaseID,a.FEltFenceID,a.FSerialnumber,a.FDataStatus,a.FFieldStatus,a.FEltLongitude,a.FEltLatitude,a.FEltScope,a.FEltAddress,a.FLongitude,a.FLatitude,a.FAddress,a.FDistance,a.FAddTime,a.FUpdateTime,a.FRemark "); sql.append(" ,b.id,b.name "); sql.append(" FROM T_LOC_ELECTFENCE a left join electfence b on a.FEltFenceID = b.id "); sql.append(" WHERE 1 = 1 "); sql.append(where); sql.append(" order by a.FIncreaseID "+ordersc); sql.append("limit "+offset+"," + length + ""); Query query = manager.createNativeQuery(sql.toString()); List rows = query.getResultList(); List<LocElectfence> LocElectfences = new ArrayList<LocElectfence>(); for (Object row : rows) { Object[] cells = (Object[]) row; LocElectfence item = new LocElectfence(); item.setFlocfenid((String) cells[0]); item.setFincreaseid((Integer) cells[1]); item.setFeltfenceid((Integer) cells[2]); item.setFserialnumber((String) cells[3]); item.setFdatastatus((Integer) cells[4]); item.setFfieldstatus((Integer) cells[5]); item.setFeltlongitude((String) cells[6]); item.setFeltlatitude((String) cells[7]); item.setFeltscope((Double) cells[8]); item.setFeltaddress((String) cells[9]); item.setFlongitude((String) cells[10]); item.setFlatitude((String) cells[11]); item.setFaddress((String) cells[12]); item.setFdistance((Double) cells[13]); item.setFaddtime((java.sql.Timestamp) cells[14]); item.setFupdatetime((java.sql.Timestamp) cells[15]); item.setFremark((String) cells[16]); item.setFareanumber((Integer) cells[17]); item.setFareaname((String) cells[18]); LocElectfences.add(item); } return LocElectfences; } private List<UserWatch> ListUser(int offset, int length,HashMap<String, String> map) { String where = " "; if(map!=null && map.size() > 0) { // if(map.containsKey("funiqueid") && map.get("funiqueid")!=null && !map.get("funiqueid").toString().equals("")) // { // where += " and a.funiqueid = '"+map.get("funiqueid")+"' "; // } // if (map.containsKey("user.funiqueid") && map.get("user.funiqueid") != null && !map.get("user.funiqueid").toString().equals("")) { where += " and a.funiqueid = '" + map.get("user.funiqueid") + "' "; } } StringBuffer sql = new StringBuffer(); sql.append(" SELECT a.funiqueid,a.id,c.serialnumber,a.username,a.phone,a.password,a.sex,a.status,a.createtime,a.fmobile,a.nickname,a.birthday,a.height,a.weight,a.picture,a.flogcount,a.floglasttime,a.floglaspip,a.fienabled,a.fdatastatus,a.fremark,a.femail,a.furl,a.faddress "); sql.append(" FROM USER a inner join t_user_snrelate b "); sql.append(" on a.funiqueid=b.FUserIDStr inner join serialnumber c on c.funiqueid = b.FSNIDStr "); sql.append(" WHERE b.FDataStatus=1 | b.FDataStatus "); sql.append(where); Query query = manager.createNativeQuery(sql.toString()); List rows = query.getResultList(); List<UserWatch> Users = new ArrayList<UserWatch>(); for (Object row : rows) { Object[] cells = (Object[]) row; UserWatch item = new UserWatch(); item.setFuniqueid((String)cells[0]); item.setId((Integer)cells[1]); item.setSerialnumber((String)cells[2]); item.setUsername((String)cells[3]); item.setPhone((String)cells[4]); item.setPassword((String)cells[5]); item.setSex((String)cells[6]); item.setStatus((String)cells[7]); item.setCreatetime((String)cells[8]); item.setFmobile((String)cells[9]); item.setNickname((String)cells[10]); item.setBirthday((String)cells[11]); item.setHeight((String)cells[12]); item.setWeight((String)cells[13]); item.setPicture((String)cells[14]); item.setFlogcount((Integer)cells[15]); item.setFloglasttime((java.sql.Timestamp)cells[16]); item.setFloglaspip((String)cells[17]); item.setFienabled((Integer)cells[18]); item.setFdatastatus((Integer)cells[19]); item.setFremark((String)cells[20]); item.setFemail((String)cells[21]); item.setFurl((String)cells[22]); item.setFaddress((String)cells[23]); Users.add(item); } return Users; } private List<LocElectfence> ListLatestLocaltion1(HashMap<String, String> map) { String where = ""; if (map.containsKey("user.funiqueid") && map.get("user.funiqueid") != null && !map.get("user.funiqueid").toString().equals("")) { where += " and e.funiqueid = '" + map.get("user.funiqueid") + "' "; } if (map.containsKey("serialnumber") && map.get("serialnumber") != null && !map.get("serialnumber").toString().equals("")) { where += " and c.serialnumber = '" + map.get("serialnumber") + "' "; if(where.equals("")) { where = " and 1=0 "; } } StringBuffer sql = new StringBuffer(); sql.append(" SELECT a.FLocFenID,a.FIncreaseID,a.FEltFenceID,a.FSerialnumber,a.FDataStatus,a.FFieldStatus,a.FEltLongitude,a.FEltLatitude,a.FEltScope,a.FEltAddress,a.FLongitude,a.FLatitude,a.FAddress,a.FDistance,a.FAddTime,a.FUpdateTime,a.FRemark "); sql.append(" ,b.id,b.name,c.fpicture,f.battery "); sql.append(" FROM T_LOC_ELECTFENCE a left join electfence b on a.FEltFenceID = b.id and a.FFieldStatus=1 "); sql.append(" inner join serialnumber c on c.serialnumber = a.FSerialnumber "); sql.append(" inner join t_user_snrelate d on d.FSNIDStr = c.funiqueid "); sql.append(" inner join user e on d.FUserIDStr = e.funiqueid "); sql.append(" left join locationinfo f on f.serialnumber = c.serialnumber "); sql.append(" WHERE 1 = 1 "); sql.append(where); sql.append(" order by a.FIncreaseID desc "); sql.append("limit 0,1"); Query query = manager.createNativeQuery(sql.toString()); List rows = query.getResultList(); List<LocElectfence> LocElectfences = new ArrayList<LocElectfence>(); for (Object row : rows) { Object[] cells = (Object[]) row; LocElectfence item = new LocElectfence(); item.setFlocfenid((String) cells[0]); item.setFincreaseid((Integer) cells[1]); item.setFeltfenceid((Integer) cells[2]); item.setFserialnumber((String) cells[3]); item.setFdatastatus((Integer) cells[4]); item.setFfieldstatus((Integer) cells[5]); item.setFeltlongitude((String) cells[6]); item.setFeltlatitude((String) cells[7]); item.setFeltscope((Double) cells[8]); item.setFeltaddress((String) cells[9]); item.setFlongitude((String) cells[10]); item.setFlatitude((String) cells[11]); item.setFaddress((String) cells[12]); item.setFdistance((Double) cells[13]); item.setFaddtime((java.sql.Timestamp) cells[14]); item.setFupdatetime((java.sql.Timestamp) cells[15]); item.setFremark((String) cells[16]); item.setFareanumber((Integer) cells[17]); item.setFareaname((String) cells[18]); item.setFpicture((String) cells[19]); item.setBattery((String) cells[20]); LocElectfences.add(item); } return LocElectfences; } @Override public List<LocElectfence> ListLatestLocaltion(HashMap<String, String> map) { List<UserWatch> listUser =this.ListUser(0, 100,map); List<LocElectfence> listData = new ArrayList<LocElectfence>(); if(listUser!=null && listUser.size()>0) { for(int i=0;i<listUser.size();i++){ HashMap<String, String> map1 = new HashMap<String, String>(); map1.put("user.funiqueid", listUser.get(i).getFuniqueid()); map1.put("serialnumber", listUser.get(i).getSerialnumber()); // logger.info(String.format("yang info funiqueid:%s,serialnumber:%s", listUser.get(i).getFuniqueid(),listUser.get(i).getSerialnumber())); List<LocElectfence> childloc = this.ListLatestLocaltion1(map1); listData.addAll(childloc); } } return listData; } }
true
485613810274083d277d424e00b8b99bead1ea70
Java
noatmc-archived/jigokusense-leak
/botnet/auth/jigokusense/manager/RotationManager.java
UTF-8
2,654
2.375
2
[]
no_license
//Deobfuscated with https://github.com/SimplyProgrammer/Minecraft-Deobfuscator3000 using mappings "C:\Users\autty\Downloads\Minecraft-Deobfuscator3000-master\Minecraft-Deobfuscator3000-master\1.12 stable mappings"! /* * Decompiled with CFR 0.151. * * Could not load the following classes: * net.minecraft.entity.player.EntityPlayer * net.minecraft.network.play.client.CPacketPlayer * net.minecraftforge.common.MinecraftForge */ package botnet.auth.jigokusense.manager; import botnet.auth.jigokusense.event.events.PacketEvent; import botnet.auth.jigokusense.util.Global; import java.util.function.Predicate; import me.zero.alpine.listener.EventHandler; import me.zero.alpine.listener.Listener; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.network.play.client.CPacketPlayer; import net.minecraftforge.common.MinecraftForge; public class RotationManager implements Global { private float yaw = 0.0f; private float pitch = 0.0f; private boolean shouldRotate = false; @EventHandler private final Listener<PacketEvent.Send> receiveListener = new Listener<PacketEvent.Send>(event -> { if (event.getPacket() instanceof CPacketPlayer) { CPacketPlayer packet = (CPacketPlayer)event.getPacket(); if (this.shouldRotate) { packet.yaw = this.yaw; packet.pitch = this.pitch; } } }, new Predicate[0]); public RotationManager() { MinecraftForge.EVENT_BUS.register((Object)this); } public void reset() { this.shouldRotate = false; if (RotationManager.mc.player == null) { return; } this.yaw = RotationManager.mc.player.rotationYaw; this.pitch = RotationManager.mc.player.rotationPitch; } public void rotate(double x, double y, double z) { if (RotationManager.mc.player == null) { return; } Double[] v = this.calculateLookAt(x, y, z, (EntityPlayer)RotationManager.mc.player); this.shouldRotate = true; this.yaw = v[0].floatValue(); this.pitch = v[1].floatValue(); } private Double[] calculateLookAt(double px, double py, double pz, EntityPlayer me) { double dirx = me.posX - px; double diry = me.posY - py; double dirz = me.posZ - pz; double len = Math.sqrt(dirx * dirx + diry * diry + dirz * dirz); double pitch = Math.asin(diry /= len); double yaw = Math.atan2(dirz /= len, dirx /= len); pitch = pitch * 180.0 / Math.PI; yaw = yaw * 180.0 / Math.PI; return new Double[]{yaw += 90.0, pitch}; } }
true
3620a22a3cc0a9fe4a74e703459b664d01fd2b2f
Java
sopiseiro/pdv
/src/pdvjonatas/buscar_cliente.java
UTF-8
8,422
2.09375
2
[]
no_license
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * buscar_cliente.java * * Created on 13/08/2011, 09:32:02 */ package pdvjonatas; import utilitarios.bd; import utilitarios.mySql; import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; import java.text.DecimalFormat; import java.text.NumberFormat; import java.util.Locale; import javax.swing.AbstractAction; import javax.swing.DefaultListModel; import javax.swing.JComponent; import javax.swing.JOptionPane; import javax.swing.KeyStroke; import javax.swing.table.DefaultTableModel; import javax.swing.text.AttributeSet; import javax.swing.text.PlainDocument; /** * * @author AGENCIA GLOBO */ public class buscar_cliente extends javax.swing.JDialog { public String nome, cpf, codigo; /** Creates new form buscar_cliente */ public buscar_cliente(java.awt.Frame parent, boolean modal) { super(parent, modal); initComponents(); busca.requestFocus(); busca.setDocument( new PlainDocument(){ @Override protected void insertUpdate( DefaultDocumentEvent chng, AttributeSet attr ){ super.insertUpdate( chng, attr ); DefaultTableModel model = ((DefaultTableModel)clientes.getModel()); model.setNumRows(0); bd b = new bd(); b.connect(); mySql f = new mySql(b.conn); String sql = "Select * FROM CLIENTE WHERE nome LIKE '%"+busca.getText().toLowerCase()+"%' OR nome LIKE '%"+busca.getText().toUpperCase()+"%' OR cnpj_cnpf = '"+busca.getText() +"' OR codigo ='"+busca.getText()+"' ORDER BY nome ASC"; f.open(sql); while (f.next()){ model.addRow(new Object [] {f.fieldbyname("codigo"), f.fieldbyname("nome"),f.fieldbyname("cnpj_cnpf")} ); } } }); } public String getNome(){ return nome; } public String getCpf(){ return cpf; } public String getCodigo(){ return codigo; } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); busca = new javax.swing.JTextField(); jScrollPane1 = new javax.swing.JScrollPane(); clientes = new javax.swing.JTable(); jButton1 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jLabel1.setText("Nome ou CPF:"); clientes.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { }, new String [] { "Código", "Nome", "CPF" } ) { boolean[] canEdit = new boolean [] { false, false, true }; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit [columnIndex]; } }); clientes.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { clientesMouseClicked(evt); } }); jScrollPane1.setViewportView(clientes); jButton1.setText("Selecionar"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(busca)) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 375, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jButton1) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(busca, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jButton1) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 275, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(14, Short.MAX_VALUE)) ); pack(); }// </editor-fold>//GEN-END:initComponents private void clientesMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clientesMouseClicked if (evt.getClickCount() == 2){ DefaultTableModel model = ((DefaultTableModel)clientes.getModel()); try{ nome = model.getValueAt(clientes.getSelectedRow(), 1).toString(); cpf = model.getValueAt(clientes.getSelectedRow(), 2).toString(); codigo = model.getValueAt(clientes.getSelectedRow(), 0).toString(); }catch (Exception e){ nome = model.getValueAt(clientes.getSelectedRow(), 1).toString(); cpf = ""; codigo = model.getValueAt(clientes.getSelectedRow(), 0).toString(); } dispose(); } }//GEN-LAST:event_clientesMouseClicked private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed DefaultTableModel model = ((DefaultTableModel)clientes.getModel()); try{ nome = model.getValueAt(clientes.getSelectedRow(), 1).toString(); cpf = model.getValueAt(clientes.getSelectedRow(), 2).toString(); codigo = model.getValueAt(clientes.getSelectedRow(), 0).toString(); dispose(); }catch (Exception e){ nome = model.getValueAt(clientes.getSelectedRow(), 1).toString(); cpf = ""; codigo = model.getValueAt(clientes.getSelectedRow(), 0).toString(); } }//GEN-LAST:event_jButton1ActionPerformed /** * @param args the command line arguments */ public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { buscar_cliente dialog = new buscar_cliente(new javax.swing.JFrame(), true); dialog.addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent e) { System.exit(0); } }); dialog.setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JTextField busca; private javax.swing.JTable clientes; private javax.swing.JButton jButton1; private javax.swing.JLabel jLabel1; private javax.swing.JScrollPane jScrollPane1; // End of variables declaration//GEN-END:variables }
true
c79836c0e7c6f66817dcecb503ee11344b584175
Java
tian-qingzhao/design-pattern
/src/main/java/com/tqz/pattern/decorator/batterback/v2/BaseBattercake.java
UTF-8
298
2.46875
2
[]
no_license
package com.tqz.pattern.decorator.batterback.v2; /** * @Author: tian * @Date: 2020/4/22 21:26 * @Desc: */ public class BaseBattercake extends Battercake { @Override public String msg() { return "煎饼"; } @Override public int price() { return 5; } }
true
b5ce9e2047697d59209909e65b71c908bbd12e2a
Java
RevatureRobert/pet-tribble-lopezjronald
/src/main/java/net/revature/enterprise/pettribble/service/PetTribbleImpl.java
UTF-8
7,122
2.796875
3
[]
no_license
package net.revature.enterprise.pettribble.service; import net.revature.enterprise.pettribble.model.PetTribble; import java.sql.*; import java.util.ArrayList; import java.util.Scanner; public class PetTribbleImpl implements PetTribbleDao { public static final String COLUMN_ID = "id"; public static final String COLUMN_NAME = "name"; public static final String TABLE_NAME = "tribble"; /* Query to retrieve Pet Tribble by id */ public static final String QUERY_SEARCH_ID = "SELECT " + COLUMN_ID + ", " + COLUMN_NAME + " FROM " + TABLE_NAME + " WHERE " + COLUMN_ID + " = ?"; /* Query to retrieve all pet tribble by name */ public static final String QUERY_SEARCH_NAME = "SELECT " + COLUMN_ID + ", " + COLUMN_NAME + " FROM " + TABLE_NAME + " WHERE " + COLUMN_NAME + " = ? ORDER BY " + COLUMN_NAME; public static final String QUERY_GET_ALL_PET_TRIBBLES = "SELECT " + COLUMN_ID + ", " + COLUMN_NAME + " FROM " + TABLE_NAME; /* GET ALL PET TRIBBLE */ public static final String QUERY_DELETE_BY_ID = "DELETE FROM " + TABLE_NAME + " WHERE " + COLUMN_ID + " = ?"; /* QUERY TO DELETE BY ID */ public static final String QUERY_CREATE = "INSERT INTO " + TABLE_NAME + " (" + COLUMN_NAME + ") VALUES (?)"; /* CREATE A NEW PET tribble */ public final static Scanner scanner = new Scanner(System.in); public static Integer id; @Override public PetTribble getById(int id, Connection connection) { try { PetTribble petTribble = new PetTribble(); PreparedStatement preparedStatement = connection.prepareStatement(QUERY_SEARCH_ID); preparedStatement.setInt(1, id); ResultSet resultSet = preparedStatement.executeQuery(); if (resultSet != null) { while (resultSet.next()) { petTribble.setId(resultSet.getInt(1)); petTribble.setName(resultSet.getString(2)); } resultSet.close(); } preparedStatement.close(); return petTribble; } catch (SQLException e) { System.out.println("There was a problem with your transaction"); return null; } catch (Exception e) { System.out.println("ID does not exist or is no longer in the system."); return null; } } @Override public ArrayList<PetTribble> getByName(Connection connection, String name) { try { ArrayList<PetTribble> petTribbles = new ArrayList<>(); PreparedStatement preparedStatement = connection.prepareStatement(QUERY_SEARCH_NAME); preparedStatement.setString(1, name.toLowerCase().trim()); ResultSet resultSet = preparedStatement.executeQuery(); if (resultSet != null) { while (resultSet.next()) { PetTribble petTribble = new PetTribble(); petTribble.setId(resultSet.getInt(1)); petTribble.setName(resultSet.getString(2)); petTribbles.add(petTribble); } resultSet.close(); } preparedStatement.close(); return petTribbles; } catch (SQLException e) { System.out.println("Name does not exist or is no longer in the system"); } return null; } @Override public ArrayList<PetTribble> getAllPetTribbles(Connection connection) { try { ArrayList<PetTribble> petTribbles = new ArrayList<>(); PreparedStatement preparedStatement = connection.prepareStatement(QUERY_GET_ALL_PET_TRIBBLES); ResultSet resultSet = preparedStatement.executeQuery(); if (resultSet != null) { while (resultSet.next()) { PetTribble petTribble = new PetTribble(); petTribble.setId(resultSet.getInt(1)); petTribble.setName(resultSet.getString(2)); petTribbles.add(petTribble); } resultSet.close(); } preparedStatement.close(); return petTribbles; } catch (SQLException e) { return new ArrayList<>(); } } @Override public int deleteById(Connection connection, int id) { try { connection.setAutoCommit(false); PreparedStatement preparedStatement = connection.prepareStatement(QUERY_DELETE_BY_ID); int result = -1; preparedStatement.setInt(1, id); try { result = preparedStatement.executeUpdate(); } catch (Exception e) { e.printStackTrace(); } if (result != 0) { connection.commit(); System.out.println("Deletion of ID: " + id + " was successful."); preparedStatement.close(); } else { connection.rollback(); System.out.println("ID #: " + id + " does not exist or is no longer available."); } connection.setAutoCommit(true); return result; } catch (SQLException e) { System.out.println("ID #: " + id + " does not exist or is no longer available."); return -1; } } @Override public PetTribble createPetTribble(Connection connection, String name) { try { while (true) { name = name.trim(); if (name != "" || name != null) { break; } else { System.out.print("Invalid entry. Please enter a first name: "); } } PreparedStatement preparedStatement = connection.prepareStatement(QUERY_CREATE, Statement.RETURN_GENERATED_KEYS); int result = -1; preparedStatement.setString(1, name.trim().toLowerCase()); try { result = preparedStatement.executeUpdate(); } catch (Exception e) { e.printStackTrace(); } ResultSet resultSet = preparedStatement.getGeneratedKeys(); PetTribble petTribble = new PetTribble(); if (resultSet.next()) { petTribble = getById(resultSet.getInt(1), connection); } if (result != 0) { System.out.println("Entry was successful"); preparedStatement.close(); return petTribble; } else { System.out.println("ID #: " + id + " does not exist or is no longer available."); return new PetTribble(); } } catch (SQLException e) { System.out.println("Sorry, unable to create the query due to syntax."); return null; } } }
true
941e4d114daa537e6245b16458dc6a15e213a51a
Java
jczapiewski/Design-Patterns
/src/main/java/co/devfoundry/designpatterns/command/Main.java
UTF-8
881
2.59375
3
[]
no_license
package co.devfoundry.designpatterns.command; import co.devfoundry.designpatterns.command.command.MusicPlayerRemote; import co.devfoundry.designpatterns.command.command.PlayFirstTrack; import co.devfoundry.designpatterns.command.command.PlayNextTrack; import co.devfoundry.designpatterns.command.command.PlayRandomTrack; public class Main { public static void main(String[] args) { MusicPlayer player = new MusicPlayer(); MusicPlayerRemote remote = new MusicPlayerRemote(); remote.setCommand(new PlayFirstTrack(player)); remote.pressButton(); remote.setCommand(new PlayNextTrack(player)); remote.pressButton(); remote.pressButton(); remote.pressButton(); remote.pressButton(); remote.setCommand(new PlayRandomTrack(player)); remote.pressButton(); remote.pressButton(); } }
true
1ef738f32d0fbef2204d575d88ab2878c593dd97
Java
GerardoUPM/dsvp-rest
/src/main/java/edu/ctb/upm/midas/client_modules/extraction/wikipedia/texts_extraction/api_response/WikipediaTextsExtractionService.java
UTF-8
763
1.921875
2
[]
no_license
package edu.ctb.upm.midas.client_modules.extraction.wikipedia.texts_extraction.api_response; import edu.ctb.upm.midas.model.extraction.wikipedia.texts_extraction.request.Request; import edu.ctb.upm.midas.model.extraction.common.request.RequestJSON; import edu.ctb.upm.midas.model.extraction.common.response.Response; /** * Created by gerardo on 12/02/2018. * * @author Gerardo Lagunes G. ${EMAIL} * @version ${<VERSION>} * @project dgsvp-rest * @className MayoClinicTextsExtractionService * @see */ public interface WikipediaTextsExtractionService { Response getTexts(Request request); Response getResources(Request request); Response getWikipediaTextsByJSON( RequestJSON request); Response getWikipediaResourcesByJSON( RequestJSON request); }
true
6312c141cb57461dcb34dd632e9bf09054df6e66
Java
N-Ibrahimi/Java
/Tree/BinarySearchTree.java
UTF-8
2,130
3.5625
4
[]
no_license
package binarysearchtree; public class tre { public Node root; public int nelms; public tre(){ root = null; nelms = 0; } public void display(){ inorder(root); } public void inorder(Node c){ if(c != null){ inorder(c.left); System.out.println(c.data); inorder(c.right); } } public void insertelement(int val){ Node newnode = new Node(val); Node cur = root; Node parent = null; if(cur == null){ root = newnode; } while(cur != null){ parent = cur; if(newnode.data < cur.data){ cur = cur.left; } else{ cur = cur.right; } } if(parent == null){ root = newnode; } else if(newnode.data < parent.data){ parent.left = newnode; } else{ parent.right = newnode; } nelms++; } public int successor(Node x){ Node cur = root; Node parent = cur; while(cur.data != x.data){ parent = cur; if(x.data < cur.data){ cur = cur.left; } else{ cur = cur.right; } } if(cur.right != null ){ Node n = cur.right; while(n.left != null && n.data > x.data){ n = n.left; } return n.data; } return parent.data; } public int deleteNode(int val){ Node cur = root; Node parent = null; while(cur != null ){ parent = cur; if(val < cur.data && val != cur.data){ cur = cur.left; } else{ cur = cur.right; } } cur = root; Node suc = null; while(cur != null && cur.data != val){ suc = cur; } suc.left = null; suc.right = null; return val; } public int totalelements(){ return nelms; } public static void main(String[] args){ tre btr = new tre(); btr.insertelement(15); btr.insertelement(6); btr.insertelement(18); btr.insertelement(3); btr.insertelement(7); btr.insertelement(17); btr.insertelement(20); btr.insertelement(2); btr.insertelement(4); btr.insertelement(13); btr.insertelement(9); Node x = new Node(9); //System.out.println(btr.totalelements()); //btr.display(); System.out.println("Sucessor " + btr.successor(x)); System.out.println("deleted element is " + btr.deleteNode(x.data)); btr.display(); } }
true
c34da563f0958bcf773e8a532cee4ad75b2574e0
Java
37bhushan/Google-Applied-CS-With-Android-Exercises
/Ghost Single Player/ghost_starter/app/src/main/java/com/google/engedu/ghost/TrieNode.java
UTF-8
1,754
2.953125
3
[]
no_license
package com.google.engedu.ghost; import java.util.LinkedList; public class TrieNode { char content; boolean isEnd; int count; LinkedList<TrieNode> childList; // private HashMap<String, TrieNode> children; //private boolean isWord; public TrieNode(char c) { // children = new HashMap<>(); // isWord = false; childList = new LinkedList<TrieNode>(); isEnd = false; content = c; count = 0; } public TrieNode subNode(char c) { // if (childList != null) // for (TrieNode eachChild : childList) // if (eachChild.content == c) // return eachChild; return null; } public void add(String s) { // HashMap<String,TrieNode>child = this.children; // for (int i= 0 ; i<s.length();i++){ // char chr = s.charAt(i); // TrieNode t; // if (children.containsKey(chr)){ // t = children.get(String.valueOf(chr)); // }else{ // t = new TrieNode(); // children.put(String.valueOf(chr),t); // } // child = t.children; // } } public String Search(String string){ // HashMap<String,TrieNode>child = this.children; // for (int i=0 ;i<string.length();i++){ // char chr = string.charAt(i); // TrieNode t; // // } return null; } public boolean isWord(String s) { return false; } public String getAnyWordStartingWith(String s) { return null; } public String getGoodWordStartingWith(String s) { return null; } }
true
438fc88ed4762a6c6c870267e6e8e6f4f87343c0
Java
ripulca/lgtuch
/prog1/src/com/company/Shape.java
UTF-8
147
2.390625
2
[]
no_license
package com.company; public abstract class Shape { public abstract double getSurfaceSquare(); public abstract double getVolume(); }
true
e9ebb25afdc1b9107af855c6f155f27495b281cd
Java
cherryperuri1/brdfiles
/BRD-FILERESOURCES/Brd Notepad files/Brd1notepad/Routine1/EMIMAIN.txt
UTF-8
2,306
3.28125
3
[]
no_license
package Brd1; import java.util.Scanner; public class EmiMain { public static void main(String[] args) { double p; double r;// rate of interest int n;// no of installments for the tenure int t;// no of installments per year int m;// no of years|period double x ;// installment amount int rec = 1, hi; Scanner sc = new Scanner(System.in); OUT: do { System.out.println("Please enter the following details:\nLoan amount:"); p = sc.nextDouble(); System.out.println("Rate of interest in percent:"); r = sc.nextDouble(); System.out.println("Period or tenure of loan in months:"); m = sc.nextInt(); for (; m < 0;) { System.out.println("Months can't be negative right! Please enter positive number of months "); m = sc.nextInt(); } r = r / 100; System.out.println("Enter the number of payments for year:"); t = sc.nextInt(); // t=12; n = (m * t) / 12; if (n == 0) { System.out.printf("The installment for the given values is:%f\n", (p + p * r)); // System.exit(0); continue OUT; } System.out.println( "Enter one among the following options:\n1.Calculate Installment for given conditions\n2.Want to know the principal component and interest component\n3.Installment for a given break up period:"); hi = sc.nextInt(); switch (hi) { case 1: {// x = installment(p, r, n, t); // calculation emi System.out.println(x); break; } case 2: { int bc = 0; double x1 = installment(p, r, n, t); IPComponent ip = new IPComponent(p, r, t, m, x1); ip.component(bc); break; } case 3: { double x1 = installment(p, r, n, t); System.out.println("Enter the month for which break up is required"); int bc = sc.nextInt(); IPComponent ip = new IPComponent(p, r, t, m, x1); ip.component(bc); break; } } System.out.println("\nDo you want to calculate for some other loan parameter values:\n1.yes\n2.no"); rec = sc.nextInt(); // for(int ni=0;ni<30;ni++)System.out.println(); System.out.flush(); } while (rec == 1); } static double installment(double p, double r, int n, int t) { double x1; x1 = (p * (r / t)) / (1 - 1 / Math.pow((1 + r / t), n)); return x1; } }
true
5794451834a03369776dab019ffb5f7baa4e7f10
Java
AnaTeresaQR/ejerciciosPatronesExamen12016
/ExerciseCreationalPatterns/src/exercise7/ConcreteBuilderProfesorInterino.java
UTF-8
1,216
2.890625
3
[]
no_license
package exercise7; import java.util.Date; /** * * @author Ana Teresa */ public class ConcreteBuilderProfesorInterino { ProfesorInterino profInterino; public ConcreteBuilderProfesorInterino() { } public void createProf() { profInterino = new ProfesorInterino(); } public void createFechaIn_Fin(Date fechaIn, Date fechaFin) throws ExcepcionPersonalizada { if (fechaIn.after(fechaIn)) { profInterino.setFechainicio(fechaIn); profInterino.setFechaFin(fechaFin); } else { throw new ExcepcionPersonalizada("Las fecha no son correctas"); } } private boolean createPerson(Persona person) throws ExcepcionPersonalizada { if (person == null) { throw new ExcepcionPersonalizada("La persona no puede ser creada porque no existe"); } else { String name = person.getNombre(); int edad = person.getEdad(); if ((name != null && !name.equals("")) && edad != 0) { return true; } else { throw new ExcepcionPersonalizada("La personas no puede ser creada"); } } } }
true
8afde4daeb9c6a823fc3a70a6755e7634d8ae677
Java
jmiedzinski/databucket-app
/src/main/java/pl/databucket/DatabucketApplication.java
UTF-8
823
1.953125
2
[ "Apache-2.0" ]
permissive
package pl.databucket; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import pl.databucket.service.DatabucketServiceIm; @SpringBootApplication public class DatabucketApplication { public static void main(String[] args) { Logger logger = LoggerFactory.getLogger(DatabucketServiceIm.class); try { SpringApplication.run(DatabucketApplication.class, args); } catch (Exception e) { logger.info("\n\n\n--------------------------------------------------------------------"); logger.error("Problem with starting Databucket application. Check if the database server is started."); logger.info("--------------------------------------------------------------------"); } } }
true
1dfb44dfbfff6e7954626ee11a3df20eb1c084c5
Java
xiw9/regex-filter
/src/com/wandsea/antispammer/TraditionalActivity.java
UTF-8
4,134
2.203125
2
[ "WTFPL" ]
permissive
package com.wandsea.antispammer; import java.util.ArrayList; import com.wandsea.antispammer.R; import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.os.Bundle; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.EditText; import android.widget.ListView; public class TraditionalActivity extends Activity { /** Called when the activity is first created. */ ListView list = null; ArrayList<String> listItem=null; ArrayAdapter<String> adapter=null; int itemselect=0; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.traditional); list = (ListView) findViewById(R.id.traditional_listView1); listItem = SmsFilter.gettfilter(getApplicationContext()); adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_single_choice, listItem); list.setItemsCanFocus(true); list.setChoiceMode(ListView.CHOICE_MODE_SINGLE); list.setAdapter(adapter); list.setItemChecked(0, true); list.setOnItemLongClickListener(new ListView.OnItemLongClickListener() { public boolean onItemLongClick(AdapterView<?> arg0, View arg1, final int arg2, long arg3) { if (arg2==0) return false; AlertDialog dlg=new AlertDialog.Builder(TraditionalActivity.this) .setMessage("是否删除该条过滤器?") .setPositiveButton("确定", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { SmsFilter.modifytfilter(getApplicationContext(),listItem.get(arg2),""); listItem = SmsFilter.gettfilter(getApplicationContext()); adapter = new ArrayAdapter<String>(TraditionalActivity.this, android.R.layout.simple_list_item_single_choice, listItem); list.setItemsCanFocus(true); list.setChoiceMode(ListView.CHOICE_MODE_SINGLE); list.setAdapter(adapter); list.setItemChecked(0, true); } }).setNegativeButton("取消",null).create(); dlg.show(); return false; }} ); list.setOnItemClickListener(new ListView.OnItemClickListener(){ public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) { itemselect=arg2; EditText edittext= (EditText)findViewById(R.id.traditional_editText1); Button button1 = (Button) findViewById(R.id.traditional_button1); if(itemselect==0){ button1.setText("Add"); edittext.setText(""); }else{ button1.setText("Edit"); edittext.setText(listItem.get(itemselect)); } } }); Button button1 = (Button) findViewById(R.id.traditional_button1); button1.setOnClickListener(new Button.OnClickListener() { public void onClick(View arg0) { EditText edittext= (EditText)findViewById(R.id.traditional_editText1); if(itemselect==0){ SmsFilter.createtfilter(getApplicationContext(),edittext.getText().toString()); edittext.setText(""); }else{ SmsFilter.modifytfilter(getApplicationContext(),listItem.get(itemselect),edittext.getText().toString()); } listItem = SmsFilter.gettfilter(getApplicationContext()); adapter = new ArrayAdapter<String>(TraditionalActivity.this, android.R.layout.simple_list_item_single_choice, listItem); list.setItemsCanFocus(true); list.setChoiceMode(ListView.CHOICE_MODE_SINGLE); list.setAdapter(adapter); list.setItemChecked(itemselect, true); } }); } }
true
a95e408ee21cbe7b2b41a72fef04f50a526a444e
Java
heartforest/yc-case-report
/src/main/java/com/ycmvp/casereport/entity/ccase/TabCaseUser.java
UTF-8
2,073
1.601563
2
[]
no_license
package com.ycmvp.casereport.entity.ccase; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.io.Serializable; @Data public class TabCaseUser implements Serializable { private static final long serialVersionUID = 1L; private String id; @JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai") private java.time.LocalDate caseDate; private String userid; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") private java.time.LocalDateTime optTime; private String strokeDest; @JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai") private java.time.LocalDate strokeDateGo; @JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai") private java.time.LocalDate strokeDateBack; private String strokeDescription; private String bodySign; private String bodycase; private String doctorSign; private String hospital; @JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai") private java.time.LocalDate doctorTime; private String dectorInfo; private String caseExplain; private String userCity; private String userCommunity; private String userBuilding; private String userCallCommunity; private String touchingSign; private String strokeVia; private String userMeet; private String userPubPlace; private String bodyTemperature; private String isolationTag; @JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai") private java.time.LocalDate isolationDate; @JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai") private java.time.LocalDate unisolationDate; private String isolationStatus; private String isolationDescription; private String workStatus; private Integer epidemicCommunityCount; private String strandedSign; private String examineName; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") private java.time.LocalDateTime examineTime; private String examineUserid; }
true
cc7d6821e6ded993496d9f9037a2699bfa6d6956
Java
sufadi/decompile-hw
/decompile/app/HwSystemManager/src/main/java/com/huawei/harassmentinterception/engine/HwEngineCallerManager.java
UTF-8
780
2.53125
3
[]
no_license
package com.huawei.harassmentinterception.engine; public class HwEngineCallerManager { private static HwEngineCallerManager sInstance = null; private HwEngineCaller mCaller = null; public static synchronized HwEngineCallerManager getInstance() { HwEngineCallerManager hwEngineCallerManager; synchronized (HwEngineCallerManager.class) { if (sInstance == null) { sInstance = new HwEngineCallerManager(); } hwEngineCallerManager = sInstance; } return hwEngineCallerManager; } public synchronized HwEngineCaller getEngineCaller() { return this.mCaller; } public synchronized void setEngineCaller(HwEngineCaller caller) { this.mCaller = caller; } }
true
22eabad34cbe221e96c473c388374c23a61307a4
Java
ZYYBOSS/1
/shop/src/main/java/com/java2/web/entity/AddressEntity.java
UTF-8
1,048
2.4375
2
[]
no_license
package com.java2.web.entity; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; import com.fasterxml.jackson.annotation.JsonIgnore; @Entity @Table(name = "address") public class AddressEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String address; @ManyToOne(fetch=FetchType.EAGER) @JoinColumn(name="user_id") //忽略某个元素,不加会死循环不停读取list @JsonIgnore private UserEntity userEntity; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public UserEntity getUser() { return userEntity; } public void setUser(UserEntity user) { this.userEntity = user; } }
true
f61ce7a57e17cb7ed8e255e8ecd2e874f5bce022
Java
borisemoreno/mutant-hunter
/src/main/java/com/xmen/mutanthunter/repository/DnaVerificationsRepository.java
UTF-8
711
2.015625
2
[]
no_license
package com.xmen.mutanthunter.repository; import com.xmen.mutanthunter.model.StatsDto; import com.xmen.mutanthunter.model.db.DnaVerifications; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.CrudRepository; import java.util.List; import java.util.Optional; import java.util.UUID; public interface DnaVerificationsRepository extends CrudRepository<DnaVerifications, UUID> { @Query(value = "FROM DnaVerifications d where d.dna = ?1") Optional<DnaVerifications> findByDna(String dna); @Query(value = "select new com.xmen.mutanthunter.model.StatsDto(count(d.id), d.mutant) from DnaVerifications d group by d.mutant") List<StatsDto> getStats(); }
true
f70231ac285caaa27e82019bccaba7aa5bb46500
Java
crashtheparty/EnchantmentSolution
/src/org/ctp/enchantmentsolution/events/player/PlayerChangeCoordsEvent.java
UTF-8
992
2.359375
2
[]
no_license
package org.ctp.enchantmentsolution.events.player; import org.bukkit.Location; import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; import org.bukkit.event.HandlerList; import org.bukkit.event.player.PlayerEvent; public class PlayerChangeCoordsEvent extends PlayerEvent implements Cancellable { private static final HandlerList handlers = new HandlerList(); public static HandlerList getHandlerList() { return handlers; } @Override public HandlerList getHandlers() { return handlers; } private final Location fromLoc, toLoc; private boolean cancelled; public PlayerChangeCoordsEvent(Player who, Location fromLoc, Location toLoc) { super(who); this.fromLoc = fromLoc; this.toLoc = toLoc; } public Location getFrom() { return fromLoc; } public Location getTo() { return toLoc; } @Override public boolean isCancelled() { return cancelled; } @Override public void setCancelled(boolean cancelled) { this.cancelled = cancelled; } }
true
92ca27b7fc5d40a15533c8c7cda385de7f326d3e
Java
AlessioMercuriali/QBorrow
/src/main/java/it/quix/academy/qborrow/core/model/QborrowUserContext.java
UTF-8
1,746
2.03125
2
[]
no_license
package it.quix.academy.qborrow.core.model; import java.util.ArrayList; import it.quix.framework.core.model.Language; import it.quix.framework.core.model.Organization; import it.quix.framework.core.model.Role; import it.quix.framework.core.model.User; import it.quix.framework.core.model.UserContext; import it.quix.puma.core.PumaFinderException; /** * Inserire all'interno di questa classe le proprieta' e i metodi * che si vogliono associare all'utente dell'applicazione */ public class QborrowUserContext extends UserContext { private static final long serialVersionUID = 1L; public QborrowUserContext() { super(); } @Override public Boolean authCodeLogin(String arg0) throws PumaFinderException { // TODO Auto-generated method stub return null; } @Override public String getCodCompany() { // TODO Auto-generated method stub return null; } @Override public Language getLanguageForSysAttribute() { // TODO Auto-generated method stub return null; } @Override public Organization getOrganizationForSysSysAttribute() { // TODO Auto-generated method stub return null; } @Override public void login(String user) throws Exception { final String userId = user; User userMode1 = new User() { public String getPassword() { return null; } public String getName() { return null; } public String getDn() { return null; } }; super.login(userMode1, new ArrayList<Role>()); } }
true
3c0101add0450a9356180da8d2bc85b0a533906b
Java
Tongqinwei/hhlab_ser2
/src/com/servlet/CreateSessionServlet.java
UTF-8
4,125
2.53125
3
[]
no_license
package com.servlet; import com.Login.Bean.SessionUser; import com.Login.Handler.MyJsonParser; import com.Login.Handler.WechatSessionHandler; import com.Login.Sessions.SessionManager; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.*; /** * Created by lee on 2017/6/17. * * @author: lee * create time: 下午1:43 */ @WebServlet(name = "CreateSessionServlet") public class CreateSessionServlet extends HttpServlet { public static String getBody(HttpServletRequest request) throws IOException { // get the body of the request object to a string String body = null; StringBuilder stringBuilder = new StringBuilder(); BufferedReader bufferedReader = null; try { InputStream inputStream = request.getInputStream(); if (inputStream != null) { bufferedReader = new BufferedReader(new InputStreamReader(inputStream)); char[] charBuffer = new char[128]; int bytesRead = -1; while ((bytesRead = bufferedReader.read(charBuffer)) > 0) { stringBuilder.append(charBuffer, 0, bytesRead); } } else { stringBuilder.append(""); } } catch (IOException ex) { throw ex; } finally { if (bufferedReader != null) { try { bufferedReader.close(); } catch (IOException ex) { throw ex; } } } body = stringBuilder.toString(); return body; } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // get the request pay load String session_code = getBody(request); // get response writer Writer out = response.getWriter(); response.setContentType("application/json"); if(!session_code.contentEquals("")){ // if the code is not send return the error json session_code = MyJsonParser.CodeJsonToString(session_code); log("receive session code from js is " + session_code); if(session_code.contentEquals("")){ // failed to parse out.write(MyJsonParser.GetSessionError()); } else { // session code get success String result = WechatSessionHandler.getSessionKey(session_code); log("receive from weChat server " + result); JsonObject jsonObject = MyJsonParser.String2Json(result); JsonElement element = jsonObject.get("openid"); if(element != null){ // 成功调用到微信的状态,为用户建立一个session 对象 方便进行管理 log("receive session key success! "); SessionUser user = new SessionUser(); element = jsonObject.get("openid"); user.setOpenID(element.getAsString()); element = jsonObject.get("session_key"); user.setSessionKey(element.getAsString()); SessionManager manager = SessionManager.getInstance(); manager.AddUser(user); // 返回成功的json out.write(MyJsonParser.GetSessionSuccess(user.getSessionID(),user.getOpenID())); } else { out.write(MyJsonParser.GetSessionError()); } } } else { out.write(MyJsonParser.GetSessionError()); } out.flush(); response.flushBuffer(); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.sendError(404); } }
true
262f3d6cf9a076d9e3bc0f90afd3600c23c76fed
Java
RaviThejaGoud/hospital
/hms-common/src/main/java/com/hyniva/sms/ws/vo/cashbook/CashBookVO.java
UTF-8
5,044
2.0625
2
[]
no_license
package com.hyniva.sms.ws.vo.cashbook; import java.util.Date; public class CashBookVO { public long id; public Date transactionDate; public long accountId; public String accountName; public String place; public String narration; public String vocherNumber; public String transactionType; public double amount; /*This are dummy variables to manipulate trail balance sheet */ public double crAmount; public String crTtransactionType; public String transactionDateStr; public long clientId; public String entryType; /*C - Cash, D - DD , CH - Cheque, BD - Bank Deposit*/ protected String paymentType; protected String branchName; protected String chequeNumber; protected String ddNumber; protected long bankId; protected String bookType; protected String transactionNumber; protected String accountNumber; public String getAccountNumber() { return accountNumber; } public void setAccountNumber(String accountNumber) { this.accountNumber = accountNumber; } public String getTransactionNumber() { return transactionNumber; } public void setTransactionNumber(String transactionNumber) { this.transactionNumber = transactionNumber; } public String getBookType() { return bookType; } public void setBookType(String bookType) { this.bookType = bookType; } public String getPaymentType() { return paymentType; } public void setPaymentType(String paymentType) { this.paymentType = paymentType; } public String getBranchName() { return branchName; } public void setBranchName(String branchName) { this.branchName = branchName; } public String getChequeNumber() { return chequeNumber; } public void setChequeNumber(String chequeNumber) { this.chequeNumber = chequeNumber; } public String getDdNumber() { return ddNumber; } public void setDdNumber(String ddNumber) { this.ddNumber = ddNumber; } public long getBankId() { return bankId; } public void setBankId(long bankId) { this.bankId = bankId; } public String getEntryType() { return entryType; } public void setEntryType(String entryType) { this.entryType = entryType; } public double getCrAmount() { return crAmount; } public void setCrAmount(double crAmount) { this.crAmount = crAmount; } public String getCrTtransactionType() { return crTtransactionType; } public void setCrTtransactionType(String crTtransactionType) { this.crTtransactionType = crTtransactionType; } /** * @return the id */ public long getId() { return id; } /** * @param id the id to set */ public void setId(long id) { this.id = id; } /** * @return the transactionDate */ public Date getTransactionDate() { return transactionDate; } /** * @param transactionDate the transactionDate to set */ public void setTransactionDate(Date transactionDate) { this.transactionDate = transactionDate; } /** * @return the accountNumber */ public long getAccountId() { return accountId; } /** * @param accountNumber the accountNumber to set */ public void setAccountId(long accountId) { this.accountId = accountId; } /** * @return the accountName */ public String getAccountName() { return accountName; } /** * @param accountName the accountName to set */ public void setAccountName(String accountName) { this.accountName = accountName; } /** * @return the place */ public String getPlace() { return place; } /** * @param place the place to set */ public void setPlace(String place) { this.place = place; } /** * @return the narration */ public String getNarration() { return narration; } /** * @param narration the narration to set */ public void setNarration(String narration) { this.narration = narration; } /** * @return the vocherNumber */ public String getVocherNumber() { return vocherNumber; } /** * @param vocherNumber the vocherNumber to set */ public void setVocherNumber(String vocherNumber) { this.vocherNumber = vocherNumber; } /** * @return the transactionType */ public String getTransactionType() { return transactionType; } /** * @param transactionType the transactionType to set */ public void setTransactionType(String transactionType) { this.transactionType = transactionType; } /** * @return the amount */ public double getAmount() { return amount; } /** * @param amount the amount to set */ public void setAmount(double amount) { this.amount = amount; } public String getTransactionDateStr() { return transactionDateStr; } public void setTransactionDateStr(String transactionDateStr) { this.transactionDateStr = transactionDateStr; } public long getClientId() { return clientId; } public void setClientId(long clientId) { this.clientId = clientId; } }
true
59398b63fca8b3539348ae17e36bcdba7c46c0a5
Java
damnedGod/Indonesia_Que
/app/src/main/java/com/example/android/indonesiaqu/WelcomeScreen.java
UTF-8
989
1.96875
2
[]
no_license
package com.example.android.indonesiaqu; import android.content.Intent; import android.content.pm.ActivityInfo; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; public class WelcomeScreen extends AppCompatActivity { public Button startButton; public void init(){ startButton=(Button)findViewById(R.id.start_button); startButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent tombol = new Intent(WelcomeScreen.this,MainActivity.class); startActivity(tombol); } }); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_welcome_screen); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); init(); } }
true
5bbc4efeb38b44b45db9b25d57478c9a851e01b7
Java
drmmx/MVPAndroidLang
/app/src/main/java/com/example/dev3rema/mvpandroidlang/data/source/local/dao/LangDao.java
UTF-8
754
2.0625
2
[]
no_license
package com.example.dev3rema.mvpandroidlang.data.source.local.dao; import android.arch.persistence.room.Dao; import android.arch.persistence.room.Delete; import android.arch.persistence.room.Insert; import android.arch.persistence.room.OnConflictStrategy; import android.arch.persistence.room.Query; import com.example.dev3rema.mvpandroidlang.data.entity.Lang; import java.util.List; @Dao public interface LangDao { @Insert(onConflict = OnConflictStrategy.REPLACE) void saveLang(Lang lang); @Insert void insertAll(Lang... langs); @Delete void deleteLang(Lang lang); @Query("SELECT * FROM android_lang") List<Lang> getLangs(); @Query("SELECT * FROM android_lang WHERE id = :id") Lang getLangById(int id); }
true
de7ba2c8db5d7c0f53b60242f402b3f824230e81
Java
cckmit/event-manager
/src/main/java/ob1/eventmanager/service/CategoryService.java
UTF-8
325
1.804688
2
[]
no_license
package ob1.eventmanager.service; import ob1.eventmanager.entity.CategoryEntity; import java.util.List; import java.util.Optional; public interface CategoryService { List<CategoryEntity> getCategories(); Optional<CategoryEntity> getById(long id); Optional<CategoryEntity> getCategoryByName(String name); }
true
726a2cec437874e8812ce969422aae9596ce8562
Java
uNouss/ap
/td8/Morpion.java
UTF-8
6,947
2.84375
3
[]
no_license
//import extensions.*; class Morpion extends Program { final int TAILLE = 5; final char O = 'O'; final char X = 'X'; final char V = ' '; final String PROMPT = "$: "; char [][] grille = new char[TAILLE][TAILLE]; void testInitalize(){ initialize(); char[][] grilleVide = new char[TAILLE][]; for(int idxL = 0; idxL < length(grilleVide, 1); idxL++){ grilleVide[idxL] = new char[length(grilleVide, 1)]; for(int idxC = 0; idxC < length(grilleVide[idxL]); idxC++){ grilleVide[idxL][idxC] = V; } } assertArrayEquals(grilleVide, grille); } void initialize(){ for(int idxL = 0; idxL < length(grille, 1); idxL++) for(int idxC = 0; idxC < length(grille, 2); idxC++) grille[idxL][idxC] = V; } void testSet(){ set(1, 2, O); assertEquals(O, grille[1][2]); set(1, 1, X); assertEquals(X, grille[1][1]); set(2, 2, O); assertEquals(O, grille[2][2]); } void set(int idxL, int idxC, char car){ grille[idxL][idxC] = car; } void testIsAlignement(){ initialize(); set(0,0,X); set(1,1,X); set(2,2,X); //println();printGrid(); assertTrue(isAlignement()); initialize(); set(0,2,O); set(1,1,O); set(2,0,O); //println();printGrid(); assertTrue(isAlignement()); initialize(); set(0,2,O); set(0,1,O); set(0,0,O); //println();printGrid(); assertTrue(isAlignement()); initialize(); set(0,2,O); set(1,2,O); set(2,2,O); //println();printGrid(); assertTrue(isAlignement()); initialize(); set(0,2,O); set(1,2,X); set(2,2,O); //println();printGrid(); assertFalse(isAlignement()); } boolean isAlignement(){ char current, next = V, nextNext = V; for(int idxL = 0; idxL < length(grille,1); idxL++){ for(int idxC = 0; idxC < length(grille,2); idxC++){ current = grille[idxL][idxC]; if(current != V){ if(idxL+1 < length(grille, 1)){ next = grille[idxL+1][idxC]; if(idxL+2 < length(grille, 1)){ nextNext = grille[idxL+2][idxC]; if( current == next && next == nextNext) return true; } } if(idxC+1 < length(grille, 2)){ next = grille[idxL][idxC+1]; if(idxC+2 < length(grille, 2)){ nextNext = grille[idxL][idxC+2]; if( current == next && next == nextNext) return true; } } if(idxL+1 < length(grille,1) && idxC+1 < length(grille, 2)){ next = grille[idxL+1][idxC+1]; if(idxL+2 < length(grille, 1) && idxC+2 < length(grille, 2)){ nextNext = grille[idxL+2][idxC+2]; if( current == next && next == nextNext) return true; } } if(idxL+1 < length(grille,1) && idxC-1 >= 0){ next = grille[idxL+1][idxC-1]; if(idxL+2 < length(grille,1) && idxC-2 >= 0){ nextNext = grille[idxL+2][idxC-2]; if( current == next && next == nextNext) return true; } } //if( current == next && next == nextNext) return true; } } } return false; } void testIsFilled(){ initialize(); char[][] uneGrille = new char[TAILLE][]; for(int idxL = 0; idxL < length(uneGrille, 1); idxL++){ uneGrille[idxL] = new char[length(uneGrille, 1)]; for(int idxC = 0; idxC < length(uneGrille[idxL]); idxC++){ uneGrille[idxL][idxC] = ((int)(random()*2)==1)?O:X; } } grille = uneGrille; println();printGrid(); assertTrue(isFilled()); initialize(); assertFalse(isFilled()); set(2,0,O); assertFalse(isFilled()); grille = uneGrille; set(1,1,V); assertFalse(isFilled()); } boolean isFilled(){ for(int idxL = 0; idxL < length(grille, 1); idxL++) for(int idxC = 0; idxC < length(grille, 2); idxC++) if(grille[idxL][idxC] == V) return false; return true; } void testSwap(){ assertEquals('X', swap('O')); assertEquals('O', swap('X')); } char swap(char c){ return ( c == X) ? O: X; } void printGrid(){ afficherEntete(length(grille, 2)); for(int idxL = 0; idxL < length(grille, 1); idxL++){ afficheSeparateur(length(grille, 2)); for(int idxC = 0; idxC < length(grille, 2); idxC++){ //print(grille[idxL][idxC] + " "); print(String.format("|%3s", grille[idxL][idxC]+" ")); } println("| " + idxL); } afficheSeparateur(length(grille,1)); println(); } void afficherEntete(int n){ for (int i = 0; i < n; i++){ print(" "+i+" "); } println(" "); } void afficheSeparateur(int n) { for (int i = 0; i < n; i++){ print("+---"); } println("+"); } // verification de la valider du jeu boolean isValid(int row, int col){ return row >= 0 && row < length(grille, 1) && col >= 0 && col < length(grille, 2) && grille[row][col] == V; } void jouer(char player){ int row; int col; do{ print("JOUEUR_[" + player + "] , num_case [1; " + (TAILLE*TAILLE) + "] : "); int numCase = readInt();// utiliser la division et le modulo pour trouver les coordonnées row = (numCase - 1)/length(grille, 1); col = (numCase - 1) % length(grille, 1); //est-ce que je peux jouer à cette case ? }while(!isValid(row, col)); set(row, col, player); } void algorithm(){ initialize(); //Image ihm = newImage(640,640); char player = ((int)(random()*2)==1)?O:X; // tirage au sort du debutant do{ printGrid(); jouer(player); player = swap(player); }while(!isFilled() && ! isAlignement()); printGrid(); //show(ihm); //readString(); if(isAlignement()) println(swap(player) + " gagne"); // il faut swaper pour avoir le bon gagnant ? else println("match nul"); } }
true
240b8456dfee29cbaf53bcf7e5b7283b0ea48565
Java
busipallavi-reddy/cmpe202
/lab8/inputmask/src/main/java/CreditCardNum.java
UTF-8
813
2.71875
3
[]
no_license
/* (c) Copyright 2018 Paul Nguyen. All Rights Reserved */ public class CreditCardNum implements IDisplayComponent, IKeyEventHandler { private IKeyEventHandler nextHandler ; private IDisplayFormatter number = new CardNumDisplayDecorator(new DisplayFormatter()) ; public void setNext( IKeyEventHandler next) { this.nextHandler = next ; } public String display() { return number.display(); } public void key(String ch, int cnt) { if ( cnt <= 16 ) number.addKey(ch); else if ( nextHandler != null ) nextHandler.key(ch, cnt) ; } @Override public void removeKey(int cnt) { if (cnt <= 15) { number.removeLastKey(); } else if ( nextHandler != null ) { nextHandler.removeKey(cnt); } } public void addSubComponent( IDisplayComponent c ) { return ; // do nothing } }
true
9d0c45c674013ca9f57e689762c32ce971b3fe30
Java
Leirach/BdDPF
/app/src/main/java/itesm/mx/bddpf/TicketAdapter.java
UTF-8
1,369
2.421875
2
[]
no_license
package itesm.mx.bddpf; import android.content.Context; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; import java.text.SimpleDateFormat; import java.util.ArrayList; public class TicketAdapter extends ArrayAdapter<Ticket> { public TicketAdapter(Context context, ArrayList<Ticket> tickets) { super(context, 0, tickets); } @NonNull @Override public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) { Ticket ticket = getItem(position); convertView = LayoutInflater.from(getContext()).inflate(R.layout.row_tickets, parent, false); TextView tvTicket = convertView.findViewById(R.id.text_ticket); TextView tvPassenger = convertView.findViewById(R.id.text_passenger); TextView tvReservation = convertView.findViewById(R.id.text_reservation); TextView tvPrice = convertView.findViewById(R.id.text_price); tvPassenger.setText(ticket.getPassenger()); tvPrice.setText(Double.toString(ticket.getPrice())); tvTicket.setText(ticket.getTicketNumber()); tvReservation.setText(ticket.getReservation()); return convertView; } }
true