Skip to content

Instantly share code, notes, and snippets.

@abhishekgourav248
abhishekgourav248 / total_hamming_distance.txt
Last active March 16, 2025 14:05
Total Hamming Distance - Leetcode
class Solution {
public:
int totalHammingDistance(vector<int>& nums) {
// We can solve it with keeping in mind the contributions of each bit position in our H.D. sum
// At each bit position, there will be set bits and unset bits. And these will form unique pairs.
// b2 b1 b0
// 4 -> 1 0 0
// 5 -> 1 0 1
// 2 -> 0 1 0
// At b2 location (4,2) and (5,2) make pairs with differing bits.
https://docs.google.com/forms/d/e/1FAIpQLScNan4J-Ia8T8Qvqbb8Ckvo9sIcg3OfUSD2BVex0Gw9e64JAw/viewform?usp=pp_url&entry.1705488315=D%C6%B0%E1%BB%9Bi%2020%20%2F%20Under%2020%20years%20old&entry.84045571=N%E1%BB%AF%20%2F%20Female&entry.867267676=%C4%90%C3%A3%20k%E1%BA%BFt%20h%C3%B4n%20%2F%20Married&entry.1678341741=Ch%C6%B0a%20nh%C6%B0ng%20d%E1%BB%B1%20%C4%91%E1%BB%8Bnh%20c%C3%B3%20con%20%2FNot%20yet%2C%20but%20I%20plan%20to%20have%20children.&entry.915357728=Kh%C3%B4ng%20ch%E1%BA%AFc%20%2F%20Not%20sure.&entry.1700975838=Google&entry.1700975838=Facebook&entry.1700975838=YouTube&entry.1700975838=TikTok&entry.1700975838=Nh%C3%B3m%20m%E1%BA%B9%20b%E1%BB%89m%20s%E1%BB%AFa%20tr%C3%AAn%20m%E1%BA%A1ng%20x%C3%A3%20h%E1%BB%99i%20%2F%20Online%20mother%20support%20groups&entry.1700975838=T%C6%B0%20v%E1%BA%A5n%20t%E1%BB%AB%20b%C3%A1c%20s%C4%A9%20ho%E1%BA%B7c%20chuy%C3%AAn%20gia%20t%C3%A2m%20l%C3%BD%20%2F%20Consultation%20with%20a%20doctor%20or%20psychologist&entry.1700975838=B%E1%BA%A1n%20b%C3%A8%2Fng%C6%B0%E1%BB%9Di%20th%C3%
@yohan8560
yohan8560 / Election.java
Created March 16, 2025 14:04
가상 선거 및 당선 시뮬레이션
package task_2week;
import java.util.Random;
import java.util.Scanner;
/*
제로베이스 백엔드 35기 서요한
가상 선거 및 당선 시뮬레이션
*/
public class Election {
private static Scanner sc = new Scanner(System.in);
@choco-bot
choco-bot / FilesSnapshot.xml
Created March 16, 2025 14:03
brutaldoom-epic2 v1.0.0 - Passed - Package Tests Results
<?xml version="1.0" encoding="utf-8"?>
<fileSnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<files>
<file path="C:\ProgramData\chocolatey\lib\brutaldoom-epic2\brutaldoom-epic2.nupkg" checksum="8469F6A9FF745077E7DA38F5EA31E1F8" />
<file path="C:\ProgramData\chocolatey\lib\brutaldoom-epic2\brutaldoom-epic2.nuspec" checksum="E233A8919FAC7367FBB29B8D86129700" />
<file path="C:\ProgramData\chocolatey\lib\brutaldoom-epic2\brutaldoom-epic2Install.zip.txt" checksum="06397EB39EE0D4C561B69F203A76E183" />
<file path="C:\ProgramData\chocolatey\lib\brutaldoom-epic2\tools\chocolateyinstall.ps1" checksum="FF7A1433D026F165DA35A76B65D308C2" />
<file path="C:\ProgramData\chocolatey\lib\brutaldoom-epic2\tools\chocolateyuninstall.ps1" checksum="1C171CDBDB06BE7F39E4877F9957BB6F" />
<file path="C:\ProgramData\chocolatey\lib\brutaldoom-epic2\tools\commonEnv.ps1" checksum="B4D1E46B09B6E4C0016D0DC641C4841E" />
<file path="C:\ProgramDat
// Dependencies: ts-pattern, mitata
import { match, P } from 'ts-pattern';
import { summary, run, bench, type k_state, do_not_optimize } from 'mitata';
summary(() => {
type Data =
| { type: 'text'; content: string }
| { type: 'img'; src: string };
@jlin-appaegis
jlin-appaegis / launch.json
Created March 16, 2025 14:02
Chromium debugger on VS Code
{
"name": "Chrome Debug",
"type": "cppdbg", // "cppdbg" for GDB/LLDB, "cppvsdbg" for Windows Visual Studio debugger
"request": "launch",
"args": [], // Optional command line args
// "preLaunchTask": "8-build_chrome_debug",
"stopAtEntry": false,
"environment": [
{
"name": "CHROMIUM_LLDBINIT_SOURCED",
@Erik0622
Erik0622 / document.tex
Created March 16, 2025 14:01
LaTeX document generated at 2025-03-16T14:01:16.404Z
% Generated at: 2025-03-16T14:01:16.404Z
\documentclass[a4paper,12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{avant}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{amsmath}
\usepackage{tikz}
@HugsLibRecordKeeper
HugsLibRecordKeeper / output_log.txt
Created March 16, 2025 14:01
Rimworld output log published using HugsLib
Log uploaded on Sunday, March 16, 2025, 3:00:58 PM
Loaded mods:
Harmony(brrainz.harmony)[mv:2.3.1.0]: 0Harmony(2.3.3), HarmonyMod(2.3.1)
Core(Ludeon.RimWorld): (no assemblies)
Royalty(Ludeon.RimWorld.Royalty): (no assemblies)
Ideology(Ludeon.RimWorld.Ideology): (no assemblies)
Biotech(Ludeon.RimWorld.Biotech): (no assemblies)
Multiplayer(rwmt.Multiplayer): 0MultiplayerAPI(av:0.5.0,fv:0.5.0), 0PrepatcherAPI(1.2.0), LiteNetLib(1.0.0), MultiplayerLoader(1.0.0), RestSharp(av:106.12.0,fv:106.12.0), System.IO.Compression(av:4.1.2,fv:4.6.24705.1), Multiplayer(0.10.5 [no FileVersionInfo]), MultiplayerCommon(1.0.0 [no FileVersionInfo])
Vanilla Backgrounds Expanded(vanillaexpanded.backgrounds): VBE(1.0.0)
Vanilla Expanded Framework(OskarPotocki.VanillaFactionsExpanded.Core): 0ModSettingsFramework(1.0.0), 0MultiplayerAPI(av:0.5.0,fv:0.3.0), 0PrepatcherAPI(av:1.2.0,fv:1.1.1), ExplosiveTrailsEffect(1.0.7140.31563), GraphicCustomization(1.0.0), HeavyWeapons(1.0.0), KCSG(av:1.1.2,fv:25.2.18), MVCF(2.0.0.1), NoCamShakeExplos
@Erik0622
Erik0622 / document.tex
Created March 16, 2025 14:01
LaTeX document generated at 2025-03-16T14:01:03.225Z
% Generated at: 2025-03-16T14:01:03.225Z
\documentclass[a4paper,12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{avant}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{amsmath}
\usepackage{tikz}
@Yanel85
Yanel85 / xtwall.sh
Last active March 16, 2025 14:03
VLESS / Trojan-Go / Shadowsocks 脚本 支持纯 IPv6 phlinhng/v2ray-tcp-tls-web
#!/bin/bash
export LC_ALL=C
export LANG=en_US
export LANGUAGE=en_US.UTF-8
branch="main"
VERSION="2.2.1"
ip4_api="--ipv4 https://v4.ident.me/"
ip6_api="--ipv6 https://v6.ident.me/"