blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
56cae1d30fd9b70cf39cf8eb5c0865060570742f
60e5e0415c062b7e5e8750aca4a4a05ef7420a09
/trees/PrintPathToKey.java
79de0dacaf0fcd48ea947a1838bcb60061f5b957
[]
no_license
moemaair/Problems
67306faeea8c72a627823a5853f603a353fb549f
a436cb15646e42baa9b6898902ac8ac082a4a0f4
refs/heads/master
2023-03-15T19:07:50.131393
2018-03-21T18:57:30
2018-03-21T18:57:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
853
java
package trees; public class PrintPathToKey { public static void main(String[] args) { String[] a1 = {"D","A","B","F","S","C","E"}; BinaryTree t1 = BuildBinarySearchTree.buildBinaryTree(a1); System.out.println(getPathArray(t1,"A").equals("1")); System.out.println(getPathArray(t1,"C").equals("100")); System.out.println(getPathArray(t1,"E").equals("01")); System.out.println(getPathArray(t1,"K").equals("-1")); } public static String getPathArray(BinaryTree tree, String key) { String path = ""; BinaryTree curNode = tree; while(curNode != null) { if (curNode.getValue().equals(key)) { return path; } else if ( key.compareTo(curNode.getValue()) <= 0 ) { path = path + "1"; curNode = curNode.getLeftChild(); } else { path = path + "0"; curNode = curNode.getRightChild(); } } return "-1"; } }
[ "fortuner@amazon.com" ]
fortuner@amazon.com
7f56c7b45e05800e1771f1be9e782daf361edba1
e2f7ce60e181d6c3aa454c177e9d2571da8c4184
/tyche-admin/src/main/java/pers/hyu/tyche/admin/interceptor/LoginInterceptor.java
7aa8352af9f505c06bf548d600a6eafe0d237981
[]
no_license
HYu61/tyche
32ba9fb635d3f25c30e0b7483b7741ed3b977905
994c34b69dfc9cdf81f337e316d28c56dc56e475
refs/heads/main
2023-03-27T12:52:38.097227
2021-03-23T05:12:54
2021-03-23T05:12:54
348,921,148
0
0
null
null
null
null
UTF-8
Java
false
false
986
java
package pers.hyu.tyche.admin.interceptor; import org.springframework.web.servlet.HandlerInterceptor; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.List; public class LoginInterceptor implements HandlerInterceptor { private List<String> unCheckUrls; @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { String requestUrl = request.getRequestURI(); if(unCheckUrls.contains(requestUrl)){ return true; } if(request.getSession().getAttribute("admin") != null){ return true; } response.sendRedirect(request.getContextPath() + "/admin/login.action"); return false; } public List<String> getUnCheckUrls() { return unCheckUrls; } public void setUnCheckUrls(List<String> unCheckUrls) { this.unCheckUrls = unCheckUrls; } }
[ "hengyu.hy@gmail.com" ]
hengyu.hy@gmail.com
ad5b3ac56853217766de0f60cf3c3156609456fb
25346f238005b26857afb2a635c325ffa24a95d7
/amems/target/tomcat/work/localEngine/localhost/amems/org/apache/jsp/WEB_002dINF/views/material/inspection/inspection_005fedit_jsp.java
4b20236125fea4cd95939aa8f862292238d7a340
[]
no_license
xyd104449/amems
93491ff8fcf1d0650a9af764fa1fa38d7a25572a
74a0ef8dc31d27ee5d1a0e91ff4d74af47b08778
refs/heads/master
2021-09-15T03:21:15.399980
2018-05-25T03:15:58
2018-05-25T03:15:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
188,107
java
package org.apache.jsp.WEB_002dINF.views.material.inspection; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; import java.sql.*; import java.sql.*; public final class inspection_005fedit_jsp extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent { static private org.apache.jasper.runtime.ProtectedFunctionMapper _jspx_fnmap_0; static { _jspx_fnmap_0= org.apache.jasper.runtime.ProtectedFunctionMapper.getMapForFunction("erayFns:escapeStr", com.eray.common.jstl.StringUtils.class, "escapeStr", new Class[] {java.lang.String.class}); } private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory(); private static java.util.List _jspx_dependants; static { _jspx_dependants = new java.util.ArrayList(8); _jspx_dependants.add("/WEB-INF/views/common_new.jsp"); _jspx_dependants.add("/WEB-INF/views/alert.jsp"); _jspx_dependants.add("/WEB-INF/views/quality/testing/maintenance_project_view.jsp"); _jspx_dependants.add("/WEB-INF/views/open_win/user.jsp"); _jspx_dependants.add("/WEB-INF/views/produce/installationlist/installationlist_certificate.jsp"); _jspx_dependants.add("/WEB-INF/views/common/attachments/attachments_list_edit_common.jsp"); _jspx_dependants.add("/WEB-INF/views/open_win/history_attach_win.jsp"); _jspx_dependants.add("/WEB-INF/tld/erayFns.tld"); } private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fnobody; private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems; private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fc_005fif_0026_005ftest; private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005ffmt_005fformatDate_0026_005fvalue_005fpattern_005fnobody; private javax.el.ExpressionFactory _el_expressionfactory; private org.apache.AnnotationProcessor _jsp_annotationprocessor; public Object getDependants() { return _jspx_dependants; } public void _jspInit() { _005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig()); _005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig()); _005fjspx_005ftagPool_005fc_005fif_0026_005ftest = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig()); _005fjspx_005ftagPool_005ffmt_005fformatDate_0026_005fvalue_005fpattern_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig()); _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory(); _jsp_annotationprocessor = (org.apache.AnnotationProcessor) getServletConfig().getServletContext().getAttribute(org.apache.AnnotationProcessor.class.getName()); } public void _jspDestroy() { _005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fnobody.release(); _005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems.release(); _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.release(); _005fjspx_005ftagPool_005ffmt_005fformatDate_0026_005fvalue_005fpattern_005fnobody.release(); } public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html; charset=utf-8"); pageContext = _jspxFactory.getPageContext(this, request, response, "", true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\r\n"); out.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n"); out.write("<html>\r\n"); out.write("<head>\r\n"); out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n"); out.write("<title>检验航材信息</title>\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("<script type=\"text/javascript\" src=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${ctx}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("/static/lib/bootstrap-tagsinput/bootstrap-tagsinput.js\"></script>\r\n"); out.write("<link rel=\"stylesheet\" href=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${ctx}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("/static/lib/bootstrap-tagsinput/bootstrap-tagsinput.css\" type=\"text/css\">\r\n"); if (_jspx_meth_c_005fset_005f0(_jspx_page_context)) return; out.write("\r\n"); out.write("<script type=\"text/javascript\">\r\n"); out.write("\r\n"); out.write("//预警颜色码\r\n"); out.write("var warningColor = {\r\n"); out.write("\tlevel1:\"#F7630C\",//橙色\r\n"); out.write("\tlevel2:\"#FFB900\",//黄色\r\n"); out.write("\tlevel3:\"#ececec\"//灰色\r\n"); out.write("}\r\n"); out.write(" \r\n"); out.write("var basePath = '"); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${ctx}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("';\r\n"); out.write("var userId = '"); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${sessionScope.user.id}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("';\r\n"); out.write("var userBmdm = '"); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${sessionScope.user.bmdm}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("';\r\n"); out.write("var userName = '';\r\n"); out.write("var displayName = '';\r\n"); out.write("var userJgdm = '"); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${sessionScope.user.jgdm}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("';\r\n"); out.write("var userType = '"); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${sessionScope.user.userType}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("';\r\n"); out.write("var menuCode = '"); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${menuCodeHigh}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("';\r\n"); out.write("var deptInfo = '';\r\n"); out.write("\r\n"); out.write("var buttonPermissions ;\r\n"); out.write("var accessDepartment ;\r\n"); out.write("var currentUser ;\r\n"); out.write("var userStoreList ;\r\n"); out.write("var userMenuListJson;\r\n"); out.write("var userACRegList;//用户具有的飞机注册号权限 DPRTCODE,FJJX,FJZCH\r\n"); out.write("var userACReg135145List;//用户具有的飞机注册号权限 DPRTCODE,FJJX,FJZCH\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("$.ajax({\r\n"); out.write(" async: false,\r\n"); out.write(" url:basePath+\"/common/getSessions\",\r\n"); out.write(" type: \"post\",\r\n"); out.write(" success:function(data){\r\n"); out.write("\t if(data && data.dicts){\r\n"); out.write("\t\t buttonPermissions = data.dicts.btnPriCodeListJson?data.dicts.btnPriCodeListJson:[];\r\n"); out.write("\t\t accessDepartment = data.dicts.accessDepartmentJson?data.dicts.accessDepartmentJson:[];\r\n"); out.write("\t\t currentUser = data.dicts.userJson?data.dicts.userJson:{};\r\n"); out.write("\t\t userStoreList = data.dicts.userStoreList?data.dicts.userStoreList:[];\r\n"); out.write("\t\t userMenuListJson = data.dicts.userMenuListJson?data.dicts.userMenuListJson:[];\r\n"); out.write("\t\t userACRegList = data.dicts.userACRegListJson?data.dicts.userACRegListJson:[];\r\n"); out.write("\t\t userACReg135145List = data.dicts.userACReg135145ListJson?data.dicts.userACReg135145ListJson:[];\r\n"); out.write("\t\t deptInfo = data.dicts.deptInfoJson?data.dicts.deptInfoJson:[];\r\n"); out.write("\t\t userName = currentUser.username;\r\n"); out.write("\t\t displayName = currentUser.displayName;\r\n"); out.write("\t }\r\n"); out.write(" }\r\n"); out.write("}); \r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("var userACTypeList = [];//用户具有的机型权限 DPRTCODE,FJJX\r\n"); out.write("if(userACRegList && userACRegList.length > 0){\r\n"); out.write("\t$.each(userACRegList, function(index, row){\r\n"); out.write("\t\tvar flag = true;\r\n"); out.write("\t\t$.each(userACTypeList, function(index1, row1){\r\n"); out.write("\t\t\tif(row1.DPRTCODE == row.DPRTCODE && row1.FJJX == row.FJJX){\r\n"); out.write("\t\t\t\tflag = false;\r\n"); out.write("\t\t\t\treturn false;\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t});\r\n"); out.write("\t\tif(flag){\r\n"); out.write("\t\t\tuserACTypeList.push({DPRTCODE:row.DPRTCODE, FJJX:row.FJJX});\r\n"); out.write("\t\t}\r\n"); out.write("\t});\r\n"); out.write("}\r\n"); out.write("\r\n"); out.write("var acAndTypeUtil = {\r\n"); out.write("\t//param:{DPRTCODE:?,FJJX:?}机构必填\r\n"); out.write("\tgetACRegList:function(param){\r\n"); out.write("\t\t\r\n"); out.write("\t\tvar result = [];\r\n"); out.write("\t\t$.each(userACRegList, function(index, row){\r\n"); out.write("\t\t\t//传入了机构,和机型\r\n"); out.write("\t\t\tif(param.FJJX && param.DPRTCODE && (param.FJJX == row.FJJX)\r\n"); out.write("\t\t\t\t\t && (param.DPRTCODE == row.DPRTCODE) && row.FJZCH != \"-\" ){\r\n"); out.write("\t\t\t\tresult.push(row);\r\n"); out.write("\t\t\t}//只传入了机构\r\n"); out.write("\t\t\telse if(param.DPRTCODE && !param.FJJX && (param.DPRTCODE == row.DPRTCODE) && row.FJZCH != \"-\" ){\r\n"); out.write("\t\t\t\tresult.push(row);\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t});\r\n"); out.write("\t\tresult.sort(function(a, b){\r\n"); out.write("\t\t\treturn (a.FJZCH < b.FJZCH) ? -1 : 1;\r\n"); out.write("\t\t})\r\n"); out.write("\t\treturn result;\r\n"); out.write("\t\t\r\n"); out.write("\t} ,\r\n"); out.write("\t//param:{DPRTCODE:?,FJJX:?}机构必填 135,145 飞机注册号合集\r\n"); out.write("\tgetACReg135145List:function(param){\r\n"); out.write("\t\t\r\n"); out.write("\t\tvar result = [];\r\n"); out.write("\t\t$.each(userACReg135145List, function(index, row){\r\n"); out.write("\t\t\t//传入了机构,和机型\r\n"); out.write("\t\t\tif(param.FJJX && param.DPRTCODE && (param.FJJX == row.FJJX)\r\n"); out.write("\t\t\t\t\t && (param.DPRTCODE == row.DPRTCODE) && row.FJZCH != \"-\" ){\r\n"); out.write("\t\t\t\tresult.push(row);\r\n"); out.write("\t\t\t}//只传入了机构\r\n"); out.write("\t\t\telse if(param.DPRTCODE && !param.FJJX && (param.DPRTCODE == row.DPRTCODE) && row.FJZCH != \"-\" ){\r\n"); out.write("\t\t\t\tresult.push(row);\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t});\r\n"); out.write("\t\tresult.sort(function(a, b){\r\n"); out.write("\t\t\treturn (a.FJZCH < b.FJZCH) ? -1 : 1;\r\n"); out.write("\t\t})\r\n"); out.write("\t\treturn result;\r\n"); out.write("\t\t\r\n"); out.write("\t} \r\n"); out.write("\t//param:{DPRTCODE:?}机构必填\r\n"); out.write("\t,getACTypeList:function(param){\r\n"); out.write("\t\tvar result = [];\r\n"); out.write("\t\t$.each(userACTypeList, function(index, row){\r\n"); out.write("\t\t\t//只传入了机构\r\n"); out.write("\t\t\tif(param.DPRTCODE && (param.DPRTCODE == row.DPRTCODE)){\r\n"); out.write("\t\t\t\tresult.push(row);\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t});\r\n"); out.write("\t\tresult.sort(function(a, b){\r\n"); out.write("\t\t\treturn (a.FJJX < b.FJJX) ? -1 : 1;\r\n"); out.write("\t\t})\r\n"); out.write("\t\treturn result;\r\n"); out.write("\t}\r\n"); out.write("};\r\n"); out.write("\r\n"); out.write("</script>\r\n"); out.write("<script type=\"text/javascript\" src=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${ctx}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("/static/js/ms/privilege.js\"></script>\r\n"); out.write("<script type=\"text/javascript\" src=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${ctx}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("/static/js/thjw/common/ajax.js\"></script>\r\n"); out.write("<script type=\"text/javascript\" src=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${ctx}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("/static/js/thjw/common/pagination.js\"></script>\r\n"); out.write("<script type=\"text/javascript\" src=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${ctx}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("/static/js/thjw/common/NavigationBar.js\"></script>\r\n"); out.write("\r\n"); out.write("<script type=\"text/javascript\">\r\n"); out.write("\t\r\n"); out.write("\tvar DicAndEnumUtil = {\r\n"); out.write("\t\t\t\r\n"); out.write("\t\t\tdata:{}\r\n"); out.write("\t\t\t,setData:function(returnData){\r\n"); out.write("\t\t\t\tthis.data = returnData;\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\t,loadDicAndEnums:function (){\r\n"); out.write("\t\t\t\tvar util = this;\r\n"); out.write("\t\t\t\tAjaxUtil.ajax({\r\n"); out.write("\t\t\t\t\t async: false,\r\n"); out.write("\t\t\t\t\t url:basePath+\"/common/loadDicAndEnums\",\r\n"); out.write("\t\t\t\t\t type: \"post\",\r\n"); out.write("\t\t\t\t\t success:function(data){\r\n"); out.write("\t\t\t\t\t\t util.setData(data);\r\n"); out.write("\t\t\t\t },\r\n"); out.write("\t\t\t\t error:function(data){\r\n"); out.write("\t\t\t\t \t alert(\"system error.\");\r\n"); out.write("\t\t\t\t }\r\n"); out.write("\t\t\t }); \r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\t,getEnumName:function(enumKey,enumId){\r\n"); out.write("\t\t\t\tvar enumname = ''\r\n"); out.write("\t\t\t\tvar enumMap = this.data.enumMap!=undefined?this.data.enumMap:{};\r\n"); out.write("\t\t\t\tvar items = enumMap[enumKey]!=undefined?enumMap[enumKey]:[];\r\n"); out.write("\t\t\t\tvar len = items.length;\r\n"); out.write("\t\t\t\t\r\n"); out.write("\t\t\t\tfor(i=0;i<len;i++){\r\n"); out.write("\t\t\t\t\t\r\n"); out.write("\t\t\t\t\tif(items[i].id == enumId ){\r\n"); out.write("\t\t\t\t\t\tenumname = items[i].name;\r\n"); out.write("\t\t\t\t\t\tbreak;\r\n"); out.write("\t\t\t\t\t}\r\n"); out.write("\t\t\t\t\t\r\n"); out.write("\t\t\t\t}\r\n"); out.write("\t\t\t\treturn enumname ; \r\n"); out.write("\t\t\t\t\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\t,getEnum:function(enumKey){\r\n"); out.write("\t\t\t\tvar enumMap = this.data.enumMap!=undefined?this.data.enumMap:{};\r\n"); out.write("\t\t\t\tvar items = enumMap[enumKey]!=undefined?enumMap[enumKey]:[];\r\n"); out.write("\t\t\t\treturn items; \r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t \r\n"); out.write("\t\t\t,registerEnum:function(enumKey,elementId){\r\n"); out.write("\t\t\t\t if(this.data.enumMap!=undefined ){\r\n"); out.write("\t\t\t\t\t var enumMap = this.data.enumMap!=undefined?this.data.enumMap:{};\r\n"); out.write("\t\t\t\t\t var items = enumMap[enumKey]!=undefined?enumMap[enumKey]:[];\r\n"); out.write("\t\t\t\t\t var len = items.length;\r\n"); out.write("\t\t\t\t\t for(i=0;i<len;i++){\r\n"); out.write("\t\t\t\t\t\t$('#'+elementId).append(\"<option value='\"+items[i].id+\"' >\"+StringUtil.escapeStr(items[i].name)+\"</option>\")\r\n"); out.write("\t\t\t\t\t }\r\n"); out.write("\t\t\t\t }\r\n"); out.write("\t\t\t\t \r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\t//获取数据字典项\r\n"); out.write("\t\t\t,getDict:function(dicId, dprtcode){\r\n"); out.write("\t\t\t\tvar dicMap = this.data.dicMap!=undefined?this.data.dicMap:{};\r\n"); out.write("\t\t\t\tif(dicMap[dprtcode]){\r\n"); out.write("\t\t\t\t\tif(dicMap[dprtcode][dicId]){\r\n"); out.write("\t\t\t\t\t\treturn dicMap[dprtcode][dicId];\r\n"); out.write("\t\t\t\t\t}else{\r\n"); out.write("\t\t\t\t\t\tif(dicMap[\"-1\"]){\r\n"); out.write("\t\t\t\t\t\t\tif(dicMap[\"-1\"][dicId]){\r\n"); out.write("\t\t\t\t\t\t\t\treturn dicMap[\"-1\"][dicId];\r\n"); out.write("\t\t\t\t\t\t\t}else{\r\n"); out.write("\t\t\t\t\t\t\t\treturn [];\r\n"); out.write("\t\t\t\t\t\t\t}\r\n"); out.write("\t\t\t\t\t\t}\r\n"); out.write("\t\t\t\t\t\treturn [];\r\n"); out.write("\t\t\t\t\t}\r\n"); out.write("\t\t\t\t}else if(dicMap[\"-1\"]){\r\n"); out.write("\t\t\t\t\tif(dicMap[\"-1\"][dicId]){\r\n"); out.write("\t\t\t\t\t\treturn dicMap[\"-1\"][dicId];\r\n"); out.write("\t\t\t\t\t}else{\r\n"); out.write("\t\t\t\t\t\treturn [];\r\n"); out.write("\t\t\t\t\t}\r\n"); out.write("\t\t\t\t}else{\r\n"); out.write("\t\t\t\t\treturn [];\r\n"); out.write("\t\t\t\t}\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\t//TODO 带处理 \r\n"); out.write("\t\t\t,registerDic:function(dicId,elementId,dprtcode){ \r\n"); out.write("\r\n"); out.write("\t\t\t\t /* if(this.data.dicMap!=undefined ){\r\n"); out.write("\t\t\t\t\t var dicMap = this.data.dicMap!=undefined?this.data.dicMap:{};\r\n"); out.write("\t\t\t\t\t var items = dicMap[dicId]!=undefined?dicMap[dicId]:[];\r\n"); out.write("\t\t\t\t\t var len = items.length;\r\n"); out.write("\t\t\t\t\t \r\n"); out.write("\t\t\t\t\t for(i=0;i<len;i++){\r\n"); out.write("\t\t\t\t\t\t $('#'+elementId).append(\"<option value='\"+StringUtil.escapeStr(items[i].id)+\"' >\"+StringUtil.escapeStr(items[i].name)+\"</option>\")\r\n"); out.write("\t\t\t\t\t }\r\n"); out.write("\t\t\t\t } */\r\n"); out.write("\t\t\t\t if(typeof dprtcode == undefined || dprtcode==null || dprtcode == ''){\r\n"); out.write("\t\t\t\t\tdprtcode = userJgdm;\r\n"); out.write("\t\t \t\t}\r\n"); out.write("\t\t\t\t if(this.data.dicMap!=undefined ){\r\n"); out.write("\t\t\t\t\t var dicMap = this.data.dicMap!=undefined?this.data.dicMap:{};\r\n"); out.write("\t\t\t\t\t var items = this.getDict(dicId, dprtcode);\r\n"); out.write("\t\t\t\t\t var len = items.length;\r\n"); out.write("\t\t\t\t\t \r\n"); out.write("\t\t\t\t\t for(i=0;i<len;i++){\r\n"); out.write("\t\t\t\t\t\t $('#'+elementId).append(\"<option value='\"+StringUtil.escapeStr(items[i].id)+\"' >\"+StringUtil.escapeStr(items[i].name)+\"</option>\")\r\n"); out.write("\t\t\t\t\t }\r\n"); out.write("\t\t\t\t }\r\n"); out.write("\t\t\t\t \r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\t//TODO 带处理 \r\n"); out.write("\t\t\t,getDicItems:function(dicId,dprtcode){ \t\t\t\t\r\n"); out.write("\t\t\t\t /* if(this.data.dicMap!=undefined ){\r\n"); out.write("\t\t\t\t\t var dicMap = this.data.dicMap!=undefined?this.data.dicMap:{};\r\n"); out.write("\t\t\t\t\t var items = dicMap[dicId]!=undefined?dicMap[dicId]:[];\r\n"); out.write("\t\t\t\t\t return items;\r\n"); out.write("\t\t\t\t } */\r\n"); out.write("\t\t\t\t \r\n"); out.write("\t\t\t\t if(typeof dprtcode == undefined || dprtcode==null || dprtcode == ''){\r\n"); out.write("\t\t\t\t\t\tconsole.info('未指定机构,采用默认机构');\r\n"); out.write("\t\t\t\t\t\tdprtcode = userJgdm;\r\n"); out.write("\t\t\t\t }\r\n"); out.write("\t\t\t\t if(this.data.dicMap!=undefined ){\r\n"); out.write("\t\t\t\t\t var dicMap = this.data.dicMap!=undefined?this.data.dicMap:{};\r\n"); out.write("\t\t\t\t\t var items = this.getDict(dicId, dprtcode);\r\n"); out.write("\t\t\t\t\t return items;\r\n"); out.write("\t\t\t\t } \r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\t//TODO 带处理 \r\n"); out.write("\t\t\t,registerDicBySelect:function(dicId,element,dprtcode){ \r\n"); out.write("\t\t\t\t /* if(this.data.dicMap!=undefined ){\r\n"); out.write("\t\t\t\t\t var dicMap = this.data.dicMap!=undefined?this.data.dicMap:{};\r\n"); out.write("\t\t\t\t\t var items = dicMap[dicId]!=undefined?dicMap[dicId]:[];\r\n"); out.write("\t\t\t\t\t var len = items.length;\r\n"); out.write("\t\t\t\t\t \r\n"); out.write("\t\t\t\t\t for(i=0;i<len;i++){\r\n"); out.write("\t\t\t\t\t\t \r\n"); out.write("\t\t\t\t\t\t$(element).append(\"<option value='\"+StringUtil.escapeStr(items[i].id)+\"' >\"+StringUtil.escapeStr(items[i].name)+\"</option>\")\r\n"); out.write("\t\t\t\t\t\t\r\n"); out.write("\t\t\t\t\t }\r\n"); out.write("\t\t\t\t } */\r\n"); out.write("\t\t\t\tif(this.data.dicMap!=undefined ){\r\n"); out.write("\t\t\t\t\tif(typeof dprtcode == undefined || dprtcode==null || dprtcode == ''){\r\n"); out.write("\t\t\t\t\t\tconsole.info('未指定机构,采用默认机构');\r\n"); out.write("\t\t\t\t\t\tdprtcode = userJgdm;\r\n"); out.write("\t\t\t\t\t}\r\n"); out.write("\t\t\t\t\t var dicMap = this.data.dicMap!=undefined?this.data.dicMap:{};\r\n"); out.write("\t\t\t\t\t var items = this.getDict(dicId, dprtcode);\r\n"); out.write("\t\t\t\t\t var len = items.length;\r\n"); out.write("\t\t\t\t\t \r\n"); out.write("\t\t\t\t\t for(i=0;i<len;i++){\r\n"); out.write("\t\t\t\t\t\t \r\n"); out.write("\t\t\t\t\t\t$(element).append(\"<option value='\"+StringUtil.escapeStr(items[i].id)+\"' >\"+StringUtil.escapeStr(items[i].name)+\"</option>\")\r\n"); out.write("\t\t\t\t\t\t\r\n"); out.write("\t\t\t\t\t }\r\n"); out.write("\t\t\t\t }\r\n"); out.write("\t\t\t},\r\n"); out.write("\t\t\t//获取字典项描述,适用于数据字典在页面中title方式显示字典描述\r\n"); out.write("\t\t\tgetDicItemDesc : function(dicId, value, dprtcode) {\r\n"); out.write("\t\t\t\tif (typeof dprtcode == undefined || dprtcode == null\r\n"); out.write("\t\t\t\t\t\t|| dprtcode == '') {\r\n"); out.write("\t\t\t\t\tconsole.info('未指定机构,采用默认机构');\r\n"); out.write("\t\t\t\t\tdprtcode = userJgdm;\r\n"); out.write("\t\t\t\t}\r\n"); out.write("\t\t\t\tvar items = this.getDict(dicId, dprtcode);\r\n"); out.write("\t\t\t\tvar len = items.length;\r\n"); out.write("\t\t\t\tfor (i = 0; i < len; i++) {\r\n"); out.write("\t\t\t\t\tif(items[i].id == value){\r\n"); out.write("\t\t\t\t\t\tvar desc = items[i].desc;\r\n"); out.write("\t\t\t\t\t\tif(typeof dprtcode == undefined || dprtcode == null\r\n"); out.write("\t\t\t\t\t\t\t\t|| dprtcode == ''){\r\n"); out.write("\t\t\t\t\t\t\treturn value;\r\n"); out.write("\t\t\t\t\t\t}\r\n"); out.write("\t\t\t\t\t\treturn desc;\r\n"); out.write("\t\t\t\t\t}\r\n"); out.write("\t\t\t\t}\r\n"); out.write("\t\t\t\treturn value;\r\n"); out.write("\t\t\t}\r\n"); out.write("\t};\r\n"); out.write("\r\n"); out.write("\tDicAndEnumUtil.loadDicAndEnums();\r\n"); out.write("\r\n"); out.write("\t/**\r\n"); out.write("\t * 访问机构代码\r\n"); out.write("\t * @param dprtcode\t机构代码\r\n"); out.write("\t * @return dpartName 机构名称\r\n"); out.write("\t * @return infoType 组织机构信息类别\r\n"); out.write("\t */\r\n"); out.write("\tvar AccessDepartmentUtil = {\r\n"); out.write("\t\tgetDpartName : function(dprtcode) {\r\n"); out.write("\t\t\tvar dpartName = '';\r\n"); out.write("\t\t\tif (null == accessDepartment) {\r\n"); out.write("\t\t\t\treturn dpartName;\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\t$.each(accessDepartment, function(i, obj) {\r\n"); out.write("\t\t\t\tif (dprtcode == obj.id) {\r\n"); out.write("\t\t\t\t\tdpartName = obj.dprtname;\r\n"); out.write("\t\t\t\t}\r\n"); out.write("\t\t\t});\r\n"); out.write("\t\t\treturn dpartName;\r\n"); out.write("\t\t},\r\n"); out.write("\t\tgetDpartinfoType : function(dprtcode) {\r\n"); out.write("\t\t\tvar infoType = '';\r\n"); out.write("\t\t\tif (null == accessDepartment) {\r\n"); out.write("\t\t\t\treturn infoType;\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\t$.each(accessDepartment, function(i, obj) {\r\n"); out.write("\t\t\t\tif (dprtcode == obj.id) {\r\n"); out.write("\t\t\t\t\tvar dprtInfo = obj.deptInfo;\r\n"); out.write("\t\t\t\t\tif(dprtInfo != null && dprtInfo.deptType != null){\r\n"); out.write("\t\t\t\t\t\tinfoType = dprtInfo.deptType;\r\n"); out.write("\t\t\t\t\t}\r\n"); out.write("\t\t\t\t}\r\n"); out.write("\t\t\t});\r\n"); out.write("\t\t\treturn infoType;\r\n"); out.write("\t\t}\r\n"); out.write("\t};\r\n"); out.write("\r\n"); out.write("\t/**\r\n"); out.write("\t * 标记关键字\r\n"); out.write("\t * @param keyword\t关键字的值\r\n"); out.write("\t * @param columns\t需要被标记的列(数组)\r\n"); out.write("\t */\r\n"); out.write("\tfunction signByKeyword(keyword, columns, path) {\r\n"); out.write("\r\n"); out.write("\t\tvar defaultPath = \"tbody tr td\";\r\n"); out.write("\t\tkeyword = $.trim(keyword);\r\n"); out.write("\t\t\r\n"); out.write("\t\tkeyword\t&& $.each(columns, function(i, obj) {\r\n"); out.write("\t\t\t$((path || defaultPath) + \":nth-child(\" + obj + \")\").each(function() {\r\n"); out.write("\t\t\t\tvar content = $(this);\r\n"); out.write("\t\t\t\tvar value = content.text();\r\n"); out.write("\t\t\t\tif (content.find(\"[name='keyword']\").length >= 1) {\r\n"); out.write("\t\t\t\t\tcontent = content.find(\"[name='keyword']\");\r\n"); out.write("\t\t\t\t\tvalue = content.text();\r\n"); out.write("\t\t\t\t} else {\r\n"); out.write("\t\t\t\t\t// 当td里面包含的不直接是文本内容,而是html代码嵌套,则取最里面一层的内容作为文本内容\r\n"); out.write("\t\t\t\t\twhile (content.children().length >= 1) {\r\n"); out.write("\t\t\t\t\t\tcontent = content.children().first();\r\n"); out.write("\t\t\t\t\t\tvalue = content.text();\r\n"); out.write("\t\t\t\t\t}\r\n"); out.write("\t\t\t\t}\r\n"); out.write("\t\t\t\tvar startIndex = value.toUpperCase().indexOf(keyword.toUpperCase());\r\n"); out.write("\t\t\t\tif (startIndex != -1) {\r\n"); out.write("\t\t\t\t\tcontent.html([StringUtil.escapeStr(value.substr(0,startIndex)),\r\n"); out.write("\t\t\t\t\t\t\t\t\t\"<font style='color:red'>\",\r\n"); out.write("\t\t\t\t\t\t\t\t\tStringUtil.escapeStr(value.substr(startIndex,keyword.length)),\r\n"); out.write("\t\t\t\t\t\t\t\t\t\"</font>\",\r\n"); out.write("\t\t\t\t\t\t\t\t\tStringUtil.escapeStr(value.substr(parseInt(startIndex)+ parseInt(keyword.length)))]\r\n"); out.write("\t\t\t\t\t\t\t\t\t.join(\"\"));\r\n"); out.write("\t\t\t\t}\r\n"); out.write("\t\t\t});\r\n"); out.write("\t\t});\r\n"); out.write("\t}\r\n"); out.write("\r\n"); out.write("\t/**\r\n"); out.write("\t * 格式化工具\r\n"); out.write("\t */\r\n"); out.write("\tvar FormatUtil = {\r\n"); out.write("\t\t/**\r\n"); out.write("\t\t * 替换null或undefined,必须在生成html之后调用\r\n"); out.write("\t\t * 默认无参为table布局,如果是非table布局,则手动输入选择器。\r\n"); out.write("\t\t * 例如:FormatUtil.removeNullOrUndefined(\"#id input\"),则会替换该id下的所有输入框\r\n"); out.write("\t\t */\r\n"); out.write("\t\tremoveNullOrUndefined : function(path) {\r\n"); out.write("\t\t\tpath = path || \"tbody tr td\";\r\n"); out.write("\t\t\t$(path).each(\r\n"); out.write("\t\t\t\t\tfunction() {\r\n"); out.write("\t\t\t\t\t\tif ($(this).text() == \"null\"\r\n"); out.write("\t\t\t\t\t\t\t\t|| $(this).text() == \"undefined\") {\r\n"); out.write("\t\t\t\t\t\t\t$(this).text(\"\");\r\n"); out.write("\t\t\t\t\t\t}\r\n"); out.write("\t\t\t\t\t\tif ($(this).attr(\"title\") == \"null\"\r\n"); out.write("\t\t\t\t\t\t\t\t|| $(this).attr(\"title\") == \"undefined\") {\r\n"); out.write("\t\t\t\t\t\t\t$(this).attr(\"title\", \"\");\r\n"); out.write("\t\t\t\t\t\t}\r\n"); out.write("\t\t\t\t\t});\r\n"); out.write("\t\t}\r\n"); out.write("\t};\r\n"); out.write("\r\n"); out.write("\t/**\r\n"); out.write("\t * 格式化字符串工具\r\n"); out.write("\t */\r\n"); out.write("\tvar StringUtil = {\r\n"); out.write("\t\tsubString : function(str, length) {\r\n"); out.write("\t\t\tif (typeof (length) == \"undefined\") {\r\n"); out.write("\t\t\t\tlength = 20;\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\tif (str == null || str == '' || str == \"undefined\") {\r\n"); out.write("\t\t\t\treturn '';\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\tif (str.length > length) {\r\n"); out.write("\t\t\t\tstr = str.substring(0, length) + \"...\";\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\treturn str;\r\n"); out.write("\t\t},\r\n"); out.write("\t\ttitle : function(str, length) {\r\n"); out.write("\t\t\tif (typeof (length) == \"undefined\") {\r\n"); out.write("\t\t\t\tlength = 20;\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\tif (str == null || str == '' || str == \"undefined\"\r\n"); out.write("\t\t\t\t\t|| str.length <= length) {\r\n"); out.write("\t\t\t\treturn '';\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\treturn str;\r\n"); out.write("\t\t},\r\n"); out.write("\t\tescapeStr : function(str) {\r\n"); out.write("\t\t\tif (typeof (str) == 'undefined' || str == undefined || str == null) {\r\n"); out.write("\t\t\t\treturn \"\";\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\tif (typeof (str) != 'string') {\r\n"); out.write("\t\t\t\treturn str;\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\tstr = str.replaceAll(\"&\", \"&amp;\");\r\n"); out.write("\t\t\tstr = str.replaceAll(\"<\", \"&lt;\");\r\n"); out.write("\t\t\tstr = str.replaceAll(\">\", \"&gt;\");\r\n"); out.write("\t\t\t//str = str.replaceAll(\" \", \"&nbsp;\");\r\n"); out.write("\t\t\tstr = str.replaceAll(\"'\", \"&#39;\");\r\n"); out.write("\t\t\tstr = str.replaceAll(\"\\\"\", \"&quot;\");\r\n"); out.write("\t\t\t//str = str.replaceAll(\"\\n\", \"<br>\");\r\n"); out.write("\t\t\treturn str;\r\n"); out.write("\t\t},\r\n"); out.write("\t\t// 替换输入框、下拉框为文本\r\n"); out.write("\t\treplaceAsText : function(selector) {\r\n"); out.write("\t\t\t$(\"#\" + selector + \" input:visible\").each(function() {\r\n"); out.write("\t\t\t\tvar content;\r\n"); out.write("\t\t\t\tif (this.type == \"text\") {\r\n"); out.write("\t\t\t\t\tcontent = $(this).val();\r\n"); out.write("\t\t\t\t} else if (this.type == \"checkbox\") {\r\n"); out.write("\t\t\t\t\tcontent = this.checked ? \"是\" : \"否\";\r\n"); out.write("\t\t\t\t}\r\n"); out.write("\t\t\t\t$(this).parent().attr(\"title\", content);\r\n"); out.write("\t\t\t\t$(this).parent().text(content);\r\n"); out.write("\t\t\t});\r\n"); out.write("\t\t\t$(\"#\" + selector + \" select:visible\").each(function() {\r\n"); out.write("\t\t\t\tvar content = $(this).find(\"option:selected\").text();\r\n"); out.write("\t\t\t\t$(this).parent().attr(\"title\", content);\r\n"); out.write("\t\t\t\t$(this).parent().text(content);\r\n"); out.write("\t\t\t});\r\n"); out.write("\t\t\t$(\"#\" + selector + \" textarea\").each(function() {\r\n"); out.write("\t\t\t\tvar content = $(this).val();\r\n"); out.write("\t\t\t\t$(this).parent().attr(\"title\", content);\r\n"); out.write("\t\t\t\t$(this).parent().text(content);\r\n"); out.write("\t\t\t});\r\n"); out.write("\t\t}\r\n"); out.write("\t};\r\n"); out.write("\r\n"); out.write("\t/**\r\n"); out.write("\t * 全选反选工具,selectAllId全选id,selectNodeId列表id\r\n"); out.write("\t */\r\n"); out.write("\tvar SelectUtil = {\r\n"); out.write("\t\tselectAll : function(selectAllId, selectNodeId) {//全选或不选\r\n"); out.write("\t\t\tvar this_ = this;\r\n"); out.write("\t\t\t//如果选中全选\r\n"); out.write("\t\t\tif ($(\"#\" + selectAllId).is(\":checked\")) {\r\n"); out.write("\t\t\t\t$(\"#\" + selectNodeId).find(\"tr input[type='checkbox']\").each(\r\n"); out.write("\t\t\t\t\t\tfunction() {\r\n"); out.write("\t\t\t\t\t\t\t$(this).attr(\"checked\", 'true');//点击全选\r\n"); out.write("\t\t\t\t\t\t});\r\n"); out.write("\t\t\t} else {\r\n"); out.write("\t\t\t\t$(\"#\" + selectNodeId).find(\"tr input[type='checkbox']:checked\")\r\n"); out.write("\t\t\t\t\t\t.each(function() {\r\n"); out.write("\t\t\t\t\t\t\t$(this).removeAttr(\"checked\");//点击取消全选\r\n"); out.write("\t\t\t\t\t\t});\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t},\r\n"); out.write("\t\tselectNode : function(selectAllId, selectNodeId) {//单选后是否全选\r\n"); out.write("\t\t\tvar this_ = this;\r\n"); out.write("\t\t\tvar checkNum = $(\"#\" + selectNodeId).find(\r\n"); out.write("\t\t\t\t\t\"tr input[type='checkbox']:checked\").length;//选中个数\r\n"); out.write("\t\t\tvar totalNum = $(\"#\" + selectNodeId).find(\"tr\").length;//总数\r\n"); out.write("\t\t\tif (checkNum == totalNum && totalNum != 0) {\r\n"); out.write("\t\t\t\t$(\"#\" + selectAllId).attr(\"checked\", 'true');//选中全选\r\n"); out.write("\t\t\t} else {\r\n"); out.write("\t\t\t\t$(\"#\" + selectAllId).removeAttr(\"checked\");//取消全选\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t},\r\n"); out.write("\t\tcheckRow : function(e, selectAllId, selectNodeId) {//选中一行\r\n"); out.write("\t\t\tif ($(e).is(\":checked\")) {\r\n"); out.write("\t\t\t\t$(e).removeAttr(\"checked\");\r\n"); out.write("\t\t\t} else {\r\n"); out.write("\t\t\t\t$(e).attr(\"checked\", \"true\");\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\tthis.selectNode(selectAllId, selectNodeId);\r\n"); out.write("\t\t},\r\n"); out.write("\t\trowonclick : function(id) {\r\n"); out.write("\t\t\t$(\"#\" + id + \" tr\").click(\r\n"); out.write("\t\t\t\t\tfunction(event) {\r\n"); out.write("\t\t\t\t\t\t// 避免复选框重复选择\r\n"); out.write("\t\t\t\t\t\tif ($(event.target).attr(\"type\") == \"checkbox\") {\r\n"); out.write("\t\t\t\t\t\t\treturn;\r\n"); out.write("\t\t\t\t\t\t}\r\n"); out.write("\t\t\t\t\t\tvar checked = $(this).find(\"input[type='checkbox']\")\r\n"); out.write("\t\t\t\t\t\t\t\t.is(\":checked\");\r\n"); out.write("\t\t\t\t\t\t$(this).find(\"input[type='checkbox']\").attr(\"checked\",\r\n"); out.write("\t\t\t\t\t\t\t\t!checked);\r\n"); out.write("\t\t\t\t\t});\r\n"); out.write("\t\t},\r\n"); out.write("\t\tselectRadioRow : function(obj) {//选中一行radio\r\n"); out.write("\t\t\t$(obj).find(\"input[type='radio']\").attr(\"checked\", true);\r\n"); out.write("\t\t},\r\n"); out.write("\t\tclickRow : function(index, id, name) {//选中一行checkbox,id:tbody id,name:row name\r\n"); out.write("\t\t\tvar $checkbox1 = $(\"#\" + id + \" :checkbox[name='\" + name + \"']:eq(\"\r\n"); out.write("\t\t\t\t\t+ index + \")\");\r\n"); out.write("\t\t\tvar $checkbox2 = $(\".sticky-col :checkbox[name='\" + name + \"']:eq(\"\r\n"); out.write("\t\t\t\t\t+ index + \")\");\r\n"); out.write("\t\t\tvar checked = $checkbox1.is(\":checked\");\r\n"); out.write("\t\t\t$checkbox1.attr(\"checked\", !checked);\r\n"); out.write("\t\t\t$checkbox2.attr(\"checked\", !checked);\r\n"); out.write("\t\t},\r\n"); out.write("\t\t\r\n"); out.write("\t\t/* 选择复选框 */\r\n"); out.write("\t\tselectCheckbox : function(e,index,id,name,obj){\r\n"); out.write("\t\t\te = e || window.event; \r\n"); out.write("\t\t if(e.stopPropagation) { //W3C阻止冒泡方法 \r\n"); out.write("\t\t e.stopPropagation(); \r\n"); out.write("\t\t } else { \r\n"); out.write("\t\t e.cancelBubble = true; //IE阻止冒泡方法 \r\n"); out.write("\t\t }\r\n"); out.write("\t\t var $checkbox1 = $(\"#\" + id + \" :checkbox[name='\" + name + \"']:eq(\"\r\n"); out.write("\t \t\t\t\t+ index + \")\");\r\n"); out.write("\t \t\tvar $checkbox2 = $(\".sticky-col :checkbox[name='\" + name + \"']:eq(\"\r\n"); out.write("\t \t\t\t\t+ index + \")\");\r\n"); out.write("\t\t if(!$(obj).parents(\"table\").hasClass(\"sticky-col\")){\r\n"); out.write("\t\t \tvar checked = $checkbox1.is(\":checked\");\r\n"); out.write("\t\t \t\t$checkbox1.attr(\"checked\", checked);\r\n"); out.write("\t\t \t\t$checkbox2.attr(\"checked\", checked);\t\r\n"); out.write("\t\t }else{\r\n"); out.write("\t\t \tvar checked = $checkbox2.is(\":checked\");\r\n"); out.write("\t\t \t\t$checkbox1.attr(\"checked\", checked);\r\n"); out.write("\t\t \t\t$checkbox2.attr(\"checked\", checked);\r\n"); out.write("\t\t }\r\n"); out.write("\t\t},\r\n"); out.write("\t\tperformSelectAll : function(selectNodeId) {//全选\r\n"); out.write("\t\t\t$(\":checkbox\", $(\"#\" + selectNodeId)).attr(\"checked\", true);\r\n"); out.write("\t\t},\r\n"); out.write("\t\tperformSelectClear : function(selectNodeId) {//清空选中\r\n"); out.write("\t\t\t$(\":checkbox\", $(\"#\" + selectNodeId)).removeAttr(\"checked\");//点击取消全选\r\n"); out.write("\t\t}\r\n"); out.write("\t};\r\n"); out.write("\r\n"); out.write("\t/**\r\n"); out.write("\t * 时间工具\r\n"); out.write("\t * 使用方法: TimeUtil.operateTime(\"152.168\", \"0\", TimeUtil.Separator.DOT, TimeUtil.Operation.ADD);\r\n"); out.write("\t * 后2个参数可为空,默认分隔符是“:”,默认操作是“+”,\r\n"); out.write("\t */\r\n"); out.write("\tvar TimeUtil = {\r\n"); out.write("\t\tcompareDate : function(d1Str, d2Str) {\r\n"); out.write("\t\t\treturn ((new Date(d1Str.replace(/-/g, \"\\/\"))) > (new Date(d2Str\r\n"); out.write("\t\t\t\t\t.replace(/-/g, \"\\/\"))));\r\n"); out.write("\t\t},\r\n"); out.write("\t\t//日期相减返回天数\r\n"); out.write("\t\tdateMinus : function(d1Str, d2Str) {\r\n"); out.write("\t\t\tvar d1date = new Date(d1Str.replace(/-/g, \"/\"));\r\n"); out.write("\t\t\tvar d2date = new Date(d2Str.replace(/-/g, \"/\"));\r\n"); out.write("\t\t\tvar days = d2date.getTime() - d1date.getTime();\r\n"); out.write("\t\t\tvar day = parseInt(days / (1000 * 60 * 60 * 24));\r\n"); out.write("\t\t\treturn day; \r\n"); out.write("\t\t},\r\n"); out.write("\t\t//获取当前数据库日期\r\n"); out.write("\t\tgetCurrentDate : function(obj) {\r\n"); out.write("\t\t\tAjaxUtil.ajax({\r\n"); out.write("\t\t\t\turl : basePath + \"/common/sysdate?t=\" + new Date().getTime(),\r\n"); out.write("\t\t\t\ttype : \"get\",\r\n"); out.write("\t\t\t\tsuccess : function(data) {\r\n"); out.write("\t\t\t\t\tif (data && data.sysdate) {\r\n"); out.write("\t\t\t\t\t\tdata.sysdate = data.sysdate.substr(0, 10);\r\n"); out.write("\t\t\t\t\t\tif (typeof (obj) == \"undefined\") {\r\n"); out.write("\t\t\t\t\t\t\treturn;\r\n"); out.write("\t\t\t\t\t\t}\r\n"); out.write("\t\t\t\t\t\tif (typeof (obj) == \"function\") {\r\n"); out.write("\t\t\t\t\t\t\tobj(data.sysdate);\r\n"); out.write("\t\t\t\t\t\t\treturn;\r\n"); out.write("\t\t\t\t\t\t}\r\n"); out.write("\t\t\t\t\t\tif (typeof (obj) == \"string\") {\r\n"); out.write("\t\t\t\t\t\t\t$(obj).val(data.sysdate);\r\n"); out.write("\t\t\t\t\t\t}\r\n"); out.write("\t\t\t\t\t}\r\n"); out.write("\t\t\t\t}\r\n"); out.write("\t\t\t});\r\n"); out.write("\t\t},\r\n"); out.write("\t\t//获取当前数据库时间\r\n"); out.write("\t\tgetCurrentTime : function(obj) {\r\n"); out.write("\t\t\tAjaxUtil.ajax({\r\n"); out.write("\t\t\t\turl : basePath + \"/common/sysdate?t=\" + new Date().getTime(),\r\n"); out.write("\t\t\t\ttype : \"get\",\r\n"); out.write("\t\t\t\tsuccess : function(data) {\r\n"); out.write("\t\t\t\t\tif (data && data.sysdate) {\r\n"); out.write("\t\t\t\t\t\tif (typeof (obj) == \"undefined\") {\r\n"); out.write("\t\t\t\t\t\t\treturn;\r\n"); out.write("\t\t\t\t\t\t}\r\n"); out.write("\t\t\t\t\t\tif (typeof (obj) == \"function\") {\r\n"); out.write("\t\t\t\t\t\t\tobj(data.sysdate);\r\n"); out.write("\t\t\t\t\t\t\treturn;\r\n"); out.write("\t\t\t\t\t\t}\r\n"); out.write("\t\t\t\t\t\tif (typeof (obj) == \"string\") {\r\n"); out.write("\t\t\t\t\t\t\t$(obj).val(data.sysdate);\r\n"); out.write("\t\t\t\t\t\t}\r\n"); out.write("\t\t\t\t\t}\r\n"); out.write("\t\t\t\t}\r\n"); out.write("\t\t\t});\r\n"); out.write("\t\t},\r\n"); out.write("\t\t//根据日期、天数、运算符获取日期\r\n"); out.write("\t\tdateOperator : function(date, days, operator) {\r\n"); out.write("\t\t\tif (typeof (date) == \"undefined\" || date == null || date == '') {\r\n"); out.write("\t\t\t\treturn '';\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\tif (typeof (days) == \"undefined\" || days == null || days == '') {\r\n"); out.write("\t\t\t\treturn '';\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\tif (typeof (operator) == \"undefined\") {\r\n"); out.write("\t\t\t\toperator = this.Operation.ADD;\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\tdate = date.replace(/-/g, \"/\"); //更改日期格式 \r\n"); out.write("\r\n"); out.write("\t\t\tvar nd = new Date(date);\r\n"); out.write("\t\t\tnd = nd.valueOf();\r\n"); out.write("\t\t\tif (operator == this.Operation.ADD) {\r\n"); out.write("\t\t\t\tnd = nd + days * 24 * 60 * 60 * 1000;\r\n"); out.write("\t\t\t} else if (operator == this.Operation.SUBTRACT) {\r\n"); out.write("\t\t\t\tnd = nd - days * 24 * 60 * 60 * 1000;\r\n"); out.write("\t\t\t} else {\r\n"); out.write("\t\t\t\treturn false;\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\tnd = new Date(nd);\r\n"); out.write("\t\t\tvar y = nd.getFullYear();\r\n"); out.write("\t\t\tvar m = nd.getMonth() + 1;\r\n"); out.write("\t\t\tvar d = nd.getDate();\r\n"); out.write("\t\t\tif (m <= 9)\r\n"); out.write("\t\t\t\tm = \"0\" + m;\r\n"); out.write("\t\t\tif (d <= 9)\r\n"); out.write("\t\t\t\td = \"0\" + d;\r\n"); out.write("\t\t\tvar cdate = y + \"-\" + m + \"-\" + d;\r\n"); out.write("\t\t\treturn cdate;\r\n"); out.write("\t\t},\r\n"); out.write("\t\t//根据日期、月数、运算符获取日期\r\n"); out.write("\t\tdateOperator4Month : function(date, m, operator) {\r\n"); out.write("\t\t\tif (typeof (date) == \"undefined\" || date == null || date == '') {\r\n"); out.write("\t\t\t\treturn '';\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\tif (typeof (m) == \"undefined\" || m == null || m == '') {\r\n"); out.write("\t\t\t\treturn '';\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\tif (typeof (operator) == \"undefined\") {\r\n"); out.write("\t\t\t\toperator = this.Operation.ADD;\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\tdate = date.replace(/-/g, \"/\"); //更改日期格式 \r\n"); out.write("\r\n"); out.write("\t\t\tvar nd = new Date(date);\r\n"); out.write("\t\t\tif (operator == this.Operation.ADD) {\r\n"); out.write("\t\t\t\tnd.setMonth(nd.getMonth() + m*1);\r\n"); out.write("\t\t\t} else if (operator == this.Operation.SUBTRACT) {\r\n"); out.write("\t\t\t\tnd.setMonth(nd.getMonth() - m*1);\r\n"); out.write("\t\t\t} else {\r\n"); out.write("\t\t\t\treturn false;\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\tvar y = nd.getFullYear();\r\n"); out.write("\t\t\tvar m = nd.getMonth() + 1;\r\n"); out.write("\t\t\tvar d = nd.getDate();\r\n"); out.write("\t\t\tif (m <= 9)\r\n"); out.write("\t\t\t\tm = \"0\" + m;\r\n"); out.write("\t\t\tif (d <= 9)\r\n"); out.write("\t\t\t\td = \"0\" + d;\r\n"); out.write("\t\t\tvar cdate = y + \"-\" + m + \"-\" + d;\r\n"); out.write("\t\t\treturn cdate;\r\n"); out.write("\t\t},\r\n"); out.write("\t\t// 分隔符\r\n"); out.write("\t\tSeparator : {\r\n"); out.write("\t\t\tCOLON : \":\",\r\n"); out.write("\t\t\tDOT : \".\"\r\n"); out.write("\t\t},\r\n"); out.write("\t\t// 操作\r\n"); out.write("\t\tOperation : {\r\n"); out.write("\t\t\tADD : \"+\",\r\n"); out.write("\t\t\tSUBTRACT : \"-\"\r\n"); out.write("\t\t},\r\n"); out.write("\t\t// 时间操作\r\n"); out.write("\t\toperateTime : function(time1, time2, separator, operation) {\r\n"); out.write("\t\t\ttime1 = \"\" + time1;\r\n"); out.write("\t\t\ttime2 = \"\" + time2;\r\n"); out.write("\t\t\tvar minuteAllTotal = 0;\r\n"); out.write("\t\t\t// 转换成分钟\r\n"); out.write("\t\t\tvar minute1Total = this.convertToMinute(time1);\r\n"); out.write("\t\t\tvar minute2Total = this.convertToMinute(time2);\r\n"); out.write("\t\t\tseparator = separator || this.Separator.COLON;\r\n"); out.write("\t\t\toperation = operation || this.Operation.ADD;\r\n"); out.write("\t\t\tif (operation == this.Operation.ADD) {\r\n"); out.write("\t\t\t\tminuteAllTotal = minute1Total + minute2Total;\r\n"); out.write("\t\t\t} else if (operation == this.Operation.SUBTRACT) {\r\n"); out.write("\t\t\t\tminuteAllTotal = minute1Total - minute2Total;\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\treturn this.convertToHour(minuteAllTotal, separator);\r\n"); out.write("\t\t},\r\n"); out.write("\t\t// 转换成分钟\r\n"); out.write("\t\tconvertToMinute : function(time) {\r\n"); out.write("\t\t\tvar hour = parseFloat(this.getHour(time));\r\n"); out.write("\t\t\tvar minute = parseFloat(this.getMinute(time));\r\n"); out.write("\t\t\tif (isNaN(hour) || isNaN(minute)) {\r\n"); out.write("\t\t\t\treturn 0;\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\treturn hour * 60 + minute;\r\n"); out.write("\t\t},\r\n"); out.write("\t\t// 转换成小时\r\n"); out.write("\t\tconvertToHour : function(minuteTotal, separator) {\r\n"); out.write("\t\t\tif(!minuteTotal && minuteTotal != 0){\r\n"); out.write("\t\t\t\treturn null;\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\tvar reverseFlag = false;\r\n"); out.write("\t\t\tif (minuteTotal < 0) {\r\n"); out.write("\t\t\t\treverseFlag = true;\r\n"); out.write("\t\t\t\tminuteTotal = 0 - minuteTotal;\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\tvar hour = parseInt(minuteTotal / 60);\r\n"); out.write("\t\t\tvar minute = minuteTotal % 60;\r\n"); out.write("\t\t\tif(minute == 0){\r\n"); out.write("\t\t\t\treturn (reverseFlag ? \"-\" : \"\") + hour;\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\treturn (reverseFlag ? \"-\" : \"\") + hour + separator\r\n"); out.write("\t\t\t\t\t+ (minute < 10 ? \"0\" + minute : minute);\r\n"); out.write("\t\t},\r\n"); out.write("\t\t// 获取小时\r\n"); out.write("\t\tgetHour : function(time) {\r\n"); out.write("\t\t\tvar hour = time;\r\n"); out.write("\t\t\t$.each(TimeUtil.Separator, function(i, obj) {\r\n"); out.write("\t\t\t\tif (time.indexOf(obj) != -1) {\r\n"); out.write("\t\t\t\t\thour = time.split(obj)[0];\r\n"); out.write("\t\t\t\t\treturn false;\r\n"); out.write("\t\t\t\t}\r\n"); out.write("\t\t\t});\r\n"); out.write("\t\t\treturn hour;\r\n"); out.write("\t\t},\r\n"); out.write("\t\t// 获取分钟\r\n"); out.write("\t\tgetMinute : function(time) {\r\n"); out.write("\t\t\tvar minute = 0;\r\n"); out.write("\t\t\t$.each(this.Separator, function(i, obj) {\r\n"); out.write("\t\t\t\tif (time.indexOf(obj) != -1) {\r\n"); out.write("\t\t\t\t\tminute = time.split(obj)[1];\r\n"); out.write("\t\t\t\t\tif (time.indexOf(\"-\") != -1) {\r\n"); out.write("\t\t\t\t\t\tminute = 0 - minute;\r\n"); out.write("\t\t\t\t\t}\r\n"); out.write("\t\t\t\t\treturn false;\r\n"); out.write("\t\t\t\t}\r\n"); out.write("\t\t\t});\r\n"); out.write("\t\t\treturn minute;\r\n"); out.write("\t\t},\r\n"); out.write("\t\t// 组合时间\r\n"); out.write("\t\tcombine : function(hour, minute, separator) {\r\n"); out.write("\t\t\treturn (hour || \"0\") + separator + (minute || \"0\");\r\n"); out.write("\t\t},\r\n"); out.write("\t\t// 添加时间验证 \r\n"); out.write("\t\taddTimeValidate : function(selector) {\r\n"); out.write("\t\t\tvar input = $(selector);\r\n"); out.write("\t\t\tif (input.val().indexOf(\":\") == -1) {\r\n"); out.write("\t\t\t\tinput.val(input.val() + \":\");\r\n"); out.write("\t\t\t}\r\n"); out.write("\r\n"); out.write("\t\t\tinput.keyup(function() {\r\n"); out.write("\t\t\t\t// 当前输入框对象\r\n"); out.write("\t\t\t\tvar obj = $(this);\r\n"); out.write("\t\t\t\t// 时间正则表达式\r\n"); out.write("\t\t\t\tvar reg = /^([0-9]+)?((\\:)?[0-5]?[0-9]?)?$/;\r\n"); out.write("\t\t\t\t// 当前输入值\r\n"); out.write("\t\t\t\tvar value = obj.val();\r\n"); out.write("\t\t\t\tvar value_new = obj.val();\r\n"); out.write("\t\t\t\t// 不满足正则回退\r\n"); out.write("\t\t\t\twhile (!(reg.test(value_new)) && value_new.length > 0) {\r\n"); out.write("\t\t\t\t\tvalue_new = value_new.substr(0, value_new.length - 1);\r\n"); out.write("\t\t\t\t}\r\n"); out.write("\t\t\t\tvar position = -1;\r\n"); out.write("\t\t\t\t// 删除冒号再添加\r\n"); out.write("\t\t\t\tif (value_new.indexOf(\":\") == -1) {\r\n"); out.write("\t\t\t\t\tvalue_new += \":\";\r\n"); out.write("\t\t\t\t\tposition = value_new.length - 1;\r\n"); out.write("\t\t\t\t}\r\n"); out.write("\t\t\t\tif (value != value_new) {\r\n"); out.write("\t\t\t\t\tobj.val(value_new);\r\n"); out.write("\t\t\t\t}\r\n"); out.write("\t\t\t\t// 输入框光标移至冒号前\r\n"); out.write("\t\t\t\tif (position != -1) {\r\n"); out.write("\t\t\t\t\tvar o = obj.get(0);\r\n"); out.write("\t\t\t\t\tif (o.createTextRange) {//IE浏览器\r\n"); out.write("\t\t\t\t\t\tvar range = o.createTextRange();\r\n"); out.write("\t\t\t\t\t\trange.collapse(true);\r\n"); out.write("\t\t\t\t\t\trange.moveEnd(\"character\", position);\r\n"); out.write("\t\t\t\t\t\trange.moveStart(\"character\", position);\r\n"); out.write("\t\t\t\t\t\trange.select();\r\n"); out.write("\t\t\t\t\t} else {\r\n"); out.write("\t\t\t\t\t\to.setSelectionRange(position, position);\r\n"); out.write("\t\t\t\t\t\to.focus();\r\n"); out.write("\t\t\t\t\t}\r\n"); out.write("\t\t\t\t}\r\n"); out.write("\r\n"); out.write("\t\t\t});\r\n"); out.write("\r\n"); out.write("\t\t\tinput.blur(function() {\r\n"); out.write("\t\t\t\t// 当前输入框对象\r\n"); out.write("\t\t\t\tvar obj = $(this);\r\n"); out.write("\t\t\t\t// 当前输入值\r\n"); out.write("\t\t\t\tvar value = obj.val();\r\n"); out.write("\t\t\t\tif (value.indexOf(\":\") != -1) {\r\n"); out.write("\t\t\t\t\tvar hour = value.split(\":\")[0] || \"0\";\r\n"); out.write("\t\t\t\t\tvar minute = value.split(\":\")[1] || \"0\";\r\n"); out.write("\t\t\t\t\t// 分钟补零\r\n"); out.write("\t\t\t\t\tif (parseInt(minute) < 10) {\r\n"); out.write("\t\t\t\t\t\tminute = \"0\" + parseInt(minute);\r\n"); out.write("\t\t\t\t\t}\r\n"); out.write("\t\t\t\t\tvalue = hour + \":\" + minute;\r\n"); out.write("\t\t\t\t}\r\n"); out.write("\t\t\t\tobj.val(value);\r\n"); out.write("\t\t\t});\r\n"); out.write("\t\t}\r\n"); out.write("\t};\r\n"); out.write("\r\n"); out.write("\t/**\r\n"); out.write("\t * 列表收缩展开工具\r\n"); out.write("\t * 使用方法: CollapseOrExpandUtil.collapseOrExpandAll(this);\r\n"); out.write("\t * th_class为th的class选择器;td_class为td隐藏div的class选择器;table_id为table的id,主要是动态表格行展开时样式,可为空\r\n"); out.write("\t */\r\n"); out.write("\tCollapseOrExpandUtil = {\r\n"); out.write("\t\tid : \"CollapseOrExpandUtil\",\r\n"); out.write("\t\tcollapseOrExpandAll : function(obj) {\r\n"); out.write("\t\t\tvar this_ = this;\r\n"); out.write("\t\t\tvar flag = $(obj).hasClass(\"downward\");\r\n"); out.write("\t\t\tvar th_class = $(obj).attr(\"th_class\");\r\n"); out.write("\t\t\tvar td_class = $(obj).attr(\"td_class\");\r\n"); out.write("\t\t\tvar table_id = $(obj).attr(\"table_id\");\r\n"); out.write("\t\t\tif (flag) {\r\n"); out.write("\t\t\t\t$(\".\" + th_class).removeClass(\"downward\").addClass(\"upward\");\r\n"); out.write("\t\t\t\t$(\".\" + td_class).fadeIn(500);\r\n"); out.write("\t\t\t\t$(\".\" + td_class).prev().removeClass(\"icon-caret-down\")\r\n"); out.write("\t\t\t\t\t\t.addClass(\"icon-caret-up\");\r\n"); out.write("\t\t\t} else {\r\n"); out.write("\t\t\t\t$(\".\" + th_class).removeClass(\"upward\").addClass(\"downward\");\r\n"); out.write("\t\t\t\t$(\".\" + td_class).hide();\r\n"); out.write("\t\t\t\t$(\".\" + td_class).prev().removeClass(\"icon-caret-up\").addClass(\r\n"); out.write("\t\t\t\t\t\t\"icon-caret-down\");\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\tif (table_id != null && table_id != ''\r\n"); out.write("\t\t\t\t&& typeof table_id != undefined) {\r\n"); out.write("\t\t\t\tnew Sticky({\r\n"); out.write("\t\t\t\t\ttableId : table_id\r\n"); out.write("\t\t\t\t});\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t},\r\n"); out.write("\t\tcollapseOrExpandRow : function(td_class, table_id) {\r\n"); out.write("\t\t\tif (table_id != null && table_id != ''\r\n"); out.write("\t\t\t\t\t&& typeof table_id != undefined) {\r\n"); out.write("\t\t\t\tnew Sticky({\r\n"); out.write("\t\t\t\t\ttableId : table_id\r\n"); out.write("\t\t\t\t});\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\tvar flag = $(\".\" + td_class).next().is(\":hidden\");\r\n"); out.write("\t\t\tif (flag) {\r\n"); out.write("\t\t\t\t$(\".\" + td_class).next().fadeIn(500);\r\n"); out.write("\t\t\t\t$(\".\" + td_class).removeClass(\"icon-caret-down\");\r\n"); out.write("\t\t\t\t$(\".\" + td_class).addClass(\"icon-caret-up\");\r\n"); out.write("\t\t\t} else {\r\n"); out.write("\t\t\t\t$(\".\" + td_class).next().hide();\r\n"); out.write("\t\t\t\t$(\".\" + td_class).removeClass(\"icon-caret-up\");\r\n"); out.write("\t\t\t\t$(\".\" + td_class).addClass(\"icon-caret-down\");\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t},\r\n"); out.write("\t\tcollapseOrExpand : function(this_, table_id) {\r\n"); out.write("\t\t\tvar flag = $(this_).next().is(\":hidden\");\r\n"); out.write("\t\t\tif (flag) {\r\n"); out.write("\t\t\t\t$(this_).next().fadeIn(500);\r\n"); out.write("\t\t\t\t$(this_).removeClass(\"icon-caret-down\");\r\n"); out.write("\t\t\t\t$(this_).addClass(\"icon-caret-up\");\r\n"); out.write("\t\t\t} else {\r\n"); out.write("\t\t\t\t$(this_).next().hide();\r\n"); out.write("\t\t\t\t$(this_).removeClass(\"icon-caret-up\");\r\n"); out.write("\t\t\t\t$(this_).addClass(\"icon-caret-down\");\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t\tif (table_id != null && table_id != ''\r\n"); out.write("\t\t\t\t&& typeof table_id != undefined) {\r\n"); out.write("\t\t\t\tnew Sticky({\r\n"); out.write("\t\t\t\t\ttableId : table_id\r\n"); out.write("\t\t\t\t});\r\n"); out.write("\t\t\t}\r\n"); out.write("\t\t}\r\n"); out.write("\t}\r\n"); out.write("\r\n"); out.write("\t/**\r\n"); out.write("\t * 列表收缩展开工具\r\n"); out.write("\t * 使用方法: ModalUtil.showModal(id);弹窗modal显示\r\n"); out.write("\t * ModalUtil.modalBodyHeight(id)设置高度\r\n"); out.write("\t */\r\n"); out.write("\tModalUtil = {\r\n"); out.write("\t\tid : \"ModalUtil\",\r\n"); out.write("\t\tshowModal : function(id) {\r\n"); out.write("\t\t\tvar this_ = this;\r\n"); out.write("\t\t\t$(\"#\" + id).modal(\"show\");\r\n"); out.write("// \t\t\t$('#' + id).on('shown.bs.modal', function() {\r\n"); out.write("// \t\t\t\tthis_.modalBodyHeight(id);\r\n"); out.write("// \t\t\t\t$(\"#\"+id+\" .modal-body\").prop('scrollTop','0');\r\n"); out.write("// \t\t\t});\r\n"); out.write("\t\t},\r\n"); out.write("\t\tshowSearchModal : function(parentid, id, paginationId) {\r\n"); out.write("// \t\t\tvar this_ = this;\r\n"); out.write("// \t\t\t$(\"#\" + id).modal(\"show\");\r\n"); out.write("// \t\t\tthis_.searchModal(parentid, id, paginationId);\r\n"); out.write("// \t\t\t$('#' + id).on('shown.bs.modal', function() {\r\n"); out.write("// \t\t\t\tthis_.searchModal(parentid, id, paginationId);\r\n"); out.write("// \t\t\t});\r\n"); out.write("\t\t\t//隐藏Modal时验证销毁重构\r\n"); out.write("\t\t\t/* $(\"#\"+id).on(\"hidden.bs.modal\", function() {\r\n"); out.write("\t\t\t\tthis_.searchModal(parentid,id,paginationId);\r\n"); out.write("\t\t\t}); */\r\n"); out.write("\t\t},\r\n"); out.write("\t\tmodalBodyHeight : function(id) {\r\n"); out.write("\t\t\t//window高度\r\n"); out.write("// \t\t\tvar windowHeight = $(window).height()\r\n"); out.write("// \t\t\t//modal-footer的高度\r\n"); out.write("// \t\t\tvar modalFooterHeight = $(\"#\" + id + \" .modal-footer\")\r\n"); out.write("// \t\t\t\t\t.outerHeight() || 0;\r\n"); out.write("// \t\t\t//modal-header 的高度\r\n"); out.write("// \t\t\tvar modalHeaderHeight = $(\"#\" + id + \" .modal-header\")\r\n"); out.write("// \t\t\t\t\t.outerHeight() || 0;\r\n"); out.write("// \t\t\t//modal-dialog的margin-top值\r\n"); out.write("// \t\t\tvar modalDialogMargin = parseInt($(\"#\" + id + \" .modal-dialog\")\r\n"); out.write("// \t\t\t\t\t.css(\"margin-top\")) || 0\r\n"); out.write("// \t\t\t//modal-body 的设置\r\n"); out.write("// \t\t\tvar modalBodyHeight = windowHeight - modalFooterHeight\r\n"); out.write("// \t\t\t\t\t- modalHeaderHeight - modalDialogMargin * 2 - 8;\r\n"); out.write("// \t\t\t$(\"#\" + id + \" .modal-body\").attr(\r\n"); out.write("// \t\t\t\t\t'style',\r\n"); out.write("// \t\t\t\t\t'max-height:' + modalBodyHeight\r\n"); out.write("// \t\t\t\t\t\t\t+ 'px !important;overflow: auto;margin-top:0px;');\r\n"); out.write("\t\t},\r\n"); out.write("\t\tsearchModal : function(parentid, id, paginationId) {\r\n"); out.write("\r\n"); out.write("// \t\t\tvar windowHeight = $(window).height();\r\n"); out.write("\r\n"); out.write("// \t\t\tvar modalFooterHeight = $(\"#\" + id + \" .modal-footer\")\r\n"); out.write("// \t\t\t\t\t.outerHeight() || 0;\r\n"); out.write("\r\n"); out.write("// \t\t\tvar modalHeaderHeight = $(\"#\" + id + \" .modal-header\")\r\n"); out.write("// \t\t\t\t\t.outerHeight() || 0;\r\n"); out.write("\r\n"); out.write("// \t\t\tvar modalDialogMargin = parseInt($(\"#\" + id + \" .modal-dialog\")\r\n"); out.write("// \t\t\t\t\t.css(\"margin-top\")) || 0;\r\n"); out.write("\r\n"); out.write("// \t\t\tvar modalSearch = $(\"#\" + id + \" .modalSearch\").outerHeight() || 0;\r\n"); out.write("\r\n"); out.write("// \t\t\tvar modalpagination = $(\"#\" + paginationId).outerHeight() || 0;\r\n"); out.write("\r\n"); out.write("// \t\t\tif (parentid == null || parentid == \"\") {\r\n"); out.write("\r\n"); out.write("// \t\t\t\tvar modalBodyHeight = windowHeight - modalFooterHeight\r\n"); out.write("// \t\t\t\t\t\t- modalHeaderHeight - modalDialogMargin * 2 - 8;\r\n"); out.write("\r\n"); out.write("// \t\t\t} else {\r\n"); out.write("// \t\t\t\tvar parentMargin = parseInt($(\"#\" + parentid + \" .modal-dialog\")\r\n"); out.write("// \t\t\t\t\t\t.css(\"margin-top\")) || 0;\r\n"); out.write("\r\n"); out.write("// \t\t\t\tvar parentHeader = $(\"#\" + parentid + \" .modal-header\")\r\n"); out.write("// \t\t\t\t\t\t.outerHeight() || 0;\r\n"); out.write("\r\n"); out.write("// \t\t\t\tvar parentFooter = $(\"#\" + parentid + \" .modal-footer\")\r\n"); out.write("// \t\t\t\t\t\t.outerHeight() || 0;\r\n"); out.write("\r\n"); out.write("// \t\t\t\t$(\"#\" + id).css(\"margin-top\", (parentHeader + 10) + \"px\");\r\n"); out.write("\r\n"); out.write("// \t\t\t\tvar parentHeight = parseInt($(\"#\" + parentid).css(\"height\")) || 0;\r\n"); out.write("\r\n"); out.write("// \t\t\t\tvar modalBodyHeight = parentHeight - parentHeader - 10\r\n"); out.write("// \t\t\t\t\t\t- parentFooter - 10 - modalFooterHeight\r\n"); out.write("// \t\t\t\t\t\t- modalHeaderHeight - 8 - parentMargin * 2;\r\n"); out.write("\r\n"); out.write("// \t\t\t}\r\n"); out.write("// \t\t\tvar tableSearchheight = modalBodyHeight - modalpagination\r\n"); out.write("// \t\t\t\t\t- modalSearch - 18;\r\n"); out.write("\r\n"); out.write("// \t\t\t$(\"#\" + id + \" #searchTable\").attr(\r\n"); out.write("// \t\t\t\t\t'style',\r\n"); out.write("// \t\t\t\t\t'max-height:' + tableSearchheight\r\n"); out.write("// \t\t\t\t\t\t\t+ 'px !important;overflow: auto;');\r\n"); out.write("\r\n"); out.write("\t\t}\r\n"); out.write("\t}\r\n"); out.write("\r\n"); out.write("\tvar TableUtil = {\r\n"); out.write("\r\n"); out.write("\t\t/**\r\n"); out.write("\t\t * 选中行可见\r\n"); out.write("\t\t * @param row\t目标行\t\r\n"); out.write("\t\t * @param topDiv\t上方div\r\n"); out.write("\t\t * @param corrected_value\t修正值\r\n"); out.write("\t\t */\r\n"); out.write("\t\tmakeTargetRowVisible : function(row, topDiv, corrected_value) {\r\n"); out.write("\r\n"); out.write("\t\t\t// 选中行的高度\r\n"); out.write("\t\t\tvar row_offset = row.offset().top;\r\n"); out.write("\t\t\t// table的高度\r\n"); out.write("\t\t\tvar table_offset = topDiv.offset().top;\r\n"); out.write("\t\t\t// thead的高度\r\n"); out.write("\t\t\tvar table_head = topDiv.find(\"thead\").outerHeight();\r\n"); out.write("\t\t\t// 修正值\r\n"); out.write("\t\t\tcorrected_value = corrected_value || 1;\r\n"); out.write("\r\n"); out.write("\t\t\t// 需要偏移的高度\r\n"); out.write("\t\t\tvar offset = row_offset - table_offset - table_head\r\n"); out.write("\t\t\t\t\t- corrected_value;\r\n"); out.write("\t\t\tif (offset > 0) {\r\n"); out.write("\t\t\t\ttopDiv.scrollTop(offset);\r\n"); out.write("\t\t\t}\r\n"); out.write("\r\n"); out.write("\t\t},\r\n"); out.write("\t\t\r\n"); out.write("\t\t/**\r\n"); out.write("\t\t * table添加title\r\n"); out.write("\t\t * @param selector\t选择器\r\n"); out.write("\t\t */\r\n"); out.write("\t\taddTitle : function(selector){\r\n"); out.write("\t\t\tselector = selector || \"table tr td\";\r\n"); out.write("\t\t\t$(selector).each(function(){\r\n"); out.write("\t\t\t\tif(!$(this).attr(\"title\") && $.trim($(this).text()) != \"\"){\r\n"); out.write("\t\t\t\t\t$(this).attr(\"title\", $(this).text());\r\n"); out.write("\t\t\t\t}\r\n"); out.write("\t\t\t});\r\n"); out.write("\t\t},\r\n"); out.write("\t\tshowDisplayContent:function(){\r\n"); out.write("\t\t\t$(\".displayContent\").show();\r\n"); out.write("\t\t\tApp.resizeHeight();\r\n"); out.write("\t\t},\r\n"); out.write("\t\thideDisplayContent:function(){\r\n"); out.write("\t\t\t$(\".displayContent\").hide();\r\n"); out.write("\t\t\tApp.resizeHeight();\r\n"); out.write("\t\t},\r\n"); out.write("\t\t//重置排序图标\r\n"); out.write("\t\tresetTableSorting : function(tableId){\r\n"); out.write("\t\t\t$(\".sorting_desc\", $(\"#\"+tableId)).removeClass(\"sorting_desc\").addClass(\"sorting\");\r\n"); out.write("\t\t\t$(\".sorting_asc\", $(\"#\"+tableId)).removeClass(\"sorting_asc\").addClass(\"sorting\");\r\n"); out.write("\t\t}\r\n"); out.write("\t};\r\n"); out.write("\t \r\n"); out.write("\tfunction goHistory(obj) {\r\n"); out.write("\t\tobj.history.go(-1)\r\n"); out.write("\t}\r\n"); out.write("\t\r\n"); out.write("\t\r\n"); out.write("\t\r\n"); out.write("\r\n"); out.write("\t/**监控值检查*/\r\n"); out.write("\tvar monitor_setting_check = {\r\n"); out.write("\t\t/**是合法飞行循环*/\r\n"); out.write("\t\tisFh: function($obj,value){\r\n"); out.write("\t\t\t \r\n"); out.write("\t\t\tvar result = true;\r\n"); out.write("\t\t\tvar reg = /^(0|[1-9]\\d*)(\\:[0-5]?[0-9]?)?$/;\r\n"); out.write("\t\t\tvar value = $obj.val();\r\n"); out.write("\t\t\tvalue = value.replace(/:/g, \":\");\r\n"); out.write("\t\t\twhile(!(reg.test(value)) && value.length > 0){\r\n"); out.write("\t\t\t\tvalue = value.substr(0, value.length-1);\r\n"); out.write("\t\t\t\tresult = false;\r\n"); out.write("\t\t }\r\n"); out.write("\t\t\t$obj.val(value);\r\n"); out.write("\t\t\treturn result;\r\n"); out.write("\t\t},\r\n"); out.write("\t\t/**是合法飞行小时*/\r\n"); out.write("\t\tisFc: function($obj,value){\r\n"); out.write("\t\t\tvar reg = /^[1-9]\\d*$/;\r\n"); out.write("\t\t\t \r\n"); out.write("\t\t\t//value = value.replace(/:/g, \":\");\r\n"); out.write("\t\t\tif(!(reg.test(value)) && value.length > 0){\r\n"); out.write("\t\t\t\tvalue = value.substr(0, value.length-1);\r\n"); out.write("\t\t\t\t$obj.val('0');\r\n"); out.write("\t\t\t\treturn false;\r\n"); out.write("\t\t }\r\n"); out.write("\t\t\treturn true;\r\n"); out.write("\t\t},\r\n"); out.write("\t}\r\n"); out.write("\t\r\n"); out.write("</script>\r\n"); out.write("\r\n"); out.write("<script type=\"text/javascript\" src=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${ctx}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("/static/js/thjw/common/alert.js\"></script>\r\n"); out.write("<!-------alert对话框 Start-------->\r\n"); out.write("<div class=\"modal fade modal-new\" id=\"alertModal\" role=\"dialog\" aria-labelledby=\"myModalLabel\" aria- hidden=\"true\" data-keyboard=\"false\" data-backdrop=\"static\" style=\"z-index: 100000 ! important;\">\r\n"); out.write("\t<div class=\"modal-dialog\">\r\n"); out.write("\t\t<div class=\"modal-content\">\r\n"); out.write("\t \t<div class=\"modal-header modal-header-new\">\r\n"); out.write("\t\t\t\t<h4 class=\"modal-title\">\r\n"); out.write("\t\t\t\t\t<div class='pull-left'>\r\n"); out.write("\t\t\t\t\t\t<div class=\"font-size-14\">提示信息</div>\r\n"); out.write("\t\t\t\t\t\t<div class=\"font-size-12\">Prompt Info</div>\r\n"); out.write("\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t<div class='pull-right'>\r\n"); out.write("\t\t\t\t\t\t<button type=\"button\" class=\"icon-remove modal-close\"\r\n"); out.write("\t\t\t\t\t\t\tdata-dismiss=\"modal\" aria-label=\"Close\"></button>\r\n"); out.write("\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t<div class='clearfix'></div>\r\n"); out.write("\t\t\t\t</h4>\r\n"); out.write("\t\t\t</div>\r\n"); out.write("\t\t\t<div class=\"modal-body\">\r\n"); out.write("\t\t\t\t<div class=\"input-group-border\" style=\"padding-top: 5px; margin-top: 8px;\">\r\n"); out.write("\t\t\t\t\t<i class=\"glyphicon glyphicon-info-sign alert-modalbody-icon\"></i>\r\n"); out.write("\t\t\t\t\t<label id=\"alertModalBody\" class=\"paddind-bottom-5\"></label>\r\n"); out.write("\t\t\t\t</div>\r\n"); out.write("\t\t\t</div>\r\n"); out.write("\t\t\t<div class=\"modal-footer\">\r\n"); out.write(" \t\t<div class=\"col-xs-12 padding-leftright-8\" >\r\n"); out.write("\t\t\t \t<div class=\"input-group\">\r\n"); out.write("\t <span class=\"input-group-addon modalfooterbtn\">\r\n"); out.write("\t \t<button type=\"button\" class=\"btn btn-primary padding-top-1 padding-bottom-1\" data-dismiss=\"modal\">\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-12\">关闭</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9\">Close</div>\r\n"); out.write("\t\t\t\t\t\t\t</button>\r\n"); out.write("\t\t\t\t\t\t</span>\r\n"); out.write("\t \t</div>\r\n"); out.write(" \t</div>\r\n"); out.write("\t\t\t</div>\r\n"); out.write("\t\t</div>\r\n"); out.write("\t</div>\r\n"); out.write("</div>\r\n"); out.write("<!-------alert对话框 End-------->\r\n"); out.write("\t\r\n"); out.write("<!-------alert refreshPage对话框 Start-------->\r\n"); out.write("<div class=\"modal fade\" id=\"alertAfterModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\" aria-hidden=\"true\" data-keyboard=\"false\" data-backdrop=\"static\" style=\"z-index: 100000 ! important;\">\r\n"); out.write("\t<div class=\"modal-dialog\">\r\n"); out.write("\t\t<div class=\"modal-content\">\r\n"); out.write("\t\t<div class=\"modal-header alert-modal-header\" >\r\n"); out.write(" <h4 class=\"modal-title\" >\r\n"); out.write(" <div class='pull-left'>\r\n"); out.write(" <div class=\"font-size-12 \">提示信息</div>\r\n"); out.write("\t\t\t\t\t\t<div class=\"font-size-9\">Prompt Info</div>\r\n"); out.write("\t\t\t\t\t </div>\r\n"); out.write("\t\t\t\t\t <div class='pull-right' style='padding-top:10px;'>\r\n"); out.write("\t\t\t\t\t \t<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\" style='font-size:30px !important;' >&times;</span></button>\r\n"); out.write("\t\t\t\t\t </div>\r\n"); out.write("\t\t\t\t\t <div class='clearfix'></div>\r\n"); out.write(" </h4>\r\n"); out.write(" </div>\r\n"); out.write("\t\t\t<div class=\"modal-body alert-modal-body\" id=\"alertAfterModalBody\"></div>\r\n"); out.write("\t\t\t<div class=\"modal-footer\">\r\n"); out.write("\t\t\t\t<button type=\"button\" onclick=\"refreshPage();\" class=\"btn btn-primary padding-top-1 padding-bottom-1\" data-dismiss=\"modal\">\r\n"); out.write("\t\t\t\t\t<div class=\"font-size-12\">关闭</div>\r\n"); out.write("\t\t\t\t\t<div class=\"font-size-9\">Close</div>\r\n"); out.write("\t\t\t\t</button>\r\n"); out.write("\t\t\t</div>\r\n"); out.write("\t\t</div>\r\n"); out.write("\t</div>\r\n"); out.write("</div>\r\n"); out.write("<!-------alert refreshPage对话框 End-------->\r\n"); out.write("<!-------alert error对话框 Start-------->\r\n"); out.write("<div class=\"modal fade modal-new\" id=\"alertErrorModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\" aria-hidden=\"true\" data-keyboard=\"false\" data-backdrop=\"static\" style=\"z-index: 100000 ! important;\">\r\n"); out.write("\t<div class=\"modal-dialog\">\r\n"); out.write("\t\t<div class=\"modal-content\">\r\n"); out.write("\t\t\t<div class=\"modal-header modal-header-new\">\r\n"); out.write("\t\t\t\t<h4 class=\"modal-title\">\r\n"); out.write("\t\t\t\t\t<div class='pull-left'>\r\n"); out.write("\t\t\t\t\t\t<div class=\"font-size-14\">提示信息</div>\r\n"); out.write("\t\t\t\t\t\t<div class=\"font-size-12\">Prompt Info</div>\r\n"); out.write("\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t<div class='pull-right'>\r\n"); out.write("\t\t\t\t\t\t<button type=\"button\" class=\"icon-remove modal-close\"\r\n"); out.write("\t\t\t\t\t\t\tdata-dismiss=\"modal\" aria-label=\"Close\"></button>\r\n"); out.write("\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t<div class='clearfix'></div>\r\n"); out.write("\t\t\t\t</h4>\r\n"); out.write("\t\t\t</div>\r\n"); out.write("\t\t\t<div class=\"modal-body\">\r\n"); out.write("\t\t\t\t<div class=\"input-group-border\" style=\"padding-top: 5px; margin-top: 8px;\">\r\n"); out.write("\t\t\t\t\t<i class=\"glyphicon glyphicon-info-sign alert-modalbody-icon\"></i>\r\n"); out.write("\t\t\t\t\t<label id=\"alertErrorModalBody\" class=\"paddind-bottom-5\"></label>\r\n"); out.write("\t\t\t\t</div>\r\n"); out.write("\t\t\t</div>\r\n"); out.write("\t\t\t<div class=\"modal-footer\">\r\n"); out.write(" \t\t<div class=\"col-xs-12 padding-leftright-8\" >\r\n"); out.write("\t\t\t \t<div class=\"input-group\">\r\n"); out.write("\t <span class=\"input-group-addon modalfooterbtn\">\r\n"); out.write("\t \t<button type=\"button\" class=\"btn btn-primary padding-top-1 padding-bottom-1\" data-dismiss=\"modal\">\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-12\">关闭</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9\">Close</div>\r\n"); out.write("\t\t\t\t\t\t\t</button>\r\n"); out.write("\t\t\t\t\t\t</span>\r\n"); out.write("\t \t</div>\r\n"); out.write(" \t</div>\r\n"); out.write("\t\t\t</div>\r\n"); out.write("\t\t</div>\r\n"); out.write("\t</div>\r\n"); out.write("</div>\r\n"); out.write("\t<!-------alert error对话框 End-------->\r\n"); out.write("\t\r\n"); out.write("<!-------alert error对话框 Start-------->\r\n"); out.write("<div class=\"modal fade modal-new\" id=\"alertConfirmModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\" aria- hidden=\"true\" data-backdrop='static' data-keyboard= false style=\"z-index: 100000 ! important;\">\r\n"); out.write(" <input type=\"hidden\" value=\"\" id=\"url\"/>\r\n"); out.write("\t<div class=\"modal-dialog\" style=\"width:40%;\">\r\n"); out.write("\t\t<div class=\"modal-content\">\r\n"); out.write("\t\t\t<div class=\"modal-header modal-header-new\">\r\n"); out.write("\t\t\t\t<h4 class=\"modal-title\">\r\n"); out.write("\t\t\t\t\t<div class='pull-left'>\r\n"); out.write("\t\t\t\t\t\t<div class=\"font-size-14\">提示信息</div>\r\n"); out.write("\t\t\t\t\t\t<div class=\"font-size-12\">Prompt Info</div>\r\n"); out.write("\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t<div class='clearfix'></div>\r\n"); out.write("\t\t\t\t</h4>\r\n"); out.write("\t\t\t</div>\r\n"); out.write("\t\t\t<div class=\"modal-body\">\r\n"); out.write("\t\t\t\t<div class=\"input-group-border\" style=\"padding-top: 5px; margin-top: 8px;\">\r\n"); out.write("\t\t\t\t\t<i class=\"fa fa-question-circle-o alert-modalbody-icon\"></i>\r\n"); out.write("\t\t\t\t\t<label id=\"alertConfirmModalBody\" class=\"paddind-bottom-5\"></label>\r\n"); out.write("\t\t\t\t</div>\r\n"); out.write("\t\t\t</div>\r\n"); out.write("\t\t\t<div class=\"modal-footer\">\r\n"); out.write(" \t\t<div class=\"col-xs-12 padding-leftright-8\" >\r\n"); out.write("\t\t\t \t<div class=\"input-group\">\r\n"); out.write("\t <span class=\"input-group-addon modalfooterbtn\">\r\n"); out.write("\t <button id=\"confirmY\" type=\"button\" class=\"btn btn-primary padding-top-1 padding-bottom-1\">\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-12 lin-height-12\">是</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9 \">Yes</div>\r\n"); out.write("\t\t\t\t\t\t </button>\r\n"); out.write("\t\t <button id=\"confirmN\" type=\"button\" class=\"btn btn-primary padding-top-1 padding-bottom-1\" >\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-12 lin-height-12\">否</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9 \">No</div>\r\n"); out.write("\t\t\t\t\t\t </button>\r\n"); out.write("\t </span>\r\n"); out.write("\t \t</div>\r\n"); out.write(" \t</div>\r\n"); out.write("\t\t\t</div>\r\n"); out.write("\t\t</div>\r\n"); out.write("\t</div>\r\n"); out.write("</div>\r\n"); out.write("<!-------alert error对话框 End-------->\r\n"); out.write("\r\n"); out.write("<!-------图片预览对话框-------->\r\n"); out.write("<div class=\"modal fade\" id=\"imageModal\" role=\"dialog\" aria-labelledby=\"myModalLabel\" aria- hidden=\"true\" data-keyboard=\"false\" data-backdrop=\"static\" style=\"z-index: 70000 ! important;\">\r\n"); out.write("\t<div class=\"modal-dialog\" style=\"text-align:center;\">\r\n"); out.write("\t\t<div class=\"modal-content\" style=\"border: none;\">\r\n"); out.write("\t\t <div class=\"modal-header alert-modal-header\" >\r\n"); out.write(" <h4 class=\"modal-title\" >\r\n"); out.write(" <div class='pull-left text-left'>\r\n"); out.write(" <div class=\"font-size-12 \">图片预览</div>\r\n"); out.write("\t\t\t\t\t\t<div class=\"font-size-9\">Preview Picture</div>\r\n"); out.write("\t\t\t\t\t </div>\r\n"); out.write("\t\t\t\t\t <div class='pull-right' style='padding-top:10px;'>\r\n"); out.write("\t\t\t\t\t \t<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\" style='font-size:30px !important;' >&times;</span></button>\r\n"); out.write("\t\t\t\t\t </div>\r\n"); out.write("\t\t\t\t\t <div class='clearfix'></div>\r\n"); out.write(" </h4>\r\n"); out.write(" </div>\r\n"); out.write(" <div class=\"modal-body alert-modal-body text-left\">\r\n"); out.write("\t\t\t\t<img alt=\"预览失败\" src=\"\" id=\"previewImage\"/>\r\n"); out.write("\t\t\t</div>\r\n"); out.write("\t\t\t<div class=\"modal-footer alert-modal-footer\">\r\n"); out.write("\t\t\t <div class=\"input-group\">\r\n"); out.write(" <span class=\"input-group-addon modalfooterbtn\">\r\n"); out.write(" <button type=\"button\" class=\"btn btn-primary padding-top-1 padding-bottom-1\" data-dismiss=\"modal\">\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"font-size-12 lin-height-12\">关闭</div>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"font-size-9 \">Close</div>\r\n"); out.write("\t\t\t\t\t </button>\r\n"); out.write(" </span>\r\n"); out.write(" \t</div>\r\n"); out.write("\t\t\t</div>\r\n"); out.write("\t\t</div>\r\n"); out.write("\t</div>\r\n"); out.write("</div>\r\n"); out.write("<!-------图片预览对话框-------->\r\n"); out.write("\r\n"); out.write("<style>\r\n"); out.write("\r\n"); out.write(".ajax-file-upload_ext {\r\n"); out.write(" background: #428bca none repeat scroll 0 0;\r\n"); out.write(" border: medium none;\r\n"); out.write(" border-radius: 4px;\r\n"); out.write(" color: #fff;\r\n"); out.write(" cursor: pointer;\r\n"); out.write(" display: inline-block; \r\n"); out.write(" font-family: Arial,Helvetica,sans-serif;\r\n"); out.write(" font-size: 12px;\r\n"); out.write(" /* font-weight: bold; */\r\n"); out.write(" height: 34px;\r\n"); out.write(" width: 48px;\r\n"); out.write(" line-height: 16px;\r\n"); out.write(" margin: 0;\r\n"); out.write(" /* padding: 3px 22px 0 22px; */\r\n"); out.write(" text-align: center;\r\n"); out.write(" text-decoration: none;\r\n"); out.write(" vertical-align: middle;\r\n"); out.write("}\r\n"); out.write("\r\n"); out.write("</style>\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("<script>\r\n"); out.write("var pageParam = '"); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${param.pageParam}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("';\r\n"); out.write("</script>\r\n"); out.write("</head>\r\n"); out.write("<body>\r\n"); out.write("<div class=\"page-content \">\r\n"); out.write("\t\t\t<!-- from start -->\r\n"); out.write("\t<div class=\"panel panel-primary\">\r\n"); out.write("\t<div class=\"panel-heading\" id=\"NavigationBar\"></div>\r\n"); out.write("\t\t<div class=\"panel-body\" id=\"open_win_installationlist_replace\">\r\n"); out.write("\t\t\t <input type=\"hidden\" id=\"id\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.id}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("\">\r\n"); out.write(" \t\t\t <input type=\"hidden\" id=\"zdbmid\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${user.bmdm}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("\" />\r\n"); out.write(" \t\t\t <input type=\"hidden\" id=\"zdbmid\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${user.bmdm}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("\" />\r\n"); out.write("\t\t\t <input type=\"hidden\" id=\"zdrid\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${sessionScope.user.id}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("\" />\r\n"); out.write("\t\t\t <input type=\"hidden\" id=\"kwid\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.storage.id}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("\" />\r\n"); out.write("\t\t\t <input type=\"hidden\" id=\"ckid\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.store.id}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("\" />\r\n"); out.write("\t\t\t <input type=\"hidden\" id=\"gg\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.hcMainData.gg}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("\" />\r\n"); out.write("\t\t\t <input type=\"hidden\" id=\"xh\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.hcMainData.xh}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("\" />\r\n"); out.write("\t\t\t <input type=\"hidden\" id=\"ckh\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.store.ckh}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("\" />\r\n"); out.write("\t\t\t <input type=\"hidden\" id=\"bjid\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.receiptSheetDetail.bjid}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("\" />\r\n"); out.write("\t\t\t <input type=\"hidden\" id=\"cklb\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.store.cklb}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("\" />\r\n"); out.write("\t\t\t <input type=\"hidden\" id=\"xgdjid\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.receiptSheetDetail.xgdjid}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("\" />\r\n"); out.write("\t\t\t <input type=\"hidden\" id=\"shdid\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.shdid}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("\" />\r\n"); out.write("\t\t\t <input type=\"hidden\" id=\"shdmxid\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.shdmxid}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("\" />\r\n"); out.write("\t\t\t <input type=\"hidden\" id=\"shlx\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.receiptSheet.shlx}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("\" />\r\n"); out.write("\t\t\t <input type=\"hidden\" id=\"kcid\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.materialHistory.kcid}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("\" />\r\n"); out.write("\t\t\t <input type=\"hidden\" id=\"hclynoe\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.hcly}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("\" />\r\n"); out.write("\t\t\t <div class=\"panel panel-default\">\r\n"); out.write("\t\t\t\t <div class=\"panel-heading\">\r\n"); out.write("\t\t\t\t\t\t <h3 class=\"panel-title\">基本信息 Basic Information</h3>\r\n"); out.write("\t\t\t\t\t </div>\r\n"); out.write("\t\t\t\t<div class=\"panel-body\">\t\r\n"); out.write("\t\t\t\t\t\r\n"); out.write("\t\t\t\t\t\r\n"); out.write("\t\t\t\t\t\t<div class=\"col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0 \" >\r\n"); out.write("\t\t\t\t\t\t\t<label class=\"col-lg-4 col-sm-4 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-18\">检验单号</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">Check No.</div>\r\n"); out.write("\t\t\t\t\t\t\t</label>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\" col-lg-8 col-sm-8 col-xs-8 padding-left-8 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"text\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${erayFns:escapeStr(queryQuality.jydh)}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false)); out.write("\" id=\"jydh\" class=\"form-control \" readonly />\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"hidden\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.dprtcode}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("\" id=\"dprtcode\" class=\"form-control \" readonly />\r\n"); out.write("\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t<div class=\" col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t<label class=\"col-lg-4 col-sm-4 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t <div class=\"font-size-12 line-height-18\">部件号</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">P/N</div></label>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"col-lg-8 col-sm-8 col-xs-8 padding-left-8 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t <input type=\"text\" id=\"bjh\" class=\"form-control\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${erayFns:escapeStr(queryQuality.hcMainData.bjh)}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false)); out.write("\" disabled=\"disabled\"/>\r\n"); out.write("\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t \t<div class=\" col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0 \">\r\n"); out.write("\t\t\t\t\t\t\t\t<label class=\"col-lg-4 col-sm-4 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t <div class=\"font-size-12 line-height-18\">管理级别</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\"> level</div></label>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\" col-lg-8 col-sm-8 col-xs-8 padding-left-8 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t <select id=\"gljb\" class=\"form-control\" disabled=\"disabled\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t\t"); if (_jspx_meth_c_005fforEach_005f0(_jspx_page_context)) return; out.write("\r\n"); out.write("\t\t\t\t\t\t\t\t\t </select>\r\n"); out.write("\t\t\t\t\t\t\t </div>\r\n"); out.write("\t\t\t\t\t </div>\r\n"); out.write("\t\t\t\t\t \t<div class=\" col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0 \">\r\n"); out.write("\t\t\t\t\t\t\t\t<label class=\"col-lg-4 col-sm-4 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t <div class=\"font-size-12 line-height-18\">序列号</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">S/N</div></label>\r\n"); out.write("\t\t\t\t\t\t\t <div class=\"col-lg-8 col-sm-8 col-xs-8 padding-left-8 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${erayFns:escapeStr(queryQuality.receiptSheetDetail.sn)}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false)); out.write("\" disabled=\"disabled\"/>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<input type=\"hidden\" id=\"pch\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${erayFns:escapeStr(queryQuality.receiptSheetDetail.pch)}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false)); out.write("\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t<input type=\"hidden\" id=\"xlh\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${erayFns:escapeStr(queryQuality.receiptSheetDetail.sn)}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false)); out.write("\">\r\n"); out.write("\t\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t \t</div>\r\n"); out.write("\t\t\t\t \t<div class=\"clearfix\">\r\n"); out.write("\t\t\t\t\t \t<div class=\" col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0 \">\r\n"); out.write("\t\t\t\t\t\t\t\t<label class=\"col-lg-4 col-sm-4 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t <div class=\"font-size-12 line-height-18\">批次号</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">B/N</div></label>\r\n"); out.write("\t\t\t\t\t\t\t <div class=\"col-lg-8 col-sm-8 col-xs-8 padding-left-8 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${erayFns:escapeStr(queryQuality.receiptSheetDetail.pch)}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false)); out.write(" \" disabled=\"disabled\"/>\t\t\t\t\t\t\t\t\t\r\n"); out.write("\t\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t \t</div>\r\n"); out.write("\t\t\t\t\t \t\t <div class=\" col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t<label class=\"col-lg-4 col-sm-4 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t <div class=\"font-size-12 line-height-18\">中文名称</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">CH.Name</div></label>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"col-lg-8 col-sm-8 col-xs-8 padding-left-8 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t\t <input type=\"text\" id=\"zwms\" class=\"form-control\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${erayFns:escapeStr(queryQuality.hcMainData.zwms)}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false)); out.write("\" disabled=\"disabled\"/>\r\n"); out.write("\t\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t \t\t<div class=\" col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t<label class=\"col-lg-4 col-sm-4 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t <div class=\"font-size-12 line-height-18\">英文名称</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">F.Name</div></label>\r\n"); out.write("\t\t\t\t\t\t\t <div class=\"col-lg-8 col-sm-8 col-xs-8 padding-left-8 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t\t <input type=\"text\" class=\"form-control\" id=\"ywms\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${erayFns:escapeStr(queryQuality.hcMainData.ywms)}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false)); out.write("\" disabled=\"disabled\"/>\r\n"); out.write("\t\t\t\t\t\t\t </div>\r\n"); out.write("\t\t\t\t\t \t</div>\t\t\t\t\t \t\r\n"); out.write("\t\t\t\t\t\t \t<div class=\" col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t<label class=\"col-lg-4 col-sm-4 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t <div class=\"font-size-12 line-height-18\">数量</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">Num</div></label>\r\n"); out.write("\t\t\t\t\t\t\t\t <div class=\"col-lg-8 col-sm-8 col-xs-8 padding-left-8 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" id=\"sl\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.receiptSheetDetail.sl}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("\" disabled=\"disabled\"/>\r\n"); out.write("\t\t\t\t\t\t\t\t </div>\r\n"); out.write("\t\t\t\t\t\t </div>\r\n"); out.write("\t\t\t\t\t\t <div class=\"clearfix\"></div>\r\n"); out.write("\t\t\t\t\t\t <div class=\"col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t<label class=\" col-lg-4 col-sm-4 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-18\">计量单位</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">Unit</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</label>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<div class=\" col-lg-8 col-sm-8 col-xs-8 padding-left-8 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<input type=\"text\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${erayFns:escapeStr(queryQuality.hcMainData.jldw)}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false)); out.write("\" id=\"jldw\" class=\"form-control \" readonly />\r\n"); out.write("\t\t\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t </div>\t\t\t\t\t\t \r\n"); out.write("\t\t\t\t\t\t\t<div class=\"col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t\t<label class=\"col-lg-4 col-sm-4 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-18\">仓库名称</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\"> Store Name</div>\r\n"); out.write("\t\t\t\t\t\t\t\t</label>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\" col-lg-8 col-sm-8 col-xs-8 padding-left-8 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t<input type=\"text\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${erayFns:escapeStr(queryQuality.store.ckmc)}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false)); out.write("\" id=\"ckmc\" class=\"form-control \" readonly />\r\n"); out.write("\t\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t<label class=\"col-lg-4 col-sm-4 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-18\">库位号</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">Storage </div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</label>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<div class=\" col-lg-8 col-sm-8 col-xs-8 padding-left-8 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<input type=\"text\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${erayFns:escapeStr(queryQuality.storage.kwh)}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false)); out.write("\" id=\"kwh\" class=\"form-control \" readonly />\r\n"); out.write("\t\t\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t\t<label class=\"col-lg-4 col-sm-4 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-18\">航材类型</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\"> Type</div>\r\n"); out.write("\t\t\t\t\t\t\t\t</label>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\" col-lg-8 col-sm-8 col-xs-8 padding-left-8 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t <select id=\"hclx\" class=\"form-control\" disabled=\"disabled\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t"); if (_jspx_meth_c_005fforEach_005f1(_jspx_page_context)) return; out.write("\r\n"); out.write("\t\t\t\t\t\t\t\t </select>\r\n"); out.write("\t\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"clearfix\">\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t<label class=\"col-lg-4 col-sm-4 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-18\">收货单号</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">Receipt No.</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</label>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<div class=\" col-lg-8 col-sm-8 col-xs-8 padding-left-8 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<input type=\"text\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${erayFns:escapeStr(queryQuality.receiptSheet.shdh)}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false)); out.write("\" id=\"shdh\" class=\"form-control \" readonly />\r\n"); out.write("\t\t\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t\t</div>\t\t\t\t\t\t\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t<label class=\"col-lg-4 col-sm-4 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-18\">发货单位</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">Delivery</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</label>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<div class=\" col-lg-8 col-sm-8 col-xs-8 padding-left-8 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<input type=\"text\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${erayFns:escapeStr(queryQuality.receiptSheet.fhdw)}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false)); out.write("\" id=\"fhdw\" class=\"form-control \" readonly />\r\n"); out.write("\t\t\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t</div>\r\n"); out.write("\t\t\t \r\n"); out.write("\t\t\t </div>\r\n"); out.write("\t\t\t \r\n"); out.write("\t\t\t <div class=\"panel panel-default\">\r\n"); out.write("\t\t\t\t <div class=\"panel-heading\">\r\n"); out.write("\t\t\t\t\t\t <h3 class=\"panel-title\">航材检验 Material Checking</h3>\r\n"); out.write("\t\t\t\t\t </div>\r\n"); out.write("\t\t\t\t<div class=\"panel-body\">\r\n"); out.write("\t\t\t\t <form id=\"form\">\t\t\t \r\n"); out.write("\t\t\t\t\t\t<div class=\"col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t<label class=\"col-lg-4 col-sm-4 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-18\">航材来源</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">Aircraft Source</div>\r\n"); out.write("\t\t\t\t\t\t\t</label>\r\n"); out.write("\t\t\t\t\t\t\t<div id=\"hclyDiv\" class=\"col-lg-8 col-sm-8 col-xs-8 padding-left-8 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t <select id=\"hcly\" class=\"form-control\" name=\"hcly\" >\r\n"); out.write("\t\t\t\t\t\t\t </select>\r\n"); out.write("\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t<div class=\"col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t<label class=\"col-lg-4 col-sm-4 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-18\">货架寿命</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">Shelf-Life</div>\r\n"); out.write("\t\t\t\t\t\t\t</label>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\" col-lg-8 col-sm-8 col-xs-8 padding-left-8 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"text\" id=\"hjsm\" maxlength=\"10\" value=\""); if (_jspx_meth_fmt_005fformatDate_005f0(_jspx_page_context)) return; out.write("\" name=\"hjsm\" class='form-control datepicker' data-date-format=\"yyyy-mm-dd\"/>\r\n"); out.write("\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t<div class=\"col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t<label class=\"col-lg-4 col-sm-4 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-18\">TSN</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">TSN</div>\r\n"); out.write("\t\t\t\t\t\t\t</label>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\" col-lg-8 col-sm-8 col-xs-8 padding-left-8 padding-right-0 \">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"text\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${erayFns:escapeStr(queryQuality.tsn)}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false)); out.write("\" id=\"tsn\" name=\"tsn\" maxlength=\"50\" class=\"form-control \" />\r\n"); out.write("\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t<div class=\"col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t<label class=\"col-lg-4 col-sm-4 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-18\">TSO</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">TSO</div>\r\n"); out.write("\t\t\t\t\t\t\t</label>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\" col-lg-8 col-sm-8 col-xs-8 padding-left-8 padding-right-0 \">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"text\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${erayFns:escapeStr(queryQuality.tso)}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false)); out.write("\" id=\"tso\" name=\"tso\" maxlength=\"50\" class=\"form-control \" />\r\n"); out.write("\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t<div class=\" col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t\t<label class=\"col-lg-4 col-sm-4 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t <div class=\"font-size-12 line-height-18\">制造厂商</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">Manufacturer</div></label>\r\n"); out.write("\t\t\t\t\t\t\t <div class=\"col-lg-8 col-sm-8 col-xs-8 padding-left-8 padding-right-0 \">\r\n"); out.write("\t\t\t\t\t\t\t\t <input type=\"text\" id=\"zzcs\" class=\"form-control\" maxlength=\"16\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${erayFns:escapeStr(queryQuality.zzcs)}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false)); out.write("\" />\r\n"); out.write("\t\t\t\t\t\t\t </div>\r\n"); out.write("\t\t\t\t\t \t</div>\r\n"); out.write("\t\t\t\t\t\t<div class=\"col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t<label class=\"col-lg-4 col-sm-4 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-18\">生产日期</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">Shelf-Life</div>\r\n"); out.write("\t\t\t\t\t\t\t</label>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\" col-lg-8 col-sm-8 col-xs-8 padding-left-8 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"text\" id=\"scrq\" maxlength=\"10\" value=\""); if (_jspx_meth_fmt_005fformatDate_005f1(_jspx_page_context)) return; out.write("\" name=\"scrq\" class='form-control datepicker' data-date-format=\"yyyy-mm-dd\"/>\r\n"); out.write("\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t<div class=\"col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t<label class=\"col-lg-4 col-sm-4 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-18\">GRN</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">GRN</div>\r\n"); out.write("\t\t\t\t\t\t\t</label>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\" col-lg-8 col-sm-8 col-xs-8 padding-left-8 padding-right-0 \">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"text\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${erayFns:escapeStr(queryQuality.grn)}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false)); out.write("\" id=\"grn\" name=\"grn\" maxlength=\"50\" class=\"form-control \" />\r\n"); out.write("\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t<div class=\"col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t<label class=\"col-lg-4 col-sm-4 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-18\">CSN</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">CSN</div>\r\n"); out.write("\t\t\t\t\t\t\t</label>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\" col-lg-8 col-sm-8 col-xs-8 padding-left-8 padding-right-0 \">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"text\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${erayFns:escapeStr(queryQuality.csn)}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false)); out.write("\" id=\"csn\" name=\"csn\" maxlength=\"50\" class=\"form-control \" />\r\n"); out.write("\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t<div class=\"col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t<label class=\"col-lg-4 col-sm-4 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-18\">CSO</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">CSO</div>\r\n"); out.write("\t\t\t\t\t\t\t</label>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\" col-lg-8 col-sm-8 col-xs-8 padding-left-8 padding-right-0 \">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"text\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${erayFns:escapeStr(queryQuality.cso)}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false)); out.write("\" id=\"cso\" name=\"\"cso\"\" maxlength=\"50\" class=\"form-control \" />\r\n"); out.write("\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t <div class=\"col-lg-12 col-sm-12 col-xs-12 padding-left-0 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t<label class=\"col-lg-1 col-sm-2 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-18\">存放要求</div>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">Storage Must</div>\r\n"); out.write("\t\t\t\t\t\t</label>\r\n"); out.write("\t\t\t\t\t\t<div class=\"col-lg-11 col-sm-10 col-xs-8 padding-left-8 padding-right-0 \">\r\n"); out.write("\t\t\t\t\t\t\t<textarea class=\"form-control\" id=\"cfyq\" name=\"cfyq\" maxlength=\"150\" placeholder=\"最大长度不超过150\">"); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${erayFns:escapeStr(queryQuality.cfyq)}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false)); out.write("</textarea>\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t<div class=\"col-lg-12 col-sm-12 col-xs-12 padding-left-0 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t<label class=\"col-lg-1 col-sm-2 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-18\">备注</div>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">Remark</div>\r\n"); out.write("\t\t\t\t\t\t</label>\r\n"); out.write("\t\t\t\t\t\t<div class=\"col-lg-11 col-sm-10 col-xs-8 padding-left-8 padding-right-0 \">\r\n"); out.write("\t\t\t\t\t\t\t<textarea class=\"form-control\" id=\"bz\" name=\"bz\" maxlength=\"300\" placeholder=\"最大长度不超过300\" >"); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${erayFns:escapeStr(queryQuality.bz)}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false)); out.write("</textarea>\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t <div class=\"col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t<label class=\"col-lg-4 col-sm-4 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-18\"><span style=\"color: red\">*</span>检验人</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">Inspection</div>\r\n"); out.write("\t\t\t\t\t\t\t</label>\r\n"); out.write("\t\t\t\t\t\t\t <div class=\" col-lg-8 col-sm-8 col-xs-8 padding-left-8 padding-right-0 input-group\">\r\n"); out.write("\t\t\t\t\t\t\t\t<div class='input-group'>\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"text\" id=\"checker\" disabled=\"disabled\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.jyr.username}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write(' '); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.jyr.realname}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("\" class=\"form-control \" onchange=\"ChangeJyr()\"/>\t\t\t\t\t\t\t \t\r\n"); out.write("\t\t\t\t\t\t\t \t<input type=\"hidden\" class=\"form-control\" id=\"jyrid\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.jyrid}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("\" name=\"jyrid\"/>\r\n"); out.write("\t\t\t\t\t\t\t \t<input type=\"hidden\" class=\"form-control\" id=\"dlrname\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${sessionScope.user.username}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write(' '); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${sessionScope.user.realname}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("\" />\t\t\t\t\t\t\t \t\t\t\t\t\t\r\n"); out.write("\t\t\t\t\t\t\t\t\t<span class='input-group-btn'>\r\n"); out.write("\t\t\t\t\t\t\t\t\t <button onclick='openUserList()' type=\"button\" class='btn btn-primary'><i class='icon-search'></i>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</button></span>\r\n"); out.write("\t\t\t\t\t\t\t </div>\r\n"); out.write("\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t\t \r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t<div class=\"col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t<label class=\"col-lg-4 col-sm-4 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-18\"><span style=\"color: red\">*</span>检验日期</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">Date</div>\r\n"); out.write("\t\t\t\t\t\t\t</label>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\" col-lg-8 col-sm-8 col-xs-8 padding-left-8 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"text\" class='form-control datepicker' maxlength=\"10\" id=\"jyrq\" value=\""); if (_jspx_meth_fmt_005fformatDate_005f2(_jspx_page_context)) return; out.write("\" data-date-format=\"yyyy-mm-dd\" \r\n"); out.write("\t\t\t \t\t placeholder=\"请选择日期\" />\r\n"); out.write("\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t<div class=\"col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t<label class=\"col-lg-4 col-sm-4 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-18\"><span style=\"color: red\">*</span>可用数</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">Available No.</div>\r\n"); out.write("\t\t\t\t\t\t\t</label>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\" col-lg-8 col-sm-8 col-xs-8 padding-left-8 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"text\" id=\"kysl\" class='form-control' value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.kysl}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("\" name=\"kysl\" />\r\n"); out.write("\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t<div class=\"col-lg-3 col-sm-6 col-xs-12 padding-left-0 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t<label class=\"col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-18\"><span style=\"color: red\">*</span>检验结果</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">Result</div>\r\n"); out.write("\t\t\t\t\t\t\t</label>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\" col-xs-8 padding-left-8 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t<select class='form-control' id='jyjg' >\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<option value=\"1\" "); if (_jspx_meth_c_005fif_005f2(_jspx_page_context)) return; out.write(" >合格Qualified</option>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<option value=\"2\" "); if (_jspx_meth_c_005fif_005f3(_jspx_page_context)) return; out.write(" >不合格Unqualified</option>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<option value=\"3\" "); if (_jspx_meth_c_005fif_005f4(_jspx_page_context)) return; out.write(" >让步接收Compromise</option>\r\n"); out.write("\t\t\t\t\t\t\t\t </select>\r\n"); out.write("\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t<div class=\"col-lg-12 col-sm-12 col-xs-12 padding-left-0 padding-right-0 form-group\" >\r\n"); out.write("\t\t\t\t\t\t\t<label class=\"col-lg-1 col-sm-2 col-xs-4 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-18\"><span style=\"color:red\">*</span>结果说明</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">Checked desc</div>\r\n"); out.write("\t\t\t\t\t\t\t</label>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"col-lg-11 col-sm-10 col-xs-8 padding-left-8 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t<textarea class=\"form-control\" id=\"jgsm\" name=\"jgsm\" maxlength=\"30\">"); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${erayFns:escapeStr(queryQuality.jgsm)}", java.lang.String.class, (PageContext)_jspx_page_context, _jspx_fnmap_0, false)); out.write("</textarea>\r\n"); out.write("\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t </div>\r\n"); out.write("\t\t\t\t\t </form>\r\n"); out.write("\t\t\t\t\t</div>\t\r\n"); out.write("\t\t\t\t</div> \r\n"); out.write("\t\t\t\t\r\n"); out.write("\t\t\t\t"); out.write("\r\n"); out.write("<!-- 适用维修项目 Maintenance Item -->\r\n"); out.write("<div class=\"panel panel-default\" id=\"maintenance_project_view\">\r\n"); out.write(" <div class=\"panel-heading\">\r\n"); out.write(" \t\t<h3 class=\"panel-title\">适用维修项目 Maintenance Item</h3>\r\n"); out.write(" </div>\r\n"); out.write("\t<div class=\"panel-body\">\t\r\n"); out.write(" \t<div class=\"col-lg-12 col-sm-12 col-xs-12 padding-left-0 padding-right-0\" style=\"overflow: auto;\" >\r\n"); out.write("\t\t\t<table class=\"table table-thin table-bordered table-set\" >\r\n"); out.write("\t\t\t\t<thead>\r\n"); out.write("\t\t\t\t\t<tr>\r\n"); out.write("\t\t\t\t\t\t<th class=\"colwidth-10\">\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-12\">任务号</div>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-12\">Task No.</div>\r\n"); out.write("\t\t\t\t\t\t</th>\r\n"); out.write("\t\t\t\t\t\t<th class=\"colwidth-5\">\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-12\">版本</div>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-12\">Rev.</div>\r\n"); out.write("\t\t\t\t\t\t</th>\r\n"); out.write("\t\t\t\t\t\t<th class=\"colwidth-25\">\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-12\">任务描述</div>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-12\">Task Description</div>\r\n"); out.write("\t\t\t\t\t\t</th>\r\n"); out.write("\t\t\t\t\t\t<th class=\"colwidth-9\">\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-12\">监控项目</div>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-12\">Monitor Item</div>\r\n"); out.write("\t\t\t\t\t\t</th>\r\n"); out.write("\t\t\t\t\t\t<th class=\"colwidth-9\">\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-12\">首检</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-12\">INTI</div>\t\r\n"); out.write("\t\t\t\t\t\t</th>\r\n"); out.write("\t\t\t\t\t\t<th class=\"colwidth-7\">\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-12\">周期</div>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-12\">Cycle</div>\r\n"); out.write("\t\t\t\t\t\t</th>\r\n"); out.write("\t\t\t\t\t\t<th class=\"colwidth-11\">\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-12\">容差(-/+)</div>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-12\">Tolerance(-/+)</div>\r\n"); out.write("\t\t\t\t\t\t</th>\r\n"); out.write("\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t</thead>\r\n"); out.write("\t\t\t\t<tbody id=\"common_maintenance_list\">\r\n"); out.write("\t\t\t\t\t<tr><td class=\"text-center\" colspan=\"7\">暂无数据 No data.</td></tr>\r\n"); out.write("\t\t\t\t</tbody>\r\n"); out.write("\t\t\t</table>\r\n"); out.write("\t\t\t<input id=\"common_skbs\" type=\"hidden\">\r\n"); out.write("\t\t\t<input id=\"common_ssbs\" type=\"hidden\">\r\n"); out.write("\t\t</div>\r\n"); out.write("\t</div>\t\r\n"); out.write("</div>\t\r\n"); out.write("<script type=\"text/javascript\" src=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${ctx}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("/static/js/thjw/quality/testing/maintenance_project_view.js\"></script><!--当前js -->\r\n"); out.write("<script type=\"text/javascript\" src=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${ctx }", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("/static/js/thjw/common/monitor/monitor_unit.js\"></script>\r\n"); out.write("<!-- 适用维修项目 Maintenance Item -->\r\n"); out.write("\t\t\t\t\r\n"); out.write("\t\t\t \t<div class=\"panel panel-default\">\r\n"); out.write("\t\t\t <div class=\"panel-heading\">\r\n"); out.write("\t\t\t\t\t <h3 class=\"panel-title\">证书信息 Certificate Info</h3>\r\n"); out.write("\t\t\t\t </div>\r\n"); out.write("\t\t\t\t\t<div class=\"panel-body\">\t\r\n"); out.write("\t\t\t\t \t<div class=\"col-lg-12 col-sm-12 col-xs-12 padding-left-0 padding-right-0\" style=\"overflow: auto;\" >\r\n"); out.write("\t\t\t\t\t\t\t<table class=\"table table-thin table-bordered table-striped table-hover table-set\" name=\"installationlist_certificate_table\">\r\n"); out.write("\t\t\t\t\t\t\t\t<thead>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<th class=\"colwidth-7\" name=\"common_certificate_addTh\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t\t<button class=\"line6 line6-btn\" name=\"common_certificate_addBtn\" type=\"button\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t\t\t<i class=\"icon-plus cursor-pointer color-blue cursor-pointer\"></i>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t\t</button>\r\n"); out.write("\t\t\t\t\t\t\t\t\t </th>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<th class=\"colwidth-20\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t <div class=\"font-size-12 line-height-12\">证书类型</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t <div class=\"font-size-9 line-height-12\">Certificate Type</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t</th>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<th class=\"colwidth-10\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t <div class=\"font-size-12 line-height-12\">证书编号</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t <div class=\"font-size-9 line-height-12\">Certificate No.</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t</th>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<th class=\"colwidth-10\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t <div class=\"font-size-12 line-height-12\">存放位置</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t <div class=\"font-size-9 line-height-12\">Certificate Location</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t</th>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<th class=\"colwidth-10\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t <div class=\"font-size-12 line-height-12\">签署日期</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t <div class=\"font-size-9 line-height-12\">Sign Date</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t</th>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<th class=\"colwidth-7\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t <div class=\"font-size-12 line-height-12\">附件</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t <div class=\"font-size-9 line-height-12\">Attachment</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t</th>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t\t</thead>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t\r\n"); out.write("\t\t\t\t\t\t\t\t<tbody id=\"replace_certificate_list\"><tr><td class=\"text-center\" colspan=\"6\">暂无数据 No data.</td></tr></tbody>\r\n"); out.write("\t\t\t\t\t\t\t</table>\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t</div>\t\r\n"); out.write("\t\t\t\t</div>\t\r\n"); out.write("\t\t \r\n"); out.write("\t\t\t <div class=\"panel panel-default\">\r\n"); out.write("\t\t\t <div class=\"panel-heading\">\r\n"); out.write("\t\t\t\t\t <h3 class=\"panel-title\">检验附件 Attachments Files</h3>\r\n"); out.write("\t\t\t\t </div>\r\n"); out.write("\t\t\t\t<div class=\"panel-body\">\t\r\n"); out.write("\t\t\t\t <div class=\" col-lg-4 col-sm-6 col-xs-8 padding-left-0 padding-right-0 margin-bottom-10 form-group\" >\r\n"); out.write("\t\t\t\t\t\t<label class=\"col-lg-3 col-sm-4 col-xs-6 text-right padding-left-0 padding-right-0\"><div\r\n"); out.write("\t\t\t\t\t\t\t\tclass=\"font-size-12 line-height-18\"><span style=\"color: red\"></span>文件说明</div>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">File desc</div></label>\r\n"); out.write("\t\t\t\t\t\t <div class=\"col-lg-9 col-sm-8 col-xs-6 padding-left-8 padding-right-0\" >\r\n"); out.write("\t\t\t\t\t\t\t<input type=\"text\" id=\"wbwjm\" name=\"wbwjm\" maxlength=\"90\" class=\"form-control \" >\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t <div class=\" col-lg-4 col-sm-1 col-xs-4 padding-left-0 padding-right-0 margin-bottom-10 form-group\" >\r\n"); out.write("\t\t\t\t\t\t<div id=\"fileuploader\" class=\"col-lg-2 col-sm-2 col-xs-12 \" style=\"margin-left: 5px ;padding-left: 0\"></div>\r\n"); out.write("\t\t\t\t\t</div> \r\n"); out.write("\t\t\t\t <div class=\"col-lg-12 col-sm-12 col-xs-12 padding-left-0 padding-right-0\" style=\"overflow: auto;\" >\r\n"); out.write("\t\t\t\t\t\t<table class=\"table table-thin table-bordered table-striped table-hover text-center\" style=\"min-width:900px\">\r\n"); out.write("\t\t\t\t\t\t\t<thead>\r\n"); out.write("\t\t\t\t\t\t\t\t<tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<th style=\"width:110px;\"><div class=\"font-size-12 line-height-18 \" >操作</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">Operation</div></th>\r\n"); out.write("\t\t\t\t\t\t\t\t <th>\r\n"); out.write("\t\t\t\t\t\t\t\t <div class=\"font-size-12 line-height-18\">文件说明</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">File desc</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</th>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<th>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-18\">文件大小</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">File size</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</th>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<th><div class=\"font-size-12 line-height-18\">上传人</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">Operator</div></th>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<th><div class=\"font-size-12 line-height-18\">上传时间</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-18\">Operate Time</div></th>\t\t\t\t\t\r\n"); out.write("\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t</thead>\r\n"); out.write("\t\t\t\t\t\t\t <tbody id=\"filelist\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t \r\n"); out.write("\t\t\t\t\t\t\t\t</tbody>\r\n"); out.write("\t\t\t\t\t\t</table>\r\n"); out.write("\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t</div>\t\r\n"); out.write("\t\t\t</div>\t\r\n"); out.write("\t\t\t\t\r\n"); out.write("\t\t\t\t<div class=\"text-right\" style=\"margin-top: 10px;margin-bottom: 0px;\">\r\n"); out.write(" <button type=\"button\" class=\"btn btn-primary padding-top-1 padding-bottom-1\" onclick=\"checkSave()\">\r\n"); out.write(" \t<div class=\"font-size-12\">保存</div>\r\n"); out.write("\t\t\t\t\t\t<div class=\"font-size-9\">Save</div></button>\r\n"); out.write("\t\t\t\t\t\t\r\n"); out.write("\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-primary padding-top-1 padding-bottom-1\" onclick=\"submitSave()\">\r\n"); out.write(" \t<div class=\"font-size-12\">提交</div>\r\n"); out.write("\t\t\t\t\t\t<div class=\"font-size-9\">Submit</div></button>\r\n"); out.write("\t\t\t\t\t\t\r\n"); out.write("\t\t\t\t\t<button type=\"button\" class=\"btn btn-primary padding-top-1 padding-bottom-1\" onclick=\"back();\">\r\n"); out.write(" \t<div class=\"font-size-12\">返回</div>\r\n"); out.write("\t\t\t\t\t<div class=\"font-size-9\">Back</div></button>\r\n"); out.write(" </div>\r\n"); out.write("\t\t\t\t</div>\r\n"); out.write("\t\t\t</div>\r\n"); out.write("\t\t</div>\r\n"); out.write("\t\t</div>\r\n"); out.write("\t\t</div>\r\n"); out.write("\t\t\t\r\n"); out.write("<!-- 基本信息 End -->\r\n"); out.write("\t"); out.write("\r\n"); out.write("<script type=\"text/javascript\" src=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${ctx}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("/static/js/thjw/open_win/user.js\"></script>\r\n"); out.write("<div class=\"modal modal-new\" id=\"userModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\" aria-hidden=\"true\">\r\n"); out.write("\t<div class=\"modal-dialog\">\r\n"); out.write("\t\t<div class=\"modal-content\">\r\n"); out.write("\t\t <div class=\"modal-header modal-header-new\">\r\n"); out.write("\t\t\t\t<h4 class=\"modal-title\" >\r\n"); out.write(" \t<div class='pull-left'>\r\n"); out.write(" \t\t<div class=\"font-size-12\" >用户列表</div>\r\n"); out.write("\t\t\t\t\t<div class=\"font-size-9\" >User List</div>\r\n"); out.write("\t\t \t\t</div>\r\n"); out.write("\t\t \t\t<div class='pull-right' >\r\n"); out.write("\t\t\t\t \t<button type=\"button\" class=\"icon-remove modal-close\" data-dismiss=\"modal\" aria-label=\"Close\"></button>\r\n"); out.write("\t\t\t\t</div>\r\n"); out.write("\t\t \t\t<div class='clearfix'></div>\r\n"); out.write(" \t</h4>\r\n"); out.write("\t\t\t</div>\r\n"); out.write("\t\t\t<div class=\"modal-body padding-bottom-0\" id=\"alertModalUserBody\">\r\n"); out.write("\t\t\t <div class=\"input-group-border\" style='margin-top:8px;padding-top:5px;margin-bottom:8px;'>\r\n"); out.write(" <div class=\"col-xs-12 padding-left-0 padding-leftright-8 margin-top-0 modalSearch\">\t\r\n"); out.write("\t\t\t\t\t\t\t<div class=\" pull-right padding-left-0 padding-right-0 margin-top-10\">\r\n"); out.write("\t\t\t\t\t\t\t<div class=\" pull-left padding-left-0 padding-right-0\" style=\"width: 250px;\">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"text\" placeholder='用户名称' id=\"u_realname_search1\" class=\"form-control \">\r\n"); out.write("\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t <div class=\" pull-right padding-left-5 padding-right-0 \"> \r\n"); out.write("\t\t\t\t\t\t\t\t<button name=\"keyCodeSearch\" type=\"button\" class=\" btn btn-primary padding-top-1 padding-bottom-1 \" onclick=\"userModal.search()\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t<div class=\"font-size-12\">搜索</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<div class=\"font-size-9\">Search</div>\r\n"); out.write("\t\t \t\t</button>\r\n"); out.write("\t\t\t </div> \r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t \t\r\n"); out.write("\t\t \t\t<div class=\"clearfix\"></div>\r\n"); out.write("\t\t \t\t<div class=\"margin-top-10 padding-leftright-8 \">\r\n"); out.write("\t\t\t\t\t\t<div class=\"overflow-auto\">\r\n"); out.write("\t\t\t\t\t\t\t<table class=\"table table-bordered table-striped table-hover text-center table-set\" style=\"\">\r\n"); out.write("\t\t\t\t\t\t\t\t<thead>\r\n"); out.write("\t\t\t\t\t\t\t \t\t<tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<th width=\"50px\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-12 notwrap\">选择</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-9 notwrap\">Choice</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t</th>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<th>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t\t<div class=\"important\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-12 notwrap\">用户名称</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-9 notwrap\">User Name</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t</th>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<th>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-12 notwrap\">机构部门</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-9 notwrap\">Department</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t</th>\r\n"); out.write("\t\t\t\t\t\t\t \t\t </tr>\r\n"); out.write("\t\t\t\t\t\t\t\t</thead>\r\n"); out.write("\t\t\t\t\t\t\t\t<tbody id=\"userlist1\">\r\n"); out.write("\t\t\t\t\t\t\t\t\r\n"); out.write("\t\t\t\t\t\t\t\t</tbody>\r\n"); out.write("\t\t\t\t\t\t\t</table>\r\n"); out.write("\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"col-xs-12 text-center page-height padding-right-0 padding-left-0\" id=\"user_pagination\"></div>\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t <div class='clearfix'></div>\r\n"); out.write("\t\t\t </div>\r\n"); out.write("\t\t\t <div class='clearfix'></div>\r\n"); out.write("\t\t\t</div>\r\n"); out.write("\t\t\t<div class=\"modal-footer\">\r\n"); out.write("\t \t<div class=\"col-xs-12 padding-leftright-8\" >\r\n"); out.write("\t\t\t\t\t<div class=\"input-group\">\r\n"); out.write("\t\t\t\t\t\t<span class=\"input-group-addon modalfootertip\" >\r\n"); out.write("\t\t\t\t\t\t\t<!-- <i class='glyphicon glyphicon-info-sign alert-info'></i><p class=\"alert-info-message\"></p> -->\r\n"); out.write("\t\t\t\t\t\t</span>\r\n"); out.write("\t <span class=\"input-group-addon modalfooterbtn\">\r\n"); out.write("\t\t <button type=\"button\" onclick=\"userModal.setUser()\"\r\n"); out.write("\t\t\t\t\t\t\t\t\tclass=\"btn btn-primary padding-top-1 padding-bottom-1\"\r\n"); out.write("\t\t\t\t\t\t\t\t\tdata-dismiss=\"modal\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t<div class=\"font-size-12\">确定</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<div class=\"font-size-9\">Confirm</div>\r\n"); out.write("\t\t\t\t\t\t\t\t</button>\r\n"); out.write("\t\t\t\t\t\t\t\t<button type=\"button\" onclick=\"userModal.clearUser()\" id=\"userModal_btn_clear\"\r\n"); out.write("\t\t\t\t\t\t\t\t\t\tclass=\"btn btn-primary padding-top-1 padding-bottom-1\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-12\">清空</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-9\">Clear</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</button>\r\n"); out.write("\t\t\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-primary padding-top-1 padding-bottom-1\" data-dismiss=\"modal\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t<div class=\"font-size-12\">关闭</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<div class=\"font-size-9\">Close</div>\r\n"); out.write("\t\t\t\t\t\t\t\t</button>\r\n"); out.write("\t </span>\r\n"); out.write("\t \t</div>\r\n"); out.write("\t\t\t\t</div>\r\n"); out.write("\t\t\t</div>\r\n"); out.write("\t\t</div>\r\n"); out.write("\t</div>\r\n"); out.write("</div>\r\n"); out.write("\r\n"); out.write("\t<script src=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${ctx}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("/static/js/thjw/common/preview.js\"></script>\r\n"); out.write("<link href=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${ctx }", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("/static//js/tool/jquery-upload-file-master/css/uploadfile.css\" rel=\"stylesheet\">\r\n"); out.write("<script src=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${ctx }", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("/static//js/tool/jquery-upload-file-master/jquery.uploadfile.min.js\"></script>\t \t\r\n"); out.write("<script type=\"text/javascript\" src=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${ctx}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("/static/js/thjw/material/inspection/inspection_edit.js\"></script>\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("<div class=\"modal fade modal-new\" id=\"installation_certificate_modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"installation_certificate_modal\" aria-hidden=\"true\" data-backdrop='static' data-keyboard= false>\r\n"); out.write("\t<div class=\"modal-dialog\" style=\"width:60%\">\r\n"); out.write("\t\t\t<div class=\"modal-content\">\t\r\n"); out.write("\t\t\t\t<div class=\"modal-header modal-header-new\" >\r\n"); out.write(" \t<h4 class=\"modal-title\" >\r\n"); out.write(" \t<div class='pull-left'>\r\n"); out.write("\t <div class=\"font-size-14\">证书信息</div>\r\n"); out.write("\t\t\t\t\t\t<div class=\"font-size-12\">Certificate Info</div>\r\n"); out.write("\t\t\t\t \t</div>\r\n"); out.write("\t\t\t\t \t<div class='pull-right'>\r\n"); out.write("\t\t\t\t \t\t<button type=\"button\" class=\"icon-remove modal-close\" data-dismiss=\"modal\" aria-label=\"Close\"></button>\r\n"); out.write("\t\t\t\t \t</div>\r\n"); out.write("\t\t\t\t \t<div class='clearfix'></div>\r\n"); out.write(" \t</h4>\r\n"); out.write(" </div>\r\n"); out.write("\t\t\t<div class=\"modal-body padding-bottom-0\">\r\n"); out.write("\t\t\t\t<div class=\"col-xs-12 margin-top-8\">\r\n"); out.write("\t\t\t\t\t<input type=\"hidden\" id=\"certificate_modal_rowid\"/>\r\n"); out.write("\t\t\t\t\t<div class=\"input-group-border\" style=\"padding-top: 15px;padding-bottom: 5px;\">\r\n"); out.write("\t\t\t\t\t\t<div class=\"col-lg-6 col-sm-6 col-xs-12 padding-left-0 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t<label class=\"col-lg-2 col-sm-2 col-xs-2 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-12 margin-topnew-2\">证书类型</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9\">Certificate Type</div>\r\n"); out.write("\t\t\t\t\t\t\t</label>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"col-lg-10 col-sm-10 col-xs-10 padding-leftright-8\">\r\n"); out.write("\t\t\t\t\t\t\t\t<select class=\"form-control\" id=\"certificate_modal_zjlx\">\r\n"); out.write("\t\t\t\t\t\t\t\t</select>\r\n"); out.write("\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t<div class=\"col-lg-6 col-sm-6 col-xs-12 padding-left-0 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t<label class=\"col-lg-2 col-sm-2 col-xs-2 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-12 margin-topnew-2\">证书编号</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9\">Certificate No.</div>\r\n"); out.write("\t\t\t\t\t\t\t</label>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"col-lg-10 col-sm-10 col-xs-10 padding-leftright-8\">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" id=\"certificate_modal_zsbh\" maxlength=\"50\"/>\r\n"); out.write("\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t<div class=\"col-lg-6 col-sm-6 col-xs-12 padding-left-0 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t<label class=\"col-lg-2 col-sm-2 col-xs-2 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-12 margin-topnew-2\">存放位置</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9\">Location</div>\r\n"); out.write("\t\t\t\t\t\t\t</label>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"col-lg-10 col-sm-10 col-xs-10 padding-leftright-8\">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" id=\"certificate_modal_zscfwz\" maxlength=\"100\"/>\r\n"); out.write("\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t<div class=\"col-lg-6 col-sm-6 col-xs-12 padding-left-0 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t\t<label class=\"col-lg-2 col-sm-2 col-xs-2 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-12 margin-topnew-2\">签署日期</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9\">Sign Date</div>\r\n"); out.write("\t\t\t\t\t\t\t</label>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"col-lg-10 col-sm-10 col-xs-10 padding-leftright-8\">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control date-picker\" maxlength=\"10\" data-date-format=\"yyyy-mm-dd\" id=\"certificate_modal_qsrq\"/>\r\n"); out.write("\t\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\t\r\n"); out.write("\t\t\t\t\t\t<div class=\"clearfix\"></div>\r\n"); out.write("\t\t\t\t\t\t\r\n"); out.write("\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\r\n"); out.write("\t\t\t\t\t<div id=\"attachments_list_edit\">\r\n"); out.write("\t\t\t\t\t\t"); out.write("\r\n"); out.write("\t\r\n"); out.write("\t\t<div id=\"attach_div\" class=\"panel panel-primary\">\r\n"); out.write("\t\t\t<div id=\"attachHead\" class=\"panel-heading bg-panel-heading\" >\r\n"); out.write("\t\t\t\t<div class=\"font-size-12\" id=\"chinaHead\">附件</div>\r\n"); out.write("\t\t\t\t<div class=\"font-size-9\" id=\"englishHead\">Attachments</div>\r\n"); out.write("\t\t\t</div>\r\n"); out.write("\t\t\t<div class=\"panel-body padding-left-8 padding-right-8\" style='padding-bottom:0px;'>\r\n"); out.write("\t\t\t\r\n"); out.write("\t\t\t\t<!-- <div id=\"fileHead\" class=\"col-lg-12 col-md-12 col-sm-12 col-xs-12 padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\r\n"); out.write("\t\t\t\t\t<div class=\"col-lg-6 col-md-12 col-sm-12 col-xs-12 padding-left-0 padding-right-0 form-group\">\r\n"); out.write("\t\t\t\t\t\t<span class=\"col-lg-2 col-md-1 col-sm-2 col-xs-3 text-right padding-left-0 padding-right-0\">\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"font-size-12 margin-topnew-2\" id=\"chinaFileHead\">文件说明</div>\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"font-size-9\" id=\"englishFileHead\">File desc</div>\r\n"); out.write("\t\t\t\t\t\t</span>\r\n"); out.write("\t\t\t\t\t\t<div class=\"col-lg-10 col-md-11 col-sm-10 col-xs-9 padding-leftright-8\">\r\n"); out.write("\t\t\t\t\t\t\t<div class=\"input-group\">\r\n"); out.write("\t\t\t\t\t\t\t\t<input type=\"text\" id=\"wbwjm\" name=\"wbwjm\" maxlength=\"100\" class=\"form-control \" >\r\n"); out.write("\t\t\t\t\t\t\t <span class=\"input-group-btn\" >\r\n"); out.write("\t\t\t\t\t\t\t \t<div id=\"fileuploader\" ></div>\r\n"); out.write("\t\t\t\t\t\t\t </span>\r\n"); out.write("\t\t \t</div>\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t\r\n"); out.write("\t\t\t\t\r\n"); out.write("\t\t\t\t</div> -->\r\n"); out.write("\t\t\t\t<div class=\"col-lg-12 col-md-12 col-sm-12 col-xs-12 padding-left-0 padding-right-0\" >\r\n"); out.write("\t\t\t\t\t<span id=\"left_column\" class=\"col-lg-1 col-md-1 col-sm-2 col-xs-3 text-right padding-left-0 padding-right-8\">\r\n"); out.write("\t\t\t\t\t\t<div class=\"font-size-12 margin-topnew-2\">附件列表</div>\r\n"); out.write("\t\t\t\t\t\t<div class=\"font-size-9\">File List</div>\r\n"); out.write("\t\t\t\t\t</span>\r\n"); out.write("\t\t\t\t\t<div id=\"right_column\" class=\"col-lg-11 col-md-11 col-sm-10 col-xs-9 padding-left-0 padding-right-0\" style=\"overflow-x: auto;\">\r\n"); out.write("\t\t\t\t\t\t<table class=\"table table-thin table-bordered table-striped table-hover text-center table-set\" style=\"min-width:600px\">\r\n"); out.write("\t\t\t\t\t\t\t<thead>\r\n"); out.write("\t\t\t\t\t\t\t\t<tr>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<th id=\"colOptionhead\" style=\"width: 45px;\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div id=\"fileuploader\" ></div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</th>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<th class=\"colwidth-3\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-12\">序号</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-12\">No.</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</th>\r\n"); out.write("\t\t\t\t\t\t\t\t \t<th>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-12\" id=\"chinaColFileTitle\">文件说明</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-12\" id=\"englishColFileTitle\">File desc</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</th>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<th class=\"colwidth-13\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-12\">文件大小</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-12\">File size</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</th>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<th class=\"colwidth-15\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-12\">上传人</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-12\">Operator</div></th>\r\n"); out.write("\t\t\t\t\t\t\t\t\t<th class=\"colwidth-15\">\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-12 line-height-12\">上传时间</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t<div class=\"font-size-9 line-height-12\">Operate Time</div>\r\n"); out.write("\t\t\t\t\t\t\t\t\t</th>\t\t\t\r\n"); out.write("\t\t\t\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t\t\t\t</thead>\r\n"); out.write("\t\t\t\t\t\t <tbody id=\"attachments_list_tbody\">\r\n"); out.write("\t\t\t\t\t\t\t\t \r\n"); out.write("\t\t\t\t\t\t\t</tbody>\r\n"); out.write("\t\t\t\t\t\t</table>\r\n"); out.write("\t\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t\r\n"); out.write("\t\t\t\t<div class=\"clearfix\"></div>\r\n"); out.write("\t\t\t</div>\r\n"); out.write("\t\t</div>\r\n"); out.write("\t\t<div class='clearfix'></div>\r\n"); out.write("<script type=\"text/javascript\" src=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${ctx}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("/static/js/thjw/common/attachments/attachments_list_edit_common.js\"></script>\r\n"); out.write("<script src=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${ctx}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("/static/js/thjw/common/preview.js\"></script>\r\n"); out.write("<!-- 加载附件信息 -->\r\n"); out.write("\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t \t<div class=\"clearfix\"></div>\r\n"); out.write("\t\t\t\t</div>\r\n"); out.write("\t\t\t</div>\r\n"); out.write("\t\t\t\r\n"); out.write("\t\t\t<div class=\"clearfix\"></div>\r\n"); out.write("\t\t\t<div class=\"modal-footer\">\r\n"); out.write("\t\t\t\t<div class=\"col-xs-12 padding-leftright-8\" >\r\n"); out.write("\t\t\t\t\t<div class=\"input-group\">\r\n"); out.write("\t\t\t\t\t\t<span class=\"input-group-addon modalfootertip\" >\r\n"); out.write("\t\t\t <i class='glyphicon glyphicon-info-sign alert-info'></i><p class=\"alert-info-message\"></p>\r\n"); out.write("\t\t\t\t\t\t</span>\r\n"); out.write("\t\t\t\t\t\t<span class=\"input-group-addon modalfooterbtn\">\r\n"); out.write("\t\t\t\t\t\t\t<button id=\"common_certificate_saveBtn\" class=\"btn btn-primary padding-top-1 padding-bottom-1\">\r\n"); out.write("\t\t\t \t<div class=\"font-size-12\">保存</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9\">Save</div>\r\n"); out.write("\t\t\t\t\t\t\t</button>\r\n"); out.write("\t\t\t \t<button type=\"button\" class=\"btn btn-primary padding-top-1 padding-bottom-1\" data-dismiss=\"modal\">\r\n"); out.write("\t\t\t \t\t<div class=\"font-size-12\">关闭</div>\r\n"); out.write("\t\t\t\t\t\t\t\t<div class=\"font-size-9\">Close</div>\r\n"); out.write("\t\t\t\t\t\t\t</button>\r\n"); out.write("\t\t\t\t\t\t</span>\r\n"); out.write("\t\t\t\t\t</div>\r\n"); out.write("\t\t\t\t</div>\r\n"); out.write("\t\t\t</div>\r\n"); out.write("\t\t</div>\r\n"); out.write("\t</div>\r\n"); out.write("</div>\r\n"); out.write("\t\r\n"); out.write("<script type=\"text/javascript\" src=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${ctx}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("/static/js/thjw/produce/installationlist/installationlist_certificate.js\"></script>"); out.write("\r\n"); out.write("<script type=\"text/javascript\" src=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${ctx}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("/static/js/Math.uuid.js\"></script>\r\n"); out.write("\r\n"); out.write("<div id=\"history_attach_alert_Modal\" style='display: none;padding:0px;'>\r\n"); out.write("\t<!-- 表格 -->\r\n"); out.write("\t<div class=\"col-lg-12 col-md-12 padding-left-0 padding-right-0 padding-bottom-0 padding-top-0\" style=\"overflow-x: auto;margin:0px;width:100%;\">\r\n"); out.write("\t\t\t<table class=\"table-thin table-set text-left webui-popover-table\" style='border:0px;margin-bottom:0px !important;' width='100%'>\r\n"); out.write("\t\t\t\t<thead>\r\n"); out.write("\t\t\t\t\t<tr style='height:35px;'>\r\n"); out.write("\t\t\t\t\t\t<th width='30%'>\r\n"); out.write("\t\t\t\t\t\t <div class=\"font-size-12\" style=\"line-height: 14px;\">附件类型</div>\r\n"); out.write("\t\t\t\t <div class=\"font-size-9\" style=\"line-height: 14px;\">Type</div>\r\n"); out.write("\t\t\t\t\t \t</th>\r\n"); out.write("\t\t\t\t\t \t<th width='70%'>\r\n"); out.write("\t\t\t\t\t\t <div class=\"font-size-12\" style=\"line-height: 14px;\">文件</div>\r\n"); out.write("\t\t\t\t <div class=\"font-size-9\" style=\"line-height: 14px;\">File</div>\r\n"); out.write("\t\t\t\t\t \t</th>\r\n"); out.write("\t\t\t\t\t</tr>\r\n"); out.write("\t\t\t\t</thead>\r\n"); out.write("\t\t\t\t<tbody id=\"history_list\">\r\n"); out.write("\t\t\t\t</tbody>\r\n"); out.write("\t\t</table>\r\n"); out.write("\t</div>\r\n"); out.write("\t<div class='clearfix'></div>\r\n"); out.write("</div>\r\n"); out.write("<!-- 弹出框结束-->\r\n"); out.write("<script type=\"text/javascript\" src=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${ctx}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("/static/js/thjw/open_win/history_attach_win.js\"></script>\r\n"); out.write("<script src=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${ctx}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("/static/js/thjw/common/preview.js\"></script>"); out.write("<!------附件对话框 -------->\r\n"); out.write("<script type=\"text/javascript\" src=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${ctx}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("/static/js/thjw/common/webuiPopoverUtil.js\"></script><!-- 控件对话框 -->\r\n"); out.write("</body>\r\n"); out.write("</html>"); } catch (Throwable t) { if (!(t instanceof SkipPageException)){ out = _jspx_out; if (out != null && out.getBufferSize() != 0) try { out.clearBuffer(); } catch (java.io.IOException e) {} if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } } private boolean _jspx_meth_c_005fset_005f0(PageContext _jspx_page_context) throws Throwable { PageContext pageContext = _jspx_page_context; JspWriter out = _jspx_page_context.getOut(); // c:set org.apache.taglibs.standard.tag.rt.core.SetTag _jspx_th_c_005fset_005f0 = (org.apache.taglibs.standard.tag.rt.core.SetTag) _005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fnobody.get(org.apache.taglibs.standard.tag.rt.core.SetTag.class); _jspx_th_c_005fset_005f0.setPageContext(_jspx_page_context); _jspx_th_c_005fset_005f0.setParent(null); // /WEB-INF/views/common_new.jsp(12,0) name = var type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_c_005fset_005f0.setVar("ctx"); // /WEB-INF/views/common_new.jsp(12,0) name = value type = javax.el.ValueExpression reqTime = true required = false fragment = false deferredValue = true expectedTypeName = java.lang.Object deferredMethod = false methodSignature = null _jspx_th_c_005fset_005f0.setValue(new org.apache.jasper.el.JspValueExpression("/WEB-INF/views/common_new.jsp(12,0) '${pageContext.request.contextPath}'",_el_expressionfactory.createValueExpression(_jspx_page_context.getELContext(),"${pageContext.request.contextPath}",java.lang.Object.class)).getValue(_jspx_page_context.getELContext())); int _jspx_eval_c_005fset_005f0 = _jspx_th_c_005fset_005f0.doStartTag(); if (_jspx_th_c_005fset_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fnobody.reuse(_jspx_th_c_005fset_005f0); return true; } _005fjspx_005ftagPool_005fc_005fset_0026_005fvar_005fvalue_005fnobody.reuse(_jspx_th_c_005fset_005f0); return false; } private boolean _jspx_meth_c_005fforEach_005f0(PageContext _jspx_page_context) throws Throwable { PageContext pageContext = _jspx_page_context; JspWriter out = _jspx_page_context.getOut(); // c:forEach org.apache.taglibs.standard.tag.rt.core.ForEachTag _jspx_th_c_005fforEach_005f0 = (org.apache.taglibs.standard.tag.rt.core.ForEachTag) _005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems.get(org.apache.taglibs.standard.tag.rt.core.ForEachTag.class); _jspx_th_c_005fforEach_005f0.setPageContext(_jspx_page_context); _jspx_th_c_005fforEach_005f0.setParent(null); // /WEB-INF/views/material/inspection/inspection_edit.jsp(68,11) name = items type = javax.el.ValueExpression reqTime = true required = false fragment = false deferredValue = true expectedTypeName = java.lang.Object deferredMethod = false methodSignature = null _jspx_th_c_005fforEach_005f0.setItems(new org.apache.jasper.el.JspValueExpression("/WEB-INF/views/material/inspection/inspection_edit.jsp(68,11) '${supervisoryLevelEnum}'",_el_expressionfactory.createValueExpression(_jspx_page_context.getELContext(),"${supervisoryLevelEnum}",java.lang.Object.class)).getValue(_jspx_page_context.getELContext())); // /WEB-INF/views/material/inspection/inspection_edit.jsp(68,11) name = var type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_c_005fforEach_005f0.setVar("item"); int[] _jspx_push_body_count_c_005fforEach_005f0 = new int[] { 0 }; try { int _jspx_eval_c_005fforEach_005f0 = _jspx_th_c_005fforEach_005f0.doStartTag(); if (_jspx_eval_c_005fforEach_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t\t <option value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${item.id}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write('"'); out.write(' '); if (_jspx_meth_c_005fif_005f0(_jspx_th_c_005fforEach_005f0, _jspx_page_context, _jspx_push_body_count_c_005fforEach_005f0)) return true; out.write(' '); out.write('>'); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${item.name}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("</option>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t\t"); int evalDoAfterBody = _jspx_th_c_005fforEach_005f0.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_005fforEach_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { return true; } } catch (Throwable _jspx_exception) { while (_jspx_push_body_count_c_005fforEach_005f0[0]-- > 0) out = _jspx_page_context.popBody(); _jspx_th_c_005fforEach_005f0.doCatch(_jspx_exception); } finally { _jspx_th_c_005fforEach_005f0.doFinally(); _005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems.reuse(_jspx_th_c_005fforEach_005f0); } return false; } private boolean _jspx_meth_c_005fif_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fforEach_005f0, PageContext _jspx_page_context, int[] _jspx_push_body_count_c_005fforEach_005f0) throws Throwable { PageContext pageContext = _jspx_page_context; JspWriter out = _jspx_page_context.getOut(); // c:if org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f0 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class); _jspx_th_c_005fif_005f0.setPageContext(_jspx_page_context); _jspx_th_c_005fif_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fforEach_005f0); // /WEB-INF/views/material/inspection/inspection_edit.jsp(69,40) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_c_005fif_005f0.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.hcMainData.gljb == item.id }", java.lang.Boolean.class, (PageContext)_jspx_page_context, null, false)).booleanValue()); int _jspx_eval_c_005fif_005f0 = _jspx_th_c_005fif_005f0.doStartTag(); if (_jspx_eval_c_005fif_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("selected=\"true\""); int evalDoAfterBody = _jspx_th_c_005fif_005f0.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_005fif_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f0); return true; } _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f0); return false; } private boolean _jspx_meth_c_005fforEach_005f1(PageContext _jspx_page_context) throws Throwable { PageContext pageContext = _jspx_page_context; JspWriter out = _jspx_page_context.getOut(); // c:forEach org.apache.taglibs.standard.tag.rt.core.ForEachTag _jspx_th_c_005fforEach_005f1 = (org.apache.taglibs.standard.tag.rt.core.ForEachTag) _005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems.get(org.apache.taglibs.standard.tag.rt.core.ForEachTag.class); _jspx_th_c_005fforEach_005f1.setPageContext(_jspx_page_context); _jspx_th_c_005fforEach_005f1.setParent(null); // /WEB-INF/views/material/inspection/inspection_edit.jsp(152,10) name = items type = javax.el.ValueExpression reqTime = true required = false fragment = false deferredValue = true expectedTypeName = java.lang.Object deferredMethod = false methodSignature = null _jspx_th_c_005fforEach_005f1.setItems(new org.apache.jasper.el.JspValueExpression("/WEB-INF/views/material/inspection/inspection_edit.jsp(152,10) '${materialTypeEnum}'",_el_expressionfactory.createValueExpression(_jspx_page_context.getELContext(),"${materialTypeEnum}",java.lang.Object.class)).getValue(_jspx_page_context.getELContext())); // /WEB-INF/views/material/inspection/inspection_edit.jsp(152,10) name = var type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_c_005fforEach_005f1.setVar("item"); int[] _jspx_push_body_count_c_005fforEach_005f1 = new int[] { 0 }; try { int _jspx_eval_c_005fforEach_005f1 = _jspx_th_c_005fforEach_005f1.doStartTag(); if (_jspx_eval_c_005fforEach_005f1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t <option value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${item.id}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write('"'); out.write(' '); if (_jspx_meth_c_005fif_005f1(_jspx_th_c_005fforEach_005f1, _jspx_page_context, _jspx_push_body_count_c_005fforEach_005f1)) return true; out.write(' '); out.write('>'); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${item.name}", java.lang.String.class, (PageContext)_jspx_page_context, null, false)); out.write("</option>\r\n"); out.write("\t\t\t\t\t\t\t\t\t\t"); int evalDoAfterBody = _jspx_th_c_005fforEach_005f1.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_005fforEach_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { return true; } } catch (Throwable _jspx_exception) { while (_jspx_push_body_count_c_005fforEach_005f1[0]-- > 0) out = _jspx_page_context.popBody(); _jspx_th_c_005fforEach_005f1.doCatch(_jspx_exception); } finally { _jspx_th_c_005fforEach_005f1.doFinally(); _005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems.reuse(_jspx_th_c_005fforEach_005f1); } return false; } private boolean _jspx_meth_c_005fif_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fforEach_005f1, PageContext _jspx_page_context, int[] _jspx_push_body_count_c_005fforEach_005f1) throws Throwable { PageContext pageContext = _jspx_page_context; JspWriter out = _jspx_page_context.getOut(); // c:if org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f1 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class); _jspx_th_c_005fif_005f1.setPageContext(_jspx_page_context); _jspx_th_c_005fif_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fforEach_005f1); // /WEB-INF/views/material/inspection/inspection_edit.jsp(153,39) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_c_005fif_005f1.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.hcMainData.hclx == item.id }", java.lang.Boolean.class, (PageContext)_jspx_page_context, null, false)).booleanValue()); int _jspx_eval_c_005fif_005f1 = _jspx_th_c_005fif_005f1.doStartTag(); if (_jspx_eval_c_005fif_005f1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("selected=\"true\""); int evalDoAfterBody = _jspx_th_c_005fif_005f1.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_005fif_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f1); return true; } _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f1); return false; } private boolean _jspx_meth_fmt_005fformatDate_005f0(PageContext _jspx_page_context) throws Throwable { PageContext pageContext = _jspx_page_context; JspWriter out = _jspx_page_context.getOut(); // fmt:formatDate org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag _jspx_th_fmt_005fformatDate_005f0 = (org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag) _005fjspx_005ftagPool_005ffmt_005fformatDate_0026_005fvalue_005fpattern_005fnobody.get(org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag.class); _jspx_th_fmt_005fformatDate_005f0.setPageContext(_jspx_page_context); _jspx_th_fmt_005fformatDate_005f0.setParent(null); // /WEB-INF/views/material/inspection/inspection_edit.jsp(203,59) name = pattern type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_fmt_005fformatDate_005f0.setPattern("yyyy-MM-dd"); // /WEB-INF/views/material/inspection/inspection_edit.jsp(203,59) name = value type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_fmt_005fformatDate_005f0.setValue((java.util.Date) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.hjsm}", java.util.Date.class, (PageContext)_jspx_page_context, null, false)); int _jspx_eval_fmt_005fformatDate_005f0 = _jspx_th_fmt_005fformatDate_005f0.doStartTag(); if (_jspx_th_fmt_005fformatDate_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005ffmt_005fformatDate_0026_005fvalue_005fpattern_005fnobody.reuse(_jspx_th_fmt_005fformatDate_005f0); return true; } _005fjspx_005ftagPool_005ffmt_005fformatDate_0026_005fvalue_005fpattern_005fnobody.reuse(_jspx_th_fmt_005fformatDate_005f0); return false; } private boolean _jspx_meth_fmt_005fformatDate_005f1(PageContext _jspx_page_context) throws Throwable { PageContext pageContext = _jspx_page_context; JspWriter out = _jspx_page_context.getOut(); // fmt:formatDate org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag _jspx_th_fmt_005fformatDate_005f1 = (org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag) _005fjspx_005ftagPool_005ffmt_005fformatDate_0026_005fvalue_005fpattern_005fnobody.get(org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag.class); _jspx_th_fmt_005fformatDate_005f1.setPageContext(_jspx_page_context); _jspx_th_fmt_005fformatDate_005f1.setParent(null); // /WEB-INF/views/material/inspection/inspection_edit.jsp(238,59) name = pattern type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_fmt_005fformatDate_005f1.setPattern("yyyy-MM-dd"); // /WEB-INF/views/material/inspection/inspection_edit.jsp(238,59) name = value type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_fmt_005fformatDate_005f1.setValue((java.util.Date) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.scrq}", java.util.Date.class, (PageContext)_jspx_page_context, null, false)); int _jspx_eval_fmt_005fformatDate_005f1 = _jspx_th_fmt_005fformatDate_005f1.doStartTag(); if (_jspx_th_fmt_005fformatDate_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005ffmt_005fformatDate_0026_005fvalue_005fpattern_005fnobody.reuse(_jspx_th_fmt_005fformatDate_005f1); return true; } _005fjspx_005ftagPool_005ffmt_005fformatDate_0026_005fvalue_005fpattern_005fnobody.reuse(_jspx_th_fmt_005fformatDate_005f1); return false; } private boolean _jspx_meth_fmt_005fformatDate_005f2(PageContext _jspx_page_context) throws Throwable { PageContext pageContext = _jspx_page_context; JspWriter out = _jspx_page_context.getOut(); // fmt:formatDate org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag _jspx_th_fmt_005fformatDate_005f2 = (org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag) _005fjspx_005ftagPool_005ffmt_005fformatDate_0026_005fvalue_005fpattern_005fnobody.get(org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag.class); _jspx_th_fmt_005fformatDate_005f2.setPageContext(_jspx_page_context); _jspx_th_fmt_005fformatDate_005f2.setParent(null); // /WEB-INF/views/material/inspection/inspection_edit.jsp(309,91) name = pattern type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_fmt_005fformatDate_005f2.setPattern("yyyy-MM-dd"); // /WEB-INF/views/material/inspection/inspection_edit.jsp(309,91) name = value type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_fmt_005fformatDate_005f2.setValue((java.util.Date) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.jyrq}", java.util.Date.class, (PageContext)_jspx_page_context, null, false)); int _jspx_eval_fmt_005fformatDate_005f2 = _jspx_th_fmt_005fformatDate_005f2.doStartTag(); if (_jspx_th_fmt_005fformatDate_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005ffmt_005fformatDate_0026_005fvalue_005fpattern_005fnobody.reuse(_jspx_th_fmt_005fformatDate_005f2); return true; } _005fjspx_005ftagPool_005ffmt_005fformatDate_0026_005fvalue_005fpattern_005fnobody.reuse(_jspx_th_fmt_005fformatDate_005f2); return false; } private boolean _jspx_meth_c_005fif_005f2(PageContext _jspx_page_context) throws Throwable { PageContext pageContext = _jspx_page_context; JspWriter out = _jspx_page_context.getOut(); // c:if org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f2 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class); _jspx_th_c_005fif_005f2.setPageContext(_jspx_page_context); _jspx_th_c_005fif_005f2.setParent(null); // /WEB-INF/views/material/inspection/inspection_edit.jsp(329,28) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_c_005fif_005f2.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.jyjg=='1'}", java.lang.Boolean.class, (PageContext)_jspx_page_context, null, false)).booleanValue()); int _jspx_eval_c_005fif_005f2 = _jspx_th_c_005fif_005f2.doStartTag(); if (_jspx_eval_c_005fif_005f2 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("selected"); int evalDoAfterBody = _jspx_th_c_005fif_005f2.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_005fif_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f2); return true; } _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f2); return false; } private boolean _jspx_meth_c_005fif_005f3(PageContext _jspx_page_context) throws Throwable { PageContext pageContext = _jspx_page_context; JspWriter out = _jspx_page_context.getOut(); // c:if org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f3 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class); _jspx_th_c_005fif_005f3.setPageContext(_jspx_page_context); _jspx_th_c_005fif_005f3.setParent(null); // /WEB-INF/views/material/inspection/inspection_edit.jsp(330,28) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_c_005fif_005f3.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.jyjg=='2'}", java.lang.Boolean.class, (PageContext)_jspx_page_context, null, false)).booleanValue()); int _jspx_eval_c_005fif_005f3 = _jspx_th_c_005fif_005f3.doStartTag(); if (_jspx_eval_c_005fif_005f3 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("selected"); int evalDoAfterBody = _jspx_th_c_005fif_005f3.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_005fif_005f3.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f3); return true; } _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f3); return false; } private boolean _jspx_meth_c_005fif_005f4(PageContext _jspx_page_context) throws Throwable { PageContext pageContext = _jspx_page_context; JspWriter out = _jspx_page_context.getOut(); // c:if org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f4 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class); _jspx_th_c_005fif_005f4.setPageContext(_jspx_page_context); _jspx_th_c_005fif_005f4.setParent(null); // /WEB-INF/views/material/inspection/inspection_edit.jsp(331,28) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_c_005fif_005f4.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${queryQuality.jyjg=='3'}", java.lang.Boolean.class, (PageContext)_jspx_page_context, null, false)).booleanValue()); int _jspx_eval_c_005fif_005f4 = _jspx_th_c_005fif_005f4.doStartTag(); if (_jspx_eval_c_005fif_005f4 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("selected"); int evalDoAfterBody = _jspx_th_c_005fif_005f4.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_005fif_005f4.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f4); return true; } _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f4); return false; } }
[ "903654879@qq.com" ]
903654879@qq.com
f3a3519c2d5b6c2d1ffe2b83020ce45be31cf6f1
a85f45910dda537d8e274474d5fc488c0d9ed1f3
/src/pl/edu/uwm/wmii/Krystian_Gasior/laboratorium00/Zadanie4.java
c6982ea6e15b333dbff1d817cbd20e3a22785d4b
[]
no_license
Krystian6991/ZPO-GasiorKrystian
e966ca9b50d252fe17a9ad612a47f0c5e7e70eb1
f6aa5672ce3f706735013810715a3545bd63040b
refs/heads/main
2023-06-09T15:41:59.587627
2021-06-27T11:46:04
2021-06-27T11:46:04
349,995,448
0
0
null
null
null
null
UTF-8
Java
false
false
308
java
package pl.edu.uwm.wmii.Krystian_Gasior.laboratorium00; public class Zadanie4 { public static void main(String[] arg) { double kwota = 1000; double procent = 0.06; for(int i=1;i<=3;i++) { kwota+=kwota*procent; System.out.println(kwota); } } }
[ "80976080+Krystian6991@users.noreply.github.com" ]
80976080+Krystian6991@users.noreply.github.com
849bf3c24303dde7b9c33e955c2c95709f754346
5de9321a0cce634bc32f40b9b3457f7f325cdce0
/src/main/java/com/jeesite/modules/test/dao/TestDataDao.java
230dda07797a0d88aefe3537b64854bda68b245b
[]
no_license
HeYiHao01/IS3DMCPS-Project
6f0e86777c719d054a66fb95ea90b285be58bae9
8efdf09f37fccc56a621663a6e54224967bb5a8b
refs/heads/master
2022-06-27T19:27:34.398252
2020-05-06T09:36:42
2020-05-06T09:36:42
186,109,514
0
1
null
2022-06-17T03:08:53
2019-05-11T08:50:00
C
UTF-8
Java
false
false
645
java
/** * Copyright (c) 2013-Now http://jeesite.com All rights reserved. */ package com.jeesite.modules.test.dao; import java.util.List; import java.util.Map; import com.jeesite.common.dao.CrudDao; import com.jeesite.common.datasource.DataSourceHolder; import com.jeesite.common.mybatis.annotation.MyBatisDao; import com.jeesite.modules.test.entity.TestData; /** * 测试数据DAO接口 * @author ThinkGem * @version 2018-04-22 */ @MyBatisDao public interface TestDataDao extends CrudDao<TestData> { /** * 演示Map参数和返回值,支持分页 */ public List<Map<String, Object>> findListForMap(Map<String, Object> params); }
[ "hyhlovec@gmail.com" ]
hyhlovec@gmail.com
67bad26bf8749273712a10fc1d074f121b1cb85a
202948ffddf3b80068b530a4e2883e1cd5476952
/LAB4/src/LABA4/main.java
abf034cf7060cf9b87df1eadb30cab14ca09cac9
[]
no_license
Brunoswine/KPP-LABS
be9dbba6afee916d232f18c59574ab97350ddd0b
be0874e57094b35d5b9f3967b9a007d3e7e55774
refs/heads/master
2022-07-20T11:58:03.888873
2020-05-25T07:59:40
2020-05-25T07:59:40
266,699,670
1
0
null
null
null
null
UTF-8
Java
false
false
360
java
package LABA4; public class main { public static void main(String[] args) { Road road = new Road(); while(true) { road.addCar(new Car()); road.checkCars(); if(road.retAmount() == 50) { road.tellAboutCheating(); road.initCountOfCheating(); } } } }
[ "45950452+Brunoswine@users.noreply.github.com" ]
45950452+Brunoswine@users.noreply.github.com
8821bdd5ff3f079fe98610c6ffaf60423b084758
711590043b3636115add738d8eacbd487d347fbd
/ws/gl-sport-tracker/src/main/java/fr/istic/taa/yeoman/entities/MusicImpl.java
ed7c7ed9e80cd20980ea091290b4f2573b0c0031
[]
no_license
ayudaz/TAA
3de649f730912f05c459d27f6ccb7664b338c7e4
704e729a1c6cd60443ed5ac8cd50174b62d132c9
refs/heads/master
2021-01-22T11:58:48.374193
2014-01-14T16:09:58
2014-01-14T16:09:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,423
java
package fr.istic.taa.yeoman.entities; import java.util.ArrayList; import java.util.List; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.ManyToMany; import javax.persistence.Table; import javax.xml.bind.annotation.XmlTransient; import org.codehaus.jackson.annotate.JsonIgnore; import fr.istic.yeoman.api.Music; @Entity @Table(name="musics") public class MusicImpl implements Music { public int id; public String name; public String path; public List<SessionImpl> sessions; public MusicImpl() { sessions = new ArrayList<SessionImpl>(); } @Override @Id @GeneratedValue public int getId() { return id; } @Override public void setId(int id) { this.id = id; } @Override @Column(length=100) public String getName() { return name; } @Override public void setName(String name) { this.name = name; } @Override @Column(length=200) public String getPath() { return path; } @Override public void setPath(String path) { this.path = path; } @Override public void play() { // TODO Auto-generated method stub } @Override @ManyToMany(targetEntity=SessionImpl.class) @XmlTransient @JsonIgnore public List<SessionImpl> getSessions() { return sessions; } @Override public void setSessions(List<SessionImpl> sessions){ this.sessions = sessions; } }
[ "thomaslelievre72@gmail.com" ]
thomaslelievre72@gmail.com
54d58dd1e177799d9d3e4bfa59657c35060aa0b5
df122aa90195e82273781f860c14e926255cc05d
/src/java/com/cripisi/Customer/Customer.java
5944ab2df760b430ccab7918dd739793efa745d2
[]
no_license
merksYeah/SYSTIMP
e43853923f20eb83d510012ed4b7bd8805dc8b1d
67bbca9108ac707ff5e5205d33222be5465d2d18
refs/heads/master
2020-05-18T09:41:42.850266
2015-11-01T02:24:18
2015-11-01T02:24:18
42,106,741
0
0
null
null
null
null
UTF-8
Java
false
false
1,677
java
/* * 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 com.cripisi.Customer; /** * * @author deathman28 */ public class Customer { public int getCustomerTin() { return customerTin; } public String getEmployeeId() { return employeeId; } public int getUserId() { return userId; } public String getEmail() { return email; } public String getClientName() { return clientName; } public String getCompanyAddress() { return companyAddress; } public String getContactNum() { return contactNum; } public void setCustomerTin(int customerTin) { this.customerTin = customerTin; } public void setEmployeeId(String employeeId) { this.employeeId = employeeId; } public void setUserId(int userId) { this.userId = userId; } public void setEmail(String email) { this.email = email; } public void setClientName(String clientName) { this.clientName = clientName; } public void setCompanyAddress(String companyAddress) { this.companyAddress = companyAddress; } public void setContactNum(String contactNum) { this.contactNum = contactNum; } public int customerTin; public String employeeId; public int userId; public String email; public String clientName; public String companyAddress; public String contactNum; }
[ "miguelangelomercado@gmail.com" ]
miguelangelomercado@gmail.com
618a58d425083708de4886f2e3b7190d946347a9
566a6d6eda90a9d2586443f83d784c49925b20da
/src/cn/zzp/tank/Explode.java
33dc9b28b13c392be42550f1e8144d39335a4178
[]
no_license
loveSpinach/MyTankWar
402362ea1e4c43051eb8d74fd9f80fc842b57687
1826c1e020dd681f2334969431a2d5b7a17a2bea
refs/heads/master
2020-07-04T12:26:46.047200
2019-08-14T06:25:34
2019-08-14T06:25:34
202,286,528
1
0
null
null
null
null
UTF-8
Java
false
false
1,114
java
package cn.zzp.tank; import java.awt.Graphics; import java.awt.Image; import java.awt.image.BufferedImage; import java.io.IOException; import javax.imageio.ImageIO; public class Explode extends GameObject { private static BufferedImage images[]; static { images = new BufferedImage[16]; for (int i = 0; i < images.length; i++) { try { images[i] = ImageIO.read(Explode.class.getClassLoader().getResourceAsStream("images/e" +(i+1)+ ".gif")); } catch (IOException e) { e.printStackTrace(); } } } private boolean die; private int step; TankClient tc; public boolean isDie() { return die; } public void setDie(boolean die) { this.die = die; } public int getStep() { return step; } public void setStep(int step) { this.step = step; } public Explode(int x, int y, TankClient tc) { super(); this.x = x; this.y = y; this.tc = tc; tc.objects.add(this); } @Override public void paint(Graphics g) { if (step==images.length) { die=true; return; } g.drawImage(images[step], x-images[0].getWidth()/2, y-images[0].getHeight()/2,null); step++; } }
[ "13717637983@sina.cn" ]
13717637983@sina.cn
a1359f89a42862f1ded54df3b9288434360f8130
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2017/4/EncodeGroupsStep.java
aad182bc81d0f8698c10c745efaa8e406cf31f5b
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
3,120
java
/* * Copyright (c) 2002-2017 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.unsafe.impl.batchimport; import org.neo4j.kernel.impl.store.RecordStore; import org.neo4j.kernel.impl.store.record.RelationshipGroupRecord; import org.neo4j.unsafe.impl.batchimport.staging.BatchSender; import org.neo4j.unsafe.impl.batchimport.staging.ProcessorStep; import org.neo4j.unsafe.impl.batchimport.staging.StageControl; /** * Takes cached {@link RelationshipGroupRecord relationship groups} and sets real ids and * {@link RelationshipGroupRecord#getNext() next pointers}, making them ready for writing to store. */ public class EncodeGroupsStep extends ProcessorStep<RelationshipGroupRecord[]> { private long nextId = -1; private final RecordStore<RelationshipGroupRecord> store; public EncodeGroupsStep( StageControl control, Configuration config, RecordStore<RelationshipGroupRecord> store ) { super( control, "ENCODE", config, 1 ); this.store = store; } @Override protected void process( RelationshipGroupRecord[] batch, BatchSender sender ) throws Throwable { int groupStartIndex = 0; for ( int i = 0; i < batch.length; i++ ) { RelationshipGroupRecord group = batch[i]; // The iterator over the groups will not produce real next pointers, they are instead // a count meaning how many groups come after it. This encoder will set the real group ids. long count = group.getNext(); boolean lastInChain = count == 0; group.setId( nextId == -1 ? nextId = store.nextId() : nextId ); if ( !lastInChain ) { group.setNext( nextId = store.nextId() ); } else { group.setNext( nextId = -1 ); // OK so this group is the last in this chain, which means all the groups in this chain // are now fully populated. We can now prepare these groups so that their potential // secondary units ends up very close by. for ( int j = groupStartIndex; j <= i; j++ ) { store.prepareForCommit( batch[j] ); } groupStartIndex = i + 1; } } assert groupStartIndex == batch.length; sender.send( batch ); } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
f2e0cb96b033f42144c3415237fc312c7aa0b071
d86dfc1cfdc5c5f457d5a996b4740ca471069dd8
/TESL/src/commands/ICommand.java
9a74617029da070927504c06f8f6439b51dbc42b
[]
no_license
RaivoKoot/ElderScrollsLegendsOld
334dd3d5203776ffe7e9a2a4d628a6081bd70f84
a9e79a1459c32c6981dd6240a9a5f995ccb6c18f
refs/heads/master
2020-04-13T08:44:09.234843
2018-12-25T14:49:29
2018-12-25T14:49:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
74
java
package commands; public interface ICommand { public void execute(); }
[ "raivokoot@gmail.com" ]
raivokoot@gmail.com
5026eb980a31f2bc562abe2ed1616e3cf28c4df5
e240a2f7da24659172476077d65bb9da484aa7eb
/src/ua/itea/lesson11/tasks/figure/Figure.java
4740dacf7fed6e2aea0e3789236bb7cc13018b13
[]
no_license
yaroslav36455/ITEA_JavaBase
f9c1c31b1d77cc5f7d33ff26839ab9efe5258d6b
7201ac246470d49f3071f20eccff203f9638a95d
refs/heads/master
2022-12-27T05:46:22.614517
2020-10-15T07:36:11
2020-10-15T07:36:11
289,955,477
0
0
null
null
null
null
UTF-8
Java
false
false
526
java
package ua.itea.lesson11.tasks.figure; public class Figure { private double perim; private double area; private String color; public Figure(String color) { this.color = color; } public String getName() { return "Figure"; } public double getPerimeter() { return perim; } public double getArea() { return area; } public String getColor() { return color; } protected void setPerimeter(double perim) { this.perim = perim; } protected void setArea(double area) { this.area = area; } }
[ "yaroslav36455@gmail.com" ]
yaroslav36455@gmail.com
4614c36127e9aa743c4bb9c111649741c4e0bd69
58dde8d9fce67b46155d1b4cbe92fd30af7a27e1
/src/main/java/com/henry/controller/NoteController.java
69abf0a8c08015a06c231a7c3955b36cc1ccdbac
[]
no_license
hheennrryy1/Note
9dfd509da898203d8fbc8202db0f857924dcad22
ec2403d2d41de5bea1cff0546323eebb0518ebff
refs/heads/master
2020-04-06T03:35:23.866741
2016-08-13T07:09:16
2016-08-13T07:09:16
62,955,882
0
0
null
null
null
null
UTF-8
Java
false
false
5,547
java
package com.henry.controller; import java.util.Date; import java.util.List; import javax.servlet.http.HttpSession; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; import com.github.pagehelper.PageInfo; import com.henry.entity.Note; import com.henry.entity.Notebook; import com.henry.entity.User; import com.henry.service.NoteService; import com.henry.service.NotebookService; @Controller @RequestMapping("/note") public class NoteController { Logger logger = Logger.getLogger(NoteController.class); @Autowired private NoteService noteService; @Autowired private NotebookService notebookService; private User user; @ModelAttribute public void getUser(HttpSession session) { logger.info("ModelAttr"); user = (User) session.getAttribute("user"); } /** * 只更新状态,移到废纸篓,不是真正删除 * * @param id note的id * @param nbid notebook的id 用于更新状态后的跳转,如果不为空,就跳转到笔记本的笔记列表,如果为空就跳转到所有笔记 * @return */ @RequestMapping("/updateStatus/{id}") public String updateStatus(HttpSession session, @PathVariable Integer id, @RequestParam(value = "nbid", required=false) Integer nbid, @RequestParam("status") Byte status) { User user = (User) session.getAttribute("user"); Note note = new Note(); note.setId(id); note.setStatus(status); noteService.updateByIdSelective(note); //转发到所有笔记 if(nbid==null) { StringBuilder sb = new StringBuilder("redirect:/note/list/"); sb.append(user.getId()).append("?status=") .append(status).append("&pageNum=1"); return sb.toString(); } //转发到该笔记的所有笔记 return "redirect:/notebook/noteList/" + nbid; } /** * 选择单个note * 转向到更新note的页面 */ @RequestMapping("/select/{id}") public ModelAndView select(ModelAndView mav, @PathVariable Integer id) { mav.setViewName("note"); Note note = noteService.selectById(id); //找到单个note mav.addObject("note", note); Notebook notebook = new Notebook(null, null, user); //找到该用户的所有笔记本 List<Notebook> notebooks = notebookService.selectiveSelect(notebook); mav.addObject("notebooks", notebooks); return mav; } /** * 更新note */ @RequestMapping("/update") @ResponseBody public String update(Note note) { note.setUpdatetime(new Date()); int flag = noteService.updateByIdSelective(note); if(flag>0) { return "success"; } return "fail"; } /** * 更新笔记所在的笔记本 */ @RequestMapping("/updateNotebookId") @ResponseBody public String updateNotebookId(String notebookName, Integer noteId) { Notebook notebook = new Notebook(notebookName, null, user); //根据notebook名字找到id notebook = notebookService.selectiveSelect(notebook).get(0); Note note = new Note(); note.setNotebook(notebook); note.setId(noteId); //更新notebook的id int flag = noteService.updateByIdSelective(note); if(flag>0) { return "success"; } return "fail"; } /** * 转到笔记列表,显示该用户的所有笔记 */ @RequestMapping("/list/{userId}") public ModelAndView list(ModelAndView mav, @PathVariable Integer userId, @RequestParam() Byte status, @RequestParam int pageNum) { Note note = new Note(status, new User(userId, null)); PageInfo<Note> page = noteService.selectByStatusAndUserId(note, pageNum); mav.addObject("page", page); if(status==1) { mav.setViewName("allNoteList"); } else if(status==0) { mav.setViewName("trash"); } return mav; } /** * 转向到插入笔记的页面 */ @RequestMapping(value="/insert", method=RequestMethod.GET) public ModelAndView insert(ModelAndView mav) { Notebook notebook = new Notebook(null, null, user); //找到用户的所有笔记本 List<Notebook> notebooks = notebookService.selectiveSelect(notebook); mav.addObject("notebooks", notebooks); mav.setViewName("insertNote"); return mav; } /** * 插入笔记 */ @RequestMapping(value="/insert", method=RequestMethod.POST) public ModelAndView insert(ModelAndView mav, Note note) { Notebook notebook = note.getNotebook(); notebook.setUser(user); //根据name找id notebook = notebookService.selectiveSelect(notebook).get(0); Date date = new Date(); note.setCreatetime(date); note.setUpdatetime(date); note.setUser(user); note.setStatus((byte)1); note.setNotebook(notebook); noteService.insertSelective(note); mav.setViewName("redirect:/notebook/noteList/" + notebook.getId()); return mav; } /** * 从废纸篓彻底删除note */ @RequestMapping("/delete/{id}") public String delete(@PathVariable Integer id) { noteService.deleteById(id); return "redirect:/note/list/" + user.getId() + "?status=0&pageNum=1"; } }
[ "zenghenghao@foxmail.com" ]
zenghenghao@foxmail.com
a46e58f95fd3081daee964ad00ca596a8a7d3fd0
b3c046168748ae62b8021a5e48666d9befa7c10f
/Pattern Programming-10/Main.java
8e77f484183dff52e7bb625b3b30794f3aac876e
[]
no_license
bharath315/Playground
3eb4d5c370e095f1871ac22652d4869442a2ae46
418dbd6bbbaf849bee9ee04a5fd578d3d3cd8ca1
refs/heads/master
2023-04-06T10:43:43.194489
2021-04-23T15:14:09
2021-04-23T15:14:09
259,385,440
0
0
null
null
null
null
UTF-8
Java
false
false
427
java
#include <iostream> using namespace std; int pyramid(int n) { int num='A'; int num1='1'; int i,j,k; for(i=1;i<=n;i++) { for(k=1;k<=n-i;k++) cout<<" "; num='A'; for(j=1;j<=i;j++) { cout<<(char)num++; } for(j=1;j<=i;j++) { cout<<j; } cout<<endl; } return 0; } int main() { // Try out your code here int n; cin>>n; pyramid(n); return 0; }
[ "55154595+bharath315@users.noreply.github.com" ]
55154595+bharath315@users.noreply.github.com
37aae26f4ffa433942729a31a7542b7dbfeaee2d
e399119d857cded6552907097cd8021a6aee581c
/src/test/java/com/mb/MVNJenkinTest/TestngTest.java
d3d6d5ad3f79905201c87be7d5b15a9da70fef85
[]
no_license
prataphada13/mvnjenkintest09
e99055ae927e2623af4f2163d460249ec72d6929
9e3ef6afb391252b9e8b0351dc7159bdb7bb1ecf
refs/heads/master
2023-03-02T23:28:42.723934
2021-02-09T05:41:19
2021-02-09T05:41:19
337,305,044
0
0
null
null
null
null
UTF-8
Java
false
false
795
java
package com.mb.MVNJenkinTest; import org.testng.annotations.AfterClass; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; public class TestngTest { @BeforeClass public void bfClass() { System.out.println("Class started"); } @BeforeMethod public void bfMethod() { System.out.println("Method started"); } @Test(priority = 1) public void testCase1() { System.out.println("Test case1 started"); } @Test(priority = 2) public void testCase2() { System.out.println("Test case2 started"); } @AfterMethod public void afMethod() { System.out.println("Method ended"); } @AfterClass public void afClass() { System.out.println("class ended"); } }
[ "pratap.pt49@gmail.com" ]
pratap.pt49@gmail.com
90cd57dcfc127d9156ab13e291c4d08ecf7cb7b6
10fa97301076167ab69fef636a8dacc885ad5503
/src/main/java/com/karthickshiva/collegeattendance/AdminController.java
d5e590857ca8731d21ffeb876afd81ba025f93e6
[]
no_license
karthickshiva/college-attendance-management
cb2602e825b5973e82d8fce60a27da662a9ecd06
37476ad815f920215dbc602a868c89d851455b21
refs/heads/master
2022-12-17T01:12:02.814001
2020-08-21T17:07:03
2020-08-21T17:07:03
289,322,188
1
0
null
null
null
null
UTF-8
Java
false
false
3,419
java
package com.karthickshiva.collegeattendance; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Optional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestParam; @Controller public class AdminController { @Autowired private ClassRepository classRepository; @Autowired private SubjectRepository subjectRepository; @Autowired private StudentRepository studentRepository; @GetMapping("/") public String root(Model model) { model.addAttribute("view", "home"); return "index"; } @GetMapping("/class/add") public String addClass(Model model) { model.addAttribute("view", "addClass"); return "index"; } @GetMapping("/class/view") public String viewClass(Model model) { Iterable<Class> classes = classRepository.findAll(); model.addAttribute("view", "viewClasses"); model.addAttribute("classes", classes); return "index"; } @GetMapping("/subject/add") public String addSubject(Model model) { Iterable<Class> classRooms = classRepository.findAll(); model.addAttribute("classrooms", classRooms); model.addAttribute("view", "addSubject"); return "index"; } @GetMapping("/subject/view") public String viewSubject(Model model) { Iterable<Subject> subjects = subjectRepository.findAll(); model.addAttribute("view", "viewSubjects"); model.addAttribute("subjects", subjects); return "index"; } @GetMapping("/student/add") public String addStudent(Model model) { Iterable<Class> classRooms = classRepository.findAll(); model.addAttribute("classrooms", classRooms); model.addAttribute("view", "addStudent"); return "index"; } @GetMapping("/student/view") public String viewStudent(Model model, @RequestParam(required = false) Integer classID) { model.addAttribute("classrooms", classRepository.findAll()); model.addAttribute("view", "viewStudents"); List<Student> students = new ArrayList<>(); if (classID == null) { classID = classRepository.findAll().iterator().next().getId(); } students.addAll(studentRepository.findByStudentClassId(classID)); Collections.sort(students, Comparator.comparing(s -> s.getName())); model.addAttribute("classID", classID); model.addAttribute("students", students); return "index"; } @PostMapping("/class/add") public String addNewClass(@RequestParam String name, Model model) { Class classRoom = new Class(name); model.addAttribute("view", "addClass"); classRepository.save(classRoom); return "index"; } @PostMapping("/subject/add") public String addNewSubject(@RequestParam String name, Model model) { Subject subject = new Subject(name); subjectRepository.save(subject); return addSubject(model); } @PostMapping("/student/add") public String addNewStudent(@RequestParam String rollNumber, @RequestParam String name, @RequestParam Integer classID, Model model) { Optional<Class> opt = classRepository.findById(classID); if (opt.isPresent()) { Class classRoom = opt.get(); Student student = new Student(rollNumber, name, classRoom); studentRepository.save(student); } return addStudent(model); } }
[ "karthick.shiva@zohocorp.com" ]
karthick.shiva@zohocorp.com
9185e9622d18aa4b98aecb8fa05a37afb11aad74
6c2eb8afef16d5ec1ba0542c2a5fc23a48eeb765
/Android_Spotshop/app/src/main/java/be/fenego/android_spotshop/services/HistoryService.java
3792878445355f6065788bc3173d3c76703299e3
[]
no_license
Lanssens/it-project-android-app
e5ab1012f5df91825356fb0cdfa92dce84fc13aa
6fe3f30caacae1ac0d37ff65e014267374b6a809
refs/heads/master
2021-06-14T16:28:41.388711
2017-02-09T13:57:59
2017-02-09T13:57:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
864
java
package be.fenego.android_spotshop.services; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import be.fenego.android_spotshop.models.searchHistory.HistoryItem; import retrofit2.Call; import retrofit2.Retrofit; import retrofit2.converter.gson.GsonConverterFactory; import retrofit2.http.Body; import retrofit2.http.POST; /** * Created by Nick on 26/01/2017. * history service voor het posten van image zoekresultaten naar de back-end. */ public interface HistoryService { String BASE_URL ="http://vm6.tin.pxl.be:443/"; @POST("searchhistory/") Call<HistoryItem> postSearchHistory(@Body HistoryItem historyItem); Gson gson = new GsonBuilder().create(); Retrofit retrofit = new Retrofit.Builder() .baseUrl(BASE_URL) .addConverterFactory(GsonConverterFactory.create(gson)) .build(); }
[ "nick_philippe@hotmail.com" ]
nick_philippe@hotmail.com
71877cb7767bb3f8d8a6c172ca4eb3eb207302c8
a54ff03a8fad342fef9086084231df35d56f507c
/TokChatBackend/src/main/java/com/TokChatBackend/models/BlogComment.java
a4d9f33266e48b4950f294fcacd3efc72e6c5153
[]
no_license
UtkarshTomar/TokChat
0a581a1b766a8f28423f39a94395efae4044bd08
6bae5402e0145dcd6b39985e894c32766fc1b760
refs/heads/master
2020-04-17T23:39:55.953892
2019-01-22T18:19:44
2019-01-22T18:19:44
167,044,870
0
0
null
null
null
null
UTF-8
Java
false
false
1,319
java
package com.TokChatBackend.models; import java.util.Date; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.SequenceGenerator; import javax.persistence.Table; @Entity @Table(name="BlogComment_Tab") @SequenceGenerator(name="blogcommentseq",sequenceName="blogcommentidseq") public class BlogComment { @Id @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="blogcommentseq") private int commentId; private String commentText; private String email; private Date commentDate; private int blogId; public int getCommentId() { return commentId; } public void setCommentId(int commentId) { this.commentId = commentId; } public String getCommentText() { return commentText; } public void setCommentText(String commentText) { this.commentText = commentText; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public Date getCommentDate() { return commentDate; } public void setCommentDate(Date commentDate) { this.commentDate = commentDate; } public int getBlogId() { return blogId; } public void setBlogId(int blogId) { this.blogId = blogId; } }
[ "tomar.utkarsh49@gmail.com" ]
tomar.utkarsh49@gmail.com
a7deba0367ebe2d521bbf5a4ad5d49580a444bc4
67c4270f527356c6f265ebedbf427fcc2340a86d
/src/obstacles/Wall.java
78e56e9b251b3fa3da8d999e36f176eff4bcbbc4
[]
no_license
AlekSanVik47/tasksOfexample
c96ee23b56c79e4008688af35f2eabd240926696
976f2bc3fdade99838c3c4ebe1681446745826b1
refs/heads/2nd_stage_competition
2023-03-07T09:52:52.457514
2021-02-20T18:52:23
2021-02-20T18:52:23
335,366,514
0
0
null
2021-02-20T18:52:23
2021-02-02T17:16:59
Java
UTF-8
Java
false
false
924
java
package obstacles; import theParticipants.Participants; public class Wall implements Obstacles { double wallHeight; int obstacleNumber; public Wall(int obstacleNumber, double wallHeight) { this.wallHeight = wallHeight; this.obstacleNumber = obstacleNumber; } @Override public String toString() { return "Стена{" + "стена №_ " + obstacleNumber + ", высотой " + wallHeight + " m" + "} \n"; } public static void main(String[] args) { Wall wall = new Wall(1,0.5); } @Override public boolean passed(Participants participant) { if (participant.jump() > wallHeight) { System.out.println("Участник " + participant + " успешно перепрыгнул стену"); return true; } else { System.out.println("Участник " + participant + " не смог перепрыгнуть стену " + wallHeight); return false; } } }
[ "qa_aleksvik@outlook.com" ]
qa_aleksvik@outlook.com
c4df0647b9f5c574da408a8fc4c231aac39ef6cf
0a537cdd945804c90d271415d43fe6d80dfe59e9
/src/main/java/com/wikift/config/WikiftErrorConfig.java
6e764322782e7606fbbdd551b7578c1a7a0dc1eb
[ "Apache-2.0" ]
permissive
hrony/wikift-web-java
5e2329154caa9d54e1140cfacb277741d4810677
f598559c089466e57bd29fd0d871005d223f251b
refs/heads/master
2022-01-24T05:01:43.617339
2018-05-02T07:29:46
2018-05-02T07:29:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,807
java
/** * 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * 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.wikift.config; import com.wikift.customizer.WikiftServletContainerCustomizer; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Description; /** * WikiftErrorConfig <br/> * 描述 : WikiftErrorConfig <br/> * 作者 : qianmoQ <br/> * 版本 : 1.0 <br/> * 创建时间 : 2018-04-08 上午10:00 <br/> * 联系作者 : <a href="mailTo:shichengoooo@163.com">qianmoQ</a> */ @Configuration public class WikiftErrorConfig { @Autowired private WikiftServletContainerCustomizer wikiftServletContainerCustomizer; @Bean @Description(value = "wikift system error alert") public EmbeddedServletContainerCustomizer embeddedServletContainerCustomizer() { return wikiftServletContainerCustomizer; } }
[ "shicheng@ttxit.com" ]
shicheng@ttxit.com
39d85d1f2e4180ef212aee26ce2b2e5aa4e2d3a5
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
/eclipsejdt_cluster/70064/tar_0.java
133bb271cf429621b4c0a1c595dbba2ab8cdea48
[]
no_license
martinezmatias/GenPat-data-C3
63cfe27efee2946831139747e6c20cf952f1d6f6
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
refs/heads/master
2022-04-25T17:59:03.905613
2020-04-15T14:41:34
2020-04-15T14:41:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
45,905
java
/******************************************************************************* * Copyright (c) 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.jdt.core.tests.dom; import java.util.List; import junit.framework.Test; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.dom.AST; import org.eclipse.jdt.core.dom.ASTNode; import org.eclipse.jdt.core.dom.ArrayInitializer; import org.eclipse.jdt.core.dom.AssertStatement; import org.eclipse.jdt.core.dom.Assignment; import org.eclipse.jdt.core.dom.Block; import org.eclipse.jdt.core.dom.CompilationUnit; import org.eclipse.jdt.core.dom.EmptyStatement; import org.eclipse.jdt.core.dom.Expression; import org.eclipse.jdt.core.dom.ExpressionStatement; import org.eclipse.jdt.core.dom.ForStatement; import org.eclipse.jdt.core.dom.ITypeBinding; import org.eclipse.jdt.core.dom.MethodDeclaration; import org.eclipse.jdt.core.dom.MethodInvocation; import org.eclipse.jdt.core.dom.NumberLiteral; import org.eclipse.jdt.core.dom.SimpleName; import org.eclipse.jdt.core.dom.Statement; import org.eclipse.jdt.core.dom.StringLiteral; import org.eclipse.jdt.core.dom.VariableDeclarationFragment; import org.eclipse.jdt.core.dom.VariableDeclarationStatement; import org.eclipse.jdt.core.dom.VariableDeclarationExpression; public class ASTConverterRecoveryTest extends ConverterTestSetup { public ASTConverterRecoveryTest(String name) { super(name); } static { // TESTS_NAMES = new String[] {"test0003"}; // TESTS_NUMBERS = new int[] { 624 }; } public static Test suite() { return buildModelTestSuite(ASTConverterRecoveryTest.class); } public void setUpSuite() throws Exception { super.setUpSuite(); this.ast = AST.newAST(AST.JLS3); } public void test0001() throws JavaModelException { this.workingCopies = new ICompilationUnit[1]; this.workingCopies[0] = getWorkingCopy( "/Converter/src/test/X.java", "package test;\n"+ "\n"+ "public class X {\n"+ " void foo() {\n"+ " bar(0)\n"+ " baz(1);\n"+ " }\n"+ "}\n"); char[] source = this.workingCopies[0].getSource().toCharArray(); ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true); assertASTNodeEquals( "package test;\n" + "public class X {\n" + " void foo(){\n" + " bar(0);\n" + " baz(1);\n" + " }\n" + "}\n", result); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull(node); assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$ MethodDeclaration methodDeclaration = (MethodDeclaration) node; Block block = methodDeclaration.getBody(); List statements = block.statements(); assertEquals("wrong size", 2, statements.size()); //$NON-NLS-1$ Statement statement = (Statement) statements.get(0); assertTrue("Not an expression statement", statement.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$ ExpressionStatement expressionStatement = (ExpressionStatement) statement; checkSourceRange(expressionStatement, "bar(0)", source); //$NON-NLS-1$ Expression expression = expressionStatement.getExpression(); assertTrue("Not a method invocation", expression.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$ MethodInvocation methodInvocation = (MethodInvocation) expression; checkSourceRange(methodInvocation, "bar(0)", source); //$NON-NLS-1$ List list = methodInvocation.arguments(); assertTrue("Parameter list is empty", list.size() == 1); //$NON-NLS-1$ Expression parameter = (Expression) list.get(0); assertTrue("Not a number", parameter instanceof NumberLiteral); //$NON-NLS-1$ ITypeBinding typeBinding = parameter.resolveTypeBinding(); assertNotNull("No binding", typeBinding); //$NON-NLS-1$ assertEquals("Not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$ checkSourceRange(parameter, "0", source); //$NON-NLS-1$ Statement statement2 = (Statement) statements.get(1); assertTrue("Not an expression statement", statement2.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$ ExpressionStatement expressionStatement2 = (ExpressionStatement) statement2; checkSourceRange(expressionStatement2, "baz(1);", source); //$NON-NLS-1$ Expression expression2 = expressionStatement2.getExpression(); assertTrue("Not a method invocation", expression2.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$ MethodInvocation methodInvocation2 = (MethodInvocation) expression2; checkSourceRange(methodInvocation2, "baz(1)", source); //$NON-NLS-1$ List list2 = methodInvocation2.arguments(); assertTrue("Parameter list is empty", list2.size() == 1); //$NON-NLS-1$ Expression parameter2 = (Expression) list2.get(0); assertTrue("Not a number", parameter2 instanceof NumberLiteral); //$NON-NLS-1$ ITypeBinding typeBinding2 = parameter2.resolveTypeBinding(); assertNotNull("No binding", typeBinding2); //$NON-NLS-1$ assertEquals("Not int", "int", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$ checkSourceRange(parameter2, "1", source); //$NON-NLS-1$ } public void test0002() throws JavaModelException { this.workingCopies = new ICompilationUnit[1]; this.workingCopies[0] = getWorkingCopy( "/Converter/src/test/X.java", "package test;\n"+ "\n"+ "public class X {\n"+ " void foo() {\n"+ " baz(0);\n"+ " bar(1,\n"+ " }\n"+ "}\n"); char[] source = this.workingCopies[0].getSource().toCharArray(); ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true); assertASTNodeEquals( "package test;\n" + "public class X {\n" + " void foo(){\n" + " baz(0);\n" + " bar(1);\n" + " }\n" + "}\n", result); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull(node); assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$ MethodDeclaration methodDeclaration = (MethodDeclaration) node; Block block = methodDeclaration.getBody(); List statements = block.statements(); assertEquals("wrong size", 2, statements.size()); //$NON-NLS-1$ Statement statement = (Statement) statements.get(0); assertTrue("Not an expression statement", statement.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$ ExpressionStatement expressionStatement = (ExpressionStatement) statement; checkSourceRange(expressionStatement, "baz(0);", source); //$NON-NLS-1$ Expression expression = expressionStatement.getExpression(); assertTrue("Not a method invocation", expression.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$ MethodInvocation methodInvocation = (MethodInvocation) expression; checkSourceRange(methodInvocation, "baz(0)", source); //$NON-NLS-1$ List list = methodInvocation.arguments(); assertTrue("Parameter list is empty", list.size() == 1); //$NON-NLS-1$ Expression parameter = (Expression) list.get(0); assertTrue("Not a number", parameter instanceof NumberLiteral); //$NON-NLS-1$ ITypeBinding typeBinding = parameter.resolveTypeBinding(); assertNotNull("No binding", typeBinding); //$NON-NLS-1$ assertEquals("Not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$ checkSourceRange(parameter, "0", source); //$NON-NLS-1$ Statement statement2 = (Statement) statements.get(1); assertTrue("Not an expression statement", statement2.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$ ExpressionStatement expressionStatement2 = (ExpressionStatement) statement2; checkSourceRange(expressionStatement2, "bar(1", source); //$NON-NLS-1$ Expression expression2 = expressionStatement2.getExpression(); assertTrue("Not a method invocation", expression2.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$ MethodInvocation methodInvocation2 = (MethodInvocation) expression2; checkSourceRange(methodInvocation2, "bar(1", source); //$NON-NLS-1$ List list2 = methodInvocation2.arguments(); assertTrue("Parameter list is empty", list2.size() == 1); //$NON-NLS-1$ Expression parameter2 = (Expression) list2.get(0); assertTrue("Not a number", parameter2 instanceof NumberLiteral); //$NON-NLS-1$ ITypeBinding typeBinding2 = parameter2.resolveTypeBinding(); assertNotNull("No binding", typeBinding2); //$NON-NLS-1$ assertEquals("Not int", "int", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$ checkSourceRange(parameter2, "1", source); //$NON-NLS-1$ } public void test0003() throws JavaModelException { this.workingCopies = new ICompilationUnit[1]; this.workingCopies[0] = getWorkingCopy( "/Converter/src/test/X.java", "package test;\n"+ "\n"+ "public class X {\n"+ " void foo() {\n"+ " baz(0);\n"+ " bar(1,\n"+ " foo(3);\n"+ " }\n"+ "}\n"); char[] source = this.workingCopies[0].getSource().toCharArray(); ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true); assertASTNodeEquals( "package test;\n" + "public class X {\n" + " void foo(){\n" + " baz(0);\n" + " bar(1,foo(3));\n" + " }\n" + "}\n", result); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull(node); assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$ MethodDeclaration methodDeclaration = (MethodDeclaration) node; Block block = methodDeclaration.getBody(); List statements = block.statements(); assertEquals("wrong size", 2, statements.size()); //$NON-NLS-1$ Statement statement = (Statement) statements.get(0); assertTrue("Not an expression statement", statement.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$ ExpressionStatement expressionStatement = (ExpressionStatement) statement; checkSourceRange(expressionStatement, "baz(0);", source); //$NON-NLS-1$ Expression expression = expressionStatement.getExpression(); assertTrue("Not a method invocation", expression.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$ MethodInvocation methodInvocation = (MethodInvocation) expression; checkSourceRange(methodInvocation, "baz(0)", source); //$NON-NLS-1$ List list = methodInvocation.arguments(); assertTrue("Parameter list is empty", list.size() == 1); //$NON-NLS-1$ Expression parameter = (Expression) list.get(0); assertTrue("Not a number", parameter instanceof NumberLiteral); //$NON-NLS-1$ ITypeBinding typeBinding = parameter.resolveTypeBinding(); assertNotNull("No binding", typeBinding); //$NON-NLS-1$ assertEquals("Not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$ checkSourceRange(parameter, "0", source); //$NON-NLS-1$ Statement statement2 = (Statement) statements.get(1); assertTrue("Not an expression statement", statement2.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$ ExpressionStatement expressionStatement2 = (ExpressionStatement) statement2; checkSourceRange(expressionStatement2, "bar(1,\n\t foo(3);", source); //$NON-NLS-1$ Expression expression2 = expressionStatement2.getExpression(); assertTrue("Not a method invocation", expression2.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$ MethodInvocation methodInvocation2 = (MethodInvocation) expression2; checkSourceRange(methodInvocation2, "bar(1,\n\t foo(3)", source); //$NON-NLS-1$ List list2 = methodInvocation2.arguments(); assertTrue("Parameter list is empty", list2.size() == 2); //$NON-NLS-1$ Expression parameter2 = (Expression) list2.get(0); assertTrue("Not a Number", parameter2 instanceof NumberLiteral); //$NON-NLS-1$ parameter2 = (Expression) list2.get(1); assertTrue("Not a method invocation", parameter2 instanceof MethodInvocation); //$NON-NLS-1$ MethodInvocation methodInvocation3 = (MethodInvocation) parameter2; checkSourceRange(methodInvocation3, "foo(3)", source); //$NON-NLS-1$ } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=124296 public void test0004() throws JavaModelException { this.workingCopies = new ICompilationUnit[1]; this.workingCopies[0] = getWorkingCopy( "/Converter/src/test/X.java", "package test;\n"+ "\n"+ "public class X {\n"+ " void foo() {\n"+ " int var= 123\n"+ " System.out.println(var);\n"+ " }\n"+ "}\n"); char[] source = this.workingCopies[0].getSource().toCharArray(); ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true); assertASTNodeEquals( "package test;\n" + "public class X {\n" + " void foo(){\n" + " int var=123;\n" + " System.out.println(var);\n" + " }\n" + "}\n", result); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull(node); assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$ MethodDeclaration methodDeclaration = (MethodDeclaration) node; Block block = methodDeclaration.getBody(); List statements = block.statements(); assertEquals("wrong size", 2, statements.size()); //$NON-NLS-1$ Statement statement1 = (Statement) statements.get(0); assertTrue("Not an expression statement", statement1.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$ VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) statement1; checkSourceRange(variableDeclarationStatement, "int var= 123", source); //$NON-NLS-1$ List fragments = variableDeclarationStatement.fragments(); assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$ VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment)fragments.get(0); checkSourceRange(variableDeclarationFragment, "var= 123", source); //$NON-NLS-1$ } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=126148 public void test0005() throws JavaModelException { this.workingCopies = new ICompilationUnit[1]; this.workingCopies[0] = getWorkingCopy( "/Converter/src/test/X.java", "package test;\n"+ "\n"+ "public class X {\n"+ " void foo() {\n"+ " String[] s = {\"\",,,};\n"+ " }\n"+ "}\n"); char[] source = this.workingCopies[0].getSource().toCharArray(); ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true); assertASTNodeEquals( "package test;\n" + "public class X {\n" + " void foo(){\n" + " String[] s={\"\",$missing$};\n" + " }\n" + "}\n", result); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull(node); assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$ MethodDeclaration methodDeclaration = (MethodDeclaration) node; Block block = methodDeclaration.getBody(); List statements = block.statements(); assertEquals("wrong size", 1, statements.size()); //$NON-NLS-1$ Statement statement1 = (Statement) statements.get(0); assertTrue("Not an expression variable declaration statement", statement1.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$ VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) statement1; checkSourceRange(variableDeclarationStatement, "String[] s = {\"\",,,};", source); //$NON-NLS-1$ List fragments = variableDeclarationStatement.fragments(); assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$ VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment)fragments.get(0); checkSourceRange(variableDeclarationFragment, "s = {\"\",,,}", source); //$NON-NLS-1$ Expression expression = variableDeclarationFragment.getInitializer(); assertTrue("Not an array initializer", expression.getNodeType() == ASTNode.ARRAY_INITIALIZER); //$NON-NLS-1$ ArrayInitializer arrayInitializer = (ArrayInitializer) expression; checkSourceRange(arrayInitializer, "{\"\",,,}", source); //$NON-NLS-1$ List expressions = arrayInitializer.expressions(); assertEquals("wrong size", 2, expressions.size()); //$NON-NLS-1$ Expression expression1 = (Expression) expressions.get(0); assertTrue("Not a string literal", expression1.getNodeType() == ASTNode.STRING_LITERAL); //$NON-NLS-1$ StringLiteral stringLiteral = (StringLiteral) expression1; checkSourceRange(stringLiteral, "\"\"", source); //$NON-NLS-1$ Expression expression2 = (Expression) expressions.get(1); assertTrue("Not a string literal", expression2.getNodeType() == ASTNode.SIMPLE_NAME); //$NON-NLS-1$ SimpleName simpleName = (SimpleName) expression2; checkSourceRange(simpleName, ",", source); //$NON-NLS-1$ } // check RECOVERED flag (insert tokens) public void test0006() throws JavaModelException { this.workingCopies = new ICompilationUnit[1]; this.workingCopies[0] = getWorkingCopy( "/Converter/src/test/X.java", "package test;\n"+ "\n"+ "public class X {\n"+ " void foo() {\n"+ " bar()\n"+ " }\n"+ "}\n"); char[] source = this.workingCopies[0].getSource().toCharArray(); ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true); assertASTNodeEquals( "package test;\n" + "public class X {\n" + " void foo(){\n" + " bar();\n" + " }\n" + "}\n", result); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull(node); assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$ MethodDeclaration methodDeclaration = (MethodDeclaration) node; assertTrue("Flag as RECOVERED", (methodDeclaration.getFlags() & ASTNode.RECOVERED) == 0); Block block = methodDeclaration.getBody(); assertTrue("Flag as RECOVERED", (block.getFlags() & ASTNode.RECOVERED) == 0); List statements = block.statements(); assertEquals("wrong size", 1, statements.size()); //$NON-NLS-1$ Statement statement = (Statement) statements.get(0); assertTrue("Not an expression statement", statement.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$ ExpressionStatement expressionStatement = (ExpressionStatement) statement; checkSourceRange(expressionStatement, "bar()", source); //$NON-NLS-1$ assertTrue("Not flag as RECOVERED", (expressionStatement.getFlags() & ASTNode.RECOVERED) != 0); Expression expression = expressionStatement.getExpression(); assertTrue("Not a method invocation", expression.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$ MethodInvocation methodInvocation = (MethodInvocation)expression; checkSourceRange(methodInvocation, "bar()", source); //$NON-NLS-1$ assertTrue("Flag as RECOVERED", (methodInvocation.getFlags() & ASTNode.RECOVERED) == 0); } // check RECOVERED flag (insert tokens) public void test0007() throws JavaModelException { this.workingCopies = new ICompilationUnit[1]; this.workingCopies[0] = getWorkingCopy( "/Converter/src/test/X.java", "package test;\n"+ "\n"+ "public class X {\n"+ " void foo() {\n"+ " bar(baz()\n"+ " }\n"+ "}\n"); char[] source = this.workingCopies[0].getSource().toCharArray(); ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true); assertASTNodeEquals( "package test;\n" + "public class X {\n" + " void foo(){\n" + " bar(baz());\n" + " }\n" + "}\n", result); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull(node); assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$ MethodDeclaration methodDeclaration = (MethodDeclaration) node; assertTrue("Flag as RECOVERED", (methodDeclaration.getFlags() & ASTNode.RECOVERED) == 0); Block block = methodDeclaration.getBody(); assertTrue("Flag as RECOVERED", (block.getFlags() & ASTNode.RECOVERED) == 0); List statements = block.statements(); assertEquals("wrong size", 1, statements.size()); //$NON-NLS-1$ Statement statement = (Statement) statements.get(0); assertTrue("Not an expression statement", statement.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$ ExpressionStatement expressionStatement = (ExpressionStatement) statement; checkSourceRange(expressionStatement, "bar(baz()", source); //$NON-NLS-1$ assertTrue("Not flag as RECOVERED", (expressionStatement.getFlags() & ASTNode.RECOVERED) != 0); Expression expression = expressionStatement.getExpression(); assertTrue("Not a method invocation", expression.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$ MethodInvocation methodInvocation = (MethodInvocation)expression; checkSourceRange(methodInvocation, "bar(baz()", source); //$NON-NLS-1$ assertTrue("Not flag as RECOVERED", (methodInvocation.getFlags() & ASTNode.RECOVERED) != 0); List arguments = methodInvocation.arguments(); assertEquals("wrong size", 1, arguments.size()); //$NON-NLS-1$ Expression argument = (Expression) arguments.get(0); assertTrue("Not a method invocation", argument.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$ MethodInvocation methodInvocation2 = (MethodInvocation) argument; checkSourceRange(methodInvocation2, "baz()", source); //$NON-NLS-1$ assertTrue("Flag as RECOVERED", (methodInvocation2.getFlags() & ASTNode.RECOVERED) == 0); } // check RECOVERED flag (insert tokens) public void test0008() throws JavaModelException { this.workingCopies = new ICompilationUnit[1]; this.workingCopies[0] = getWorkingCopy( "/Converter/src/test/X.java", "package test;\n"+ "\n"+ "public class X {\n"+ " void foo() {\n"+ " for(int i\n"+ " }\n"+ "}\n"); char[] source = this.workingCopies[0].getSource().toCharArray(); ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true); assertASTNodeEquals( "package test;\n" + "public class X {\n" + " void foo(){\n" + " for (int i; ; ) ;\n" + " }\n" + "}\n", result); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull(node); assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$ MethodDeclaration methodDeclaration = (MethodDeclaration) node; assertTrue("Flag as RECOVERED", (methodDeclaration.getFlags() & ASTNode.RECOVERED) == 0); Block block = methodDeclaration.getBody(); assertTrue("Not flag as RECOVERED", (block.getFlags() & ASTNode.RECOVERED) != 0); List statements = block.statements(); assertEquals("wrong size", 1, statements.size()); //$NON-NLS-1$ Statement statement = (Statement) statements.get(0); assertTrue("Not a for statement", statement.getNodeType() == ASTNode.FOR_STATEMENT); //$NON-NLS-1$ ForStatement forStatement = (ForStatement) statement; checkSourceRange(forStatement, "for(int i", source); //$NON-NLS-1$ assertTrue("Not flag as RECOVERED", (forStatement.getFlags() & ASTNode.RECOVERED) != 0); List initializers = forStatement.initializers(); assertEquals("wrong size", 1, statements.size()); //$NON-NLS-1$ Expression expression = (Expression)initializers.get(0); assertTrue("Not a method invocation", expression.getNodeType() == ASTNode.VARIABLE_DECLARATION_EXPRESSION); //$NON-NLS-1$ VariableDeclarationExpression variableDeclarationExpression = (VariableDeclarationExpression)expression; checkSourceRange(variableDeclarationExpression, "int i", source); //$NON-NLS-1$ assertTrue("Not flag as RECOVERED", (variableDeclarationExpression.getFlags() & ASTNode.RECOVERED) != 0); List fragments = variableDeclarationExpression.fragments(); assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$ VariableDeclarationFragment fragment = (VariableDeclarationFragment)fragments.get(0); checkSourceRange(fragment, "i", source); //$NON-NLS-1$ assertTrue("Not flag as RECOVERED", (fragment.getFlags() & ASTNode.RECOVERED) != 0); SimpleName name = fragment.getName(); checkSourceRange(name, "i", source); //$NON-NLS-1$ assertTrue("Flag as RECOVERED", (name.getFlags() & ASTNode.RECOVERED) == 0); Statement statement2 = forStatement.getBody(); assertTrue("Not an empty statement", statement2.getNodeType() == ASTNode.EMPTY_STATEMENT); //$NON-NLS-1$ EmptyStatement emptyStatement = (EmptyStatement)statement2; assertEquals("Wrong start position", fragment.getStartPosition() + fragment.getLength(), emptyStatement.getStartPosition()); assertEquals("Wrong length", 0, emptyStatement.getLength()); assertTrue("Not flag as RECOVERED", (emptyStatement.getFlags() & ASTNode.RECOVERED) != 0); } // check RECOVERED flag (remove tokens) public void test0009() throws JavaModelException { this.workingCopies = new ICompilationUnit[1]; this.workingCopies[0] = getWorkingCopy( "/Converter/src/test/X.java", "package test;\n"+ "\n"+ "public class X {\n"+ " void foo() {\n"+ " bar(baz());#\n"+ " }\n"+ "}\n"); char[] source = this.workingCopies[0].getSource().toCharArray(); ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true); assertASTNodeEquals( "package test;\n" + "public class X {\n" + " void foo(){\n" + " bar(baz());\n" + " }\n" + "}\n", result); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull(node); assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$ MethodDeclaration methodDeclaration = (MethodDeclaration) node; assertTrue("Flag as RECOVERED", (methodDeclaration.getFlags() & ASTNode.RECOVERED) == 0); Block block = methodDeclaration.getBody(); assertTrue("Not flag as RECOVERED", (block.getFlags() & ASTNode.RECOVERED) != 0); List statements = block.statements(); assertEquals("wrong size", 1, statements.size()); //$NON-NLS-1$ Statement statement = (Statement) statements.get(0); assertTrue("Not an expression statement", statement.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$ ExpressionStatement expressionStatement = (ExpressionStatement) statement; checkSourceRange(expressionStatement, "bar(baz());", source); //$NON-NLS-1$ assertTrue("Flag as RECOVERED", (expressionStatement.getFlags() & ASTNode.RECOVERED) == 0); Expression expression = expressionStatement.getExpression(); assertTrue("Not a method invocation", expression.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$ MethodInvocation methodInvocation = (MethodInvocation)expression; checkSourceRange(methodInvocation, "bar(baz())", source); //$NON-NLS-1$ assertTrue("Flag as RECOVERED", (methodInvocation.getFlags() & ASTNode.RECOVERED) == 0); List arguments = methodInvocation.arguments(); assertEquals("wrong size", 1, arguments.size()); //$NON-NLS-1$ Expression argument = (Expression) arguments.get(0); assertTrue("Not a method invocation", argument.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$ MethodInvocation methodInvocation2 = (MethodInvocation) argument; checkSourceRange(methodInvocation2, "baz()", source); //$NON-NLS-1$ assertTrue("Flag as RECOVERED", (methodInvocation2.getFlags() & ASTNode.RECOVERED) == 0); } // check RECOVERED flag (remove tokens) public void test0010() throws JavaModelException { this.workingCopies = new ICompilationUnit[1]; this.workingCopies[0] = getWorkingCopy( "/Converter/src/test/X.java", "package test;\n"+ "\n"+ "public class X {\n"+ " void foo() {\n"+ " bar(baz())#;\n"+ " }\n"+ "}\n"); char[] source = this.workingCopies[0].getSource().toCharArray(); ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true); assertASTNodeEquals( "package test;\n" + "public class X {\n" + " void foo(){\n" + " bar(baz());\n" + " }\n" + "}\n", result); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull(node); assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$ MethodDeclaration methodDeclaration = (MethodDeclaration) node; assertTrue("Flag as RECOVERED", (methodDeclaration.getFlags() & ASTNode.RECOVERED) == 0); Block block = methodDeclaration.getBody(); assertTrue("Flag as RECOVERED", (block.getFlags() & ASTNode.RECOVERED) == 0); List statements = block.statements(); assertEquals("wrong size", 1, statements.size()); //$NON-NLS-1$ Statement statement = (Statement) statements.get(0); assertTrue("Not an expression statement", statement.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$ ExpressionStatement expressionStatement = (ExpressionStatement) statement; checkSourceRange(expressionStatement, "bar(baz())#;", source); //$NON-NLS-1$ assertTrue("Not flag as RECOVERED", (expressionStatement.getFlags() & ASTNode.RECOVERED) != 0); Expression expression = expressionStatement.getExpression(); assertTrue("Not a method invocation", expression.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$ MethodInvocation methodInvocation = (MethodInvocation)expression; checkSourceRange(methodInvocation, "bar(baz())", source); //$NON-NLS-1$ assertTrue("Flag as RECOVERED", (methodInvocation.getFlags() & ASTNode.RECOVERED) == 0); List arguments = methodInvocation.arguments(); assertEquals("wrong size", 1, arguments.size()); //$NON-NLS-1$ Expression argument = (Expression) arguments.get(0); assertTrue("Not a method invocation", argument.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$ MethodInvocation methodInvocation2 = (MethodInvocation) argument; checkSourceRange(methodInvocation2, "baz()", source); //$NON-NLS-1$ assertTrue("Flag as RECOVERED", (methodInvocation2.getFlags() & ASTNode.RECOVERED) == 0); } // check RECOVERED flag (remove tokens) public void test0011() throws JavaModelException { this.workingCopies = new ICompilationUnit[1]; this.workingCopies[0] = getWorkingCopy( "/Converter/src/test/X.java", "package test;\n"+ "\n"+ "public class X {\n"+ " void foo() {\n"+ " bar(baz()#);\n"+ " }\n"+ "}\n"); char[] source = this.workingCopies[0].getSource().toCharArray(); ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true); assertASTNodeEquals( "package test;\n" + "public class X {\n" + " void foo(){\n" + " bar(baz());\n" + " }\n" + "}\n", result); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull(node); assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$ MethodDeclaration methodDeclaration = (MethodDeclaration) node; assertTrue("Flag as RECOVERED", (methodDeclaration.getFlags() & ASTNode.RECOVERED) == 0); Block block = methodDeclaration.getBody(); assertTrue("Flag as RECOVERED", (block.getFlags() & ASTNode.RECOVERED) == 0); List statements = block.statements(); assertEquals("wrong size", 1, statements.size()); //$NON-NLS-1$ Statement statement = (Statement) statements.get(0); assertTrue("Not an expression statement", statement.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$ ExpressionStatement expressionStatement = (ExpressionStatement) statement; checkSourceRange(expressionStatement, "bar(baz()#);", source); //$NON-NLS-1$ assertTrue("Flag as RECOVERED", (expressionStatement.getFlags() & ASTNode.RECOVERED) == 0); Expression expression = expressionStatement.getExpression(); assertTrue("Not a method invocation", expression.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$ MethodInvocation methodInvocation = (MethodInvocation)expression; checkSourceRange(methodInvocation, "bar(baz()#)", source); //$NON-NLS-1$ assertTrue("Not flag as RECOVERED", (methodInvocation.getFlags() & ASTNode.RECOVERED) != 0); List arguments = methodInvocation.arguments(); assertEquals("wrong size", 1, arguments.size()); //$NON-NLS-1$ Expression argument = (Expression) arguments.get(0); assertTrue("Not a method invocation", argument.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$ MethodInvocation methodInvocation2 = (MethodInvocation) argument; checkSourceRange(methodInvocation2, "baz()", source); //$NON-NLS-1$ assertTrue("Flag as RECOVERED", (methodInvocation2.getFlags() & ASTNode.RECOVERED) == 0); } // check RECOVERED flag (insert tokens) public void test0012() throws JavaModelException { this.workingCopies = new ICompilationUnit[1]; this.workingCopies[0] = getWorkingCopy( "/Converter/src/test/X.java", "package test;\n"+ "\n"+ "public class X {\n"+ " void foo() {\n"+ " bar()#\n"+ " }\n"+ "}\n"); char[] source = this.workingCopies[0].getSource().toCharArray(); ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true); assertASTNodeEquals( "package test;\n" + "public class X {\n" + " void foo(){\n" + " bar();\n" + " }\n" + "}\n", result); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull(node); assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$ MethodDeclaration methodDeclaration = (MethodDeclaration) node; assertTrue("Flag as RECOVERED", (methodDeclaration.getFlags() & ASTNode.RECOVERED) == 0); Block block = methodDeclaration.getBody(); assertTrue("Flag as RECOVERED", (block.getFlags() & ASTNode.RECOVERED) == 0); List statements = block.statements(); assertEquals("wrong size", 1, statements.size()); //$NON-NLS-1$ Statement statement = (Statement) statements.get(0); assertTrue("Not an expression statement", statement.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$ ExpressionStatement expressionStatement = (ExpressionStatement) statement; checkSourceRange(expressionStatement, "bar()#", source); //$NON-NLS-1$ assertTrue("Not flag as RECOVERED", (expressionStatement.getFlags() & ASTNode.RECOVERED) != 0); Expression expression = expressionStatement.getExpression(); assertTrue("Not a method invocation", expression.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$ MethodInvocation methodInvocation = (MethodInvocation)expression; checkSourceRange(methodInvocation, "bar()", source); //$NON-NLS-1$ assertTrue("Flag as RECOVERED", (methodInvocation.getFlags() & ASTNode.RECOVERED) == 0); } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=129555 public void test0013() throws JavaModelException { this.workingCopies = new ICompilationUnit[1]; this.workingCopies[0] = getWorkingCopy( "/Converter/src/test/X.java", "package test;\n"+ "\n"+ "public class X {\n"+ " void foo() {\n"+ " a[0]\n"+ " }\n"+ "}\n"); char[] source = this.workingCopies[0].getSource().toCharArray(); ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true); assertASTNodeEquals( "package test;\n" + "public class X {\n" + " void foo(){\n" + " a[0]=$missing$;\n" + " }\n" + "}\n", result); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull(node); assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$ MethodDeclaration methodDeclaration = (MethodDeclaration) node; assertTrue("Flag as RECOVERED", (methodDeclaration.getFlags() & ASTNode.RECOVERED) == 0); Block block = methodDeclaration.getBody(); assertTrue("Flag as RECOVERED", (block.getFlags() & ASTNode.RECOVERED) != 0); List statements = block.statements(); assertEquals("wrong size", 1, statements.size()); //$NON-NLS-1$ Statement statement = (Statement) statements.get(0); assertTrue("Not an expression statement", statement.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$ ExpressionStatement expressionStatement = (ExpressionStatement) statement; checkSourceRange(expressionStatement, "a[0]", source); //$NON-NLS-1$ assertTrue("Not flag as RECOVERED", (expressionStatement.getFlags() & ASTNode.RECOVERED) != 0); Expression expression = expressionStatement.getExpression(); assertTrue("Not an assigment", expression.getNodeType() == ASTNode.ASSIGNMENT); //$NON-NLS-1$ Assignment assignment = (Assignment)expression; checkSourceRange(assignment, "a[0]", source); //$NON-NLS-1$ assertTrue("Flag as RECOVERED", (assignment.getFlags() & ASTNode.RECOVERED) != 0); Expression rhs = assignment.getRightHandSide(); assertTrue("Not a simple name", rhs.getNodeType() == ASTNode.SIMPLE_NAME); //$NON-NLS-1$ SimpleName simpleName = (SimpleName) rhs; assertEquals("Not length isn't correct", 0, simpleName.getLength()); //$NON-NLS-1$ } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=129909 public void test0014() throws JavaModelException { this.workingCopies = new ICompilationUnit[1]; this.workingCopies[0] = getWorkingCopy( "/Converter/src/test/X.java", "package test;\n"+ "\n"+ "public class X {\n"+ " void foo() {\n"+ " int[] = a[0];\n"+ " }\n"+ "}\n"); char[] source = this.workingCopies[0].getSource().toCharArray(); ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true); assertASTNodeEquals( "package test;\n" + "public class X {\n" + " void foo(){\n" + " int[] $missing$=a[0];\n" + " }\n" + "}\n", result); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull(node); assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$ MethodDeclaration methodDeclaration = (MethodDeclaration) node; assertTrue("Flag as RECOVERED", (methodDeclaration.getFlags() & ASTNode.RECOVERED) == 0); Block block = methodDeclaration.getBody(); assertTrue("Flag as RECOVERED", (block.getFlags() & ASTNode.RECOVERED) == 0); List statements = block.statements(); assertEquals("wrong size", 1, statements.size()); //$NON-NLS-1$ Statement statement = (Statement) statements.get(0); assertTrue("Not a variable declaration statement", statement.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$ VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) statement; checkSourceRange(variableDeclarationStatement, "int[] = a[0];", source); //$NON-NLS-1$ assertTrue("Not flag as RECOVERED", (variableDeclarationStatement.getFlags() & ASTNode.RECOVERED) != 0); List fragments = variableDeclarationStatement.fragments(); VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0); SimpleName simpleName = fragment.getName(); assertEquals("Not length isn't correct", 0, simpleName.getLength()); //$NON-NLS-1$ } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=143212 public void test0015() throws JavaModelException { this.workingCopies = new ICompilationUnit[1]; this.workingCopies[0] = getWorkingCopy( "/Converter/src/test/X.java", "package test;\n"+ "\n"+ "public class X {\n"+ " void foo() {\n"+ " assert 0 == 0 : a[0;\n"+ " }\n"+ "}\n"); char[] source = this.workingCopies[0].getSource().toCharArray(); ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true); assertASTNodeEquals( "package test;\n" + "public class X {\n" + " void foo(){\n" + " assert 0 == 0 : a[0];\n" + " }\n" + "}\n", result); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull(node); assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$ MethodDeclaration methodDeclaration = (MethodDeclaration) node; assertTrue("Flag as RECOVERED", (methodDeclaration.getFlags() & ASTNode.RECOVERED) == 0); Block block = methodDeclaration.getBody(); assertTrue("Flag as RECOVERED", (block.getFlags() & ASTNode.RECOVERED) == 0); List statements = block.statements(); assertEquals("wrong size", 1, statements.size()); //$NON-NLS-1$ Statement statement = (Statement) statements.get(0); assertTrue("Not an assert statement", statement.getNodeType() == ASTNode.ASSERT_STATEMENT); //$NON-NLS-1$ AssertStatement assertStatement = (AssertStatement) statement; checkSourceRange(assertStatement, "assert 0 == 0 : a[0;", source); //$NON-NLS-1$ assertTrue("Flag as RECOVERED", (assertStatement.getFlags() & ASTNode.RECOVERED) == 0); Expression message = assertStatement.getMessage(); assertTrue("No message expression", message != null); //$NON-NLS-1$ checkSourceRange(message, "a[0", source); //$NON-NLS-1$ assertTrue("Not flag as RECOVERED", (message.getFlags() & ASTNode.RECOVERED) != 0); } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=143212 public void test0016() throws JavaModelException { this.workingCopies = new ICompilationUnit[1]; this.workingCopies[0] = getWorkingCopy( "/Converter/src/test/X.java", "package test;\n"+ "\n"+ "public class X {\n"+ " void foo() {\n"+ " assert 0 == 0 : foo(;\n"+ " }\n"+ "}\n"); char[] source = this.workingCopies[0].getSource().toCharArray(); ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true); assertASTNodeEquals( "package test;\n" + "public class X {\n" + " void foo(){\n" + " assert 0 == 0 : foo();\n" + " }\n" + "}\n", result); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull(node); assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$ MethodDeclaration methodDeclaration = (MethodDeclaration) node; assertTrue("Flag as RECOVERED", (methodDeclaration.getFlags() & ASTNode.RECOVERED) == 0); Block block = methodDeclaration.getBody(); assertTrue("Flag as RECOVERED", (block.getFlags() & ASTNode.RECOVERED) == 0); List statements = block.statements(); assertEquals("wrong size", 1, statements.size()); //$NON-NLS-1$ Statement statement = (Statement) statements.get(0); assertTrue("Not an assert statement", statement.getNodeType() == ASTNode.ASSERT_STATEMENT); //$NON-NLS-1$ AssertStatement assertStatement = (AssertStatement) statement; checkSourceRange(assertStatement, "assert 0 == 0 : foo(;", source); //$NON-NLS-1$ assertTrue("Flag as RECOVERED", (assertStatement.getFlags() & ASTNode.RECOVERED) == 0); Expression message = assertStatement.getMessage(); assertTrue("No message expression", message != null); //$NON-NLS-1$ checkSourceRange(message, "foo(", source); //$NON-NLS-1$ assertTrue("Not flag as RECOVERED", (message.getFlags() & ASTNode.RECOVERED) != 0); } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=143212 public void test0017() throws JavaModelException { this.workingCopies = new ICompilationUnit[1]; this.workingCopies[0] = getWorkingCopy( "/Converter/src/test/X.java", "package test;\n"+ "\n"+ "public class X {\n"+ " void foo() {\n"+ " assert 0 == 0 : (\"aa\";\n"+ " }\n"+ "}\n"); char[] source = this.workingCopies[0].getSource().toCharArray(); ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true); assertASTNodeEquals( "package test;\n" + "public class X {\n" + " void foo(){\n" + " assert 0 == 0 : (\"aa\");\n" + " }\n" + "}\n", result); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull(node); assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$ MethodDeclaration methodDeclaration = (MethodDeclaration) node; assertTrue("Flag as RECOVERED", (methodDeclaration.getFlags() & ASTNode.RECOVERED) == 0); Block block = methodDeclaration.getBody(); assertTrue("Flag as RECOVERED", (block.getFlags() & ASTNode.RECOVERED) == 0); List statements = block.statements(); assertEquals("wrong size", 1, statements.size()); //$NON-NLS-1$ Statement statement = (Statement) statements.get(0); assertTrue("Not an assert statement", statement.getNodeType() == ASTNode.ASSERT_STATEMENT); //$NON-NLS-1$ AssertStatement assertStatement = (AssertStatement) statement; checkSourceRange(assertStatement, "assert 0 == 0 : (\"aa\";", source); //$NON-NLS-1$ assertTrue("Flag as RECOVERED", (assertStatement.getFlags() & ASTNode.RECOVERED) == 0); Expression message = assertStatement.getMessage(); assertTrue("No message expression", message != null); //$NON-NLS-1$ checkSourceRange(message, "(\"aa\"", source); //$NON-NLS-1$ assertTrue("Not flag as RECOVERED", (message.getFlags() & ASTNode.RECOVERED) != 0); } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=239117 public void test0018() throws JavaModelException { this.workingCopies = new ICompilationUnit[0]; ASTResult result = this.buildMarkedAST( "/Converter/src/p/X.java", "package p;\n" + "public class X {\n" + " void m(Object var) {\n" + " if (1==1 && var.equals(1)[*1*][*1*] {\n" + " }\n" + " }\n" + "}"); assertASTResult( "===== AST =====\n" + "package p;\n" + "public class X {\n" + " void m( Object var){\n" + " if (1 == 1 && var.equals(1)) [*1*];[*1*]\n" + " }\n" + "}\n" + "\n" + "===== Details =====\n" + "1:EMPTY_STATEMENT,[77,0],,RECOVERED,[N/A]\n" + "===== Problems =====\n" + "1. ERROR in /Converter/src/p/X.java (at line 4)\n" + " if (1==1 && var.equals(1) {\n" + " ^^^^^^\n" + "The method equals(Object) in the type Object is not applicable for the arguments (int)\n" + "2. ERROR in /Converter/src/p/X.java (at line 4)\n" + " if (1==1 && var.equals(1) {\n" + " ^\n" + "Syntax error, insert \") Statement\" to complete BlockStatements\n", result); } }
[ "375833274@qq.com" ]
375833274@qq.com
dd12b9ea2958f465f44aa4d6aa7ac2b105e7e360
d55c86642807d5dab2ceaadd2fa93d4d02b691dd
/app/src/main/java/com/trying/developing/cookbaking/ui/NewAppWidget.java
dc8ee1a0c58dc1323f54e1c0b53badee09b69acc
[]
no_license
Magedsaad/CookBaking
1bff03eac2aeaaabd8492696e86e35a4d86e8430
405120be53cc78581b1c0a40732e6f0006c13bf9
refs/heads/master
2020-03-12T09:16:39.232269
2018-04-22T08:31:29
2018-04-22T08:31:29
130,549,180
0
0
null
null
null
null
UTF-8
Java
false
false
1,532
java
package com.trying.developing.cookbaking.ui; import android.appwidget.AppWidgetManager; import android.appwidget.AppWidgetProvider; import android.content.Context; import android.widget.RemoteViews; import com.trying.developing.cookbaking.R; /** * Implementation of App Widget functionality. */ public class NewAppWidget extends AppWidgetProvider { static void updateAppWidget(Context context, AppWidgetManager appWidgetManager, int appWidgetId) { CharSequence widgetText = NewAppWidgetConfigureActivity.loadTitlePref(context, appWidgetId); // Construct the RemoteViews object RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.new_app_widget); views.setTextViewText(R.id.appwidget_text, widgetText); // Instruct the widget manager to update the widget appWidgetManager.updateAppWidget(appWidgetId, views); } @Override public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { // There may be multiple widgets active, so update all of them for (int appWidgetId : appWidgetIds) { updateAppWidget(context, appWidgetManager, appWidgetId); } } @Override public void onEnabled(Context context) { // Enter relevant functionality for when the first widget is created } @Override public void onDisabled(Context context) { // Enter relevant functionality for when the last widget is disabled } }
[ "magedabdelkhalik95@gmail.com" ]
magedabdelkhalik95@gmail.com
4d9694ec9cb427e06fe02c1c1ab5eb1b96946d3e
29d2dc4ef86deee41855404457c40b7e3c07fca7
/src/main/java/com/spring/project/recipe/commands/UnitOfMeasureCommand.java
4dace54c296ffbfb9b611ba45a760237cd49d1dd
[]
no_license
SaiKrishna1908/spring-recipe-project
8df755bde93e64ba5dc0649eb9b2adf63fc01e98
e3d83fc68f1bd9b0eb2206fe4952bf4f4b9697a2
refs/heads/master
2022-11-12T21:21:33.015452
2020-06-24T10:52:22
2020-06-24T10:52:22
266,542,074
0
0
null
2020-06-18T08:18:53
2020-05-24T13:02:41
Java
UTF-8
Java
false
false
241
java
package com.spring.project.recipe.commands; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @Getter @Setter @NoArgsConstructor public class UnitOfMeasureCommand { private Long id; private String uom; }
[ "saikrishna05h1@gmail.com" ]
saikrishna05h1@gmail.com
07057501c63fa16bf0a349a6d4fdd9a4ebbe7f0a
1f1976c2221f6f695d1537d9eadfd62c7f55f0b7
/java/src/SampleArrayForm.java
496056a8198144744cf88529e39f1bca32966de4
[]
no_license
jcurlier/hackerrank
f24f89dc666466e5bcae45c810f3d3afefe32ec2
868190050aacbed7f0a0e2ebb08a4ea91467a5e2
refs/heads/master
2021-01-10T09:00:23.187253
2017-01-02T19:25:39
2017-01-02T19:25:39
45,200,512
0
0
null
null
null
null
UTF-8
Java
false
false
649
java
import java.util.Scanner; class SampleArrayForm { static int sumArray(int[] intArray) { int sum = 0; for (int i=0; i<intArray.length; i++) { sum = sum + intArray[i]; } return sum; } public static void main(String[] args) { Scanner in = new Scanner(System.in); int t; int sum; t = in.nextInt(); int[] intArray = new int[t]; for (int i=0; i<t; i++) { intArray[i] = in.nextInt(); } in.close(); sum = sumArray(intArray); System.out.println(sum); } }
[ "jcurlier@gmail.com" ]
jcurlier@gmail.com
d715099279d91789ffa65c658b182213d4c1745f
f5327f2aa365748c73e1dd53064b85252b24071e
/3. Core Java/streams/Q2/Assignment5Q2.java
67b5c0112495fff5d4c0eedc1b49577dce2d3ad0
[]
no_license
TarunKumar-01/TarunKumar
748b21d69ff8f01a7183b425b982e8d4aff0359f
75d885f7adb8d01d49a33168cdea0f72f01e2f19
refs/heads/main
2023-06-09T10:44:47.069356
2021-06-19T03:43:10
2021-06-19T03:43:10
351,071,935
0
0
null
null
null
null
UTF-8
Java
false
false
1,877
java
import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import static java.util.Collections.reverseOrder; public class Assignment5Q2 { public static int maxComments(List<News> news) { HashMap<Integer,Integer> h = (HashMap<Integer, Integer>) news.stream().collect(Collectors.groupingBy(News::getNewsId,Collectors.summingInt(a->1))); int max = 0; int maxKey = 0; for(Map.Entry map:h.entrySet()){ if(max<(int) map.getValue()){ max = (int) map.getValue(); maxKey = (int) map.getKey(); } } return maxKey; } public static int budgetCount (List < News > news) { return (int)news.stream().filter(x-> x.getComment().contains("budget")).count(); } public static String maxCommentsByUser (List < News > news) { HashMap<String,Integer> h = (HashMap<String, Integer>) news.stream().collect(Collectors.groupingBy(News::getCommentByUser,Collectors.summingInt(a->1))); String user = null; int max = 0; for(Map.Entry map:h.entrySet()){ if(max< (int) map.getValue()){ max = (int) map.getValue(); user = (String) map.getKey(); } } return user; } public static Map<String, Integer> sortMaxCommentsByUser (List < News > news) { Map<String,Integer> h = news.stream().collect(Collectors.groupingBy(News::getCommentByUser,Collectors.summingInt(a->1))); Map<String, Integer> s = h.entrySet().stream().sorted(reverseOrder(Map.Entry.comparingByValue())).collect(Collectors.toMap(Map.Entry::getKey,Map.Entry::getValue, (oldValue, newValue)-> oldValue, LinkedHashMap::new)); return s; } public static void main(String[] args) {} }
[ "tarunk17899@gmail.com" ]
tarunk17899@gmail.com
d2220be3d431ab34c12d42a8190f7f564b5ac3e2
0e425cd604d317bac872c54e8af9bd501484cf5d
/SmsSending/src/com/example/smsapp/Recive.java
ba356f5ac2036b3938d2f048355eb8ac1606070d
[]
no_license
vipinvkamara/Database
58a0366277c355340795bfa9f628c5452831362b
64c3249fa8be9bb942cdfad7f65d3890a454d75a
refs/heads/master
2016-08-03T21:35:31.108719
2015-02-13T09:08:51
2015-02-13T09:08:51
30,748,774
0
0
null
null
null
null
UTF-8
Java
false
false
312
java
package com.example.smsapp; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; public class Recive extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.recive_activity); } }
[ "vipinvkamara@hotmail.com" ]
vipinvkamara@hotmail.com
1e61609a94c6f900d5a78be2bbe2bf7d5176420c
0ddca49474f1c8eed90326273f18bcab996d7220
/server/src/main/java/com/csds393/mialexi/controller/BackendController.java
21ab312103685e8963d5bb09723bf1e4f2df919b
[]
no_license
tsepuri/MiaLexi
441eccdef23ebff5ff32e79230bf18cfec7bf3ba
e16f5b342bfcc254c292e326d13687de3d2e3cd4
refs/heads/master
2023-07-11T22:08:12.499380
2021-08-17T14:57:54
2021-08-17T14:57:54
397,294,244
0
1
null
null
null
null
UTF-8
Java
false
false
919
java
package com.csds393.mialexi.controller; import org.springframework.web.bind.annotation.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.boot.web.servlet.error.ErrorController; import org.springframework.web.servlet.ModelAndView; // Forwards all routes to FrontEnd except: '/', '/index.html', '/api', '/api/**' // Required because of 'mode: history' usage in frontend routing, see README for further details @RestController public class BackendController implements ErrorController { private static final String PATH = "/error"; @RequestMapping(value = PATH) public ModelAndView saveLeadQuery() { return new ModelAndView("forward:/"); } @Override public String getErrorPath() { return PATH; } }
[ "starkiller.1413@gmail.com" ]
starkiller.1413@gmail.com
fb2ac67b1b048797f53b5785e1d21166fca955f3
c38508bddde0a6f6639432380bdb8802849f60cb
/school-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
def78303487394f0785303892300aa44c5defaa8
[ "MIT" ]
permissive
organ-xqTeam/campus-management
fe06a043210ea1833d1de04c7331450e980fb430
fcabe667d3140ce84f9ea9ac5a33d596dc00f4d6
refs/heads/master
2022-12-13T20:58:45.433638
2020-06-08T01:48:51
2020-06-08T01:48:51
235,522,776
0
0
MIT
2022-07-06T20:47:04
2020-01-22T07:41:43
JavaScript
UTF-8
Java
false
false
4,850
java
package com.ruoyi.web.controller.common; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.multipart.MultipartFile; import com.ruoyi.common.config.Global; import com.ruoyi.common.config.ServerConfig; import com.ruoyi.common.constant.Constants; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.ueditor.ActionEnter; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.file.FileUploadUtils; import com.ruoyi.common.utils.file.FileUtils; import com.ruoyi.framework.config.RuoYiConfig; /** * 通用请求处理 * * @author ruoyi */ @Controller public class CommonController { private static final Logger log = LoggerFactory.getLogger(CommonController.class); @Autowired private ServerConfig serverConfig; /** * 通用下载请求 * * @param fileName 文件名称 * @param delete 是否删除 */ @GetMapping("common/download") public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request) { try { if (!FileUtils.isValidFilename(fileName)) { throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName)); } String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1); String filePath = Global.getDownloadPath() + fileName; response.setCharacterEncoding("utf-8"); response.setContentType("multipart/form-data"); response.setHeader("Content-Disposition", "attachment;fileName=" + FileUtils.setFileDownloadHeader(request, realFileName)); FileUtils.writeBytes(filePath, response.getOutputStream()); if (delete) { FileUtils.deleteFile(filePath); } } catch (Exception e) { log.error("下载文件失败", e); } } /** * 通用上传请求 */ @PostMapping("/common/upload") @ResponseBody public AjaxResult uploadFile(MultipartFile file) throws Exception { try { // 上传文件路径 String filePath = Global.getUploadPath(); // 上传并返回新文件名称 String fileName = FileUploadUtils.upload(filePath, file); String url = serverConfig.getUrl() + fileName; AjaxResult ajax = AjaxResult.success(); ajax.put("fileName", fileName); ajax.put("url", url); return ajax; } catch (Exception e) { return AjaxResult.error(e.getMessage()); } } @RequestMapping(value="/js/config") public void config(HttpServletRequest request, HttpServletResponse response) { response.setContentType("application/json"); String rootPath = RuoYiConfig.getUploadPath(); try { String exec = new ActionEnter(request, rootPath).exec(); PrintWriter writer = response.getWriter(); writer.write(exec); writer.flush(); writer.close(); } catch (IOException e) { e.printStackTrace(); } } /** * 本地资源通用下载 */ @GetMapping("/common/download/resource") public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response) throws Exception { // 本地资源路径 String localPath = Global.getProfile(); // 数据库资源地址 String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX); // 下载名称 String downloadName = StringUtils.substringAfterLast(downloadPath, "/"); response.setCharacterEncoding("utf-8"); response.setContentType("multipart/form-data"); response.setHeader("Content-Disposition", "attachment;fileName=" + FileUtils.setFileDownloadHeader(request, downloadName)); FileUtils.writeBytes(downloadPath, response.getOutputStream()); } }
[ "XingPanST@DESKTOP-E2I46F7" ]
XingPanST@DESKTOP-E2I46F7
744ee33159a3c40bed718057520ef4df7261f3aa
b9dc06e881b47f1ccc913a1c594fcbf4eda6700b
/superTextlibrary/src/main/java/com/allen/library/BaseTextView.java
932981b3e06fe9c3fddce8a1fc80ff41004d26c8
[]
no_license
wanchunli/GracePlayer
19ed85f8e06b3e998e1b8361180621cceb913c63
f523a85b8337869ccbd41185bc6c7b4c497398cb
refs/heads/master
2021-09-03T21:55:09.941130
2018-01-12T09:36:39
2018-01-12T09:36:39
114,855,121
1
0
null
null
null
null
UTF-8
Java
false
false
4,954
java
package com.allen.library; import android.content.Context; import android.text.InputFilter; import android.text.TextUtils; import android.util.AttributeSet; import android.view.Gravity; import android.widget.LinearLayout; import android.widget.TextView; /** * Created by Allen on 2017/6/29. * <p> * 基础TextView */ public class BaseTextView extends LinearLayout { private Context mContext; private TextView topTextView, centerTextView, bottomTextView; private LinearLayout.LayoutParams topTVParams, centerTVParams, bottomTVParams; public BaseTextView(Context context) { this(context, null); } public BaseTextView(Context context, AttributeSet attrs) { this(context, attrs, 0); } public BaseTextView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); this.setOrientation(VERTICAL); mContext = context; initView(); } private void initView() { initTopView(); initCenterView(); initBottomView(); } private void initTopView() { if (topTVParams == null) { topTVParams = getParams(topTVParams); } if (topTextView == null) { topTextView = initTextView(topTVParams, topTextView); } } private void initCenterView() { if (centerTVParams == null) { centerTVParams = getParams(centerTVParams); } if (centerTextView == null) { centerTextView = initTextView(centerTVParams, centerTextView); } } private void initBottomView() { if (bottomTVParams == null) { bottomTVParams = getParams(bottomTVParams); } if (bottomTextView == null) { bottomTextView = initTextView(bottomTVParams, bottomTextView); } } private TextView initTextView(LinearLayout.LayoutParams params, TextView textView) { textView = getTextView(textView, params); // textView.setGravity(Gravity.CENTER); addView(textView); return textView; } /** * 初始化textView * * @param textView 对象 * @param layoutParams 对象 * @return 返回 */ public TextView getTextView(TextView textView, LinearLayout.LayoutParams layoutParams) { if (textView == null) { textView = new TextView(mContext); textView.setLayoutParams(layoutParams); textView.setVisibility(GONE); } return textView; } /** * 初始化Params * * @param params 对象 * @return 返回 */ public LayoutParams getParams(LayoutParams params) { if (params == null) { // TODO: 2017/7/21 问题记录 :之前设置 MATCH_PARENT导致每次重新设置string的时候,textView的宽度都已第一次为准,在列表中使用的时候服用出现混乱,特此记录一下,以后处理好布局之间套用时候设置WRAP_CONTENT和MATCH_PARENT出现问题 params = new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); } return params; } private void setTextString(TextView textView, CharSequence textString) { textView.setText(textString); if (!TextUtils.isEmpty(textString)) { textView.setVisibility(VISIBLE); } } public void setTopTextString(CharSequence s) { setTextString(topTextView, s); } public void setCenterTextString(CharSequence s) { setTextString(centerTextView, s); } public void setBottomTextString(CharSequence s) { setTextString(bottomTextView, s); } public TextView getTopTextView() { return topTextView; } public TextView getCenterTextView() { return centerTextView; } public TextView getBottomTextView() { return bottomTextView; } public void setMaxEms(int topMaxEms, int centerMaxEms, int bottomMaxEms) { if (topMaxEms != 0) { topTextView.setEllipsize(TextUtils.TruncateAt.END); topTextView.setFilters(new InputFilter[]{new InputFilter.LengthFilter(topMaxEms)}); } if (centerMaxEms != 0) { centerTextView.setEllipsize(TextUtils.TruncateAt.END); centerTextView.setFilters(new InputFilter[]{new InputFilter.LengthFilter(centerMaxEms)}); } if (bottomMaxEms != 0) { bottomTextView.setEllipsize(TextUtils.TruncateAt.END); bottomTextView.setFilters(new InputFilter[]{new InputFilter.LengthFilter(bottomMaxEms)}); } } public void setCenterSpaceHeight(int centerSpaceHeight) { topTVParams.setMargins(0, 0, 0, centerSpaceHeight / 2); centerTVParams.setMargins(0, centerSpaceHeight / 2, 0, centerSpaceHeight / 2); bottomTVParams.setMargins(0, centerSpaceHeight / 2, 0, 0); } }
[ "1596900283@qq.com" ]
1596900283@qq.com
0179b87366fc45e0e599daeedbbbacbf4422429c
90ad5696a7c20e9e74b995504c66b71d6b521772
/plugins/org.mondo.ifc.cstudy.metamodel.edit/src/org/bimserver/models/ifc2x3tc1/provider/IfcPumpTypeItemProvider.java
fd00ab40d399176e4c6f517ea04946874cfa250c
[]
no_license
mondo-project/mondo-demo-bim
5bbdffa5a61805256e476ec2fa84d6d93aeea29f
96d673eb14e5c191ea4ae7985eee4a10ac51ffec
refs/heads/master
2016-09-13T11:53:26.773266
2016-06-02T20:02:05
2016-06-02T20:02:05
56,190,032
1
0
null
null
null
null
UTF-8
Java
false
false
3,886
java
/** */ package org.bimserver.models.ifc2x3tc1.provider; import java.util.Collection; import java.util.List; import org.bimserver.models.ifc2x3tc1.Ifc2x3tc1Package; import org.bimserver.models.ifc2x3tc1.IfcPumpType; import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ViewerNotification; /** * This is the item provider adapter for a {@link org.bimserver.models.ifc2x3tc1.IfcPumpType} object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public class IfcPumpTypeItemProvider extends IfcFlowMovingDeviceTypeItemProvider { /** * This constructs an instance from a factory and a notifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public IfcPumpTypeItemProvider(AdapterFactory adapterFactory) { super(adapterFactory); } /** * This returns the property descriptors for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); addPredefinedTypePropertyDescriptor(object); } return itemPropertyDescriptors; } /** * This adds a property descriptor for the Predefined Type feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected void addPredefinedTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IfcPumpType_PredefinedType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IfcPumpType_PredefinedType_feature", "_UI_IfcPumpType_type"), Ifc2x3tc1Package.eINSTANCE.getIfcPumpType_PredefinedType(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } /** * This returns IfcPumpType.gif. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object getImage(Object object) { return overlayImage(object, getResourceLocator().getImage("full/obj16/IfcPumpType")); } /** * This returns the label text for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public String getText(Object object) { String label = ((IfcPumpType)object).getName(); return label == null || label.length() == 0 ? getString("_UI_IfcPumpType_type") : getString("_UI_IfcPumpType_type") + " " + label; } /** * This handles model notifications by calling {@link #updateChildren} to update any cached * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void notifyChanged(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(IfcPumpType.class)) { case Ifc2x3tc1Package.IFC_PUMP_TYPE__PREDEFINED_TYPE: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } super.notifyChanged(notification); } /** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); } }
[ "debreceni@mit.bme.hu" ]
debreceni@mit.bme.hu
10c8b4b58720d880cd5f5949bca99ad6d6009f3e
c4758388da57d23f4b6c2d01c7c06a9a818ed53e
/src/lesson_10.java
689e69dfbf179942fec3591923afa2aad1af76ab
[]
no_license
lienenelien/lesson_10
7e83ca77623b5f686ed7270d90d987ccc09625f2
ff33e76650d95606554162b188f35d09e55f815b
refs/heads/master
2023-06-24T13:02:17.575189
2021-07-19T18:34:03
2021-07-19T18:34:03
387,560,461
0
0
null
null
null
null
UTF-8
Java
false
false
4,603
java
import java.util.Scanner; public class lesson_10 { public static void main(String[] args) { //count how many cups of coffee one has had over the week int[] coffeeArray = new int[7]; coffeeArray[0] = 3; coffeeArray[1] = 2; coffeeArray[2] = 4; coffeeArray[3] = 1; coffeeArray[4] = 2; coffeeArray[5] = 0; coffeeArray[6] = 1; //this is how humans are calculating // int totalCofees = coffeeArray[0] + coffeeArray[1] + coffeeArray[2]... int coffeeCounter = 0; //LOOPS will help to iterate over all elements in an Array for (int i = 0; i < coffeeArray.length; i++) { coffeeCounter += coffeeArray[i]; //cofeeCounter = coffeeCounter + coffeeArray[i]; } System.out.println("Total number of coffee cups during the week: " + coffeeCounter); // int[][] my2DArray = {{1,2,4,7}, {11,12,13,14}, {22,23,24,25}}; // // System.out.println("This is an element of a row index=2 and column index=3: " + my2DArray[2][3]); int[][] ourSecond2DArray = {{125, 91, 90}, {55, 5, 211}, {77, 19, 21}}; System.out.println("This is an element of a row index= 0 and column index= 0: " + ourSecond2DArray[0][0]); System.out.println("This is an element of a row index= 0 and column index= 1: " + ourSecond2DArray[0][1]); System.out.println("This is an element of a row index= 0 and column index= 2: " + ourSecond2DArray[0][2]); System.out.println("This is an element of a row index= 1 and column index= 0: " + ourSecond2DArray[1][0]); System.out.println("This is an element of a row index= 1 and column index= 1: " + ourSecond2DArray[1][1]); System.out.println("This is an element of a row index= 1 and column index= 2: " + ourSecond2DArray[1][2]); System.out.println("This is an element of a row index= 2 and column index= 0: " + ourSecond2DArray[2][0]); System.out.println("This is an element of a row index= 2 and column index= 1: " + ourSecond2DArray[2][1]); System.out.println("This is an element of a row index= 2 and column index= 2: " + ourSecond2DArray[2][2]); System.out.println(); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { System.out.println("Indexes: i= " +i+ "; j= " +j+ "; value = " + ourSecond2DArray[i][j]); } System.out.println(); } // "FOR EACH" loop example (always goes through all the elements) int[] forLoopArray = {5,6,7,1,1}; for ( int internalValue : forLoopArray) { System.out.println("For loop element: " + internalValue); } // "WHILE" loop example int clockTime = 0; while (clockTime <= 24){ System.out.println("The time is " + clockTime + " o'clock"); // clockTime++; clockTime += 3; } //more complex example boolean runWhileLoop = true; while (runWhileLoop) { System.out.println(" variable runWhile loop is still set to be true"); if (clockTime > 30){ runWhileLoop = false; } clockTime++; } //MENU example w/ WHILE loop int menuItem = 99; // random value that is not 0 Scanner scanner = new Scanner(System.in); while (menuItem != 0) { System.out.println("Please select an action you want to do: "); System.out.println("1 - write that you are smart"); System.out.println("2 - write that you are pretty"); System.out.println("3 - write that you are the best!"); System.out.println("0 - Exit the application (but you are still the best!) "); menuItem = scanner.nextInt(); if (menuItem == 1){ System.out.println("You are smart!"); } else if (menuItem == 2) { System.out.println( "You are pretty!"); } else if (menuItem ==3) { System.out.println("You are the best!"); } else { System.out.println("There is no such option!"); } } int initialValue = 10; //WIill not run at all while (initialValue < 5){ System.out.println("WHILE LOOP. Initial value < 5"); } //Will run only once do { System.out.println("DO LOOP. Initial value < 5"); } while ( initialValue < 5); } }
[ "liene.lagzdina25@gmail.com" ]
liene.lagzdina25@gmail.com
5a72d58fca6eff7fa09e03d11553cdcfe76f9526
8dc38db9b47ac76896379f3da46e56845aecb279
/core/src/com/baboviolent/game/gdx/decal/BaboGroupStrategy.java
e91b8a8e4329f78a7f8662cd475a8b661a0aed03
[]
no_license
realitix/babo-old-libgdx
8c71e50fe5b7b53bf8b3d349b4101084084a69a7
e0ff5333d1579d321f9f95da03cc9ff286572a11
refs/heads/master
2020-05-20T11:49:22.542015
2015-03-06T17:16:29
2015-03-06T17:16:29
185,557,008
0
0
null
null
null
null
UTF-8
Java
false
false
1,190
java
package com.baboviolent.game.gdx.decal; import com.badlogic.gdx.graphics.glutils.ShaderProgram; import com.badlogic.gdx.utils.Array; public interface BaboGroupStrategy { /** Returns the shader to be used for the group. Can be null in which case the GroupStrategy doesn't support GLES 2.0 * @param group the group * @return the {@link ShaderProgram} */ public ShaderProgram getGroupShader (int group); /** Assigns a group to a decal * * @param decal Decal to assign group to * @return group assigned */ public int decideGroup (BaboDecal decal); /** Invoked directly before rendering the contents of a group * * @param group Group that will be rendered * @param contents Array of entries of arrays containing all the decals in the group */ public void beforeGroup (int group, Array<BaboDecal> contents); /** Invoked directly after rendering of a group has completed * * @param group Group which completed rendering */ public void afterGroup (int group); /** Invoked before rendering any group */ public void beforeGroups (); /** Invoked after having rendered all groups */ public void afterGroups (); public void beforeFlush (int textureNumber); }
[ "realitix@gmail.com" ]
realitix@gmail.com
4eda8ec74fb4c9c1aba9a4a5fa77a7c381633ee6
7363aa5bfd1406af5094e50a8f2a4077f509897a
/firefly-nettool/src/main/java/com/firefly/net/buffer/ThreadSafeIOBufferPool.java
021650e767de79e37310a0351ca05efb58a99c51
[ "Apache-2.0" ]
permissive
oidwuhaihua/firefly
b3078b8625574ecf227ae7494aa75d073cc77e3d
87f60b4a1bfdc6a2c730adc97de471e86e4c4d8c
refs/heads/master
2021-01-21T05:29:15.914195
2017-02-10T16:35:14
2017-02-10T16:35:14
83,196,072
3
0
null
2017-02-26T09:05:57
2017-02-26T09:05:57
null
UTF-8
Java
false
false
502
java
package com.firefly.net.buffer; import com.firefly.net.BufferPool; import java.nio.ByteBuffer; public class ThreadSafeIOBufferPool implements BufferPool { private final ThreadLocal<BufferPool> safeBufferPool = ThreadLocal.withInitial(IOBufferPool::new); @Override public final ByteBuffer acquire(int size) { return safeBufferPool.get().acquire(size); } @Override public final void release(ByteBuffer buffer) { safeBufferPool.get().release(buffer); } }
[ "qptkk@163.com" ]
qptkk@163.com
1ce9b11dc3341125e1535ac7af376f2cf3c5a455
16c76606a22f95329fb0e29d9264550b7a4c8b38
/app/build/generated/source/apt/debug/com/gradlic/travelmate/friend/MyFriendsAdapter$MyFriendsViewHolder_ViewBinding.java
9cd2d85320f8175c0f783542c70903b1d3eef5ca
[]
no_license
bpallabi1996/final.year.project_v2
b9390cb4b3a0a2b93d60779d420c169b704aa51b
54d7faea0ae181d1c159b98c2180f20f6bc34a94
refs/heads/master
2022-08-01T10:56:23.680494
2020-05-23T16:33:19
2020-05-23T16:33:19
266,367,600
0
0
null
null
null
null
UTF-8
Java
false
false
1,549
java
// Generated code from Butter Knife. Do not modify! package com.gradlic.travelmate.friend; import android.support.annotation.CallSuper; import android.support.annotation.UiThread; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import butterknife.Unbinder; import butterknife.internal.Utils; import com.gradlic.travelmate.R; import java.lang.IllegalStateException; import java.lang.Override; public class MyFriendsAdapter$MyFriendsViewHolder_ViewBinding implements Unbinder { private MyFriendsAdapter.MyFriendsViewHolder target; @UiThread public MyFriendsAdapter$MyFriendsViewHolder_ViewBinding(MyFriendsAdapter.MyFriendsViewHolder target, View source) { this.target = target; target.friendImage = Utils.findRequiredViewAsType(source, R.id.profile_image, "field 'friendImage'", ImageView.class); target.friendDisplayName = Utils.findRequiredViewAsType(source, R.id.friend_display_name, "field 'friendDisplayName'", TextView.class); target.my_friends_linear_layout = Utils.findRequiredViewAsType(source, R.id.my_friends_linear_layout, "field 'my_friends_linear_layout'", LinearLayout.class); } @Override @CallSuper public void unbind() { MyFriendsAdapter.MyFriendsViewHolder target = this.target; if (target == null) throw new IllegalStateException("Bindings already cleared."); this.target = null; target.friendImage = null; target.friendDisplayName = null; target.my_friends_linear_layout = null; } }
[ "60174648+bpallabi1996@users.noreply.github.com" ]
60174648+bpallabi1996@users.noreply.github.com
1650093bcf0085f1d3a119142d5ef64a8d6d7669
ba21b6ff7fc323a290c6c0dc1886673b5ed31cb1
/src/main/java/com/auction/pro/device/dto/DeviceTypeDto.java
4127b2ecd6039761fadb74e03c7a48678994d836
[]
no_license
Ashish-Tuteja/Diagnostic
a3016a80fec911cedccb2fc0590bb9dff38b5db8
0e37a08712a9bfee4ffa45fced0a3b3ec407ca35
refs/heads/master
2022-12-23T12:39:05.326860
2016-06-13T11:43:38
2016-06-13T11:43:38
58,520,799
0
0
null
2022-12-16T03:12:51
2016-05-11T06:48:11
CSS
UTF-8
Java
false
false
748
java
package com.auction.pro.device.dto; import com.auction.pro.common.model.BaseModel; import com.auction.pro.device.model.DeviceType; public class DeviceTypeDto extends BaseModel { /** * */ private static final long serialVersionUID = 1L; private String name; private String code; public DeviceTypeDto() { // TODO Auto-generated constructor stub } public DeviceTypeDto(DeviceType deviceTypeDto) { // TODO Auto-generated constructor stub } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public static long getSerialversionuid() { return serialVersionUID; } }
[ "ashish.tuteja@infoobjects.com" ]
ashish.tuteja@infoobjects.com
9b938a73a34d0966770a6ce687b1fa54799c5042
96b9a47cbe1f6d824740839ea3876edfb51b70ab
/reo/src/main/java/kr/co/reo/common/util/LogAop.java
be960e3b886fa4175bcbdacd7fc235bd328a1585
[]
no_license
myselfub/KOSMO_FinalProject_REO
25a1e66c9adfb8b9ffc4c6c01b76429c1e5e7485
5137585fa2163cc88aea721c193b76f40e2af91c
refs/heads/master
2023-05-10T09:48:21.632724
2021-05-30T03:11:29
2021-05-30T03:11:29
372,109,363
0
0
null
null
null
null
UTF-8
Java
false
false
3,363
java
package kr.co.reo.common.util; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.annotation.AfterThrowing; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; @Aspect @Component("logAop") public class LogAop { private static final Logger logger = LoggerFactory.getLogger(LogAop.class); @Before("execution(* kr.co.reo.admin.*.*(..)) or execution(* kr.co.reo.client.*.*(..))") public void beforeLog(JoinPoint jp) { HttpServletResponse response = ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()) .getResponse(); response.setHeader("Pragma", "No-cache"); response.setHeader("Cache-Control", "No-cache"); response.addHeader("Cache-Control", "No-store"); response.setDateHeader("Expires", 1L); HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()) .getRequest(); String ip = request.getRemoteAddr(); // -Djava.net.preferIPv4Stack=true String mem_email = (String) request.getSession().getAttribute("mem_email"); String email = (mem_email == null) ? "null" : mem_email; String uri = request.getRequestURI(); String method = (request.getMethod() != null ? "(".concat(request.getMethod()).concat(")") : ""); String controller = jp.getSignature().toShortString(); String log = "ip: ".concat(ip).concat(", email: ").concat(email).concat(", uri: ").concat(uri).concat(method) .concat(" / ").concat(controller); logger.info(log); } @AfterThrowing("execution(* kr.co.reo..*.*(..))") public void afterThrowingLog(JoinPoint jp) { HttpServletResponse response = ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()) .getResponse(); response.setHeader("Pragma", "No-cache"); response.setHeader("Cache-Control", "No-cache"); response.addHeader("Cache-Control", "No-store"); response.setDateHeader("Expires", 1L); HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()) .getRequest(); String ip = request.getRemoteAddr(); // -Djava.net.preferIPv4Stack=true String mem_email = (String) request.getSession().getAttribute("mem_email"); String email = (mem_email == null) ? "null" : mem_email; String uri = request.getRequestURI(); String method = (request.getMethod() != null ? "(".concat(request.getMethod()).concat(")") : ""); String controller = jp.getSignature().toShortString(); String log = "ip: ".concat(ip).concat(", email: ").concat(email).concat(", uri: ").concat(uri).concat(method) .concat(" / ").concat(controller); logger.error(log); } public void log(String message, HttpServletRequest request) { String ip = request.getRemoteAddr(); // -Djava.net.preferIPv4Stack=true String mem_email = (String) request.getSession().getAttribute("mem_email"); String email = (mem_email == null) ? "null" : mem_email; String log = "ip: ".concat(ip).concat(", email: ").concat(email).concat(", message: ").concat(message); logger.info(log); } }
[ "myselfub@gmail.com" ]
myselfub@gmail.com
516c7df9169756b22b2aadba4ad4f64e940535bc
967d736eae4c5791ed9c7da80f570cc8efae88c2
/ui/src/main/java/ru/mipt/engocab/ui/fx/EngocabUI.java
2ebf83614bd6d4107247556210f9c277156b3a04
[ "Apache-2.0" ]
permissive
ushakov-av/engocab
b619a0a5293fcff93eabaac70b523bdfd6176de4
cd011047680cce3d6d4ee3ac1d2950ac6fede987
refs/heads/master
2021-01-22T05:51:03.854324
2015-02-08T21:13:42
2015-02-08T21:13:42
27,241,997
0
0
null
null
null
null
UTF-8
Java
false
false
942
java
package ru.mipt.engocab.ui.fx; import javafx.application.Application; import javafx.stage.Stage; import ru.mipt.engocab.core.config.Configuration; import ru.mipt.engocab.core.config.Settings; import ru.mipt.engocab.ui.fx.controller.MainController; import ru.mipt.engocab.ui.fx.model.Model; import ru.mipt.engocab.ui.fx.view.MainStage; /** * @author Alexander Ushakov */ public class EngocabUI extends Application { @Override public void start(Stage primaryStage) throws Exception { Configuration configuration = new Configuration(); Settings settings = configuration.load(); Model model = new Model(); MainController mainController = new MainController(model, primaryStage, settings); mainController.loadDictionary(); MainStage mainStage = new MainStage(primaryStage, model, mainController); mainStage.show(); } public void showUI() { launch(); } }
[ "ushakov.av@gmail.com" ]
ushakov.av@gmail.com
3f9d21cb1f9af4a5410ec29f71fdcaab7a8df093
3a4ada8cf257d750ee31460fc387583611c12d84
/app/src/main/java/fvadevand/reminderformiui/IconPickerPreference.java
7fa18d964b46a67059fa1004b5dc94670d182f15
[]
no_license
FVAdevand/ReminderForMIUI
1b9ae270464bdf8a8ef188f8ae85fdca5c9e5c41
a72f10f805d29fd2552b84fb2ad7f355bdc5720c
refs/heads/master
2021-05-04T20:31:50.336191
2018-02-27T19:09:26
2018-02-27T19:09:32
119,815,278
0
0
null
null
null
null
UTF-8
Java
false
false
1,942
java
package fvadevand.reminderformiui; import android.app.Activity; import android.content.Context; import android.preference.Preference; import android.util.AttributeSet; import android.view.View; import android.widget.ImageView; import fvadevand.reminderformiui.utilities.ReminderUtils; /** * Created by Vladimir on 31.01.2018. * */ public class IconPickerPreference extends Preference implements IconPickerDialog.onIconSetListener { private static final String LOG_TAG = IconPickerPreference.class.getSimpleName(); private static final int DEFAULT_IMAGE_ID = ReminderUtils.getDefaultImageId(); private int mImageId; private ImageView mIconImageView; public IconPickerPreference(Context context) { this(context, null); } public IconPickerPreference(Context context, AttributeSet attrs) { super(context, attrs); mImageId = DEFAULT_IMAGE_ID; setWidgetLayoutResource(R.layout.image_pref); } @Override protected void onBindView(View view) { super.onBindView(view); mIconImageView = view.findViewById(R.id.iv_icon_notification); mIconImageView.setImageResource(mImageId); } @Override protected void onSetInitialValue(boolean restorePersistedValue, Object defaultValue) { if (restorePersistedValue) { mImageId = this.getPersistedInt(DEFAULT_IMAGE_ID); } else { persistInt(DEFAULT_IMAGE_ID); } } @Override protected void onClick() { super.onClick(); Activity activity = (Activity) getContext(); IconPickerDialog dialog = new IconPickerDialog(); dialog.setOnIconSetListener(this); dialog.show(activity.getFragmentManager(), "ImageGridDialog"); } @Override public void onIconSet(int resourceId) { persistInt(resourceId); mImageId = resourceId; mIconImageView.setImageResource(mImageId); } }
[ "pochtauazp@gmail.com" ]
pochtauazp@gmail.com
4f898cf50d7494e42cb4694ed2e2fd737f36655c
e7818f3c8f1a86472c3060993d28f52cbde749b2
/src/ru/barsopen/plsqlconverter/ast/typed/constant_maxvalue.java
556330f502b5f0427c1aa6775dbf656ea2ef33dd
[]
no_license
liuyuanyuan/plsql-pgsql-converter
a9fbc59493b26b9ec06820358617a28cf35bc31a
428c86c09f3be7ef448fe704d7fff4abc90d97e6
refs/heads/master
2020-04-07T12:16:07.250078
2018-11-27T05:56:43
2018-11-27T05:56:43
158,360,845
1
0
null
null
null
null
UTF-8
Java
false
false
3,025
java
package ru.barsopen.plsqlconverter.ast.typed; public class constant_maxvalue implements constant, _baseNode { public int _line = -1; public int _col = -1; public int _tokenStartIndex = -1; public int _tokenStopIndex = -1; public _baseNode _parent = null; public _baseNode _getParent() { return _parent; } public void _setParent(_baseNode value) { _parent = value; } public void _setBaseNode(_baseNode value) { this._parent = value; } public int _getLine() { return _line; } public int _getCol() { return _col; } public int _getTokenStartIndex() { return _tokenStartIndex; } public int _getTokenStopIndex() { return _tokenStopIndex; } ru.barsopen.plsqlconverter.util.AttachedComments _comments; public void setComments(ru.barsopen.plsqlconverter.util.AttachedComments comments) { this._comments = comments; } public ru.barsopen.plsqlconverter.util.AttachedComments getAttachedComments() { return this._comments; } public void _setCol(int col) { this._col = col; } public void _setLine(int line) { this._line = line; } public void _walk(_visitor visitor) { if (!visitor.enter(this)) { return; } visitor.leave(this); } public java.util.List<_baseNode> _getChildren() { java.util.List<_baseNode> result = new java.util.ArrayList<_baseNode>(); return result; } public void _replace(_baseNode child, _baseNode replacement) { throw new RuntimeException("Failed to replace node: no such node"); } public org.antlr.runtime.tree.Tree unparse() { org.antlr.runtime.CommonToken _token = new org.antlr.runtime.CommonToken(ru.barsopen.plsqlconverter.PLSQLPrinter.MAXVALUE_VK); _token.setLine(_line); _token.setCharPositionInLine(_col); _token.setText("MAXVALUE_VK"); org.antlr.runtime.tree.CommonTree _result = new org.antlr.runtime.tree.CommonTree(_token); if (_comments != null) { org.antlr.runtime.tree.CommonTree commentsNode = new org.antlr.runtime.tree.CommonTree( new org.antlr.runtime.CommonToken(ru.barsopen.plsqlconverter.PLSQLPrinter.COMMENT)); org.antlr.runtime.tree.CommonTree commentsBeforeNode = new org.antlr.runtime.tree.CommonTree( new org.antlr.runtime.CommonToken(ru.barsopen.plsqlconverter.PLSQLPrinter.COMMENT, _comments.getBefore())); org.antlr.runtime.tree.CommonTree commentsAfterNode = new org.antlr.runtime.tree.CommonTree( new org.antlr.runtime.CommonToken(ru.barsopen.plsqlconverter.PLSQLPrinter.COMMENT, _comments.getAfter())); org.antlr.runtime.tree.CommonTree commentsInsideNode = new org.antlr.runtime.tree.CommonTree( new org.antlr.runtime.CommonToken(ru.barsopen.plsqlconverter.PLSQLPrinter.COMMENT, _comments.getInside())); commentsNode.addChild(commentsBeforeNode); commentsNode.addChild(commentsInsideNode); commentsNode.addChild(commentsAfterNode); _result.addChild(commentsNode); } _result.setTokenStartIndex(_tokenStartIndex); _result.setTokenStopIndex(_tokenStopIndex); return _result; } }
[ "liuyuanyuan@highgo.com" ]
liuyuanyuan@highgo.com
9dc983fa082ff4f0c305c5c1697ab113b5f81f26
cf2c0b3d7c3a6b852edbbddebe2866807abc408a
/springboot-elasticsearch/src/main/java/com/gzyijian/elasticsearch/ElasticsearchApplication.java
06139c3ce5eddb75b4fb6a69690c242a22546506
[]
no_license
zmjiangi/springboot-integration
9a09e2f22cac303fa246cd91578cbf05110203f7
146c0e2ee3b80f9b37b3e8c7d184d7d12bc9a605
refs/heads/master
2022-06-22T05:32:56.096044
2019-07-05T01:27:07
2019-07-05T01:27:07
192,497,243
0
0
null
2022-06-21T04:06:27
2019-06-18T08:21:00
Java
UTF-8
Java
false
false
1,110
java
package com.gzyijian.elasticsearch; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; /** * @author zmjiangi * @date 2019-6-21 * SpringBoot默认支持两种技术来和ES交互; * 1、Jest(默认不生效) * 需要导入jest的工具包(io.searchbox.client.JestClient) * 2、SpringData ElasticSearch【ES版本有可能不合适】 * 版本适配说明:https://github.com/spring-projects/spring-data-elasticsearch * 如果版本不适配:2.4.6 * 1)、升级SpringBoot版本 * 2)、安装对应版本的ES * * 1)、Client 节点信息clusterNodes;clusterName * 2)、ElasticsearchTemplate 操作es * 3)、编写一个 ElasticsearchRepository 的子接口来操作ES; * 两种用法:https://github.com/spring-projects/spring-data-elasticsearch * 1)、编写一个 ElasticsearchRepository */ @SpringBootApplication public class ElasticsearchApplication { public static void main(String[] args) { SpringApplication.run(ElasticsearchApplication.class, args); } }
[ "zmjiangi@qq.com" ]
zmjiangi@qq.com
07ad5b3ea7ff307c2534e07af50eeed245a0f0de
521c97d9022c8641213488956066d06c5a11a317
/src/client/com/trendrr/cheshire/client/CheshireClient.java
30bf3f0e2107d86f58b93f7dfb3a4963e5b12922
[]
no_license
sourabhg/cheshire
18f954fc3977def6e739979d67526bc527b989b4
fc4c9ce5c6d1b390fd517dc22c29a1f257f01238
refs/heads/master
2020-12-25T02:01:38.126056
2013-06-20T21:02:41
2013-06-20T21:02:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,592
java
/** * */ package com.trendrr.cheshire.client; import java.util.Date; import java.util.Map; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.trendrr.cheshire.client.json.CheshireNettyClient; import com.trendrr.oss.DynMap; import com.trendrr.oss.exceptions.TrendrrDisconnectedException; import com.trendrr.oss.exceptions.TrendrrException; import com.trendrr.oss.exceptions.TrendrrTimeoutException; import com.trendrr.oss.strest.cheshire.CheshireApiCallback; import com.trendrr.oss.strest.cheshire.CheshireApiCaller; import com.trendrr.oss.strest.cheshire.Verb; import com.trendrr.oss.strest.models.StrestRequest; import com.trendrr.oss.strest.models.StrestHeader.Method; import com.trendrr.oss.strest.models.StrestHeader.TxnAccept; import com.trendrr.oss.strest.models.json.StrestJsonRequest; /** * Base class for the cheshire clients. * * * * * @author Dustin Norlander * @created Nov 5, 2012 * */ public abstract class CheshireClient implements CheshireApiCaller { protected static Log log = LogFactory.getLog(CheshireClient.class); protected String host; protected int port; protected String pingEndpoint = "/ping"; protected Date lastSuccessfulPing = new Date(); protected int defaultPingTimeoutSeconds = 30; public CheshireClient(String host, int port) { this.host = host; this.port = port; } /** * Does an asynchronous api call. This method returns immediately. the Response or error is sent to the callback. * * * @param endPoint * @param method * @param params * @param callback */ public void apiCall(String endPoint, Verb method, Map params, CheshireApiCallback callback) { StrestRequest req = this.createRequest(endPoint, method, params); req.setTxnAccept(TxnAccept.MULTI); CheshireListenableFuture fut = this.apiCall(req); fut.setCallback(callback); return; } /** * A synchronous call. blocks until response is available. Please note that this does *NOT* block concurrent api calls, so you can continue to * make calls in other threads. * * If the maxReconnectAttempts is non-zero (-1 is infinit reconnect attempts), then this will attempt to reconnect and send on any io problems. * * @param endPoint * @param method * @param params * @param timeoutMillis throw an exception if this # of millis passes, < 1 should be infinite. * @return * @throws Exception */ public DynMap apiCall(String endPoint, Verb method, Map params, long timeoutMillis) throws TrendrrTimeoutException, TrendrrDisconnectedException, TrendrrException { StrestRequest req = this.createRequest(endPoint, method, params); req.setTxnAccept(TxnAccept.SINGLE); CheshireListenableFuture fut = this.apiCall(req); try { return fut.get(timeoutMillis, TimeUnit.MILLISECONDS); } catch (Exception e) { throw CheshireNettyClient.toTrendrrException(e); } } public abstract CheshireListenableFuture apiCall(StrestRequest req); /* (non-Javadoc) * @see com.trendrr.oss.strest.cheshire.CheshireApiCaller#getHost() */ @Override public String getHost() { return this.host; } /* (non-Javadoc) * @see com.trendrr.oss.strest.cheshire.CheshireApiCaller#getPort() */ @Override public int getPort() { return this.port; } void cancelFuture(CheshireListenableFuture fut) { //override in subclass if needed } protected StrestRequest createRequest(String endPoint, Verb method, Map params) { StrestJsonRequest request = new StrestJsonRequest(); request.setUri(endPoint); request.setMethod(Method.instance(method.toString())); //TODO:this is stuuupid if (params != null) { DynMap pms = null; if (params instanceof DynMap){ pms = (DynMap)params; } else { pms = DynMap.instance(params); } request.setParams(pms); } return request; } /** * Does a synchronous ping. will throw an exception. * @throws Exception */ public void ping() throws TrendrrException { this.apiCall(this.pingEndpoint, Verb.GET, null, this.defaultPingTimeoutSeconds*1000); this.setLastSuccessfullPing(new Date()); } public static TrendrrException toTrendrrException(Throwable t) { if (t == null) { return new TrendrrException("Unhappy no no"); } if (t instanceof TrendrrException) { return (TrendrrException)t; } if (t instanceof ExecutionException) { return toTrendrrException(((ExecutionException)t).getCause()); } if (t instanceof java.nio.channels.ClosedChannelException) { return new TrendrrDisconnectedException((Exception)t); } if (t instanceof java.net.ConnectException) { return new TrendrrDisconnectedException((Exception)t); } if (t instanceof InterruptedException) { return new TrendrrTimeoutException((InterruptedException)t); } if (t instanceof TimeoutException) { return new TrendrrTimeoutException((TimeoutException)t); } // if (t instanceof org.jboss.netty.handler.timeout.TimeoutException) { // return new TrendrrTimeoutException((org.jboss.netty.handler.timeout.TimeoutException)t); // } //default if (t instanceof Exception) { return new TrendrrException((Exception)t); } return new TrendrrException(new Exception(t)); } /** * the date of the last successful ping. could be null * @return */ public Date getLastSuccessfulPing() { return lastSuccessfulPing; } public synchronized void setLastSuccessfullPing(Date d) { this.lastSuccessfulPing = d; } }
[ "dustinn@gmail.com" ]
dustinn@gmail.com
a2eb94c53f71521a03c7fc13b004b4a01d7f83f8
5c55a8873118f8c6f729920df86006224e6f9fcd
/Test/com/company/ParserTest.java
daa0b956763df10fa2baa30a71c14bc01ad2cf07
[]
no_license
Dacus/Calculator
fa7a48b7d97a18fb673fffc4788966060dfc3744
06af3845f08508768108b0d0f4d4b74a40fa1c36
refs/heads/master
2021-01-10T19:37:39.118265
2015-05-04T13:15:47
2015-05-04T13:15:47
34,859,791
0
0
null
null
null
null
UTF-8
Java
false
false
410
java
package com.company; import static org.junit.Assert.assertEquals; /** * Created by Dacus on 5/4/2015. */ public class ParserTest { @org.junit.Test public void testGetCommand() throws Exception { assertEquals(Parser.getCommand("ADD 13"), "ADD"); } @org.junit.Test public void testGetOperand() throws Exception { assertEquals(Parser.getOperand("ADD 13"), 13, 0); } }
[ "moisescu.alexandru00@gmail.com" ]
moisescu.alexandru00@gmail.com
f859fc1b1a464c245638c36720b52b89a3de4e80
61ac3430f5ab6f3ed095534045d54f2dc40ffd4b
/src/main/java/switchtwentytwenty/project/controllers/icontrollers/IRegisterPaymentController.java
91cf120a94abfe63d48bc8e98476e011f62a78e3
[]
no_license
nunocasteleira/switch-2020-group1
53fcda9a891c2c847fc0aa0d7893975ce735d54e
ee15e495dda09397052e961e053d365b02241204
refs/heads/main
2023-06-12T11:26:52.733943
2021-07-09T13:11:57
2021-07-09T13:11:57
384,439,845
0
0
null
null
null
null
UTF-8
Java
false
false
526
java
package switchtwentytwenty.project.controllers.icontrollers; import com.sun.istack.NotNull; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import switchtwentytwenty.project.dto.transaction.PaymentInputDTO; public interface IRegisterPaymentController { @PostMapping("/transactions") ResponseEntity<Object> registerPayment(@RequestBody @NotNull PaymentInputDTO paymentInputDTO, long accountId); }
[ "nunojoaocas@gmail.com" ]
nunojoaocas@gmail.com
db84e78e5502a1a40db5a959dcaec879066c9805
daea966ddadbb56bc0e4faea62018a059e9e6faa
/JAVA/Work/JavaApplication/src/main/java/java02/jv02_12_ASCII코드.java
6fc4462b9bbd517b5a83af6fc549cb203cb9ef4a
[]
no_license
kdh3794/javaupload
ba79dc923a86ba7077cad97c6930b1a0c0b10ad4
c7657c55f0be0a00ed7099f23dfc58ab6578c31d
refs/heads/master
2021-09-05T22:13:13.121013
2018-01-31T08:58:05
2018-01-31T08:58:05
103,617,554
0
0
null
null
null
null
UTF-8
Java
false
false
541
java
package java02; public class jv02_12_ASCII코드 { public static void main(String[] args){ int x = '4'; int y = '5'; int result = 0; result = x + y; System.out.println("더하기 = " + result); result = x - y; System.out.println(result); result = x * y; System.out.println(result); result = x / y; System.out.println(result); result = x % y; System.out.println(result); } }
[ "kdh3794@nate.com" ]
kdh3794@nate.com
5633ccfa75d38c2de9c65da88aedae746209a6fa
f1a5cf469b0512c1fbbcc4ca878eed0f124e3120
/rong-parent/rong-console/rong-assembly-api/src/main/java/com/rong/assembly/api/controller/business/VisitorsController.java
42fe6ca4b5a0e5661819ea970662d002438bf37b
[]
no_license
ShineDreamCatcher/JavaProject
aba9737156e9d197cbe1421dab2a0bdac36bbbde
4a64939ed77074ba0fb7ce6fb9cd4b310ab85023
refs/heads/master
2022-12-30T03:19:23.592240
2020-04-26T07:06:42
2020-04-26T07:06:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
12,240
java
package com.rong.assembly.api.controller.business; import com.rong.assembly.api.mapper.RespPeopleInfoMapper; import com.rong.assembly.api.module.request.TqUserReserve; import com.rong.assembly.api.module.request.buz.TqCustomerUser; import com.rong.assembly.api.module.request.uc.TqSubmitFeedback; import com.rong.assembly.api.module.response.TrCustomerServer; import com.rong.cache.service.CacheSerializableDelegate; import com.rong.cache.service.CommonServiceCache; import com.rong.common.consts.CommonEnumContainer; import com.rong.common.consts.DictionaryKey; import com.rong.common.exception.DuplicateDataException; import com.rong.common.module.Result; import com.rong.common.module.TqBase; import com.rong.common.module.UserInfo; import com.rong.common.util.WrapperFactory; import com.rong.member.consts.MemEnumContainer; import com.rong.member.module.entity.TbMemBase; import com.rong.member.module.entity.TbUserReservation; import com.rong.member.module.query.TsMemCustomer; import com.rong.member.module.query.TsUserReservation; import com.rong.member.module.request.TqUserReservation; import com.rong.member.service.UserReservationService; import com.rong.member.util.MemberUtil; import com.rong.store.module.entity.TbDirectStoreUser; import com.rong.store.module.query.TsDirectStoreUser; import com.rong.store.module.view.TvDirectStoreUser; import com.rong.store.service.DirectStoreUserService; import com.rong.sys.module.entity.TbLabel; import com.rong.tong.pfunds.module.entity.TbMdInstitution; import com.rong.user.module.entity.TbUserFeedBack; import com.rong.user.module.entity.TbUserLabel; import com.rong.user.module.request.TqUserFeedBack; import com.rong.user.service.UserFeedBackService; import com.vitily.mybatis.core.enums.Order; import com.vitily.mybatis.core.wrapper.PageInfo; import com.vitily.mybatis.core.wrapper.query.QueryWrapper; import com.vitily.mybatis.core.wrapper.sort.OrderBy; import com.vitily.mybatis.util.ClassAssociateTableInfo; import com.vitily.mybatis.util.CompareAlias; import com.vitily.mybatis.util.SelectAlias; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; 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.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; /** * 访客、客服中心 */ @Api(tags = "访客、客服中心") @RestController @RequestMapping("customer") public class VisitorsController { @Autowired private UserReservationService userReservationService; @Autowired private CommonServiceCache commonServiceCache; @Autowired private DirectStoreUserService directStoreUserService; @Autowired private RespPeopleInfoMapper respPeopleInfoMapper; @Autowired private UserFeedBackService userFeedBackService; /** * 预约节目 * * @param req * @return */ @ApiOperation(value = "预约节目") @PostMapping("reserve") public Result reserve(@RequestBody TqUserReserve req){ TbUserReservation customer = userReservationService.selectOne( new QueryWrapper() .eq(TsUserReservation.Fields.phone,req.getPhone()) .eq(TsUserReservation.Fields.dealStatus, CommonEnumContainer.ReservationDealStatus.UNTREATED.getValue()) .eq(TsUserReservation.Fields.deltag, CommonEnumContainer.Deltag.NORMAL.getValue()) .eq(TsUserReservation.Fields.targetId, req.getTargetId()) .select(TsMemCustomer.Fields.id) ); if(customer != null){ throw new DuplicateDataException("您已重复预约,请等待处理"); } customer = new TbUserReservation(); customer.setName(req.getName()) .setPhone(req.getPhone()) .setDealStatus( CommonEnumContainer.ReservationDealStatus.UNTREATED.getValue()) .setTargetId(req.getTargetId()) .setType(req.getType()) ; CommonServiceCache memCache = commonServiceCache.getInstance(DictionaryKey.Keys.MEMBER_OF_THE_TOKEN, CacheSerializableDelegate.jsonSeriaze()); UserInfo userInfo = memCache.getFromServer(req.getUserAuthToken(), UserInfo.class); if(null != userInfo){ customer.setReservationUserId(userInfo.getUserId()); } return Result.success(userReservationService.insert(new TqUserReservation().setEntity(customer))); } /** * 直营店客服列表 * * @param req * @return */ @ApiOperation(value = "直营店客服列表") @GetMapping("service/users") public Result<List<TvDirectStoreUser>> serviceUsers(TqCustomerUser req){ List<TvDirectStoreUser> storeUsers = directStoreUserService.selectViewList(directStoreUserService.getMultiCommonWrapper() .eq(CompareAlias.valueOf(TsDirectStoreUser.Fields.partyId), req.getPartyId()) .eq(CompareAlias.valueOf("e.type"), CommonEnumContainer.StoreUserType.SERVICE.getValue()) .eq(CompareAlias.valueOf(TsDirectStoreUser.Fields.state, "e"), CommonEnumContainer.CustomerAuditState.GET_APPROVED.getValue()) .eq(CompareAlias.valueOf("e.deltag"), CommonEnumContainer.Deltag.NORMAL.getValue()) ); CommonServiceCache memCache = MemberUtil.getMemCache(commonServiceCache); for(TvDirectStoreUser m:storeUsers){ m.setOnlineState(memCache.existsInServer(m.getUserType()+"-" + m.getUserId())? CommonEnumContainer.OnlineState.ON_LINE.getValue(): CommonEnumContainer.OnlineState.NOT_ONLINE.getValue()); } return Result.success(storeUsers); } /** * 官方客服列表 * * @param req * @return */ @ApiOperation(value = "官方客服列表") @GetMapping("official/service/users") public Result<List<TrCustomerServer>> officialServiceUsers(TqBase req){ List<TrCustomerServer> customerServers = respPeopleInfoMapper.selectCustomerUsers(WrapperFactory.multiQueryWrapper(TbMemBase.class) .select("e.id userId,userName,realName,nickName,headPortrait,e.type") .select("ul.labelId,l.name labelName,ul.recommend,ul.sort,ul.labelReason,ul.labelVar0,ul.labelVar1,ul.labelVar2,ul.labelVar3") .select0( SelectAlias.valueOf("(select count(1)from tb_direct_store_service_history where customer_user_id=e.id and audit_result in(0,1)) serviceNumCount",true) , SelectAlias.valueOf("(select count(DISTINCT investor_user_id) from tb_direct_store_service_history where customer_user_id=e.id and audit_result in(0,1)) serviceUserCount",true) ) .leftJoin(ClassAssociateTableInfo.valueOf(TbUserLabel.class,"ul"), ul-> ul.eqc(CompareAlias.valueOf("ul.userId"),CompareAlias.valueOf("e.id")) ) .leftJoin(ClassAssociateTableInfo.valueOf(TbLabel.class,"l"), l-> l.eqc(CompareAlias.valueOf("l.id"),CompareAlias.valueOf("ul.labelId")) ) .eq(CompareAlias.valueOf("e.type"), MemEnumContainer.MemType.官方客服.getValue()) .eq(CompareAlias.valueOf("e.state"), CommonEnumContainer.State.NORMAL.getValue()) .eq(CompareAlias.valueOf("e.deltag"), CommonEnumContainer.Deltag.NORMAL.getValue()) ); CommonServiceCache memCache = MemberUtil.getMemCache(commonServiceCache); for(TrCustomerServer customer:customerServers){ customer.setOnlineState(memCache.existsInServer(customer.getType()+"-" + customer.getUserId())? CommonEnumContainer.OnlineState.ON_LINE.getValue(): CommonEnumContainer.OnlineState.NOT_ONLINE.getValue()); } return Result.success(customerServers); } /** * 服务之星 * * @param req * @return */ @ApiOperation(value = "服务之星") @GetMapping("service/start") public Result<List<TvDirectStoreUser>> startServiceUsers(TqBase req){ List<TvDirectStoreUser> storeUsers = directStoreUserService.selectViewList(WrapperFactory.multiQueryWrapper(TbDirectStoreUser.class) .select("e.partyId,e.userId,mb.realName,mi.partyShortName,mi.partyFullName,mb.type userType") .select0( SelectAlias.valueOf("ifnull(e.nickname,mb.nick_name) nickName",true) , SelectAlias.valueOf("ifnull(e.position,mb.position) position",true) , SelectAlias.valueOf("ifnull(e.head_portrait,mb.head_portrait) headPortrait",true) , SelectAlias.valueOf("ifnull(e.head_portrait,mb.head_portrait) headPortrait",true) , SelectAlias.valueOf("(select person_id from tb_people_manage where user_id=e.user_id limit 1) personId",true) ) .select0( SelectAlias.valueOf("(select count(1)from tb_direct_store_service_history where customer_user_id=e.user_id and audit_result in(0,1)) serviceNumCount",true) , SelectAlias.valueOf("(select count(DISTINCT investor_user_id) from tb_direct_store_service_history where customer_user_id=e.user_id and audit_result in(0,1)) serviceUserCount",true) ) .leftJoin(ClassAssociateTableInfo.valueOf(TbMemBase.class,"mb"), mb-> mb.eqc(CompareAlias.valueOf("mb.id"),CompareAlias.valueOf("e.userId")) ) .leftJoin(ClassAssociateTableInfo.valueOf(TbMdInstitution.class,"mi"), mi-> mi.eqc(CompareAlias.valueOf("mi.partyId"),CompareAlias.valueOf("e.partyId")) ) .eq(CompareAlias.valueOf("e.state"), CommonEnumContainer.State.NORMAL.getValue()) .eq(CompareAlias.valueOf("e.deltag"), CommonEnumContainer.Deltag.NORMAL.getValue()) .page(new PageInfo()) .orderBy(OrderBy.valueOf(Order.DESC,SelectAlias.valueOf("serviceNumCount",true))) .orderBy(OrderBy.valueOf(Order.DESC,SelectAlias.valueOf("serviceUserCount",true))) ); CommonServiceCache memCache = MemberUtil.getMemCache(commonServiceCache); for(TvDirectStoreUser m:storeUsers){ m.setOnlineState(memCache.existsInServer(m.getUserType()+"-" + m.getUserId())? CommonEnumContainer.OnlineState.ON_LINE.getValue(): CommonEnumContainer.OnlineState.NOT_ONLINE.getValue()); } return Result.success(storeUsers); } /** * 提交意见反馈(匿名) * * @param req * @return */ @ApiOperation(value = "提交意见反馈(匿名)") @PostMapping("feedback/submit") public Result<Boolean> feedbackSubmit(@RequestBody TqSubmitFeedback req){ TbUserFeedBack feedBack = new TbUserFeedBack(); feedBack.setContent(req.getContent()); feedBack.setLink(req.getLink()); feedBack.setResult(CommonEnumContainer.ReservationDealStatus.UNTREATED.getValue()); feedBack.setTitle(req.getTitle()); feedBack.setVisible(CommonEnumContainer.YesOrNo.RIGHT.getValue()); feedBack.setSubmitUserId(req.getUserId()); userFeedBackService.insert(new TqUserFeedBack().setEntity(feedBack)); return Result.success(Boolean.TRUE); } }
[ "favor_zlx@163.com" ]
favor_zlx@163.com
ec0eed1b27dc07763456f9001fb6a33bdaa5613b
fb9396542acc4aca63deeb46f5fa42d7d7254dab
/Week_02/src/BinaryHeap/HeapSort.java
fae0f442ccdfc453e27c2985ecc274141900a67a
[]
no_license
renbin1990/AlgorithmCHUNZHAO
9b644ac2b6f0f3071adfe7a9340e10cb19b4633b
cf34f2d8b24df5b789c4b0d68bfecca9e38282a6
refs/heads/main
2023-06-24T12:07:12.751170
2021-07-26T03:04:22
2021-07-26T03:04:22
330,076,339
0
0
null
2021-01-16T03:34:05
2021-01-16T03:34:05
null
UTF-8
Java
false
false
1,890
java
package BinaryHeap; /** * 堆排序 */ public class HeapSort { public void sort(int arr[]) { int n = arr.length; // Build heap (rearrange array) for (int i = n / 2 - 1; i >= 0; i--) heapify(arr, n, i); // One by one extract an element from heap for (int i = n - 1; i > 0; i--) { // Move current root to end int temp = arr[0]; arr[0] = arr[i]; arr[i] = temp; // call max heapify on the reduced heap heapify(arr, i, 0); } } // To heapify a subtree rooted with node i which is // an index in arr[]. n is size of heap void heapify(int arr[], int n, int i) { int largest = i; // Initialize largest as root int l = 2 * i + 1; // left = 2*i + 1 int r = 2 * i + 2; // right = 2*i + 2 // If left child is larger than root if (l < n && arr[l] > arr[largest]) largest = l; // If right child is larger than largest so far if (r < n && arr[r] > arr[largest]) largest = r; // If largest is not root if (largest != i) { int swap = arr[i]; arr[i] = arr[largest]; arr[largest] = swap; // Recursively heapify the affected sub-tree heapify(arr, n, largest); } } /* A utility function to print array of size n */ static void printArray(int arr[]) { int n = arr.length; for (int i = 0; i < n; ++i) System.out.print(arr[i] + " "); System.out.println(); } // Driver code public static void main(String args[]) { int arr[] = {12, 11, 13, 5, 6, 7}; int n = arr.length; HeapSort ob = new HeapSort(); ob.sort(arr); System.out.println("Sorted array is"); printArray(arr); } }
[ "renbin90@foxmail.com" ]
renbin90@foxmail.com
6571e6ae3661f7da8049cd8a03a6ba27448cb2f7
7c5bb6fcb4ad84e64787bbbe625a9913744074f3
/app/src/test/java/com/example/chatfirebaseenjava/ExampleUnitTest.java
a104829ecab414ad9c83c1784601eb6328dc1994
[]
no_license
nicochio/chatAndroidFirebase
e00e6b2e5045a33bd13714a9001d33e0b5265a00
990d3bdb1feb9611548062589f90715cb454c68b
refs/heads/master
2022-11-12T07:26:08.106488
2020-07-04T02:27:38
2020-07-04T02:27:38
277,023,678
0
0
null
null
null
null
UTF-8
Java
false
false
391
java
package com.example.chatfirebaseenjava; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() { assertEquals(4, 2 + 2); } }
[ "nicolaschiozza@hotmail.com" ]
nicolaschiozza@hotmail.com
d1f1622058ae3ecf241373e45fcc244a55e8035f
0e056c7d8b716413be11ed4401dfb6edeb848403
/Tpfab/src/Armas/Larga.java
2acb3583147743f046408fba26a087370113f496
[]
no_license
santi12386/TpF4CT0R1
aafc8dfb72a26ba86dc13b453473e51192e534c3
75fbb9dd982d69f5df1d1534b81e20e876952259
refs/heads/master
2021-01-23T12:00:45.393349
2017-08-20T20:33:03
2017-08-20T20:33:03
37,979,540
0
0
null
null
null
null
UTF-8
Java
false
false
99
java
package Armas; public class Larga extends Espada { public Larga(){ super(15, "Larga", 5); } }
[ "santiagoozan97@gmail.com" ]
santiagoozan97@gmail.com
69b0cf8d6043ccfd5e41e214e64e034b07cf4c5b
64c80e7fad312787551d632a773750cbf9ac014b
/app/src/main/java/com/example/ms/mvpdemo/presenter/LoginPresenter.java
c408a28e55315a26815360e54dde8ff98e32d8b8
[]
no_license
baiyh/mvp-net
021cb451544dd81b3a03b5f00a791449be1af482
9c3aa6034eadd72f04ac3caedba0725e10f3db2b
refs/heads/master
2020-05-03T21:02:12.574452
2019-04-01T08:15:22
2019-04-01T08:15:22
178,814,259
0
0
null
null
null
null
UTF-8
Java
false
false
2,163
java
package com.example.ms.mvpdemo.presenter; import com.example.ms.mvpdemo.base.BasePresenter; import com.example.ms.mvpdemo.base.HttpResponseListener; import com.example.ms.mvpdemo.bean.MessageBean; import com.example.ms.mvpdemo.bean.UserBean; import com.example.ms.mvpdemo.contracts.LoginContracts; import com.example.ms.mvpdemo.disposable.SubscriptionManager; import com.example.ms.mvpdemo.error.ExceptionHandle; import com.example.ms.mvpdemo.model.LoginModel; import com.example.ms.mvpdemo.retrofit.HttpObserver; import io.reactivex.disposables.Disposable; /** * Created by ms on 2019/4/1. */ public class LoginPresenter extends BasePresenter<LoginContracts.LoginUi, UserBean> implements LoginContracts.loginPresenter { private LoginContracts.loginModel mLoginMdl; public LoginPresenter(LoginContracts.LoginUi view) { super(view); mLoginMdl = new LoginModel(); } @Override public void login(String username, String password) { mLoginMdl.login(username, password, new HttpResponseListener<UserBean>() { @Override public void onSuccess(Object tag, UserBean o) { if (isViewAttach()) { getView().loginSuccess(); } } @Override public void onFailure(Object tag, ExceptionHandle.ResponeThrowable failure) { // 先判断是否已经与 View 建立联系 if (isViewAttach()) { getView().loginFailure(); } } }); } @Override public void getMsg(String phone) { mLoginMdl.getMsg("15411323", new HttpObserver<MessageBean>() { @Override public void onSuccess(MessageBean o) { } @Override public void onFail(ExceptionHandle.ResponeThrowable e) { } @Override public void onCompleted() { } @Override public void onDisposable(Disposable d) { //添加订阅 SubscriptionManager.getInstance().add(d); } }); } }
[ "1042217872@qq.com" ]
1042217872@qq.com
06f4fb7d2d33766cd93b598d641c8321b8f085f2
b214f96566446763ce5679dd2121ea3d277a9406
/modules/desktop-swt/desktop-swt-ide-impl/src/main/java/org/eclipse/nebula/cwt/svg/SvgPaint.java
2530cdcd7327505d9e20554b2a629685d171f52c
[ "Apache-2.0", "LicenseRef-scancode-jgraph" ]
permissive
consulo/consulo
aa340d719d05ac6cbadd3f7d1226cdb678e6c84f
d784f1ef5824b944c1ee3a24a8714edfc5e2b400
refs/heads/master
2023-09-06T06:55:04.987216
2023-09-01T06:42:16
2023-09-01T06:42:16
10,116,915
680
54
Apache-2.0
2023-06-05T18:28:51
2013-05-17T05:48:18
Java
UTF-8
Java
false
false
1,607
java
/**************************************************************************** * Copyright (c) 2008, 2009 Jeremy Dowdall * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at * https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Jeremy Dowdall <jeremyd@aspencloud.com> - initial API and implementation *****************************************************************************/ package org.eclipse.nebula.cwt.svg; import org.eclipse.swt.graphics.GC; abstract class SvgPaint { enum PaintType { None, Current, Color, Link } SvgGraphic parent; GC gc; SvgGradient paintServer; PaintType type = null; String linkId = null; Integer color = null; Float opacity = null; SvgPaint(SvgGraphic parent) { this.parent = parent; } abstract void apply(); public void create(GC gc) { if(parent instanceof SvgShape) { this.gc = gc; if(linkId != null) { SvgElement def = parent.getElement(linkId); if(def instanceof SvgGradient) { SvgGradient gradient = (SvgGradient) def; SvgShape shape = (SvgShape) parent; paintServer = gradient; paintServer.create(shape, gc); } } } else { throw new UnsupportedOperationException("only shapes can be painted..."); //$NON-NLS-1$ } } public boolean dispose() { if(paintServer != null) { paintServer.dispose(); return true; } return false; } public boolean isPaintable() { return type != PaintType.None; } }
[ "vistall.valeriy@gmail.com" ]
vistall.valeriy@gmail.com
1967d99a4f37f912d4d03535179394932d984956
4007db405c41210f0245aae2efcb98d549e756cb
/Java/Problem06.java
a68085b3b6263e9f86286f61e43d333b4e93179a
[]
no_license
philosowaffle/project_euler
7bad93363f93a9a916cd8866fcf7f12fd3e37849
405d28038e4c7be5a2647692c70ea22a49885e3b
refs/heads/master
2021-01-19T09:49:54.670558
2018-04-27T21:53:31
2018-04-27T21:53:31
30,374,058
0
0
null
null
null
null
UTF-8
Java
false
false
1,321
java
/** * Project Euler - Problem 6 * The sum of the squares of the first ten natural numbers is, * 1^2 + 2^2 + .... + 10^2 = 385 * The square of the sum of the first ten natural numbers is, * (1 + 2 + .... + 10)^2 = 3025 * Hence the difference between the sum of the squares of the first ten * natural numbers and the square of the sum is 3025-385 = 2640. * Find the difference between the the sum of the squares of the first * one hundred natural numbers and the square of the sum. * * @author Bailey Belvis */ public class Problem6 { private final static int solution = 25164150; /** * Main * * @param args * arg! */ public static void main(final String[] args) { // Solution 1 solutionOne(); } /** * */ static void solutionOne() { long answer = 0; int sumOfSquares = 0; int squareOfSums = 0; for (int x = 1; x <= 100; x++) { sumOfSquares += (x * x); squareOfSums += x; } squareOfSums = squareOfSums * squareOfSums; answer = squareOfSums - sumOfSquares; print(answer); } /** * Prints a value. * * @param value * int */ static void print(final long value) { if (value == solution) { System.out.println("Correct: " + value); //$NON-NLS-1$ } else { System.out.println("Incorrect: " + value); //$NON-NLS-1$ } } }
[ "baileyb622@gmail.com" ]
baileyb622@gmail.com
0ec5a7770c0ee0875e57c9a13ea54e73204d0330
31bc8cda7720749f7b1032cc49d200297dd3e3ec
/src/view/ProductView.java
29d96bf3d2796a99785583fc9105c09ac2796ce9
[]
no_license
binhnguyenapr91/APJ-BaiTap-ProductManager
8ebeb11b5792b32e625f4ef5fabec5e6ea57f66a
facbf085e3a5483acb76062b9bf7c36b98e68d7a
refs/heads/master
2022-04-14T14:07:55.921101
2020-04-13T17:46:57
2020-04-13T17:46:57
255,372,167
1
0
null
null
null
null
UTF-8
Java
false
false
359
java
package view; public class ProductView { public void displayProductDetail(int id, String name, String manufacturer, double price, String information) { System.out.printf("%-5s%-20s%-20s%-10s%-30s\n", "id", "name", "manufacturer", "price", "information"); System.out.printf("%-5s%-20s%-20s%-10s%-30s\n", id, name, manufacturer, price, information); } }
[ "binhnguyen.apr91@gmail.com" ]
binhnguyen.apr91@gmail.com
eb40783da902b4d185e6c7e7b629442fdbddf5c1
9c9edb834c80e0d0af873b6777e1b5d5459b3753
/OlowoGPS/src/org/opengts/war/gpsmapper/package-info.java
87201674c15b428aff02a785b49f3ee44e99286d
[ "Apache-2.0" ]
permissive
ufoe/OlowoGPS
b75f4eba5198e3a07533d934b01921965930230f
b85376eb5a4bb8ea1e69255d4807cf26c2c9228c
refs/heads/master
2021-01-17T22:03:51.255483
2012-03-04T04:03:54
2012-03-04T04:04:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,154
java
// ---------------------------------------------------------------------------- // Copyright 2007-2011, GeoTelematic Solutions, Inc. // All rights reserved // ---------------------------------------------------------------------------- // // 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. // // ---------------------------------------------------------------------------- // Change History: // 2010/04/25 Martin D. Flynn // -Initial release // ---------------------------------------------------------------------------- /** *** Contains the GPSMapper http-based device communication server support module **/ package org.opengts.war.gpsmapper;
[ "bayoolowoyeye@gmail.com" ]
bayoolowoyeye@gmail.com
a95daaed3c08824c3c450d958b9dd5fe747ccf92
11a69c1cd0417df7cd5f23415e53ffae45ec8492
/PrezonHub/src/me/PrezonCraft/Hub/Menus/ParticlesInteract/Witch.java
a001d924cab16320e3bc7fe7d95f6f24da733ad3
[]
no_license
PrezonDeveloper/PrezonHub
b53056004e33731486db5a91b3a58e0f9d41e741
86fee6ebdc5d2bb684867946767615c4b2f4c944
refs/heads/master
2020-12-20T15:20:37.866149
2016-07-27T21:27:26
2016-07-27T21:27:26
63,079,708
0
1
null
null
null
null
WINDOWS-1252
Java
false
false
1,666
java
package me.PrezonCraft.Hub.Menus.ParticlesInteract; import org.bukkit.ChatColor; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.inventory.InventoryClickEvent; import me.PrezonCraft.Hub.Main; public class Witch implements Listener{ @EventHandler public void onClick2f(InventoryClickEvent e) { Player p = (Player) e.getWhoClicked(); if (e.getCurrentItem().getItemMeta().getDisplayName() .equalsIgnoreCase("&aWitch Trail" .replace("&", "§"))) { Main.flame.remove(p.getUniqueId()); Main.snow.remove(p.getUniqueId()); Main.note.remove(p.getUniqueId()); Main.happy.remove(p.getUniqueId()); Main.rainbow.remove(p.getUniqueId()); Main.smoke.remove(p.getUniqueId()); Main.redstone.remove(p.getUniqueId()); Main.bubbel.remove(p.getUniqueId()); Main.cloud.remove(p.getUniqueId()); Main.heart.remove(p.getUniqueId()); Main.witch.add(p.getUniqueId()); Main.slime.remove(p.getUniqueId()); Main.enchant.remove(p.getUniqueId()); Main.sql.setVANITY_PARTICLES_ALL(p); Main.sql.setVANITY_PARTICLES(p, 1, "WITCH"); } if (e.getCurrentItem().getItemMeta().getDisplayName() .equalsIgnoreCase("&cWitch Trail" .replace("&", "§"))) { p.sendMessage(ChatColor.translateAlternateColorCodes('&', "&f[&4&lTrails&f] Je hebt de rank &cchicken &fnodig om dit te kunnen!")); } } }
[ "ducitymp@gmail.com" ]
ducitymp@gmail.com
3ebfc789fedc4271ce97b9f850de8a9dc15fc485
40422c5b33b52444884563c2d8e14fc78598d056
/src/test/java/com/yjh/test/example/classload/T1.java
7982f468c44305e69dd4212158fd2ae94e81856b
[]
no_license
zerohuan/web_framework
aba51316174c1aada88080b42c2144699733d23c
930dd3d2fc73eb84f15c5797c061661c443b1368
refs/heads/master
2020-05-09T16:25:34.980262
2015-11-12T09:05:01
2015-11-12T09:05:01
42,513,528
2
0
null
null
null
null
UTF-8
Java
false
false
305
java
package com.yjh.test.example.classload; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; /** * Created by yjh on 15-9-26. */ public class T1 { private static Logger logger = LogManager.getLogger(); public T1() { logger.debug("Main CREATED"); } }
[ "yanjinheng@qq.com" ]
yanjinheng@qq.com
7d42feb85cd065dd2b5291e6ecc44e1000ab3e59
1f8dc83e72e5fe86a1b0c1dbf452807bcc32c7ec
/src/com/spdb/build/gef/command/CopyNodeCommand.java
c0ec31ea06ac66f4f3b9d482293934f89039f238
[]
no_license
hujingli/gef
9bc2f1627b890246c1c319278282524526fae0dd
6e17e99acaacd47241bbbef7d7f9364ec741baba
refs/heads/master
2020-12-29T11:24:02.450698
2020-09-04T07:07:16
2020-09-04T07:07:16
238,591,321
0
0
null
null
null
null
UTF-8
Java
false
false
1,166
java
package com.spdb.build.gef.command; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.eclipse.gef.commands.Command; import org.eclipse.gef.ui.actions.Clipboard; import com.spdb.build.gef.model.Employee; import com.spdb.build.gef.model.Node; import com.spdb.build.gef.model.Service; /** * 剪切命令 * 对应的action { @link CopyNodeAction} 对应的 * @author exphuhong * */ public class CopyNodeCommand extends Command{ private List<Node> list = new ArrayList<Node>(); public boolean addElement(Node node) { if (!list.contains(node)) { return list.add(node); } return false; } @Override public boolean canExecute() { if (list == null || list.isEmpty()) { return false; } for (Node node : list) { if (!isCopyableNode(node)) { return false; } } return true; } @Override public void execute() { if (canExecute()) { Clipboard.getDefault().setContents(list); } } public boolean canUndo() { return false; } public boolean isCopyableNode(Node node) { if (node instanceof Service || node instanceof Employee) { return true; } return false; } }
[ "1042331526@qq.com" ]
1042331526@qq.com
af14de16efefda743baded905023c0b7d803cb6e
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/30/30_e02490986e39aa69bfd730d3811d5fd381568d8e/InternalResource/30_e02490986e39aa69bfd730d3811d5fd381568d8e_InternalResource_t.java
c85c3c87ef01136d7ca6bd66ceba2557dfb2885d
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
15,569
java
package org.jboss.pressgang.ccms.restserver.webdav.internal; import net.java.dev.webdav.jaxrs.xml.elements.*; import org.apache.commons.io.IOUtils; import org.jboss.pressgang.ccms.restserver.webdav.InternalResourceRoot; import org.jboss.pressgang.ccms.restserver.webdav.managers.DeleteManager; import org.jboss.pressgang.ccms.restserver.webdav.topics.InternalResourceTopicVirtualFolder; import org.jboss.pressgang.ccms.restserver.webdav.topics.topic.InternalResourceTopic; import org.jboss.pressgang.ccms.restserver.webdav.topics.topic.fields.InternalResourceTempTopicFile; import org.jboss.pressgang.ccms.restserver.webdav.topics.topic.fields.InternalResourceTopicContent; import javax.annotation.Nullable; import javax.inject.Inject; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.UriBuilder; import javax.ws.rs.core.UriInfo; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; import java.net.URI; import java.net.URISyntaxException; import java.util.logging.Logger; import java.util.regex.Matcher; import java.util.regex.Pattern; import static javax.ws.rs.core.Response.Status.OK; import static net.java.dev.webdav.jaxrs.xml.properties.ResourceType.COLLECTION; /** * The WebDAV server exposes resources from multiple locations. Some resources are found in a database, and some * are saved as files. * <p/> * All resources can potentially be written to, read and deleted. Copying and moving are just combinations of this * basic functionality. * <p/> * Instances of the InternalResource class wrap the functionality needed to read, write and delete. * <p/> * The InternalResource class is also a factory, matching url paths to the InternalResource instances that manage * them. This provides a simple way for the JAX-RS interface to pass off the actual implementation of these underlying * methods. * <p/> * This means that the WebDavResource class can defer functionality to InternalResource. */ public abstract class InternalResource { private static final Logger LOGGER = Logger.getLogger(InternalResource.class.getName()); private static final Pattern TOPIC_RE = Pattern.compile("/TOPICS(?<var>(/\\d)*)/TOPIC(?<TopicID>\\d*)/?"); private static final Pattern ROOT_FOLDER_RE = Pattern.compile("/"); private static final Pattern TOPIC_FOLDER_RE = Pattern.compile("/TOPICS(/\\d)*/?"); private static final Pattern TOPIC_CONTENTS_RE = Pattern.compile("/TOPICS(/\\d)*/TOPIC\\d+/(?<TopicID>\\d+).xml"); private static final Pattern TOPIC_TEMP_FILE_RE = Pattern.compile("/TOPICS(/\\d)*/TOPIC\\d+/.*"); /** * The id of the entity that this resource represents. Usually a database primary key, * but the context of the ID is up to the resource class. */ @Nullable protected final Integer intId; /** * The id of the entity that this resource represents. Usually a file name, * but the context of the ID is up to the resource class. */ @Nullable protected final String stringId; /** * The info about the request that was used to retrieve this object. This can be null * when the initial request results in a second resource object being looked up (copy and move). * * All resource objects should check to make sure this is not null when doing a propfind (which is * where the uriInfo is actually used). However, there should never be a case where a secondary * resource object has its propfind method called. */ @Nullable protected final UriInfo uriInfo; protected InternalResource(final UriInfo uriInfo, final Integer intId) { this.intId = intId; this.stringId = null; this.uriInfo = uriInfo; } protected InternalResource(final UriInfo uriInfo, final String stringId) { this.intId = null; this.stringId = stringId; this.uriInfo = uriInfo; } public int write(final DeleteManager deleteManager, final String contents) { throw new UnsupportedOperationException(); } public int delete(final DeleteManager deleteManager) { throw new UnsupportedOperationException(); } public StringReturnValue get(final DeleteManager deleteManager) { throw new UnsupportedOperationException(); } public MultiStatusReturnValue propfind(final DeleteManager deleteManager, final int depth) { throw new UnsupportedOperationException(); } public static javax.ws.rs.core.Response propfind(final DeleteManager deleteManager, final UriInfo uriInfo, final int depth) { LOGGER.info("ENTER InternalResource.propfind() " + uriInfo.getPath() + " " + depth); final InternalResource sourceResource = InternalResource.getInternalResource(uriInfo, uriInfo.getPath()); if (sourceResource != null) { final MultiStatusReturnValue multiStatusReturnValue = sourceResource.propfind(deleteManager, depth); if (multiStatusReturnValue.getStatusCode() != 207) { return javax.ws.rs.core.Response.status(multiStatusReturnValue.getStatusCode()).build(); } return javax.ws.rs.core.Response.status(207).entity(multiStatusReturnValue.getValue()).type(MediaType.TEXT_XML).build(); } return javax.ws.rs.core.Response.status(javax.ws.rs.core.Response.Status.NOT_FOUND).build(); } public static javax.ws.rs.core.Response copy(final DeleteManager deleteManager, final UriInfo uriInfo, final String overwriteStr, final String destination) { LOGGER.info("ENTER InternalResource.copy() " + uriInfo.getPath() + " " + destination); try { final HRef destHRef = new HRef(destination); final URI destUriInfo = destHRef.getURI(); final InternalResource destinationResource = InternalResource.getInternalResource(null, destUriInfo.getPath()); final InternalResource sourceResource = InternalResource.getInternalResource(uriInfo, uriInfo.getPath()); if (destinationResource != null && sourceResource != null) { final StringReturnValue stringReturnValue = sourceResource.get(deleteManager); if (stringReturnValue.getStatusCode() != javax.ws.rs.core.Response.Status.OK.getStatusCode()) { return javax.ws.rs.core.Response.status(stringReturnValue.getStatusCode()).build(); } int statusCode; if ((statusCode = destinationResource.write(deleteManager, stringReturnValue.getValue())) != javax.ws.rs.core.Response.Status.NO_CONTENT.getStatusCode()) { return javax.ws.rs.core.Response.status(statusCode).build(); } return javax.ws.rs.core.Response.ok().build(); } } catch (final URISyntaxException e) { } return javax.ws.rs.core.Response.status(javax.ws.rs.core.Response.Status.NOT_FOUND).build(); } public static javax.ws.rs.core.Response move(final DeleteManager deleteManager, final UriInfo uriInfo, final String overwriteStr, final String destination) { LOGGER.info("ENTER InternalResource.move() " + uriInfo.getPath() + " " + destination); /* We can't move outside of the filesystem */ if (!destination.startsWith(uriInfo.getBaseUri().toString())) { return javax.ws.rs.core.Response.status(Response.Status.NOT_FOUND).build(); } final InternalResource destinationResource = InternalResource.getInternalResource(null, "/" + destination.replaceFirst(uriInfo.getBaseUri().toString(), "")); final InternalResource sourceResource = InternalResource.getInternalResource(uriInfo, uriInfo.getPath()); if (destinationResource != null && sourceResource != null) { final StringReturnValue stringReturnValue = sourceResource.get(deleteManager); if (stringReturnValue.getStatusCode() != javax.ws.rs.core.Response.Status.OK.getStatusCode()) { return javax.ws.rs.core.Response.status(stringReturnValue.getStatusCode()).build(); } int statusCode; if ((statusCode = destinationResource.write(deleteManager, stringReturnValue.getValue())) != javax.ws.rs.core.Response.Status.NO_CONTENT.getStatusCode()) { return javax.ws.rs.core.Response.status(statusCode).build(); } if ((statusCode = sourceResource.delete(deleteManager)) != javax.ws.rs.core.Response.Status.NO_CONTENT.getStatusCode()) { return javax.ws.rs.core.Response.status(statusCode).build(); } return javax.ws.rs.core.Response.ok().build(); } return javax.ws.rs.core.Response.status(javax.ws.rs.core.Response.Status.NOT_FOUND).build(); } public static javax.ws.rs.core.Response delete(final DeleteManager deleteManager, final UriInfo uriInfo) { final InternalResource sourceResource = InternalResource.getInternalResource(uriInfo, uriInfo.getPath()); if (sourceResource != null) { return javax.ws.rs.core.Response.status(sourceResource.delete(deleteManager)).build(); } return javax.ws.rs.core.Response.status(javax.ws.rs.core.Response.Status.NOT_FOUND).build(); } public static StringReturnValue get(final DeleteManager deleteManager, final UriInfo uriInfo) { final InternalResource sourceResource = InternalResource.getInternalResource(uriInfo, uriInfo.getPath()); if (sourceResource != null) { StringReturnValue statusCode; if ((statusCode = sourceResource.get(deleteManager)).getStatusCode() != javax.ws.rs.core.Response.Status.OK.getStatusCode()) { return statusCode; } return statusCode; } return new StringReturnValue(javax.ws.rs.core.Response.Status.NOT_FOUND.getStatusCode(), null); } public static javax.ws.rs.core.Response put(final DeleteManager deleteManager, final UriInfo uriInfo, final InputStream entityStream) { try { final InternalResource sourceResource = InternalResource.getInternalResource(uriInfo, uriInfo.getPath()); if (sourceResource != null) { final StringWriter writer = new StringWriter(); IOUtils.copy(entityStream, writer, "UTF-8"); final String newContents = writer.toString(); int statusCode = sourceResource.write(deleteManager, newContents); return javax.ws.rs.core.Response.status(statusCode).build(); } return javax.ws.rs.core.Response.status(javax.ws.rs.core.Response.Status.NOT_FOUND).build(); } catch (final IOException e) { } return javax.ws.rs.core.Response.serverError().build(); } /** * The factory method that returns the object to handle a URL request. * @param uri The request URI * @return The object to handle the response, or null if the URL is invalid. */ public static InternalResource getInternalResource(final UriInfo uri, final String requestPath) { LOGGER.info("ENTER InternalResource.getInternalResource() " + requestPath); /* Order is important here, as the TOPIC_TEMP_FILE_RE will match everything the TOPIC_CONTENTS_RE will. So we check TOPIC_TEMP_FILE_RE after TOPIC_CONTENTS_RE. Other regexes are specific enough not to match each other. */ final Matcher topicContents = TOPIC_CONTENTS_RE.matcher(requestPath); if (topicContents.matches()) { LOGGER.info("Matched InternalResourceTopicContent"); return new InternalResourceTopicContent(uri, Integer.parseInt(topicContents.group("TopicID"))); } final Matcher topicTemp = TOPIC_TEMP_FILE_RE.matcher(requestPath); if (topicTemp.matches()) { LOGGER.info("Matched InternalResourceTempTopicFile"); return new InternalResourceTempTopicFile(uri, requestPath); } final Matcher topicFolder = TOPIC_FOLDER_RE.matcher(requestPath); if (topicFolder.matches()) { LOGGER.info("Matched InternalResourceTopicVirtualFolder"); return new InternalResourceTopicVirtualFolder(uri, requestPath); } final Matcher rootFolder = ROOT_FOLDER_RE.matcher(requestPath); if (rootFolder.matches()) { LOGGER.info("Matched InternalResourceRoot"); return new InternalResourceRoot(uri, requestPath); } final Matcher topic = TOPIC_RE.matcher(requestPath); if (topic.matches()) { LOGGER.info("Matched InternalResourceTopic"); return new InternalResourceTopic(uri, Integer.parseInt(topic.group("TopicID"))); } LOGGER.info("None matched"); return null; } /** * Returning a child folder means returning a Respose that identifies a WebDAV collection. * This method populates the returned request with the information required to identify * a child folder. * * @param uriInfo The URI of the current request * @param resourceName The name of the child folder * @return The properties for a child folder */ public static net.java.dev.webdav.jaxrs.xml.elements.Response getFolderProperties(final UriInfo uriInfo, final String resourceName) { /*final Date lastModified = new Date(0); final CreationDate creationDate = new CreationDate(lastModified); final GetLastModified getLastModified = new GetLastModified(lastModified); final Prop prop = new Prop(creationDate, getLastModified, COLLECTION);*/ final Prop prop = new Prop(COLLECTION); final Status status = new Status((javax.ws.rs.core.Response.StatusType) OK); final PropStat propStat = new PropStat(prop, status); final URI uri = uriInfo.getRequestUriBuilder().path(resourceName).build(); final HRef hRef = new HRef(uri); final net.java.dev.webdav.jaxrs.xml.elements.Response folder = new net.java.dev.webdav.jaxrs.xml.elements.Response(hRef, null, null, null, propStat); return folder; } /** * @param uriInfo The URI of the current request * @return The properties for the current folder */ public static net.java.dev.webdav.jaxrs.xml.elements.Response getFolderProperties(final UriInfo uriInfo) { /*final Date lastModified = new Date(0); final CreationDate creationDate = new CreationDate(lastModified); final GetLastModified getLastModified = new GetLastModified(lastModified); final Prop prop = new Prop(creationDate, getLastModified, COLLECTION);*/ final Prop prop = new Prop(COLLECTION); final Status status = new Status((javax.ws.rs.core.Response.StatusType) OK); final PropStat propStat = new PropStat(prop, status); final URI uri = uriInfo.getRequestUri(); final HRef hRef = new HRef(uri); final net.java.dev.webdav.jaxrs.xml.elements.Response folder = new net.java.dev.webdav.jaxrs.xml.elements.Response(hRef, null, null, null, propStat); return folder; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
277761084b371bed753ca7fd5ff16727697c751d
280d09a59bcdae0eb061d3eda579aa0c7a43c084
/app/src/main/java/com/king/khcareer/home/k4/HomeData.java
6b76c95dc68649e7d0e00762bdca30757b59c779
[]
no_license
evrimulgen/KHCareer
3bcc529a21a14d84b57c813be9c6543029146cc2
81637b47f9e979d142f8c233a490b3de8cabd02d
refs/heads/master
2020-12-30T11:58:51.886985
2017-05-02T09:59:26
2017-05-02T09:59:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,678
java
package com.king.khcareer.home.k4; import com.king.khcareer.match.gallery.UserMatchBean; import com.king.khcareer.model.sql.player.bean.Record; import java.util.List; /** * Created by Administrator on 2017/4/3 0003. */ public class HomeData { private List<Record> recordList; private String recordMatch; private String recordCountry; private String recordRound; private String recordCourt; private String playerName1; private boolean isWinner1; private String playerName2; private boolean isWinner2; private String playerName3; private boolean isWinner3; private List<UserMatchBean> matchList; public List<Record> getRecordList() { return recordList; } public void setRecordList(List<Record> recordList) { this.recordList = recordList; } public String getRecordMatch() { return recordMatch; } public void setRecordMatch(String recordMatch) { this.recordMatch = recordMatch; } public String getRecordRound() { return recordRound; } public void setRecordRound(String recordRound) { this.recordRound = recordRound; } public String getRecordCourt() { return recordCourt; } public void setRecordCourt(String recordCourt) { this.recordCourt = recordCourt; } public String getPlayerName1() { return playerName1; } public void setPlayerName1(String playerName1) { this.playerName1 = playerName1; } public String getPlayerName2() { return playerName2; } public void setPlayerName2(String playerName2) { this.playerName2 = playerName2; } public String getPlayerName3() { return playerName3; } public void setPlayerName3(String playerName3) { this.playerName3 = playerName3; } public List<UserMatchBean> getMatchList() { return matchList; } public void setMatchList(List<UserMatchBean> matchList) { this.matchList = matchList; } public String getRecordCountry() { return recordCountry; } public void setRecordCountry(String recordCountry) { this.recordCountry = recordCountry; } public boolean isWinner1() { return isWinner1; } public void setWinner1(boolean winner1) { isWinner1 = winner1; } public boolean isWinner2() { return isWinner2; } public void setWinner2(boolean winner2) { isWinner2 = winner2; } public boolean isWinner3() { return isWinner3; } public void setWinner3(boolean winner3) { isWinner3 = winner3; } }
[ "jingyangsddx@163.com" ]
jingyangsddx@163.com
294729ff994d90a58dabb9c5c8da75d67cf160c4
6fbcc1482880f94fd9cffaf680d963910290a1ec
/uitest/src/com/vaadin/tests/components/tabsheet/TabKeyboardNavigationTest.java
65307f9492a0c335a2a3e5b9b48a7dc10c29b250
[ "Apache-2.0" ]
permissive
allanim/vaadin
4cf4c6b51cd81cbcb265cdb0897aad92689aec04
b7f9b2316bff98bc7d37c959fa6913294d9608e4
refs/heads/master
2021-01-17T10:17:00.920299
2015-09-04T02:40:29
2015-09-04T02:40:29
28,844,118
2
0
Apache-2.0
2020-01-26T02:24:48
2015-01-06T03:04:44
Java
UTF-8
Java
false
false
5,187
java
/* * Copyright 2000-2014 Vaadin Ltd. * * 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.vaadin.tests.components.tabsheet; import java.io.IOException; import org.junit.Assert; import org.junit.Test; import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebElement; import com.vaadin.testbench.TestBenchElement; import com.vaadin.tests.tb3.MultiBrowserTest; /** * Add TB3 test as the TB2 one failed on keyboard events. * * @since * @author Vaadin Ltd */ public class TabKeyboardNavigationTest extends MultiBrowserTest { @Test public void testFocus() throws InterruptedException, IOException { openTestURL(); click(1); sendKeys(1, Keys.ARROW_RIGHT); assertSheet(1); sendKeys(2, Keys.SPACE); assertSheet(2); compareScreen("tab2"); sendKeys(2, Keys.ARROW_RIGHT); sendKeys(3, Keys.ARROW_RIGHT); assertSheet(2); sendKeys(5, Keys.SPACE); assertSheet(5); compareScreen("skip-disabled-to-tab5"); TestBenchElement addTabButton = (TestBenchElement) getDriver() .findElements(By.className("v-button")).get(0); click(addTabButton); click(5); sendKeys(5, Keys.ARROW_RIGHT); assertSheet(5); sendKeys(6, Keys.SPACE); assertSheet(6); click(addTabButton); click(addTabButton); click(addTabButton); click(addTabButton); click(addTabButton); click(addTabButton); click(8); compareScreen("click-tab-8"); sendKeys(8, Keys.ARROW_RIGHT); sendKeys(9, Keys.SPACE); click(9); compareScreen("tab-9"); sendKeys(9, Keys.ARROW_RIGHT); Thread.sleep(DELAY); sendKeys(10, Keys.ARROW_RIGHT); // Here PhantomJS used to fail. Or when accessing tab2. The fix was to // call the elem.click(x, y) using the (x, y) position instead of the // elem.click() without any arguments. sendKeys(11, Keys.ARROW_RIGHT); assertSheet(9); sendKeys(12, Keys.SPACE); assertSheet(12); compareScreen("scrolled-right-to-tab-12"); click(5); sendKeys(5, Keys.ARROW_LEFT); // Here IE8 used to fail. A hidden <div> in IE8 would have the bounds of // it's parent, and when trying to see in which direction to scroll // (left or right) to make the key selected tab visible, the // VTabSheet.scrollIntoView(Tab) used to check first whether the tab // isClipped. On IE8 this will always return true for both hidden tabs // on the left and clipped tabs on the right. So instead of going to // left, it'll search all the way to the right. sendKeys(3, Keys.ARROW_LEFT); sendKeys(2, Keys.ARROW_LEFT); assertSheet(5); sendKeys(1, Keys.SPACE); assertSheet(1); compareScreen("scrolled-left-to-tab-1"); } /* * Press key on the element. */ private void sendKeys(int tabIndex, Keys key) throws InterruptedException { sendKeys(tab(tabIndex), key); } /* * Press key on the element. */ private void sendKeys(TestBenchElement element, Keys key) throws InterruptedException { element.sendKeys(key); if (DELAY > 0) { sleep(DELAY); } } /* * Click on the element. */ private void click(int tabIndex) throws InterruptedException { click(tab(tabIndex)); } /* * Click on the element. */ private void click(TestBenchElement element) throws InterruptedException { element.click(10, 10); if (DELAY > 0) { sleep(DELAY); } } /* * Delay for PhantomJS. */ private final static int DELAY = 10; private void assertSheet(int index) { String labelCaption = "Tab " + index; By id = By.id(TabKeyboardNavigation.labelID(index)); WebElement labelElement = getDriver().findElement(id); waitForElementPresent(id); Assert.assertEquals(labelCaption, labelCaption, labelElement.getText()); } /* * Provide the tab at specified index. */ private TestBenchElement tab(int index) { By by = By.className("v-tabsheet-tabitemcell"); TestBenchElement element = (TestBenchElement) getDriver().findElements( by).get(index - 1); String expected = "Tab " + index; Assert.assertEquals(expected, element.getText().substring(0, expected.length())); return element; } }
[ "bogdan@vaadin.com" ]
bogdan@vaadin.com
cf03846df39bb4292b9c1d87434c49f383c561b8
34740adf5b21c0a91e134df868ca95f6d5522d93
/bannerlib/src/main/java/com/example/bannerlib/LotteryWeb.java
aa6199f86f9aba2ab71fb975d299cee5e5f2dbf6
[]
no_license
8425334/web
9347a43fa002d7734e057b0c052e9b75cdd3f4e1
a4cde07ae3a6d20cc961b04a07d21e2e7718d598
refs/heads/master
2020-08-09T09:44:08.218481
2019-10-10T01:42:16
2019-10-10T01:42:16
213,844,372
0
0
null
null
null
null
UTF-8
Java
false
false
9,032
java
package com.example.bannerlib; import android.annotation.TargetApi; import android.app.DownloadManager; import android.app.ProgressDialog; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.database.ContentObserver; import android.database.Cursor; import android.graphics.Bitmap; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.os.Environment; import android.os.Handler; import android.text.TextUtils; import android.util.Log; import android.webkit.DownloadListener; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.Toast; import androidx.appcompat.app.AppCompatActivity; import androidx.core.content.FileProvider; import java.io.File; public class LotteryWeb extends AppCompatActivity { WebView webView; DownloadManager mDownloadManager; long mId; ProgressDialog dialog; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_lottery_web); webView = findViewById(R.id.lottery_web); dialog = new ProgressDialog(this); Intent intent = getIntent(); final String url = intent.getStringExtra("url"); //WebView设置 WebSettings settings = webView.getSettings(); settings.setDomStorageEnabled(true); settings.setJavaScriptCanOpenWindowsAutomatically(true); settings.setUseWideViewPort(true); settings.setJavaScriptCanOpenWindowsAutomatically(true); settings.setJavaScriptEnabled(true); settings.setLoadWithOverviewMode(true); this.webView.setWebViewClient((WebViewClient)new WebViewClient() { public boolean shouldOverrideUrlLoading(final WebView webView, final String s) { webView.loadUrl(s); return true; } }); this.webView.setWebViewClient((WebViewClient)new WebViewClient() { @Override public void onPageStarted(WebView view, String url, Bitmap favicon) { super.onPageStarted(view, url, favicon); } @Override public void onPageFinished(WebView view, String url) { super.onPageFinished(view, url); } public boolean shouldOverrideUrlLoading(final WebView webView, final String s) { final WebView.HitTestResult hitTestResult = webView.getHitTestResult(); if (TextUtils.isEmpty((CharSequence)hitTestResult.getExtra()) || hitTestResult.getType() == 0) { final StringBuilder sb = new StringBuilder(); sb.append("\u91cd\u5b9a\u5411: "); sb.append(hitTestResult.getType()); sb.append(" && EXTRA\uff08\uff09"); sb.append(hitTestResult.getExtra()); sb.append("------"); Log.e("\u91cd\u5b9a\u5411", sb.toString()); final StringBuilder sb2 = new StringBuilder(); sb2.append("GetURL: "); sb2.append(webView.getUrl()); sb2.append("\ngetOriginalUrl()"); sb2.append(webView.getOriginalUrl()); Log.e("\u91cd\u5b9a\u5411", sb2.toString()); final StringBuilder sb3 = new StringBuilder(); sb3.append("URL: "); sb3.append(s); Log.d("\u91cd\u5b9a\u5411", sb3.toString()); } if (!s.startsWith("http://") && !s.startsWith("https://")) { try { LotteryWeb.this.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(s))); } catch (Exception ex) { ex.printStackTrace(); } return true; } webView.loadUrl(s); return false; } }); webView.setDownloadListener(new MyDownload()); webView.loadUrl(url); } @Override public void onBackPressed() { Intent intent = getIntent(); boolean canGoBack = intent.getBooleanExtra("canGoBack", false); if (!canGoBack){ finish(); } } class MyDownload implements DownloadListener { public void onDownloadStart(final String s, final String s2, final String s3, final String s4, final long n) { if (s.endsWith(".apk")) { mDownloadManager = (DownloadManager) getSystemService(DOWNLOAD_SERVICE); DownloadManager.Request request = new DownloadManager.Request(Uri.parse(s)); // 下载过程和下载完成后通知栏有通知消息。 request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE | DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); request.setDescription("apk正在下载"); //设置保存目录 /storage/emulated/0/Android/包名/files/Download request.setDestinationInExternalFilesDir(LotteryWeb.this,Environment.DIRECTORY_DOWNLOADS,"download.apk"); mId = mDownloadManager.enqueue(request); Log.i("TAG", Environment.DIRECTORY_DOWNLOADS); //注册内容观察者,实时显示进度 MyContentObserver downloadChangeObserver = new MyContentObserver(null); getContentResolver().registerContentObserver(Uri.parse("content://downloads/my_downloads"), true, downloadChangeObserver); dialog.show(); //广播监听下载完成 listener(mId); } } private void listener(final long id) { //Toast.makeText(MainActivity.this,"XXXX",Toast.LENGTH_SHORT).show(); IntentFilter intentFilter = new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE); BroadcastReceiver broadcastReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { long longExtra = intent.getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, -1); if (id == longExtra){ // Uri downloadUri = mDownloadManager.getUriForDownloadedFile(id); Intent install = new Intent(Intent.ACTION_VIEW); File apkFile = getExternalFilesDir("DownLoad/download.apk"); Log.i("TAG", apkFile.getAbsolutePath()); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){ install.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); Uri uriForFile = FileProvider.getUriForFile(context, context.getPackageName() + ".fileprovider", apkFile); install.setDataAndType(uriForFile,"application/vnd.android.package-archive"); }else { install.setDataAndType(Uri.fromFile(apkFile),"application/vnd.android.package-archive"); } install.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(install); Toast.makeText(LotteryWeb.this,"APP下载完成", Toast.LENGTH_SHORT).show(); } } }; registerReceiver(broadcastReceiver,intentFilter); } } class MyContentObserver extends ContentObserver { public MyContentObserver(Handler handler) { super(handler); } @TargetApi(Build.VERSION_CODES.N) @Override public void onChange(boolean selfChange) { DownloadManager.Query query = new DownloadManager.Query(); query.setFilterById(mId); DownloadManager dManager = (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE); final Cursor cursor = dManager.query(query); if (cursor != null && cursor.moveToFirst()) { final int totalColumn = cursor.getColumnIndex(DownloadManager.COLUMN_TOTAL_SIZE_BYTES); final int currentColumn = cursor.getColumnIndex(DownloadManager.COLUMN_BYTES_DOWNLOADED_SO_FAR); int totalSize = cursor.getInt(totalColumn); int currentSize = cursor.getInt(currentColumn); float percent = (float) currentSize / (float) totalSize; float progress = (float) Math.floor(percent * 100); dialog.setMessage("下载进度:" + (int)progress + "%"); dialog.setCancelable(false); if (progress == 100){ dialog.dismiss(); } } } } }
[ "8425334@qq.com" ]
8425334@qq.com
e8823949a3d67ae2fa3edecfefe34c8a5f893a7a
c48a4f190b481904e0a4b94099364e802da1e1b6
/app/src/main/java/com/example/wangyang/tinnerwangyang/Pedometer/CountDownTimer.java
321773091eeea3ce332d1ccebd201e14af8a3e22
[]
no_license
woerte197/Tinnerwangyang
3b9c9fd2401dd1ae4a53ba314113aa4f7539d7c1
ca14a95c8798f980a01594d5a9388145d1caf663
refs/heads/master
2018-10-04T16:38:37.888151
2018-06-28T01:18:42
2018-06-28T01:18:42
119,765,847
0
0
null
null
null
null
UTF-8
Java
false
false
3,162
java
package com.example.wangyang.tinnerwangyang.Pedometer; import android.os.Handler; import android.os.Message; import android.os.SystemClock; public abstract class CountDownTimer { /** * Millis since epoch when alarm should stop. */ private final long mMillisInFuture; /** * The interval in millis that the user receives callbacks */ private final long mCountdownInterval; private long mStopTimeInFuture; private boolean mCancelled = false; /** * @param millisInFuture The number of millis in the future from the call * to {@link #start()} until the countdown is done and {@link #onFinish()} * is called. * @param countDownInterval The interval along the way to receive * {@link #onTick(long)} callbacks. */ public CountDownTimer(long millisInFuture, long countDownInterval) { mMillisInFuture = millisInFuture; mCountdownInterval = countDownInterval; } /** * Cancel the countdown. * * Do not call it from inside CountDownTimer threads */ public final void cancel() { mHandler.removeMessages(MSG); mCancelled = true; } /** * Start the countdown. */ public synchronized final CountDownTimer start() { if (mMillisInFuture <= 0) { onFinish(); return this; } mStopTimeInFuture = SystemClock.elapsedRealtime() + mMillisInFuture; mHandler.sendMessage(mHandler.obtainMessage(MSG)); mCancelled = false; return this; } /** * Callback fired on regular interval. * @param millisUntilFinished The amount of time until finished. */ public abstract void onTick(long millisUntilFinished); /** * Callback fired when the time is up. */ public abstract void onFinish(); private static final int MSG = 1; // handles counting down private Handler mHandler = new Handler() { @Override public void handleMessage(Message msg) { synchronized (CountDownTimer.this) { final long millisLeft = mStopTimeInFuture - SystemClock.elapsedRealtime(); if (millisLeft <= 0) { onFinish(); } else if (millisLeft < mCountdownInterval) { // no tick, just delay until done sendMessageDelayed(obtainMessage(MSG), millisLeft); } else { long lastTickStart = SystemClock.elapsedRealtime(); onTick(millisLeft); // take into account user's onTick taking time to execute long delay = lastTickStart + mCountdownInterval - SystemClock.elapsedRealtime(); // special case: user's onTick took more than interval to // complete, skip to next interval while (delay < 0) delay += mCountdownInterval; if (!mCancelled) { sendMessageDelayed(obtainMessage(MSG), delay); } } } } }; }
[ "wangyang@jiemo.net" ]
wangyang@jiemo.net
bb36b75074373d1651ab32e00c7e902481dd876d
1ca86d5d065372093c5f2eae3b1a146dc0ba4725
/core-java-modules/core-java-lang-syntax-2/src/main/java/com/surya/core/scope/LoopScopeExample.java
86579f8f9e7fd3f3f7035b645aecd878af9c9723
[]
no_license
Suryakanta97/DemoExample
1e05d7f13a9bc30f581a69ce811fc4c6c97f2a6e
5c6b831948e612bdc2d9d578a581df964ef89bfb
refs/heads/main
2023-08-10T17:30:32.397265
2021-09-22T16:18:42
2021-09-22T16:18:42
391,087,435
0
1
null
null
null
null
UTF-8
Java
false
false
465
java
package com.surya.core.scope; import java.util.Arrays; import java.util.List; public class LoopScopeExample { List<String> listOfNames = Arrays.asList("Joe", "Susan", "Pattrick"); public void iterationOfNames() { String allNames = ""; for (String name : listOfNames) { allNames = allNames + " " + name; } // compiler error, name cannot be resolved to a variable // String lastNameUsed = name; } }
[ "suryakanta97@github.com" ]
suryakanta97@github.com
edbff3fe05d7c62ea3c151be67737d78c049dcd7
e63363389e72c0822a171e450a41c094c0c1a49c
/Mate20_9_0_0/src/main/java/android/filterpacks/imageproc/ToRGBAFilter.java
381e79d98110774ee6ef6e2957c07fd8dd5be77c
[]
no_license
solartcc/HwFrameWorkSource
fc23ca63bcf17865e99b607cc85d89e16ec1b177
5b92ed0f1ccb4bafc0fdb08b6fc4d98447b754ad
refs/heads/master
2022-12-04T21:14:37.581438
2020-08-25T04:30:43
2020-08-25T04:30:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,584
java
package android.filterpacks.imageproc; import android.app.slice.SliceItem; import android.filterfw.core.Filter; import android.filterfw.core.FilterContext; import android.filterfw.core.Frame; import android.filterfw.core.FrameFormat; import android.filterfw.core.MutableFrameFormat; import android.filterfw.core.NativeProgram; import android.filterfw.core.Program; import android.filterfw.format.ImageFormat; public class ToRGBAFilter extends Filter { private int mInputBPP; private FrameFormat mLastFormat = null; private Program mProgram; public ToRGBAFilter(String name) { super(name); } public void setupPorts() { MutableFrameFormat mask = new MutableFrameFormat(2, 2); mask.setDimensionCount(2); addMaskedInputPort(SliceItem.FORMAT_IMAGE, mask); addOutputBasedOnInput(SliceItem.FORMAT_IMAGE, SliceItem.FORMAT_IMAGE); } public FrameFormat getOutputFormat(String portName, FrameFormat inputFormat) { return getConvertedFormat(inputFormat); } public FrameFormat getConvertedFormat(FrameFormat format) { MutableFrameFormat result = format.mutableCopy(); result.setMetaValue(ImageFormat.COLORSPACE_KEY, Integer.valueOf(3)); result.setBytesPerSample(4); return result; } public void createProgram(FilterContext context, FrameFormat format) { this.mInputBPP = format.getBytesPerSample(); if (this.mLastFormat == null || this.mLastFormat.getBytesPerSample() != this.mInputBPP) { this.mLastFormat = format; int i = this.mInputBPP; if (i == 1) { this.mProgram = new NativeProgram("filterpack_imageproc", "gray_to_rgba"); } else if (i == 3) { this.mProgram = new NativeProgram("filterpack_imageproc", "rgb_to_rgba"); } else { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("Unsupported BytesPerPixel: "); stringBuilder.append(this.mInputBPP); stringBuilder.append("!"); throw new RuntimeException(stringBuilder.toString()); } } } public void process(FilterContext context) { Frame input = pullInput(SliceItem.FORMAT_IMAGE); createProgram(context, input.getFormat()); Frame output = context.getFrameManager().newFrame(getConvertedFormat(input.getFormat())); this.mProgram.process(input, output); pushOutput(SliceItem.FORMAT_IMAGE, output); output.release(); } }
[ "lygforbs0@gmail.com" ]
lygforbs0@gmail.com
2cac791ef4294158377fe129efb3a77941eb58c8
dac8ec2b313b66b298af6488f7c19fadb201150a
/Java Code/src/JavaLesson39.java
8f33bd4303d3a6259a750d25d98d0de55b878060
[]
no_license
SanjanaKumar07/JavaCode
c7aea0ba33ad4d08490391d5ac272399a8ec6d79
746587dd0dd16647c76d7892bddacc780395c901
refs/heads/master
2020-08-12T12:53:49.115515
2016-10-04T17:22:05
2016-10-04T17:22:05
214,770,809
0
1
null
2019-10-13T06:17:44
2019-10-13T06:17:44
null
UTF-8
Java
false
false
4,010
java
import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.IOException; // Thrown when a URL doesn't contain http:// // and other rules like that import java.net.MalformedURLException; import java.net.URL; // A text component that allows for rich text // and basic html display import javax.swing.JEditorPane; import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextField; // Provides information on events triggered // through interaction with links import javax.swing.event.HyperlinkEvent; // Monitors user activity with links import javax.swing.event.HyperlinkListener; public class JavaLesson39 extends JFrame implements HyperlinkListener, ActionListener{ public static void main(String[] args){ new JavaLesson39("file:///Volumes/My%20Book/Presentations/HTML%20Tutorial/htmlexample.html"); } String defaultURL; JPanel toolPanel = new JPanel(); JTextField theURL = new JTextField(25); // Displays basic html pages // Doesn't understand JavaScript JEditorPane htmlPage; public JavaLesson39(String defaultURL){ JFrame frame = new JFrame("Java Browser"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.defaultURL = defaultURL; // If the user interacts with the JTextField the // actionPerformed method is called theURL.addActionListener(this); // Set default text in the JTextField theURL.setText(defaultURL); // Add the text field to a panel toolPanel.add(theURL); // Add the panel to the northern quadrant of a frame frame.add(toolPanel, BorderLayout.NORTH); try { htmlPage = new JEditorPane(defaultURL); // If the user interacts with the JEditorPane // actions are triggered. Ex. Click on a link // change the JEditorPane page location htmlPage.addHyperlinkListener(this); // You can leave this true for rich text documents // but it will mess up web page display htmlPage.setEditable(false); // Add the JEditorPane to a Scroll pane JScrollPane scroller = new JScrollPane(htmlPage); // Add Scroll pane and JEditorPane to the frame frame.add(scroller, BorderLayout.CENTER); } // If something goes wrong with locating the html page // this will handle that error catch (IOException e) { e.printStackTrace(); } // Set size of the frame and display it frame.setSize(1200, 800); frame.setVisible(true); } public void hyperlinkUpdate(HyperlinkEvent e) { // Checks if a link was clicked // EventType.ENTERED : Checks for hovering // EventType.EXITED : Checks for leaving link if(e.getEventType() == HyperlinkEvent.EventType.ACTIVATED){ try { // Sets the URL to be displayed // getURL gets the URL for the link htmlPage.setPage(e.getURL()); // toExternalForm creates a String representation of the URL theURL.setText(e.getURL().toExternalForm()); } catch(IOException e1){ e1.printStackTrace(); } } } public void actionPerformed(ActionEvent e) { String pageURL = ""; // Gets the Object that had an event triggered if(e.getSource() == theURL){ // Get the text in the JTextField pageURL = theURL.getText(); } else { pageURL = defaultURL; // Opens an alert box when an error is made JOptionPane.showMessageDialog(JavaLesson39.this, "Please Enter a Web Address", "Error", JOptionPane.ERROR_MESSAGE); } try{ // Sets the URL to be displayed htmlPage.setPage(new URL(pageURL)); theURL.setText(pageURL); } catch(MalformedURLException e2){ JOptionPane.showMessageDialog(JavaLesson39.this, "Please use http://", "Error", JOptionPane.ERROR_MESSAGE); } catch(IOException e1){ e1.printStackTrace(); } } }
[ "rickeyhrabowskie@Rickeys-MacBook-Pro.local" ]
rickeyhrabowskie@Rickeys-MacBook-Pro.local
118fb0fb9fe099ced6c01d4b1a97b305d8a2b864
1799541e5cabcd5ec5d1e6d89463de2cd7af91ba
/src/main/java/com/infy/order/service/OrderServiceImpl.java
b42008df0ef35bac85494290a662c64eb7a8e602
[]
no_license
tsankar81/sankar
67b23464791b4f11a97a47fda0dd52f3d78c6935
ac3a70a69b355b302f0842f0abd39cbce10eaa9e
refs/heads/master
2021-01-18T23:47:22.461609
2017-03-09T17:42:11
2017-03-09T17:42:11
84,381,920
0
0
null
null
null
null
UTF-8
Java
false
false
2,036
java
package com.infy.order.service; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.infy.order.exception.OrderException; import com.infy.order.model.Order; import com.infy.order.repository.OrderRepository; import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand; @Service public class OrderServiceImpl implements OrderService { @Autowired OrderRepository orderRepo; @Override public Order findByOrderNo(String orderNo) { Order order = orderRepo.findOne(orderNo); return order; } @Override public Order findByPoNumber(String poNumber) { Order order = orderRepo.findByPonumber(poNumber); return order; } @Override public List<Order> findByOrderType(String orderType) throws OrderException { List<Order> order = orderRepo.findByOrdertype(orderType); System.out.println("order value in findByOrderType==" + order); System.out.println("order size in findByOrderType==" + order.size()); if (order == null || order.size() == 0) throw new OrderException("Order Not Found!!"); return order; } @HystrixCommand(fallbackMethod = "circuitBreakerTest") @Override public Order findByCustomerId(String customerId) { Order order = orderRepo.findByCustomerid(customerId); return order; } @Override public List<Order> findAllOrder() { List<Order> orderList = (List<Order>) orderRepo.findAll(); return orderList; } @Override public void saveOrder(List<Order> orders) { orderRepo.save(orders); } @Override public void deleteOrder(String orderNumber) { orderRepo.delete(orderNumber); } @Override public void updateOrder(List<Order> orders) { orderRepo.save(orders); } @Override public Order circuitBreakerTest(String customerId) { Order orderMock = new Order(); orderMock.setOrderNumber("mockorderNo"); orderMock.setCustomerId("mockCustomerId"); orderMock.setOrderDate("mockorderdate"); orderMock.setOrderType("mockordertype"); return orderMock; } }
[ "Sankar_Thangaraj@infosys.com" ]
Sankar_Thangaraj@infosys.com
13ce14227461f8bb26d3a2648bcc62e1867396f1
073a7cce34978d764e2dcc45ba1ca2b3cdeb35ea
/decorator/starbuzz/Beverage.java
b10621c7d19b6a2751b46f2330fcb1b4ef23f074
[]
no_license
Feijianjun/Designpatterns
a0558ba51fdfe7ac6f898cf48dc37029478d89c2
ae7a4bf3900ce14f61131c86a4269a8c599d575d
refs/heads/master
2020-07-08T05:24:42.801468
2019-08-22T12:14:41
2019-08-22T12:14:41
203,577,909
0
0
null
null
null
null
UTF-8
Java
false
false
213
java
package shejimoshi.decorator.starbuzz; public abstract class Beverage { String description = "Unknown Beverage"; public String getDescription() { return description; } public abstract double cost(); }
[ "1303259588@qq.com" ]
1303259588@qq.com
cb0f16c47e82466bb5d49220586a4003f91a9e40
2c00b9c4ec9fca85833a0d47ed39a16a31d272c0
/Java/LC346.java
2b450b3a3a7d1245996d90253cc3eb31e017e622
[]
no_license
oily126/Leetcode
fff8d00ab41e338a02adc821b19b58d2ce9db6ad
23393768ab1fae704ac753290d7ea36ce2c3c0c6
refs/heads/master
2020-04-16T02:16:22.847024
2016-11-25T04:34:05
2016-11-25T04:34:05
64,791,414
0
0
null
null
null
null
UTF-8
Java
false
false
628
java
public class MovingAverage { Queue<Integer> nums; double sum = 0; int len; /** Initialize your data structure here. */ public MovingAverage(int size) { nums = new LinkedList<>(); len = size; } public double next(int val) { nums.offer(val); sum += val; if (nums.size() > len) { int delVal = nums.poll(); sum -= delVal; } return sum / nums.size(); } } /** * Your MovingAverage object will be instantiated and called as such: * MovingAverage obj = new MovingAverage(size); * double param_1 = obj.next(val); */
[ "oilygm@gmail.com" ]
oilygm@gmail.com
1e09e722215164a6841c7693fe1a7c24562875aa
8929abdef2b0c3acb2cd9fd1d1188974c071f664
/NyimaWeather/src/com/nyimaweather/app/db/Weather_data.java
a414e0ef2a76b1a0e030573f9f9bbf3199d432f0
[]
no_license
awesomels/Nyima-Weather
56629550dc58cd3aa8a77f702005093837947132
d8a7377bf031e02fb4adea874cdebd27e753874a
refs/heads/master
2021-01-16T19:30:45.221632
2015-05-23T06:21:46
2015-05-23T06:21:46
32,048,398
2
0
null
2015-03-12T00:26:59
2015-03-12T00:26:59
null
UTF-8
Java
false
false
1,564
java
package com.nyimaweather.app.db; public class Weather_data { private String date; private String dayPictureUrl; private String nightPictureUrl; private String weather; private String wind; private String temperature; public String getDate() { return date; } public void setDate(String date) { this.date = date; } public String getDayPictureUrl() { return dayPictureUrl; } public void setDayPictureUrl(String dayPictureUrl) { this.dayPictureUrl = dayPictureUrl; } public String getNightPictureUrl() { return nightPictureUrl; } public void setNightPictureUrl(String nightPictureUrl) { this.nightPictureUrl = nightPictureUrl; } public String getWeather() { return weather; } public void setWeather(String weather) { this.weather = weather; } public String getWind() { return wind; } public void setWind(String wind) { this.wind = wind; } public String getTemperature() { return temperature; } public void setTemperature(String temperature) { this.temperature = temperature; } public String showtoday(){ return "今天的天气:"+date+" 温度范围:"+temperature+" 天气:"+weather+" 风力:"+wind; } public String shownnnday(){ return date+"的天气:温度范围:"+temperature+" 天气:"+weather+" 风力:"+wind; } @Override public String toString() { return "" + date + ",dayPictureUrl=" + dayPictureUrl + ",nightPictureUrl="+ nightPictureUrl+",weather="+ weather+",wind="+ wind+",temperature="+ temperature+""; } }
[ "liushan201319@gmail.com" ]
liushan201319@gmail.com
2c02b03ede2470c0e6b8c895550f70a7021e432d
50f3b54773b759a686f16d425a4ab4da7b22f5b5
/src/main/java/com/uabc/database/example/examplejpa/WebSecurityConfig.java
947ff726c86eed41a0926e83374034ba20a15ff6
[]
no_license
franciscoreyesp/ExampleJPASeguridad
9fd0d4e1dc7c8544c2c04f86480a3793060fe19e
d909b27eda48c2fb8311411bbcefbd099d8d2d77
refs/heads/master
2021-10-26T05:16:53.511841
2019-04-10T22:52:32
2019-04-10T22:52:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,218
java
package com.uabc.database.example.examplejpa; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; @Configuration @EnableWebSecurity public class WebSecurityConfig extends WebSecurityConfigurerAdapter { @Qualifier("userDetailsServiceImpl") @Autowired private UserDetailsService userDetailsService; @Bean public BCryptPasswordEncoder bCryptPasswordEncoder() { return new BCryptPasswordEncoder(); } @Override protected void configure(HttpSecurity http) throws Exception { http .authorizeRequests() .antMatchers("/").permitAll() //Paginas donde todos los usuarios pueden entrar sin autentificar //.antMatchers("/", "/contacts/**", "/users/**").permitAll() .anyRequest().authenticated() .and() .formLogin() .loginPage("/login") .defaultSuccessUrl("/contacts/showContacts",true) .permitAll() .and() .logout() .permitAll(); } @Bean public AuthenticationManager customAuthenticationManager() throws Exception { return authenticationManager(); } @Autowired public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { auth.userDetailsService(userDetailsService).passwordEncoder(bCryptPasswordEncoder()); } }
[ "francisco.reyes.parra@uabc.edu.mx" ]
francisco.reyes.parra@uabc.edu.mx
09f0609b2723a4f37851beb060e7da4942afa693
3a83a2241ea73de2993bcd8cae6fca23918c2755
/src/main/java/br/com/pucrio/inf/biobd/outertuning/bib/base/Log.java
458fa53eb94e49314f0cc9ca7e0a7db238198f5f
[]
no_license
raphaelfmarins/outer_tuning
ebba13687d5114ce981ac9e90423473ba284911a
417ce1c310d1dc2f7864a06ef27660990709f279
refs/heads/master
2023-02-05T19:58:22.576388
2023-01-30T13:44:08
2023-01-30T13:44:08
199,157,217
0
1
null
2019-07-27T11:39:12
2019-07-27T11:39:12
null
UTF-8
Java
false
false
7,254
java
/* * DBX - Database eXternal Tuning * BioBD Lab - PUC-Rio && DC - UFC * */ package br.com.pucrio.inf.biobd.outertuning.bib.base; import br.com.pucrio.inf.biobd.outertuning.bib.configuration.Configuration; import com.google.gson.Gson; import java.io.BufferedWriter; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.logging.Level; import java.util.logging.Logger; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Log { protected static Configuration prop = null; protected static String debug; private static String lastDebug = ""; private static int difTime = 0; protected static String nameFileLog; public static Gson gson; public static String getNameFileLog(String complement) { return complement + "_" + nameFileLog; } public static void setNameFileLog(String nameFileLog) { if (Log.nameFileLog == null) { Log.nameFileLog = nameFileLog; } } public Log(Configuration properties) { Log.prop = properties; readDebug(); Log.setNameFileLog(getDateTime("dd-MM-yyyy-'at'-hh-mm-ss-a")); gson = new Gson(); } protected final void readDebug() { if (Log.debug == null) { Log.debug = String.valueOf(Log.prop.getProperty("debug")); } } protected void print(Object msg) { String textToPrint = this.getDateTime("hh:mm:ss") + this.getDifTime(this.getDateTime("hh:mm:ss")) + " = " + msg; // if (this.isPrint(0)) { System.out.println(textToPrint); // } // if (this.isPrint(1)) { // this.writeFile("log", textToPrint); // } } protected boolean isPrint(int pos) { return Log.debug.substring(pos, pos + 1).equals("1"); } protected String removerNl(String frase) { String padrao = "\\s{2,}"; Pattern regPat = Pattern.compile(padrao); Matcher matcher = regPat.matcher(frase); String res = matcher.replaceAll(" ").trim(); return res.replaceAll("(\n|\r)+", " "); } public final String getDateTime(String format) { SimpleDateFormat ft = new SimpleDateFormat(format); Date today = new Date(); return ft.format(today); } public void title(String msg) { if (this.isPrint(1)) { int size = 80 - msg.length(); StringBuilder buf = new StringBuilder(); buf.append("=="); for (int i = 0; i < size / 2; ++i) { buf.append("="); } this.print(buf.toString() + " " + msg + " " + buf.toString()); } } public void endTitle() { this.title("fim"); } public void msg(Object msg) { this.print(msg); } public void error(Object error) { errorPrint(error); } private void errorPrint(Object e) { this.print(e); throw new UnsupportedOperationException(e.toString()); } public String getDifTime(String now) { if (!now.isEmpty() && !lastDebug.isEmpty()) { try { SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); Date nowDate = sdf.parse(now); Date lastDate = sdf.parse(lastDebug); long diff = nowDate.getTime() - lastDate.getTime(); difTime = (int) (diff / 1000); } catch (ParseException ex) { Logger.getLogger(Log.class.getName()).log(Level.SEVERE, null, ex); } } this.setLastDebug(now); String result = "= + " + difTime + "s"; if (difTime < 9) { result += " "; } else { result += " "; } return result; } public void setLastDebug(String last) { lastDebug = last; } public String getLastDebug() { return lastDebug; } public void setDifTime(int difTime) { Log.difTime = difTime; } public void writeFile(String nameFile, String content) { try { OutputStreamWriter writer; boolean append = false; switch (nameFile) { case "pid": nameFile = nameFile + ".txt"; break; case "reportexcel": nameFile = prop.getProperty("folderLog") + File.separatorChar + getNameFileLog(nameFile) + ".csv"; break; case "reportexcelappend": nameFile = prop.getProperty("folderLog") + File.separatorChar + getNameFileLog(nameFile) + ".csv"; append = true; break; case "log": nameFile = prop.getProperty("folderLog") + File.separatorChar + getNameFileLog(nameFile) + ".txt"; append = true; break; default: nameFile = prop.getProperty("folderLog") + File.separatorChar + nameFile + ".txt"; append = true; } nameFile = prop.getProperty("path") + nameFile; writer = new OutputStreamWriter(new FileOutputStream(nameFile, append), "UTF-8"); BufferedWriter fbw = new BufferedWriter(writer); fbw.write(content); fbw.newLine(); fbw.close(); } catch (IOException ex) { this.errorPrint(ex); } } public void writePID() { msg("PID: " + getPID()); writeFile("pid", String.valueOf(getPID())); } public void archiveLogFiles() { File folder = new File(prop.getProperty("path") + prop.getProperty("folderLog") + File.separatorChar); if (!folder.exists()) { folder.mkdir(); } File afile[] = folder.listFiles(); int i = 0; for (int j = afile.length; i < j; i++) { File arquivos = afile[i]; String nameFile = arquivos.getName(); if (nameFile.contains(".txt") || nameFile.contains(".csv") || (nameFile.equals("blackboard.properties") && prop.containsKey("blackboard") && prop.getProperty("blackboard").equals("1"))) { String nameFolder = prop.getProperty("path") + "talk/"; if (nameFile.contains("_")) { nameFolder += nameFile.substring(nameFile.indexOf("_") + 1, nameFile.indexOf(".")); } else { nameFolder += nameFile.substring(0, nameFile.indexOf(".")); } new File(nameFolder).mkdir(); File diretorio = new File(nameFolder); File destiny = new File(diretorio, arquivos.getName()); if (destiny.exists()) { destiny.delete(); } arquivos.renameTo(new File(diretorio, arquivos.getName())); } } } public long getPID() { String processName = java.lang.management.ManagementFactory.getRuntimeMXBean().getName(); return Long.parseLong(processName.split("@")[0]); } }
[ "raphaelf.marins@gmail.com" ]
raphaelf.marins@gmail.com
f9fa133b854c760e72a4e03c94a917fbabefb21e
ff1b4f7c01332f4c6a8089e2c531dcd31fa07ad6
/pacote download/Decisão/Questao16.java
1ab42e3a77a207be6a9c5aa5251e0e63f8092c05
[ "MIT" ]
permissive
CauanyRodrigues01/Codigos-Java
b1b7f5723debed0b49c447288338629d4a782d00
de1bc9192c74c9a7b11f7f11ff27891d0a7a3331
refs/heads/main
2022-12-29T20:34:56.647901
2020-10-08T23:03:26
2020-10-08T23:03:26
302,212,903
0
0
null
null
null
null
ISO-8859-1
Java
false
false
1,039
java
package Decisão; import java.lang.Math; import java.util.Scanner; public class Questao16 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("TRIÂNGULO"); System.out.print("Digite um número para a hipotenusa: "); float a = sc.nextFloat(); if (a<0 && a%1!=0) { System.out.print("Só pode ser inteiro e positivo"); } else { System.out.print("Digite um número para um cateto: "); float b = sc.nextFloat(); if (b<0 && b%1!=0) { System.out.print("Só pode ser inteiro e positivo"); } else { System.out.print("Digite um número para outro cateto: "); float c = sc.nextFloat(); if (c<0 && c%1!=0) { System.out.print("Só pode ser inteiro e positivo"); } else { double h_2 = Math.pow(a,2); double c1_2 = Math.pow(b,2); double c2_2 = Math.pow(c,2); if (h_2 == c1_2 + c2_2) { System.out.print("O triângulo é retangulo"); } else { System.out.print("O triângulo não é triângulo retângulo"); } } } } } }
[ "cauanyrodrigues01@gmail.com" ]
cauanyrodrigues01@gmail.com
2bd940e80837dd36c791cf166cd3cd2761956cf6
19809d0be46f6582a7802a773afc792868304942
/zookeeperStudy/src/main/java/org/apache/zookeeper/Login.java
379b415a7392fcf739c5f0c45c87601be1b3b69f
[]
no_license
jxxiangwen/JavaStudy
fa5194630a0c46d498d1a49acba8449fa4d447e9
fbf2accf3e9ec24b633ef26d2f3328e6b021d054
refs/heads/master
2022-12-21T20:46:04.447682
2019-09-02T09:35:27
2019-09-02T09:35:27
48,320,572
0
0
null
null
null
null
UTF-8
Java
false
false
19,373
java
/** * 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.zookeeper; /** * This class is responsible for refreshing Kerberos credentials for * logins for both Zookeeper client and server. * See ZooKeeperSaslServer for server-side usage. * See ZooKeeperSaslClient for client-side usage. */ import javax.security.auth.kerberos.KerberosPrincipal; import javax.security.auth.login.AppConfigurationEntry; import javax.security.auth.login.Configuration; import javax.security.auth.login.LoginContext; import javax.security.auth.login.LoginException; import javax.security.auth.callback.CallbackHandler; import org.apache.zookeeper.client.ZKClientConfig; import org.apache.zookeeper.common.ZKConfig; import org.apache.zookeeper.server.ZooKeeperSaslServer; import org.apache.zookeeper.common.Time; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.security.auth.kerberos.KerberosTicket; import javax.security.auth.Subject; import java.util.Date; import java.util.Random; import java.util.Set; public class Login { private static final String KINIT_COMMAND_DEFAULT = "/usr/bin/kinit"; private static final Logger LOG = LoggerFactory.getLogger(Login.class); public CallbackHandler callbackHandler; // LoginThread will sleep until 80% of time from last refresh to // ticket's expiry has been reached, at which time it will wake // and try to renew the ticket. private static final float TICKET_RENEW_WINDOW = 0.80f; /** * Percentage of random jitter added to the renewal time */ private static final float TICKET_RENEW_JITTER = 0.05f; // Regardless of TICKET_RENEW_WINDOW setting above and the ticket expiry time, // thread will not sleep between refresh attempts any less than 1 minute (60*1000 milliseconds = 1 minute). // Change the '1' to e.g. 5, to change this to 5 minutes. private static final long MIN_TIME_BEFORE_RELOGIN = 1 * 60 * 1000L; private Subject subject = null; private Thread t = null; private boolean isKrbTicket = false; private boolean isUsingTicketCache = false; /** Random number generator */ private static Random rng = new Random(); private LoginContext login = null; private String loginContextName = null; private String principal = null; // Initialize 'lastLogin' to do a login at first time private long lastLogin = Time.currentElapsedTime() - MIN_TIME_BEFORE_RELOGIN; private final ZKConfig zkConfig; /** * LoginThread constructor. The constructor starts the thread used to * periodically re-login to the Kerberos Ticket Granting Server. * * @param loginContextName * name of section in JAAS file that will be use to login. Passed * as first param to javax.security.auth.login.LoginContext(). * * @param callbackHandler * Passed as second param to * javax.security.auth.login.LoginContext(). * @param zkConfig * client or server configurations * @throws LoginException * Thrown if authentication fails. */ public Login(final String loginContextName, CallbackHandler callbackHandler, final ZKConfig zkConfig) throws LoginException { this.zkConfig=zkConfig; this.callbackHandler = callbackHandler; login = login(loginContextName); this.loginContextName = loginContextName; subject = login.getSubject(); isKrbTicket = !subject.getPrivateCredentials(KerberosTicket.class).isEmpty(); AppConfigurationEntry entries[] = Configuration.getConfiguration().getAppConfigurationEntry(loginContextName); for (AppConfigurationEntry entry: entries) { // there will only be a single entry, so this for() loop will only be iterated through once. if (entry.getOptions().get("useTicketCache") != null) { String val = (String)entry.getOptions().get("useTicketCache"); if (val.equals("true")) { isUsingTicketCache = true; } } if (entry.getOptions().get("principal") != null) { principal = (String)entry.getOptions().get("principal"); } break; } if (!isKrbTicket) { // if no TGT, do not bother with ticket management. return; } // Refresh the Ticket Granting Ticket (TGT) periodically. How often to refresh is determined by the // TGT's existing expiry date and the configured MIN_TIME_BEFORE_RELOGIN. For testing and development, // you can decrease the interval of expiration of tickets (for example, to 3 minutes) by running : // "modprinc -maxlife 3mins <principal>" in kadmin. t = new Thread(new Runnable() { public void run() { LOG.info("TGT refresh thread started."); while (true) { // renewal thread's main loop. if it exits from here, thread will exit. KerberosTicket tgt = getTGT(); long now = Time.currentWallTime(); long nextRefresh; Date nextRefreshDate; if (tgt == null) { nextRefresh = now + MIN_TIME_BEFORE_RELOGIN; nextRefreshDate = new Date(nextRefresh); LOG.warn("No TGT found: will try again at {}", nextRefreshDate); } else { nextRefresh = getRefreshTime(tgt); long expiry = tgt.getEndTime().getTime(); Date expiryDate = new Date(expiry); if ((isUsingTicketCache) && (tgt.getEndTime().equals(tgt.getRenewTill()))) { Object[] logPayload = {expiryDate, principal, principal}; LOG.error("The TGT cannot be renewed beyond the next expiry date: {}." + "This process will not be able to authenticate new SASL connections after that " + "time (for example, it will not be authenticate a new connection with a Zookeeper " + "Quorum member). Ask your system administrator to either increase the " + "'renew until' time by doing : 'modprinc -maxrenewlife {}' within " + "kadmin, or instead, to generate a keytab for {}. Because the TGT's " + "expiry cannot be further extended by refreshing, exiting refresh thread now.", logPayload); return; } // determine how long to sleep from looking at ticket's expiry. // We should not allow the ticket to expire, but we should take into consideration // MIN_TIME_BEFORE_RELOGIN. Will not sleep less than MIN_TIME_BEFORE_RELOGIN, unless doing so // would cause ticket expiration. if ((nextRefresh > expiry) || ((now + MIN_TIME_BEFORE_RELOGIN) > expiry)) { // expiry is before next scheduled refresh). nextRefresh = now; } else { if (nextRefresh < (now + MIN_TIME_BEFORE_RELOGIN)) { // next scheduled refresh is sooner than (now + MIN_TIME_BEFORE_LOGIN). Date until = new Date(nextRefresh); Date newuntil = new Date(now + MIN_TIME_BEFORE_RELOGIN); Object[] logPayload = {until, newuntil, (MIN_TIME_BEFORE_RELOGIN / 1000)}; LOG.warn("TGT refresh thread time adjusted from : {} to : {} since " + "the former is sooner than the minimum refresh interval (" + "{} seconds) from now.", logPayload); } nextRefresh = Math.max(nextRefresh, now + MIN_TIME_BEFORE_RELOGIN); } nextRefreshDate = new Date(nextRefresh); if (nextRefresh > expiry) { Object[] logPayload = {nextRefreshDate, expiryDate}; LOG.error("next refresh: {} is later than expiry {}." + " This may indicate a clock skew problem. Check that this host and the KDC's " + "hosts' clocks are in sync. Exiting refresh thread.", logPayload); return; } } if (now == nextRefresh) { LOG.info("refreshing now because expiry is before next scheduled refresh time."); } else if (now < nextRefresh) { Date until = new Date(nextRefresh); LOG.info("TGT refresh sleeping until: {}", until.toString()); try { Thread.sleep(nextRefresh - now); } catch (InterruptedException ie) { LOG.warn("TGT renewal thread has been interrupted and will exit."); break; } } else { LOG.error("nextRefresh:{} is in the past: exiting refresh thread. Check" + " clock sync between this host and KDC - (KDC's clock is likely ahead of this host)." + " Manual intervention will be required for this client to successfully authenticate." + " Exiting refresh thread.", nextRefreshDate); break; } if (isUsingTicketCache) { String cmd = zkConfig.getProperty(ZKConfig.KINIT_COMMAND, KINIT_COMMAND_DEFAULT); String kinitArgs = "-R"; int retry = 1; while (retry >= 0) { try { LOG.debug("running ticket cache refresh command: {} {}", cmd, kinitArgs); Shell.execCommand(cmd, kinitArgs); break; } catch (Exception e) { if (retry > 0) { --retry; // sleep for 10 seconds try { Thread.sleep(10 * 1000); } catch (InterruptedException ie) { LOG.error("Interrupted while renewing TGT, exiting Login thread"); return; } } else { Object[] logPayload = {cmd, kinitArgs, e.toString(), e}; LOG.warn("Could not renew TGT due to problem running shell command: '{}" + " {}'; exception was:{}. Exiting refresh thread.", logPayload); return; } } } } try { int retry = 1; while (retry >= 0) { try { reLogin(); break; } catch (LoginException le) { if (retry > 0) { --retry; // sleep for 10 seconds. try { Thread.sleep(10 * 1000); } catch (InterruptedException e) { LOG.error("Interrupted during login retry after LoginException:", le); throw le; } } else { LOG.error("Could not refresh TGT for principal: {}.", principal, le); } } } } catch (LoginException le) { LOG.error("Failed to refresh TGT: refresh thread exiting now.",le); break; } } } }); t.setDaemon(true); } public void startThreadIfNeeded() { // thread object 't' will be null if a refresh thread is not needed. if (t != null) { t.start(); } } public void shutdown() { if ((t != null) && (t.isAlive())) { t.interrupt(); try { t.join(); } catch (InterruptedException e) { LOG.warn("error while waiting for Login thread to shutdown: ", e); } } } public Subject getSubject() { return subject; } public String getLoginContextName() { return loginContextName; } private synchronized LoginContext login(final String loginContextName) throws LoginException { if (loginContextName == null) { throw new LoginException("loginContext name (JAAS file section header) was null. " + "Please check your java.security.login.auth.config (=" + System.getProperty("java.security.login.auth.config") + ") and your " + getLoginContextMessage()); } LoginContext loginContext = new LoginContext(loginContextName,callbackHandler); loginContext.login(); LOG.info("successfully logged in."); return loginContext; } private String getLoginContextMessage() { if (zkConfig instanceof ZKClientConfig) { return ZKClientConfig.LOGIN_CONTEXT_NAME_KEY + "(=" + zkConfig.getProperty( ZKClientConfig.LOGIN_CONTEXT_NAME_KEY, ZKClientConfig.LOGIN_CONTEXT_NAME_KEY_DEFAULT) + ")"; } else { return ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY + "(=" + System.getProperty( ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY, ZooKeeperSaslServer.DEFAULT_LOGIN_CONTEXT_NAME) + ")"; } } // c.f. org.apache.hadoop.security.UserGroupInformation. private long getRefreshTime(KerberosTicket tgt) { long start = tgt.getStartTime().getTime(); long expires = tgt.getEndTime().getTime(); LOG.info("TGT valid starting at: {}", tgt.getStartTime().toString()); LOG.info("TGT expires: {}", tgt.getEndTime().toString()); long proposedRefresh = start + (long) ((expires - start) * (TICKET_RENEW_WINDOW + (TICKET_RENEW_JITTER * rng.nextDouble()))); if (proposedRefresh > expires) { // proposedRefresh is too far in the future: it's after ticket expires: simply return now. return Time.currentWallTime(); } else { return proposedRefresh; } } private synchronized KerberosTicket getTGT() { Set<KerberosTicket> tickets = subject.getPrivateCredentials(KerberosTicket.class); for(KerberosTicket ticket: tickets) { KerberosPrincipal server = ticket.getServer(); if (server.getName().equals("krbtgt/" + server.getRealm() + "@" + server.getRealm())) { LOG.debug("Client principal is \"" + ticket.getClient().getName() + "\"."); LOG.debug("Server principal is \"" + ticket.getServer().getName() + "\"."); return ticket; } } return null; } private boolean hasSufficientTimeElapsed() { long now = Time.currentElapsedTime(); if (now - getLastLogin() < MIN_TIME_BEFORE_RELOGIN ) { LOG.warn("Not attempting to re-login since the last re-login was " + "attempted less than {} seconds before.", (MIN_TIME_BEFORE_RELOGIN / 1000)); return false; } // register most recent relogin attempt setLastLogin(now); return true; } /** * Returns login object * @return login */ private LoginContext getLogin() { return login; } /** * Set the login object * @param login */ private void setLogin(LoginContext login) { this.login = login; } /** * Set the last login time. * @param time the number of milliseconds since the beginning of time */ private void setLastLogin(long time) { lastLogin = time; } /** * Get the time of the last login. * @return the number of milliseconds since the beginning of time. */ private long getLastLogin() { return lastLogin; } /** * Re-login a principal. This method assumes that {@link #login(String)} has happened already. * @throws LoginException on a failure */ // c.f. HADOOP-6559 private synchronized void reLogin() throws LoginException { if (!isKrbTicket) { return; } LoginContext login = getLogin(); if (login == null) { throw new LoginException("login must be done first"); } if (!hasSufficientTimeElapsed()) { return; } LOG.info("Initiating logout for {}", principal); synchronized (Login.class) { //clear up the kerberos state. But the tokens are not cleared! As per //the Java kerberos login module code, only the kerberos credentials //are cleared login.logout(); //login and also update the subject field of this instance to //have the new credentials (pass it to the LoginContext constructor) login = new LoginContext(loginContextName, getSubject()); LOG.info("Initiating re-login for {}", principal); login.login(); setLogin(login); } } }
[ "xiangwen.zou@ymm56.com" ]
xiangwen.zou@ymm56.com
21f58635322f4b0a94d002388c51bf96bf8ac815
fb05ff408ba887ec821fbe7887c67aa5af34566a
/src/main/java/com/quirko/gui/GameOverPanel.java
f85618684251af47deb00cee4ed27b71ca9a0d03
[]
no_license
cagdasgerede/JavaFX-Tetris-Clone
7005ff53b77974604efad3b5152870d61a462533
6ec3678cb4a6dcb03116f217bf59e0f944d530a7
refs/heads/master
2023-04-09T01:15:07.845186
2020-11-20T22:09:05
2020-11-20T22:09:05
314,680,266
0
1
null
2021-04-20T08:51:42
2020-11-20T22:03:25
Java
UTF-8
Java
false
false
357
java
package com.quirko.gui; import javafx.scene.control.Label; import javafx.scene.layout.BorderPane; public class GameOverPanel extends BorderPane { public GameOverPanel() { final Label gameOverLabel = new Label("GAME OVER"); gameOverLabel.getStyleClass().add("gameOverStyle"); setCenter(gameOverLabel); } }
[ "javafx.dev@gmail.com" ]
javafx.dev@gmail.com
f18ce4f7a52ad70a9d20315735ebfd1f6fb2cb98
1fb3757d9ee82d86bb66cd3a7a4ae5039876baa7
/tre-am/tre-am-master/src/br/jus/tream/saude/DTO/GuiaProcedimentoParamsDTO.java
537abdef5059ac4c14798f8e5ac29c5feffea194
[]
no_license
brancoisrael/ctis
0443ac12683ed12a1c40d68e4128871edf51daf5
828cfd76dc33935f38bf396f4f8263b12751ba85
refs/heads/master
2021-06-28T01:39:36.875411
2021-06-03T03:41:07
2021-06-03T03:41:07
232,383,272
0
0
null
null
null
null
UTF-8
Java
false
false
5,756
java
package br.jus.tream.saude.DTO; import java.io.Serializable; import java.math.BigDecimal; import java.time.LocalDate; public class GuiaProcedimentoParamsDTO implements Serializable { private static final long serialVersionUID = -669124188008707564L; private Long numeroGuia; private String anoExercicio; private Short idSituacaoGuia; private BigDecimal valor; private String nomeProcedimento; private LocalDate dataInicial; private String dataInicialString; private LocalDate dataFinal; private String dataFinalString; private Long idCredenciada; private Long idTabela; private String codProcedimento; public GuiaProcedimentoParamsDTO() { } public Long getNumeroGuia() { return numeroGuia; } public void setNumeroGuia(Long numeroGuia) { this.numeroGuia = numeroGuia; } public String getAnoExercicio() { return anoExercicio; } public void setAnoExercicio(String anoExercicio) { this.anoExercicio = anoExercicio; } public Short getIdSituacaoGuia() { return idSituacaoGuia; } public void setIdSituacaoGuia(Short idSituacaoGuia) { this.idSituacaoGuia = idSituacaoGuia; } public BigDecimal getValor() { return valor; } public void setValor(BigDecimal valor) { this.valor = valor; } public String getNomeProcedimento() { return nomeProcedimento; } public void setNomeProcedimento(String nomeProcedimento) { this.nomeProcedimento = nomeProcedimento; } public LocalDate getDataInicial() { return dataInicial; } public void setDataInicial(LocalDate dataInicial) { this.dataInicial = dataInicial; } public LocalDate getDataFinal() { return dataFinal; } public void setDataFinal(LocalDate dataFinal) { this.dataFinal = dataFinal; } public Long getIdCredenciada() { return idCredenciada; } public void setIdCredenciada(Long idCredenciada) { this.idCredenciada = idCredenciada; } public Long getIdTabela() { return idTabela; } public void setIdTabela(Long idTabela) { this.idTabela = idTabela; } public String getCodProcedimento() { return codProcedimento; } public void setCodProcedimento(String codProcedimento) { this.codProcedimento = codProcedimento; } public String getDataInicialString() { return dataInicialString; } public void setDataInicialString(String dataInicialString) { this.dataInicialString = dataInicialString; } public String getDataFinalString() { return dataFinalString; } public void setDataFinalString(String dataFinalString) { this.dataFinalString = dataFinalString; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((anoExercicio == null) ? 0 : anoExercicio.hashCode()); result = prime * result + ((codProcedimento == null) ? 0 : codProcedimento.hashCode()); result = prime * result + ((dataFinal == null) ? 0 : dataFinal.hashCode()); result = prime * result + ((dataFinalString == null) ? 0 : dataFinalString.hashCode()); result = prime * result + ((dataInicial == null) ? 0 : dataInicial.hashCode()); result = prime * result + ((dataInicialString == null) ? 0 : dataInicialString.hashCode()); result = prime * result + ((idCredenciada == null) ? 0 : idCredenciada.hashCode()); result = prime * result + ((idSituacaoGuia == null) ? 0 : idSituacaoGuia.hashCode()); result = prime * result + ((idTabela == null) ? 0 : idTabela.hashCode()); result = prime * result + ((nomeProcedimento == null) ? 0 : nomeProcedimento.hashCode()); result = prime * result + ((numeroGuia == null) ? 0 : numeroGuia.hashCode()); result = prime * result + ((valor == null) ? 0 : valor.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; GuiaProcedimentoParamsDTO other = (GuiaProcedimentoParamsDTO) obj; if (anoExercicio == null) { if (other.anoExercicio != null) return false; } else if (!anoExercicio.equals(other.anoExercicio)) return false; if (codProcedimento == null) { if (other.codProcedimento != null) return false; } else if (!codProcedimento.equals(other.codProcedimento)) return false; if (dataFinal == null) { if (other.dataFinal != null) return false; } else if (!dataFinal.equals(other.dataFinal)) return false; if (dataFinalString == null) { if (other.dataFinalString != null) return false; } else if (!dataFinalString.equals(other.dataFinalString)) return false; if (dataInicial == null) { if (other.dataInicial != null) return false; } else if (!dataInicial.equals(other.dataInicial)) return false; if (dataInicialString == null) { if (other.dataInicialString != null) return false; } else if (!dataInicialString.equals(other.dataInicialString)) return false; if (idCredenciada == null) { if (other.idCredenciada != null) return false; } else if (!idCredenciada.equals(other.idCredenciada)) return false; if (idSituacaoGuia == null) { if (other.idSituacaoGuia != null) return false; } else if (!idSituacaoGuia.equals(other.idSituacaoGuia)) return false; if (idTabela == null) { if (other.idTabela != null) return false; } else if (!idTabela.equals(other.idTabela)) return false; if (nomeProcedimento == null) { if (other.nomeProcedimento != null) return false; } else if (!nomeProcedimento.equals(other.nomeProcedimento)) return false; if (numeroGuia == null) { if (other.numeroGuia != null) return false; } else if (!numeroGuia.equals(other.numeroGuia)) return false; if (valor == null) { if (other.valor != null) return false; } else if (!valor.equals(other.valor)) return false; return true; } }
[ "you@example.com" ]
you@example.com
caf88e8b9c5d1b36b7823178d4843833c7e2222e
a7b48a476d7ab3d725d0132a352b629d574fd656
/app/src/main/java/com/example/myapplication/Versions8.java
a70fef227264c25a9b0828b8ebe11fc1372300ea
[]
no_license
sakshiranivlog2/Physiotherapy-App
03533c37fddcbacf8a56f128bf304caa6c067209
e26037bf4200d77ffc384dc8b6a753af4a4e6e74
refs/heads/master
2023-05-26T23:49:18.208165
2021-06-04T16:45:15
2021-06-04T16:45:15
364,880,166
0
0
null
null
null
null
UTF-8
Java
false
false
1,036
java
package com.example.myapplication; public class Versions8 { private String version8; private int description8; private boolean expandable8; public Versions8(String version8, int description8) { this.version8 = version8; this.description8 = description8; this.expandable8 = false; } public boolean isExpandable() { return expandable8; } public void setExpandable(boolean expandable) { this.expandable8 = expandable; } public String getVersion() { return version8; } public void setVersion(String version8) { this.version8 = version8; } public int getDescription(){ return description8; } public void setDescription(int description8) { this.description8 = description8; } @Override public String toString(){ return "Versions8{" + "version='" + version8 + '\'' + ", description='" + description8 + '\'' + '}'; } }
[ "sakshirani191@gmail.com" ]
sakshirani191@gmail.com
32da134c93a70ca753a663e20af1f12b06a265af
10c24f85f3a55d13d4a9631ba13eb2642ebd0abe
/src/SpecialMoves/CrippleShot.java
f95b2234d83361aa1c62573e811bace41adac090
[]
no_license
AustinSeto/Turn-Based-Combat
146118a9184090ff71cc6731fc393ae5f05fa3ee
c4a302471db324da80207956c0a08ed8c632ca1b
refs/heads/master
2021-01-23T13:07:54.136781
2017-07-06T22:37:48
2017-07-06T22:37:48
93,219,602
0
0
null
null
null
null
UTF-8
Java
false
false
910
java
/* * 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 src.SpecialMoves; import src.Combatants.Combatant; /** * * @author setoa */ public class CrippleShot extends SpecialMove { public CrippleShot() { super("Crippling Shot", "A crippling shot that reduces the damage of the target's next attack.", 0, 0.4, 0); } @Override public Combatant usedOn(Combatant target, int stat, boolean exhaust) { int damage; damage = (int) (baseEffect + (scalingEffect * stat)); damage = (int) (damage * target.physicalDamageMultiplier()); if (exhaust) { damage *= 0.5; } target.currentHealth -= damage; target.statusConditions[4].apply(1, 1); return target; } }
[ "austinseto@gmail.com" ]
austinseto@gmail.com
ee99ab852653ff7611ea5a3766009d7c2b5302b6
5ed62f088f324352bd878f58788ebeb0ffe5cd2a
/src/main/java/org/assertj/core/error/ShouldBeInSameYear.java
04e8da2d4a62c39eedbf6c784b81559e82ddd1c0
[ "Apache-2.0" ]
permissive
jstrachan/assertj-core
85f7355f8d41c5dfb6c27f0bbe8d576fa4042273
ac9e201c22c1a7132005bbb9e728ef0bfe2c89cc
refs/heads/master
2020-12-31T07:19:04.828438
2016-04-09T22:15:20
2016-04-09T22:15:20
56,042,912
0
1
null
2016-04-12T07:58:10
2016-04-12T07:58:09
null
UTF-8
Java
false
false
1,459
java
/** * 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. * * Copyright 2012-2016 the original author or authors. */ package org.assertj.core.error; import java.util.Date; /** * Creates an error message indicating that an assertion that verifies that a {@link Date} is in same year as another one failed. * * @author Joel Costigliola */ public class ShouldBeInSameYear extends BasicErrorMessageFactory { /** * Creates a new </code>{@link ShouldBeInSameYear}</code>. * @param actual the actual value in the failed assertion. * @param other the value used in the failed assertion to compare the actual value to. * @return the created {@code ErrorMessageFactory}. */ public static ErrorMessageFactory shouldBeInSameYear(Date actual, Date other) { return new ShouldBeInSameYear(actual, other); } private ShouldBeInSameYear(Date actual, Date other) { super("%nExpecting:%n <%s>%nto be on same year as:%n <%s>", actual, other); } }
[ "joel.costigliola@gmail.com" ]
joel.costigliola@gmail.com
58f0abc2dad2c61e2caf87d32b7c5bed05371450
ffac20eec4bd74dc551927ba7db430b18db2c90b
/src/main/java/com/yunji/model/Article.java
c5b823eda36879df85aca038978e5dce55ed9ae0
[]
no_license
yingruoheng/yunji
dfa6a19491266111ed1c923bd6f5fb1235b105e1
d835e161fcfcf76161f2dcd19de562ccdf9df1a9
refs/heads/master
2020-04-29T22:53:00.265579
2019-03-19T08:23:27
2019-03-19T08:23:27
176,461,553
0
0
null
null
null
null
UTF-8
Java
false
false
5,444
java
package com.yunji.model; import com.fasterxml.jackson.annotation.JsonFormat; import util.Utils; import java.util.Date; public class Article extends category{ private Integer articleId; private Integer userId; private String username; private String title; private Date createtime; private Date starttime; private String dateStr; private String circle; private String scenario; private String visibility; private String redisKey; private String htmlUrl; private String summary; private String picUrl; private String size; private Integer starNum; private Integer readNum; private Integer commentNum; private String organization; private String headImageUrl; private String shareVisibility; public String getShareVisibility() { return shareVisibility; } public void setShareVisibility(String shareVisibility) { this.shareVisibility = shareVisibility; } public Integer getUserId() { return userId; } public void setUserId(Integer userId) { this.userId = userId; } private String mdUrl; public Integer getArticleId() { return articleId; } public void setArticleId(Integer articleId) { this.articleId = articleId; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") public Date getCreatetime() { return createtime; } public void setCreatetime(Date createtime) { this.createtime = createtime; } @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") public Date getStarttime() { return starttime; } public void setStarttime(Date starttime) { this.starttime = starttime; } public String getHtmlUrl() { return htmlUrl; } public void setHtmlUrl(String htmlUrl) { this.htmlUrl = htmlUrl; } public String getSummary() { return summary; } public void setSummary(String summary) { this.summary = summary; } public String getPicUrl() { return picUrl; } public void setPicUrl(String picUrl) { this.picUrl = picUrl; } public String getSize() { return size; } public void setSize(String size) { this.size = size; } public String getMdUrl() { return mdUrl; } public void setMdUrl(String mdUrl) { this.mdUrl = mdUrl; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getCircle() { return circle; } public void setCircle(String circle) { this.circle = circle; } public String getScenario() { return scenario; } public void setScenario(String scenario) { this.scenario = scenario; } public String getVisibility() { return visibility; } public void setVisibility(String visibility) { this.visibility = visibility; } public String getRedisKey() { return redisKey; } public void setRedisKey(String redisKey) { this.redisKey = redisKey; } public Integer getStarNum() { return starNum; } public void setStarNum(Integer starNum) { this.starNum = starNum; } public Integer getReadNum() { return readNum; } public void setReadNum(Integer readNum) { this.readNum = readNum; } public Integer getCommentNum() { return commentNum; } public void setCommentNum(Integer commentNum) { this.commentNum = commentNum; } public String getOrganization() { return organization; } public void setOrganization(String organization) { this.organization = organization; } public String getHeadImageUrl() { return headImageUrl; } public void setHeadImageUrl(String headImageUrl) { this.headImageUrl = headImageUrl; } public String getDateStr() { return dateStr; } public void setDateStr(String dateStr) { this.dateStr = dateStr; } @Override public String toString() { return "Article{" + "articleId=" + articleId + ", userId=" + userId + ", username='" + username + '\'' + ", title='" + title + '\'' + ", createtime=" + createtime + ", dateStr='" + dateStr + '\'' + ", circle='" + circle + '\'' + ", scenario='" + scenario + '\'' + ", visibility='" + visibility + '\'' + ", redisKey='" + redisKey + '\'' + ", htmlUrl='" + htmlUrl + '\'' + ", summary='" + summary + '\'' + ", picUrl='" + picUrl + '\'' + ", size='" + size + '\'' + ", starNum=" + starNum + ", readNum=" + readNum + ", commentNum=" + commentNum + ", organization='" + organization + '\'' + ", headImageUrl='" + headImageUrl + '\'' + ", shareVisibility='" + shareVisibility + '\'' + ", mdUrl='" + mdUrl + '\'' + '}'; } }
[ "yingruoheng@higinet.com.cn" ]
yingruoheng@higinet.com.cn
b9b6944c3dd387ab2c86cb9f51df98eeb55a0e2b
66c8722f60b3f4ab8c91c627f4fc7eb15381bdd5
/src/servlet_examples/Confidentializer.java
5d45b6b5bb65e8a09d12cad38c34e8669bd3908f
[]
no_license
JuijuiCHEN/SL314
3795675cf8e944b3b4e45e2d2e58f3e9e9f46eba
6f50a34ca5c2c7ee6f21c2d04617879898271bd0
refs/heads/master
2021-09-09T15:08:03.043914
2018-03-17T08:28:46
2018-03-17T08:28:46
125,610,379
0
0
null
null
null
null
UTF-8
Java
false
false
2,564
java
package servlet_examples; import java.awt.*; import java.io.*; import java.net.*; import javax.servlet.*; import javax.servlet.http.*; import com.oreilly.servlet.ServletUtils; import Acme.JPM.Encoders.GifEncoder; public class Confidentializer extends HttpServlet { Frame frame = null; public void destroy() { // Clean up resources if (frame != null) frame.removeNotify(); } public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { ServletOutputStream out = res.getOutputStream(); Graphics g = null; try { // Get the image location from the path info // Use ServletUtils (Chapter 4) for safety URL source = ServletUtils.getResource(getServletContext(), req.getPathInfo()); // Load the image (from bytes to an Image object) MediaTracker mt = new MediaTracker(frame); // frame acts as ImageObserver Image image = Toolkit.getDefaultToolkit().getImage(source); mt.addImage(image, 0); try { mt.waitForAll(); } catch (InterruptedException e) { res.sendError(res.SC_INTERNAL_SERVER_ERROR, "Interrupted while loading image: " + ServletUtils.getStackTraceAsString(e)); return; } // Get the width and height int w = image.getWidth(frame); int h = image.getHeight(frame); // Make sure we are reading valid image data if (w <= 0 || h <= 0) { res.sendError(res.SC_NOT_FOUND, "Extra path information must point to a valid image"); return; } // Construct a matching-size off screen graphics context Image offscreen = frame.createImage(w, h); g = offscreen.getGraphics(); // Draw the image to the off-screen graphics context g.drawImage(image, 0, 0, frame); // Write CONFIDENTIAL over its top g.setFont(new Font("Monospaced", Font.BOLD | Font.ITALIC, 30)); g.drawString("CONFIDENTIAL", 10, 30); // Encode the off-screen graphics into a GIF and send it to the client res.setContentType("image/gif"); GifEncoder encoder = new GifEncoder(offscreen, out); encoder.encode(); } finally { // Clean up resources if (g != null) g.dispose(); } } public void init() throws ServletException { // Construct a reusable unshown frame frame = new Frame(); frame.addNotify(); } }
[ "mlikje0942@gmail.com" ]
mlikje0942@gmail.com
2c6abe655bf19c133b9d506926f6f4baa96e2f89
63ef7dcb7ad8f9c8476a6171727b72569c87730c
/.svn/pristine/b6/b6cec085a528e12c62afe982441cf6f22ae335e6.svn-base
fe5e33e70e69cdeba175473b0005ff3ebcb5b533
[]
no_license
kaka3511/SunEjwapi
eabc8714b84b76fb51106d430d30c403c2ad33a4
d83f97adfdaf4ec396402d28bfe8700ce5a28d81
refs/heads/master
2020-05-31T18:26:55.668983
2017-06-13T02:42:23
2017-06-13T02:42:23
94,044,153
0
1
null
null
null
null
UTF-8
Java
false
false
489
package com.huaao.sunejwapi.common.util; import com.huaao.sunejwapi.common.Constants; import com.huaao.sunejwapi.common.security.Encrypt; public class TokenUtil { public static String createToken(String uid){ StringBuffer buff = new StringBuffer(); buff.append("id_"+uid); buff.append("version_" + Constants.Version); byte[] encryptResult = Encrypt.encrypt(buff.toString()); String encryptResultStr = Encrypt.parseByte2HexStr(encryptResult); return encryptResultStr; } }
[ "351139863@qq.com" ]
351139863@qq.com
32ec20ed0fc2ff07a1cf18deb52eeb7533a7788b
be5c19ece49d9947c30b4df8cba7574a87cb0c11
/app/src/main/java/in/binplus/selfstudy/utils/ToastMsg.java
c1cfe38c56e4cc2b7c6791ee0be318e0e465b6b9
[]
no_license
dharinisp4/SmartSelfStudyMaster
9beb6cf951ac9d1605adc04c3eb0fe97aa8f76e6
6c7483d0b3fead681cfa91edc38e49d126447cc7
refs/heads/master
2020-12-30T08:41:58.276269
2020-02-07T13:36:19
2020-02-07T13:36:19
238,933,614
0
0
null
null
null
null
UTF-8
Java
false
false
1,766
java
package in.binplus.selfstudy.utils; import android.content.Context; import androidx.cardview.widget.CardView; import android.view.LayoutInflater; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; import com.binplus.selfstudy.R; public class ToastMsg { Context context; LayoutInflater inflater; public ToastMsg(Context context) { this.context=context; inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE ); } public void toastIconError(String s) { Toast toast = new Toast(context); toast.setDuration(Toast.LENGTH_LONG); //inflate view View custom_view = inflater.inflate(R.layout.toast_icon_text, null); ((TextView) custom_view.findViewById(R.id.message)).setText(s); ((ImageView) custom_view.findViewById(R.id.icon)).setImageResource(R.drawable.ic_close); ((CardView) custom_view.findViewById(R.id.parent_view)).setCardBackgroundColor(context.getResources().getColor(R.color.red_600)); toast.setView(custom_view); toast.show(); } public void toastIconSuccess(String s) { Toast toast = new Toast(context); toast.setDuration(Toast.LENGTH_LONG); //inflate view View custom_view = inflater.inflate(R.layout.toast_icon_text, null); ((TextView) custom_view.findViewById(R.id.message)).setText(s); ((ImageView) custom_view.findViewById(R.id.icon)).setImageResource(R.drawable.ic_done); ((CardView) custom_view.findViewById(R.id.parent_view)).setCardBackgroundColor(context.getResources().getColor(R.color.green_500)); toast.setView(custom_view); toast.show(); } }
[ "anasmansoori734@gmail.com" ]
anasmansoori734@gmail.com
17119ad304ab610238a4c47b7c843969ed09e528
78fff0b93496e0ab73a010dfd1f993bd37471202
/src/main/java/br/com/j4business/saga/elementoquestao/controller/ElementoQuestaoController.java
2aa402ed231d79b21c207e4d46cf732a710c7dac
[]
no_license
SergioFeitosa/sgpn
474386b39c684835fbad2ca26653751765a95917
d269011d270913e22dc5b1ec1cd4058e41d029f7
refs/heads/master
2021-07-14T15:39:55.027199
2020-06-02T18:07:45
2020-06-02T18:07:45
32,646,896
0
0
null
null
null
null
UTF-8
Java
false
false
12,362
java
package br.com.j4business.saga.elementoquestao.controller; import java.util.ArrayList; import java.util.Date; import java.util.List; import javax.persistence.PersistenceException; import javax.validation.Valid; import org.hibernate.exception.ConstraintViolationException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageImpl; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort.Direction; import org.springframework.stereotype.Controller; import org.springframework.validation.BindingResult; import org.springframework.validation.ObjectError; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import br.com.j4business.saga.elemento.model.ElementoForm; import br.com.j4business.saga.elemento.service.ElementoService; import br.com.j4business.saga.UsuarioSeguranca; import br.com.j4business.saga.agendaevento.model.AgendaEvento; import br.com.j4business.saga.atributo.enumeration.AtributoPrioridade; import br.com.j4business.saga.atributo.enumeration.AtributoStatus; import br.com.j4business.saga.colaborador.service.ColaboradorService; import br.com.j4business.saga.questao.model.QuestaoForm; import br.com.j4business.saga.questao.service.QuestaoService; import br.com.j4business.saga.elementoquestao.model.ElementoQuestao; import br.com.j4business.saga.elementoquestao.model.ElementoQuestaoByElementoForm; import br.com.j4business.saga.elementoquestao.model.ElementoQuestaoForm; import br.com.j4business.saga.elementoquestao.service.ElementoQuestaoService; @Controller public class ElementoQuestaoController { @Autowired private ElementoService elementoService; @Autowired private ColaboradorService colaboradorService; @Autowired private ElementoQuestaoService elementoQuestaoService; @Autowired private QuestaoService questaoService; @Autowired private UsuarioSeguranca usuarioSeguranca; @RequestMapping(path = "/elementoQuestaoAdd", method = RequestMethod.GET) public ModelAndView elementoQuestaoAdd(ElementoQuestaoForm elementoQuestaoForm,Pageable pageable) { ModelAndView mv = new ModelAndView("elementoQuestao/elementoQuestaoAdd"); elementoQuestaoForm = elementoQuestaoService.elementoQuestaoParametros(elementoQuestaoForm); mv.addObject("elementoQuestaoForm", elementoQuestaoForm); mv.addObject("elementoQuestaoPrioridadeValues", AtributoPrioridade.values()); mv.addObject("elementoQuestaoStatusValues", AtributoStatus.values()); Pageable colaboradorPageable = new PageRequest(0, 200, Direction.ASC, "pessoaNome"); mv.addObject("colaboradorPage", colaboradorService.getColaboradorAll(colaboradorPageable)); Pageable elementoPageable = new PageRequest(0, 200, Direction.ASC, "elementoNome"); mv.addObject("elementoPage", elementoService.getElementoAll(elementoPageable)); Pageable questaoPageable = new PageRequest(0, 200, Direction.ASC, "questaoNome"); mv.addObject("questaoPage", questaoService.getQuestaoAll(questaoPageable)); mv.addObject("usuarioNome",usuarioSeguranca.getUsuarioLogado()); mv.addObject("standardDate",new Date()); return mv; } @RequestMapping(path = "/elementoQuestaoCreate", method = RequestMethod.POST) public ModelAndView elementoQuestaoCreate(@Valid ElementoQuestaoForm elementoQuestaoForm, BindingResult result, RedirectAttributes attributes,Pageable pageable) { if (result.hasErrors()) { return elementoQuestaoAdd(elementoQuestaoForm,pageable); } if (elementoQuestaoForm.getElementoQuestaoPK() > 0) { return this.elementoQuestaoSave(elementoQuestaoForm, result, attributes,pageable); } try { elementoQuestaoService.create(elementoQuestaoForm); } catch (PersistenceException e) { ConstraintViolationException t = (ConstraintViolationException) e.getCause(); if (t.getConstraintName().equalsIgnoreCase("elementoQuestaoUnique")) { ObjectError error = new ObjectError("elementoNome","Relacionamento entre Elemento e Questão já existente no cadastro."); result.addError(error); } return elementoQuestaoAdd(elementoQuestaoForm,pageable); } ModelAndView mv = new ModelAndView("redirect:/elementoQuestaoHome"); mv.addObject("usuarioNome",usuarioSeguranca.getUsuarioLogado()); mv.addObject("standardDate",new Date()); return mv; } @RequestMapping(path = "/elementoQuestaoDelete/{id}", method = RequestMethod.GET) public ModelAndView elementoQuestaoDelete(@PathVariable("id") long elementoQuestaoId, @Valid QuestaoForm questaoForm, BindingResult result, RedirectAttributes attributes) { ModelAndView mv = new ModelAndView("redirect:/elementoQuestaoHome"); ElementoQuestao elementoQuestao = elementoQuestaoService.getElementoQuestaoByElementoQuestaoPK(elementoQuestaoId); try { elementoQuestaoService.delete(elementoQuestaoId); attributes.addFlashAttribute("mensagem", "Relacionamento Elemento/Questao excluído com sucesso"); } catch (Exception e) { attributes.addFlashAttribute("mensagemErro", "Relacionamento Elemento/Questao não excluído. Existe(m) relacionamento(s) de Elemento/Questao ** "+ elementoQuestao.getElemento().getElementoNome() + " / " + elementoQuestao.getQuestao().getQuestaoNome() + " ** no cadastro."); } mv.addObject("usuarioNome",usuarioSeguranca.getUsuarioLogado()); mv.addObject("standardDate",new Date()); return mv; } @RequestMapping(path = "/elementoQuestaoEdit/{elementoQuestaoPK}", method = RequestMethod.GET) public ModelAndView elementoQuestaoEdit(@PathVariable("elementoQuestaoPK") Long elementoQuestaoPK, Pageable pageable) { ModelAndView mv = new ModelAndView("elementoQuestao/elementoQuestaoEdit"); ElementoQuestao elementoQuestao = elementoQuestaoService.getElementoQuestaoByElementoQuestaoPK(elementoQuestaoPK); ElementoQuestaoForm elementoQuestaoForm = elementoQuestaoService.converteElementoQuestao(elementoQuestao); mv.addObject("elementoQuestaoForm", elementoQuestaoForm); mv.addObject("elementoQuestaoPrioridadeValues", AtributoPrioridade.values()); mv.addObject("elementoQuestaoStatusValues", AtributoStatus.values()); Pageable colaboradorPageable = new PageRequest(0, 200, Direction.ASC, "pessoaNome"); mv.addObject("colaboradorPage", colaboradorService.getColaboradorAll(colaboradorPageable)); Pageable elementoPageable = new PageRequest(0, 200, Direction.ASC, "elementoNome"); mv.addObject("elementoPage", elementoService.getElementoAll(elementoPageable)); Pageable questaoPageable = new PageRequest(0, 200, Direction.ASC, "questaoNome"); mv.addObject("questaoPage", questaoService.getQuestaoAll(questaoPageable)); mv.addObject("usuarioNome",usuarioSeguranca.getUsuarioLogado()); mv.addObject("standardDate",new Date()); return mv; } @RequestMapping(path = "/elementoQuestaoHome", method = RequestMethod.GET) public ModelAndView elementoQuestaoHome(@Valid ElementoQuestaoByElementoForm elementoQuestaoByElementoForm, BindingResult result,RedirectAttributes attributes,Pageable pageable) { ModelAndView mv = new ModelAndView("elementoQuestao/elementoQuestaoHome"); List<ElementoQuestao> elementoQuestaoList = new ArrayList<ElementoQuestao>(); int elementoQuestaoTotal = 0; if (elementoQuestaoByElementoForm.getSearchQuestaoNome() == null) { elementoQuestaoByElementoForm.setSearchElementoNome(""); elementoQuestaoByElementoForm.setSearchQuestaoNome(""); if (elementoQuestaoByElementoForm.getElementoQuestaoSortTipo() == null) { elementoQuestaoByElementoForm.setElementoQuestaoSortTipo("QuestaoNome"); } } if (elementoQuestaoByElementoForm.getElementoQuestaoSortTipo().equalsIgnoreCase("ElementoNome") || elementoQuestaoByElementoForm.getElementoQuestaoSortTipo().equalsIgnoreCase("")) { pageable = new PageRequest(pageable.getPageNumber(), 15, Direction.ASC,"elemento.elementoNome","questao.questaoNome"); } else if (elementoQuestaoByElementoForm.getElementoQuestaoSortTipo().equalsIgnoreCase("QuestaoNome")) { pageable = new PageRequest(pageable.getPageNumber(), 15, Direction.ASC,"questao.questaoNome","elemento.elementoNome"); } if ( ! elementoQuestaoByElementoForm.getSearchQuestaoNome().equalsIgnoreCase("")){ elementoQuestaoList = elementoQuestaoService.getByQuestaoNome(elementoQuestaoByElementoForm.getSearchQuestaoNome(),pageable); elementoQuestaoTotal = elementoQuestaoService.getByQuestaoNome(elementoQuestaoByElementoForm.getSearchQuestaoNome()).size(); } else { elementoQuestaoList = elementoQuestaoService.getByElementoNome(elementoQuestaoByElementoForm.getSearchElementoNome(),pageable); elementoQuestaoTotal = elementoQuestaoService.getByElementoNome(elementoQuestaoByElementoForm.getSearchElementoNome()).size(); } Page<ElementoQuestao> elementoQuestaoPage = new PageImpl<ElementoQuestao>(elementoQuestaoList,pageable,elementoQuestaoTotal+1); mv.addObject("elementoQuestaoPage", elementoQuestaoPage); mv.addObject("page",elementoQuestaoPage); mv.addObject("usuarioNome",usuarioSeguranca.getUsuarioLogado()); mv.addObject("standardDate",new Date()); return mv; } @RequestMapping(path = "/elementoQuestaoSave", method = RequestMethod.POST) public ModelAndView elementoQuestaoSave(@Valid ElementoQuestaoForm elementoQuestaoForm, BindingResult result, RedirectAttributes attributes,Pageable pageable) { if (result.hasErrors()) { return elementoQuestaoAdd(elementoQuestaoForm,pageable); } ModelAndView mv = new ModelAndView("redirect:/elementoQuestaoHome"); try { elementoQuestaoService.save(elementoQuestaoForm); } catch (Exception e) { ConstraintViolationException t = (ConstraintViolationException) e.getCause(); if (t.getConstraintName().equalsIgnoreCase("elementoQuestaoUnique")) { ObjectError error = new ObjectError("elementoNome","Relacionamento entre Elemento e Questão já existente no cadastro."); result.addError(error); } return elementoQuestaoAdd(elementoQuestaoForm,pageable); } mv.addObject("usuarioNome",usuarioSeguranca.getUsuarioLogado()); mv.addObject("standardDate",new Date()); return mv; } @RequestMapping(path = "/elementoQuestaoRelMenu", method = RequestMethod.GET) public ModelAndView elementoQuestaoRelMenu() { ModelAndView mv = new ModelAndView("elementoQuestao/elementoQuestaoRelMenu"); mv.addObject("usuarioNome",usuarioSeguranca.getUsuarioLogado()); mv.addObject("standardDate",new Date()); return mv; } @RequestMapping("/elementoQuestaoRel001") public ModelAndView elementoQuestaoRel001(Pageable pageable) { ModelAndView mv = new ModelAndView("elementoQuestao/elementoQuestaoRel001"); Pageable elementoQuestaoPageable = new PageRequest(0, 200, Direction.ASC, "elemento.elementoNome","questao.questaoNome"); mv.addObject("elementoQuestaoPage", elementoQuestaoService.getElementoQuestaoAll(elementoQuestaoPageable)); mv.addObject("usuarioNome",usuarioSeguranca.getUsuarioLogado()); mv.addObject("standardDate",new Date()); return mv; } @RequestMapping(path = "/elementoQuestaoView/{id}", method = RequestMethod.GET) public ModelAndView elementoQuestaoView(@PathVariable("id") Long elementoQuestaoId) { ElementoQuestao elementoQuestao = elementoQuestaoService.getElementoQuestaoByElementoQuestaoPK(elementoQuestaoId); ModelAndView mv = new ModelAndView("elementoQuestao/elementoQuestaoView"); ElementoQuestaoForm elementoQuestaoForm = elementoQuestaoService.converteElementoQuestaoView(elementoQuestao); ElementoForm elementoForm = elementoService.converteElementoView(elementoQuestao.getElemento()); QuestaoForm questaoForm = questaoService.converteQuestaoView(elementoQuestao.getQuestao()); mv.addObject("elementoQuestaoForm", elementoQuestaoForm); mv.addObject("elementoForm", elementoForm); mv.addObject("questaoForm", questaoForm); mv.addObject("usuarioNome",usuarioSeguranca.getUsuarioLogado()); mv.addObject("standardDate",new Date()); return mv; } }
[ "sergiofeitosa@gmail.com" ]
sergiofeitosa@gmail.com
449f3e41b53c58b516d1589fec5e2d89f71bcdb1
88fa5202233b149f24aa1640125fcbd7d8c2e9a5
/src/main/java/concurrence/longguo/providerConsumer/Tmall.java
2704ae4af283c9cab400b43e460139054dc4355e
[]
no_license
never123450/the-data-structure
03c89c12a0e12d52d43dd2e83a0ea90a1fbe33dd
3ca52debe2e00c1e66dbd0dde29b1a9942f471e7
refs/heads/master
2020-04-17T00:04:31.576460
2019-01-24T14:11:55
2019-01-24T14:11:55
166,036,311
0
0
null
null
null
null
UTF-8
Java
false
false
1,069
java
package concurrence.longguo.providerConsumer; public class Tmall { private int count; public final int MAX_COUNT = 10; public synchronized void push() { while (count > MAX_COUNT) { System.out.println(Thread.currentThread().getName() + "库存数量达到上限" ); try { wait(); } catch (InterruptedException e) { e.printStackTrace(); } } count++; System.out.println(Thread.currentThread().getName() + "生产者生产,当前库存为:" + count); notifyAll(); } public synchronized void take() { while (count <= 0) { System.out.println(Thread.currentThread().getName() + "库存数量为0" ); try { wait(); } catch (InterruptedException e) { e.printStackTrace(); } } count--; System.out.println(Thread.currentThread().getName() + "消费者消费,当前库存为:" + count); notifyAll(); } }
[ "845619585@qq.com" ]
845619585@qq.com
74d4bfe8cb6ac49ae423d7f70839bb25231513a5
dfcd2c3a871f2874f769b9053b7f7837f10f63ab
/src/main/java/com/isd/sappu/savari/services/LocationService.java
eb70a45a48288e7068c9e700d71b9868148b4ce6
[]
no_license
isurudewasurendra/SappuSavari
e81ad1e33f708f0f87839f4f6c9d930566699d21
9a67c7e962d96bd1d9731cffae7b18fbad576320
refs/heads/master
2021-01-21T04:47:41.214300
2016-07-18T11:02:28
2016-07-18T11:02:28
45,827,648
0
0
null
null
null
null
UTF-8
Java
false
false
179
java
package com.isd.sappu.savari.services; public interface LocationService { public double getDistance(double fromLat, double fromLon, double toLat, double toLon, char unit); }
[ "isuru.dewasurendra@gmail.com" ]
isuru.dewasurendra@gmail.com
714addb0a88e6a38b246cf53ead3eaaa64ef6af4
3e5eb14b2fd0ad097e83bb12c53790875b602827
/pdf2ppt/src/main/java/com/feng/pdf2ppt/tools/PPTHelper1.java
a93285d05a4bc54f01d2a1ce682a78590c69bf93
[]
no_license
judelawlee/public-repository
25331e4f0564f309b6fc15aab5888a777fe7fdb0
565dd9ccca9c9f5f97dcac5541c9f6b50c5b3ffc
refs/heads/master
2021-03-23T22:20:47.584915
2020-03-10T02:57:27
2020-03-10T02:57:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
10,391
java
package com.feng.pdf2ppt.tools; import org.apache.commons.compress.utils.IOUtils; import org.apache.poi.sl.usermodel.PictureData; import org.apache.poi.sl.usermodel.TextParagraph; import org.apache.poi.sl.usermodel.VerticalAlignment; import org.apache.poi.xslf.usermodel.*; import java.awt.*; import java.awt.geom.Rectangle2D; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; public class PPTHelper1 { private static int PAGESIZE = 3; // 页面大小 private static String BACKGROUND = "C:\\work\\test\\pdf-img\\temp_1546570068959.jpg"; // 背景图片路径,图片格式要一致 private static String[] th = new String[] { "岗位名称", "基本要求", "薪资待遇" }; @SuppressWarnings("resource") public static void createPPTX(String[][] title, String[][] data, String writePath) { try { System.out.println("-------------------------开始生成!------------------------"); XMLSlideShow pptx = new XMLSlideShow(); // 计算页数 int pages = data.length / PAGESIZE; // 如果有余数,页数加1 if (data.length % PAGESIZE > 0) { pages += 1; } // 初始化每页PPT XSLFSlide[] slides = new XSLFSlide[pages]; for (int i = 0; i < pages; i++) { slides[i] = pptx.createSlide(); } // 循环生成每页PPT for (int k = 0; k < pages; k++) { // 设置每页的背景 byte[] pictureData = IOUtils.toByteArray(new FileInputStream(BACKGROUND)); XSLFPictureData pd = pptx.addPicture(pictureData, PictureData.PictureType.PNG); XSLFPictureShape pic = slides[k].createPicture(pd); // 图片全铺 pic.setAnchor(new Rectangle2D.Double(0, 0, 720, 550)); XSLFTable titleTB = slides[k].createTable();// 创建Title表格 createTitle(titleTB, title); XSLFTable headTB = slides[k].createTable();// 创建表头 createTH(headTB, th); XSLFTable dataTB = slides[k].createTable();// 创建Data表格 if (pages == 1) { createData(dataTB, data, 0, data.length); } else { int start = k * PAGESIZE;// 起始位置 int end = (k + 1) * PAGESIZE;// 结束位置 if (end >= data.length) { end = data.length;// 如果end>data的长度,取Data的长度 } createData(dataTB, data, start, end); } XSLFTable text = slides[k].createTable();// 生成页码 createPageNum(text, k + 1, pages); } pptx.write(new FileOutputStream(writePath)); System.out.println("-------------------------生成成功!------------------------"); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } // 创建标题 private static void createTitle(XSLFTable table, String[][] title) { table.setAnchor(new Rectangle2D.Double(0, 10, 600, 100)); for (int i = 0; i < title.length; i++) { XSLFTableRow tableRow = table.addRow(); // 创建表格行 for (int j = 0; j < title[i].length; j++) { XSLFTableCell tableCell = tableRow.addCell();// 创建表格单元格 XSLFTextParagraph p = tableCell.addNewTextParagraph(); XSLFTextRun tr = p.addNewTextRun(); tr.setText(String.valueOf(title[i][j])); tr.setBold(true); tr.setFontColor(Color.white); tr.setFontFamily("宋体 (正文)"); tr.setFontSize(18.); } } table.setColumnWidth(0, 132); table.setColumnWidth(1, 580); table.setRowHeight(0, 35); table.setRowHeight(1, 35); table.setRowHeight(2, 35); System.out.println("-------------------------创建标题成功!------------------------"); } // 创建表头 private static void createTH(XSLFTable table, String[] th) { table.setAnchor(new Rectangle2D.Double(0, 140, 600, 100)); XSLFTableRow tableRow = table.addRow(); // 创建表格行 for (int i = 0; i < th.length; i++) { XSLFTableCell tableCell = tableRow.addCell();// 创建表格单元格 XSLFTextParagraph p = tableCell.addNewTextParagraph(); p.setTextAlign(TextParagraph.TextAlign.CENTER); tableCell.setVerticalAlignment(VerticalAlignment.MIDDLE); XSLFTextRun tr = p.addNewTextRun(); tr.setText(String.valueOf(th[i])); tr.setBold(true); tr.setFontFamily("幼圆"); tr.setFontSize(18.); } table.setColumnWidth(0, 132); table.setColumnWidth(1, 312); table.setColumnWidth(2, 276); table.setRowHeight(0, 10); System.out.println("-------------------------创建表头成功!------------------------"); } // 创建表格数据 private static void createData(XSLFTable table, String[][] data, int start, int end) { table.setAnchor(new Rectangle2D.Double(0, 180, 600, 420)); for (int i = start, k = 0; i < end; i++, k++) { XSLFTableRow tableRow = table.addRow(); // 创建表格行 for (int j = 0; j < data[i].length; j++) { XSLFTableCell tableCell = tableRow.addCell();// 创建表格单元格 XSLFTextParagraph p = tableCell.addNewTextParagraph(); if (j == 2) { p.setTextAlign(TextParagraph.TextAlign.LEFT); } else { p.setTextAlign(TextParagraph.TextAlign.CENTER); } tableCell.setVerticalAlignment(VerticalAlignment.MIDDLE); XSLFTextRun tr = p.addNewTextRun(); if (data[i][j] != null) { String value = String.valueOf(data[i][j]); if (value.length() > 80) { tr.setText(value.substring(0, 80) + "..."); } else { tr.setText(String.valueOf(data[i][j])); } } tr.setFontFamily("仿宋"); tr.setFontSize(16.); } // 设置行高 因为每页的行数不固定,动态设置 table.setRowHeight(k, 125); } // 设置列宽 table.setColumnWidth(0, 132); table.setColumnWidth(1, 312); table.setColumnWidth(2, 276); System.out.println("-------------------------加载数据成功!------------------------"); } // 创建右上角页码 private static void createPageNum(XSLFTable table, int k, int pages) { table.setAnchor(new Rectangle2D.Double(560, 10, 200, 0)); XSLFTableRow tableRow = table.addRow(); // 创建表格行 XSLFTableCell tableCell = tableRow.addCell();// 创建表格单元格 XSLFTextParagraph p = tableCell.addNewTextParagraph(); p.setTextAlign(TextParagraph.TextAlign.CENTER); tableCell.setVerticalAlignment(VerticalAlignment.MIDDLE); XSLFTextRun tr = p.addNewTextRun(); tr.setText(String.valueOf("第" + k + "页/共" + pages + "页")); tr.setBold(true); tr.setFontColor(Color.YELLOW); tr.setFontFamily("H-新雅兰"); tr.setFontSize(18.); table.setColumnWidth(0, 200); } public static void main(String[] args) throws IOException { String[][] title = { { "单位名称:", "北京XXXXXXXXXXXXX有限公司" }, { "单位地址:", "北京市XXXXXXXXXXXXXXXX" }, { "联系电话:", "XXXXXXXX XXXXXXX" } }; String[][] data = { { "物业客服", "5人,男女不限,22-35岁,大专以上学历,有物业相关经验者优先。负责办理业主入住、装修手续,接待住户投诉和报修电话、咨询服务", "1.缴纳五项社会保险\n2.用工形式:直签\n3.签订合同_2_年\n4.月薪:2500-3000(有提成)\n5.其他福利:饭补、绩效奖金浮动" }, { "社区报纸编辑", "1人,男女不限,25-40岁,大专以上学历,有相关工作经验者优先,负责报纸排版、组稿约稿、稿件的采编和图文编辑", "1.缴纳五项社会保险\n2.用工形式:直签\n3.签订合同_2_年\n4.月薪:3500-5000\n5.其他福利:饭补、绩效奖金浮动" }, { "酒店前台", "男女不限,5人,有无经验均可,可接受应届毕业生,中专以上学历,会使用办公软件,包吃、包住、上五险。", "1.缴纳五项社会保险\n2.用工形式:直签\n3.签订合同_2_年\n4.月薪:3000-3500\n5.其他福利:饭补、绩效奖金浮动" }, { "家政服务员", "女,6人,五官端正,18-50岁,初中以上学历,有相关工作经验者优先,本地户口优先。包吃,上五险,可根据个人表现晋升增薪。", "1.缴纳五项社会保险\n2.用工形式:直签\n3.签订合同_2_年\n4.月薪:2300-3000\n5.其他福利:饭补、绩效奖金 " }, { "保安员", "男,20人,18-40岁,身高175及以上,初中及以上学历,无不良嗜好,无纹身,退伍军人优先,包吃住,五险。", "1.缴纳五项社会保险\n2.用工形式:直签/派遣\n3.签订合同_2_年\n4.月薪:2800-3500\n5.其他福利:包吃住、绩效奖金" }, { "保洁员", "男女不限,40-55岁,初中及以上学历,有工作经验者优先,包吃,上五险,可根据个人表现晋升增薪。", "1.缴纳五项社会保险\n2.用工形式:直签/派遣\n3.签订合同_2_年\n4.月薪:2500-3500\n5.其他福利:包吃、绩效奖金" } }; String writePath = "C:\\work\\test\\pdf-img\\test.ppt"; createPPTX(title, data, writePath); } }
[ "445121408" ]
445121408
70fe61b1d381d030573c93e6f97f28d68369f2e3
f0568343ecd32379a6a2d598bda93fa419847584
/modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201402/cm/AdGroupBidModifierService.java
8a03c47ff597d47cafa0802db986eff5e7788652
[ "Apache-2.0" ]
permissive
frankzwang/googleads-java-lib
bd098b7b61622bd50352ccca815c4de15c45a545
0cf942d2558754589a12b4d9daa5902d7499e43f
refs/heads/master
2021-01-20T23:20:53.380875
2014-07-02T19:14:30
2014-07-02T19:14:30
21,526,492
1
0
null
null
null
null
UTF-8
Java
false
false
3,044
java
package com.google.api.ads.adwords.jaxws.v201402.cm; import java.net.MalformedURLException; import java.net.URL; import javax.xml.namespace.QName; import javax.xml.ws.Service; import javax.xml.ws.WebEndpoint; import javax.xml.ws.WebServiceClient; import javax.xml.ws.WebServiceException; import javax.xml.ws.WebServiceFeature; /** * This class was generated by the JAX-WS RI. * JAX-WS RI 2.2.4-b01 * Generated source version: 2.1 * */ @WebServiceClient(name = "AdGroupBidModifierService", targetNamespace = "https://adwords.google.com/api/adwords/cm/v201402", wsdlLocation = "https://adwords.google.com/api/adwords/cm/v201402/AdGroupBidModifierService?wsdl") public class AdGroupBidModifierService extends Service { private final static URL ADGROUPBIDMODIFIERSERVICE_WSDL_LOCATION; private final static WebServiceException ADGROUPBIDMODIFIERSERVICE_EXCEPTION; private final static QName ADGROUPBIDMODIFIERSERVICE_QNAME = new QName("https://adwords.google.com/api/adwords/cm/v201402", "AdGroupBidModifierService"); static { URL url = null; WebServiceException e = null; try { url = new URL("https://adwords.google.com/api/adwords/cm/v201402/AdGroupBidModifierService?wsdl"); } catch (MalformedURLException ex) { e = new WebServiceException(ex); } ADGROUPBIDMODIFIERSERVICE_WSDL_LOCATION = url; ADGROUPBIDMODIFIERSERVICE_EXCEPTION = e; } public AdGroupBidModifierService() { super(__getWsdlLocation(), ADGROUPBIDMODIFIERSERVICE_QNAME); } public AdGroupBidModifierService(URL wsdlLocation, QName serviceName) { super(wsdlLocation, serviceName); } /** * * @return * returns AdGroupBidModifierServiceInterface */ @WebEndpoint(name = "AdGroupBidModifierServiceInterfacePort") public AdGroupBidModifierServiceInterface getAdGroupBidModifierServiceInterfacePort() { return super.getPort(new QName("https://adwords.google.com/api/adwords/cm/v201402", "AdGroupBidModifierServiceInterfacePort"), AdGroupBidModifierServiceInterface.class); } /** * * @param features * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values. * @return * returns AdGroupBidModifierServiceInterface */ @WebEndpoint(name = "AdGroupBidModifierServiceInterfacePort") public AdGroupBidModifierServiceInterface getAdGroupBidModifierServiceInterfacePort(WebServiceFeature... features) { return super.getPort(new QName("https://adwords.google.com/api/adwords/cm/v201402", "AdGroupBidModifierServiceInterfacePort"), AdGroupBidModifierServiceInterface.class, features); } private static URL __getWsdlLocation() { if (ADGROUPBIDMODIFIERSERVICE_EXCEPTION!= null) { throw ADGROUPBIDMODIFIERSERVICE_EXCEPTION; } return ADGROUPBIDMODIFIERSERVICE_WSDL_LOCATION; } }
[ "jradcliff@google.com" ]
jradcliff@google.com
6962fd5b4b1855eb33d3f8e97ff673932365ec7e
bdb880513a6d1333b3251e8986fbaa9411b049e8
/qmt-tlive/qmt-tlive-rpc-core/src/main/java/com/lesports/qmt/tlive/cache/TVoteCache.java
d9abad260f85d2cdbb74110ce283f5b914c2bb9b
[]
no_license
wang-shun/qmt
fe937cffe59781815fdefccdfa88362cef68b113
c3c2e6a1bd9b4f3d852a698f64b6831b977093d1
refs/heads/master
2020-04-12T23:23:29.066091
2018-12-17T12:51:58
2018-12-17T12:51:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
595
java
package com.lesports.qmt.tlive.cache; import com.lesports.qmt.tlive.api.dto.TVote; import com.lesports.repository.LeCrudRepository; /** * Created by lufei1 on 2015/9/16. */ public interface TVoteCache extends LeCrudRepository<TVote, Long> { /** * 增加投票 * * @param voteId * @param optionId * @return */ public int incrVoteNum(long voteId, long optionId); /** * 获取投票数 * * @param voteId * @param optionId * @return */ public int getVoteNum(long voteId, long optionId); }
[ "ryan@192.168.3.101" ]
ryan@192.168.3.101
c40122b16d460e6bca25db9377b85790eb33418c
71e18ae1d2f0b79df0c3487dec2d0ba22fef9683
/app/src/main/java/com/github/achenglike/slidingtablayout/MainActivity.java
c3aa5ed39cdbf96b0ff95fae2dd9ee524ea467af
[]
no_license
achenglike/SlidingTab
c700a8a080de0f94dc729b39b555c25d1ef8277f
54a5e39e39463b3fd317900374eb72e70abcfdd6
refs/heads/master
2020-03-19T12:56:31.313626
2018-06-08T01:43:21
2018-06-08T01:43:21
136,551,135
0
0
null
null
null
null
UTF-8
Java
false
false
351
java
package com.github.achenglike.slidingtablayout; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } }
[ "like@imooc.com" ]
like@imooc.com
7769681d3012f19f1c699467e79a8d8c3d5e18cd
b59886bcdfa48f70b584a20cb97c9bc097a35992
/build/generated/src/org/apache/jsp/index_jsp.java
376406293d15a5c5ec197406d9d23fbdc5a7c3b2
[]
no_license
selcukcokkuvvetli/Anket
990594d0974d612d6284a99bf83e690cadc90d47
ad3c8d3d3242770246432751a27f57037db11d66
refs/heads/master
2020-03-17T15:48:49.547164
2018-05-16T21:56:07
2018-05-16T21:56:07
133,725,035
1
0
null
null
null
null
UTF-8
Java
false
false
5,469
java
package org.apache.jsp; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; public final class index_jsp extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent { private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory(); private static java.util.List<String> _jspx_dependants; private org.glassfish.jsp.api.ResourceInjector _jspx_resourceInjector; public java.util.List<String> getDependants() { return _jspx_dependants; } public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html;charset=UTF-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("<!DOCTYPE html>\n"); out.write("<html>\n"); out.write(" <head>\n"); out.write(" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n"); out.write(" <link rel=\"stylesheet\" href=\"./source/css/bootstrap.min.css\">\n"); out.write(" <title>Register Page</title>\n"); out.write(" <link rel=\"stylesheet\" href=\"https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css\" integrity=\"sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB\" crossorigin=\"anonymous\">\n"); out.write("</head>\n"); out.write("<body>\n"); out.write(" <form action=\"Register\" method=\"POST\">\n"); out.write("<div class=\"container\">\n"); out.write(" <div class=\"row\">\n"); out.write(" <div class=\"col\"></div>\n"); out.write(" <div class=\"col-md-4 col-md-offset-4\" style=\"padding-top:10%;\">\n"); out.write(" <div class=\"panel panel-default\">\n"); out.write(" <div class=\"panel-heading\">\n"); out.write(" <h3 class=\"panel-title\">Sign Up</h3>\n"); out.write(" </div>\n"); out.write(" <div class=\"panel-body\">\n"); out.write(" <form id=\"signup\" name=\"signup\" methot=\"post\" action=\"signup.jsp\">\n"); out.write(" <fieldset>\n"); out.write(" <div class=\"form-group\">\n"); out.write(" <input class=\"form-control\" name=\"first_name\" placeholder=\"Name\" name=\"txtFirstname\" type=\"text\" autofocus>\n"); out.write(" </div>\n"); out.write(" <div class=\"form-group\">\n"); out.write(" <input class=\"form-control\" name=\"last_name\" placeholder=\"Surname\" name=\"txtLastname\" type=\"text\" autofocus>\n"); out.write(" </div>\n"); out.write(" <div class=\"form-group\">\n"); out.write(" <input class=\"form-control\" name=\"email\" placeholder=\"E-mail\" name=\"txtEmail\" type=\"text\" autofocus>\n"); out.write(" </div>\n"); out.write(" <div class=\"form-group\">\n"); out.write(" <input class=\"form-control\" name=\"pass\" placeholder=\"Password\" name=\"txtPassword\" type=\"password\" value=\"\">\n"); out.write(" </div>\n"); out.write(" <!-- Change this to a button or input when using this as a form -->\n"); out.write(" <button type=\"submit\" id=\"signupbtn\" class=\"btn btn-success float-md-right\">Sign Up</button>\n"); out.write(" </fieldset>\n"); out.write(" </form>\n"); out.write(" </div>\n"); out.write(" </div>\n"); out.write(" </div>\n"); out.write(" <div class=\"col\"></div>\n"); out.write(" </div>\n"); out.write("</div>\n"); out.write("<script src=\"./source/js/bootstrap.min.js\"></script>\n"); out.write(" </form>\n"); out.write("</body>\n"); out.write("</html>\n"); } catch (Throwable t) { if (!(t instanceof SkipPageException)){ out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } } }
[ "selcuk_cokkuvvetli@hotmail.com" ]
selcuk_cokkuvvetli@hotmail.com
10ada0e90055e8d66432f7945e64a3213391c5e6
6dce51d20093687d737d7bfa013e8cff5fc7d15b
/sitebricks-mail/src/main/java/com/google/sitebricks/mail/imap/ListFoldersExtractor.java
f9355244acacd89f7701108a2f8432922691714e
[ "Apache-2.0" ]
permissive
tactile/sitebricks
30a9f7fabeb56f6d518d0cf57c6961ca3e9dba09
29f0e762c91ea6f4f8351ccfc5ce62f760d010b4
refs/heads/master
2021-01-17T21:38:22.700266
2013-01-11T01:15:26
2013-01-11T01:15:26
7,551,409
1
0
null
null
null
null
UTF-8
Java
false
false
1,101
java
package com.google.sitebricks.mail.imap; import com.google.common.collect.ImmutableList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * @author dhanji@gmail.com (Dhanji R. Prasanna) */ class ListFoldersExtractor implements Extractor<List<String>> { private static final Pattern QUOTES = Pattern.compile("(\".*\")"); private static final String ROOT_PREFIX = "\"/\""; @Override public List<String> extract(List<String> messages) { ImmutableList.Builder<String> builder = ImmutableList.builder(); for (String message : messages) { Matcher matcher = QUOTES.matcher(message); if (matcher.find()) { String group = matcher.group(1); if (group.startsWith(ROOT_PREFIX)) { group = group.substring(ROOT_PREFIX.length()).trim(); } // Strip quotes. if (group.startsWith("\"")) { group = group.substring(1, group.length() - 1); } // Generally remove leading "/" and stripquotes builder.add(group); } } return builder.build(); } }
[ "dhanji@gmail.com" ]
dhanji@gmail.com
ff7fcb431ddf4c7f6c4865e404ad426290f1ff41
f7fac67835a6d6baef4a4e835eedb92d7a1db0ed
/FREIND_MANAGEMENT/friend-management-service/src/main/java/com/cg/fm/dto/FriendEmailListDto.java
b7c2c3f89f675dc0bee7d7fb2cda358bd0b64502
[]
no_license
pradeepkrathnayaka/Microservices_POC
8abadc28ac067dbd9cdf4909117fa383b55cc681
b56efe6b27f2e8687a168d7d87b5e7a78dc45885
refs/heads/master
2021-05-24T15:37:41.562901
2020-04-14T02:46:31
2020-04-14T02:46:31
253,634,806
0
0
null
null
null
null
UTF-8
Java
false
false
220
java
package com.cg.fm.dto; import java.util.List; import lombok.Getter; import lombok.Setter; /** * @author Predeep * */ @Getter @Setter public class FriendEmailListDto { private List<String> friends; }
[ "pradeepkrathnayaka@gmail.com" ]
pradeepkrathnayaka@gmail.com
3bada7a13c3ceedb4299d4286544265877ed00fd
03e53d59defb46326cc50de2161ef837781c1a04
/src/com/sizatn/collections/sort/Menu.java
b24e96fedd4df12afe30b10124babc36ac72f769
[]
no_license
sizatn/sort
6d2b905a5116dd86681a034a57b1ec9358742c42
390f26b7350a0497ffaa9dd8a45b55a56d53f6de
refs/heads/master
2022-01-30T17:18:20.615947
2019-06-19T09:43:36
2019-06-19T09:43:36
109,562,705
0
0
null
null
null
null
UTF-8
Java
false
false
641
java
package com.sizatn.collections.sort; public class Menu { private String menuName; private String menuSort; public Menu() { super(); } public Menu(String menuName, String menuSort) { super(); this.menuName = menuName; this.menuSort = menuSort; } public String getMenuName() { return menuName; } public void setMenuName(String menuName) { this.menuName = menuName; } public String getMenuSort() { return menuSort; } public void setMenuSort(String menuSort) { this.menuSort = menuSort; } @Override public String toString() { return "Menu [menuName=" + menuName + ", menuSort=" + menuSort + "]"; } }
[ "sizatn2013@gmail.com" ]
sizatn2013@gmail.com
d96bad241fd5e422b618c783ffe7a824026216c3
c90d8076834c22ad24fb4b12d406701c539d3441
/MoneyBuddy/src/org/tempuri/GetPassword.java
8447ded69e2d9f4e6d236df994bc8b00ef600806
[]
no_license
batmaninlondon/MoneyBuddy
77fd023a61d68b43fcf6760243a848a3644d5440
50c27d3202b5c90ff15ecac4e098952f37f13d6c
refs/heads/devMoneyBuddy
2022-05-02T04:06:25.052121
2022-04-15T06:39:27
2022-04-15T06:39:27
69,157,985
0
0
null
2017-04-23T18:48:59
2016-09-25T10:34:14
JavaScript
UTF-8
Java
false
false
1,854
java
package org.tempuri; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import org.datacontract.schemas._2004._07.starmfpaymentgatewayservice.PasswordRequest; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="Param" type="{http://schemas.datacontract.org/2004/07/StarMFPaymentGatewayService}PasswordRequest" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "param" }) @XmlRootElement(name = "GetPassword") public class GetPassword { @XmlElementRef(name = "Param", namespace = "http://tempuri.org/", type = JAXBElement.class, required = false) protected JAXBElement<PasswordRequest> param; /** * Gets the value of the param property. * * @return * possible object is * {@link JAXBElement }{@code <}{@link PasswordRequest }{@code >} * */ public JAXBElement<PasswordRequest> getParam() { return param; } /** * Sets the value of the param property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link PasswordRequest }{@code >} * */ public void setParam(JAXBElement<PasswordRequest> value) { this.param = value; } }
[ "savita.wadhwani@gmail.com" ]
savita.wadhwani@gmail.com
0a28454a8f38f3bcbf2d450f12bfeffe730823df
43f584b8adddfaaf95cc7aa74b1c5f0069f0e582
/Lista 1/src/com/fjps/test/GraphTest.java
178b40fbd0b01a6bef84290852966f7697efa70e
[]
no_license
FilipJany/ApproximationAlgorithms
b2d3726b87d5d1312baf85f051070c9159b58cfc
e82a0ad406e17797261cf3d84fe092cf5632e941
refs/heads/master
2021-01-10T17:19:08.205022
2016-04-01T15:27:30
2016-04-01T15:27:30
52,964,557
0
0
null
null
null
null
UTF-8
Java
false
false
5,067
java
package com.fjps.test; import com.fjps.main.graph.Graph; import com.fjps.main.graph.Vertex; import com.fjps.main.graph.exceptions.NoSuchVertexException; import org.junit.Assert; import org.junit.Test; /** * Created by MagnaT on 30/03/16. */ public class GraphTest { @Test public void assureMetricTest1() { System.out.println("\n-----------------\nGraphTest: Test 1\n-----------------\n"); Graph<Double> initial = new Graph<>(); Vertex<Double> v0 = initial.addVertex(); Vertex<Double> v1 = initial.addVertex(); Vertex<Double> v2 = initial.addVertex(); Vertex<Double> v3 = initial.addVertex(); initial.connect(v0, v1, 5.0); initial.connect(v0, v2, 1.2); initial.connect(v0, v3, 2.5); initial.connect(v1, v2, 4.0); initial.connect(v1, v3, 2.0); initial.connect(v2, v3, 1.1); System.out.println("Initial: " + initial.toString()); Graph<Double> expected = new Graph<>(); v0 = expected.addVertex(); v1 = expected.addVertex(); v2 = expected.addVertex(); v3 = expected.addVertex(); expected.connect(v0, v1, 4.3); expected.connect(v0, v2, 1.2); expected.connect(v0, v3, 2.3); expected.connect(v1, v2, 3.1); expected.connect(v1, v3, 2.0); expected.connect(v2, v3, 1.1); System.out.println("Expected: " + expected.toString()); Graph<Double> obtained = initial; obtained.assureMetric(); System.out.println("Obtained: " + obtained.toString()); Assert.assertEquals(expected.getAllVertexes(), obtained.getAllVertexes()); Assert.assertEquals(expected.getAllEdges(), obtained.getAllEdges()); } @Test public void assureMetricTest2() { System.out.println("\n-----------------\nGraphTest: Test 2\n-----------------\n"); Graph<Double> initial = new Graph<>(); Vertex<Double> v0 = initial.addVertex(); Vertex<Double> v1 = initial.addVertex(); Vertex<Double> v2 = initial.addVertex(); Vertex<Double> v3 = initial.addVertex(); Vertex<Double> v4 = initial.addVertex(); initial.connect(v0, v1, 6.2); initial.connect(v0, v2, 7.0); initial.connect(v0, v3, 9.8); initial.connect(v0, v4, 2.0); initial.connect(v1, v2, 0.5); initial.connect(v1, v3, 0.6); initial.connect(v1, v4, 3.1); initial.connect(v2, v3, 1.2); initial.connect(v2, v4, 1.2); initial.connect(v3, v4, 2.7); System.out.println("Initial: " + initial.toString()); Graph<Double> expected = new Graph<>(); v0 = expected.addVertex(); v1 = expected.addVertex(); v2 = expected.addVertex(); v3 = expected.addVertex(); v4 = expected.addVertex(); expected.connect(v0, v1, 3.7); expected.connect(v0, v2, 3.2); expected.connect(v0, v3, 4.3); expected.connect(v0, v4, 2.0); expected.connect(v1, v2, 0.5); expected.connect(v1, v3, 0.6); expected.connect(v1, v4, 1.7); expected.connect(v2, v3, 1.1); expected.connect(v2, v4, 1.2); expected.connect(v3, v4, 2.3); System.out.println("Expected: " + expected.toString()); Graph<Double> obtained = initial; obtained.assureMetric(); System.out.println("Obtained: " + obtained.toString()); Assert.assertEquals(expected.getAllVertexes(), obtained.getAllVertexes()); Assert.assertEquals(expected.getAllEdges(), obtained.getAllEdges()); } @Test public void graphOperationsTest1() { System.out.println("\n-----------------\nGraphTest: Test 3\n-----------------\n"); Graph<Double> graph = new Graph<>(); Vertex<Double> v0 = graph.addVertex(); Vertex<Double> v1 = graph.addVertex(); Vertex<Double> v2 = graph.addVertex(); Vertex<Double> v3 = graph.addVertex(); Assert.assertEquals(4, graph.getNumberVertexes()); try { graph.connect(v0, v1, 3.0); graph.connect(v0, v2, 1.8); graph.connect(v0, v3, 2.2); graph.connect(v2, v1, 4.7); graph.connect(v2, v3, 5.2); graph.connect(v3, v1, 0.5); } catch (NoSuchVertexException e) { System.out.println("This exception should not occur.\n\t" + e.getMessage()); } Assert.assertEquals(6, graph.getNumberEdges()); System.out.println("Result:\n" + graph); graph.assureMetric(); try { graph.removeVertex(v1); } catch (NoSuchVertexException e) { System.out.println("This exception should not occur.\n\t" + e.getMessage()); } Assert.assertEquals(3, graph.getNumberVertexes()); Assert.assertEquals(3, graph.getNumberEdges()); Assert.assertEquals(null, graph.getVertex(v1.getID())); System.out.println("Removing vertex V1"); System.out.println("Result:\n" + graph); } }
[ "patryk.stopyra@gmail.com" ]
patryk.stopyra@gmail.com
92e43f9f503b17017629777f2050c15f17127077
7c848fb92bd7a3f9130771152c3e68895d94a799
/app/src/main/java/com/junchao/frametest/utils/StringUtil.java
f2aa1f0842347b552a876f74401e4903d7676d26
[]
no_license
gaoshang0304/MyApplication
acb9dd566324f8ece83d0fe59131cd4ea8ca5f38
6cc80d1f1e415e00cfd2af63a1634b10f7a34d6d
refs/heads/master
2020-03-14T00:47:28.720499
2018-04-28T02:26:29
2018-04-28T02:26:29
131,364,073
0
0
null
null
null
null
UTF-8
Java
false
false
3,139
java
package com.junchao.frametest.utils; import android.content.Context; import android.graphics.Typeface; import android.text.Spannable; import android.text.SpannableStringBuilder; import android.text.TextUtils; import android.text.style.AbsoluteSizeSpan; import android.text.style.StyleSpan; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * 文本工具类 * * @author ZhangMao * @version 4.2.0 * @since 2015-03-31 */ public class StringUtil { /** * 获取格式化的手机号(将手机号中间4位替换为*号) * * @param phone * @return */ public static String getFormattedPhone(String phone) { return phone.trim().replaceAll("(?<=\\d{3})\\d(?=\\d{4})", "*"); } /** * 校验URL * * @param url * @param urlRules * @return URL是否符合规则 */ public static boolean checkUrl(String url, List<String> urlRules) { boolean isUrlOK = false; if (!TextUtils.isEmpty(url) && urlRules != null) { for (String urlRule : urlRules) { String newUrl = url.toLowerCase(); if (newUrl.contains(urlRule)) { isUrlOK = true; break; } } } return isUrlOK; } /** * 判断字符串是否为数字 * * @param str * @return */ public static boolean isNumeric(String str){ //Pattern pattern = Pattern.compile("[0-9]*"); Pattern pattern = Pattern.compile("^(([1-9]\\d*)(\\.\\d{1,2})?|0\\.([1-9]|\\d[1-9])|0)$");//判断是否为有效金额 Matcher isNum = pattern.matcher(str); if( !isNum.matches() ){ return false; } return true; } /** * 数字,小数点及之后数字变小 */ public static CharSequence toSpanStringSize(Context context, String string, int size){ SpannableStringBuilder ssb = new SpannableStringBuilder(); ssb.append(string); StyleSpan ss = new StyleSpan(Typeface.BOLD); AbsoluteSizeSpan ass = new AbsoluteSizeSpan(size); char[] chars = string.toCharArray(); ssb.setSpan(ass, chars.length-3, chars.length, Spannable.SPAN_EXCLUSIVE_INCLUSIVE); ssb.setSpan(ss, 0, chars.length-3, Spannable.SPAN_INCLUSIVE_EXCLUSIVE); return ssb; } /** * 读取本地json文件 * @param context * @param fileName * @return */ public static String readLocalJson(Context context, String fileName){ String jsonString; String resultString=""; try { BufferedReader bufferedReader=new BufferedReader(new InputStreamReader( context.getResources().getAssets().open(fileName))); while ((jsonString=bufferedReader.readLine())!=null) { resultString+=jsonString; } } catch (Exception e) { ToastUtil.showToast(context, e.toString()); } return resultString; } }
[ "gao6366839" ]
gao6366839
79a9a5ad94004e038c9186c148bd5cef2ef025c8
6071fc260f0949cda38086f8bd26b39ee3f784f3
/src/main/java/amrelk/fakewpi/first/wpilibj/Relay.java
495aa910a05cd86e48e06c82243eb16b00429c35
[]
no_license
amrelk/wpiSimulate
b5f52ac2ea4907837bfdf8556c99fa888a2fefa3
b56ed34db65e6f03f2c8a36462d1fff169e2e0db
refs/heads/master
2020-03-22T19:21:12.432484
2018-07-11T04:35:11
2018-07-11T04:35:11
140,522,468
0
0
null
null
null
null
UTF-8
Java
false
false
10,041
java
/*----------------------------------------------------------------------------*/ /* Copyright (c) 2008-2018 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ /*----------------------------------------------------------------------------*/ package amrelk.fakewpi.first.wpilibj; import java.util.Arrays; import java.util.Optional; import amrelk.fakewpi.first.wpilibj.hal.FRCNetComm.tResourceType; import amrelk.fakewpi.first.wpilibj.hal.HAL; import amrelk.fakewpi.first.wpilibj.hal.RelayJNI; import amrelk.fakewpi.first.wpilibj.smartdashboard.SendableBuilder; import amrelk.fakewpi.first.wpilibj.util.UncleanStatusException; import static java.util.Objects.requireNonNull; /** * Class for VEX Robotics Spike style relay outputs. Relays are intended to be connected to Spikes * or similar relays. The relay channels controls a pair of channels that are either both off, one * on, the other on, or both on. This translates into two Spike outputs at 0v, one at 12v and one * at 0v, one at 0v and the other at 12v, or two Spike outputs at 12V. This allows off, full * forward, or full reverse control of motors without variable speed. It also allows the two * channels (forward and reverse) to be used independently for something that does not care about * voltage polarity (like a solenoid). */ public class Relay extends SendableBase implements MotorSafety { private MotorSafetyHelper m_safetyHelper; /** * This class represents errors in trying to set relay values contradictory to the direction to * which the relay is set. */ public class InvalidValueException extends RuntimeException { /** * Create a new exception with the given message. * * @param message the message to pass with the exception */ public InvalidValueException(String message) { super(message); } } /** * The state to drive a Relay to. */ public enum Value { kOff("Off"), kOn("On"), kForward("Forward"), kReverse("Reverse"); private final String m_prettyValue; Value(String prettyValue) { m_prettyValue = prettyValue; } public String getPrettyValue() { return m_prettyValue; } public static Optional<Value> getValueOf(String value) { return Arrays.stream(Value.values()).filter(v -> v.m_prettyValue.equals(value)).findFirst(); } } /** * The Direction(s) that a relay is configured to operate in. */ public enum Direction { /** * direction: both directions are valid. */ kBoth, /** * direction: Only forward is valid. */ kForward, /** * direction: only reverse is valid. */ kReverse } private final int m_channel; private int m_forwardHandle; private int m_reverseHandle; private Direction m_direction; /** * Common relay initialization method. This code is common to all Relay constructors and * initializes the relay and reserves all resources that need to be locked. Initially the relay is * set to both lines at 0v. */ private void initRelay() { SensorUtil.checkRelayChannel(m_channel); int portHandle = HAL.getPort((byte) m_channel); if (m_direction == Direction.kBoth || m_direction == Direction.kForward) { m_forwardHandle = RelayJNI.initializeRelayPort(portHandle, true); HAL.report(tResourceType.kResourceType_Relay, m_channel); } if (m_direction == Direction.kBoth || m_direction == Direction.kReverse) { m_reverseHandle = RelayJNI.initializeRelayPort(portHandle, false); HAL.report(tResourceType.kResourceType_Relay, m_channel + 128); } m_safetyHelper = new MotorSafetyHelper(this); m_safetyHelper.setSafetyEnabled(false); setName("Relay", m_channel); } /** * Relay constructor given a channel. * * @param channel The channel number for this relay (0 - 3). * @param direction The direction that the Relay object will control. */ public Relay(final int channel, Direction direction) { m_channel = channel; m_direction = requireNonNull(direction, "Null Direction was given"); initRelay(); set(Value.kOff); } /** * Relay constructor given a channel, allowing both directions. * * @param channel The channel number for this relay (0 - 3). */ public Relay(final int channel) { this(channel, Direction.kBoth); } @Override public void close() { super.close(); freeRelay(); } private void freeRelay() { try { RelayJNI.setRelay(m_forwardHandle, false); } catch (UncleanStatusException ignored) { // do nothing. Ignore } try { RelayJNI.setRelay(m_reverseHandle, false); } catch (UncleanStatusException ignored) { // do nothing. Ignore } RelayJNI.freeRelayPort(m_forwardHandle); RelayJNI.freeRelayPort(m_reverseHandle); m_forwardHandle = 0; m_reverseHandle = 0; } /** * Set the relay state. * * <p>Valid values depend on which directions of the relay are controlled by the object. * * <p>When set to kBothDirections, the relay can be set to any of the four states: 0v-0v, 12v-0v, * 0v-12v, 12v-12v * * <p>When set to kForwardOnly or kReverseOnly, you can specify the constant for the direction or * you can simply specify kOff and kOn. Using only kOff and kOn is recommended. * * @param value The state to set the relay. */ @SuppressWarnings("PMD.CyclomaticComplexity") public void set(Value value) { switch (value) { case kOff: if (m_direction == Direction.kBoth || m_direction == Direction.kForward) { RelayJNI.setRelay(m_forwardHandle, false); } if (m_direction == Direction.kBoth || m_direction == Direction.kReverse) { RelayJNI.setRelay(m_reverseHandle, false); } break; case kOn: if (m_direction == Direction.kBoth || m_direction == Direction.kForward) { RelayJNI.setRelay(m_forwardHandle, true); } if (m_direction == Direction.kBoth || m_direction == Direction.kReverse) { RelayJNI.setRelay(m_reverseHandle, true); } break; case kForward: if (m_direction == Direction.kReverse) { throw new InvalidValueException("A relay configured for reverse cannot be set to " + "forward"); } if (m_direction == Direction.kBoth || m_direction == Direction.kForward) { RelayJNI.setRelay(m_forwardHandle, true); } if (m_direction == Direction.kBoth) { RelayJNI.setRelay(m_reverseHandle, false); } break; case kReverse: if (m_direction == Direction.kForward) { throw new InvalidValueException("A relay configured for forward cannot be set to " + "reverse"); } if (m_direction == Direction.kBoth) { RelayJNI.setRelay(m_forwardHandle, false); } if (m_direction == Direction.kBoth || m_direction == Direction.kReverse) { RelayJNI.setRelay(m_reverseHandle, true); } break; default: // Cannot hit this, limited by Value enum } } /** * Get the Relay State. * * <p>Gets the current state of the relay. * * <p>When set to kForwardOnly or kReverseOnly, value is returned as kOn/kOff not * kForward/kReverse (per the recommendation in Set) * * @return The current state of the relay as a Relay::Value */ public Value get() { if (m_direction == Direction.kForward) { if (RelayJNI.getRelay(m_forwardHandle)) { return Value.kOn; } else { return Value.kOff; } } else if (m_direction == Direction.kReverse) { if (RelayJNI.getRelay(m_reverseHandle)) { return Value.kOn; } else { return Value.kOff; } } else { if (RelayJNI.getRelay(m_forwardHandle)) { if (RelayJNI.getRelay(m_reverseHandle)) { return Value.kOn; } else { return Value.kForward; } } else { if (RelayJNI.getRelay(m_reverseHandle)) { return Value.kReverse; } else { return Value.kOff; } } } } /** * Get the channel number. * * @return The channel number. */ public int getChannel() { return m_channel; } @Override public void setExpiration(double timeout) { m_safetyHelper.setExpiration(timeout); } @Override public double getExpiration() { return m_safetyHelper.getExpiration(); } @Override public boolean isAlive() { return m_safetyHelper.isAlive(); } @Override public void stopMotor() { set(Value.kOff); } @Override public boolean isSafetyEnabled() { return m_safetyHelper.isSafetyEnabled(); } @Override public void setSafetyEnabled(boolean enabled) { m_safetyHelper.setSafetyEnabled(enabled); } @Override public String getDescription() { return "Relay ID " + getChannel(); } /** * Set the Relay Direction. * * <p>Changes which values the relay can be set to depending on which direction is used * * <p>Valid inputs are kBothDirections, kForwardOnly, and kReverseOnly * * @param direction The direction for the relay to operate in */ public void setDirection(Direction direction) { requireNonNull(direction, "Null Direction was given"); if (m_direction == direction) { return; } freeRelay(); m_direction = direction; initRelay(); } @Override public void initSendable(SendableBuilder builder) { builder.setSmartDashboardType("Relay"); builder.setSafeState(() -> set(Value.kOff)); builder.addStringProperty("Value", () -> get().getPrettyValue(), value -> set(Value.getValueOf(value).orElse(Value.kOff))); } }
[ "malcolmmaude01@gmail.com" ]
malcolmmaude01@gmail.com
def47e4b42961ff85ef4381e210bf9ee97841434
56710f14a5b450e5b61ec40725453a3e7229af31
/LeetCode/src/main/java/com/binea/www/leetcodepractice/algorithm/LongestWordInDictionary.java
d2a1b83796acc2fc215956f1ed7dd17e18078bb6
[]
no_license
xu6148152/Algorithm-Practice
f9885707a1dde6841681be0e8e3849af79ce8da8
f7d7c3303773a7f935e8e332549e009fdf80688a
refs/heads/master
2022-08-09T07:08:05.193441
2022-08-01T11:49:39
2022-08-01T11:49:39
49,108,802
0
0
null
null
null
null
UTF-8
Java
false
false
3,407
java
package com.binea.www.leetcodepractice.algorithm; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; /** * Created by binea on 3/9/17. */ public class LongestWordInDictionary { /** * Given a string and a string dictionary, find the longest string in the dictionary that can be formed by deleting some characters of the given string. If there are more than one possible results, return the longest word with the smallest lexicographical order. If there is no possible result, return the empty string. * <p> * Example 1: * Input: * s = "abpcplea", d = ["ale","apple","monkey","plea"] * <p> * Output: * "apple" * Example 2: * Input: * s = "abpcplea", d = ["a","b","c"] * <p> * Output: * "a" * Note: * All the strings in the input will only contain lower-case letters. * The size of the dictionary won't exceed 1,000. * The length of all the strings in the input won't exceed 1,000. * * @param s * @param d * @return */ public String findLongestWord(String s, List<String> d) { String longest = ""; for (String dictWord : d) { int i = 0; for (char c : s.toCharArray()) { if (i < dictWord.length() && c == dictWord.charAt(i)) i++; } if (i == dictWord.length() && dictWord.length() >= longest.length()) { if (dictWord.length() > longest.length() || dictWord.compareTo(longest) < 0) { longest = dictWord; } } } return longest; } public String findLongestWord_35ms(String s, List<String> d) { if (s == null || d == null) return ""; Collections.sort(d, new Comparator<String>() { public int compare(String a, String b) { if (a.length() != b.length()) return b.length() - a.length(); else return a.compareTo(b); } }); char[] searchingWord = s.toCharArray(); char[] wordinDictionary; int i, j; for (String word : d) { wordinDictionary = word.toCharArray(); j = 0; i = 0; while (j < searchingWord.length && i < wordinDictionary.length) { while (j < searchingWord.length && wordinDictionary[i] != searchingWord[j]) j++; if (j < searchingWord.length && searchingWord[j] == wordinDictionary[i]) i++; j++; } if (i >= wordinDictionary.length) return new String(wordinDictionary); } return ""; } public String findLongestWord_17ms(String s, List<String> d) { String longest = ""; for (String word : d) if (isBetter(word, longest) && isSubsequence(word, s)) longest = word; return longest; } private boolean isBetter(String a, String b) { return a.length() > b.length() || a.length() == b.length() && a.compareTo(b) < 0; } private boolean isSubsequence(String a, String b) { int start = -1; for (int i = 0; i < a.length(); i++) { start = b.indexOf(a.charAt(i), start + 1); if (start < 0) return false; } return true; } }
[ "xu6148152@gmail.com" ]
xu6148152@gmail.com
4ced60d0ffbce9bcd1ba70c04b197c091b8895a8
f6f6b1d9953cbf5f008566b3880ceda61a53b04b
/src/main/java/io/javabraims/model/CatalogItem.java
8830c4bbaf9d4023c052f5dec81f7af80f5b2e17
[]
no_license
HluhovMax/spring-boot-microservices
bd631d67450addb739e43824456d8d4de2687da9
b7ae3fc6fb9b6c8fdd33713818de37800dc26917
refs/heads/master
2020-04-30T10:49:19.911078
2019-03-20T17:43:25
2019-03-20T17:43:25
176,786,605
0
0
null
null
null
null
UTF-8
Java
false
false
258
java
package io.javabraims.model; import lombok.AllArgsConstructor; import lombok.Data; /** * Created by 38066 on 19.03.2019. */ @Data @AllArgsConstructor public class CatalogItem { private String name; private String desc; private int rating; }
[ "holosievo@gmail.com" ]
holosievo@gmail.com
e4d688acef6b46c983050a520417079d325aacce
17be6cc29f7fd76f83eea525449a3443acef53ca
/mg.alpha.gestion.operations.shared/src/mg/alpha/gestion/operations/shared/ui/desktop/outlines/pages/forms/operations/ISelectionnerDonneesService.java
be4976becea1918128529b7ed0932d05bd3a294c
[]
no_license
didaRatsimba/alphaGDOEclipseScout
d29fbeb44f88d07facd4264abd424f40e4ffcc31
bf9bcafd98419d147ba60d3758e27135b00e6a8e
refs/heads/master
2021-06-04T00:18:48.627554
2018-10-26T19:51:54
2018-10-26T19:51:54
39,316,425
0
0
null
2018-10-26T19:51:54
2015-07-18T23:52:47
Java
UTF-8
Java
false
false
1,398
java
/** * */ package mg.alpha.gestion.operations.shared.ui.desktop.outlines.pages.forms.operations; import org.eclipse.scout.commons.exception.ProcessingException; import org.eclipse.scout.rt.shared.validate.IValidationStrategy; import org.eclipse.scout.rt.shared.validate.InputValidation; import org.eclipse.scout.service.IService; /** * @author Dida */ @InputValidation(IValidationStrategy.PROCESS.class) public interface ISelectionnerDonneesService extends IService { /** * @param formData * @return * @throws org.eclipse.scout.commons.exception.ProcessingException */ SelectionnerDonneesFormData create(SelectionnerDonneesFormData formData) throws ProcessingException; /** * @param formData * @return * @throws org.eclipse.scout.commons.exception.ProcessingException */ SelectionnerDonneesFormData load(SelectionnerDonneesFormData formData) throws ProcessingException; /** * @param formData * @return * @throws org.eclipse.scout.commons.exception.ProcessingException */ SelectionnerDonneesFormData prepareCreate(SelectionnerDonneesFormData formData) throws ProcessingException; /** * @param formData * @return * @throws org.eclipse.scout.commons.exception.ProcessingException */ SelectionnerDonneesFormData store(SelectionnerDonneesFormData formData) throws ProcessingException; }
[ "dida.ratsimba@gmail.com" ]
dida.ratsimba@gmail.com
9679442a315f080d776c0a42212fb3eff766ba69
2fecec2600a64f973dcd6f3361f40fcdec807329
/app/src/main/java/com/udacity/adibella/whatsinmyfridge/provider/RecipeContract.java
bf35bf45c713afa3b8d842191d9ad7e611bc4381
[]
no_license
dibellaa/Capston-Project
fd1b6ae9a17506df64c1e5f2f9d52017ebb79946
a7709b621da6a8f3036f71802829ba2ee8c0c37d
refs/heads/master
2020-03-23T15:38:21.173021
2018-08-12T23:25:04
2018-08-12T23:25:04
141,763,763
1
0
null
null
null
null
UTF-8
Java
false
false
1,282
java
package com.udacity.adibella.whatsinmyfridge.provider; import android.net.Uri; import android.provider.BaseColumns; import com.udacity.adibella.whatsinmyfridge.BuildConfig; public class RecipeContract { public static final String AUTHORITY = BuildConfig.APPLICATION_ID + ".provider"; public static final Uri BASE_CONTENT_URI = Uri.parse("content://" + AUTHORITY); public static final String PATH_RECIPES = "favoriteRecipes"; public static final class RecipeEntry implements BaseColumns { public static final Uri CONTENT_URI = BASE_CONTENT_URI.buildUpon() .appendPath(PATH_RECIPES) .build(); public static final String TABLE_NAME = "favoriteRecipes"; public static final String COLUMN_RECIPE_ID = "recipeId"; public static final String COLUMN_TITLE = "title"; public static final String COLUMN_IMAGE = "image"; public static final String COLUMN_SUMMARY = "summary"; public static final String COLUMN_INGREDIENTS = "ingredients"; public static final String COLUMN_INSTRUCTIONS = "instructions"; public static final String COLUMN_SOURCE_URL = "sourceUrl"; public static final String COLUMN_SOURCE_NAME = "sourceName"; } }
[ "dib.alessandro@gmail.com" ]
dib.alessandro@gmail.com