自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

转载 枚举、结构体、联合体的简单应用程序-C语言

1 #include <stdio.h> 2 3 //图元的类型 4 enum SHAPE_TYPE{ 5 RECT_TYPE = 0, 6 CIRCLE_TYPE = 1, 7 TRIANGLE_TYPE = 2, 8 SHAPE_NUM, 9 }; 10 //为了定义三角形的坐标...

2017-11-08 14:57:00 85

转载 简单的c语言程序:实现输入输入数据并进行比较

1 #include <stdio.h> 2 3 void max_min(int a[], int n, int *pmax, int *pmin); 4 int main() 5 { 6 int i = 0; 7 int arr[100] = {0}; 8 int num = 0; 9 int max...

2017-11-06 14:52:00 731

转载 一个简单的signal实例(c语言)

1 #include <signal.h> 2 #include <unistd.h> 3 4 5 void sig_hander(int signum) 6 { 7 printf("catch the signal %d\n",signum); 8 return ; 9 }10 11 12 i...

2017-10-30 16:04:00 131

转载 c语言实现对密码(字符串)进行加密,并解密

1 /**习惯把密码明文存在本地文件中,这个小程序可以把存的密码以密文形式保存**/ 2 #include <stdio.h> 3 #include <string.h> 4 #include <stdlib.h> 5 #include <time.h> 6 int chartoasc(char c);...

2017-10-27 16:32:00 1293

转载 Linux 时间获取函数-C语言

1 #include <stdio.h> 2 #include <string.h> 3 #include <time.h> 4 5 int main(int argc,char **argv) 6 { 7 time_t time_now; 8 struct tm *curr_time = NULL;...

2017-10-26 17:28:00 80

转载 ASCII值与字符相互转换程序

1 #include <stdio.h> 2 #include <string.h> 3 #include <strings.h> 4 #include <stdlib.h> 5 /**chartoasc:char -> ascii**/ 6 int chartoasc(char c) 7 { 8 ...

2017-10-26 10:13:00 247

转载 Linux下Python递归文件目录

1 #!/usr/bin/python3 2 import os 3 import sys 4 def scan(path): 5 for x in os.listdir(path): 6 newpath = os.path.join(path,x) 7 if os.path.isdir(newpath): 8 ...

2017-10-24 17:03:00 72

转载 学习 UNIX网络编程卷1:套接字 笔记1-实现一个简单的回射客户服务器程序

一:客户端程序1、头文件:unp.h 1 #ifndef _unp_h 2 #define _unp_h 3 #include <sys/types.h> /* basic system data types */ 4 #include <sys/socket.h> /* basic socket definitions */ 5 #i...

2017-10-24 09:37:00 87

转载 Python遍历目录以及子目录的文件

1 #!/usr/bin/env python3 2 import os 3 def bbb(dir_str): 4 filepaths=[] 5 abspath = os.path.abspath(dir_str) 6 for x in os.listdir(abspath): 7 filepath = os.pat...

2017-10-09 17:55:00 74

转载 Ubuntu17.04安装wps

1、进入http://community.wps.cn/download/下载wps-office安装包,我下载的是dep的包。2、进行安装执行命令:sudo dpkg -iwps-office_10.1.0.5707-a21_amd64.deb  安装的时候报如下错:momo@momo:~/下载$ sudo dpkg -i wps-office_10.1.0.5707-...

2017-09-25 17:29:00 144

转载 pycharm 2017新建文件添加编码方式等

file->setting->Editor->File and Code Templates->Python Script 添加#!/usr/bin/python3# -*- coding:utf-8 -*-__author__='$USER'转载于:https://www.cnblogs.com/chenanan/p/7523919.ht...

2017-09-14 23:44:00 84

转载 Linux下利用expect,不用交互模式,直接登陆远程主机

Linux环境下只有在机器20.200.254.18上ssh dataconv@20.200.31.23才能连接到23的机器,而且还需要输入密码(每次都需要输入地址,密码很烦),所以利用expect写了个脚本。脚本如下:#!/usr/bin/expectspawn ssh dataconv@20.200.31.23expect "*password:"send "...

2017-09-12 17:44:00 96

转载 linux文件权限解析(摘)

用户组在linux中的每个用户必须属于一个组,不能独立于组外。在linux中每个文件有所有者、所在组、其它组的概念-所有者-所在组-其它组-改变用户所在的组所有者一般为文件的创建者,谁创建了该文件,就天然的成为该文件的所有者用ls‐ahl命令可以看到文件的所有者也可以使用chown用户名文件名来修改文件的所有者文件所在组...

2017-09-12 17:18:00 80

转载 linux环境下根据文件的某一列进行去重

momo@ubuntu:~/user/txt$ cat test.txt1 chen nihao2 chen hello3 li nimenhao4 he dajiahao5 li nimenhaomomo@ubuntu:~/user/txt$ sort -k2,2 -u test.txt1 chen nihao4 he dajiahao3 li nimenhaomomo@ub...

2017-09-12 11:23:00 844

转载 oracle查询用户权限及角色(摘)

1.查看所有用户: select * from dba_users; select * from all_users; select * from user_users;2.查看用户或角色系统权限(直接赋值给用户或角色的系统权限): select * from dba_sys_privs; select * from user_sys_privs; 3.查看角色(只能查看...

2017-09-12 09:58:00 273

转载 插入排序-python实现

def insert_sort(arr):   for j in range(1,len(arr)):   #从list第二个元素开始     key=arr[j]   #储存将要进行插入排序的元素数值     index=j                  #...

2017-09-06 16:13:00 53

空空如也

空空如也

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

TA关注的人

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