摘要: 1、web页面要尽可能简单,让用户不用思考就能知道页面的功能,如果要进行一些崭新的、开拓性的或者非常复杂的页面设计时,此时要利用页面元素的外观、精心选择的名称、页面布局以及少量仔细斟酌过的文字,使页面看起来有一种解释或者识别的功能。2、在设计网页时,必须考虑到用户使用网页的三个事实:用户不是逐字的阅读,而只是扫描一下页面用户不是做最佳的选择,找到一个满意的就可以用户不是追根究底页面的运作原理,只是找个能勉强应付的3、设计web页面时,要使用户尽可能的看到并理解你的网站在每个页面上要建立清楚的层次,使页面在瞬间明白易懂,越重要的部分越突出,逻辑上相关的部分视觉上也要相关,逻辑上包含的部分视觉上要 阅读全文
posted @ 2013-11-28 23:32 OpenSoucre 阅读(411) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include using namespace std;int main(){ string s ; cin >>s; int m; cin >>m; vector l(m),r(m); for(int i = 0 ; i > l[i]>>r[i]; int n = s.length(); vector x(n+1,0),y(n+1,0),z(n+1,0); for(int i = 0; i num(3,0); num[0] = x[r[i]]-x[l[i]-1... 阅读全文
posted @ 2013-11-28 22:47 OpenSoucre 阅读(283) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include using namespace std;int main(){ int n,m; cin >> n >>m; vector a(n),l(m); for(int i = 0 ; i >a[i]; for(int i = 0 ; i >l[i]; set diff; vector res(n,0); for(int i = n-1;i >=0; -- i){ diff.insert(a[i]); res[i] = diff.size(); } ... 阅读全文
posted @ 2013-11-28 22:46 OpenSoucre 阅读(235) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std;int main(){ int n,d; cin >> n >>d; vectora(n); for(int i = 0; i >a[i]; int m; cin >> m; sort(a.begin(),a.end()); int sum = 0; if(m <=n){ for(int i = 0 ; i < m; ++ i) sum+=a[i]; } else{ for(int i ... 阅读全文
posted @ 2013-11-28 22:45 OpenSoucre 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 1、资源竞争:当每个线程都去访问同一段内存时,会导致所谓i资源竞争问题,这时候可以通过“@synchronized block”将实例变量包围起来,创建一个互斥锁, 这样你就可以确保在互斥锁中的代码一次只能被一个线程访问:@synchronized(self){ a.object = value; }2、原子性:将一个property声明为atomic时,通常会把它包裹在一个@synchronized块中,确保是线程安全的@property (atomic, retain) NSString *myString;- (NSString *)myString { @sync... 阅读全文
posted @ 2013-11-28 14:10 OpenSoucre 阅读(253) 评论(0) 推荐(0) 编辑
摘要: NSNotificationCenter主要用于广播消息到多个监听着,其传统用法 1 - (void)viewDidLoad 2 { 3 [super viewDidLoad]; 4 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(someMethod:) name:kMyNotificationIdentifier object:nil]; 5 } 6 7 - (void)dealloc 8 { 9 [[NSNotificationCenter defaultCent... 阅读全文
posted @ 2013-11-28 12:11 OpenSoucre 阅读(185) 评论(0) 推荐(0) 编辑