This file contains hidden or 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
import { useState } from "react"; | |
import { SymbolAddWatcher, SymbolForAll, Watched } from "./constants"; | |
export type RecordIndex = string | number | symbol; | |
export type AnyRecord = Record<RecordIndex, any>; | |
export type RecordObj<T extends AnyRecord> = T & AnyRecord; | |
export default function useWatched<T extends AnyRecord>( | |
watched: Watched<T>, | |
watchList: Array<keyof T> | Array<string | symbol> = [SymbolForAll], |
This file contains hidden or 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
/* eslint-disable @typescript-eslint/ban-types */ | |
import { AnyRecord, RecordObj, SymbolAddWatcher, SymbolForAll, Watched } from "@hooks/constants"; | |
export default function useUnwatched<T extends AnyRecord>(state: RecordObj<T> = {} as AnyRecord) { | |
const watchList = {} as Record<string | symbol, Function[]>; | |
const proxyHandler = { | |
set(_target: any, prop: any, value: any) { | |
Reflect.set(state, prop, value); | |
const propStateSetters = watchList[prop] || []; |
This file contains hidden or 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
/** Created by DarkRoku12 */ | |
export const SymbolAddWatcher = Symbol("__addWatcher"); | |
export const SymbolForAll = Symbol("__forAll"); | |
export type RecordIndex = string | number | symbol; | |
export type AnyRecord = Record<RecordIndex, any>; | |
export type RecordObj<T extends AnyRecord> = T & AnyRecord; | |
// eslint-disable-next-line @typescript-eslint/ban-types | |
export type Watched<T extends AnyRecord> = RecordObj<T> & { [SymbolAddWatcher]: Function }; |
This file contains hidden or 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
// Taken inspiration and adapted from: | |
// https://github.com/funmaker/eslint-plugin-indent-empty-lines/blob/4f397f490dcf0329feccef6df23b32e366fc2faf/lib/rules/indent-empty-lines.js | |
// https://github.com/eslint/eslint/blob/60f6a06f521c514e3834dd9f82821b10c69a5f00/lib/rules/no-trailing-spaces.js | |
// https://astexplorer.net -> Configure: @typescript-eslint. | |
// Created by DarkRoku12. | |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
/* | |
The logic behind this code is to indent the first 'token' in the line if the indentation is not correct. | |
To achieve that, we need to remove the previous indentation and then set our desired one. |
This file contains hidden or 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 <algorithm> | |
#include "ps_system.hpp" | |
#include "ps_particle.hpp" | |
#include "ps_emitters.hpp" | |
// Effects - Multi-thread: | |
void ParticleSystem::applyEffectsMultiThread( int id , updater_data ud ) |
This file contains hidden or 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
# ----------------------------- | |
# PostgreSQL configuration file | |
# ----------------------------- | |
# | |
# This file consists of lines of the form: | |
# | |
# name = value | |
# | |
# (The "=" is optional.) Whitespace may be used. Comments are introduced with | |
# "#" anywhere on a line. The complete list of parameter names and allowed |
This file contains hidden or 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
[{"name":"Israel","dial_code":"+972","code":"IL"},{"name":"Afghanistan","dial_code":"+93","code":"AF"},{"name":"Albania","dial_code":"+355","code":"AL"},{"name":"Algeria","dial_code":"+213","code":"DZ"},{"name":"AmericanSamoa","dial_code":"+1 684","code":"AS"},{"name":"Andorra","dial_code":"+376","code":"AD"},{"name":"Angola","dial_code":"+244","code":"AO"},{"name":"Anguilla","dial_code":"+1 264","code":"AI"},{"name":"Antigua and Barbuda","dial_code":"+1268","code":"AG"},{"name":"Argentina","dial_code":"+54","code":"AR"},{"name":"Armenia","dial_code":"+374","code":"AM"},{"name":"Aruba","dial_code":"+297","code":"AW"},{"name":"Australia","dial_code":"+61","code":"AU"},{"name":"Austria","dial_code":"+43","code":"AT"},{"name":"Azerbaijan","dial_code":"+994","code":"AZ"},{"name":"Bahamas","dial_code":"+1 242","code":"BS"},{"name":"Bahrain","dial_code":"+973","code":"BH"},{"name":"Bangladesh","dial_code":"+880","code":"BD"},{"name":"Barbados","dial_code":"+1 246","code":"BB"},{"name":"Belarus","dial_code":"+375"," |
This file contains hidden or 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
ββ BEGIN LICENSE ββ | |
Michael Barnes | |
Single User License | |
EA7E-821385 | |
8A353C41 872A0D5C DF9B2950 AFF6F667 | |
C458EA6D 8EA3C286 98D1D650 131A97AB | |
AA919AEC EF20E143 B361B1E7 4C8B7F04 | |
B085E65E 2F5F5360 8489D422 FB8FC1AA | |
93F6323C FD7F7544 3F39C318 D95E6480 | |
FCCC7561 8A4A1741 68FA4223 ADCEDE07 |