帮忙看下这段js 代码实现的是什么加密方法? [问题点数:50分,结帖人cocoooooa]

Bbs1
本版专家分:0
结帖率 100%
Bbs1
本版专家分:69
Bbs1
本版专家分:69
其他相关推荐
VC++代码
这段代码里面有模糊查询的,我不知道错误在哪,请高手帮忙看下,谢谢了!
js写的md5加密方法
js写的md5加密方法js写的md5加密方法js写的md5加密方法
上拉刷新、下拉加载
两种方法实现的上拉刷新、下拉加载更多的JS代码实现方法。 两种方法实现的上拉刷新、下拉加载更多的JS代码实现方法
大家帮忙看下以下代码实现是什么加密算法?
char* bstr =rn "ABCDEFGHIJKLMNOPQ"rn "RSTUVWXYZabcdefgh"rn "ijklmnopqrstuvwxy"rn "z0123456789+/";rnrnchar rstr[] = rn 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, rn 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, rn 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, 63, rn 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, 0, 0, 0, 0, 0, rn 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, rn 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 0, 0, 0, 0, rn 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, rn 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0;rnrnrnvoid encode(const char* input,size_t l,string& output, bool add_crlf)rnrn size_t i = 0;rn size_t o = 0;rn rn output = "";rn while (i < l)rn rn size_t remain = l - i;rn if (add_crlf && o && o % 76 == 0)rn output += "\n";rn switch (remain)rn rn case 1:rn output += bstr[ ((input[i] >> 2) & 0x3f) ];rn output += bstr[ ((input[i] << 4) & 0x30) ];rn output += "==";rn break;rn case 2:rn output += bstr[ ((input[i] >> 2) & 0x3f) ];rn output += bstr[ ((input[i] << 4) & 0x30) + ((input[i + 1] >> 4) & 0x0f) ];rn output += bstr[ ((input[i + 1] << 2) & 0x3c) ];rn output += "=";rn break;rn default:rn output += bstr[ ((input[i] >> 2) & 0x3f) ];rn output += bstr[ ((input[i] << 4) & 0x30) + ((input[i + 1] >> 4) & 0x0f) ];rn output += bstr[ ((input[i + 1] << 2) & 0x3c) + ((input[i + 2] >> 6) & 0x03) ];rn output += bstr[ (input[i + 2] & 0x3f) ];rn rn o += 4;rn i += 3;rn rnrnrnvoid decode(const std::string& input,std::string& output)rnrn size_t i = 0;rn size_t l = input.size();rn rn output = "";rn while (i < l)rn rn while (i < l && (input[i] == 13 || input[i] == 10))rn i++;rn if (i < l)rn rn char b1 = (char)((rstr[(int)input[i]] << 2 & 0xfc) +rn (rstr[(int)input[i + 1]] >> 4 & 0x03));rn output += b1;rn if (input[i + 2] != '=')rn rn char b2 = (char)((rstr[(int)input[i + 1]] << 4 & 0xf0) +rn (rstr[(int)input[i + 2]] >> 2 & 0x0f));rn output += b2;rn rn if (input[i + 3] != '=')rn rn char b3 = (char)((rstr[(int)input[i + 2]] << 6 & 0xc0) +rn rstr[(int)input[i + 3]]);rn output += b3;rn rn i += 4;rn rn rn
原生js实现md5加密插件
//使用方法: //引入文件&lt;script src="yourURL/MD5.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt; //var MD5=MD5.createMD5String(yourSrting); ( function(globle,factory){//判断执行环境是否为浏览器 typeof ...
BoigleWeb.zip
BoigleWeb帮忙看下样式...
电源原理图
帮忙看下,急用
帮忙看下这段代码是什么意思
private int a(int i1)rn rn Object obj = null;构造一个空的对象objrn RecordStore recordstore;//构造一个数据库对象recordstorern byte abyte0[] = (recordstore = RecordStore.openRecordStore("RMS", true)).getRecord(i1);rn ByteArrayInputStream bytearrayinputstream = new ByteArrayInputStream(abyte0);rn DataInputStream datainputstream = new DataInputStream(bytearrayinputstream);rn c = datainputstream.readInt();//读出Int型数据rn datainputstream.close();rn bytearrayinputstream.close();rn recordstore.closeRecordStore();//关闭数据库rn return c;rn JVM INSTR pop ;//想请问下这句是什么意思rn double d1;rn String s1;rn String as1[];rn int j1 = Integer.parseInt((as1 = a(s1 = String.valueOf(d1 = 123434425D), "."))[0]);rn b(0);rn b(j1);rn b(11);rn b(0x16841);;//想请问下这里的0x16841是什么意思rn b(987);rn return 0;rn rnrn if(command != o || displayable != aM)rn break MISSING_BLOCK_LABEL_1652;//这句又是什么??rn d.a(ci);rn r();rn return;rn JVM INSTR dup ;rn k1;rn printStackTrace();rn return;rn if(command == m && displayable == aC)rn rn ba.setCurrent(p());rn return;rn rn谢谢大虾们了
帮忙看下这段servlet是什么意思啊?
import java.io.IOException;rnimport java.io.PrintWriter;rnimport java.sql.Connection;rnimport java.sql.DatabaseMetaData;rnimport java.sql.DriverManager;rnimport java.sql.ResultSet;rnimport java.sql.SQLException;rnimport java.sql.Statement;rnrnimport javax.servlet.ServletContext;rnimport javax.servlet.ServletException;rnimport javax.servlet.http.HttpServlet;rnimport javax.servlet.http.HttpServletRequest;rnimport javax.servlet.http.HttpServletResponse;rnrnpublic class GetDBInfoServlet extends HttpServlet rn private String url;rn private String user;rn private String password;rn rn public void init()throws ServletExceptionrn ServletContext sc=getServletContext();rn String driverClass=sc.getInitParameter("driverClass");rn url=sc.getInitParameter("url");rn user=sc.getInitParameter("user");rn password=sc.getInitParameter("password");rn rn try rn Class.forName(driverClass);rn catch (ClassNotFoundException e) rn // TODO 自动生成 catch 块rn throw new ServletException("数据库加载失败!");rn rn rn rn public void doGet(HttpServletRequest req,HttpServletResponse resp)throws ServletException,IOExceptionrn Connection conn=null;rn Statement stmt=null;rn ResultSet rs=null;rn try rn conn=DriverManager.getConnection(url,user,password);rn resp.setContentType("text/html;charset=gb2312");rn PrintWriter out=resp.getWriter();rn out.println("");rn out.println(" 数据库表的信息");rn out.println("");rn String tableName=req.getParameter("tableName");//[color=#FF0000]这句第一次运行应该是返回null,应该执行if里的语句[/color] stmt=conn.createStatement();rn stmt.executeUpdate("use bookstore");rn if(tableName==null||tableName.equals(""))rn DatabaseMetaData dbMeta=conn.getMetaData();rn rs=dbMeta.getTables(null, null, null, new String[]"TABLE");rn out.println(" ");rn out.println("");rn rn out.println(" ");rn out.println("");rn out.println("");rn rn out.println("");rn out.close();rn rn catch (SQLException e) rn // TODO 自动生成 catch 块rn e.printStackTrace();rn finallyrn if(rs!=null)rn try rn rs.close();rn catch (SQLException e) rn // TODO 自动生成 catch 块rn e.printStackTrace();rn rn rs=null;rn rn rn if(stmt!=null)rn try rn stmt.close();rn catch (SQLException e) rn // TODO 自动生成 catch 块rn e.printStackTrace();rn rn stmt=null;rn rn if(conn!=null)rn try rn conn.close();rn catch (SQLException e) rn // TODO 自动生成 catch 块rn e.printStackTrace();rn rn conn=null;rn rn rnrn rnrnrn按道理程序应该从数据库中读出所有表格填入select中,但是我提交后什么反应都没有,而且下拉框是空的,
ACM-小明的调查作业/“去重”与“排序”
描述 小明的老师布置了一份调查作业,小明想在学校中请一些同学一起做一项问卷调查,聪明的小明为了实验的客观性,想利用自己的计算机知识帮助自己。他先用计算机生成了N个1到1000之间的随机整数(0
帮忙看下这段代码是什么意思?
public class LengthFramer implements Framer rn public static final int MAXMESSAGELENGTH = 65535; rn public static final int BYTEMASK = 0xff; rn public static final int SHORTMASK = 0xffff; rn public static final int BYTESHIFT = 8; rn rn private DataInputStream in; // wrapper for data I/O rn rn public LengthFramer(InputStream in) throws IOException rn this.in = new DataInputStream(in); rn rn rn public void frameMsg(byte[] message, OutputStream out) throws IOException rn if (message.length > MAXMESSAGELENGTH) rn throw new IOException("message too long"); rn rn // write length prefix rn [color=#FF0000] out.write((message.length >> BYTESHIFT) & BYTEMASK);//OutPutStream.write(int b)只写b的低位8bit到流中,高24bit忽略[/color] rn [color=#FF0000] out.write(message.length & BYTEMASK);[/color] rn // write message rn out.write(message); rn out.flush(); rn rn rn public byte[] nextMsg() throws IOException rn int length; rn try rn length = in.readUnsignedShort(); // read 2 bytes rn catch (EOFException e) // no (or 1 byte) message rn return null; rn rn // 0 s a framing error. rn return msg; rn rnrnrn请问下标红的那段代码是什么意思、,可以解释下吗
大家帮忙看下这段代码是什么意思~~
[code]rnrnFullPairwiseAlign::FullPairwiseAlign()rn: _maxAlnLength(0),rn intScale(0),rn mmScore(0),rn printPtr(0),rn lastPrint(0),rn _gapOpen(0),rn _gapExtend(0),rn seq1(0),rn seq2(0),rn maxScore(0),rn sb1(0),rn sb2(0),rn se1(0),rn se2(0)rnrnrnrnrn[/code]rnrn我不理解的地方就是,大括号前面那些是什么东西....rn嗯,看了类定义的头文件,那些小括号前的都是类的成员变量.rnrn这个用法我在The C++ programming language里没找到.求助.谢谢~rn
帮忙看下这段代码是什么意思?
[code=php]
帮忙看下这段CTS代码是什么意思?
[code=java] private void assertWithTimeoutOnActivityResultInvokedWithResultCode(int expectedResultCode) rn ArgumentCaptor resultCodeCaptor = ArgumentCaptor.forClass(int.class);rn Mockito.verify(mMockOnActivityResultListener, Mockito.timeout(UI_EFFECT_TIMEOUT_MILLIS))rn .onActivityResult(rn Mockito.eq(REQUEST_CODE_ACTIVATE_ADMIN),rn resultCodeCaptor.capture(),rn Mockito.any(Intent.class));rn assertEquals(expectedResultCode, (int) resultCodeCaptor.getValue());rn [/code]
能否帮忙看下这段js的代码啥意思
没咋接触JS,项目有些js的东西,又没时间系统学习,哪位兄弟帮忙做个注解呗,告诉下每行代码大概啥意思rnrn/* Sidebar Control */rn $(".controls a").click(function() rn $("#content").toggleClass("open");rn $(".controls").toggleClass("active");rn ); rn rn /* Initializes Twitter Feed */rn $(function($)rn $(".feed").tweet(rn join_text: "auto",rn username: "indiqo",rn count: 10,rn auto_join_text_default: "I said,",rn auto_join_text_ed: "I",rn auto_join_text_ing: "I was",rn auto_join_text_reply: "I replied",rn auto_join_text_url: "I shared",rn loading_text: "Loading Tweets.."rn );rn );
下面这段JS看不懂,谁能帮忙看下
[code=JScript]rnvar Tween = rn Quart: rn easeOut: function(t,b,c,d)rn return -c * ((t=t/d-1)*t*t*t - 1) + b;rn rn ,rn Back: rn easeOut: function(t,b,c,d,s)rn if (s == undefined) s = 1.70158;rn return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;rn rn ,rn Bounce: rn easeOut: function(t,b,c,d)rn if ((t/=d) < (1/2.75)) rn return c*(7.5625*t*t) + b;rn else if (t < (2/2.75)) rn return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;rn else if (t < (2.5/2.75)) rn return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;rn else rn return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;rn rn rn rnrn[/code]rnrn这段CODE看得头晕死了,汗,就是不明白什么意思
js字符串加密的几种方法
在做web前端的时候免不了要用javascript来处理一些简单操作,其实如果要用好JQuery, Prototype,Dojo 等其中一两个javascript框架并不简单,它提高你的web交互和用户体验,从而能使你的web前端有非一样的感觉,如海阔凭鱼跃。当然,对于javascript我也是半桶水。高手莫怪,在此我仅总结学习一下,以备用到时查录。 今天不说框架的事情,就从最基本的、比较常用的
帮忙看下这段程序
#include "stdafx.h" rn #include rn rn /*##/*~~~~~~~~~~ Noted by [2002-6-21 10:30:39] ~~~~~~~~~~~*/ rn /* rn /* 乘坐公共汽车时的换车问题。例如从站A到Z要坐几路车,换几次,在哪里换车,这些问题如何解决。 rn /* 车次  车站 rn /* 1   q,w,e,r,t,y rn /* 2   a,s,d,f,g,h rn /* 3   z,x,c,v,b,n rn /* 4   p,o,i,u,y,t rn /* 5   l,k,j,h,g,f rn /* 6   m,n,b,v,c,x rn /* 7   q,a,z,w,s,x rn /* rn /*________________ Ended Note [2002-6-21 10:30:39] _____________________##*/ rn rn #define M 7 // 车次数 rn rn // 车次停靠站列表 rn char *Station[M] = rn "QWERTY", // 第0次车 rn "ASDFGH", // 第1次车 rn "ZXCVBN", // 第2次车 rn "POIUYT", // 第3次车 rn "LKJHGF", // 第4次车 rn "MABVCX", // 第5次车 rn "QAZWSX";// 第6次车 rn rn // 已经乘着过的车次列表,对应take[i]=0表示还未乘着,=1表示已经乘着过 rn int taked[M]=0; rn rn // 换车的下车点 rn struct Exchange rn rn static int Len; // 长度 rn int route; // 车次 rn char pos; // 换车站点 rn Path[M]; // 换车路径 rn rn int Exchange::Len = 0; // 初始化路径长度 rn rn bool PassBy(char P, char* path) // 看路径path的车是否经过点P rn rn while(*path!='\0') if( P==*(path++) ) return true; rn return false; rn rn rn // 打印路径,没得说 rn void print_path() rn rn static int cnt = 0; rn printf("%04d",++cnt); rn for(int i=0;i ",Path[i].route+1,Path[i].pos); rn printf(" (%2d: %c) ",Path[i].route+1,Path[i].pos); rn printf("\n"); rn rn rn[color=#FF0000]void NextSearchPath(char end,int route) // 递归寻找路径 rn rn if( taked[route]!=0 ) return; // have been taked; rn rn if( PassBy(end,Station[route]) ) rn rn Path[Path[0].Len].pos = end; rn Path[Path[0].Len].route = route; rn Path[0].Len++; rn print_path(); rn Path[0].Len--; rn return; rn rn rntaked[route] = 1; //have been taked; rn Path[Path[0].Len].route = route; rn rn for(int i=0;i
帮忙看下这段小代码
我想对childNodes属性进行测试,所以写了一个小代码rn welcometohere这是测试的标签rnrn
帮忙看下这段代码
$GLOBALS['_arclistEnv'] = 'index';rn $row = $dsql->GetOne("Select * From `#@__homepageset`");rn $row['templet'] = MfTemplet($row['templet']);rn $pv = new PartView();rn $pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $row['templet']);rn $pv->SaveToHtml(DEDEROOT.'/index.html');rn这个index.html会放到哪里?
帮忙看下这段JS代码
这是自定义验证控件的客户端代码rn rn为什么我输入的长度是11还是返回false 哪错了吗?
帮忙看下这段代码!
if(objder.Read())rn rn if(passd==objder.GetValue(2).ToString())rn rn 如果执行了这段代码rn Session["id"]=objder.GetValue(0);rn Response.Redirect(burl);rn rn rn elsern rn error.InnerHtml=" 密码错误!";rn return;rn rnrn rn elsern rn error.InnerHtml=" 错误,用户名不存在!";rn return;rn rn objder.Close();rn objcom.Dispose();rn conn.Close();rnrnrnrnrnrn 如果执行了这段代码rn Session["id"]=objder.GetValue(0);rn Response.Redirect(burl);rnrn底下的代码 objder.Close(); objcom.Dispose(); conn.Close();这些代码还会执行吗?rn
帮忙看下这段代码~~
[url=http://blog.csdn.net/KingWolfOfSky/archive/2009/08/13/4444231.aspx][/url]rn这篇博客里面讲了些关于Java细节方面的内容,它给了下面段代码,对输出还是不理解,麻烦各位大虾给解释下~~rn[code=Java]rn 1. public static void main(String args[]) rn 2. rn 3. Integer i1=new Integer(13); rn 4. Integer i2=new Integer(13); rn 5. int i3=13; rn 6. System.out.println(i1==i2); rn 7. System.out.println(i2==i3); rn 8. System.out.println(i3==i1); rn 9. rn 10. * Output rn 11. * true rn 12. * false rn 13. * true rn 14. */ rn[/code]rnrn还有他说了自动包装时对于从–128到127之间的值,它们被包装为Integer对象后,会存在内存中被重用,而其它的值,被包装后的Integer对象并不会被重用,即相当于每次包装时都新建一个Integer对象。rn这是为什么?rn小弟新人,先谢谢各位了~~
帮忙看下这段汇编代码
现学现卖,实在是无能为力啊.麻烦各位大牛帮帮忙.[code=c]#include rnrnint spinlock_init(PSPINLOCK plock)rnrn if (NULL == plock)rn rn return RET_FAILED;rn rnrn plock->lock = LOCK_UNLOCKED;rn plock->pid = THREAD_DEFAULT;rnrn return RET_SUCCESS;rnrnrnint spinlock_wait(PSPINLOCK plock)rnrn int ret = RET_SUCCESS;rn lock_t lock = LOCK_LOCKED;rn lock_t unlock = LOCK_UNLOCKED;rn pthread_t pid = pthread_self();rnrn if (THREAD_INVALID == plock->pid)rn rn ret = RET_FAILED;rn return ret;rn rnrn //判断是否已经占用了这个锁,如果是,则直接退出,不是则进行下一步rn __asm__ __volatile__(rn "cmpw %1, %0\n"rn "jne 1f\n"rn "call abort\n"rn "1:"rn :"=m" (plock->pid)rn :"q" (pid) rn :"memory", "cc"rn );rnrn __asm__ __volatile__(rn "1:\n"rn "cmpw %1, %0\n"rn "jne 1b\n"rn "lock xaddw %1, %2\n"rn :"=q" (unlock), "=m" (plock->lock)rn :"q" (lock)rn :"memory", "cc"rn );rnrn plock->pid = pid;rnrn return RET_SUCCESS;rnrnrnint spinlock_trywait(PSPINLOCK plock)rnrn int ret = RET_SUCCESS;rn pthread_t pid = pthread_self();rn lock_t lock = LOCK_LOCKED;rn lock_t unlock = LOCK_UNLOCKED;rnrn if (THREAD_INVALID == plock->pid)rn rn ret = RET_FAILED;rn return ret;rn rn rn __asm__ __volatile__(rn "cmpw %1, %0\n"rn "je 2f\n"rn "jne 1f\n"rn "1:\n"rn "addw %2, %3\n"rn "2:\n"rn : "=q" (pid), "=m" (plock->pid),"=m" (ret)rn : "ir" (RET_FAILED) rn :"memory", "cc"rn );rnrn if (RET_FAILED == ret)rn rn return ret;rn rnrn __asm__ __volatile__(rn "cmp %1, %0\n"rn "jne 1f\n"rn "lock xaddw %1, %3\n"rn "jmp 2f\n"rn "1:\n"rn "mv %%eax, %4\n"rn "mv %2, %%eax\n"rn "2:\n"rn : "=q" (unlock), "=m" (plock->lock), "=m" (ret)rn : "q" (lock), "ir" (RET_FAILED)rn : "memory", "cc"rn );rnrn if (RET_FAILED == ret)rn rn return ret;rn rn elsern rn plock->pid = pid;rn return ret;rn rnrnrnint spinlock_post(PSPINLOCK plock)rnrn pthread_t pid = pthread_self();rn lock_t unlock = LOCK_UNLOCKED;rn lock_t lock = LOCK_LOCKED;rnrn if (pid != plock->pid)rn rn return RET_SUCCESS;rn rnrn __asm__ __volatile__(rn "cmp %1, %0\n"rn "je 1f\n"rn "call abort\n"rn "1:\n"rn "mvw %%eax, %2\n"rn "mvw %1, %%eax\n"rn :"=q"(lock), "=m" (plock->lock)rn :"p" (unlock)rn :"memory", "cc"rn );rnrn return RET_SUCCESS;rnrnrnint spinlock_destroy(PSPINLOCK plock)rnrn if (THREAD_DEFAULT == plock->pid && LOCK_UNLOCKED == plock->lock)rn rn plock->pid = THREAD_INVALID;rn rn return RET_SUCCESS;rn rnrn return RET_FAILED;rnrn[/code]rn这段代码凡是汇编的地方几乎都有错.rngcc -g spinlock.c main.c -lpthread -I.rnspinlock.c: Assembler messages:rnspinlock.c:30: Warning: using `%dx' instead of `%edx' due to `w' suffixrnspinlock.c:41: Warning: using `%ax' instead of `%eax' due to `w' suffixrnspinlock.c:43: Error: operand size mismatch for `xadd'rnspinlock.c:68: Warning: using `%ax' instead of `%eax' due to `w' suffixrnspinlock.c:72: Error: operand size mismatch for `add'rnspinlock.c:87: Error: operand size mismatch for `xadd'rnspinlock.c:90: Error: no such instruction: `mv %eax,$-1'rnspinlock.c:91: Error: no such instruction: `mv -24(%ebp),%eax'rnspinlock.c:125: Error: no such instruction: `mvw %eax,%eax'rnspinlock.c:126: Error: no such instruction: `mvw (%edx),%eax'rn各位大神指点则个.小的不胜感激啊.rn小的可能不在线等哈.不过看到的第一时间,一定回复.
帮忙看下这段java程序
//根据用户名和密码判断用户登录的方法,返回的是一个UserBean类型rn public UserBean checkUsersLogin(String userName,String userPwd)rn UserBean ub=null;rn //调用checkParameter方法判断输入的用户名和密码是不是含有非法字符rn if(!checkParameter(userName+userPwd))rn userName="null";rn userPwd="null";rn rn rn rn try rn String sql="select count(*) from user where userName=?and userPwd=?";[color=#FF0000]1:这句count(*)是啥意思?[/color]rn prepar=conn.prepareStatement(sql);//获得Statement对象rn prepar.setString(1, userName);rn prepar.setString(2, userPwd);rn rs=prepar.executeQuery();//执行SQL语句,获得结果集rn if(rs.next())[color=#FF0000]3.从这句开始彻底不明白他想要干什么?[/color]rn if(rs.getInt(1)>0)rn ub=this.getUser(userName);//调用getUser方法获得一个用户rn elsern ub=null;rn rn rn catch (SQLException e) rn // TODO 自动生成 catch 块rn e.printStackTrace();rn rn return ub;rn rn rn rn //提取登录用户信息rn private UserBean getUser(String userName) rn // TODO 自动生成方法存根rn UserBean ub=new UserBean();rn try rn String sql="select * from user where userName=?";rn prepar=conn.prepareStatement(sql);rn prepar.setString(1, userName);rn rs=prepar.executeQuery();rn while(rs.next())//提取用户集合记录[color=#FF0000]2.这句什么意思呢?提取同名用户集合?那下面的操作有什么意义呢?他永远set就去的都是while循环中最后一个对象。[/color] rn ub.setUserName(rs.getString("userName"));rn ub.setUserPwd(rs.getString("userPwd"));rn ub.setUserId(rs.getLong("userId"));rn catch (SQLException e) rn // TODO 自动生成 catch 块rn e.printStackTrace();rn rn rn return ub;rn rnrn private boolean checkParameter(String para) rn // TODO 自动生成方法存根rn int flag=0;rn flag+=para.indexOf("'")+1;rn flag+=para.indexOf(";")+1;rn flag+=para.indexOf("1=1")+1;rn flag+=para.indexOf("|")+1;rn flag+=para.indexOf("")+1;rn if(flag!=0)rn System.out.println("提交了非法字符!!!");rn return false;rn rn return true;rn
帮忙看下这段 代码。
项目使用的是mvc1.0 rnrn一个类继承Controller实现抽象方法OnActionExecuting. 大家帮我看下,谢谢。rnrn protected override void OnActionExecuting(ActionExecutingContext filterContext)rn rnrn string[] arr = Request.Url.Host.Split('/');rn string newEventName = arr[0].ToLower();rnrn //if (newEventName == "manage")rn //rn // Response.Redirect("manage");rn //rn if (!filterContext.HttpContext.User.Identity.IsAuthenticated || Session["user"] == null)rn rn //use the current url for the redirectrn string redirectOnSuccess = filterContext.HttpContext.Request.Url.AbsolutePath;rnrn //send them off to the login pagern string redirectUrl = string.Format("?ReturnUrl=0", redirectOnSuccess);rn string loginUrl = FormsAuthentication.LoginUrl + redirectUrl;rn filterContext.HttpContext.Response.Redirect(loginUrl, true);rnrn rnrn#if DEBUGrn this.EventList = new EventRepository().GetEventList(1);rn#elsern if (this.CurrentCompany != null)rn rn this.EventList = new EventRepository().GetEventList(this.CurrentCompany.id);rn rn#endifrnrn if (this.EventList != null && this.EventList.Count > 0)rn rnrn if (this.CurrentEvent == null ||rn newEventName != this.CurrentEvent.eventName.ToLower())rn rn this.CurrentEvent = this.EventList.Where(e => e.eventName.ToLower() == newEventName).SingleOrDefault();rnrn if (this.CurrentEvent == null)rn rn this.CurrentEvent = this.EventList[0];rn _isRedirectSubDomain = true;rn //filterContext.Result = JavaScript("Banner");rn rn rnrn ViewData["EventList"] = new SelectList(this.EventList, "id", "eventname", this.CurrentEvent.id);rnrn base.OnActionExecuting(filterContext);rn rn
帮忙看下这段代码!!
using System;rnrnnamespace ConsoleApplication1rnrn /// rn /// Class1 的摘要说明。rn /// rn class Class1rn rn enum Temperaturesrn rn FreezingPoint = 32,rn BoilingPoint = 212,rn SwimmingWeathet = 27rn rnrn rn /// rn /// 应用程序的主入口点。rn /// rn [STAThread]rn static void Main(string[] args)rn rn rnrn System.Console.WriteLine("Freezing point of water :0",(int)Temperatures.FreezingPoint);rnrn System.Console.WriteLine("BoilingPoint: 0",(int) Temperatures.BoilingPoint);rn rn rn rnrnrn为什么把enum Temperatures放到Main中定义就会出错?rn
编写一段代码,其功能是打印代码本身
编写一段代码,其功能是打印代码本身#includemain(){char *c="#include%cmain()%c{%cchar *c=%c%s%c;%cprintf(c,10,10,10,34,c,34,10,10);%c}";printf(c,10,10,10,34,c,34,10,10);}以上代码来自:编写一段代码,其功能是打印代码本身。该代码将自身编为单行的字符串然后打印,并使用AS
7种JAVASCRIPT加密方法
JAVASCRIPT加密方法,JS加密解密综述(7种) 一:最简单的加密解密  对于JAVASCRIPT函数escape()和unescape()想必是比较了解啦(很多网页加密在用它们),分别是编码和解码字符串,比如例子代码  用escape()函数加密后变为如下格式:  alert%28%22%u9ED1%u5BA2%u9632%u7EBF%22%29%3B 
版主求帮忙看下一个js加密
一个网站我想模拟post登陆,但是他账号+密码+验证码,然后一起加密了。每次密码都不同,让我无法post,求帮忙把下面的js加密换成C#里面的加密。本人js不是很好。辛苦了。rn下面是他js的文件代码[code=javascript]rnrnrn/* md5.js - MD5 Message-Digestrn * Copyright (C) 1999,2002 Masanao Izumo rn * Version: 2.0.0rn * LastModified: May 13 2002rn *rn * This program is free software. You can redistribute it and/or modifyrn * it without any warranty. This library calculates the MD5 based on RFC1321.rn * See RFC1321 for more information and algorism.rn */rnrn/* Interface:rn * md5_128bits = MD5_hash(data);rn * md5_hexstr = MD5_hexhash(data);rn */rnrn/* ChangeLogrn * 2002/05/13: Version 2.0.0 releasedrn * NOTICE: API is changed.rn * 2002/04/15: Bug fix about MD5 length.rn */rnrnrn// md5_T[i] = parseInt(Math.abs(Math.sin(i)) * 4294967296.0);rnvar MD5_T = new Array(0x00000000, 0xd76aa478, 0xe8c7b756, 0x242070db,rn 0xc1bdceee, 0xf57c0faf, 0x4787c62a, 0xa8304613,rn 0xfd469501, 0x698098d8, 0x8b44f7af, 0xffff5bb1,rn 0x895cd7be, 0x6b901122, 0xfd987193, 0xa679438e,rn 0x49b40821, 0xf61e2562, 0xc040b340, 0x265e5a51,rn 0xe9b6c7aa, 0xd62f105d, 0x02441453, 0xd8a1e681,rn 0xe7d3fbc8, 0x21e1cde6, 0xc33707d6, 0xf4d50d87,rn 0x455a14ed, 0xa9e3e905, 0xfcefa3f8, 0x676f02d9,rn 0x8d2a4c8a, 0xfffa3942, 0x8771f681, 0x6d9d6122,rn 0xfde5380c, 0xa4beea44, 0x4bdecfa9, 0xf6bb4b60,rn 0xbebfbc70, 0x289b7ec6, 0xeaa127fa, 0xd4ef3085,rn 0x04881d05, 0xd9d4d039, 0xe6db99e5, 0x1fa27cf8,rn 0xc4ac5665, 0xf4292244, 0x432aff97, 0xab9423a7,rn 0xfc93a039, 0x655b59c3, 0x8f0ccc92, 0xffeff47d,rn 0x85845dd1, 0x6fa87e4f, 0xfe2ce6e0, 0xa3014314,rn 0x4e0811a1, 0xf7537e82, 0xbd3af235, 0x2ad7d2bb,rn 0xeb86d391);rnrnvar MD5_round1 = new Array(new Array( 0, 7, 1), new Array( 1,12, 2),rn new Array( 2,17, 3), new Array( 3,22, 4),rn new Array( 4, 7, 5), new Array( 5,12, 6),rn new Array( 6,17, 7), new Array( 7,22, 8),rn new Array( 8, 7, 9), new Array( 9,12,10),rn new Array(10,17,11), new Array(11,22,12),rn new Array(12, 7,13), new Array(13,12,14),rn new Array(14,17,15), new Array(15,22,16));rnrnvar MD5_round2 = new Array(new Array( 1, 5,17), new Array( 6, 9,18),rn new Array(11,14,19), new Array( 0,20,20),rn new Array( 5, 5,21), new Array(10, 9,22),rn new Array(15,14,23), new Array( 4,20,24),rn new Array( 9, 5,25), new Array(14, 9,26),rn new Array( 3,14,27), new Array( 8,20,28),rn new Array(13, 5,29), new Array( 2, 9,30),rn new Array( 7,14,31), new Array(12,20,32));rnrnvar MD5_round3 = new Array(new Array( 5, 4,33), new Array( 8,11,34),rn new Array(11,16,35), new Array(14,23,36),rn new Array( 1, 4,37), new Array( 4,11,38),rn new Array( 7,16,39), new Array(10,23,40),rn new Array(13, 4,41), new Array( 0,11,42),rn new Array( 3,16,43), new Array( 6,23,44),rn new Array( 9, 4,45), new Array(12,11,46),rn new Array(15,16,47), new Array( 2,23,48));rnrnvar MD5_round4 = new Array(new Array( 0, 6,49), new Array( 7,10,50),rn new Array(14,15,51), new Array( 5,21,52),rn new Array(12, 6,53), new Array( 3,10,54),rn new Array(10,15,55), new Array( 1,21,56),rn new Array( 8, 6,57), new Array(15,10,58),rn new Array( 6,15,59), new Array(13,21,60),rn new Array( 4, 6,61), new Array(11,10,62),rn new Array( 2,15,63), new Array( 9,21,64));rnrnfunction MD5_F(x, y, z) return (x & y) | (~x & z); rnfunction MD5_G(x, y, z) return (x & z) | (y & ~z); rnfunction MD5_H(x, y, z) return x ^ y ^ z; rnfunction MD5_I(x, y, z) return y ^ (x | ~z); rnrnvar MD5_round = new Array(new Array(MD5_F, MD5_round1),rn new Array(MD5_G, MD5_round2),rn new Array(MD5_H, MD5_round3),rn new Array(MD5_I, MD5_round4));rnrnfunction MD5_pack(n32) rn return String.fromCharCode(n32 & 0xff) +rn String.fromCharCode((n32 >>> 8) & 0xff) +rn String.fromCharCode((n32 >>> 16) & 0xff) +rn String.fromCharCode((n32 >>> 24) & 0xff);rnrnrnfunction MD5_unpack(s4) rn return s4.charCodeAt(0) |rn (s4.charCodeAt(1) << 8) |rn (s4.charCodeAt(2) << 16) |rn (s4.charCodeAt(3) << 24);rnrnrnfunction MD5_number(n) rn while (n < 0)rn n += 4294967296;rn while (n > 4294967295)rn n -= 4294967296;rn return n;rnrnrnfunction MD5_apply_round(x, s, f, abcd, r) rn var a, b, c, d;rn var kk, ss, ii;rn var t, u;rnrn a = abcd[0];rn b = abcd[1];rn c = abcd[2];rn d = abcd[3];rn kk = r[0];rn ss = r[1];rn ii = r[2];rnrn u = f(s[b], s[c], s[d]);rn t = s[a] + u + x[kk] + MD5_T[ii];rn t = MD5_number(t);rn t = ((t<>>(32-ss)));rn t += s[b];rn s[a] = MD5_number(t);rnrnrnfunction MD5_hash(data) rn var abcd, x, state, s;rn var len, index, padLen, f, r;rn var i, j, k;rn var tmp;rnrn state = new Array(0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476);rn len = data.length;rn index = len & 0x3f;rn padLen = (index < 56) ? (56 - index) : (120 - index);rn if(padLen > 0) rn data += "\x80";rn for(i = 0; i < padLen - 1; i++)rn data += "\x00";rn rn data += MD5_pack(len * 8);rn data += MD5_pack(0);rn len += padLen + 8;rn abcd = new Array(0, 1, 2, 3);rn x = new Array(16);rn s = new Array(4);rnrn for(k = 0; k < len; k += 64) rn for(i = 0, j = k; i < 16; i++, j += 4) rn x[i] = data.charCodeAt(j) |rn (data.charCodeAt(j + 1) << 8) |rn (data.charCodeAt(j + 2) << 16) |rn (data.charCodeAt(j + 3) << 24);rn rn for(i = 0; i < 4; i++)rn s[i] = state[i];rn for(i = 0; i < 4; i++) rn f = MD5_round[i][0];rn r = MD5_round[i][1];rn for(j = 0; j < 16; j++) rn MD5_apply_round(x, s, f, abcd, r[j]);rn tmp = abcd[0];rn abcd[0] = abcd[3];rn abcd[3] = abcd[2];rn abcd[2] = abcd[1];rn abcd[1] = tmp;rn rn rnrn for(i = 0; i < 4; i++) rn state[i] += s[i];rn state[i] = MD5_number(state[i]);rn rn rnrn return MD5_pack(state[0]) +rn MD5_pack(state[1]) +rn MD5_pack(state[2]) +rn MD5_pack(state[3]);rnrnrnfunction MD5_hexhash(data) rn var i, out, c;rn var bit128;rnrn bit128 = MD5_hash(data);rn out = "";rn for(i = 0; i < 16; i++) rn c = bit128.charCodeAt(i);rn out += "0123456789abcdef".charAt((c>>4) & 0xf);rn out += "0123456789abcdef".charAt(c & 0xf);rn rn return out;rnrnrnrn[/code]rn他调用的代码是[code=javascript]rnfunction pwdmd5()rn rn var pwd=document.getElementById("passwords");rn var checkcode=document.getElementById("checkcode");rn var username=document.getElementById("name");rn rn var mm=MD5_hexhash(username.value+pwd.value);rn mm=MD5_hexhash(mm+checkcode.value);rn rn var keystr="";rn rn for(i=0;i<8;i++)rn rn keystr+=MD5_hexhash(mm.substr(i*4,8));rn rn pwd.value=MD5_hexhash(keystr);rn return true;rn rn rn rnrn[/code]
使用js对密码加密解密三种方式
使用js对密码加密解密三种方式,包括md5、base64、sha1等主流加密方式。
JS七种加密解密方法
HTML或JS加密解密     本文一共介绍了七种方法:     一:最简单的加密解密     二:转义字符"\"的妙用     三:使用Microsoft出品的脚本编码器Script Encoder来进行编码    (自创简单解码)     四:任意添加NUL空字符(十六进制00H)    (自创)     五:无用内容混乱以及换行空格TAB大法     六:自写解密函数法
关于js eval 的解密方法
首先,贴个网址 http://www.jb51.net/tools/eval/,在这里可以对一般的 eval 加密js jin
java 混淆、加密js代码
java 混淆、加密js源码包,解压后在main方法中加入路径即可run
前端js加密方式
MD5 MD5,SHA1,Base64加密算法案例 加密 加密结果: MD5加密: SHA1加密: Base64加密(encode): base64解密: base64普通加密方式
JS实现MD5加密,提供多种加密方法
JS实现MD5加密,JS直接可调用 JS实现MD5加密,提供多种加密方法 function hex_md5(s) function b64_md5(s) function str_md5(s) function hex_hmac_md5(key, data) function b64_hmac_md5(key, data) function str_hmac_md5(key, data)
JAVASCRIPT加密方法,JS加密解密综述(7种)
一:最简单的加密解密  对于JAVASCRIPT函数escape()和unescape()想必是比较了解啦(很多网页加密在用它们),分别是编码和解码字符串,比如例子代码  用escape()函数加密后变为如下格式:  alert%28%22%u9ED1%u5BA2%u9632%u7EBF%22%29%3B  如何?还看的懂吗?当然其中的ASCII字符"alert"并没有被加
帮忙看下这两段js是什么意思。
RTrnrn[code=javascript]rn rn rn[/code]rnrnrn[code=javascript]rn rn[/code]
7种JS加密解密
HTML或JS加密解密     本文一共介绍了七种方法:     一:最简单的加密解密     二:转义字符"\"的妙用     三:使用Microsoft出品的脚本编码器Script Encoder来进行编码    (自创简单解码)     四:任意添加NUL空字符(十六进制00H)    (自创)     五:无用内容混乱以及换行空格TAB大法     六:自写解密函数法
jsencrypt表单加密
jsencrypt的使用
web前端三种常见的通过JS加密文本方式,常用于密码加密
sha1: &amp;amp;lt;head&amp;amp;gt; &amp;amp;lt;script type=&amp;quot;text/ecmascript&amp;quot; src=&amp;quot;sha1.js&amp;quot;&amp;amp;gt;&amp;amp;lt;/script&amp;amp;gt; &amp;amp;lt;/head&amp;amp;gt; &a
请大家帮忙看下这段代码实现文字滚动,在线等,谢谢!
[code=HTML]rnrnrn rn rnhellornrnrn rn rn rnrn[/code]rn请大家帮忙看下,哪里有错误,我想的结果是文字左右
js前端AES加密实现方法
js前端AES加密实现方法。用于前端字符串的加密和解密操作。
调用浏览器中的打印功能
调用浏览器页面打印,js代码实现功能,多种实现方法
大家,帮忙看一下,这段js是什么意思.
谢谢帮忙rn rnrnrnrn rn
YUI Compressor完成代码混淆示例
YUI Compressor相关信息 官网 GitHub地址 混淆单个js一般命令,java -jar yuicompressor-x.y.z.jar myfile.js -o myfile-min.js若出现编码错误,就加上编码参数,比如你的文件的编码是utf-8编码,则命令如下,java -jar yuicompressor-x.y.z.jar myfile.js -o myfile-min.j
JS前端加密算法
解密操作对服务器性能颇有消耗。寻思着能不能在前端完成。于是找到了crypto-js。 crypto-js支持各类主流算法。弄个简单点的DES加密。 function decryptByDES(ciphertext, key) { var keyHex = CryptoJS.enc.Utf8.parse(key); var decrypted = CryptoJS
帮忙看下是什么密文
看下这段字符串,有经验的帮忙看下是什么编码或是加密方式,转回来应该是中文的.rnrnrn"userName":"\u6c38\u8fdc\u7684\u9ed1"
帮忙看下这些是什么
rn一个index_ch.asp里面只有这四行代码,但是运行后显示的是一个完整的画面,图片什么的都有哦,上面那些是什么
算法 英文版 第4版
本书作为算法领域经典的参考书,全面介绍了关于算法和数据结构的知识,并特别针对排序、搜索、图处理和字符串处理进行了论述。第4 版具体给出了每位程序员应知应会的50 个算法,提供了实际代码,而且这些Java 代码实现采用了模块化的编程风格,读者可以方便地加以改造。本书配套网站提供了本书内容的摘要及更多的代码实现、测试数据、练习、教学课件等资源。
帮忙看下是什么错误
protected void bt_login_Click(object sender, EventArgs e)rn rnrn rn rn if (Page.IsValid)rn rn OleDbCommand cmd;rn OleDbDataReader reader;rn rn //connect to the databasern string strConn = "Provider = Microsoft.Jet.OLEDB.4.0 ; Data Source = 'E:/资金管理系统/zjglxt/App_Data/zjglxt.mdb'";rn OleDbConnection myConn = new OleDbConnection(strConn);rn rn rn String loginsql = "select * from User where Uname='" + tx_uname.Text + "'and Upwd='" + tx_upwd.Text + "'";rn rn myConn.Open();rn cmd = new OleDbCommand(loginsql, myConn);rn rn rn reader=cmd.ExecuteReader();rn if (reader.Read())rn rn Session["name"] = reader["Uname"];rn Session["company"] = reader["Ucompany"];rn rn elsern rn Response.Write( " "); rn rn rn rn rn执行到cmd.ExecuteReader()时,提示From子句语法错误,可是我找来找去,看不出sql语句哪里有错
点击查看大图,大图上带上一张 、下一张功能(粗糙版)
js片段: //扫描件查看大图、 和左右浏览 $.scanFile={ view:function(obj,imgName,imgPath){ //点击查看大图 var _that=$(obj); var newIndex=_that.parents('li').index();
JS代码实现的自动分页效果
JS代码实现的自动分页效果,JS代码实现的自动分页效果,JS代码实现的自动分页效果
js使用MD5加密
下载md5引入md5文件:&lt;script src="md5.js"&gt;&lt;/script&gt;&lt;script&gt;    var pwd=hex_md5("pwd_string");&lt;/script&gt;原文链接
Md5加密java
java md5加密加密方法代码实现,希望给大家有帮助
js 之混淆加密
最近再做一个web项目,其中有大量的js暴露在客户端,各种源码信息毫无隐私可言。就想能不能是浏览器客户端不能看到js源码。然后就网上查找了会发现大家都认为不可能。 提及最多是可以js混淆加密。就是大家常看到的js压缩文件类似jquery.min.js,密密麻麻的排版不易读懂,但是反压缩还是可以看到。 如下:我写了一个Map.js作为测试 源码: (function(Map){ Map.n
C++问题代码
自己编的代码,存在严重内存泄露,请大家帮忙看下
JavaScriptUtil 混淆加密源码
直接调用obfuscateScript方法js进行混淆加密。 对于格式错误的js加密无效
众数的程序(使用到快速排序)
以下这个众数的程序,帮忙看下哪里出错了?
htc vc root
无意中得到的,技术方面不是很懂。高手帮忙看下
WPF宝石消除完美版
自己做的一个小游戏 WPF,喜欢学习的可以帮忙看下
VS2010编写的服务
求高手帮忙看下,断线报警器启动不了是怎么回事
SQL server应用程序
大家帮忙看下Mysql 应用 程序看能不能用
谁帮看下这段js
这是prototype1.4中的。rn一段rnFunction.prototype.bind = function() rn var __method = this, args = $A(arguments), object = args.shift();rnalert('__method-->'+__method);rn alert('args-->'+args);rn alert('object-->'+object);rn return function() rn return __method.apply(object, args.concat($A(arguments)));rn rnrnrnfunction test()rnalert('hello,test');rnrnrntestrnrn我测试时为什么rnargs-->为空 就是args.length=0;rnobject-->[object Object]rn$A是把arguments转化成Arrayrnshift是左移一元素哟。rnrn既然args的length=0,args.shift更没有了哟。rnrn不理解?rn
各位帮我看下这段js
[code=C#]rnfunction Danxuan_Code(sname,sid)rnrn if(sname.checked)rn sid.style.display="none";rn elsern sid.style.display="block";rn rnrnfunction show1(v)rnrn document.all.Special.style.display=v;rnrnrnfunction show2(cbk) rn rn if(cbk.checked==true) rn rn document.all.Special.style.display="block";rn rn else rn rn document.all.Special.style.display="none";rn rnrn[/code]rn现在问题是出在,我第1次运行页面后什么问题都没有,当我点按钮后,执行第2页的时候它就报document.all.Special.style.display为空或者不是对象
请帮看下这段js
[code=JScript]rncell = row.insertCell(5);rncell.align = "left";rncell.innerHTML='';rn[/code]rnrn页面js报错 提示缺少":"rnrn帮忙看看问题出在哪 谢谢
高手帮忙看下这段代码
import java.awt.*;rnimport java.awt.event.*;rnpublic class MenuDemo extends Framernrn MenuDemo()rn rn super("MenuItem Example");rn MenuBar mb=new MenuBar();rn Menu m=new Menu("File");rn MenuItem mi=new MenuItem("New");rn mi.setEnabled(false);rn m.add(mi);rn m.add("Open...");rn m.add("-");rn m.add("Exit");rn mb.add(m);rn setMenuBar(mb);rn setSize(300,200);rn setVisible(true);rn addWindowListener(new Win());rn rn rn /*public boolean action(Event evt, Object what)rn rn if("New".equals(what))rn return true;rn else if("Open...".equals(what))rn return true;rn rn return false;rn */rn public static void main(String[] args)rn rn new MenuDemo();rn rnrnclass Win extends WindowAdapterrnrn public void windowClosing(WindowEvent e)rn rn System.exit(0);rn rnrn请问我注释掉的那段代码起什么作用啊!rn我把它注释掉和不注释掉程序都没什么区别啊~rn谢谢
帮忙看下这段SQL语句
create table student(rn id int not null IDENTITY,rn name varchar2(32) not null,rn password varchar2(32) not null,rn primary key(id)rn);rnrn错误信息是:rncreate table student(rn *rnERROR 位于第 1 行:rnORA-00922: 缺少或无效选项
大家帮忙看下这段代码。。。
[code=JScript]rn $.ajax(rn type: "POST",rn url: "ajax.php",rn data: "ajaxdo=logincheck&username="+$("#username").val()+"&password="+$("#password").val(),rn success: function(msg)rn switch(msg)rn case '1':$("#linktips").html("登录成功");rn //window.location.href="admin.php";rn window.location.reload();rn break;rn case '2':$("#linktips").html("密码不正确");rn break;rn case '3':$("#linktips").html("用户名不存在");rn break;rn default:$("#linktips").html("未知错误...");rn rn rn );rn[/code]rnie9下面始终不能执行success的function,但是ajax.php页面执行没有问题。其他浏览器很正常。
帮忙看下这段源码Dscaler
优化一个视频监控的图像,采用的deinterlace是借鉴Dscaler里的,boss让阅读Dscaler里的源码 然后山寨一个出来,有些看不懂,请教一下,各位帮帮忙,下面是源码 其实就是一个处理图像的算法 名字叫bob 大概给我讲讲原理就行了rn[code=C/C++]rnBOOL DeinterlaceBob(TDeinterlaceInfo* pInfo)rnrn int i;rn BYTE* lpOverlay = pInfo->Overlay;rn BYTE* CurrentLine = pInfo->PictureHistory[0]->pData;rn DWORD Pitch = pInfo->InputPitch;rnrn // No recent data? We can't do anything.rn if (CurrentLine == NULL)rn rn return FALSE;rn rn rn // If field is odd we will offset it down 1 line to avoid jitter TRB 1/21/01rn if (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD)rn rn if (pInfo->CpuFeatureFlags & FEATURE_SSE)rn rn pInfo->pMemcpy(lpOverlay, CurrentLine, pInfo->LineLength); // extra copy of first linern lpOverlay += pInfo->OverlayPitch; // and offset out output ptrrn for (i = 0; i < pInfo->FieldHeight - 1; i++)rn rn memcpyBOBSSE(lpOverlay, lpOverlay + pInfo->OverlayPitch,rn CurrentLine, pInfo->LineLength);rn lpOverlay += 2 * pInfo->OverlayPitch;rn CurrentLine += Pitch;rn rn pInfo->pMemcpy(lpOverlay, CurrentLine, pInfo->LineLength); // only 1 copy of last linern rn rn rn elsern rn if (pInfo->CpuFeatureFlags & FEATURE_SSE)rn rn for (i = 0; i < pInfo->FieldHeight; i++)rn rn memcpyBOBSSE(lpOverlay, lpOverlay + pInfo->OverlayPitch,rn CurrentLine, pInfo->LineLength);rn lpOverlay += 2 * pInfo->OverlayPitch;rn CurrentLine += Pitch;rn rn rn rn rn // need to clear up MMX registersrn _asmrn rn emmsrn rn return TRUE;rnrnrn[/code]rnrn其中的TDeinterlaceInfo* 如下rn[code=C/C++]rntypedef structrnrn /** set to version of this structurern used to avoid crashing with incompatable versionsrn */rn DWORD Version;rnrn /** The most recent pictures rn PictureHistory[0] is always the most recent.rn Pointers are NULL if the picture in question isn't valid, e.g. becausern the program just started or a picture was skipped.rn */rn TPicture* PictureHistory[MAX_PICTURE_HISTORY];rnrn /// Current overlay buffer pointer.rn BYTE *Overlay;rnrn /// The part of the overlay that we actually showrn RECT SourceRect;rnrn /** which frame are we on nowrn \todo remove thisrn */rn int CurrentFrame;rnrn /// Overlay pitch (number of bytes between scanlines).rn DWORD OverlayPitch;rnrn /** Number of bytes of actual data in each scanline. May be less thanrn OverlayPitch since the overlay's scanlines might have alignmentrn requirements. Generally equal to FrameWidth * 2.rn */rn DWORD LineLength;rnrn /// Number of pixels in each scanline.rn int FrameWidth;rnrn /// Number of scanlines per frame.rn int FrameHeight;rnrn /** Number of scanlines per field. FrameHeight / 2, mostly forrn cleanliness so we don't have to keep dividing FrameHeight by 2.rn */rn int FieldHeight;rnrn /// Results from the NTSC Field comparern long FieldDiff;rn /// Results of the PAL Mode deinterlace detectrn long CombFactor;rn /// Function pointer to optimized memcpy functionrn MEMCPY_FUNC* pMemcpy;rn /// What Type of CPU are we runningrn long CpuFeatureFlags;rn /// Are we behind with processingrn BOOL bRunningLate;rn /// Are we behind with processingrn BOOL bMissedFrame;rn /// Do we want to flip accuratlyrn BOOL bDoAccurateFlips;rn /// How big the source will end uprn RECT DestRect;rnrn /** distance between lines in imagern need not match the pixel widthrn */rn long InputPitch;rn TDeinterlaceInfo;rnrnrntypedef structrnrn // pointer to the start of data for this picturern BYTE* pData;rn // see PICTURE_ flagsrn DWORD Flags;rn // is this the first picture in a new seriesrn // use this flag to indicate changes to any of the rn // paramters that are assumed to be fixed likern // timings or pixel widthrn BOOL IsFirstInSeries;rn TPicture;rnrn[/code]rnrn其中的 memcpyBOBSSE是这样:关键就是这个看不懂:rn[code=C/C++]rnvoid memcpyBOBSSE(void *Dest1, void *Dest2, void *Src, size_t nBytes)rnrn __asmrn rn mov esi, dword ptr[Src]rn mov edi, dword ptr[Dest1]rn mov ebx, dword ptr[Dest2]rn mov ecx, nBytesrn shr ecx, 7 // nBytes / 128rnalign 8rnCopyLoop:rn movaps xmm0, xmmword ptr[esi]rn movaps xmm1, xmmword ptr[esi+16*1]rn movaps xmm2, xmmword ptr[esi+16*2]rn movaps xmm3, xmmword ptr[esi+16*3]rn movaps xmm4, xmmword ptr[esi+16*4]rn movaps xmm5, xmmword ptr[esi+16*5]rn movaps xmm6, xmmword ptr[esi+16*6]rn movaps xmm7, xmmword ptr[esi+16*7]rn movntps xmmword ptr[edi], xmm0rn movntps xmmword ptr[edi+16*1], xmm1rn movntps xmmword ptr[edi+16*2], xmm2rn movntps xmmword ptr[edi+16*3], xmm3rn movntps xmmword ptr[edi+16*4], xmm4rn movntps xmmword ptr[edi+16*5], xmm5rn movntps xmmword ptr[edi+16*6], xmm6rn movntps xmmword ptr[edi+16*7], xmm7rn movntps xmmword ptr[ebx], xmm0rn movntps xmmword ptr[ebx+16*1], xmm1rn movntps xmmword ptr[ebx+16*2], xmm2rn movntps xmmword ptr[ebx+16*3], xmm3rn movntps xmmword ptr[ebx+16*4], xmm4rn movntps xmmword ptr[ebx+16*5], xmm5rn movntps xmmword ptr[ebx+16*6], xmm6rn movntps xmmword ptr[ebx+16*7], xmm7rn add esi, 128rn add edi, 128rn add ebx, 128rn dec ecxrn jne near CopyLooprnrn mov ecx, nBytesrn and ecx, 127rn cmp ecx, 0rn je EndCopyLooprnalign 8rnCopyLoop2:rn mov dl, byte ptr[esi] rn mov byte ptr[edi], dlrn mov byte ptr[ebx], dlrn inc esirn inc edirn inc ebxrn dec ecxrn jne near CopyLoop2rnEndCopyLoop:rn rnrnrn[/code]
帮忙看下这段程序问题在哪里?
是关于给树控件加tooltip的。我先是在OnCreate函数里加入这段代码rn HTREEITEM hItem,hSubItem;rn CTreeCtrl* pTree = (CTreeCtrl*)GetDlgItem(IDC_TREECTRL);rn hItem = pTree->InsertItem("ºÃÓÑ",TVI_ROOT);rn hSubItem = pTree->InsertItem(Contactors[0],hItem);rn hSubItem = pTree->InsertItem(Contactors[1],hItem,hSubItem);rn hSubItem = pTree->InsertItem(Contactors[2],hItem,hSubItem);rn hSubItem = pTree->InsertItem(Contactors[5],hItem,hSubItem);rn hSubItem = pTree->InsertItem(Contactors[6],hItem,hSubItem);rn pTree->ModifyStyle(TVS_NOTOOLTIPS, TVS_INFOTIP); rn if (!m_ctrlTree.Create(WS_CHILD|WS_VISIBLE|TVS_HASLINES|TVS_HASBUTTONS|TVS_LINESATROOT|TVS_SHOWSELALWAYS|TVS_INFOTIP, CRect(0, 0, 0, 0), this, IDC_TREECTRL))rn rn TRACE0("Failed to create instant bar child\n");rn return -1;rn rn其次加入映射消息声明,如下所示:rnvoid CMainFrame::OnGetInfoTip(NMHDR* pNMHDR, LRESULT* pResult) rn CTreeCtrl* pTree = (CTreeCtrl*)GetDlgItem(IDC_TREECTRL);rn *pResult = 0;rn NMTVGETINFOTIP* pTVTipInfo = (NMTVGETINFOTIP*)pNMHDR;rn LPARAM itemData = (DWORD) pTVTipInfo->lParam;rn HTREEITEM hItem = pTVTipInfo->hItem;rn CString tip;rn HTREEITEM hRootItem = m_chassisTree.GetRootItem();rn if (hRootItem != pTVTipInfo->hItem)rnrn tip = "显示字";rnrn elsernrn tip = "显示的字";rnrn strcpy(pTVTipInfo->pszText, (LPCTSTR) tip);rnrn以上代码是参考的别人的,我加了之后,编译通过,但是运行后我把鼠标移到树控件处就弹出一个报错窗口。我在给消息处理函数下断点,发现运行到HTREEITEM hRootItem = m_chassisTree.GetRootItem();时报错窗口弹出。rn请问是哪里出问题,该怎么改??rn
大家帮忙看下这段代码
class ButtonPanel extends JPanelrnrnrn /**rn * rn */rn private static final long serialVersionUID = 31126401022136278L;rnrn public ButtonPanel()rn rn JButton yellowButton = new JButton("yellow");rn JButton blueButton = new JButton("blue");rn add(yellowButton);rn add(blueButton);rn rnrnrn为什么在eclips里面编译的时候要加 rn private static final long serialVersionUID = 31126401022136278L;rn在其jcreator中却不用加,请高手指点
js的常见的三种密码加密方式-MD5加密、Base64加密和解密和sha1加密详解总结
写在前面写前端的时候,很多的时候是避免不了注册这一关的,但是一般的注册是没有任何的难度的,无非就是一些简单的获取用户输入的数据,然后进行简单的校验以后调用接口,将数据发送到后端,完成一个简单的注册的流程,那么一般来说,密码是不做加密的。但是也有一些数据库里面存放的是加密后的密码,这样有一个比较安全的地方在于,即使黑客将用户输入的文本密码得到了,也不知道具体是什么,因为密码是经过加密的。今天就简单的...
大神帮忙看下这段代码
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为什么
帮忙看下这段代码对不对
[code=C#]rn string sqlks="select distinct(month) as month from month where kaohefangshi='1'";//查询考核方式为月的所有月份列表,然后根据月份列表批量增加相应的记录rn SqlCommand cmdsqlks=new SqlCommand(sqlks,conn);rn SqlDataReader reader1=cmdsqlks.ExecuteReader();rn while(reader.Read())rn rn string intsertxjl="insert into month(khdx,khdxfx,khdxfxxh,khnr,fz,jf,kf,khdw,jcfz,mkh,qkh,ykh,kaohefangshi,month) select khdx,khdxfx,khdxfxxh,khnr,fz,jf,kf,khdw,jcfz,mkh,qkh,ykh,kaohefangshi,'"+reader1["month"].ToString().Trim()+"' where mkh='0' and qkh='1' and month='本月'";rn SqlCommand cmdintsertxjl=new SqlCommand(intsertxjl,conn);rn cmdintsertxjl.ExecuteNonQuery();rn reader.NextResult();rn rn[/code]rn关键是循环里边的内容是不是可以全部执行完。。或者有更好的语句能够把整个过程用一个语句完成的也可以rn
帮忙看下这段javascript代码
在什么条件下它会调用ERR_Noneplayer这个变量rnrn
WPF,帮忙看下这段代码
[code=html]rnrn rn rn
帮忙看下这段代码
求用户指定范围内的数的和,一直提示编译错误,找了半天也找不出哪错了,,,如果这段代码省略设置上界和下界的IF设置该怎么改?rnrn#include rnint main()rnrn int v1,v2;rn std::cin>>v1;v2;rn int lower,upper;rn if (v1
帮忙看下这段程序的错误
目的:寻找两个字符串中最大的公共子串。rn已经通过V6编译,但是运行会提示出错。rn基本思路是构造动态的矩阵,代码如下,请高手看看错在什么地方,应该怎样修改。rn谢谢!rn#include rn#include rn#include rnrnusing namespace std;rnrnvoid search(string strr1,string strr2);//寻找最大相同字符串并输出rnrnint main()rnstring a,b;rncout<<>a>>b;rnsearch(a,b);rnreturn 0;rnrnvoid search(string strr1,string strr2)rn int i,j,count;rn int num=0;//参变量rn int len1=strr1.size();//求出输入字符串的长度rn int len2=strr2.size();rn int **sign = new int*[len1];//动态二维数组的创建rn for (i=0;i
帮忙看下这段代码啥意思?
#ifdef USE_DOT_Hrn #include rn#elsern #include rn #if !defined( __BORLANDC__ ) || __BORLANDC__ >= 0x0530rn using namespace std; rn #endifrn#endifrnrnrn1 USE_DOT_H 是什么意思 ?rn2 defined( __BORLANDC__ ) || __BORLANDC__ >= 0x0530 是什么意思?rn
帮忙看下这段语句怎么改
语句如下:rnrnSELECT TaxPayerID, TaxPayerName, iYear, BankName, TaxDeptName, rn (CASE WHEN imonth = '1' AND CancelOrNot = 20 THEN taxmoney ELSE 0 END) rn AS Jan1, (CASE WHEN imonth = '1' THEN taxmoney ELSE 0 END) AS Jan0, rn (CASE WHEN imonth = '2' AND CancelOrNot = 20 THEN taxmoney ELSE 0 END) rn AS Feb1, (CASE WHEN imonth = '2' THEN taxmoney ELSE 0 END) AS Feb0, rn (CASE WHEN imonth = '3' AND CancelOrNot = 20 THEN taxmoney ELSE 0 END) rn AS Mar1, (CASE WHEN imonth = '3' THEN taxmoney ELSE 0 END) AS Mar0, rn (CASE WHEN imonth = '4' AND CancelOrNot = 20 THEN taxmoney ELSE 0 END) rn AS Apr1, (CASE WHEN imonth = '4' THEN taxmoney ELSE 0 END) AS Apr0, rn (CASE WHEN imonth = '5' AND CancelOrNot = 20 THEN taxmoney ELSE 0 END) rn AS May1, (CASE WHEN imonth = '5' THEN taxmoney ELSE 0 END) AS May0, rn (CASE WHEN imonth = '6' AND CancelOrNot = 20 THEN taxmoney ELSE 0 END) rn AS Jun1, (CASE WHEN imonth = '6' THEN taxmoney ELSE 0 END) AS Jun0, rn (CASE WHEN imonth = '7' AND CancelOrNot = 20 THEN taxmoney ELSE 0 END) rn AS Jul1, (CASE WHEN imonth = '7' THEN taxmoney ELSE 0 END) AS Jul0, rn (CASE WHEN imonth = '8' AND CancelOrNot = 20 THEN taxmoney ELSE 0 END) rn AS Aug1, (CASE WHEN imonth = '8' THEN taxmoney ELSE 0 END) AS Aug0, rn (CASE WHEN imonth = '9' AND CancelOrNot = 20 THEN taxmoney ELSE 0 END) rn AS Sep1, (CASE WHEN imonth = '9' THEN taxmoney ELSE 0 END) AS Sep0, rn (CASE WHEN imonth = '10' AND CancelOrNot = 20 THEN taxmoney ELSE 0 END) rn AS Oct1, (CASE WHEN imonth = '10' THEN taxmoney ELSE 0 END) AS Oct0, rn (CASE WHEN imonth = '11' AND CancelOrNot = 20 THEN taxmoney ELSE 0 END) rn AS Nov1, (CASE WHEN imonth = '11' THEN taxmoney ELSE 0 END) AS Nov0, rn (CASE WHEN imonth = '12' AND CancelOrNot = 20 THEN taxmoney ELSE 0 END) rn AS Dec1, (CASE WHEN imonth = '12' THEN taxmoney ELSE 0 END) AS Dec0,rnFROM V_CancelRep1rnGROUP BY iYear, TaxPayerID, TaxPayerName, BankName, TaxDeptName, TaxMoney, rn iMonth, CancelOrNotrnrn这样统计出来同一单位的信息有多条,如果12个月都有的话就有12条,如下,数值为7月份和8月份的,并非在一行统计,求教请问这样的语句怎么修改rnrn340111849021476 安徽省电力公司合肥供电公司2008 中国工商银行合肥市四牌楼支行 合肥市包河区国家税务局 0 0 0 0 0 0 100 0 0 0 0 0 rn340111849021476 安徽省电力公司合肥供电公司2008 中国工商银行合肥市四牌楼支行 合肥市包河区国家税务局 0 0 0 0 0 0 0 100 0 0 0 0 rn
帮忙看下 这段VHDL的错误
LIBRARY IEEE; rn USE IEEE.STD_LOGIC_1164.ALL;rn USE IEEE.STD_LOGIC_UNSIGNED.ALL;rnENTITY TIME ISrn PORT(REST,SP,CLK :IN STD_LOGIC;rn TI:OUT STD_LOGIC;rn SECOND1,SECOND2,MINITUE1,MINITUE2:OUT STD_LOGIC_VECTOR(3 DOWNTO 0));rn END TIME;rnARCHITECTURE ONE OF TIME ISrn SIGNAL TIMECLK:STD_LOGIC;rn SIGNAL CLK12:STD_LOGIC_VECTOR(3 DOWNTO 0);rn SIGNAL SEC1,SEC2:STD_LOGIC_VECTOR(3 DOWNTO 0);rn SIGNAL MINI1,MINI2:STD_LOGIC_VECTOR(3 DOWNTO 0);rnBEGINrn MINITUE1(3 DOWNTO 0);rn END IF;rn END IF;rn END IF;rn END IF;rn END IF;rn END IF;rn END PROCESS; rn END ONE; rnrn为什么提示 non-locally-static attribute names are not support这个错误
帮忙看下这段php代码怎么改?
下面是一段早期php代码,由于php升级及sql server驱动升级rn目前是php 5.2.14 + Sql serve 2008,所以有些用法不同了,像rn$res = mssql_query($sql, $link);改为$res = sqlsrv_query($conn,$sql);rnrn[b]但mssql_fetch_row不知道如何改?[/b]rnrn就这是句怎么改?rn[code=PHP] while ($row = mssql_fetch_row($res))rn $vals[strtolower(str_replace($search, '', $row[0]))] = (empty($row[1]) ? '0' : $row[1]);rn rn[/code]rnrn[code=PHP] #$res = mssql_query($sql, $link);rn $res = sqlsrv_query($conn,$sql);rnrn $search = array(' ', '/sec', '(KB)', '/', '-');rnrn while ($row = mssql_fetch_row($res))rn $vals[strtolower(str_replace($search, '', $row[0]))] = (empty($row[1]) ? '0' : $row[1]);rn rnrn $vals['buffercachehitratio'] = $vals['buffercachehitratio'] / $vals['buffercachehitratiobase'] * 100;rn $vals['logcachehitratio'] = $vals['logcachehitratio'] / $vals['logcachehitratiobase'] * 100;rn $vals['proccachehitratio'] = $vals['cachehitratio'] / $vals['cachehitratiobase'] * 100;rn $vals['memoryhitratio'] = $vals['totalservermemory'] / $vals['targetservermemory'] * 100;rnrn unset($vals['buffercachehitratiobase'], $vals['logcachehitratiobase'], $vals['cachehitratiobase'], $vals['cachehitratio']);rn[/code]rn
我们是很有底线的