ListView返回选中的多项目 procedure TForm1.Button3Click(Sender: TObject);vars: string;I: Integer;beginfor i := 0 to listview1.items.count - 1 dobeginif listvie...
分类:
其他好文 时间:
2014-07-29 21:31:22
阅读次数:
322
用R读取中文文本(UTF-8),经常无端出错,常常指定了sep="\t“,结果仍然有字段内部仍然包含"\t"。分隔符换成 ”,"也不行!更郁闷的是,read.table 读出来的域数量,竟然比 count.fields 返回的少。最终解决的方法是,在分隔符前后加上空格。读取的时候再把空格去掉,这样问...
分类:
其他好文 时间:
2014-07-29 21:29:02
阅读次数:
214
//返回ListBox选中的多项目 procedure TForm1.Button2Click(Sender: TObject);vari:Integer;s:string;beginfor i:=0 to ListBox1.Items.Count-1 doif ListBox1.Selected[...
分类:
其他好文 时间:
2014-07-29 21:25:42
阅读次数:
235
attempt to re-open an already-closed object
字面理解,试图再次打开已经关闭的对象,这是我在操作sqlited的时候出现的错误,
我在一个activity里面对数据库进行操作,在这个acitvity生命周期结束(跳转或者其他操作)但是程序不结束时,对数据库进行close操作,
开始运行,首次打开此avtivity没有错误,然后跳转此时此avtiv...
分类:
编程语言 时间:
2014-07-29 17:44:52
阅读次数:
1121
The Settlers of Catan Within Settlers of Catan, the 1995 German game of the year, players attempt to dominate an island by building roads, settlements...
分类:
其他好文 时间:
2014-07-29 16:57:12
阅读次数:
253
arra[10]={0};arr*p=NULL;p=a;printf("请输入10个字符串中间用空格代替:\n");sortabcArr(p,10);printf("排完序的字符串:\n");outABCArr(p,10);typedefstructArr{charARR[100];}arr;voidsortabcArr(arr*p,intcount){for(inti=0;i<10;i++){scanf("%s",&((p+i)->ARR));}..
分类:
其他好文 时间:
2014-07-29 15:42:39
阅读次数:
150
//每列选一个数相加为0的个数
# include
# include
# include
using namespace std;
int ab[4010*4010],cd[4010*4010];
int main()
{
int n,i,k,j,count,a[4010],b[4010],c[4010],d[4010];
while(~scanf("%d",&n))
{
...
分类:
其他好文 时间:
2014-07-29 15:10:48
阅读次数:
140
一段业务逻辑,需要先判断一条记录在数据库中是否有存在,若存在则更新该记录,若不存在则插入记录。
应用之前的做法是:
1、先用条件判断记录在数据库中的个数。
2.1、若count(*)>0,则执行UPDATE操作。
2.2、若count(*)=0,则执行INSERT操作。
或
1、先插入记录。
2.1、若报ORA-001主键错误,则存在记录,此时执行UPDATE操作。
2.2、若无报...
分类:
其他好文 时间:
2014-07-29 14:45:08
阅读次数:
246
在oc中我们通过-(CardMatchingGame *)game{ if(!_game) _game=[[CardMatchingGame alloc] initWithCardCount:[self.cardButtons count] usingDeck:[self createDeck...
分类:
其他好文 时间:
2014-07-29 14:09:28
阅读次数:
173
A - Count on Canton Time Limit:1000MS Memory Limit:30000KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription One of the famous proofs of modern m....
分类:
其他好文 时间:
2014-07-29 12:44:56
阅读次数:
222