Skip to content

Instantly share code, notes, and snippets.

View fab1an's full-sized avatar

Fabian Zeindl fab1an

View GitHub Profile
@fab1an
fab1an / gist:7532478
Created November 18, 2013 18:08
Bug in GSON: DeserializationHandler changes Serialization of Abstract classes
import static org.junit.Assert.*;
import java.lang.reflect.Type;
import org.junit.Test;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
@fab1an
fab1an / enchantments.rb
Created March 11, 2012 16:48
Minecraft Enchantments simulator
DEBUG = false
ROUNDS = 100000
DUMP_FILE = "stats_enchantment.marshal"
# #
# #
# ##### DATA #
# #
# #
# Combos:
--- ../gl-1.8.0-source/extensions/swt/source/ca/odell/glazedlists/swt/EventTableViewer.java 2008-12-14 05:49:50.000000000 +0100
+++ gl-patches/patched/EventTableViewer.java 2009-10-11 20:55:26.000000000 +0200
@@ -231,7 +231,8 @@
* {@link TableFormat}. This method is not yet implemented for SWT.
*/
public void setTableFormat(TableFormat<E> tableFormat) {
- throw new UnsupportedOperationException();
+ this.tableFormat = tableFormat;
+ this.tableHandler.redraw();
}
import org.eclipse.swt.widgets.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.events.*;
import org.eclipse.swt.dnd.*;
import org.eclipse.swt.*;
public class TableListenerTest
{
public static void main(String[] args) {
new TableListenerTest();