Skip to content

Instantly share code, notes, and snippets.

{
"id": "https://raw.github.com/spidasoftware/schema/master/v1/spidacalc/point.schema",
"type": "object",
"description": "An object a certain distance and direction from the pole.",
"required": [ "id", "distance", "direction" ],
"properties": {
"id": {
"type": "string",
"description": "A display id for the object. Should be unique to the pole."
},
@fge
fge / Label.java
Created April 26, 2014 15:20
Sample annotation
/*
* Copyright (C) 2009-2011 Mathias Doenitz
*
* 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
package org.parboiled.transform.asm;
import com.google.common.base.Function;
import com.google.common.base.Joiner;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
package org.parboiled.matchers.join;
import org.parboiled.MatcherContext;
import org.parboiled.Rule;
import org.parboiled.errors.GrammarException;
/*
* A matcher which must match exactly n times. Note that n is >= 2 (otherwise
* the builder would have returned an empty matcher or the joined rule)
*/
@Override
@SuppressWarnings("unchecked")
public void pushAll(final V firstValue, final V... moreValues)
{
// FIXME: hackish :/ Can throw ClassCastException all right
if (firstValue instanceof Iterable
&& moreValues != null
&& moreValues.length == 0) {
pushAll((Iterable<V>) firstValue);
return;
package com.github.parboiled1.grappa.testparsers;
import org.parboiled.Rule;
public class RecursiveParser
extends TestParser<Object>
{
@Override
public Rule mainRule()
{
package com.github.parboiled1.grappa;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLClassLoader;
import java.nio.file.FileSystem;
import java.nio.file.FileSystems;
import java.nio.file.Files;
package com.wordnik.swagger.transform.util;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.github.fge.jackson.jsonpointer.JsonPointer;
import com.github.fge.jsonpatch.JsonPatch;
import com.wordnik.swagger.transform.migrate.SwaggerMigrator;
import com.google.common.base.Preconditions;
import com.google.common.collect.Iterables;
package com.github.fge;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.IntStream;
public final class DigitIntStream
{
// Note: no checking that "number" is >= 0 or base > 0
package com.github.fge;
import java.io.Closeable;
import java.io.IOException;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;