Wechat applet (4) canvas drawing and saving to mobile album and fileText drawing text for automatic line wrapping

thinking First of all, prepare a picture. Both the local picture and the network picture can be used as your background picture. Currently, the applet does not support screenshots. Here are the local pictures. wx.createCanvasContext(ා get the ID of the canvas) will be used drawImage(ා draw the picture onto the background pict ...

Posted by s0me0ne on Fri, 03 Jan 2020 00:27:33 -0800

(90) Android O combing WIFI DHCP process with WiFi state machine

Preface: before (87) WiFi & DHCP Combing the DHCP process, now combing the next process with WiFi state machine.   Preparatory work: grab the log from Xiaomi mix2 8.0 WiFi state machine to the beginning of ObtainingIpState and the end of ConnectedState. 09-01 21:09:28.135 1561 2457 D WifiStateMachine: enter ObtainingIp ...

Posted by ok on Thu, 02 Jan 2020 19:27:40 -0800

Custom virtual machine installation (KVM)

Custom virtual machine installation 1, Create a virtual switch Principle: call dnsmasq to provide DNS, DHCP and other functions Create configuration file / etc/libvirt/qemu/networks/vbr.xml <network> <name>vbr</name> <bridge name="vbr"/> <forward mode="nat"/> <ip address="192.168.1.2 ...

Posted by qt4u on Thu, 02 Jan 2020 16:12:10 -0800

Handwritten MQ Framework - combing with netty transformation

1. Background Copy above Handwritten MQ Framework (3) - Client Implementation , which previously implemented mq as a server and client via the web, now plans to use netty to transform it.A while ago, I learned how to use netty (https://www.w3cschool.cn/netty4userguide/52ki1iey.html).There are probably some ideas. netty encapsulates the use of s ...

Posted by iankent on Thu, 02 Jan 2020 16:10:04 -0800

Rolling sequence and reverse sequence of tf rnn delay sequence

Using rnn to fit delay and inversion sequences In fact, the rnn of this layer is not as good as full connection. When the sequence length is too long, the number of last full connection nodes needs to be increased. However, if the sequence is relatively short, there are too many parameters and the result is very accurate.... Scroll the sequen ...

Posted by brainardp on Thu, 02 Jan 2020 14:57:36 -0800

rxjs processing http request timeout

Original blog address Usage scenarios The user requests an operation in the background and does not respond for a long time. We want to give the user an information display (request timeout, bad network...) . RxJS implementation About RxJS Here My implementation of this function mainly uses two operators: delay and race. ...

Posted by mattkirkey on Thu, 02 Jan 2020 14:46:42 -0800

Gradient descent (GD)

1, An overview of gradient descent algorithm 1, introduction gradient descent, also known as the steepest descent, is the most commonly used method to solve unconstrained optimization problems. It is an iterative method. The main operation of each step is to solve the gradient vector of the objective function, taking the negative gradient direc ...

Posted by proctk on Thu, 02 Jan 2020 12:02:02 -0800

20180828 com.tencent.mtt standby power consumption

1. BugRepot phenomenon 17: 01:21-11:01:49 18h 0m 28s 601ms, power consumption (94% - 81% = 13%) 2. Analysis of power consumption 2.1 com.tencent.mtt has been in the foreground process in standby test Top app Aug 21 2018 22:16:11 - 22:17:12 +5h25m58s859ms to +5h26m59s438ms active duration: 1m 0s 579ms 1 occurences ...

Posted by pmiller624 on Thu, 02 Jan 2020 07:41:14 -0800

rndc of DNS Management Tool

rndc tools: TCP / UDP 53 port for dns Service TCP 953 port for rndc management dns Service Main functions: check cache status, clear cache, query operation status details, restart service, Only HMAC-MD5 authentication algorithm is supported, and shared key is used at both ends of communicatio ...

Posted by peDey on Thu, 02 Jan 2020 02:35:38 -0800

Glide for Android (image loading)

1. Add dependency dependencies { compile 'com.github.bumptech.glide:glide:3.7.0' compile 'com.android.support:support-v4:23.2.1' } 2. Usage ImageView imageView = (ImageView)findViewById(R.id.imageView) Glide.with(this) .load(url)//Picture address .crossFade()//Open animation //.dontAnimate()//Close ...

Posted by iron999mike on Wed, 01 Jan 2020 12:00:57 -0800