This is code for a basic custom file upload button in HTML, CSS and JavaScript. See the full video tutorial here: https://youtu.be/T3PDgtliezo
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 numpy as np | |
from PIL import Image | |
def raycast_box_imgs(sphere_img, new_img_size, out_dir): | |
"""renders and saves all 6 sides of the skybox""" | |
rays = create_rays(new_img_size) | |
rotations = { | |
"ft": np.eye(3), | |
"lt": rot_y_mat(-.5 * np.pi), |
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 java.awt.Toolkit; | |
/* Example Project | |
OrbitCamera cam; | |
void settings() { | |
size(1200, 800, P3D); | |
smooth(); | |
} | |
void setup() { | |
cam = new OrbitCamera(); |
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 java.util.ArrayDeque; | |
import java.util.Queue; | |
import org.bukkit.Bukkit; | |
import org.bukkit.Location; | |
import org.bukkit.Material; | |
import org.bukkit.World; | |
import org.bukkit.block.Block; | |
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld; | |
import org.bukkit.material.MaterialData; |
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 static class BrightnessHelper | |
{ | |
public static void SetBrightness(uint brightness) | |
{ | |
if (brightness > 100) | |
{ | |
throw new ArgumentOutOfRangeException("brightness"); | |
} | |
// get handle to primary display |
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
# First lets import the two modules we'll need from Qt | |
from Qt import QtWidgets, QtCore | |
# Then we create our Window class, in this case from a QDialog | |
class MyWindow(QtWidgets.QDialog): | |
def __init__(self): | |
# We use the __init__ method to initialize it | |
# The super function gets the class we are inheriting from (in this case QDialog) and calls its' __init__ as well |
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 java.lang.reflect.Constructor; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
import org.bukkit.Bukkit; | |
import org.bukkit.Location; | |
import org.bukkit.util.Vector; | |
/** | |
* Small util to load and save structures<br> |
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 <stdio.h> | |
#include <mpi.h> | |
#include <algorithm> | |
#include <ctime> | |
#define GRN "\x1B[32m" | |
#define RESET "\x1B[0m" | |
#define CYN "\x1B[36m" | |
#define MASTER_RANK 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
package com.comphenix.example; | |
import static com.comphenix.protocol.PacketType.Play.Server.*; | |
import java.lang.reflect.InvocationTargetException; | |
import java.util.Arrays; | |
import java.util.Map; | |
import org.bukkit.entity.Entity; | |
import org.bukkit.entity.Player; |