iOS联网问题,求大家帮我看下 2C

问什么打印空呀,求指教呀图片说明

2个回答

获取百度地图,这个对照官方的例子看下

url 为什么是空?

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
很简单的问题,大家帮我看下。
#include rnrnvoid pintd(int n) rn if (n < 0) rnrn
OCX的问题,大家帮我看下
我要写个动态库去调一个ocx,因为我要用java的JNI去调ocx,就只有这样转一下了,rn我不知道那个dll里怎样调这个ocx啊,我对vc不懂,我想的是装载了ocx后就直接调他的方法了,不知道代码怎么写啊,哪位老大给段代码啊,越精简越好啊
大家帮我看下这个问题
我想用下面的程序完成一个功能就是传入的参数每2个都不相同。但是不知道为什么,运行了以后的结果是rnproduct is [02]rn111the sumber of product is 0rnthe allproduct 第0位 is [02]rnthe allproduct 第1位 is []rn222the sumber of product is 1rnthe allproduct 第1位 is [03]rnthe allproduct 第2位 is []rn3333the sumber of product is 2rnthe allproduct 第3位 is []rn44444the sumber of product is 3rn666the sumber of product is 3rn777the sumber of product is 7369327rnthe sumber of product is 7369327rnthe allproduct 第0位 is [02]rnSegmentation fault (core dumped)rnrnrn好像sum++后就不对了。rnrnint IsSpace(char *buf)rnrn char *p = buf;rn while(*p)rn rn if(*p != ' ')rn rn return -1;rn rn p++;rn rn return 0;rnrnrnint VerifyIsProEqual(char *product, char *xproduct1 ,char *xproduct2,char *xproduct3)rnrn typedef structrn char string[2+1];rn allproduct;rn allproduct pro[4];rn int sum;rn int i,j;rn sum=0;rnprintf("product is [%s]\n",product); rnprintf("111the sumber of product is %d\n",sum); rn memset(&pro,0,sizeof(pro));rn if(IsSpace(product)==-1)rn rn memcpy(pro[sum].string,product,sizeof(product));rn printf("the allproduct 第%d位 is [%s]\n",sum,pro[sum].string);rn sum++;rn rnprintf("the allproduct 第%d位 is [%s]\n",sum,pro[sum].string);rnprintf("222the sumber of product is %d\n",sum);rn if(IsSpace(xproduct1)==-1)rn rn memcpy(pro[sum].string,xproduct1,sizeof(xproduct1));rn printf("the allproduct 第%d位 is [%s]\n",sum,pro[sum].string);rn sum++;rn rnprintf("the allproduct 第%d位 is [%s]\n",sum,pro[sum].string);rnprintf("3333the sumber of product is %d\n",sum);rn if(IsSpace(xproduct2)==-1)rn rn memcpy(pro[sum].string,xproduct2,sizeof(xproduct2));rn sum++;rn rnprintf("the allproduct 第%d位 is [%s]\n",sum,pro[sum].string);rnprintf("44444the sumber of product is %d\n",sum);rn if(IsSpace(xproduct3)==-1)rn rnprintf("666the sumber of product is %d\n",sum);rn memcpy(pro[sum].string,xproduct3,sizeof(xproduct3));rnprintf("777the sumber of product is %d\n",sum);rn rnprintf("the sumber of product is %d\n",sum);rn for(i=0;i
大家帮我看下这问题!
我这是个聊天室,我用JS检测。刚开始很正常,但发不两条消息后,对方就不能显示消息了,可是后台消息是存在的,就是没读出来。rnrn页面JSrn[code=JScript]rnfunction receiveMsg(data)rn rn var resultText = data.responseText;rn if (resultText == "0"||resultText == "load") rn rn else if (resultText == "false") rn ChatListBox.document.body.innerHTML +="通信发生错误! ";rn rn else if (resultText.length>0)rn rn var index = resultText.indexOf("|");rn var msg="";rn if (index != -1)rn rn document.getElementById("MsgCount").innerText = resultText.substring(0, index);rn msg = resultText.substring(++index);rn rn ChatListBox.document.body.innerHTML+=msg;rn ChatListBox.window.scroll(0, 999999);rn rn rn function GetMsg()rn rn var index=document.getElementById("MsgCount").innerText;rn var url = "Service.aspx?type=getManyMsg&index=" + index;rn var param="&index="+index;rn var ajax=new Simple.Ajax("GET",url,receiveMsg,param);rn ajax.SendRequest();rn rn function GetMeMsg()rn rn var mail=document.getElementById("MyUserID").innerText;rn var url = "Service.aspx?type=getMsg&mail=" + mail;rn var param="&mail="+mail;rn var ajax=new Simple.Ajax("GET",url,receiveMeMsg,null);rn ajax.SendRequest();rn rn function receiveMeMsg(data)rn rn var resultText = data.responseText;rn if (resultText == "0"||resultText == "load") rn rn else if (resultText == "false") rn ChatMeListBox.document.body.innerHTML +="通信发生错误! ";rn rn else if (resultText.length>0)rn rn ChatMeListBox.document.body.innerHTML+=resultText;rn ChatMeListBox.window.scroll(0, 999999);rn rn rn function GetBuyUser()rn rn var url = "Service.aspx?type=getBuyUser";rn var ajax=new Simple.Ajax("GET",url,receiveBuyUser,null);rn ajax.SendRequest();rn rn function receiveBuyUser(data)rn rn var resultText = data.responseText;rn if (resultText == "0"||resultText == "load") rn rn else if (resultText == "false") rn document.getElementById("buyUserlist").innerHTML="通信发生错误! ";rn rn else if (resultText.length>0)rn rn document.getElementById("buyUserlist").innerHTML=resultText;rn rn rn function update()rn rnrn GetBuyUser();//刷新用户列表rnrn GetMsg();//检测群聊消息rnrn GetMeMsg();//检测私聊消息rnrn setTimeout("update()",10000);//因为是测试,时间设的长些rn rn window.onload=update();rn[/code]rnrnService.aspx.csrn[code=C#]rnif (Request.QueryString["type"] == null)rn return;rn elsern rn string msgType=Request.QueryString["type"];rn string mail = "";rn string message = "";rn int index=-1;rn switch (msgType)rn rn case "getBuyUser":rn Response.Write(Global.MsgManage.getBuyUser());rn break;rn case "getManyMsg":rn if (Request.QueryString["index"]==null)rn return;rn tryrn rn index = Convert.ToInt32(Request.QueryString["index"]);rn if (index < 0) return;rn Response.Write(Global.MsgManage.getMsg(index));rn rn catch return; rn break;rn case "getMsg":rn if (Request.QueryString["mail"] == null)rn return;rn mail = Request.QueryString["mail"];rn if (mail.Equals("") || mail == "")rn return;rn Response.Write(Global.MsgManage.getMsg(mail));rn break;rn default:rn return;rn rn Response.Flush();rn Response.End();rn rn rn[/code]rnrn因为发消息是成功的,就没贴出发消息的代码!rn大家帮我看下!
ajax 问题 大家帮我看下
我以前是ajax 到后台的一个handler文件:ashx里面做处理,然后返回值再去刷新局部。rn现在我可以直接ajax到 所在页面的aspx,在他的后台处理,但是我发现这样会刷新整个页面,不知道有没办法不刷新整个页面?
大家帮我看下,很简单的问题
rn var product$st.count-1 =new productClass();rn product$st.count-1.prod_name='';rn product$st.count-1.prod_id='';rn product$st.count-1.is_group='';rn product$st.count-1.serv_id='';rn product$st.count-1.base_serv_id='';rn product$st.count-1.is_base='';rn product$st.count-1.price_name='';rn //alert(product$st.count-1.price_name);rn product$st.count-1.priceList = new Object();rnrnrn var tariff$st.count-1$tarst.count-1=new Object();rn tariff$st.count-1$tarst.count-1.code='';rn tariff$st.count-1$tarst.count-1.name='';rn tariff$st.count-1$tarst.count-1.billingtype='';rn tariff$st.count-1$tarst.count-1.rentyearfee='';rn tariff$st.count-1$tarst.count-1.rentmonthfee='';rn product$st.count-1.priceList['t_']=tariff$st.count-1$tarst.count-1;rnrnrnrn这段代码,请问下,如果#item1.is_group==1 的话,我的这个product$st.count-1.priceList 怎么判断它里面没有值啊?
大家帮我看下!Java
[code=Java]package c;rnrnimport java.io.File;rnimport java.io.FileInputStream;rnimport java.io.FileNotFoundException;rnimport java.io.FileOutputStream;rnimport java.io.IOException;rnrnpublic class TestOut rnrn public TestOut()rn File f1 = new File("c:\\1.txt");rn File f2 = new File("c:\\2.txt");rn try rn FileOutputStream fos1 = new FileOutputStream(f1);rn byte buf[] = "hello".getBytes();rn fos1.write(buf);rn catch (FileNotFoundException e1) rn e1.printStackTrace();rn catch (IOException e) rn e.printStackTrace();rn rn try rn FileInputStream fis = new FileInputStream(f1);rn FileOutputStream fos2 = new FileOutputStream(f2);rn int c;rn while((c=fis.read())!=-1)rn fos2.write(c);rn rn catch (FileNotFoundException e) rn e.printStackTrace();rn catch (IOException e) rn e.printStackTrace();rn rn rn rn public static void main(String[] args) rn new Test();rn rnrn[/code]rnrn我想要实现的效果是rnrn创建2个文本 1和2rn1文本的内容为hello wordrn2文本复制1文本的内容。rn前提是没有这两个文本。rn不知道明白了没?
请大家帮我看下!
css部分是我自己写的,js部分我是照人家写的。怎么让他在刷新后是关着的子菜单。我刚开始学,请多指教!rnrnrnrnrnrn rn mou某某有限公司rn rnrn rnrnrnrn rn rn rn rn rn rn rn rn rn rn rn |rn Homern |rn about usrn |rn Learning Centerrn |rn 中文rn |rn Englishrn rn rn rn rn rn BUSINESS MODELS rn rn BUSINESS & MIDDLEWARE rn RFID SOLUTIONS rn rn CONTACT US rn SUPPORT rn rn rn rn rn rn rn rn rn rn RFID PRODUCTrn rn RFID FIXEQ READO rn RFID HELLHELD MOBILErn rn rn rn HANDHELD MOBIE COMPUTERrn rn rn rn rnrnrnrnrnrnrnrn
请大家帮我看下
#includern#includernusing namespace std;rnvoid echo(string message)rnrnrn strcat(message," you");rn cout<>word;rn echo(word);rnrn我的用意是希望通过调用echo函数,在echo函数中,做字符的连接操作,请各位不吝赐教~~~
大家帮我看下!
我在窗体上放了 一个Label控件,并且把它与一个对象的属性(DateTime类型的)进行绑定。属性的值变,Label的text 就变,rn但是如果该属性值为null的话,Labal上却显示0001-1-1 0:00:00,我想要的结果是,属性为null,Label就显示空,怎么弄啊?
大家帮我看下错误!
rn为什么输入正确的密码后`程序还是会退出?rn==========================rn#include rn#include rn#include rnvoid menu_module ();rnrn/* 主页面 -- */rnint main()rnrnrn system ( "clear" ) ;rn/* system ( "color 1f" ) ; */rn printf ( "==========================================\n" ) ;rn printf ( "= 中国人民银行 =\n" ) ;rn printf ( "==========================================\n" ) ;rn printf ( "= =\n" ) ;rn printf ( "= 欢迎使用ATM自助服务 =\n" ) ;rn printf ( "= =\n" ) ;rn printf ( "==========================================\n" ) ;rn rn sleep (3) ;rnrn system ( "clear" ) ;rnrn printf ( "\n" ) ;rnrn printf ( "请输入磁卡!\n" ) ;rnrn printf ( "请等待...\n" ) ;rnrn sleep (2) ;rnrn printf ( "资料读取中!\n" ) ;rnrn sleep (2) ;rnrn system ( "clear" ) ;rn rn int num = 4493953,c = 0;rnrn int i;rnrn for ( c=0;c<3;c++)rnrn rnrn printf ( "请输入密码!\n" ) ;rnrn scanf ( "%d",&i ) ;rnrn if ( i==num ) rnrn rnrn printf ( "欢迎进入!\n" ) ;rn rn menu_module();rnrn break ; rnrn rnrn else if ( i!=num ) rnrn printf ( "密码错误请重新输入!\n" ) ;rnrn rnrn system ( "clear" ) ;rnrn while (c==3)rnrn rnrn printf ( "你输入的密码错误过多,请稍后再试!\n" ) ;rnrn printf ( "系统退出中!\n" ) ;rnrn sleep (5) ;rnrn break ;rnrn rn rn /* exit (0) ; */rn return 0;rnrnrn/* 用户管理页面 -- */rnrnvoid menu_module()rnrn system ( "clear" ) ;rnrn printf ( "building!!!\n" ) ;rnrn
大家过来帮我看下!
在WEBUI里rnstring shopid,shoptype,shopname,shopprice,instruction,imagename,imagetype;rn各个变量都有赋值rnstring [] shopstr=new string [] shopid,shoptype,shopname,shopprice,instruction,imagename,imagetype;rn 在DbClass 里(类 DbConn)rnrn定义一个数据操作的函数rnrnpublic bool UpdateDatas(string [] shopstr)rnrn OleDbConnection conn=this.Oledbcon();rn string [] str=new string[] "@shopid","@shoptype","@shopname","@shopprice","@instruction","@imagename","@imagetype";rnstring sqltext="insert into shop (shopid,shoptype,shopname,shopprice,instruction,imagename,imagetype) values (@shopid,@shoptype,@shopname,@shopprice,@instruction,@imagename,@imagetype)";rnOleDbCommand cmd=new OleDbCommand(sqltext,conn);rnconn.open();rntryrnrn for(i=0;i<=shopstr.length;i++)rn rn cmd.Parameters.Add(new OleDbParameter("str[i].Tostring()",OleDbDataType.varchar));rn cmd.Parameters["str[i].Tostring()"].Value=shopstr[i].Tostring();rn rn cmd.ExecuteNonquerstring();rn return true;rnrncatchrnrn return false;rnrnfinallyrnrnconn.close();rnrnrnrn调用这个函数 rn(new DbConn()).updateDatas(shopstr);rn为什么数据插入不成功,但也不发生错误,上面的代码问题在哪?能不能帮忙修改一下,或是有什么好的办法没啊?rnrn
求一条sql语句,大家帮我看下
有个表tab,测试数据如下:rnID,account_id,visit_timern1,l1@yahoo.cn,2012-02-15 00:12:23rn2,l1@yahoo.cn,2012-02-15 10:12:23rn3,l2@yahoo.cn,2012-02-15 00:11:45rn4,l3@yahoo.cn,2012-02-15 03:01:12rn5,l4@yahoo.cn,2012-02-15 16:21:38rn6,l4@yahoo.cn,2012-02-15 11:20:52rnrn我现在要用一条语句求出 2012-02-15 这天的账号只访问了1次的行数和所有的行数,rn只访问了1次的有rn3,l2@yahoo.cn,2012-02-15 00:11:45rn4,l3@yahoo.cn,2012-02-15 03:01:12 这两行,总行数为6,所以结果为:rn2,6rnrn谁能帮我看下,有没有好的方法,最好是应用分析函数,谢谢大家了!
求高人帮我看下
刚才删个控件不小心删了什么东西 出现这个错误 帮帮忙rnE:\VC98\MFC\SRC\DLGDATA.CPP(171) : error C2065: '_countof' : undeclared identifierrnE:\VC98\MFC\SRC\DLGDATA.CPP(182) : error C2065: 'AfxSetWindowText' : undeclared identifierrn[code=C/C++]rnAFX_STATIC void AFX_CDECL _Afx_DDX_TextWithFormat(CDataExchange* pDX, int nIDC,rn LPCTSTR lpszFormat, UINT nIDPrompt, ...)rn // only supports windows output formats - no floating pointrnrn va_list pData;rn va_start(pData, nIDPrompt);rnrn HWND hWndCtrl = pDX->PrepareEditCtrl(nIDC);rn TCHAR szT[32];rn if (pDX->m_bSaveAndValidate)rn rn // the following works for %d, %u, %ld, %lurn ::GetWindowText(hWndCtrl, szT, _countof(szT));rn if (!_AfxSimpleScanf(szT, lpszFormat, pData))rn rn AfxMessageBox(nIDPrompt);rn pDX->Fail(); // throws exceptionrn rn rn elsern rn wvsprintf(szT, lpszFormat, pData);rn // does not support floating point numbers - see dlgfloat.cpprn AfxSetWindowText(hWndCtrl, szT);rn rnrn va_end(pData);rn[/code]
iOS联网和授权问题
1.写百度地图时,实现BMKGeneralDelegate中的2个代理方法时,报 CFNetwork SSLHandshake failed (-9824) NSURLSession/NSURLConnection HTTP load failed                         (kCFStreamErrorDomainSSL, -9824) 网络连接:onGetNe
无分,求大家看下
我自建个视图rnSELECT TOP 100 PERCENT *rnFROM dbo.tradernWHERE (1 = 1) AND (id INrn (SELECT MAX(id) AS idrn FROM tradern GROUP BY comid))rnORDER BY memberType DESCrnrn但因为这段东西,ID号本身就不是按次序来的,有的是10在15后面这样。rn那以我想为视图再建一个可以有序的ID怎么做rnNEWID() AS AArn不行,那不是数字rn
asp的错误,大家帮我看下
<%rndim arna=[city4]rnresponse.Write(a)rnset cx=server.CreateObject("adodb.recordset")rnchaxun=("select * from '"&a&"' where cityid between '" & request.Form("fwq")&"' and '"&request.Form("fwz")&"'")rncx.open chaxun,conn1,1,1rn%>rnrnchaxun=("select * from '"&a&"' where cityid between '" & request.Formrn '"&a&"' 该怎么写?错在哪?rnrnMicrosoft OLE DB Provider for ODBC Drivers 错误 '80040e21' rnODBC 驱动程序不支持所需的属性。 rn
急!大家来帮我看下!
发生了未处理异常 没有指定HTMLAnchor的ID属性 着是什么概念啊?rn
大家帮我看下这段代码...
[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找了个代码··rn但发现图片和图片的距离很远,想搞近些,但就是不知道怎么修改·~rn看了下代码·好像要改DIV的CSS,但代码里的是id=www_qpsh_com 根本找不到它的CSS来修改·rn大家知道为什么吗?有什么办法?rnrn
请大家帮我看下LoadImage();
case WM_CREATE:rn hInstance = ((LPCREATESTRUCT) lParam)->hInstance ;rn SetButton.Style = BS_PUSHBUTTON;rn SetButton.Text = TEXT("陈杰");rn hButton = CreateWindow(TEXT("button"),SetButton.Text,WS_CHILD | WS_VISIBLE | SetButton.Style,10,10,100,50,hWnd,NULL,NULL,NULL);//创建BUTTON。rn //hInstance = ((LPCREATESTRUCT) lParam)->hInstance ;rn rn //GetObject (Bt_Chen, sizeof (BITMAP), &bitmap) ;rn return 0;rn case WM_SIZE:rn cxApplication = LOWORD(lParam);rn cyApplication = HIWORD(lParam);rn return 0;rn case WM_COMMAND:rn wmId = LOWORD(wParam);rn wmEvent = HIWORD(wParam);rn // Parse the menu selections:rn switch (wmId)rn rn case IDM_ABOUT:rn DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);rn break;rn case IDM_EXIT:rn //DeleteObject(Bt_Chen) ;rn DestroyWindow(hWnd);rn break;rn default:rn return DefWindowProc(hWnd, message, wParam, lParam);rn rn break;rn case WM_PAINT:rn rn hdc = BeginPaint(hWnd, &ps);rn HdcWindow=CreateCompatibleDC(hdc);rn Bt_Chen = (HBITMAP)LoadImage(NULL,TEXT("C:\\Documents and Settings\\edgar.caya\\My Documents\\Visual Studio 2008\\Projects\\DYControler\\DYControler\\chenjie.bmp"),IMAGE_BITMAP,10,10,LR_CREATEDIBSECTION | LR_DEFAULTSIZE |LR_LOADFROMFILE );rn //bitmap.Attach(hbitmap);rn SelectObject(HdcWindow,Bt_Chen);rn BitBlt(hdc, 10, 10, 100, 50,HdcWindow, 0, 0, SRCCOPY);rn ReleaseDC(hWnd,HdcWindow);rn EndPaint(hWnd, &ps);rn break;rn case WM_DESTROY:rn DeleteObject (HdcWindow) ;rn PostQuitMessage(0);rn break;rnrnrnrnrn我为什么始终都弄不上去图片。
大家帮我看下swing日期控件
我在网上找了个日期控件..为什么这个控件不能选择日期啊.rn 我希望我选项择某一天的时候能返回当天的日期字符串.哪位朋友能给我改一下.让我选择某一天的时候返回当天的日期字符串rnrnpackage com.ui;rnrnimport java.awt.*; rnimport java.awt.event.*; rnimport java.util.*; rnimport javax.swing.*; rnimport javax.swing.event.*; rnimport javax.swing.table.*;rn rnpublic class MyCalendar extends JApplet rn rn public static final String WEEK_SUN = "日"; rn public static final String WEEK_MON = "一"; rn public static final String WEEK_TUE = "二"; rn public static final String WEEK_WED = "三"; rn public static final String WEEK_THU = "四"; rn public static final String WEEK_FRI = "五"; rn public static final String WEEK_SAT = "六";rn rn public static final Color background = Color.white; rn public static final Color foreground = Color.black; rn public static final Color headerBackground = Color.blue; rn public static final Color headerForeground = Color.white; rn public static final Color selectedBackground = Color.blue; rn public static final Color selectedForeground = Color.white;rn rn private JPanel cPane; rn private JLabel yearsLabel; rn private JSpinner yearsSpinner; rn private JLabel monthsLabel; rn private JComboBox monthsComboBox; rn private JTable daysTable; rn private AbstractTableModel daysModel; rn private Calendar calendar; rn rn public MyCalendar() rn cPane = (JPanel) getContentPane(); rn rn rn public void init() rn cPane.setLayout(new BorderLayout());rn rn calendar = Calendar.getInstance(); rn calendar = Calendar.getInstance();rn yearsLabel = new JLabel("年: "); rn yearsSpinner = new JSpinner(); rn yearsSpinner.setEditor(new JSpinner.NumberEditor(yearsSpinner, "0000"));rn yearsSpinner.setValue(new Integer(calendar.get(Calendar.YEAR))); rn yearsSpinner.addChangeListener(new ChangeListener() rn public void stateChanged(ChangeEvent changeEvent) rn int day = calendar.get(Calendar.DAY_OF_MONTH);rn calendar.set(Calendar.DAY_OF_MONTH, 1);rn calendar.set(Calendar.YEAR, ((Integer) yearsSpinner.getValue()).intValue());rn int maxDay = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);rn calendar.set(Calendar.DAY_OF_MONTH, day > maxDay ? maxDay : day);rn updateView(); rn rn );rn rn JPanel yearMonthPanel = new JPanel(); rn cPane.add(yearMonthPanel, BorderLayout.NORTH); rn yearMonthPanel.setLayout(new BorderLayout()); rn yearMonthPanel.add(new JPanel(), BorderLayout.CENTER); rn JPanel yearPanel = new JPanel(); rn yearMonthPanel.add(yearPanel, BorderLayout.WEST); rn yearPanel.setLayout(new BorderLayout()); rn yearPanel.add(yearsLabel, BorderLayout.WEST); rn yearPanel.add(yearsSpinner, BorderLayout.CENTER);rn rn monthsLabel = new JLabel("月: "); rn monthsComboBox = new JComboBox(); rn for (int i = 1; i <= 12; i++) rn monthsComboBox.addItem(new Integer(i)); rn rn monthsComboBox.setSelectedIndex(calendar.get(Calendar.MONTH)); rn monthsComboBox.addActionListener(new ActionListener() rn public void actionPerformed(ActionEvent actionEvent) rn int day = calendar.get(Calendar.DAY_OF_MONTH);rn calendar.set(Calendar.DAY_OF_MONTH, 1);rn calendar.set(Calendar.MONTH, monthsComboBox.getSelectedIndex());rn int maxDay = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);rn calendar.set(Calendar.DAY_OF_MONTH, day > maxDay ? maxDay : day);rn updateView(); rn rn ); rn JPanel monthPanel = new JPanel(); rn yearMonthPanel.add(monthPanel, BorderLayout.EAST); rn monthPanel.setLayout(new BorderLayout()); rn monthPanel.add(monthsLabel, BorderLayout.WEST); rn monthPanel.add(monthsComboBox, BorderLayout.CENTER);rn rn daysModel = new AbstractTableModel() rn public int getRowCount() rn return 7; rn rn rn public int getColumnCount() rn return 7; rn rn rn public Object getValueAt(int row, int column) rn if (row == 0) rn return getHeader(column); rn rn row--; rn Calendar calendar = (Calendar) MyCalendar.this.calendar.clone();rn calendar.set(Calendar.DAY_OF_MONTH, 1);rn int dayCount = calendar.getActualMaximum(Calendar.DAY_OF_MONTH); rn int moreDayCount = calendar.get(Calendar.DAY_OF_WEEK) - 1; rn int index = row * 7 + column; rn int dayIndex = index - moreDayCount + 1;rn if (index < moreDayCount || dayIndex > dayCount) rn return null; rn else rn return new Integer(dayIndex); rn rn rn ;rn rn daysTable = new CalendarTable(daysModel, calendar); rn daysTable.setCellSelectionEnabled(true);rn daysTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);rn rn daysTable.setDefaultRenderer(daysTable.getColumnClass(0), new TableCellRenderer() rn public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, rn boolean hasFocus, int row, int column) rn String text = (value == null) ? "" : value.toString(); rn JLabel cell = new JLabel(text); rn cell.setOpaque(true); rn if (row == 0) rn cell.setForeground(headerForeground); rn cell.setBackground(headerBackground); rn else rn if (isSelected) rn cell.setForeground(selectedForeground); rn cell.setBackground(selectedBackground); rn else rn cell.setForeground(foreground); rn cell.setBackground(background); rn rn rn rn return cell; rn rn );rn updateView();rn rn cPane.add(daysTable, BorderLayout.CENTER); rn rn rn public static String getHeader(int index) rn switch (index) rn case 0: rn return WEEK_SUN; rn case 1: rn return WEEK_MON; rn case 2: rn return WEEK_TUE; rn case 3: rn return WEEK_WED; rn case 4: rn return WEEK_THU; rn case 5: rn return WEEK_FRI; rn case 6: rn return WEEK_SAT; rn default: rn return null; rn rn rn rn public void updateView() rn daysModel.fireTableDataChanged();rn daysTable.setRowSelectionInterval(calendar.get(Calendar.WEEK_OF_MONTH),rn calendar.get(Calendar.WEEK_OF_MONTH));rn daysTable.setColumnSelectionInterval(calendar.get(Calendar.DAY_OF_WEEK) - 1,rn calendar.get(Calendar.DAY_OF_WEEK) - 1);rn rn public static class CalendarTable extends JTable rn private Calendar calendar;rn public CalendarTable(TableModel model, Calendar calendar) rn super(model);rn this.calendar = calendar;rn rn public void changeSelection(int row, int column, boolean toggle, boolean extend) rn super.changeSelection(row, column, toggle, extend);rn if (row == 0) rn return;rn rn Object obj = getValueAt(row, column);rn if (obj != null) rn calendar.set(Calendar.DAY_OF_MONTH, ((Integer)obj).intValue());rn rn rn rn rn public static void main(String[] args) rn JFrame frame = new JFrame("Calendar Application"); rn frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); rn MyCalendar myCalendar = new MyCalendar(); rn myCalendar.init(); rn frame.getContentPane().add(myCalendar); rn frame.setSize(240, 172); rn frame.show(); rn rn rn
php;删除大家帮我看下
function rmblankfile($dir, $size = 0)rn if(!is_dir($dir))rn return;rn rn $handle = opendir($dir);rn while($sub = readdir($handle))rn if($sub == '.' or $sub == '..')rn continue;rn rn $filepath = $dir . '/' . $sub;rn if(is_dir($filepath))rn #如果是文件夹就递归删除该文件夹下的文件rn rmblankfile($filepath, $size);rn else if(is_file($filepath) and filesize($filepath) <= $size)rn unlink($filepath);rn rn rnrnrnrn这个保存PHP后怎么使用啊 rn问题补充:rn我要做的是,目录里有的文件是等于6.3KB的,目录结构式news/二级文件夹下的文件查到后自动删除rn注意news/文件夹下有很多二级文件夹
大家帮我看下这段shell脚本!!
脚本如下:rn#!/bin/bashrn#rn#rn#rn#rn#rn#rnrnrnset -xrnrnstart()rnrn echo $"insmoding $binmodule ..."rn insmod WAPSUserAgentService.o dbg_mask=31 self_path=/root/WAPSLinux-Nopage/WAPSLinux-Nopage waps_dpath=0x10rn if [$? eq 0 ]rn thenrn printf "insmod success"rn elsern print "insmod fail"rn firn rnrnrnstop()rnrn echo $"rmmoding $binmodule ..."rn "$binrmmod" "$binrmmodule"rn RETVAL=$?rnrn if [ $RETVAL -eq 0 ]; thenrn echo $"unload $binmodule successfully ."rn elsern echo $"unload $binmodule failed with $RETVAL ."rn firnrnrncase "$1" inrn start)rn startrn ;;rn stop)rn stoprn ;;rn *)rn echo $"Usage: $0 start|stop"rn exit 1rnesacrnrnexit 0rnrn执行说是if [$? eq 0 ]语法错误, 小弟才学习shell不久。这个问题困扰了很久,请大家帮忙解决下。rn
大家帮我看下这个验证的
只能填数字rn如是直接复制过来字母,特殊字符什么也能也复制过来。怎么样防下复制呢。只输入
大家帮我看下,该怎么改?
string url = "Default.aspx?myUser=" + Request.QueryString["myname"] + "&toUser=" + Request.QueryString["toname"] + "";rn string script = " ";rn Page.RegisterStartupScript("my", script);rnrn这段代码在IE6正常运行,IE7没反应,腾讯TT的报脚本错误.rn谁能给我改成支持多浏览器的.rn谢谢了.
大家帮我看下这个代码
用红色画个矩形rn代码如下:rnNAME XITI7_1rnC_SEG SEGMENT PARArn ASSUME CS:C_SEGrnSTART: MOV AH,00Hrn MOV AL,10Hrn INT 10Hrn MOV AH,0CHrn MOV DX,50rn MOV CX,100rn MOV AL,04HrnAGAIN1: INT 10Hrn INC DXrn CMP DX,200rn JBE AGAIN1rn DEC DXrnAGAIN2: INT 10Hrn INC CXrn CMP CX,400rn JBE AGAIN2rn DEC CXrnAGAIN3: INT 10Hrn DEC CXrn CMP CX,100rn JAE AGAIN3rn INC CXrnAGAIN4: INT 10Hrn DEC DXrn CMP DX,50rn JAE AGAIN4rn MOV AH,4CHrn INT 21HrnC_SEG ENDSrn END STARTrn运行结果却是花屏,为什么呢。。
大家帮我看下这个IF语句
[code=JScript]rnif (isNaN(form1.hj2.value))rn rn alert('会员价格输入框一定是要数字,谢谢');rn form1.hj1.value="";rn return false;rn rn else rn if (form1.hj2.value<0)rn rn alert ('会员价格不能小于0');rn rn form1.hj2.value='';rn rn return false;rn rn else rn if (form1.hj2.value
大家帮我看下这个错误
org.apache.jasper.JasperException: Exception in JSP: /register.jsp:13rnrn10: registerrn11: rn12: rn13: rn14: 用户名: rn15: 密码1: rn16: 密码2: rnrnrnStacktrace:rn org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rnrn
大家帮我看下这页有没有问题
这是个管理页面,打开这个页面很慢很慢。我是使用VS2005在网上扒的代码。首先声明我的userfiles文件夹里的文件并不多rn[code=C#][/code]using System;rnusing System.Data;rnusing System.Configuration;rnusing System.Collections;rnusing System.Web;rnusing System.Web.Security;rnusing System.Web.UI;rnusing System.Web.UI.WebControls;rnusing System.Web.UI.WebControls.WebParts;rnusing System.Web.UI.HtmlControls;rnusing System.IO;rnpublic partial class adminimg : System.Web.UI.Pagernrn public adminimg()rn rn Page.Init += new EventHandler(Page_Init);rn rnrn private void Page_Init(object sender, EventArgs e)rn rn InitializeComponent();rn rn private void InitializeComponent()rn rn Page.Load += new EventHandler(Page_Load);rn this.delet.Click += new EventHandler(delet_Click);rn this.repImgs.ItemDataBound += new DataListItemEventHandler(repImgs_ItemDataBound);rn rn protected void Page_Load(object sender, EventArgs e)rn rn if (!IsPostBack)rn bindrepImgs("/userfiles", repImgs);rn rn rnrn private void bindrepImgs(string PATH,object sender)rn rn DataList sende = (DataList)sender;rn //创建新DataTablern DataTable dt = new DataTable();rn //添加新的标题rn DataColumn imgName = new DataColumn("imgName", typeof(string));rn DataColumn imgType = new DataColumn("imgType", typeof(string));rn DataColumn imgExplain = new DataColumn("imgExplain", typeof(string));rn DataColumn imgPath = new DataColumn("imgPath", typeof(string));rn DataColumn iFile = new DataColumn("iFile", typeof(string));rn DataColumn imglength = new DataColumn("imglength", typeof(string));rn DataColumn ifilelength = new DataColumn("ifilelength", typeof(string));rn //将标题插入DataTablern dt.Columns.AddRange(new DataColumn[] imgName, imgType, imgExplain, imgPath ,iFile,imglength,ifilelength);rnrn dt = bindImg(dt, PATH);rnrn sende.DataSource = dt;rn sende.DataBind();rnrn rnrn //给datatable赋值rn private DataTable bindImg(DataTable dt, string strFolder)rn rn string strName = string.Empty;rn string strPath = Server.MapPath(strFolder);rn string path = string.Empty;rn //获取文件夹与子文件夹下所有的jpg图片文件rn string[] jpgFiles = Directory.GetFiles(strPath, "*.jpg", SearchOption.AllDirectories);rn Array.Sort(jpgFiles); //排序rn DataRow dr; //创建新的DataRowrnrn foreach (string jpgFile in jpgFiles)rn rn FileInfo info = new FileInfo(jpgFile);rn dr = dt.NewRow();rn strName = Path.GetFileName(jpgFile);rn dr["imgName"] = strName;rn path = strFolder + jpgFile.Replace(strPath, "");rn dr["imgPath"] = path.Replace("\\", "/");rn dr["imgType"] = "jpg";rn dr["imgExplain"] = "jpg格式文件";rn dr["iFile"] = jpgFile.Replace(strPath, "").Replace(strName, "").Replace("\\", "");rn dr["imglength"] = Convert.ToString(info.Length / 1024) + "kb";rn dr["ifilelength"] = Convert.ToString(GetDirectoryLength(jpgFile.Replace(strName, "")) / 1024) + "Kb";rn dt.Rows.Add(dr);rn rn //获取文件夹与子文件夹下所有的gif图片文件rn string[] gifFiles = Directory.GetFiles(strPath, "*.gif", SearchOption.AllDirectories);rn Array.Sort(gifFiles);//排序 rn foreach (string gifFile in gifFiles)rn rn FileInfo info = new FileInfo(gifFile);rn dr = dt.NewRow();rn strName = Path.GetFileName(gifFile);rn dr["imgName"] = strName;rn path = strFolder + gifFile.Replace(strPath, "");rn dr["imgPath"] = path.Replace("\\", "/");rn dr["imgType"] = "gif";rn dr["imgExplain"] = "gif格式文件";rn dr["iFile"] = gifFile.Replace(strPath, "").Replace(strName, "").Replace("\\", "");rn dr["imglength"] = Convert.ToString(info.Length / 1024) + "kb";rn dr["ifilelength"] = Convert.ToString(GetDirectoryLength(gifFile.Replace(strName, "")) / 1024) + "Kb";rn dt.Rows.Add(dr);rn rn //获取文件夹与子文件夹下所有的png图片文件rn string[] pngFiles = Directory.GetFiles(strPath, "*.png", SearchOption.AllDirectories);rn Array.Sort(pngFiles);//排序rn foreach (string pngFile in pngFiles)rn rn FileInfo info = new FileInfo(pngFile);rn dr = dt.NewRow();rn strName = Path.GetFileName(pngFile);rn dr["imgName"] = strName;rn path = strFolder + pngFile.Replace(strPath, "");rn dr["imgPath"] = path.Replace("\\", "/");rn dr["imgType"] = "png";rn dr["imgExplain"] = "png格式文件";rn dr["iFile"] = pngFile.Replace(strPath, "").Replace(strName, "").Replace("\\", "");rn dr["imglength"] = Convert.ToString(info.Length / 1024) + "kb";rn dr["ifilelength"] = Convert.ToString(GetDirectoryLength(pngFile.Replace(strName, "")) / 1024) + "Kb";rn dt.Rows.Add(dr);rn rnrnrn return dt;rn rn private void delet_Click(object sender, EventArgs e)rn rn //string peter = "soft/" + read["attachfile"].ToString().Trim();//软件相对路径rn string Peter = Request.Form["checkbox"];rn if (Peter != null)rn rn string[] peter = Peter.Split(',');rn tryrn rn for (int i = 0; i < peter.Length; i++)rn rn if (File.Exists(Server.MapPath(peter[i])))//如果存在rn File.Delete(Server.MapPath(peter[i]));//删除软件rn //string mysql = "delete from product where product_id='" + mycomm.Parameters["@id"].Value.ToString() + "'";rn //SqlCommand command = new SqlCommand(mysql, mycon);rn //command.ExecuteNonQuery();rn //mycon.Close();rn rn rn catch (Exception ex)rn rn Response.Write("alert('" + ex.Message.ToString() + "');");//扑获异常rn rn rn bindrepImgs("/userfiles", repImgs);rn rn private void repImgs_ItemDataBound(object sender, DataListItemEventArgs e)rn rn foreach (Control i in this.repImgs.Controls)rn rn HtmlGenericControl imgu = (HtmlGenericControl)i.FindControl("imgu");rn HtmlGenericControl div2=(HtmlGenericControl)i.FindControl("Div2");rn HtmlGenericControl div1=(HtmlGenericControl)i.FindControl("Div1");rn HtmlAnchor herf = (HtmlAnchor)i.FindControl("herf");rn herf.Attributes.Add("onmouseover","document.getElementById('" + div1.ClientID + "').style.display='';");rn herf.Attributes.Add("onmouseout", "document.getElementById('" + div1.ClientID + "').style.display='none';");rn imgu.Attributes.Add("onmouseover", "document.getElementById('" + div2.ClientID + "').style.display='';");rn imgu.Attributes.Add("onmouseout", "document.getElementById('" + div2.ClientID + "').style.display='none';");rn bindrepImgs("/userfiles/"+herf.InnerText.Trim()+"/", DataList1);rn rn rn rnrn public void del_Click(object sender, EventArgs e)rn rn LinkButton ibt=(LinkButton)sender;rn string peter = ibt.CommandArgument;rn rn peter = MapPath(peter);rn rn tryrn rn if (File.Exists(peter))rn File.Delete(peter);rn rn catch (Exception ex)rn rn Response.Write("alert('" + ex.Message.ToString() + "');");//扑获异常rn rn bindrepImgs("/userfiles", repImgs);rnrn rn public static long GetDirectoryLength(string dirPath) rn rn //判断给定的路径是否存在,如果不存在则退出 rn if (!Directory.Exists(dirPath)) rn return 0; rn long len = 0; rn DirectoryInfo di = new DirectoryInfo(dirPath); rn foreach (FileInfo fi in di.GetFiles()) rn rn len += fi.Length; rn rn DirectoryInfo[] dis = di.GetDirectories(); rn if (dis.Length > 0) rn rn for (int i = 0; i < dis.Length; i++) rn rn len += GetDirectoryLength(dis[i].FullName); rn rn rn return len; rn rnrnrnrnrnrn//为web项目提供相对文件夹中文件的相对地址:rnrnpublic partial class DirectoryReaderrnrn public static Array readFiles(String dir, String type)rn rn String[] Files = System.IO.Directory.GetFiles(@dir);rn ArrayList files = new ArrayList();rn for (int i = 0; i < Files.Length; i++)rn rn String temp = Files[i];rn String tempType = temp.Substring(temp.LastIndexOf(".") + 1);rn if (tempType.Equals(type) || type.Equals(""))rn rn files.Add(Files[i]);rn rn rn return files.ToArray();rnrn rnrn public static Array readDirs(String dir)rn rn String[] Files;rn Files = System.IO.Directory.GetDirectories(@dir);rn ArrayList files = new ArrayList();rn for (int i = 0; i < Files.Length; i++)rn rn files.Add(Files[i]);rn rn return files.ToArray();rn rn
大家帮我看下这个POST.PHP的问题
刚学PHP。想写个验证的登陆的,结果一直出错,我不太懂PHP,大家帮我看下下面的代码哪里出了问题rnrn";rnecho"继续提交";rnmysql_close($con)rnelsernrnecho ' 'rnrnrn?>
麻烦大家帮我看下这个问题,谢谢
本人用做.NET开发,访ORACLE 数据库,用到了MSDTS 和Oracle Services for Microsoft Transaction Server,出现如下错误:rnrnORA-00161: 事务处理的分支长度 XX 非法 (允许的最大长度为 64)rn环境:rn数据库 :ORACLE 11 X64rn服务器: Windows 7 X64 ,IIS 7,,Oracle Client 11 X64rn客户端:Wndows7 X64rnrn被这个问题折腾得寝食难安,望高人指教,谢谢了!rn
大家帮我看下这个虚拟机连网的问题
当使用虚拟机连网时,出现 [color=#0000FF][/color]XML-Verarbeitungsfehler:unbekannte entity rnadresse:chrome://navigator/content/navigator.xulrnzeile nr.46,spalte 1:rn
大家帮我看下这个问题!! 在线等
string db ="data.mdb"; //数据库路径rn string connstr,insert;rn insert = "Insert Into user(id,password,answer,question,mail) Values(@id,@password,@answer,@question,@mail)";rn connstr = "Provider= Microsoft.Jet.OLEDB.4.0;Data Source=" +Server.MapPath(db);rn OleDbConnection conn;rn OleDbCommand cmd;rn conn = new OleDbConnection(connstr);rn conn.Open();rn cmd = new OleDbCommand(insert,conn);rn tryrn rn cmd.Parameters.Add(new OleDbParameter ("@id",OleDbType.Char));rn cmd.Parameters.Add(new OleDbParameter ("@password",OleDbType.Char));rn cmd.Parameters.Add(new OleDbParameter ("@answer",OleDbType.Char));rn cmd.Parameters.Add(new OleDbParameter ("@question",OleDbType.Char));rn cmd.Parameters.Add(new OleDbParameter ("@mail",OleDbType.Char));rn cmd.Parameters["@id"].Value = id.Text;rn cmd.Parameters["@password"].Value = psw2.Text;rn cmd.Parameters["@answer"].Value = answer.Text;rn cmd.Parameters["@question"].Value = question.Text;rn cmd.Parameters["@mail"].Value = mail.Text;rn cmd.ExecuteNonQuery();rn conn.Close(); rn lab.Text="恭喜您!注册成功!";rn rn catchrn rn lab.Text="此ID已存在!";rn rnrnrnrn怎么老提示 INSERT INTO 语句的语法错误。 rn可是好象都找不到那里错了哦`!!
大家帮我看看下面的问题啊
void Test_Adc(void)rnrn  /*int a0=0,a1=0,a2=0,a3=0,a4=0,a5=0,a6=0,a7=0; */ rn int a0=0,a1=0,a2=0,a3=0,a4=0,a5=0,a6=0,a7=0;rnrn  while(1)rn  rn    a0=ReadAdc(0); /* 进行0通道ADC */rn    a1=ReadAdc(1);rn    a2=ReadAdc(2);rn    a3=ReadAdc(3);rn    a4=ReadAdc(4);rn    a5=ReadAdc(5);rn    a6=ReadAdc(6);rn    a7=ReadAdc(7);rn    Uart_Printf("0:%04d 1:%04d 2:%04d 3:%04d 4:%04d 5:%04d 6:%04d 7:%04d\n",a0,a1,a2,a3,a4,a5,a6,a7);rn    Delay(50000); //5srn  rnrnrn在ARM developer suite里面编译的时候,程序在第2行出现如下错误:rnillegal character (hex code 0Xal) in source。rn不知道是怎么回事啊?
语句问题,大家帮我看下。谢谢!
if (txtMemberName.Text == String.Empty || txtMemberName.Text.Trim() == "") rn rnResponse.Write(" "); rnreturn; rn rnrnrn运行时说是第3行有错,不知道错在哪里~
大家帮我看下这个存储过程
REATE PROCEDURE YX_GetTLiuYanFaTiebyPage rn@columnId bigint, rn@pageSize int,rn@pageIndex int,rn@strWhere nvarchar(1000)rnAsrnif(@columnId = 0)rnbeginrnselect contentId,Title, case IsAnswered when 0 then '待解决' else '已解决' end as IsAnswered,rnb.realName as author,rnc.realName as lasteditor,rnLastTime rninto #TmpFaTieArnfrom TLiuYanFaTie a,TUser b,TUser crnwhere a.author =b.userIdrnand a.lastEditor = c.userId rnand @strWhere [color=#FF0000]-----问题老是出现在这,删了这句就没事,这能这么写吗?[/color]rnorder by LastTime descrnrnexec YX_GetRecordByPage '#TmpFaTieA','lastTime',@pageSize,@pageIndex,0,1,'1=1'
大家帮我看下这是什么?
["FieldName":"项目简称","Caption":"项目简称","width":"3","TableName":"","KeyName":"","KeyValue":"","KeyType":"combox","orderBy":""rn这到底是什么意思? 文件名 OA人工成本数据管理,mod
大家帮我看下这个代码!
代码如下:rn01 function isint($str) rn02 $str = (string)$str; rn03rn04 $pos = 0; rn05 $len = strlen($str); rn06 for($i=0;$i<$len;$i++) rn07 if($str[$i]=='0') $pos++; rn08 else break; rn09 rn10 $str = substr($str,$pos); rn11rn12 $int = (int)$str; rn13 if($str==(string)$int) return true; rn14 else return false; rn15 rn rn问题:rn请问这是一个判断是否为整数的程序吗?rn第7行为什么要判断是否为0,第10行为什么又要使用substr函数?rn有什么用意?
有个问题,希望大家帮我看下
首先打开 www.lyg.js.cn rn拉到最下面 有一排图片广告 右键点 两个相临广告之间的空白 ,查看属性 rn地址是这个 http://www.lyg.js.cn/images_1/adControls/150_60_02_001.html rn访问这个地址 然后右键查看源文件rn可以看到类似这样的语句 rnrn rn rn rn rn rn
asp.net中javascript的问题,大家帮我看下
[code=HTML]]rn<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="06.aspx.cs" Inherits="_6" %> rnrn rnrn rn rn Hidden/Dispaly rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrnrn为什么点击几次Dispaly和Cannel会出现窗体假死? 而且鼠标选择不了窗体里其他控件?rn[/code]
相关热词 c# stream 复制 android c# c#监测窗口句柄 c# md5 引用 c# 判断tabtip 自己写个浏览器程序c# c# 字符串变成整数数组 c#语言编程写出一个方法 c# 转盘抽奖 c#选中treeview