python-opencv中imshow总报错的问题 5C

我用的是visual studio2017,自带安装的Anaconda2,pip安装的opencv-python,在我调用imshow函数的时候总是报错
cv2.error
Message=C:\projects\opencv-python\opencv\modules\highgui\src\window.cpp:331: error: (-215) size.width>0 && size.height>0 in function cv::imshow

StackTrace:
中的 C:\Users\Administrator\source\repos\PythonApplication1\PythonApplication1\PythonApplication1.py:4
图片说明
图片说明
求大佬帮忙解答下

0

4个回答

看一下你的图片格式,把后缀去掉试试

0
weixin_41038390
半限人 没用
一年多之前 回复

应该是图片加载时的问题,你先将imread的地址改为D:/input/1.jpg(我先默认是jpg格式,不对的话你自己改一下)

0
weixin_41038390
半限人 还是不对
一年多之前 回复

1这个文件存在吗?是文件夹还是文件,这里应该是一个图片文件

0
weixin_41038390
半限人 是图片
一年多之前 回复

已解决,改为双斜杆即可'D:\1\1.jpg'

0
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
python-opencv里面图片无法imshow的处理
def thresholding(img): x_thresh = utils.abs_sobel_thresh(img, orient='x', thresh_min=180 ,thresh_max=255) mag_thresh = utils.mag_thresh(img, sobel_kernel=3, mag_thresh=(50, 100)) dir_...
matlab中imshow的两个问题
这两天做数字图像处理的作业,用matlab写几个程序,过程中遇到了几个诡异的bug,幸亏解决了,写出来和大家交流一下下。 1, 突然出现的报错行数指向imshow函数。按道理这种自带的函数是不应该有错的,但matlab有时就是这么诡异,谁知道呢~这时候可不要为了这个坏了我们的心情。直接把imshow函数surround with {try catch end}中,程序便能照常运行了。 ...
OpenCV中imshow()出错问题
这是网上比较通用的一个opencv配置是否成功的测试代码,自己配置了一下opencv2.4.8,然后用下面的程序测试了一下,老是出错,设置断点,在imshow处老是报错。纠结了一下午没有解决。。。。。网上各种能找到的方法都试过了 #include   #include   #include      using namespace cv;        int main()
matlab中imshow()出错问题
可能有不少人和我一样,使用matlab写imshow()一张图片,却总是出错。 也许是这种错误: images.internal.initSize(hh,initial_mag/100,is_border_tight) 之前一直找不出什么原因,去看各种帖,才发现原来我不知道什么时候重写了imshow.m,所以我找到了这一行,看到果然,前面多了个clc,于是删除掉clc,保存,就可以解决问题了。
MATLAB中imshow()显示问题
MATLAB中imread(img),读取保存的数据是unit8类型的,如果需要运算,最好转换成double型,直接im2double(img)就可以,然后这样处理的数据全是[0,1]之间的。当然imshow(img),img不管是double型还是unit8 型都可以显示。imshow(I,[]); ----------- 自动调整数据的范围以便于显示 imshow(I,[low hi
python-opencv
各位大神,请问python-opencv中如何画一个虚线的椭圆啊,我就是先找的物体的轮廓,然后基于轮廓画椭圆,这个椭圆如何画为虚线的,这个如何实现啊
总报错
这是源码:rnusing System;rnusing System.Collections;rnusing System.Configuration;rnusing System.Data;rnusing System.Linq;rnusing System.Web;rnusing System.Web.Security;rnusing System.Web.UI;rnusing System.Web.UI.HtmlControls;rnusing System.Web.UI.WebControls;rnusing System.Web.UI.WebControls.WebParts;rnusing System.Xml.Linq;rnusing System.Data.SqlClient;rnnamespace OpencloseDBrnrnrnrnrn public partial class kaiqi :System.Web.UI.Pagern rn protected void Button1_Click(object sender, EventArgs e)rn rn if (DropDownList1.SelectedValue.ToString() == "")rn rn Response.Write(" ");rn rn elsern //更新语句rn string sql = string.Format("update TbCollector set gprst= 1 where CollectNo=0,DropDownList.SelectedValue.ToString()");rn int result = 0;rn tryrn rn SqlCommand command = new SqlCommand(sql, DBhelper.connection);rn DBhelper.connection.open();rn result = command.ExecuteNonquery();rn rn catch (Exception ex)rn rn rn finallyrn rn DBhelper.connection.close();rn rn if (result < 1)rn rn Response.Write(" ");rn rn elsern rn Response.Write(" ");rn rn rnrn rn protected void Button2_Click(object sender, EventArgs e)rn rn if (DropDownList1.SelectedValue.ToString() == "")rn rn Response.Write(" ");rn rn elsern //更新语句rn string sql = string.Format("update TbCollector set gprst= 0 where CollectNo=0,DropDownList.SelectedValue.ToString()");rn int result = 0;rn tryrn rn SqlCommand command = new SqlCommand(sql, DBhelper.connection);rn DBhelper.connection.open();rn result = command.ExecuteNonquery();rn rn catch (Exception ex)rn rn rn finallyrn rn DBhelper.connection.close();rn rn if (result < 1)rn rn Response.Write(" ");rn rn elsern rn Response.Write(" ");rn rn rnrn rn rnrnrn错误提示:rn错误 2 “ASP.kaiqi_aspx.GetTypeHashCode()”: 没有找到适合的方法来重写 c:\Users\xj\AppData\Local\Temp\Temporary ASP.NET Files\website2\2a8bc898\841d5049\App_Web_oi4odi5p.2.cs 481 rn错误 3 “ASP.kaiqi_aspx.ProcessRequest(System.Web.HttpContext)”: 没有找到适合的方法来重写 c:\Users\xj\AppData\Local\Temp\Temporary ASP.NET Files\website2\2a8bc898\841d5049\App_Web_oi4odi5p.2.cs 486 rn错误 4 “ASP.kaiqi_aspx”不实现接口成员“System.Web.IHttpHandler.IsReusable” c:\Users\xj\AppData\Local\Temp\Temporary ASP.NET Files\website2\2a8bc898\841d5049\App_Web_oi4odi5p.2.cs 150 rn错误 1 请确保此代码文件中定义的类与“inherits”属性匹配,并且该类扩展的基类(例如 Page 或 UserControl)是正确的。 D:\WebSite2\kaiqi.aspx.cs 19 33 D:\WebSite2\rnrn
Python-opencv
OpenCV-Python 中文教程 OpenCV官方教程中文版(For Python) 段力辉 译
Python-Opencv中的图像直方图
Python-Opencv中的图像直方图 直方图(histogram) 简单直方图 hist函数 matplotlib.pyplot.hist( x, bins=10, range=None, normed=False, weights=None, cumulative=False, bottom=None, histtype=u'bar', align=u'mid', orientatio...
Python-Opencv中的直方图均衡化
Python-Opencv中的直方图均衡化 直方图均衡化 图像的直方图是对图像对比度效果上的一种处理,旨在使得图像整体效果均匀,黑与白之间的各个像素级之间的点更均匀一点。 直方图均衡化:如果一副图像的像素占有很多的灰度级而且分布均匀,那么这样的图像往往有高对比度和多变的灰度色调。直方图均衡化就是一种能仅靠输入图像直方图信息自动达到这种效果的变换函数。它的基本思想是对图像中像素个数多的灰度级进行展宽...
Python-Opencv中的模糊处理
Python-Opencv中的模糊处理 模糊处理原理 基于离散卷积、定义好每个卷积核、不同卷积核得到不同的卷积效果、模糊是卷积的一种表象 模糊方式: 均值模糊:一般用来处理图像的随机噪声 中值模糊:一般用来处理图像的椒盐噪声 自定义模糊:对图像进行锐化之类的操作 1. 均值模糊 一般用来处理图像的随机噪声 import cv2 as cv def mean_blur(image, a, b)...
Python-Opencv中图像金字塔
Python-Opencv中图像金字塔 图像金字塔 图像金字塔是图像多尺度表达的一种,是一种以多分辨率来解释图像的有效但概念简单的结构。一幅图像的金字塔是一系列以金字塔形状排列的分辨率逐步降低,且来源于同一张原始图的图像集合。其通过梯次向下采样获得,直到达到某个终止条件才停止采样。我们将一层一层的图像比喻成金字塔,层级越高,则图像越小,分辨率越低。【百度百科】 所以,图像金字塔所干的活就是缩放图...
QT creater 中 imshow error问题
在ubuntu操作系统中用imshow显示一张图显示错误。出现OpenCV Error: Assertion Failed (size.width>0 && size.height>0) in cv:imshow file图片已经加入到QT创建的那个文件中了,并且如果我用图片路径的话虽然没有显示错误,但是根本没有图片显示出来。n程序这样的:n#include n#include n#include n#include n nusing namespace cv; n nint main(int argc, char *argv[]) n n// QCoreApplication a(argc, argv); n n namedWindow( "src", WINDOW_AUTOSIZE ); n Mat src1 = imread( "lena.jpg" ); n while(1) n n imshow( "src", src1 ); n char c = waitKey(30); n if( 27==c ) n return 0; n n n n// return a.exec(); n
Matlab中显示图像imshow(A)与imshow(A,[])的区别
imshow(A)与imshow(A,[])两者都是显示图片,如果A的灰度都在20以下,但确实又有灰度变化,你直接imshow看起来几乎都是黑的,imshow(A,[])后会从最小到最大拉伸显示,使显示的图片对比度差距更明显,...
OpenCV中imshow函数的使用
函数功能:在指定窗口中显示图像。 函数原型:void imshow(const string&amp;amp; winname, InputArray mat); 如果窗口是使用cv::WINDOW_AUTOSIZE标志创建的,则图像显示为其原始大小,但仍受屏幕分辨率的限制。否则,图像将按比例缩放以适合窗口。该函数可以缩放图像,取决于其深度: -如果图像是8位无符号的,它将按原样显示。 -如果图像是...
MALTAB中 imshow函数出错
imshow函数无法使用 / 错误使用 Settings / 未定义函数或变量 ‘matlab.internal.getSettingsRoot’。 具体问题\color{Blue}{\text{具体问题}}:imshow无法使用, 一使用,则报出以下提醒: 详细信息:\color{Blue}{\text{详细信息:}} 错误使用 Settings 未定义函数或变量 ‘matlab.int
OpenCV中imshow()的几点说明
在使用imshow来显示图片的过程中,由于是自己生成的图片,里面是0到1的小数,我以为它对图片的要求是0到255的范围,所以直接显示0到1会是差不多黑的图片。然后我就给他乘上了255,然后显示出来是白色的图片。然后我使用imread函数从本地文件中读取了一张RGB图片,然后把array打印出来,结果是0到255之间的。随后我把乘的255去掉,显示正常,于是乎我就使用了一下help(cv2.imsh...
我的C2.0总报错~
程序没有问题,但总是出现打不开某个库文件的错,但库文件是存在的。rn
faint!XMLOutputer总报错!
我想实现JAVA对XML的改写,我看这篇教材很多地方都用到了:rnhttp://www.knowsky.com/364082.htmlrnrn于是我按步就搬,但在写到:rn XMLOutputter outputter = new XMLOutputter(" ",true,"gb2312");rn时报错:rncannot find symbol; symbol : constructor XMLOutputter(java.lang.String,boolean,java.lang.String), location: class org.jdom.output.XMLOutputter at line 33 (33:31)rn我的已经在前面导了包啊:rnimport org.jdom.output.XMLOutputter;rn还有人说这样写也可以:rn org.jdom.output.XMLOutputter outp = new org.jdom.output.XMLOutputter("",true,"gb2312");rn结果还是报一样的错,郁闷了!
为什么总报错?
我的机子的内存256M,有很多空间,但在上网时总报虚拟内存不足呢?rn
setBinaryStream为什么总报错?
写了一段很简单的程序,不知道为什么,setBinaryStream这句总报错,请各位帮忙看看rn rn stmt = conn.prepareStatement("INSERT INTO NULLID.TEST_DB VALUES(3,3,?)");rn File imageFile = new File("F:\\temp\\ff.gif");rn int fileLength = (int)imageFile.length();rn InputStream inputStream = new FileInputStream(imageFile);rn stmt.setBinaryStream(1,inputStream,fileLength);rn //上面这句报错,这还没往数据库里插入呢,注释掉就没错,究竟哪里写的不对?rn rn
为何总报错?
我写了一个打开ACCESS 数据库的程序为何总报错,Jscript编译错rn语句 dim conn,connstr,databasernrn程序如下rnrnrn<%rn dim conn,connstr,databasernrn database=0 '设置使用的数据库类型,1=SQL SERVER,其他为ACCESSrnrn if database=1 thenrn connstr="driver=SQL Server;server=(local);database=News;uid=sa;pwd=1;"rn elsern connstr="DBQ="+server.mappath("./news.mdb")+";DefaultDir=;DRIVER=Microsoft Access Driver (*.mdb);"rn end ifrnrn set conn=server.CreateObject("adodb.connection")rn conn.open connstrrn%>
的代码, 为什么总报错..
想实现的功能是, 创建一个类(单例类, 这里简化了), 这个类创建的时候就开启一个新线程并立即执行. 该线程的任务是获取最新的数据, 并以消息形式通知主线程, 然后主线程更新类的成员变量.rnrn我写的代码: rn[code=C/C++]rn#include rn#include rn#include rnrnusing namespace std;rnrnstruct ExDataTypernrn int id;rn double value;rn;rnrn#define UM_DATA_ACQUIRE (WM_USER + 1001)rnrnclass Arnrnpublic:rn A();rn void Update();rn void Show();rnprivate:rn DWORD WINAPI ThreadFunc(LPVOID para);rn ExDataType m_data;rn;rnrnA::A()rnrn m_data.id = 0;rn m_data.value = 0.0;rnrn DWORD dwValue = GetCurrentThreadId();rn HANDLE hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)ThreadFunc, &dwValue, 0, NULL);rn if (!hThread)rn rn std::cout << "error\r\n";rn exit(-1);rn rn //CloseHandle(hThread);rnrnrnvoid A::Update()rnrn MSG msg;rn ExDataType *pTmp = NULL;rn while(GetMessage(&msg, NULL, 0, 0))rn rn pTmp = (ExDataType *)(msg.wParam);rn switch(msg.message)rn rn case UM_DATA_ACQUIRE:rn m_data.id = pTmp->id;rn m_data.value = pTmp->value;rn break;rn default:rn break;rn rn rnrnrnvoid A::Show()rnrn std::cout << "m_data.id: " << m_data.id << "\tm_data.value: " << m_data.value << "\r\n";rnrnrnDWORD WINAPI A::ThreadFunc(LPVOID para)rnrn DWORD dwThreadId = *((DWORD *)para);rn ExDataType threadData = 0, 0.0;rnrn while(TRUE)rn rn threadData.id += 2;rn threadData.value += 2.2;rn PostThreadMessage(dwThreadId, UM_DATA_ACQUIRE, (WPARAM)(&threadData), (LPARAM)0);rn Sleep(5000); rn rnrn return 0;rnrnrnint main()rnrn A a;rn a.Show();rnrn return 0;rnrn[/code]rnrn不明白创建线程那里的线程处理函数该怎么写, 另外, 这样能否正确实现我的目的? 请各位高手指教. 非常感谢!
SqlDataAdapter.Fill 总报错啊
一段登陆用的代码,但是出错了。我不知道是什么问题,那位路过的大婶解答一下啊。rn sqlda.Fill(ds, "UTtemp");rn就是这句话报错rnrn rn rn这是web.config里连接的那句话,应该也没错吧。server我用过本机ip,也用过本机名。rn[code=C#]rn UserName = this.TBUser.Text;rn Password = this.TBPW.Text;rn SqlConnection Conn = new SqlConnection(ConfigurationSettings.AppSettings["connstr"]);rn [code=C#][/code]string strcom = "select UserName,Password from UserTable where UserName = '"+UserName+"'";rn SqlDataAdapter sqlda = new SqlDataAdapter(strcom, Conn);rn DataSet ds = new DataSet();rn sqlda.Fill(ds, "UTtemp");rn //this.Label1.Text = rn if (ds.Tables["UTtemp"].Rows.Count == 0) //查询结果为空,输入的用户不存在,返回登陆页面rn rn Response.Write(" ");rn return;rnrn rn[/code]
总报错! 40分
大家能说说下面出错的大致原因么rnrn[Error] Project1.dpr(43): Undeclared identifier: 'TForm2'rnrn怎样又能尽量避免?
TextStream .read总报错
错误badfilemodern这是怎么回事?
为什么总报错~~??
初学sqlrn对照教程在ms sql2000里练习语句。rn环境:在sql查询分析器里,msql自带的pubs数据库--用户表--dbo.authors表,rn对于其他语句都能正常执行,例如 select au_lname from authors,但是每当选择某个具体的人名时,都报错.比如 select au_lname from authors where au_lname="Smith",rn服务器: 消息 207,级别 16,状态 3,行 1rn列名 'Smith' 无效。rnrn(这些名字在列表中都是存在的)rn请问是什么原因呢?rn难道是我看的教程太老,这些语句在mssql2000下不支持?
为什么LoadFrame总报错
原来是vc6.0的程序,没问题;后来用vs 2008重新编译执行了一下,就出问题了。rnrn错误提示: Access violation reading location 0x544c5541.rnrn出在以下这个函数里:rnBOOL AFXAPI AfxActivateActCtx(HANDLE hActCtx, ULONG_PTR *lpCookie) rn rn BOOL rc = pfnActivateActCtx != 0 ? pfnActivateActCtx(hActCtx, lpCookie) : FALSE; rn return rc;rnrn
为什么总报错!!!!!!!!111
以下是我做的用户注册页面中添加用户的一部分代码,可是报错说数据库或对象是只读,不能更新。可是我的数据库的属性不是只读的呀,还有rnrs.addnewrn.......rnrs.updatern我把中间的字段改成添加另一个表的内容就可以用,可是这个却不行,怎么办?rnrnset adocon=Server.CreateObject("ADODB.Connection") rnaddress=Server.MapPath("../weldingDB.mdb")rnadocon.open "Driver=Microsoft Access Driver (*.mdb);dbq=" &_rn addressrnset rs=Server.CreateObject("ADODB.Recordset")rnrs.open "userinfo",adocon,1,3rnrs.addnew rn rs("user").value=userrn rs("passwd").value=passwdrn rs("sex").value=sexrn rs("age").value=agern rs("comefrom").value=comefromrn rs("email").value=emailrn rs("homepage").value=homepagern rs("prompt").value=promptrn rs("answer").value=answerrn rs("da_date").value=datern rs("sign").value=signrn rs("realname").value=realnamern rs("birthday").value=birthdayrn rs("remark").value=remarkrn rs("icqno").value=icqnorn rs("oicq").value=oicqnorn rs("workstatue").value=workstatuern rs("job").value=jobrn rs("income").value=incomern rs("position").value=positionrn rs("tall").value=tallrn rs("blood").value=bloodrn rs("intere").value=interern rs("hobby").value=hobbyrnrs.updaternadocon.close
提交事务时总报错
请问为何总是报这个错啊,我查了下是一提交事务时就报这个错! rn是表关系建立的不对么还是?请大家指教!谢谢! rnorg.hibernate.TransientObjectException: com.wsd0704.Shopping.biz.entity.User rnorg.hibernate.engine.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:216) rnorg.hibernate.type.EntityType.getIdentifier(EntityType.java:108) rnorg.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:221) rnorg.hibernate.type.TypeFactory.findDirty(TypeFactory.java:476) rnorg.hibernate.persister.entity.AbstractEntityPersister.findDirty(AbstractEntityPersister.java:2803) rnorg.hibernate.event.def.DefaultFlushEntityEventListener.dirtyCheck(DefaultFlushEntityEventListener.java:467) rnorg.hibernate.event.def.DefaultFlushEntityEventListener.isUpdateNecessary(DefaultFlushEntityEventListener.java:190) rnorg.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:113) rnorg.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:195) rnorg.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76) rnorg.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26) rnorg.hibernate.impl.SessionImpl.flush(SessionImpl.java:985) rnorg.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:333) rnorg.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106) rncom.wsd0704.Shopping.biz.sevice.UserServiceImpl.generateOrder(UserServiceImpl.java:165) rncom.wsd0704.Shopping.web.struts.action.GenerateOrderAction.execute(GenerateOrderAction.java:70) rnorg.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419) rnorg.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224) rnorg.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) rnorg.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) rnjavax.servlet.http.HttpServlet.service(HttpServlet.java:709) rnjavax.servlet.http.HttpServlet.service(HttpServlet.java:802) rnrnrn程序如下rn业务层的方法 rnpublic void generateOrder(Order order) throws ServiceException rn// TODO Auto-generated method stub rnSession s = null; rnTransaction tran = null; rnrntry rns = HbnUtil.getCurrentSession(); rnSystem.out.println("s from service -> "+s); rntran = s.beginTransaction(); rnrnShoppingCartdao.generateOrder(order); rnSystem.out.println("order have generated in sevice"); rntran.commit(); catch (ShoppingDataException e) rn// TODO Auto-generated catch block rne.printStackTrace(); rntran.rollback(); rnrnthrow new ServiceException(e); rn rnrn rn数据层的方法 rnpublic void generateOrder(Order order) throws ShoppingDataException rnSession s=HbnUtil.getCurrentSession(); rn //String hql="select order from Order order"; rn rn try rns.save(order) rnSystem.out.println("order have generated in data"); rnrn catch (HibernateException e) rn// TODO Auto-generated catch block rne.printStackTrace(); rnthrow new ShoppingDataException(e); rn // return false; rn rnrn rn能推断是哪的问题么?rn
smartUpload为什么总报错!
这个是我从网上下载的,原来没有package com.jspsmart.upload;这句话,其他我没有动过;我把它放在了tomcat\webapps的目录下了:rnrnpackage com.jspsmart.upload;rnrnimport java.io.*;rnimport java.util.*;rnimport javax.servlet.*;rnimport javax.servlet.http.*;rnimport com.jspsmart.upload.*;rnrnpublic class servletUpload extends HttpServlet rn rn private ServletConfig config;rn /**rn * Init the servletrn */rn final public void init(ServletConfig config) throws ServletException rn this.config = config;rn rn rn final public ServletConfig getServletConfig() rn return config;rn rn /**rn * Handles GET requestsrn */rn public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException rnrn PrintWriter out = response.getWriter();rn out.println("");rn out.println("");rn out.println(" jspSmartUpload : Servlet Sample");rn out.println(" ");rn out.println("The method of the HTML form must be POST.");rn out.println("");rn out.println("");rn rn rn /**rn * Handles POST requestsrn */rn protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException rn rn PrintWriter out = response.getWriter();rn out.println("");rn out.println("");rn out.println(" jspSmartUpload : Servlet Sample");rn out.println(" ");rnrn // Variablesrn int count=0;rn SmartUpload mySmartUpload = new SmartUpload();rnrn try rn // Initializationrn mySmartUpload.initialize(config,request,response);rnrn // Uploadrn mySmartUpload.upload();rnrn // Save the file with the original namern // in a virtual path of the web serverrn count = mySmartUpload.save(mySmartUpload.getRequest().getParameter("PATH"));rn rn // Display the resultrn out.println(count + " file uploaded.");rnrn catch (Exception e)rn out.println("Unable to upload the file. ");rn out.println("Error : " + e.toString());rn rn rn out.println("");rn out.println("");rn rn /**rn * Destroy the servletrn */rn public void destroy () rn rnrn rnrnrn报的错!rnrnC:\j2sdk1.4.1_02\bin>javac C:\ApacheTomcat4.0\webapps\upload\servletUpload.javarnC:\ApacheTomcat4.0\webapps\upload\servletUpload.java:50: cannot resolve symbolrnsymbol : class SmartUploadrnlocation: class com.jspsmart.upload.servletUploadrn SmartUpload mySmartUpload = new SmartUpload();rn ^rnC:\ApacheTomcat4.0\webapps\upload\servletUpload.java:50: cannot resolve symbolrnsymbol : class SmartUploadrnlocation: class com.jspsmart.upload.servletUploadrn SmartUpload mySmartUpload = new SmartUpload();rn ^rn2 errorsrnrn不知道是不是路径设置错了!
IPHONE上传图片总报错!
NSString*lat_long = [NSStringstringWithFormat:@"\"latitude\":\"%f\",\"longitude\":\"%f\"",lattitude,longitude];rnNSString*urlString = @"http://pluginwebtest.shopal.jp/api/v1/upload1/add_upload_shop.php";rnrnNSMutableURLRequest*request= [[[NSMutableURLRequestalloc] init] autorelease];rn [request setURL:[NSURL URLWithString:urlString]];rn [request setHTTPMethod:@"POST"];rnrn NSString *boundary = @"0xKhTmLbOuNdArY";rnNSString*contentType = [NSStringstringWithFormat:@"multipart/form-data; boundary=%@",boundary];rn [request addValue:contentType forHTTPHeaderField: @"Content-Type"];rnrn NSMutableData*postbody = [NSMutableDatadata];rn NSMutableString*str=[[NSMutableStringalloc] init];rn//第一个字段rn [str appendFormat:@"\r\n\r\n--%@\r\n" ,boundary];rn [str appendFormat: @"Content-Disposition:form-data; name=\"product_desc\"\r\n\r\n"];rn if(product_desc)rn rn [str appendFormat:product_desc];rn rn elsern rn [str appendFormat:@"null"];rn rn//第二个字段rn [str appendFormat:@"\r\n\r\n--%@\r\n" ,boundary];rn [str appendFormat: @"Content-Disposition:form-data; name=\"product_category\"\r\n\r\n"];rn if(product_category)rn rn [str appendFormat:product_category];rn rn elsern rn [str appendFormat:@"null"];rn rn//第三个字段rn [str appendFormat:@"\r\n\r\n--%@\r\n" ,boundary];rn[str appendFormat: @"Content-Disposition:form-data; name=\"lat_long\"\r\n\r\n"];rn [str appendFormat:lat_long];rn//第四个字段rn NSString *image_data = [data base64Encoded];rn [str appendFormat:@"\r\n\r\n--%@\r\n" ,boundary];rn[str appendFormat: @"Content-Disposition:form-data; name=\"image\"\r\n\r\n"];rn [str appendFormat:image_data];rn//编码rn[postbody appendData:[str dataUsingEncoding:NSUTF8StringEncoding]];rn [request setHTTPBody:postbody];rn [str release];rnrnNSData*returnData = [NSURLConnectionsendSynchronousRequest:request returningResponse:nilerror:nil];rnNSString*returnString = [[NSStringalloc] initWithData:returnData encoding:NSUTF8StringEncoding];rnNSLog(@"returnString is %@",returnString);rn [returnString release];rnrnrn服务端总返回could not parse multipart servlet request!rnrn到底是嘛原因啊!rn当我用HTML作表单尝试POST跳转测试到目标页面时,则不会报错!rn服务端用的是spring roorn
CSDN怎么总报错?
服务器积极拒绝...rn
修改密码总报错
我用如下密码实现用户修改个人密码rnset user=GetObject("LDAP://haihui-ly/cn=dingyc,OU=mailuser,DC=wen,DC=gov,DC=cn")rnrnuser.PasswordRequired = Truernuser.ChangePassword oldpass,newpassrn总报错说"Permission denied"rn如何解决?请大家帮忙
regsvr32 RBDeskBand总报错
我已经下载了RBDeskBand这个DLL文件了,可运行总报错?
一段JS代码总报错
问题描述:rnrn 一个ASP页面下(目前尚未连接数据库,还处于纯静态模式),在火狐里不报错,在IE6和8中都报错,说"document.getElementById("num"+i).className="current";"这里缺少对象,还有就是什么对象为空。rnrn 自己找了很久也没找到解决方法,特来求助,请高手们帮忙分析分析!rnrn==================================================================rn[b]ASP页面下,引用JS代码:[/b]rn[code=HTML]rn rn[/code]rnrn[b]JS/cmn.js脚本文件全部的代码如下:[/b]rn[code=JScript]rnrnfunction linkurl(obj)rn rn if(obj.selectedIndex>0)rn rn window.open(obj.options[obj.selectedIndex].value);rn rn rn rnfunction correctPNG() rnrn var arVersion = navigator.appVersion.split("MSIE")rn var version = parseFloat(arVersion[1])rn if ((version >= 5.5) && (document.body.filters)) rn rn for(var j=0; j" rn img.outerHTML = strNewHTMLrn j = j-1rn rn rn rnrnif(window.attachEvent)rn window.attachEvent("onload", correctPNG);rnelse if(window.addEventListener)rn window.addEventListener("load",correctPNG,true);rnelsern window["onload"]=correctPNG;rnrnrnvar MaxImg = 6;rnvar NowImg = 1;rnvar bStart = 0;rnvar bStop =0; rnvar begin;rnfunction initialization()rn bStop =0; rn var next = NowImg + 1;rn if(next == MaxImg+1)rn NowImg = MaxImg;rn next = 1;rn rn if(bStop != 1)rn if(bStart == 0)rn bStart = 1; rn begin = setTimeout('initialization()', 2000); rn return;rn rn else rn document.getElementById("desc" + next).style.display="";rn document.getElementById("desc" + NowImg).style.display="none";rn for (var i=1;i<7;i++)rn document.getElementById("num"+i).className="link";rn if(i == next)rn document.getElementById("num"+i).className="current";rn rn while(next==7)rn document.getElementById("num").className="link";rn rn rn if(NowImg == MaxImg) rn NowImg = 1;rn elsern NowImg++; rn rn begin = setTimeout('initialization()', 2000); rn rnrnrnfunction showit(x)rn bStop=1;rn clearTimeout(begin);rn for (var i=1;i<=6;i++)rn document.getElementById("desc" + i).style.display="none";rn document.getElementById("num" + i).className="link";rn if(i == x)rn document.getElementById("desc" + i).style.display="block";rn document.getElementById("num"+i).className="current";rn rn rnrnrnfunction playit() rn begin = setTimeout('initialization()', 2000); rnrnbegin = setTimeout('initialization()', 2000);rn[/code]
为什么注释总报错!
这里红字部分的注释编译时总报错为什么?(环境是myeciplse7.5、tomcat6)rn<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>rn<%rnString path = request.getContextPath();rnString basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";rn%>rn<%!int a=1;%>rn<%int b=2;%>rnrnrn rn rn rn 加法测试rn rn rn rn rn rn rn rnrn rn [color=#FF0000][/color] rn The sum=<%=a+b%> rn rnrn
JavaMail总报错
HTML文件rnrnrnrn 发送邮件rn rnrn rn rn rn rnTo: rnrn rnFrom: rnrnrn rn rnSubject: rnrnrn rn rn Message: rn rnrnrnrnrnrnrnrnrn rnrn  JSP页面的作用就是获得表单提交过来的数据,并将这些数据赋给Java Mail API中相应的对象,最后完成邮件发送。rnrnsendmail.jsp文件rnrn<%@ page import=" Javax.mail.*, Javax.mail.internet.*, Javax.activation.*,Java.util.*"%>rnrnrn JSP meets JavaMail, what a sweet combo.rnrnrn<%rntryrnProperties props = new Properties();rnSession sendMailSession;rnStore store;rnTransport transport; rnrnsendMailSession = Session.getInstance(props, null);rnprops.put("mail.smtp.host", "smtp.jspinsider.com");rnMessage newMessage = new MimeMessage(sendMailSession);rnnewMessage.setFrom(new InternetAddress(request.getParameter("from")));rnnewMessage.setRecipient(Message.RecipientType.TO, new InternetAddress ( request.getParameter ("to")));rnnewMessage.setSubject(request.getParameter("subject"));rnnewMessage.setSentDate(new Date());rnnewMessage.setText(request.getParameter("text"));rntransport = sendMailSession.getTransport("smtp");rntransport.send(newMessage);rn%>rn Your mail has been sent.rn<%rncatch(MessagingException m)rnrnout.println(m.toString());rnrn%>rnrn rnrn我是照下面的文章做的,刚才的例子也在上面rnhttp://www.360doc.com/showWeb/0/0/41035.aspxrn请帮忙看看 rn我把这句 props.put("mail.smtp.host", "pop.163.com"); 邮件服务器地址每换一次就报差不多一样的错rnjavax.mail.MessagingException: Could not connect to SMTP host: pop.163.com, port: 25, response: -1 rnrnprops.put("mail.smtp.host", "pop.126.com"); rnjavax.mail.MessagingException: Could not connect to SMTP host: pop.126.com, port: 25, response: -rnjavax.mail.MessagingException: Could not connect to SMTP host: pop.sohu.com, port: 25, response: -1 rnjavax.mail.MessagingException: Unknown SMTP host: pop.sina.com; nested exception is: java.net.UnknownHostException: pop.sina.com rn
一段字符串操作,总报错!
我有一段字符串操作语句,想从array_temp1字符串中取一段字符,不知道怎么回事,总报错,请大家帮我看看吧,谢谢啦!string1字符串和field1数组前面定义过了。rn ......rn Dim array_temp1,L1,finish1,start1rn first1=left(field1(0),1)rn L1=len(string1)rn array_temp1=Application("temp1")rn if array_temp1<>"" thenrn start1=instr(array_temp1,first1)rn finish1=Mid(array_temp1,start1,L1)rn ......rnrn报错如下:rnrnMicrosoft VBScript 编译器错误 错误 '800a03f6' rn缺少 'End' rn/iisHelp/common/500-100.asp,行242 rnMicrosoft VBScript 运行时错误 错误 '800a0005' rn无效的过程调用或参数: 'Mid' rnrn/ldp/officechat/login1.asp,行40 rn
Python-OpenCV中的Gamma变换(校正)
【参考资料】https://blog.csdn.net/lichengyu/article/details/8457425 http://www.jb51.net/article/137566.htm 一、什么是Gamma变换 Gamma变换是对输入图像灰度值进行的非线性操作,使输出图像灰度值与输入图像灰度值呈指数关系: 这个指数即为Ga...
相关热词 c#异步发送kafka c#窗体编号 c# 操作二进制文件 c# 反射 机制 c#线程 窗体失去响应 c#角度转弧度 c# 解析gps数据 c# vs设置 语法版本 c# json含回车 c#多线程demo