1 public static void setScreenBright(Activity activity, boolean keepScreenOn) {2 if (keepScreenOn) {3 activity.getWindow().add...
分类:
移动开发 时间:
2015-11-25 23:36:30
阅读次数:
237
1 public void toggleFullscreen(boolean fullScreen) 2 { 3 //fullScreen为true时全屏 4 5 WindowManager.LayoutParams attrs = getWindow().ge...
分类:
移动开发 时间:
2015-11-25 23:25:49
阅读次数:
176
导航:基本数据类型对象类型id类型1.基本数据类型Objective-C中的基本类型与C语言的基本类型一样,主要有:int,long,float,double,char,void,bool等. 值得注意的是,在Foundation框架中,系统为某些数据起了别名,如: NSInteger 是 lon....
分类:
其他好文 时间:
2015-11-25 22:29:44
阅读次数:
157
在 http config中对 json formatter进行配置,如下: public static class WebApiConfig { public static void Register(HttpConfiguration config) { ...
分类:
Windows程序 时间:
2015-11-25 22:00:42
阅读次数:
1024
登录验证码 public class VerifyCodeServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) ...
分类:
其他好文 时间:
2015-11-25 22:00:07
阅读次数:
167
本章的标题是数据和C,主要内容是介绍数据类型中的整数类型和浮点数类型。本章的第一段代码#include int main(void){ float weight; /*用户的体重*/ float value; /*相等重量的铑的价值*/ printf ("Are you wo...
分类:
其他好文 时间:
2015-11-25 21:53:02
阅读次数:
153
一、头文件 #ifndef _PIT_H_ #define _PIT_H_ extern uint32_t zero; //定义定时器 typedef enum PITn { PIT0, PIT1, PIT2, PIT3 } PITn; void pit_init(PITn, u32 cnt); ....
分类:
其他好文 时间:
2015-11-25 21:52:55
阅读次数:
848
求一个数的质因数和因数都是可以采用sqrt的算法。 求质因数: vector g; void cal(int x) { int xx=x; for(int i=2;i*i g; void cal(int x) { for(int i=1;i*ii) g.push_back(x/i); } } } 刷...
分类:
其他好文 时间:
2015-11-25 21:16:02
阅读次数:
136
线程造成的内存泄漏对于线程造成的内存泄漏,也是平时比较常见的,如下这两个示例可能每个人都这样写过://——————test1 new AsyncTask() { @Override protected Void doInBackground(Void... params) { SystemClock...
分类:
移动开发 时间:
2015-11-25 19:26:40
阅读次数:
182
1.@ModelAttribute注释void返回值的方法[java] view plaincopyprint?01.@Controller 02.public class HelloModelController { 03. 04. @ModelAttribute 05. ...
分类:
编程语言 时间:
2015-11-25 19:19:57
阅读次数:
189