前言 学习第3天,基于函数的方式编写小项目:学生管理系统 代码 go package main import ( "fmt" "os" ) / 函数版学生管理系统 写一个系统能够查看所有的学生/新增学生/删除学生 / var ( allStudent map[int64] student // 变量 ...
分类:
其他好文 时间:
2020-02-14 22:11:42
阅读次数:
101
命令方式修改 [root@Core ~]# hostnamectl set-hostname node2 [root@Core ~]# exit 重新登录发现主机名修改成功了! 修改配置文件 [root@Core ~]# echo "node3" > /etc/hostname [root@Core ...
分类:
系统相关 时间:
2020-02-14 20:18:56
阅读次数:
71
2020-02-14 关键字:Linux驱动中的probe函数是如何执行的 1、设备驱动模型 嵌入式 Linux 驱动开发往往都是按照如下的步骤来进行的: 1、实现入口函数 xxx_init() 和卸载函数 xxx_exit() 2、申请设备号 register_chrdev() 3、创建设备文件节 ...
分类:
系统相关 时间:
2020-02-14 18:51:21
阅读次数:
81
原题链接在这里:https://leetcode.com/problems/building-h2o/ 题目: There are two kinds of threads, oxygen and hydrogen. Your goal is to group these threads to fo ...
分类:
其他好文 时间:
2020-02-13 10:02:55
阅读次数:
76
Mac下使用国内镜像安装Homebrew 一、根据官网上的方法,在终端输入: /usr/bin/ruby e "$(curl fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 二、下载修改安装文件 然并卵 ...
分类:
系统相关 时间:
2020-02-12 14:49:12
阅读次数:
100
题目 点击后 本题是典型的本地文件包含漏洞+php伪协议的结合应用 http://123.206.87.240:8005/post/index.php?file=php://filter/convert.base64-encode/resource=index.php 使用base64解码 <htm ...
分类:
其他好文 时间:
2020-02-12 14:47:35
阅读次数:
71
使用批处理获取时间时,通常%DATE%来获取,但这个格式是受系统限制, 使用下面的方法获取系统时间就不用考虑格式的变化 1 @echo off 2 call :GetLocaldatetime 3 echo %GetLocaldatetime% 4 5 call :GetUTCTime 6 echo ...
分类:
其他好文 时间:
2020-02-12 13:24:29
阅读次数:
64
1、打印机操作(打印默认文本里面的内容)from PyQt5 import QtGui,QtWidgets,QtPrintSupportfrom PyQt5.QtWidgets import *import sysclass Printsupport1(QMainWindow): def __ini ...
分类:
其他好文 时间:
2020-02-12 11:19:55
阅读次数:
220
with和上下文管理器 如果你有时间阅读源码的习惯,可能会看到一些优秀的代码会出现带有 关键字的语句。 对于系统资源如文件,数据库连接,socket而言,应用程序打开这些资源并执行完业务逻辑之后,必须要做的事情就是关闭该资源。 在上篇文件中,我们读写文件操作,完毕之后,关闭文件对象。调用close方 ...
分类:
其他好文 时间:
2020-02-12 10:32:40
阅读次数:
63
安装golang github.com/hyperledger/fabric-contract-api-go依赖包的时候,长时间无响应,最后报如下错误: go: github.com/hyperledger/fabric-contract-api-go@v1.0.0: Get https://pro ...
分类:
其他好文 时间:
2020-02-11 11:22:14
阅读次数:
452