Skip to content

Instantly share code, notes, and snippets.

View jnorthrup's full-sized avatar

Jim Northrup jnorthrup

View GitHub Profile
@jnorthrup
jnorthrup / sieve.cpp
Created June 30, 2012 08:27
a sieve
#include <sstream>
#include <iostream>
#include <numeric>
#include <cmath>
#include <vector>
#include <list>
#include <iterator>
using namespace std;
/**
@jnorthrup
jnorthrup / ReflectXmlType.java
Created September 26, 2012 23:02
generator bad
package sample.app;
import com.google.gwt.core.ext.Generator;
import com.google.gwt.core.ext.GeneratorContext;
import com.google.gwt.core.ext.TreeLogger;
import com.google.gwt.core.ext.UnableToCompleteException;
import com.google.gwt.core.ext.typeinfo.*;
import com.google.gwt.editor.rebind.model.ModelUtils;
import com.google.gwt.user.rebind.ClassSourceFileComposerFactory;
package sample.app.client;
import com.google.gwt.core.client.GWT;
import com.harmonic.electra.skel.generated.CSDChassis;
public class ChassisBuilderImpl implements sample.app.client.XmlRead.ChassisBuilder {
public static interface GEN_ extends com.google.gwt.query.client.builders.XmlBuilder{
public com.harmonic.electra.skel.generated.CSDChassis.Config getConfig();
public void setConfig(com.harmonic.electra.skel.generated.CSDChassis.Config value);
public com.harmonic.electra.skel.generated.CSDChassis.Status getStatus();
/**
* might avoid growing heap, swapping heap, etc. and likely to constantly trigger gc in gwtc.
*/
static {
String wantHeadroom = System.getProperty("wantHeadroom","");
if(!wantHeadroom.isEmpty())
new Timer().scheduleAtFixedRate(new TimerTask() {
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jnorthrup
jnorthrup / gwt build errors post-dep
Created January 16, 2013 04:42
auto-mavenized the gwt tree, needing some assistance with the super-source nuances
Information:java: Errors occurred while compiling module 'gwt-dev_core'
Information:Compilation completed with 25 errors and 13 warnings in 10 sec
Information:25 errors
Information:13 warnings
/home/jim/work/gwtbuild/gwt/gwt-dev_core/src/main/java/com/google/gwt/dev/shell/CompilingClassLoader.java
Error:Error:line (18)java: package com.google.gwt.core.client does not exist
Error:Error:line (19)java: package com.google.gwt.core.client does not exist
Error:Error:line (559)java: cannot find symbol
symbol: class GwtScriptOnly
location: class com.google.gwt.dev.shell.CompilingClassLoader.MySingleJsoImplData
@jnorthrup
jnorthrup / gist:5039787
Created February 26, 2013 16:24
mavenized gwt tests in error
Results :
Failed tests: testModuleMerging(com.google.gwt.dev.cfg.ModuleDefLoaderTest)
testModuleNamingValid(com.google.gwt.dev.cfg.ModuleDefLoaderTest)
warning(junit.framework.TestSuite$1): Exception in constructor: testGenericMethodWithDependentTypeParameters (com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
warning(junit.framework.TestSuite$1): Exception in constructor: testFindNestedType (com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
warning(junit.framework.TestSuite$1): Exception in constructor: testGetEnclosingType (com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
warning(junit.framework.TestSuite$1): Exception in constructor: testGetInheritableMethods (com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
warning(junit.framework.TestSuite$1): Exception in constructor: testGetNestedType (com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
warning(jun
env = Environment(
toolpath=['../../scons-tools'],
tools=['cc', 'c++', 'ar', 'emscripten', 'llvm', 'closure'],
LLVM_ROOT='/home/jim/llvm32build/bin',
CLANG='clang',
CLANGXX='clang++',
LLVM_LINK='llvm-link',
LLVM_OPT='opt',
LLVM_DIS='llvm-dis',
EMSCRIPTEN_VERSION_FILE=File('build/version_file'),
@jnorthrup
jnorthrup / gist:6108847
Created July 29, 2013 23:35
my intellij alias for ubuntu 12-ish kubuntu
alias idea='( export JAVA_HOME=/opt/jdk/jre JDK_HOME=/opt/jdk _JAVA_AWT_WM_NONREPARENTING=1 AWT_TOOLKIT=MToolkit PATH=/opt/jdk/bin:$PATH ; /opt/idea/bin/idea.sh &disown )'
@jnorthrup
jnorthrup / ArraySet.java
Last active December 23, 2015 17:09
ArraySet
package arrayset;
import java.util.ArrayList;
import java.util.*;
import static java.util.Arrays.*;
/**
* java ArraySet
* <p/>