Install ShadowSocks on Linux from Source

sudo apt-get install qt5-qmake qtbase5-dev libbotan1.10-dev #skip this part if you've already installed these packages
dpkg-buildpackage -uc -us -b
sudo apt-get install qt5-qmake qtbase5-dev libqrencode-dev libqtshadowsocks-dev libappindicator-dev libzbar-dev libbotan1.10-dev
dpkg-buildpackage -uc -us -b

References :
https://github.com/shadowsocks/libQtShadowsocks/wiki/Installation
https://github.com/shadowsocks/shadowsocks-qt5/wiki/Installation

https://github.com/shadowsocks/libQtShadowsocks/wiki/Compiling
https://github.com/shadowsocks/shadowsocks-qt5/wiki/Compiling

How can the CPU analog inputs of the SIMATIC S7-1200 also measure currents of 0-20mA

s7-1200_cpu_analoginputs_current_01

Fig. 01: Connection of a sensor to a voltage source as a 2-conductor connection

s7-1200_cpu_analoginputs_current_02

Fig. 02: Connection of a sensor to a voltage source as a 3-conductor connection

s7-1200_cpu_analoginputs_current_03

Fig. 03: Connection of a sensor to a voltage source as a 4-conductor connection

s7-1200_cpu_analoginputs_current_04

Fig. 04: Connection of a measuring transducer with voltage output to a current source as a 4-conductor connection

References :
https://support.industry.siemens.com/cs/document/67396370/how-can-the-cpu-analog-inputs-of-the-simatic-s7-1200-also-measure-currents-of-0-20ma?dti=0&lc=en-WW

Install MongoDB as Windows Service

mkdir c:\data\db
mkdir c:\data\log

create a file at C:\mongodb\mongod.cfg

systemLog:
    destination: file
    path: c:\data\log\mongod.log
storage:
    dbPath: c:\data\db

Install the MongoDB service

"C:\mongodb\bin\mongod.exe" --config "C:\mongodb\mongod.cfg" --install

Start the MongoDB service

net start MongoDB

Stop or remove the MongoDB service as needed

net stop MongoDB
"C:\mongodb\bin\mongod.exe" --remove

References :
https://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/

Optocoupler

An Optocoupler, also known as an Opto-isolator or Photo-coupler, is an electronic components that interconnects two separate electrical circuits by means of a light sensitive optical interface.

Optocoupler Types
The photo-transistor and photo-darlington devices are mainly for use in DC circuits while the photo-SCR and photo-triac allow AC powered circuits to be controlled. There are many other kinds of source-sensor combinations, such as LED-photodiode, LED-LASER, lamp-photoresistor pairs, reflective and slotted optocouplers.

References :
http://www.electronics-tutorials.ws/blog/optocoupler.html