问题描述:
SQL进行IN查询时出现:java.sql.SQLException: ORA-01795: 列表中的最大表达式数为 1000
解决办法:
问题原因是:SQL进行IN查询时,IN中的数据量不能超过1000条。
例如:select * from student where id in (‘S1’,'S2'...........)
如果in后面数据量过多的话就会报错。
...
分类:
其他好文 时间:
2015-06-04 22:55:15
阅读次数:
294
有时遇到一种情况,.ShowDialog()不显示,也不报错;如下:
private void button1_Click(object sender, EventArgs e)
{
Thread thread = new Thread(show);
thread.Start();
}
void sh...
分类:
其他好文 时间:
2015-06-04 22:55:26
阅读次数:
194
因项目缘故需重新定制SwitchButton,效果如下:
过程如下:
1.圆角矩形的绘制
2.字体绘制
3.小圆绘制
4.左右滑动动画效果绘制
代码如下:
package com.smart.view;
import java.util.Timer;
import java.util.TimerTask;
import android.annotation.Suppre...
分类:
其他好文 时间:
2015-06-04 22:53:53
阅读次数:
186
Mathematically some problems look hard. But with the help of the computer, some problems can be easily solvable.In this problem, you will be given two integers a and b. You have to find the summation o...
分类:
其他好文 时间:
2015-06-04 22:54:53
阅读次数:
161
Description
We say that integer x, 0 < x < p, is a primitive root modulo odd prime p if and only if the set { (xi mod p) | 1 <= i <= p-1 } is equal to { 1, …, p-1 }. For example, the consecutive power...
分类:
其他好文 时间:
2015-06-04 22:54:39
阅读次数:
231
Description
Given n, a positive integer, how many positive integers less than n are relatively prime to n? Two integers a and b are relatively prime if there are no integers x > 1, y > 0, z > 0 such t...
分类:
其他好文 时间:
2015-06-04 22:54:18
阅读次数:
175
题意:
给出一个数字D
我们可以选择1-D中可以被D整除的数字,然后用D出得到一个新的数字D1;
然后在找所有D1的因子,用D1除,直到得到1;
问除的次数的期望值;
思路:
d[i] 代表从i除到0的期望步数;那么假设i一共有c个因子(包括1和本身)
d[i] = ( d[1] + d[a2] + d[a3] + d[a4] ..... + d[i] + c) / c; (...
分类:
其他好文 时间:
2015-06-04 22:54:55
阅读次数:
204
Problem Description
The inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i aj.
For a given sequence of numbers a1, a2, ..., an, if we mov...
分类:
其他好文 时间:
2015-06-04 22:53:14
阅读次数:
141
一、DLL中类的导出
在类名称前增加 _declspec(dllexport)定义,例如:
class _declspec(dllexport) CMath{
....
};
通常使用预编译开关切换类的导入导出定义,例如:
#ifdef DLLCLASS_EXPORTS
#define EXT_CLASS _declspec(dllexport)
//DLL
#else
...
分类:
其他好文 时间:
2015-06-04 22:52:39
阅读次数:
796
打开word时,出现“向程序发送命令时出现问题”的解决方法
本人用的是Windows 7的系统,这几天开word的时候,出现无法打开的问题,最后的提示框是“向程序发送命令时出现问题”。上网查看之后,发现是模板文件Normal.dot出错,在关闭word时,在word中的插件都要往Normal.dot中写东西,如果产生冲突,Normal.dot就会出错,导致下一次启动word时,只能以安...
分类:
其他好文 时间:
2015-06-04 22:52:56
阅读次数:
153
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/46366207
Description:
Count the number of prime numbers less than a non-negative number, n.
思路:
(1)题意为给定整数n,求解n以内的整数中有多少个素数(质数)。
(2)该题涉及到数学相关的知识。首先,看下素数的定义:质数(prime...
分类:
其他好文 时间:
2015-06-04 22:51:54
阅读次数:
142
题意:链接方法:状压DP?题解:这题其实没啥好写的,不算很难,推一推就能搞出来。首先看到这个问题,对于被d整除这个条件,很容易就想到是取余数为0,所以想到可能状态中刚开始含有取余数。先说我的第一个想法,f[i][j]表示选取i个数且此时的mod为j,这样的思想是第一下蹦出来的,当时想的就是在线来搞最终的答案。不过转瞬即发现,这TM不就是暴力吗魂淡!并没有什么卵用,于是开始想这个状态可不可以做什么优化...
分类:
其他好文 时间:
2015-06-04 22:50:34
阅读次数:
119
题解:首先要城市要离散化,根据离散数学中可达矩阵的定义,给出一个有向图的邻接矩阵A,res = (A + E)^n表示这个矩阵n步后的可达情况,res[i][j]表示点i经过n步后到点j的方法数,那么给出了t1至t2后从v1到v2的方法数,就是要计算A^t1 + A^(t1 + 1) + … + A^(t2)
用了分治的思想计算,之前有写过模板http://blog.csdn.net/hyczms...
分类:
其他好文 时间:
2015-06-04 22:50:28
阅读次数:
159
Is It A Tree?
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 24299
Accepted: 8339
Description
A tree is a well-known data structure that is either empty...
分类:
其他好文 时间:
2015-06-04 22:49:07
阅读次数:
146
企业系统操作日志的分析处理,...
分类:
其他好文 时间:
2015-06-04 22:49:24
阅读次数:
214
题目大意:给定nn和集合SS,求满足下列要求的多叉树的个数:
1.每个非叶节点的子节点数量在集合SS中
2.每个叶节点的权值为11,每个非叶节点的权值为子节点权值之和
3.根节点的权值为nn
注意每个节点的子节点有顺序令fif_i表示根节点权值为ii的神犇二叉树个数,F(x)F(x)为fif_i的生成函数,C(x)C(x)为SS的生成函数,那么有:
F(x)=∑i∈SFi(x)+xF(x)...
分类:
其他好文 时间:
2015-06-04 22:49:24
阅读次数:
280
http://acm.hdu.edu.cn/showproblem.php?pid=2049
不容易系列之(4)——考新郎
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 25945 Accepted Submissi...
分类:
其他好文 时间:
2015-06-04 22:48:56
阅读次数:
212