自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

独行者103的专栏

专注Android和安全

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

原创 Windows记事本打开某些文件后假死如何处理

后来看到评论上说将默认输入法设置成英文输入法就好了。最近打开了一个超大的文件,导致记事本假死。然后无论我怎么卸载重装这个应用都不行。记录一下,方便以后查询。是英语(美国)输入法。

2024-09-03 09:07:18 119

原创 TCP/IP Illustrated Episode 33

Lease Query and Bulk Lease QueryIn some environments it is useful to allow a third-party system (such as a relay or access concentrator) to learn the address bindings for a particular DHCP client. Th...

2024-09-03 09:06:43 871 1

原创 Unix Network Programming Episode 101

在这里插入代码片str_echo function: asks for client’s credentials

2024-09-03 09:06:13 879

原创 Unix Network Programming Episode 100

Receiving Sender CredentialsIn Figure 14.13(See 9.3.6), we showed another type of data that can be passed along a Unix domain socket as ancillary data: user credentials. Exactly how credentials are p...

2024-09-03 09:05:54 813 1

原创 Windows编译Boost需要注意的问题

如果你想用2022,需要搜索msvc.jam文件并根据链接。如果你想不修改文件,就装个2019,效果是一样的。增加对2022版本的支持。

2024-08-05 13:16:12 316

原创 TCP/IP Illustrated Episode 32

Protocol OperationThe DHCPv6 protocol operates much like its DHCPv4 counterpart. Whether or not a client initiates the use of DHCP is dependent on configuration options carried in an ICMPv6 Router Ad...

2024-08-05 13:15:27 658

原创 Unix Network Programming Episode 99

#include "unp.h"ssize_t read_fd(int fd, void *ptr, size_t nbytes, int *recvfd){ struct msghdr msg; struct iovec iov[1]; ssize_t n;#ifdef HAVE_MSGHDR_MSG_CONTROL union{ str...

2024-08-05 13:14:59 147

原创 Unix Network Programming Episode 98

#include "unp.h"int my_open(const char *, int);int main(int argc, char **argv){ int fd, n; char buff[BUFFSIZE]; if(argc!=2) err_quit("usage: mycat <pathname>"); ...

2024-08-05 13:14:42 133

原创 旧版本Compose项目如何迁移到Koltin 2.0版本

除了删除composeOptions外,链接给出了使用libs.versions.toml的方法。并不是说官方给的教程不好,而是有很多旧版本的gradle文件没有做这样的配置。1.非常老的,以buildscript为顶级节点的,修改如下。所以就为老版本提供相关迁移方法,并做具体记录。对应模块的build.gradle增加。2.较新的,以plugin为根节点的。

2024-07-01 10:48:37 543

原创 TCP/IP Illustrated Episode 31

NoteThere has been some difficulty in Windows environments regarding the use of the broadcast flag. Windows XP and Windows 7 DHCP clients do not set the flag, but Windows Vista clients do. Some DHCP...

2024-07-01 10:47:35 567 1

原创 Unix Network Programming Episode 97

Unix Domain Datagram Client/Server#include "unp.h"int main(int argc, char **argv){ int sockfd; struct sockaddr_un servaddr; sockfd=Socket(AF_LOCAL, SOCK_STREAM,0); bzero(&ser...

2024-07-01 10:47:09 751 1

原创 Unix Network Programming Episode 96

‘socketpair’ FunctionThe socketpair function creates two sockets that are then connected together. This function applies only to Unix domain sockets.#include <sys/socket.h>int socketpair(int ...

2024-07-01 10:46:52 601 1

原创 TCP/IP Illustrated Episode 30

Attacks Involving IPThere have been a number of attacks on the IP protocol over the years, based primarily on the operation of options, or by exploiting bugs in specialized code (such as fragment rea...

2024-06-03 14:00:46 921 1

原创 TCP/IP Illustrated Episode 29

Host ModelsAlthough it may appear to be a straightforward decision to determine whether a received unicast datagram matches one of a host’s IP addresses and should be processed, this decision depends...

2024-06-03 14:00:24 555 1

原创 Unix Network Programming Episode 95

Unix Domain ProtocolsIntroductionThe Unix domain protocols are not an actual protocol suite, but a way of performing client/server communication on a single host using the same API that is used for ...

2024-06-03 13:59:56 505 1

原创 Unix Network Programming Episode 94

The kqueue interface includes the following two functions and macro:#include <sys/types.h>#include <sys/event.h>#include <sys/time.h>int kqueue(void);int kevent(int kq, const st...

2024-06-03 13:59:45 211 1

原创 Leetcode 547 Number of Provinces

There are n cities. Some of them are connected, while some are not. If city a is connected directly with city b, and city b is connected directly with city c, then city a is connected indirectly with city c.A province is a group of directly or indirectly

2024-05-06 13:18:41 335 1

原创 TCP/IP Illustrated Episode 28

DiscussionIn the examples we have just seen there are a few key points that should be kept in mind regarding the operation of IP unicast forwarding:1.Most of the hosts and routers in this example us...

2024-05-06 13:17:57 678 1

原创 Unix Network Programming Episode 93

The problem here is the buffering performed automatically by the standard I/O library on the server. There are three types of buffering performed by the standard I/O library:1.Fully buffered means th...

2024-05-06 13:16:59 675 1

原创 Unix Network Programming Episode 92

The difference between CMSG_LEN and CMSG_SPACE is that the former does not account for any padding following the data portion of the ancillary data object and is therefore the value to store in cmsg_l...

2024-05-06 13:16:44 787 1

原创 LeetCode 2041 Accepted Candidates From the Interviews

答案select candidate_idfrom Candidates cjoin Rounds r on c.interview_id = r.interview_idgroup by candidate_id, years_of_exphaving years_of_exp >= 2 and sum(score) >= 16

2024-04-07 11:02:08 126

原创 TCP/IP Illustrated Episode 27

Fragment HeaderThe Fragment header is used by an IPv6 source when sending a datagram larger than the path MTU of the datagram’s intended destination. Path MTU and how it is determined are discussed i...

2024-04-07 11:01:46 500 1

原创 Unix Network Programming Episode 91

Both functions package most arguments into a msghdr structure.struct msghdr { void *msg_name; /* protocol address */ socklen_t msg_namelen; /* size of protocol address */ struct iovec *msg_iov; /*...

2024-04-07 11:01:18 898 1

原创 Unix Network Programming Episode 90

#include "unp.h"int readable_timeo(int fd, int second){ fd_set rset; struct timeval tv; FD_ZERO(&rset); FD_SET(fd, &rset); tv.tv_sec=second; t

2024-04-07 11:01:01 276 1

原创 Antdv子列表获取父列表的index

主要是slot-scope那里要加上index,这样就字列表就能获得父列表的index。

2024-03-04 17:51:48 246

原创 TCP/IP Illustrated Episode 26

Pad1 and PadNIPv6 options are aligned to 8-byte offsets, so options that are naturally smaller are padded with 0 bytes to round out their lengths to the nearest 8 bytes. Two padding options are avail...

2024-03-04 17:51:11 792 1

原创 Unix Network Programming Episode 89

Advanced I/O FunctionsIntroductionThis chapter covers a variety of functions and techniques that we lump into the category of “advanced I/O.” First is setting a timeout on an I/O operation, which ca...

2024-03-04 17:50:41 288 1

原创 Unix Network Programming Episode 88

‘inetd’ DaemonOn a typical Unix system, there could be many servers in existence, just waiting for a client request to arrive. Examples are FTP, Telnet, Rlogin, TFTP, and so on. With systems before 4...

2024-03-04 17:50:24 1287 1

原创 TCP/IP Illustrated Episode 25

Mathematics of the Internet ChecksumFor the mathematically inclined, the set of 16-bit hexadecimal values V = {0001, . . . , FFFF} and the one’s complement sum operation + together form an Abelian gr...

2024-02-02 09:14:29 722 1

原创 TCP/IP Illustrated Episode 24

Using ARP to Set an Embedded Device’s IPv4 AddressAs more embedded devices are made compatible with Ethernet and the TCP/IP protocols, it is increasingly common to find network-attached devices that ...

2024-02-02 09:13:30 560 1

原创 Unix Network Programming Episode 87

‘daemon_init’ FunctionFigure 13.4 shows a function named daemon_init that we can call (normally from a server) to daemonize the process. This function should be suitable for use on all variants of Un...

2024-02-02 09:12:57 182 1

原创 Unix Network Programming Episode 86

Source Code PortabilityMost existing network applications are written assuming IPv4. sockaddr_in structures are allocated and filled in and the calls to socket specify AF_INET as the first argument. ...

2024-02-02 09:12:33 770 1

原创 Swift 5将AnyObject转成String

let valueData=try! JSONSerialization.data(withJSONObject: value)let valueString=String(data: valueData, encoding: .utf8)

2024-01-12 11:50:01 670

原创 TCP/IP Illustrated Episode 23

ARP CacheEssential to the efficient operation of ARP is the maintenance of an ARP cache (or table) on each host and router. This cache maintains the recent mappings from network-layer addresses to ha...

2024-01-12 11:49:39 962 1

原创 Unix Network Programming Episode 85

‘gethostbyname_r’ and ‘gethostbyaddr_r’ FunctionsThere are two ways to make a nonre-entrant function such as gethostbyname re-entrant.1.Instead of filling in and returning a static structure, the ca...

2024-01-12 11:49:12 967 1

原创 Unix Network Programming Episode 84

#include "unp.h"#include <time.h>int main(int argc, char **argv){ int sockfd; ssize_t n; char buff[MAXLINE]; time_t ticks; socklen_t len; struct sockaddr_storage clie...

2024-01-12 11:48:56 983 1

原创 Android JS iOS节流防抖函数备份

开发过程中遇到节流防抖问题,这里做个备份,方便以后查阅。Android:RxView.clicks(bt)// 两秒之内点击多次只响应一次点击事件 .throttleFirst(2, TimeUnit.SECONDS) .subscribe(new Observer<Object>() { @Override public void onSubscribe(Disposable d) { } @Override public voi

2023-12-05 10:30:32 549

原创 TCP/IP Illustrated Episode 22

Attacks on the Link LayerAttacking layers below TCP/IP in order to affect the operations of TCP/IP networks has been a popular approach because much of the link-layer information is not shared by the...

2023-12-05 10:30:06 858 1

原创 Unix Network Programming Episode 83

#include "unp.h"int main(int argc, char **argv){ int sockfd, n; char recvline[MAXLINE+1]; socklen_t salen; struct sockaddr *sa; if(argc!=3) err_quit("usage: daytimeudpc...

2023-12-05 10:29:39 511 1

原创 Unix Network Programming Episode 82

#include "unp.h"#include &lt;time.h&gt;int main(int argc, char **argv){ int listenfd, connfd; socklen_t len; char buff[MAXLINE]; time_t ticks; strct sockaddr_storage clientaddr...

2023-12-05 10:29:24 548 1

空空如也

空空如也

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

TA关注的人

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