归并排序重在“归并”一词,即先递归分解数组,再合并数组的过程。#includevoid heBin(int a[] , int first , int mid , int last) { // 合并数组的左边和右边 int *temp = new int[last - first ...
分类:
编程语言 时间:
2015-04-16 11:45:51
阅读次数:
113
看过C程序的返回值得处理过程,我们不妨先推测一下C+的返回值处理过程:总体与C的返回过程类似,只不过在上图复制1中并不是直接执行“位逐次拷贝”,而是调用拷贝构造函数(因为此时产生了新对象——temp),在复制2的时候需要调用赋值运算符(因为此时没有新的对象产生)。下面我们进行验证。 class X....
分类:
其他好文 时间:
2015-04-16 01:25:20
阅读次数:
484
聚集索引扫描SELECT * FROM C_SY_Ownedstorm聚集索引扫描比表扫描快聚集索引扫描:发生于聚集表,也相当于全表扫描操作,但在针对聚集列的条件等操作时,效率会较好。表扫描SELECT * FROM #temp表扫描:发生于堆表,并且没有可用的索引时,会发生表扫描,表示整个表...
分类:
数据库 时间:
2015-04-15 22:42:12
阅读次数:
202
#include
#include
int main(){
char temp,str[20];
int k,len,mark,flag,j;
while(scanf("%s %d",str,&k)!=EOF){
len=strlen(str);
if(k==0)
{
puts(str);
continue;
}
for(int i=0;i<len;i++...
分类:
其他好文 时间:
2015-04-15 21:34:42
阅读次数:
139
#include
#include
using namespace std;
int sum(int a,int b)
{
return (rand()%(b-a)+a+1);
}
void Grial(int a[],int x,int y)
{
if(x>=y)return ;
int i=x;
int j=y;
int temp;
int b=sum(i,j);//求取随机值...
分类:
编程语言 时间:
2015-04-15 13:39:30
阅读次数:
154
实践过程中出现的小bug:
当我右击view空白处,即我没选中有内容的行时,程序中断,因为我没做位置判断而直接获取行内容赋值给其他变量。QModelIndex temp = m->index(right_click.row(),1);解决方案:
判断选中的行是否在我们model的行范围内。
如何获取model的行?ui.table_view->model()->rowCount();实际上我们...
分类:
其他好文 时间:
2015-04-15 13:39:08
阅读次数:
135
SEVERE: Cannot find specified temporary folder at D:\tomcat\temp java.lang.UnsatisfiedLinkError: D:\asmm\bin\tcnative-1.dll: Can‘t load AM D 64-bit .dll on a IA 32-bit platform ? ? ? ? at java....
分类:
其他好文 时间:
2015-04-15 11:39:19
阅读次数:
151
#include
using namespace std;
void swap(int *a,int *b)
{
int temp = *a;
*a = *b;
*b = temp;
}
void Grial(int a[],int x,int y)
{
int i=x-1;
int j=x;
int key = a[y];
if(x>=y)return ;
while(j<y...
分类:
编程语言 时间:
2015-04-15 11:27:18
阅读次数:
192
#include
using namespace std;
void Grial(int a[],int x,int y)
{
if(x>=y)return ;
int i=x;
int j=y;
int temp;
int key=a[(i+j)/2];
while(i<j)
{
while(a[i]k...
分类:
编程语言 时间:
2015-04-15 11:19:48
阅读次数:
121
#!/usr/bin/env python
#coding:utf8
import time
global_list = []
def test(n):
global global_list
if n==1 or n==2:
return 1
else:
temp = test(n-1) + test(n-2)
if i...
分类:
编程语言 时间:
2015-04-15 09:48:22
阅读次数:
153