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
| #[derive(Debug, Default)] | |
| struct AnyMap { | |
| map: HashMap<TypeId, Box<dyn Any>>, | |
| } | |
| impl AnyMap { | |
| fn new() -> Self { | |
| Default::default() | |
| } |
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 <iostream> | |
| #include <memory> | |
| #include <unordered_map> | |
| class GameObject; | |
| class Component | |
| { | |
| public: | |
| virtual void OnSetup() {} |
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
| { | |
| pkgs, | |
| lib, | |
| ... | |
| }: let | |
| libs = with pkgs; [ | |
| libGL | |
| xorg.libX11 | |
| xorg.libXi | |
| libxkbcommon |
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
| { | |
| pkgs, | |
| lib, | |
| ... | |
| }: let | |
| libs = with pkgs; [ | |
| llvmPackages.libclang | |
| libGL | |
| xorg.libX11 |
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
| { | |
| pkgs, | |
| lib, | |
| ... | |
| }: { | |
| packages = with pkgs; [ | |
| pkg-config | |
| alsa-lib | |
| udev |
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 <iostream> | |
| struct S { | |
| explicit S() { std::cout << "S()\n"; } // basic constructor | |
| S(const S& other) { std::cout << "S(const S&)\n"; } // copy constructor | |
| S(const S&& other) { std::cout << "S(const S&&)\n"; } // move constructor | |
| S& operator=(const S& other) { std::cout << "S& operator=(const S&)\n"; return *this; } // copy assignment operator |
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 <stdint.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <strings.h> | |
| typedef struct Pair { | |
| struct Pair *next; | |
| const char *key; | |
| void *value; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| vec4 SPHERE = vec4(0.0, 0.0, 3.0, 1.0); | |
| float FOV = 3.0; | |
| const int MAX_STEPS = 1000; | |
| float EPSILON = 0.01; | |
| float GROUND = -1.0; | |
| vec4 SPHEREC = vec4(1.0, 0.0, 0.0, 0.0); | |
| vec4 GROUNDC = vec4(0.4); | |
| vec4 SKYC = vec4(0.3, 0.4, 0.8, 1.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
| import random | |
| def quick_sort(arr): | |
| if len(arr) <= 1: | |
| return arr | |
| pivot = arr[-1] | |
| pivot_index = len(arr) - 1 |
NewerOlder