grpc - use golang to take you through a set of RPC services

Next, PHP is used as the client to call the server of golang. Install the grpc go plugin The grpc PHP plugin can help us to automatically generate the client stub class library (equivalent to the API file), which is convenient for us to introduce and call directly. Otherwise, it is not convenient to only generate the entity class of service / r ...

Added by starphp on Sat, 09 Nov 2019 00:01:02 +0200

Go micro + PHP + consumer

First we build a service with go micro. (for the use of go micro, please refer to the official instance or document) //Create a new microservice micro new --type "srv" user-srv   Define our service. Here we define two rpc services, Register and User 1 // modify proto 2 syntax = "proto3"; 3 ​ 4 package go.micro.srv.user; 5 ​ 6 servi ...

Added by 1337hovie on Thu, 07 Nov 2019 08:41:22 +0200

About big file upload

About big file upload thinking Use js to read the file selected in the form form, calculate the md5 value of the file, upload the md5 value to the server, and check whether the file has been uploaded (similar to the second pass function) If the file has not been uploaded, cut it into 1MB blocks according to its size. If it is smaller than 1MB ...

Added by greenberry on Tue, 05 Nov 2019 22:27:51 +0200

The fifth experiment

part1: use dichotomy to find the array location of data Parameter is an array, parameter is an array name // Exercise: use binary search to find data items in a set of ordered elements // Parameter is an array, parameter is an array name #include <stdio.h> const int N=5; int binarySearch(int x[], int n, int item); int main() { ...

Added by isiah on Tue, 05 Nov 2019 18:53:11 +0200

Sentry 9.1.1 process record of onepremium of docker

sentry installation:https://github.com/getsentry/onpremiseUse the installation steps of this document correctly to install version 9.1.1-onbuild, which requires self modifying the Dockerfile.   Note: the command to build the database will not be executed all at once, and needs to be run multiple times: docker-compose run --rm web upgrade   ...

Added by mkarabulut on Mon, 04 Nov 2019 23:11:22 +0200

Android Studio Service service (one of the four components)

Service Characteristic How to create Code snippet implementation background network download json string Characteristic No interface, running in the background How to create Custom class inherits Service Rewrite onBind Registration (manifest file) Lifecycle oncreate() - onstartcommand - ondestore() Starting m ...

Added by MikeSnead on Sun, 03 Nov 2019 23:46:56 +0200

CF768F Barrels and boxes

Toot toot This question is not difficult. We can know some routines by doing several questions like this: how many piles of wine do we lift, so that we can figure out how many piles of food and their arrangement number, then the probability is the number of legal schemes / total schemes. i f there are \ (i \) stacks for wine, then there are \ ( ...

Added by Hypnos on Sun, 03 Nov 2019 21:46:04 +0200

How to deal with the banned pages in wechat? Restore the blocked webpage to visit from wechat normally with 36 API

Today, a backstage colleague asked me: why do I open the prompt "stop visiting this webpage" when sharing and downloading links from the App to wechat friends? But my links can be opened in the browser. So I tried it in WeChat public number and found that it could not be downloaded. Through google, we found that wechat blocked the do ...

Added by Rado001 on Sun, 03 Nov 2019 19:57:47 +0200

Small crawling 2: Chinese code scrambling and other issues

1. Solve the problem of Chinese code disorder (1) dynamic loading or not, (2) source data acquisition Map network on the other side: First page address: http://pic.netbian.com/4kmeinv/ Second pages: http://pic.netbian.com/4kmeinv/index_2.html Third pages: http://pic.netbian.com/4kmeinv/index_3.html #Step 1: there is a bug in the followin ...

Added by BenGilbert on Sun, 03 Nov 2019 17:38:17 +0200

python multi thread crawling picture 2

In the previous article, multithreading was created by using classes. This time, use functions to create multithreading or the same website. https://www.quanjing.com/category/1286521/1.html, The code is as follows: 1 # Multithreading, automatically create folders, each page stores a folder separately 2 3 import requests 4 import th ...

Added by 8ta8ta on Sun, 03 Nov 2019 14:18:27 +0200