我这段代码AVIFileCreateStream参数哪里错了?(在线等) [问题点数:60分]

Bbs1
本版专家分:0
结帖率 25%
Bbs1
本版专家分:0
Bbs1
本版专家分:0
关于AVIFileCreateStream的问题
为什么我用<em>AVIFileCreateStream</em>创建的视频流播放起来像是16色的?我是直接读取的其他avi文件视频流
介绍下mp3写入avi文件的方法
先介绍几个api函数:AVIFileOpen<em>AVIFileCreateStream</em>AVIStreamSetFormatAVIStreamWrite 字面意思大家都应该理解,就不多说了。<em>AVIFileCreateStream</em> ,AVIStreamSetFormat这两个东西很重要,对于流方式操作大家都明白,可是设置流的格式不一定懂,这个是api根据avi文件格
vc++实现avi文件的操作
vc++实现avi文件的操作 为了对avi进行读写,微软提供了一套API,总共50个函数,他们的用途主要有两类,一个是avi文件的操作,一类是数据流streams的操作。  1、打开和关闭文件  AVIFileOpen ,AVIFileAddRef, AVIFileRelease  2、从文件中读取文件信息  通过AVIFileInfo可以获取avi文件的一些信息,这个函数返回一个AVIFIL
在线等。这代码哪里了?
import java.awt.*;rnimport java.awt.event.*;rnimport javax.swing.*;rnrnpublic class ActionTestrn rnrn public static void main(String[] args)rn rn // TODO Auto-generated method stubrn JFrame frame =new IniFrame();rn frame.setVisible(true);rn rn rnclass IniFrame extends JFramernrn public IniFrame()rn rn Panel panel = new Panel();rn Container content = getContentPane();rn content.add(panel);rn setSize(300,300);rn addWindowListener(new WindowAdapter()rn rn public void windowClosing(WindowEvent e)rn rn dispose();rn rn );rn rnrnclass Panel extends JPanelrnrn public Panel()rn rn Action action = new ColorAction("blue",Color.BLUE);rn JButton btn = new JButton(action);rn add(btn);rn rnrnclass ColorAction extends AbstractActionrnrn public ColorAction(String name,Color c)rn rn putValue(Action.NAME,name);rn putValue("color",c);rn putValue(Action.SHORT_DESCRIPTION,"set color to"+name);rn rn public void actionPerformed(ActionEvent e)rn rn Color c = (Color)getValue("color");rn setBackground(c);rn rnrnrnrn <em>错</em>误在setBackground(c);这行。。
我这代码哪里了??
rn下面的<em>代码</em>是想实现ftp文件的下载,但运行是老是出现 misplaced CR in input 的<em>错</em>误,请问,谁能帮我看看哪里<em>错</em>了啊???rn String IP="10.12.10.26",user="1",pwd="1";rn int host=21;rn String path="";rnrn FtpClient ftpClient = new FtpClient(); rn ftpClient.openServer(IP, host);rn ftpClient.login(user, pwd);// 登录FTP服务器rn ftpClient.ascii();rn if (path.length() != 0)rn ftpClient.cd(path);rn rn sun.net.TelnetInputStream inFile = ftpClient.get("22.rmvb");rn FileOutputStream outFile=new FileOutputStream("G://25.rmvb");rn byte[] buffer=new byte[1024];rn while (true)rn int bytes=inFile.read(buffer);rn if (bytes<0) break;rn outFile.write(buffer,0,bytes);rn rn rn outFile.close();rn inFile.close();rn ftpClient.closeServer();
我的这代码哪里
public partial class shangchuan : System.Web.UI.Pagernrn Class2 ddd = new Class2();rn string filename = string.Empty;rn protected void Page_Load(object sender, EventArgs e)rn rn rn rn if (FileUpload1.HasFile)rn rnrn string fullFileName = this.FileUpload1.PostedFile.FileName;rn string filename = fullFileName.Substring(fullFileName.LastIndexOf("\\") + 1);rn rn string type = fullFileName.Substring(fullFileName.LastIndexOf(".") + 1);rnrn if (type == "jpg" || type == "gif" || type == "bmp" || type == "png")rn rn this.FileUpload1.PostedFile.SaveAs(Server.MapPath("images") + "\\" + filename);rn this.Image1.ImageUrl = "images/" + filename;rnrn rn elsern rn Response.Write(" ");rn rnrn rnrn rn protected void Button1_Click(object sender, EventArgs e)rn rn ddd.chaa(TextBox2.Text, TextBox1.Text, Server.MapPath("images") + "\\" + filename);rn Response.Write(" ");rn rnrn为什么我上传的图片老是显示不出来rn在SQL2005数据库中我是用nvarchar类型保存地址的 rnSQL2005路径显示是这样的I:\三色外贸\images\ filename 竟然是空的 rnrn
代码哪里了?
int _tmain(int argc, _TCHAR* argv[])rn int sz[5]=1,2,3,4,5;rn int Pjf(int sz[5]);rn Pjf(sz);rn return 0;rnrnvoid Pjf(int sz[5])rnprintf("%d,%d,%d,%d,%d",sz[0],sz[1],sz[2],sz[3],sz[4]);rnrnrnrn<em>错</em>误列表2个<em>错</em>误:rn<em>错</em>误 1 error LNK2001: 无法解析的外部符号 "int __cdecl Pjf(int * const)" (?Pjf@@YAHQAH@Z) CCCCCC2233.obj CCCCCC2233rnrnrn<em>错</em>误 2 fatal error LNK1120: 1 个无法解析的外部命令 D:\我的文档\Visual Studio 2008\Projects\CCCCCC2233\Debug\CCCCCC2233.exe CCCCCC2233rn
代码哪里
package com.mwq;rnrnimport java.sql.CallableStatement;rnimport java.sql.Connection;rnimport java.sql.DriverManager;rnimport java.sql.PreparedStatement;rnimport java.sql.ResultSet;rnimport java.sql.SQLException;rnimport java.sql.Statement;rnimport java.util.ArrayList;rnimport java.util.List;rnrnpublic class TestInsert rnrn private static final String DRIVERCLASS = "com.microsoft.jdbc.sqlserver.SQLServerDriver";rnrn private final String url = "jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=db_database12";rnrn private final String username = "sa";rnrn private final String password = "123";rnrn private Connection conn;rnrn private Statement stmt;rnrn private PreparedStatement prpdStmt;rnrn private CallableStatement cablStmt;rnrn static rn try rn Class.forName(DRIVERCLASS);rn catch (ClassNotFoundException e) rn System.out.println("------ 在加载数据库驱动时抛出异常,内容如下:");rn e.printStackTrace();rn rn rnrn // 执行静态INSERT语句rn public void insertOne(String name) throws SQLException rn conn = DriverManager.getConnection(url, username, password);rn stmt = conn.createStatement();rn stmt.executeUpdate("insert into tb_testInsert(name) values('" + namern + "')");// 执行静态INSERT语句rn stmt.close();rn conn.close();rn rnrn // 执行动态INSERT语句rn public void insertMore(String[] names) throws SQLException rn conn = DriverManager.getConnection(url, username, password);rn prpdStmt = connrn .prepareStatement("insert into tb_testInsert(name) values(?)");// 预处理动态INSERT语句rn prpdStmt.clearBatch();// 清除Batchrn for (int i = 0; i < names.length; i++) rn prpdStmt.setString(1, names[i]);// 为动态SQL语句赋值rn prpdStmt.addBatch();// 向Batch中添加INSERT语句rn rn prpdStmt.executeBatch(); // 批量执行Batch中的INSERT语句rn prpdStmt.close();rn conn.close();rn rnrn // 通过存储过程执行INSERT语句rn public void insertProcedure(String[] names) throws SQLException rn conn = DriverManager.getConnection(url, username, password);rn cablStmt = conn.prepareCall("call test_insert(?)");// 调用存储过程rn cablStmt.clearBatch();rn for (int i = 0; i < names.length; i++) rn cablStmt.setString(1, names[i]);rn cablStmt.addBatch();rn rn cablStmt.executeBatch();rn cablStmt.close();rn conn.close();rn rnrn // 查询所有记录rn public List selectAll() rn List list = new ArrayList();rn try rn conn = DriverManager.getConnection(url, username, password);rn stmt = conn.createStatement();rn ResultSet rs = stmt.executeQuery("select * from tb_testInsert");rn while (rs.next()) rn Object note[] = new Object[2];rn for (int i = 0; i < note.length; i++) rn note[i] = rs.getObject(i + 1);rn rn list.add(note);rn rn stmt.close();rn conn.close();rn catch (SQLException e) rn System.out.println("------ 在检索记录时抛出异常,内容如下:");rn e.printStackTrace();rn rn return list;rn rnpublic static void main(String[] args)rn TestInsert aa=new TestInsert();rn rn aa.insertOne("小明");rn aa.selectAll();rnrnrn<em>代码</em>的是完整的,可以复制调试,帮我看看哪里<em>错</em>了,改正一下发上来,谢谢
windows下使用vfw方式生成AVI视频的实现
生成视频文件的方式很多,你可以使用libx264这个开源的264编解码库来编码视频,生成视频文件;但是这样很麻烦,还需要另外找一个包装器(比如mp4)来包装这个视频流,否则播放器一般无法识别和播放。 想生成视频文件?何必舍近求远,windows系统本身就内置了一套视频生成框架——VFW,它提供了一组API,可以直接将RGB数据写入到视频文件中,大部分播放器都能够识别并播放这种视频文件。下面我将发
vc++实现avi文件的操作
vc++实现avi文件的操作 为了对avi进行读写,微软提供了一套API,总共50个函数,他们的用途主要有两类,一个是avi文件的操作,一类是数据流streams的操作。   1、打开和关闭文件   AVIFileOpen ,AVIFileAddRef, AVIFileRelease   2、从文件中读取文件信息   通过AVIFileInfo可以获取avi文件的一些
AVIFile
最近在做一个视频识别项目,需要用到视频处理,在codeproject上找到了一个关于对Avi的操作库,感觉不<em>错</em>,在这里把一些要点记录下来 http://www.codeproject.com/Articles/7388/A-Simple-C-Wrapper-for-the-AviFile-Library Avi视频文件的编码有很多,这个库只支持部分Avi文件,有些Avi文件不支持,具体哪些不支
基于VFW的视频监控系统
本文章是一个VFW的视频监控程序,基于MFC实现。其中包括了视频捕获、AVI文件读写、视频压缩等知识,以供后来的人少走些弯路。
代码哪里了。。
[code=C/C++]rnvoid CFinalView::OnSettings() //点击命令响应函数rnrn CSettingsDlg dlg; rn dlg.ShowWindow(SW_SHOWMAXIMIZED);rnrn[/code]rnrn点击某一菜单项。。使另外一对话框最大化显示。。rnvc6.0 运行 程序崩溃。。
代码,哪里了?
我想用TIMER控件来显示一个提示,<em>代码</em>如下:rn在一个COMMAND_CLICK事件中:rn一开始就显示一个提示窗体 “frm1.show,me frm1.refresh frm1.Timer1.Enabled=True”rn结束时:frm1.Timer1.Enabled=false, frm1.hide ,frmmain.setfocusrn在frm1中TIMER1_Timer事件中:rnSelect Case TimeCounter Mod 3rn Case 0rn frm1.lblProcess.Caption = "正在查询,请稍后..."rn Case 1rn frm1.lblProcess.Caption = "正在查询,请稍后...."rn Case 2rn frm1.lblProcess.Caption = "正在查询,请稍后....."rn End Selectrnfrm1.RefreshrnTimeCounter = TimeCounter + 1rnrn但是,运行<em>代码</em>后,没有达到效果,这是哪里有问题???
代码哪里了~?
For i = 1 To Data1.Recordset.RecordCountrncombo1.AddItem Data1.RecordsetrnData1.Recordset.MoveNextrnNext irn报<em>错</em>为类型不匹配!rn谢谢!!rn
代码,哪里了???
package database;rnrnrnimport java.net.URL;rnimport java.sql.*;rnimport java.util.*;rnrnpublic class testdatabase rn ResultSet results;rn ResultSetMetaData rsmd;rn DatabaseMetaData dma;rn Connection con;rn int numcols,i;rnrn public testdatabase() throws Exception rn String sUrl="jdbc:microsoft:sqlserver://"+"192.168.16.1:1433;"+"databasename=user";rn Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");rn con=DriverManager.getConnection(sUrl,"sa","");rn dma=con.getMetaData();rn System.out.println("Connected to:"+dma.getURL());rn System.out.println("Driver:"+dma.getDriverName());rn String types[]=new String[1];rn types[0]="TABLES";rn results=dma.getTables(null,null,"%",types);rn tryrn printResult("-------Tables-------");rn rn catch(Exception e)e.printStackTrace();rn results.close();rn rn protected void printResult(String s) throws Exceptionrn System.out.println(s);rn rsmd=results.getMetaData();rn numcols=rsmd.getColumnCount();rn for(i=1;i);rn System.out.println();rn rn rnrnrn public static void main(String[] args) rn tryrn testdatabase mydatabase=new testdatabase();rn rn catch (Exception e)e.printStackTrace();rn rnrnrn输出结果如下:rnConnected to:jdbc:microsoft:sqlserver://192.168.16.1:1433;SELECTMETHOD=direct;DATABASENAME=user;LOGINTIMEOUT=0rnrnDriver:SQLServerrnrn-------Tables-------rnrnTABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS rnrnrn结果没有输出我连接的数据库里的所有表的信息,发现results里没有数据。rn该怎么做,我才能得到所有表的信息呢???
代码哪里了?
package com.sun;rnrnimport java.util.ArrayList;rnrnrnrnpublic class Number extends Monkeyrn public static void main(String[] args) rn Number n = new Number();rn n.count();rn rnrnclass Monkeyrn private int id ;rn private int num ;rn private int i ;rn public void count()rn rn ArrayList al = new ArrayList();rn for (int i = 0; i < 3; i++) rn Monkey mon = new Monkey();rn mon.id = i;rn mon.num = 1;rn al.add(mon);rn rn while (al.size() != 1) rn i++; rn num++;rn if (((Monkey)al.get(i)).num % 3 == 0) rn al.remove(i);rn rn if (i > al.size()) rn i = 0;rn rn rn System.out.println(((Monkey)al.get(0)).num);rn rnrn
我这代码哪里了!高手请进!
private void bntImpExport_Click(object sender, System.EventArgs e)rn rn DataTable dt = new DataTable ("baobiao");rn DataTable db = new DataTable ("bao");rn System.Data.DataRow dr;rn SqlConnection conn = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionSqlServer"].ToString());rn //创建数据适配器对象rn string SqlStr="select 学籍号,姓名,性别 from StudentTable";rn SqlDataAdapter da = new SqlDataAdapter(SqlStr,conn);rn tryrn rn //填充数据集rn DataSet ds = new DataSet();rn dt = ds.Tables.Add("baobiao");rn da.Fill(ds);rn// db = dt.DataSet.Tables[0];rn db=ds.Tables[0];rn rn rn rn catch(Exception error)rn rn Response.Write(error.ToString());rn rnrn string strFileName = "F:/ss.xls";rn string strSaveFileName = "F:/ss/"+System.DateTime.Now.ToString().Replace(":","").Replace("-","").Replace(" ","")+@".xls";rn rn Excel.Application ThisApplication = new Excel.ApplicationClass(); rn Excel.Application NewApplication = new Excel.ApplicationClass();rn Excel.Workbook ThisWorkBook; rn StringBuilder sb;rn sb = new StringBuilder();rn object missing = System.Reflection.Missing.Value; rn try rn rn //加载Excel模板文件rn ThisWorkBook = ThisApplication.Workbooks.Open(strFileName,missing,missing,missing,missing,missing,missing,missing,missing,missing,missing,missing,missing,missing,missing); rn Excel.Worksheet ThisSheet = (Excel.Worksheet)ThisWorkBook.Sheets[1]; rn System.DateTime dtEnd = new DateTime();rn ThisSheet.Cells[7,1] = dtEnd.ToShortDateString(); rn ThisApplication.Visible = false;rn rn int rows = db.Rows.Count;rn int cols = db.Columns.Count;rn // 生成创建表的脚本rn rn sb.Append("CREATE TABLE ");rn sb.Append(db.TableName + " ( ");rn rn for(int i=0;i
我这代码到底哪里了啊
为什么CHAR NAME 只有在录入一个字符的时候程序才能正常运行啊??rn#include rn#include rnint main()rnrnFILE *fp;rnFILE *op;rnint j=0;rnint leng;rnint leng2;rnint c;rnchar name[10]=0;rnchar tihuan[10]=0;rnchar wenben[1000]=0;rnfp=fopen("word.txt","r");rnop=fopen("newword.txt","w");rnprintf("请输入你要替换的字符串\n");rnscanf("%s",name);rnleng=strlen(name);rnprintf("请输入你要替换成的字符串\n");rnscanf("%s",tihuan);rnfscanf(fp,"%s",wenben);rnleng2=strlen(wenben);rnwhile((c=wenben[j])!=EOF&&((leng2-j)>=(leng-1)))rnrnif(c==name[0])rnrnif(strncmp(name,wenben+j,leng)==0)rnrnfprintf(op,"%s",tihuan);rnj=j+leng;rnrnrnelsernrnfputc(c,op);rnj++;rnrnrnfclose(fp);rnfclose(op);rnreturn 0;rnrnrnrnrnrnrn在录入一个字符的时候程序才能正常运行啊??
我这代码哪里了!HELP
w:=screen.Width;rn h:=screen.Height;rn Top1:=(w-form1.Width*2)/2;rn Left1:=(h-form1.height*2)/2;rnrnrnw、h、Top1、Left1都是Integer是的rnrn报<em>错</em>:Incompatible types: 'Integer' and 'Extended'
大家帮我看下这application的代码哪里了,在线等。
rnrnrn rn 使用application对象实现的网页计数器rnrnrnrn 使用application对象实现的网页计数器rn rnrn rn rn rn
麻烦请教 我这代码哪里了?
#include rn#include rn#define zuidi 0rn#define zuigao 300rn#define step 20rnvoid main()rnrn int a,b; rn a=zuidi;rn while(a,a,b);rn rnrn
大家帮我看下这代码哪里了!在线
按照书上写的<em>代码</em>进行运行,但总是<em>错</em>误,希望大家帮我指点下迷津rn rnsmp3.htmlrnrnrnrn 选择你喜欢的水果rnrnrn rn 请选择你喜欢的水果rnrn rn香蕉rn苹果rn桔子rn葡萄rn都不喜爱rn 你的性别:rn女rn男rn rnrnrnrnrnrnrnmenu20.jsprnrnrnrnrn 显示用户的选择rnrnrnrn;rn for(int i=0;irn rn rn rn rnrn rn rn rnrn
大家帮我看下这传递数据的代码哪里了。在线
我在书上见到的源<em>代码</em>:rnmenu14.jsprnrnrnrnrn 用户登录rnrnrnrn[color=#FF0000]rn rn "/>rn "/>rn "/>rn "/>rn rn [/color] 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 [color=#FF0000][/color] rn rnrnmenu15.jsprnrnrnrn 用户登录rnrnrnrn rn rn rn你输入的联系人信息如下rnrnrnrn rn 用户名:rn rnrn 电话:rn rnrnrnrn rn 家庭住址:rn rnrn rn 邮政编码: rnrnrnrnrn运行menu14.jsp时提示:"/menu14.jsp(13,40) Attribute value request.getParameter("username") is quoted with " which must be escaped when used within the value"rn我认为在menu14.jsp里<em>参数</em>不能传递到menu15.jsp中,地址,姓名填写出来才能传递吧。那个的作用不是只要符合条件,那么运行menu14.jsp时它将导向menu15.jsp显示其中的内容吗?rnrn我直接把红色部分删除掉,然后改写“ 运行效果不是给书上运行后一样吗。我加不加红色部分有什么区别?rnrn说的太杂,大家见笑了rnrn
急!在线等!请问这代码,路径哪里设置了 ?
请问这<em>段</em><em>代码</em>,路径哪里设置<em>错</em>了 ?rnpackage pageconnection;rnrnrnimport java.io.BufferedOutputStream;rnimport java.io.File;rnimport java.io.FileOutputStream;rnimport java.io.IOException;rnimport java.util.ArrayList;rnimport java.util.Hashtable;rnimport javax.servlet.ServletException;rnimport javax.servlet.ServletInputStream;rnimport javax.servlet.http.HttpServletRequest;rnrnpublic class UploadFile2 rn private UploadFile2() rn rn rn private static String getFileType(String fileName) rn int index = -1;rn index = fileName.lastIndexOf(".");rn if (index>0) rn return fileName.substring(index,fileName.length());rn else rn return "."+fileName.substring(fileName.length()-3,fileName.length());rn rn rn public static String[] upload(HttpServletRequest request,String url,String fileName) rn throws ServletException,IOException rn return upload(request,url,fileName,false);rn rn public static String[] upload(HttpServletRequest request,String url,boolean useAutogenerationName)rn throws ServletException,IOException rn return upload(request,url,null,useAutogenerationName);rn rn @SuppressWarnings("unchecked")rnprivate static String[] upload(HttpServletRequest request,String url,String fileName,boolean useAutogenerationName) rn throws ServletException,IOException rn String name = null; rn String value = null; rn boolean fileFlag = false; rn File tmpFile = null; rn String fName = null; rn FileOutputStream baos = null; rn BufferedOutputStream bos = null; rn Hashtable> paramHt = new Hashtable>(); rn int BUFSIZE = 1024 * 8; rn int rtnPos = 0; rn byte[] buffs = new byte[BUFSIZE * 8]; rn String contentType = request.getContentType();rn request.getInputStream() ;rn int index = contentType.indexOf("boundary="); rn String boundary = "--" + contentType.substring(index + 9); rn String endBoundary = boundary + "--";rn ServletInputStream sis = null;rn try rn sis = request.getInputStream();rn catch (IOException e)rn System.out.println("��ȡServlet�ֽ����?");rn e.printStackTrace();rn throw e;rn rn try rn while ((rtnPos = sis.readLine(buffs, 0, buffs.length)) != -1) rn String strBuff = new String(buffs, 0, rtnPos); rn if (strBuff.startsWith(boundary)) rn if (name != null && name.trim().length() > 0) rn if (fileFlag) rn bos.flush(); rn baos.close(); rn bos.close(); rn baos = null; rn bos = null; rn else rn Object obj = paramHt.get(name); rn ArrayList al = null; rn if (obj == null) rn al = new ArrayList(); rn else rn ArrayList arrayList = (ArrayList)obj; rn al = arrayList; rn rn al.add(value); rn paramHt.put(name, al); rn rn rn name = new String(); rn value = new String(); rn fileFlag = false; rn rtnPos = sis.readLine(buffs, 0, buffs.length);rn if (rtnPos != -1) rn strBuff = new String(buffs, 0, rtnPos);rn if (strBuff.toLowerCase().startsWith("content-disposition: form-data; ")) rn int nIndex = strBuff.toLowerCase().indexOf("name=\""); rn int nLastIndex = strBuff.toLowerCase().indexOf("\"",nIndex + 6); rn name = strBuff.substring(nIndex + 6, nLastIndex); rn rn int fIndex = strBuff.toLowerCase().indexOf("filename=\""); rn if (fIndex != -1) rn fileFlag = true; rn int fLastIndex = strBuff.toLowerCase().indexOf("\"",fIndex + 10); rn fName = strBuff.substring(fIndex + 10, fLastIndex);rn fIndex = fName.lastIndexOf("\\"); rn if (fIndex == -1) rn fIndex = fName.lastIndexOf("/"); rn if (fIndex != -1) rn fName = fName.substring(fIndex + 1); rn rn else rn fName = fName.substring(fIndex + 1); rn rn if (fName == null || fName.trim().length() == 0) rn fileFlag = false; rn sis.readLine(buffs, 0, buffs.length); rn sis.readLine(buffs, 0, buffs.length); rn sis.readLine(buffs, 0, buffs.length); rn continue; rn rn rn sis.readLine(buffs, 0, buffs.length); rn sis.readLine(buffs, 0, buffs.length); rn rn else if (strBuff.startsWith(endBoundary)) rn if (name != null && name.trim().length() > 0) rn if (fileFlag) rn bos.flush(); rn baos.close(); rn bos.close(); rn baos = null; rn bos = null; rn else rn Object obj = paramHt.get(name); rn ArrayList al = null; rn if (obj == null) rn al = new ArrayList(); rn else rn ArrayList arrayList = (ArrayList) obj; rn al = arrayList; rn rn al.add(value); rn paramHt.put(name, al); rn rn rn else rn if (fileFlag) rn if (baos == null && bos == null) rn if (useAutogenerationName == true) rn fName = System.currentTimeMillis()+getFileType(fName);rn else rn if (fileName != null) rn fName = fileName+getFileType(fName);rn rn rn tmpFile = new File(url + fName); rn baos = new FileOutputStream(tmpFile); rn bos = new BufferedOutputStream(baos); rn rn bos.write(buffs, 0, rtnPos); rn baos.flush(); rn else rn value = value + strBuff; rn rn rn rn catch (IOException e) rn System.out.println("д���ļ��쳣�����ļ����ȡ����");rn e.printStackTrace();rn throw e;rn rn try rn if (bos != null ) rn bos.close();rn rn catch (IOException e) rn System.out.println("�ر�д���ֽ����?");rn e.printStackTrace();rn throw e;rn rn if (tmpFile != null) rn //return url + fName;rn String message[] = null,null;rn File file = new File(url + fName);rn message[0] = fName;rn message[1] = getFileSize(file.length());rn return message;rn else rn return null;rn rn rn protected static String getFileSize(long size) rn StringBuffer sb = new StringBuffer(String.valueOf(size));rn int length = sb.length();rn if (sb.length());rn rn return sb.toString();rn rn
哪里了,在线等.........
rnrnrn rn rn rn rn rn rn rn rn rnrnrnrnrn这<em>段</em><em>代码</em>,发生重复提交问题,就是点击一次“提交”,服务器端执行了2次.do操作,哪里<em>错</em>了?好像脚本发出了2次提交不解?
代码哪里出了?
这<em>段</em><em>代码</em>哪里出<em>错</em>了?form1 为表单ID,checkbox 为checkbox 的名字rnrnif form1.checkbox.checked=false and form1.checkbox2 =false and form1.checkbox3 =false and form1.checkbox4 =false thenrnmsgbox("please enter the service")rnend if
代码哪里出了???
请高手帮忙把下面<em>代码</em>纠正,能运行就可以了,有些地方实在不行就删掉,谢谢啦!!!rnrnHELLOWIN.Crn/*------------------------------------------------------------------------rn rn HELLOWIN.C -- Displays "Hello, Windows 98!" in client arearn rn (c) Charles Petzold, 1998rn rn-----------------------------------------------------------------------*/rn#include rnLRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ; rnint WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,PSTR szCmdLine, int iCmdShow) rn rn static TCHAR szAppName[] = TEXT ("HelloWin") ; rn HWND hwnd; rn MSG msg; rn WNDCLASwndclass; rn wndclass.style = CS_HREDRAW | CS_VREDRAW ; rn wndclass.lpfnWndProc = WndProc ; rn wndclass.cbClsExtra = 0 ; rn wndclass.cbWndExtra = 0 ; rn wndclass.hInstance = hInstance ; rn wndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION) ; rn wndclass.hCursor = LoadCursor (NULL, IDC_ARROW) ; rn wndclass.hbrBackground= (HBRUSH) GetStockObject (WHITE_BRUSH) ; rn wndclass.lpszMenuNam = NULL ; rn wndclass.lpszClassName= szAppName ; rn if (!RegisterClass (&wndclass)) rn rn MessageBox ( NULL, TEXT ("This program requires Windows NT!"),szAppName, MB_ICONERROR) ; rn return 0 ; rn rn hwnd = CreateWindow( szAppName, // window class namern rn TEXT ("The Hello Program"), // window captionrn rn WS_OVERLAPPEDWINDOW, // window stylern rn CW_USEDEFAULT,// initial x positionrn rn CW_USEDEFAULT,// initial y positionrn rn CW_USEDEFAULT,// initial x sizern rn CW_USEDEFAULT,// initial y sizern rn NULL, // parent window handlern rn NULL, // window menu handlern rn hInstance, // program instance handlern rn NULL) ; // creation parameters rn rn ShowWindow (hwnd, iCmdShow) ; rn UpdateWindow (hwnd) ; rn while (GetMessage (&msg, NULL, 0, 0)) rn rn TranslateMessage (&msg) ; rn DispatchMessage (&msg) ;rn rn return msg.wParam ; rnrn rnrnLRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) rnrn rn HDC hdc ; rn PAINTSTRUCT ps ; rn RECT rect ; rn switch (message) rn rn case WM_CREATE: rn PlaySound (TEXT ("hellowin.wav"), NULL, SND_FILENAME | SND_ASYNC) ; rn return 0 ; rn case WM_PAINT: rn hdc = BeginPaint (hwnd, &ps) ;rn GetClientRect (hwnd, &rect) ;rn DrawText (hdc, TEXT ("Hello, Windows 98!"), -1, &rect, DT_SINGLELINE | DT_CENTER | DT_VCENTER) ;rn EndPaint (hwnd, &ps) ; rn return 0 ; rn rn case WM_DESTROY: rn PostQuitMessage (0) ; rn return 0 ; rn rn return DefWindowProc (hwnd, message, wParam, lParam) ; rnrn
倒计时的代码哪里
这是一个用户控件 该控件显示倒计时rn问题是文本框里没显示任何东西rn同时我不懂javascript 看似再显示以秒的计时 并没有倒计时rn我想设置一个分钟数 例如我设置“1” 则该控件就开始从60秒开始倒记rn我设置“2” 则该控件就从120秒开始倒记
代码哪里了???急!
rn粗rn 斜rn粗斜rn通常
[求助]这代码哪里了??
private int rowNum = 2;rn protected void Page_Load(object sender, EventArgs e)rn rn string str=ConfigurationManager.ConnectionStrings["pet"].ConnectionString;rn SqlConnection con = new SqlConnection(str);rn SqlCommand cmd = new SqlCommand("select top 4 petID from pet order by petID",con);rn con.Open();rn int i = 0;rn SqlDataReader sdr = cmd.ExecuteReader();rn System.Web.UI.WebControls.TableRow tr = new TableRow();rn while (sdr.Read())rn rn i = i + 1;rn System.Web.UI.WebControls.TableCell tc = new TableCell();rn hotPetControl hpc = (hotPetControl)this.LoadControl("hotPetControl.aspx");rn hpc.PetID = sdr.GetString(0);rn tc.Controls.Add(hpc);rn tr.Controls.Add(tc);rn if (i % this.rowNum == 0)rn rn this.Table1.Rows.Add(tr);rn tr = new TableRow();rn rn rn if (i % this.rowNum != 0)rn rn this.Table1.Rows.Add(tr);rn rn sdr.Close();rn con.Close();rn rn------------------------------rn运行时显示con.Open()有问题,为什么啊??
代码哪里了?谢谢
Private Sub Command1_Click()rnDim s As Integerrns = Text1.TextrnIf s Mod 3 = 0 Then x = MsgBox("是3的倍数", vbOKOnly, "数值判断")rnElse: If s Mod 3 <> 0 Then x = MsgBox("不是3的倍数", vbOKOnly, "数值判断")rnEnd IfrnEnd Subrnrn反正就是不能执行
代码哪里了哟????
private void button22_Click(object sender, System.EventArgs e)rn rn string x = "MM";rn int y = 12;rn increase(x);rn increase(y);rn MessageBox.Show(x);rn MessageBox.Show(y.ToString());rn rn rnrn private void increase(ref object x)rn rn if(x == System.Type.GetType("string"))rn x = "QQ";rn elsern x = 13;rn rnrn咋个实现修改x y的值哦?rn
下面这代码哪里
[img=https://img-bbs.csdn.net/upload/201602/19/1455858835_569644.jpg][/img]
代码是哪里了?
Private Sub Adodc1_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, ByVal adStatus As ADODB.EventReasonEnum, ByVal pRecordset As ADODB.Recordset)rnAdodc1.Caption = "记录: " & (Adodc1.Recordset.AbsolutePosition + 1)rnEnd Subrnrn运行时出现编译<em>错</em>误“过程声明与同名事件或过程的描述不匹配”rn<em>错</em>误指向的是“Private Sub Adodc1_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, ByVal adStatus As ADODB.EventReasonEnum, ByVal pRecordset As ADODB.Recordset)”这句<em>代码</em>
代码到底哪里了????
#pragma oncernrn#include "stdafx.h"rn#include rnrnclass iStackrnrnpublic:rn iStack(void);rnrn iStack( int capacity ) : _stack( capacity ), _top( 0 ) rnrn bool pop( int &value );rn bool push( int value );rnrn bool full() return _top < _stack.size()-1 ? false : true; ;rn bool empty() return _top ? false : true ;;rn void display();rnrn int size() return _top; ;rnrn ~iStack(void);rnrnprivate:rn int _top;rn vector _stack;rn;rnrn编译老是提示缺少iStack::vector存储类或类型说明符,不可能呀,明明已经加了了,请大家帮忙看看到底是怎么回事?
看下这代码哪里了??
if (textBox1.Text != null)rn rn SqlConnection conn3 = new SqlConnection(ConnectionString);rn conn3.Open();rn SqlCommand cmd = new SqlCommand("update student set name='" + textBox5.Text + "' where name='" + textBox1.Text + "'", conn3);rn cmd.ExecuteNonQuery();rn conn3.Close();rn rn else if (textBox2.Text != null)rn rn SqlConnection conn3 = new SqlConnection(ConnectionString);rn conn3.Open();rn SqlCommand cmd = new SqlCommand("update student set mayjor='" + textBox6.Text + "' where mayjor='" + textBox2.Text + "'", conn3);rn cmd.ExecuteNonQuery();rn conn3.Close();rn rn else rn rn SqlConnection conn3 = new SqlConnection(ConnectionString);rn conn3.Open();rn SqlCommand cmd = new SqlCommand("update student set school='" + textBox8.Text + "' where school='" + textBox4.Text + "'", conn3);rn cmd.ExecuteNonQuery();rn conn3.Close();rn rn为什么点击按钮的时候只有第一条if语句有效呢?rn
看看这代码哪里了?
[code=C#]rnpublic void UpdateScanTime(string beiyongzi, string beiyongzifu)rn rn StringBuilder strSql = new StringBuilder();rn //提示TOP附近有语法<em>错</em>误,请问哪里<em>错</em>了?rn strSql.Append("update top 1 Event set BeiYongZi=@beiyongzi,BeiYongZiFu=@BeiYongZiFu ");rn SqlParameter[] parameters =rn rn new SqlParameter ("@beiyongzi",SqlDbType .VarChar ,255),rn new SqlParameter ("@beiyongzifu",SqlDbType .VarChar ,255)rnrn ;rn parameters[0].Value = beiyongzi;rn parameters[1].Value = beiyongzifu;rnrn DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);rnrn rnrn[/code]
代码哪里了啊?
cmd.Parameters.Add( new OleDbParameter("@Con",SqlDbType.Int));rncmd.Parameters["@Con"].Value = 1;rnsql = "Insert Into tb_Article(Title) Values(@Con)";rncmd.CommandText = sql;rnnReturn = cmd.ExecuteNonQuery();rnrn报<em>错</em>说@Con没有声明,是为什么呢?
求助]这代码哪里了.........
sub Modify()rn rn set shw=server.CreateObject("sdCrmSql.ShowValue")rn dim IDrn dim rs,sqlrn ID=request("ID")rn if ID="" thenrn FoundErr=truern ErrMsg=ErrMsg & " <em>参数</em>不足!"rn exit subrn elsern ID=Clng(ID)rn end ifrnrn Set rs=Server.CreateObject("Adodb.RecordSet")rn sql="select * from khgl where ID=" & IDrn if not IsObject(conn) then link_databasern rs.Open sql,Conn,1,1rn if rs.bof and rs.eof thenrn FoundErr=truern ErrMsg=ErrMsg & " 找不到指定的用户!"rn rs.closern set rs=nothingrn exit subrn end ifrn rn rn%>rnrnrn rn rn rn rn rn 修改客户rn rn rn......rn......rn......rn......rn......(省略部分为修改页面)rnrn rn rn rn rn rn rn rn rn rn rnrnrnrn showmsg st1rnrnend subrnrnrnrn在修改页面的过程(sub modify)中ID值能接收到,但在保存修改的过程(sub savemodify())中ID为空值!rn急!!!<em>在线</em>等
下面这代码哪里了?
[code=php]rnrn/**rn * 下载远程图片rn * @param string $url 图片的绝对urlrn * @param string $filepath 文件的完整路径(包括目录,不包括后缀名,例如/www/images/test) ,此函数会自动根据图片url和http头信息确定图片的后缀名rn * @return mixed 下载成功返回一个描述图片信息的数组,下载失败则返回falsern */rn function downloadImage($url, $filepath) rn //服务器返回的头信息rn $responseHeaders = array();rn //原始图片名rn $originalfilename = '';rn //图片的后缀名rn $ext = '';rn $ch = curl_init($url);rn //设置curl_exec返回的值包含Http头rn curl_setopt($ch, CURLOPT_HEADER, 1);rn //设置curl_exec返回的值包含Http内容rn curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); rn //设置抓取跳转(http 301,302)后的页面rn curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);rn //设置最多的HTTP重定向的数量rn curl_setopt($ch, CURLOPT_MAXREDIRS, 2);rnrn //服务器返回的数据(包括http头信息和内容)rn $html = curl_exec($ch);rn //获取此次抓取的相关信息rn $httpinfo = curl_getinfo($ch);rn curl_close($ch);rn if ($html !== false) rn //分离response的header和body,由于服务器可能使用了302跳转,所以此处需要将字符串分离为 2+跳转次数 个子串rn $httpArr = explode("\r\n\r\n", $html, 2 + $httpinfo['redirect_count']);rn //倒数第二<em>段</em>是服务器最后一次response的http头rn $header = $httpArr[count($httpArr) - 2];rn //倒数第一<em>段</em>是服务器最后一次response的内容rn $body = $httpArr[count($httpArr) - 1];rn $header.="\r\n";rnrn //获取最后一次response的header信息rn preg_match_all('/([a-z0-9-_]+):\s*([^\r\n]+)\r\n/i', $header, $matches);rn if (!empty($matches) && count($matches) == 3 && !empty($matches[1]) && !empty($matches[1])) rn for ($i = 0; $i < count($matches[1]); $i++) rn if (array_key_exists($i, $matches[2])) rn $responseHeaders[$matches[1][$i]] = $matches[2][$i];rn rn rn rn //获取图片后缀名rn if (0 < preg_match('(?:[^\/\\\\]+)\.(jpg|jpeg|gif|png|bmp)$i', $url, $matches)) rn $originalfilename = $matches[0];rn $ext = $matches[1];rn else rn if (array_key_exists('Content-Type', $responseHeaders)) rn if (0 < preg_match('image/(\w+)i', $responseHeaders['Content-Type'], $extmatches)) rn $ext = $extmatches[1];rn rn rn rn //保存文件rn if (!empty($ext)) rn $filepath .= ".$ext";rn //如果目录不存在,则先要创建目录rn CFiles::createDirectory(dirname($filepath));rn $local_file = fopen($filepath, 'w');rn if (false !== $local_file) rn if (false !== fwrite($local_file, $body)) rn fclose($local_file);rn $sizeinfo = getimagesize($filepath);rn return array('filepath' => realpath($filepath), 'width' => $sizeinfo[0], 'height' => $sizeinfo[1], 'orginalfilename' => $originalfilename, 'filename' => pathinfo($filepath, PATHINFO_BASENAME));rn rn rn rn rn return false;rn rn$url ='http://www.1.com/CqgBHlLM6T2AF3seAAEq9Ncx7BU430.jpg';rn$filepath ='d:\pic';rndownloadImage($url,$filepath);rn[/code]rn报<em>错</em>:Fatal error: Class 'CFiles' not foundrnrn麻烦知道的大哥直接给<em>代码</em>,谢谢了
代码哪里了DOMDOCUMENT
如果换成previousSibling的话就正常的rnrn[code=php]rn$doc = new DOMDocument();rn$html = getElementsByTagName('*');rnrnforeach($ul as $node) rn if ($node -> hasAttribute('class')) rnrn foreach($node -> nextSibling ->childNodes as $morenodes) rnrn print_r($morenodes);rn rn rn rn[/code]
请问这代码哪里
[color=#FF00FF]请问这<em>段</em><em>代码</em>哪里<em>错</em>了,你们可以上机试一下 怎么改 编译器报<em>错</em>:<em>错</em>误 1 可访问性不一致: <em>参数</em>类型“delete2.liwei”比方法“delete2.liweike.lwk(delete2.liwei)”的可访问性低[/color] rnrnusing System;rnusing System.Collections.Generic;rnusing System.Linq;rnusing System.Text;rnusing System.Threading.Tasks;rnrnnamespace delete2rnrn class Programrn rn static void Main(string[] args)rn rn liweike a = new liwei();rn liwei b = new liwei();rn b.lwk((liwei)a);rn rn ((liwei)a).lwk((liwei)a);rn a.A(); rn a.lwk(b);rn rn rn rn public interface liweikern rn void A(); void lwk(liwei a);rn rn class liwei : liweikern rn public void A()rn Console.WriteLine("啦啦啦"); rn public void lwk(liwei a) rn rn a.A();rn rn rnrnrn
代码哪里了啊....
org 07c00hrn mov ax, csrn mov ds, axrn mov es, axrn call DispStrrn jmp $rnDispStr:rn mov ax, BootMessagern mov bp, axrn mov cx, 16rn mov ax, 013D1hrn mov bx, 0D0chrn mov dl, 0rn int 10hrn retrnBootMessage: db "Hello, OS world!"rntimes 510-($-$$) db 0;rndw 0xaa55rnrn我是新手......提示是 times那一行有<em>错</em>,可我不知道怎么改....
代码哪里了。怎么改?
这<em>段</em><em>代码</em>哪里<em>错</em>了。怎么改?
代码哪里了呢??????????????
datagrid模板列:加了个label 想静态绑定 点和 title字<em>段</em> 超链接传个id号 打开xxxx.aspx页面 显示具体新闻 可是报<em>错</em>啊 id传不过去啊 咋回事呢 rnrnrn target='_blank' onClick="window.open(this.href,'', 'height=350,width=410,toolbar=no,location=no,status=no,menubar=no,resizable=no,scrollbars=yes,titlebar=no');return false">rnrnrnrnrnrn异常详细信息: System.FormatException: 输入字符串的格式不正确。rnint id=Convert.ToInt32(this.Request.QueryString.Get("id"));rn上面是显示页面要获得id 怎么不正确那???rnrnrnrn
看看这代码哪里了?
#includernvoid main()rnrn int a,a_1=1,a_2='y',a_3=1;rn while (a_2=='y')rn a_2=' ';rn printf("请输入一个正整数:\n");rn scanf("%d",&a);rn rn rnrn rnrn while (a_1
代码哪里了啊,
[code=C/C++]#includern#includern#define MAX_SIZE 101rn#define SWAP(x,y,t)((t)=(x),(x)=(y),(y)=(t))rnvoid sort(int [],int);rnvoid main(void)rnrn int i,n;rn int list[MAX_SIZE];rn printf("Enter the number of numbers to generate");rn scanf("%d",&n);rn if(nMAX_SIZE)rn fprintf(stderr,"Improper value of n\n");rn exit(1); //报告 这里没有定义rn rn for(i=0;i
替换代码哪里了?
public string FilterData(string strcontent,string strfilter)rnrn Regex Re= new Regex(strcontent);rn string[] s= strfilter.Split('|');rn foreach(string key in s)rn rn Re=Re.Replace(key,"");//出<em>错</em>,无法将string转化为regexrn rn rn return Re.ToString(); rnrn
在线等~看看我的代码哪里了~
Private Sub ftpget_Click()rnInet1.Execute , "get ttt.txt C:\eee.txt"rnEnd SubrnrnPrivate Sub ftplink_Click()rnInet1.RemoteHost = Text1.TextrnInet1.UserName = Text2.TextrnInet1.Password = Text3.TextrnInet1.ExecuternrnEnd Subrnrn运行的时候可以连上,但是下载的时候老是出<em>错</em>,提示还在进行上一请求,请问哪里<em>错</em>了?rn
我的代码哪里了?
If Check1.Value = 1 And Check2.Value = 0 And Check3.Value = 0 And Check4.Value = 0 ThenrnAdodc1.RecordSource = "select * from 项目信息 where 申报日期 between '" + Chr(35) + Str(DTPicker1.Value) + Chr(35) + "' and '" + Chr(35) + Str(DTPicker2.Value) + Chr(35) + "'"rnAdodc1.RefreshrnEnd Ifrnrn这个<em>代码</em>老是出现说对象refresh方法的IACODC失败
代码在哪里?在线
[code=JScript]function check1(t)rnrn var ReG=/^[1-2][0-9]3[-][0-1]0,1[0-9]$/rn if(!ReG.test(t.hysj.value))rn rn alert("格式不对!")rn t.hysj.select();rn return false;rn rn[/code]rnrnrn判断年月日期格式,是正则<em>错</em>了吗?
请问这代码在哪里?在线
/*rn * 功能是对事件处理机制的理解rn * 1、通过上下左右键控制小球的位置rn */rnpackage com.test2;rnimport java.awt.*; rnimport javax.swing.*;rnimport java.awt.event.*;rnrnrnpublic class Demo11_1 extends JFramern MyPanel mp=null;rn rn public static void main(String[] args) rn // TODO Auto-generated method stubrn Demo11_1 demo=new Demo11_1();rn rnrn public Demo11_1()rn rn //新建一个面板rn mp=new MyPanel();rn this.add(mp);rn //添加事件监听rn this.addKeyListener(mp); //键盘监听这个类所设定的对象,是对mp的监听rn //设置窗体大小rn this.setSize(300,400);rn //退出时关闭窗口rn this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);rn //窗体可见rn this.setVisible(true);rn rnrnrn//定义自己的面板rnclass MyPanel extends JPanel implements KeyListenerrn int x=10;rn int y=10;rn rn //设置画笔属性rn public void paint(Graphics g)rn //调用父类方法,方法重写rn super.paint(g);rn //设置画笔颜色rn g.setColor(Color.blue);rn //绘制一个圆,坐标 宽度 高度rn g.fillOval(x,y,20,20);rn rn rn rn @Overridern public void keyPressed(KeyEvent e) rn // TODO Auto-generated method stubrn if(e.getKeyCode()==KeyEvent.VK_UP)rn System.out.println("键被按下"+(char)e.getKeyCode());rn y-=10;rn rn if(e.getKeyCode()==KeyEvent.VK_DOWN)rn System.out.println("键被按下");rn y+=10;rn rn if(e.getKeyCode()==KeyEvent.VK_LEFT)rn System.out.println("键被按下"+e.getKeyCode());rn x-=10;rn rn if(e.getKeyCode()==KeyEvent.VK_RIGHT)rn x+=10;rn rn this.repaint();rn rnrn @Overridern public void keyReleased(KeyEvent e) rn // TODO Auto-generated method stubrn rn rn rn @Overridern public void keyTyped(KeyEvent e) rn // TODO Auto-generated method stubrn rn rnrn rn
我的代码哪里了!
Private Sub cmdok_Click()rnIf Trim(txtUserName.Text) = "" ThenrnrnExit SubrnEnd IfrnrnIf Trim(txtPassword.Text) = "" Thenrn'MsgBox "ÃÜÂë²»ÄÜΪ¿Õ£¡", , "µÇ½"rnExit SubrnEnd IfrnrnrnrnPwdcount = Pwdcount + 1rnIf Pwdcount > 3 ThenrnMsgBox "ÄúµÄÃÜÂë´íÎó£¡", , "Í˳ö"rncmdCancel_ClickrnExit SubrnEnd IfrnrnrnSysop_id = Trim(txtUserName.Text)rnSysOP_Password = Trim(txtPassword.Text)rnrnrs.MoveFirstrnrn这是我做的简单的登陆,可是总是出问题!
哪里了?(急!在线等)
Private Sub Command1_Click()rn Winsock2.ConnectrnEnd SubrnrnPrivate Sub Command2_Click()rn MsgBox Winsock2.Statern Winsock2.SendData "hello"rnEnd SubrnrnPrivate Sub Form_Load()rn Winsock1.ListenrnEnd SubrnrnPrivate Sub Winsock1_DataArrival(ByVal bytesTotal As Long)rn Dim str As Stringrn Winsock1.GetData strrn Text2.Text = strrnEnd SubrnrnPrivate Sub Winsock2_Connect()rn MsgBox "c"rnEnd Subrnrn
我这代码了?
插入数据的<em>代码</em>,comment,buyao是从表单得到的,mail_date我想调用系统当前日期,哪里<em>错</em>了?怎么修改?rnrn 提交成功!
语句哪里
rnrnrn提示end if 行出<em>错</em>
请问这哪里了?
If Session("AnonUID") = "" Thenrn Session("AnonUID") = Guid.NewGuidrn Return Session("AnonUID").ToStringrn End Ifrn编译的时候出<em>错</em>提示为:运算符对 类型“Guid” 和 字符串“” 无效
东西哪里了?
程序编译通过,执行的时候发生<em>错</em>误,再调试弹出个框框说有个断点在0x409ab5rn估计后面算面积的没<em>错</em>,是中间模板的<em>错</em>误rnvoid CMyHomeworkView::GetRgnArea() rnrn area1=0;rn int i,j;rn CRect rect;rn CPoint* m_points;rn int m_nPoints;rn m_nPoints=0;rn CMyHomeworkDoc* pDoc = GetDocument();rnrn CTypedPtrList& strokeList = pDoc->m_strokeList;rn POSITION pos = strokeList.GetHeadPosition();rn while (pos != NULL)rn rn CStroke* pStroke = strokeList.GetNext(pos);rn m_nPoints = m_nPoints+m_pStrokeCur->m_pointArray.GetSize();rn rn m_points = new CPoint[m_nPoints];rn rn CTypedPtrList& strokeList1 = pDoc->m_strokeList;rn POSITION pos1 = strokeList1.GetHeadPosition();rn while (pos1 != NULL)rn rn CStroke* pStroke1 = strokeList1.GetNext(pos1);rn for(i = 0; im_pointArray[i];rn rnrn CRgn rgn;rn rgn.CreatePolygonRgn(m_points, m_nPoints, ALTERNATE);rn rgn.GetRgnBox(&rect);rnrn CPoint point;rn for( i = rect.top ; i
PHP代码哪里了??
rn输出一直是“nihao”
哪里写
这<em>段</em><em>错</em>在哪里呀?IE提示这里的第一行就有<em>错</em>。缺“;”rn var XmlHttp = New ActiveXObject("Microsoft.XMLHTTP");rn XmlHttp.Open("POST","ExamCorp.asp?id="+Register.C_Corp.value,false);rn XmlHttp.Send();rn var tmpExamCorp = XmlHttp.responseTextrn
XML哪里
rnrn rn rn rn rn rn]>rnrn rn dsgrn rn rnrnrnrn用的xmlspy检测,<em>错</em>误是rn该文件无效:rn在属性src中的名称mycolor必须不指向一个已解析的实体。rnrn在rn应该怎么改啊??
程序哪里了?
import java.awt.event.*;rnimport java.awt.*;rnpublic class wwrnrn public static void main(String[] args) rn rn Button b = new Button("Press Me!");rn b.addActionListener(new ButtonHandler());rn b.setVisible(true);rn rn rnrnrnclass ButtonHandler extends ActionListenerrnrn public void PerFormed(ActionEven e)rn rn System.out.println("Action occurred");rn rn
字符串哪里
rnrnrnrnrn rn文件显示rnrnrn rnrn 请选择要下载的文件rn rnrn rn rn rn rnrn总是提示红色部分<em>错</em>误,是哪里字符串联接<em>错</em>了吗?
代码在哪里?在线。。。
原<em>代码</em>如下:rnrnpublic class Employeern rn private String name;rn private EmployeeDate birthDate;rn private EmployeeDate hireDate;rn public Employee(String name, int bYYYY, int bMM, int bDD,rn int hYYYY, int hMM, int hDD)rn rn this.name = name;rn birthDate = new EmployeeDate(bYYYY,bMM,bDD);rn hireDate = new EmployeeDate(hYYYY,hMM,hDD);rn rn public String toString()rn rn return name +rn " birthday: " + birthDate.toString() +rn " hired: " + hireDate.toString() ;rn rn rnrn编译时有如下的<em>错</em>误信息:rnrnrnc:\java\bin>javac Employee.javarnEmployee.java:4: cannot resolve symbolrnsymbol : class EmployeeDaternlocation: class Employeern private EmployeeDate birthDate;rn ^rnEmployee.java:5: cannot resolve symbolrnsymbol : class EmployeeDaternlocation: class Employeern private EmployeeDate hireDate;rn ^rnEmployee.java:10: cannot resolve symbolrnsymbol : class EmployeeDaternlocation: class Employeern birthDate = new EmployeeDate(bYYYY,bMM,bDD);rn ^rnEmployee.java:11: cannot resolve symbolrnsymbol : class EmployeeDaternlocation: class Employeern hireDate = new EmployeeDate(hYYYY,hMM,hDD);rn ^rn4 errorsrnrnrnrn
在线等】这简单的C#程序哪里了?
用头插法插入结点,最后输出,没有显示<em>错</em>误,但是结果输出的不正确,高手帮看看! rnrnusing System; rnusing System.Collections.Generic; rnusing System.Linq; rnusing System.Text; rnusing System.IO; rnrnnamespace 支援 rn rnclass TeacherList rn rnpublic TeacherNode HeadNode;//头节点 rnpublic TeacherList(string Path)//从文件构造 rn rnHeadNode = new TeacherNode(); rnStreamReader sr = new StreamReader(Path,System.Text.Encoding.Default); rnstring line; rnwhile ((line = sr.ReadLine()) != null) rn rnConsole.WriteLine(line); rnTeacherNode node = new TeacherNode(line); rnInsFirst(node); rn rnsr.Close(); rn rnrnpublic void InsFirst(TeacherNode node) rn rnnode.NextNode = HeadNode.NextNode; rnHeadNode.NextNode = node; rn rnpublic void Display() rn rnTeacherNode node = HeadNode.NextNode; rnwhile (node != null) rn rnnode.Display(); rnnode = node.NextNode; rn rn rnrn rnrn
请问哪里了?在线等......等......
<em>错</em>误:rnNote: test.java uses or overides a deprecated API.rnNote: Recompile with -deprecation for details.rn程序<em>代码</em>:rnimport java.awt.*;rnpublic class test extends Framernpublic String motd;rnpublic test(String s)rn rn super("Java 基本框架Frame");rn motd=s;rn resize(300,300);rn rn public test()rn rn this("this is a test");rn rn public void paint(Graphics g)rn rn g.drawString(motd,15,15);rn g.drawString("click anywhere Exit",15,25);rn rn public void start()rn rn show();rn rn public boolean mouseDown(Event e,int x,int y)rnrn hide();rn dispose();rn System.exit(0);rn return false;rnrn rn public static void main(String args[])rnrn test m;rn if (args.length>0)rn rn m=new test(args[0]);rn rnrn else rn m=new test();rnrn rn m.start();rn rn rn
实在想不通这代码哪里出
[code=c]rnchar *ch1=new char[256];//分配一<em>段</em>内存rnch1=inet_ntoa(ClientAddr->sin_addr);//将客户端的IP地址传给ch1rnWriteIntoDataBase(ch1);//调用自定义函数,将数据写入数据库--单步调试到这一步都正常rndelete[] ch1;//出<em>错</em>,信息如下图,如果将这<em>段</em>注释掉,编译器不报<em>错</em>但内存会泄露rn[/code]rn[img=http://img.my.csdn.net/uploads/201301/18/1358479536_9831.jpg][/img]rn[code=c]rnvoid CIOCPModel::WriteIntoDataBase(char *ClientIP)rnrn CString strIP=MultiToWide(ClientIP);//将数据转换成UNICODErn _ConnectionPtr m_pConnection; //连接对象指针rn tryrn rn m_pConnection.CreateInstance("ADODB.Connection"); //创建连接对象实例rn bstr_t strConnect="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Modbus_TCP.mdb;Persist Security Info=False";rn m_pConnection->Open(strConnect,"","",adModeUnknown); //打开数据库rn rn catch (_com_error e) //捕捉<em>错</em>误rn rn AfxMessageBox(e.Description()); //弹出<em>错</em>误rn return;rn rn tryrn rn CString sql;rn //一定要先将数据进行转换后才可执行Executern sql.Format(_T("INSERT INTO message (客户端IP) VALUES ('%s')"),strIP);rn m_pConnection->Execute((_bstr_t)sql,NULL,adCmdText);//写入数据rn rn catch (_com_error e)rn rn AfxMessageBox(e.Description()); rn return;//弹出<em>错</em>误rn rn _ShowMessage(_T("客户端写入数据库成功!"),strIP);rn m_pConnection->Close();rnrn[/code]
求助这代码的判断哪里出了。
db_User里三个字<em>段</em>username,password,ifadmin,ifadmin表示是否为管理员。T or Frn下面判断如果为true,则跳转到loginAdmin.aspxrn否则loginNormal.asprnrn调试的时候全跳转到了loginNormal.asp。求助。rn--------------------分线线---------------------------------------------rnrnrn protected void Button1_Click(object sender, EventArgs e)rn rn string str = "select username,password,ifadmin from db_User where username='" + TextBox1.Text + "'";rn SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);rn SqlCommand cmd = new SqlCommand();rn cmd.Connection = con;rn cmd.CommandType = CommandType.Text;rn con.Open();rn cmd.CommandText = str;rn SqlDataReader dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);rnrn if (dr.Read())rn rn if (dr["password"].ToString() == TextBox2.Text)rn rn if (dr["ifadmin"].ToString() == "true")rn rn Response.Redirect("LoginAdmin.aspx");rn rn elsern rn Response.Redirect("LoginNormal.aspx");rn rn rn elsern rn Response.Write(@" ");rn rn rnrn elsern rn Response.Write(@" ");rn rn
*******************看看这代码,哪里了?(很急)
*.hrnclass ECommError //串口<em>错</em>误类rnrnpublic:rn enum ErrorTypern rn BAD_SERIAL_PORT , //<em>错</em>误的端口rn BAD_BAUD_RATE , //<em>错</em>误的波特率rn BAD_PORT_NUMBER , //<em>错</em>误的端口号rn BAD_STOP_BITS ,//<em>错</em>误的停止位 rn BAD_PARITY ,//<em>错</em>误的奇偶rn BAD_BYTESIZE ,//<em>错</em>误的字节长度rn PORT_ALREADY_OPEN ,//端口已经打开rn PORT_NOT_OPEN ,//端口没有打开rn OPEN_ERROR ,//打开<em>错</em>误rn WRITE_ERROR ,//写<em>错</em>误rn READ_ERROR ,//读<em>错</em>误rn CLOSE_ERROR ,//关闭<em>错</em>误rn PURGECOMM ,//清串口缓存rn FLUSHFILEBUFFERS ,//rn GETCOMMSTATE ,//取得串口状态rn SETCOMMSTATE ,//设置串口状态rn SETUPCOMM ,//设置串口rn SETCOMMTIMEOUTS ,//设置超时时限 rn CLEARCOMMERROR //清除<em>错</em>误rn ;rnrn ECommError( ErrorType error);rn ErrorType Error;rn DWORD Errno; rn; // Errno == 函数GetLastError的返回值,可以被函数FormatMessage使用。 rnrnrn*.cpprnrnECommError::ECommError(ErrorType error)rn :Error(error),rn Errno(GetLastError())rnrnrnrn用法:throw ECommError(ECommError::OPEN_ERROR);rnrnrnVc竟然说:找不到这个ECommError这个函数的实现!
代码哪里了,请高手指教!
Warning: Supplied argument is not a valid MySQL result resource in c:\program files\apache group\apache\htdocs\liaotian1\list.php on line 15rnrnFatal error: Maximum execution time of 30 seconds exceeded in c:\program files\apache group\apache\htdocs\liaotian1\list.php on line 14rn这是程序报<em>错</em>信息,<em>代码</em>如下rnrnrn$last)rn$last=$rownum;rnbreak;rnrn?>rn rn0;$i--)rnrn$arr_msg=mysql_fetch_array($result);rnif($arr_msg['msg']!="")rnecho " ";rnecho $arr_msg['sender']."对";rnecho $arr_msg['receiver']."说 ";rnif(($arr_msg['sender']==$user)||($arr_msg['receiver']==$user))rn echo "";rnecho $arr_msg['msg']." ";rnecho "";rnecho"";rnelsernecho $arr_msg['msg'];rnecho "";rnrnrnrnmysql_close();rn?>rnrn rn rnrnrnrnrn
代码哪里了?请大家帮帮忙
请大家共同研究下这个<em>段</em><em>代码</em>哪里出<em>错</em>了rn请大家共同研究下这个<em>段</em><em>代码</em>哪里出<em>错</em>了rn以下是一<em>段</em> <em>在线</em>留言的AJAX 应用,但是 不知道哪里的问题,提示只停留在 “正在保存留言...”rnrnhome.asp 页面rn rn rnrnrnAJAX.页面rnfunction sendinfo(message)rn var xmlhttp;rn tryrn xmlhttp=new XMLHttpRequest();rn rn catch(e)rn xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");rn rn xmlhttp.onreadystatechange=function()rn if (xmlhttp.readyState==4)rn if (xmlhttp.status==200)rn var data=xmlhttp.responseText;rn book_result(data);rn rn elsern document.getElementById("book_err").innerHTML="留言失败,请联系管理员";rn rn rn elsern document.getElementById("book_err").innerHTML="正在保存留言...";rn rn rn xmlhttp.open("post", "booksave.asp", true);rn xmlhttp.setRequestHeader('Content-type','application/x-www-form-urlencoded');rn xmlhttp.send("message="+escape(message));rnrn//---------------------------------- AJAX 博客留言 信息添加状态----------------------------------rnfunction book_result(data)rn if(data==0)document.getElementById("book_err").innerHTML=" 留言保存失败,请联系管理员";rn rn if(data==1)document.getElementById("book_err").innerHTML=" 留言保存成功";rn rn if(data==2)document.getElementById("book_err").innerHTML=" 你尚未登陆,请先登陆再留言";rn rn if(data==3)document.getElementById("book_err").innerHTML=" 本系统不允许给自己留言";rnrn rnrnbooksave.asprnrnrnrn<>"" then'判断用户是否已经登陆rn'登陆成功用户继续执行以下操作rnif loginuserID=myID then '如果登陆用户是博客所有者rnrnresponse.Write(3)'输出不能给自己留言的警告标识rnelse'rn'执行留言添加动作rnmessage=trim(request.Form("message"))rnstrsql="insert into blog_book(userID,message) values("&loginuserID&",'"&message&"')"rncall Table_Insert(strsql)rnif err then rn response.Write(0)'添加失败标记rn elsern response.Write(1)'添加成功标记rn end ifrn'rnend if rnrnelse'如果没有登陆,输出未登陆标记2rnresponse.Write(2) rnend ifrn%>
求助!! 这FTP上传文件的代码哪里了?
[code=C/C++]rn //m_ftpUrl = "192.1.1.1" 是这个形式,还是"ftp://192.1.1.1"rn CInternetSession Session(AfxGetApp()->m_pszAppName);rn CFtpConnection *pConn=NULL;rn pConn=Session.GetFtpConnection(m_ftpUrl,m_user,m_pass,m_port,TRUE); //链接到FTP服务器rn if (pConn)rn rn if (!pConn->PutFile(m_file,"\\"+m_file))rn rn AfxMessageBox("上传失败. 失败的原因可能如下:\n1.网络没有链接?\n2.用户名或密码有误?\n3.FTP的地址有误?");rn return FALSE;rn elsern AfxMessageBox("上传成功..");rn pConn->Close();rn delete pConn;rn Session.Close();rn rn elsern AfxMessageBox("链接到FTP服务器失败.\n失败的原因可能如下:\n1.网络没有链接?\n2.用户名或密码有误?\n3.FTP的地址有误?");rn return FALSE;rn [/code]rnrn老提示AfxMessageBox("上传失败. 失败的原因可能如下:\n1.网络没有链接?\n2.用户名或密码有误?\n3.FTP的地址有误?"); rnrnWHY啊...哪能帮帮我..
代码哪里了?照着课本上写的
课本上照着打出来的,提示if那里有<em>错</em>,请问哪里出现问题?![图片](https://img-ask.csdn.net/upload/201609/21/1474459714_301127.png)
大家看看这代码哪里了?
rnrn当 username 或 password 只有其中一个不含'符号时,就提示<em>错</em>误,其它情况正常。rnrn<em>错</em>误提示:rnrnjava.lang.NullPointerExceptionrn
大家看看我的这代码哪里
rnrnfunction getSelectedText() rnrn var post = document.editForm.tbContent; rn var selected = '';rn if(post.isTextEdit)rn rn var range = document.selection.createRange();rn post.focus(); //使editForm中name为tbContent的对象获得焦点rn var sel= document.selection;rn var rng= sel.createRange();rn rng.colapse;rn var Stext = document.selection.createRange().isTextEdit;rn var rng = document.selection.createRange();rn if((sel.type =="Text" || sel.type == "None") && rng !=null)rn rn if(rng.text.length > 0) rn rn selected = rng.text;rn rn rn rn return selected;rnrnrnfunction chfont(font) rn rn if(getSelectedText()) rn rn var range = document.selection.createRange();rn range.text = "[font=" + font + "]" + range.text + "[/font]";rn rn elsern rn rn rn
J2ME手机扫雷源码下载
与普通扫雷不同,双人对战游戏,如果一方失败,换另一个,完整代码加注释... 相关下载链接:[url=//download.csdn.net/download/zh68112036/2152843?utm_source=bbsseo]//download.csdn.net/download/zh68112036/2152843?utm_source=bbsseo[/url]
c++万年历程序下载
这段程序可以实现万年历,对C++初学者很有用 相关下载链接:[url=//download.csdn.net/download/sunmoonlight2011/3915710?utm_source=bbsseo]//download.csdn.net/download/sunmoonlight2011/3915710?utm_source=bbsseo[/url]
cocos2dx-2.2.3.part01.rar下载
cocos2dx-2.2.3 相关下载链接:[url=//download.csdn.net/download/xuyaogyo/7093505?utm_source=bbsseo]//download.csdn.net/download/xuyaogyo/7093505?utm_source=bbsseo[/url]
相关热词 c# 线程结束时执行 c# kb mb 图片 c# 替换第几位字符 c#项目决定成败 c# 与matlab c# xml缩进 c#传感器基础 c#操作wps c# md5使用方法 c# 引用父窗口的组件
我们是很有底线的