自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

likilli的博客

Do not lose myself

  • 博客(50)
  • 收藏
  • 关注

转载 新版Raspbian系统upgrade慢的解决方法

最近开始折腾树莓派,安装OpenCV的时候,发现upgrade的话,慢如蜗牛,网上搜了一下解决方案,然而并没有什么作用,最后发现少修改了一个文件修改之前,备份下配置文件sudo cp /etc/apt/sources.list /etc/apt/sources.list.baksudo cp /etc/apt/sources.list.d/raspi.list /etc/apt/sour...

2018-04-02 09:37:37 2770

原创 网络编程学习笔记 六-网络地址相关

在上一篇博客上,对于sin_family、sin_port、atoi、hton的函数没有说明,所以这里描述一下。struct sockaddr_in servAddr;servAddr.sin_family = PF_INET; //Linux为AF_INETservAddr.sin_addr.s_addr = htonl(INADDR_ANY);servAddr.sin_por...

2018-03-28 17:45:01 342

原创 网络编程学习笔记 五-迭代服务器端、客户端实现(二 Linux)

服务器端#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <arpa/inet.h>#include <sys/socket.h>const int BUF_SIZE = 1024;v...

2018-03-28 16:49:09 266

原创 网络编程学习笔记 五-迭代服务器端、客户端实现(一 Win)

服务器端的实现#include <stdio.h>#include <stdlib.h>#include <string.h>#include <WinSock2.h>#define BUF_SIZE 1024void ErrorHandling(char *message){ fputs(message, stder...

2018-03-13 10:59:25 249

原创 网络编程学习笔记 四-数据传输函数

在Linux上socket认为时文件的一种,而在Windows上是要区分socket和文件的,所以他们的操作也是不同的。Linux打开文件int open(const char *path, int flag) //成功时返回文件描述符,失败时返回-1关闭文件int close(int fd) //成功时返回0,失败时返回-1这两个函数只是打开和关闭文件,下边...

2018-03-13 10:29:54 601

原创 网络编程学习笔记 二- 套接字协议及数据传输特性

int socket(int domin, int type, int protocol) //Linux下创建套接字函数SOCKET socket(int af, int type, int protocol) //Windows创建套接字函数上边两个函数均是创建套接字的函数,其实这两个函数的形参都一样,这两个函数唯一不同的地方就在于函数的返回值类型不同。Windows上用SOCK...

2018-03-12 19:02:40 390

原创 网络编程学习笔记 三-套接字函数

再Windows上进行网络编程,与Linux上略微不同,虽然Windows套接字大部分参考了BSD系列UNIX套接字设计的,但是有略微的不同首先在Windows上编程需要进行链接库和初始化Windows套接字编程头文件和库1.导入头文件winsock2.h#include <winsock2.h>2.链接ws2_32.lib库 在VS2013中,右键项目...

2018-03-12 17:03:58 232

原创 网络编程学习笔记 一

即将毕业,发现自己并不会什么技能,一边愁着找工作,一边还要发愁毕业设计,哎································· 故,,,赶紧学习一下网络编程,给自己再添加点技能,,套接字网络编程中,如果要让两台机器进行交互数据,除了物理连接以外,我们如何自己进行数据交换? 套接字, 套接字:套接字就是进行数据交换的第一前提,只有有了套接字,才能进行下边的操作。套接...

2018-03-12 15:56:24 160

原创 CentOS 7修改ssh端口

命令如下: sudo vim /etc/ssh/sshd_config在第22行 有个 #Port 22 把这个'#'去掉,然后再添一行 Port 端口号,之后,:wq 后, 输入命令 service sshd restart重启过ssh服务之后,就生效了...

2018-03-10 20:28:14 265

原创 Ubuntu 16.04安装Powerline

这篇文章来源于Linux Developer (http://www.linuxdeveloper.space/install-vim-powerline/ ),也可以说我是把上边的教程翻译了一下,若有有翻译不足之处,请大家海涵使用PIP安装Powerline安装并更新PIPsudo apt-get install python-pippip install --upgr...

2018-03-10 20:25:22 4334

原创 Ubuntu16.04安装Tagbar

Tagbar是vim里边一个挺好用的插件,特别是写C\C++的时候,Tagbar能显示出所写代码的函数、变量、类等等, 具体安装教程如下:通过Vundle安装Tagbar在.vimrc文件里添加如下语句 vimrc Bundle 'majutsushi/tagbar' 然后打开vim,执行PluginInstall,稍后看到Done!字样时候,就表示安装完 ...

2018-03-10 20:24:00 887 2

原创 Ubuntu创建启动器文件

Ubuntu安装软件挺简单的,一个apt-get install *或者下载deb安装包dpkg一下就能把想要安装的软件安装上来,这样安装的软件可以放到启动器内,方便使用。但是,有的软件既不能apt-get install,下载的也不是deb包,而是压缩文件,解压后也是一堆文件,这样的软件每次使用还需要找到对应的文件,感觉麻烦,其实我们可以自己创建一个文件进而添加到启动器。方法如下: 我们以ec...

2018-03-10 20:22:53 825

原创 CentOS 7简单配置firewalld

在CentOS 7里边,除了iptables,多了一个firealld。之前并不怎么关注防火墙,甚至直接把防火墙从开机启动里移除了,真是个愚蠢的行为啊,后来每次ssh连上VPS之后,发现ssh被恶意测试了好多次,于是我不仅修改了ssh的默认端口,就开启了防火墙。因为我对防火墙的操作较少,我也并不关注过多的操作,我只存了两个命令增加端口firewall-cmd --permane...

2018-03-10 20:20:24 243

原创 POJ3617 Best Cow Line

文章链接:http://poj.org/problem?id=3617Best Cow LineTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 20242 Accepted: 5568DescriptionFJ is about to ta

2016-11-08 22:30:33 291

原创 POJ1458 Common Subsequence

文章链接http://poj.org/problem?id=1458Common SubsequenceTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 48657 Accepted: 20064DescriptionA subsequenc

2016-11-08 22:22:27 237

原创 POJ1287 Networking

题目链接:点击打开链接NetworkingTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 8287 Accepted: 4559DescriptionYou are assigned to design network connection

2016-05-29 16:54:32 450

原创 POJ3461 Oulipo

OulipoTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 33738 Accepted: 13634DescriptionThe French author Georges Perec (1936–1982) once wrote a book, L

2016-05-27 18:56:53 322

原创 POJ 2406 Power Strings

Power StringsTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 41834 Accepted: 17394DescriptionGiven two strings a and b we define a*b to be their conca

2016-05-27 18:52:46 322

原创 POJ3625 Building Roads

Building RoadsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10539 Accepted: 2972DescriptionFarmer John had just acquired several new farms! He wants

2016-05-26 20:16:41 412

原创 ZZUOJ10407 最大岛屿

10407: B.最大岛屿Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 32  Solved: 19[Submit][Status][Web Board]Description神秘的海洋,惊险的探险之路,打捞海底宝藏,激烈的海战,海盗劫富等等。加勒比海盗,你知道吧?杰克船长驾驶着自己的的战船黑珍珠1号要征服各个海岛的海盜,

2016-05-04 23:20:48 337

原创 POJ1502 MPI Maelstrom

MPI MaelstromTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 7741 Accepted: 4743DescriptionBIT has recently taken delivery of their new supercomputer,

2016-04-27 22:48:38 364

原创 POJ3624 Charm Bracelet

Charm BraceletTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 31374 Accepted: 13954DescriptionBessie has gone to the mall's jewelry store and spies

2016-04-27 22:47:07 383

原创 归并排序

归并排序是几种排序算法中较快的一种,速度快,稳定性高,因为经常使用,下边就详细讲解一下      归并排序才用了分治的思想,将数进行的分组,分割到最小组,然后进行合并,合并时排序(个人理解),直到完成排序。但是归并排序需要占用额外的空间。代码如下:C++实现:#include#include#define MAXN 7000using namespace st

2016-04-27 22:45:21 289

原创 POJ3628 Bookshelf2

Bookshelf 2Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9255 Accepted: 4189DescriptionFarmer John recently bought another bookshelf for the cow l

2016-04-27 10:43:19 304

原创 POJ2533 Longest Ordered Subsequence

Longest Ordered SubsequenceTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 43879 Accepted: 19357DescriptionA numeric sequence of ai is ordered if a1 a

2016-04-27 10:41:28 227

原创 最长上升子序列之O(n^2)算法

最长上升子序列    最长上升子序列问题共有两种算法,一种是O(n^2)的,一种是O(nlogn)的算法,个人觉得第一种非常好理解,就简单讲述一下第一种算法    第一种算法,主要应用了递推的关系,如,1,2都小于3,所以,1,2,3构成了一个子序列,当后边出现了比3大的数时,3成了新构成的子序列中的一个元素,那么小于3的1,2也成了新构成的子序列中的元素。这时候,子序

2016-04-27 10:39:57 928

原创 POJ2387 Til the Cows Come Home

Til the Cows Come HomeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 39985 Accepted: 13595DescriptionBessie is out in the field and wants to get back

2016-03-28 21:39:09 271

原创 POJ2485 Highways

HighwaysTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 27173 Accepted: 12421DescriptionThe island nation of Flatopia is perfectly flat. Unfortunately

2016-03-26 21:08:12 224

原创 POJ1258 Agri-Net

Agri-NetTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 48633 Accepted: 20146DescriptionFarmer John has been elected mayor of his town! One of his cam

2016-03-26 21:04:44 235

原创 POJ1797 Heavy Transportation

Heavy TransportationTime Limit: 3000MS Memory Limit: 30000KTotal Submissions: 27180 Accepted: 7275DescriptionBackground Hugo Heavy is happy. After the breakdo

2016-03-23 19:25:28 293

原创 POJ3278 Catch That Cow

Catch That CowTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 68975 Accepted: 21699DescriptionFarmer John has been informed of the location of a fugit

2016-03-19 17:03:32 313

原创 POJ1125 Stockbroker Grapevine

Stockbroker GrapevineTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 32700 Accepted: 17986DescriptionStockbrokers are known to overreact to rumours. Y

2016-03-17 21:44:42 269

原创 POJ3620 Avoid The Lakes

Avoid The LakesTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7521 Accepted: 3958DescriptionFarmer John's farm was flooded in the most recent storm,

2016-03-16 19:45:55 265

原创 POJ1979 Red and Black

Red and BlackTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 28659 Accepted: 15614DescriptionThere is a rectangular room, covered with square tiles. E

2016-03-16 19:26:47 207

原创 POJ2909 Goldbach's Conjecture

Goldbach's ConjectureTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10708 Accepted: 6301DescriptionFor any even number n greater than or equal to 4,

2016-03-16 19:25:05 330

原创 POJ1611 The Suspects

The SuspectsTime Limit: 1000MS Memory Limit: 20000KTotal Submissions: 30212 Accepted: 14692DescriptionSevere acute respiratory syndrome (SARS), an atypical pneumo

2016-03-15 12:41:20 205

原创 POJ2524 Ubiquitous Religions

Ubiquitous ReligionsTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 29993 Accepted: 14516DescriptionThere are so many different religions in the world

2016-03-15 12:36:42 196

原创 HDU1051 Wooden Sticks

Wooden SticksTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 16395    Accepted Submission(s): 6731Problem DescriptionThere is a

2016-02-29 20:47:29 368

原创 USACO--Prime Cryptarithm

Prime CryptarithmThe following cryptarithm is a multiplication problem that can be solved by substituting digits from a specified set of N digits into the positions marked with *. If the set of

2016-02-09 23:17:54 328

原创 USACO--Barn Pepair

Barn RepairIt was a dark and stormy night that ripped the roof and gates off the stalls that hold Farmer John's cows. Happily, many of the cows were on vacation, so the barn was not completely f

2016-02-08 00:45:02 331

空空如也

空空如也

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

TA关注的人

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