$(function(){ $('li:has(ul)') .click(function(event){ if (this == event.target){ if($(this).childr...
分类:
Web程序 时间:
2014-08-11 02:37:31
阅读次数:
243
加上两个下划线变量或者方法变为私有。 >>> class Bird: ... __song = "spark" ... def sing(self): ... return self.__song ... >>> b = Bird() >>> b.sing() 'spark' ...
分类:
编程语言 时间:
2014-08-10 18:12:40
阅读次数:
284
iOS 7中的代码代段
// 使用上下文截图,并使用指定的区域裁剪,模板代码
- (void)screenShot
{
// 将要被截图的view,即窗口的根控制器的view(必须不含状态栏,默认ios7中控制器是包含了状态栏的)
BeyondViewController *beyondVC = self.view.window.rootViewController;...
分类:
移动开发 时间:
2014-08-10 13:01:38
阅读次数:
290
Python的getattr(),setattr(),delattr(),hasattr()getattr()函数是Python自省的核心函数,具体使用大体如下:获取对象引用getattrGetattr用于返回一个对象属性,或者方法classA: def__init__(self): self.na...
分类:
编程语言 时间:
2014-08-10 01:38:09
阅读次数:
367
Given inorder and postorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the tree.
给出二叉树的中序遍历和后序遍历结果,恢复出二叉树。
后序遍历序列的最后一个元素值是二叉树的根节点的值,查找...
分类:
其他好文 时间:
2014-08-09 23:15:09
阅读次数:
312
PHP编程中经常需要用到一些服务器的一些资料,特把$_SERVER的详细参数整理下,方便以后使用。 $_SERVER[‘PHP_SELF‘] #当前正在执行 脚本的文件名,与 document root相关。 $_SERVER[‘argv‘] #传递给该 脚本的参数...
分类:
Web程序 时间:
2014-08-09 18:59:19
阅读次数:
278
初次使用scrollview, 发现你在nib中布置好视图后,运行居然不能滚动,请只能说写ios的几位太懒了。
发现问题解决问题吧,是让其滚动必须设置scrollview的contentsize, size需比uiscrollview的frame要大,设成scroll里面的内容大小就可以了,如下
[self.scrollView setContentSize:CGSizeMake(320,...
分类:
移动开发 时间:
2014-08-09 13:28:27
阅读次数:
280
Fedya studies in a gymnasium. Fedya's maths hometask is to calculate the following expression:
(1n?+?2n?+?3n?+?4n) mod 5
for given value of n. Fedya managed to complete the task. Can you? Note tha...
分类:
其他好文 时间:
2014-08-09 11:47:07
阅读次数:
404
Problem Description:
Two elements of a binary search tree (BST) are swapped by mistake.
Recover the tree without changing its structure.
Note:
A solution using O(n)
space is pretty straigh...
分类:
其他好文 时间:
2014-08-08 21:22:36
阅读次数:
315
SSC配置文件(* .escfg)和奴隶项目文件(* .esp)。
每个SSC版本提供的配置文件,包括所有设置和信息
主要的用户界面元素
工具栏:文件,工具,工程,帮助
窗口:从站项目导航;冲突窗口。
File –Saveas 只是保存了相应的esp文件
若要保存相关的src源文件,需要进行操作:Project—New Slave Files...
分类:
其他好文 时间:
2014-08-08 18:19:56
阅读次数:
317