This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Requires Node.js v18 | |
const { readFileSync } = require("fs"); | |
const API_KEY = "<Radarr API key>" | |
const BASE_URL = "https://<Radarr URL>/api/v3"; | |
const options = { | |
credentials: "omit", | |
headers: { | |
"User-Agent": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const BINARY_EXPRESSION = "BinaryExpression"; | |
const UNARY_EXPRESSION = "UnaryExpression"; | |
const IDENTIFIER = "Identifier"; | |
const LITERAL = "Literal"; | |
const SYMBOL_DECORATORS = ["@", "#"]; | |
const binOps = { | |
"|": (l, r, env) => (l || r), | |
"&": (l, r, env) => (l && r) | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// UDPListener.cpp : Defines the entry point for the console application. | |
#include "stdafx.h" | |
#include <stdio.h> | |
#include <string.h> | |
#include <windows.h> // Needed for all Winsock stuff | |
#pragma comment(lib,"ws2_32.lib") //Winsock Library | |
#define PORT_NUM 5001 // Port number used |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "xplane_client.h" | |
/*---------------------------------------------- | |
Statics | |
----------------------------------------------*/ | |
static int client_s; | |
static sockaddr_in server_addr; | |
static sim_data_type current_state; | |
static char is_socket_open; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// XPlaneC.cpp : Defines the entry point for the console application. | |
// References | |
// http://www.nuclearprojects.com/xplane/xplaneref.html | |
// http://www.nuclearprojects.com/xplane/info.shtml | |
// https://docs.microsoft.com/en-us/windows/desktop/winsock/windows-sockets-error-codes-2 | |
// https://stackoverflow.com/questions/32471004/udp-client-not-receiving-udp-server-message | |
#include "stdafx.h" | |
#include <stdio.h> |