现在位置: 首页 > blockade发表的所有文章
  • 06月
  • 08日
综合 ⁄ 共 6425字 评论关闭
动态下拉列表的原理其实很简单的,当某一下拉列表触发了onchange事件,然后使用AJAX在后台向服务器异步请求数据,最后将服务器返回的数据进行解析后动态添加到指定的select上即可!     首先来看后台的数据输出,我们假设服务器传送给客户段的JSON数据格式为如下: {     "options" : [         {"value" : 值,"text" : 文本},         {"value" : 值,"text" : 文本},         {"value" : 值,"text" : 文本}        ] }     其中options是整个JSON对象的标识符,它是一个数组,该数组中的每一个值表示一个select中的option,当然......
阅读全文
  • 05月
  • 09日
综合 ⁄ 共 10703字 评论关闭
Chapter 9. Queries and EJB QL(查询和EJB QL) Querying is a fundamental feature of all relational databases. It allows you to pull complex reports, calculations, and information about intricately(杂乱的) related objects from persistence storage. Queries in Java Persistence are done using both the EJB QL query language and native Structured Query Language (SQL). 查询是所有关系数据库的一个基本特征.他可以让你从持久化存储中得到复杂的报表,统计和复杂关系对象的信息.在java持久化中可以采用EJB QL查......
阅读全文
  • 04月
  • 28日
综合 ⁄ 共 842字 评论关闭
//将字符串拆成字符,并存到数组中 String.prototype.strToCharsCH = function(){     var chars = new Array();     for (var i = 0; i < this.length; i++){         chars[i] = [this.substr(i, 1), this.isCHS(i)];     }     String.prototype.charsArray = chars;     return chars; }; //判断某个字符是否是汉字 String.prototype.isCHS = function(i){     if (this.charCodeAt(i) > 255 || this.charCodeAt(i) < 0)         return true;     else         return false; }; //截取字符串(从start字节到end字......
阅读全文
  • 02月
  • 22日
综合 ⁄ 共 2069字 评论关闭
Problem Description Tired of playing computer games, alpc23 is planning to play a game on numbers. Because plus and subtraction is too easy for this gay, he wants to do some multiplication in a number sequence. After playing it a few times, he has found it is also too boring. So he plan to do a more challenge job: he wants to change several numbers in this sequence and also work out the multiplication of all the number in a subsequence of the whole sequence. To be a friend of this gay, y......
阅读全文
  • 11月
  • 17日
综合 ⁄ 共 2576字 评论关闭
       (注:【D3D11游戏编程】学习笔记系列由CSDN作者BonChoix所写,转载请注明出处:http://blog.csdn.net/BonChoix,谢谢~)          前一段时间破费从美国Amazon上买到了一直梦寐以求的游戏编程方面的书,其中包括介绍Direct3D方面最经典的“龙书”:《Introduction to 3D Game Programming with Direct3D 11》。        自一年前读完D3D9那版以后就深深被作者Luna的写作风格吸引住了,再复杂的技术在他笔下一切变得浅显易懂,从头到尾由浅入深,跟着作者的思路看下来基本不会感觉到任何跳跃,知识自然而然地就掌握了。尤其是......
阅读全文
  • 11月
  • 13日
综合 ⁄ 共 506字 评论关闭
#!/bin/bash # Get current swap usage for all running processes # Erik Ljungstrom 27/05/2011 SUM=0 OVERALL=0 for DIR in `find /proc/ -maxdepth 1 -type d | egrep "^/proc/[0-9]"` ; do PID=`echo $DIR | cut -d / -f 3` PROGNAME=`ps -p $PID -o comm --no-headers` for SWAP in `grep Swap $DIR/smaps 2>/dev/null| awk '{ print $2 }'` do let SUM=$SUM+$SWAP done echo "PID=$PID - Swap used: $SUM - ($PROGNAME )" let OVERALL=$OVERALL+$SUM SUM=0 done echo "Overall swap used: $OVERALL" 注意: 使用sudo或......
阅读全文
  • 11月
  • 06日
综合 ⁄ 共 2858字 评论关闭
 user32.dll是Windows用户界面相关应用程序接口,用于包括Windows处理,基本用户界面等特性,如创建窗口和发送消息。       [DllImport("user32.dll", EntryPoint = "FindWindow")]     public extern static IntPtr FindWindow(string lpClassName, string lpWindowName);     [DllImport("user32.dll", EntryPoint = "FindWindowEx")]     public  static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);     [DllImport("user32.dll", EntryPoint = "SendMessage......
阅读全文
  • 10月
  • 20日
综合 ⁄ 共 4822字 评论关闭
空程序: int main() { 00411360  push        ebp       ;压入ebp 00411361  mov         ebp,esp     ;ebp = esp,保留esp,待函数调用完再恢复,因为函数调用中肯定会用到esp. 00411363  sub         esp,0C0h ;esp-=0C0h(192);为该函数留出临时存储区 ;将其他指针或寄存器中的值入栈,以便在函数中使用这些寄存器。 00411369  push        ebx       ;压入ebx 0041136A  push        esi       ;压入esi 0041136B  push        edi       ;压入edi 0041136C  lea         edi,[ebp-0C0h] ;读入[ebp-0C0h]有效地址,即原esp-0C0h,正......
阅读全文
  • 10月
  • 03日
综合 ⁄ 共 2727字 评论关闭
Piggy-Bank Problem Description Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes from Irreversibly Bound Money (IBM). The idea behind is simple. Whenever some ACM member has any small money, he takes all the coins and throws them into a piggy-bank. You know that this process is irreversible, the coins cannot be removed without breaking the pig. After a sufficiently long time, there should be enough......
阅读全文
  • 05月
  • 06日
综合 ⁄ 共 1034字 评论关闭
题目大意:给定一个无向图,求联通块个数,以及k次每次摧毁一个点后的;联通块个数 将边和摧毁的点全记录下来,反着做即可。 注意被摧毁的点不能算作联通块 #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> #define M 400400 using namespace std; struct abcd{ int to,next; }table[M]; int head[M],tot; int n,m,q; int fa[M],stack[M],destroy[M],top,now; bool destroyed[M]; int Find(int x) { if(!fa[x]||fa[x]==x) return fa[x]=x; return fa[x]=Find(fa[x]); }......
阅读全文
  • 03月
  • 14日
综合 ⁄ 共 2465字 评论关闭
/************************************************************** 1020. Tree Traversals (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to output the level order traversal sequence of the corresponding binary tree. Input Specification: Each input file contains one test case. For each case, the first l......
阅读全文
  • 08月
  • 04日
综合 ⁄ 共 1573字 评论关闭
UML的学习,也持续了一段时间了。从最初的迷茫,到现在的跃跃欲试。可是,刚想实战,便碰壁了。 看完视频中对9中图的概述,也看完了对Rational Rose软件的使用介绍,于是便想着实战一把,画个图试试。结果就是赠给自己一句话:还没学会走,就别想着跑了。 刚开始觉得示例中画个小人,添个任务,很简单嘛。可是,真准备动手了,却不知道如何下手。最重要的就是关系,几种关系,将会关系到后面每一块领地。 “能用继承表示就一定要用泛化关系,当描述接口与类的实现就用实现关系,两个类之间有结构关系就用关联,除此之外采......
阅读全文