Skip to content

Instantly share code, notes, and snippets.

View carchrae's full-sized avatar
🌄
again

Tom Carchrae carchrae

🌄
again
View GitHub Profile
{
"results" : [
{
"address_components" : [
{
"long_name" : "Colorado",
"short_name" : "CO",
"types" : [ "administrative_area_level_1", "political" ]
},
{
class CreateLocations < ActiveRecord::Migration
def self.up
create_table :locations, :force => true do |t|
t.string :uuid
t.string :address
t.string :formatted_address
t.string :country
t.string :administrative_area_level_1
t.string :administrative_area_level_2
t.string :locality
{
"id": 66,
"uuid": "25a99516-a1a2-11e0-b7b8-78ca39fffe37",
"address": "boulder",
"formatted_address": "Boulder, CO, USA",
"country": "United States",
"administrative_area_level_1": "Colorado",
"administrative_area_level_2": "Boulder",
"locality": "Boulder",
"prefix": "/united_states/colorado/boulder/boulder",
/*
* Copyright 2011 JBoss, by Red Hat, Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
public static void writeStringToFile(final File file, final String data) {
try {
final OutputStream outputStream = new BufferedOutputStream(
new FileOutputStream(file, false));
outputStream.write(data.getBytes("UTF-8"));
outputStream.close();
} catch (IOException e) {
throw new RuntimeException("could not write file for debug cache", e);
}
INFO [Generator] not emitting server marshaller class
WARN [EnvUtil] reachability analysis disabled. errai may generate unnecessary code.
WARN [EnvUtil] enable reachability analysis with -Derrai.compile.perf.perform_reachability_analysis=true
INFO [MarshallerGeneratorFactory] generating marshalling class...
INFO [MarshallerGeneratorFactory] generated marshalling class in 520ms.
INFO [IOCBootstrapGenerator] generating IOC bootstrapping class...
WARN [EnvUtil] reachability analysis disabled. errai may generate unnecessary code.
WARN [EnvUtil] enable reachability analysis with -Derrai.compile.perf.perform_reachability_analysis=true
6-Dec-2012 12:39:20 PM org.jboss.errai.ui.rebind.DecoratorTemplated getHandlerForEvent
INFO: eventType: class org.jboss.errai.codegen.meta.impl.gwt.GWTClass -- com.google.gwt.event.dom.client.ClickEvent
// If internalDirectBind was not able to bind it, it returns a special variable instance: DIRECTBIND_MISSING
// Needs this because sometimes we need to know if no value was returned..
private static Object internalDirectBind(String name, Annotation[] annotations, String value, Class<?> clazz, Type type) throws Exception {
try {
boolean nullOrEmpty = value == null || value.trim().length() == 0;
if (annotations != null) {
for (Annotation annotation : annotations) {
@carchrae
carchrae / FilteredListDataProvider.java
Created December 17, 2012 00:03 — forked from anonymous/FilteredListDataProvider.java
A filterable ListDataProvider that takes another ListDataProvider for it's source. Handy if you want, say, a CellTable that has a Filter text box. Note that for very large data sets you probably don't want to use this, since it creates a copy of the data each time it applies the filter.
import java.util.List;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.gwt.view.client.HasData;
import com.google.gwt.view.client.ListDataProvider;
public class FilteredListDataProvider<T> extends ListDataProvider<T> {
import org.springframework.security.authentication.encoding.Md5PasswordEncoder;
public class CustomMd5PasswordEncoder extends Md5PasswordEncoder {
@Override
protected String mergePasswordAndSalt(String password, Object salt,
boolean strict) {
if (password == null) {
password = "";
}
03:09:02 PM - atomatom: is it possible to: a) watch a directory of files to determine if a generator should be re-run (eg, say a generator that includes all files in a directory) or b) force it to re-generate the Impl code each time?
03:10:34 PM - icfantv has left the room (Quit: Leaving.).
03:11:28 PM - stefan_ [~stefan@89.204.155.184] entered the room.
03:13:25 PM - Twiner [~Twiner@c-75-68-119-219.hsd1.nh.comcast.net] entered the room.
03:20:37 PM - xjrn: if intellij is any lesson, the file-watcher is platform specific
03:21:19 PM - xjrn: but then roo seems to do what you're saying without an exe
03:21:29 PM - xjrn: with glitches
03:27:44 PM - atomatom: thanks xjrn - yeah, i'm thinking being too automatic is going to get frustrating
03:29:36 PM - xjrn: once roo derails, it stays down
03:31:10 PM - atomatom: btw, i'm not using roo/intellij, just eclipse + gwt's incremental compilation