blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
410
content_id
stringlengths
40
40
detected_licenses
sequencelengths
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
689M
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
131 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
32 values
content
stringlengths
3
9.45M
authors
sequencelengths
1
1
author_id
stringlengths
0
313
1461dacc6ed9550861cf95b78a868f6680c32718
8deb480242bccf0615056122293ea7d6b02f62a9
/src/main/java/com/qianfeng/pojo/Person.java
2d6602123d2fd80bd6765bdb08ea15a04dd845ec
[]
no_license
hzbace/clothsys
a26e25c183f49c201eb67d3a6c34316c4c75e4d5
da09acb52e38872e76f38d8e63e73f5259bc9fb4
refs/heads/master
2020-04-23T13:40:17.583942
2019-02-18T02:59:39
2019-02-18T02:59:39
171,204,795
0
0
null
null
null
null
UTF-8
Java
false
false
1,495
java
package com.qianfeng.pojo; public class Person { private Integer perId; private String perName; private String perCompany; private String perEmail; private String perPhone; private String perAddr; private Integer perUserId; public Integer getPerId() { return perId; } public void setPerId(Integer perId) { this.perId = perId; } public String getPerName() { return perName; } public void setPerName(String perName) { this.perName = perName == null ? null : perName.trim(); } public String getPerCompany() { return perCompany; } public void setPerCompany(String perCompany) { this.perCompany = perCompany == null ? null : perCompany.trim(); } public String getPerEmail() { return perEmail; } public void setPerEmail(String perEmail) { this.perEmail = perEmail == null ? null : perEmail.trim(); } public String getPerPhone() { return perPhone; } public void setPerPhone(String perPhone) { this.perPhone = perPhone == null ? null : perPhone.trim(); } public String getPerAddr() { return perAddr; } public void setPerAddr(String perAddr) { this.perAddr = perAddr == null ? null : perAddr.trim(); } public Integer getPerUserId() { return perUserId; } public void setPerUserId(Integer perUserId) { this.perUserId = perUserId; } }
dc9c24d3ea59c3cd9a2e0b43df725e1c91d260e5
d1587ff23f80b268719195cf094e69cf16707ad4
/hr-payroll/src/main/java/com/brazil/hrpayroll/mappers/PaymentMapper.java
1ff42427e59ae103fd4aafe1d817f646851d1611
[]
no_license
eduardomingoranca/ms-human-resources-spring
6e09a26fba8e3ebb7bd846badfd62b1c3dee4dc4
b13dd2bf444584cce9ba1e9141032037b1b51f5d
refs/heads/main
2023-08-28T00:01:01.513303
2021-09-18T13:05:09
2021-09-18T13:05:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
601
java
package com.brazil.hrpayroll.mappers; import com.brazil.hrpayroll.entities.Payment; import com.brazil.hrpayroll.responses.PaymentResponse; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; @Mapper(componentModel = "spring") public abstract class PaymentMapper { /** criando uma instancia */ public static final PaymentMapper INSTANCE = Mappers.getMapper(PaymentMapper.class); /** * convertendo automaticamente todos os * atributos dentro das DTO's * * @param payment */ public abstract PaymentResponse toPaymentResponse(Payment payment); }
d5c29e174c64c22484130059ba9d21974f666b6d
befd1d2879f7924f6d5898302e3512cd4ae02c88
/MergeChunk.java
1a3f495b1388f40ae0f4c8d7c543421e5ec5ae84
[]
no_license
weirenw/Peer2Peer-Network
a10a6722d8daefda98b09e40d622f2f7449687de
23604906c1ca43fef5e7b848f649eca3fcc3ef92
refs/heads/master
2020-05-18T17:07:59.255676
2014-11-13T04:39:35
2014-11-13T04:39:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,367
java
import java.io.*; import java.util.*; public class MergeChunk{ public void mergeParts ( int PEER_NUM, int CHUNK_NUM ) { String DESTINATION_PATH = "/home/administrator/CNT5106/project/client" + Integer.toString(PEER_NUM) + "/file/"; ArrayList<String> nameList = new ArrayList<String>(); for(int i=1;i<=CHUNK_NUM;i++) nameList.add(DESTINATION_PATH+"data"+Integer.toString(i)+".bin"); File[] file = new File[nameList.size()]; byte AllFilesContent[] = null; int TOTAL_SIZE = 0; int FILE_NUMBER = nameList.size(); int FILE_LENGTH = 0; int CURRENT_LENGTH=0; for ( int i=0; i<FILE_NUMBER; i++) { file[i] = new File (nameList.get(i)); TOTAL_SIZE+=file[i].length(); } try { AllFilesContent= new byte[TOTAL_SIZE]; // Length of All Files, Total Size InputStream inStream = null; for ( int j=0; j<FILE_NUMBER; j++) { inStream = new BufferedInputStream ( new FileInputStream( file[j] )); FILE_LENGTH = (int) file[j].length(); inStream.read(AllFilesContent, CURRENT_LENGTH, FILE_LENGTH); CURRENT_LENGTH+=FILE_LENGTH; inStream.close(); } } catch (FileNotFoundException e) { System.out.println("File not found " + e); } catch (IOException ioe) { System.out.println("Exception while reading the file " + ioe); } finally { write (AllFilesContent,DESTINATION_PATH+"finalfile"); } System.out.println("Merge was executed successfully.!"); } void write(byte[] DataByteArray, String DestinationFileName){ try { OutputStream output = null; try { output = new BufferedOutputStream(new FileOutputStream(DestinationFileName)); output.write( DataByteArray ); System.out.println("Writing Process Was Performed"); } finally { output.close(); } } catch(FileNotFoundException ex){ ex.printStackTrace(); } catch(IOException ex){ ex.printStackTrace(); } } }
bd451bc96e7de2c8cd520fc6b5878bbcff9dfdd4
6d3d22ff3af218191c2463a5f953d301839d088f
/Quizzer.java
cdd76e66d7a99dbb0a8173d5bf9c334460b9a67a
[]
no_license
iblacksand/Quizzer
1b3565aa7e64c9ea2c187da8e81d7b4b1f4ab9e0
1fa478d83efd620852b2594ce98fcea58114631f
refs/heads/master
2021-01-10T10:15:40.321760
2015-10-01T21:37:54
2015-10-01T21:37:54
43,519,537
0
0
null
null
null
null
UTF-8
Java
false
false
485
java
import java.util.*; /** *Class to start the quiz clas *@author John Elizarraras *@version 0.1.0 */ public class Quizzer { /** *Main method for the quizzer *@param args arguments for starting program */ public static void main(String[] args) { Quiz q = new Quiz(); Scanner in = new Scanner (System.in); String statement = in.nextLine(); while (!statement.equalsIgnoreCase("Exit")) { System.out.println(q.quiz()); } } }
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; } }
e7718e5ed421165c6e184615e4455c08efef5b2b
cba0fed5248fbfda184e483891cdd34e5f7f4984
/impl/src/main/java/org/opendaylight/jsonrpc/binding/MultiModelProxy.java
0ccf8e81a1481f721228672a9feb5f17396cd4b4
[]
no_license
mltdinesh/jsonrpc
0f2c7b9cb57ea5559e0c9a1b2202e37505490769
092ca5443cb145864bd80b622256ae51cbe5852d
refs/heads/master
2020-12-20T01:29:53.820123
2020-01-16T21:13:59
2020-01-17T12:45:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,790
java
/* * Copyright (c) 2018 Lumina Networks, Inc. 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 */ package org.opendaylight.jsonrpc.binding; import com.google.common.collect.ClassToInstanceMap; import com.google.common.collect.ImmutableClassToInstanceMap; import java.util.Objects; import java.util.Set; import java.util.stream.Collectors; import org.opendaylight.yangtools.yang.binding.RpcService; /** * Proxy context for remote RPC service which implements multiple yang models. * * @author <a href="mailto:[email protected]">Richard Kosegi</a> * @since Oct 16, 2018 */ public class MultiModelProxy implements AutoCloseable { private final ClassToInstanceMap<? extends RpcService> proxyMap; private final Set<ProxyContext<RpcService>> proxies; public MultiModelProxy(Set<ProxyContext<RpcService>> proxies) { this.proxies = proxies; proxyMap = ImmutableClassToInstanceMap .copyOf(proxies.stream().collect(Collectors.toMap(ProxyContext::getType, ProxyContext::getProxy))); } @Override public void close() { proxies.stream().forEach(ProxyContext::close); } /** * Get RPC proxy for particular {@link RpcService}. * * @param type subtype of {@link RpcService} to get proxy for * @return proxy for given RpcService subtype */ @SuppressWarnings("unchecked") public <T extends RpcService> T getRpcService(Class<T> type) { return (T) Objects.requireNonNull(proxyMap.get(type), "Service is not supported by this requester instance : " + type); } }
859ad66508a4b7fa1c0fdd67064c28367e3d550b
8ec9c8921ec3d6d3d313df8f500a97a5faf5b8a6
/factoryproject1706/guigu_service/src/main/java/com/guigu/service/impl/marketing/MarketServiceImpl.java
4af7b049a2a7ff344975a2b448dddd4beda1da8a
[]
no_license
johny751/StuMgr-Java
e4b28db6977efb6e8bca771d9aab6d9a0466672c
8d52c5d7a4351c0aeade72e0b9169c69c00b4bc6
refs/heads/master
2023-03-30T12:29:43.230846
2019-03-05T09:01:56
2019-03-05T09:01:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,601
java
package com.guigu.service.impl.marketing; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import com.guigu.dao.marketing.MarketMapper; import com.guigu.domain.marketing.Employee; import com.guigu.domain.marketing.PageInfo; import com.guigu.domain.marketing.Statistics; import com.guigu.domain.marketing.StatisticsSale; import com.guigu.domain.marketing.StatisticsSchool; import com.guigu.service.marketing.IMarketService; import com.guigu.util.PageHelpVO; @Service public class MarketServiceImpl implements IMarketService { @Autowired private MarketMapper marketMapper; /** * 查询所有市场人员统计招生情况 */ @Override public PageHelpVO querySale(int page, int rows) throws Exception { // TODO Auto-generated method stub PageHelpVO pageinfo = new PageHelpVO(); Page page2 = PageHelper.startPage(page, rows); List<Statistics> list = this.marketMapper.querySale(); System.out.println(list); pageinfo.setRows(list); pageinfo.setTotal(page2.getTotal()); return pageinfo; } /** * 查询生源地区/院校统计招生情况 */ @Override public PageHelpVO querySchool(int page, int rows) throws Exception { // TODO Auto-generated method stub PageHelpVO pageinfo = new PageHelpVO(); Page page3 = PageHelper.startPage(page, rows); List<StatisticsSchool> list = this.marketMapper.querySchool(); pageinfo.setRows(list); pageinfo.setTotal(page3.getTotal()); return pageinfo; } }
ff7682fef48ff851ec74e17da5a39da25ce9d702
e5c5b9f97ad7a5985018456f0184a77017ffcff6
/src/test/java/com/okidokiteam/exxam/regression/paxrunner/porcelain/MutliFrameworkTest.java
942df2bf4aed3168d0530628a86054ae82c6c07a
[]
no_license
tonit/ExamOnGradle
21bf9804f6b9fb66468c417ceb407616eb1ed460
9cf0d671256d3ce216dbe5e2ce065bc6d0fc378d
refs/heads/master
2016-09-05T19:59:43.642944
2011-04-15T12:39:02
2011-04-15T12:39:02
1,515,837
0
0
null
null
null
null
UTF-8
Java
false
false
1,086
java
package com.okidokiteam.exxam.regression.paxrunner.porcelain; import org.junit.Test; import org.junit.runner.RunWith; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.Configuration; import org.ops4j.pax.exam.junit.ExamReactorStrategy; import org.ops4j.pax.exam.junit.JUnit4TestRunner; import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory; import static org.ops4j.pax.exam.CoreOptions.*; import static org.ops4j.pax.exam.LibraryOptions.*; import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.*; /** * */ @RunWith( JUnit4TestRunner.class ) @ExamReactorStrategy( AllConfinedStagedReactorFactory.class ) public class MutliFrameworkTest { private static Logger LOG = LoggerFactory.getLogger( MutliFrameworkTest.class ); @Configuration() public Option[] config() { return options( junitBundles(), equinox(), felix(), logProfile() ); } @Test public void fwTest( ) { } }
05f62afdae32c8aa528c114f2cd836dd40ea7a57
86e4307b042fc735aa0c67f5963a78d154d276c8
/android/app/build/generated/not_namespaced_r_class_sources/debug/processDebugResources/r/com/google/android/gms/base/R.java
fc3addbf5f53fba91a893f2023b51fd1bed83e48
[]
no_license
lukas0512/Vic
6b01f44f8b4774f450c5f318e95ce7dc1643ba5e
13c817032f6995351b614b363b540abcb6adf829
refs/heads/master
2023-01-06T18:43:08.717859
2019-09-04T04:40:41
2019-09-04T04:40:41
206,222,630
0
0
null
2023-01-04T08:54:58
2019-09-04T03:25:07
Java
UTF-8
Java
false
false
6,376
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * gradle plugin from the resource data it found. It * should not be modified by hand. */ package com.google.android.gms.base; public final class R { private R() {} public static final class attr { private attr() {} public static final int buttonSize = 0x7f020044; public static final int circleCrop = 0x7f02004b; public static final int colorScheme = 0x7f02005a; public static final int imageAspectRatio = 0x7f020092; public static final int imageAspectRatioAdjust = 0x7f020093; public static final int scopeUris = 0x7f0200e2; } public static final class color { private color() {} public static final int common_google_signin_btn_text_dark = 0x7f040027; public static final int common_google_signin_btn_text_dark_default = 0x7f040028; public static final int common_google_signin_btn_text_dark_disabled = 0x7f040029; public static final int common_google_signin_btn_text_dark_focused = 0x7f04002a; public static final int common_google_signin_btn_text_dark_pressed = 0x7f04002b; public static final int common_google_signin_btn_text_light = 0x7f04002c; public static final int common_google_signin_btn_text_light_default = 0x7f04002d; public static final int common_google_signin_btn_text_light_disabled = 0x7f04002e; public static final int common_google_signin_btn_text_light_focused = 0x7f04002f; public static final int common_google_signin_btn_text_light_pressed = 0x7f040030; public static final int common_google_signin_btn_tint = 0x7f040031; } public static final class drawable { private drawable() {} public static final int common_full_open_on_phone = 0x7f060054; public static final int common_google_signin_btn_icon_dark = 0x7f060055; public static final int common_google_signin_btn_icon_dark_focused = 0x7f060056; public static final int common_google_signin_btn_icon_dark_normal = 0x7f060057; public static final int common_google_signin_btn_icon_dark_normal_background = 0x7f060058; public static final int common_google_signin_btn_icon_disabled = 0x7f060059; public static final int common_google_signin_btn_icon_light = 0x7f06005a; public static final int common_google_signin_btn_icon_light_focused = 0x7f06005b; public static final int common_google_signin_btn_icon_light_normal = 0x7f06005c; public static final int common_google_signin_btn_icon_light_normal_background = 0x7f06005d; public static final int common_google_signin_btn_text_dark = 0x7f06005e; public static final int common_google_signin_btn_text_dark_focused = 0x7f06005f; public static final int common_google_signin_btn_text_dark_normal = 0x7f060060; public static final int common_google_signin_btn_text_dark_normal_background = 0x7f060061; public static final int common_google_signin_btn_text_disabled = 0x7f060062; public static final int common_google_signin_btn_text_light = 0x7f060063; public static final int common_google_signin_btn_text_light_focused = 0x7f060064; public static final int common_google_signin_btn_text_light_normal = 0x7f060065; public static final int common_google_signin_btn_text_light_normal_background = 0x7f060066; public static final int googleg_disabled_color_18 = 0x7f060067; public static final int googleg_standard_color_18 = 0x7f060068; } public static final class id { private id() {} public static final int adjust_height = 0x7f070020; public static final int adjust_width = 0x7f070021; public static final int auto = 0x7f070026; public static final int dark = 0x7f07003b; public static final int icon_only = 0x7f070054; public static final int light = 0x7f07005a; public static final int none = 0x7f070064; public static final int standard = 0x7f070092; public static final int wide = 0x7f0700aa; } public static final class string { private string() {} public static final int common_google_play_services_enable_button = 0x7f0b0043; public static final int common_google_play_services_enable_text = 0x7f0b0044; public static final int common_google_play_services_enable_title = 0x7f0b0045; public static final int common_google_play_services_install_button = 0x7f0b0046; public static final int common_google_play_services_install_text = 0x7f0b0047; public static final int common_google_play_services_install_title = 0x7f0b0048; public static final int common_google_play_services_notification_channel_name = 0x7f0b0049; public static final int common_google_play_services_notification_ticker = 0x7f0b004a; public static final int common_google_play_services_unsupported_text = 0x7f0b004c; public static final int common_google_play_services_update_button = 0x7f0b004d; public static final int common_google_play_services_update_text = 0x7f0b004e; public static final int common_google_play_services_update_title = 0x7f0b004f; public static final int common_google_play_services_updating_text = 0x7f0b0050; public static final int common_google_play_services_wear_update_text = 0x7f0b0051; public static final int common_open_on_phone = 0x7f0b0052; public static final int common_signin_button_text = 0x7f0b0053; public static final int common_signin_button_text_long = 0x7f0b0054; } public static final class styleable { private styleable() {} public static final int[] LoadingImageView = { 0x7f02004b, 0x7f020092, 0x7f020093 }; public static final int LoadingImageView_circleCrop = 0; public static final int LoadingImageView_imageAspectRatio = 1; public static final int LoadingImageView_imageAspectRatioAdjust = 2; public static final int[] SignInButton = { 0x7f020044, 0x7f02005a, 0x7f0200e2 }; public static final int SignInButton_buttonSize = 0; public static final int SignInButton_colorScheme = 1; public static final int SignInButton_scopeUris = 2; } }
b15589e6eb4a3204b8b965546aff597e77f4950c
f801fb4120a08ee43419befeaae953a986e91143
/projects/EmployeeManager/src/employeemanager/models/implementations/Manager.java
1285b6594ca5be84b8a06f377c0ae2910db04546
[]
no_license
VictorMilitan/homework1
96770b4952f1e784838a0db1ce3c4ba9827249f1
cdbc96ae5b59512a3850a6fc7cfe039e97453441
refs/heads/master
2020-04-17T23:44:13.243588
2019-04-10T17:57:45
2019-04-10T17:57:45
167,048,326
0
0
null
null
null
null
UTF-8
Java
false
false
462
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 employeemanager.models.implementations; import employeemanager.models.Employee1; /** * * @author User */ public class Manager extends Employee1{ public void rules() { } public void screams() { } }
dd97c51cb607ad208e8723d5fc8a7a591f5f77dc
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/9/org/jfree/data/xy/DefaultIntervalXYDataset_getY_386.java
3d5dbd7f28e158a74dc44195d8203bc158009363
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
1,202
java
org jfree data dataset defin rang interv valu valu implement arrai store start end start end valu altern implement link interv dataset intervalxydataset provid link interv seri collect xyintervalseriescollect default interv dataset defaultintervalxydataset abstract interv dataset abstractintervalxydataset return item seri param seri seri index rang code code code seri count getseriescount code param item item index rang code code code item count getitemcount seri code arrai index bound except arrayindexoutofboundsexcept code seri code rang arrai index bound except arrayindexoutofboundsexcept code item code rang getyvalu number geti seri item doubl getyvalu seri item
7c36d46c013102739251b39f348349d03abacf99
cee88a3b33d342aec3f4b1183252c3c6d780517d
/src/main/java/com/simon/gateway/service/mapper/UserMapper.java
b12cd92e655dccf33923fc145b9b34ced652e15e
[]
no_license
simoncurran/jhipster-ui-gateway
b9a1e2c6229208dc1e249f33f3ebeaa282fbb739
702af22a8e0d772f64ae542b945b63e87dfdbec1
refs/heads/master
2020-07-26T01:36:10.272735
2016-11-13T20:27:07
2016-11-13T20:27:07
73,640,664
0
0
null
null
null
null
UTF-8
Java
false
false
1,709
java
package com.simon.gateway.service.mapper; import com.simon.gateway.domain.Authority; import com.simon.gateway.domain.User; import com.simon.gateway.service.dto.UserDTO; import org.mapstruct.*; import java.util.List; import java.util.Set; import java.util.stream.Collectors; /** * Mapper for the entity User and its DTO UserDTO. */ @Mapper(componentModel = "spring", uses = {}) public interface UserMapper { UserDTO userToUserDTO(User user); List<UserDTO> usersToUserDTOs(List<User> users); @Mapping(target = "createdBy", ignore = true) @Mapping(target = "createdDate", ignore = true) @Mapping(target = "lastModifiedBy", ignore = true) @Mapping(target = "lastModifiedDate", ignore = true) @Mapping(target = "id", ignore = true) @Mapping(target = "activationKey", ignore = true) @Mapping(target = "resetKey", ignore = true) @Mapping(target = "resetDate", ignore = true) @Mapping(target = "password", ignore = true) User userDTOToUser(UserDTO userDTO); List<User> userDTOsToUsers(List<UserDTO> userDTOs); default User userFromId(Long id) { if (id == null) { return null; } User user = new User(); user.setId(id); return user; } default Set<String> stringsFromAuthorities (Set<Authority> authorities) { return authorities.stream().map(Authority::getName) .collect(Collectors.toSet()); } default Set<Authority> authoritiesFromStrings(Set<String> strings) { return strings.stream().map(string -> { Authority auth = new Authority(); auth.setName(string); return auth; }).collect(Collectors.toSet()); } }
2ae2133550d5f7be3ce8fb87e55d75f4d87ace1d
670470a84ff2f9647286b012c2372d9473162cb9
/src/test/java/application/GreetingResourceTest.java
e83d51537360f4db4a4048c65157d5ec0bfaeef1
[]
no_license
DanielFidalgo/quarkus-kubernetes
f86963ab4e9d9db8e105380ef04960461c628568
b82dc907977afc9986aef3be0ee5e90e8df82afd
refs/heads/main
2023-07-01T16:59:11.520228
2021-08-06T02:13:21
2021-08-06T02:13:21
386,439,558
0
0
null
null
null
null
UTF-8
Java
false
false
437
java
package application; import io.quarkus.test.junit.QuarkusTest; import org.junit.jupiter.api.Test; import static io.restassured.RestAssured.given; import static org.hamcrest.CoreMatchers.is; @QuarkusTest public class GreetingResourceTest { @Test public void testHelloEndpoint() { given() .when().get("/hello") .then() .statusCode(200) .body(is("Hello RESTEasy")); } }
8ce0fe3d176dc11a5b0105ab737dd488688a8ca5
ce475cdc11907eddfe7d419048fa9883474631d2
/WORKSPACE/array/src/com/testyantra/collection/set/Person.java
e598c6aef84d73a222502ab009eedc22addf2e72
[]
no_license
avinashporwal2607/Manthan-ELF-16th-October-Avinash-Porwal
0c44d8924da2f0e02da803e6521792b8c943c1ed
28dc9a3664826e6690f81696aa51c6726860387f
refs/heads/master
2020-09-16T22:30:10.336409
2019-12-27T07:05:13
2019-12-27T07:05:13
223,904,867
0
0
null
null
null
null
UTF-8
Java
false
false
728
java
package com.testyantra.collection.set; public class Person implements Comparable<Person> //here we have to implement comparable interface user dedine class { int id; String name; double hegiht; public Person(int id, String name, double hegiht) { this.id = id; this.name = name; this.hegiht = hegiht; } /* * public int compareTo(Person x)// { if(this.id>x.id) { return 1; } else if * (this.id<x.id) { return -1; } else { return 0; } */ // public int compareTo(Person x) // { if(this.hegiht>x.hegiht) // { // return 1; // } // else if // (this.hegiht<x.hegiht) // { return -1; } // else // { return 0; // } public int compareTo(Person x) { return this.name.compareTo(x.name); } }
90f32513c9a7c31423e1216e74492a9982925c8a
edadfd41bba5414ecb3130782565fb83563c21fa
/src/com/timmy/jsonEntity/IdentifyUserResult.java
6c47c5248a9d31c7e17ca497103d9717618182e6
[]
no_license
Raphealkxy/AMSFull
c477efda20966ca42358aac8cc8463c9edbef59c
7e4a9a1b8ac372840639458a5dd15e977ffcb4f3
refs/heads/master
2021-07-11T02:38:27.675019
2017-10-07T13:01:43
2017-10-07T13:01:43
103,399,166
0
0
null
null
null
null
UTF-8
Java
false
false
743
java
package com.timmy.jsonEntity; import java.util.List; /** * Auto-generated: 2017-10-07 15:29:31 * * @author www.jsons.cn * @website http://www.jsons.cn/json2java/ */ public class IdentifyUserResult { private List<Result> result; private int resultNum; private int logId; public void setResult(List<Result> result) { this.result = result; } public List<Result> getResult() { return result; } public void setResultNum(int resultNum) { this.resultNum = resultNum; } public int getResultNum() { return resultNum; } public void setLogId(int logId) { this.logId = logId; } public int getLogId() { return logId; } }
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(); }
4f404389e360bb068099bc8607c7281babe7c0a1
bc4d2a4dfe587d3dd8045544cc6dc562ed0661b4
/src/test/java/stepDefinition/stepDefinition.java
3f872caf414fb089d4097c6291d1448a159b4308
[]
no_license
SudhakarElumalai/GitDemo
89d5415ecbae905c41dbb5e17938b4426832cfea
94f0b0a6150a46891886cff0dade46d86f851268
refs/heads/master
2022-12-30T16:27:08.093393
2020-07-26T18:15:19
2020-07-26T18:15:19
282,641,947
0
0
null
2020-10-13T23:56:45
2020-07-26T12:08:51
Java
UTF-8
Java
false
false
1,009
java
package stepDefinition; import io.cucumber.java.en.And; import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; public class stepDefinition { @Given("^User is on landing Page$") public void user_is_on_landing_page() throws Throwable { System.out.println("User is on Landing Page"); System.out.println("Navgated To Login page"); System.out.println("Passed"); } @When("^User Login into application with username and password$") public void user_login_into_application_with_username_and_password() throws Throwable { System.out.println("User successfully logined into the application"); } @Then("^Home page is populated$") public void home_page_is_populated() throws Throwable { System.out.println("User is on Home Page"); } @And("^Cards are displayed$") public void cards_are_displayed() throws Throwable { System.out.println("Cards details is populated"); } }
28b608242afd72d9a4bd5b63c6fbdc85f15d99f2
5f63a60fd029b8a74d2b1b4bf6992f5e4c7b429b
/com/planet_ink/coffee_mud/core/database/GRaceLoader.java
a4ae1d625f5c16a227a5b45943a14efcb86d17d4
[ "Apache-2.0" ]
permissive
bozimmerman/CoffeeMud
5da8b5b98c25b70554ec9a2a8c0ef97f177dc041
647864922e07572b1f6c863de8f936982f553288
refs/heads/master
2023-09-04T09:17:12.656291
2023-09-02T00:30:19
2023-09-02T00:30:19
5,267,832
179
122
Apache-2.0
2023-04-30T11:09:14
2012-08-02T03:22:12
Java
UTF-8
Java
false
false
7,242
java
package com.planet_ink.coffee_mud.core.database; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.CMProps.Int; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.DatabaseEngine; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.sql.*; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; /* Copyright 2008-2023 Bo Zimmerman 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. */ public class GRaceLoader { protected DBConnector DB=null; protected Set<String> updateQue = Collections.synchronizedSet(new TreeSet<String>()); public GRaceLoader(final DBConnector newDB) { DB=newDB; } public void DBDeleteRace(final String raceID) { DB.update("DELETE FROM CMGRAC WHERE CMRCID='"+raceID+"'"); } public void DBCreateRace(final String raceID, final String data) { DB.updateWithClobs( "INSERT INTO CMGRAC (" +"CMRCID, " +"CMRDAT," +"CMRCDT " +") values (" +"'"+raceID+"'," +"?," +System.currentTimeMillis() +")", data+" "); } public void DBUpdateRaceCreationDate(final String raceID) { DBConnection D=null; try { D=DB.DBFetch(); D.update("UPDATE CMGRAC SET CMRCDT="+System.currentTimeMillis()+" WHERE CMRCID='"+raceID+"';", 0); } catch(final Exception sqle) { Log.errOut("GRaceLoader",sqle); } finally { DB.DBDone(D); } } public boolean isRaceExpired(String raceID) { raceID = DB.injectionClean(raceID); DBConnection D=null; try { D=DB.DBFetch(); final ResultSet R=D.query("SELECT * FROM CMGRAC WHERE CMRCID='"+raceID+"';"); if(R.next()) { final long oneHour = (60L * 60L * 1000L); final long expireDays = CMProps.getIntVar(Int.RACEEXPIRATIONDAYS); final long expireMs = (oneHour * expireDays * 24L); final long oldestDate = System.currentTimeMillis()- expireMs; final long creationDate = DBConnections.getLongRes(R, "CMRCDT"); R.close(); return (creationDate < oldestDate); } R.close(); } catch(final Exception sqle) { Log.errOut("GRaceLoader",sqle); } finally { DB.DBDone(D); } return false; } public void registerRaceUsed(final Race R) { if((R!=null)&&(R.isGeneric())) updateQue.add(R.ID()); } public int updateAllRaceDates() { final List<String> que = new LinkedList<String>(updateQue); final List<String> updates = new ArrayList<String>(que.size()); updateQue.clear(); final long cDate = System.currentTimeMillis(); for(final String id : que) { if(!id.equalsIgnoreCase("GenRace")) updates.add("UPDATE CMGRAC SET CMRCDT="+cDate+" WHERE CMRCID='"+id+"';"); } if(updates.size()>0) { try { DB.update(updates.toArray(new String[0])); } catch(final Exception sqle) { Log.errOut("GRaceLoader",sqle); } return updates.size(); } return 0; } public int DBPruneOldRaces() { final List<String> updates = new ArrayList<String>(1); final long oneHour = (60L * 60L * 1000L); final long expireDays = CMProps.getIntVar(Int.RACEEXPIRATIONDAYS); final long expireMs = (oneHour * expireDays * 24L); final long oldestDate = System.currentTimeMillis()- expireMs; final long oldestHour = System.currentTimeMillis()- oneHour; final List<DatabaseEngine.AckStats> ackStats = DBReadRaceStats(); for(final DatabaseEngine.AckStats stat : ackStats) { if(stat.creationDate() != 0) { final Race R=CMClass.getRace(stat.ID()); if(R.usageCount(0) == 0) { if(stat.creationDate() < oldestDate) { updates.add("DELETE FROM CMGRAC WHERE CMRCID='"+stat.ID()+"';"); CMClass.delRace(R); Log.sysOut("Expiring race '"+R.ID()+": "+R.name()+": "+CMLib.time().date2String(stat.creationDate())); } } } else { final long cDate = CMLib.dice().rollInRange(oldestDate, oldestHour); updates.add("UPDATE CMGRAC SET CMRCDT="+cDate+" WHERE CMRCID='"+stat.ID()+"';"); } } if(updates.size()>0) { try { DB.update(updates.toArray(new String[0])); } catch(final Exception sqle) { Log.errOut("GRaceLoader",sqle); } } return updates.size(); } protected List<DatabaseEngine.AckStats> DBReadRaceStats() { DBConnection D=null; final List<DatabaseEngine.AckStats> rows=new Vector<DatabaseEngine.AckStats>(); try { D=DB.DBFetch(); final ResultSet R=D.query("SELECT * FROM CMGRAC"); while(R.next()) { final String rcid = DBConnections.getRes(R,"CMRCID"); final long rfirst = DBConnections.getLongRes(R, "CMRCDT"); final DatabaseEngine.AckStats ack=new DatabaseEngine.AckStats() { @Override public String ID() { return rcid; } @Override public long creationDate() { return rfirst; } }; rows.add(ack); } } catch(final Exception sqle) { Log.errOut("GRaceLoader",sqle); } finally { DB.DBDone(D); } // log comment return rows; } public List<DatabaseEngine.AckRecord> DBReadRaces() { DBConnection D=null; final List<DatabaseEngine.AckRecord> rows=new Vector<DatabaseEngine.AckRecord>(); try { D=DB.DBFetch(); final ResultSet R=D.query("SELECT * FROM CMGRAC"); while(R.next()) { final String rcid = DBConnections.getRes(R,"CMRCID"); final String rdat = DBConnections.getRes(R,"CMRDAT"); final DatabaseEngine.AckRecord ack=new DatabaseEngine.AckRecord() { @Override public String ID() { return rcid; } @Override public String data() { return rdat; } @Override public String typeClass() { return "GenRace"; } }; rows.add(ack); } } catch(final Exception sqle) { Log.errOut("GRaceLoader",sqle); } finally { DB.DBDone(D); } // log comment return rows; } }
ae24edb0ecefe67fa0c750fdce4af3840b05f719
0bcefd61a8378ec888803b286edc9152cfea98cc
/src/concurrent/singleton/Singleton1.java
856e8a9265af904a2623cf09b57db57727b06dd5
[]
no_license
LEEZONGYIN/AlgorithmPractice
ea3fb418ab6e5b6f418ca713e96a3b69c339438b
3496da1f527fa96c9ce030b1d6c6a7e8c0d0c91b
refs/heads/master
2021-07-18T15:51:34.666912
2020-09-04T10:17:50
2020-09-04T10:17:50
209,320,427
0
0
null
null
null
null
UTF-8
Java
false
false
431
java
package concurrent.singleton; /** * 双重校验锁 */ public class Singleton1 { private static Singleton1 INSTANCE = null; private Singleton1(){ } public Singleton1 getSingleton(){ if(INSTANCE==null){ synchronized(Singleton1.class){ if(INSTANCE==null){ INSTANCE = new Singleton1(); } } } return INSTANCE; } }
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; } }
65f9e3b0f974ca2e559b3b027401669adce35a5c
12d0f7d3294352856ab89be1b66c446e585ed809
/app/src/main/java/il/ac/tau/cloudweb17a/hasorkim/AppCompatPreferenceActivity.java
e17681fde1bb7e0624bd7223c3b39ea7b224dda9
[]
no_license
ShaharLer/Hasorkim-reports
d41f4f1f3e4a39925785f216187b13745bdceade
f123927e3f654a6fb383bd2171c6c445128c48c0
refs/heads/master
2021-03-30T15:43:57.452224
2018-04-30T12:59:04
2018-04-30T12:59:04
110,526,393
0
0
null
null
null
null
UTF-8
Java
false
false
3,004
java
package il.ac.tau.cloudweb17a.hasorkim; import android.content.res.Configuration; import android.os.Bundle; import android.preference.PreferenceActivity; import android.support.annotation.LayoutRes; import android.support.annotation.Nullable; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatDelegate; import android.support.v7.widget.Toolbar; import android.view.MenuInflater; import android.view.View; import android.view.ViewGroup; /** * A {@link android.preference.PreferenceActivity} which implements and proxies the necessary calls * to be used with AppCompat. */ public abstract class AppCompatPreferenceActivity extends PreferenceActivity { private AppCompatDelegate mDelegate; @Override protected void onCreate(Bundle savedInstanceState) { getDelegate().installViewFactory(); getDelegate().onCreate(savedInstanceState); super.onCreate(savedInstanceState); } @Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); getDelegate().onPostCreate(savedInstanceState); } public ActionBar getSupportActionBar() { return getDelegate().getSupportActionBar(); } public void setSupportActionBar(@Nullable Toolbar toolbar) { getDelegate().setSupportActionBar(toolbar); } @Override public MenuInflater getMenuInflater() { return getDelegate().getMenuInflater(); } @Override public void setContentView(@LayoutRes int layoutResID) { getDelegate().setContentView(layoutResID); } @Override public void setContentView(View view) { getDelegate().setContentView(view); } @Override public void setContentView(View view, ViewGroup.LayoutParams params) { getDelegate().setContentView(view, params); } @Override public void addContentView(View view, ViewGroup.LayoutParams params) { getDelegate().addContentView(view, params); } @Override protected void onPostResume() { super.onPostResume(); getDelegate().onPostResume(); } @Override protected void onTitleChanged(CharSequence title, int color) { super.onTitleChanged(title, color); getDelegate().setTitle(title); } @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); getDelegate().onConfigurationChanged(newConfig); } @Override protected void onStop() { super.onStop(); getDelegate().onStop(); } @Override protected void onDestroy() { super.onDestroy(); getDelegate().onDestroy(); } public void invalidateOptionsMenu() { getDelegate().invalidateOptionsMenu(); } private AppCompatDelegate getDelegate() { if (mDelegate == null) { mDelegate = AppCompatDelegate.create(this, null); } return mDelegate; } }
68d2244ec5dbee70b46432a97cf7106b232f1f06
4683677f52e69d47732260a758636cdf5c4457d7
/ch05/src/Ex10/Cylinder.java
555f27330ca032009a7df5c1d80ebd3a92c0401e
[]
no_license
potshow/work_java
e810243dba783cde7673a4fdb9eb091709ddb001
6b938eafee08811f115e90d9259ef0e0ae04e0c7
refs/heads/master
2021-09-05T17:41:15.318241
2018-01-30T00:49:00
2018-01-30T00:49:00
115,475,115
0
0
null
null
null
null
UTF-8
Java
false
false
1,285
java
package Ex10; public class Cylinder { Circle circle; double height; // 4번문제. public Cylinder(Circle circle, double height) { this.circle = circle; this.height = height; } public double getVolume() { double area = circle.getArea(); // 원 넓이를 구하고 double volume = area*this.height; return volume; } // 방법1 circle필드를 setter를 이용하여 초기화 public void setCircle(Circle circle) { this.circle = circle; } public void setHeight(double height) { this.height = height; } public static void main(String[] args) { // 1. 원을 만든다. Circle 클래스를 이용하여 객체 생성하기 Circle c1 = new Circle(2.8); // 2. 실린더를 만든다 //생성자를 통해서 바로 초기화를 했다 // c1 = circle(2.8) Cylinder cylinder = new Cylinder(new Circle(2.8), 5.6); /* cylinder.setCircle(c1); //cylinder객체의 circle필드를 초기화 cylinder.setHeight(5.6); //cylinder객체의 height필드를 초기화 */ System.out.println(cylinder.circle + " / " + cylinder.height); // 3. 실린더의 부피를 구하는 메소드를 호출 System.out.println("원통의 부피는 " + cylinder.getVolume() + "이다."); } }
[ "KOITT@KOITT-PC14" ]
KOITT@KOITT-PC14
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); } } }
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; } }
9c5f93cd8415141f19233b07b192927cb913485c
b02be2a132fc40594f104d81333c49222175885d
/src/feture/offer/Offer05.java
39ad45e128d43bbe4091d61c604e3693ecd4db09
[]
no_license
xmzyjr/leetcode
2732a4627f555cc7129fa55842d836f5053b824f
4425439aa2f6ba3d561bfea1608cb5c999733abd
refs/heads/master
2021-06-10T21:15:07.451902
2021-05-30T05:12:57
2021-05-30T05:12:57
188,504,762
1
0
null
null
null
null
UTF-8
Java
false
false
486
java
package feture.offer; /** * @author lanshan */ public class Offer05 { public String replaceSpace(String s) { if (s == null || s.length() == 0) return s; char[] chars = s.toCharArray(); StringBuilder sb = new StringBuilder(); for (char aChar : chars) { if (aChar == ' ') { sb.append("%20"); } else { sb.append(aChar); } } return sb.toString(); } }
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; }
2e8672629c259ec99941405ea0382af90c3e3147
e25162d2811aa6a59bb70390506ed487627ffa52
/app/src/main/java/com/example/dslab/personal_bio/TabFragment3.java
cb158a096c02aa95732740693c4b6e46259d3940
[]
no_license
ParvatiBinjawadgi/Personal_Bio
e00e4a80002a20caf7acba656d3c6533a971b8e1
7b9d2060641603a78478f8d7064319aeb2b94351
refs/heads/master
2020-03-24T03:00:00.505363
2018-07-26T06:42:37
2018-07-26T06:42:37
142,399,890
0
0
null
null
null
null
UTF-8
Java
false
false
584
java
package com.example.dslab.personal_bio; import android.content.Context; import android.net.Uri; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; public class TabFragment3 extends Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.tab_fragment3, container, false); } }
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"; } }
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++; } }
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(); } } } }
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; } }
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); } }
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); }
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; }
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 ); } }
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) {} }
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:[email protected]">qianmoQ</a> */ @Configuration public class WikiftErrorConfig { @Autowired private WikiftServletContainerCustomizer wikiftServletContainerCustomizer; @Bean @Description(value = "wikift system error alert") public EmbeddedServletContainerCustomizer embeddedServletContainerCustomizer() { return wikiftServletContainerCustomizer; } }
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"); } }
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); } }
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; }
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; } }
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; } } }
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); } }
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(); }
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 } }
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); } }
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"; } }
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); } }
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); }
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); } }
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; } }
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(); } }
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; } }
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); } }); } }
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; } }
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; } }
59276e50d924d5e59c53ba1a9fff67f67569917f
aff799856280bf7629ae0bbe1c7abe8fbad1337e
/Client_Tanya/src/Client/Parser.java
fa162c6a9edd9d71c73e732f559971a09f6c214c
[]
no_license
OTS0/Lab7
3755cca37912f92a08a7d6f67935e14694f312d7
925c46d60cadc21e7d949bcba12f1ce0b22118d6
refs/heads/main
2023-06-05T07:43:15.803840
2021-06-30T14:32:55
2021-06-30T14:32:55
375,333,292
0
1
null
null
null
null
UTF-8
Java
false
false
13,742
java
package Client; import Exception.*; import FromTask.HumanBeing; import Server.Answer; import java.io.*; import java.util.LinkedList; import java.util.Scanner; /** * Класс Parcer для прочтения файла */ public class Parser { IdHandler idHandler; Command commandManager; LinkedList<HumanBeing> humanFromFile = new LinkedList<>(); public Parser(Command commandManager, IdHandler idHandler){ this.commandManager = commandManager; this.idHandler = idHandler; } /** * метод для получения значения поля из json файла * * @param json - строка из файла json * @param trim - поле, значение которого содержится в строке * @param quotes - есть ли кавычки (то есть значение поля не числовое) * @return преобразованную строку, содержащую лишь значение поля * @throws NullException - если значение поля равно пустой строке */ public String trimJson(String json, String trim, Boolean quotes) throws NullException { json = StringHandler.trimString(json, trim); if (StringHandler.equals(json, "")) { throw new NullException(""); } json = json.trim(); if (StringHandler.looseEquals(json.substring(json.length() - 1), ",")) { if (quotes) { json = json.substring(1, json.length() - 2); } else { json = json.substring(0, json.length() - 1); } } else if (quotes) { json = json.substring(1, json.length() - 1); } json = json.trim(); json = json.substring(1); json = json.trim(); json = json.substring(1); json = json.trim(); return json; } /** * Присваивание значения определенному полю элемента коллекции, найденному по id * Использую шаблон FactoryMethod * * @param str - строка, содержащая значение поля * @param type - название поля, которому хотим присвоить значение * @throws NullException - если str является пустой строкой * @throws IndexNotFoundException - если не существует элемента коллекции с таким id */ public void setNames(HumanBeing human, String str, String type) throws NullException, IndexNotFoundException { if (StringHandler.looseEquals(type, "name")) { human.setName(str); } else if (StringHandler.looseEquals(type, "soundtrackName")) { human.setSoundtrackName(str); } else if (StringHandler.looseEquals(type, "carName")) { human.setCarName(str); } } /** * определяем поля, имеющие числовое значение * Использую шаблон FactoryMethod * * @param str - строка, содержащая значение поля * @param type - название поля, которому хотим присвоить значение * @throws NullException - если str является пустой строкой * @throws IndexNotFoundException - если str нельзя преобразовать в число, если не найдем элемент с таким id * @throws SizeException - если значение str выходит за рамки допустимых значений поля */ public void setNumber(HumanBeing human, String str, String type) throws NullException, IndexNotFoundException, SizeException { if (StringHandler.looseEquals(type, "x")) { human.setCoordx(Integer.parseInt(str)); } else if (StringHandler.looseEquals(type, "y")) { human.setCoordy(Float.parseFloat(str)); } else if (StringHandler.looseEquals(type, "impactSpeed")) { int impactSpeed = Integer.parseInt(str); if (impactSpeed > 967) { throw new SizeException(967); } if (StringHandler.equals(str, "")) { throw new NullException("impactSpeed"); } human.setImpactSpeed(impactSpeed); } } /** * Определяем id элемента * Использую шаблон FactoryMethod * * @param str - строка, содержащая значение поля * @throws IndexNotFoundException - если не найдем элемент с таким id * @throws IdException - если значение id не является уникальным (т.к. чтение производится из файла) * @throws NumberFormatException - если значение str выходит за рамки допустимых значений поля */ public void setId(HumanBeing human, String str) throws NumberFormatException { int id = Integer.parseInt(str); human.setId(id); } /** * Определяем поля элемента, имеющие логическое значение * * @param str - строка, содержащая значение поля * @param type - имя поля, которому хотим присвоить значение * @throws TypeException - если str не может быть преобразована в тип, соответствующий полю */ public void setBoolean(HumanBeing human, String str, String type) throws TypeException { boolean var; if (StringHandler.looseEquals(str, "true")) { var = true; } else if (StringHandler.looseEquals(str, "false")) { var = false; } else { throw new TypeException(""); } if (StringHandler.looseEquals(type, "RealHero")) { human.setRealHero(var); } else if (StringHandler.looseEquals(type, "HasToothpick")) { human.setHasToothpick(var); } else if (StringHandler.looseEquals(type, "carCool")) { human.setCarCool(var); } } /** * Определяем значение поля weaponType * * @param str - строка, содержащая значение поля * @throws TypeException - если str не может быть преобразована в тип, соответствующий полю * @throws NullException - если str пустая */ public void setWeaponType(HumanBeing human, String str) throws NullException, TypeException { human.setWeaponType(commandManager.getWeapon(str)); } /** * Определяем значение поля mood * * @param str - строка, содержащая значение поля * @throws TypeException - если str не может быть преобразована в тип, соответствующий полю * @throws NullException - если str пустая */ public void setMoodType(HumanBeing human, String str) throws NullException, TypeException { human.setMood(commandManager.getMood(str)); } /** * Определяем, какому полю нужно присвоить значение (по str) и вызываем один из методов, делающих это * * @param str - строка, содержащая значение поля и его имя * @return уникальное значение id элемента * @throws TypeException - если str не может быть преобразована в тип, соответствующий полю * @throws NullException - если str пустая * @throws IndexNotFoundException - если не найдем элемент с таким id * @throws IdException - если значение id элемента не уникально * @throws TypeException - если значение поля в str не может быть преобразовано в нужный тип (для enum) * @throws SizeException - если значение поля в str выходит за рамки допустимого * @throws NumberFormatException - если значение поля в str не может быть преобразовано в число (если это нужно) */ public void setVar(HumanBeing human, String str, ObjectOutputStream out, ObjectInputStream in) throws NullException, IndexNotFoundException, IdException, TypeException, SizeException, NumberFormatException, IOException, ClassNotFoundException { if (StringHandler.equalsPart(str, "name")) { str = trimJson(str, "name", true); setNames(human, str, "name"); } else if (StringHandler.equalsPart(str, "soundtrackName")) { str = trimJson(str, "soundtrackName", true); setNames(human, str, "soundtrackName"); } else if (StringHandler.equalsPart(str, "carName")) { str = trimJson(str, "carName", true); setNames(human, str, "carName"); } else if (StringHandler.equalsPart(str, "x")) { str = trimJson(str, "x", false); setNumber(human, str, "x"); } else if (StringHandler.equalsPart(str, "y")) { str = trimJson(str, "y", false); setNumber(human, str, "y"); } else if (StringHandler.equalsPart(str, "impactSpeed")) { str = trimJson(str, "impactSpeed", false); setNumber(human, str, "impactSpeed"); } else if (StringHandler.equalsPart(str, "id")) { str = trimJson(str, "id", false); idHandler.checkId(humanFromFile, str, out, in); setId(human, str); } else if (StringHandler.equalsPart(str, "realHero")) { str = trimJson(str, "realHero", false); setBoolean(human, str, "realHero"); } else if (StringHandler.equalsPart(str, "HasToothpick")) { str = trimJson(str, "HasToothpick", false); setBoolean(human, str, "HasToothpick"); } else if (StringHandler.equalsPart(str, "carCool")) { str = trimJson(str, "carCool", false); setBoolean(human, str, "carCool"); } else if (StringHandler.equalsPart(str, "weaponType")) { str = trimJson(str, "weaponType", true); setWeaponType(human, str); } else if (StringHandler.equalsPart(str, "mood")) { str = trimJson(str, "mood", true); setMoodType(human, str); } } /** * Метод дл прочтения файла * * @param path * @return */ public boolean read(String path, ObjectInputStream in, ObjectOutputStream out) throws ClassNotFoundException, IOException{ String str; Boolean check = true; try { path = Command.findGoodFile(path, true); if (path == null) { throw new NullException(); } File file = new File(path); Scanner scanner = new Scanner(file); while (scanner.hasNextLine()) { str = scanner.nextLine(); if (str.contains("{")) { HumanBeing human = new HumanBeing(); str = "null"; while (!str.contains("}")) { str = scanner.nextLine(); str = str.trim(); processHuman(human, str, out, in); } humanFromFile.add(human); } } for (HumanBeing human: humanFromFile) { Request request = new Request(); request.setCommand("add"); request.setHuman(human); request.setId(human.getId()); out.writeObject(request); Answer answer = (Answer)in.readObject(); } scanner.close(); System.out.println("The file was read!"); } catch (NullException n) { System.out.println("You have chosen not to download the collection. Accept the consequences: the collection is empty."); }catch (IndexNotFoundException | IdException | TypeException | SizeException | NumberFormatException | FileNotFoundException e) { System.out.println("An error was found in the file."); read("", in, out); check = false; humanFromFile.clear(); } return check; } public void processHuman(HumanBeing human, String str, ObjectOutputStream out, ObjectInputStream in) throws IdException, SizeException, NullException, TypeException, IndexNotFoundException, IOException, ClassNotFoundException { if (!StringHandler.equals(str, "")) { str = str.trim(); str = str.substring(1); setVar(human, str, out, in); } } }
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); } }
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); } }
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); } }
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
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); } }
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); }
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); } }
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"); } }
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 <[email protected]> - 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; } }
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); } }
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); } }
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); } }
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); } }
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!")); } } }
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); } }
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$ } } }
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; } }
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; } }
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); } }
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; } }
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); } }
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(); } } }
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;
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(); } } } } }
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; } }
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; } }
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); } } }
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(); } }
bd1439181d333ff6a910acaa869fc918d447d409
498dd2daff74247c83a698135e4fe728de93585a
/clients/google-api-services-cloudidentity/v1beta1/2.0.0/com/google/api/services/cloudidentity/v1beta1/model/GoogleAppsCloudidentityDevicesV1WipeDeviceResponse.java
bea840a3c3a727b61ab159505fc388da5a6b45f9
[ "Apache-2.0" ]
permissive
googleapis/google-api-java-client-services
0e2d474988d9b692c2404d444c248ea57b1f453d
eb359dd2ad555431c5bc7deaeafca11af08eee43
refs/heads/main
2023-08-23T00:17:30.601626
2023-08-20T02:16:12
2023-08-20T02:16:12
147,399,159
545
390
Apache-2.0
2023-09-14T02:14:14
2018-09-04T19:11:33
null
UTF-8
Java
false
false
2,606
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. */ /* * This code was generated by https://github.com/googleapis/google-api-java-client-services/ * Modify at your own risk. */ package com.google.api.services.cloudidentity.v1beta1.model; /** * Response message for wiping all data on the device. * * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is * transmitted over HTTP when working with the Cloud Identity API. For a detailed explanation see: * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a> * </p> * * @author Google, Inc. */ @SuppressWarnings("javadoc") public final class GoogleAppsCloudidentityDevicesV1WipeDeviceResponse extends com.google.api.client.json.GenericJson { /** * Resultant Device object for the action. Note that asset tags will not be returned in the device * object. * The value may be {@code null}. */ @com.google.api.client.util.Key private GoogleAppsCloudidentityDevicesV1Device device; /** * Resultant Device object for the action. Note that asset tags will not be returned in the device * object. * @return value or {@code null} for none */ public GoogleAppsCloudidentityDevicesV1Device getDevice() { return device; } /** * Resultant Device object for the action. Note that asset tags will not be returned in the device * object. * @param device device or {@code null} for none */ public GoogleAppsCloudidentityDevicesV1WipeDeviceResponse setDevice(GoogleAppsCloudidentityDevicesV1Device device) { this.device = device; return this; } @Override public GoogleAppsCloudidentityDevicesV1WipeDeviceResponse set(String fieldName, Object value) { return (GoogleAppsCloudidentityDevicesV1WipeDeviceResponse) super.set(fieldName, value); } @Override public GoogleAppsCloudidentityDevicesV1WipeDeviceResponse clone() { return (GoogleAppsCloudidentityDevicesV1WipeDeviceResponse) super.clone(); } }
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(); }
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; } }
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+""; } }
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]); } }
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; } }
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()); } }
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); */
cf7cc74cd14125bd1c73166b6d3869f0fa42a8d2
97c20c8b8fb975d532c5211a64e7df7cc7f5254d
/RandomCipher.java
3a5cb6f1c684c6cbcd94ae47a4ce625ab6945d52
[]
no_license
jcurtis4207/substitution-cypher
d1b9fd0ba3ca48933c765f46dcada2935753a964
3024dae1bca901f7edac39526d59b9259742efda
refs/heads/master
2020-09-11T07:46:45.062236
2019-11-15T20:47:06
2019-11-15T20:47:06
221,993,478
0
0
null
null
null
null
UTF-8
Java
false
false
1,054
java
/* * This class creates RandomCipher objects * Each object gets a random substitution cipher, created by calling 'randomSort' on a sorted string of characters from a to z * RandomCipher objects can also call encrypt and decrypt from the parent Cipher class */ import java.util.Random; public class RandomCipher extends Cipher{ private String alphabet = "abcdefghijklmnopqrstuvwxyz"; private String substitutionKey; public RandomCipher() { //Creates a randomized version of alphabet string substitutionKey = randomSort(alphabet); } public String getKey(){ return substitutionKey; } public String randomSort(String input) { Random rand = new Random(); int size = input.length(); StringBuilder newList = new StringBuilder(input); for(int i = 0; i < 25; i++) { int randomNumber = rand.nextInt(size)+i; char temp = newList.charAt(i); newList.setCharAt(i,newList.charAt(randomNumber)); newList.setCharAt(randomNumber,temp); size--; } return newList.toString(); } }
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); } } } } }; }
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 + '\'' + '}'; } }
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; } }
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); } }
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 + '\'' + '}'; } }
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; } }