自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

LYHVOYAGE的专栏

~~~微笑面对每一天~~~

  • 博客(324)
  • 资源 (1)
  • 收藏
  • 关注

原创 使用script命令自动录屏用户操作

在/etc/profile中添加如下内容if [ ! -d /var/log/user-records/ ] ; then mkdir -p /var/log/user-records/ chmod 0777 /var/log/user-records/ chmod +t /var/log/user-records/fiif [ ! -d /var/log/user-records/${LOGNAME} ] ; then mkdir -p /var/log/us

2020-07-17 11:13:33 583

原创 使用Docker搭建Elasticsearch6.8.6集群及设置集群用户密码

本文基于Docker镜像搭建Elasticsearch集群,集群搭建完成后设置集群用户密码,主要包含以下内容:修改系统参数 安装docker和docker-compose 编写yml配置文件 获取集群证书 修改yml配置文件 启动ES集群并修改密码 配置kibana(一)修改系统参数 (1) virtual memory默认情况下,Elasticsearch使...

2020-02-29 18:36:08 6905 2

原创 Docker容器日志集中收集(client-server模式)

四个docker容器,其中三个作为client,一个作为server,每个容器都安装了fluentd,client监控本地日志文件,每次将文件末尾新添加的日志信息转发到server,server接收后存储到server本地;配置文件所在目录:/etc/td-agent/td-agent.confclient配置<source> @type tail pat...

2019-09-03 09:53:14 565

原创 Git提交更新代码

更新github项目分支的代码git add .git commit -m "message" (“message”为对本次更新的说明)git checkout branchToBeChanged(切换分支,branchToBeChanged为将要提交到的分支名称)git push origin branchToBeChanged...

2019-07-24 19:20:25 215

原创 二叉树常见面试题

二叉树结构struct BinaryTreeNode { int val; BinaryTreeNode *left; BinaryTreeNode *right;};1、二叉树的深度int TreeDepth(BinaryTreeNode *root) { if(root == NULL) return 0; int l...

2018-10-01 16:34:37 337

原创 常见单链表面试题

面试中经常被问到有关链表的问题,现总结如下:(此处的链表结构为不带头结点的单链表)单链表结构struct ListNode { int val; ListNode *next; ListNode(int val = 0) : val(val), next(NULL) { }};1、尾插法建立单链表ListNode* BuildListTail(int ...

2018-10-01 12:59:54 323

原创 Python将所有输出信息同时输出到控制台和制定文件

import sysclass Logger(object): def __init__(self, fileN="Default.log"): self.terminal = sys.stdout self.log = open(fileN, "w") def write(self, message): self.termin...

2018-05-30 21:28:40 7801 4

原创 浮点数大数相加求和

#include &lt;iostream&gt;#include &lt;cstdio&gt;#include &lt;cstring&gt;#include &lt;algorithm&gt;#include &lt;cmath&gt;#include &lt;set&gt;#include &lt;map&gt;#include &lt;stack&gt;#i

2018-05-13 12:11:15 2329

原创 SPSS计算Cronbach系数的公式及计算代码

设Cronbach系数为alpha,则式中,k为用于测量的题目数,为第i个题目得分(测量值)的方差,为量表总得分的方差。方差计算公式其中是平均值。计算时,先算出每一列的平均值,然后算每一列的方差,最后把所有列的方差加在一起即为。计算时,先算出两表中每一行的总分,把这个总分当作一个数据,把所有行的总分放在一起,组成新

2017-10-22 14:01:12 21787 1

原创 PostgreSQL常用语句

1、数据表及csv文件的导入导出(数据表已经建好):(1)将t1导出位csv文件src.csv(带列名):COPY t1 TO '文件位置\\src.csv' WITH CSV HEADER;(2)将src.csv导入数据库的t2表中:COPY t2 FROM '文件位置\\src.csv' WITH CSV HEADER;2、从表t2中查询一些字段插入到表t1中:INSERT

2017-04-12 19:34:42 1523

原创 查阅文献时向原作者发邮件要文献的简单模板

Dear Professor XXX, I am in XXX Institute of XXX, XXX university. I am writing to request your assistance. I search one of your papers:…………………(论文题目) but I can not read full-text content. Would you

2017-01-16 10:17:55 21727 1

原创 Ubuntu16.04下Hadoop 2.7.3的安装与配置

一、JAVA环境搭建(1)下载JDK并解压(当前操作系统为Ubuntu16.04,jdk版本为jdk-8u111-linux-x64.tar.gz)新建/usr/java目录,切换到jdk-8u111-linux-x64.tar.gz所在目录,将这个文件解压缩到/usr/java目录下。tar -zxvf jdk-8u101-linux-x64.tar.gz -C /usr/java/

2017-01-13 20:34:35 6257 8

原创 C++实现生成1—10000之间的10000个不重复的随机数

#include #include #include #include #include using namespace std;const int MaxN = 1e4 + 10;int a[MaxN], b[MaxN];int main() { srand((unsigned)time(NULL)); for(int i = 0; i < 10000; ++

2016-05-25 13:20:26 10928

原创 PHP+JS动态显示当前时间

<?php header("content-type:text/html;charset=gb2312"); date_default_timezone_set("PRC"); echo ' var dayNames = new Array("星期日","星期一","星期二","星期三","星期四","星期五","星期六"); function get_obj(time){

2016-05-05 19:19:13 4826

原创 PHP实现四位数字+字母验证码

一、新建captcha.php,写入以下代码:<?php /*--创建一个大小为 100*30 的验证码--*/ session_start(); $image = imagecreatetruecolor(100, 30); $bgcolor = imagecolorallocate($image, 255, 255, 255); imagefill($image, 0, 0,

2016-04-27 16:05:00 4512

原创 CodeForce 236B Easy Number Challenge(筛法求素数 + 整数因式分解)

题目链接:http://codeforces.com/problemset/problem/236/BEasy Number Challengetime limit per test2 secondsmemory limit per test256 megabytesLet's denote d(n) as the number of divis

2016-04-05 19:27:00 914

原创 CodeForce 237C Primes on Interval(二分+ 素数筛法)

题目链接:http://codeforces.com/problemset/problem/237/CPrimes on Intervaltime limit per test1 secondmemory limit per test256 megabytesYou've decided to carry out a

2016-04-05 19:15:50 1229

原创 CSU 1081集训队分组(搜索)

集训队分组Time Limit: 2 Sec  Memory Limit: 128 MBDescription中南大学ACM的暑期集训马上就要开始了,这次集训会将全体N名集训队员(编号分别为1, 2, …, N)按集训选拔赛的排名分成两组,前K名队员分入A组,其余队员分入B组。但现在助理教练CSGrandeur一不小心把集训选拔赛的排名弄丢了,而之前又没将A组和B组的人员确

2016-03-01 23:02:38 969

原创 MySQL数据库的常用操作

1. MySQL数据库的连接与关闭mysql -h 服务器主机地址 -u 用户名 -p 用户密码如果MySQL客户机和服务器在同一台机器上,服务器又授权了本机(localhost)可以连接,管理员用户名为root,该用户密码为password,则连接服务器如下所示:mysql -h localhost -u root -pEnter password:********若要退出客

2016-01-20 20:49:09 656

原创 ubuntu14.04下通过.frm, .MYD,.MYI文件恢复建立mysql数据库

.frm .MYD .MYI都是Mysql存储数据的文件, 代表MySQL数据库表的结构/数据和索引文件。其中,*.frm是描述了表的结构,*.MYD保存了表的数据记录,*.MYI则是表的索引。恢复建立mysql数据库时,先用 sudo su 切换到root角色。第一,要找到初始安装mysql时,数据库存放的位置。通过指令 cd /etc/mysql 切换到mysql目录下,然后用

2016-01-15 10:47:51 2982

原创 ubuntu14.04下mysql数据库的默认存放路径并修改

ubuntu14.04下mysql数据库的默认存放路径为:/var/lib/mysql但有些时候,mysql的数据可能会非常大,由于/var所划分的空间不够大,所以我们需要将mysql数据存放路径修改一下,放到大分区里面,以便可以应付mysql数据增长。修改存放路径时:1. 设置新的数据存放路径,如:mkdir -p /data/mysql 2.复制原有数据cp -R

2016-01-15 08:42:53 12033

原创 2015年年度总结

时光飞逝。转眼间,2015年即将画上一个句号,距离上次总结已经一年时间。这一年我经历了很多,是时候对这一年来走过的历程做个总结了。从2015年1月1日开始算起。2015年元旦是和小伙伴们在机房中度过的。元旦那天,参加了“南阳理工学院第二届ACM大学生程序设计竞赛”,经过五个小时的比拼,最终获得专业组第一名的成绩。当天比完赛,我和我的小伙伴报了一个驾校,于是从放假到年前的一段时间每天就穿梭在

2015-12-31 20:27:23 883 1

原创 单链表操作

typedef struct LNode{ int data; struct LNode *next;} LNode;void CreateF(LNode *&L, int n) //头插法创建链表{ int i; LNode *p; L = (LNode *)malloc(sizeof(LNode)); L->next = NULL;

2015-08-08 16:53:29 919

原创 POJ 3808 Malfatti Circles(计算几何)

Malfatti CirclesTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 250 Accepted: 125 Special JudgeDescriptionThe configuration of three circles packed i

2015-05-01 20:33:37 1690

原创 CodeForce 538C Tourist's Notes(贪心 + 数学)

C. Tourist's Notestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA tourist hiked along the mountain ran

2015-05-01 14:44:05 2388

原创 POJ 1552 BUY LOW, BUY LOWER(最长单调递减子序列求方案数)

BUY LOW, BUY LOWERTime Limit: 1000MS Memory Limit: 30000K   DescriptionThe advice to "buy low" is half the formula to success in the bovine stock market.To be con

2015-04-30 11:25:54 1508

原创 HDU 5212 Code(容斥 或 莫比乌斯反演)

CodeTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Problem DescriptionWLD likes playing with codes.One day he is writing a function.Howerver,his c

2015-04-27 09:49:25 2734 1

原创 Zoj 3870 Team Formation(异或运算)

Team FormationTime Limit: 3 Seconds      Memory Limit: 131072 KBFor an upcoming programming contest, Edward, the headmaster of Marjar University, is forming a two-man team from N students of h

2015-04-26 09:08:24 3424 2

原创 Poj 3352 Road Construction & Poj 3177 Redundant Paths(边双连通分量+缩点)

Road ConstructionTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 9465 Accepted: 4699DescriptionIt's almost summer time, and that means that it's almost

2015-04-23 16:38:17 1257

原创 CodeForce 534C Polycarpus' Dice (数学推理)

Polycarpus' Dicetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp has n dice d1, d2, ..., dn. The

2015-04-21 19:00:11 1293

原创 Bnuoj 4275 Your Ways(数学题 + 动态规划)

Your Ways You live in a small well-planned rectangular town in Phuket. The size of the central area of the town is H kilometers x W kilometers. The central area is divided into HW unit blocks, e

2015-04-19 19:37:52 1283

原创 CodeForce 526B Om Nom and Dark Park(dp + 递归)

Om Nom and Dark Parktime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputOm Nom is the main character of a game

2015-04-19 11:54:06 1629

原创 CodeForce 534B Covered Path(简单推理)

Covered Pathtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe on-board computer on Polycarp's car measure

2015-04-19 09:26:52 1434

原创 CodeForce 525B Pasha and String(字符串)

Pasha and Stringtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPasha got a very beautiful string s for hi

2015-04-19 08:51:55 1528

原创 POJ 1837 Balance(动态规划之背包问题)

BalanceTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 11436 Accepted: 7130DescriptionGigel has a strange "balance" and he wants to poise it. Actually,

2015-04-15 20:12:42 2183 1

原创 NYOJ 1186 心理阴影(两个圆环的相交面积)

心理阴影时间限制:1000 ms  |  内存限制:65535 KB难度:2描述      自从shanghai reginal后,zkc学长的心理就有了阴影。什么不敢水题,不敢gj,不敢放松...(各种不敢)。同样的你们的zsj学长也是这样的。并且他们的心理阴影是一样一样的。      已知一个人的心理阴影为一个环形,那么求你们的zkc学长和zjs学长站在一起

2015-04-04 13:17:46 2978

原创 ZOJ 3058 Circle and Ring(圆和圆环的相交面积)

Circle and RingTime Limit: 1 Second      Memory Limit: 32768 KBGiven a circle and a ring, your task is to calculate the area of their intersection.InputThis problem contains multiple test

2015-04-04 12:50:57 1220

原创 2014广州赛区比赛总结

广州赛区比赛总结这次千里迢迢地跑去广州比赛,我本来以为可以拿到奖。但没想到最后竟然打铁了。先说一下周六的热身赛吧。周六参加完开幕式,我们就去华工体育馆参加热身赛了。按照之前我们说好的分工,比赛开始后由我先浏览所有题目,然后找到有可能会是简单题的题,由我和ZSJ先读题,WYL负责登陆账号、打开编译器以及写头文件。热身赛一共4道题。我大致浏览了一边题目,发现B题应该是一个简单题,于是我就叫ZS

2014-11-24 22:07:58 1487

原创 信息安全之仿射密码加密和解密

本文可以对一个

2014-11-18 20:50:39 10595

原创 LA 2659 && poj 3076 && zoj 3122 Sudoku(精确覆盖 + DLX)

题目链接:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=660TimeLimit: 3.000 secondsA Sudoku grid is a 16 x 16 grid of cells grouped in sixteen

2014-11-17 20:36:16 2116

C语言课程设计——学生学籍管理系统

该课程设计经过我多次修改,自认为已经差不多了,但因为本人知识有限,所以还有部分功能未完善。请大牛们多提宝贵意见!

2013-07-17

空空如也

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

TA关注的人

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