Skip to content

Instantly share code, notes, and snippets.

View StaticFX's full-sized avatar
🍉

Devin Fritz StaticFX

🍉
View GitHub Profile
@StaticFX
StaticFX / Dockerfile
Created March 31, 2023 14:13
Dockerfile for running nodejs with headless-gl (able to run threejs)
FROM python:2.7
FROM node:19
ARG BUILD_DATE
ARG VCS_REF
# Install the dependencies for building gl
RUN apt-get update && apt-get install -y \
libgl1-mesa-dri \
libglapi-mesa \
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>PROJECT_NAME</artifactId>
<groupId>PROJECT_GROUP_ID</groupId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
@StaticFX
StaticFX / java
Created January 4, 2022 17:41
Sub und Superklasse
public class Sub extends Super {
private int subInt = 0;
public Sub() {
for (Field field : this.getClass().getDeclaredFields()) {
System.out.println(field.getName());
}
public static void main(String[] args) {
Scanner consoleScanner = new Scanner(System.in);
System.out.print("Insert rows > ");
int rows = consoleScanner.nextInt();
if (rows < 1) {
System.out.println("Rows must be greater or equal 1");
return;
}
import java.util.HashMap;
import java.util.Scanner;
/**
* Class for random testings required over time
*
* @author Devin
* @version 1.0.0
*/
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
boolean[] fields = new boolean[34];
for (int i = 0; i < fields.length; i++) {
fields[i] = false;
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
boolean[] fields = new boolean[34];
fields[3] = true;
fields[10] = true;
fields[16] = true;
fields[19] = true;
public int binToDecRec(int bin) {
return binToDecRec(bin, 0);
}
private int binToDecRec(int bin, int i) {
if (bin == 0)
return 0;
return (int) (bin % 10 * powRec(2, i) + binToDecRec(bin / 10, i + 1));
public int binToDecRec(int bin) {
return binToDecRec(bin, 0);
}
private int binToDecRec(int bin, int i) {
if (bin == 0)
return 0;
return (int) (bin % 10 * Math.pow(2, i) + binToDecRec(bin / 10, i + 1));