javascript中的正则表达式看不太懂,求解释
 <script type="text/javascript">
                        /* 赋值合同行下标 */
                        var electronicContractRowIdx = 0,
                            /* 获取合同模板 */
                            electronicContractTpl = $("#electronicContractTpl")
                            .html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
                            alert("合同模板---"+electronicContractTpl);
                        $(document).ready(function() {
                            var data = ${fns:toJson(investProject.electronicContractList)};
                            alert("toJSON---"+data);
                            for (var i=0; i<data.length; i++){
                                //d
                                addRow('#electronicContractList', electronicContractRowIdx, electronicContractTpl, data[i]);
                                electronicContractRowIdx = electronicContractRowIdx + 1;
                            };
                        });
                    </script>

1个回答

 替换掉//<!--和//-->内容而已,一般这2个内容放在script里面,防止浏览器不支持js时也不会显示js代码出来因为<!---->是html的注释,一般来说不需要加了
showbo
支付宝加好友偷能量挖 回复一支穿雲箭: g是全局匹配,还有i是忽略大小写,m是多行
3 年多之前 回复
qq_25250467
一支穿雲箭 谢谢,现在基本看懂了,/g什么意思?结束语法吗? 看了语法规则好像不是这么写的
3 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
求解释下,看不太懂(用递归求最大公约数)
[code=c]#include rnusing namespace std; rnint gcd(int x, int y); rnvoid main() rn rn int m,n; rn cout<<"输入两个数字:"; rn cin>>m>>n; rn cout<<"最大公约数:"; rn cout<
我看不太懂
c++书上的一道习题,答案如下,我看不懂他的构造函数Time()和显示函数rndisplay()愿出60分,请大虾相告(不懂的地方我都写在函数体中)rn#include rn#include rn#include rn#include rnrnclass Timernpublic:rn Time(char* s=NULL);rn void operator+(Time& ti);rn void operator-(Time& ti);rn void Display();rnprotected:rn int hour;rn int minute;rn int second;rn;rnrnTime::Time(char* s)rnrn char str[9]=0;rn char t[3]=0; 两数组做什么用rn if(s) 什么意思rn strncpy(str, s, 8); 什么意思rn elsern _strtime(str); 这是个什么函数rnrn hour = atoi( strncpy(t, str, 2) ) % 24; (atoi是什么函数,这是干什么) rn minute = atoi( strncpy(t, &str[3], 2) ) % 60; rn second = atoi( strncpy(t, &str[6], 2) ) % 60; rnrnrnvoid Time::operator+(Time& ti)rnrn int st;rn st = second + ti.second;rn second = (st) % 60;rn st = st/60 + minute + ti.minute;rn minute = (st) % 60;rn st = st/60 + hour + ti.hour;rn hour = (st) % 24;rnrnrnvoid Time::operator-(Time& ti)rnrn int st;rn st = 60 + second - ti.second;rn second = st % 60;rn st = 60 + st/60 + minute - ti.minute -1;rn minute = st % 60;rn st = 24 + st/60 + hour - ti.hour -1;rn hour = (st) % 24;rn rnrnvoid Time::Display()rnrn char result[9] = "XX:XX:XX";rn result[0]='0'+hour%10; (要这么多数组元素做什么,除十做什么)rn result[1]='0'+hour/10;rn result[3]='0'+minute%10;rn result[4]='0'+minute/10;rn result[6]='0'+second%10;rn result[7]='0'+second/10;rn cout <
这个,看不太懂!
<%Function Adjust_dapi(adj_str)rn dim final_str,irn adj_str=Trim(adj_str)rn final_str=""rn If Len(adj_str)>0 thenrn for i=1 to Len(adj_str)rn Select Case Mid(adj_str,i,1)rn Case Chr(13):final_str=final_str & ""rn Case Chr(10):final_str=final_str & ""rn Case Else:final_str=final_str & Mid(adj_str,i,1)rn End Selectrn Nextrn End ifrn Adjust_dapi=final_strrnEnd Function%>rn谁能帮忙点一点?
有一段代码看不太懂,求解释
class ModelMetaclass(type):rnrn def __new__(cls, name, bases, attrs):rn if name=='Model':rn print(name)rn return type.__new__(cls, name, bases, attrs) #第一个returnrn print(name)rn print('Found model: %s' % name)rn mappings = dict()rn for k, v in attrs.items():rn if isinstance(v, Field):rn print('Found mapping: %s ==> %s' % (k, v))rn mappings[k] = vrn for k in mappings.keys():rn attrs.pop(k)rn attrs['__mappings__'] = mappings rn attrs['__table__'] = namern return type.__new__(cls, name, bases, attrs)rnrn为什么 第一个return 执行完后还会往后面执行??
求二叉树深度的递归算法,看不太懂
int depth(btree *b)rn int dep1,dep 2;rn if (b==NULL) return 0;rn elsern dep1=dep1(b->left);rn dep2=dep2(b->right);rn if(dep1>dep2) return dep1+1;rn else return dep2+1 ;rnrn rnrnrnrn我怎么感觉递归完后dep1和dep2都是0啊
一个DbCommand看不太懂,求详解
@@DbCommand("Haiku";"s_DirectoryListExt";"1";"1") rn这个是什么意思,好像功能是发邮件是点击收件人出来的搜索范围下拉框的初始化命令rns_DirectoryListExt是代理还是表单还是视图还是特殊公式,定义在哪里?rnrnrn或者说怎么修改图片中,搜索范围那个下拉框,默认显示第二个选项而不是“联系人”rn[img=https://img-bbs.csdn.net/upload/201309/02/1378093923_799962.jpg][/img]rn
C程序看不太懂,求讲解
整体程序:rn// 长序列的快速卷积rn// 用重叠保留法计算一个长序列和一个短序列的快速卷积。通常用于数字滤波rn// x--双精度一维数组,长度为len。开始时存放长序列x(i), 最后存放线性卷积的值rn// h--双精度一维数组,长度为m。存放短序列h(i).rn// len--整形变量。长序列x(i)的长度。rn// m--整形变量。短序列h(i)的长度。rn// n--整形变量。对长序列x(i)进行分段的长度。一般选取n大于段序列h(i)长度m的两倍以上,rn// 切必须是2的整数次幂,即n = pow(2, s);rnvoid convols(double x[], double h[], int len, int m, int n)rnrn int i, j, i1, n2, num, nblks;rn double t;rn double *r, *s;rn r = (double*)malloc(n * sizeof(double));rn s = (double*)malloc((n - m + 1) * sizeof(double));rn n2 = n / 2;rn num = n - m + 1;rn nblks = (int)floor((len - n + m) / (double) num) + 1;rn // h[i] 补零rn for (i = m; i < n; i++)rn rn h[i] = 0.0;rn rn // 计算h的fftrn rfft(h, n);rn rn for ( j = 0; j < nblks; j++)rn rn if (j == 0)rn rn for (i = 0; i < (m-1); i++)rn rn r[i] = 0.0;rn rn for (i = (m-1); i < n; i++)rn rn i1 = i - m + 1;rn r[i] = x[i1];rn rn rn elsern rn for (i = 0; i < n; i++)rn rn i1 = i + j * num - m + 1;rn r[i] = x[i1];rn rn for (i = 0; i < num; i++)rn rn i1 = i + ( j - 1) * num;rn x[i1] = s[i];rn rn rn rfft(r, n);rn r[0] = r[0] * h[0];rn r[n2] = r[n2] * h[n2];rn for (i = 1; i < n2; i++)rn rn t = h[i] * r[i] - h[n-i] * r[n - i];rn r[n - i] = h[i] * r[n - i] + h[n - i] * r[i];rn r[i] = t;rn rn irfft(r, n);rn for ( i = (m - 1); i < n; i++)rn rn i1 = i - m + 1;rn s[i1] = r[i];rn rn rn for ( i = 0; i < num; i++)rn rn i1 = i + (j - 1) * num;rn x[i1] = s[i];rn rn rn i1 = j * num;rn for (i = i1; i < len; i++)rn rn x[i] = 0.0;rn rn rn free(r);rn free(s);rnrnrn请问rnfor (i = 1; i < n2; i++)rnrnt = h[i] * r[i] - h[n-i] * r[n - i];rnr[n - i] = h[i] * r[n - i] + h[n - i] * r[i];rnr[i] = t;rnrn这几句是什么意思,为什么频域相乘这么复杂?只有这么多分了,求讲解rn程序中的rfft和irfft是做傅里叶变换和反变换
AJAX不太懂,帮忙解释下
//设置显示位置 rn function setOffsets() rn completeTable.style.width = inputField.offsetWidth; + "px";rn var left = calculateOffset(inputField, "offsetLeft");rn// var left = inputField(offsetLeft);rn var top = calculateOffset(inputField, "offsetTop") + inputField.offsetHeight;rn alert(left);rn alert(top);rn completeDiv.style.border = "black 1px solid";rn completeDiv.style.left = left + "px";rn completeDiv.style.top = top + "px";rn rn //计算显示位置 rn function calculateOffset(field, attr) rn var offset = 0;rn while(field) rn offset += field[attr];rn field = field.offsetParent;rn rn return offset;rn rn计算显示位置,为什么要写个函数来计算了,rnwhile(field)是什么意思,为什么要用循环,他代表什么rn还要 offset += field[attr];rn field = field.offsetParent;rn都是什么意思,今天刚看这代码,有点摸不着头绪rn请大家赐教
有段程序看不太懂
public static int ExecuteSql(string SQLString)rn rn using (SqlConnection connection = new SqlConnection(connectionString))rn rn using (SqlCommand cmd = new SqlCommand(SQLString,connection))rn rn tryrn rn connection.Open();rn int rows=cmd.ExecuteNonQuery();rn return rows;rn rn catch(System.Data.SqlClient.SqlException E)rn rn connection.Close();rn throw new Exception(E.Message);rn rn rn rn rn谁帮我吧这段程序注释上解释rn小弟感谢了
刚学看不太懂~~~
[code=C#]namespace Webrnrn public partial class LeftContents : System.Web.UI.UserControlrn rn private string strqry,strurl,strfield,strmytitle; //四个变量供外站调用.分别为SQL语句,超链接地址,列表字段名,菜单名rn protected string address, post, phone, fax, email;rn public string strqryprn rn setrn rn strqry = value;rn rn getrn rn return strqry;rn rn rn public string strurlprn rn setrn rn strurl = value;rn rn getrn rn return strurl;rn rn rn public string strfieldprn rn setrn rn strfield = value;rn rn getrn rn return strfield;rn rn rn public string strmytitleprn rn setrn rn strmytitle = value;rn rn getrn rn return strmytitle;rn rn rn protected void Page_Load(object sender, EventArgs e)rn rn pageload();rn rn private void pageload()rn rn rn DataView dv;rn dv = DBFun.GetDataView(strqry);rn rp_menu.DataSource = dv;rn rp_menu.DataBind();rn if (Application["contact"] != null)rn rn string[] contact=(string[])Application["contact"];rn address = contact[0];rn post = contact[1];rn phone = contact[2];rn fax = contact[3];rn email = contact[4];rn rnrn rn rn[/code]rnrn大家看看这是啥意思?我直接读出来绑定带前台去不行吗》?这里定义这么多public 还有 set get 望大家指点~~~~
这种写法看不太懂?
FileSystemObject rn 对象教程
数据库出错,看不太懂!
Project project.exe raised exception class EOleException with message 'Arguments are of the wrong type,are out of acceptable range, or are in conflict with one another'. Process stopped. Use Step or Run to continue.
excel的文件格式看不太懂!
Table 2-1. Cell AttributesrnrnByte Offset Bit Description Contentsrnrn 0 7 Cell is not hidden 0brnrn Cell is hidden 1brnrn 6 Cell is not locked 0brnrn Cell is locked 1brnrn 5-0 Reserved, must be 0 000000brnrn 7-6 Font number (4 possible)rnrn 5-0 Cell format codernrn 2 7 Cell is not shaded 0brnrn Cell is shaded 1brnrn 6 Cell has no bottom border 0brnrn Cell has a bottom border 1brnrn 5 Cell has no top border 0brnrn Cell has a top border 1brnrn 4 Cell has no right border 0brnrn Cell has a right border 1brnrn 3 Cell has no left border 0brnrn Cell has a left border 1brnrn 2-0 Cell alignment code rnrn general 000brnrn left 001brnrn center 010brnrn right 011brnrn fill 100brnrn Multiplan default align. 111brnrn===================rn如上所示,不知道哪位老兄曾经研究过这个东东。
一段程序看不太懂
CString sPath;rn GetModuleFileName(NULL,sPath.GetBufferSetLength(MAX_PATH+1),MAX_PATH);//不懂,各个参数都是什么意义rn sPath.ReleaseBuffer ();//不懂rn int nPos;rn nPos=sPath.ReverseFind ('\\');rn sPath=sPath.Left (nPos);rn nPos=sPath.ReverseFind('\\');rn sPath=sPath.Left (nPos);rn CString lpszFile = sPath + "\\db6.mdb";rn据说,用上边一段代码就可以得到,文件的完整路径名,各个函数都起什么作用,原理是什么?
一段看不太懂的宏定义!~
[code=C/C++]class __declspec(novtable) CIOMessageMaprnrnpublic:rn virtual bool ProcessIOMessage(IOType clientIO, ClientContext* pContext, DWORD dwSize) = 0;rn;rnrn#define BEGIN_IO_MSG_MAP() \rnpublic: \rn bool ProcessIOMessage(IOType clientIO, ClientContext* pContext, DWORD dwSize = 0) \rn \rn bool bRet = false; rnrn#define IO_MESSAGE_HANDLER(msg, func) \rn if (msg == clientIO) \rn bRet = func(pContext, dwSize); rnrn#define END_IO_MSG_MAP() \rn return bRet; \rn [/code]rnrn谁能给详细的讲讲这段代码啊???这个宏定义,只要调用ProcessIOMessage,都会触发吗?
这个程序看不太懂
/*showchat2.c 按行和列打印字符*/rn#include rn#include rnvoid display(char cr,int lines,int width);rnint main()rnrn int ch;//要打印的行数rn int rows,cols;//行数和列数rn printf("Enter a character and two integers:\n");rn while((ch=getchar())!='\n')rn rn if(scanf("%d %d",&rows,&cols)!=2)rn break;rn display(ch,rows,cols);rn while(getchar()!='\n')rn continue;rn printf("enter another character and two integers:\n");rn printf("enter a newline to quit.\n");rn rn printf("Bye.\n");system("pause");rn return 0;rn rn rn void display(char cr,int lines,int width)rn rn int row,col;rn for(row=1;row<=lines;row++)rn rn for(col=1;col<=width;col++)rn putchar(cr);rn putchar('\n');rn rn system("pause");rn rn rnrnrn重要的是这一块是怎么运行的:rn while((ch=getchar())!='\n')rn rn if(scanf("%d %d",&rows,&cols)!=2)rn break;//这个语句不是控制下面的不用再运行了吗rn display(ch,rows,cols);rn while(getchar()!='\n')rn continue;//这个是不是跳出了上面这个whilern printf("enter another character and two integers:\n");rn printf("enter a newline to quit.\n");rn rnrn 还有,就是为什么输入字符后,要输入空格,再输入数字,才有效?????rn 能否全面一点给我讲一下
opengl 错误看不太懂?
[code=C/C++]rnrnNeNe_lesson_object.obj : error LNK2019: unresolved external symbol _auxDIBImageLoadA@4 referenced in function "struct _AUX_RGBImageRec * __cdecl LoadBMP(char *)" (?LoadBMP@@YAPAU_AUX_RGBImageRec@@PAD@Z)rn1>F:\shiter\code\NeNe_lesson_object\Debug\NeNe_lesson_object.exe : fatal error LNK1120: 1 unresolved externalsrnrn[/code]rn代码:就是nene的教程,纹理映射,vs 2010 expressrn[code=C/C++]rnrn#include "stdafx.h"rn#include // Windows的头文件rn#includern//#include // 包含最新的gl.h,glu.h库rn//#include // 包含OpenGL实用库rn#include // GLaux库的头文件rn//#includernrnrnrnrn#pragma comment(lib, "opengl32.lib") rn#pragma comment(lib, "glu32.lib") rn#pragma comment(lib, "glut32.lib") rnrnrnHGLRC hRC=NULL; // 窗口着色描述表句柄rnHDC hDC=NULL; // OpenGL渲染描述表句柄rnHWND hWnd=NULL; // 保存我们的窗口句柄rnHINSTANCE hInstance; // 保存程序的实例rnrnbool keys[256]; // 保存键盘按键的数组rnbool active=TRUE; // 窗口的活动标志,缺省为TRUErnbool fullscreen=TRUE; // 全屏标志缺省,缺省设定成全屏模式rnrnGLfloat rtri; // 用于三角形的角度rnGLfloat rquad; // 用于四边形的角度rnrnGLfloat xrot; // X 旋转量rnGLfloat yrot; // Y 旋转量rnGLfloat zrot; // Z 旋转量rnrnGLuint texture[1]; // 存储一个纹理rnrnAUX_RGBImageRec *LoadBMP(char *Filename) // 载入位图图象rnrn FILE *File=NULL; // 文件句柄rnrn if (!Filename) // 确保文件名已提供rn rn return NULL; // 如果没提供,返回 NULLrn rn File=fopen(Filename,"r"); // 尝试打开文件rn if (File) // 文件存在么?rn rn fclose(File); // 关闭句柄rn return auxDIBImageLoad(Filename); // 载入位图并返回指针rn rn return NULL; // 如果载入失败,返回 NULLrnrnrnrnint LoadGLTextures() // 载入位图(调用上面的代码)并转换成纹理rnrnrn int Status=FALSE; // 状态指示器rn AUX_RGBImageRec *TextureImage[1]; // 创建纹理的存储空间rn memset(TextureImage,0,sizeof(void *)*1); // 将指针设为 NULLrn // 载入位图,检查有无错误,如果位图没找到则退出rn if (TextureImage[0]=LoadBMP("shit.bmp"))rn rn Status=TRUE; // 将 Status 设为 TRUErn glGenTextures(1, &texture[0]); // 创建纹理rnrn // 使用来自位图数据生成 的典型纹理rn glBindTexture(GL_TEXTURE_2D, texture[0]);rn // 生成纹理rn glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]->sizeX, TextureImage[0]->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]->data);rnrn glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); // 线形滤波rn glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); // 线形滤波rn rn if (TextureImage[0]) // 纹理是否存在rn rn if (TextureImage[0]->data) // 纹理图像是否存在rn rn free(TextureImage[0]->data); // 释放纹理图像占用的内存rn rnrn free(TextureImage[0]); // 释放图像结构rn rn return Status; // 返回 Statusrnrnrnrn[/code]rnrnrn怎么办?怎么调试啊...求指导...
中仿真persistence看不太懂
书上那个DECLARE_SERIAL和IMPLEMENT_SERIAL怎么只对operator>>重载,不对operator<>重载是这样的:rnrnCArchive& AFXAPI operator>>(CArchive& ar, class_name* &pOb) rn rn pOb=(class_name*)ar.ReadObject(RUNTIME_CLASS(class_name)); rn reutrn ar; rnrn看不懂,ReadObject在这儿是起什么作用?也用到了动态创建的技术吗?rnrn
不太懂linq,求写法
原始直观语句rnrnselect * from dbo.ProductClass where id in (select xfid from dbo.pClassTree where xid in (select id from dbo.ProductClass where ClassType like '%M%' and rid<>fid))rnrn改进后rnrnselect * from dbo.ProductClass z where exists (select 1 from dbo.pClassTree x,dbo.ProductClass y where x.xid=y.id and y.ClassType like '%M%' and y.rid<>y.fid and z.id=x.xfid)rnrn找到符合ClassType包含M的且rid<>fid的数据,然后通过关系表找到它们上级数据,并显示rnProductClass里只有主关系,下级数据可能会有多个上级数据,所以有关系表pClassTreernrn尝试linqrnrndb.ProductClass.Where(m => m.Fid != m.Rid && m.ClassType.Contains(TypeChar)).Select(m => new Id = m.Id ).Join(db.pClassTree, m => m.Id, t => t.xid, (m, t) => new m, t ).Where(x => x.m.Id == x.t.xid).Select(x => new Fid = x.t.xfid ).Join(db.ProductClass, x => x.Fid, p => p.Id, (x, p) => new x, p ).Where(px => px.x.Fid == px.p.Id).OrderBy(m => m.p.Id).Distinct().Select(m => m.p)rnrn求合理写法来学习一下,谢谢!
Asp的代码,不太懂,谁能解释下!
rs.Source="select * from "& db_EC_Review_Table &" where passed=0 and newsid is not null newsid < 1 order by reviewID desc"rnrn我感觉  好像有语病  但也不太确定   请教高手 rnrn rn
不太懂的一段代码,麻烦谁解释下
下面的代码不太明白,麻烦谁能详细的解释下:rnprivate string CreatePagerURL(string pageIndex)rn rn if (HttpContext.Current.Request.Url.PathAndQuery.IndexOf("?") == -1)rn rn return HttpContext.Current.Request.Url.PathAndQuery + "?Page=" + pageIndex;rn rn elsern rn if (HttpContext.Current.Request.Url.PathAndQuery.IndexOf("Page=") == -1)rn return HttpContext.Current.Request.Url.PathAndQuery.ToString() + "&Page=" + pageIndex;rn elsern rn return Regex.Replace(HttpContext.Current.Request.Url.PathAndQuery, @"Page=(\d+\.?\d*|\.\d+)", "Page=" + pageIndex);rn rn rn在线,谢谢
不太懂
各位大虾:rn 在html中哪些数据是被视为参数,哪些数据是视为要被用reader或servletinputstream读入的数据.这个实在不太懂.请大虾指教.谢了!!!
不太懂。
机器字长16位,阶码7位,阶符1位,尾数9位,数符1位。阶码底为2。阶码和尾数都用补码表示。求绝对值最小负数的表示方法。(分别写出规格和不规格的)rn我写的是rn规格:1 1000000 10000000 rn但是答案为:1 1000000 10000001rn我的比它还小啊。rn请给个理由。
正则表达式看了不少,就是看不太懂,请高手指教,哪有解释简单易懂的例子?
正则表达式看了不少,就是看不太懂,请高手指教,哪有解释简单易懂的例子?
求解一段js代码?看不太懂
function css(obj, attr, value)rnrn if(arguments.length==2)rn rn if(attr!='opacity')rn rn return parseInt(obj.currentStyle?obj.currentStyle[attr]:document.defaultView.getComputedStyle(obj, false)[attr]);rn rn elsern rn return Math.round(100*parseFloat(obj.currentStyle?obj.currentStyle[attr]:document.defaultView.getComputedStyle(obj, false)[attr]));rn rn rn else if(arguments.length==3)rn switch(attr)rn rn case 'width':rn case 'height':rn case 'paddingLeft':rn case 'paddingTop':rn case 'paddingRight':rn case 'paddingBottom':rn value=Math.max(value,0);rn case 'left':rn case 'top':rn case 'marginLeft':rn case 'marginTop':rn case 'marginRight':rn case 'marginBottom':rn obj.style[attr]=value+'px';rn break;rn case 'opacity':rn obj.style.filter="alpha(opacity:"+value+")";rn obj.style.opacity=value/100;rn break;rn default:rn obj.style[attr]=value;rn rn return function (attr_in, value_in)css(obj, attr_in, value_in);//这个返回函数有什么用?他的参数attr_in,value_in上面都没有啊???rn rnrnrnvar MIAOV_MOVE_TYPE=rn BUFFER: 1,rn FLEX: 2rn;rnrnfunction miaovStopMove(obj)rnrn clearInterval(obj.timer);//这个obj有timer属性吗?这是自己定义的嘛?我没看的过这个属性rnrnrnfunction miaovStartMove(obj, oTarget, iType, fnCallBack, fnDuring)rnrn var fnMove=null;rn if(obj.timer)rn rn clearInterval(obj.timer);rn rn rn switch(iType)rn rn case MIAOV_MOVE_TYPE.BUFFER:rn fnMove=miaovDoMoveBuffer;rn break;rn case MIAOV_MOVE_TYPE.FLEX:rn fnMove=miaovDoMoveFlex;rn break;rn rn rn obj.timer=setInterval(function ()rn fnMove(obj, oTarget, fnCallBack, fnDuring);//这个函数最后两个函数有什么用???rn , 30);rnrnrnfunction miaovDoMoveBuffer(obj, oTarget, fnCallBack, fnDuring)rnrn var bStop=true;rn var attr='';rn var speed=0;rn var cur=0;rn rn for(attr in oTarget)rn rn cur=css(obj, attr);rn if(oTarget[attr]!=cur)rn rn bStop=false;rn rn speed=(oTarget[attr]-cur)/5;rn speed=speed>0?Math.ceil(speed):Math.floor(speed);rn rn css(obj, attr, cur+speed);rn rn rn rn if(fnDuring)fnDuring.call(obj);rn rn if(bStop)rn rn clearInterval(obj.timer);rn obj.timer=null;rn rn if(fnCallBack)fnCallBack.call(obj);//这行代码完全看不懂rn rnrnrnfunction miaovDoMoveFlex(obj, oTarget, fnCallBack, fnDuring)rnrn var bStop=true;rn var attr='';rn var speed=0;rn var cur=0;rn rn for(attr in oTarget)rn rn if(!obj.oSpeed)obj.oSpeed=;rn if(!obj.oSpeed[attr])obj.oSpeed[attr]=0;rn cur=css(obj, attr);rn if(Math.abs(oTarget[attr]-cur)>=1 || Math.abs(obj.oSpeed[attr])>=1)rn rn bStop=false;rn rn obj.oSpeed[attr]+=(oTarget[attr]-cur)/5;rn obj.oSpeed[attr]*=0.7;rn rn css(obj, attr, cur+obj.oSpeed[attr]);rn rn rn rn if(fnDuring)fnDuring.call(obj);rn rn if(bStop)rn rn clearInterval(obj.timer);rn obj.timer=null;rn rn if(fnCallBack)fnCallBack.call(obj);rn rnrn希望能完全讲解一下这段代码的全部运行调用过程!上面只是标注了几点看不懂,其实后面两个函数方法完全没看懂!
有几句代码看不太懂.求教.....
flash[:notice] = msg if msgrnrender :update do |page|rnparams[:product][:title]
一个小程序,看不太懂,帮忙。
请写一个程序找出附件中文件重复的行rn输出:rn 输出一个文本文件,给出哪些行是重复的,第一次出现的行号,格式如下rn 行号 此行的文本内容rn 并给出此程序的运行时间rnrnrn以下是代码,可是有些知识点不是太熟悉,看的头很大没看明白代码是怎么实现要求的。rn请明白的帮我给每行代码加上注释,谢谢!rnrn[code=C#]rnstatic void Main(string[] args)rn rn TimeSpan ts1 = new TimeSpan(DateTime.Now.Ticks); //TimeSpan 我只知道是根据输入日期计算两个指定日期之间的时间间隔的意思,实际没用过。DateTime.Now是现在的时间,而DateTime.Now.Ticks是干吗的?网上查到的意思是“表示自 0001 年 1 月 1 日午夜 12:00:00 以来已经过的时间的以 100 毫微秒为间隔的间隔数。一个以0.1纳秒为单位的时间戳。”半懂不懂的...所以这第一句代码就没明白是怎么会事。rn StreamReader sr = new StreamReader(@"D:\文本.txt", System.Text.Encoding.Default); //StreamReader是什么什么读取流吧,这句的意思就是读取指定路径的文本文档吧?rn String strline="";rn int number=1rn StringBuilder sb=new StringBuilder();rnrn Hashtable myHT=new Hashtable ();//定义哈希表,具体意义是?rnrn while((strline=sr.ReadLine())!=null)//判断文本是不是空的?rn rn if (myHT.ContainsKey(strline))//myHT.ContainsKey()这个方法是做什么的?rn rn sb.Append(myHT[strline].ToString() + " " + strline + "\r\n");//往StringBuilder里加东西吧?rn rn elsern rn myHT.Add(strline, number);//一行一行往哈希表里加?哈希表是用来放文档的?rn rn number++;rn rn //看到这基本就昏了,到不是全看不懂,只是放一起就昏了。后面的代码也尽量加上注释,谢谢了!rn sr.Close();rn StreamWriter wr = new StreamWriter(@"D:\1.txt");rn wr.Write(sb+"");rn wr.Close();rnrn TimeSpan ts2 = new TimeSpan(DateTime.Now.Ticks); //?rn string spanTotalSeconds = ts2.Subtract(ts1).Duration().TotalSeconds.ToString(); //?rn Console.WriteLine(spanTotalSeconds);rn Console.ReadKey();rn rnrnrn[/code]
这个子程序不太看的懂啊
typedef struct stacknodernrn datatype data;rn struct stacknode *next;rnstacknode;rnrntypedef structrnrn stacknode *top;rnlinkstack;rnrn/*置空栈*/rnvoid SETNULL(linkstack *&s)rnrn s=(linkstack *)malloc(sizeof(linkstack));rn s->top=null;rnrnrn我想问一下,上面的*&s代表什么意思呢?
看不太懂,请指教,感谢拉。
thread[_nthreads] = new( (void *)&thread_obj[_nthreads] )rn Cyg_Thread(CYG_SCHED_DEFAULT_INFO,rn entry, data, rn NULL, // no namern (CYG_ADDRESS)stack[_nthreads], STACKSIZE );
sqlhelper类有些代码看不太懂
对于sqlhelper类中的代码看不太懂,请哪位给解释一下,代码如下。先谢谢了。rn[code=C#]rn#region 增加参数 rn public static SqlCommand AddParameterCollection(SqlCommand cmd, SqlParameterCollection SqlParameterCollection) rn rn foreach (SqlParameter SqlParameter in SqlParameterCollection) rn rn cmd.Parameters.Add(SqlParameter); rn rn return cmd; rn rn public static void AddOutParameter(SqlCommand cmd, string parameterName, DbType dbType, int size) rn rn SqlParameter SqlParameter = cmd.CreateParameter(); rn SqlParameter.DbType = dbType; rn SqlParameter.ParameterName = parameterName; rn SqlParameter.Size = size; rn SqlParameter.Direction = ParameterDirection.Output; rn cmd.Parameters.Add(SqlParameter); rn rn public static void AddInParameter(SqlCommand cmd, string parameterName, DbType dbType, object value) rn rn SqlParameter SqlParameter = cmd.CreateParameter(); rn SqlParameter.DbType = dbType; rn SqlParameter.ParameterName = parameterName; rn SqlParameter.Value = value; rn SqlParameter.Direction = ParameterDirection.Input; rn cmd.Parameters.Add(SqlParameter); rn rn public static void AddReturnParameter(SqlCommand cmd, string parameterName, DbType dbType) rn rn SqlParameter SqlParameter = cmd.CreateParameter(); rn SqlParameter.DbType = dbType; rn SqlParameter.ParameterName = parameterName; rn SqlParameter.Direction = ParameterDirection.ReturnValue; rn cmd.Parameters.Add(SqlParameter); rn rn public static SqlParameter GetParameter(SqlCommand cmd, string parameterName) rn rn return cmd.Parameters[parameterName]; rn rn #endregion rn rn[/code]
一个程序 看不太懂 请指教
[code=C/C++]rn/*如何实现这个算法rnThis is a good day today -> sihT si a doog yad yadot */rn#includern#include "string.h"rn#include "malloc.h"rnrnchar *fun(char *a);rnrnint main(int argc, char* argv[])rnrn char *string = "This is a good day today";rn char *ll=fun(string);rn printf("%s \n %s",ll,string);rn return 0;rnrnrnchar *fun(char *a)rnrn char *ptt = (char *)malloc(strlen(a));rn ptt = a;rn char *ftt = (char *)malloc(strlen(a));rn //*ftt = '\0';rn ftt[0] = '\0';rn char step[] = " ";rn char *token;rn token = strtok( strdup(a),step);rn //token = strtok( a,step); //这样会出错rn/*该函数将s1中首次出现s2中字符的位置置为NULL,rn因此会破坏s1字符串。该函数一般用于分解s1字符串为用特定分隔符分隔的多个字符串,rns2一般设置为s1中的分隔字符,比如空格,逗号等,rnstrdup 例如将一条自然英文语句分解为单词。rnrnsrc 待拷贝的源字符串*/rn while(token != NULL)rn rn //puts(strrev(token));rn strcat(ftt,strrev(token)); /*strrev()将字符串s复制到最近建立的单元*/rn strcat(ftt," ");rn token = strtok( NULL,step);//这句代码 看不太懂 rn //puts(token);rn rn *(ftt + strlen(a)-1) = '\0';rn return ftt;rnrn[/code]
这个while()条件看不太懂
while(*(gets(buffer))!='\0'&&(i
这个宏看不太懂,请教!
#define _BITMASK(Enum, Ty) typedef int Tyrnrn #define _BITMASK_OPS(Ty)rnrn是什么意思?
163的一段js看不太懂?
大概的意思是知道,就是关于短链转换的,但细节还不是太清楚,js 达人帮忙注释下吧,非常感谢!rnrn[code=javascript]define("task/shortURL",rnfunction(a, b, c) rn var d = a("task/TaskManager"),rn e = a("task/Task");rn d.add(new e("shortURL",rn function() rn var b = a("external/jquery"),rn c = a("utils/DataSource");rn b(document.body).delegate(".short-url:not(.processed)", "mouseenter",rn function(a) rn var d = b(a.target),rn e = d.addClass("processed").text();rn if (e.indexOf("http://163.fm") === 0) rn var f = e.substr(14);rn c.get("longUrl", rn q: frn ,rn function(a) rn d.attr("title", a)rn ,rn "jsonp")rn rn )rn ))rn);[/code]
这是个web.sitemap文件,看不太懂??
[code=XML]rnrn rn rn rn rn rn rn rn rn rn rn rnrn[/code]rnrn中间的rn rn什么意思?怪怪的?导航条里面没有Item,只有Items啊,怎么会有这么一条?rn这些siteMapNode都是怎么对牢的啊?
新人求教 一个函数看不太懂
这是一个俄罗斯方块小游戏中的一个函数,本人菜鸟一枚看不太懂,求各位大神解释下,谢谢了rn[code=c]rnvoid coutTime()rnrn int f=-1,bgtime,utime[4]=0,bg[21][12]=0;rn int ntime;rn char bufs[3]='0','0','0',lbufs[3]='0','0','0',bufm[3]='0','0','0',lbufm[3]='0','0','0';rn ntime=time(0);rn utime[1]=utime[0];/*save last*/rn utime[3]=utime[2];/*save last*/rn utime[0]=ntime-bgtime;/*get now-used*/rn utime[2]=utime[0]/60;/*get now-used minute*/rn utime[0]=utime[0]%60;/*get now-used second*/rn setcolor(WHITE);/*clear*/rn sprintf(lbufs,"%d",utime[1]);rn outtextxy(190,66,lbufs);rn sprintf(lbufm,"%d",utime[3]);rn outtextxy(160,66,lbufm);rn setcolor(RED);/*write*/rn sprintf(bufs,"%d",utime[0]);rn outtextxy(190,66,bufs);rn sprintf(bufm,"%d",utime[2]);rn outtextxy(160,66,bufm);rn[/code]
一段163 js代码,看不太懂?
rn大概的意思是知道,就是关于短链转换的,但细节还不是太清楚,js 达人帮忙注释下吧,非常感谢!rnrnd[code=javascript]efine("task/shortURL",rnfunction(a, b, c) rn var d = a("task/TaskManager"),rn e = a("task/Task");rn d.add(new e("shortURL",rn function() rn var b = a("external/jquery"),rn c = a("utils/DataSource");rn b(document.body).delegate(".short-url:not(.processed)", "mouseenter",rn function(a) rn var d = b(a.target),rn e = d.addClass("processed").text();rn if (e.indexOf("http://163.fm") === 0) rn var f = e.substr(14);rn c.get("longUrl", rn q: frn ,rn function(a) rn d.attr("title", a)rn ,rn "jsonp")rn rn )rn ))rn);[/code]
一个看不太懂的问题...急救...
你们之前给到的kjava的包 我们通过包塞班的计费插件之后拿去Symbian网站上申请签名 Symbian网站提示有病毒 签名不了rnrn这个是项目包发给推广那边后的回复...rnrn提示:Unfortunately it appears that your submitted files are not ok, they contain the following virus(es):rnrn报的问题是上面这个....rnrn完全一点不懂....JAVA应该不需要签名的吧....rnrn这个问题的出现有哪些可能....是我打包出的问题...还是涉及到了一些权限或者其他方面的问题....rnrn求救求救....~~~
看不太懂这个JS,谢谢了
rnrnrnrnrnrn rn 产品介绍rn rn 产品一rn 产品一rn 产品一rn 产品一rn 产品一rn 产品一rn rnrnrnrnrnrnrnrnrn问题1rn1,请问JS中的这段rnsfEls[i].onmouseover=function() rnthis.className+=(this.className.length>0? " ": "") + "sfhover";rn rnrn该如何理解,是党鼠标覆盖时运行function,而sfEls[i]的类名称等于(this.className.length>0? " ": "") + "sfhoverrn那么sfhover是哪里跑出来的rnrn谢谢,刚学JSrnrn
求助,链表的删除操作,看不太懂,求教
#includern#includern#includern#includerntypedef struct nodernrn char name[20];//姓名rn char num[20];//学号rn char sex;//性别rn struct node *next;rnslink;rnvoid deletef(slink *head);//删除操作rnint main()//主程序rnrn int choose;rn slink *head=(slink *)malloc(sizeof(slink));rn head->next=NULL;rn printf("\t*****************用链表实现一些操作******************\n");rn printf("\t* ---------1:插入操作 *\n");rn printf("\t* ---------2:删除操作 *\n");rn printf("\t* ---------3:查找操作 *\n");rn printf("\t* ---------4:打印操作 *\n");rn printf("\t* ---------5:退出 *\n");rn printf("\t*****************************************************\n\n");rn printf("请输入您的选择:\n");rn scanf("%d",&choose);rn getchar();rn while(1)rn rn if(choose<1||choose>5)rn rn printf("输入错误!请重新输入:\n");rn scanf("%d",&choose);rn getchar();rn rn elsern switch(choose)rn rn case 1:rn insert(head);rn printf("\n按任意键继续\n");rn getchar();rn system("cls");rn break;rn case 2:rn deletef(head);rn printf("\n按任意键继续\n");rn getchar();rn system("cls");rn break;rn case 3:rn seek(head);rn printf("\n按任意键继续\n");rn getchar();rn system("cls");rn break;rn case 4:rn print(head);rn printf("\n按任意键继续\n");rn getchar();rn system("cls");rn break;rn case 5:rn rn printf("谢谢使用\n");rn exit(0);rn rn break;rn rn printf("\t*****************用链表实现一些操作******************\n");rn printf("\t* ---------1:插入操作 *\n");rn printf("\t* ---------2:删除操作 *\n");rn printf("\t* ---------3:查找操作 *\n");rn printf("\t* ---------4:打印操作 *\n");rn printf("\t* ---------5:退出 *\n");rn printf("\t*****************************************************\n\n");rn printf("请输入您的选择:\n");rn scanf("%d",&choose);rn getchar();rn rn return 0;rnrnvoid deletef(slink *head)rnrn slink *p,*q;rn char str[20];rn p=head->next;rn q=head;rn if(head->next==NULL)rn printf("链表为空,无元素可删除。\n");rn elsern rn printf("请输入要删除人的姓名或者学号:\n");rn gets(str);rn while(p!=NULL)rn rn if(strcmp(p->name,str)!=0&&strcmp(p->num,str)!=0)rn rn q=p;rn p=p->next;rn rn elsern break;rn rn rn if(p==NULL)rn printf("未找到要删除的结点\n");rn elsern rn q->next=p->next;rn free(p);rn printf("删除成功\n");rn rn
相关热词 c# stream 复制 android c# c#监测窗口句柄 c# md5 引用 c# 判断tabtip 自己写个浏览器程序c# c# 字符串变成整数数组 c#语言编程写出一个方法 c# 转盘抽奖 c#选中treeview