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
""" | |
Implement the descriptor spec defined in Java 16: https://docs.oracle.com/javase/specs/jvms/se16/html/jvms-4.html#jvms-4.3 | |
It is given respect to mixin standards, found at: https://github.com/SpongePowered/Mixin | |
package com.github.frontear; | |
class Main { | |
private int num; | |
private String str; |
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 zlib | |
import base64 | |
import hashlib | |
SEPARATOR = "\0" | |
ENCODING = "UTF-8" | |
HASHING = hashlib.blake2b | |
def encrypt(data: str, key: str) -> bytes: | |
arr = [] |
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
package org.example; | |
public final class Glyph { | |
private final int x, y, width, height; | |
public Glyph(final int x, final int y, final int width, final int height) { | |
this.x = x; | |
this.y = y; | |
this.width = width; | |
this.height = height; |
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
nums = [] | |
while True: | |
x = float(input("Please enter a number: ")) | |
nums.append(x) | |
if x < 0.0: | |
break | |
for x in range(len(nums)): |
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
items = {} | |
count = int(input("How many items are you purchasing? ")) | |
for x in range(count): | |
name = str(input("Item name: ")) | |
cost = float(input("Item cost: ")) | |
items[name] = cost | |
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> | |
// find the max value in an array | |
int main() { | |
int array[] = { 11, 100, 99, 95, 14, 62, 35, 74 }; | |
auto j = 0u; | |
for (auto i = 0u; i < 8; ++i) { | |
if (array[j] < array[i]) { // controls comparisions to find the maximum value without needing to loop the same array twice | |
j = 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
#include <map> | |
#include <set> | |
#include <string> | |
#include <vector> | |
#include <fstream> | |
#include <iostream> | |
#include <filesystem> | |
using namespace std; |
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 FRONTEAR_JAILBREAK | |
#define FRONTEAR_JAILBREAK | |
/* This class is meant to mimic the layout of the class you want to access | |
* It won't necessarily always work, as the compiler can potentially move | |
* properties around in one, but not the other. This shouldn't be used | |
* in daily code, and serves moreso as a demonstration. | |
*/ | |
struct Jailbreak { | |
int x; // a publically accessible property |
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
package org.frontear | |
fun main() { | |
val unsafe = SunUtils.getUnsafe()!! | |
val str = "Hello World" | |
val int = Int.MAX_VALUE | |
val address = unsafe.allocateMemory((Int.SIZE_BYTES + Char.SIZE_BYTES * str.length).toLong()) // allocate enough memory for our objects. Notice how we don't allocate for the \0 in strings, as we don't need it in this case, but might in other cases | |
unsafe.putInt(address, int) // we don't need to offset, since the address is starting from it's beginning point | |
for (i in 0 until str.length) { | |
val char = str[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
cmake_minimum_required(VERSION 3.15) | |
project(Program) | |
set(CMAKE_CXX_STANDARD 20) | |
set(CMAKE_CXX_FLAGS "-lGL -lGLEW -lglfw") | |
add_executable(Program src/main.cpp src/main.h) |