需求是这样的,从子节点寻找指定className的父节点,一开始就想到递归(笨!),Dom结构如下:
先通过id获得layer_4的div,然后逐层向上寻找最外层的layer_1,一开始我试图用如下递归获取: 1 function...
分类:
编程语言 时间:
2014-05-14 02:29:32
阅读次数:
289
链接: http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=1963
Description:
SunShine喜欢写日记,她把她的日记用TXT文件都保存在电脑里。每月一号和十六号,她都会新建一个TXT文件,然后接下来半个月,她都会在这个日记本里写。(为了方便,我们假设每个月都是30天)。今天是元旦,...
分类:
其他好文 时间:
2014-05-13 09:26:03
阅读次数:
352
1、定义C函数:
void dynamicMethodIMP(id
self, SEL _cmd)
{
NSLog(@"蜗牛也疯狂");
}
2、重写函数+(BOOL)resolveInstanceMethod:(SEL)sel
+(BOOL)resolveInstanceMethod:(SEL)sel
{
class_addMethod([self
...
分类:
移动开发 时间:
2014-05-13 08:09:05
阅读次数:
412
//需求:由于项目刚上传,没有票数,为了表现出一定的人气,需要在一开始把各项目的票数赋一个值 ,
但每个项目不能一样,否则容易看出问题,呵呵 。
DECLARE @Id varchar(50)
DECLARE My_Cursor CURSOR --定义游标
FOR (SELECT Id FROM dbo.kinpanAwardProject where session=9) --查出...
分类:
数据库 时间:
2014-05-13 07:25:04
阅读次数:
405
在include标签中不能省略
layout_width或者layout_height否则设置layout_weight就会无效。如下设置即可
android:id="@+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="w...
分类:
其他好文 时间:
2014-05-13 07:12:47
阅读次数:
389
/*
ID:kevin_s1
PROG:dualpal
LANG:C++
*/
#include
#include
#include
#include
#include
using namespace std;
int N,S;
vector result;
bool isPalindromic(string num){
bool flag = true;
int len =...
分类:
其他好文 时间:
2014-05-13 06:10:09
阅读次数:
312
链接: http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=1916
Description:
小w和小z想到了一个新游戏,在这个游戏中他们各有N个卡片。小w想去使用她的卡片去覆盖小z的卡片。
卡片A能覆盖卡片B的条件是卡片A的高不小于卡片B的高同时卡片A的宽不小于卡片B的宽。
现在请计算出小w的...
分类:
其他好文 时间:
2014-05-13 06:04:58
阅读次数:
247
今天发现在oracle中的select语句可以用STARTWITH...CONNECTBYPRIOR子句实现递归查询,connectby是结构化查询中用到的,其基本语法是:select...fromtablenamestartwithcond1connectbycond2wherecond3;简单说来是将一个树状结构存储在一张表里,比如一个表中存在两个字段:id,par..
分类:
数据库 时间:
2014-05-13 01:33:11
阅读次数:
294
1.
使用aapt工具,给所有的res目录下的资源文件生成对应的id,id会被放进R.java文件中2.
JavaC编译器,将所有Java文件转换为Class文件,其中,内部类会分别生成.class文件,命名格式为MainActivity$内部类.class
R$String.class等3. 将c...
分类:
移动开发 时间:
2014-05-12 22:20:50
阅读次数:
420
body { font-family:Verdana; font-size:14px;
margin:0;} #container {margin:0 auto; width:100%;}定义网页主体 字体是 Verdana 字体大小是 14px
网页主体距离浏览器边框距离为0、又定义了一个类(id...
分类:
Web程序 时间:
2014-05-12 20:43:32
阅读次数:
325