php 微信公众平台回复不了,大神帮我看下代码有没有问题 [问题点数:20分]

Bbs1
本版专家分:0
结帖率 0%
Bbs1
本版专家分:0
Bbs2
本版专家分:428
Bbs1
本版专家分:0
PHP开发微信公众号,关键字回复,新闻的api接口怎么弄
-
有没有做过微信公众平台大神
微信的预定是怎么做的,给点思路即可,谢谢啦
帮我看下这段代码有没有问题
create or replace function F_ARPU_3MONTH( v_serv_id in number)rnreturn numberrnisrn AVG_ARPU number := 0;rn AVG_ARPU_TMP number := 0;rn FISRT_MONTH varchar2(30) :='tjbb10.real_srkh_kh_'||to_char(sysdate,'yyyymm');rn SECOND_MONTH varchar2(30) :='tjbb10.real_srkh_kh_'||to_char(sysdate-1,'yyyymm');rn THIRD_MONTH varchar2(30) :='tjbb10.real_srkh_kh_'||to_char(sysdate-2,'yyyymm');rnbeginrn beginrn execute immediate 'select sum(ysje) into AVG_ARPU from '||FISRT_MONTH||' where SERV_ID = '||v_serv_id;rn exceptionrn when no_data_found thenrn AVG_ARPU := 0;rn end;rn beginrn execute immediate 'select sum(ysje) into AVG_ARPU from '||SECOND_MONTH||' where SERV_ID = '||v_serv_id;rn exceptionrn when no_data_found thenrn AVG_ARPU_TMP := 0;rn end;rn AVG_ARPU := AVG_ARPU + AVG_ARPU_TMP;rn AVG_ARPU_TMP := 0;rn beginrn execute immediate 'select sum(ysje) into AVG_ARPU from '||THIRD_MONTH||' where SERV_ID = '||v_serv_id;rn exceptionrn when no_data_found thenrn AVG_ARPU_TMP := 0;rn end;rn AVG_ARPU := (AVG_ARPU + AVG_ARPU_TMP) / 3;rn return AVG_ARPU;rnrnend F_ARPU_3MONTH;rnrnrn请大家<em>帮我</em>看看这段<em>代码</em><em>有没有</em><em>问题</em>,我在过程里面调用时老是11行出异常
帮我看下代码问题
用C++写了个时钟程序但无法运行 求组rn#include rn#include rn#include rn#include rnrn#define ID_TIMER 1rn#define TWOPI (2 * 3.14159)rnrnLRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;rnrnint WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,rn PSTR szCmdLine, int iCmdShow)rn rn static char szAppName[] = "AnaClock" ;rn HWND hwnd;rn MSG msg;rn WNDCLASSEX wndclass ;rnrn wndclass.cbSize = sizeof (wndclass) ;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 = NULL ;rn wndclass.hCursor = LoadCursor (NULL, IDC_ARROW) ;rn wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;rn wndclass.lpszMenuName = NULL ;rn wndclass.lpszClassName = szAppName ;rn wndclass.hIconSm = NULL ;rnrn RegisterClassEx (&wndclass) ;rnrn hwnd = CreateWindow (szAppName, "Analog Clock",rn WS_OVERLAPPEDWINDOW,rn CW_USEDEFAULT, CW_USEDEFAULT,rn CW_USEDEFAULT, CW_USEDEFAULT,rn NULL, NULL, hInstance, NULL) ;rnrn if (!SetTimer (hwnd, ID_TIMER, 1000, NULL))rn rn MessageBox (hwnd, "Too many clocks or timers!", szAppName,rn MB_ICONEXCLAMATION | MB_OK) ;rn return FALSE ;rn rnrn ShowWindow (hwnd, iCmdShow) ;rn UpdateWindow (hwnd) ;rnrn while (GetMessage (&msg, NULL, 0, 0))rn rn TranslateMessage (&msg) ;rn DispatchMessage (&msg) ;rn rn return msg.wParam ;rn rnrnvoid SetIsotropic (HDC hdc, int cxClient, int cyClient)rn rn SetMapMode (hdc, MM_ISOTROPIC) ;rn SetWindowExtEx (hdc, 1000, 1000, NULL) ;rn SetViewportExtEx (hdc, cxClient / 2, -cyClient / 2, NULL) ;rn SetViewportOrgEx (hdc, cxClient / 2, cyClient / 2, NULL) ;rn rnrnvoid RotatePoint (POINT pt[], int iNum, int iAngle)rn rn int i ;rn POINT ptTemp ;rnrn for (i = 0 ; i < iNum ; i++)rn rn ptTemp.x = (int) (pt[i].x * cos (TWOPI * iAngle / 360) +rn pt[i].y * sin (TWOPI * iAngle / 360)) ;rnrn ptTemp.y = (int) (pt[i].y * cos (TWOPI * iAngle / 360) -rn pt[i].x * sin (TWOPI * iAngle / 360)) ;rnrn pt[i] = ptTemp ;rn rn rnrnvoid DrawClock (HDC hdc)rn rn int iAngle ;rn POINT pt[3] ;rnrn for (iAngle = 0 ; iAngle < 360 ; iAngle += 6)rn rn pt[0].x = 0 ;rn pt[0].y = 900 ;rnrn RotatePoint (pt, 1, iAngle) ;rnrn pt[2].x = pt[2].y = iAngle % 5 ? 33 : 100 ;rnrn pt[0].x -= pt[2].x / 2 ;rn pt[0].y -= pt[2].y / 2 ;rnrn pt[1].x = pt[0].x + pt[2].x ;rn pt[1].y = pt[0].y + pt[2].y ;rnrn SelectObject (hdc, GetStockObject (BLACK_BRUSH)) ;rnrn Ellipse (hdc, pt[0].x, pt[0].y, pt[1].x, pt[1].y) ;rn rn rnrnvoid DrawHands (HDC hdc, struct tm *datetime, BOOL bChange)rn rn static POINT pt[3][5] = 0, -150, 100, 0, 0, 600, -100, 0, 0, -150,rn 0, -200, 50, 0, 0, 800, -50, 0, 0, -200,rn 0, 0, 0, 0, 0, 0, 0, 0, 0, 800 ;rn int i, iAngle[3] ;rn POINT ptTemp[3][5] ;rnrn iAngle[0] = (datetime->tm_hour * 30) % 360 + datetime->tm_min / 2 ;rn iAngle[1] = datetime->tm_min * 6 ;rn iAngle[2] = datetime->tm_sec * 6 ;rnrn memcpy (ptTemp, pt, sizeof (pt)) ;rnrn for (i = bChange ? 0 : 2 ; i < 3 ; i++)rn rn RotatePoint (ptTemp[i], 5, iAngle[i]) ;rnrn Polyline (hdc, ptTemp[i], 5) ;rn rn rnrnLRESULT CALLBACK WndProc (HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)rn rn static int cxClient, cyClient ;rn static struct tm dtPrevious ;rn BOOL bChange ;rn HDC hdc ;rn PAINTSTRUCT ps ;rn time_t lTime ;rn struct tm *datetime ;rnrn switch (iMsg)rn rn case WM_CREATE :rn time (&lTime) ;rn datetime = localtime (&lTime) ;rnrn dtPrevious = * datetime ;rn return 0 ;rnrn case WM_SIZE :rn cxClient = LOWORD (lParam) ;rn cyClient = HIWORD (lParam) ;rn return 0 ;rnrn case WM_TIMER :rn time (&lTime) ;rn datetime = localtime (&lTime) ;rnrn bChange = datetime->tm_hour != dtPrevious.tm_hour ||rn datetime->tm_min != dtPrevious.tm_min ;rnrn hdc = GetDC (hwnd) ;rnrn SetIsotropic (hdc, cxClient, cyClient) ;rnrn SelectObject (hdc, GetStockObject (WHITE_PEN)) ;rn DrawHands (hdc, &dtPrevious, bChange) ;rnrn SelectObject (hdc, GetStockObject (BLACK_PEN)) ;rn DrawHands (hdc, datetime, TRUE) ;rnrn ReleaseDC (hwnd, hdc) ;rnrn dtPrevious = *datetime ;rn return 0 ;rnrn case WM_PAINT :rn hdc = BeginPaint (hwnd, &ps) ;rnrn SetIsotropic (hdc, cxClient, cyClient) ;rn DrawClock (hdc) ;rn DrawHands (hdc, &dtPrevious, TRUE) ;rnrn EndPaint (hwnd, &ps) ;rn return 0 ;rnrn case WM_DESTROY :rn KillTimer (hwnd, ID_TIMER) ;rn PostQuitMessage (0) ;rn return 0 ;rn rn return DefWindowProc (hwnd, iMsg, wParam, lParam) ;rn rnrn
大神帮我看下代码 关于定时器的
[code=html]rnrnrn rn 窗口右下角消息弹出框rn rn rn rn rn rn rn Xrn rn rnrn[/code]rnrn[code=javascript]rnvar DISTANCE=0,//总距离rn DURATION=1000,//总时间rn STEPS=100,//总步数rn timer=null,//定时器序号rn moved=0,//保存本次动画移动的步数rn interval=0,//保存每步的步频rn step=0,//保存每步的步长rn WAIT=5000;//保存下落后,等待上升的时间rn DISTANCE=parseFloat(getComputedStyle(msg).height);rn step=DISTANCE/STEPS;rn interval=DURATION/STEPS;rnfunction move(n)//n=1往上移,n=-1向下移rn if(moved
大神帮我看下这个代码...
[code=javascript]rn rn rn rn rn rn rnrn rn rn rn rn rn rnrnrnrnrnrnrnrn[/code]rn我不懂jqueryrn请问$(link-login-only)怎么来的,哪里来的?还有$(link-orig),$(chap-id),$(chap-challenge),$(endif)rnrnrn谢谢分析!!!
微信公众号开发—关注/取消事件(基于thinkphp3.2.3)
接收事件推送—关注/取消事件 一、准备 1、服务器 2、微信公众号 3、会PHP、think<em>php</em>、服务器基本操作 二、开启公众号开发者模式 **说明: 修改配置保存时需要验证服务器端填写的token,所以要先写好服务器端的逻辑才能验证成功** 三、控制器IndexController.class.<em>php</em><em>代码</em>如下 **说明:我在直接访问的是服务器端 ...
微信公众号判断用户是否关注自己php代码
微信公众号判断用户是否关注自己<em>php</em><em>代码</em>微信公众号判断用户是否关注自己<em>php</em><em>代码</em>
大神帮我看下这段大数阶乘的代码
#include "stdafx.h"rn#define N 1000 //要计算的Nrnlong s[N]=1,1,n=N,t=2,a=1,b=0;rnrnint _tmain(int argc, _TCHAR* argv[])rnrn for(;a0;)rn printf("%04d",s[*s]);rn return 0;rnrn return 0;rnrnrn原来这串<em>代码</em>只有4行,太难看懂,我就把它拆成一句一句的了,但是看着还是毫无头绪,算1000的阶乘几乎就是秒算,还请哪位算法<em>大神</em>指导
php 微信公众平台接入 代码
<em>php</em> <em>微信公众平台</em>接入 <em>代码</em>
帮我看下这个PHP的问题
我是在那个PHP100上面刚刚学的 rn我按他的那个例子来写验证用户名<em>有没有</em>被注册的页面rn rn 用户名rn rnrn这样没有<em>问题</em>rn如果我把那个 嵌套到第一个DIV上面就不行rn rn 用户名rn rn rnrn提示JS脚本有<em>问题</em>rnfunction by<em>php</em>() rnrn if(xmlHttp.readyState == 1) rn document.getElementById('<em>php</em>100').innerHTML = "正在查询";rn rnrn if(xmlHttp.readyState == 4 )rn if(xmlHttp.status == 200) rn var by<em>php</em>100 = xmlHttp.responseText;rn document.getElementById('<em>php</em>100').innerHTML = by<em>php</em>100;rn rn rn怎样才能嵌套进去呢 我想直接在输入用户的那个文本框后面就提示信息,rn
php总是报错,大家帮我看下代码
rnrn rn rn idrn rn rn rn namern rn rn rn passrn rn rn rn rn rnrnrn rn rn rn idrn namern passrn rn rn $idrn $namern $passrn rn ";rn rn rn ?>rnrn rn[code=PHP][/code]rn=============================rn报错:rnNotice: Use of undefined constant id - assumed 'id' in D:\xampp\htdocs\vest\index.<em>php</em> on line 68rnrnNotice: Use of undefined constant name - assumed 'name' in D:\xampp\htdocs\vest\index.<em>php</em> on line 69rnrnNotice: Use of undefined constant pass - assumed 'pass' in D:\xampp\htdocs\vest\index.<em>php</em> on line 70rnrn68、69、70这三行是rn $id=trim($row1[id]);rn $name=trim($row1[name]);rn $pass=trim($row1[pass]);
首发 php版-微信公众平台接口回复代码(返回天气的实例)
<em>微信公众平台</em>开通自定义<em>回复</em>,站长可以自定义<em>回复</em>内容。功能非常强大。 这段<em>代码</em>是写了一个<em>回复</em>城市名称,自动<em>回复</em>天气预报的接口。 <em>代码</em>的部分配置文件 //这里是你申请是写的 token define("TOKEN", "weixin"); $wechatObj = new wechatCallbackapiTest(); //首次使用,请注释掉下面的一行<em>代码</em>。 //然后添加 $wechatObj->valid(); 供首次验证需要 //验证成功后,即可以使用下面的<em>代码</em> $wechatObj->responseMsg(); 天气文件数组,需要自己添加。可以参考一下网址 http://blog.csdn.net/hello_haozi/article/details/7564223 压缩包内含有一张手机<em>回复</em>的图片,可以参考下发送效果!
文件上传不了问题,大家帮我看下
string upfilePath;rnString FileNameSet = System.DateTime.Now.ToString();rnFileNameSet = FileNameSet.Replace(':','\0');rnFileNameSet = FileNameSet.Replace(' ','\0');rnFileNameSet = FileNameSet.Replace('-','\0');rnFileNameSet = FileNameSet + "." + ImgExt;rn//生成保存的文件名 rn//ImgExt是己经取得的文件扩展名rnupfilePath = Server.MapPath("upfile");rnFileNameSet = upfilePath + "\\" + FileNameSet;rnupfile.PostedFile.SaveAs(FileNameSet);rnrn这样上传<em>不了</em>,把FileNameSet = upfilePath + "\\p.gif";rn可以成功,是不是我的格式有<em>问题</em>,还是我生成的文件名的字符有<em>问题</em>
求个大神帮我看下问题何在
public class hongbaihei rnrn public static void main(String[] args) rn int write = 5;rn int red =3;rn int black =6;rn for (int i=1;i,i,j,black);rn rn rn rn System.out.println();rn rn rnrnrnrnrnrn无法运行,自己找不到原因了rn
大神帮我看下这个是什么问题
--查找出部门10和部门20中,工资最高第3名到第5名的员工的员工名字,部门名字,部门位置nselect * fromn(select ename,sal,dept.* from empnjoin dept on dept.deptno=emp.deptno nwhere emp.deptno != 30 order by sal desc )nwhere rownum between 3 and 5;nn本来应该是有的,结果显示未选定行n
大神帮我看下spring的问题
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenernorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'service' defined in class path resource [beans.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'service' of bean class [com.bjlz.action.LCsiveAction]: Bean property 'service' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?nat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1361)n省略号,nCaused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'service' of bean class [com.bjlz.action.LCsiveAction]: Bean property 'service' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?n配置文件,n![![![图片说明](https://img-ask.csdn.net/upload/201505/25/1432523221_850763.png)图片说明](https://img-ask.csdn.net/upload/201505/25/1432523215_711138.png)图片说明](https://img-ask.csdn.net/upload/201505/25/1432523207_894772.png)
大神帮我看下这个问题
[img=https://img-bbs.csdn.net/upload/201412/01/1417413465_461187.png][/img]rnxml文件报出这个警告,运行闪退,logcat提示这个错误rn[img=https://img-bbs.csdn.net/upload/201412/01/1417413545_217190.png][/img]rn百度下,说是更改api,不过我只有一个19的,该怎么办
大神帮我看下这个奇怪的问题。。。。
我在webview中,实现 javascript 调用java类方法,<em>代码</em>如下rnrnwebView_msg.setVerticalScrollbarOverlay(true);rnWebSettings settings = webView_msg.getSettings();rnsettings.setSupportZoom(true);rnsettings.setJavaScriptEnabled(true);rnsettings.setJavaScriptCanOpenWindowsAutomatically(true);rnwebView_msg.addJavascriptInterface(new JSInvokeClass(_context), "js2java");rn rnwebView_msg.setWebChromeClient(new WebChromeClient());rn rnwebView_msg.loadDataWithBaseURL(null, model.txt, "text/html", "utf-8", null);rnrn我用手机连接电脑直接运行,可以实现,但是我将程序打包后,再安装,就不能实现了,请各位<em>大神</em><em>帮我</em>看一下,谢谢。。。
来个大神帮我看下这个小小的问题
这是一个实现串的基本操作的程序,这里只写了创建输入与输出,我在穿件初始化的过程中遇到了下面的错误,其他还<em>有没有</em>错误尚未发现,有时间的<em>大神</em>最后可以<em>帮我</em>拷过去跑一遍。感激不尽rnrn#includern#includern#includern#includern#define Maxsize 100rnusing namespace std;rntypedef struct rnrn char ch[Maxsize];rn int len;rnHString;rn void StrAssign (HString *s,int l)rnrn int i;rn if(lMaxsize)rn rn printf("l的值不合法!");rn rn for(i=0;i>s->ch[i];rn rn s->len=l;rnrn void Display( HString *s)rn rn if(0==s->len)rn rn printf("the string is empty!");rn rn elsern rn coutch='\0'rn s2=(HString *)malloc(sizeof(HString));rn s2->len=0;rn s2->ch='\0';rnrn printf("请分别输入串s1,s2的长度:");rn scanf("%d%d",&l1,&l2);rn StrAssign(s1,l1);rn StrAssign(s2,l1);rn Display(s1);rn Display(s2);rnrnrnrnrnrnrnrnrnrnrnsdd.cpprnE:\PROJECT\StrOp\sdd.cpp(43) : error C2059: syntax error : ''rnE:\PROJECT\StrOp\sdd.cpp(43) : error C2143: syntax error : missing ';' before ''rnE:\PROJECT\StrOp\sdd.cpp(43) : error C2143: syntax error : missing ';' before ''rnE:\PROJECT\StrOp\sdd.cpp(46) : error C2059: syntax error : ''rnE:\PROJECT\StrOp\sdd.cpp(46) : error C2143: syntax error : missing ';' before ''rnE:\PROJECT\StrOp\sdd.cpp(46) : error C2143: syntax error : missing ';' before ''rn执行 cl.exe 时出错.
大神帮我看下这个上传图片的问题
网上找了上传图片的<em>代码</em>,测试了下是可以用的,但是拆分后就不能用了rn本来两个<em>php</em>和form是在一个文件内的,我拆成两个了rn第一个文件logo.<em>php</em> 这个里面放<em>php</em><em>代码</em>rn[code=<em>php</em>]rnalert('上传成功');"; rn rn //显示图片 rn echo ""; rn rn rn?>rn[/code]rn第二个文件up.<em>php</em> 这里放上传按钮的<em>代码</em>rn[code=<em>php</em>]rn rnupload img: rn rn rn[/code]rnrn如上,拆分成两个后 不能用了,放在一个文件就能用,求<em>大神</em>指点,谢谢
JS 问题大神速度来 帮我看下!!!!!!
[img=https://img-bbs.csdn.net/upload/201702/06/1486347713_769162.png][/img] [img=https://img-bbs.csdn.net/upload/201702/06/1486347731_723420.png][/img] rnrn[size=24px] [/size] 我这样写就写死了 不管点那个收藏 都 $("#999").append(' 本题已收藏成功。'); 追加到第一个 。怎样写才能写活 !
请各位大神帮我看下代码问题
#include"stdio.h"rn#include"malloc.h"rn#include"stdlib.h"rnrntypedef structrnrn int x, y; //坐标rn int dir; //方向rnElemType;rnrntypedef struct StackNode//构造栈rnrn ElemType *base;rn ElemType *top;rn int stacksize;rnSqStack;rnrnrntypedef struct rnrn int maze[100][100];rnMG;rnrnrnint InitStack(SqStack *head)//初始化栈rnrn head->base=(ElemType *)malloc(100*sizeof(ElemType));rn if(!head->base)rn rn printf("memory allocation failed,goodbye");rn exit(1);rn rn head->top=head->base;rn head->stacksize=100;rn return 1;rnrnrnint Push(SqStack *head,ElemType e)//进栈操作rnrn if(head->top-head->base>=head->stacksize)rn rn head->base = (ElemType *)realloc(head->base,(head->stacksize+10)*sizeof(ElemType));rn if (!head->base)rn rn printf("memory allocation failed,goodbye");rn exit(1);rn rn head->top =head->base+head->stacksize;rn head->stacksize +=10;rn rn *head->top++=e;rn return 1;rnrnrnint Pop(SqStack *head,ElemType *e)//出栈操作rnrn if(head->top==head->base)rn rn return 0;rn rn *e=*--head->top;rn //printf("%d\n",e);rn rn int GetPOp(SqStack *head,ElemType *e);rn rn if(head->top==head->base)rn return 0;rn e=(head->top-1);rn return 1;rn rn rnrnrn/*int StackEmpty(SqStack *head)//判断栈是否为空rnrn if(head->top==head->base)rn return 1;rn elsern return 0;rn*/rnrnMG printmazeA(MG ma)rnrn int maze[10][10]=rn 0,0,0,0,0,0,0,0,0,0,rn 0,2,1,0,1,1,1,0,1,0,rn 0,1,1,0,1,1,1,0,1,0,rn 0,1,1,1,1,0,0,1,1,0,rn 0,1,0,0,0,1,1,1,1,0,rn 0,1,1,1,0,1,1,1,1,0,rn 0,1,0,1,1,1,0,1,1,0,rn 0,1,0,0,0,1,0,0,1,0,rn 0,0,1,1,1,1,1,1,2,0,rn 0,0,0,0,0,0,0,0,0,0rn ;rn rn for(int i=0;i : local function definitions are illegalrnD:\专利\mig.cpp(277) : fatal error C1004: unexpected end of file foundrn执行 cl.exe 时出错.rnrnmig.obj - 1 error(s), 0 warning(s)rn
大神帮我看下这段代码为什么有问题
<em>问题</em>是这样的rn括号配对<em>问题</em>rn时间限制:3000 ms | 内存限制:65535 KBrn难度:3rn描述rn现在,有一行括号序列,请你检查这行括号是否配对。rn输入rn第一行输入一个数N(0rn#includernusing namespace std;rnint c;rnint maxSize;rnchar peidui[20000];rnint top = -1;rnvoid push(char j) rn rn peidui[++top] = j;rn rnchar pop() rn rn return peidui[top--];rn rnbool isEmpty() rn rn return(top == -1);rn rnvoid input(string input) rn rn c = input.length();rn// creation(c);rn for (int j = 0;j < c;j++) rn rn char ch = input[j];rn switch (ch) rn rn case '[':rn case '(':rn push(ch);rn break;rn case ']':rn case ')':rn if (!isEmpty())rn rn char chx = pop();rn if ((ch == ']' && chx != '[') ||rn (ch == ')' &&chx != '(')rn )rn rn cout << "No" << endl;rn goto end;rn rn rn elsern rn cout << "No" << endl;rn break;rn goto end;rn rn break;rn default:rn break;rn rn rn if (isEmpty())rn cout << "Yes" << endl;rn elsern cout << "No" << endl;rn end:return ;rn rnint main() rn rn int n;rn cin >> n;rn for (int i = 0;i < n;i++) rn rn string str;rn cin >> str;rn input(str);rn top = -1;rn char peidui[] = 0;rn rn return 0;rn rnrnrn老是说我错误...求<em>大神</em>指点
微信公众平台关注回复
<em>微信公众平台</em>开发模式关注自动<em>回复</em>实例PHP
微信公众平台被动回复用户消息
当用户发送消息给公众号时(或某些特定的用户操作引发的事件推送时),会产生一个POST请求,开发者可以在响应包(Get)中返回特定XML结构,来对该消息进行响应(现支持<em>回复</em>文本、图片、图文、语音、视频、音乐)。严格来说,发送被动响应消息其实并不是一种接口,而是对微信服务器发过来消息的一次<em>回复</em>。首先我们应该先了解<em>回复</em>消息的各类xml结构<em>回复</em>文本消息&amp;lt;xml&amp;gt; &amp;lt;ToUserName&amp;...
帮我看下这段代码
int i;rn str3 = "";rn for (i = 0; i + str3;rn rn循环过后最后的那个逗号怎么去掉?
帮我看下代码的优越性
有颜色的部分如何执行才好,不用第二次取得连接rnpublic class LoginClass rn java.util.Date time = new java.util.Date(); //获得当前系统时间rn String sqltime = new Timestamp(time.getTime()).toString().substring(0, 19);rn public boolean valid(String username,String password)rn boolean isValid=false;rn DBAsuccess db=new DBAsuccess();rn if(db.getConnection())rn String sql="select username,password from user where username='"+username+"' and password='"+password+"'";rn db.query(sql);rn if(db.next())rn [color=#FF0000]sql="update zhuce set zs_time='"+sqltime+"' where zs_id='" + username + "'";rn db.update(sql);//这语句之前需要调用db.closeStm();吗rn isValid=true;[/color]rn rn username=null;rn password=null;rn db.closeRs();rn db.closeStm();rn db.closeConn();rn rn return isValid;rn rnrnrnrnrnrnpackage com;rnrnimport java.sql.*;rnrnpublic class DBAsuccess rn private final String driver = "net.sourceforge.jtds.jdbc.Driver";rn private final String url = "jdbc:jtds:sqlserver://localhost:1433/sql";rn private final String usename = "ers";rn private final String password = "123";rn private Connection conn = null;rn private Statement stm = null;rn private ResultSet res = null;rn public boolean getConnection() rn try rn Class.forName(driver).newInstance();rn catch (Exception e) rn System.out.println(e.getMessage());rn rn boolean resave = false;rn try rn conn = DriverManager.getConnection(this.url, this.usename,rn this.password);rn resave = true;rn catch (Exception e) rn System.out.println(e.getMessage());rn rn return resave;rn rnrn public boolean update(String sql) rn boolean resave = false;rn try rn stm = conn.createStatement();rn stm.execute(sql);rn resave = true;rn sql = null;rn catch (Exception e) rn rn return resave;rn rnrn public void query(String sql) rn try rn stm = conn.createStatement();rn res = stm.executeQuery(sql);rn sql = null;rn catch (Exception e) rn System.out.println(e.getMessage());rn rn rnrn public boolean next() rn boolean resave = false;rn try rn if (res.next()) rn resave = true;rn rn catch (Exception e) rn System.out.println(e.getMessage());rn rn return resave;rn rnrn public String getValue(String field) rn String value = null;rn try rn if (res != null) rn value = res.getString(field);rn rn catch (Exception e) rnrn rn field = null;rn return value;rn rnrn public void closeRs() rn try rn if (res != null) rn res.close();rn rn catch (Exception e) rn rn rnrn public void closeStm() rn try rn if (stm != null) rn stm.close();rn rn catch (Exception e) rn rn rnrn public void closeConn() rn try rn if (conn != null) rn conn.close();rn rn catch (Exception e) rn rn rn
帮我看下代码
[code=csharp]rn FileStream stream = new FileStream(filePath, FileMode.Open, FileAccess.Read);rn string fileName = filePath.Substring(filePath.LastIndexOf(@"\") + 1);rn //testrn Response.Write(fileName);rn rn rn // 输出头中不能间隔其他东西Response.Write("");rn MemoryStream ms = new MemoryStream();rn while (true)rn rnrn bytes = stream.Read(buffer, 0, buffer.Length);rn if (bytes == 1)rn rn //Response.BinaryWrite(buffer);rn ms.Write(buffer, 0, buffer.Length);rn rn else if (bytes == 0 || bytes == -1)rn rn break;rn rn bytes += bytes;rn rn stream.Close();rn byte[] bufferFull = new byte[ms.Length];rn Response.Write(ms.Length+"haha");rn Response.Clear();rn Response.ContentType = "application/octet-stream";rn Response.AddHeader("Content-Disposition", "inline;filename=" + HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));rn ms.Read(bufferFull, 0, bufferFull.Length);rn Response.BinaryWrite(bufferFull);rn Response.End();rn ms.Close();rn[/code]rn比如我传的是本地txt文件路径,如果我把文件下载夏利,会发现显示内容为空白,但是大小是正确的。跪求原因,解决方法rn
帮我看下这段代码~~
[code=VB.NET][/code] Private Sub FrmReg_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Loadrn cboSex.SelectedIndex = 0rn classconn.constate()rn Button1.Enabled = Falsern End Subrn Public classconn As New Class1rn Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Clickrn If TextBox1.Text = "" Thenrn MsgBox("请输入注册帐号", MsgBoxStyle.OkOnly, "错误")rn Elsern If txtpwd1.Text = "" Thenrn MsgBox("请输入密码", MsgBoxStyle.OkOnly, "错误")rn Elsern If txtpwd2.Text = "" Thenrn MsgBox("重复密码不能为空", MsgBoxStyle.OkOnly, "错误")rn Elsern If txtpwd1.Text <> txtpwd2.Text Thenrn MsgBox("两次密码输入不相同,请重新输入", MsgBoxStyle.OkOnly, "错误")rn txtpwd1.Focus()rn Elsern Dim newcommand1 As New SqlCommand With .CommandText = "select * from QQ账户信息 where QQ号码=" & TextBox1.Text, .Connection = classconn.QqLinkrn If newcommand1.ExecuteScalar <> 0 Thenrn MsgBox("帐号已存在,请更换", MsgBoxStyle.OkOnly, "错误")rn TextBox1.Focus()rn Elsern Dim Country As String = TextBox3.Textrn If TextBox3.Text = "" Thenrn Country = "null"rn End Ifrn Dim Section As String = TextBox4.Textrn If TextBox4.Text = "" Thenrn Section = "null"rn End Ifrn Dim Old As String = TextBox5.Textrn If TextBox5.Text = "" Thenrn Old = "null"rn End Ifrn Dim SexString As Stringrn If cboSex.SelectedText = "男" Thenrn SexString = "insert into QQ账户信息(QQ号码,QQ密码,性别,国家,地区,年龄) values ('" & TextBox1.Text & "','" & txtpwd1.Text & "','男','" & Country & "','" & Section & "','" & Old & "')"rn Elsern SexString = "insert into QQ账户信息(QQ号码,QQ密码,性别,国家,地区,年龄) values ('" & TextBox1.Text & "','" & txtpwd1.Text & "','女','" & Country & "','" & Section & "','" & Old & "')"rn End Ifrn Dim newcommand2 As New SqlCommand With .CommandText = SexString, .Connection = classconn.QqLinkrn newcommand2.ExecuteScalar()rn MsgBox("注册成功")rn Me.Close()rn End Ifrn End Ifrn End Ifrn End Ifrn End Ifrn End Sub'<em>问题</em>是这样insert的话,数据库里的性别怎么都是女的啊?<em>问题</em>到底在哪里?
帮我看下代码的错误~~~~~~~~~~~
rn-------------------------------------------------------------------------rnmda = New OleDbDataAdapter("Select info From help Where parentid=1",myConnection) '这里有错误。原因是没有NEW参数的调用
各位帮我看下代码
如下<em>代码</em>,要求是:点击checkbox时,对应的部分变灰调。不知道哪里出错了,行不通,大家<em>帮我</em><em>看下</em>rn form中间的部分省略了,都是一些table之类的,elements[]中的值也是根据form所包含的元素个数得来的。rn rnrn rn......rnrn Get DNS Server Address from DHCPrnrn rn Enablern rnrn
帮我看下代码
[img=http://hi.csdn.net/attachment/201106/23/10024661_1308841866dGtP.jpg][/img]rn不知这里面的GetType()是什么意思
帮我看下这段代码~~~
在网上看咯额一个socket的简单例子,有些地方看不懂,新手请多多指教,先是全部<em>代码</em>段[code=VB.NET]Imports System.NetrnImports System.Net.SocketsrnImports System.ThreadingrnImports System.TextrnImports System.DiagnosticsrnrnPublic Class frmServerrnrn '服务端的Socketrn Dim listener As Socketrn '与客户端会话的Socketrn Dim mySocket As Socketrn '服务端的运行状态rn Dim IsRun As Boolean = Falsern '监听接收数据线程rn Dim myThread As Threadrnrn Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Loadrn myThread = New Thread(AddressOf Listen)rn myThread.Start()rn End Subrnrn Public Sub Listen()rn Dim bytes() As Byte = New [Byte](1024) rn Dim data As String = String.Emptyrn Dim tokens() As Stringrnrn Dim localEndPoint As New IPEndPoint(Net.IPAddress.Parse("127.0.0.1"), 11000)rn '初始化socketrn listener = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)rn '绑定端口rn listener.Bind(localEndPoint)rn '开始监听rn listener.Listen(100000000)rnrn BeginInvoke(New EventHandler(AddressOf AddInfo), "服务端已启动,正在等待连接......")rnrn mySocket = listener.Accept()rn IsRun = Truernrn While Truern Dim bytesRec As Integer = mySocket.Receive(bytes)rn data = Encoding.UTF8.GetString(bytes, 0, bytesRec)rnrn tokens = data.Trim.Split("|")rn Select Case tokens(0) '分析接收到的数据,可自己定义更多一些rn Case "Chat"rn BeginInvoke(New EventHandler(AddressOf AddInfo), tokens(1)) 'Invoke保证线程安全rn Case "Exit"rn IsRun = Falsern BeginInvoke(New EventHandler(AddressOf AddInfo), tokens(1)) 'Invoke保证线程安全rn mySocket.Shutdown(SocketShutdown.Both)rn mySocket.Close()rn Exit Subrn End Selectrn End Whilernrn End Subrnrn '发送信息rn Private Sub btnSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSend.Clickrn Dim msg As Byte() = Encoding.UTF8.GetBytes("Chat|" + TextBox1.Text)rn mySocket.Send(msg)rn ListBox1.Items.Add("本地信息: " + TextBox1.Text)rnrn TextBox1.Text = ""rn End Subrnrn '非UI线程调用窗体控件,保证线程安全。与聊天实现无关。rn Sub AddInfo(ByVal sender As System.Object, ByVal e As System.EventArgs)rn ListBox1.Items.Add("远程信息: " + sender.ToString)rn End Subrnrn '关闭窗口时发关退出信息并清理资源rn Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosingrn If IsRun Thenrn Dim msg As Byte() = Encoding.UTF8.GetBytes("Exit|服务端退出: " + Me.Handle.ToString)rn Dim bytesSent As Integer = mySocket.Send(msg)rn End Ifrn listener.Close()rn mySocket = Nothingrn myThread.Abort()rn End SubrnrnEnd Classrn[/code]rn我不懂的地方是[code=VB.NET] tokens = data.Trim.Split("|")rn Select Case tokens(0) '分析接收到的数据,可自己定义更多一些rn Case "Chat"rn BeginInvoke(New EventHandler(AddressOf AddInfo), tokens(1)) 'Invoke保证线程安全rn Case "Exit"rn IsRun = Falsern BeginInvoke(New EventHandler(AddressOf AddInfo), tokens(1)) 'Invoke保证线程安全rn mySocket.Shutdown(SocketShutdown.Both)rn mySocket.Close()rn Exit Subrn End Select[/code]rntokens=data.trim.split("|")具体指的是什么?rn这个分析接收到的数据,可以自己多定义一些 是什么意思?意思是我可以多定义一些什么?tokens不是一个数组吗?rntokens(0)代表什么?rncase"chat"和case"exit"是判断什么的?rn请<em>帮我</em>解释一下,谢谢了
帮我看下这句代码
ls_2=ds_qry.getitemstring(i,'ppid')rnls_3=w_salelist_input.dw_1.getitemstring(ll_row,'"+ls_2+"')rnrnrn 执行的时候提示出错 ,求解,怀疑是处在这里 (ll_row,'"+ls_2+"')
进来帮我看下代码
FileStream fs = new FileStream(FILE_NAME, FileMode.CreateNew);rn // Create the writer for data.rn BinaryWriter w = new BinaryWriter(fs);rn // Write data to Test.data.rn for (int i = 0; i < 11; i++) rn rn w.Write( (int) i);rn rn w.Close();rn fs.Close();rn // Create the reader for data.rn fs = new FileStream(FILE_NAME, FileMode.Open, FileAccess.Read);rn BinaryReader r = new BinaryReader(fs);rn // Read data from Test.data.rn for (int i = 0; i < 11; i++) rn rn Console.WriteLine(r.ReadInt32());rn rn r.Close();rn fs.Close();rn rnrn循环是什么意思呢??什么表示写人的内容?怎么表示读出来的数据?rn谢谢各位!!
帮我看下代码,很简单的~~
在上面的JPanel显示四个Button,然后点击分别在下面的JPanel显示不同的布局,但就是不能实现,请高手指教!rnrnpackage pra3;rnimport java.awt.*;rnimport java.awt.event.*;rnimport javax.swing.*;rnrnpublic class ShowLayout extends JFrame implements ActionListenerrn int count = 0;rn protected JButton button1,button2,button3,button4,button5,button6;rnrn protected JLabel label;rn protected JPanel panel;rn rn JPanel pNorth = new JPanel();rn JPanel pSouth = new JPanel();rn rnrn rn public ShowLayout()rn rn setTitle("查看不同的Layout");rn setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);rn setSize(800,400);rn rn button1 = new JButton("观看FlowLayout布局");rn button2 = new JButton("观看BorderLayout布局");rn button3 = new JButton("观看BoxLayout布局");rn button4 = new JButton("观看null布局");rn button5 = new JButton("观看JSplitPane布局");rn button6 = new JButton("观看JLayeredPane布局");rn rn label = new JLabel("你还没有单击按钮");rn button1.addActionListener(this);rn button2.addActionListener(this);rn button3.addActionListener(this);rn button4.addActionListener(this);rn button5.addActionListener(this);rn button6.addActionListener(this);rnrn Container cp = getContentPane();rn cp.setLayout(new BorderLayout());rnrn pNorth.add(button1);rn pNorth.add(button2);rn pNorth.add(button3);rn pNorth.add(button4);rn pNorth.add(button5);rn pNorth.add(button6);rn cp.add(pNorth,"North");rn rn cp.add(pSouth);rn rn pSouth.add(label);rn rnrn rn public void showTest(String type)rn //pSouth.removeAll();rn //this.pSouth.validate();rn button1 = new JButton("Test01");rn button2 = new JButton("Test02");rn button3 = new JButton("Test03");rn button4 = new JButton("Test04");rn button5 = new JButton("Test05");rn button6 = new JButton("Test06");rn rn label.setText(type);rn pSouth.add(button1);rn pSouth.add(button2);rn pSouth.add(button3);rn pSouth.add(button4);rn pSouth.add(button5);rn pSouth.add(button6);rn rn rnrn public void actionPerformed(ActionEvent e)rnrn Object source = e.getSource();rn //pSouth.removeAll();rn if(source == button1) rn System.out.println("test1");rn pSouth.setLayout(new FlowLayout());rn showTest("FlowLayout布局");rn rn rn rn rn else if(source == button2) rn rn pSouth.setLayout(new BorderLayout());rn pSouth.add(new Button("Test01"),BorderLayout.NORTH);rn pSouth.add(new Button("Test02"),BorderLayout.SOUTH);rn System.out.println("test2");rn //showTest("BorderLayout布局");rnrn rn else if(source == button3)rn pSouth.setLayout(new BoxLayout(pSouth, BoxLayout.LINE_AXIS));//找不到BoxLayout布局rn showTest("BoxLayout布局");rn rn else if (source == button4)rn pSouth.setLayout( null);rn showTest("null布局");rn rn /*else if (source == button5) rn JSplitPane();rn showTest("JSplitPane布局");rn rn else if (source == button6)rn //pSouth.setrn showTest("观看JLayeredPane布局");rn */rn rn rn public static void main(String args[])rn ShowLayout frame = new ShowLayout();rn frame.setVisible(true);rn rn rnrn
帮我看下注册代码
封装类:package xiao;rnrnimport java.sql.Date;rnimport java.io.Serializable;rnclass UserRegisterBean implements Serializablern private String userName;rn private String userPass;rn private java.sql.Date regDate;rn private String userType; rnrn public void setUserName(String userName) rn this.userName = userName;rn rnrn public void setUserPass(String userPass) rn this.userPass = userPass;rn rn public void setRegDate(java.sql.Date regDate) rn this.regDate = regDate;rn rnrn public void setUserType(String userType) rn this.userType = userType;rn rnrn public String getUserName() rn return userName;rn rnrn public String getUserPass() rn return userPass;rn rn public java.sql.Date getRegDate() rn return regDate;rn rnrn public String getUserType() rn return userType;rn rn rn rnrn数据库连接:package xiao;rnimport java.sql.*;rnrnpublic class DateBaseConnectionrnrnpublic static Connection getSqlConnection()rnrnConnection conn = null;rntryrnrnClass.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");rnconn = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=rencai","sa","");rnrncatch(Exception e)rnrnSystem.out.println("数据库连接的异常:"+e);rnrnreturn conn;rnrnrnrn数据库操作:rnpackage xiao;rnimport java.sql.*;rnpublic class UserRegisterrnrnprivate Connection conn;rnpublic UserRegister()rnrntryrnrnthis.conn = DateBaseConnection.getSqlConnection();rnrncatch(Exception e)rnrne.printStackTrace();rnrnrn/////添加数据rnpublic void add(UserRegisterBean bean) throws ExceptionrnrntryrnrnrnPreparedStatement addSql = conn.prepareStatement("insert into user values(?,?,?,?)");rnaddSql.setString(1,bean.getUserName());rnaddSql.setString(2,bean.getUserPass());rnaddSql.setDate(3,new java.sql.Date(new java.util.Date().getTime()));rnaddSql.setString(4,bean.getUserType());rnrn addSql.executeUpdate();rnrnrncatch(Exception e)rnrne.printStackTrace();rnthrow e;rnrnrnrn处理数据的页面:rnrnrnrnrn 无标题文档rnrnrnrnrnrnrnrnrn
PHP 微信公众平台 tokens 连接代码
PHP <em>微信公众平台</em> tokens 连接<em>代码</em>
大家帮我看下这页有没有问题
这是个管理页面,打开这个页面很慢很慢。我是使用VS2005在网上扒的<em>代码</em>。首先声明我的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
有没有js高手,帮我看下我这个代码是什么问题
[code=javascript]rnrnrn rn rn rn rn sdfsadfsdfsadfddddddddddddddddddddddddddddsdfsadfsdfsadfddddddddddddddddddddddddddddsdfsadfsdfsadfddddddddddddddddddddddddddddsdfsadfsdfsadfddddddddddddddddddddddddddddsdfsadfsdfsadfddddddddddddddddddddddddddddsdfsadfsdfsadfddddddddddddddddddddddddddddsdfsadfsdfsadfddddddddddddddddddddddddddddsdfsadfsdfsadfddddddddddddddddddddddddddddsdfsadfsdfsadfddddddddddddddddddddddddddddsdfsadfsdfsadfddddddddddddddddddddddddddddsdfsadfsdfsadfddddddddddddddddddddddddddddsdfsadfsdfsadfddddddddddddddddddddddddddddsdfsadfsdfsadfddddddddddddddddddddddddddddsdfsadfsdfsadfddddddddddddddddddddddddddddsdfsadfsdfsadfddddddddddddddddddddddddddddsdfsadfsdfsadfddddddddddddddddddddddddddddsdfsadfsdfsadfddddddddddddddddddddddddddddsdfsadfsdfsadfddddddddddddddddddddddddddddsdfsadfsdfsadfddddddddddddddddddddddddddddsdfsadfsdfsadfddddddddddddddddddddddddddddsdfsadfsdfsadfddddddddddddddddddddddddddddsdfsadfsdfsadfddddddddddddddddddddddddddddrn Add Textarearn Current Heightrn Real Heightrn rn rn[/code]rnrn这段<em>代码</em>是textarea自适应高度,我自己写的,但是,我一开始初始化的时候,弹出来的textarea真实的高度,和通过按钮获得textarea真实的高度不一样,而按钮获得的高度才是真正的高度,求解,这是怎么回事。
大家帮我看下面的代码有没有问题
// 是否为重复设备rn DWORD ip = pdfInfo->ip;rn int iItem = FindDeviceItem(ip); //判断设备信息的IP是否在列表控件中rn if(iItem!=-1) // 已存在于设备列表中rn rn // 替换并删除旧的记录rn m_lstDevice.DeleteItem(iItem);//m_lstDevice是个列表控件的关联变量rn rn // 从设备信息数组中删除rn //DevArray是一个CPtrArray,里面存储了DeviceFindInfo(一个结构体)型指针rn //我是这样存储的,DeviceFindInfo DevInfo;DevArray.Add(&DeInfo);rn for(int i=0;iip==ip)rn rn rn DevArray.RemoveAt(i);rn pdoldInfo=NULL;rn break; rn rn rn rn 老是出错,不知道有什么隐患,谢谢高手指点
帮我看下这串口协议有没有问题
通讯接口采用RS232C,所有数据均为ASCII码,每帧数据有9个字节组成.第一个字节为起始位,第二个字节为状态字A。rn其中A状态字具体Bit位使用如下:rn0:0...1...(省略)rn1: 0...1...rn2: 0...1...rn3: 0...1...rn4: 0...1...rn5: 0...1...rn6: 0正1负rn7: 0动态1非动态rn假如状态字A第7位为1,其他Bit位都为0。那么A状态字就是1000 0000 转成16进制为80。我在ASCII码对照表没找到相应的字符。这协议有<em>问题</em>吗?rn 我测试时往串口发的状态字A为byte(128)时(16进制80)。通过[code=C#]rn System.Text.ASCIIEncoding asciiEncoding = new System.Text.ASCIIEncoding();rn int intAsciiCode = (int)asciiEncoding.GetBytes(acsiiStr)[0];[/code]其中acsiiStrrn是从串口读取的状态字A的ASCII字符。将其转成16进制为3F。跟我发的不相符...
帮我看下这句SQL语句有没有问题
我想实现从数据库中找出今天生日的人员名单 ,<em>代码</em>如下:rn CTime t=CTime::GetCurrentTime(); rn CString date1;rn date1.Format("-%02d-%02d",t.GetMonth(),t.GetDay()); rn CString AddSql="";rn AddSql="SELECT * FROM [studentinfo] WHERE stubirth='%"+date1+"'";rnrnrn为什么找不到记录呢,ACCESS数据库中明明有记录的啊
有没有大神帮我看下这个数据库怎么打开啊~~~
[img=https://img-bbs.csdn.net/upload/201701/02/1483365170_111977.png][/img][img=https://img-bbs.csdn.net/upload/201701/02/1483365178_47249.png][/img]rnrnasp白痴,怎么打开啊(趴)
微信公众平台PHP简单功能实现代码
<em>微信公众平台</em> PHP token各种发送消息、时间的实现和各种发送消息、事件的回应方法。
大神帮我看下动态库.so有没有加载上
我使用到curl库,没有make install,只是make,然后找到它的*.h & *.so文件,供我的程序使用,编译链接的命令如下:rngcc -g -Wall -fPIC -shared -I./curl/include -L/lib -lcurl ./putObject.c -o putObjectrnlib里面放的其实就是一个:libcurl.sorn看似链接成功了,可执行./putObject就出现段错误,调试在main开始就崩了。rn使用ldd查看:rnlinux-vdso.so.1 => (0x00007fffd5dfe000)rnlibc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc4c22c0000)rn/lib64/ld-linux-x86-64.so.2 (0x00007fc4c28a5000)rn没有curl.so 这是为什么呢?
要用python写一个程式,线性规划问题有没有大神帮我看下
-
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<em>问题</em>补充:rn我要做的是,目录里有的文件是等于6.3KB的,目录结构式news/二级文件夹下的文件查到后自动删除rn注意news/文件夹下有很多二级文件夹
php get问题帮我看下哪里出问题????
rnalert('编辑成功!');window.location='show_user.<em>php</em>'";rn exit;rn rn break;rn case add:rn if(!mysql_query("INSERT INTO test (id,pass) values ('$id','$password')"))rn rn die('数据插入失败!'.mysql_error());rn rn elsern rn echo " ";rn exit;rn rn break;rn case dele:rn $sql ="delete from test where id ='$ID'";rn $qu=mysql_query($sql,$con);rn if($qu)rn rn echo " ";rn exit;rn rn break;rnrn/*rn// 插入数据库rnrnrnrn*/rn?>rn
有没有大神帮我看看怎么回事?
[code=c]rn#includern#includernusing namespace std;rnrntypedef structrnint *pMat;int row,col;MAT,*pMAT;rnvoid 生成矩阵A(pMAT a)rnrnrn int num=10;rn int m=a->row;rn int n=a->col;rn int *p=new int[m*n];rn a->pMat=p;rn for(int i=0;irow;rn int n=a->col;rn int h=0;rn for(int i=0;ipMat[i]<<
大神帮忙看下这段代码
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为什么
大神帮忙看下代码
本人小白一个,今天再查看一个网页源文件时遇到下面的<em>代码</em>,格式太复杂了,但看起来又不像是加密的,请各<em>大神</em>帮忙鉴定一下是否是经过特殊处理的过<em>代码</em>?如果是该如何转换为通俗的易懂的格式。rn完整<em>代码</em>太长了,请看链接:http://szjj.ky51.cn/Public/Js/jquery-1.11.1.min.jsrnrn部分<em>代码</em>如下:rn/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */rn!function(a,b)"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a)if(!a.document)throw new Error("jQuery requires a window with a document");return b(a):b(a)("undefined"!=typeof window?window:this,function(a,b)var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h=,i=h.toString,j=h.hasOwnProperty,k=,l="1.11.1",m=function(a,b)return new m.fn.init(a,b),n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b)return b.toUpperCase();m.fn=m.prototype=jquery:l,constructor:m,selector:"",length:0,toArray:function()return d.call(this),get:function(a)return null!=a?0>a?this[a+this.length]:this[a]:d.call(this),pushStack:function(a)var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b,each:function(a,b)return m.each(this,a,b),map:function(a)return this.pushStack(m.map(this,function(b,c)return a.call(b,c,b))),slice:function()return this.pushStack(d.apply(this,arguments)),first:function()return this.eq(0),last:function()return this.eq(-1),eq:function(a)var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[]),end:function()return this.prevObject||this.constructor(null),push:f,sort:c.sort,splice:c.splice,m.extend=m.fn.extend=function()var a,b,c,d,e,f,g=arguments[0]||,h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||,h++),"object"==typeof g||m.isFunction(g)||(g=),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:,g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g,m.extend(expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a)throw new Error(a),noop:function(),isFunction:function(a)return"function"===m.type(a),isArray:Array.isArray||function(a)return"array"===m.type(a),isWindow:function(a)return null!=a&&a==a.window,isNumeric:function(a)return!m.isArray(a)&&a-parseFloat(a)>=0,isEmptyObject:function(a)var b;for(b in a)return!1;return!0,isPlainObject:function(a)var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;tryif(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1catch(c)return!1if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b),type:function(a)return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a,globalEval:function(b)b&&m.trim(b)&&(a.execScript||function(b)a.eval.call(a,b))(b),camelCase:function(a)return a.replace(o,"ms-").replace(p,q),nodeName:function(a,b)return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase(),each:function(a,b,c)var d,e=0,f=a.length,g=r(a);if(c)if(g)for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)breakelse for(e in a)if(d=b.apply(a[e],c),d===!1)breakelse if(g)for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)breakelse for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a,trim:function(a)return null==a?"":(a+"").replace(n,""),makeArray:function(a,b)var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c,inArray:function(a,b,c)var d;if(b)if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return creturn-1,merge:function(a,b)var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a,grep:function(a,b,c)for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e,map:function(a,b,c)var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i),guid:1,proxy:function(a,b)var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function()return a.apply(b||this,c.concat(d.call(arguments))),e.guid=a.guid=a.guid||m.guid++,e):void 0,now:function()return+new Date,support:k),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b)h["[object "+b+"]"]=b.toLowerCase());function r(a)var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in avar s=function(a)var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b)return a===b&&(l=!0),0,C="undefined",D=1<b;b++)if(this[b]===a)return b;return-rn
大神帮忙看下是什么原因,表单提交不了
因为这些是别人的<em>代码</em>,所以里面jquery的<em>代码</em>不太懂,总之是页面点login没什么反应rn<em>代码</em>如下:rn[code=HTML][/code]rnrnrnrn rn Animated Form Switching with jQueryrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn Registerrn rn rn First Name:rn rn This is an errorrn rn rn Last Name:rn rn This is an errorrn rn rn Website:rn rn This is an errorrn rn rn rn rn Username:rn rn This is an errorrn rn rn Email:rn rn This is an errorrn rn rn Password:rn rn This is an errorrn rn rn rn rn rn Send me updatesrn rn rn You have an account already? Log in herern rn rn rn rn rn rn Loginrn rn Username:rn rn This is an errorrn rn rn Password: Forgot your password?rn rn This is an errorrn rn rn rn rn You don't have an account yet? Register herern rn rn rn rn rn rn Forgot Passwordrn rn Username or Email:rn rn This is an errorrn rn rn rn Suddenly remebered? Log in herern You don't have an account? Register herern rn rn rn rn rn rn rn rnrn rn rn rn rn
大神看下代码问题,为什么弹不出对话框!!
function inheritPrototype(sub, superType) rn var prototype = Object.create(superType.prototype);rn prototype.constructor = sub;rn sub.prototype = prototypern rnrn function superType(name) rn this.name = name;rn this.colors = ['red', 'green']rn rn superType.prototype.sayname = function() rn alert(this.name)rn rnrn function sub(name, age) rn superType.call(this, name);rn this.age = agern rn inheritPrototype(sub, superType);rn sub.prototype.sayage = function() rn alert(this.age)rn rn sub.prototype = new superType();rn var instance = new sub("wong", 29)
大神帮忙看下代码哪有问题
当点击发送时,就卡住不能操作了 是哪的<em>问题</em>啊rn下面是完整版<em>代码</em>。rnrn //定义串口对象rn SerialPort myCom = new SerialPort();rn public static int RX = 0;rn public static int TX = 0;rn //定义动态字符串,用来存储接受的数据rn public StringBuilder RecStr = new StringBuilder(4096);rnrn private void FrmRecAndSend_Load(object sender, EventArgs e)rn rn //初始化comboBox控件rn this.comName.SelectedIndex = 0;rn this.comBaudRate.SelectedIndex = 3;rn this.comByteSize.SelectedIndex = 0;rn this.comParity.SelectedIndex = 0;rn this.comStopBits.SelectedIndex = 0;rn rn //打开或关闭串口rn private void btnOpen_Click(object sender, EventArgs e)rn rn if (myCom.IsOpen)rn rn myCom.Close();rn //状态栏显示串口名称,以及是否为打开状态rn this.statusCom.Text = "STATUS:" + myCom.PortName + "CLOSED!";rn this.btnOpen.Text = "打开串口";rn rn elsern rn //初始化串口属性rn this.comboBoxChang();rn myCom.Open();rn //状态栏显示串口名称以及是否为打开状态rn this.statusCom.Text = "STATUS:" + myCom.PortName + "OPENED";rn this.btnOpen.Text = "关闭串口";rn this.timerRec.Enabled = true;rn rn rnrn //初始化串口信息rn public void comboBoxChang()rn rn tryrn rn myCom.PortName = this.comName.SelectedItem.ToString();rn myCom.BaudRate = Convert.ToInt16(this.comBaudRate.SelectedItem.ToString());rn myParity();rn myCom.DataBits = Convert.ToInt16(this.comByteSize.SelectedItem.ToString());rn myStopBits();rn rn catch (Exception ex)rn rn MessageBox.Show(ex.ToString());rn rn rn rn //根据选择确认校验位rn public void myParity()rn rn if (this.comParity.SelectedIndex == 0)rn rn myCom.Parity = Parity.None;rn rn elsern rn if (this.comParity.SelectedIndex == 1)rn rn myCom.Parity = Parity.Odd;rn rn elsern rn myCom.Parity = Parity.Even;rn rn rn rnrn //根据选择确定停止位rn public void myStopBits()rn rn int caseSwitch = this.comStopBits.SelectedIndex;rn switch (caseSwitch)rn rn case 1:rn myCom.StopBits = StopBits.OnePointFive;rn break;rn case 2:rn myCom.StopBits = StopBits.Two;rn break;rn default:rn myCom.StopBits = StopBits.One;rn break;rn rn rnrn //发送按钮,发送下面的要发送的数据rn private void btnSend_Click(object sender, EventArgs e)rn rn if (myCom.IsOpen)rn rn if (this.tBoxSed.Text == "")rn rn MessageBox.Show("发送的数据为空");rn rn tryrn rn myCom.Write(this.tBoxSed.Text);rn TX += this.tBoxSed.Text.Trim().ToString().Length;rn this.tBoxTX.Text = TX.ToString();rn rn catch (Exception ex)rn rn MessageBox.Show("发送数据失败!" + ex);rn rn rn elsern rn MessageBox.Show("请确认串口为打开状态");rn rn rn //关闭窗体则关闭串口rn private void FrmRecAndSend_Closing(object sender, CancelEventArgs e)rn rn myCom.Close();rn rn rn //去掉发送数组中的空格rn private string delSpace(String putin)rn rn string putout = "";rn for (int i = 0; i < putin.Length; i++)rn rn if(putin[i] != ' ')rn rn putout += putin[i];rn rnrn rn return putout;rn rnrn //显示包信息rn public string dis_package(char[] recB)rn rn string tempT = "";rn foreach(char b in recB)rn rn tempT += b.ToString() + "";rn rn return tempT;rn rnrn //自动检测串口是否为打开状态,若为打开状态,自动把接收的数据显示在接收区内rn private void timerRec_Tick(object sender, EventArgs e)rn rn if (myCom.IsOpen)rn rn tryrn rn int numByte = myCom.BytesToRead;rn if (numByte != 0)rn rn char[] TempByte = new char[2048];rn int numStr = myCom.Read(TempByte, 0, numByte);rn RecStr.Append(TempByte);rn this.tBoxRec.Text = tBoxRec.Text + RecStr.ToString();rn RX += numStr;rn this.tBoxRec.Text = RX.ToString();rn if (this.tBoxRec.Text.Length > 138)rn rn this.tBoxRec.Text = string.Empty;rn rn RecStr.Remove(0, RecStr.Length);rn rn rn catch (Exception ex)rn rn MessageBox.Show(ex.ToString());rn rn rn elsern rn this.timerRec.Enabled = false;rn rn rnrn //根据时间来自动发送数据rn private void timerAutoSend_Tick(object sender, EventArgs e)rn rn tryrn rn myCom.Write(this.tBoxSed.Text);rn TX += this.tBoxSed.Text.Trim().ToString().Length;rn this.tBoxTX.Text = TX.ToString();rn rn catch (Exception ex)rn rn MessageBox.Show("发送失败!" + ex);rn rn rn //检查自动发送的选择按钮是否选中,若选中,则开启自动发送的时间事件rn private void cBoxSendSelf_CheckStateChanged(object sender, EventArgs e)rn rn if (myCom.IsOpen)rn rn if (this.tBoxSed.Text == "")rn rn MessageBox.Show("发送为空");rn return;rn rn elsern rn if (this.cBoxSendSelf.Checked == true)rn rn this.timerAutoSend.Interval = Convert.ToInt16(this.tTime.Text.Trim().ToString());rn this.timerAutoSend.Enabled = true;rn rn elsern rn this.timerAutoSend.Enabled = false;rn rn rn rn elsern rn MessageBox.Show("请确定串口为打开状态!");rn this.cBoxSendSelf.Checked = false;rn rn rnrn private void btnCountReset_Click(object sender, EventArgs e)rn rn TX = 0;rn RX = 0;rn this.tBoxTX.Text = TX.ToString();rn this.tBoxRX.Text = RX.ToString();rn rn
大神看下这段代码内存泄露问题
[code=HTML]var hi=rnhi.init=function()rnhi.bgX=0;//背景移动速度rnhi.mycanvas = document.getElementById("mycanvas");rnhi.ctx =mycanvas.getContext("2d");rnhi.width=300;rnhi.height=40;rnhi.mycanvas.width = 300;rnhi.mycanvas.height = 400;rnrnhi.init();rnhi.draw=function()rnvar img=new Image();rnimg.src='image/bg.png';rnimg.width=hi.width;rnimg.height=hi.height;rnhi.ctx.clearRect(0, 0,hi.width, hi.height); rn hi.ctx.drawImage(img,hi.bgX,0);rn hi.ctx.drawImage(img,hi.width+hi.bgX,0); rn if(Math.abs(hi.bgX)<400)rn hi.bgX-=10; rn elsern hi.bgX=0;rn rn rnhi.draw();rnsetInterval(hi.draw,1000)[/code]
php 没学过PHP 大家帮我看下
是这样的 _login.<em>php</em>文件的form是这里的 我想直接访问login.<em>php</em>应该是什么样的rn比如login.<em>php</em>?name=aaa&password=aaa 假设输入的name和password都是aaarnrn rn rn rn rnrnrnfunction Login(form)rn var mesg = "";rn if(form.name.value == "") mesg += "\n";rn if(form.passwd.value == "") mesg += "\n";rn if(mesg != "")rn mesg = AlertInput + mesg;rn alert(mesg);rn return false;rn rnrn if (form.language.value !="-") form.Lang.value = form.language.value;rn form.action = "login.<em>php</em>?Cmd=login";rn form.submit();rn
大神看下逗号运算符的问题
怎么会输出rn#includernint main()rnrnint a=8;rnif(a==2,3)rnprintf(",");rngetchar();rnreturn 0;rn
大神看下函数定义的问题
void n()、void n(int i);的区别,怎么有的可以加分号有的不加分号?还有函数调用的时候怎么调,在main函数里面最后加一个n();rn那么void n(int i)怎么在main函数里面调用?
大神看下i++的问题
怎么j输出的是0,不是2?第三次循环j应该得2呢? 顺便问下continue的用法,用continue输不出来,continue不是跳过循环的吗?rn#includernvoid main()rnrnint boos,i,j=0;rnrnrnfor(i=0;i,j);rn
大神看下随机数的问题
模拟红包,输出都是输入金额的半倍,输入1元,5个红包,输出分配的结果是1.5元,rn#includern#includern#includernint main(void)rnrn rnfloat money_yuan;rnint money_fen;rnint part;rnint per[100];rnint i;rnint index;rnint tmp;rnprintf("输入红包的金额");rnscanf("%4f",&money_yuan);rnmoney_yuan*=100;rnmoney_fen=(int)money_yuan;rnprintf("红包金额:%d分钱",money_fen);rnprintf("输入红包的数量");rnwhile(scanf("%d",&part)!=1||part100)rnprintf("红包数量错误");rnfflush(stdin);rnrnprintf("红包数量:%d\n",part);rnif(money_fen
嗮一段代码,大家帮我看下……有点理解不了
settings.photoElement.click(function() /*点击全尺图片显示下一张*/rn showPhoto((settings.current+1) % settings.thumbnails.length); //这样设计是为了点击到最后一张时,会折回到第一张 rn );rn $(settings.nextControl).click(function()rn showPhoto((settings.current+1) % settings.thumbnails.length);rn );rn $(settings.previousControl).click(function()rn showPhoto((settings.thumbnails.length+settings.current-1) %rn settings.thumbnails.length);rn );rn $(settings.firstControl).click(function()rn showPhoto(0);rn );rn $(settings.lastControl).click(function()rn showPhoto(settings.thumbnails.length-1);rn );rnrnrn完整的<em>代码</em>有点多,就这一段吧,想实现的效果“点击一张图片,会显示下一张,当到最后一张时,会折回到第一张”rnsettings.current表示当前图片的序号,settings.thumbnails.length表示图片的总数rn大家<em>帮我</em>解释下:关于点击到最后一张会折回到第一张的原理……rnrnrn[color=#FF0000](settings.current+1) % settings.thumbnails.length); rnrn(settings.thumbnails.length+settings.current-1) %settings.thumbnails.length);[/color]rnrn红线的部分理解<em>不了</em>……求助
大家帮我看下面的代码,运行不了啊!!
我想在web客户端创建一个文件!rn
不了两位月日,帮我看下原因,代码如下
[code=HTML]D_No = year(now)& right("0" & month(now),2)& right("0"&day(now),2)&hour(now)&minute(now)&second(now)[/code]
关于RSA的图像加密java实现,大神帮我看下代码
[size=14px]关于RSA的图像加密java实现, 网上下的原码,里面有错,但是自己又不会改!在eclipse中调试,错误如红色部分,请诸位<em>大神</em>帮忙看看,小弟在此多谢!另外,我有点不清楚RSA加密在java中实现是通过RSA库吗?期待<em>大神</em>能给我好好讲解!最好详细点!rn[/size]rnrnrnrnimport java.awt.image.BufferedImage;rnimport java.awt.image.WritableRaster;rnimport java.math.BigInteger;rnpublic class m6_4_1 rn //JiaMI和JieMi是加密和解密标记rnstatic final int JiaMi = 1, JieMi = 0;rnstatic String n="3163737396964351869953567079259303863510959880380107358513347569497361351593537187751035073333327121545020296079881316080236710831416407068594411116696984839";rnprivate static String e=rn"903638414203475014033644156838860353351";rnprivate static String d="794962460408465402418687210 115794578656926175996632754034043472122893355966667217945990985424321104393024989321477664269340862982879052179548950312165327823";rn public static void main(String[] args)rn //得到图像的像素数据 rn BufferedImage bi = [color=#FF0000] ImageAssistance[/color].getImage("125.jpg", " jpg");rn WritableRaster wr = bi.getRaster();rn int width = wr.getWidth();rn int height = wr.getHeight();rn int[] pixels = new int[width* height];rn wr.getPixels(0, 0, width, height, pixels);rn //对图像数据进行加密 rn int[] temp=encrypt(e, n, pixels, 32 * 4,[color=#FF0000]EmptyStackException[/color].JiaMi);rn//对加密后的图像数据进行解密rn int[] result=encrypt(d, n, temp, n.length(),[color=#FF0000]EOFException[/color].JieMi);rn //将图像存储到磁盘rnBufferedImage bi2=new BufferedImage(rnwidth, height, bi.getType());rn WritableRaster wr2 = bi2.getRaster();rn wr2.setPixels(0, 0, width, height, result);rn [color=#FF0000]ImageAssistance[/color].setImage(bi2,"result.jpg","jpg");rn rn // e加密密钥,n为模数,msg为明文或者待解密密文rn public static String encrypt(String e, String n, rnString msg) rn BigInteger ee = new BigInteger(e);rn BigInteger nn = new BigInteger(n);rn BigInteger mmsg = new BigInteger(msg);rn BigInteger result = mmsg.modPow(ee,nn);rn return result.toString();rn rn/* e加/解密密钥,n模数,pixels待加密数据,q每次加/解密多少个数据,sign取1加密0解密,msg待解密密文*/rnpublic static int[] encrypt(String e, String n, int[]rnpixels, int q, int sign) rn int p = pixels.length / q;rn String[] str = new String[p];rn int[][] in = new int[p][];rn for (int i=0; i
看下这段代码有没有错误
[code=HTML]< input name="state" type="radio" value="3" checked />已收款rnchecked/>已发货rnchecked/>已确认rn rn rn rn rnrn [/code]rnrnrn看着好像没错误,也没报错,就是修改<em>不了</em>值
大神帮我看下代码哪里错了阿
题目是一个九宫格,要求1到9的数不能重复横竖对角线相加均为15.我是新手,头都大了,求<em>大神</em>解决下吧,万分感谢哦!下面是我的<em>代码</em>:rn#includernint main()rnrn int arr[3][3];rn rn int i,j; rn for(i=0;i9||arr[i][j]==0)rn printf("输入错误");rn goto SD;rn rn rn for(i=0;i,&arr[i][j]);rn rn rn return 0;rn
关于多表查询-麻烦大神帮我看下这段sql代码
麻烦<em>大神</em><em>帮我</em><em>看下</em>这段sql语句哪里错了rn[code=sql]rnselect StudentInfo.学号,StudentInfo.姓名,rnsum(case Course.课程名称 when '语文' then 成绩 else 0 end) as 语文,rnsum(case Course.课程名称 when '数学' then 成绩 else 0 end) as 数学,rnsum(case Course.课程名称 when '英语' then 成绩 else 0 end) as 英语,rnsum(case Course.课程名称 when '历史' then 成绩 else 0 end) as 地理,rnsum(case Course.课程名称 when '地理' then 成绩 else 0 end) as 历史,rnsum(成绩) as 总分rnfrom StudentInfornleft outer join Grade ON StudentInfo.学号 = Grade.学号rnleft outer join Course ON Grade.课程编号 = Course.课程编号rngroup by StudentInfo.学号,StudentInfo.姓名rnorder by StudentInfo.学号rn[/code]rnrn查询结果里各科成绩不会出来,只有总分rn[img=https://img-bbs.csdn.net/upload/201705/07/1494132606_910955.jpg][/img]rnrn表结构rn[img=https://img-bbs.csdn.net/upload/201705/07/1494132749_829817.jpg][/img]rn[img=https://img-bbs.csdn.net/upload/201705/07/1494132764_636099.jpg][/img]rn[img=https://img-bbs.csdn.net/upload/201705/07/1494132774_685033.jpg][/img]
请把我看下这段代码有没有问题
rnrn别人试了下。说只能运行其中一个!rn高手帮下忙
大神帮我看下这段代码 PB修改密码部分
string czy,ymm,xmm,qrmmrnczy = sle_1.textrnymm = sle_2.textrnxmm = sle_3.textrnqrmm = sle_4.textrnselect czy into :ls_czyrn FROM XGMMB rn WHERE czid = :sle_1.text;rn if sle_1.text="" or sle_2.text="" or sle_3.text="" thenrn messagebox("错误!","用户名或密码不能为空!",exclamation!,ok!,2)rn returnrn end ifrn if sle_3.text=xmm <> sle_4.text=qrmm then messagebox("提示","您输入的两次新密码不一致,请重新输入!!") sle_3.setfocus() return end if //更新密码rn UPDATE XGMMB rn SET xmm =:sle_3.text where czy= :sle_1.text ;rn if sqlca.sqlcode = 0 thenrn messagebox("密码修改成功!","请记住新密码,下次登录时请使用新密码!",exclamation!,ok!,2) rn elsern messagebox("错误!","用户名或密码错误,请重新输入!",exclamation!,ok!,2)rn end ifrnrnrnrn我是想操作员,原密码,新密码,确认密码,这样操作的
微信公众平台开发之Mysql数据库+关键词回复
<em>微信公众平台</em>开发之Mysql数据库+关键词<em>回复</em>,根据用户输入的关键字,采用模糊查询,自动匹配判断使用单图文或多图文输出
哪位大神帮我看下代码哪里错了吗?
private void button3_Click(object sender, EventArgs e)rn rn serach();rn rn public void serach()rn rn // sqlInit();rn // Database conn = new Database();rn connection = new OleDbConnection(ConnStr);rn connection.Open();rn string s = textBoxSelectName.Text;rn string selectStudentInfo = "SELECT * FROM [Student] WHERE [姓名]='"+ textBoxSelectName +"'";rn OleDbDataAdapter Adap = new OleDbDataAdapter(selectStudentInfo, connection);rn DataSet data = new DataSet();rn Adap.Fill(data,"Student"); rn DataSet ds = data;rn dataGridViewSelectStudentManage.DataSource = ds.Tables["Student"];rn connection.Close();rnrn rn数据库的链接,添加都实现了,就是这个查询实现<em>不了</em>,输入名字的话,不出来结果,只出来一行空白。听说CSDN上的<em>大神</em>很多,特来求教!
大家帮忙看下这段代码有没有问题
不知这是否算一个组件,安装可以成功,但没有在面板上显示出来,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
微信公众平台 java开发 一个简单的消息回复问题
程序向用户发送消息有1.** 2.##3.¥¥ 三个选项,比方用户发送1返回的消息又有a.**b.##c.$$三个选项,这时,用户发送a返回相关消息,如何避免用户不发送1.直接发送a返回相关消息呢?rnrn不知道我<em>有没有</em>表达清楚!
帮我看下为什么过滤器实现不了
[code=Java][/code]import java.awt.Button;rnimport java.awt.FileDialog;rnimport java.awt.FlowLayout;rnimport java.awt.Frame;rnimport java.awt.event.*;rnimport java.io.File;rnrnrnpublic class Myfiledialog implements ActionListenerrn private Frame frame;rn private FileDialog f1,f2;rn private Button button1,button2;rn private MyFilter myfilter;rn private File[] files;rn private String fpath;rn private String fname;rn rn rnrn public void f1()rn frame=new Frame("打开保存对话框");rn button1=new Button("打开");rn button2=new Button("保存");rn button1.addActionListener(this);rn button2.addActionListener(this);rn frame.setLayout(new FlowLayout());rn frame.setBounds(100, 100, 200, 200);rn frame.add(button1);rn frame.add(button2);rn f1=new FileDialog(frame, "打开文件", FileDialog.LOAD);rn f2=new FileDialog(frame,"保存文件",FileDialog.SAVE);rn myfilter=new MyFilter();rn f1.setFilenameFilter(myfilter);rn f2.setFilenameFilter(myfilter);rn frame.setVisible(true);rn frame.addWindowListener(new WindowAdapter()rn public void windowClosing(WindowEvent e)rn System.exit(0); rn rn ); rn rn rn rn rn rn public static void main(String[] args) rn rnnew Myfiledialog().f1();rnrnrn rnrn public void actionPerformed(ActionEvent e) rn String s=e.getActionCommand();rn rn if (s.equals("打开"))rn rn f1.setVisible(true);rn rn rn rn else if(s.equals("保存"))rn f2.setVisible(true);rn rn rn rnrnrnrnrnimport java.io.File;rnimport java.io.FilenameFilter;rnrnpublic class MyFilter implements FilenameFilterrn private String[] extension; rn public MyFilter()rn extension = new String[]".jpg"; rn rn public MyFilter(String[] extension)rn this.extension = extension; rn rn public boolean accept(File dir,String name)rn for(String s : extension)rn if(name.endsWith(s))rn return true; rn rn rn return false; rn rnrn
win7下SQLSERVER 重启不了.大家帮我看下
[img=http://b62.photo.store.qq.com/http_imgload.cgi?/rurl4_b=331b089daf98247668a2704562eda58bb558349fec562f2f8203d079bc57782eb5b2f88947a07bfb9ad803acdb5f9b3af79aff210e1b0a72b419e9a98f3d7b0c06014cf2efa26b63880729729df2d6cc34b34df1&a=61&b=62][/img]rnrn[img=http://b49.photo.store.qq.com/http_imgload.cgi?/rurl4_b=331b089daf98247668a2704562eda58b986b8b3c2139bca4d5719d7a5aba8340cba543657be209218b0b94e2c65fb1d6e141311999b5dc07d727992ad7fc0370db260b7d0ffdeb756ea5bbca0872a5d9d05d927c&a=58&b=49][/img]rnrnrn[img=http://b62.photo.store.qq.com/http_imgload.cgi?/rurl4_b=331b089daf98247668a2704562eda58b7bb6c6891dd68e2f2f6a69966d80da457e1e76a2b0d988bbd28a67c1a0192a645406f785453e1d09b5c35a52a39642f8fa912b2fb53eb4d285e4aece0e1b63372af81f72&a=62&b=62][/img]rnrnrn这是怎么回事啊.... 大家<em>帮我</em>琢磨琢磨.谢谢大家拉
微信公众平台回复信息问题·求解答
INFO: gh_31684046fe07owaEuuPpIAHPRLxcwYuW_XoXcWvw1383042240972textasdf0rn我从日志把我回写的XML 打出来啦· 如上· 不知为什么没有反应· 我回写的XML那里有<em>问题</em>吗· rn求<em>大神</em>指点···StringBuffer xml=new StringBuffer();rn xml=xml.append("");rn xml=xml.append("");rn rn xml.append("");rn xml.append(we.getFromUserName());rn xml.append("");rn rn rn xml.append("");rn xml.append(we.getToUserName());rn xml.append("");rn rn xml.append("");rn xml.append(new Long(new Date().getTime()).toString());rn xml.append("");rn rn xml.append("");rn xml.append(we.getMsgType());rn xml.append("");rn rn xml.append("");rn xml.append(we.getContent());rn xml.append("");rn rn xml.append("");rn xml.append("0");rn xml.append("");rn xml.append("");
微信公众平台回复内容加链接
内容加上 '&amp;lt;a href=&quot;http://www.baidu.com&quot;&amp;gt;官网&amp;lt;/a&amp;gt;';就可以了。  
微信公众平台开发(2)回复超链接
xml数据格式 <em>回复</em>超链接xml数据格式如下,Content内容用参数(%s)无效 $textTpl = " %s &lt;a href=&quot;http://www.2345.com/?k381740148&quot;&gt;这是个超链接&lt;/a&gt; 0 "; 相关转义字符 链接中需要转义的的字符如下: <     &lt; >     &gt
高人请帮我看下代码
过程: rnif exists(select name from sysobjects where name='sp_sousuo' and type = 'p') rn drop proc sp_sousuo rngo rncreate proc sp_sousuo rnas rnselect * from tb_cboss_code_cmpCode rngo rn类: rnNamespace Liu rnrn Public Class GetDataSet rnrn Public Function Getds(ByVal sqlcon As String, ByVal sqlstr As String) As DataSet rnrn Dim con As New System.Data.SqlClient.SqlConnection(sqlcon) rn Dim cmd As New System.Data.SqlClient.SqlCommand("sp_sousuo", con) rn cmd.CommandType = CommandType.StoredProcedure rn Dim dap As New System.Data.SqlClient.SqlDataAdapter(cmd) rn Dim ds As New System.Data.DataSet rn dap.Fill(ds) rn Return ds rnrn End Function rn End Class rnEnd Namespace rn程序中: rnImports WindowsApplication3.Liu rnPublic Class Form1 rnrn Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load rn Dim ss As New Liu.GetDataSet rnrn DataGridView1.DataSource = ss.Getds("Data Source=127.0.0.1;Initial Catalog=test;Integrated Security=True", "select * from tb_cboss_code_cmpCode") rn End Sub rnEnd Class rn为什么不报错,但是DataGridView1中什么也不显示呢rn我还是学习中的菜鸟,请大家帮忙
帮我看下这段代码如何写
运行环境:TCrn<em>问题</em>描述: 如何求各科平均分级总分的平均分rn下面的<em>代码</em> 有<em>问题</em>的地方我都描述出来了 希望大家<em>帮我</em>参考下 看看该如何写完rn<em>代码</em>如下rn#include rn#include rn#include rn#define LEN sizeof(struct student) rn#define HEADER "\nnumber\tname\tsex\tage\tmath computer english score\n" rn#define FORMAT "%ld\t%s\t%s\t%d\t%-3g\t %-3g\t %-3g\t%2.0f\n" rn#define DATE p->num,p->name,p->sex,p->age,p->math,p->computer,p->english,p->score=p->math+p->computer+p->englishrnstruct student *insert(struct student *head,struct student *stud); rnstruct student rn rn long num; rn char name[15]; rn char sex[7]; rn int age; rn float math; rn float computer; rn float english; rn float score; rn struct student *next; rn; rnint n; rnvoid mainmenu(void); rnstruct student *creat(void); rnvoid input(struct student *stu); rnvoid print(struct student *head) ; rnstruct student *sort_avgen(struct student *head,int n); rnstruct student *sort_avgma(struct student *head,int n);rnstruct student *sort_avgco(struct student *head,int n);rnstruct student *sort_avgso(struct student *head,int n);rnmain() rn rn struct student *head,*stu; rn long del_num,search_num; rn int i; rn int have=0; rn int flag; rn char c,t1,t2,t3,k; rn char search_name[15]; rn system("cls"); rn enter(); rn do rn flag=0; rn window(1,1,80,25); rn system("cls"); rn mainmenu(); rn do rn t1=getch(); rn while(t1'7'); rn window(1,1,80,25); rn clrscr(); rn switch(t1) rn rn case'1': rn printf("Please input records(It will be end if the number is 0):\n"); rn head=creat(); rn print(head); rn have=1; rn getch(); rn break; rn rn case'2': rn for(;;) rn system("cls"); rn window(34,8,48,10); rn textcolor(14); rn cprintf("1)By math."); rn window(34,10,48,12); rn cprintf("2)By Computer."); rn window(34,12,48,14); rn cprintf("3)By English."); rn window(34,14,48,16); rn cprintf("4)total Score."); rn window(34,16,48,18); rn cprintf("5)Back."); rn do rn t2=getch(); rn while(t2'6'); rn system("cls"); rn window(1,1,80,25); rn textcolor(2); rn switch(t2) rn rn case '1': /*底下这样调用对不对???*/ /*求平均分*/rn sort_avgma(head,n); rn print(head); rn getch(); rn break; rn case'2': rn sort_avgco(head,n); rn print(head); rn getch(); rn break; rn case'3': rn sort_avgen(head,n); rn print(head); rn getch(); rn break; rn case'4': rn sort_avgso(head,n); rn print(head); rn getch(); rn break; rn rn case'5': rn flag=1;break;rn rn if(flag) break; rn rn break; rn while(t1!='0'); rn rnrnrnrnrnvoid mainmenu(void) /*创建主菜单*/rn window(15,7,67,9); rn textcolor(12); rn cprintf("1)"); rn textcolor(2); rn cprintf("Creat a new manage system of student's grade."); rn window(15,15,67,17); rn textcolor(12); rn cprintf("2)"); rn textcolor(2); rn cprintf("Score."); /*求平均分*/rn rn rnrnstruct student *creat(void) /*建立一个数据输入的链表*/ rn rn struct student *head; rn struct student *p1,*p2; rn int i; rn n=0; /*n是结点个数*/ rn p1=p2=(struct student*)malloc(LEN); rn input(p1); rn head=NULL; rn while(p1->num!=0) /*当输入的学号为0时数据输入完毕*/ rn n+=1; rn if(n==1) rn head=p1; rn else rn p2->next=p1; rn p2=p1; rn p1=(struct student*)malloc(LEN); rn input(p1); rn rn p2->next=NULL; rn return head; rn rnrnvoid input(struct student *stu) /*一个被反复调用的数据输入函数*/ rn rn float s1,s2,s3; rn printf("No:"); rn scanf("%ld",&stu->num); rn if(stu->num!=0) rn getchar(); rn printf("Name:"); rn gets(stu->name); rn printf("Sex(male or female):"); rn gets(stu->sex); rn printf("Age:"); rn scanf("%d",&stu->age); rn printf("math:"); rn scanf("%f",&s1); rn stu->math=s1; rn printf("Computer:"); rn scanf("%f",&s2); rn stu->computer=s2; rn printf("English:"); rn scanf("%f",&s3); rn stu->english=s3; rn getchar(); rn rn rn rnvoid print(struct student *head) /*打印成绩*/ rn rn struct student *p; rn clrscr(); rn printf(HEADER); rn p=head; rn if(head!=NULL) rn do rn printf(FORMAT,DATE); rn p=p->next; rnrn while(p!=NULL); rn rnrnrnrnrnrn /*如何写底下的求平均分函数???*/rn
jquery ...帮我看下我的代码
[code=JScript]rnrn//总感觉我写的jquery<em>代码</em>太小学生了。<em>帮我</em>分析下这段发信的JQUERY<em>代码</em>。O(∩_∩)O谢谢rnrn$('#PmPost').livequery('click',function()rn if(!$("input[name=to_name]").val()) return;rn if(!$("input[name=to_id]").val()) return;rn if(!$("#pm_desc").val()) return;rn var url = 'comm.<em>php</em>?act=addPm';rn var data = 'to_id':$("input[name=to_id]").val(),'pm_desc':$('#pm_desc').val(),'type':$("input[name=type]").val();rn var callback = function(response)rn if(response)rn $('#send_op1').css('display','none');rn $('#send_op2').css('display','block');rn $('#send_op2 .note').text('发信成功');rn rn rn $.post(url,data,callback);rn)rnrn[/code]
大家帮我看下这段代码...
[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大家知道为什么吗?有什么办法?rnrn
帮我看下这段很短的代码
return sql.sqlCommand("insert into room(rnumber,rhnumber,rclass,rperson,rgrade) values('"+this.r_number+"','"+this.r_hnumber+"','"+this.r_class+"','"+this.r_person+"','"+this.r_grade+"')");rn到底哪出错了
帮我看下面的代码!
这是一个日历的程序,在想实现以下功能,鼠标右键所指的日期上点击右键rn出现一个菜单,在菜单上点击"显示日期"按钮 显示鼠标所指的日期rn怎么修改啊rn rn rnrnrn
高手帮我看下代码哪里有问题
[code=JScript][/code]rnrn 无标题文档rn rnrnrnrn rnrnrn rn rn rn rn rn rn rn 关闭rn rn rn 北京rn 上海rn 广州rn 武汉rn rn rn 成都rn 徐州rn 深圳rn 珠海rn rnrnrnrnrnrnrn点了不传值,是<em>代码</em>有<em>问题</em>?
帮我看下代码,哪里有问题
[code=JScript]rnrnrnrnrnrn 无标题页rnrnrn rnA rnB rnrnC rnrnD rnrnE rn rn是 rn不是rn rnrnrn rnrnrn rnrn[/code]<em>帮我</em>看看上面的<em>代码</em>哪里有<em>问题</em>?我运行起来弹出来一个undefined来
帮我看下这段代码那里有问题
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 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 rn rn rn 温馨提示:如您需要更改联系电话请和当地代理商联系rn rn rn rn rn rn rn rn rn rn rnrnrnrn有的机器可以执行,有的机器不能执行那个下拉菜单谢谢
帮我看下代码问题出在哪?
[code=C#]rn private void button1_Click(object sender, EventArgs e)rn rn if (this.comboBox1.Text == "查询全部")rn rn string ConnectionString = "Data Source=fly;user=fly;password=fly;";//写连接串 rn OracleConnection conn = new OracleConnection(ConnectionString);//创建一个新连接 rn conn.Open();rn int j = 0;rn OracleCommand cmd = conn.CreateCommand();rn cmd.CommandText = "select * from(select * from sms_alarm )";//在这儿写sql语句rn OracleDataReader odr = cmd.ExecuteReader();//创建一个OracleDateReader对象rn listView1.Items.Clear();rn while (odr.Read())//读取数据,如果odr.Read()返回为false的话,就说明到记录集的尾部了 rn rnrnrnrnrn listView1.Update();rn listView1.Items.Add(odr.GetOracleString(1).ToString(), j);rn listView1.Items[j].SubItems.Add(odr.GetInt32(3).ToString());rn listView1.Items[j].SubItems.Add(odr.GetOracleString(7).ToString());rn listView1.Items[j].SubItems.Add(odr.GetString(2));rn listView1.Items[j].SubItems.Add(odr.GetOracleString(8).ToString());rn listView1.EndUpdate();rn j = j + 1;rnrnrn rnrn rn else if(this.comboBox1.Text=="手机号码")rn rn string ConnectionString = "Data Source=fly;user=fly;password=fly;";//写连接串 rn OracleConnection conn = new OracleConnection(ConnectionString);//创建一个新连接 rn conn.Open();rn int j = 0;rn OracleCommand cmd = conn.CreateCommand();rn cmd.CommandText = "select PHONE_NO,PHONE_AREA,SMS_CONTENT,ALARM_TIME,REPLY_SMS_CONTENT from sms_alarm where PHONE_NO='" + textBox1.Text + "' ";//在这儿写sql语句rn OracleDataReader odr = cmd.ExecuteReader();//创建一个OracleDateReader对象rn listView1.Items.Clear();rn if (odr.HasRows)rn rn while (odr.Read())//读取数据,如果odr.Read()返回为false的话,就说明到记录集的尾部了 rn rnrnrn listView1.Update();rn listView1.Items.Add(odr.GetOracleString(1).ToString(), j);rn listView1.Items[j].SubItems.Add(odr.GetInt32(3).ToString());rn listView1.Items[j].SubItems.Add(odr.GetOracleString(7).ToString());rn listView1.Items[j].SubItems.Add(odr.GetString(2));rn listView1.Items[j].SubItems.Add(odr.GetOracleString(8).ToString());rn listView1.EndUpdate();rn j = j + 1;rnrnrn rn rn elsern rn MessageBox.Show("没有该纪录!!","提示",MessageBoxButtons.OK,MessageBoxIcon.Hand);rn textBox1.Text = "";rn rn rn else if (this.comboBox1.Text == "报警时间(0000-00-00 00:00:00)")rn rn string ConnectionString = "Data Source=fly;user=fly;password=fly";//写连接串 rn OracleConnection conn = new OracleConnection(ConnectionString);//创建一个新连接 rn conn.Open();rn int j = 0;rn OracleCommand cmd = conn.CreateCommand();rn cmd.CommandText = "select PHONE_NO,PHONE_AREA,SMS_CONTENT,ALARM_TIME,REPLY_SMS_CONTENT from sms_alarm where ALARM_TIME='" + textBox1.Text + "' ";//在这儿写sql语句rn OracleDataReader odr = cmd.ExecuteReader();//创建一个OracleDateReader对象rn listView1.Items.Clear();rn if (odr.HasRows)rn rn while (odr.Read())//读取数据,如果odr.Read()返回为false的话,就说明到记录集的尾部了 rn rnrnrnrn listView1.Update();rn listView1.Items.Add(odr.GetOracleString(1).ToString(), j);rn listView1.Items[j].SubItems.Add(odr.GetInt32(3).ToString());rn listView1.Items[j].SubItems.Add(odr.GetOracleString(7).ToString());rn listView1.Items[j].SubItems.Add(odr.GetString(2));rn listView1.Items[j].SubItems.Add(odr.GetOracleString(8).ToString());rn listView1.EndUpdate();rn j = j + 1;rnrnrnrnrn rn rn elsern rn MessageBox.Show("没有该纪录!!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Hand);rn textBox1.Text = "";rn rn rn rn rn else if (this.comboBox1.Text == "报警手机所在地")rn rn string ConnectionString = "Data Source=fly;user=fly;password=fly";//写连接串 rn OracleConnection conn = new OracleConnection(ConnectionString);//创建一个新连接 rn conn.Open();rn int j = 0;rn OracleCommand cmd = conn.CreateCommand();rn cmd.CommandText = "select PHONE_NO,PHONE_AREA,SMS_CONTENT,ALARM_TIME,REPLY_SMS_CONTENT from sms_alarm where PHONE_AREA='" + textBox1.Text + "' ";//在这儿写sql语句rn OracleDataReader odr = cmd.ExecuteReader();//创建一个OracleDateReader对象rn listView1.Items.Clear();rn if (odr.HasRows)rn rn while (odr.Read())//读取数据,如果odr.Read()返回为false的话,就说明到记录集的尾部了 rn rnrnrn listView1.Update();rn listView1.Items.Add(odr.GetOracleString(1).ToString(), j);rn listView1.Items[j].SubItems.Add(odr.GetInt32(3).ToString());rn listView1.Items[j].SubItems.Add(odr.GetOracleString(7).ToString());rn listView1.Items[j].SubItems.Add(odr.GetString(2));rn listView1.Items[j].SubItems.Add(odr.GetOracleString(8).ToString());rn listView1.EndUpdate();rn j = j + 1;rnrnrnrnrn rn rn elsern rn MessageBox.Show("没有该纪录!!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Hand);rn textBox1.Text = "";rn rn rn else if (this.comboBox1.Text == "报警内容关键字")rn rn string ConnectionString = "Data Source=fly;user=fly;password=fly";//写连接串 rn OracleConnection conn = new OracleConnection(ConnectionString);//创建一个新连接 rn conn.Open();rn int j = 0;rn OracleCommand cmd = conn.CreateCommand();rn cmd.CommandText = "select PHONE_NO,PHONE_AREA,SMS_CONTENT,ALARM_TIME,REPLY_SMS_CONTENT from sms_alarm where SMS_CONTENT LIKE '%" + textBox1.Text + "%' ";//在这儿写sql语句rn OracleDataReader odr = cmd.ExecuteReader();//创建一个OracleDateReader对象rn listView1.Items.Clear();rn if (odr.HasRows)rn rn while (odr.Read())//读取数据,如果odr.Read()返回为false的话,就说明到记录集的尾部了 rn rnrnrnrn listView1.Update();rn listView1.Items.Add(odr.GetOracleString(1).ToString(), j);rn listView1.Items[j].SubItems.Add(odr.GetInt32(3).ToString());rn listView1.Items[j].SubItems.Add(odr.GetOracleString(7).ToString());rn listView1.Items[j].SubItems.Add(odr.GetString(2));rn listView1.Items[j].SubItems.Add(odr.GetOracleString(8).ToString());rn listView1.EndUpdate();rn j = j + 1;rnrnrn rn rn elsern rn MessageBox.Show("没有该纪录!!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Hand);rn textBox1.Text = "";rn rn rn rn rn[/code]rnrnrn这是一段模糊查询数据库方法的<em>代码</em>,我用全部查询时没<em>问题</em>,正常运行,可是当我用其它几种方式查时就会出错,像什么转换类型不对等等,可是明明就是和全部查询一样的<em>代码</em>怎么会出<em>问题</em>了呢,弄不明白,大家帮看看
帮我看下面的代码
为什么类的实例不能访问其实例字段?:rnTypern TNj = recordrn njh: integer; rn ydns: integer; rn Njlx: integer; rn njmc: string; rn end;rnrn TKs = recordrn ksmc: string;rn ksh: integer;rn kch: string;rn end;rnrn TNodeInf = classrn privatern fNj: TNj;rn fKs: Tksary;rn rn Private declarations rn publicrn // constructor Create(xqh,xqmc: string);rn procedure SetNj(njmc: string; njh,ydns,Njlx: integer); rn procedure SetKs(ksmc,kch: array of string; ksh: array of integer );rn rn end;rnrnimplementationrnrnprocedure TNodeInf.SetNj(njmc: string; njh,ydns,Njlx: integer);rnbeginrnrn fNj.njmc := njmc;rn fnj.njh := njh;rn fnj.ydns := ydns;rn fnj.Njlx := Njlx;rnend;rn....rnrn为什么我在建立该对象的实例后,通过其实例调用时:rnNodeInfo.SetNj('dd',9,7,5) ;rn总是Access violation at address 004862af in ...错误?rn
帮我看下面的代码
SelectA_Condition:=' Where '+ memo1.Text ;rn SelectA_sql:='exec '+Title+' ''*'','' '+ SelectA_Condition + ''' ' ;rn edit1.text:=SelectA_sql;rn F_Query.Close ;rn Seach.Show;rnrn[color=#FF0000] DM.CDS_SelectA.Close ;rn DM.CDS_SelectA.CommandText :=SelectA_sql;rn DM.CDS_SelectA.Open;rnrn IF DM.CDS_SelectA.RecordCount >0 thenrn Seach.Closern elsern beginrn Application.MessageBox('无记录,请检查条件重新查询','查询',MB_ICONError);rn Seach.close;rn end;[/color]rn这个执行后,F_Query不会close,seach这个窗体可以显示,结果也能查出来,但是查出来后seach也不close,rn如果不要后面经色<em>代码</em>部份,F_Query就会close,Seach窗体也会显示出来rn
大家帮我看下这个代码
用红色画个矩形rn<em>代码</em>如下: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运行结果却是花屏,为什么呢。。
大侠帮我看下代码
rnrnrnrn rnrn rnrn Dell 2135cn MFPrnrnrn rn rn rnrnrnrnrnrn rn rn English rn Simple Chinese rn rn Printer Statusrnrn rn rn rn rn rnrn Printer Jobsrn Printer Settingsrn Print Server Settingsrn Copy Printer Settingsrn Print Volumern Address Bookrn Printer Informationrn Tray Settingsrn E-Mail Alertrn Set Passwordrn Online Helprn Order Supplies at:rn www.dell.com/suppliesrn Contact Dell Support at:rn support.dell.comrn rnrnrnrnrnrn为什么达不到显示的效果呢?就是应该改变下语言(数组中只列举出两个例子)rn
帮我看下面的代码!!
我编写<em>代码</em>时写了如下<em>代码</em>(我已经把它简化到了最简单了,还是找不出错误)rn不知第九行的table_div.appendChild(table_node)是不是有错,只要我把这一行<em>代码</em>删除就没有错误了.请高手帮忙改进一下。rn rnrn rndefine the table size:rn rnrows Xrncolumnsrn rnrnrn rnThe table appears here:rn rnrnrn
9598ME服务器DCOM配置步骤详解下载
95/98/ME服务器DCOM 配置 如Server端使用Windows 95,需考虑下列问题: 1. 安全性将受到限制。 2. 应手工在Startup中加进Server组件的启动程序。 3. 运行RPCSS.exe后,客户端才可建立连接。 4. 由于Server Component 是一个Class,当没有客户程序参照它时,它会自动终止。可是,Windows 95没有自动启动它的机制。所以,要保证Server Component不会从内存卸载,需在Server Component中加入一个Form,Visible为False,程序从Form 启动。 相关下载链接:[url=//download.csdn.net/download/wanglovec/3256251?utm_source=bbsseo]//download.csdn.net/download/wanglovec/3256251?utm_source=bbsseo[/url]
java单例模式的例子下载
java单例模式的例子java单例模式的例子java单例模式的例子 相关下载链接:[url=//download.csdn.net/download/yanxiaoyanwuyanfei/3375390?utm_source=bbsseo]//download.csdn.net/download/yanxiaoyanwuyanfei/3375390?utm_source=bbsseo[/url]
spring-security 3.02 jar包及源码.rar下载
spring-security 3.02 jar包及源码.rar 相关下载链接:[url=//download.csdn.net/download/cbxjj/3673016?utm_source=bbsseo]//download.csdn.net/download/cbxjj/3673016?utm_source=bbsseo[/url]
相关热词 c# gdi 占用内存 c#中遍历字典 c#控制台模拟dos c# 斜率 最小二乘法 c#进程延迟 c# mysql完整项目 c# grid 总行数 c# web浏览器插件 c# xml 生成xsd c# 操作sql视图
我们是很有底线的