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
$pleaseRotate = 0; | |
if ($file["type"] == "image/jpeg") { | |
$exif = exif_read_data($file["tmp_name"]); | |
if(!empty($exif['Orientation'])) { | |
switch($exif['Orientation']) { | |
case 8: | |
$pleaseRotate = 90; | |
break; | |
case 3: | |
$pleaserotate = 180; |
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
package org.shadebob.netcode.tools; | |
import java.util.BitSet; | |
/** | |
* Bit packer utility class | |
*/ | |
public class BitPacker { | |
private final static int MAX_SIZE = 32768; |
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
package org.shadebob.netcode.tools; | |
import java.util.BitSet; | |
/** | |
* Bit packer utility class | |
*/ | |
public class BitPacker { | |
private final static int MAX_SIZE = 32768; |
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
<?php | |
$xml = xml_parser_create(); | |
xml_parse_into_struct($xml, file_get_contents("export.xml"),$values,$indexes); | |
print '"Date/Time","Average","Minimum","Maximum"'."\r\n"; | |
foreach($values as $val) { | |
if (isset($val["attributes"]) == false) { | |
continue; |
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
// Initialize the ray handler | |
RayHandler.setGammaCorrection(true); | |
RayHandler.useDiffuseLight(true); | |
rayHandler = new RayHandler(world); | |
rayHandler.setAmbientLight(0.1f, 0.1f, 0.1f, 0.5f); | |
rayHandler.setBlurNum(15); | |
// Set the point light of the player at the center of the screen initially. with 320 pixels of range (radius) | |
playerLight = new PointLight(rayHandler, 100, new Color(1,1,1,1), 320, Gdx.graphics.getWidth()/2,Gdx.graphics.getHeight()/2); |
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
package org.shadebob.itsatrap.tools; | |
import com.badlogic.gdx.Gdx; | |
import com.badlogic.gdx.files.FileHandle; | |
import com.badlogic.gdx.utils.ObjectMap; | |
import com.badlogic.gdx.utils.OrderedMap; | |
/** | |
* A replacement class for ini4j, I don't like having too much dependencies. This class let you handle | |
* ini files. | |
* |
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 DuplicateHashMap<K,V> extends HashMap<K, Array<V>> { | |
public void put(K key, V value) { | |
Array<V> current = get(key); | |
if (current == null) { | |
current = new Array<V>(); | |
super.put(key, current); | |
} | |
current.add(value); | |
} |
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
final Matrix4 camera = stage.getCamera().combined; | |
Actor customActor = new Actor() { | |
@Override | |
public void draw (Batch batch, float parentAlpha) { | |
batch.end(); | |
shapeRenderer.setProjectionMatrix(camera); |