
课外学习
weixin_45790260
这个作者很懒,什么都没留下…
展开
-
阿里云Ubuntu服务器无法ssh连接
今天由于安装apache导致服务器无法ssh连接解决如下#查看防火墙ufw app list#查看当前ufw状态ufw status#开启sshufw allow 'OpenSSH'原创 2021-08-02 22:02:31 · 268 阅读 · 0 评论 -
改变vscode的代码折叠样式为+
在交流群一位大佬教的方法链接如下https://stackoverflow.com/questions/58073299/vs-code-folding-code-with-sign-instead-of-the-default-%E2%88%A8https://marketplace.visualstudio.com/items?itemName=ElAnandKumar.el-vsc-product-icon-theme安装两个插件教程都在第二个链接里了感谢那个大佬教我效果如下.原创 2021-05-04 12:35:17 · 1207 阅读 · 1 评论 -
含有sqlite3数据库的提取
#include <stdio.h>#include <string.h>#include <stdlib.h>#include <unistd.h>#include <arpa/inet.h>#include <sys/socket.h>#include <netinet/in.h>#include<iostream>#include"sqlite3.h"using namespace st.原创 2021-04-19 20:02:59 · 446 阅读 · 0 评论 -
Makefile的简单编写
nameserver=servernameclient=clientserver:gccserver @./${nameserver}gccserver: @gcc server.c -o ${nameserver}client:gccclient @./${nameclient}gccclient: @gcc client.c -o ${nameclient}clean: @rm -rf *.o ${nameserver} ${nameclient}原创 2021-04-19 19:48:47 · 72 阅读 · 0 评论 -
c++的运算符重载
c++的运算符重载#include<iostream>using namespace std;class Myint{public: Myint(int num) { m_num = num; } void showNum() { cout << m_num << endl; } int getNum() { return m_num; } void setNum(int num) { m_num = num原创 2021-04-12 15:33:18 · 78 阅读 · 0 评论 -
解决端口别占用
在做socket udp编程时,强制停掉server会导致端口被占用解决方案命令行netstat -aon|findstr “端口”查到占用端口进程的PID后进入任务管理器,结束进程即可原创 2021-04-11 22:34:10 · 353 阅读 · 0 评论 -
linux子系统打开本地文件
cd /mnt原创 2021-03-29 09:47:45 · 404 阅读 · 0 评论 -
我的Ubuntu环境配置
ubuntu 18.04工具//管理员打开文件夹sudo apt install nautilus-adminnautilus -qsrs配置apt intall gitsudo apt install gcc make python p7zip-full -ycd srs-master/trunk/./configure && make//运行 ./objs/srs -c conf/srs.conf./scripts/stop.hFFmpeghttp://原创 2021-03-27 20:12:16 · 76 阅读 · 0 评论 -
Ubuntu管理员身份打开终端及文件
管理员身份终端su root管理员身份文件su nautilus原创 2021-03-26 15:15:53 · 1396 阅读 · 0 评论 -
PHP图片缩放函数的实现
代码如下缩放图片并进行保存<?php //调用 $r = thumb("./1.jpg",'thumb',100,100); var_dump($r); //图片缩放 //地址,路径,缩放的宽高,前缀 function thumb($srcImage,$path,$w,$h,$pre='s_'){ //0.判断图片类型 //1.获取图片后缀.jpg .jpeg .png .gif $suffix = ltrim(strrchr($srcImage,'.'),'.');.原创 2021-03-14 19:57:44 · 153 阅读 · 0 评论 -
imagcreatefromjpeg找不到路径
imagcreatefromjpeg今天使用这个函数表示找不到文件,但我反复确定路径没有问题,最后发现是我的整体路径当中有一个文件夹里面使用了逗号,用英语重命名文件夹,问题就解决了使用这个函数一定要注意路径里是否有非法字符...原创 2021-03-14 19:55:33 · 92 阅读 · 0 评论 -
PHP验证码函数
今天做网页时发现需要使用php里面的验证码函数,照猫画虎写了一个,默认用的是系统字体,可以通过修改fontfamily路径使用自定义字体<?php //$fontFamily = 'C:\phpstudy_pro\WWW\shop15.com\shop15\home\msyh.ttf'; //vcode($fontFamily); vcode(); //函数验证码 //参数:字体,宽,高,验证码字符数 function vcode($fontFamily = '',$w = 100,$h原创 2021-03-13 16:26:27 · 159 阅读 · 0 评论 -
有趣的网站效果搭建
这里打算放一些我认为比较有趣的人家搭建的网站,我打算照猫画虎哈啊哈哈1.这里面有一个小人https://www.cnblogs.com/Smileing/p/11552961.html原创 2021-02-17 10:53:26 · 237 阅读 · 0 评论 -
解决无法引用sqlite库的问题
sudo apt-get install libsqlite3-dev然后gcc program.c -o executable -lsqlite3./executable参考网站https://stackoverflow.com/questions/9389344/error-undefined-reference-to-sqlite3-open原创 2021-02-15 12:21:47 · 492 阅读 · 0 评论 -
我的Ubuntu联网
配置好文件后其实也没配置点击wired connect然后turn off然后再打开就可以联网了太草了原创 2021-02-15 09:16:40 · 76 阅读 · 0 评论 -
Apache 没法start
/etc/init.d/apache2 start在安装好Apache2后执行上面的命令,或者start换成restart,出现报错apache2.serviceJob for apache2.service failed. See “systemctl status apache2.service” and “journalctl -xe” for details.failed!经过查找资料运行下面两条语句就可以解决这个问题sudo apt-get install psmiscsudo ls原创 2021-02-14 19:50:08 · 234 阅读 · 0 评论 -
headfirst html & css书本源代码下载蓝奏云
链接放下面蓝奏云原创 2021-02-03 09:45:18 · 515 阅读 · 0 评论 -
爬取文章
import requestsfrom lxml import etreefrom bs4 import BeautifulSoupimport osresp = requests.get('http://www.748219.com/')resp.encoding = 'utf-8' #编码方式#print(resp.text)book = resp.texthtml = etree.HTML(book)#提取详情页链接book_url = html.xpath('//div[@原创 2021-01-28 21:54:43 · 129 阅读 · 0 评论 -
爬
爬图可以多学习爬虫今天弄了个爬图片的代码照猫画虎,能用,最后学习一些能爬动网的爬虫技术import osimport reimport requestsimport timeheaders = {'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36'}web = 'https://www.v原创 2021-01-14 21:11:00 · 104 阅读 · 0 评论 -
python正则表达式简单163邮箱
import re#邮箱前缀部分的规则是6~18个字符,可使用字母、数字下划线,需要以字母开头#1234567891234567890@163.commail_rule = re.compile('^[a-zA-Z]\w{5,17}@(163\.com)$')mail_name = input("please input the mail name:")result = mail_rule.search(mail_name)if result != None: print('right原创 2021-01-13 21:28:28 · 657 阅读 · 0 评论