- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{ return UIInterfaceOrientationMaskP....
分类:
移动开发 时间:
2014-08-01 13:23:21
阅读次数:
202
//控制输入框的字数- (void)textViewDidChange:(UITextView *)textView{ NSInteger number = [textView.text length]; if (number > 300) { textView.text = [textV...
分类:
移动开发 时间:
2014-08-01 13:10:51
阅读次数:
286
1.Build Settings-->搜索other linker Flags-->将other linker Flags设置为-objc2.用2.1.1的版本的百度地图3.换高德地图
分类:
移动开发 时间:
2014-08-01 12:59:51
阅读次数:
359
据说暴力也过了,还傻逼地写了这么长。。。
#include
#include
#include
#include
using namespace std;
#define ll long long
#define L(x) (x<<1)
#define R(x) (x<<1|1)
#define Val(x) tree[x].val
#define Lazy(x) tree[x].laz...
分类:
其他好文 时间:
2014-07-31 20:54:47
阅读次数:
283
http://poj.org/problem?id=2828
学到的思维:
1、变化的或者后来的优先影响前面的,那么从最后一个往前看,最后一个就成了 确定的, 并且后来的也可以确定----如果从前往后,所有的随时都不是确定的
2、线段树叶子节点直接维护区间(线段)信息,非叶子节点v维护的是以v为树根的整个子树的信息,那么假设父节点rt信息为[l,r]那么左子树维护[l,mid],右子树维护[...
分类:
其他好文 时间:
2014-07-31 09:53:06
阅读次数:
181
题意:有n个数初始值都为1,m个操作a,b,c,表示把区间[a,b]变为c,求最后n个数的和。
经典区间更新求和问题,需要用到延迟标记(或者说是懒惰标记),简单老说就是每次更新
的时候不要更新到底,用延迟标记使得更新延迟到下次需要更新或询问的时候。
#include
#include
#include
#include
#include
#include
#inclu...
分类:
其他好文 时间:
2014-07-30 12:20:23
阅读次数:
241
http://stackoverflow.com/questions/9603165/show-uilabel-animatedhttp://stackoverflow.com/questions/11661077/ios-making-an-object-on-view-controller-di...
分类:
移动开发 时间:
2014-07-29 21:18:32
阅读次数:
276
http://stackoverflow.com/questions/458632/how-can-my-iphone-app-detect-its-own-version-numberhttp://stackoverflow.com/questions/16888780/ios-app-progr...
分类:
移动开发 时间:
2014-07-29 21:00:12
阅读次数:
301
第一题最小生成树#include #include using namespace std;#define max 501const int maxd =(1>t; while(t--){ cin>>n; for(int i=0;i>a[i][j]; a[i][i]=maxd; } bu...
分类:
其他好文 时间:
2014-07-28 02:56:30
阅读次数:
225
把当前屏幕作为获取成为图片- (UIImage *)rn_screenshot { UIGraphicsBeginImageContext(self.bounds.size); [self.layer renderInContext:UIGraphicsGetCurrentContext()]; U...
分类:
移动开发 时间:
2014-07-27 23:21:19
阅读次数:
216