关键:将数组的地址送到函数中;其中数组名可以作为函数的首地址。 #include<stdio.h>int sort(int *p,int n){ int i,j,ret=0,temp; if(p==NULL) {printf("error:sort(int *p)%d",ret); return r ...
分类:
编程语言 时间:
2016-09-09 15:14:44
阅读次数:
152
今天有网友群里提了这样一个关于SQL联合查询的需求: 一、有热心网友的方案: 二、我的方案: select * from ( select a.*,(select top 1 Id from B as b where b.CgId =a.ID)as bid from A as a ) as temp ...
分类:
数据库 时间:
2016-09-09 15:14:15
阅读次数:
169
1.已知数组a前半部分a[0,mid-1],后半部分a[mid,num-1],现前半部分和后半部分均已排好序。要求:实现a数组的从小到大排序。空间复杂度为O(1).voidMergeSort(int*v,constintlen,constintmid)
{
inti,temp;
intleft=0,right=mid;
while(left<right&&right<len)
{
..
分类:
其他好文 时间:
2016-09-09 01:06:03
阅读次数:
129
数组A[N] 算法思想: 1.找出序列中最大的数Max,则序列的范围为0-k; 2.计算每个数出现的次数,用临时数组temp[Max+5]保存(遍历数组,temp[a[i]]++),注:要确保temp的长度>A的长度 3.计算<=i的元素的个数,0-Max都计算一遍 4.根据上一步可以确定<=a[i ...
分类:
编程语言 时间:
2016-09-06 21:21:34
阅读次数:
141
#include<"stdafx.h"int main(){const int MAX = 10000;int carry_ = 0; //进位int temp = 1; //乘积int Num[MAX] = { 0 }; //保存的数int Num_n = 1; //数组下标计数Num[0] = ...
分类:
其他好文 时间:
2016-09-06 15:47:28
阅读次数:
418
1、认识异常:异常是导致程序中断运行的一种指令流,如果不对异常进行正确处理,则可能导致程序的中断执行,造成不必要的损失。 int a=10; int b=0; int temp=a/b; System.out.println(temp); 2、处理异常 格式:try{ 异常语句 } Catch(Ex ...
分类:
编程语言 时间:
2016-09-05 20:42:59
阅读次数:
153
利用Socketserver实现简单的文件上传server.py#!/usr/bin/envpython
#coding:utf-8
importSocketServer
importos
classMyServer(SocketServer.BaseRequestHandler):
defhandle(self):
base_path=‘C:/temp‘
conn=self.request
print‘connected...‘
whileTrue:
pre_data=conn.rec..
分类:
Web程序 时间:
2016-09-05 17:21:35
阅读次数:
193
一、运算符 (1)算术运算符( + - * / %) 说明:加、减、乘、除、求余,其中%是求余运算 例:var total = (1 + 4) * 5; var i = 100; var temp = (i – 20) / 2; alert(“10”+ 20) //return 1020; aler ...
分类:
编程语言 时间:
2016-09-05 12:22:48
阅读次数:
143
运算符: 1.算术运算符( + - * / %) 加、减、乘、除、求余,其中%是求余运算 var total = (1 + 4) * 5; var i = 100; var temp = (i – 20) / 2; alert(“10”+ 20) //return 1020; alert(10 + ...
分类:
其他好文 时间:
2016-09-05 10:36:08
阅读次数:
120
1、 linux 各个分区的作用 http://www.cnblogs.com/200911/p/4012161.html 2、windows + ubuntu 双系统时划分 ubuntu 空间时“空闲空间” 变 “不可用”? 3、swap 和 temp 区别 swap 用于普通程序的数据交换,te ...
分类:
系统相关 时间:
2016-09-05 00:13:06
阅读次数:
202