This file contains 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 NBT_TAGS_HEADER_FILE | |
#define NBT_TAGS_HEADER_FILE | |
// https://minecraft.fandom.com/wiki/NBT_format | |
#include <string> | |
#include <string_view> | |
#include <vector> | |
#include <variant> | |
#include <cstdint> |
This file contains 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
[SETTINGS] | |
readmethod = LINE | |
filename = numbers.txt |
This file contains 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
<ui name="main" script="main.ui.py"> | |
<frame position="20x20"> | |
<label text="Just a sample UI XML file."/> | |
<button text="Example Button" onclick="exampleBtn()"/> | |
</frame> | |
</ui> |
This file contains 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
#Testing out decorators | |
class decor: | |
def __init__(self, value_): | |
self.v = value_ | |
def __call__(self, f): | |
def wrapped_(*args): | |
if 'n' in globals(): | |
tmp = globals()['n'] |
This file contains 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
#There is definitely a better way to write this class | |
#Basically just like a dict, except you can use instance.attribute | |
#rather than instance["attribute"] | |
class Settings: | |
def __init__(self, **kwargs): | |
for key in kwargs: | |
setattr(self,key,kwargs[key]) | |
def __setitem__(self,key,value): | |
setattr(self,key,value) |
This file contains 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 static void DoLine(int startX, int startY, int endX, int endY, Action<int, int> callback) | |
{ | |
int dx, dy; | |
int sx, sy; | |
int accum;//accumilator | |
dx = endX - startX;//Start X subtracted from End X | |
dy = endY - startY; | |
sx = ((dx) < 0 ? -1 : ((dx) > 0 ? 1 : 0));//if dx is less than 0, sx = -1; otherwise if dx is greater than 0, sx = 1; otherwise sx = 0 |
This file contains 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 static void DoLine(int startX, int startY, int startZ, int endX, int endY, int endZ, Action<int, int, int> callback) | |
{ | |
int dx, dy, dz; | |
int sx, sy, sz; | |
int accum, accum2;//accumilator | |
dx = endX - startX;//Start X subtracted from End X | |
dy = endY - startY; | |
dz = endZ - startZ; |
This file contains 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 sealed class ArrayHelper | |
{ | |
internal static Random rand = new Random(); | |
public static void Swap<T>(ref T[] source, int sourceIndex, int swapIndex) | |
{ | |
if (source != null && sourceIndex >= 0 && sourceIndex < source.Length && swapIndex >= 0 && swapIndex < source.Length && swapIndex != sourceIndex) | |
{ | |
T tmp = source[sourceIndex]; |
This file contains 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.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace ClassGrades | |
{ | |
class Program | |
{ |
NewerOlder