原文地址: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
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
FrmMain.cs中存在问题 1. int i=0 设定为了全局常量且未在类顶部,出现问题时不好查找
i 属于常用临时变量,设定全局变量容易引起混乱 2.定义的全局变量但仅在一处方法中使用,定义全局变量过多
3.变量名及控件名等意义不明确又缺少注释,如顶部定义的全局变量 long length =...
分类:
其他好文 时间:
2014-05-12 13:51:01
阅读次数:
370
已知在Java中,boolean、byte、short、int、long、char、float、double这八种是基本数据类型,其余的都是引用类型,比如String、数组、接口、对象等。
当我们声明一个引用类型变量时,系统只为该变量分配了引用空间,并未创建一个具体的对象; 当用new为对象...
分类:
其他好文 时间:
2014-05-12 11:58:21
阅读次数:
342
题目描述Jim is boss of a big company . There are so
many workers in his company that it will take a long time for his command send
to all of his workers ....
分类:
其他好文 时间:
2014-05-12 04:51:29
阅读次数:
307
这个Toast的显示在Android中的用途还是很大的,同时我们也知道toast显示的时间是不可控的,我们只能修改他的显示样式和显示的位置,虽然他提供了一个显示时间的设置方法,但是那是没有效果的(后面会说到),他有两个静态的常量Toast.SHORT和Toast.LONG,这个在后面我会在源码中看到这个两个时间其实是2.5s和3s。那么我们如果真想控制toast的显示时间该怎么办呢?真的是无计可施...
分类:
移动开发 时间:
2014-05-11 20:16:28
阅读次数:
657