Skip to content

Instantly share code, notes, and snippets.

View dimitriye98's full-sized avatar

Dimitriye Danilovic dimitriye98

View GitHub Profile
@dimitriye98
dimitriye98 / LICENSE
Created May 13, 2021 03:14
Modified BSD 4-Clause for Minecraft Mods
Copyright [Year] [Author Name]
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
0eNrtnUuvHMeRhf+KwNUMoB5kRkS+tPR61jOLwcCgbMIgRiYFijLGGPi/z6UefEg3O14nu3klr2yTZlZ1dVdVRpwT3/m/Z19/8/2Lb9+8fPX2j1+/fv0/z776vw9/8t2zr/7ro//57u9e/un1qx//+LuXf3n1/Jt3f/b279++ePbVs7+9fPP2+4c/+fLZq+d/ffcHP/4/LvTsH18+e/nqzy/+99lX9R9fOv4lf/QvyfUv//2jf8mP/suXb1/89cM/e/G/37558d13l7dvnr/67tvXb95evn7xzduPFpF//PeXz168evvy7csXP37+H/7H3//46vu/fv3izcMn09b68tm3r797+OevX707i4clL/Xf2pfP/v7wX+jf2sOR/vzyzYs//fj38u6Uf3EAch+gfLz+IytyfEV+fEXxX4SyvQj9kQM09wFIuQg9vuLmIgz3ilVZccZX3Hzqlfi1FsuvtZbEEarpCL++47779puXb98+/OWvr8eHU39sqV/fW98/3PZv/vLm9cN/qr/cHy/IT8+V19+//fb7d0+OXx+FHSdcPlyJx5aS+K92dw2a4+zo+tn1+Hf/qx8XPXaAkfm+6sdf18tXu29rhp+Ouyu84k9H02WhEj5l0x1HNfwcqpaHO1H4V7255MThFTe/bUq84jbPYmrhr830zqT4K27zPqL4K2634nQ/fX64mg+bsh82cl99tEv98tk3zx9O4uHP6Iu3r7/gL/7l31+/+ssX//H8zcvnr97+68Pf/+3Fm+9+vItmlSFr9FFLb/3Ddq+8O8enuPH9zyew8dX2pQTf5DF8AxV4DJBrA9USBzA9zTtyg9Yh++Dy8fqQffCluE55+Xdou5d9if+Id9uq+Ot3uyT5N327D+zZ3b7/JVXDZi9xq9l2ky23L7PtgN0b1I/P2rBdHe5qaHfuM7WLtG189atB+sXYl1pU4DvJ3N4Xs9vl3c+6Y/a+DN/74re+9eMVbdu//3z55xe+7V+97/ZP1O3fZ9C91F7WlNxfmLZx114
@dimitriye98
dimitriye98 / Solution.cpp
Created August 6, 2020 11:32
Fast Find Duplicates
#pragma GCC optimize("Ofast")
static auto _ = [] () {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
return 0;
}();
class Solution {
public:
const int EMPTY = -1;
const int TOMBSTONE = -2;
class MyHashSet {
int* buckets;
size_t size = 0;
size_t capacity;
void resize() {
int* oldBuckets = buckets;
class MyHashSet {
struct Entry {
int value;
Entry* next;
};
Entry** buckets;
int capacity;
std::hash<int> hasher;
local fs = require "filesystem"
local comp = require "computer"
local shell = require "shell"
local log = {}
local function _numberToBytes(n, acc)
local newAcc = string.char(n % 256)..acc
local nextN = math.floor(n / 256)
if nextN == 0 then
{
"vertices": [
{
"id": "22nd",
"edges": [
{
"weight": 295.0,
"destination": "Bayshore"
}
],
{
"nodes": [
{
"name": "a"
},
{
"name": "b"
}
],
"edges": [
[
{
"name": "endpoint1",
"type": "dead end",
"connections": [
"road1"
]
},
{
"name": "endpoint2",
pub struct DrawService {
display: Rc<Display>,
frame: Frame,
program: Program,
perspective: PerspectiveMatrix3<f32>,
}
impl DrawService {
fn build_perspective(frame: &Frame) -> PerspectiveMatrix3<f32> {
let (width, height) = frame.get_dimensions();