#!/bin/bash
#shell脚本编程之快速排序的实现(以最右边为元点的思想)
#a=(8 5 10 3 2 93 4 1 2 3 40 9 61 8 6 29)
a=(0 0 0 0 1 2 3 3 4 4 8 28 30495 921 43716)
temp=
buff=
#交换函数
swap()
{
buff=${a[$1]}
a[$1]=${a[$2...
分类:
编程语言 时间:
2015-04-21 09:38:50
阅读次数:
184
一、准备工作
创建表空间:
create temporary tablespace yangwen_temp
tempfile 'D:\oracle\oradata\orcl\yangwen_temp.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
crea...
分类:
数据库 时间:
2015-04-21 00:28:11
阅读次数:
153
说来惭愧,一道简单的对vector递归的题目写了一个多小时,最后还是请教了大神才改出来。 首先贴上原代码:void return_vector(vector::iterator,vector);int main(){ int n, temp; vector symbol{}; ...
分类:
编程语言 时间:
2015-04-21 00:03:24
阅读次数:
428
一、double.TryParse("1234,34,49",outtemp)这个方法用来查看字符串"1234,34,49"是不是能够转成一个double类型的数字,如果能转换成功则函数返回值为true,且用outtemp来保存这个转换后的double,如果不能转换则false,temp保持原来的值...
分类:
其他好文 时间:
2015-04-20 22:17:31
阅读次数:
127
由于上次二位数组,使用了函数,所以这次只要修改函数就可以了。//Powered by lzr!#includeusing namespace std;int yiwei_max(int n,int a[]){ int temp=0,sum=-999999999; int j=0,k=...
分类:
编程语言 时间:
2015-04-20 22:14:48
阅读次数:
133
#!/bin/bash
#shell脚本编程之快速排序的实现(以最右边为元点的思想)
a=(8 5 10 3 2 93 4 1 2 3 40 9 61 8 6 29)
temp=
buff=
#交换函数
swap()
{
buff=${a[$1]}
a[$1]=${a[$2]}
a[$2]=$buff
}
fun()
{
i=$(($1-1))
j=$1
temp=${a[$2]}...
分类:
编程语言 时间:
2015-04-20 20:57:19
阅读次数:
171
题目:一个数如果恰好等于它的因子之和,这个数就称为"完数"。例如6=1+2+3.编程 找出100以内的所有完数。 分析:本质还是求质因数。#include using namespace std;bool IsPerfect(int n){ int i, j = 0; int Temp = ...
分类:
其他好文 时间:
2015-04-20 16:47:19
阅读次数:
110
一个小小的swap确出现了好多个版本。不断的优化,不断的发现问题:版本一:function swap(a,b){ var temp = a; a = b; b = temp; }这个版本对于数组中的位置无法实现其交换功能。原因是在这种情况下,数组把值传给了函数(仅仅是传值...
分类:
其他好文 时间:
2015-04-20 14:49:16
阅读次数:
157
#/bin/bash
a=(9 84 51 0 345 1 2 34 1 0)
#自己定义一个数组
temp=
for((i=0;i<10;i++))
{
for((j=i;j<10;j++))
{
x=${a[$i]}
if test $x -ge ${a[$j]}
then
temp=${a[$i]}
a[$i]=${a[$j]}
a[$...
分类:
编程语言 时间:
2015-04-20 09:33:26
阅读次数:
144
#/bin/bash
a=(9 84 51 0 345 1 2 34 1 0)
#自己定义一个数组
temp=
for((i=0;i<10;i++))
{
for((j=i;j<10;j++))
{
x=${a[$i]}
if test $x -ge ${a[$j]}
then
temp=${a[$i]}
a[$i]=${a[$j]}
a[$...
分类:
编程语言 时间:
2015-04-20 09:27:06
阅读次数:
174