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
namespace ShitPost { | |
class Program { | |
static void Main(string[] args) { | |
StringBuilder builder = new StringBuilder(); | |
using (StreamReader sr = new StreamReader("D:\\bookmarks.html")) { | |
String line; | |
while ((line = sr.ReadLine()) != null) { | |
builder.AppendLine(line); | |
} |
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
http://imgur.com/jDejzWA |
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
echo off | |
set workDirs=Beheaded "Quantum Anomalies" SourceCodedCore Palettes MessingAbout | |
echo ..Working Dirs: | |
for /D %%i in (%workDirs%) do ( | |
echo .... %%i | |
) | |
echo. |
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 boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int meta, float xo, float yo, float zo) { | |
if (!world.isRemote) { | |
Block targetBlock = world.getBlock(x, y-1, z); | |
int targetMeta = world.getBlockMetadata(x, y-1, z); | |
if (targetBlock == null || targetBlock == Blocks.air) | |
targetBlock = Blocks.iron_block; | |
int order = 89; |
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
The overhead for injecting my own GuiFactories is fairly small. 1-2 methods tops, getting the private field and adding a value to the hashmap inside. This is done once, at runtime. | |
However, forge uses reflection to create a GuiConfig each time you hit the button. You pass it a class name, it will crawl the constructors and instantiate it itself. This is done in an Instanced method (IModGuiFactory), but expects a Static value (class name). Letting us pass an instance would be much, much more efficient, as well as being miles more flexible. |
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
# Number Guessing Game | |
# Binary Search method | |
# (go easy on me, I'm new with python) | |
def search(lowerBound, higherBound): | |
halfPoint = int((higherBound - lowerBound) / 2 + lowerBound) # Get the midpoint of the range, and translate it to the proper position (getting halfway) | |
print("Is your number: ", halfPoint) # Get the halfway point status from the player | |
result = input("") |
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 class Capture { | |
private static IntBuffer pixelBuffer; | |
private static int[] pixelValues; | |
public static int[] captureFrame() { | |
Minecraft mc = Minecraft.getMinecraft(); | |
int x = mc.displayWidth; |