flask 莫名奇妙的错误 相同的代码上面的会出现网页错位。

{% for i in slide.images %}
<li>
    <a class="pic" href="#"><img src="{{ url_for('img.static',filename= i.filename ) }}"></a>
</li> 
{% endfor %}

{% for i in slide.images %}
<li>
    <a class="pic" href="#"><img src="{{ url_for('img.static',filename= i.filename ) }}"></a>
</li>
{% endfor %}
阅读更多

莫名奇妙错误(求解)

04-29

[code=C/C++]/*------------------------------------------------------------rn 这下面的代码出了什么错误?怎么出现莫名奇妙的错误rn------------------------------------------------------------*/rnrn#include rn#include rn#include rn#include rn#pragma comment(lib, "Iphpapi.lib")rn#pragma comment(lib, "ws2_32.lib")rnusing namespace std;rn//全局数据rnu_char g_ucLocalMac[6]; //MacAddr;rnDWORD g_dwGatewayIP; //Gateway;rnDWORD g_dwLocalIP; //IpAddr;rnDWORD g_dwMask; //Mask;rnrnint main()rnrn PIP_ADAPTER_INFO pAdaptersInfo;rn ULONG ulLen;rn ::GetAdaptersInfo(pAdaptersInfo, &ulLen); //为适配器申请内存rn pAdaptersInfo = (PIP_ADAPTER_INFO)::GlobalAlloc(GPTR, ulLen);rn if(::GetAdaptersInfo(pAdaptersInfo, &ulLen) == ERROR_SUCCESS)rn rn if(pAdaptersInfo != NULL)rn rn memcpy(g_ucLocalMac, pAdaptersInfo->Address, 6);rn g_dwGatewayIP = inet_addr(pAdaptersInfo->GatewayList.IpAddress.String);rn g_dwLocalIP = inet_addr(pAdaptersInfo->IpAddressList.IpAddress.String);rn g_dwMask = inet_addr(pAdaptersInfo->IpAddressList.IpMask.String);rn rn rn cout << "--------------------------本地主机信息------------------------------" << endl << endl;rn in_addr in;rn in.S_un.S_addr = g_dwLocalIp;rn cout << "IPaddress: " << inet_ntoa(in) << endl;rn in.S_un.S_addr = g_dwMask;rn cout << "Mask: " << inet_ntoa(in) << endl;rn in.S_un.S_addr = g_dwGatewayIp;rn cout << "GatewayIP: " << inet_ntoa(in) << endl;rn u_char *p = g_ucLacalMac;rn cout << "Mac: " << p[0] << "-" << p[1] << "-" << p[2] << "-" << p[3] << "-" << p[4] << "-" << p[5] << endl;rn return 0;rn[/code]

遇到莫名奇妙错误

10-29

2005-10-29 09:37:06,453 ERROR [org.apache.catalina.session.ManagerBase] IOException while loading persisted sessions: java.io.EOFExceptionrnjava.io.EOFExceptionrn at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2165)rn at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2631)rn at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:734)rn at java.io.ObjectInputStream.(ObjectInputStream.java:253)rn at org.apache.catalina.util.CustomObjectInputStream.(CustomObjectInputStream.java:56)rn at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:384)rn at org.apache.catalina.session.StandardManager.load(StandardManager.java:343)rn at org.apache.catalina.session.StandardManager.start(StandardManager.java:657)rn at org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:499)rn at org.apache.catalina.startup.ContextConfig.managerConfig(ContextConfig.java:315)rn at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:635)rn at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:216)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4290)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:324)rn at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)rn at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)rn at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)rn at org.apache.catalina.core.StandardContext.init(StandardContext.java:5441)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:324)rn at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)rn at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)rn at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)rn at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:289)rn at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:92)rn at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:374)rn at org.jboss.web.WebModule.startModule(WebModule.java:62)rn at org.jboss.web.WebModule.startService(WebModule.java:40)rn at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)rn at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)rn at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:324)rn at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)rn at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)rn at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)rn at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)rn at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)rn at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)rn at $Proxy0.start(Unknown Source)rn at org.jboss.system.ServiceController.start(ServiceController.java:416)rn at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:324)rn at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)rn at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)rn at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)rn at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)rn at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)rn at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)rn at $Proxy28.start(Unknown Source)rn at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:360)rn at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)rn at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)rn at org.jboss.deployment.MainDeployer.addDeployer(MainDeployer.java:360)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:324)rn at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)rn at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)rn at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:122)rn at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)rn at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)rn at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)rn at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)rn at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)rn at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)rn at $Proxy26.addDeployer(Unknown Source)rn at org.jboss.deployment.SubDeployerSupport.startService(SubDeployerSupport.java:112)rn at org.jboss.web.AbstractWebContainer.startService(AbstractWebContainer.java:566)rn at org.jboss.web.tomcat.tc5.Tomcat5.startService(Tomcat5.java:399)rn at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)rn at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)rn at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:324)rn at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)rn at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)rn at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)rn at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)rn at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)rn at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)rn at $Proxy0.start(Unknown Source)rn at org.jboss.system.ServiceController.start(ServiceController.java:416)rn at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:324)rn at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:1

执行存储过程出现莫名奇妙错误

01-10

[code=SQL]SET QUOTED_IDENTIFIER ONrnGOrnALTER proc [dbo].[getSclassName]rn @id int,rn @SCName varchar(500) outputrnasrn select @SCName=SClassName from SClass where ID =@IDrngo[/code]rnrnrn[code=C#]public void getString(int ID, out string SClassName)rn rn using (SqlConnection conn = new SqlConnection(ConnString))rn rn SqlCommand comm = new SqlCommand("getSclassName", conn);rn comm.CommandType = CommandType.StoredProcedure;rnrn SqlParameter[] param = new SqlParameter[2];rn param[0] = comm.Parameters.Add("@id", SqlDbType.Int);rn param[0].Value = ID;rn param[0].Direction = ParameterDirection.Input;rnrn param[1] = comm.Parameters.Add("@SCName", SqlDbType.VarChar); rn param[1].Direction = ParameterDirection.Output;rnrn conn.Open();rn comm.ExecuteNonQuery();rn conn.Close();rnrn SClassName = comm.Parameters["@SCName"].Value.ToString();rn rn [/code]rn调用如下:rn[code=C#]private string SName;rnpublic string _SNamern rn getrn rn return SName;rn rn rnpublic void getSclassName(int SclassID)rn rn db.getString(SclassID, out SName);rn [/code]rnrn数据库抓图:rn[img=http://n.dvbbs.net/attach.aspx?attachid=593][/img]rnrn报错:rnString[1]: Size 属性具有无效大小值 0。rn详细信息rn捕捉到 System.InvalidOperationExceptionrn Message="String[1]: Size 属性具有无效大小值 0。"rn Source="System.Data"rn StackTrace:rn 在 System.Data.SqlClient.SqlParameter.Validate(Int32 index)rn 在 System.Data.SqlClient.SqlCommand.SetUpRPCParameters(_SqlRPC rpc, Int32 startCount, Boolean inSchema, SqlParameterCollection parameters)rn 在 System.Data.SqlClient.SqlCommand.BuildRPC(Boolean inSchema, SqlParameterCollection parameters, _SqlRPC& rpc)rn 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)rn 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)rn 在 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)rn 在 System.Data.SqlClient.SqlCommand.ExecuteNonQuery()rn 在 mmmLib.Database.getString(Int32 ID, String& SClassName) 位置 f:\F\Extend120mmm\App_Code\Database.cs:行号 61rn 在 SClass.getSclassName(Int32 SclassID) 位置 f:\F\Extend120mmm\App_Code\News.cs:行号 362rn 在 Ascx_DataRepater.get_GetSclassName() 位置 f:\F\Extend120mmm\Ascx\DataRepater.ascx.cs:行号 79rn 在 Ascx_DataRepater.Page_Load(Object sender, EventArgs e) 位置 f:\F\Extend120mmm\Ascx\DataRepater.ascx.cs:行号 26rnrn怎么回事呢?rn我哪里出错了呢?

没有更多推荐了,返回首页