修改.proje
修改.settings/org.eclipse.wst.common.component文件...
分类:
编程语言 时间:
2014-05-07 07:44:46
阅读次数:
356
题目大意:
给出m个询问,问【l,r】之间的和 ,求出有多少次询问不和之前的矛盾的。
思路分析:
用并查集记录当前节点到根节点的和。
#include
#include
#include
#include
#define maxn 222222
using namespace std;
int set[maxn];
int sum[maxn];
in...
分类:
其他好文 时间:
2014-05-07 07:35:05
阅读次数:
386
LRU Cache
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.
get(key) - Get the value
(will always be posi...
分类:
其他好文 时间:
2014-05-07 07:16:21
阅读次数:
316
eshell是emacs shell的简称,是emacs自带的shell.开始设置的时候还在想是否要找到它的key map (eshell-mode-map?).
原来它是采用hook设置,如下所示
(add-hook 'eshell-mode-hook
(lambda ()
(local-set-key (kbd "C-j") 'switch-to...
分类:
其他好文 时间:
2014-05-07 05:25:39
阅读次数:
253
如果placeholderImage 为空的话,会出现显示不出下载的图片,应该给他一个展位图
[cell.imageView
setImageWithURL:imageUrl placeholderImage:nil options:SDWebImageLowPriority |
SDWebImageRetryFailed];
应该: [cell.imageView setI...
分类:
Web程序 时间:
2014-05-07 05:24:58
阅读次数:
685
之前碰到过一个问题。 就是利用storyboard拖动出来的控件, 在iOS7上跑老是莫名的下移。比如这样(红色区域为多余的)解决办法:iOS7在Conttoller中新增了这个属性:automaticallyAdjustsScrollViewInsets,当设置为YES时(默认YES),如果视图里面存在唯一一个UIScrollView或其子类View,那么它会自动设置相应的内边距,这样可以让sc...
分类:
移动开发 时间:
2014-05-07 04:26:17
阅读次数:
513
简单谈谈 Python 中容器的遍历和一下小技巧。
1、遍历单个容器
下面代码遍历一个 List 结构,同样适用于 Tuple、Set 结构类型
>>> x = [1, 2, 3, 'p' , 'y']
>>> for v in x:
... print(x)
...
1
2
3
p
y
遍历字典 Dict 结构也是...
分类:
编程语言 时间:
2014-05-07 04:12:39
阅读次数:
395
package com.array;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import...
分类:
编程语言 时间:
2014-05-07 03:45:11
阅读次数:
365
(iOS开发)确保设置话筒模式成功 AudioSessionSetProperty...
分类:
移动开发 时间:
2014-05-06 15:05:42
阅读次数:
452