matlab分段函数编程中运行了一个函数文件出现了Unable to read file image2data.fig: No such

Email Spam Filter:
libstdc++.so.5: cannot open shared object file: No such file or directory
Problem: An application is running on Linux 7.x which uses gcc 3.2.x. It gets one of the following error messages:
libstdc++.so.5: cannot open shared object file: No such file or directory
libgcc_s.so.1: cannot open shared object file: No such file or directory
Explanation:
libstdc++.so.5 (the library for gcc 3.2.x) is installed in /usr/local/lib
However, the system will only seach /usr/lib (where the 2.95.0 and other older libraries are stored).
Create symbolic links to make the libraries appear in the old folder:
ln -s /usr/local/lib/libstdc++.so.5 /usr/lib/libstdc++.so.5
ln -s /usr/local/lib/libgcc_s.so.1 /usr/lib/libgcc_s.so.1Struts 2 file upload example
Struts 2 file upload example
| June 29, 2010 | Updated : August 29, 2012 | Viewed : 147,327 | +334 pv/w
Download It –
In Struts 2, the &s:file& tag is used to create a HTML file upload component to allow users select file from their local disk and upload it to the server. In this tutorial, you will create a JSP page with file upload component, set the maximum size and allow content type of the upload file, and display the uploaded file details.
1. Action class
Action class for the file upload, declare a “File” variable to store the user uploaded file, two String variables to store the file name and content type. The “fileUpload interceptor” will auto inject the uploaded file detail via set”X”ContentType() and set”X”FileName(), make sure the method name is spell correctly.
P.S X is the variable to store the uploaded file.
The file upload function is depends on the “fileUpload Interceptor“, make sure it is included in the Action’s stack. The lucky is, the default stack is already includes the
“fileUpload Interceptor“.
FileUploadAction.java
package com.mkyong.common.
import java.io.F
import com.opensymphony.xwork2.ActionS
public class FileUploadAction extends ActionSupport{
private File fileU
private String fileUploadContentT
private String fileUploadFileN
public String getFileUploadContentType() {
return fileUploadContentT
public void setFileUploadContentType(String fileUploadContentType) {
this.fileUploadContentType = fileUploadContentT
public String getFileUploadFileName() {
return fileUploadFileN
public void setFileUploadFileName(String fileUploadFileName) {
this.fileUploadFileName = fileUploadFileN
public File getFileUpload() {
return fileU
public void setFileUpload(File fileUpload) {
this.fileUpload = fileU
public String execute() throws Exception{
return SUCCESS;
public String display() {
return NONE;
2. Result Page
Use &s:file& tag to render a file upload component, and set the form enctype type to “multipart/form-data”.
fileupload.jsp
&%@ taglib prefix="s" uri="/struts-tags" %&
&s:head /&
&h1&Struts 2 &s:file& file upload example&/h1&
&s:form action="resultAction" namespace="/"
method="POST" enctype="multipart/form-data"&
&s:file name="fileUpload" label="Select a File to upload" size="40" /&
&s:submit value="submit" name="submit" /&
result.jsp
&%@ taglib prefix="s" uri="/struts-tags" %&
&h1&Struts 2 &s:file& file upload example&/h1&
&script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&&/script&
&ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-1347"
data-ad-slot=""
data-ad-format="auto"
data-ad-region="mkyongregion"&&/ins&
(adsbygoogle = window.adsbygoogle || []).push({});
&/script&&h2&
File Name : &s:property value="fileUploadFileName"/&
Content Type : &s:property value="fileUploadContentType"/&
File : &s:property value="fileUpload"/&
3. struts.xml
Link it all ~
&?xml version="1.0" encoding="UTF-8" ?&
&!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd"&
&constant name="struts.devMode" value="true" /&
&constant name="struts.custom.i18n.resources" value="global" /&
&package name="default" namespace="/" extends="struts-default"&
&action name="fileUploadAction"
class="com.mkyong.common.action.FileUploadAction" method="display"&
&result name="none"&pages/fileupload.jsp&/result&
&action name="resultAction" class="com.mkyong.common.action.FileUploadAction"&
&interceptor-ref name="exception"/&
&interceptor-ref name="i18n"/&
&interceptor-ref name="fileUpload"&
&param name="allowedTypes"&text/plain&/param&
&param name="maximumSize"&10240&/param&
&/interceptor-ref&
&interceptor-ref name="params"&
&param name="excludeParams"&dojo\..*,^struts\..*&/param&
&/interceptor-ref&
&interceptor-ref name="validation"&
&param name="excludeMethods"&input,back,cancel,browse&/param&
&/interceptor-ref&
&interceptor-ref name="workflow"&
&param name="excludeMethods"&input,back,cancel,browse&/param&
&/interceptor-ref&
&result name="success"&pages/result.jsp&/result&
&result name="input"&pages/fileupload.jsp&/result&
&/package&
File Size Limits
In this example, you set the upload file size limit via “fileUpload interceptor“, this value is count in bytes. In this case, the maximum size of the upload file is 10kb.
The default maximum file size of the upload file is 2MB
File Types
You can set the allow file type via “fileUpload interceptor” as well. In this case, the upload file only accept the “text/plain” content type.
In Struts 2, there are may ways to lead same Rome, make sure you check this .
http://localhost:8080/Struts2Example/fileUploadAction.action
Error message is prompt if you upload a file which is more than 10kb, or not a text file.
Upload a text file named “XWORK-LICENSE.txt”, file size : 5kb.
The uploaded file will be treat as a temporary file, with a long random file name, upload_____0.tmp. Make sure you copy this temp file to somewhere else. Read
to copy files easily.
About the Author
Sort by: &
| most voted
Partners & Bookmarks
About Mkyong.com
Mkyong.com is for Java and J2EE developers, all examples are simple and easy to understand, and well tested in my development environment.
Mkyong.com is created, written by, and maintained by Yong Mook Kim, aka Mkyong.
It is built on , hosted by ,
and the caches are served by CloudFlare CDN.opencv 无法打开包括文件:“opencv2/core/core_c.h”: No such file or directory_百度知道
opencv 无法打开包括文件:“opencv2/core/core_c.h”: No such file or directory
弄了好久了
就是弄不好
我有更好的答案
你的include路径配置错了,是build文件夹里面的include
然后就出现了这个问题。。。。
函数要加 #include&windows.h&或#include&stdlib.h&头文件就可以了
应该是system,首字母别大写
你的库没有导入进去,一般是包含目录:..opencv\include\opencv2;..opencv\include\..opencv\include\;..opencv\build\include\opencv2;..opencv\build\include\..opencv\build\include\;库目录:是bin
2条折叠回答
为您推荐:
其他类似问题
文件 opencv opencv2/core/core的相关知识
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。}

我要回帖

更多关于 matlab分段函数编程 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信