2019.12.14
不允许root远程登录 配置文件 /etc/ssh/sshd_config 文件 #Permitrootlogin yes 改成no 重启ssh服务 #systemctl restar sshd.service 磁盘管理 命令df 用于查看以挂载磁盘的总容量、使用容量、剩余容量等。 -i 表示查看inodes (如已使用100%,即使磁盘空间有富余,也会提示磁盘空间已满) -h 表示使用合适单位显示 -k -m 分别表示以kb和mb为单位显示 命令 du 用来查看某个目录或文件所占用的空间 d
python操作时间
一、问题背景 在对数据进行操作的时候我们总是会遇到数据类型是date类型的数据,这种数据会让我们在使用和操作的过程中遇到一些问题,比如int类型和date类型不对等,string类型和date类型不对等的情况。而在对数据库的字段操作的时候我们更是会遇到此问题,因此在此记录一下操作方法,可以在以后的使用中直接将代码copy过来 二、问题描述 在python中使用datetime这个函数来对时间进行操作,结合数据库一起进行操作,主要内容包括:获取时间为datetime类型,string类型如何转变
IPC之namespace.c源码解读
// SPDX-License-Identifier: GPL-2.0
/*
* linux/ipc/namespace.c
* Copyright (C) 2006 Pavel Emelyanov <[email protected]> OpenVZ, SWsoft Inc.
*/
#include <linux/ipc.h>
#include <linux/msg.h>
#include <linux/ipc_namespace.h>
#include <linux/rcupdate
IPC之sem.c源码解读
// SPDX-License-Identifier: GPL-2.0
/*
* linux/ipc/sem.c
* Copyright (C) 1992 Krishna Balasubramanian
* Copyright (C) 1995 Eric Schenk, Bruno Haible
*
* /proc/sysvipc/sem support (c) 1999 Dragos Acostachioaie <[email protected]>
*
* SMP-thread
笔记一:树莓派4B安装mono环境运行C#程序
下面主要记录如何在树莓派上运行C#开发的winform窗体程序。 对于已经安装好Raspbian系统的树莓派,通电开机后打开命令行窗口并输入一下命令: 1.sudo apt install apt-transport-https dirmngr gnupg ca-certificates 2.sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B3
CSS-06 外部JS,CSS文件的寻址问题
如果js、css外部文件有使用到相对路径,其相对路径的基准是不一样的 当一个index.html中引入外部的JS和CSS文件时: 在index.css文件中,相对路径的写法是以css文件相对于img图片的位置来写的,所以是../img/big/1.jpg #wrap ul li {
width: 125px;
height: 125px;
background-image: url("../img/big/1.jpg");
}
而在index.js文件中,是以i
SpringBoot - @ControllerAdvice 处理异常
在Spring 3.2中,新增了@ControllerAdvice、@RestControllerAdvice 注解,可以用于定义@ExceptionHandler、@InitBinder、@ModelAttribute,并应用到所有@RequestMapping、@PostMapping, @GetMapping注解中。 接下来我将通过代码展示如何使用这些注解,以及处理异常。 注解的介绍 先定义一个ControllerAdvice。代码如下: 需要注意的是使用@ExceptionHandle
第二十一章-单例模式
单例模式(Singleton): 保证一个类仅有一个实例,并提供一个访问它的全局访问点。 通常我们可以让一个全局变量使得一个对象被访问,但它不能防止你实例化多个对象。一个最好的办法就是,让类自身负责保存它的唯一实例。这个类可以保证没有其他实例可以被创建,并且它可以提供一个访问该实例的办法。 基本代码 懒汉模式 #include<iostream>
#include<string>
#include<vector>
using namespace std;
class Singleton
{
AE2ACE coursework
AE2ACE coursework 2019-2020 This coursework is worth 25% of the final mark. Stock Trading & Algorithm Correctness. Deadline: 29 November 2019 16:00 Part I: Stock Trading (12 marks) Warning: If program cannot be complied, it will result in an immedia
EEE101 C Programming
EEE101 C Programming and Software Engineering 1 – ASSESSMENT 4 Assessment Number 4 Contribution to Overall Marks 35% Issue Date 21/11/2019 Submission Deadline 24/12/2019 at 17:00 (5pm) Assessment Objective This assessment aims at evaluating students
12c Data guard Switchover Best Practices using SQLPLUS (Doc ID 1578787.1)
12c Data guard Switchover Best Practices using SQLPLUS (Doc ID 1578787.1) APPLIES TO: Oracle Database Backup Service - Version N/A and later Oracle Database Exadata Cloud Machine - Version N/A and later Oracle Cloud Infrastructure - Database Service
COMP2050 Coursework
COMP2050 Coursework #2 University of Nottingham Ningbo China, School of Computer Science 1 Synopsis Coursework 2 is about maintaining and extending a modern version of classic retro game (Packman). To get started, download zip file ”BestPackmanEverV
上手spring boot项目(三)之spring boot整合mybatis进行增删改查的三种方式。
1.引入依赖 <!--springboot的web起步依赖--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!-- Mybatis起步依赖 -->
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
【UOJ269】【清华集训2016】如何优雅地求和
题目大意 求 \[ \sum_{i=0}^n f(i){n\choose i} x^i (1-x)^{n-i} \] 模\(998244353\) \(n\leq 10^9,m\leq 2*10^4\) 题解 式子后面长得很像二项式定理,我们要想办法把\(f(i)\)分离出来。 一种高妙的做法是把\(f\)转成下降幂形式。 可能是我做题太少没见过吧 令 \[ f(x)=\sum_{i=0}^m g_i x^{\underline{i}} \] 则 \[ \begin{aligned} ans&
COMPSCI 671D
COMPSCI 671D Fall 2019 Homework 4 1 EM Algorithm for Topic Modeling (35 points) In this question we will try to design an algorithm for discovering the abstract topics that occur in a set of documents. In the problem, we have a set of M abstract doc
今日推荐
周排行