$ sudo install -o redis -g redis -d /var/lib/redis2
$ sudo cp -p /etc/redis/redis.conf /etc/redis/redis2.conf
class BashExecutor | |
{ | |
// fire and forget, method style execution | |
static void ExecuteEnf(string code) | |
{ | |
FileHandle file; | |
MakeDirectory("$profile:Bash/"); // create directory for logging and execution purposes | |
string script_path = string.Format("$profile:Bash/script_%1.c", GetDate()); | |
file = OpenFile(script_path, FileMode.WRITE); |
#!/usr/bin/env bash | |
: ${1?'Please specify an input resource pack in the same directory as the script (e.g. ./converter.sh MyResourcePack.zip)'} | |
# ensure input pack exists | |
if ! test -f "${1}"; then | |
echo "Input resource pack ${1} is not in this directory" | |
echo "Please ensure you have entered the filename correctly" | |
exit 1 | |
else | |
printf "\e[33m[•]\e[m \e[37mInput file ${1} detected\e[m\n" |
#!/bin/bash | |
gource \ | |
-s .03 \ | |
-1280x720 \ | |
--auto-skip-seconds .1 \ | |
--multi-sampling \ | |
--stop-at-end \ | |
--key \ | |
--highlight-users \ |
cmake_minimum_required(VERSION 3.9) | |
if(DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE) | |
set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" | |
CACHE STRING "") | |
message(" [INFO] VCPKG CMAKE_TOOLCHAIN_FILE = ${CMAKE_TOOLCHAIN_FILE}") | |
endif() | |
#======= Global Project Configuration =========# |
import javax.net.ssl.HttpsURLConnection; | |
import java.awt.Color; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.lang.reflect.Array; | |
import java.net.URL; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; |
When querying your database in Sequelize, you'll often want data associated with a particular model which isn't in the model's table directly. This data is usually typically associated through join tables (e.g. a 'hasMany' or 'belongsToMany' association), or a foreign key (e.g. a 'hasOne' or 'belongsTo' association).
When you query, you'll receive just the rows you've looked for. With eager loading, you'll also get any associated data. For some reason, I can never remember the proper way to do eager loading when writing my Sequelize queries. I've seen others struggle with the same thing.
Eager loading is confusing because the 'include' that is uses has unfamiliar fields is set in an array rather than just an object.
So let's go through the one query that's worth memorizing to handle your eager loading.
This content from this markdown file has moved a new, happier home where it can serve more people. Please check it out : https://docs.microsoft.com/azure/azure-cache-for-redis/cache-best-practices.
#include <windows.h> /* WinAPI */ | |
/* Windows sleep in 100ns units */ | |
BOOLEAN nanosleep(LONGLONG ns){ | |
/* Declarations */ | |
HANDLE timer; /* Timer handle */ | |
LARGE_INTEGER li; /* Time defintion */ | |
/* Create timer */ | |
if(!(timer = CreateWaitableTimer(NULL, TRUE, NULL))) | |
return FALSE; |