上一页 1 ··· 202 203 204 205 206 207 208 209 210 ··· 454 下一页
1、Shell脚本中用#表示注释,相当于C语言的//注释。但如果#位于第一行开头,并且是#!(称为Shebang)则例外,它表示该脚本使用后面指定的解释器/bin/sh解释执行$ chmod +x script.sh$ ./script.sh2、两种执行Shell脚本的方法:$ ./script.sh$ sh ./script.sh3、 一行中可以输入由分号;隔开的多个命令$ cd ..;ls -l4、 只存在于当前Shell进程,用 set 命令可以显示当前Shell进程中定义的所有变量(包括本地变量和环境变量)和函数环境变量是任何进程都有的概念,而本地变量是Shell特有的概念。在Shel Read More
posted @ 2013-05-14 21:07 javawebsoa Views(177) Comments(0) Diggs(0)
mini2440uboot移植-基本操作指令继续uboot移植的基础知识学习1.首先学习下nandfalsh基本操作指令nand info(显示可以使用的nand flash)nand device [dev](显示或设定当前使用的nand flash)nand read addr off size (nand flash读取命令,从nand的off偏移地址处读取size字节的数据到SDRAM的addr地址)nand write addr off size (nand flash烧写命令,将SDRAM的addr地址处的size字节的数据烧写到nand flash的off偏移地址)nand wr Read More
posted @ 2013-05-14 21:05 javawebsoa Views(379) Comments(0) Diggs(0)
分治法的基本思想:将一个规模为n的问题分解为k个规模较小的子问题,这些子问题互相独立且与原问题相同。递归地解这些问题,然后将各个子问题的解合并成原问题的解。它的一般的算法设计模式如下:divide-and-conquer(P) { if ( | P | <= n0) adhoc(P); //解决小规模的问题 divide P into smaller subinstancesP1,P2,...,Pk;//分解问题 for (i=1,i<=k,i++) yi=divide-and-conquer(Pi); //递归的解各子问题 return merge(y1,...,yk); //将 Read More
posted @ 2013-05-14 21:03 javawebsoa Views(399) Comments(0) Diggs(0)
Problem Description Alice and Bob are practicing hard for the new ICPC season. They hold many private contests where only the two of them compete against each other. They almost have identical knowledge and skills, the matter which results many times in ties in both the number of problems solved and Read More
posted @ 2013-05-14 21:01 javawebsoa Views(205) Comments(0) Diggs(0)
BxCarousel是一个具有众多配置且易用的Jquery图片滚动插件,特征主要有: ◆ 可以指定显示的元素总数 ◆ 可以指定每次滚动的元素个数 ◆ 自动播放模式 ◆ 前一张/后一张按钮控制图片流动 参数含义: display_num:显示元素的数量,几张图片 move:单击左右控制键时,移动的元素个数,此处为移动2张图片 prev_image:上一元素按钮图片 next_image:下一元素按钮图片 margin:图片之间的间隙,一般设为10px auto:自动滚动效果 controls:是否显示左右控制按钮,此处为f... Read More
posted @ 2013-05-14 20:59 javawebsoa Views(456) Comments(0) Diggs(0)
//server.php<? // 设置一些基本的变量 $host = "localhost"; $port = 1111; // 设置超时时间 set_time_limit(0); // 创建一个Socket $socket = socket_create(AF_INET, SOCK_STREAM, 0) or die("Could not create socket\n"); //绑定Socket到端口 $result = socket_bind($socket, $host, $port) or die("Could not bin Read More
posted @ 2013-05-14 20:57 javawebsoa Views(215) Comments(0) Diggs(0)
小明和小强都是张老师的学生,张老师的生日是M月N日,2人都知道张老师的生日是下列10组中的一天,张老师把M值告诉了小明,把N值告诉了小强,张老师问他们知道他的生日是那一天吗? 3月4日3月5日3月8日6月4日6月7日9月1日9月5日12月1日12月2日12月8日小明说:如果我不知道的话,小强肯定也不知道 小强说:本来我也不知道,但是现在我知道了 小明说:哦,那我也知道了 请根据以上对话推断出张老师的生日是哪一天?? 分析过程:1.小明说:如果我不知道的话,小强肯定也不知道前提:小明不知道N结果:小强也不可能推断出张老师的生日,说明从N到M不可能建立一一对应的关系,于是排除6月7日和12月2日. Read More
posted @ 2013-05-14 20:55 javawebsoa Views(291) Comments(0) Diggs(0)
求递归算法时间复杂度:递归树 递归算法时间复杂度的计算方程式一个递归方程: 在引入递归树之前可以考虑一个例子:T(n) = 2T(n/2) + n2 迭代2次可以得:T(n) = n2+ 2(2T(n/4) + (n/2)2) 还可以继续迭代,将其完全展开可得:T(n) = n2+ 2((n/2)2+ 2((n/22)2+ 2((n/23)2+ 2((n/24)2+…+2((n/2i)2+ 2T(n/2i + 1)))…))))……(1) 而当n/2i+1== 1时,迭代结束。 将(1)式小括号展开,可得:T(n) = n2+ 2(n/2)2+ 22(n/22)2+ … + 2i(n/2i)2 Read More
posted @ 2013-05-14 20:53 javawebsoa Views(392) Comments(0) Diggs(0)
//// 二叉树线索化的头文件:BinaryThreadTree.h#ifndef B_T_T_H#define B_T_T_H#include <stdio.h>//// 返回OK表示正常返回#define OK 1//// 返回ERROR,表示异常返回#define ERROR 0//// 返回OVERFLOW,表示内存溢出#define OVERFLOW -1//// 线索结构体typedef enum { Link = 0, // 指针 Thread = 1 // 线索}PointerTag;//// 树结点的数据的类型typedef char ElemType; //// Read More
posted @ 2013-05-14 20:52 javawebsoa Views(478) Comments(0) Diggs(0)
一道比较简单的线段树,但是还是wa了两遍才ac,线段树写得还是不够熟练。线段树的模板型挺强的,感觉不容易出现什么bug,就算出现了也都是笔误之类的。#include<stdio.h>#include<string.h>#define N 200005struct node{ int x,y,max;}a[N*3];int Max(int x,int y){ return x>y?x:y;}void CreatTree(int t,int x,int y){ a[t].x=x; a[t].y=y; a[t].max=0; if(x==y) ret... Read More
posted @ 2013-05-14 20:50 javawebsoa Views(189) Comments(0) Diggs(0)
上一页 1 ··· 202 203 204 205 206 207 208 209 210 ··· 454 下一页