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
| #ifndef ACTION_HPP | |
| #define ACTION_HPP | |
| template<class T> struct Action | |
| { | |
| void (*callback)(T*); | |
| T* data; | |
| }; | |
| template<class T> void SafeCall(Action<T> action) |
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; | |
| namespace _440 | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| int n = 440; | |
| for (int i = 0; i < 8; ++i) |
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; | |
| namespace FizzBuzz | |
| { | |
| class Program | |
| { | |
| static void PlayTheGame(int maxValue, params (int factor, string phrase)[] rules) | |
| { | |
| for (int i = 1; i <= maxValue; ++i) | |
| { |
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; | |
| namespace SecretSanta | |
| { | |
| class Program | |
| { | |
| static void GenerateSecretSantas(Random random, params string[] people) | |
| { | |
| var assignments = new string[people.Length]; | |
| Array.Copy(people, assignments, people.Length); |
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.Linq; | |
| using System.Text; | |
| using System.IO; | |
| using Newtonsoft.Json; | |
| using Newtonsoft.Json.Linq; | |
| namespace TheGreatRename | |
| { | |
| class Program |
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 <vector> | |
| #include <random> | |
| #include <string> | |
| #include <cstdint> | |
| #include <cstring> | |
| #include <ctime> | |
| #define STB_IMAGE_WRITE_IMPLEMENTATION | |
| #include "stb_image_write.h" |
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 <random> | |
| #include <ctime> | |
| using namespace std; | |
| int main(int argc, char** argv) | |
| { | |
| mt19937 mt(time(nullptr)); | |
| normal_distribution<double> distribution(0.0, 4.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 <iostream> | |
| using namespace std; | |
| struct Pair | |
| { | |
| int multiple; | |
| const char* word; | |
| }; | |
| int main(int argc, char** argv) |
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> | |
| using namespace std; | |
| class Base | |
| { | |
| int _value; | |
| public: | |
| Base() | |
| { |
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 <vulkan/vulkan.h> | |
| #include <iostream> | |
| #include <cassert> | |
| using namespace std; | |
| void DumpPhysicalDevice(VkPhysicalDevice physicalDevice) | |
| { | |
| VkPhysicalDeviceProperties properties; | |
| vkGetPhysicalDeviceProperties(physicalDevice, &properties); |