Tag:receive data

  • Two ways of spark reading Kafka code examples of receiver, direct and Scala


    1. Receiver mode Based on the receiver mode, spark uses the Kafka high level API to continuously receive data from Kafka and store it in the memory of spark executor. According to the batch time, a job is triggered to consume the received data. Consumers can’t maintain the consumed offset by themselves, and Kafka doesn’t […]

  • STM32 is a kind of indefinite length receiving mechanism that uses Hal, DMA, idle, polling to process UART


    STM32 is a kind of indefinite length receiving mechanism that uses Hal, DMA, idle, polling to process UART Device receiving data (DMA) At the same time, DMA related operations are added during UART initialization, and Hal is used when the system starts to run_ UART_ Receive_ DMA is used to start UART reception, and a […]

  • [PHP] swote uses binary packages directly


    Swote provides a compiled binary package, which includes PHP. After downloading and decompressing, it can be run directly without installing PHP Download the binary package directly from this place https://www.swoole.com/page/download After downloading, unzip it to / opt / spool tar – xvf according to the official recommendation swoole.tar.xz -C /opt/swoole Write a PHP file directly […]

  • How to download files with Axios


    First the conclusion, then the details: The configuration responsetype of the front-end Axios is’ blob ‘(key) The server reads the file and returns it to the front end in the format of content type: ‘application / octet stream’ After receiving the data, the front end uses blob to receive the data, and creates a tag […]

  • Swoole 4.4.13 with built-in coprocess connection pool


    New API Built in connection pool (example) (document) (@ twose) enhance Coroutine\Http\ServersupportWebsocketFrame compression () (@ twose) Curl hook supportCURLOPT_PUT, CURLOPT_INFILE, CURLOPT_INFILESIZEAnd other options () (@ twose) An error message (@ leizhang Hunter) (@ twose) will be generated when socket binding fails SocketWhen the operation fails, if it is unnecessary to generate an uncontrollable warning message, […]

  • Simpread golang select case implementation mechanism


    This article is transcoded by simprad, the original address https://hitzhangjie.github.io… Before introducing the implementation mechanism of select case, it is better to understand the Chan operation rules first, to understand when goroutine is blocked and when to wake up, which is helpful for the subsequent understanding of the implementation of select case. So, first introduce […]

  • Google plugin grabs all website content and intercepts images


    Ordinary crawler: Send a request in the code, then get the web content from the stream, parse the web content to get relevant information. The advantage of this method is simple and fast, the disadvantage is that it is easy to be intercepted, and the failure rate is high.Another way is to use Google plug-ins […]

  • Project development of ThinkPHP Forum


    Design sketch First, the database SET FOREIGN_KEY_CHECKS=0; DROP TABLE IF EXISTS `test_topic`; CREATE TABLE `test_topic` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL, `content` text NOT NULL, `user_id` int(11) NOT NULL, `created_at` int(11) NOT NULL, `is_delete` tinyint(1) NOT NULL DEFAULT ‘0’, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=57 DEFAULT CHARSET=utf8; Insert into ` test_topic […]

  • A simple chat example of C ා network programming


    I still remember that when I first started programming, I foolishly confused website development with network programming, which often made me laugh because of the unclear distinction. Later, I can barely distinguish it, but I feel more mysterious because of various protocol ports and other terms. So in order to uncover the mystery of network […]

  • [video tutorial] the latest version of swoole installation and tasks function test


    Today, let’s install and test PHP’s multi concurrent and high-performance network communication extension. This extension is developed by using c voice. After it is loaded into PHP, it realizes multi concurrent asynchronous communication at the PHP level, simulates many features of go voice, and greatly widens the PHP application scenarios. You can use the command […]

  • Rxjava2 use notes


    Subject Subject can be regarded as a bridge or agent. In some reactive x implementations (such as rxjava), it acts as both the observer and the observable. Because it is an observer, it can subscribe to one or more observables, and because it is an observable, it can forward the data it receives or send […]

  • Python IO multiplexing


    IO multiplexing Check whether multiple sockets have changed (whether the connection has been successful/whether data has been obtained) (readable/writable) Realization: IO multiplexing select module The operating system checks whether sockets have changed in three modes: selectMost.1024A socket; loops to detect pollNo limit on the number of sockets monitored; cyclic de-detection (horizontal trigger) epollNo limit on […]