JNI (Java Native Interface) allows implementing methods in C/C++, and use them in Java.
class JNIExample {
// Native method, no body.| import java.util.zip.* | |
| String zipFileName = "file.zip" | |
| String inputDir = "logs" | |
| def outputDir = "zip" | |
| //Zip files | |
| ZipOutputStream zipFile = new ZipOutputStream(new FileOutputStream(zipFileName)) | |
| new File(inputDir).eachFile() { file -> |
| #!/usr/bin/env bash | |
| # change the sleep time appropriately | |
| # this server is persistent | |
| # mix and match with Content-Length and having larger and less content then | |
| # is actually produced | |
| # as well as malformed Chunked Encoding | |
| socat \ | |
| -v -d -d \ |
| /** | |
| * Creates a new `CircularBuffer` with the specified `capacity`, | |
| * which must strictly be a positive integer. | |
| * | |
| * We here use the term "zero element", which refers to exactly `null` if the | |
| * `CircularBuffer` is backed by an `Array`, and refers to exactly `0` if it is | |
| * backed by a `TypedArray`. Note that using this constructor will always yield | |
| * a `CircularBuffer` backed by an `Array`. Use the | |
| * `CircularBuffer.fromArray()` function any time a `TypedArray` backing is | |
| * required. |
| # ==================================================================================== | |
| # Steps for Main Router (must have connected internet on WAN port) | |
| # ==================================================================================== | |
| # Set your network IP address configuration default is 192.168.1.0/24 | |
| uci set network.lan.ipaddr='192.168.1.1' | |
| # Recommended, to identify on network and when logged on | |
| uci set system.@system[0].hostname='MainRouter' | |
| uci set network.lan.hostname="`uci get system.@system[0].hostname`" |
| #!/bin/bash | |
| # For latest CUDA 9.0 | |
| wget http://developer.download.nvidia.com/devzone/devcenter/mobile/jetpack_l4t/3.2GA/m892ki/JetPackL4T_32_b196/cuda-repo-l4t-9-0-local_9.0.252-1_arm64.deb | |
| # For latest CUDNN 7.0.5 | |
| wget http://developer.download.nvidia.com/devzone/devcenter/mobile/jetpack_l4t/3.2GA/m892ki/JetPackL4T_32_b196/libcudnn7_7.0.5.13-1+cuda9.0_arm64.deb | |
| wget http://developer.download.nvidia.com/devzone/devcenter/mobile/jetpack_l4t/3.2GA/m892ki/JetPackL4T_32_b196/libcudnn7-dev_7.0.5.13-1+cuda9.0_arm64.deb | |
| wget http://developer.download.nvidia.com/devzone/devcenter/mobile/jetpack_l4t/3.2GA/m892ki/JetPackL4T_32_b196/libcudnn7-doc_7.0.5.13-1+cuda9.0_arm64.deb |
| Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
| ActivityTweet | |
| generic_activity_highlights | |
| generic_activity_momentsbreaking | |
| RankedOrganicTweet | |
| suggest_activity | |
| suggest_activity_feed | |
| suggest_activity_highlights | |
| suggest_activity_tweet |
| #!/usr/bin/env bash | |
| set -Eeuo pipefail | |
| trap cleanup SIGINT SIGTERM ERR EXIT | |
| script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
| usage() { | |
| cat <<EOF | |
| Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
| import { languages } from "monaco-editor"; | |
| function getTokens(tokens: string, divider = "|"): string[] { | |
| return tokens.split(divider); | |
| } | |
| const wordPattern = /(-?\d*\.\d\w*)|([^`~!@#%^&*()\-=+[{\]}\\|;:'",./?\s]+)/g; | |
| const brackets: languages.CharacterPair[] = [ | |
| ["{", "}"], |
brew services start colima. You can skip the following work-around.
cat <<-EOF | sudo tee /usr/local/bin/colima-start-fg
#!/bin/bash