实验结论 1、实验任务1 #include <stdio.h> int main(){ int num; scanf("%d", &num); printf("2049%04d\n", num); scanf("%d",&num); printf("2049%04d\n", num); scanf( ...
分类:
其他好文 时间:
2021-04-01 13:25:23
阅读次数:
0
#include <stdio.h> int main() { int num; scanf("%d", &num); printf("2049%04d\n", num); scanf("%d", &num); printf("2049%04d\n", num); scanf("%d", &num) ...
分类:
其他好文 时间:
2021-04-01 13:22:22
阅读次数:
0
shell编程实现创建新用户和打包文件 1、shell编程创建新用户 #! /bin/bash `useradd $1` `echo $2 | passwd --stdin $1` 假设这个文件的名称为test.sh,则操作方式为: ./test.sh admin 123456 其中1参为用户名,2 ...
分类:
系统相关 时间:
2021-03-31 12:11:52
阅读次数:
0
redis支持数据持久化,可以将内存中的数据保存在磁盘中,重启的时候可以再次加载使用。 redis不仅支持key-value类型,还提供list、set、zset、hash等数据结构。memcache只支持key-value类型 redis支持数据备份,即主从多副本模式 redis的数据比memca ...
分类:
系统相关 时间:
2021-03-31 11:41:59
阅读次数:
0
vi readreply.sh #!/bin/bash#第一部分 echo -n "What is your name?"readecho "Your name is $REPLY" #已将变量的值从标准输入读到REPLY #第二部分echo -n "What is the name of your ...
分类:
系统相关 时间:
2021-03-30 13:53:42
阅读次数:
0
. shell逻辑表达式 #!/bin/bash FILE_BASED_ENCRYPTION="true" if [ "$FILE_BASED_ENCRYPTION" == "true" ]then echo "if: first one" || echo "if: second one"else ...
分类:
系统相关 时间:
2021-03-30 13:52:37
阅读次数:
0
Shell脚本基础 变量 什么是变量? 变量即可以变化的量 变量名称注意事项 只能包含字母、数字、下划线,并且不能以数字开头 不应该跟系统中已有的环境变量重名,尽量不要全部使用大写,尽量不要用“_”下划线开头 最好做到见名知义 不能使用程序中的保留字,例如if、for等 变量类型 字符型 数值型 整 ...
分类:
系统相关 时间:
2021-03-30 13:46:50
阅读次数:
0
Shell函数 linux shell 可以用户定义函数,然后在shell脚本中可以随便调用。 shell中函数的定义格式如下: [ function ] funname [()] { action; [return int;] } 说明: 1、可以带function fun() 定义,也可以直接f ...
分类:
系统相关 时间:
2021-03-30 13:46:15
阅读次数:
0
上代码直接研究: int main() { int *heap_d; int *heap_e; int *heap_f; heap_d = (int *)malloc(10); heap_e = (int *)malloc(10); printf("The d address is %p\n",he ...
分类:
其他好文 时间:
2021-03-30 13:44:13
阅读次数:
0
1 import os 2 3 # 获取手机系统信息 4 phone_sys = os.popen('adb shell "cat /system/build.prop | grep "product""').read() 5 print(phone_sys) 6 7 # 获取手机设备型号 8 de ...
分类:
编程语言 时间:
2021-03-30 13:42:38
阅读次数:
0