题意。。。
策略:rt
代码:
#include
#include
#define temp 10003
int ans(int n, int p){
int res = 1;
n %= temp;
while(p){
if(p&1) res = (n*res)%temp;
n = (n*n)%temp;
p /= 2;
}
return res;
}
int ma...
分类:
其他好文 时间:
2014-09-13 00:49:44
阅读次数:
281
import java.io.*;import java.awt.*;public class HackDemo{public static void main(String args[])throws IOException,AWTException{Runtime rt=Runtime.getR...
分类:
编程语言 时间:
2014-09-13 00:38:44
阅读次数:
365
http://www.unitymanual.com/thread-23491-1-1.html今天,这篇文章其实是个老生常谈的问题咯,在网上类似的文章也比比皆是,在此我只是做个详细总结方便大家能够更好、更快的掌握,当然,如有不足的地方 欢迎指正!!!相信大家在开发过程中,难免会保存一些文件在客户端...
分类:
移动开发 时间:
2014-09-12 23:24:34
阅读次数:
392
我们组的搜索服务在业务量大时会时不时出现应用拿不到redis 的connection,整个程序的所有线程都卡在如下的位置,导致前端的新请求进不来,搜索服务假死,整个程序无响应。Thread 4 (Thread 0x7ff97222d700 (LWP 222201)):#0 0x000000339f....
分类:
其他好文 时间:
2014-09-12 16:55:23
阅读次数:
276
处理全局异常类Android系统的“程序异常退出”,给应用的用户体验造成不良影响。为了捕获应用运行时异常并给出友好提示,便可继承UncaughtExceptionHandler类来处理。通过Thread.setDefaultUncaughtExceptionHandler()方法将异常处理类设置到线...
分类:
移动开发 时间:
2014-09-12 10:06:33
阅读次数:
298
转载自 :http://greemranqq.iteye.com/blog/1705867转载自:http://www.cnblogs.com/xwdreamer/archive/2011/11/21/2296930.htmlJava代码 Exceptioninthread"ContainerBac...
分类:
编程语言 时间:
2014-09-12 10:04:43
阅读次数:
213
技术说明:TCMalloc全称Thread-CachigMalloc,是谷歌开发的开源工具Google-preftools中的一个成员。与标准的glibc库的Malloc相比,TCMalloc库在内存分配效率和速度上要高很多,在很大程度上提高了服务器在高并发情况下的性能,从而降低了系统的负载。一.安装libunwind:1.安装..
分类:
其他好文 时间:
2014-09-12 02:27:53
阅读次数:
248
前言:虚拟化的理论知识我就不啰嗦了,可以参见http://bbs.linuxtone.org/thread-24347-1-1.html,kvm全称Kernel-basedVirtualMachine,其实kvm只是一个内核模块,提供虚拟cpu和内存管理的模块,至于其它的设备是由qemu模拟的,如网卡,显卡,磁盘等。后来redhat联合IBM以及Linu..
分类:
其他好文 时间:
2014-09-12 02:27:14
阅读次数:
334
centos 6.5 在virtual box 上 安装增强版工具: 出现:centos unable to find the source of your current linux kernelIs it too late to contribute to this thread? I fo.....
分类:
其他好文 时间:
2014-09-11 19:10:42
阅读次数:
160