双11狂欢大促

盲盒赢 定制羽绒服

开启惊喜盲盒,抽取你的专属好礼

— 惊喜奖品抢先看 —

javax.mail 发送exe、doc类型的附件报错,请哪位老鸟帮个忙(100分)

houniao houniao 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
用javax.mail发送附件时,如果附件是exe或者doc类型的文件,就会发送不成功
在网上找了半天,都没发现相关的资料。

报错信息如下:
javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.MessagingException: 554 Message rejected for policy reasons.

at javax.mail.Transport.send0(Transport.java:219)
at javax.mail.Transport.send(Transport.java:81)

如果是其他类型的附件,就不会出现这个问题。
...全文
jsp探针 ver0.1 jsp探针ceshi.jsp JavaxSql = false; boolean supportJAF = false; boolean supportMail = false; boolean supportBeanUtils = false; boolean supportCommonLogging = false; boolean supportCommonCodec = false; boolean supportCommonCollection = false; boolean supportCommonDigester = false; boolean supportCommonLang = false; boolean supportJakartaRegExp = false; boolean supportLucene = false; boolean supportDom4j = false; boolean supportLoonframework = false; boolean supportMmMysqlDriver = false; boolean supportComMysqlDriver = false; boolean supportImageProcessing = false; boolean supportStruts = false; boolean supportSpring = false; String serverName; String serverIP="127.0.0.1"; long startTime = System.currentTimeMillis(); long startMemory = Runtime.getRuntime().freeMemory(); java.util.Properties prop = System.getProperties(); String javaVersion=prop.getProperty("java.version"); String FS=prop.getProperty("file.separator"); int CPUTIME = 30; int PERCENT = 100; public LfSpy() { try { Class.forName("org.springframework.context.ApplicationContext"); supportSpring = true; } catch (ClassNotFoundException ex) { } try { Class.forName("org.loon.framework.Loon"); supportLoonframework = true; } catch (ClassNotFoundException ex) { } try { Class.forName("org.hibernate.Transaction"); supportHibernate = true; } catch (ClassNotFoundException ex) { } try { Class.forName("org.apache.struts.action.ActionServlet"); supportStruts = true; } catch (ClassNotFoundException ex) { } try { Class.forName("javax.naming.Name"); supportJNDI = true; } catch (ClassNotFoundException ex) { } try { Class.forName("javax.sql.DataSource"); supportJavaxSql = true; } catch (ClassNotFoundException ex) { } try { Class.forName("javax.activation.DataSource"); supportJAF = true; } catch (ClassNotFoundException ex) { } try { Class.forName("javax.mail.Message"); supportMail = true; } catch (ClassNotFoundException ex) { } try { Class.forName("org.apache.commons.beanutils.MethodUtils"); supportBeanUtils = true; } catch (ClassNotFoundException ex) { } try { Class.forName("org.apache.commons.logging.LogFactory"); supportCommonLogging = true; } catch (ClassNotFoundException ex) { } try { Class.forName("org.apache.commons.codec.Decoder"); supportCommonCodec = true; } catch (ClassNotFoundException ex) { } try { Class.forName("org.apache.commons.collections.ArrayStack"); supportCommonCollection = true; } catch (ClassNotFoundException ex) { } try { Class.forName("org.apache.commons.digester.Digester"); supportCommonDigester = true; } catch (ClassNotFoundException ex) { } try { Class.forName("org.apache.commons.lang.SystemUtils"); supportCommonLang = true; } catch (ClassNotFoundException ex) { } try { Class.forName("org.apache.regexp.RE"); supportJakartaRegExp = true; } catch (ClassNotFoundException ex) { } try { Class.forName("org.apache.lucene.index.IndexWriter"); supportLucene = true; } catch (ClassNotFoundException ex) { } try { Class.forName("org.dom4j.Document"); supportDom4j = true; } catch (ClassNotFoundException ex) { } try { Class.forName("org.gjt.mm.mysql.Driver"); supportMmMysqlDriver = true; } catch (ClassNotFoundException ex) { } try { Class.forName("com.mysql.jdbc.Driver"); supportComMysqlDriver = true; } catch (ClassNotFoundException ex) { } loadAddress(); try { java.awt.image.BufferedImage bufferedImage = new java.awt.image.BufferedImage( 10, 10, java.awt.image.BufferedImage.TYPE_INT_RGB); java.awt.Graphics2D g = bufferedImage.createGraphics(); g.drawLine(0, 0, 10, 10); g.dispose(); supportImageProcessing = true; } catch (Throwable ex) { } } public String getOSarch(){ return prop.getProperty("os.arch"); } public String getTimeZone(){ return prop.getProperty("user.timezone"); } public String getNowUser(){ return prop.getProperty("user.name"); } public String getNowUserDir(){ return prop.getProperty("user.dir"); } public String getOSName(){ return prop.getProperty("os.name"); } public String getSystemModel(){ return prop.getProperty("sun.arch.data.model"); } final private long getDiskForLinuxInfo(final String dirPath) { try { String dir = dirPath.startsWith("/") ? dirPath : "/"+dirPath; long space = -1; Process process; Runtime run = Runtime.getRuntime(); String osName = System.getProperty("os.name").toLowerCase(); String command = ""; if (osName.startsWith("linux")) { command = "df -k " + dir; } process = run.exec(command); java.io.BufferedReader in = new java.io.BufferedReader(new java.io.InputStreamReader( process.getInputStream())); String freeSpace = "", line; while ((line = in.readLine()) != null) { if (line.length() > 0) { freeSpace = line; } } if (freeSpace == null || freeSpace.length() == 0) { return -1; } process.destroy(); freeSpace = freeSpace.trim().replaceAll("\\\\", "\\/"); String[] results = freeSpace.split(" "); for (int i = results.length - 1; i > 0; i--) { try { space = Long.parseLong(results[i]); return space; } catch (NumberFormatException ex) { continue; } } } catch (java.io.IOException e) { return -1; } return -1; } /** * 获得windows下指定地址硬盘空间大小 * * @param dirPath * @return */ final private long getDiskForWindowsInfo(String dirPath) { try { long space = -1; Process process; Runtime run = Runtime.getRuntime(); String osName = System.getProperty("os.name").toLowerCase(); String command = ""; if (osName.startsWith("windows") && osName.indexOf("98") == -1) { command = "cmd.exe /c dir " + dirPath; } else if (osName.startsWith("windows") && osName.indexOf("98") != -1) { command = "command.com /c dir " + dirPath; } process = run.exec(command); java.io.BufferedReader in = new java.io.BufferedReader(new java.io.InputStreamReader( process.getInputStream())); String freeSpace = "", line; while ((line = in.readLine()) != null) { freeSpace = line; } if (freeSpace == null) { return -1; } process.destroy(); freeSpace = freeSpace.trim(); freeSpace = freeSpace.replaceAll("\\\\\\\\\\\\\\\\.", ""); freeSpace = freeSpace.replaceAll(",", ""); String[] results = freeSpace.split(" "); for (int i = 1; i java.io.IOException e) { return -1; } } public long getObjectDisk() { String path = prop.getProperty("user.dir"); int index = path.indexOf(FS); path = path.substring(0, index); String osName = System.getProperty("os.name").toLowerCase(); if (osName.startsWith("windows")) { return getDiskForWindowsInfo(path); } else if (osName.startsWith("linux")) { return getDiskForLinuxInfo(path); } else { return -1; } } public final String getMacAddress() { String os = System.getProperty("os.name"); try { if(os.startsWith("Windows")) { return windowsParseMacAddress(windowsRunIpConfigCommand()); } else if(os.startsWith("Linux")) { return linuxParseMacAddress(linuxRunIfConfigCommand()); } else { throw new java.io.IOException("unknown operating system: " + os); } } catch(Exception ex) { return "Nothing"; } } private final String linuxParseMacAddress(String ipConfigResponse) throws java.text.ParseException { String localHost = null; try { localHost = java.net.InetAddress.getLocalHost().getHostAddress(); } catch(java.net.UnknownHostException ex) { ex.printStackTrace(); throw new java.text.ParseException(ex.getMessage(), 0); } java.util.StringTokenizer tokenizer = new java.util.StringTokenizer(ipConfigResponse, "\n"); String lastMacAddress = null; while(tokenizer.hasMoreTokens()) { String line = tokenizer.nextToken().trim(); boolean containsLocalHost = line.indexOf(localHost) >= 0; if(containsLocalHost && lastMacAddress != null) { return lastMacAddress; } int macAddressPosition = line.indexOf("HWaddr"); if(macAddressPosition java.text.ParseException ex = new java.text.ParseException ("cannot read MAC address for " + localHost + " from [" + ipConfigResponse + "]", 0); ex.printStackTrace(); throw ex; } private final boolean linuxIsMacAddress(String macAddressCandidate) { if(macAddressCandidate.length() != 17) return false; return true; } private final String linuxRunIfConfigCommand() throws java.io.IOException { Process p = Runtime.getRuntime().exec("ifconfig"); java.io.InputStream stdoutStream = new java.io.BufferedInputStream(p.getInputStream()); StringBuffer buffer= new StringBuffer(); for (;;) { int c = stdoutStream.read(); if (c == -1) break; buffer.append((char)c); } String outputText = buffer.toString(); stdoutStream.close(); return outputText; } private final String windowsParseMacAddress(String ipConfigResponse) throws java.text.ParseException { String localHost = null; try { localHost = java.net.InetAddress.getLocalHost().getHostAddress(); } catch(java.net.UnknownHostException ex) { ex.printStackTrace(); throw new java.text.ParseException(ex.getMessage(), 0); } java.util.StringTokenizer tokenizer = new java.util.StringTokenizer(ipConfigResponse, "\n"); String lastMacAddress = null; while(tokenizer.hasMoreTokens()) { String line = tokenizer.nextToken().trim(); if(line.endsWith(localHost) && lastMacAddress != null) { return lastMacAddress; } int macAddressPosition = line.indexOf(":"); if(macAddressPosition java.text.ParseException ex = new java.text.ParseException("cannot read MAC address from [" + ipConfigResponse + "]", 0); ex.printStackTrace(); throw ex; } private final boolean windowsIsMacAddress(String macAddressCandidate) { if(macAddressCandidate.length() != 17) return false; return true; } private final String windowsRunIpConfigCommand() throws java.io.IOException { Process p = Runtime.getRuntime().exec("ipconfig /all"); java.io.InputStream in = new java.io.BufferedInputStream(p.getInputStream()); StringBuffer buffer= new StringBuffer(); for (;;) { int c = in.read(); if (c == -1) break; buffer.append((char)c); } String outputText = buffer.toString(); in.close(); return outputText; } public double getCpuRatio(){ double cpuRatio = 0; if (getOSName().toLowerCase().startsWith("windows")) { cpuRatio = getCpuRatioForWindows(); } else if (getOSName().toLowerCase().startsWith("linux")) { cpuRatio = getCpuRatioForLinux(); } return cpuRatio; } private double getCpuRatioForWindows() { try { String procCmd = System.getenv("windir") + "\\system32\\wbem\\wmic.exe process get Caption,CommandLine," + "KernelModeTime,ReadOperationCount,ThreadCount,UserModeTime,WriteOperationCount"; long[] c0 = readCpu(Runtime.getRuntime().exec(procCmd)); Thread.sleep(CPUTIME); long[] c1 = readCpu(Runtime.getRuntime().exec(procCmd)); if (c0 != null && c1 != null) { long idletime = c1[0] - c0[0]; long busytime = c1[1] - c0[1]; return Double.valueOf( PERCENT * (busytime) / (busytime + idletime)) .doubleValue(); } else { return 0.0; } } catch (Exception ex) { ex.printStackTrace(); return 0.0; } } final private double getCpuRatioForLinux() { try { java.io.File file = new java.io.File("/proc/stat"); java.io.BufferedReader br = new java.io.BufferedReader(new java.io.InputStreamReader( new java.io.FileInputStream(file))); java.util.StringTokenizer token = new java.util.StringTokenizer(br.readLine()); token.nextToken(); int user = Integer.parseInt(token.nextToken()); int nice = Integer.parseInt(token.nextToken()); int system = Integer.parseInt(token.nextToken()); int idle = Integer.parseInt(token.nextToken()); Thread.sleep(1000); br = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream( file))); token = new java.util.StringTokenizer(br.readLine()); token.nextToken(); int user2 = Integer.parseInt(token.nextToken()); int nice2 = Integer.parseInt(token.nextToken()); int sys2 = Integer.parseInt(token.nextToken()); int idle2 = Integer.parseInt(token.nextToken()); return (double) ((user2 + sys2 + nice2) - (user + system + nice)) / (float) ((user2 + nice2 + sys2 + idle2) - (user + nice + system + idle)); } catch (Exception ex) { return (double) 0.0; } } final String substring(String src, int startidx, int endidx) { byte[] b = src.getBytes(); StringBuffer sbr = new StringBuffer(); for (int i = startidx; i java.io.InputStreamReader ir = new java.io.InputStreamReader(proc.getInputStream()); java.io.LineNumberReader input = new java.io.LineNumberReader(ir); String line = input.readLine(); if (line == null || line.length() exe") >= 0) { continue; } if (caption.equals("System Idle Process") || caption.equals("System")) { idletime += Long.valueOf( substring(line, kmtidx, rocidx - 1).trim()) .longValue(); idletime += Long.valueOf( substring(line, umtidx, wocidx - 1).trim()) .longValue(); continue; } kneltime += Long.valueOf( substring(line, kmtidx, rocidx - 1).trim()).longValue(); usertime += Long.valueOf( substring(line, umtidx, wocidx - 1).trim()).longValue(); } retn[0] = idletime; retn[1] = kneltime + usertime; return retn; } catch (Exception ex) { ex.printStackTrace(); } finally { try { proc.getInputStream().close(); } catch (Exception e) { e.printStackTrace(); } } return null; } public long getStartTime(){ return startTime; } public long getStartMemory(){ return startMemory; } public boolean isSun() { return System.getProperty("java.vm.vendor").indexOf("Sun") != -1; } public String getJavaVersion() { return javaVersion; } public void loadAddress() { try { java.net.InetAddress address = java.net.InetAddress .getLocalHost(); java.net.InetAddress[] all = java.net.InetAddress.getAllByName(address.getHostName()); for (int i = 0; i java.net.UnknownHostException e) { } } /** * 获得所在服务器名称 */ public String getServerName() { return serverName; } public String getServerIP() { return serverIP; } public boolean isSupportSpring(){ return supportSpring; } public boolean isSupportLoonframework(){ return supportLoonframework; } public boolean isSupportStruts() { return supportStruts; } public boolean isSupportJAF() { return supportJAF; } public boolean isSupportJavaxSql() { return supportJavaxSql; } public boolean isSupportHibernate(){ return supportHibernate; } public boolean isSupportJNDI() { return supportJNDI; } public boolean isSupportMail() { return supportMail; } public boolean isSupportBeanUtils() { return supportBeanUtils; } public boolean isSupportCommonLogging() { return supportCommonLogging; } public boolean isSupportCommonCodec() { return supportCommonCodec; } public boolean isSupportCommonCollection() { return supportCommonCollection; } public boolean isSupportCommonDigester() { return supportCommonDigester; } public boolean isSupportCommonLang() { return supportCommonLang; } public boolean isSupportJakartaRegExp() { return supportJakartaRegExp; } public boolean isSupportLucene() { return supportLucene; } public boolean isSupportDom4j() { return supportDom4j; } public boolean isSupportMmMysqlDriver() { return supportMmMysqlDriver; } public boolean isSupportComMysqlDriver() { return supportComMysqlDriver; } public boolean isSupportImageProcessing() { return supportImageProcessing; } public String getDoubleOperation(){ long begin = System.currentTimeMillis(); int flag = 0; double random = (double)new java.util.Random().nextInt( 1000 ); while( flag 100000 ){ random = Math.sqrt( random ); flag++; } long end = System.currentTimeMillis(); long result = end - begin; return String.valueOf(result); } public String getNumberOperation() { long begin = startTime; int flag = 0; while (flag 1000000) { flag++; } long end = System.currentTimeMillis(); long result = end - begin; return String.valueOf(result); } } LfSpy spyLib = new LfSpy(); %> DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> lf-jsp探针 Ver 0.1.0 100%" height="45" border="0" cellpadding="0" class="InnerHead"> LF-Spy Java服务器探针 Ver 0.1.0 服务器连接速度: 100% cellspacing=1 cellpadding=0 class="InnerTable"> 接入设备 连接速度(理论值) 下载速度(理论值) 56k Modem 56 Kbps 7.0 k/s 64k ISDN 64 Kbps 8.0 k/s 512k ADSL 512 Kbps 64.0 k/s 1.5M Cable 1500 Kbps 187.5 k/s 5M FTTP 5000 Kbps 625.0 k/s 当前连接速度 JavaScript'>var tSpeedStart=new Date();" ); sbuffer.append("JavaScript'>var tSpeedEnd=new Date();\n" ); sbuffer.append("JavaScript'>" ); sbuffer.append("var iSpeedTime = 0; iSpeedTime = ( tSpeedEnd - tSpeedStart ) / 1000;" ); sbuffer.append("if( iSpeedTime > 0 ) iKbps = Math.round( Math.round( 100 * 8 / iSpeedTime * 10.5 ) / 10 ); else iKbps = 10000 ;" ); sbuffer.append("var iShowPer = Math.round( iKbps / 100 );" ); sbuffer.append("if( iShowPer 82 ) iShowPer = 82;" ); sbuffer.append("\n" ); sbuffer.append("JavaScript'>" ); sbuffer.append("document.write('' + iKbps + ' Kbps');" ); sbuffer.append("\n" ); sbuffer.append(" " ); sbuffer.append("JavaScript'>" ); sbuffer.append("document.write(Math.round(iKbps/8*10)/10+'k/s');"); sbuffer.append("\n") ; sbuffer.append(""); out.println(sbuffer.toString()); }else{ %>   开始测试 服务器相关数据: 100% cellspacing=1 cellpadding=0 class="InnerTable"> 服务器相关 数值信息 服务器名    服务器软件名    服务器IP    服务器操作系统    服务器系统模式    服务器MAC地址    操作系统类型    操作系统CPU占用率    JRE版本  JavaVersion()%>  JVM是否为Sun提供    服务器当前时间  java.util.Date()%>  服务器时区设置    服务器当前用户    服务器当前用户所在硬盘剩余空间    服务器当前用户目录    服务器当前页面物理路径    当前服务端口    截获的浏览器参数一览: 100% cellspacing=1 cellpadding=0 class="InnerTable"> 属性 数值  http-protocol     http-method     remote-host     remote-ip     remote-user     remote-port     content-type    java.util.Enumeration enums=request.getHeaderNames(); StringBuffer headBuffer=new StringBuffer(); String name=""; Object value=""; while(enums.hasMoreElements()){ name=(String)enums.nextElement(); value=(String)request.getHeader(name); headBuffer.append(""); headBuffer.append(" "+name+""); headBuffer.append(" "+value+""); headBuffer.append(""); } out.println(headBuffer.toString()); %> 部分CGI(Common Gateway Interface)参数: 100% cellspacing=1 cellpadding=0 class="InnerTable"> 属性 数值  SERVER_NAME (服务名)    PATH_TRANSLATED (服务器实际路径信息)    SERVER_SOFTWARE (服务器软件名)    PATH_INFO (附加路径信息)    DOCUMENT_ROOT (站点的物理路径)    CONTEXT_PATH (站点的根路径)   通过请求(Request)获得的参数: 100% cellspacing=1 cellpadding=0 class="InnerTable"> 属性 数值  getAuthType    getCharacterEncoding    getContentLength    getContentType    getContextPath    getLocale    getLocales    getMethod    getPathInfo    getPathTranslated    getProtocol    getReader    getRealPath    getRemoteAddr    getRemoteHost    getRemoteUser    getRequestDispatcher    getRequestURI    getRequestURL    getServerName    getServerPort    getServletPath    getUserPrincipal   通过应答(Response)返回的参数: 100% cellspacing=1 cellpadding=0 class="InnerTable"> 属性 数值  getBufferSize    getCharacterEncoding    getContentType    getLocale   通过会话(Session)获得的参数: 100% cellspacing=1 cellpadding=0 class="InnerTable"> 属性 数值 "); headBuffer.append(" "+name+""); headBuffer.append(" "+session.getAttribute(name)+""); headBuffer.append(""); } out.println(headBuffer.toString()); %> 通过服务器应用(Application)获得的参数: 100%" cellspacing=1 cellpadding=0 class="InnerTable"> 属性 数值 java.util.StringTokenizer token=new java.util.StringTokenizer(temp,";"); StringBuffer buffer=new StringBuffer(token.countTokens()); while(token.hasMoreElements()){ buffer.append(token.nextElement()); buffer.append(";\n"); } value=buffer.toString(); } } headBuffer.append(""); headBuffer.append(" "+name+" "); headBuffer.append(" "+value+" "); headBuffer.append(""); } out.println(headBuffer.toString()); %> 通过小甜饼(Cookies)获得的参数: 100% cellspacing=1 cellpadding=0 class="InnerTable"> 属性 数值     服务器效率测试: 100% cellspacing=1 cellpadding=0 class="InnerTable"> 让服务器执行100万次整数运算和10万次开方,记录所用的时间。 整数运算 浮点运算  javascript:location.reload()" value="测试当前服务器"/>     服务器所有可用参数一览: 100% cellspacing=1 cellpadding=0 class="InnerTable"> 服务器相关 数值信息 java.util.Properties props=System.getProperties(); java.util.Iterator iter=props.keySet().iterator(); while(iter.hasNext()) { name=(String)iter.next(); value=props.get(name); if(value instanceof String){ String temp=(String)value; boolean isA=temp.indexOf(";")!=-1; boolean isB=temp.indexOf(",")!=-1; if(isA||isB){ java.util.StringTokenizer token=new java.util.StringTokenizer(temp.replace(" ",""),isA?";":","); StringBuffer buffer=new StringBuffer(token.countTokens()); while(token.hasMoreElements()){ buffer.append(" "+token.nextElement()); buffer.append(isA?";"+"\n":","+"\n"); } value=buffer.toString(); } }else{ value=" "+value; } headBuffer.append(""); headBuffer.append(""+name+" "); headBuffer.append(""+value+" "); headBuffer.append(""); } out.println(headBuffer.toString()); %> 针对部分类库的服务器加载验证 100% cellspacing=1 cellpadding=0 class="InnerTable"> 属性 数值  是否支持 JNDI    是否支持 Loonframework    是否支持 JavaxSql  JavaxSql()%>  是否支持 JAF    是否支持 Mail  Mail()%>  是否支持 BeanUtils    是否支持 CommonLogging    是否支持 CommonCodec    是否支持 CommonCollection    是否支持 CommonDigester    是否支持 CommonLang    是否支持 JakartaRegExp    是否支持 Struts    是否支持 Lucene    是否支持 Dom4j    是否支持 MysqlDriver(Mm)    是否支持 MysqlDriver(Com)    是否支持 ImageProcessing    是否支持 Hibernate    是否支持 Spring   资源消费一览 100% cellspacing=1 cellpadding=0 class="InnerTable"> 属性 数值 java.util.Date date = new java.util.Date(spyLib.getStartTime()); java.text.SimpleDateFormat df = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String starttime = df.format(date); date = new java.util.Date(endTime); df = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String endtime = df.format(date); %>  最大内存容量    应用结束时剩余自由内存    应用结束时减少自由内存    应用开始时间    应用结束时间    应用耗时(毫秒)   © 立即下载

相关推荐

2021-2022计算机二级等级考试试题及答案No.11150.docx

2021-2022计算机二级等级考试试题及答案No.11150.docx

爱我丶就要付出代价

企业数字化转型AI大模型赋能智能体平台及AI场景应用规划方案(生态合作版).pptx

企业数字化转型AI大模型赋能智能体平台及AI场景应用规划方案(生态合作版).pptx

公众号:优享智库

MCGS的Http协议驱动,支持http协议

硬件配置 参数设置 设备属性 设备命令 通讯状态 附录 #HTTP 1、 设备简介 驱动类型 该驱动为独立设备,直接添加构件即可,不需要挂载到父设备下 通讯协议 采用标准HTTP1.1协议 通讯方式 驱动构件为客户端。 2、 硬件连接 本软件在通讯之前,请保证通讯连接正确。通讯连接方式:采用标准的RJ45接口的以太网接线(对调网线或使用HUB交换)。 3、 设备通讯参数 本设备为独立设备,无父设备参数 4、 设备构件参数设置 “HTTP设备”参数设置如下: <1> 内部属性: 构建url信息。 <2> 最小采集周期:本软件对设备进行操作的时间周期,单位为ms,默认为100ms。 <3> 通讯等待时间:通讯数据接收等待时间,默认设置为200ms,当采集速度要求较高或数据量较大时,设置值可适当减小或增大。 <4> HttpHead:http head添加需要的字段,不需要添加http head时值为空,默认不添加。 5、 设备命令 本设备构件提供设备命令,用于进行相应的操作,设备命令的格式如下: 设备命令 命令介绍 GetHttpHead 格式1 GetHttpHead(headStr) 用途 获取http head参数 参数 headStr 参数可以为字符型变量、字符串常量 例1 !SetDevice(设备0,6,"GetHttpHead(headStr)") 获取http head数据保存到headStr中 SetHttpHead 格式1 SetHttpHead(headStr) 用途 设置http head参数 参数 headStr 参数可以为字符型变量、字符串常量

weixin_37963577

印尼稻米收成与粮食安全数据集2026年

本数据集收录印度尼西亚2026年水稻收成与粮食安全遥测数据,包含10000条稻米农业收成产量与粮食安全监测记录,围绕印尼国家粮食安全体系中的核心作物水稻展开。稻米是印尼逾两亿人口的主粮,其收成波动直接影响国家粮食安全与进口政策,本数据集将种植区域、收成产量、气候与土壤相关遥测指标整合为结构化表格,可支撑粮食产量预测、收成影响因素分析、区域粮食安全评估与农业政策模拟等研究任务。典型应用场景包括:农业时间序列产量预测模型构建、气候因子与水稻收成的关联分析、省份与地区层面的粮食自给率测算、粮食安全风险预警指标设计,也可作为农业经济、粮食政策与数据科学交叉课程的教学素材。数据为2026年最新版,规模约1.2MB、单CSV结构规整,字段命名清晰,适合Python、Pandas、Scikit-learn等主流工具链直接使用,便于开展探索性分析、可视化与机器学习全流程练习。重要说明:本数据为遥测整理数据,分析结论以数据集文档口径为准,农业决策请结合官方统计综合研判。许可:CC0公有领域,可自由使用与二次分发。

licy__

智慧环保生态保护行业可信数据空间应用规划方案(技术方案版).pptx

智慧环保生态保护行业可信数据空间应用规划方案(技术方案版).pptx

公众号:优享智库
评论 6
收藏 已收藏
分享
返回顶部
houniao
Java EE 67,535 成员 225,843 内容