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
import { Fragment, FunctionComponent, ReactElement, useCallback } from 'react'; | |
import { IfElse } from './IfElse'; | |
import { IfThen } from './IfThen'; | |
import { IfElseIf } from './IfElseIf'; | |
type CompoundComponent<T, K> = FunctionComponent<T> & K; | |
type IfThenType = typeof IfThen; | |
type IfElseType = typeof IfElse; | |
type IfElseIfType = typeof IfElseIf; |
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
import { v4 as uuid } from 'uuid'; | |
import { generate } from 'randomstring'; | |
import { DynamoDBClient } from '@aws-sdk/client-dynamodb'; | |
import { DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb'; | |
import { | |
Schema, | |
Entity, | |
Item, | |
AllTableIndexCompositeAttributes, | |
PutItem |
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
import { Model } from 'sequelize-typescript'; | |
import { MakeNullishOptional } from 'sequelize/types/utils'; | |
import { DestroyOptions, FindOptions, UpdateOptions } from 'sequelize'; | |
export type RepoPrimaryKey = string | number | bigint; | |
export type RepoDelete<TAttributes extends object> = DestroyOptions<TAttributes>; | |
export type RepoUpdate<TAttributes extends object> = UpdateOptions<TAttributes>; | |
export type RepoFetch<TAttributes extends object> = FindOptions<TAttributes>; | |
export type RepoCreate<TAttributes extends object> = MakeNullishOptional<TAttributes>; |
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
BOOL GetFileBufferInMemory( | |
LPCWSTR lpFileName, | |
LPVOID* pDestBuffer | |
) { | |
HANDLE FileHandle = CreateFileW(lpFileName, GENERIC_READ, NULL, NULL, OPEN_EXISTING, NULL, NULL); | |
if (FileHandle == INVALID_HANDLE_VALUE) { | |
printf_s("CreateFileW failed to retrieve the file handle."); | |
return FALSE; | |
} |
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 <Windows.h> | |
#define MAX_MEMORY_RANGE 0x40000000 | |
#define IS_POINTER_BETWEEN(P, MAX, MIN) (((ULONG_PTR)P < (ULONG_PTR)MAX) && ((ULONG_PTR)P > (ULONG_PTR)MIN)) | |
#define PAGE_EXECUTE_FLAGS \ | |
PAGE_EXECUTE | \ | |
PAGE_EXECUTE_READ | \ | |
PAGE_EXECUTE_READWRITE | \ | |
PAGE_EXECUTE_WRITECOPY |