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
| script = | |
| tflags = | |
| rule cc | |
| command = cl /nologo /c /O2 /Ob3 /W3 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_STDIO_INLINE=__forceinline -DLUAJIT_DISABLE_JIT -DLUAJIT_NO_UNWIND /showIncludes $tflags $in | |
| deps = msvc | |
| rule link | |
| command = link /nologo /out:$out $in |
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
| -- source: https://stackoverflow.com/a/50119025 | |
| create function numeric_to_bit(numeric) returns bit varying | |
| language plpgsql | |
| as | |
| $$ | |
| DECLARE | |
| num ALIAS FOR $1; | |
| -- 1 + largest positive BIGINT -- | |
| max_bigint NUMERIC := '9223372036854775808' :: NUMERIC(19, 0); |
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
| // | |
| // PUBLIC DOMAIN CRT STYLED SCAN-LINE SHADER | |
| // | |
| // by Timothy Lottes | |
| // | |
| // This is more along the style of a really good CGA arcade monitor. | |
| // With RGB inputs instead of NTSC. | |
| // The shadow mask example has the mask rotated 90 degrees for less chromatic aberration. | |
| // | |
| // Left it unoptimized to show the theory behind the algorithm. |
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
| const { Client, Intents } = require('discord.js'); | |
| const { joinVoiceChannel, createAudioResource, createAudioPlayer, VoiceConnectionStatus, entersState, AudioPlayerStatus } = require("@discordjs/voice"); | |
| const { token } = require('./config.json'); | |
| const readline = require('readline'); | |
| const rl = readline.createInterface({ | |
| input: process.stdin, | |
| output: process.stdout, | |
| prompt: 'TTS> ' | |
| }); | |
| const util = require('util'); |
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
| #pragma once | |
| constexpr size_t DxgiFormatRowSize(DXGI_FORMAT format, uint width) | |
| { | |
| switch (format) | |
| { | |
| case DXGI_FORMAT_R32G32B32A32_TYPELESS: | |
| case DXGI_FORMAT_R32G32B32A32_FLOAT: | |
| case DXGI_FORMAT_R32G32B32A32_UINT: | |
| case DXGI_FORMAT_R32G32B32A32_SINT: |
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
| /* | |
| A BC5 normal map texture visualization shader for RenderDoc. | |
| Usage: | |
| 1. Save this to %APPDATA%/qrenderdoc/ on Windows or ~/.local/share/qrenderdoc elsewhere | |
| 2. Set Channels mode to Custom in RenderDoc Texture Viewer | |
| 3. Select the shader from the dropdown menu | |
| */ | |
| SamplerState pointSampler : register(s0); | |
| Texture2DArray<float4> texDisplayTex2DArray : register(t2); |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>MANDELBROT</title> | |
| </head> | |
| <body style="font-family: sans-serif;"> |
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
| qApp->setStyle(QStyleFactory::create("Fusion")); | |
| QPalette darkPalette; | |
| darkPalette.setColor(QPalette::Window, QColor(53,53,53)); | |
| darkPalette.setColor(QPalette::WindowText, Qt::white); | |
| darkPalette.setColor(QPalette::Base, QColor(25,25,25)); | |
| darkPalette.setColor(QPalette::AlternateBase, QColor(53,53,53)); | |
| darkPalette.setColor(QPalette::ToolTipBase, Qt::white); | |
| darkPalette.setColor(QPalette::ToolTipText, Qt::white); | |
| darkPalette.setColor(QPalette::Text, Qt::white); |
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 sys | |
| count=0 | |
| sys.setrecursionlimit(50000) | |
| cache={} | |
| def a(m,n): | |
| global count | |
| global cache | |
| count=count+1 | |
| if cache.has_key(m) and cache[m].has_key(n): | |
| return cache[m][n] |
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
| // Assume we need 32-byte alignment for AVX instructions | |
| #define ALIGN 32 | |
| void *aligned_malloc(int size) | |
| { | |
| // We require whatever user asked for PLUS space for a pointer | |
| // PLUS space to align pointer as per alignment requirement | |
| void *mem = malloc(size + sizeof(void*) + (ALIGN - 1)); | |
| // Location that we will return to user |