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
/* | |
* Copyright (c) 2009-2012 jMonkeyEngine | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are | |
* met: | |
* | |
* * Redistributions of source code must retain the above copyright | |
* notice, this list of conditions and the following disclaimer. |
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.Field; | |
import java.lang.reflect.Modifier; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.Map.Entry; | |
public class TestFieldHandling { | |
private int Field1; | |
private String Field2; |
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.text.DateFormat; | |
import java.util.Date; | |
import java.util.concurrent.TimeUnit; | |
/** | |
* <p>This Class provides Some Funktionality around Working with Timestamps, it provides the Funktionality to convert Timestamps into human readable Date Formats and it provides a Funktionality for accuracy.</p> | |
* <p>Human readable Date Formats mean, that after you made a timestamp with Constructor or by setting them you can get a "DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT)" formatted Date back. (that means something like "27.08.2014 13:37" in Germany. | |
* you can also change it by using: setDateFormat() </p> | |
* <p>Accuracy is something special, this means, that the internal Value is saved in the currency Accuracy gives</p> | |
* <p> for Example: <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
import java.util.Arrays; | |
import java.util.Random; | |
/** | |
* I'm not the Author of this Implementation, I just capsuled it the way i want it. Should I ever find him/her I will put them in here | |
* | |
* Perlin Noise is Noise Generator by Ken Perlin. | |
* @author <unknown>,sythelux, origin: Ken Perlin | |
*/ | |
public class PerlinNoise { |
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 com.sun.management.OperatingSystemMXBean;//TODO: package could be removed in future relaeses | |
import java.io.File; | |
import java.lang.management.ManagementFactory; | |
//import java.lang.management.OperatingSystemMXBean; | |
import java.text.DecimalFormat; | |
import java.util.concurrent.TimeUnit; | |
import org.apache.log4j.Logger; | |
import org.apache.log4j.xml.DOMConfigurator; | |
/** |
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.BorderLayout; | |
import java.awt.Dimension; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import java.sql.Date; | |
import java.text.SimpleDateFormat; | |
import java.util.logging.Formatter; | |
import java.util.logging.Handler; | |
import java.util.logging.LogRecord; | |
import java.util.logging.Logger; |
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.Color; | |
import java.awt.image.BufferedImage; | |
import java.io.File; | |
import java.io.IOException; | |
import javax.imageio.ImageIO; | |
public class WhiteToTransparent { | |
public static void main(String[] args) { | |
if (args.length < 2) { |
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 void main(String[] args) { | |
int[] oldArray = new int[]{5, 6, | |
8, 4}; | |
int[] newArray = new int[(int) Math.pow(2, 16)]; | |
int halfNewLength = newArray.length / 2; | |
int rootNewLength = (int) Math.sqrt(newArray.length); | |
int rootHalfNewLength = rootNewLength / 2; | |
System.out.printf("%1$2d %2$2d %3$2d %4$2d\n",newArray.length,halfNewLength,rootNewLength,rootHalfNewLength); | |
for (int i = 0; i < halfNewLength; i+=rootNewLength) { | |
for (int j = 0; j < halfNewLength; j++) { |
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
/****************************** | |
* | |
* Example "Square" | |
* created by Syd | |
* | |
*******************************/ | |
#include <GL/glew.h> | |
#include <GLFW/glfw3.h> | |
#include <cstdlib> |
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
/** | |
* verticies Test,C++,OpenGL | |
* I have no rights on this ~Syd | |
*/ | |
typedef struct { | |
GLfloat x, y, z; | |
GLfloat r, g, b; | |
} Vertex; | |
const Vertex vertices[48] = { |
OlderNewer