看看下面这段字符串如何才能最有效解析啊,正则可以吗 [问题点数:40分]

Bbs2
本版专家分:223
结帖率 98.93%
Bbs7
本版专家分:14382
Bbs10
本版专家分:114994
Blank
微软MVP 2012年4月 荣获微软MVP称号
2003年4月 荣获微软MVP称号
Blank
红花 2008年2月 VB大版内专家分月排行榜第一
2003年4月 VC/MFC大版内专家分月排行榜第一
2002年11月 VC/MFC大版内专家分月排行榜第一
Blank
黄花 2011年11月 VC/MFC大版内专家分月排行榜第二
2008年3月 VB大版内专家分月排行榜第二
2008年3月 硬件/嵌入开发大版内专家分月排行榜第二
2003年4月 其他开发语言大版内专家分月排行榜第二
2003年4月 VB大版内专家分月排行榜第二
2003年3月 VB大版内专家分月排行榜第二
Blank
蓝花 2008年5月 其他开发语言大版内专家分月排行榜第三
2008年4月 其他开发语言大版内专家分月排行榜第三
2008年3月 其他开发语言大版内专家分月排行榜第三
2003年3月 VC/MFC大版内专家分月排行榜第三
2003年5月 其他开发语言大版内专家分月排行榜第三
Bbs3
本版专家分:532
看看下面这段代码的错误
[code=sql]rnif exists(select top(1)1 from sys.objects with(nolock) where name=N'tb' and type=N'U')rn drop table tbrncreate table tb(hobbyid int,hname varchar(10))rninsert into tb(hobbyid,hname)rnselect 1,N'爬山' union all rnselect 2,N'游泳' union all rnselect 3,N'吃货'rnrn--应用FOR XML PATH查询语句执行rnselect * from tb with(nolock) for xml pathrn--结果:rn/*rnrn 1rn 爬山rnrnrn 2rn 游泳rnrnrn 3rn 吃货rnrn*/rn--由此可见FOR XML PATH可以将查询结果根据行输出成XML格式rn--那么,<em>如何</em>改变XML行节点的名称呢?代码如下:rnselect * from tb with(nolock) for xml path('行节点名称')rn/*rnrn 1rn 爬山rnrnrn 2rn 游泳rnrnrn 3rn 吃货rnrn*/rn--原来的行节点变成了path后面括号()中的内容,自定义的名称rn--那么,又<em>如何</em>改变列节点的名称呢?使用as为列改变名字!rnselect hobbyid as '第一列',hname as '第二列' from tb with(nolock) for xml path('行节点名称')rn/*rnrn 1rn 爬山rnrnrn 2rn 游泳rnrnrn 3rn 吃货rnrn*/rn--<em>下面</em>来看<em>如何</em>构建输出方式rnselect '[ '+hname+' ]' from tb with(nolock) for xml path('')rn/*rn[ 爬山 ][ 游泳 ][ 吃货 ]rn*/rnselect ' '+str(hobbyid,1)+' ','[ '+hname+' ]' from tb with(nolock) for xml path('')rn/*rn 1 [ 爬山 ] 2 [ 游泳 ] 3 [ 吃货 ]rn*/rnrn--------------------------rn--<em>下面</em>看for xml path的应用rn--增加一张兴趣爱好表rnif exists(select top(1)1 from sys.objects with(nolock) where name=N'tb2' and type=N'U')rn drop table tb2rncreate table tb2(iid int,sname varchar(10),hobby varchar(10))rninsert into tb2(iid,sname,hobby)rnselect 1,N'张三',N'爬山' union all rnselect 2,N'张三',N'游泳' union all rnselect 3,N'李四',N'吃货' union all rnselect 4,N'李四',N'吃货' union all rnselect 5,N'王五',N'游泳' union all rnselect 6,N'王五',N'吃货'rnrnselect b.sname,LEFT(hlist,LEN(hlist)-1) as hobby from(rn select sname,(select hobby+',' from tb2 with(nolock) where sname=a.sname for xml path(''))as hlistrn from tb2 arn group by snamern)brnrnselect snamern,hobby=(STUFF((select ','+hobby from tb2 with(nolock) where sname=a.sname for XML path('')),1,1,'')) rnfrom tb2 a with(nolock) group by snamernrn--取出重复的列的两种方法rnselect snamern,hobby1=(STUFF((select ','+hobby from tb2 with(nolock) where sname=a.sname for XML path('')),1,1,'')) rn,hobby2=(STUFF((select distinct ','+hobby from tb2 with(nolock) where sname=a.sname for XML path('')),1,1,'')) rn,hobby3=(STUFF((select ','+hobby from tb2 with(nolock) where sname=a.sname group by hobby for XML path('')),1,1,'')) rnfrom tb2 a with(nolock) group by snamernrndrop table tbrndrop table tb2rnrnrn[/code]
帮忙看看下面这段代码?
提示,<em>这段</em>代码错误?rnset myRS=myConn.Execute(strSQL)rn<em>如何</em>解决我是不是还需要在数据库里加入一个表"shopperinfopoints"rnrn<em>下面</em>是将idShopper读入Session中代码rnsession("idShopper")=myRS(0) rninsertInfoEPointsValues=session("idShopper")&","&insertInfoEPointsValuesrninsertInfoEPointsFields="fidShopper,"&insertInfoEPointsFieldsrnstrSQL="INSERT INTO ShopperInfoPoints("&insertInfoEPointsFields&") values("&insertInfoEPointsValues&")"rnset myRS=myConn.Execute(strSQL)rnrn
看看下面这段代码
请<em>看看</em><em>下面</em><em>这段</em>代码:rnrnclass CCnetThread : public CWinThreadrnrnpublic:rn CCnetThread(AFX_THREADPROC pfnThreadProc);rn static UINT ThreadFunc(LPVOID pObj); rn rn// Operationsrnprivate: rn CAsyncSocket m_WorkSocket;rn ...rn;rnrnUINT CCnetThread::ThreadFunc(LPVOID pObj)rnrn CCnetThread* pThread = (CCnetThread*)pObj; rnrn pThread->InitVariables();rnrn pThread->StartWork();rnrn return 0;rnrnrnBOOL CCnetThread::InitVariables()rnrn if ( m_WorkSocket.m_hSocket == INVALID_SOCKET )rn rn if ( !m_WorkSocket.Create(TCP_PORT_CONN) )rn rn TRACE("connect thread(%d): create work socket failed(%d)\n", this->m_nThreadID, rn m_WorkSocket.GetLastError() );rnrn return FALSE;rn rn rn return TRUE;rnrnrnvoid CCnetThread::StartWork()rnrn BOOL bDone = FALSE;rnrn while ( !bDone )rn rn if ( !bDone )rn bDone = WaitToExit();rn rn if ( !bDone )rn bDone = WaitToClose();rn rnrn CleanUp();rnrnrnvoid CCnetThread::CleanUp()rnrn // close work socketrn m_WorkSocket.Close();rnrnrn每次在CAsyncSocket::Close()中出错,这是为什么?
看看下面这段邮件发送的代码/
我下载了jmail4.3,在我的机器上注册了,运行没有错误!就是收不到信!rnrn
验证字符串有效的常见正则
只能输入数字:"^[0-9]*$" 只能输入 n 位的数字:"^\d{n}$" 只能输入至少 n 位的数字:"^\d{n,}$" 只能输入 m ~ n 位的数字:"^\d{m,n}$" 只能输入零和非零开头的数字:"^(0|[1-9][0-9]*)$" 只能输入有两位小数的正实数:"^[0-9]+(.[0-9]{2})?$" 只能输入有 1~3 位小数的正实数:"^[0-9]...
谁能解析下面这段json
麻烦大神<em>解析</em><em>这段</em>坑爹的jsonrn[7025,"jtcym@163.com","t,e\"s't"]rn
js 正则解析字符串
<em>字符串</em>: 大学生心理健康教育(二)[I04BG113_02](7-12)11103(68人) <em>解析</em><em>正则</em>: var pp = v.match(/.*(?=\[)/); var cname = pp[0]; pp = v.match(/(?&lt;=\[).*(?=\])/); var courseno ...
这段正则如何理解
[code=html] rn rn rn[/code]rn[code=javascript]function del_ff(elem)rnvar elem_child = elem.childNodes;rnfor(var i=0; i
怎样解析这段字符串
stdClass Object ( [date] => 1504145011 [ticker] => stdClass Object ( [high] => 3900.00 [vol] => 22483.07 [last] => 3720.34 [low] => 3502.00 [buy] => 3720.58 [sell] => 3734.55 ) ) rnrn比如得到其中的 date 和 sell 值,谢谢
如何才能有效沟通
文\舒化鲁 中国企业规范化管理网首席专家 <em>有效</em>的沟通是提高企业组织运行效益的一个重要环节。实现管理沟通规范化,也就是通过把一种高效、科学的沟通技巧和方法作为一种管理人员的具体管理行为规范确立下来,让每个管理人员都遵照执行。 认为沟通是很简单的事,从而在管理沟通中不愿花精力、投入时间,准备不充分,实施沟通不慎重,必然不会有良好<em>有效</em>的沟通。 沟通本身就是与他人进行深层交往...
这段正则是不是错了啊
tppabs=//www.****.com/images/bg.gif"rn上面这句的<em>正则</em>写成了:\btppabs="h[^"]*"rnrn但这样匹配好象不对吧,前面好理解,就是到这里我就不理解了:"h[^"]rn这句的意思是说在“h后面的第一个字符必须是"。但是,实际情况"http:即h字母后面是tt.不知这么理解对吗
下面这段代码什么意思啊?
<em>下面</em><em>这段</em>代码什么意思啊?rn public eCool.WebPanelBar.Item this[int Index] rn rn get rn rn return (eCool.WebPanelBar.Item)List[Index];rn rn set rn rn List[Index] = value;rn rn
[求助]xml的解析,大家帮我看看下面这段代码
<em>下面</em><em>这段</em>代码为什么<em>解析</em>不出来和呢?rn[code=C/C++]rn#include rn#include rn#include rn#include rnrnrnint main(int argc, char *argv[])rnrn QCoreApplication a(argc, argv);rnrn QString firstName="";rn QString lastName="";rn QString filePath = "D://Share//Qt//xmlreader//xmlreader//xmlreader.xml";rn QFile xmlFile(filePath);rn qDebug()rnrn大家帮我<em>看看</em>吧
正则正则?!! 帮忙看看,谢谢
XXX网站价:¥99.00XXXX (X代表其他字符)rnrn我怎么样匹配这个<em>正则</em> , 只要有“网站价”出现,我就能取到后面的数字 , rn也是出现 网站价 我能取到 99.00 , rnrn大家帮忙拉。rn而且冒号可以是英文冒号或者中文冒号rnrnpreg_match("??????",$temp,$内容); rnrn想大家帮忙了,我写<em>正则</em>真的很晕,老是写不出来。
各位高手看看下面这段asp怎么有错啊
rnrnrnrn=#00:00:00# then %>rn早上好,很高兴见到你!rn=#12:00:00# then %>rn下午好,很高兴见到你!rnrn晚上好,欢迎光临我的主页,请填写以下信息:rn rn 姓名rnrnrn地址rnrnrn 性别:rn先生rn女士rn rnrnrnrnrn欢迎你rn先生。rnrnrn欢迎你rn女士。rnrnrn欢迎你rnrnrnrnrnrnrnrn
急啊?如何解析下面文件.
1.文件是以二制流传过来的,<em>如何</em><em>解析</em><em>下面</em>"€€"这些内容啊!rnrn-------------------518029szbg5lrnContent-Disposition: form-data; name="bbc"; filename="f:\Record\SVR4\265-20060522155615.wav"rnContent-Type: application/octet-streamrnrn€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ 垁€€€€€€€€€€€€€€€€€€€€€ € ?€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ ?€€€€€ 悁€€€ €€€€€€€憟 €€€€€€€€€ ? €€ €€€ €€€ €€€€€ €€€€€€ €€€€€€€€€€€€€€ €€€€ €€€€€€€€€ rnrn-------------------518029szbg5lrnContent-Disposition: form-data; name="lastname"rnrnfalkenrn-------------------518029szbg5lrnContent-Disposition: form-data; name="firstname"rnrnprofessorrn-------------------518029szbg5l--rn
java如何解析下面这样的xml啊?
rnrn rn rn 18830rn 16639rn 4696rn 4240rn 4203rn 291rn 312rn 366rn rn rnrn
帮我看看下面这段文字用的是什么编码啊?
编码后的文字:大æ件中å人åå±årn原文:大文件中华人民共和国
请帮我看看下面这段代码的意思,谢谢啊!!
请大家帮我仔细讲讲<em>下面</em>两段代码的含义,谢谢!rnPublic Function Word_Byte(S_Data As Long) As VariantrnDim t(2) As Byternt(0) = CByte(S_Data Mod 256)rnt(1) = CByte(S_Data \ 256)rnWord_Byte = Array(t(0), t(1))rnEnd FunctionrnrnrnPublic Function sbyte_word(strg() As Byte, Sit As Variant) As Longrn On Error GoTo sberexitrn sbyte_word = (strg(Sit) - 48) * 10 + (strg(Sit + 1) - 48)rn GoTo sbw_exitrnsberexit:rn sbyte_word = 0rnsbw_exit:rnEnd Function
如何驱蚊最有效
http://zhidao.baidu.com/link?url=tzYqR0f89FagzEKJqYsnH5263uWPhakKNhaBL7Jtto2lhZiGC_Ag9yPM-0T51reCaVT6ilGRjhHqNW6HY6K0xa 入夏后,黄梅天将接踵而至,讨厌的蚊子又将“嗡嗡”飞舞。人被蚊子叮咬后,除了痒、疼痛外,蚊子还会传染疟疾、丝虫病、登革热、流行性乙型脑炎等多种疾病。  ·点一盘...
js正则解析SQL字符串
rn<em>正则</em>表达式 <em>解析</em>SQL 语法<em>字符串</em>rnrn<em>字符串</em>样例rnrn[code=JScript]rnrnselect * from mtabrnrnselect * from mtab where id=10rnrnselect * (select * from mmtab where id=10) where id=10rn//取得 (select * from mmtab where id=10)rnrnselect * (select * from mmtab where (id=10 and zz=5)) where id=10rn//取得 (select * from mmtab where (id=10 and zz=5))rnrnselect * (select * from mmtab where (id=10 and zz=5)) where (id=10 zz=5)rn//取得 (select * from mmtab where (id=10 and zz=5))rnrnselect * (select * from mmtab where (id=10 and zz=5)) where (id=10 zz=5) order by id descrn//取得 (select * from mmtab where (id=10 and zz=5)) rnrnrn[/code]rnrnrn所有后边也可能没有where子句rnrn先谢谢大家了rnrnrnrnrnrn
c# 求正则解析字符串
=08310000=08310000=08310000=08310000=08310000=08310000=08310000=08310000rn=00000000=00000000=00000000=00000000=00000000=00000000=00000000=00000000rn=0831000-=0831000-=0831000-=0831000-=0831000-=0831000-=0831000-=0831000-rnrn这是3段从串口读出来的数据 分别是 正数 零 负数rnrn求<em>正则</em> 截取 = 号后边 8位
请问怎么样才能有效的学好单片机???
thanks!!!
帮我看看这段代码什么意思, 正则+rewrite
RewriteEngine ONrnRewriteCond %HTTP_HOST ^www.21andy.com$ [OR]rnRewriteCond %REQUEST_URI ^/$rnRewriteRule ^(.*)$ http://www.21andy.com/folder [R=301,L]rnrn这是apache主机.htaccess的301转向,对于第2个条件和重写规则不是很明白,哪位解释一下?谢谢!
帮我看看这段正则替换哪里错了?
string = string.replace( /([^\[]*)/g,'[URL]$2[/URL]');rnrn就是想将html的连接,转成ubb代码.rnrn帮俺<em>看看</em>吧.
达人帮我看看这段正则字段
"/[\n\r\t]*\eval\s+(.+?)\[\n\r\t]*/ies"rn后面跟个]ies不知道有什么作用 rn先谢谢了
帮忙看看这段程序啊
帮忙<em>看看</em><em>这段</em>程序啊library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity san isport(clk:in std_logic;     sanut std_logic_vector(7 downto 0));end;architec
如何理解下面这段程序?
function enter()rn chatWin = window.open("main.asp","chatWin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,WIDTH=630,HEIGHT=540");rn chatWin.location.href = "main.asp"rn if(navigator.appVersion.indexOf("4") != -1)rn chatWin.moveTo(0,0);rn rn rnrn function closeWin()rn chatWin.close();rn rn我新学asp,请大家指导指导,谢谢
如何优化下面这段代码?
for (int i=0;i>8)&REDMASK;rnwdG = ((GETGREENVALNOTRAN(wdPixelSrc)*btTranAlp + GETGREENVALNOTRAN(wdPixelDst)*otherTranAlp/*(255-btTranAlp)*/)>>8)&GREENMASK;rnwdB = ((GETBLUEVALNOTRAN(wdPixelSrc)*btTranAlp + GETBLUEVALNOTRAN(wdPixelDst)*otherTranAlp/*(255-btTranAlp)*/)>>8)&BLUEMASK;rn*(WORD*)( lpBtDstData+nDstBegIdx) = (wdR|wdG|wdB); rnrn nSrcBegIdx=nSrcBegIdx+2;rn nDstBegIdx=nDstBegIdx+2;rn nSrcBegIdxAlp++;rn rn nDstBegIdx = (nDstBegIdxbk=nDstBegIdxbk+nLineBytesDst);rn nSrcBegIdx = (nSrcBegIdxbk=nSrcBegIdxbk+nLineBytesSrc);rn nSrcBegIdxAlp = (nSrcBegIdxAlpbk = nSrcBegIdxAlpbk+m_stImageAttribute.m_dwWidth);rn rn由于上面<em>这段</em>代码有二次循环,每次都要进行6次乘法运算,如果是800*480的屏的话,刷新会非常慢,请问各位有什么好的方法进行优化吗?
新手!!帮我看看下面这段程序!!谢谢
<em>下面</em><em>这段</em>程序昨天还好用,可是现在总提示我rn.update那地方有错误,请前辈们帮助<em>看看</em>,谢谢rn----------------------------------------------------------------------rnrnrnrnrnrn
有谁帮我看看下面这段代码!
clsPowers.cls类:rnrnPrivate mPowers() As POWERSINFOrnPrivate mCount As IntegerrnrnPublic Sub Add(Text As String, Description As String) '添加新权限rn ReDim Preserve mPowers(mCount) As POWERSINFOrn With mPowers(mCount)rn .Index = mCountrn .Text = Textrn .Description = Descriptionrn End Withrn mCount = mCount + 1rnEnd SubrnrnPublic Property Get Count() As Integerrn Count = mCountrnEnd PropertyrnPublic Property Get Powers(Index As Integer) As POWERSINFOrn With Powers(Index)rn .Index = mPowers(Index).Indexrn .Text = mPowers(Index).Textrn .Description = mPowers(Index).Descriptionrn End WithrnEnd Propertyrnrn其中POWERSINFO类型为DLL文件引用如下:rnpublic type POWERSINFOrn Index as integerrn Text as stringrn Description as stringrnEnd typernrn'========Form_Load ==========rndim gPowers as clsPowersrnset gPowers =new clsPowersrngPowers.Add "来宾用户", "只具有查看权限"rnSqlstr = gPowers.Powers(0).Textrnrnrn==========运行出错==========rn运行到SqlStr= gPowers.Powers(0).Text这一行进入以下过程rnrnPublic Property Get Powers(Index As Integer) As POWERSINFOrn With Powers(Index) '******这一句出错:溢出堆栈空间.rn .Index = mPowers(Index).Indexrn .Text = mPowers(Index).Textrn .Description = mPowers(Index).Descriptionrn End WithrnEnd Propertyrn
大家帮我看看下面这段代码,很短的
datetime d_begin,d_endrnstring t_filterrnrnd_begin=datetime(date(trim(sle_1.text)))rnd_end=datetime(date(trim(sle_2.text)))rnt_filter="shijian =d_begin"rn//字段时间是datetime类型变量rndw_1.setfilter(t_filter)rndw_1.filter()rn那儿出现了问题?????rnrnrn
大家帮我看看下面这段JSP代码
不知道错在哪里,是从书上摘抄的,是关于保存成为word文档的rnrnrnrnrnrnrn rn--%>rnrnrnrnrn rn rn JSP Pagern rn rnrn JSP Pagern Good morning ! This is wuyong speaking !rn rn rn rn rn rn rn rn rnrn
请大家帮忙看看下面这段代码
SetFocusPosDirect()是一个向串口发送命令的函数,在主线程运行时,串口收到的回复信号总是正确的,但是同样的命令从 camera_control_thread()发出,返回的字节总是不对,而且每次都不一样,这究竟是为什么呢?谢谢大家!rnrnrn[quote]rn[code= c]rnrnrn#include rn#include "visca.h"rnrnrnrnpthread_mutex_t g_mutex = PTHREAD_MUTEX_INITIALIZER;rnpthread_cond_t g_cond = PTHREAD_COND_INITIALIZER;rnrnrn rnint g_quit; rnint g_key = -1; rnbool ICR=false; rnint fd; rnint zoom = 0;rnint focusMode=2;rnint focusPos = 0x8;rnstatic void * camera_control_thread(void * param)rnrnrn pthread_mutex_lock(&g_mutex);rn printf("start1\n");rn SetFocusPosDirect(fd,1);rn printf("end1\n");rnrn pthread_mutex_unlock(&g_mutex);rn printf("camera_control_thread exit...\n");rn pthread_exit(NULL);rnrn rn rnint main(int argc, char **argv)rnrn //initialise portrn initialise_port();rn ///rn pthread_mutex_lock(&g_mutex);rn printf("start\n");rn SetFocusPosDirect(fd,1);rn printf("end\n");rnrn pthread_mutex_unlock(&g_mutex);rn rn rc = pthread_create(&th, NULL, camera_control_thread, NULL);rn if(rc)rn rn perror("pthread");rn exit(1);rn rn pthread_join(th, NULL);rnrn return 0;rnrnrn[/code]rn[/quote]
请大家帮我看看下面这段代码~
源程序如下:rnrnrnrnrnrnrnrnrnrnrn rn jjrn rn rn rn rnrnrn错误提示:INSERT INTO 语法错误!rnrn谢谢!
新手请教!!帮我看看下面这段代码!
rnrn haharnrnrnrnrnrncc为一数据库,qq是其中的表rn总是出现<em>下面</em>的错误rnrnHTTP 500 - 内部服务器错误 rnrn极其郁闷!!那位大哥帮忙<em>看看</em>,难道是我的服务器设置有问题,谢谢!
请大家看看下面这段程序
10000000000rnyzcv=yzcv-10000000000rnlooprnrnresponse.write"本注册码生成程序由XXXX编写 你的:"&ip&" 用户名:A5D.COM 注册码:"&yzcv&""rnrn%>rnrn我想改为zcn="A5D.COM"改为lincent.com怎么修改?rn
如何才能有效的管理存储设备
<em>如何</em><em>有效</em>的存储设备呢?仁者见仁、智者见智。不同的人对此可能有不同的答案。在这里,笔者以IBM的DS4000存储设备为例,表达一下笔者自己的观点。也许这些内容能够给各位读者带来一定的帮助。 DS4000存储设备主要有两种管理方式,分别为频带带管理方式和频带外管理方式。这两个名字都是根据 英文直接翻译过来的。所以名字听起来有点别扭。其英文名字分别为in-band和out-of-...
下面这段js代码如何解释?
g_Configuration=style:1,version:4,fullMode:1,frameStyle:0,simpleMode:0rn,和:是用来做什么的?
各位大虾!!!!帮我看看下面这段程序?
if ib_LogOn thenrn Delete From SS_REGISTERrn Where XTSB = :in_SystemID AND YHDM = :is_UserID rn Using io_Environment ;rn commit using io_Environment ; rn ib_LogOn = Falsernend ifrnreturn Truern重点帮我解释以下词rnDelete From rnWherernUsing rncommit rn
帮忙看看下面这段代码是什么意思?
rnrn
帮我看看下面这段代码出了什么问题?
rnrn 文档库----上传文档 rn rnrn>rn > rn > rn rn rn align="center">rn rn rn rn rn rn 单击按钮选择所要上传的文件,再单击按钮完成操作 rn rn rn rn rn rn rn rn rn rn rnrnrnrn运行时总是说这句缺少对象, 我的本意是想点预览按钮打开FILE1所指的文件。
帮我看看下面这段JS是怎么回事
italicRegx = //g;rnalert(italicRegx.test("The Second"));rnalert(italicRegx.test("The Second"));rnalert(italicRegx.test("The Second"));rnalert(italicRegx.test("The Second"));rnalert(italicRegx.test("The Second"));rnalert(italicRegx.test("The Second"));rnalert(italicRegx.test("The Second"));rnalert(italicRegx.test("The Second"));rnalert(italicRegx.test("The Second"));rnalert(italicRegx.test("The Second"));rnrn结果是true,false,true,false,true,false.....
大家帮忙看看下面这段代码!
Private Sub MSComm1_OnComm()rnDim weight As StringrnDim tmpWeight As String, t_gettime As StringrnStatic Flag As IntegerrnDim Status As Integerrn'Dim Stable As ByternDim Negative As Bytern ' 获取皮重数据rnIf Flag = 13 Thenrn MSComm1.InputMode = comInputModeTextrn MSComm1.RThreshold = 8rn MSComm1.InputLen = 6rn If MSComm1.InBufferCount >= 8 Thenrn Do Until MSComm1.InBufferCount < 8rn MSComm1.InputMode = comInputModeTextrn MSComm1.InputLen = 6rn weight = MSComm1.Inputrn MSComm1.InputMode = comInputModeBinaryrn MSComm1.InputLen = 1rn Status = MSComm1.Input(0)rn Flag = MSComm1.Input(0) //问题是status为什么和flag不相等?rn Looprn rn If Val(weight) = 0 Thenrn 'tmpWeight = "0.000 "。rn tmpWeight = "0.0 "rn Elsern 'tmpWeight = Mid$(weight, 1, 3) & "." & Mid$(weight, 4, 3) + " "rn tmpWeight = Mid$(weight, 1, 5) & "." & Mid$(weight, 6, 1) + " "rn End Ifrn 'rn Label9.Caption = Statusrn rn rn Negative = Status And &H40rn If Negative <> 0 Thenrn tmpWeight = "-" & tmpWeightrn End Ifrn LblGetWT.Caption = tmpWeightrn If (Trim(Label9.Caption) = "6" Or Trim(Label9.Caption) = "7") And (Trim(ScanEdit1.Text) <> "") And (Val(tmpWeight) >= 100) And (x_scan1_sn_flag = 1) And (Val(Lbl_count1.Caption) > 0) Then '并且有Sensor 感应<em>才能</em>保存数据rn Call Save_WT1rn x_scan1_sn_flag = 0 '判断扫描SN1结束标识rn 'ScanEdit1.Text = ""rn If List1.ListCount > 50 Thenrn List1.RemoveItem (0)rn End Ifrn List1.ListIndex = List1.ListCount - 1rn End Ifrn rn End IfrnElsern MSComm1.RThreshold = 1rn MSComm1.InputLen = 1rn MSComm1.InputMode = comInputModeBinaryrn If MSComm1.InBufferCount <> 0 Thenrn Flag = MSComm1.Input(0)rn End IfrnrnEnd IfrnrnEnd Sub
帮忙看看下面这段小程序
功能得到FTP列表, 但是我得不到。呜呜呜rn//连接ftp站点rnif (!this->OpenControlChannel (strHost,21)) rn return FALSE;rn//验证用户名密码rn char* buffer = new char[100];rn int recLen = m_pSocket->Receive(buffer, 100, 0);rn CString user = "USER "+strName+" \r\n";rn m_pSocket->Send(user,user.GetLength(),0);rn recLen = m_pSocket->Receive(buffer,100,0);rn buffer[recLen]=0;rn CString password = "PASS "+strPwd+" \r\n";rn m_pSocket->Send(password, password.GetLength(), 0);rn recLen = m_pSocket->Receive(buffer,100,0);rn//rnchar *type = "TYPE I \r\n";rnm_pSocket->Send(type,strlen(type),0);rnrecLen = m_pSocket->Receive(buffer,100,0);rnbuffer[recLen]=0;rnrn//发送一个LIST过去, rn CString strlist = "LIST \r\n";rn m_pSocket->Send(strlist, strlist.GetLength(), 0);rn recLen = m_pSocket->Receive(buffer, 100, 0);rnrn之后就不知道怎么做了, 怎样<em>才能</em>得到FTP的目录列表!请提示,感谢rn谢谢,
帮我看看下面这段代码什么意思
.$define tmpFilern$IFDEF tmpFilernconstrn TmpFile = 'DELFOR.~$$';rnvarrn P1: PChar;rn Tmp: file;rn LenP: Integer;rn$ENDIF
大虾们帮我看看下面这段代码,
package uni8080;rnrnimport javax.swing.*;rnrnimport java.awt.*;rnimport java.awt.event.*;rnimport javax.swing.tree.*;rnimport javax.swing.event.*;rnimport javax.swing.border.*;rnimport javax.swing.table.*;rnrnrnpublic class socket8080 extends JFramernrn /**rn * 主模块,初始化所有子模块,并设置主框架的相关属性rn */rn public socket8080()rn rn rn RightPanel rightPanel = new RightPanel();rn CenterPanel centerPanel = new CenterPanel();rn // 设置主框架的布局rn Container c = this.getContentPane();rn c.add(rightPanel,BorderLayout.EAST);rn c.add(centerPanel,BorderLayout.CENTER);rnrn // c.add(bottomPanel,BorderLayout.SOUTH);rnrn // 利用无名内隐类,增加窗口事件rn this.addWindowListener(new WindowAdapter()rn rn public void WindowClosing(WindowEvent e)rn rn // 释放资源,退出程序rn dispose();rn System.exit(0);rn rn );rnrnrnrn setSize(500,350);rn setTitle("socket通讯");rn setLocation(200,150);rn show();rn rnrn /**rn * 最右边模块,继承JPanel,初始化各种按钮rn */rn class RightPanel extends JPanelrn rn public RightPanel()rn rn this.setLayout(new GridLayout(9,1));rnrnrn // 初始化各种按钮rn //JCheckBox checkBox = new JCheckBox("复选按钮");rn JLabel lab0 = new JLabel("");rn JLabel lab1 = new JLabel("");rn JLabel lab2 = new JLabel("");rn JLabel lab3 = new JLabel("");rn JLabel lab4 = new JLabel("");rn JButton sendbtn = new JButton(" 发 送 ");rn sendbtn.addActionListener(new ActionListener()rn rn public void actionPerformed(ActionEvent e) rn //dispose();rn //System.exit(0);rn rn );rnrn JButton startbtn = new JButton(" 启动服务 ");rn startbtn.addActionListener(new ActionListener()rn rn public void actionPerformed(ActionEvent e) rn Server ufs=new Server();rn ufs.getIni();rn //setButton("start");rn //startbtn=new startbtnrn startbtn.setEnabled(false);rn rn );rnrn JButton stopbtn = new JButton(" 停止服务 ");rn stopbtn.addActionListener(new ActionListener()rn rn public void actionPerformed(ActionEvent e) rn stopbtn.setEnabled(false);rnrnrnrn //dispose();rn //System.exit(0);rn rn );rnrn JButton closebtn = new JButton(" 关 闭 ");rn closebtn.addActionListener(new ActionListener()rn rn public void actionPerformed(ActionEvent e) rn dispose();rn System.exit(0);rn rn );rnrnrn add(lab0);rn add(sendbtn);rn add(lab1);rn add(startbtn);rn add(lab2);rn add(stopbtn);rn add(lab3);rn add(closebtn);rn add(lab4);rn this.setBorder(new EtchedBorder(EtchedBorder.LOWERED,Color.LIGHT_GRAY,Color.DARK_GRAY));rn rn rnrn ////////////////////////////////////////////////////////////////////////////rn /**rn * 中间层模块,继承JPanel,初始化页签,并在页签中设置文本区,rn * 文本区上下用分隔条分隔rn */rn class CenterPanel extends JPanelrn rn public CenterPanel()rn rn JTabbedPane tab = new JTabbedPane(JTabbedPane.TOP);rn JTextPane SendTextPane = new JTextPane();rnrn JTextPane RecTextPane = new JTextPane();rn RecTextPane.setEnabled(false);rnrn JTextPane SysTextPane = new JTextPane();rn SysTextPane.setEnabled(false) ;rn RecTextPane.setCursor(new Cursor(Cursor.TEXT_CURSOR));rn RecTextPane.setText("");rnrn tab.addTab("发送信息",SendTextPane);rn tab.addTab("受到的信息",RecTextPane);rn tab.addTab("系统信息",SysTextPane);rnrn tab.setPreferredSize(new Dimension(380,300));rn this.add(tab);rn //this.add(SysTextPane);rn this.setEnabled(true);rn this.setBorder(new EtchedBorder(EtchedBorder.LOWERED,Color.LIGHT_GRAY,Color.DARK_GRAY));rn rnrn rnrn public static void main(String args[])rn rn new socket8080();rn rnrnrnrn=======================================rn<em>这段</em>代码中的这一段rn JButton startbtn = new JButton(" 启动服务 ");rn startbtn.addActionListener(new ActionListener()rn rn public void actionPerformed(ActionEvent e) rn Server ufs=new Server();rn ufs.getIni();rn //setButton("start");rn //startbtn=new startbtnrn startbtn.setEnabled(false);rn rn );rnrn----------------------------------------rnstartbtn.setEnabled(false); 这个编译时老是说rnrn"socket8080.java": local variable startbtn is accessed from within inner class; needs to be declared final at line 83, column 33rnrn这是什么原因啊?谢谢了!!rn---------------------------------------rnrn=======================================rn
大神来看看下面这段代码
#include rnrnusing namespace std;rnrnvoid swap1(int *p, int *p1);rnrnint main()rn rn int a =1, int b = 2;rn swap1(&a, &b);rn cout << a << " " << b << endl; rn rnrnrnvoid swap1(int *p, int *p1)rnrn swap(p,p1);rnrnrnswap不是交换地址了吗?怎么还是输出 1 和 2rnrnrnrnrn
帮忙看看下面这段程序哪错了??????
以下和程序有错,错的有点莫明奇妙,大家帮忙<em>看看</em>,简直见鬼了!!!!!rn用VC环境,调试说C2018: unknown character '0xa1'。rn#include rnmain() rnint shu;rnint a=0,b=0,c=0,d=0,e=0,place;rnprintf("请输入一个五位数(0----99999)\n");rnrnscanf("%d",&shu);rnif(shu>9999 && shu999 && shu99 && shu9 && shu=1 && shu,e);rnbreak;rnrnrnrnrnrnrnrnrnrnrn
请大家看看下面这段程序的错误!
我是用命令行方式执行的 rnjavac JabberServer.java 没问题rnjava JabberServerrn报错了Exception in thread "main" java.lang.noclassdeffounderror:JabberSerberrn这是为什么啊?rnrn程序如下rnpackage socket;rnimport java.io.*;rnimport java.net.*;rnrnpublic class JabberServer rn // Choose a port outside of the range 1-1024:rn public static final int PORT = 8080;rn public static void main(String[] args) rn throws IOException rn ServerSocket s = new ServerSocket(PORT);rn System.out.println("Started: " + s);rn try rn // Blocks until a connection occurs:rn Socket socket = s.accept();rn try rn System.out.println(rn "Connection accepted: "+ socket);rn BufferedReader in = rn new BufferedReader(rn new InputStreamReader(rn socket.getInputStream()));rn // Output is automatically flushedrn // by PrintWriter:rn PrintWriter out = rn new PrintWriter(rn new BufferedWriter(rn new OutputStreamWriter(rn socket.getOutputStream())),true);rn while (true) rn String str = in.readLine();rn if (str.equals("END")) break;rn System.out.println("Echoing: " + str);rn out.println(str);rn rn // Always close the two sockets...rn finally rn System.out.println("closing...");rn socket.close();rn rn finally rn s.close();rn rn rn ///:~rn
麻烦各位给我看看下面这段代码!
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Clickrn Dim strAccConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=..\data.mdb"rn Dim objConn As New OleDbConnection(strAccConn)rn Dim objComm As New OleDbCommand("delete from myfriend where name=magerate", objConn)rn Tryrn objConn.Open()rn objComm.ExecuteNonQuery()rn Catch myException As Exceptionrn MessageBox.Show(myException.ToString())rn End Tryrn End Subrn返回的错误如下:rnSystem.Data.OleDb.OleDbException: 至少一个参数没有被指定值。rn at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr)rn at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)rn at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)rn at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)rn at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)rn at System.Data.OleDb.OleDbCommand.ExecuteNonQuery()rn at database1.Form1.Button3_Click(Object sender, EventArgs e) in H:\Visual Studio_net Projects\vb\database1\Form1.vb:line 148rn
帮我看看下面这段代码是什么意思?
Chart.innerHTML = ""rn
高手帮我看看下面这段代码
为什么点新闻1里的选择颜色,弹不出对话框,点新闻2里的可以弹出来:点完了新闻2里的,再点新闻1里的也可以弹出来?rn[code=HTML]rnrnrnrn rn 简洁Tabrn rnrn rnrnrnrn rn rn rn 新闻1rn 新闻2rn 新闻3 rn 新闻4rn 新闻5rn 新闻6rn 新闻7rn 新闻8rnrnrn rn rn rn rn rn 网站风格:rn rn rn rn rn rn rnrnrnrn rnrn rn rn rn 公司名称:rn rn rn rn rn rn rn rn rn rn 公司简介:rn rn rn rn rn rn rn rn rn Email:rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrnrnrn rnrn rn 新闻列表3rn 新闻列表4 rn 新闻列表5rn 新闻列表6rn 新闻列表7rn 新闻列表8rn rnrnrnrn[/code]
各位大虾,看看下面这段代码什么意思?
beginrn myreg:=tregistry.Create;rn myreg.RootKey:=HKEY_LOCAL_MACHINE;rn if myreg.openkey('\Config\0001\Software\Microsoft\windows\CurrentVersion\Internet Settings',true)rn then beginrn number:=0;rn myreg.WriteBinaryData('EnableAutodial',number,4);rn myreg.CloseKey;rn end;rn不好意思,对这些东西我实在是不懂!
请高手看看下面这段代码!!在线!!!
string ls_pathname1rnls_pathname1 = "h:\sbk\sbk1.db"rninteger filenumrnfilenum = fileopen("h:\sbk\temp.bat",LineMode!,Write!,LockWrite!,Replace!)rnfilewrite(filenum,"copy h:\sbk\sbk.db "+ ls_pathname1)rnfileclose(filenum)rnrun("h:\sbk\temp.bat",Minimized!)rn<em>这段</em>代码是完成数据的备份功能.sbk.db是一数据库,sbk1.db是备份后的数据文件.rn利用一个批处理文件tmep.bat来实现备份功能.即使用文件拷贝命令来将现有的数据文件sbk.db复制到sbk1.db.可是不知什么原因,filewrite函数调用不成功!!请各位高手<em>看看</em>是不是openfile函数的读写模式设置不对,还是另有原因.谢了先rnrn
大家帮我看看下面这段程序
//Get InlineShapes Collectionrn rn VariantInit(&result);rn hr = AutoWrap(DISPATCH_PROPERTYGET, &result, pSelection, L"InlineShapes", 0);rn if(FAILED(hr)) rn rn MessageBox(NULL, L"To Get InlineShapes Collection failed", L"Error", 0x10010);rn return FALSE;rn rn pInlineShapes = result.pdispVal;rn rnrn // Get Range Propertyrn IDispatch *pRange;rn rn VARIANT result;rn VariantInit(&result);rn hr = AutoWrap(DISPATCH_PROPERTYGET, &result, pSelection, L"Range", 0);rn if(FAILED(hr)) rn rn MessageBox(NULL, L"To Get Range failed", L"Error", 0x10010);rn return FALSE;rn rn pRange = result.pdispVal;rn rnrn //Add picture into Inlineshapesrn rn rn MyDebugMessage(L"Add picture into Inlineshapes", NULL, 0);rn VARIANT result;rn VariantInit(&result); rn VARIANT parm[4]; rn parm[0].vt = VT_BSTR; //FileNamern parm[0].bstrVal = SysAllocString(lpszBmpFileName); rn parm[1].vt = VT_BOOL; //LinkToFilern parm[1].boolVal = FALSE;rn parm[2].vt = VT_BOOL; //SaveWithDocumentrn parm[2].boolVal = TRUE; //两个参数不能同时为FALSE !!!rn parm[3].vt = VT_DISPATCH;rn parm[3].pdispVal = pRange; //Range rn hr = AutoWrap(DISPATCH_METHOD, &result, pInlineShapes, L"AddPicture", 4, parm[3], parm[2], parm[1] , parm[0]);rn rn SysFreeString(parm[0].bstrVal);rn if(FAILED(hr)) rn rn MessageBox(NULL, L"AddPicture() failed", L"Error", 0x10010);rn return FALSE;rn rn pNewInlineShape = result.pdispVal;rnrn rn
请帮忙看看下面这段代码
这是作一个可拖动的层,但是拖动的很不自如。由于是从网上copy,部分代码不懂意思,请告知;rnrnrnrndrag = 0rnmove = 0rnfunction mouseUp() rnmove = 0rnrnfunction mouseDown() rnclickleft = window.event.x - parseInt(dragObj.style.left)rnclicktop = window.event.y - parseInt(dragObj.style.top)rndragObj.style.zIndex += 1rnmove = 1rnrnfunction mouseMove() rnif (move) rndragObj.style.left = window.event.x - clickleftrndragObj.style.top = window.event.y - clicktoprnrnrnrnrnfunction Show(divid) rndivid.filters.revealTrans.apply();//什么意思rndivid.style.visibility = "visible";rndivid.filters.revealTrans.play();//什么意思rnrnfunction Hide(divid) rndivid.filters.revealTrans.apply();//什么意思rndivid.style.visibility = "hidden";rndivid.filters.revealTrans.play();//什么意思rnrn//rnrn ////什么意思rn rnrn rn rn 标题栏 rn ■rn rn rn rn rn rn一个可以拖动和关闭的层,有意思的是它每次关闭的效果都不一样。一个可以拖动和关闭的层,有意思的是它每次关闭的效果都不一样。一个可以拖动和关闭的层,有意思的是它每次关闭的效果都不一样。rnrnrn
帮忙看看下面这段代码什么意思呗
今天抄源码中看到这样一段rn[code=java]public ListfindTypeList()rn List list = dao.findAll(HouseType.class);rn return (List)list;rn [/code]rn[code=java]public List findAll(Class clazz)rn tryrn String c = clazz.toString();rn String hql = "FROM"+c.substring(c.lastIndexOf(".")+1,c.length());rn Query queryObject = getSession().createQuery(hql);rn return queryObject.list();rn catch(RuntimeException re)rn throw re;rn finallyrn closeSession();rn rn [/code]rn不懂什么意思rn然后运行也出错误了rnException in thread "main" java.lang.IllegalArgumentException: node to traverse cannot be null!rn at org.hibernate.hql.ast.util.NodeTraverser.traverseDepthFirst(NodeTraverser.java:55)rn at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:280)rn at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:182)rn at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136)rn at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:101)rn at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:80)rn at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:94)rn at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156)rn at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135)rn at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1651)rn at com.pb.base.dao.IBaseDao.IHouseDAOimpl.findAll(IHouseDAOimpl.java:80)rn at com.pb.service.impl.HouseServiceImpl.findTypeList(HouseServiceImpl.java:71)rn at com.pb.web.action.HouseAction.getSelect(HouseAction.java:168)rn at com.pb.web.action.HouseAction.main(HouseAction.java:183)rn求解答啊 求解答!!!
新手:看看下面这段代码,错在哪里?
unit frmFull;rnrninterfacernrnusesrn Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,rn Db, ADODB;rnrntypern TForm3 = class(TForm)rn ADOConnection1: TADOConnection;rn procedure FormCreate(Sender: TObject);rn privatern Private declarations rn publicrn Public declarations rn end;rnrnvarrn Form3: TForm3;rn //====================oraclernrnConstr:wideString;rn Cnn:TADOConnection;rn DataSet:TADODataSet;rn TName:String;rn //===================accessrn SecConstr:wideString;rn SecCnn:TADOConnection;rn SecDataSet:TADODataSet;rnimplementationrnrn$R *.DFMrnrnprocedure TForm3.FormCreate(Sender: TObject);rnbeginrn//====================oraclern//ConStr:='Provider=MSDASQL.1;Persist Security Info=True;Extended Properties="DSN=ORA;UID=SCOTT;PWD=TIGER;DBA=W;APA=T;FEN=T;QTO=T;FRC=10;FDL=10;LOB=T;RST=T;FRL=F;MTS=F;CSR=F;PFC=10;TLO=0;"';rnConStr:='Provider=MSDASQL.1;Password=tiger;Persist Security Info=True;User ID=scott;Data Source=delphi'rnCnn:=TADOConnection.Create(nil);rnDataSet:=TADODataSet.Create(nil);rnCnn.LoginPrompt:=false;rn//====================accessrnSecConStr:='Provider=Microsoft.Jet.OLEDB.4.0;Password="";Data Source=' + ExtractFilePath(Application.ExeName) + '\db1.mdb;Persist Security Info=True';rnSecCnn:=TADOConnection.Create(nil);rnSecCnn.LoginPrompt:=false;rnSecDataSet:=TADODataSet.Create(nil);rn//打开access连接rn Seccnn.ConnectionString:=SecConstr;rn SecCnn.Open;rn//==============打开oracle连接rncnn.ConnectionString:=Constr;rn Cnn.Open;rnend;rnrnend.rnrn运行时候光标移动到rnCnn:=TADOConnection.Create(nil);rn提示:rn[Error] frmFull.pas(40): Missing operator or semicolonrn请问这是什么意思!rnrn
帮我看看下面这段代码哪有问题!
//链接SQL Server数据库 rn MyConnection =new SqlConnection("Initial Catalog=test_bre_news;Data Source=test0002;UID=sa;PWD=; Integrated Security=SSPI;"); rnrn错误提示为,请问是哪儿的问题。rnrn“/”应用程序中的服务器错误。rn--------------------------------------------------------------------------------rnrn用户 '(null)' 登录失败。原因: 未与信任 SQL Server 连接相关联。 rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 rnrn异常详细信息: System.Data.SqlClient.SqlException: 用户 '(null)' 登录失败。原因: 未与信任 SQL Server 连接相关联。rnrn源错误: rnrnrn行 20: //链接SQL Server数据库 rn行 21: MyConnection =new SqlConnection("Initial Catalog=test_bre_news;Data Source=test0002;UID=sa;PWD=; Integrated Security=SSPI;"); rn行 22: MyConnection.Open(); rn行 23: String neirong2; rn行 24: neirong2=Server.HtmlEncode(neirong.Text); rn rnrn源文件: c:\inetpub\wwwroot\news\addnews.aspx 行: 22 rnrn
如何解析这段JSON
<em>如何</em><em>解析</em><em>这段</em>JSonrn"JsonType":"TicketResult","DataList":[ "Transcode":"100001183859","ticketTrans":"20042776450868293898","Mac":"34bb9feeca7bd3d415586dcde824d5fb","Merchant_id":"50000002","Printstatus":"4","Odds":"ticketingDate":"2011-04-14 12:43:06","bet":"F20110414002":"00":"3.150","F20110414001":"00":"2.100","datatype":1, "Transcode":"100001183860","ticketTrans":"20042495476302405925","Mac":"c7ac12353f4491a9aee16d4419820afe","Merchant_id":"50000002","Printstatus":"4","Odds":"ticketingDate":"2011-04-14 12:43:06","bet":"F20110414001":"00":"2.100","F20110414004":"03":"2.200","datatype":1 ]rn我要把Transcode,Merchant_id,Printstatus,ticketingDate放在一个list里,高手帮我下
如何解析这段xml?
rn rn rn rn rn rn rn rn rn rn rn rn rn rnrnrnXML格式如上。我需要找出根节点下所有非的节点。rn比如上<em>解析</em>完后,我要的内容是:rnrn rn rn rn rn rn rn rnrn
jaxb可以解析下面这段xml么
买方错误选择或填写导致取消rn由于买家选错游戏区服,当前交易被迫终止rnrn由于买家选错游戏阵营,当前交易被迫终止rnrn由于买家的游戏角色名或数字ID错误,当前交易被迫终止rnrn由于买家提供的购买、联系信息有误(包括联系QQ与订单填写QQ不符),交易取消rnrnrnrnjaxb可以<em>解析</em>么,上面的category节点多了一句话,这要怎么<em>解析</em>啊??
解析下面这段json 获得redata的值
[size=18px]"status":"2000","message":"ok","data":"redata":3[/size]
如何有效分隔字符串
string strSource = "10.230.12.230/33 ,10.18.123.22 (gn) 新增好段";rnrnrn<em>字符串</em>里面有 空格,汉字逗号,汉字括号,回车等分隔符号rnrn想得到以这些分隔符号分隔的<em>字符串</em>,但是我取得时候汉字字符不能正确在屏幕中显示rn求<em>有效</em>处理这种数据的<em>有效</em>方法
如何有效的截取字符串??
把Memo的内容截取成多条100字节的信息,但是如果内容里含有中文输入法时输入的符号,后面所截取的内容将会以乱码显示,怎样<em>才能</em>截取以后不会出现乱码,请各位大虾帮忙帮忙!
正则如何截取字符串
我有一个<em>字符串</em>,比如:摩登街13号,世纪大道89号,中山路67号rn我想把一个<em>字符串</em>以逗号为标准截取成子<em>字符串</em>rn截取后的效果要为:摩登街13号rn 世纪大道89号rn 中山路67号
谁能让这段JS有效啊!
rn
如何操作这段字符串
OfficeDomain\wangzhangqirnrnOfficeDomain是个域名,公司内部有好几个。wangzhangqi是我的用户名。我想取出wangzhangqi这个<em>字符串</em>,<em>如何</em>操作?
如何截取这段字符串
我把图片上传后在数据库里面的一个字段保存了图片的html语言rnrn我想把 /houtai3/Manage/Editor/UploadFile/2004113115557268.jpg截取下来,请教哪位兄弟帮我解决一下
如何处理这段字符串??
现有<em>字符串</em>str='((a=1 and b=1) or c=1) and d=1'. a,b,c,d为变量,在这里不用管<em>如何</em>给a,b,c,d取值。str为比较法则。怎么处理str,得到一个true or false.主要就是怎么把str给分开处理?我主要是不知道刮号怎么弄?
高手看看下面这段代码如何优化.
switch(j)rnrncase 0:rnif(pa->is_input)rnrnMCASP_FSETA(&(Aport_mcaspCfg.global->pdir),PDIR,AXR0,MCASP_PDIR_AXR0_IN);rnMCASP_FSETA(&(Aport_mcaspCfg.srctl->srctl0),SRCTL,SRMOD,MCASP_SRCTL_SRMOD_RCV);rnrnelsernrnMCASP_FSETA(&(Aport_mcaspCfg.global->pdir),PDIR,AXR0,MCASP_PDIR_AXR0_OUT);rnMCASP_FSETA(&(Aport_mcaspCfg.srctl->srctl0),SRCTL,SRMOD,MCASP_SRCTL_SRMOD_XMT);rnrnbreak;rncase 1:rnif(pa->is_input)rnrnMCASP_FSETA(&(Aport_mcaspCfg.global->pdir),PDIR,AXR1,MCASP_PDIR_AXR1_IN);rnMCASP_FSETA(&(Aport_mcaspCfg.srctl->srctl1),SRCTL,SRMOD,MCASP_SRCTL_SRMOD_RCV);rnrnelsernrnMCASP_FSETA(&(Aport_mcaspCfg.global->pdir),PDIR,AXR1,MCASP_PDIR_AXR1_OUT);rnMCASP_FSETA(&(Aport_mcaspCfg.srctl->srctl1),SRCTL,SRMOD,MCASP_SRCTL_SRMOD_XMT);rnrnbreak;rncase 2:rnif(pa->is_input)rnrnMCASP_FSETA(&(Aport_mcaspCfg.global->pdir),PDIR,AXR2,MCASP_PDIR_AXR2_IN);rnMCASP_FSETA(&(Aport_mcaspCfg.srctl->srctl2),SRCTL,SRMOD,MCASP_SRCTL_SRMOD_RCV);rnrnelsernrnMCASP_FSETA(&(Aport_mcaspCfg.global->pdir),PDIR,AXR2,MCASP_PDIR_AXR2_OUT);rnMCASP_FSETA(&(Aport_mcaspCfg.srctl->srctl2),SRCTL,SRMOD,MCASP_SRCTL_SRMOD_XMT);rnrnbreak;rncase 3:rnif(pa->is_input)rnrnMCASP_FSETA(&(Aport_mcaspCfg.global->pdir),PDIR,AXR3,MCASP_PDIR_AXR3_IN);rnMCASP_FSETA(&(Aport_mcaspCfg.srctl->srctl3),SRCTL,SRMOD,MCASP_SRCTL_SRMOD_RCV);rnrnelsernrnMCASP_FSETA(&(Aport_mcaspCfg.global->pdir),PDIR,AXR3,MCASP_PDIR_AXR3_OUT);rnMCASP_FSETA(&(Aport_mcaspCfg.srctl->srctl3),SRCTL,SRMOD,MCASP_SRCTL_SRMOD_XMT);rnrnbreak;rncase 4:rnif(pa->is_input)rnrnMCASP_FSETA(&(Aport_mcaspCfg.global->pdir),PDIR,AXR4,MCASP_PDIR_AXR4_IN);rnMCASP_FSETA(&(Aport_mcaspCfg.srctl->srctl4),SRCTL,SRMOD,MCASP_SRCTL_SRMOD_RCV);rnrnelsernrnMCASP_FSETA(&(Aport_mcaspCfg.global->pdir),PDIR,AXR4,MCASP_PDIR_AXR4_OUT);rnMCASP_FSETA(&(Aport_mcaspCfg.srctl->srctl4),SRCTL,SRMOD,MCASP_SRCTL_SRMOD_XMT);rnrnbreak;rncase 5:rnif(pa->is_input)rnrnMCASP_FSETA(&(Aport_mcaspCfg.global->pdir),PDIR,AXR5,MCASP_PDIR_AXR5_IN);rnMCASP_FSETA(&(Aport_mcaspCfg.srctl->srctl5),SRCTL,SRMOD,MCASP_SRCTL_SRMOD_RCV);rnrnelsernrnMCASP_FSETA(&(Aport_mcaspCfg.global->pdir),PDIR,AXR5,MCASP_PDIR_AXR5_OUT);rnMCASP_FSETA(&(Aport_mcaspCfg.srctl->srctl5),SRCTL,SRMOD,MCASP_SRCTL_SRMOD_XMT);rnrnbreak;rncase 6:rnif(pa->is_input)rnrnMCASP_FSETA(&(Aport_mcaspCfg.global->pdir),PDIR,AXR6,MCASP_PDIR_AXR6_IN);rnMCASP_FSETA(&(Aport_mcaspCfg.srctl->srctl6),SRCTL,SRMOD,MCASP_SRCTL_SRMOD_RCV);rnrnelsernrnMCASP_FSETA(&(Aport_mcaspCfg.global->pdir),PDIR,AXR6,MCASP_PDIR_AXR6_OUT);rnMCASP_FSETA(&(Aport_mcaspCfg.srctl->srctl6),SRCTL,SRMOD,MCASP_SRCTL_SRMOD_XMT);rnrnbreak;rncase 7:rnif(pa->is_input)rnrnMCASP_FSETA(&(Aport_mcaspCfg.global->pdir),PDIR,AXR7,MCASP_PDIR_AXR7_IN);rnMCASP_FSETA(&(Aport_mcaspCfg.srctl->srctl7),SRCTL,SRMOD,MCASP_SRCTL_SRMOD_RCV);rnrnelsernrnMCASP_FSETA(&(Aport_mcaspCfg.global->pdir),PDIR,AXR7,MCASP_PDIR_AXR7_OUT);rnMCASP_FSETA(&(Aport_mcaspCfg.srctl->srctl7),SRCTL,SRMOD,MCASP_SRCTL_SRMOD_XMT);rnrnbreak;rnrnrnrnrn想减少代码的行数!rn想参考类似:rn#define PRINT(x) printf(#x "=0x%04x\n",x)rn的方法,但是找不到入口,大家帮忙<em>看看</em>!rn谢谢
通存通兑 是如何实现的!! 看看下面这段银行的数据库说明!!
对银行560个服务器实现通存通兑,实现统一的会计账务管理.rn数据库按地域划分为不同的地区数据库,不同的数据库放置于不同的主机上,数据库的划分应不影响到上下级行的隶属关系。每个数据库中包括共享表、历史数据表、文件表和各地区数据表。 rnrnrn通存通兑 是<em>如何</em>实现的! rn比如一个持卡人在西安办的卡, 但他去北京消费刷卡, 而北京没有他的存款纪录,是不是建立一个共享表,现将消费的金额,卡号,等等数据记录的共享表里。 然后再将数据传到总服务器,总服务器在将数据传到西安的服务器来检查存款余额是不是足够和账户是不是<em>有效</em>。rn
下面这段代码是啥意思啊?
<em>下面</em>代码中的[color=#FF0000]onclick[/color]为什么要这么写啊?这么写用什么作用?rn请大家指点指点rnrn[code=HTML]rn" rn name="link_prd_name" target="_blank" class="STYLE5" id="link_prd_name" rn onclick="return s('9317290','01.54.06.06','',this.href)">rn[/code]
请问下面这段代码错在哪里啊?
请问<em>下面</em><em>这段</em>代码错在哪里啊?rnrnPrivate Sub Command3_Click()rnDim xObject As ObjectrnSet xObject = CreateObject("Excel.Sheet")rnSet xObject = xObject.application.activeworkboo.activesheetrnxObject.range("A1").Value = "thank you"rnxObject.range("A2").Value = "Hello,world"rnxObject.application.Visible = Falsern'xObject.Cells(1, 1).Value = "This is column A, row 1"rnrnxObject.SaveAs "d:\forum\xobject.xls"rnxObject.application.quitrnSet xObject = NothingrnrnEnd Subrn
谁能帮忙解释下面这段代码啊!
CFaderWnd.hrnrn//#if !defined(AFX_FADERWND_H__4663A0FE_1B90_4E99_A5FD_960B3CF66B5C__INCLUDED_)rn//#define AFX_FADERWND_H__4663A0FE_1B90_4E99_A5FD_960B3CF66B5C__INCLUDED_rnrn#if _MSC_VER > 1000rn#pragma oncern#endif // _MSC_VER > 1000rn// FaderWnd.h : header filern//rn#pragma oncern#ifndef WS_EX_LAYERED rn#define WS_EX_LAYERED 0x00080000rn#define FaderWndTimer 0rn#endifrntypedef void(WINAPI* lpUpdateLayeredWindow)(HWND hWnd, HDC hdcDst, POINT *pptDst, SIZE *psize, HDC hdcSrc, POINT *pptSrc, COLORREF crKey, BLENDFUNCTION *pblend, DWORD dwFlags);rn/////////////////////////////////////////////////////////////////////////////rn// CFaderWnd windowrnrnclass CFaderWnd : public CWndrnrn// Constructionrnpublic:rn CFaderWnd(CWnd*pWndToFader,UINT nFaderTime=2000,BYTE ALPHA=255);rnrn// Attributesrnpublic:rnrn// Operationsrnpublic:rn rn// Overridesrn // ClassWizard generated virtual function overridesrn //AFX_VIRTUAL(CFaderWnd)rn protected:rn virtual void PostNcDestroy()delete this;rn //AFX_VIRTUALrnrn// Implementationrnrnpublic:rn virtual ~CFaderWnd();rnrn // Generated message map functionsrnprotected:rn //AFX_MSG(CFaderWnd)rn afx_msg void OnTimer(UINT nIDEvent);rn //AFX_MSGrn DECLARE_MESSAGE_MAP()rnCWnd* m_pWndToFader; //关联窗口指针rnBLENDFUNCTION m_Blend; //混合结构体变量rn lpUpdateLayeredWindow m_lpfunUpdateLayeredWnd;rn;rnrnrnCFaderWnd.cpprn#include "stdafx.h"rn//#include "FaderWndTest.h"rn#include "FaderWnd.h"rnrn#ifdef _DEBUGrn#define new DEBUG_NEWrn#undef THIS_FILErnstatic char THIS_FILE[] = __FILE__;rn#endifrn#define FaderWndTimer 0rn/////////////////////////////////////////////////////////////////////////////rn// CFaderWndrnrnCFaderWnd::CFaderWnd(CWnd*pWndToFader/*=NULL*/,UINT nFaderTime/*=2000*/,BYTE ALPHA/*=255*/)rn:m_pWndToFader(pWndToFader)//m_pWndtoFader类指针的作用是将要实现渐隐的窗口于当前的类联系起来rnrn //检查对象的合法性,只有在调试版本中有用,发行版本中没有用rn ASSERT(pWndToFader);rn ASSERT_VALID(pWndToFader);rn //得到合法的ALPHA值或调用缺省的值rn if(ALPHAGetWindowRect(&pWndToFaderRect);rn //得到窗口的对象属性rn size.cx=pWndToFaderRect.Width();rn size.cy=pWndToFaderRect.Height();rn point=pWndToFaderRect.TopLeft();rn //创建分层窗口的上层窗口rn //样式WS_EX_LAYERED必要要,是为了为UpdateLayeredWindow()函数的调用rn //WS_EX_TRANSPARENT allows mouse clicks through to the window "underneath",rn CreateEx(WS_EX_LAYERED|WS_EX_TOOLWINDOW|WS_EX_TOPMOST|WS_EX_TRANSPARENT,rn "STATIC","",WS_VISIBLE|WS_POPUP,pWndToFaderRect,AfxGetMainWnd(),0); rn //创建BLENDFUNCTION结构体为UpdateLayeredWindow()所用rn m_Blend.BlendOp=AC_SRC_OVER; //唯一保留标志rn m_Blend.BlendFlags=0;rn m_Blend.SourceConstantAlpha=ALPHA; //定义初始时候的透明度rn m_Blend.AlphaFormat=0;rn //设计初始时候的分层窗口的透明度rn m_lpfunUpdateLayeredWnd(GetSafeHwnd(),NULL,NULL,&size,::GetDC(m_pWndToFader->GetSafeHwnd()),&point,0,&m_Blend, 0x00000002);rn //设置渐隐窗口的时间器rn UINT nFaderTimeUnit=nFaderTime/(ALPHA/5);//定义单位时间间隔rn SetTimer(FaderWndTimer,nFaderTimeUnit,NULL);rnrn rnrnrnCFaderWnd::~CFaderWnd()rnrnrnrnrnBEGIN_MESSAGE_MAP(CFaderWnd, CWnd)rn //AFX_MSG_MAP(CFaderWnd)rn ON_WM_TIMER()rn //AFX_MSG_MAPrnEND_MESSAGE_MAP()rnrnrn/////////////////////////////////////////////////////////////////////////////rn// CFaderWnd message handlersrnrnvoid CFaderWnd::OnTimer(UINT nIDEvent) rnrn // TODO: Add your message handler code here and/or call defaultrn if(nIDEvent== FaderWndTimer)rn rn //若是窗口的渐隐时间器的话rn if(m_Blend.SourceConstantAlpha>=5)rn rn //透明度必须大于或等于5,否则的话透明度减少到负数时又从默认的值开始,达不到透明的效果rn m_Blend.SourceConstantAlpha-=5; //逐渐减少透明度,渐渐趋向透明rn //更新分层窗口的透明程度rn m_lpfunUpdateLayeredWnd(GetSafeHwnd(),NULL,NULL,NULL,NULL,NULL,NULL,&m_Blend, 0x00000002);rn rn elsern rn KillTimer(FaderWndTimer);//销毁窗口时间器rn DestroyWindow();//销毁窗口rn rn rn// CWnd::OnTimer(nIDEvent);rnrnrn还有透明窗口的实现原理!
下面这段sql语句什么意思啊?
sp表:rnsno pno qtyrn168 r1 3rn168 r2 4rn168 r3 7rn169 r2 1rn169 r3 5rn170 r4 8rn171 r7 5rn172 r2 1rn172 r7 3rnrnrnrnrn<em>下面</em><em>这段</em>sql语句什么意思啊?rnrn请高手指点,谢谢!rnrnrnrnrnselect * from sp spy where exists (select * from sp spz where spz.sno='169' and spy.pno=spz.pno)rnrn
请问下面这段代码这么解释啊?
DataTable dtGridViewUserInfo = new DataTable();rn//分别新加四列DataColumn,用于和GridView进行绑定rnDataColumn dcFirst = new DataColumn("firstColumn",System.Type.GetType("System.String"));rndtGridViewUserInfo.Columns.Add(dcFirst);rn关键是DataColumn("firstColumn",System.Type.GetType("System.String"));中"firstColumn"的作用
下面这段代码是什么编码啊??
[code=XML]srqcdz@126.com[/code]rnrn用PHP怎么转换
下面这段程序有哪些问题啊?
#include rnusing namespace std;rnrnclass SimpleCirclernrnpublic:rn SimpleCircle();rn SimpleCircle(int);rn SimpleCircle(const SimpleCirle &);rn ~SimpleCircle();rn int GetitsRadius() const return *itsRadius;rn void SetRadius(int Radius) *itsRadius = Radius;rn SimpleCircle operator = (SimpleCircle &);rnrnprivate:rn int *itsRadius;rn;rnrnSimpleCircle::SimpleCirle()rnrn itsRadius = new int;rn *itsRadius = 5;rnrnSimpleCircle::SimpleCirle(int velue)rnrn itsRadius = new int;rn *itsRadius = velue;rnrnSimpleCircle::SimpleCirle(const SimpleCirle& rhs)rnrn itsRadius = new int;rn *itsRadius = rhs.GetitsRadius();rnrnSimpleCircle::~SimpleCircle()rnrn delete itsRadius;rn itsRadius = 0;rnrnrnSimpleCircle SimpleCircle::operator =(SimpleCircle & rhs)rnrn if (this == &rhs)rn return *this;rn *itsRadius = rhs.GetitsRadius();rn return *this;rnrnrn//上面<em>这段</em>程序有哪些问题啊?
下面这段代码起什么作用啊
rn特别是 style="overflow:scroll;overflow-x:hidden"
下面这段程序的执行过程好奇怪啊
nn```n #include n#include nmain()nn int n,*p,*q;n printf("input the data number:");n scanf("%d",&n);n p=(int *)calloc(n,2);n printf("store %d data to memory.",n);n for(q=p;q
请问下面这段代码错在哪里啊?
rnrn rn rn rn]>rnrnrn 王维rn 鹿柴rn 空山不见人,但闻人语响.rn 返景入深林,复照青苔上.rnrnrn总是提示rn Character '(' is grammatically unexpectedrn就是在这一行上的,我实在没发现哪里有语法错误啊,视频教程里面就是这样写的,也格式正确的啊rn谢谢大家
大家来看看这段文本怎么解析啊?
<em>下面</em>是一段文本!要求是把每行中BO_ 后面的数字,例如1811提取出来?怎么读取啊?最好用C写!多谢各位指点!rnBO_ 1811 Msg_DCD_Diag_Tx: 8 DCDrn SG_ DCD_Diag_Tx_Data : 7|14@1+ (1,1) [1|1] "" PSAE_TesterrnrnBO_ 1919 Msg_PSAE_Func_Diag_Vs: 8 PSAE_Testerrn SG_ PSAE_Func_Diag_Vs_Data : 7|14@1+ (1,1) [1|1] "" TPMS,PEPS,DCD,PS,ESCL,IP,PPS,DVD,RRSrnrnBO_ 1797 Msg_PS_Phys_Diag_Vs: 8 PSAE_Testerrn SG_ PS_Phys_Diag_Vs_Data : 7|14@1+ (1,1) [1|1] "" PSrnrnBO_ 1815 Msg_PS_Diag_Tx: 8 PSrn SG_ PS_Diag_Tx_Data : 7|14@1+ (1,1) [1|1] "" PSAE_Tester
这段代码怎么才能正常运行啊?
在VB6完全正常的说..rnrn但是在VB.NET中 汉字转换为HEX时 任意汉字均返回 FF FF rnrnrn麻烦高手修正一下rnrnrnPublic Function HexToAsc(Str As String) As String '16进制转字符函数 调用 Hex2Asc(Str)rnOn Error Resume NextrnDim I As Long, A As String, B As StringrnA = KongGe(Str, " ") '调用了去除空格函数rnFor I = 1 To Len(A) Step 2rn If "&H" & Mid(A, I, 2) > &H7F Then '当取得的16进制大于&H7F(既10进制127)时,为汉字rn B = B & Chr("&H" & Mid(A, I, 4)) '在这里循环取4位,生成汉字Brn I = I + 2 '"指针"向后移动2位rn Else '如果不是汉字rn B = B & Chr("&H" & Mid(A, I, 2)) '循环取2位,生成英文或者其他字符rn End IfrnNext IrnHexToAsc = BrnEnd FunctionrnrnPublic Function AscToHex(Str As String) As String '字符转16进函数 调用 Asc2Hex(Str)rnOn Error Resume NextrnDim Z, H As String, I As LongrnFor I = 1 To Len(Str)rn If Asc(Mid(Str, I, 1)) > 0 And Asc(Mid(Str, I, 1)) < 32 Then '这里转换不是字符的编码rn Z = Z & "0" & Hex(Asc(Mid(Str, I, 1))) & " "rn ElseIf Asc(Mid(Str, I, 1)) >= 32 And Asc(Mid(Str, I, 1)) < 127 Then '这里转英文和符号等的编码rn Z = Z & Hex(Asc(Mid(Str, I, 1))) & " "rn Else '这里转汉字rn H = Hex(Asc(Mid(Str, I, 1)))rn Dim X As Longrn For X = 1 To 4 Step 2rn Z = Z & Mid(H, X, 2) & " " '汉字转换后(把FFFF换为FF FF 格式)rn Next Xrn End IfrnNext IrnAscToHex = ZrnEnd FunctionrnrnPublic Function KongGe(StrA As String, StrB As String) As Stringrn'删除指定的B函数 调用 KongGE(StrA, StrB)rnDim I As Integer, A As String, B As StringrnA = StrArnB = StrBrnDo While InStr(A, B)rn I = InStr(A, B)rn A = Left(A, I - 1) & Mid(A, I + 1)rnLooprnKongGe = A '返回rnEnd Function
如何学习ExtJS最有效
本人是职场新手,因公司使用ExtJS框架和DWR框架,所有我不得不学好它们。看了几个小例子,然后也写了下,但是感觉还有很多东西我都不太会是用,我现在都无从下手了,还有可能我要被公司T了,唉。哪位高手指教下我啊,我该<em>如何</em>去学,或者提供给我一些好的资料。我会非常感谢各位的!
如何杀蟑螂最有效
先用温水把白糖、白色粉末溶解了,再和熟土豆泥拌在一起,弄成一种黏糊糊的样子,放在矿泉水的瓶盖里,放在家里各处。这次获得了成功,不几天就看见了倒在地上的死蟑螂,即使是一些能动的,也是步履蹒跚了。再过了些日子,就几乎见不到蟑螂的踪迹了。卖了半天关子,其实这种白色粉末就是硼酸,在医疗上可以用于消毒,一般在药店都可以买到。蟑螂吃了含有硼酸的食物后,硼酸在其体内结晶,就起到了杀灭的作用。由于硼酸是弱酸,
如何有效的使用ADODB.RecordSet?
我们都知道ADODB。RecordSet有以下两种写法rndim recTemp as adodb.recordesetrnset recTemp = new adodb.recoordsetrn与rndim recTemp as new adodb.recordestrnrn'为此,我做了如下的测试程序rnrnOption ExplicitrnrnPrivate AdoRs1 As ADODB.RecordsetrnPrivate AdoRs2 As New ADODB.RecordsetrnrnPrivate Sub CmdTest_Click()rn 'Step1: 新建一个ADODB.RecordSet实例; 注意 AdoRs2不需要新建rn rn Set AdoRs1 = New ADODB.Recordsetrn rn 'Step2: 执行某些操作rn MsgBox "AdoRs1字段个数 :" & AdoRs1.Fields.Countrn MsgBox "AdoRs2字段个数 :" & AdoRs2.Fields.Countrn rn 'Step3: 释放RecordSetrn If AdoRs1.State = adStateOpen Thenrn AdoRs1.Closern End Ifrn Set AdoRs1 = Nothingrn rn If AdoRs2.State = adStateOpen Thenrn AdoRs2.Closern End Ifrn Set AdoRs2 = Nothingrn rn 'Step4: 测试被释放后的RecordSet (注意测试的顺序)rn If AdoRs1 Is Nothing Thenrn MsgBox "AdoRs1 被完全释放 !"rn Elsern MsgBox "AdoRs1 没有被完全释放 !"rn End Ifrn rn If AdoRs2 Is Nothing Thenrn MsgBox "AdoRs2 被完全释放 !"rn Elsern MsgBox "AdoRs2 没有被完全释放 !"rn End Ifrn rn MsgBox "AdoRs2字段个数 :" & AdoRs2.Fields.Countrn MsgBox "AdoRs1字段个数 :" & AdoRs1.Fields.Countrn rnEnd Subrnrn'经过以上测试后, 我们发现一个有趣的现象:rn 'AdoRs1被释放后不能读取AdoRs1的某些属性 , 必须重新执行rn 'Set AdoRs1 = New ADODB.Recordset 方可使用某些属性rn '这样可能造成某些不方便rn rn 'AdoRs2被释放后仍然能读取AdoRs2的某些属性rn '这样是否会造成资源没有被完全释放,造成对程序运行效率的影响rn rn '希望大家能对该问题进行一些讨论和指教,谢谢。rnrn
最简单,最高效的字符串解析方法
出个题目,大伙讨论一下 :)rnrn这样的一个<em>字符串</em> key1=value1;key2=value2;....rnrn其中, key 和 value 是不包含分号的任意<em>字符串</em>。rnrn有没有最简单,最高效的方法,来实现将上述字串<em>解析</em>到一个 map中?rn
帮我看看可以吗
有5个学生,每个学生的数据包括学号,姓名,3门课的成绩,从键盘输入5个学生的数据,要求打印出每个学生的平均成绩,以及最高分的学生的数据(包括学号,姓名,3门课的成绩,平均分数)。rn实验步骤与要求:rn  (1)定义结构体类型为:rn    struct studentrn    rn     char num[7];rn     char name[8];rn     float s[3];rn     float ave;rn    rn (2)在程序中使用结构体数组。rn (3)用函数input输入5个学生的数据;用函数sum求每个学生的平均分并输出;用函数search找出最高分学生数据并输出。rnrnrn看这个要求是C 还是C++ 还是其他?rnrn顺便帮我做出来 好吗。谢谢。今天做出来 下午就揭帖或者晚上
身份证 正则 有效验证
public static boolean IDCardValidate(String IDStr) throws ParseException { String[] ValCodeArr = { "1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2" }; String[] Wi = { "7", "...
看看这句SQL,可以吗
一个表里,有点击次数(hits)的字段。rn现在我想把所有的记录中点击数排前十位的找出来。rnSQL语句应该怎么写?rnselecr top 10 * from 表名 order by hits descrn这些行吗?
大家进来看看,解析字符串
比如说,这个<em>字符串</em>:rnrnrnSCrn4663rnrn拼接<em>字符串</em>SC4663 山东航空公司rnrnTAOrnSHArnrn2009-07-29rn0800rnrn2009-07-29rn0915rnrnAircraft>738rnSrn rn0rnErn^rnDS#rnrnrnrnrn要把里面的,如SC和4663<em>解析</em>出来,然后在拼接上SC4663,把各个节点的信息都<em>解析</em>出来,谢谢!!
输入字符串逆序输出 最有效算法
rnrn问题如题!rnrn谢谢!
Flex中文帮助No4章.pdf下载
Flex中文帮助No4章.pdf,本节将向你展示如何使用Adobe Flex Builder 编译和运行一个简单的Flex 应用程序。其 中涉及的重点内容包括Flex Builder 项目的概念。 相关下载链接:[url=//download.csdn.net/download/wfjava/1999623?utm_source=bbsseo]//download.csdn.net/download/wfjava/1999623?utm_source=bbsseo[/url]
城市规划与设计考研真题下载
城市规划与设计考研真题,想考这个的同学你们还等什么?赶快行动啦! 相关下载链接:[url=//download.csdn.net/download/zxcv123bpf/2263014?utm_source=bbsseo]//download.csdn.net/download/zxcv123bpf/2263014?utm_source=bbsseo[/url]
大学生上网情况调查报告下载
对于如今的大学生来说,网络确实有着神奇的魅力。聊天,交网友,泡网吧,打游戏,看新闻,查资料,随着现在大学生的生活越来越离不开网络。但由于网络信息的开放性、自主性以及多元性极容易令部分学生对其产生过度以来,从而导致荒废学业,甚至造成心理扭曲。 相关下载链接:[url=//download.csdn.net/download/zhaoshuangxiang/2315062?utm_source=bbsseo]//download.csdn.net/download/zhaoshuangxiang/2315062?utm_source=bbsseo[/url]
我们是很有底线的