Skip to content

{ Category Archives } General Programming

Remove Items While Iterating List In Java

Edit: Some (better) alternatives here and here Edit 2: @kattehus was awesome enough to compare the three methods. 1) my graveyard method, 2) Joe’s iterator method, and 3) Kattehus’ standard for-loop method. Go with the standard for-loop. I’ll leave the rest of my post so others can see one method of doing so, though it’s […]

Tagged , , , , ,


Using the following curl block I was getting an unexpected response from the server. 1 2 3 4 5 6 7 $ch = curl_init($post_url); curl_setopt( $ch, CURLOPT_POST, 1 ); curl_setopt( $ch, CURLOPT_POSTFIELDS, "orderXML=".$xmlRequest ); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 ); curl_setopt( $ch, CURLOPT_TIMEOUT, 3000 ); curl_setopt( $ch, CURLOPT_VERBOSE, 1 ); $xmlResponse = curl_exec( $ch ); Pretty […]

Tagged , , ,

Rise of the Video Game Zinesters

I’ve been reading Anna Anthropy‘s Rise of the Videogame Zinesters and I just came across what (to me) may be the most important message in the entire book. Perfection isn’t a useful goal; if anything, it keeps amateurs from getting their feet wet and authors from finishing their works. – Anna Anthropy. Rise of the […]

Tagged , ,

Serialize and Deserialize series of strings

Just a quick example of serializing and deserializing a series of strings. import; import; import; import java.util.Arrays; import java.util.LinkedList; import java.util.List; public class GEncode { String serialize(List strings) throws UnsupportedEncodingException { String serialized = “”; for (String s : strings) { serialized += URLEncoder.encode(s, “UTF-8”) + “&”; } return serialized; } @SuppressWarnings(“deprecation”) […]

Points and Line of Sight

A very minor update, barely worth mention. You’ll notice the entire wall segment is enclosed in the radius around the ‘player’, that yellow circle at the center. The significance here is that the top-left point of the wall segment isn’t included in the list of accessible nodes! Why not? Because, the player can’t see that […]

Tagged , ,