- Gist: Use #hashtags in descriptions, then search using
user:username #hashtagto find the item.
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
| // Code ported from https://0fps.net/2012/06/30/meshing-in-a-minecraft-game/ | |
| // Note this implementation does not support different block types or block normals | |
| // The original author describes how to do this here: https://0fps.net/2012/07/07/meshing-minecraft-part-2/ | |
| const int CHUNK_SIZE = 32; | |
| // These variables store the location of the chunk in the world, e.g. (0,0,0), (32,0,0), (64,0,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
| public string ReadResource(string name) | |
| { | |
| // Determine path | |
| var assembly = Assembly.GetExecutingAssembly(); | |
| string resourcePath = name; | |
| // Format: "{Namespace}.{Folder}.{filename}.{Extension}" | |
| if (!name.StartsWith(nameof(YourAssemblyName))) | |
| { | |
| resourcePath = assembly.GetManifestResourceNames() | |
| .Single(str => str.EndsWith(name)); |
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
| /*Dependency: Csv by Steven Hansen*/ | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Text.RegularExpressions; | |
| using System.Threading.Tasks; | |
| namespace Utility |
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
| /*Dependency: Csv by Steven Hansen*/ | |
| using System.Drawing; | |
| using Console = Colorful.Console; | |
| namespace Utility | |
| { | |
| public class Train : IDisposable | |
| { | |
| #region Construction |
This file has been truncated, but you can view the full file.
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
| #!/usr/bin/env python | |
| # | |
| # Hi There! | |
| # | |
| # You may be wondering what this giant blob of binary data here is, you might | |
| # even be worried that we're up to something nefarious (good for you for being | |
| # paranoid!). This is a base85 encoding of a zip file, this zip file contains | |
| # an entire copy of pip (version 22.3.1). | |
| # |
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.Drawing; | |
| using System.Runtime.InteropServices; | |
| using System.Windows; // Or use whatever point class you like for the implicit cast operator | |
| namespace CursorPos | |
| { | |
| class Program | |
| { | |
| /// <summary> |
Blazor is NOT procedural. And you cannot define "functional components" - so all the shitty little layouts need to become a seperate component, which quickly makes project messy because each component needs some naming.
Blazor is entirely FUNCTIONAL despite what it looks like, and things like the below can happen that blew your mind:
// The code below depends on Blazorized for <Row> and <Column> definitions
// ProductGalerry.blazor
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
| // Clone of https://gist.github.com/Flafla2/1a0b9ebef678bbce3215 with more dimensions and seed generation. | |
| public class PerlinGen | |
| { | |
| private readonly int[] p; // Randomly shuffled array of values from 0 to 255. | |
| // Values are repeated up to size of 512 to avoid using modulo operator. | |
| public PerlinGen(int seed) | |
| { | |
| // Generate p. |
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
| struct Wave | |
| { | |
| Vec2 dir; | |
| float amplitude; | |
| float waveLength; | |
| }; | |
| struct ImmutableCB | |
| { | |
| float waveSteepness; |