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
local profiler = { | |
call_stack = {}, -- Stack to keep track of active function calls | |
timings = {}, -- Stores the total time spent in each function | |
call_counts = {} -- Stores how many times each function was called | |
} | |
local function get_time() | |
return os.clock() | |
end |
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 { createRef, HTMLAttributes, useEffect, useState } from "react" | |
const positions = [ | |
-1, -1, // Bottom left | |
1, -1, // Bottom right | |
-1, 1, // Top left | |
1, 1 // Top right | |
]; | |
function createShader(gl: WebGLRenderingContext, type: GLenum, source: string): WebGLShader | null { |
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 { HTMLAttributes, useEffect, useRef } from "react"; | |
export default function Matrix(props: HTMLAttributes<HTMLCanvasElement> & { stripCount?: number }): JSX.Element { | |
const canvasRef = useRef<HTMLCanvasElement>(null); | |
useEffect(() => { | |
const canvas = canvasRef.current; | |
if (!canvas) return; | |
const context = canvas.getContext('2d'); |
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
local BASE_URL = "https://raw.githubusercontent.com/X4BNet/lists_vpn/main/ipv4.txt" | |
local IP_PATTERN = "(%d%d?%d?)%.(%d%d?%d?)%.(%d%d?%d?)%.(%d%d?%d?)" | |
local IP_RANGE_PATTERN = "(%d%d?%d?%.%d%d?%d?%.%d%d?%d?%.%d%d?%d?)/(%d+)" | |
local function str_to_ip(str) | |
local o1, o2, o3, o4 = str:match(IP_PATTERN) | |
o1, o2, o3, o4 = tonumber(o1), tonumber(o2), tonumber(o3), tonumber(o4) | |
return bit.bor( | |
o1 * 2 ^ 24, |
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
module("chatsounds_parser", package.seeall) | |
function is_gmod_env() | |
return _G.VERSION and _G.VERSIONSTR and _G.BRANCH and _G.vector_origin -- these should be unique enough to determine that we're in gmod | |
end | |
lookup = {} | |
-- abstract away these methods are they are environement specific and we don't want to be constrained to gmod | |
function build_lookup() |
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 <stack> | |
string get_sequence(vector<int> source) | |
{ | |
string ret; | |
for (int i = 0; i < source.size(); i++) | |
{ | |
ret.push_back(to_string(source[i])[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
#include <bits/stdc++.h> | |
#include <stack> | |
using namespace std; | |
class Node { | |
public: | |
int data; | |
Node *left; | |
Node *right; |
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
using System.CodeDom.Compiler; | |
using System.Collections.Generic; | |
using System.Collections; | |
using System.ComponentModel; | |
using System.Diagnostics.CodeAnalysis; | |
using System.Globalization; | |
using System.IO; | |
using System.Linq; | |
using System.Reflection; | |
using System.Runtime.Serialization; |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Text; | |
class Operation | |
{ | |
protected readonly Stack<Operation> operationStack; | |
protected readonly string context; |
NewerOlder