请大家帮忙看下这段代码 [问题点数:50分,结帖人chdaner]

Bbs2
本版专家分:217
结帖率 96.77%
Bbs4
本版专家分:1987
Bbs7
本版专家分:12319
Bbs7
本版专家分:13605
Blank
红花 2009年9月 Delphi大版内专家分月排行榜第一
Blank
蓝花 2009年10月 Delphi大版内专家分月排行榜第三
Bbs6
本版专家分:9873
Blank
黄花 2015年1月 Delphi大版内专家分月排行榜第二
Bbs7
本版专家分:23158
Blank
蓝花 2009年6月 Delphi大版内专家分月排行榜第三
2008年3月 Delphi大版内专家分月排行榜第三
2008年2月 Delphi大版内专家分月排行榜第三
2008年1月 Delphi大版内专家分月排行榜第三
Bbs8
本版专家分:41721
Blank
蓝花 2003年4月 Delphi大版内专家分月排行榜第三
帮忙看下这段代码.
I= Application.Worksheet("kkk").Function.CountA(Columns("b:b")) + 1rn Worksheets("kkk").Cells(I,1) = Textbox1.Textrnrnrnrn 请<em>帮忙</em><em>看下</em>以上<em>代码</em>有什么错误?...
大家看下这段代码
private void button1_Click(object sender, EventArgs e)rn rn if(textBox1.Text=="")rn MessageBox.Show("书名为空"); rn rn rn rn else rn for (int i = 0; i );rnrn rn else rn listView1.Items.Add(textBox1.Text.Trim());rn rn rn rn rn报错:错误 1 无法将带 [] 的索引应用于“int”类型的表达式 D:\windows窗体\shiyan4_2\shiyan4_2\Form1.cs 29 42 shiyan4_2rn
大家看下这段代码
[code=c]#includern#includernusing namespace std;rnclass Datarnrnprivate:rn int h, l;rn int a[100][100];rnpublic:rn Data()rn Data(int k, int m, int b[100][100])rn rn h = k;rn l = m;rn for (int i = 0; i> n >> m)rn rn for (int i = 0; i> c;rn a[i][j] = c;rn rn rn for (int k = 0; k> c;rn b[k][l] = c;rn rn rn Data A(n, m, a);rn Data B(n, m, b);rn Data C = A + B;rnrn cout << C;rn rn return 0;rn[/code]rn为什么把<em>这段</em><em>代码</em>rn[code=c]friend Data operator +(Data &e, Data&d)rn rn Data f;rn for (int i = 0; i
HDU-3065 病毒侵袭持续中(AC自动机)
小t非常感谢<em>大家</em><em>帮忙</em>解决了他的上一个问题。然而病毒侵袭持续中。在小t的不懈努力下,他发现了网路中的“万恶之源”。这是一个庞大的病毒网站,他有着好多好多的病毒,但是这个网站包含的病毒很奇怪,这些病毒的特征码很短,而且只包含“英文大写字符”。当然小t好想好想为民除害,但是小t从来不打没有准备的战争。知己知彼,百战不殆,小t首先要做的是知道这个病毒网站特征:包含多少不同的病毒,每种病毒出现了多少次。<em>大家</em>...
帮忙看下这段 代码
项目使用的是mvc1.0 rnrn一个类继承Controller实现抽象方法OnActionExecuting. <em>大家</em>帮我<em>看下</em>,谢谢。rnrn protected override void OnActionExecuting(ActionExecutingContext filterContext)rn rnrn string[] arr = Request.Url.Host.Split('/');rn string newEventName = arr[0].ToLower();rnrn //if (newEventName == "manage")rn //rn // Response.Redirect("manage");rn //rn if (!filterContext.HttpContext.User.Identity.IsAuthenticated || Session["user"] == null)rn rn //use the current url for the redirectrn string redirectOnSuccess = filterContext.HttpContext.Request.Url.AbsolutePath;rnrn //send them off to the login pagern string redirectUrl = string.Format("?ReturnUrl=0", redirectOnSuccess);rn string loginUrl = FormsAuthentication.LoginUrl + redirectUrl;rn filterContext.HttpContext.Response.Redirect(loginUrl, true);rnrn rnrn#if DEBUGrn this.EventList = new EventRepository().GetEventList(1);rn#elsern if (this.CurrentCompany != null)rn rn this.EventList = new EventRepository().GetEventList(this.CurrentCompany.id);rn rn#endifrnrn if (this.EventList != null && this.EventList.Count > 0)rn rnrn if (this.CurrentEvent == null ||rn newEventName != this.CurrentEvent.eventName.ToLower())rn rn this.CurrentEvent = this.EventList.Where(e => e.eventName.ToLower() == newEventName).SingleOrDefault();rnrn if (this.CurrentEvent == null)rn rn this.CurrentEvent = this.EventList[0];rn _isRedirectSubDomain = true;rn //filterContext.Result = JavaScript("Banner");rn rn rnrn ViewData["EventList"] = new SelectList(this.EventList, "id", "eventname", this.CurrentEvent.id);rnrn base.OnActionExecuting(filterContext);rn rn
帮忙看下这段代码
我想添加一个菜单 有一个mseeagebox 但是我的对话框弹不出 <em>帮忙</em><em>看下</em>rnvoid CRascalView: OnRButtonDown(UINT nFlags, CPoint point)rnrn CMenu *pMenu=AfxGetMainWnd()->GetMenu();rn pMenu->GetSubMenu(0) ->AppendMenu(MF_SEPARATOR);rn pMenu->GetSubMenu(0) ->AppendMenu(MF_STRING,ID_Machine,"设备");rn MessageBox("error",MB_OK);rn CView: OnRButtonDown(nFlags, point);rn
帮忙看下这段代码!!
using System;rnrnnamespace ConsoleApplication1rnrn /// rn /// Class1 的摘要说明。rn /// rn class Class1rn rn enum Temperaturesrn rn FreezingPoint = 32,rn BoilingPoint = 212,rn SwimmingWeathet = 27rn rnrn rn /// rn /// 应用程序的主入口点。rn /// rn [STAThread]rn static void Main(string[] args)rn rn rnrn System.Console.WriteLine("Freezing point of water :0",(int)Temperatures.FreezingPoint);rnrn System.Console.WriteLine("BoilingPoint: 0",(int) Temperatures.BoilingPoint);rn rn rn rnrnrn为什么把enum Temperatures放到Main中定义就会出错?rn
帮忙看下这段代码
if(objder.Read())rn rn if(passd==objder.GetValue(2).ToString())rn rn 如果执行了<em>这段</em><em>代码</em>rn Session["id"]=objder.GetValue(0);rn Response.Redirect(burl);rn rn rn elsern rn error.InnerHtml=" 密码错误!";rn return;rn rnrn rn elsern rn error.InnerHtml=" 错误,用户名不存在!";rn return;rn rn objder.Close();rn objcom.Dispose();rn conn.Close();rnrnrnrnrnrn 如果执行了<em>这段</em><em>代码</em>rn Session["id"]=objder.GetValue(0);rn Response.Redirect(burl);rnrn底下的<em>代码</em> objder.Close(); objcom.Dispose(); conn.Close();这些<em>代码</em>还会执行吗?rn
帮忙看下这段代码~~
[url=http://blog.csdn.net/KingWolfOfSky/archive/2009/08/13/4444231.aspx][/url]rn这篇博客里面讲了些关于Java细节方面的内容,它给了下面段<em>代码</em>,对输出还是不理解,麻烦各位大虾给解释下~~rn[code=Java]rn 1. public static void main(String args[]) rn 2. rn 3. Integer i1=new Integer(13); rn 4. Integer i2=new Integer(13); rn 5. int i3=13; rn 6. System.out.println(i1==i2); rn 7. System.out.println(i2==i3); rn 8. System.out.println(i3==i1); rn 9. rn 10. * Output rn 11. * true rn 12. * false rn 13. * true rn 14. */ rn[/code]rnrn还有他说了自动包装时对于从–128到127之间的值,它们被包装为Integer对象后,会存在内存中被重用,而其它的值,被包装后的Integer对象并不会被重用,即相当于每次包装时都新建一个Integer对象。rn这是为什么?rn小弟新人,先谢谢各位了~~
大家看下这段代码
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;rn private System.Windows.Forms.ToolStripMenuItem menuImage;rn//rn//注册事件rn//rn this.menuImage.DropDownItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.menuImage_DropDownItemClicked);rn//rn//定义事件处理程序rn// 下面的理解不了 该怎么去理解呢 希望各位提些意见rn private void menuImage_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e)rn rn ProcessImageClick(e);//怎么还要定义一个方法??rn rn private void ProcessImageClick(ToolStripItemClickedEventArgs e)//怎么只有一个参数?rn rn ToolStripItem item=e.ClickedItem; //这儿怎么没用 new??rn string enumVal=item.Tag as string;rn if(enumVal!=null)rn rn pictureBox1.SizeMode=(PictureBoxSizeMode)Enum.Parse(typeof(PictureBoxSizeMode),enumVal);//不懂rn rn rn
大家帮忙看下代码
[code=C#]rnrn private string _FileName;rnrn private static Dictionary lockDic = new Dictionary();rnrn /// rn /// 获取或设置文件名称rn /// rn public string FileNamern rn get return _FileName; rn set _FileName = value; rn rn /// rn /// 写入文本rn /// rn /// 文本内容rn /// 文本内容rn private void Write(string content, string newLine)rn rn if (string.IsNullOrEmpty(_FileName))rn rn return ;rn rn using (System.IO.FileStream fs = new System.IO.FileStream(_FileName, System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.ReadWrite, System.IO.FileShare.ReadWrite, 8, System.IO.FileOptions.Asynchronous))rn rnrn Byte[] dataArray = System.Text.Encoding.Default.GetBytes(content + newLine);rnrn bool flag = true;rn long slen = dataArray.Length;rn long len = 0;rn while (flag)rn rn tryrn rn if (len >= fs.Length)rn rn fs.Lock(len, slen);rn lockDic[len] = slen;rn flag = false;rn rn elsern rn len = fs.Length;rn rn rn catch (Exception ex)rn rn while (!lockDic.ContainsKey(len))rn rn len += lockDic[len];rn rn rn rn fs.Seek(len, System.IO.SeekOrigin.Begin);rn fs.Write(dataArray, 0, dataArray.Length);rn fs.Close();rn rn rn[/code]rnrn如上<em>代码</em>,wince下面,System.IO.FileOptions.Asynchronous 和 fs.Lock(len, slen);rn这两行<em>代码</em> wince没有该方法或者成员,请问怎么改写,谢谢!
看下这段代码??
#include rn rnclass Matrix rn rnprivate: rn int matrix[3][3]; rnpublic: rn void transpose() rn rn cout <>number; rn matrix[a][b]=number; rn //cout <<<
看下这段代码
这是段类似于拼图游戏的<em>代码</em>,由于作者不良习惯不写注释,哪位高人能告诉我其中变量b,main,ac,ok分别代表什么意思吗?rnrnimport java.awt.*;rnimport java.awt.event.*;rnimport javax.swing.*;rnrnpublic class Grider extends java.applet.Applet implements ActionListenerrnrn JButton jb[]=new JButton[16];rn String []str="15","14","13","12","11","10","9","8","7","6","5","4","3","2","1"," ";rn GridLayout glt=new GridLayout(4,4);rn int b=15,main=15;rn String ac=" ",ok=" ";rn JPanel jp=new JPanel();rn boolean bol=false;rnrn public void init()rn rn jp.setSize(300,300);rn jp.setLayout(glt);rn rn setLayout(new FlowLayout());rn for (int i=0;i+ok);rn rn rn rn rn rnrnrn
重绘标题栏闪烁问题怎么搞??
请<em>大家</em><em>帮忙</em>!谢了~ 请<em>大家</em><em>帮忙</em>!谢了~ 请<em>大家</em><em>帮忙</em>!谢了~
请人帮忙英语
Exercise2:n一、请求别人<em>帮忙</em>的句子n1、I’m sorry to bother you, but can you help me?n很抱歉打扰你,能帮我一下吗?n2、I’m afraid it was a bother for you to do this.n恐怕这件事要麻烦您了。n3、I wonder if you could help me with this.n不知道能否请您帮我一...
大家帮忙看下这段代码是什么意思~~
[code]rnrnFullPairwiseAlign::FullPairwiseAlign()rn: _maxAlnLength(0),rn intScale(0),rn mmScore(0),rn printPtr(0),rn lastPrint(0),rn _gapOpen(0),rn _gapExtend(0),rn seq1(0),rn seq2(0),rn maxScore(0),rn sb1(0),rn sb2(0),rn se1(0),rn se2(0)rnrnrnrnrn[/code]rnrn我不理解的地方就是,大括号前面那些是什么东西....rn嗯,看了类定义的头文件,那些小括号前的都是类的成员变量.rnrn这个用法我在The C++ programming language里没找到.求助.谢谢~rn
大家帮忙看下这段代码哪有问题
[code=php]';rnecho $str2.' ';rnecho $str3.' ';rnecho $str4.' ';rnecho $str5.' ';rnecho $str6.' ';rnrn?>[/code]rn报这个错:Notice: String offset cast occurred in E:\www\rand.php on line 5rn
大家帮忙进来看下这段代码
有个这个select语句,我反复试了好久,运行程序之后都是显示System.InvalidOperationException 不存在此行/列的数据,<em>代码</em>如下,连接以及invno的值都是正确的rnrnstring strselect01 = "select invoiceid from invoice where ifmodified=0 and invoiceno='" + invno + "'";rnrnreader01 = cmdselect01.ExecuteReader();rnMessageBox.Show(reader01[0].ToString());rnrn我反复检查了SQL语句,列名肯定都没错,而且invoiceid是自动编号的,不可能没有值啊,试了一个小时了,还是木有结果,求高手解答啊。rn
【提问】大家帮忙看下这段图片验证码的代码
[code=C#]rn int intLength = 5;rn string strIdentify = "Identify";rn public void ProcessRequest(HttpContext context)rn rn context.Response.ContentType = "image/gif";rn Bitmap b = new Bitmap(200, 60);rn Graphics g = Graphics.FromImage(b);rn g.FillRectangle(new SolidBrush(Color.YellowGreen), 0, 0, 200, 60);rn Font font = new Font(FontFamily.GenericSerif, 48, FontStyle.Bold, GraphicsUnit.Pixel);rn Random r = new Random();rnrn string strLetters = "abcedfhijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789";rn StringBuilder s = new StringBuilder();rn for (int i = 0; i < intLength; i++)rn rn s.Append(strLetters.Substring(r.Next(0, strLetters.Length - 1), 1));rn g.DrawString(s[s.Length - 1].ToString(), font, new SolidBrush(Color.Blue), i * 38, r.Next(0, 15));rnrn rnrn Pen pen = new Pen(new SolidBrush(Color.Blue), 2);rn for (int i = 0; i < 10; i++)rn rn g.DrawLine(pen, new Point(r.Next(0, 199), r.Next(0, 59)), new Point(r.Next(0, 199), r.Next(0, 59)));rn rnrn b.Save(context.Response.OutputStream, ImageFormat.Gif);rnrn [color=#FF0000] context.Session[strIdentify] = s.ToString();[/color]rn context.Response.End();rn rn[/code]rn<em>这段</em><em>代码</em>是放在一般处理程序.ashx里面的。rn是用来产生一段验证码的。rn可是 context.Session[strIdentify] = s.ToString();rn上面<em>这段</em><em>代码</em>会报错。rn[color=#FF0000]“未将对象引用设置到对象的实例。”[/color]rn
大家帮忙看下这段代码,如何优化!
[img=http://hi.csdn.net/attachment/201203/18/10687_1332048743c8N5.jpg][/img]rnrn太耗性能了
大家帮忙看下这段代码错在哪?
[code=HTML]rn rn 姓名rn rn 学号rn rn 身份证号码rn rn rn rnrn[/code]rn[code=JScript]rnvar xmlHttp;rnfunction createXMLHttpRequest()rn if (window.ActiveXObject)rn xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");rn else if(window.XMLHttpRequest)rn xmlHttp=new XMLHttpRequest();rn rnrnfunction idcheck()rn //document.getElementByName(delbname).disabled=false;rn var uname=document.getElementById('uname').value;rn var unum=document.getElementById('unum').value;rn var idnum=document.getElementById('idnum').value;rn alert('1');rn createXMLHttpRequest();rn alert('2');rn var url="idcheck.ajax.php";rn var postStr="uname="+uname;rn xmlHttp.open("POST",url,true);rn alert('21');rn xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");rn alert('22');rn xmlHttp.send(postStr);//奇怪的是:执行这一句时,就会跳出一个windows的登陆框。。。郁闷。为什么呢?rn alert('23');//程序执行到这边就停了。rn xmlHttp.onreadystatechange = function() rn alert('3');rn //如果执行状态成功,那么就把返回信息写到指定的层里rn if (xmlHttp.readyState == 4 && xmlHttp.status == 200) rn res=xmlHttp.responseText;rn alert('4');rn //alert(res);rn //resarr=res.split('ChEN1yA');rn if(res=='0') rn rn alert('认证失败!');rn //document.getElementByName("deldact"+id).disabled=true;rn elsern alert('认证通过');rn //document.getElementByName("deldact"+id).disabled=true;rn rn rn rnrn[/code]rn这个是idcheck.ajax.php文件rn[code=PHP]rn$db_host="localhost";rn$db_user="root";rn$db_password="*****";rn$db_port="3306";rn$db_name="jy_sztz1";rn$dbh=mysql_connect("$db_host:$db_port","$db_user","$db_password");rnmysql_select_db("$db_name");rn$str='0';rn$uname=$_POST['uname'];rn$unum=$_POST['unum'];rn$idnum=$_POST['idnum'];rnmysql_query("set names utf8"); rn$sql="select * from sztz_members where unum='$unum'";rn$res=mysql_query($sql);rn if (mysql_num_rows($res)>0)rn $row=mysql_fetch_array($res);rn if (($uname==$row['uname'])&&($idnum==$row['idnum']))rn $str='1';rn elsern $str='0';rn elsern $str='0';rnecho $str;rn[/code]rn奇怪的就在send()那一行,会出来登陆框,是啥问题呢?
大家帮忙看下这段代码 关于Hashmap的
[code=Java]rnrn Map map=new HashMap();rn for(int i=0;i it=map.keySet().iterator();rn while(it.hasNext()) rn it.hashCode();;rn System.out.println(it.next());rn// Object key = entry.getStyleid();rn// Object val = entry.getName();rn rnrnrn[/code]rnrnrnrnrnrnrn控制台语句rnrnrn[code=Java]rn是投票主题的id有38rn from Threads as p where p.tid =38rnfrom Forums where fid =9rnthreads=cn.jsprun.domain.Threads@1364ee5, threadsList=[cn.jsprun.domain.Forums@17a7adf]rnthreadsrnthreadsListrn[/code]rnrnrnrn 我Map里面存进去的是一个 threads对象 和 threadsList 集合rnrn 我想请问如何在 JAVA里面 遍历的时候获得对象 或者在jsp页面遍历可以 获得这个对象 rn ??rn
求教:大家帮忙看下这段代码
求教:<em>大家</em><em>帮忙</em><em>看下</em><em>这段</em><em>代码</em>rn小弟初学汇编,实在不懂怎么把<em>这段</em>C<em>代码</em>用汇编语言写出来!rnrn#include rn#include rnrnvoid main()rnrn char find[MAX_PATH] ;rn rn scanf("%s",find);rnrn if(strstr(find,"DELPHI") || strstr(find,"ASM") ||strstr(find,"JAVA"))rn rn MessageBox(NULL,find,"OK",MB_OK);rn rn rn
大家帮忙看下这段代码有没有问题
不知这是否算一个组件,安装可以成功,但没有在面板上显示出来,dcr文件也做了,在不用安装时,在一个工程中动态创建测试成功,就是安装了,没显示出来在面板上,是不是这种组合的方法不行呢rnrnrnunit QQcoolbar;rnrninterfacernrnusesrn windows,sysutils,Classes, Controls, StdCtrls, ComCtrls, Messages,graphics,rn Dialogs, ExtCtrls;rnrntypern torient=(horizontal,vertical);rnrntypern TQQCoolBar=class(tcustomcontrol)rnrn privatern pt1,pt2:tpaintbox;rn posx,posy:integer;rn sld1,sld2,sld3:tpoint;rnrn forient:torient;rn mbdown:boolean;rn frcl,fbcl,fgcl:byte;rn fcl:tcolor;rn fbarwidth,fbarheight:integer;rn fslider:tcolor;rnrn procedure checkbounds(xpos,ypos:integer);rn procedure pt1Paint(Sender: TObject);rn procedure pt1MouseDown(Sender: TObject; Button: TMouseButton;rn Shift: TShiftState; X, Y: Integer);rn procedure pt1MouseUp(Sender: TObject; Button: TMouseButton;rn Shift: TShiftState; X, Y: Integer);rn procedure pt1MouseMove(Sender: TObject; Shift: TShiftState; X,rn Y: Integer);rn procedure pt2Paint(Sender: TObject);rn procedure pt2MouseDown(Sender: TObject; Button: TMouseButton;rn Shift: TShiftState; X, Y: Integer);rn procedure pt2MouseUp(Sender: TObject; Button: TMouseButton;rn Shift: TShiftState; X, Y: Integer);rn procedure pt2MouseMove(Sender: TObject; Shift: TShiftState; X,rn Y: Integer);rn procedure changesize;rnrn procedure setorientvalue(value:torient);rn procedure setclvalue(value:tcolor);rn procedure setbarwidth(value:integer);rn procedure setbarheight(value:integer);rn procedure setslidercolor(value:tcolor);rn publicrn constructor create(aowner:tcomponent);override;rn destructor destroy;override;rnrn publishedrn property orientation:torient read forient write setorientvalue;rn property icolor:tcolor read fcl write setclvalue;rn property barwidth:integer read fbarwidth write setbarwidth;rn property barheight:Integer read fbarheight write setbarheight;rn property slidercolor:tcolor read fslider write setslidercolor;rn protectedrn property redvalue:byte read frcl;rn property greenvalue:byte read fgcl;rn property bluevalue:byte read fbcl;rnrn end;rnrnprocedure register;rnrnimplementationrnrnprocedure Register;rnbeginrn RegisterComponents('Samples', [TQQCoolBar]);rnend;rnrnconstructor TQQCoolBar.create(aowner:tcomponent);rnbeginrn inherited create(aowner);rn pt1:=tpaintbox.Create(self);rn pt1.Left:=0;rn pt1.Top:=0;rn pt1.Width:=140;rn pt1.Height:=6;rn pt1.Parent:=self;rn pt1.OnPaint:=pt1paint;rn pt1.OnMouseDown:=pt1mousedown;rn pt1.OnMouseMove:=pt1mousemove;rn pt1.OnMouseUp:=pt1mouseup;rnrn pt2:=tpaintbox.Create(self);rn pt2.Left:=10;rn pt2.Top:=pt1.Height ;rn pt2.Width:=120;rn pt2.Height:=20;rn pt2.Parent:=self;rn pt2.OnPaint:=pt2paint;rn pt2.OnMouseDown:=pt2mousedown;rn pt2.OnMouseMove:=pt2mousemove;rn pt2.OnMouseUp:=pt2mouseup;rnrn forient:=horizontal;rn posy:=10;rn posx:=10;rn fcl:=clgreen;rnrn width:=pt1.Width ;rn height:=pt1.Height+pt2.Height ;rn fbarwidth:=120;rn fbarheight:=20;rnrnend;rnrn
Linux入门笔记(4/1/2016修改)
n n n 本文笔记源自这里——[实验楼]n欢迎<em>大家</em>在下面交流其中有问题的地方喜欢请点收藏,每日更新(全部已亲自实践).n一. linux终端n1. 终端(Terminal)和控制台(Console)是有区别的:n终端本质上是对应着Linux上的/dev/tty设备,linux的多用户登陆就是通过不同的/dev/tty设备完成的,Linux默认提供了6个纯命令行界面的...
请高手来帮忙看下这段代码!!
rn rn rn rn rn rn rn rn rn rn rn rn这是一段读取数据库一个字段的<em>代码</em>,可是他显示出来的字段默认是最后的一个字段,希望能请高手帮下忙。name是要读取的数据库字段。
请高手帮忙看下这段代码
<em>代码</em>如下rnrnindex.htmlrn[code=javascript]rnrnrn rn rn rn rn rn rn rn rn rn rn rnrnrn rn rn rn Hide panelrn rn rnrn rn rn rnrnrn[/code]rnrnpanel.js:rn[code=javascript]rn$('.dropdown-toggle').dropdown();rnrnvar hidden=false;rnrn$("#paneltoggle").click(function() rn $("div.panel").toggle(1000);rn $("div.map").attr("style", "width:100%;");rn);rnrn[/code]rnrn我想点击按钮来隐藏面板,显示整块地图。 但现在点击Hide Panel按钮只能隐藏panel里的东西,但红色背景还是存在,而且地图部分不能变成100%。rnrn小弟初接触javascript,请版里高手指点。rn
请高手们帮忙看下这段代码
能不能把下面的<em>代码</em>写成VB的<em>代码</em>rnrnbool ChangeMountPoint(LPCTSTR lpDriveLetter,LPCTSTR lpDevice,bool bAddMountPoint)rnrn bool bRet = false;rn TCHAR szDriveLetterAndSlash[4] = 0;rn TCHAR szDriveLetter[3] = 0;rn TCHAR szUniqueVolumeName[MAX_PATH] = 0;rn if(lpDriveLetter && lpDevice)rn rn szDriveLetter[0] = lpDriveLetter[0];rn szDriveLetter[1] = TEXT(':');rn szDriveLetter[2] = TEXT('\0');rn rn szDriveLetterAndSlash[0] = lpDriveLetter[0];rn szDriveLetterAndSlash[1] = TEXT(':');rn szDriveLetterAndSlash[2] = TEXT('\\');rn szDriveLetterAndSlash[3] = TEXT('\0');rn if ( bAddMountPoint )rn rn //Try to Attach lpDevice to lpDriveLetterrn bRet = DefineDosDevice (DDD_RAW_TARGET_PATH, szDriveLetter,rn lpDevice);rn rn if (bRet)rn rn if (!GetVolumeNameForVolumeMountPoint (szDriveLetterAndSlash,rn szUniqueVolumeName,rn MAX_PATH))rn rn //Can't Find Attached lpDevice 's VolumeNamern szUniqueVolumeName[0] = '\0';rn rn rn bRet = DefineDosDevice ( rn DDD_RAW_TARGET_PATH|DDD_REMOVE_DEFINITION|rn DDD_EXACT_MATCH_ON_REMOVE, szDriveLetter,rn lpDevice);rn rn if (!bRet)rn return bRet;rn rn bRet = SetVolumeMountPoint(szDriveLetterAndSlash, rn szUniqueVolumeName);rn rn rn elsern rn bRet = DeleteVolumeMountPoint (szDriveLetterAndSlash);rn rn rn rn return bRet;rn
帮忙看下这段代码谢谢了
rn 首页rnrn 月饼专区rn 休闲食品区rn 巧克力专区rn 品牌专区rn 特价专区rnrn 品牌rn
请大侠们帮忙看下这段代码
#include rn#include rnusing namespace std;rnTCHAR * GetFileName(TCHAR *fileName, TCHAR *fileContent);rnint main()rnrn bool file = true;rn HANDLE hFile;rn WIN32_FIND_DATA findData;rn char filePath[MAX_PATH] = 0;rn cout << "请输入文件夹路径:";rn gets_s(filePath, sizeof(filePath));rn hFile = FindFirstFile(filePath, &findData);rn TCHAR *fileNewName = new TCHAR[10];rn while (FindNextFile(hFile, &findData))rn rn if (hFile == INVALID_HANDLE_VALUE)rn rn break;rn rn if (findData.cFileName == "." || findData.cFileName == "..")rn rn continue;rn rn cout << findData.cFileName << endl;rn rn CloseHandle(hFile);rn memset(fileNewName, 0, sizeof(TCHAR)* 10);//main里new,防止内存泄露rn cout << findData.cFileName;rn GetFileName(findData.cFileName, fileNewName);rn cout << endl;rn delete fileNewName;rn return 0;rnrnTCHAR * GetFileName(TCHAR *fileName,TCHAR * fileContent)rnrn HANDLE hFile;rn hFile = CreateFile(fileName,GENERIC_READ,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);rn if (hFile == INVALID_HANDLE_VALUE)rn rn cout << "error";rn exit(-1);rn rn TCHAR str[10] = 0;rn DWORD ch;rn ReadFile(hFile, str, 10, &ch, NULL);rn //TCHAR *fileContent = new TCHAR[10];rn memset(fileContent, 0, 10);//指针初始化rn //fileContent[10] = 0 ;rn memcpy(fileContent, str,10);rn CloseHandle(hFile);rn return fileContentrnrn能输入软件的文件名,但是也会输出error,获取不到文件的内容,请问这个应该怎么改。谢谢!!!
大家看下这段代码(急)
Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal length As Long)rnrnsub aa()rnrnDim b(0 To 3) As ByternDim l(0 To 3) As Byternb(0) = &H11rnb(1) = &H22rnb(2) = &H33rnb(3) = &H44rnrnCopyMemory VarPtr(l(0)), VarPtr(b(0)), 4rnMsgBox l(0)rnrnend subrnrnl(0 to 3)的值始终为0 rn照搬的例子, 好像CopyMemory没有工作一样。。。。怎么回事呀?rn我用的是vb6.0中文版.rnrnrnrn
大家帮我看下这段jsp 代码
主要就是一些注册信息,然后判断下用户名是否重复,密码是否一样等等,<em>大家</em>随便看看,问题在下面rnrnrnrnrnrnrnrn rn Insert title herernrn rnrn rn rnrnrnrn rnrnrnrn rn rn 添加新用户信息rn rn rn rn 电子信箱: rn rn 会 员 名: rn rn 登陆密码: rn rn 确认密码: rn rn 验 证 码: rn rn rn rn rn rn rnrnrnrnrnrn问题是 现在是在客户端 做的判断,如果我想在服务器端判断rn把ajax 请求那里这样写,是否可以rnvar now = new Date().getTime();rn $.ajax(rn url: 'userManager.do?method=add',rn type: 'post',rn data: 'username=' + username + '&password=' + password + rn '&rand=' + rand + '&email=' + email + '&now=' + now,rn success: function(data)rn if(data == 'OK') rn alert("恭喜你!注册成功!");rn else rn alert(data);rn rn ,rn error: function() rn alert("对不起!你的请求存在异常!");rn rn );rnrn
SQL server应用程序
<em>大家</em><em>帮忙</em><em>看下</em>Mysql 应用 程序看能不能用
大家帮忙看下这段程序?
[code=Java]public class Statics rn rn Sclass clas = new Sclass();rnrnrn public void init(Student [] s)rn rn //将Student数组中的每一个对象取出rn for (int i=0;i
大家帮忙看下这段代码怎么出错了!
#includernconst int SIZE=20;rnstruct donorrn char donor_name[SIZE];rn double money;rn;rnint main()rnrn using namespace std;rn int strsize;rn cout<>strsize;rn donor * info =(donor*)new donor[strsize];rn for (int i=0;idonor_name,SIZE);rn cout<<>(info+i)->money;rn rn for (int j=0;jmoney>10000.0)rn cout<<<<<<<
大家帮忙看下这段代码是否存在内存泄露
[code=c]rnvoid t_rnxObsFile::writeEpochV3(QTextStream* stream, const t_rnxObsHeader& header, rn const t_rnxEpo* epo) rnrn unsigned year, month, day, hour, min;rn double sec;rn epo->tt.civil_date(year, month, day);rn epo->tt.civil_time(hour, min, sec);rnrn QString dateStr;rn QTextStream(&dateStr) << QString("> %1 %2 %3 %4 %5%6")rn .arg(year, 4)rn .arg(month, 2, 10, QChar('0'))rn .arg(day, 2, 10, QChar('0'))rn .arg(hour, 2, 10, QChar('0'))rn .arg(min, 2, 10, QChar('0'))rn .arg(sec, 11, 'f', 7);rnrn int flag = 0;rn *stream << dateStr << QString("%1%2\n").arg(flag, 3).arg(epo->rnxSat.size(), 3);rnrn for (unsigned iSat = 0; iSat < epo->rnxSat.size(); iSat++) rn const t_rnxSat& rnxSat = epo->rnxSat[iSat];rn char sys = rnxSat.prn.system();rnrn t_rnxObs* hlp=new t_rnxObs[header.nTypes(sys)]; rn for (int iTypeV3 = 0; iTypeV3 < header.nTypes(sys); iTypeV3++) rn hlp[iTypeV3].value= 0;rn QString typeV3 = header.obsType(sys, iTypeV3);rn QMapIterator itObs(rnxSat.obs);rnrn // Exact matchrn // -----------rn while (itObs.hasNext()) rn itObs.next();rn const QString& type = itObs.key();rn const t_rnxObs& rnxObs = itObs.value();rn if (typeV3 == type2to3(sys, type) && rnxObs.value != 0.0) rn hlp[iTypeV3] = itObs.value();rn rn rnrn // Non-Exact matchrn // ---------------rn itObs.toFront();rn while (itObs.hasNext()) rn itObs.next();rn const QString& type = itObs.key();rn const t_rnxObs& rnxObs = itObs.value();rn if (hlp[iTypeV3].value == 0 && typeV3 == type2to3(sys, type).left(2) && rnxObs.value != 0.0) rn hlp[iTypeV3] = itObs.value();rn rn rn rnrn *stream << rnxSat.prn.toString().c_str();rnrn for (int iTypeV3 = 0; iTypeV3 < header.nTypes(sys); iTypeV3++) rn const t_rnxObs* rnxObs = &hlp[iTypeV3];rn if (rnxObs == 0) rn *stream << QString().leftJustified(16);rn rn else rn *stream << QString("%1").arg(rnxObs->value, 14, 'f', 3);rn if (rnxObs->lli != 0.0) rn *stream << QString("%1").arg(rnxObs->lli,1);rn rn else rn *stream << ' ';rn rn if (rnxObs->snr != 0.0) rn *stream << QString("%1").arg(rnxObs->snr,1);rn rn else rn *stream << ' ';rn rn rn rn *stream << endl;rn delete []hlp;;rn rnrn[/code]rnrn加入<em>这段</em><em>代码</em>之后,程序的内存不断增加,可是其中只有一个地方新建了对象,而且释放了,不明白为什么,请<em>大家</em><em>帮忙</em><em>看下</em>
帮忙看下这段代码啥意思?
#ifdef USE_DOT_Hrn #include rn#elsern #include rn #if !defined( __BORLANDC__ ) || __BORLANDC__ >= 0x0530rn using namespace std; rn #endifrn#endifrnrnrn1 USE_DOT_H 是什么意思 ?rn2 defined( __BORLANDC__ ) || __BORLANDC__ >= 0x0530 是什么意思?rn
WPF,帮忙看下这段代码
[code=html]rnrn rn rn
帮忙看下这段数据库代码
[code=XML]rnrnrnrnrnrn[/code]rn界面布局一个按钮,一个TextView,点击按钮,从程序自带的数据库中读取一条记录rnrn 数据库类rn[code=Java]rnpackage com.easymorse;rnrnimport java.io.FileOutputStream;rnimport java.io.IOException;rnimport java.io.InputStream;rnimport java.io.OutputStream;rnrnimport android.content.Context;rnimport android.database.SQLException;rnimport android.database.sqlite.SQLiteDatabase;rnimport android.database.sqlite.SQLiteException;rnimport android.database.sqlite.SQLiteOpenHelper;rnrn public class DataBaseHelper extends SQLiteOpenHelperrn rn //The Android's default system path of your application database.rn private static String DB_PATH = "/data/data/com.easymorse/databases/";rn rn private static String DB_NAME = "f_dic2.db";rn rn private SQLiteDatabase myDataBase; rn rn private final Context myContext;rn rn /**rn * Constructorrn * Takes and keeps a reference of the passed context in order to access to the application assets and resources.rn * @param contextrn */rn public DataBaseHelper(Context context) rn rn super(context, DB_NAME, null, 1);rn this.myContext = context;rn rn rn /**rn * Creates a empty database on the system and rewrites it with your own database.rn * */rn public void createDataBase() throws IOExceptionrn rn boolean dbExist = checkDataBase();rn rn if(dbExist)rn //do nothing - database already existrn elsern rn //By calling this method and empty database will be created into the default system pathrn //of your application so we are gonna be able to overwrite that database with our database.rn this.getReadableDatabase();rn rn try rn rn copyDataBase();rn rn catch (IOException e) rn rn throw new Error("Error copying database");rn rn rn rn rn rn rn /**rn * Check if the database already exist to avoid re-copying the file each time you open the application.rn * @return true if it exists, false if it doesn'trn */rn private boolean checkDataBase()rn rn SQLiteDatabase checkDB = null;rn rn tryrn String myPath = DB_PATH + DB_NAME;rn checkDB = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READONLY);rn rn catch(SQLiteException e)rn rn //database does't exist yet.rn rn rn rn if(checkDB != null)rn rn checkDB.close();rn rn rn rn return checkDB != null ? true : false;rn rn rn /**rn * Copies your database from your local assets-folder to the just created empty database in thern * system folder, from where it can be accessed and handled.rn * This is done by transfering bytestream.rn * */rn private void copyDataBase() throws IOExceptionrn rn //Open your local db as the input streamrn InputStream myInput = myContext.getAssets().open(DB_NAME);rn rn // Path to the just created empty dbrn String outFileName = DB_PATH + DB_NAME;rn rn //Open the empty db as the output streamrn OutputStream myOutput = new FileOutputStream(outFileName);rn rn //transfer bytes from the inputfile to the outputfilern byte[] buffer = new byte[1024];rn int length;rn while ((length = myInput.read(buffer))>0)rn myOutput.write(buffer, 0, length);rn rn rn //Close the streamsrn myOutput.flush();rn myOutput.close();rn myInput.close();rn rn rn rn public SQLiteDatabase openDataBase() throws SQLExceptionrn rn //Open the databasern String myPath = DB_PATH + DB_NAME;rn myDataBase = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READONLY);rn return myDataBase;rn rn rn @Overridern public synchronized void close() rn rn if(myDataBase != null)rn myDataBase.close();rn rn super.close();rn rn rn rn @Overridern public void onCreate(SQLiteDatabase db) rn rn rn rn @Overridern public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) rn rn rn rn // Add your public helper methods to access and get content from the database.rn // You could return cursors by doing "return myDataBase.query(....)" so it'd be easyrn // to you to create adapters for your views.rn rn /////////////////主页面<em>代码</em>rnrnpackage com.easymorse;rnrnrnimport java.io.IOException;rnimport android.app.Activity; rnimport android.database.Cursor; rnimport android.database.SQLException;rnimport android.database.sqlite.SQLiteDatabase; rnimport android.os.Bundle; rnimport android.view.View; rnimport android.view.View.OnClickListener; rnimport android.widget.TextView;rnrnpublic class SHARKActivity extends Activity implements OnClickListener rn rn @Override rn public void onCreate(Bundle savedInstanceState) rn super.onCreate(savedInstanceState); rn setContentView(R.layout.main); rn View newButton=this.findViewById(R.id.button1);rn newButton.setOnClickListener(SHARKActivity.this);rn rn public void onClick(View view) rn rn SQLiteDatabase dicData;rn DataBaseHelper myDbHelper = new DataBaseHelper(null);rn myDbHelper = new DataBaseHelper(this);rn try rn myDbHelper.createDataBase();rn catch (IOException ioe) rn throw new Error("Unable to create database");rn rn try rn dicData=myDbHelper.openDataBase();rn catch(SQLException sqle)rn throw sqle;rn rn String sql = "select * from Question_DATA where id=1"; rn Cursor cursor =dicData.rawQuery(sql, null);rn if (cursor.getCount() > 0)rn rn //必须使用moveToFirst方法将记录指针移动到第1条记录的位置rn cursor.moveToFirst();rn String result = cursor.getString(cursor.getColumnIndex("Question_Content"));rn TextView tv=(TextView)SHARKActivity.this.findViewById(R.id.textView1);rn tv.setText(result);rn rn rnrnrnrnrnrn[/code]rnrn出的错误rn07-29 06:17:08.109: ERROR/Database(15257): SELECT locale FROM android_metadata failedrnrn07-29 06:17:08.149: ERROR/Database(15257): Failed to setLocale() when constructing, closing the databasernrn07-29 06:17:08.149: ERROR/Database(15257): android.database.sqlite.SQLiteException: no such table: android_metadatarnrn07-29 06:17:08.149: ERROR/Database(15257): at android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)rnrn07-29 06:17:08.149: ERROR/Database(15257): at android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:1950)rn07-29 06:17:08.149: ERROR/Database(15257): at android.database.sqlite.SQLiteDatabase.(SQLiteDatabase.java:1818)rnrn07-29 06:17:08.149: ERROR/Database(15257): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:817)rnrn07-29 06:17:08.149: ERROR/Database(15257): at com.easymorse.DataBaseHelper.checkDataBase(DataBaseHelper.java:74)rnrn07-29 06:17:08.149: ERROR/Database(15257): at com.easymorse.DataBaseHelper.createDataBase(DataBaseHelper.java:41)rnrn07-29 06:17:08.149: ERROR/Database(15257): at com.easymorse.SHARKActivity.onClick(SHARKActivity.java:38)rn。。。
帮忙看下这段代码的问题
int ID = intID;rnint STermID = this.SelectedTermID;rnstring TermBatchNo = this.SelectedTermBatchNo;rnrnrnrnSqlCommand cmd = new SqlCommand("INSERT INTO catOriginalEvent_Teacher (TermID, TermBatchNo, OriginalEventID, TeacherID) Values (STermID.ToString(), SelectedTermBatchNo, ID.ToString(), '1234')");rnrnrn请问在Values后面跟的这个变量名有什么问题,我用STermID.ToString()和 STermID好像都不对
帮忙看下这段generator代码
[code=python]def psychologist():rn print('Please tell me your problems')rn while True:rn answer = yieldrn if answer is not None:rn if answer.endswith('?'):rn print('Don\'t ask yourself too much questions...')rn elif 'good' in answer:rn print('That\'t good. Go on.')rn elif 'bad' in answer:rn print('Be positive. Believe in yourself.')rn else:rn print('Fuck you. What are you talking about!')rn[/code]rnrn谁能解释下下面的输出?rnrn>>> free = psychologist()rn>>> next(free)rnPlease tell me your problemsrn>>> free.send('how are you?')rnDon't ask yourself too much questionsrn>>> next(free)rn>>> next(free)rn>>> next(free)rn>>> next(free)rnrn为什么只有第一次在next(free)后面出现那行:Please tell me your problemsrn而后面不管怎么next(free),都没有任何作用(是真的没有任何作用么?)rn求解。rn
这段代码乱码帮忙看下
rnrnrnrnrnrnrnrnrnrnrnrnrn 使用存取JavaBean的三个action元素rn rnrnrnrnrn 查询结果: rn rn 姓名: rn 学号: rn 年龄: rnrn rnrn 学生rn rn rn rn 姓名:rn rn 学号:rn rn rn rn rn rnrnrnrnrn输出结果:rn姓名:??rn学号:455rn年龄: 30 rn姓名中文就乱码!rnrn下面是用到的javabeanrnStudent.javarnpackage student;rnpublic class Student rn rn private String name;rn private String stuCode;rn private int age;rn private boolean query;rn rn public Student()rn name="liuyongpo";rn stuCode="BY010226";rn age=25;rn query=false;rn rn rn public void setName(String name)rn this.name = name;rn rn rn public void setStuCode(String stuCode)rn this.stuCode = stuCode;rn rn rn public void setAge(int age)rn this.age=age;rn rn rn public void setQuery(boolean query)rn this.query=query;rn rn rn public String getName()rn return name;rn rn rn public String getStuCode()rn return stuCode;rn rn rn public int getAge()rn return age;rn rn rn public boolean getQuery()rn return query;rn rnrn
帮忙看下这段代码对不对
[code=C#]rn string sqlks="select distinct(month) as month from month where kaohefangshi='1'";//查询考核方式为月的所有月份列表,然后根据月份列表批量增加相应的记录rn SqlCommand cmdsqlks=new SqlCommand(sqlks,conn);rn SqlDataReader reader1=cmdsqlks.ExecuteReader();rn while(reader.Read())rn rn string intsertxjl="insert into month(khdx,khdxfx,khdxfxxh,khnr,fz,jf,kf,khdw,jcfz,mkh,qkh,ykh,kaohefangshi,month) select khdx,khdxfx,khdxfxxh,khnr,fz,jf,kf,khdw,jcfz,mkh,qkh,ykh,kaohefangshi,'"+reader1["month"].ToString().Trim()+"' where mkh='0' and qkh='1' and month='本月'";rn SqlCommand cmdintsertxjl=new SqlCommand(intsertxjl,conn);rn cmdintsertxjl.ExecuteNonQuery();rn reader.NextResult();rn rn[/code]rn关键是循环里边的内容是不是可以全部执行完。。或者有更好的语句能够把整个过程用一个语句完成的也可以rn
帮忙看下这段代码什么意思?
<>0 thenrn Response.redirect WebSiteURLrn Response.endrn end ifrn Nextrn Nextrnelsern For Each RequestKey In Request.Formrn For iGuF=0 To Ubound(GuErrorSQLF)rn if Instr(LCase(Request.Form(RequestKey)),GuErrorSQLF(iGuF))<>0 thenrn Response.redirect WebSiteURLrn Response.endrn end ifrn Nextrn Nextrnend ifrn%>rn
帮忙看下这段javascript代码
在什么条件下它会调用ERR_Noneplayer这个变量rnrn
高手帮忙看下这段代码
import java.awt.*;rnimport java.awt.event.*;rnpublic class MenuDemo extends Framernrn MenuDemo()rn rn super("MenuItem Example");rn MenuBar mb=new MenuBar();rn Menu m=new Menu("File");rn MenuItem mi=new MenuItem("New");rn mi.setEnabled(false);rn m.add(mi);rn m.add("Open...");rn m.add("-");rn m.add("Exit");rn mb.add(m);rn setMenuBar(mb);rn setSize(300,200);rn setVisible(true);rn addWindowListener(new Win());rn rn rn /*public boolean action(Event evt, Object what)rn rn if("New".equals(what))rn return true;rn else if("Open...".equals(what))rn return true;rn rn return false;rn */rn public static void main(String[] args)rn rn new MenuDemo();rn rnrnclass Win extends WindowAdapterrnrn public void windowClosing(WindowEvent e)rn rn System.exit(0);rn rnrn请问我注释掉的那段<em>代码</em>起什么作用啊!rn我把它注释掉和不注释掉程序都没什么区别啊~rn谢谢
【求助】帮忙看下这段代码
#include rnrnLRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;rnint WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,rnPSTR szCmdLine, int iCmdShow)rnrnstatic TCHAR szAppName[] = TEXT ("HelloWin") ;rnHWND hwnd ;rnMSG msg ;rnWNDCLASS wndclass ;rnwndclass.style = CS_HREDRAW | CS_VREDRAW ;rnwndclass.lpfnWndProc = WndProc ;rnwndclass.cbClsExtra = 0 ;rnwndclass.cbWndExtra = 0 ;rnwndclass.hInstance = hInstance ;rnrnwndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION) ;rnwndclass.hCursor = LoadCursor (NULL, IDC_ARROW) ;rnwndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;rnwndclass.lpszMenuName = NULL ;rnwndclass.lpszClassName = szAppName ;rnif (!RegisterClass (&wndclass))rnrnMessageBox ( NULL, TEXT ("This program requires Windows NT!"),rnszAppName, MB_ICONERROR) ;rnreturn 0 ;rnrnhwnd = CreateWindow( szAppName, // window class namernTEXT ("The Hello Program"), // window captionrnWS_OVERLAPPEDWINDOW, // window stylernCW_USEDEFAULT, // initial x positionrnCW_USEDEFAULT, // initial y positionrnCW_USEDEFAULT, // initial x sizernCW_USEDEFAULT, // initial y sizernNULL, // parent window handlernNULL, // window menu handlernhInstance, // program instance handlernNULL) ; // creation parametersrnShowWindow (hwnd, iCmdShow) ;rnUpdateWindow (hwnd) ;rnwhile (GetMessage (&msg, NULL, 0, 0))rnrnTranslateMessage (&msg) ;rnDispatchMessage (&msg) ;rnrnreturn msg.wParam ;rnrnLRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)rnrnHDC hdc ;rnPAINTSTRUCT ps ;rnRECT rect ;rnswitch (message)rnrncase WM_CREATE:rnPlaySound(TEXT ("hellowin.wav"), NULL, SND_FILENAME | SND_ASYNC) ;rnreturn 0 ;rncase WM_PAINT:rnrnhdc = BeginPaint (hwnd, &ps) ;rnGetClientRect (hwnd, &rect) ;rnDrawText (hdc, TEXT ("Hello, Windows 98!"), -1, &rect,rnDT_SINGLELINE | DT_CENTER | DT_VCENTER) ;rnEndPaint (hwnd, &ps) ;rnreturn 0 ;rncase WM_DESTROY:rnPostQuitMessage (0) ;rnreturn 0 ;rnrnreturn DefWindowProc (hwnd, message, wParam, lParam) ;rnrn链接时出现以下错误rnLIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _mainrnDebug/HELLOIN.exe : fatal error LNK1120: 1 unresolved externalsrnError executing link.exe.
大神帮忙看下这段代码
public class Test rn static boolean foo(char c) rn System.out.print(c);rn return true;rn rn public static void main( String[] argv ) rn int i =0;rn for ( foo('A'); foo('B')&&(i);rn rn rn rn输出结果ABDCBDCBrn为什么
帮忙看下这段代码,谢谢
LPVOID NewModule; rn LPDWORD lpimagesize; rnrn Module = GetModuleHandle(NULL);//进程映像的基址 rn _asm rn rn push eax; rn push ebx; rn mov ebx,Module; rn mov eax,[ebx+0x3c]; rn lea eax,[ebx+eax+0x50]; rn mov eax,[eax] rn mov lpimagesize,eax; rn pop ebx; rn pop eax; rn ;rnrn小弟刚刚学汇编,不理解上面<em>这段</em><em>代码</em>,是C语言嵌入进去的,请高手<em>帮忙</em>转成C看看,谢谢了!
大家帮我看下这段代码...
[code=HTML] rn rn rn rn 说明一rn rn 说明二rn rn 说明三rn 说明四rn rn 说明五rn rn rn rn rn rn rn[/code]rnrn效果:[img=http://pb.images22.51img1.com/6000/wuxuezhouge/ba3b769f14e57db46dd5e91096f0fc74.jpg][/img]rnrn找了个<em>代码</em>··rn但发现图片和图片的距离很远,想搞近些,但就是不知道怎么修改·~rn看了下<em>代码</em>·好像要改DIV的CSS,但<em>代码</em>里的是id=www_qpsh_com 根本找不到它的CSS来修改·rn<em>大家</em>知道为什么吗?有什么办法?rnrn
大家看下这段VBA代码
<em>大家</em><em>看下</em><em>这段</em>VBA<em>代码</em>:错误提示Next没有For,急rnrnSub insert()rnrnDim a, b As IntegerrnDim str_id, str_itemp As StringrnFor a = 1 To Worksheets("old").Countrnstr_id = Worksheets("old").Cells(a, 1).ValuernFor b = 1 To Worksheets("new").CountrnIf Worksheets("new").Cells(b, 1).Value = str_id Thenrnstr_itemp = Worksheets("new").Cells(a, 3).ValuernWorksheets("old").Cells(a, 8).Value = str_itemprnWorksheets("old").Cells(a, 10).Value = Worksheets("new").Cells(a, 4).ValuernWorksheets("old").Cells(a, 11).Value = Worksheets("new").Cells(a, 5).ValuernWorksheets("old").Cells(a, 12).Value = Worksheets("new").Cells(a, 6).ValuernWorksheets("old").Cells(a, 14).Value = Worksheets("new").Cells(a, 7).ValuernWorksheets("old").Cells(a, 17).Value = Worksheets("new").Cells(a, 8).ValuernWorksheets("old").Cells(a, 18).Value = Worksheets("new").Cells(a, 9).ValuernNext brnNext arnrnEnd Sub
大家帮忙看下
我出现了一个问题就是选择药品名称时,可以出现它的药品规格和药品价格相对应记录,但是刷新页面得到的不是我选择的药品名称.而是出现的刚进入界面的(请选择药品名称).怎么样修改呢?我把<em>代码</em>贴出来了,谢谢了,毕业设计等着急.rnrnrnrnrnrnrnrnrnrnrn rn rn rn rnrnrnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrn rn rn rn rn rn rn rn rn rn rn rn rn 病人id:rn rn rn rn rn rn rn 请选择药品名称rnrn rn rn >rn rn rn rn rn rn rn rn 药品规格:rn >rn rn rn 药品价格:rn >rnrn rn rn rnrn rn rn rn rnrn rn rn rn rn rn rn rn rn rn rnrnrnrn
大家帮我看下这段代码???
rn==============================rn rn rnrnrnrn点按钮没有反应是什么原因rn提交路径没有问题的rn
请帮看下这段代码
[code=Delphi(Pascal)]rn hWnd:=FindWindow(nil,'Afontane-安全钥匙');//rn if hWnd=0 then //没有找到指定的窗口 ,则先启动ErpKeyrn beginrn ShowMessage('请先启动ErpKey !');rn ShellExecute(handle, 'open', 'ErpKey.exe', nil, nil, SW_SHOWNORMAL);rn [color=#FF0000] Halt;[/color]rn endrn elsern begin //找到了,提到前台rn IF PublicString='' thenrn beginrn if IsIconic(hWnd) then //如果已被最小化rn ShowWindow(hWnd,SW_RESTORE) //则把它恢复rn else //如果窗口被其他窗口遮住,则将它提到前景来rn SetForegroundWindow(hWnd);rn Halt; //结束本程序rn end;rn end;rn[/code]rn红色部份,用halt就会报一个错误,‘access violation at address 000000000'rn不用halt就不会报错,但是又达不到我的效果,那个地方要中止程序,请高手帮我看看,谢谢了rn报那个错,如果你不管,也可以继续运行的
请帮我看下这段代码
Connection cn;rncn=Dbconect.Getcon();rnString str="select * from cgal where hth=?"; //这条语句绝对没错的,我在查询分析器中查过的rnPreparedStatement ps=cn.prepareStatement(str);rn[color=#FF0000]ps.setString(1,help.gethetonghao());[/color]rnSystem.out.print(help.gethetonghao()); //能打印出来rn//ps.setString(2,help.getPassword());rnResultSet rs=ps.executeQuery();rn红色部分好像没有赋值进去。可我打印是能出来的啊,不解啊?
用C编写程序计算最大绿灯时间值,算法已给出
<em>大家</em><em>帮忙</em>看看,我邮箱zhangsuxiong@live.cn 请<em>大家</em><em>帮忙</em>看看
电源原理图
<em>帮忙</em><em>看下</em>,急用
帮忙看下代码
我在DataList控件的模板里放了个chekbox控件,我想单独实例化这个控件,对控件的checked属性进行判断,rn<em>代码</em>如下:rn protected void chkall_CheckedChanged(object sender, EventArgs e)rn rn //CheckBox chkall= this.FindControl("chkall") as CheckBox;rn CheckBox chkall = this.DataList1.FindControl("chkall") as CheckBox;rn if (chkall.Checked == true)rn rn Response.Write("aaaaaaaaaaaaabbbbbbbbbbbbbbb");rn rn rn但是报错:未将对象引用设置到对象的实例。rn截图如下:rn[img=https://img-bbs.csdn.net/upload/201406/03/1401787220_337655.jpg][/img][img=https://img-bbs.csdn.net/upload/201406/03/1401787229_996390.jpg][/img]
blog主界面
我也把我做了的图片上传,请<em>看下</em>,麻烦多<em>帮忙</em>
BoigleWeb.zip
BoigleWeb<em>帮忙</em><em>看下</em>样式...
VFW(在WIN7下会黑屏共享后希望能有大拿帮忙解决一下)
<em>这段</em><em>代码</em>存在在WIN7下运行是有黑屏问题,希望能<em>帮忙</em>解决,共同学习。
大家帮忙看下面的代码
。。。。rnprivate void button1_Click(object sender, System.EventArgs e)rn rn UdpClient udpG=new UdpClient();rn System.Net.IPEndPoint IPPoint =new System.Net.IPEndPoint(System.Net.IPAddress.Any,0);rn tryrn rn byte[] GetS=udpG.Receive(ref IPPoint);//每次执行到这一步就过不去了,也不报错,为什么啊?rnstring GetStr=System.Text.Encoding.ASCII.GetString(GetS);rn。。。。
大家帮忙看下面的代码...
多层数据库开发rn服务器端定义的方法如下:rnSTDMETHODIMP TLogin_ServerImpl::QueryGoodsData(BSTR ASQLText,rn VARIANT* AData, long* AError)rn rn *AError=0;rn tryrn rn m_DataModule->ADOQuery1->Close();rn m_DataModule->ADOQuery1->Connection = m_DataModule->ADOConnection1;rn m_DataModule->ADOQuery1->SQL->Clear();rn m_DataModule->ADOQuery1->SQL->Add(ASQLText);rn m_DataModule->DataSetProvider1->DataSet = m_DataModule->ADOQuery1;rn m_DataModule->ADOQuery1->Open();rn *AData=m_DataModule->DataSetProvider1->Data;rnrn SetComplete();rn rn catch(...)rn rn SetAbort();rn *AError=1;rn rn return S_OK;rnrn客户端调用如下:rnvoid __fastcall TForm1::Button1Click(TObject *Sender)rnrn TCOMILogin_Server objWS = CoLogin_Server::Create();rn WideString sSQLCommand;rn Variant SSResult;rn sSQLCommand = ledtSQL->Text;rn long nError=-1;rn objWS->QueryGoodsData(sSQLCommand,(Variant)&SSResult,&nError);rn if(nError==0)rn rn ClientDataSet1->Data = SSResult;rn rn elsern rn ShowMessage(IntToStr(nError));rn rnrn执行后nError还是为-1,好象没有执行的一样,请<em>大家</em><em>帮忙</em>解决一下!谢谢!
大家帮忙看下面的代码
这个函数用来判断用户的email和密码是否在数据库中!rn我在select语句中用到了函数入参变量,我不知道我这种写法是否正确????rnrn我用数据库中的email地址和密码测试过,select count的结果是0,所以我怀疑是不是select语句写错了?rnrn请大牛们全面指点 多谢了啊!rnrn我这里用的datareader 觉得这个简单点,我还是初学者,也知道dataset里面有直接求count的函数,但是还是不太会用。rn[code=C#]rn[WebMethod(MessageName = "IsUserWithName")]rn public int IsUser(int userType, string email, string password)rn rn DBConnect.DBOpen();rn SqlDataReader myDataReader;rn int i = -1;rnrn if (userType == 3)rn rn SqlCommand mySqlCommand = DBConnect.mySqlConnection.CreateCommand();rnrn mySqlCommand.CommandText = "SELECT count(*)" +rn "FROM SinglePersonInfo " +rn "WHERE emailAddr ='"+email+" ' AND passwd = ' "+password+" ' ";rnrn myDataReader = mySqlCommand.ExecuteReader();rn if (myDataReader.Read())rn i = Convert.ToInt32(myDataReader[0]);rn elsern i = 0; rn rn elsern rnrn rn return i;rn rn[/code]
大侠帮忙帮忙看下这段代码
procedure TForm1.SendHex(S: String);rnvarrn s2:string;rn buf1:array[0..50000] of char;rn i:integer;rnbeginrn s2:='';rn for i:=1 to length(s) dorn beginrn if ((copy(s,i,1)>='0') and (copy(s,i,1)='a') and (copy(s,i,1)='A') and (copy(s,i,1)+copy(s2,i*2+1,2)));//这句看不懂。rn Comm1.WriteCommData(buf1,(length(s2) div 2));rnend;rn是SPCOMM中发送十六进制的,有两句看不懂。
【07】如何优雅的请别人帮忙
n n n 生活中免不了要请别人<em>帮忙</em>,怎么才能让对方比较舒服的帮助自己呢?1. 合适的沟通方式沟通方式选择的顺序我认为是:当面沟通&amp;gt;电话&amp;gt;QQ/微信&amp;gt;邮件,能当面沟通的话就不选择电话,能电话沟通的话就不选择QQ、微信和邮件。每个人的时间都是有限的,请别人<em>帮忙</em>的话就要在尽量短的时间内,把自己的需求一次说清楚。当面沟通效率是最高的,也不容易造成误解,其次...
大家帮忙看看这段代码~谢谢
我VB不大懂,帮同学弄个INI读取的类,但是出现问题,请<em>大家</em><em>帮忙</em>看看rnrn这个是类rnPublic Class InIControlrnrn Public FileName As Stringrnrn Private Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal section As String, ByVal key As String, ByVal def As String, ByVal retVal As Byte(), ByVal size As Integer, ByVal filePath As String) As Longrnrn Private Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal section As String, ByVal key As String, ByVal val As String, ByVal filePath As String) As Booleanrnrnrnrn Public Sub New(ByVal AFileName As String)rn Dim fileinfo As New System.IO.FileInfo(AFileName)rn If Not fileinfo.Exists Thenrn Throw New ApplicationException("IniIni文件不存在")rn End Ifrn FileName = fileinfo.FullNamern End Subrnrn Public Sub DeleteKey(ByVal Section As String, ByVal Ident As String)rn InIControl.WritePrivateProfileString(Section, Ident, Nothing, FileName)rn End Subrnrn Public Sub EraseSection(ByVal Section As String)rn If Not InIControl.WritePrivateProfileString(Section, Nothing, Nothing, FileName) Thenrn Throw New ApplicationException("无法清除Ini文件中的Section")rn End Ifrn End Subrnrn Public Function ReadBool(ByVal Section As String, ByVal Ident As String, ByVal [Default] As Boolean) As Booleanrn Tryrn Return Convert.ToBoolean(Me.ReadString(Section, Ident, Convert.ToString([Default])))rn Catch exception1 As Exceptionrn Console.WriteLine(exception1.Message)rn Return [Default]rn End Tryrn End Functionrnrn Public Function ReadInteger(ByVal Section As String, ByVal Ident As String, ByVal [Default] As Integer) As Integerrn Dim text1 As String = Me.ReadString(Section, Ident, Convert.ToString([Default]))rn Tryrn Return Convert.ToInt32(text1)rn Catch exception1 As Exceptionrn Console.WriteLine(exception1.Message)rn Return [Default]rn End Tryrn End Functionrnrn Public Sub ReadSection(ByVal Section As String, ByVal Idents As System.Collections.Specialized.StringCollection)rn Dim buffer1 As Byte() = New Byte(16384 - 1) rn Dim num1 As Integer = InIControl.GetPrivateProfileString(Section, Nothing, Nothing, buffer1, buffer1.GetUpperBound(0), FileName)rn Me.GetStringsFromBuffer(buffer1, num1, Idents)rn End Subrnrn Public Sub ReadSections(ByVal SectionList As System.Collections.Specialized.StringCollection)rn Dim buffer1 As Byte() = New Byte(65535 - 1) rn Dim num1 As Integer = 0rn num1 = InIControl.GetPrivateProfileString(Nothing, Nothing, Nothing, buffer1, buffer1.GetUpperBound(0), FileName)rn Me.GetStringsFromBuffer(buffer1, num1, SectionList)rn End Subrnrn Public Sub ReadSectionValues(ByVal Section As String, ByVal Values As System.Collections.Specialized.NameValueCollection)rn Dim collection1 As New System.Collections.Specialized.StringCollectionrn Me.ReadSection(Section, collection1)rn Values.Clear()rn Dim text1 As Stringrn For Each text1 In collection1rn Values.Add(text1, Me.ReadString(Section, text1, ""))rn Nextrn End Subrnrn Public Function ReadString(ByVal Section As String, ByVal Ident As String, ByVal [Default] As String) As Stringrn Dim buffer1 As Byte() = New Byte(65535 - 1) rn Dim num1 As Integer = InIControl.GetPrivateProfileString(Section, Ident, [Default], buffer1, buffer1.GetUpperBound(0), FileName)rn Dim text1 As String = System.Text.Encoding.GetEncoding(0).GetString(buffer1)rn Return text1.Substring(0, num1).Trimrn End Functionrnrn Public Sub UpdateFile()rn InIControl.WritePrivateProfileString(Nothing, Nothing, Nothing, FileName)rn End Subrnrn Public Function ValueExists(ByVal Section As String, ByVal Ident As String) As Booleanrn Dim collection1 As New System.Collections.Specialized.StringCollectionrn Me.ReadSection(Section, collection1)rn Return (collection1.IndexOf(Ident) > -1)rn End Functionrnrn Public Sub WriteBool(ByVal Section As String, ByVal Ident As String, ByVal Value As Boolean)rn Me.WriteString(Section, Ident, Convert.ToString(Value))rn End Subrnrn Public Sub WriteInteger(ByVal Section As String, ByVal Ident As String, ByVal Value As Integer)rn Me.WriteString(Section, Ident, Value.ToString)rn End Subrnrn Public Sub WriteString(ByVal Section As String, ByVal Ident As String, ByVal Value As String)rn If Not InIControl.WritePrivateProfileString(Section, Ident, Value, FileName) Thenrn Throw New ApplicationException(ChrW(20889) & "Ini" & ChrW(25991) & ChrW(20214) & ChrW(20986) & ChrW(38169))rn End Ifrn End Subrnrn Private Sub GetStringsFromBuffer(ByVal Buffer As Byte(), ByVal bufLen As Integer, ByVal Strings As System.Collections.Specialized.StringCollection)rn Strings.Clear()rn If (bufLen <> 0) Thenrn Dim num1 As Integer = 0rn Dim num2 As Integer = 0rn Do While (num2 < bufLen)rn If ((Buffer(num2) = 0) AndAlso ((num2 - num1) > 0)) Thenrn Dim text1 As String = System.Text.Encoding.GetEncoding(0).GetString(Buffer, num1, (num2 - num1))rn Strings.Add(text1)rn num1 = (num2 + 1)rn End Ifrn num2 += 1rn Looprn End Ifrn End SubrnrnrnrnEnd Classrn
大家帮忙分析,解释一下这段代码
各位高手:rn 你们好!rn 我现在想实现用<em>代码</em>直接创建数据库.但是如果把这些<em>代码</em>全部写到VB中.我怕以后不方便修改及更新.所以考虑是否要用VB调入一个文件.然后对文件进行数据的调用及运行.来达到创建数据库结构的目的.rn 但是如果我把创建<em>代码</em>放到一个文本文件中.有很多的问题.比如读写的问题,等等..rn 这里想问一下高手们!希望可以提一些意见.rn 1.如果要实现我这样的功能.需要怎么实现.rn 2.从外文件调用是否可行.又该怎样调用.rn 最好.可以有相关例子.谢谢!!!!急!rn 以下是在VB里面加载的<em>代码</em>!但是我觉得如果要按照这样写的话!实在太麻烦!而且比较累!rn==========================================================================rn '定义表与字段rn Dim DefDatabase As Databasern Dim DefTable As TableDef, DefField As Fieldrn '打开 VB-CODE.MDB 数据库rn Set DefDatabase = Workspaces(0).OpenDatabase(App.Path & "\VB-CODE.MDB", 0, False)rn '创建名为中国的数据表rn Set DefTable = DefDatabase.CreateTableDef("中国")rn '创建NAME的字段rn Set DefField = DefTable.CreateField("Name", dbText, 8)rn DefTable.Fields.Append DefFieldrn '结束数据表的创建rn DefDatabase.TableDefs.Append DefTablern Set DefDatabase.closern set DefDatabase = nothing
大家帮忙看看这段代码`
function getCoordinate(evnt) rnrn if (document.all) rn x = event.screenX;rn y = event.screenY;rn if(x+12=494||x-12=494)rn rn if(y+12=308 || y-12=308)rn rn document.write("");rn rn rn rn else rn x = evnt.screenX;rn y = evnt.screenX; rn if(x+12=494||x-12=494)rn rn if(y+12=308 || y-12=308)rn rn document.write("");rn rn rn rn status = "水平坐标:"+ x + ";垂直坐标:"+ y;rn rn rnrn document.onmousemove = getCoordinate;rn提示我语法错误,请<em>大家</em><em>帮忙</em>看看
大家帮忙查找这段代码的错误
注意,以下<em>这段</em><em>代码</em>在VS编辑是没有错误的,但是就是在点击登录按钮后,即使用户名,密码,用户类型都填写与数据表中相对应的前提下,也一样提示登录失败,请<em>大家</em><em>帮忙</em>查一下。困扰了我好久了。多谢。rnrnusing System;rnusing System.Collections.Generic;rnusing System.ComponentModel;rnusing System.Data;rnusing System.Drawing;rnusing System.Linq;rnusing System.Text;rnusing System.Windows.Forms;rnusing System.Data.SqlClient;rnrnnamespace MyFormrnrn public partial class login : Formrn rn public login()rn rn InitializeComponent();rn rn private void btnCancel_Click(object sender, EventArgs e)rn rn Application.Exit();rn rn public void ShowUserForm()rn rn switch (cboLoginType.Text)rn rn case "管理员":rn AdminForm adminForm = new AdminForm();rn adminForm.Show();rn break;rn rn rn public bool ValidateUser(string txtLoginId, string txtLoginpwdd, string cboLoginType, ref string message)rn rn int count = 0;rn bool isValidUser = false;rn if (cboLoginType == "管理员")rn rn string sql = string.Format("SELECT COUNT(*)FROM yasoshw WHERE loginname='0' and loginpass='1'", txtLoginId, txtLoginpwdd);rn tryrn rn SqlCommand command = new SqlCommand(sql, DBHelper.connection);rn DBHelper.connection.Open();rn count = (int)command.ExecuteScalar();rn if (count == 1)rn rn isValidUser = true;rn rn elsern rn message ="用户名或密码不存在";rn isValidUser = false;rn rn rn catch (Exception ex)rn rn message = ex.Message;rn Console.WriteLine(ex.Message);rn rn finallyrn rn DBHelper.connection.Close();rn rn rn return isValidUser;rn rn private bool ValidateInput()rn rn if (txtLoginId.Text.Trim() == "")rn rn MessageBox.Show("请输入用户名", "输入提示", MessageBoxButtons.OK, MessageBoxIcon.Information);rn txtLoginId.Focus();rn return false;rn rn else if (txtLoginpwdd.Text.Trim() == "")rn rn MessageBox.Show("请输入密码", "输入提示", MessageBoxButtons.OK, MessageBoxIcon.Information);rn txtLoginpwdd.Focus();rn return false;rn rn else if (cboLoginType.Text.Trim() == "")rn rn MessageBox.Show("请选择登录类型", "输入提示", MessageBoxButtons.OK, MessageBoxIcon.Information);rn cboLoginType.Focus();rn return false;rn rn elsern rn return true;rn rn rnrn private void btnLogin_Click(object sender, EventArgs e)rn rn bool isValidUser = false;rn string message = "";rn if (ValidateInput())rn rn isValidUser = ValidateUser(cboLoginType.Text, txtLoginId.Text, txtLoginpwdd.Text, ref message);rn if (isValidUser)rn rn UserHelper.loginname = txtLoginId.Text;rn UserHelper.logintype = cboLoginType.Text;rn ShowUserForm();rn this.Visible = false;rn rn elsern rn MessageBox.Show(message, "登录失败", MessageBoxButtons.OK, MessageBoxIcon.Error);rn rn rn rn rnrn private void login_Load(object sender, EventArgs e)rn rnrn rnrn rnrnrnrnrn以下的为USERHELPER类的<em>代码</em> :rnrnusing System;rnusing System.Collections.Generic;rnusing System.Linq;rnusing System.Text;rnrnnamespace MyFormrnrn public class UserHelperrn rn public static string loginname = "";//用户名rn public static string logintype = "";//登录类型rn rnrnrnrn以下的为DBHELPER类的<em>代码</em> :rnrnrnusing System;rnusing System.Collections.Generic;rnusing System.Linq;rnusing System.Text;rnusing System.Data.SqlClient;rnrnnamespace MyFormrnrn class DBHelperrn rn //数据库连接字符串rn private static string connString =rn "Data Source=.; Initial Catalog=yasos; User ID=hw; Pwd=123456";rn //数据库连接Connection对象rn public static SqlConnection connection = new SqlConnection(connString);rn rnrnrnrnrn
大家帮忙看看这段简单的代码!!
请问下面的<em>代码</em>有什么问题?感谢您的回答!rnrnrn
大家帮忙分析一下这段代码!
从网上找到的,get.asp部分有点疑惑,请高手指教rnrnasp图片上传到数据库的方法 rn============上传============ rn rn rn rnrn rn rn rn rn rn rn rnrn==============get.asp===============rnrnrn如果还有很多相关的字段,比如说明,备注等等rn例:rnrnrn rnrn
大家帮忙解释下 这段代码!!!!!!!!!
这个问题是怎么把两个TOOLBAR显示在一行上rnrn下面<em>这段</em>是<em>代码</em>:rnrn//////////////////////////////////////////////////////rn// set shourtcut bar the same position with tool bar.rnCRect rect;rnRecalcLayout();rnm_wndToolBar.GetWindowRect(&rect);rnrect.OffsetRect(1, 0);rnDWORD dw = m_wndShoutcutBar.GetBarStyle();rnUINT n = 0;rnn = (dw&CBRS_ALIGN_TOP) ? AFX_IDW_DOCKBAR_TOP : n;rnn = (dw&CBRS_ALIGN_BOTTOM && n == 0) ? AFX_IDW_DOCKBAR_BOTTOM : n;rnn = (dw&CBRS_ALIGN_LEFT && n == 0) ? AFX_IDW_DOCKBAR_LEFT : n;rnn = (dw&CBRS_ALIGN_RIGHT && n == 0) ? AFX_IDW_DOCKBAR_RIGHT : n;rnDockControlBar(&m_wndShoutcutBar, n, &rect);rnrn///////////////////////////////////rn 我疑惑的地方是 rn n = (dw&CBRS_ALIGN_TOP) ? AFX_IDW_DOCKBAR_TOP : n; rn n = (dw&CBRS_ALIGN_BOTTOM && n == 0) ? AFX_IDW_DOCKBAR_BOTTOM : n;rn n = (dw&CBRS_ALIGN_LEFT && n == 0) ? AFX_IDW_DOCKBAR_LEFT : n;rn n = (dw&CBRS_ALIGN_RIGHT && n == 0) ? AFX_IDW_DOCKBAR_RIGHT : n;rnrn请<em>帮忙</em>解释一下
大家帮忙看一下这段代码
刚刚接触asp.net,用的是C#语言,写了下面一段小<em>代码</em>rnprivate void Page_Load(object sender, System.EventArgs e)rn rn // 在此处放置用户<em>代码</em>以初始化页面 rn rn arraylist items=new arraylist();rn items.add("one");rn items.add("two");rn items.add("three");rn rn mylist.datasource=items;rn mylist.databind();rn rn rn运行时说arraylist items 缺少using指令集或程序集引用错误,不知道<em>这段</em><em>代码</em>这样写规范吗?那些using指令集去哪 找呢?谢谢各位多多指导!
大家帮忙看下这段代码
SetFocusPosDirect()是一个向串口发送命令的函数,在主线程运行时,串口收到的回复信号总是正确的,但是同样的命令从 camera_control_thread()发出,返回的字节总是不对,而且每次都不一样,这究竟是为什么呢?谢谢<em>大家</em>!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]
大家帮忙指点下这段代码!
map >xref(istream& in,vector find_words(const string&)=split)rn这一句我始终不明白函数split和 find_words是个怎么样的关系,split是怎么被当传入的 请指点!rnrnrnrn//split函数rnvector split(const string& str)rnrn typedef string::const_iterator iter;rn vector ret;rn iter i=str.begin();rn while (i !=str.end())rn rn i=find_if(i,str.end(),not_space);rn iter j=find_if(i,str.end(),space);rn if (i != str.end() )rn ret.push_back(string(i,j)) ;rn i=j;rn rn return ret;rnrnrnrnrnmap >xref(istream& in,vector find_words(const string&)=split)rnrn string line;rn int line_number=0;rn map >ret;rn while (getline(in,line)&& line_number<5) //书上没有,添加限制行数,不然一直读输入数据!rn rn ++line_number;rn vector words=find_words(line);rn for (vector::const_iterator it=words.begin();rn it !=words.end();++it)rn ret[*it].push_back(line_number);rn rn return ret;rn
大家帮忙看看这段代码!!!(急用)
我写了这么一段<em>代码</em>,但无法显示 不知道什么问题,请高手们<em>帮忙</em>看看,谢了!!!rnrnrnrnrnrnrnrnrn其中的几个由别的页面传递过来的值我试过了,都没有问题rn数据库Message是我后加上的 但是为什么就是添加不进去记录呢,rn如果把关于Message数据库操作的从本<em>代码</em>中除去程序是可以正常运行的.rnrnrnrnrnrn
大家帮忙看看这段代码?谢谢!
 rn rnrnself.status='后退' ;return true;后面这句是什么意思?为什么要返回真?rnparent.history.back(); return false;同上;rnparent.history.forward(); return false;同上;rnself.status='前进'; return true;同上;
强连通分量及缩点tarjan算法解析
强连通分量: 简言之 就是找环(每条边只走一次,两两可达) 孤立的一个点也是一个连通分量   使用tarjan算法 在嵌套的多个环中优先得到最大环( 最小环就是每个孤立点)   定义: int Time, DFN[N], Low[N]; DFN[i]表示 遍历到 i 点时是第几次dfs Low[u] 表示 以u点为父节点的 子树 能连接到 [栈中] 最上端的点   int
pecl-5.2.5-Win32+php-5.2.13-Win32.zip下载
PHP+Tomcat环境搭建 pecl-5.2.5-Win32 php-5.2.13-Win32.zip 相关下载链接:[url=//download.csdn.net/download/dawn_rain_/4660794?utm_source=bbsseo]//download.csdn.net/download/dawn_rain_/4660794?utm_source=bbsseo[/url]
asymptote用户手册下载
latex下的绘图宏包,asymptote,采用c++语法,和metapost比肩!强烈推荐。 相关下载链接:[url=//download.csdn.net/download/freelox/2330936?utm_source=bbsseo]//download.csdn.net/download/freelox/2330936?utm_source=bbsseo[/url]
Effective C++第三版CHM英文版下载
内容简介回到顶部↑ 有人说C++程序员可以分成两类,读过Effective C++的和没读过的。世界顶级C++大师Scott Meyers成名之作的第三版的确当得起这样的评价。当您读过这本书之后,就获得了迅速提升自己C++功力的一个契机。. 在国际上,本书所引起的反响,波及整个计算技术出版领域,余音至今未绝。几乎在所有C++书籍的推荐名单上,本书都会位于前三名。作者高超的技术把握力、独特的视角。诙谐轻松的写作风格、独具匠心的内容组织,都受到极大的推崇和仿效。这种奇特的现象,只能解释为人们对这本书衷心的赞美和推祟。.. 这本书不是读完一遍就可以束之高阁的快餐读物,也不是用以解决手边问题的参考手册 相关下载链接:[url=//download.csdn.net/download/Wesley1991/2456175?utm_source=bbsseo]//download.csdn.net/download/Wesley1991/2456175?utm_source=bbsseo[/url]
文章热词 机器学习教程 Objective-C培训 交互设计视频教程 颜色模型 设计制作学习
相关热词 mysql关联查询两次本表 native底部 react extjs glyph 图标 程序员和产品经理大家视频 nlp培训师大家有谁
我们是很有底线的