python 53rd Day - Process, Collaboration. select. Asynchronous I/O...

Process: 1 #!usr/bin/env python 2 #-*-coding:utf-8-*- 3 # Author calmyan 4 import multiprocessing,threading,time 5 6 def run(name): 7 t=threading.Thread(target=run2)#Create new threads 8 t.start() 9 print('process[%s],In printing...'%name) 10 time.sleep(1) 11 12 def run2(): 13 print(threading.get_ident())#Print t ...

Posted by hotmonkey on Mon, 24 Dec 2018 10:00:07 -0800

[swift] - Using JavaScript to solve the problem that WKWebView cannot send POST parameters

Basic realization ideas: Put an HTML code containing a POST request for JavaScript in the project directory Load the code for this POST request containing JavaScript to WK WebView After loading is completed, the POST method of JavaScript is called with Native and parameters are passed in to complete the request. Create HTML code for POST reque ...

Posted by SyncViews on Sun, 23 Dec 2018 18:06:06 -0800

< Notes > Java SE-06 Java SE IO

06 Java SE IO By Kevin Song Overview of 06-01 IO Flow 06-02 Byte Stream and Character Stream 06-02-01 character stream 06-02-02 byte stream 06-02-03 Conversion Flow Operating Rules of 06-02-04 IO Flow 06-03 File class 06-03-01 Recursion 06-04 Properties Collection 06-05 Other IO Classes 06-05-01 Print Stream 06-05-02 Sequence Strea ...

Posted by dough boy on Sun, 23 Dec 2018 13:33:06 -0800

Java 7 NIO Files, Path operation file

From Java 1.0 to 1.3, we face the following problems when developing applications that require I/O support: Without the concept of data buffers or channels, developers have to program to deal with many of the underlying details. I/O operations are blocked and scalability is limited The supported character set encoding is limited and requires a ...

Posted by kaedus on Sun, 23 Dec 2018 03:54:05 -0800

Summary of the basic process of pushing h264 stream aac stream by android librtmp

Summary of basic process of pushing h264 stream aac stream by android librtmp 1. x264 initialization configuration Note: I stepped on some pits here, and removed pps and sps from nal in the process of rtmp pushing. Only one nal slice was allowed in a frame. Previously, the test initialization parameters of x264 failed to notice this problem, ...

Posted by rReLmy on Sat, 22 Dec 2018 17:36:12 -0800

Redis Source Code Analysis (8), ziplist of compression of redis data structure - ------- Ziplist. C ziplist. h Learning Notes

I. Introduction to ziplist /* The ziplist is a specially encoded dually linked list that is designed * to be very memory efficient. * Ziplist is designed to save as much memory as possible with a fairly licensed two-end queue *It stores both strings and integer values,where integers are encoded as *actual integers instead of a series ...

Posted by bravo14 on Fri, 21 Dec 2018 11:09:07 -0800

Coordinator Layout + AppBarLayout + NestedScrollView pits above Android 6.0: recyclerView displays only one line

(It's a little nervous to write a blog for the first time) The theme of AS: ScrollActivity is used to make the card interface. Using Coordinator Layout + AppBarLayout + NestedScrollView for the official MD design was really good, and when I tested it on Android 5.1, there was no problem at all. When I tested with Android 8.1, ...

Posted by stanleybb on Fri, 21 Dec 2018 05:24:04 -0800

RHEL7 and CentOS7 languages, character encoding, keyboard mapping, X11 layout settings (localectl) - system management (1)

Reading the official documents of Red Hat Enterprise Linux 7 these days, I found some system management methods that are much better than before. I am going to share my reading and learning experience with a series of articles. At the beginning of the system management guidance, the problems of language, character encod ...

Posted by napa169 on Thu, 20 Dec 2018 22:27:05 -0800

Using configuration configuration to end using hard-coded Job in quartz.net improves the flexibility of Trigger tasks

Timer timer is often the first thing that comes to mind when a project encounters a timing task, but it's too weak. In fact, it usually uses a specialized third-party scheduling framework, such as Timer timer. Quartz, which has powerful functions and flexibility in application, is well known to people I want to use. So this article will talk a ...

Posted by champoi on Thu, 20 Dec 2018 20:00:05 -0800

5-58 special symbol cut sort wc uniq tee tr split

8.10 shell special symbol cut command Special symbols "*" stands for zero or more characters "?" Represents a character "#" Annotation Symbol Symbol of \"De-meaning "|" Pipeline Character cut usage [root@lixiang01 ~]# cat /etc/passwd |head -2 root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin ...

Posted by alconebay on Thu, 20 Dec 2018 12:06:05 -0800