原文地址:mysql慢日志文件分析处理作者:maxyicha
mysql有一个功能就是可以log下来运行的比较慢的sql语句,默认是没有这个log的,为了开启这个功能,要修改my.cnf或者在mysql启动的时候加入一些参数。如果在my.cnf里面修改,需增加如下几行long_query_time
...
分类:
数据库 时间:
2014-05-14 01:35:12
阅读次数:
396
题目来源:POJ 2478 Farey Sequence
题意:输入n 求 phi(2)+phi(3)+phi(4)+...+phi(n)
思路:用类似筛法的方式计算phi(1), phi(2), ..., phi(n) 再求前缀和
#include
#include
#include
//欧拉phi函数
const int maxn = 1000010;
typedef long...
分类:
其他好文 时间:
2014-05-14 01:05:22
阅读次数:
323
在使用消息队列时,调用#include #include #include #include
#include #include struct mymsg{ long mytype; char even[32];};#define VALUE
(key_t)0x1fffint main(){ ...
分类:
系统相关 时间:
2014-05-14 00:48:02
阅读次数:
487
1 题目大意给出一个n,求sum(gcd(i,j),014 #include 15 using
namespace std;16 #define Max 100000017 18 long long phi[Max+5],ans[Max+5];19 int
prime[Max/3];20 bool....
分类:
其他好文 时间:
2014-05-13 22:40:58
阅读次数:
251
1 #include 2 3 using namespace std; 4 long long p;
5 long long a[20]; 6 long long solve(long long n){ 7 long long left,m,sum =0; 8
for(i...
分类:
其他好文 时间:
2014-05-13 21:29:55
阅读次数:
369
1 /** 2 大意: 求[1,m], [1,n] 之间有多少个数互素。。。做了 1695
,,这题就so easy 了 3 **/ 4 #include 5 #include 6 #include 7 using namespace std; 8
const long long max...
分类:
其他好文 时间:
2014-05-13 21:28:49
阅读次数:
349
Pat1016代码
题目描述:
A long-distance telephone company charges its customers by the following rules:
Making a long-distance call costs a certain amount per minute, depending on the time of day w...
分类:
其他好文 时间:
2014-05-13 06:45:05
阅读次数:
460
题目来源:POJ 1006 Biorhythms
题意:给出3个周期第一次发生的时间 和 当前开始的天数 求三个周期下一次到达高峰期发生在哪一天
思路:这题很水 试一下我的模版而已
#include
#include
using namespace std;
typedef long long LL;
const int maxn = 10;
int a[maxn], m[maxn];
...
分类:
其他好文 时间:
2014-05-13 05:07:28
阅读次数:
253
复数: 复数比较详细的内容请参考:复数代数
C支持复数的数学计算,复数Z可以在笛卡尔坐标表示为:Z=x+y*I;其中x和y是实数,I是虚数单位。数x被称为实部,数y为虚部。在c语言中,一个复数是有浮点类型表示的实部和虚部。两部分都具有相同的类型,无论是float,double或者long
dou.....
分类:
编程语言 时间:
2014-05-12 22:05:31
阅读次数:
650
这个Toast的显示在Android中的用途还是很大的,同时我们也知道toast显示的时间是不可控的,我们只能修改他的显示样式和显示的位置,虽然他提供了一个显示时间的设置方法,但是那是没有效果的(后面会说到),他有两个静态的常量Toast.SHORT和Toast.LONG,这个在后面我会在源码中看到这个两个时间其实是2.5s和3s。那么我们如果真想控制toast的显示时间该怎么办呢?真的是无计可施...
分类:
移动开发 时间:
2014-05-11 20:16:28
阅读次数:
657