会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Anonytt
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
···
10
下一页
2021年11月11日
【网络编程】学习笔记--04 server端和client代码
摘要: Server端: #include<stdio.h> #include<stdlib.h> #include<string.h> #include<unistd.h> #include<errno.h> #include<pthread.h> #include<ctype.h> #include<s
阅读全文
posted @ 2021-11-11 19:44 Anonytt
阅读(194)
评论(0)
推荐(0)
2021年11月9日
【网络编程】学习笔记--03 地址族与数据序列
摘要: 为什么要设定端口号: 端口号就是在统一操作系统内区分不同的套接字所设置的。 地址信息的表示: 回顾《学习笔记--01》中的bind函数 #include<sys/socket.h> int bind(int sockfd,struct sockaddr *myaddr,socklen_t addrl
阅读全文
posted @ 2021-11-09 13:39 Anonytt
阅读(51)
评论(0)
推荐(0)
【网络编程】学习笔记--02 套接字类型与协议设置
摘要: 首先要清楚什么是协议(protocol)? 简言之,协议就是为了完成数据交换而定好的约束。 回顾我们在《学习笔记 --01》中创建套接字socket中的代码: #include<sys/socket.h> int socket(int domain,int type,int protocol) |
阅读全文
posted @ 2021-11-09 13:19 Anonytt
阅读(89)
评论(0)
推荐(0)
【网络编程】学习笔记--01 套接字与文件操作
摘要: 1.1网络编程套接字 Server端: 网络编程中接受连接请求的套接字创建过程可整理如下: 第一步:调用socket函数创建套接字 第二步:调用bind函数分配IP地址和端口号 第三步:调用listen函数转为可接受请求状态 第四步:调用accept函数受理连接请求 sock函数:建立会话 #inc
阅读全文
posted @ 2021-11-09 13:01 Anonytt
阅读(220)
评论(0)
推荐(0)
2021年11月7日
【Django】学习笔记 -- Lesson.3 框架的一些信息
摘要: Django采用了MVT的软件设计模式,暨模型(Model),视图(View),模板(Template) · M:负责和数据库交互,进行数据处理。 · V:接受请求,进行业务处理,返回应答,做逻辑函数 · T:负责封装构造要返回的html MVT模型的工作流程: 路由控制器将请求转发给对应的视图函数
阅读全文
posted @ 2021-11-07 13:32 Anonytt
阅读(61)
评论(0)
推荐(0)
2021年11月5日
【Python爬虫】 学习笔记 -- ajax下爬取豆瓣请求第一页
摘要: import urllib.request import urllib.parse url = 'https://movie.douban.com/j/chart/top_list?type=5&interval_id=100%3A90&action=&start=0&limit=20' heade
阅读全文
posted @ 2021-11-05 19:23 Anonytt
阅读(37)
评论(0)
推荐(0)
【Python爬虫】 学习笔记 -- post请求的方法(Cookie反爬)
摘要: import urllib.request import urllib.parse url = "https://fanyi.baidu.com/v2transapi?from=en&to=zh" #反爬的话Cookie才是关键,需要视情况保留 headers ={ 'Cookie': 'BIDUP
阅读全文
posted @ 2021-11-05 19:03 Anonytt
阅读(897)
评论(0)
推荐(0)
【Python爬虫】 学习笔记 -- post请求的方法
摘要: post请求百度翻译: 1 import urllib.request 2 import urllib.parse 3 url = "https://fanyi.baidu.com/sug" 4 headers ={ 5 'User-Agent':'Mozilla/5.0 (Windows NT 1
阅读全文
posted @ 2021-11-05 18:31 Anonytt
阅读(674)
评论(0)
推荐(0)
【Python爬虫】 学习笔记 -- get请求的方法
摘要: #引入库函数import urllib.requestimport urllib.parseurl = "https://www.baidu.com/s?wd="#为了反爬而设定的headers ={ 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64
阅读全文
posted @ 2021-11-05 18:09 Anonytt
阅读(187)
评论(0)
推荐(0)
2021年11月4日
【Django】学习笔记 -- Lesson.2 创建菜单界面
摘要:
阅读全文
posted @ 2021-11-04 09:55 Anonytt
阅读(51)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
···
10
下一页
公告