- Windows:
- Edge:
http(s)://edge.microsoft.com/captiveportal/generate_204
HTTP連接檢測, 有效值為204
- 10-11:
http://www.msftconnecttest.com/connecttest.txt
HTTP下載檢測, 有效值為Microsoft Connect Test
- Edge:
deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware | |
deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware | |
deb http://deb.debian.org/debian/ bookworm-backports main contrib non-free non-free-firmware | |
deb http://security.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware |
#/bin/bash | |
if [[ "$EUID" -ne 0 ]]; then | |
echo "Permission denied" | |
exit 1 | |
fi | |
cp /etc/network/interfaces /etc/network/interfaces.new | |
systemctl restart networking.service |
jobject getContext(JNIEnv *env) { | |
jclass jAppAppGlobalsClass = env->FindClass("android/app/AppGlobals"); | |
jmethodID jGetInitialApplication = env->GetStaticMethodID(jAppAppGlobalsClass, "getInitialApplication", | |
"()Landroid/app/Application;"); | |
jobject jApplicationObject = env->CallStaticObjectMethod(jAppAppGlobalsClass, jGetInitialApplication); | |
return jApplicationObject; | |
} |
set(CMAKE_BUILD_TYPE Debug) | |
cmake_minimum_required(VERSION 2.8.12) | |
project(libuv1) | |
add_definitions("-std=c++11") | |
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) | |
conan_basic_setup() | |
add_executable(server server.cpp) |
Libuv and libev, two I/O libraries with similar names, recently had the privilege to use both libraries to write something. Now let's talk about my own subjective expression of common and different points.
The topic of high-performance network programming has been discussed. Asynchronous, asynchronous, or asynchronous. Whether it is epoll or kqueue, it is always indispensable to the asynchronous topic.
Libuv is asynchronous, and libev is synchronous multiplexing IO multiplexing.
Libev is a simple encapsulation of system I/O reuse. Basically, it solves the problem of different APIs between epoll and kqueuq. Ensure that programs written using livev's API can run on most *nix platforms. However, the disadvantages of libev are also obvious. Because it basically just encapsulates the Event Library, it is inconvenient to use. For example, accept(3) requires manual setnonblocking after connection. EAGAIN, EWOULDBLOCK, and EINTER need to be detected when reading from a socket. This is a
#!/bin/bash | |
cat > /usr/local/etc/pf-nat.conf << EOF | |
nat on en0 from vnic1:network to any -> (en0) | |
EOF | |
sudo pfctl -d | |
sudo sysctl -w net.inet.ip.forwarding=1 | |
sudo pfctl -f /usr/local/etc/pf-nat.conf -e |
Let Tomcat is download and installed under /opt/tomcat
.
Also, let tomcat
be a non-provileged user under which the server will be running.
We assume that we keep server's binaries under /opt/tomcat
and we will create a server instance named foo
under /var/tomcat/
(carrying its own conf
, logs
, webapps
, work
, lib
directories).
See also https://dzone.com/articles/running-multiple-tomcat.
Create a template service unit file at /etc/systemd/system/[email protected]
: