自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(92)
  • 收藏
  • 关注

原创 BASH第八课作业

1写一个脚本,完成如下功能(使用函数):1、脚本使用格式:mkscript.sh [-D|--description "script description"] [-A|--author "script author"]   文件名2、如果文件事先不存在,则创建;且前几行内容如下所示:#!/bin/bash# Description: script description#

2015-09-16 18:19:26 654

原创 BASH第七课第二题

2、写一个脚本analyzelog.sh,完成日志分析:(使用函数)(日志文件在课件中)说明:此脚本可以接受选项(i,d,t,a),使用格式:analyzelog.sh 日志文件名 :先判断是访问日志文件还是错误日志文件访问日志文件如下:   (1)当用户使用选项-i时,统计出访问日志文件中指定IP地址的访问次数(通常每一行为一次);   (2)当用户使用选项-d时,统计

2015-08-24 09:28:53 498

原创 BASH第七课第一题

1、写一个脚本getinterface.sh,脚本可以接受参数(i,I,a),完成以下任务:   (1)使用以下形式:getinterface.sh [-i interface|-I IP|-a]   (2)当用户使用-i选项时,显示其指定网卡的IP地址;   (3)当用户使用-I选项时,显示其后面的IP地址所属的网络接口;(如 192.168.199.183:eth0)   (4

2015-08-24 09:27:36 550

原创 BASH脚本第六课-2

1.生成指定格式的随机内容并写入文件#!/bin/bashexec 1>>/root/tkp/score.dat 2>>/dev/nullfunction random(){ min=$1 max=$2-$1 temp_num=$(date +%N) num=$((10#$temp_num)) ((retnum=num%max+min))

2015-08-18 11:27:03 471

原创 BASH脚本第六课

1、某游戏的客户端每隔5分钟会向服务端报告一次玩家的账户积分,如果两次报告的时间间隔不大于5分钟,认为该玩家在这5分钟内在线,假设报告数据的格式如下:IP                   Datetime                Score223.152.112.238      2014-08-22 12:01:35     54232现有一天的数据,按时间按序保存,粗略估

2015-08-17 09:33:13 776

原创 BASH脚本第五课

Grep 练习文件名grepfile+++++++++++++++++++++++++++++++++++++Steve Blenheim:238-923-7366:95 Latham Lane, Easton, PA 83755:11/12/56:20300Betty Boop:245-836-8357:635 Cutesy Lane, Hollywood, CA 91464:6

2015-08-16 12:02:25 1094

原创 BASH练习第四课

一、完成以下任务:  (1)新建系统组mysql;新建系统用户mysql,要求其没有家目录且shell为/sbin/nologin;  (2)新建GID为600的组jiuren;新建用户gentoo,要求其家目录为/users/gentoo,密码同用户名;   (3)新建用户centos,其家目录为/users/centos,密码同用户名;  (4)新建用户www,其家目录为/us

2015-08-10 15:02:33 465

原创 BASH练习第三课

写一个脚本,完成如下功能:  (1)显示当前系统上每一个进程及其进程号,而后提示用户输入一个进程号,如果用户输入的进程号错误,而说明其错误,并提醒用户重新输入;  (2)显示用户所选进程的state, PPID和RSS及期对应的值;#!/bin/bashexec 2>>/dev/null#Phase.1 show all process,and get the PID from

2015-08-10 15:00:14 503

原创 提高篇第28-31课第三题

#include #include #include #include //第三题void cpyStr0(char str1[], char str2[]);void cpyStr1(char str1[], char str2[]);void cpyStr2(char str1[], char str2[], char str3[]);void cpyStr3(char str

2015-06-18 18:13:20 445 1

原创 提高篇第28-31课第二题

#include#include#include#include//第二题int Count_A(char a[]);int Count_alpha(char a[]);int isori(char a);void Count_every_num(char a[],int b[]);void Count_every_alpha(char a[],int b[]);int mai

2015-06-16 21:24:46 420

原创 自学selenium第五节-selenium各种类的使用

package selenium.test;import java.util.List;import java.util.Set;import org.openqa.selenium.Alert;import org.openqa.selenium.By;import org.openqa.selenium.JavascriptExecutor;import org.openqa.

2015-06-07 18:18:46 501

原创 提高篇第28-31课第一题

第1,2小题#include#include#define SIZE 200//第一题void ChangeCode(char a[], int n);int main(){ int num; char a[SIZE]; printf("请输入需要加密的字符串:"); gets(a); printf("请输入加密的关键数字key:"); scanf("%d",&num)

2015-06-04 20:47:18 415

原创 Loadrunner支持MD5加密脚本的编写

char orSignMD5[500];char orSignMD5str[32];char time_str[20];char orSignMD5str_dll[40];Action(){ typedef long time_t; time_t t; sprintf(time_str, "%ld", time(&t)); strcpy(orSignMD5,"TangM

2015-06-03 19:58:51 1459

原创 提高篇26-27课第四题

#include#include#define SIZE 200//第四题int readData(int a[], int b[]);void sort(int a[], int b[], int len);int search(int a[], int len, int id);int main(){ int num[SIZE], score[SIZE]; //分别保存学号

2015-06-01 18:57:53 407

原创 提高篇第26-27课第三题

#include#include//第三体,冒泡排序void bubble_sort(int array[],int len);void output_array(int array[], int len);int main(){ int a[20] = { 86, 76, 62, 58, 77, 85, 92, 80, 96, 88, 77, 67, 80, 68, 88, 87,

2015-06-01 17:08:41 497 2

原创 提高篇第26-27课第二题

第一小题#include#include#define N 10//第二题,删除元素int del(int array[], int len, int num);int main(){ int a[N] = { 1, 7,7, 8, 17, 23, 24, 59, 62, 101 }; int i, n = 10; int m = 7; int del_count; de

2015-06-01 16:38:34 484

原创 提高篇26-27课第一题

#include#include#define N 10int insert(int array[], int len, int num);int main(){ int a[N] = { 1, 7, 8, 17, 23, 24, 59, 62, 101 }; int i, n = 9; int m = 50; n = insert(a, n, m); //在长度为n的a数组

2015-06-01 11:44:32 371

原创 提高篇第22-25课作业第一题

#include #include //第一题,数组反转void reverse(int array[], int n);int main(){ int b[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; int a[5] = { 1, 2, 3, 4, 5 }; int i; reverse(b, 10); //将b数组中的元素逆序翻转过来

2015-05-29 10:58:32 388

原创 提高篇第22-25课第二题

#include #include #include //第二题void input_score(int s[], int n); //将小组中n名同学的成绩输入数组sint get_max_score(int s[], int n); //返回数组s中n名同学的最高成绩值int get_min_score(int s[], int n); //返回数组s中n名同学的最低成绩值d

2015-05-29 10:23:06 418

原创 自学selenium练习题第四节-页面元素基本操作

package selenium.test;import java.util.List;import org.openqa.selenium.By;import org.openqa.selenium.WebDriver;import org.openqa.selenium.WebDriver.Navigation;import org.openqa.selenium.WebElem

2015-05-28 20:19:49 429

原创 提高篇第20-21课第四题

#include #include //第四题,冒泡排序法int main(){ double salary[500]; double temp_num; int i,j; FILE *fp1,*fp2; fp1 = fopen("salary.txt", "r"); fp2 = fopen("ordered_salary.txt", "w"); for (i = 0; i

2015-05-27 14:51:41 361

原创 提高篇第20-21课第三题

#include #include #define SIZE 10//第三题,数组排序和插入数据后再排序int main(){ int i, j; int temp,n,key; int num[SIZE]; n = SIZE - 1; printf("请输入九个正整数\n"); for (i = 0; i < SIZE-1; i++) scanf("%d", &num[

2015-05-27 11:13:29 343

原创 提高篇第20-21课第二题

#include #include //第二题,二分法/*1 确定区间[a, b], 验证f(a)·f(b)<0 2 求区间(a, b)的中点c 3 判断 (1) 若f(a)·f(c)<0, 则令b = c;(2) 若f(c)·f(b)<0, 则令a = c. 4 判断f(c)是否达到精确度ξ:即若┃f(c)┃<ξ,则x = c就是使f(x)接近零点的近似值,否则重复2 -

2015-05-27 10:37:55 358

原创 提高篇第20-21课作业第一题

#include #include //第一题,遍历查找int main(){ int key,count=0; int num[110]; int i=0,j,flag=0; while (flag == 0) { printf("请输入一个正整数(输入0结束),最多不超过100个:"); scanf("%d", &num[i]); if (num[i] == 0)

2015-05-27 09:59:00 358

原创 提高篇第16-19第五题

第一小题#include #include #include #define NUM 2002//第五题,第一小题int main(){ double ave; int num[128],win[128]; int i,count=0,j=0; int ran_m, ran_y, ran_d; srand(time(0)); for (i = 0; i < 128; i

2015-05-19 20:04:43 505

原创 提高篇第16-19课第四题

#include #include //第四题int main(){ char c[4] = { 'H', 'S', 'D', 'C' }; int v[13] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; int i, j; for (i = 0; i<4; i++) { for (j = 0; j<13; j++)

2015-05-19 18:05:03 384

原创 提高篇第16-19课第三题

#include #include //第三题#includeint days(int y, int m, int d);int main(){ int year, month, day; printf("输入年 月 日: "); scanf("%d %d %d", &year, &month, &day); printf("这是该年的第 %d 天\n", days(year,

2015-05-18 21:10:33 326

原创 提高篇16-19第二题

#include #include #include //第二题void calcu(int);//处理和分数相关的功能int main(){ int num; //小组人数 printf("小组共有多少名同学?"); scanf("%d", &num); if (num >= 50) { printf("输入人超过50,输入错误"); exit(0);

2015-05-18 19:19:16 409

原创 第16-19课作业第一题

第一小题#include #include //第一题,第一小题int main(){ int i; int a[20] = {1,2,3,4,5,6,7,8,9,0}; //初始化前10个元素 //键盘输入后10个元素的值 for (i = 10; i < 20; i++) scanf("%d", &a[i]); //由前往后输出数组中所有元素的值 printf(

2015-05-18 17:50:26 449

原创 C语言程序设计提高篇应用程序设计-CSDN银行2.0

#include #include //C语言及程序设计初步,综合练习,CSDN银行2.0,功能说明/* 1.输入密码进行登录(错误三次后退出程序),输入0-4选择不同功能,1-查询、2-取款,3-存款,4-改密码,0-退出. 2.只支持单个用户,密码和存款余额分别保存在本地两个文件中 3.取款功能支持超出额度提示. 4.修改密码需要输入两次新密码,先要输入原密码 5

2015-05-15 21:03:20 788

原创 提高篇第6-10课作业第三题

#include #include #define pi 3.1415926//第七题double mysin(double x);double myabs(double x);void show_sin_table(int,int);int main( ){ show_sin_table(45,90); show_sin_table(135,180);

2015-05-15 11:08:19 369

原创 提高篇第6-10课作业第二题

#include #include //大奖赛积分,函数。void calScore(int n);int main( ){ int judge_num; int flag=0; char ch; while(flag==0)//这个判断保证了循环至少会执行一次 { printf("输入评委人数:"); scanf(

2015-05-13 20:13:06 393

原创 提高篇第6-10课作业第一题

#include #include //通过传地址的方式,在函数内修改函数外的多个变量int power(int m,int n); //求m的n次方(m^n)int sum_of_power(int k,int n); //从1^k到n^k的累加和int main( ){ int k, n; scanf("%d %d", &k, &n); printf("f

2015-05-13 18:14:08 513

原创 提高篇第2-5课第七题

#include #include #include #define pi 3.1415926//第七题double mysin(double x);double myabs(double x);int main( ){ printf("sin(π/2)的值为%.5f\n", mysin(pi/2)); printf("sin(56°)的值为%.5f\n", mys

2015-05-12 14:56:33 492 1

原创 提高篇第2-5课第六题

第一小题:#include #include //第六题,第一小题,求反序数int reverse(int);int main(){ int m,n; scanf("%d", &m); n=reverse(m); printf("%d\n", n); return 0;}int reverse(int x) //函数只管求值,不管输出。

2015-05-11 19:44:24 308

原创 提高篇2-5课第五题

#include #include //第五题,输入日期,求时间,追加功能要求:可以判断输入日期是否合法int legal_date(int y,int m,int d);int days(int y, int m, int d);int run_year(int year);int main(){ int year, month, day; printf("输入年

2015-05-11 18:13:29 451

原创 提高篇第2-5课第四题

第一小题:#include #include //第四题,阶乘问题long fac(int n);int main(){ int n,t; int a,b,c; for(n=100;n<1000;n++) { a=n/100; b=n/10-a*10; c=n%10; t=fac(a)+

2015-05-11 17:49:19 360

原创 提高篇第2-5课第三题

#include #include //第三题,第一小题,求最大公约数int gcd(int x,int y) //定义用于求两数的最大公约数的函数,函数只管求值,不管输出。输出由main完成{ int t,r=1; if(x<y) { t=x; x=y; y=t; } while(r!=0)

2015-05-11 17:25:11 412

原创 提高篇第2-5课第二题

#include #include //第二题double f(double x); //这一句是对自定义函数f的声明int main( ){ double x; printf("请输入x的值:"); scanf("%lf", &x); printf("解得:f(%.2f)=%.2f\n", x, f(x)); //调用函数f求解 re

2015-05-11 15:13:53 325

原创 提高篇第2-5课第一题

第一小题:#include #include //第一题,第一小题void printstars(int m) //定义能输出一行m个星号的函数{ int j; for (j=1; j<=m; ++j) printf("*");}int main( ){ int n=6; //n代表要输出的行数 int i; for(i=1; i<=

2015-05-11 15:06:40 421

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除