信息类 private String body;private String number;private int type;private long id;四个变量,然后有分别set和get。构造函数分别初始化这四个变量。生成xml标签函数 public static void backUpXml...
分类:
移动开发 时间:
2014-06-19 00:30:11
阅读次数:
319
数学题,推出公式就好了!//Accepted 804 KB 0 ms#include #include const long long pp = 100003;long long pow(long long a,long long b){ if (b==0) return 1; ...
分类:
其他好文 时间:
2014-06-18 18:20:41
阅读次数:
163
当数据库的字段值允许为空时, 而且此时内容也为空时,则执行查询会出错,例如
CString str = pRecordset->GetFields()->GetItem((long)0)->GetValue();
或者
str=
pRecordset->GetCollect("posInfo");
会弹出如下窗口提示出错!
更加奇怪的是 catch(....
分类:
数据库 时间:
2014-06-18 12:15:56
阅读次数:
415
求一个大数N^N的值的最右边的数字,即最低位数字。
简单二分法求解就可以了。
不过注意会溢出,只要把N % 10之后,就不会溢出了,不用使用long long。
#include
int rightMost(int n, int N)
{
if (n == 0) return 1;
int t = rightMost(n / 2, N);
t = t * t % 10;;
...
分类:
Web程序 时间:
2014-06-18 11:21:53
阅读次数:
243
输入一个年份,判断是否为闰年。判断闰年的方法是:如果该年能被4整除但不能被100整除;或者能被400整除,就是闰年。 1 #include 2 3 int main( int argc, char* argv[] ) 4 { 5 6 unsigned long year; 7 ...
分类:
其他好文 时间:
2014-06-18 09:42:30
阅读次数:
152
求最大公约数可采用辗转相除法,其流程如图所示。最小公倍数就是两个整数的乘积除以其最大公约数。 1 #include 2 3 int main() 4 { 5 unsigned long a, b, c=0; //两个整数和临时变量 6 unsigned long lc...
分类:
其他好文 时间:
2014-06-18 09:34:46
阅读次数:
243
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3037
推出公式为C(n + m, m) % p, 用Lucas定理求大组合数取模的值
代码:
#include
#include
#include
using namespace std;
int t;
long long n, m, p;
long long pow(long lon...
分类:
其他好文 时间:
2014-06-18 06:06:54
阅读次数:
255
具体解释见小结。
#include
#include
#include
#include
#include
#include
#include
#include
#include
#pragma comment(linker, "/STACK:1024000000");
#define EPS (1e-8)
#define LL long long
#define ULL u...
分类:
其他好文 时间:
2014-06-17 16:26:54
阅读次数:
288
今天调用JAVA接口,有一个long[]行参数,一开始用new Long[]{}来传参数编译错误,然后再用new long[]{}后正常。上午开会讨论项目剩余问题,下午调试修改一个接口,然后开会讨论接口问题,当面讨论效率高不少。中午想看智能家居相关知识,被红外遥控,智能控制器,射频识别都一些肤浅的概...
分类:
其他好文 时间:
2014-06-17 13:30:06
阅读次数:
201
迷人的伸展树、、、
都是伸展树很裸的操作,没什么技术含量。
标记下放的时候注意一下就好。。。
#include
#include
#include
#include
#include
using namespace std;
#define LL long long
#define maxn 220000
#define mem(a,b) memset(a,b,sizeof(a))
#def...
分类:
其他好文 时间:
2014-06-16 21:27:54
阅读次数:
229