Use and proxy configuration based on Python Selenium

Catalog Basic use Initialize driver Open web page Selection Tags Action events Grab the network Initialize browsermob-proxy chrome agent firefox proxy Reference resources Basic use Initialize driver chrome options = ChromeOptions() # Ignore https warnings options.add_argument('--ignore-cer ...

Posted by vamosbenedikt on Fri, 04 Oct 2019 00:10:01 -0700

Handwritten RPC Framework Chapter 2 netty Communications

Case introduction When we implement the rpc framework, we need to choose the communication mode of socket. And we know that in general, socket communication is similar to qq chat, sending messages in the past, and when to reply. But our rpc framework communication, which feels like an http call, needs t ...

Posted by fer0an on Thu, 03 Oct 2019 14:38:23 -0700

SHELL script PPT script

Write on the premise that you can use it 1. Determine the type of all files in / var / directory [root@linux1 scripts]# cat filetype.sh #!/bin/bash for i in $(find /var);do if [ -b $i ];then echo "$i It's a block device." elif [ -c $i ];then echo "$i It's a character device." elif [ -f $i ];then echo "$i It's an or ...

Posted by FatStratCat on Thu, 03 Oct 2019 09:48:53 -0700

[small program] WeChat applet gets input and sends network request.

1. Get input box dataAdding bindinput attributes and method values to input in wxmlThe corresponding method is defined in the js section. As long as it is input, the data will be bound to the method and stored in the data attribute variable. 2. Invoke get request to initiate network requestInvoke wx.request to initiate network requests 3. Cal ...

Posted by nscipione on Thu, 03 Oct 2019 09:43:40 -0700

kubespray creates windows server 2019 worker node cluster

By default, refer to: https://docs.microsoft.com/en-us/virtualization/windowscontainers/kubernetes/creating-a-linux-master Based on the above method, kubespray is used for optimization. 1. First, modify the following files: inventory/your_name/group_vars/k8s-cluster/k8s-cluster.yml Modification: ...

Posted by firepages on Thu, 03 Oct 2019 09:06:15 -0700

High Concurrent Programming in Actual java Chapter 5: Parallel Patterns and Algorithms

Singleton mode 1 1 2 Listing 3 Definition: A class produces only one instance in the system Advantages: For frequently used objects, new time can be omitted, which is an objective system performance improvement for heavyweight objects. Lower memory usage, less GC times and shorter GC pause time //Singleton objects must be created whe ...

Posted by shane0714 on Thu, 03 Oct 2019 01:45:13 -0700

A Preliminary Trial of RxSwift, RxBlocking and RxTest

RxJava has become one of the most important components of Android development. Recently, iOS applications have been developed using Swift. Consider using RxSwift in architecture design. Add dependency # Podfile use_frameworks! target 'YOUR_TARGET_NAME' do pod 'RxSwift', '~> 5' pod 'RxCocoa', '~> 5' pod 'RxBlocking', '~> 5' ...

Posted by nagasea on Wed, 02 Oct 2019 19:55:37 -0700

python learning notes mimic qq online chat tool

  Based on the knowledge of process and thread learned before, and the principles of network communication tcp and udp, you can write a small program that mimics qq. 1. Operating Interface: (Simple, you can change the style according to your own requirements) 1. Server interface:   2. Client I ...

Posted by aksival on Wed, 02 Oct 2019 17:20:56 -0700

How to implement libevent timer

1. How does the timer work? In previous articles, we have said that the final processing of libevent is called the corresponding dispatch function in event_base_loop, and the timer is also processed in the dispatch function. Or take epoll as an example. The epoll_dispatch function has the following code: if (tv != NULL) { timeout = ...

Posted by moonshaden on Wed, 02 Oct 2019 14:43:10 -0700

Noejs console printing color and using koa to realize port and ip printing

I. Console Color Printing Download console-color-mr npm install console-color-mr --save-dev The first usage: Direct introduction of require('console-color-mr'); Modified the default color. console.info will output red directly //use color console.info('------------ default color--------'); conso ...

Posted by Anarking on Wed, 02 Oct 2019 13:22:07 -0700