自定义博客皮肤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和安全

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

原创 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 94

原创 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 476 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 872 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 258 1

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

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

2024-03-04 17:51:48 118

原创 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 771 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 267 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 1268 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 707 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 544 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 177 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 754 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 556

原创 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 944 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 944 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 959 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 534

原创 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 846 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 499 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 538 1

原创 Nodejs digital envelope routines::unsupported解决方法

如果使用17版本以上的NodeJS会导致出现digital envelope routines::unsupported的错误。如果想在IDE自动运行的时候解决这个问题,在项目文件page.json中将"scripts": { "start": "react-scripts start", "build": "react-scripts build" },改成"scripts": { "start": "SET NODE_OPTIONS=--openssl-legacy-pro

2023-11-07 09:27:05 120

原创 TCP/IP Illustrated Episode 21

LoopbackAlthough it may seem surprising, in many cases clients may wish to communicate with servers on the same computer using Internet protocols such as TCP/IP. To enable this, most implementations ...

2023-11-07 09:26:43 78 1

原创 Unix Network Programming Episode 81

#include "unp.h"int tcp_listen(const char *host, const char *serv, socklen_t *addrlenp){ int listenfd, n; const int on=1; struct addrinfo hints, res, &amp;ressave; bzero(&amp;hints...

2023-11-07 09:26:05 218 1

原创 Unix Network Programming Episode 80

‘tcp_connect’ FunctionWe will now write two functions that use getaddrinfo to handle most scenarios for the TCP clients and servers that we write. The first function, tcp_connect, performs the nor...

2023-11-07 09:25:52 243 1

原创 UICollectionView代理方法不执行

self.collectionView.reloadData() self.layoutIfNeeded()刷新数据。

2023-10-07 14:14:30 132

原创 TCP/IP Illustrated Episode 20

LCP OptionsSeveral options can be negotiated by LCP as it establishes a link for use by one or more NCPs. We shall discuss two of the more common ones. The Asynchronous Control Character Map (ACCM) o...

2023-10-07 14:13:58 76 1

原创 Unix Network Programming Episode 79

‘gai_strerror’ FunctionThe nonzero error return values from getaddrinfo have the names and meanings shown in Figure 11.7. The function gai_strerror takes one of these values as an argument and retur...

2023-10-07 14:13:24 316 1

原创 Unix Network Programming Episode 78

‘getaddrinfo’ FunctionThe gethostbyname and gethostbyaddr functions only support IPv4. The API for resolving IPv6 addresses went through several iterations, as will be described in Section 11.20(See...

2023-10-07 14:13:07 295 1

原创 unable to boot the simulator,无法启动模拟器已解决

我在百度上所搜的都是以前的老方法,新版的Mac已经没有Recovery了,因此我只好去bing上查找资料。方法很简单,用Mac安装镜像进入Recovery模式,然后输入。就行了,剩下的和原来的方法一致。

2023-09-04 09:37:36 484

原创 TCP/IP Illustrated Episode 19

802.11 Higher Throughput/802.11nIn late 2009, the IEEE standardized 802.11n [802.11n-2009] as an amendment to [802.11-2007]. It makes a number of important changes to 802.11. To support higher throug...

2023-09-04 09:37:12 76 1

原创 Unix Network Programming Episode 77

‘gethostbyaddr’ FunctionThe function gethostbyaddr takes a binary IPv4 address and tries to find the hostname corresponding to that address. This is the reverse of gethostbyname.#include &lt;netdb...

2023-09-04 09:36:29 373 1

原创 Unix Network Programming Episode 76

We encourage the use of getaddrinfo (Section 11.6(See 8.9.6)) in new programs.#include &lt;netdb.h&gt;struct hostent *gethostbyname (const char *hostname);The non-null pointer returned by this ...

2023-09-04 09:36:14 564 1

原创 高德地图自定义AnnotationView没有交互效果的解决思路

在进行iOS开发的时候,出现了自定义AnnotationView导致点击AnnotationView没有点击效果。

2023-08-04 17:59:32 154

原创 TCP/IP Illustrated Episode 18

Virtual Carrier Sense, RTS/CTS, and the Network Allocation Vector (NAV)In the 802.11 MAC protocol, a virtual carrier sense mechanism operates by observing the Duration field present in each MAC frame...

2023-08-04 17:59:12 128

原创 Unix Network Programming Episode 75

Controlling Terminationfor(;;){ len=sizeof(struct sockaddr_in); rd_sz=Sctp_recvmsg(sock_fd, readbuf, sizeof(readbuf), (SA *)&amp;amp;amp;cliaddr, &amp;amp;amp;len, &amp;amp;amp;sri, &amp;amp;amp;msg_flags); if(strea...

2023-08-04 17:58:33 597

原创 Unix Network Programming Episode 74

SCTP One-to-Many-Style Streaming Echo Client: ‘main’ Function#include &amp;quot;unp.h&amp;quot;int main(int argc, char **argv){ int sock_fd; struct sockaddr_in servaddr; struct sctp_event_subscribe e...

2023-08-04 17:58:18 730

原创 CSS 审核印章样式

// 旋转.arrow { &_up { @include arrow_animation(270deg); } &_down { @include arrow_animation(90deg); } &_right { @include arrow_animation(0deg); } &_left { @include arrow_animation(180deg); }}// 审核印章@mixin arrow_animation(

2023-07-03 09:25:41 379

原创 TCP/IP Illustrated Episode 17

Wireless LANs—IEEE 802.11(Wi-Fi)One of the most popular technologies being used to access the Internet today is wireless fidelity (Wi-Fi), also known by its IEEE standard name 802.11, effectively a w...

2023-07-03 09:22:40 85

原创 Unix Network Programming Episode 73

SCTP One-to-Many-Style Streaming Echo Server: ‘main’ Function#include &quot;unp.h&quot;int main(int argc, char **argv){ int sock_fd, msg_flags; char readbuf[BUFFSZIE]; struct sockaddr_in serv...

2023-07-03 09:21:45 726

原创 Unix Network Programming Episode 72

ssf_flags will be set to one of two values:SCTP_DATA_UNSENT, which indicates that the message could never be transmitted to the peer (e.g., flow control prevented the message from being sent before...

2023-07-03 09:21:26 71

空空如也

空空如也

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

TA关注的人

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