对于一个数据库下面多个shema的情况,如果使用DBUNIT配置会出现,上面的错误,不清楚的表名,解决如下 增加红色的shema指定 参考:http://stackoverflow.com/questions/10103629/oracle-dbunit-gets-ambiguoustablenam...
分类:
数据库 时间:
2015-04-12 21:06:11
阅读次数:
529
问题描述:
输入一行字符,统计其中有多少单词,单词之间用空格隔开
解题思路:
判断单词是否出现,可以用空格的出现来判断(连续的若干空格看做成一个),若当前字符为空格,表明word未出现,当前字符非空格,之前字符为空格表明新单词出现,count++,之前字符是否为空格,用状态标志位word来标记
代码如下:
#include //printf
#include //gets
...
分类:
其他好文 时间:
2015-04-11 10:22:22
阅读次数:
129
关于这三者的区别已经是老话题了,上stackoverflow看到目前最中肯简洁的回答
Mutability Difference:
String is immutable,
if you try to alter their values, another object gets created, whereas StringBuffer and StringBuilder...
分类:
其他好文 时间:
2015-04-10 11:32:47
阅读次数:
116
#include
#include
int main()
{
int i,ch;
char str[100];
FILE *fp;
fp=fopen("text","w"); //创建一个文件
while(1)
{
printf("input string:\n");
gets(str);
fprintf(fp,"...
分类:
其他好文 时间:
2015-04-09 13:50:35
阅读次数:
168
#include#include#includeint main(){int i;char a[110]; while(gets(a)) { printf("%c",a[0]-32); for(i=1;i<strlen(a);i++) { if(a[i-1]==' ') { a[i]=a[i]-32...
分类:
其他好文 时间:
2015-04-08 14:53:09
阅读次数:
113
常用的Oracle查询TOP语句。 Top 10 by Buffer Gets: 最耗缓存 set?linesize?100
set?pagesize?100
SELECT?*?FROM
(SELECT?SQL_FULLTEXT?sql,
????????buffer_gets,?executions,?buffer_gets/e...
分类:
数据库 时间:
2015-04-02 16:50:18
阅读次数:
219
Who Gets the Most Candies?
Time Limit: 5000MS
Memory Limit: 131072KB
64bit IO Format: %I64d & %I64u
Submit Status
Description
N children are sitting in a circle to...
分类:
其他好文 时间:
2015-04-02 15:09:06
阅读次数:
179
#include#include#include#includeint scan(){ char s[100]; int i,t,z=0; do { z=0; gets(s); for(i=0;s[i]!='\0';i++) if(s[i]'9') break; if(i>=strlen(s)) f...
分类:
其他好文 时间:
2015-04-01 16:51:16
阅读次数:
139
【思路】:用string的replace方法就行,注意题目中的”内部没有空格“,是内部没有。。所以需要考虑字符串为空或者前后有空格的情况。不能使用cin了,需要用gets等。所以需要把char[]转换成string的步骤。另外,char不能在同一行上先定义字符,后定义字符串。反过来可以,不然会出现不能把字符指针给字符的错误。
【AC代码】:
#include
#include
#inclu...
分类:
其他好文 时间:
2015-04-01 09:37:37
阅读次数:
188
#include
int main()
{
char string[100];
int i , num=0 ,word=0;
char c;
gets(string);//从键盘得到一个字符串
for(i=0;(c=string[i])!='\0';i++)//字符不是'\0'就执行循环
{
if(c==' ')//遇到空格word置0
{
word=0;
}
...
分类:
编程语言 时间:
2015-03-30 21:16:46
阅读次数:
186