用vs2008编写的读取sqlite数据里但是程序运行找不到数据库~~求大神帮看看~~在线等 5C

一运行就说找不到数据库图片说明

8个回答

很明显没找到文件,你带上文件的完整路径看看

XIULUOZHIXIN
XIULUOZHIXIN 回复caozhy: 我把文件名改成nor。db ~~不就是这个格式吗?
大约 4 年之前 回复
XIULUOZHIXIN
XIULUOZHIXIN 我用sqlitebrowser 就能打开我创建的nor。db文件······网上说弄什么绝对路径也尝试了~~直接告诉不能打开~~~上面程序运行显示的是 no such a table
大约 4 年之前 回复
caozhy
贵阳马善福 回复XIULUOZHIXIN: 看下文件格式是否正确。
大约 4 年之前 回复
XIULUOZHIXIN
XIULUOZHIXIN 带上完整的文件路径~~会出现unable open the datebases file~~~自己刚接触~~弄一天了~~就是不知道怎么回事~~
大约 4 年之前 回复

带上完整的文件路径~~会出现unable open the datebases file~~~自己刚接触~~弄一天了~~就是不知道怎么回事~~

你用的是相对路径,nor.DB,调试的时候看看你的项目编译完输出到哪里了,
通常是:bin\debug\ 目录,把 nor.DB 放在和你的程序相同 的目录就可以了。
要么就改为绝对目录试试;

XIULUOZHIXIN
XIULUOZHIXIN 回复微wx笑: 当程序执行到cmd.Commandtext="select*fromaa"即时窗口出现在 System.Data.SQLite.SQLiteException 中第一次偶然出现的“System.Data.SQLite.dll”类型的异常的消息········
大约 4 年之前 回复
XIULUOZHIXIN
XIULUOZHIXIN 回复微wx笑: 能加你qq或者微信吗~~
大约 4 年之前 回复
XIULUOZHIXIN
XIULUOZHIXIN 回复微wx笑: 按照你的图我看了·~都在·~现在是打开了还是显示Sqlite error no such table aa
大约 4 年之前 回复
XIULUOZHIXIN
XIULUOZHIXIN 回复微wx笑: 我用sqlite browser打开db文件就能找到aa但是软件打开就是找不到~~下边有我上传的图~~麻烦您看下·~不知道怎么了
大约 4 年之前 回复
testcs_dn
微wx笑 回复XIULUOZHIXIN: 嗯。程序运行显示的是 no such a table,应该是连接成功了,找不到数据表;
大约 4 年之前 回复
XIULUOZHIXIN
XIULUOZHIXIN 输出的是bin\debug\ 在就没有了~~~对吗~~用了绝对路径直接显示不能打开
大约 4 年之前 回复

"no such a table"是说表找不到,应该数据库是连接上了,是不是没有aa这个表?

XIULUOZHIXIN
XIULUOZHIXIN 我刚才传了张图~~你看一下~~能找到aa
大约 4 年之前 回复
XIULUOZHIXIN
XIULUOZHIXIN 但是我的里面有创建的Table为aa的表啊·~再sqlite browser打开输入select *from 就能看到~~我的表
大约 4 年之前 回复

@wafstudio 这是我用qlite browser打开的我的db文件~~图片说明

图片说明
图片说明

XIULUOZHIXIN
XIULUOZHIXIN 当程序执行到cmd.Commandtext="select*fromaa"即时窗口出现在 System.Data.SQLite.SQLiteException 中第一次偶然出现的“System.Data.SQLite.dll”类型的异常的消息······这个不知道怎么解决了~~··
大约 4 年之前 回复

http://www.codeproject.com/Articles/746191/SQLite-Helper-Csharp
有没有下载这个例子看看呢?
图片说明
no such a table 确实是表不存在的问题;
图片说明

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
在线等,求大神帮写个存储过程
要求rn传入参数 : 表名,字段(多字段),排序字段,分页数rn按照传入参数查询出结果 在线等 谢谢
struts2找不到action求大神 在线等
感觉什么都写了 就是找不到action 下面是代码 求解答rnrnweb.xml的---------------------------------rnrnrn ssirnrn Struts2rn rn org.apache.struts2.dispatcher.FilterDispatcherrn rnrn rnrn Struts2rn /*rnrnrnrnstruts2 配置文件的--------------------rnrnrnrnrn rn rn rn index.jsprn rn rn rnrnaction的----------------------------------rnpackage action;rnrnimport java.io.Serializable;rnimport java.util.List;rnrnimport javax.servlet.http.HttpServletRequest;rnrnimport com.opensymphony.xwork2.ActionSupport;rnrnrnimport dao.Impl.UserdaoImpl;rnimport entity.User;rnrn@SuppressWarnings("serial")rnpublic class IndexAction extends ActionSupport rnrn UserdaoImpl dao= new UserdaoImpl();rn rn private HttpServletRequest req;rn rnrn public String init()rn Listlist=dao.select();rn req.setAttribute("list", list);rn return "success";rn rn rn rnrnrn---------------------------------------------rn访问路径是rnhttp://localhost:8181/ssi/IndexAction_init.actionrn---------------------------------------------rn下面是包名和文件位置 求解答rn[img=https://img-bbs.csdn.net/upload/201407/04/1404454458_941719.png][/img]rn
求GirdView大神帮看看
我在写一个项目的时候 rn用到gridview绑定子控件 rn myRm_Block_No = dtrow.Cells(1).FindControl("TextBox3")rn用findcontrol去查找子控件的IDrn但是BOSS说用这种方法不好 rn就是以后你gridview有改变你子控件就找不到了rn就我用什么keynames还是什么key去做 rn但是我好像不是很明白 rn有懂的大神请帮个忙 rn谢谢 不甚感激
求大神们帮看看
代码:rn[code=C/C++]rnint arr[5];rn int max,i,n = 0;rn for(i = 0;i<5;i++)rn rn scanf("%d",&arr[i]);rn rn printf("max\n");rn for(n = 0;n<=4;n++)rn rn if(arr[n]>max)rn rn max = arr[n];rn rn rn printf("%d",max);rn getch();rn[/code]rn求5个数中最大的一个 这段代码有什么问题?
求帮看看错误。在线等。
我四年没动过C了,忘得差不多了,现在要用C做东西,在慢慢拾。没想到很简单的一个试验例子的错误都不知道出在哪了,请大家帮个忙。rnrnC函数库里面应该有画线的函数吧。是不是line()?rnrn#include rn#include rn#include rnrnint a, b, c, d, e;rnmain()rnrn printf("please inter the coordinate of start!\n");rn scanf("%d,%d",&a,&b);rn printf("please inter the end coordinate!\n");rn scanf("%d,%d",&c,&d);rn print("please inter the color of the line!\n");rn scanf("%d",&e);rn clrscr();rn box(a,b,c,d,e);rn getch();rnrnbox(a,b,c,d,e)rnrn line(a,b,c,b,e);rn line(a,b,c,d,e);rn line(a,d,c,d,e);rn line(c,b,c,b,e);rnrn我想是不是我的画线函数用错了,大家如果可能的话能不能给介绍个包函C语言画图及其它函数的函数库的电子书。我去下一下,这些东西都忘了,甚至一些语法都有点记不得了。我这里比较偏,买书很不方便,基本是出不去或者说找不到卖书的地方,特别是这种书。谢谢!!rn
求大神帮忙看看 在线跪等
!!!!!怎么解析json数组啊我在界面上alert出来这个数组了就是没法在表格上显示rn[img=https://img-bbs.csdn.net/upload/201411/28/1417169011_110105.png][/img][img=https://img-bbs.csdn.net/upload/201411/28/1417169028_965734.png][/img][img=https://img-bbs.csdn.net/upload/201411/28/1417169042_823435.png][/img]
在线跪等!!求大神帮忙看看!!!!
想做一个小游戏 大概需求是:有三张图片 点击随便一张返回一个数字与后面生成的随机数比对 如果一样就改变图片...不一样就继续......................................大神们帮忙解决下呗...........................................[img=https://img-bbs.csdn.net/upload/201410/14/1413297138_631991.png][/img][img=https://img-bbs.csdn.net/upload/201410/14/1413297146_592606.png][/img][img=https://img-bbs.csdn.net/upload/201410/14/1413297162_587923.png][/img]
求大神帮忙看看!!在线跪等!!
我upd的方法没有问题 我写过测试类测试过了 求帮忙解决下rnrnrn[img=https://img-bbs.csdn.net/upload/201409/03/1409731350_406264.png][/img][img=https://img-bbs.csdn.net/upload/201409/03/1409731357_618002.png][/img][img=https://img-bbs.csdn.net/upload/201409/03/1409731381_676909.png][/img]
求大神设计一个数据库,在线等。
公司领导想知道每个部门的员工每天都在哪个项目上?rn类似于这样的东西rnrn部门名称 部门姓名 所在项目 所在时间rn业务一部 张三 中国移动 2014.12.1rn业务一部 张三 中国移动 2014.12.2rn业务二部 李四 中国联通 2014.12.1rn...........................................................................rn感觉不好设计,到底是以时间日期为主键设计呢,还是以什么来设计。rnrn求大神帮忙。万分感谢。rn
帮看看代码在线等
rnrnrnrnrnrnrnrn<%rnrnSet Conn=Server.CreateObject("ADODB.Connection")rnSet Rs=Server.CreateObject ("ADODB.RecordSet")rnConn.Open (SqlOpenDb)rnOrder_ID="20040001"rnIf (Request("OrderID") <> "") Then rn Order_ID=Request("OrderID")rn Response.Write Order_IDrnEnd Ifrnrn%>rnrn rn rn rn rn rn 材料名称:rn rn rn<%rnSql_MaterialId=" Select * From ProductInfo Where OrderId='"&Order_ID&"' "rn 上面着条语句好象有错误.请帮忙rnRs.Open Sql_MaterialId,ConnrnMaterial_ID=Rs("MaterialID")rnResponse.Write Material_IDrnResponse.Wrtie "成功!"rn rnSql="Select * From MaterialInfo"rnRs.Open Sql,ConnrnDo Until Rs.EOFrn%> rn Selected rn rn <% Elsern End If %>>rn <% Response.Write Rs("MaterialName") %>rn rn<%rnRs.MovenextrnlooprnrnRs.ClosernSet Rs=NothingrnConn.ClosernSet Conn=Nothingrn%>rn rn
大神进来看看~~~在线等@
这个是我写的异步验证rnrn$("#mobile:not(':disabled')").formValidator(onFocus:"请输入11位手机号",onShowFixText:"该手机已被注册",onCorrect:"该手机可以使用").inputValidator(min:11,max:11,onError:"请输入正确的格式").regexValidator(regExp:"mobile",dataType:"enum",onError:"你输入的手机号码格式不正确").ajaxValidator(rn dataType : "json",rn async : true,rn url : "/fullmart/Check?guestid="+$("#mobile").val(),rn success : function(data)rn if( data==true ) return true;rn return false;rn ,rn buttons: $("#button"),rn error: function(jqXHR, textStatus, errorThrown)alert("服务器没有返回数据,可能服务器忙,请重试"+errorThrown);,rn onError : "该会员名已被使用,请更换会员名",rn onWait : "正在进行合法性校验,请稍候..."rn ).defaultPassed().focus();rnrn在url这儿总是传递不了guestid!还有就是onError为什么总是以alert的方式弹出
VS2008里找不到 System.ServiceModel
我在学习WCF的时候,用到System.ServiceModel,在“引用”中添加的时候找不到“System.ServiceModel.Web”,路径是:rnC:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.ServiceModel.Web.dll。rn怎么样才能找到System.ServiceModel?rn谢谢
大神帮看看
#includernint main()rnrnint i,m[9],*p;rnp=m;rn for(i=0;i<9;i++)rn rn *p++=i; //这里改成“++p”它才不越界,但是多了一个数。rn printf("%3d",*p);rn rn printf("\n");rn return 0;rnrn我咸觉“p++”没错啊。
zara大神帮看看
如何操作让OD工具的数据段显示为代码段?如下图,我如何操作能让下面显示00401000~00401016段啊?rn[img=https://img-bbs.csdn.net/upload/201402/19/1392778521_93389.jpg][/img]rn[img=https://img-bbs.csdn.net/upload/201402/19/1392778531_281624.jpg][/img]
大神们帮看看的
、、、、1rn rnrn错误信息:rnSyntax error, insert ". class" to complete ArgumentListrnrnrn、、、、、、2rn rn错误信息’rnMultiple annotations found at this line:rn - Syntax error on token ",", invalid (rn - Syntax error on tokens, ArgumentList rn expected insteadrn - Syntax error, insert ")" to complete rn Expressionrn - Syntax error on tokens, Expression rn expected instead
SQLite 报错 求大神
[img=https://img-bbs.csdn.net/upload/201606/19/1466348080_159492.png][/img]rnrn[img=https://img-bbs.csdn.net/upload/201606/19/1466348086_952969.png][/img]rnrn[img=https://img-bbs.csdn.net/upload/201606/19/1466348093_460887.png][/img]rn[img=https://img-bbs.csdn.net/upload/201606/19/1466348099_738753.png][/img]
急!找不到数据库!在线等~~~~~~
数据库系统是db2rn在里面创建了一个叫做library的数据库rnprivate static String userid = "USERID";rnprivate static String password = "PASSWORD";rnprivate static String driver = "COM.ibm.db2.jdbc.app.DB2Driver";rnprivate static String url = "jdbc:db2:library";rnrnClass.forName(driver);rnconnection = DriverManager.getConnection(url, userid, password);rn//这里出错,提示说找不到数据库library?rn请问是什么原因?rn
求大神解惑,在线等
[code=sql]rnrn--数据库:2008R2rnrnCREATE TABLE #Testrn(rn UpdateFlag NVARCHAR(64),rn AUpValue FLOAT,rn AUpDiffDes NVARCHAR(1000),rn ADownValue FLOAT,rn ADownDiffDes NVARCHAR(1000),rn BUpValue FLOAT,rn BUpDiffDes NVARCHAR(1000),rn BDownValue FLOAT,rn BDownDiffDes NVARCHAR(1000),rn CUpValue FLOAT,rn CUpDiffDes NVARCHAR(1000),rn CDownValue FLOAT,rn CDownDiffDes NVARCHAR(1000)rn)rnCREATE TABLE #Categoryrn(rn CategoryID NVARCHAR(64),rn CategoryName NVARCHAR(100),rn CreateTime DATETIMErn)rnrnINSERT INTO #CategoryrnSELECT 'A814AB45-E29B-4429-A580-8C4681DEFE5A','A上值',GETDATE() UNIONrnSELECT '7A3BC913-9CA5-4918-9033-F24A34CCDD40','A下值',GETDATE() UNIONrnSELECT '95C86313-0723-48EC-88E3-4EA8C43F57C3','B上值',GETDATE() UNIONrnSELECT 'A70A1399-5004-42B1-9205-4960F4271936','B下值',GETDATE() UNIONrnSELECT 'D635E8D8-A10D-452F-B721-1065A6F546DE','C上值',GETDATE() UNIONrnSELECT 'BB13EDFA-8D7F-49A0-8E0E-84859A62A762','C下值',GETDATE()rnGOrnrnCREATE TABLE #NewTestrn(rn id INT IDENTITY(1,1),rn AreaCode NVARCHAR(64),rn AreaValue FLOAT,rn DiffDes NVARCHAR(1000),rn UpdateFlag nvarchar(64)rn)rnrnSET IDENTITY_INSERT [dbo].[#NewTest] ONrnINSERT [#NewTest] ([id], [AreaCode], [AreaValue], [DiffDes], [UpdateFlag]) VALUES (1, N'7A3BC913-9CA5-4918-9033-F24A34CCDD40', 9, N'', N'5A3C87DB-3CCD-4C7B-B2CA-D77BDCD52D9C')rnINSERT [#NewTest] ([id], [AreaCode], [AreaValue], [DiffDes], [UpdateFlag]) VALUES (2, N'7A3BC913-9CA5-4918-9033-F24A34CCDD40', 9, N'差异', N'A94AC242-07CA-4910-821E-1B0B36C3CF65')rnINSERT [#NewTest] ([id], [AreaCode], [AreaValue], [DiffDes], [UpdateFlag]) VALUES (3, N'7A3BC913-9CA5-4918-9033-F24A34CCDD40', 5, N'', N'9E8A8E7F-3F69-4431-A1F6-99FDB63507A3')rnINSERT [#NewTest] ([id], [AreaCode], [AreaValue], [DiffDes], [UpdateFlag]) VALUES (4, N'7A3BC913-9CA5-4918-9033-F24A34CCDD40', 7, N'无差异', N'D643316A-387F-4495-A277-CD117228F22C')rnINSERT [#NewTest] ([id], [AreaCode], [AreaValue], [DiffDes], [UpdateFlag]) VALUES (5, N'95C86313-0723-48EC-88E3-4EA8C43F57C3', 22, N'差异', N'5A3C87DB-3CCD-4C7B-B2CA-D77BDCD52D9C')rnINSERT [#NewTest] ([id], [AreaCode], [AreaValue], [DiffDes], [UpdateFlag]) VALUES (6, N'95C86313-0723-48EC-88E3-4EA8C43F57C3', 1, N'差异', N'A94AC242-07CA-4910-821E-1B0B36C3CF65')rnINSERT [#NewTest] ([id], [AreaCode], [AreaValue], [DiffDes], [UpdateFlag]) VALUES (7, N'95C86313-0723-48EC-88E3-4EA8C43F57C3', 3, N'差异', N'9E8A8E7F-3F69-4431-A1F6-99FDB63507A3')rnINSERT [#NewTest] ([id], [AreaCode], [AreaValue], [DiffDes], [UpdateFlag]) VALUES (8, N'95C86313-0723-48EC-88E3-4EA8C43F57C3', 2, N'差异', N'D643316A-387F-4495-A277-CD117228F22C')rnINSERT [#NewTest] ([id], [AreaCode], [AreaValue], [DiffDes], [UpdateFlag]) VALUES (9, N'A70A1399-5004-42B1-9205-4960F4271936', 3, N'ddd', N'5A3C87DB-3CCD-4C7B-B2CA-D77BDCD52D9C')rnINSERT [#NewTest] ([id], [AreaCode], [AreaValue], [DiffDes], [UpdateFlag]) VALUES (10, N'A70A1399-5004-42B1-9205-4960F4271936', 3, N'dsd', N'A94AC242-07CA-4910-821E-1B0B36C3CF65')rnINSERT [#NewTest] ([id], [AreaCode], [AreaValue], [DiffDes], [UpdateFlag]) VALUES (11, N'A70A1399-5004-42B1-9205-4960F4271936', 3, N'dsd', N'9E8A8E7F-3F69-4431-A1F6-99FDB63507A3')rnINSERT [#NewTest] ([id], [AreaCode], [AreaValue], [DiffDes], [UpdateFlag]) VALUES (12, N'A70A1399-5004-42B1-9205-4960F4271936', 3, N'', N'D643316A-387F-4495-A277-CD117228F22C')rnINSERT [#NewTest] ([id], [AreaCode], [AreaValue], [DiffDes], [UpdateFlag]) VALUES (13, N'A814AB45-E29B-4429-A580-8C4681DEFE5A', 10, N'无差异', N'5A3C87DB-3CCD-4C7B-B2CA-D77BDCD52D9C')rnINSERT [#NewTest] ([id], [AreaCode], [AreaValue], [DiffDes], [UpdateFlag]) VALUES (14, N'A814AB45-E29B-4429-A580-8C4681DEFE5A', 8, N'', N'A94AC242-07CA-4910-821E-1B0B36C3CF65')rnINSERT [#NewTest] ([id], [AreaCode], [AreaValue], [DiffDes], [UpdateFlag]) VALUES (15, N'A814AB45-E29B-4429-A580-8C4681DEFE5A', 5, N'差异', N'9E8A8E7F-3F69-4431-A1F6-99FDB63507A3')rnINSERT [#NewTest] ([id], [AreaCode], [AreaValue], [DiffDes], [UpdateFlag]) VALUES (16, N'A814AB45-E29B-4429-A580-8C4681DEFE5A', 3, N'无差异', N'D643316A-387F-4495-A277-CD117228F22C')rnINSERT [#NewTest] ([id], [AreaCode], [AreaValue], [DiffDes], [UpdateFlag]) VALUES (17, N'BB13EDFA-8D7F-49A0-8E0E-84859A62A762', 9, N'无差异', N'5A3C87DB-3CCD-4C7B-B2CA-D77BDCD52D9C')rnINSERT [#NewTest] ([id], [AreaCode], [AreaValue], [DiffDes], [UpdateFlag]) VALUES (18, N'BB13EDFA-8D7F-49A0-8E0E-84859A62A762', 7, N'无差异', N'A94AC242-07CA-4910-821E-1B0B36C3CF65')rnINSERT [#NewTest] ([id], [AreaCode], [AreaValue], [DiffDes], [UpdateFlag]) VALUES (19, N'BB13EDFA-8D7F-49A0-8E0E-84859A62A762', 0, N'无差异', N'9E8A8E7F-3F69-4431-A1F6-99FDB63507A3')rnINSERT [#NewTest] ([id], [AreaCode], [AreaValue], [DiffDes], [UpdateFlag]) VALUES (20, N'BB13EDFA-8D7F-49A0-8E0E-84859A62A762', 10, N'无差异', N'D643316A-387F-4495-A277-CD117228F22C')rnINSERT [#NewTest] ([id], [AreaCode], [AreaValue], [DiffDes], [UpdateFlag]) VALUES (21, N'D635E8D8-A10D-452F-B721-1065A6F546DE', 5, N'', N'5A3C87DB-3CCD-4C7B-B2CA-D77BDCD52D9C')rnINSERT [#NewTest] ([id], [AreaCode], [AreaValue], [DiffDes], [UpdateFlag]) VALUES (22, N'D635E8D8-A10D-452F-B721-1065A6F546DE', 5, N'ss', N'A94AC242-07CA-4910-821E-1B0B36C3CF65')rnINSERT [#NewTest] ([id], [AreaCode], [AreaValue], [DiffDes], [UpdateFlag]) VALUES (23, N'D635E8D8-A10D-452F-B721-1065A6F546DE', 5, N'a', N'9E8A8E7F-3F69-4431-A1F6-99FDB63507A3')rnINSERT [#NewTest] ([id], [AreaCode], [AreaValue], [DiffDes], [UpdateFlag]) VALUES (24, N'D635E8D8-A10D-452F-B721-1065A6F546DE', 5, N'', N'D643316A-387F-4495-A277-CD117228F22C')rnSET IDENTITY_INSERT [dbo].[#NewTest] OFFrnrnGOrnSELECT * FROM #TestrnSELECT * FROM #NewTestrnSELECT * FROM #Categoryrngorn--想法是行转列。rn--#NewTest中的AreaCode和#Category中的CategoryID是主外键关系rn--我现在只能这么转,我就写了一个AUpValue,后面类似rn--问题1我只能向下边这么写吗AUpValue和AUpDiffDes的条件是一样的,但是要写两遍。有简便方法吗,问题二我这么写会出来N行NULL的。怎么破rnSELECT nt.UpdateFlag,rnCASE WHEN AreaCode='A814AB45-E29B-4429-A580-8C4681DEFE5A' THEN AreaValue END AS AUpValue,rnCASE WHEN AreaCode='A814AB45-E29B-4429-A580-8C4681DEFE5A' THEN DiffDes END AS AUpDiffDesrnFROM #NewTest AS ntrnINNER JOIN #Category AS c ON nt.AreaCode=c.CategoryIDrnrn--想得到以下结果rnUpdateFlag AUpValue AUpDiffDes ADownValue ADownDiffDes BUpValue BUpDiffDes BDownValue BDownDiffDes CUpValue CUpDiffDes CDownValue CDownDiffDesrn5A3C87DB-3CCD-4C7B-B2CA-D77BDCD52D9C 10 无差异 9 22 差异 3 ddd 5 9 无差异rnA94AC242-07CA-4910-821E-1B0B36C3CF65 8 9 差异 1 差异 3 dsd 5 ss 7 无差异rn9E8A8E7F-3F69-4431-A1F6-99FDB63507A3 5 差异 5 3 差异 3 dsd 5 a 0 无差异rnD643316A-387F-4495-A277-CD117228F22C 3 无差异 7 无差异 2 差异 3 5 10 无差异rnrnrn[/code]
求大神帮忙,在线等
简单的c++题,求教
求大神解答 在线等
各位大神 我是一个想要学习并想学好的小白 望各位朋友们能解答我一个小问题: 输入格式: 输入在一行中给出一个 * 正整数 A,B(0&lt;A,B&lt;100)。* 对于这一句话我一直没想明白也找了点资料还是没有解答(C语言输入中如何设置 比如上面A,B的范围 还是不用设置不影响?)朋友们能帮我解答一下不 #include&lt;stdio.h&gt; int main() { int A,...
求大神指导,在线等
[img=https://img-bbs.csdn.net/upload/201306/06/1370494280_301437.jpg][/img]
在线等,求大神帮忙
程序如下(感觉没错误啊):rn#include rn#include rn#include rn#include rnusing namespace std;rn#define OK 1rn#define ERROR 0rn#define STACK_INIT_SIZE 1000rndouble result, number1,number2;rnint i, j,n,m,flag;rnchar operate,ch;rnchar val[100];rn//操作数栈定义rntypedef structrn double *base;rn double *top;rn int stacksize;rnnumstack;rn//操作码栈定义rntypedef structrn char *base;rn char *top;rn char stacksize;rnpondstack;rn//操作数栈初始化rnint num_init(numstack &S)rnrn S.base = (double *)malloc(STACK_INIT_SIZE*sizeof(double));rn if (!S.base)exit(OVERFLOW);rn S.top=S.base;rn S.stacksize = STACK_INIT_SIZE;rn return OK;rnrn//操作码栈初始化rnint pond_init(pondstack &S)rnrn S.base = (char *)malloc(STACK_INIT_SIZE*sizeof(char));rn if (!S.base)exit(OVERFLOW);rn S.top = S.base;rn S.stacksize = STACK_INIT_SIZE;rn return OK;rnrn//将操作码压入堆栈rnint push_pond(pondstack &S, char c)rnrn *S.top++ = c;rn return OK;rnrn//将操作数压入堆栈rnint push_num(numstack &S, double number)rnrn *S.top++=number;rn return OK;rnrn//将操作码弹出堆栈rnint pop_pond(pondstack S)rnrn char c;rn if (S.top == S.base)return ERROR;rn c = *--S.top;rn return c;rnrn//将操作数弹出堆栈rnint pop_num(numstack S)rn rn double e;rn if (S.top == S.base)return ERROR;rn e = *--S.top;rn return e;rn rn//取栈顶rnint get_top(pondstack N)rnrn char c;rn if (N.top == N.base)return ERROR;rn c = *(N.top - 1);rn return c;rnrn//判断对错rnint judge(char c)rnrn if (c =='-' || c == '*' || c == '/' || c == '+')flag = 1;//c为运算符时flag=1;rn else flag = 0;rn return OK;rnrn//优先级判别rnint change_opnd(char c)rnrn switch (c)rn rn case '-':rn case '+':m= 1; break;rn case '*':rn case '/':m= 2; break;rn default: printf("error"); rn rn return(m);rnrn//简单计算+,-,*,/rnint caculate(double numbe1,char operat,double numbe2)rnrn if (operate == '+')rn rn result = numbe1 + numbe2;rn rn if (operat == '-')rn rn result = numbe1 - numbe2;rn rn if (operat == '*')rn rn result = numbe1*numbe2;rn rn if (operat == '/')rn rn result = numbe1 / numbe2;rn rn return result;rnrn//语法检查并计算rnint Make_str()rnrn numstack num;rn pondstack pond;rn num_init(num);//操作数栈numrn pond_init(pond);//操作码栈pondrn //输入判断进栈rn for (n = 0; val[n] != '='; n++)rn rn judge(val[n]);rn if (flag == 0)push_num(num, val[n]);rn elsern rn if (pond.top == pond.base)push_pond(pond, val[n]);rn elsern rn int x, y;rn x = change_opnd(val[n]);rn y = change_opnd(ch = get_top(pond));rn if (x > y)push_pond(pond, val[n]);//栈顶元素优先权低,直接进栈rn else//栈顶元素优先权高,退栈运算结果进栈rn rn number1=pop_num(num );rn operate=pop_pond(pond);rn number2=pop_num(num);rn push_pond(pond,caculate(number1, operate, number2));rn rn rn rn rn while (pond.top != pond.base)rn rn number1 = pop_num(num);rn operate = pop_pond(pond);rn number2 = pop_num(num);rn push_pond(pond, caculate(number1, operate, number2));rn rn result=pop_num(num);rn cout << result;rn return OK;rnrn//主函数rn void main()rn rn cout << "*****************运算表达式判断及运算结果********************" << endl;rn Make_str();rn rnrn调试时错误:0x01226CB9 处有未经处理的异常(在 shiyan2.3.exe 中): 0xC0000005: 写入位置 0x0047A000 时发生访问冲突。rn在*S.top++=number;这。。。。不懂啊,指针不对吗?rn在线等,谢谢了
求大神帮助,在线等!!!
public class Test rn public static void main(String[] args)rn Object fruit=new Fruit();rn Object apple=(Apple)fruit;rn rnrnclass Apple extends Fruitrn rnrnclass Fruitrn rnrn要怎么修改它??
求大神!!!android平台怎么创建sqlite数据库
[color=#FF0000][size=18px] db does not specify a android.test.InstrumentationTestRunner instrumentation or does not declare uses-library android.test.runner in its AndroidManifest.xml[/size][/color]rnrn控制台出现了这样一个提示···怎么破?
求大神帮看看是什么情况
var op = new OfficialOpinionManager().GetAll().Where(p => p.UseropID == Convert.ToInt32(Session["UserID"]));rn List l = new List();//OfficialDocument是一张表rn rn var odd = new OfficialDocumentManager().GetAll();rn rn foreach (var item in op)rn rn rn l.Add(odd.FirstOrDefault(p=>p.ID==Convert.ToInt32(item)));rn rn rp.DataSource = l;rn rp.DataBind();rn用的EFrn[img=http://img.my.csdn.net/uploads/201303/15/1363317181_3747.jpg][/img]
关于android socket通讯,求大神帮看看
写了个android与pc端通信的例子,pc端用的是mfc写的,做服务端。想实现以下功能:rnandroid填写完用户名和密码点击登录按钮,android把用户名和密码打包发给pc端,pc端收到后在发出一条消息给android,android收到并解析这条消息后启动一个新Activity。rn现在的情况是android能给PC发信息,PC端给android发信息收不到。rn这是android的源码:rnpackage com.example.sendtoserver;rnrnimport java.io.BufferedReader;rnimport java.io.BufferedWriter;rnimport java.io.IOException;rnimport java.io.InputStreamReader;rnimport java.io.OutputStreamWriter;rnimport java.net.Socket;rnimport java.net.UnknownHostException;rnrnrnimport android.os.Bundle;rnimport android.os.Message;rnimport android.os.StrictMode;rnimport android.app.Activity;rnimport android.content.Intent;rnimport android.util.Log;rnimport android.view.Menu;rnimport android.view.View;rnimport android.view.View.OnClickListener;rnimport android.widget.Button;rnimport android.widget.EditText;rnrnpublic class MainActivity extends Activityrnrn Socket socket=null;rn String ip="192.168.137.1";rn int port=8888;rn BufferedReader br=null;rn BufferedWriter bw=null;rn Button loginButton=null;rn EditText username=null;rn EditText password=null;rn ReceiveThread receThread=null;rn String receString=null;rn InitThread it=null;rn @Overridern protected void onCreate(Bundle savedInstanceState)rn rn super.onCreate(savedInstanceState);rn setContentView(R.layout.activity_main);rn setContentView(R.layout.activity_main);rn rn loginButton=(Button)this.findViewById(R.id.login);rn loginButton.setOnClickListener(new OnClickListener() rn rn @Overridern public void onClick(View arg0) rn rn // TODO Auto-generated method stubrn if(bw!=null)rn rn tryrn rn bw.write("/Cmd Login /username "+username.getText().toString()+" /password "+password.getText().toString()+" /");rn bw.flush();rn rn catch (IOException e)rn rn // TODO Auto-generated catch blockrn e.printStackTrace();rn rn rn rn );rn username=(EditText)this.findViewById(R.id.username);rn password=(EditText)this.findViewById(R.id.password);rn rn it=new InitThread();rn it.start();rn receThread=new ReceiveThread();rn receThread.start();rn rn class InitThread extends Threadrn rnrn @Overridern public void run() rn rn // TODO Auto-generated method stubrn super.run();rn tryrn rn socket=new Socket(ip,port);rn bw=new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));rn br=new BufferedReader(new InputStreamReader(socket.getInputStream()));rn rn catch (UnknownHostException e)rn rn // TODO Auto-generated catch blockrn e.printStackTrace();rn rn catch (IOException e)rn rn // TODO Auto-generated catch blockrn e.printStackTrace();rn rn rn rn rn class ReceiveThread extends Threadrn rnrn @Overridern public void run()rn rn // TODO Auto-generated method stubrn super.run();rn if(br!=null)rn rn try rn rn int count=0;rn char[] buffer=null;rn while(true)rn rn if((count=br.read(buffer))>0)rn rn break;rn rn rn receString=buffer.toString();rn String[] cmd=parse(receString);rn Intent intent=new Intent();rn intent.putExtra("id",(cmd[2].split(" "))[1]);rn intent.putExtra("queueId",(cmd[3].split(" "))[1]);rn intent.putExtra("queueName",(cmd[4].split(" "))[1]);rn intent.setClass(MainActivity.this,ListActivity.class);rn (MainActivity.this).startActivity(intent);rn rn catch (IOException e) rn rn // TODO Auto-generated catch blockrn e.printStackTrace();rn rn rn rn private String[] parse(String rece)rn rn String[] elem=null;rn elem=rece.split("/");rn return elem;rn rn rn @Overridern public boolean onCreateOptionsMenu(Menu menu)rn rn // Inflate the menu; this adds items to the action bar if it is present.rn getMenuInflater().inflate(R.menu.main, menu);rn return true;rn rn @Overridern protected void onDestroy()rn rn // TODO Auto-generated method stubrn super.onDestroy();rn if(socket!=null)rn rn tryrn rn socket.close();rn rn catch (IOException e)rn rn // TODO Auto-generated catch blockrn e.printStackTrace();rn rn rn if(br!=null)rn rn try rn rn br.close();rn rn catch (IOException e) rn rn // TODO Auto-generated catch blockrn e.printStackTrace();rn rn rn if(bw!=null)rn rn try rn rn bw.close();rn rn catch (IOException e) rn rn // TODO Auto-generated catch blockrn e.printStackTrace();rn rn rn// it.destroy();rn// receThread.destroy();rn rn rn rn
求大神帮看看一条SQL
rnselect replace((wm_concat((select C.GSMDCSINDICATORrn from T_JL_RADIO_CELL A,rn T_JL_RADIO_CELL B,rn T_COM_LOGIC_RADIO_CELL Crn where A.Sitecode = B.SITECODErn and B.Cuid = C.Cuidrn unionrn select D.SITE_CATEGORYrn from T_JL_RADIO_CELL A,rn T_JL_RADIO_ECELL B,rn T_COM_LOGIC_RADIO_ECELL Drn where A.Sitecode = B.SITECODErn and D.Cuid = B.CUID),rn '1',rn '2G',rn '2',rn '2D',rn '3',rn '2G2D',rn '4',rn 'FG',rn '5',rn 'FD',rn '6',rn '7',rn 'LE',rn '8',rn 'LD',rn '9',rn '10',rn 'NB')),rn ',',rn '+')rn from T_JL_RADIO_CELL A,T_JL_RADIO_CELL B,T_COM_LOGIC_RADIO_CELL C,T_COM_LOGIC_RADIO_ECELL Drnrnrn错误信息是[img=https://img-bbs.csdn.net/upload/201805/15/1526357686_9758.png][/img],求大神指点一下rnrn另如果有更好的方案~可以不采用这种方式,需求内容如下[img=https://img-bbs.csdn.net/upload/201805/15/1526357772_309665.png][/img]rn想不到更好的方法了。。rn在线等,急!
求大神帮看看这行代码啥意思?
这代码有点看不懂,rn[color=#FF0000]VAR_DECLSPEC PayloadType payload_type_h264;[/color]rn中的payload_type_h264代表啥数字?rnrn[code=c]rnrn#ifndef PAYLOADTYPE_Hrn#define PAYLOADTYPE_Hrn#include rnrn#ifdef __cplusplusrnextern "C"rn#endifrnrn/* flags for PayloadType::flags */rnrn#define PAYLOAD_TYPE_ALLOCATED (1)rn /* private flags for future use by ortp */rn#define PAYLOAD_TYPE_PRIV1 (1<<1)rn#define PAYLOAD_TYPE_PRIV2 (1<<2)rn#define PAYLOAD_TYPE_PRIV3 (1<<3)rn /* user flags, can be used by the application on top of oRTP */rn#define PAYLOAD_TYPE_USER_FLAG_0 (1<<4)rn#define PAYLOAD_TYPE_USER_FLAG_1 (1<<5)rn#define PAYLOAD_TYPE_USER_FLAG_2 (1<<6)rn /* ask for more if you need*/rnrn#define PAYLOAD_AUDIO_CONTINUOUS 0rn#define PAYLOAD_AUDIO_PACKETIZED 1rn#define PAYLOAD_VIDEO 2rn#define PAYLOAD_TEXT 4rn#define PAYLOAD_OTHER 3 /* ?? */rnrnstruct _PayloadTypernrn int type; /**< one of PAYLOAD_* macros*/rn int clock_rate; /**< rtp clock rate*/rn char bits_per_sample; /* in case of continuous audio data */rn char *zero_pattern;rn int pattern_length;rn /* other useful information for the application*/rn int normal_bitrate; /*in bit/s */rn char *mime_type; /**flags|=((int)flag)rn#define payload_type_unset_flag(pt,flag) (pt)->flags&=(~(int)flag)rn#define payload_type_get_flags(pt) (pt)->flagsrnrnrnORTP_PUBLIC PayloadType *payload_type_new(void);rnORTP_PUBLIC PayloadType *payload_type_clone(PayloadType *payload);rnORTP_PUBLIC char *payload_type_get_rtpmap(PayloadType *pt);rnORTP_PUBLIC void payload_type_destroy(PayloadType *pt);rnORTP_PUBLIC void payload_type_set_recv_fmtp(PayloadType *pt, const char *fmtp);rnORTP_PUBLIC void payload_type_set_send_fmtp(PayloadType *pt, const char *fmtp);rnORTP_PUBLIC void payload_type_append_recv_fmtp(PayloadType *pt, const char *fmtp);rnORTP_PUBLIC void payload_type_append_send_fmtp(PayloadType *pt, const char *fmtp);rnrn#define payload_type_get_bitrate(pt) ((pt)->normal_bitrate)rn#define payload_type_get_rate(pt) ((pt)->clock_rate)rn#define payload_type_get_mime(pt) ((pt)->mime_type)rnrnORTP_PUBLIC bool_t fmtp_get_value(const char *fmtp, const char *param_name, char *result, size_t result_len);rnrn#define payload_type_set_user_data(pt,p) (pt)->user_data=(p)rn#define payload_type_get_user_data(pt) ((pt)->user_data)rnrnrn/* some payload types */rn/* audio */rnVAR_DECLSPEC PayloadType payload_type_pcmu8000;rnVAR_DECLSPEC PayloadType payload_type_pcma8000;rnVAR_DECLSPEC PayloadType payload_type_pcm8000;rnVAR_DECLSPEC PayloadType payload_type_l16_mono;rnVAR_DECLSPEC PayloadType payload_type_l16_stereo;rnVAR_DECLSPEC PayloadType payload_type_lpc1016;rnVAR_DECLSPEC PayloadType payload_type_g729;rnVAR_DECLSPEC PayloadType payload_type_g7231;rnVAR_DECLSPEC PayloadType payload_type_g7221;rnVAR_DECLSPEC PayloadType payload_type_g726_40;rnVAR_DECLSPEC PayloadType payload_type_g726_32;rnVAR_DECLSPEC PayloadType payload_type_g726_24;rnVAR_DECLSPEC PayloadType payload_type_g726_16;rnVAR_DECLSPEC PayloadType payload_type_aal2_g726_40;rnVAR_DECLSPEC PayloadType payload_type_aal2_g726_32;rnVAR_DECLSPEC PayloadType payload_type_aal2_g726_24;rnVAR_DECLSPEC PayloadType payload_type_aal2_g726_16;rnVAR_DECLSPEC PayloadType payload_type_gsm;rnVAR_DECLSPEC PayloadType payload_type_lpc;rnVAR_DECLSPEC PayloadType payload_type_lpc1015;rnVAR_DECLSPEC PayloadType payload_type_speex_nb;rnVAR_DECLSPEC PayloadType payload_type_speex_wb;rnVAR_DECLSPEC PayloadType payload_type_speex_uwb;rnVAR_DECLSPEC PayloadType payload_type_ilbc;rnVAR_DECLSPEC PayloadType payload_type_amr;rnVAR_DECLSPEC PayloadType payload_type_amrwb;rnVAR_DECLSPEC PayloadType payload_type_truespeech;rnVAR_DECLSPEC PayloadType payload_type_evrc0;rnVAR_DECLSPEC PayloadType payload_type_evrcb0;rnVAR_DECLSPEC PayloadType payload_type_silk_nb; rnVAR_DECLSPEC PayloadType payload_type_silk_mb;rnVAR_DECLSPEC PayloadType payload_type_silk_wb;rnVAR_DECLSPEC PayloadType payload_type_silk_swb;rnrn /* video */rnVAR_DECLSPEC PayloadType payload_type_mpv;rnVAR_DECLSPEC PayloadType payload_type_h261;rnVAR_DECLSPEC PayloadType payload_type_h263;rnVAR_DECLSPEC PayloadType payload_type_h263_1998;rnVAR_DECLSPEC PayloadType payload_type_h263_2000;rnVAR_DECLSPEC PayloadType payload_type_mp4v;rnVAR_DECLSPEC PayloadType payload_type_theora;rn[color=#FF0000]VAR_DECLSPEC PayloadType payload_type_h264;[/color]rnVAR_DECLSPEC PayloadType payload_type_x_snow;rnVAR_DECLSPEC PayloadType payload_type_jpeg;rnVAR_DECLSPEC PayloadType payload_type_vp8;rnrnVAR_DECLSPEC PayloadType payload_type_g722;rnrn/* text */rnVAR_DECLSPEC PayloadType payload_type_t140;rnVAR_DECLSPEC PayloadType payload_type_t140_red;rnrn/* non standard file transfer over UDP */rnVAR_DECLSPEC PayloadType payload_type_x_udpftp;rnrn/* telephone-event */rnVAR_DECLSPEC PayloadType payload_type_telephone_event;rnrn#ifdef __cplusplusrnrn#endifrnrn#endifrnrn[/code]
新写的进制转换,求大神帮看看
[code=c]#includernusing std::cout;rnusing std::cin;rnusing std::endl;rnlong power(int m,long x);rnlong otherToTen(int m,long i);rnlong tenToOther(int m,long i);rnvoid check(int m);rnint main()rnrn int m1=0,m2=0;rn long i=0,j=0,k=0;rn cout << "请输入原进制:" << endl;rn cin >> m1;rn check(m1);rn cout << "请输入原数值:" << endl;rn cin >> i;rn j=otherToTen(m1,i); //j为原进制转成的10进制数rn cout << "请输入转换目标进制:" << endl;rn cin >> m2;rn check(m2);rn k=tenToOther(m2,j); //k为最终数值rn cout << "转换后的数值为:" << k << endl;rn getchar();rn return 0;rnrnrnvoid check(int m)rnrn if ( m <= 0 )rn rn cout << "请输入正整数进制!\n";rn getchar();rn exit(0);rn rnrnrnlong power(int m,long x)rnrn long answer=1;rn if ( m == 0)rn rn answer = 1;rn rn if ( m == 1)rn rn answer = x;rn rn if ( m > 1)rn rn for (int i=1;i<=m;i++)rn rn answer=answer * x;rn rn return answer;rn rnrnrnlong tenToOther(int m,long i)rnrn int w,n=0;rn long answer=0;rn for (w=1;power(w-1,m)
求大神帮小弟看看问题所在!
程序能够运行,但是打开附件的秒表点击按钮没有反应,单独一个秒表程序可以。请大神看看问题出在哪里,帮忙修改一下,感激不尽[code=java]import java.awt.*;rnrnimport javax.swing.*;rnrnimport java.awt.event.*;rnrnpublic class NotePad extends JFrame rn JTextArea jta;rnrn class newl implements ActionListener rn public void actionPerformed(ActionEvent e) rn jta.setText("");rn rn rnrn class openl implements ActionListener rn public void actionPerformed(ActionEvent e) rn JFileChooser jf = new JFileChooser();rn jf.showOpenDialog(NotePad.this);rnrn rnrn rnrn // 保存文件的监听rn class savel implements ActionListener rn public void actionPerformed(ActionEvent e) rn JFileChooser jf = new JFileChooser();rn jf.showSaveDialog(NotePad.this);rnrn rn rnrn // 退出记事本的监听rn class exitl implements ActionListener rn public void actionPerformed(ActionEvent e) rn System.exit(0);// 退出rn rn rnrn class timerl implements ActionListener rn public void actionPerformed(ActionEvent e) rn new TestTimer() ;// 秒表rn rn rnrn class tipl implements ActionListener rn public void actionPerformed(ActionEvent e) rn JOptionPane.showMessageDialog(null, "程序 信息");rn rn rn // 构造函数rn public NotePad() rn jta = new JTextArea("", 24, 40);rn JScrollPane jsp = new JScrollPane(jta);rn JMenuBar jmb = new JMenuBar();rn JMenu mFile = new JMenu("文件");rn JMenu mStuff = new JMenu("附件");rn JMenu mHelp= new JMenu("帮助");rnrn JMenuItem mNew = new JMenuItem("新建");rn mNew.addActionListener(new newl());rn mFile.add(mNew);rnrn JMenuItem mOpen = new JMenuItem("打开");rn mOpen.addActionListener(new openl());rn mFile.add(mOpen);rnrn JMenuItem mSave = new JMenuItem("保存");rn mSave.addActionListener(new savel());rn mFile.add(mSave);rnrn mFile.addSeparator(); // 添加分割线rn rn JMenuItem mExit=new JMenuItem("退出");rn mExit.addActionListener(new exitl());rn mFile.add(mExit);rn //rn JMenuItem mTime=new JMenuItem("秒表");rn mTime.addActionListener(new timerl());rn mStuff.add(mTime);rn rn JMenuItem mTi=new JMenuItem("关于");rn mTi.addActionListener(new tipl());rn mHelp.add(mTi);rnrn rn jmb.add(mFile);rn jmb.add(mStuff);rn jmb.add(mHelp);rnrn setJMenuBar(jmb);rnrn setTitle("课程设计 ");rn getContentPane().add(jsp);rn setSize(634, 500);rn setVisible(true);rn rnrn// 主函数,程序入口点rn public static void main(String s[]) rn new NotePad();rn rnrnrnrn/*.........................................................*/rnclass TestTimer extends JFrame implements ActionListener, Runnable rn private static TestTimer obj;rn private JButton btnStart;rn private JButton btnPause;rn private JButton btnResume;rn private JButton btnStop;rn private JLabel lblTime;rn private static Thread th;rn private long count;rnrn public TestTimer() rn super("秒表");rn btnStart = new JButton("开始");rn btnPause = new JButton("暂停");rn btnResume = new JButton("继续");rn btnStop = new JButton("停止");rn lblTime = new JLabel("00:00:00.000");rn this.setLayout(new FlowLayout());rn this.add(btnStart);rn this.add(btnPause);rn this.add(btnResume);rn this.add(btnStop);rn this.add(lblTime);rn btnStart.addActionListener(this);rn btnPause.addActionListener(this);rn btnResume.addActionListener(this);rn btnStop.addActionListener(this);rn this.setSize(167, 144);rn this.setResizable(false);rn this.setVisible(true);rn rnrn public static void main(String[] args) rn obj = new TestTimer();rn rnrnrn public void actionPerformed(ActionEvent e) rn JButton btn = (JButton) e.getSource();rn if (btn.getText().equals("开始")) rn th = new Thread(obj);rn count = 0;rn th.start();rn else if (btn.getText().equals("暂停")) rn th.suspend();rn else if (btn.getText().equals("继续")) rn th.resume();rn else if (btn.getText().equals("停止")) rn th.stop();rn rn rnrn public void run() rn while (true) rn int ms, seconds, minutes, hours;rn String msg = "";rn hours = (int) (count / 3600000);rn minutes = (int) ((count - hours * 3600000) / 60000);rn seconds = (int) ((count - hours * 3600000 - minutes * 60000) / 1000);rn ms = (int) (count % 1000);rn if (hours < 10) rn msg += "0" + hours + ":";rn else rn msg += hours + ":";rn rn if (minutes < 10) rn msg += "0" + minutes + ":";rn else rn msg += minutes + ":";rn rn if (seconds < 10) rn msg += "0" + seconds + ":";rn else rn msg += seconds + ":";rn rn if (ms < 10) rn msg += "00" + ms;rn else if (ms < 100) rn msg += "0" + ms;rn else rn msg += ms;rn rn lblTime.setText(msg);rn count++;rn try rn Thread.sleep(1);rn catch (InterruptedException e) rn e.printStackTrace();rn rn rn rnrn[/code]
求大神帮看看这个代码
想实现运行时弹出form2,隐藏form1,3秒后form2关闭,form1显示,我的代码是写在form1里的,麻烦看看有什么问题吗?十分感谢!rn int k; rn ruanjian.Form2 fm2 = new ruanjian.Form2();rnprivate void Form1_Load(object sender, EventArgs e)rn rn this.Hide();rn fm2.Show();rn timer1.Interval = 1000;rn timer1.Start();rn rn rnprivate void timer1_Tick(object sender, EventArgs e)rn rn k++;rn if (k ==3)rn rn fm2.Close();rn this.Show();rn
ZEOSDBO在D7里控制和读取SQLite的数据
谁有ZEOSDBO在D7下控制和读取SQLite的demo,发给我看下好吗?邮箱:137101195@qq.comrn控件包里的example里的需要装别的控件,而且编译不过,真搞不懂。rnrn我搞了很久总是报错,请教什么问题?rnrnprocedure TMainFrm.ExceSQL(str: string);rnrn//*********执行SQL语句***********//rnrnbeginrn ZConnection1.Connected:= True;rn ZQuery1.SQL.text:=str;rn ZQuery1.Open;rn ZQuery1.ExecSQL;rn ZQuery1.Active;rn ZQuery1.Close;rn ZConnection1.Connected:= False;rnend;rnrnprocedure TMainFrm.FormCreate(Sender: TObject);rnrn//***********主窗口创建*****************//rnrnvarrn i,x,Row,Col,RowNo,ColNo,h,w: Integer;rn p: TPanel;rnbeginrn ZConnection1.Database:= DBFile;rn self.ExceSQL('create table MSGroup(ID INTEGER PRIMARY KEY,CreateDate,CreateUserID,RecordState,Name,UpID,Description,LevelCode)');rn self.ExceSQL('create table MSSG(ID INTEGER PRIMARY KEY,CreateDate,CreateUserID,RecordState,Name,Type,Format,GroupID)');rn self.ExceSQL('CREATE TABLE MSVW(ID INTEGER PRIMARY KEY,CreateDate,CreateUserID,RecordState,Name,Type,Port,BaudRate,RowNo,ColNo,PWidth)');rn self.ExceSQL('insert into MSVW(RowNo,ColNo,PWidth) values (5,13,897)');rn self.ExceSQL('select * from MSVW');rnend;rnrn运行就报错,提示数据库找不到,有时候又说第一个表已经存在,我每次运行的时候都会把数据库删除,rn现在好像是创建第一个表后就报错,在数据库里打开有第一个插入的表。rnrnrnrn网上好像几乎没有很系统的zeosdbo控件的资料,
求大神帮写一段sql语句 在线等!!!!
有个现成的sql 语句 往里加sql语句 远程帮我写下 写下
action找不到呀,在线急等,求各位大神帮帮忙~~~
strusts配置文件:rnrn rnrn /eee.jsprn /error.htmlrn rnrnrnrnJSP页面:rn rnrn帮忙看看吧~~
找不到元素 'proxool-config' 的声明。在线等!急求大神!
xml代码如下:rn[code=text] rn rn rn dbnamern jdbc:oracle:thin:@localhost:1521:orclrn oracle.jdbc.driver.OracleDriverrn rn rn rn rn 500rn 2rn 90000rn 10rn 5rn truern select sysdate from dualrn rn [/code]rn报错:找不到元素 'proxool-config' 的声明。rn
VS2008调用sqlite数据库,中文乱码!
VS是用的unicode编码.,开始没有对中文字符进行处理,生成的sqlite数据库在Android平台上读出来的是乱码!rn后来我用下面这段代码对中文进行了编码转换,转换后的UTF8char也是乱码!弄了一天了, 求帮助啊!rn[code=c] int unicodeLen = WideCharToMultiByte(CP_ACP, NULL, str, -1, NULL, 0, NULL, NULL);rn char* UTF8Char = new char[unicodeLen + 1];rn ::WideCharToMultiByte(CP_UTF8, NULL, str, -1, UTF8Char, unicodeLen, NULL, NULL);rn UTF8Char[unicodeLen] = '\0';rn return UTF8Char;[/code]
编译成功了,但是程序运行不了,大神请看看
#include rnint main()rnrn double a;rn double b;rn rn scanf("%lf,%lf",&a, &b);rnrn printf("result: %.3lf \n",a*b );rnrn return 0;rnrnrn程序运行却是这样的结果[img=https://img-bbs.csdn.net/upload/201704/23/1492941692_605071.png][/img]
SQLite数据库读取
打开数据库文件 sqlite3 xxx.db 此时命令提示符变成了&amp;gt; 显示有多少个表 .tables 显示所有的建表语句, 可以得知表的结构 .schema 显示某个表的具体内容 select * from 表名; 将输出导入文件中 .output 文件名 此后所有的命令输出都会重定向到文件 退出终端 .exit firefox上有个SQLite Ma...
SQLite数据库编写的课程表
主要练习Android中小型数据库SQLite的使用,很适合初学者学习
VC 读取SQLite数据库中的表的数据
MFC下,我想读取存取在SQLite中一个表的所有数据,然后以listView显示,该怎么办呀?rn 补充:主要是如何遍历所有的行?这一点文档中都没有找到相应的函数啊?rn 急急急!
相关热词 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池 c#5.0 安装程序 c# 分页算法 c# gmail 发邮件 c# 多层文件