When you use JSON to call an API - not a REST API, but something like JSON-RPC - you will usually want to encode one of several possible messages.
Your request body looks like this:
{
"type": "MessageWithA",
Property / Log Level | Debug | Info | Notice | Warning | Error | Critical | Alert | Emergency | |
---|---|---|---|---|---|---|---|---|---|
Disposable | X | ||||||||
Statistical | X | X | X | X | X | X | X | ||
Relevant | X | X | X | X | X | X | |||
Undersired | X | X | X | X | X | ||||
Unstable | X | X | X | X | |||||
Stateful | X | X | X | ||||||
Unsecure | X | X | |||||||
Unfixable | X |
<?php | |
function calculateDistance($firstLatitude, $firstLongitude, $secondLatitude,$secondLongitude) | |
{ | |
//get polar angle θ (theta) (angle with respect to polar axis) | |
$theta = $firstLongitude - $secondLongitude; | |
$radians = sin( | |
deg2rad($firstLatitude) | |
) * sin( |
function createSamples(name, createVariation) { | |
const sampleCount = 10000; | |
const variations = []; | |
for (let i = 0; i < sampleCount; i++) { | |
variations.push(createVariation()); | |
} | |
const countData = variations.reduce((accum, curr) => { | |
if (accum[curr]) { |
Note: This gist may be outdated, thanks to all contributors in comments.
adb
is the Android CLI tool with which you can interact with your android device, from your PC
You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.
Don't hesitate to read comments, there is useful tips, thanks guys for this !
^data:((?:\w+\/(?:(?!;).)+)?)((?:;[\w\W]*?[^;])*),(.+)$
test this pattern on regexr: https://regexr.com/4inht
regex pattern to match RFC 2397 data URL
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"sync" | |
) |
References: