text:
layout: post
title: Static
date: 2017-09-23 22:19:41
---

Nothing going on, and a wall of silence has come.
Still unsure what to do, or how to proceed.
If we're reading into things, it feels like lots of lies by omission, which is defensible in one regard, but also the intent is to deceive which is slightly worrying.
It also might just signify a lack of trust mostly since we haven't gotten there yet.
It's also lies due to fear or malicious intent, and maybe that makes things less egregious.

In my mind, it's boiled down into two main branches of possibility.

That my feelings are bad news, and that it's an exasperation that I've held onto feelings for 5 years. That in that timeframe means it seems like they'll never be gone, and that just makes friendship much more difficult to accomplish.

That my feelings are good, but that it's my only asking for friendship that might be problematic. That she actually somehow started liking you. Maybe it was really recent, or maybe it was the Seattle trip, or even the junior year you spent so much time with her. Or before that when things were too confusing. The main thing is just that she won't say anything. Won't reveal anything about herself, and it's that silence that is bothering me. And just the strangely excited excitement in Seattle, which was nice, but a little out of character.

On my side of the wall, there is fear. That my own track record is pretty awful and might end up doing terribly with this. That I would hurt her and we would never be friends again. I think that might just be the worst outcome. And the other large thing is just the belief that we could never be more, that she could never possibly like you, and any hints dropped weren't large enough to break that idea.

And then once that is understood, there's so so so much more to figure out. Any kind of feelings can only help out, but will not by themselves, sort out all of the issues that will exist.

Hopefully, everything will work out for the best, and that to try is the resolution.


text:
for file in job_files/wrappers/wrappers_job*
do
  sbatch "$file"
done

redpajama_set_name: RedPajamaGithub


text:
package org.apache.shardingsphere.proxy.backend.text.distsql.rql;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.apache.shardingsphere.distsql.parser.statement.rql.RQLStatement;
import org.apache.shardingsphere.infra.distsql.query.DistSQLResultSet;
import org.apache.shardingsphere.proxy.backend.session.ConnectionSession;
import org.apache.shardingsphere.proxy.backend.text.TextProtocolBackendHandler;
import org.apache.shardingsphere.spi.ShardingSphereServiceLoader;
import org.apache.shardingsphere.spi.typed.TypedSPIRegistry;

import java.util.Properties;

/**
 * RQL backend handler factory.
 */
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class RQLBackendHandlerFactory {

    static {
        ShardingSphereServiceLoader.register(DistSQLResultSet.class);
    }

    /**
     * Create new instance of RDL backend handler.
     *
     * @param sqlStatement RQL statement
     * @param connectionSession connection session
     * @return RDL backend handler
     */
    public static TextProtocolBackendHandler newInstance(final RQLStatement sqlStatement, final ConnectionSession connectionSession) {
        DistSQLResultSet resultSet = TypedSPIRegistry.getRegisteredService(DistSQLResultSet.class, sqlStatement.getClass().getCanonicalName(), new Properties());
        return new RQLBackendHandler(sqlStatement, connectionSession, resultSet);
    }
}


text:
package org.corundummc.entities.nonliving.drops;

import org.corundummc.blocks.Block;
import org.corundummc.entities.Entity;
import org.corundummc.entities.living.LivingEntity;
import org.corundummc.entities.nonliving.NonLivingEntity;
import org.corundummc.entities.nonliving.drops.DroppedItem.DroppedItemType;
import org.corundummc.entities.nonliving.drops.XPOrb.XPOrbType;

/** This class is used to represent the {@link Entity Entities} that can be dropped, e.g. by {@link Block}s when destroyed or by {@link LivingEntity LivingEntities} when
 * killed.
 *
 * @param <S>
 *            is a self-parameterization; this type should be the same type as this class.
 * @param <MC>
 *            determines the type of Minecraft Entity <tt>Object</tt> that this class represents.
 * @param <T>
 *            determines the type of {@link EntityType} that represents the type of this class. */
public abstract class Drop<S extends Drop<S, MC, T>, MC extends net.minecraft.entity.Entity, T extends Drop.DropType<T, MC, S>> extends NonLivingEntity<S, MC, T> {
    protected Drop(MC entityMC) {
        super(entityMC);
    }

    public static interface DropTypes {
        public static final DroppedItemType DROPPED_ITEM = DroppedItemType.TYPE;
        public static final XPOrbType XP_ORB = XPOrbType.TYPE;
    }

    public abstract static class DropType<S extends DropType<S, MC, I>, MC extends net.minecraft.entity.Entity, I extends Drop<I, MC, S>> extends
            NonLivingEntityType<S, MC, I> {
        protected DropType(int id) {
            super(id);

            addValueAs(DropType.class);
        }

        // abstract utilities

        // overridden utilities

        // pseudo-enum utilities
        @SuppressWarnings("rawtypes")
        public static DropType getByID(int id) {
            return getByID(DropType.class, id);
        }

        @SuppressWarnings("rawtypes")
        public static DropType getByID(int id, int data) {
            return getByID(DropType.class, id, data);
        }

        @SuppressWarnings("rawtypes")
        public static DropType[] values() {
            return values(DropType.class);
        }
    }

    // type utilities

    // instance utilities
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Modern Business - Start Bootstrap Template</title>

    <link href="css/bootstrap.min.css" rel="stylesheet">

    <link href="css/modern-business.css" rel="stylesheet">

    <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    Toggle navigation

                </button>
                Home

                        About

                        Projects

                         Explore

                                3D Scans

                                Photos

                        Tutorials

                                FAQ

                                Sign Up

                        Contact

Heritage Database
                    3D Models

Home

3D Scans

    Antique Embosser
    by Santa Cruz Museum of Art and History
    on Sketchfab

             Antique Embosser

    Doctor's Bag
    by Santa Cruz Museum of Art and History
    on Sketchfab

               Doctor's Bag

    Boxing Glove
    by Santa Cruz Museum of Art and History
    on Sketchfab

                  Boxing Glove

    Miss America Corn Flakes Box
    by Santa Cruz Museum of Art and History
    on Sketchfab

                  Corn Flake Box

    WWI Handkerchief
    by Santa Cruz Museum of Art and History
    on Sketchfab

                    World War 1 Handkerchief

    Swimming Suit Box
    by Santa Cruz Museum of Art and History
    on Sketchfab

                   Swimming Suit Box

                        «

                        1

                        2

                        3

                        4

                        5

                        »

Copyright © Your Website 2014


text:
//
//  ThreadPool.hpp
//  threadPool
//
//  Created by 仙女 on 17/4/21.
//  Copyright © 2017年 仙女. All rights reserved.
//

#ifndef ThreadPool_hpp
#define ThreadPool_hpp

#include <stdio.h>
#include <functional>
#include <vector>
#include <queue>
#include <pthread.h>

typedef std::function<void()> Task;
class ThreadPool
{
public:
    ThreadPool(int threadnum);
    ~ThreadPool();
    void createpool();
    void addfunction(const Task& task) ;
    Task takeTaskFromQueue();
private:
    int threadnum_;
    std::queue<Task> Task_queue;
    pthread_t* threads;
    pthread_mutex_t mutex;
    pthread_cond_t  cond;

};
#endif /* ThreadPool_hpp */


text:
package docker2aci

import (
	"fmt"
	"hash"
	"io"
	"io/ioutil"
	"os"

	"github.com/appc/spec/aci"
	"github.com/appc/spec/schema"
	"github.com/appc/spec/schema/types"
)

const (
	hashPrefix = "sha512-"
)

type aciInfo struct {
	path          string
	key           string
	ImageManifest *schema.ImageManifest
}

// ConversionStore is an simple implementation of the acirenderer.ACIRegistry
// interface. It stores the Docker layers converted to ACI so we can take
// advantage of acirenderer to generate a squashed ACI Image.
type ConversionStore struct {
	acis map[string]*aciInfo
}

func NewConversionStore() *ConversionStore {
	return &ConversionStore{acis: make(map[string]*aciInfo)}
}

func (ms *ConversionStore) WriteACI(path string) (string, error) {
	data, err := ioutil.ReadFile(path)
	if err != nil {
		return "", err
	}

	f, err := os.Open(path)
	if err != nil {
		return "", err
	}
	defer f.Close()

	imageID := types.NewHashSHA512(data)

	im, err := aci.ManifestFromImage(f)
	if err != nil {
		return "", err
	}

	key := imageID.String()
	ms.acis[key] = &aciInfo{path: path, key: key, ImageManifest: im}
	return key, nil
}

func (ms *ConversionStore) GetImageManifest(key string) (*schema.ImageManifest, error) {
	aci, ok := ms.acis[key]
	if !ok {
		return nil, fmt.Errorf("aci with key: %s not found", key)
	}
	return aci.ImageManifest, nil
}

func (ms *ConversionStore) GetACI(name types.ACName, labels types.Labels) (string, error) {
	for _, aci := range ms.acis {
		// we implement this function to comply with the interface so don't
		// bother implementing a proper label check
		if aci.ImageManifest.Name.String() == name.String() {
			return aci.key, nil
		}
	}
	return "", fmt.Errorf("aci not found")
}

func (ms *ConversionStore) ReadStream(key string) (io.ReadCloser, error) {
	aci, ok := ms.acis[key]
	if !ok {
		return nil, fmt.Errorf("stream for key: %s not found", key)
	}
	f, err := os.Open(aci.path)
	if err != nil {
		return nil, fmt.Errorf("error opening aci: %s", aci.path)
	}

	return f, nil
}

func (ms *ConversionStore) ResolveKey(key string) (string, error) {
	return key, nil
}

func (ms *ConversionStore) HashToKey(h hash.Hash) string {
	s := h.Sum(nil)
	return fmt.Sprintf("%s%x", hashPrefix, s)
}


text:
include "_head.html"

include "_header.html"

	include "_mobile_menu.html"

Etcétera

				<select name="tabs" id="columnist-filter" class="selectpicker">
					<option value="tab1">Buscar por nombre de columnista</option>
					<option value="tab2">Nombres de columnista 1</option>
					<option value="tab3">Nombres de columnista 2</option>
					<option value="tab2">Nombres de columnista 3</option>
					<option value="tab3">Nombres de columnista 4</option>
					<option value="tab2">Nombres de columnista 5</option>
					<option value="tab3">Nombres de columnista 6</option>
				</select>

Crítica literaria

Cerebro y Conducta

Ricardo Vásquez Bernal

02 mayo - 11:10 am

						Guardar
						Compartir

Los códigos de ética, códigos de buen gobierno, códigos disciplinarios y manuales de procedimientos no son más que eso –protocolos–, si no se convierten en pilares de la cultura organizacional.

Verbo y gracia

Cerebro y Conducta

Ricardo Vásquez Bernal

02 mayo - 11:10 am

						Guardar
						Compartir

Los códigos de ética, códigos de buen gobierno, códigos disciplinarios y manuales de procedimientos no son más que eso –protocolos–, si no se convierten en pilares de la cultura organizacional.

Estado del arte

Cerebro y Conducta

Ricardo Vásquez Bernal

02 mayo - 11:10 am

						Guardar
						Compartir

Los códigos de ética, códigos de buen gobierno, códigos disciplinarios y manuales de procedimientos no son más que eso –protocolos–, si no se convierten en pilares de la cultura organizacional.

Estado del arte

Cerebro y Conducta

Ricardo Vásquez Bernal

02 mayo - 11:10 am

						Guardar
						Compartir

Los códigos de ética, códigos de buen gobierno, códigos disciplinarios y manuales de procedimientos no son más que eso –protocolos–, si no se convierten en pilares de la cultura organizacional.

Debates constitucionales

Cerebro y Conducta

Ricardo Vásquez Bernal

02 mayo - 11:10 am

						Guardar
						Compartir

Los códigos de ética, códigos de buen gobierno, códigos disciplinarios y manuales de procedimientos no son más que eso –protocolos–, si no se convierten en pilares de la cultura organizacional.

Crítica literaria

Cerebro y Conducta

Ricardo Vásquez Bernal

02 mayo - 11:10 am

						Guardar
						Compartir

Los códigos de ética, códigos de buen gobierno, códigos disciplinarios y manuales de procedimientos no son más que eso –protocolos–, si no se convierten en pilares de la cultura organizacional.

Crítica literaria

Cerebro y Conducta

Ricardo Vásquez Bernal

02 mayo - 11:10 am

						Guardar
						Compartir

Los códigos de ética, códigos de buen gobierno, códigos disciplinarios y manuales de procedimientos no son más que eso –protocolos–, si no se convierten en pilares de la cultura organizacional.

Crítica literaria

Cerebro y Conducta

Ricardo Vásquez Bernal

02 mayo - 11:10 am

						Guardar
						Compartir

Los códigos de ética, códigos de buen gobierno, códigos disciplinarios y manuales de procedimientos no son más que eso –protocolos–, si no se convierten en pilares de la cultura organizacional.

Crítica literaria

Cerebro y Conducta

Ricardo Vásquez Bernal

02 mayo - 11:10 am

						Guardar
						Compartir

Los códigos de ética, códigos de buen gobierno, códigos disciplinarios y manuales de procedimientos no son más que eso –protocolos–, si no se convierten en pilares de la cultura organizacional.

Crítica literaria

Cerebro y Conducta

Ricardo Vásquez Bernal

02 mayo - 11:10 am

						Guardar
						Compartir

Los códigos de ética, códigos de buen gobierno, códigos disciplinarios y manuales de procedimientos no son más que eso –protocolos–, si no se convierten en pilares de la cultura organizacional.

Crítica literaria

Cerebro y Conducta

Ricardo Vásquez Bernal

02 mayo - 11:10 am

						Guardar
						Compartir

Los códigos de ética, códigos de buen gobierno, códigos disciplinarios y manuales de procedimientos no son más que eso –protocolos–, si no se convierten en pilares de la cultura organizacional.

Crítica literaria

Cerebro y Conducta

Ricardo Vásquez Bernal

02 mayo - 11:10 am

						Guardar
						Compartir

Los códigos de ética, códigos de buen gobierno, códigos disciplinarios y manuales de procedimientos no son más que eso –protocolos–, si no se convierten en pilares de la cultura organizacional.

Crítica literaria

Cerebro y Conducta

Ricardo Vásquez Bernal

02 mayo - 11:10 am

						Guardar
						Compartir

Los códigos de ética, códigos de buen gobierno, códigos disciplinarios y manuales de procedimientos no son más que eso –protocolos–, si no se convierten en pilares de la cultura organizacional.

				Mostrar más columnas etcétera

				Las opiniones de colaboradores y columnistas, como las expresadas en cualquier texto firmado, solo comprometen a sus autores.
				Este periódico respetará siempre, de manera escrupulosa, el derecho a las rectificaciones, lo mismo que el derecho a contradecir, aclarar o complementar opiniones o noticias publicadas en sus páginas.

include "_footer.html"

include "_scripts.html"

include "_close_tags.html"


text:
package org.apache.isis.viewer.wicket.ui;

import java.io.Serializable;

import org.apache.wicket.Component;
import org.apache.wicket.model.IModel;
import org.apache.wicket.request.resource.CssResourceReference;

import org.apache.isis.viewer.wicket.ui.app.registry.ComponentFactoryRegistry;

/**
 * Creates {@link Component}s of a specified {@link ComponentType}, optionally
 * {@link #appliesTo(ComponentType, IModel) dependent on} the provided
 * {@link IModel model}.
 *
 * <p>
 * This interface is at the very heart of the Wicket Objects' model, being an
 * usage of the chain-of-responsibility design pattern. The available
 * {@link ComponentFactory}s are registered through
 * {@link ComponentFactoryRegistry} (bootstrapped from the
 * <tt>IsisWicketApplication</tt>); various adapters make it easy to lookup
 * {@link Component}s from this registry.
 */
public interface ComponentFactory extends Serializable {

    /**
     * The {@link ComponentType} with which this component factory has been
     * registered.
     */
    ComponentType getComponentType();

    public enum ApplicationAdvice {
        APPLIES(true, false),
        APPLIES_EXCLUSIVELY(true, true),
        DOES_NOT_APPLY(false, false);
        private final boolean applies;
        private final boolean exclusively;

        private ApplicationAdvice(final boolean applies, final boolean exclusively) {
            this.applies = applies;
            this.exclusively = exclusively;
        }

        public boolean applies() {
            return applies;
        }

        /**
         * Whether no other {@link ComponentFactory}s should apply (ie stop
         * searching for other views).
         */
        public boolean exclusively() {
            return exclusively;
        }

        public static final ApplicationAdvice appliesIf(final boolean b) {
            return b ? ApplicationAdvice.APPLIES : ApplicationAdvice.DOES_NOT_APPLY;
        }
    }

    /**
     * Whether the {@link Component} created by this factory applies to the
     * specified {@link ComponentType} and {@link IModel}.
     */
    ApplicationAdvice appliesTo(ComponentType componentType, IModel<?> model);

    /**
     * Creates component, with id being derived from the
     * {@link #getComponentType() component type} for this factory.
     *
     * @param model
     * @return
     */
    Component createComponent(IModel<?> model);

    /**
     * Creates component, with specified id.
     */
    Component createComponent(String id, IModel<?> model);

    /**
     * Used for rendering in drop-downs.
     */
    String getName();

    CssResourceReference getCssResourceReference();

}


text:
@class DVTObservingToken, DVTStackBacktrace, DVTViewController, DVTWeakInterposer, NSString, NSWindow;

@interface _DVTMainViewControllerMonitor : NSObject <DVTInvalidation>
{
    DVTWeakInterposer *_window_dvtWeakInterposer;
    DVTObservingToken *_firstResponderObservingToken;
    DVTObservingToken *_mainViewControllerIsValidObservingToken;
    DVTViewController *_mainViewController;
}

+ (void)initialize;
- (void).cxx_destruct;
- (void)primitiveInvalidate;
@property(retain) DVTViewController *mainViewController;
- (id)initWithWindow:(id)arg1;
@property __weak NSWindow *window;

// Remaining properties
@property(retain) DVTStackBacktrace *creationBacktrace;
@property(readonly, copy) NSString *debugDescription;
@property(readonly, copy) NSString *description;
@property(readonly) unsigned long long hash;
@property(readonly) DVTStackBacktrace *invalidationBacktrace;
@property(readonly) Class superclass;
@property(readonly, nonatomic, getter=isValid) BOOL valid;

@end


text:
'use strict'

const lab = exports.lab = require('lab').script()
const describe = lab.experiment
const before = lab.before
const after = lab.after
const it = lab.it
const expect = require('code').expect

const async = require('async')
const Memdown = require('memdown')
const leftPad = require('left-pad')

const Node = require('../')

const A_BIT = 4000

describe('log compaction', () => {
  let nodes, follower, leader, leveldown
  const nodeAddresses = [
    '/ip4/127.0.0.1/tcp/9490',
    '/ip4/127.0.0.1/tcp/9491',
    '/ip4/127.0.0.1/tcp/9492'
  ]
  const newNodeAddress = '/ip4/127.0.0.1/tcp/9493'

  before(done => {
    nodes = nodeAddresses.map((address, index) =>
      Node(address, {
        db: Memdown,
        minLogRetention: 10,
        peers: nodeAddresses.filter(addr => addr !== address).concat(newNodeAddress)
      }))
    done()
  })

  before(done => {
    async.each(nodes, (node, cb) => node.start(cb), done)
  })

  before({timeout: 5000}, done => setTimeout(done, A_BIT))

  before(done => {
    leader = nodes.find(node => node.is('leader'))
    follower = nodes.find(node => node.is('follower'))
    expect(follower).to.not.be.undefined()
    expect(leader).to.not.be.undefined()
    expect(leader === follower).to.not.be.true()
    leveldown = leader.leveldown()
    done()
  })

  it ('can insert 30 items', {timeout: 10000}, done => {
    const items = []
    for(var i = 0 ; i < 30 ; i++) {
      items.push(leftPad(i.toString(), 3, '0'))
    }
    async.each(items, (item, cb) => {
      leveldown.put(item, item, cb)
    },
    done)
  })

  it ('log length was capped', done => {
    expect(leader.logEntries().length).to.equal(10)
    done()
  })

  it('waits a bit', {timeout: 5000}, done => setTimeout(done, A_BIT))

  describe ('node that is late to the party', () => {
    let newNode

    before(done => {
      newNode = Node(newNodeAddress, {
        db: Memdown,
        minLogRetention: 10,
        peers: nodeAddresses
      })
      newNode.start(done)
    })

    after(done => {
      async.each(nodes.concat(newNode), (node, cb) => node.stop(cb), done)
    })

    before({timeout: 5000}, done => setTimeout(done, A_BIT))

    it('waits a bit', {timeout: 5000}, done => setTimeout(done, A_BIT))

    it('catches up', done => {
      let nextEntry = 0
      newNode._db.state.createReadStream()
        .on('data', (entry) => {
          const expectedKey = leftPad(nextEntry, 3, '0')
          expect(entry.key).to.equal(expectedKey)
          nextEntry ++
        })
        .once('end', () => {
          expect(nextEntry).to.equal(30)
          done()
        })
    })

    it('accepts more entries', {timeout: 10000}, done => {
      leader = nodes.concat(newNode).find(node => node.is('leader'))
      leveldown = leader.leveldown()

      const items = []
      for(var i = 30 ; i < 60 ; i++) {
        items.push(leftPad(i.toString(), 3, '0'))
      }
      async.each(items, (item, cb) => {
        leveldown.put(item, item, cb)
      },
      done)
    })

    it('waits a bit', {timeout: 5000}, done => setTimeout(done, A_BIT))

    it('new node catches up', done => {
      let nextEntry = 0
      newNode._db.state.createReadStream()
        .on('data', (entry) => {
          const expectedKey = leftPad(nextEntry, 3, '0')
          expect(entry.key).to.equal(expectedKey)
          nextEntry ++
        })
        .once('end', () => {
          expect(nextEntry).to.equal(60)
          done()
        })
    })
  })
})


text:
package main

import (
	"bytes"
	"fmt"
	"utils"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/service/s3"
)

func main() {
	// Load config.yaml
	config := utils.LoadConfig()

	// Get S3 client to server
	s3client, err := utils.GetS3Client(config)
	utils.Check(err)

	// Read key and content
	reader := utils.NewInputReader()
	key := reader.GetInputStr("Enter the object key:")

	// Get bucket name from config
	bucket := config.GetString("s3.demo_bucket_name")
	// Get Object
	resp, err := s3client.GetObject(
		&s3.GetObjectInput{
			Bucket: aws.String(bucket),
			Key:    aws.String(key),
		})
	utils.Check(err)

	// Read body in response
	buf := new(bytes.Buffer)
	buf.ReadFrom(resp.Body)

	fmt.Printf("Metadata for [%s/%s]\n", bucket, key)
	for k, v := range resp.Metadata {
		fmt.Printf("    %s = %s\n", k, *v)
	}
}


text:
#ifndef H_CH_CORE_COMPILER_H
#define H_CH_CORE_COMPILER_H
#include "ch/core/platform.h"

/**
 * \addtogroup Core
 * @{
 */

#ifdef __cplusplus
extern "C" {
#endif

/* clang: gcc mode */
#if defined(__clang__) && defined(__GNUC__)
#define CH_COMPILER_CLANG 1
#define CH_COMPILER_GCC 1
/* clang: cl mode */
#elif defined(__clang__) && defined(_MSC_VER)
#define CH_COMPILER_CLANG 1
#define CH_COMPILER_MSVC 1
/* gcc */
#elif defined(__GNUC__)
#define CH_COMPILER_GCC 1
/* msvc */
#elif defined(_MSC_VER)
#define CH_COMPILER_MSVC 1
/* mingw */
#elif defined(__MINGW32__)
#define CH_COMPILER_MINGW 1
/* TODO we should drop support for XP soon
 * change this to 0x0601 */
#ifndef WINVER
#define WINVER 0x0501
#endif
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif
#include <_mingw.h>
#if defined(__MINGW64_VERSION_MAJOR)
#define CH_COMPILER_MINGW64 1
#endif
/* unsupported */
#else
#error Unknown Compiler
#endif

#ifndef __has_feature
#define __has_feature(x) 0
#endif

#ifndef __has_extension
#define __has_extension(x) 0
#endif

#ifndef __has_attribute
#define __has_attribute(x) 0
#endif

#ifndef __has_builtin
#define __has_builtin(x) 0
#endif

#if defined(__clang_major__) && defined(__clang_minor__) &&                    \
    defined(__clang_patchlevel__)
#define CH_CLANG_PREREQ(maj, min, patch)                                       \
  ((__clang_major__ << 20) + (__clang_minor__ << 10) + __clang_patchlevel__ >= \
   ((maj) << 20) + ((min) << 10) + (patch))
#elif defined(__clang_major__) && defined(__clang_minor__)
#define CH_CLANG_PREREQ(maj, min, patch)                                       \
  ((__clang_major__ << 20) + (__clang_minor__ << 10) >=                        \
   ((maj) << 20) + ((min) << 10) + (patch))
#else
#define CH_CLANG_PREREQ(maj, min, patch) 0
#endif

#if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)
#define CH_GNUC_PREREQ(maj, min, patch)                                        \
  ((__GNUC__ << 20) + (__GNUC_MINOR__ << 10) + __GNUC_PATCHLEVEL__ >=          \
   ((maj) << 20) + ((min) << 10) + (patch))
#elif defined(__GNUC__) && defined(__GNUC_MINOR__)
#define CH_GNUC_PREREQ(maj, min, patch)                                        \
  ((__GNUC__ << 20) + (__GNUC_MINOR__ << 10) >= ((maj) << 20) + ((min) << 10))
#else
#define CH_GNUC_PREREQ(maj, min, patch) 0
#endif

/* MSVC version
 * VS 200x  ---  MSV_VER --- MSVC++
 * VS 2015        1900       13.0
 * VS 2013        1800       12.0
 * VS 2012        1700       11.0
 * VS 2010        1600       10.0
 * VS 2008        1500        9.0
 */
#ifdef _MSC_VER
#define CH_MSC_PREREQ(version) (_MSC_VER >= (version))
#else
#define CH_MSC_PREREQ(version) 0
#endif

#if defined(__STDC_VERSION__) || !defined(__cplusplus)
#if __STDC_VERSION__ >= 201112L
#define CH_C11_MODE 1
#endif
#endif

#if defined(__cplusplus)
/* c++11 detect */
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__) ||           \
    CH_MSC_PREREQ(1800)
#define CH_CXX11_MODE 1
/* according to
 * http://blogs.msdn.com/b/vcblog/archive/2014/11/17/c-11-14-17-features-in-vs-2015-preview.aspx
 * msvc 1900 is still missing c++1 features
 */
#if CH_GNUC_PREREQ(4, 8, 1) || CH_CLANG_PREREQ(3, 3, 0)
#define CH_CXX11_COMPLETE 1
#endif
#endif
/* c++14 detect */
#if __cplusplus >= 201402L || defined(__GXX_EXPERIMENTAL_CXX1Y__) ||           \
    CH_MSC_PREREQ(1900)
#define CH_CXX14_MODE 1
#if CH_GNUC_PREREQ(5, 1, 0) || CH_CLANG_PREREQ(3, 4, 0)
#define CH_CXX14_COMPLETE 1
#endif
#endif
#endif /* __cplusplus */

#if defined(CH_COMPILER_MSVC)
#define CH_ALIGNOF(type) __alignof(type)
#elif defined(CH_COMPILER_GCC)
#define CH_ALIGNOF(type) __alignof__(type)
#endif

#if __has_feature(c_atomic) ||                                                 \
    (defined(CH_C11_MODE) && !defined(__STDC_NO_ATOMICS__))
#define CH_HAS_C11_ATOMIC 1
#endif

#if defined(CH_CXX11_COMPLETE) &&                                              \
    (CH_GNUC_PREREQ(4, 4, 0) && CH_CLANG_PREREQ(3, 2, 0) &&                    \
     CH_MSC_PREREQ(1700))
#define CH_HAS_CXX11_ATOMIC 1
#endif

#ifdef CH_CXX11_MODE
#if defined(CH_COMPILER_CLANG)
#define CH_HAS_CXX11_ALIGNAS (__has_feature(cxx_alignas))
#elif CH_GNUC_PREREQ(4, 8, 0) || CH_MSC_PREREQ(1900)
#define CH_HAS_CXX11_ALIGNAS 1
#endif
#endif

#if defined(CH_HAS_CXX11_ALIGNAS)
#define CH_ALIGNED(n) alignas(n)
#elif (__has_attribute(aligned)) ||                                            \
    (defined(CH_COMPILER_GCC) && !defined(CH_COMPILER_CLANG))
/* the bug local variables are not correctly aligned is fixed on gcc 4.6
 * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16660 */
#define CH_ALIGNED(n) __attribute__((aligned(n)))
#elif defined(CH_COMPILER_MSVC)
#define CH_ALIGNED(n) __declspec(align(n))
#else
#define CH_ALIGNED(n) /* NOT SUPPORTED */
#endif

#if defined(CH_HAS_CXX11_ALIGNAS)
#define CH_ALIGNAS(type) alignas(type)
#elif defined(CH_ALIGNED) && defined(CH_ALIGNOF)
#define CH_ALIGNAS(type) CH_ALIGNED(CH_ALIGNOF(type))
#endif

#if defined(CH_COMPILER_GCC) && !defined(__OBJC__)
#define CH_ATTRIBUTE_PRINTF(format, arguments)                                 \
  __attribute__((__format__(printf, format, arguments)))
#else
#define CH_ATTRIBUTE_PRINTF(format, arguments)
#endif

/* compiler-based branch prediction, to take advantage of target-specific
 * linstruction pipelining feature. no effect when built with -Os
 * https://codereview.chromium.org/160673002
 * */
#if defined(CH_COMPILER_GCC)
#define CH_LIKELY(x) __builtin_expect(!!(x), 1)
#else
#define CH_LIKELY(x) (x)
#endif

#if defined(CH_COMPILER_GCC)
#define CH_UNLIKELY(x) __builtin_expect(!!(x), 0)
#else
#define CH_UNLIKELY(x) (x)
#endif

/* another usage for branch predict
 * http://llvm.org/docs/BranchWeightMetadata.html#built-in-expect-instructions
 * switch(CH_BRANCH_EXPECT(x, y)) {
 * case xx:
 * case yy:
 * case zz:
 * }
 */
#if defined(CH_COMPILER_GCC)
#define CH_BRANCH_EXPECT(x, y) __builtin_expect((x), (y))
#else
#define CH_BRANCH_EXPECT(x, y) (x)
#endif

#if defined(CH_COMPILER_GCC)
#define CH_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
#define CH_WARN_UNUSED_RESULT
#endif

#ifndef CH_DEBUG
#if !defined(NDEBUG) || defined(_DEBUG)
#define CH_DEBUG
#endif
#endif

#if defined(CH_COMPILER_GCC) && !defined(CH_DEBUG) &&                          \
    !defined(CH_COMPILER_MINGW)
#define CH_ALWAYS_INLINE inline __attribute__((__always_inline__))
#elif defined(CH_COMPILER_MSVC) && !defined(CH_DEBUG)
#define CH_ALWAYS_INLINE __forceinline
#else
#define CH_ALWAYS_INLINE
#endif

#if defined(CH_COMPILER_GCC)
#define CH_NOINLINE __attribute((__noinline__))
#elif defined(CH_COMPILER_MSVC)
#define CH_NOINLINE __declspec(noinline)
#else
#define CH_NOINLINE
#endif

#if defined(CH_COMPILER_GCC)
#define CH_NORETURN __attribute((__noreturn__))
#elif defined(CH_COMPILER_MSVC)
#define CH_NORETURN __declspec(noreturn)
#else
#define CH_NORETURN
#endif

#if defined(CH_CXX14_COMPLETE)
#define CH_DEPRECATED [[deprecated]]
#elif defined(CH_COMPILER_GCC)
#define CH_DEPRECATED __attribute__((deprecated))
#elif defined(CH_COMPILER_MSVC)
#define CH_DEPRECATED __declspec(deprecated)
#else
#define CH_DEPRECATED
#endif

#if defined(CH_COMPILER_GCC)
#define CH_UNUSED(variable) (void)variable
#elif defined(CH_COMPILER_MSVC)
#define CH_UNUSED(variable) (void)&variable
#else
#define CH_UNUSED(variable)
#endif

#if defined(CH_COMPILER_GCC)
#define CH_ATTRIBUTE_USED __attribute__((__used__))
#else
#define CH_ATTRIBUTE_USED
#endif

#if defined(CH_COMPILER_GCC)
/* https://gcc.gnu.org/onlinedocs/gcc/Thread-Local.html#Thread-Local */
#define CH_THREAD_LOCAL __thread
#elif defined(CH_COMPILER_MSVC)
#define CH_THREAD_LOCAL __declspec(thread)
#endif

/* sanitize group */
#if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
#define CH_ADDRESS_SANITIZER
#define CH_WITH_SANITIZER "address"
#endif

#if __has_feature(memory_sanitizer) || defined(__SANITIZE_MEMORY__)
#define CH_MEMORY_SANITIZER
#define CH_WITH_SANITIZER "memory"
#endif

#if __has_feature(thread_sanitizer) || defined(__SANITIZE_THREAD__)
#define CH_THREAD_SANITIZER
#define CH_WITH_SANITIZER "thread"
#endif

#define CH__STR(x) #x
#define CH_STR(x) CH__STR(x)

#ifdef __cplusplus
} /* extern "C" */
#endif

/*
 * @}
 */

#endif /* H_CH_CORE_COMPILER_H */


text:
/*****************************************************************************
 * Preamble
 *****************************************************************************/

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#include <limits.h>

#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_filter.h>

/*****************************************************************************
 * Local and extern prototypes.
 *****************************************************************************/
static int  Activate( vlc_object_t * );
static void Destroy( vlc_object_t * );
static picture_t *Filter( filter_t *, picture_t * );
static int alloc_init( filter_t *, void * );

/* This module effectively implements a form of picture-in-picture.
 *  - The outer picture is called the canvas.
 *  - The innter picture is callsed the subpicture.
 *
 * NB, all of the following operatons take into account aspect ratio
 *
 * A canvas is of canvas_{width,height}.
 * In Pad mode:
 *  - The subpicture is upconverted with a inverse scalefactor of:
 *     (The size of subpicture's largest dimension)
 *     --------------------------------------------
 *     (The size of canvas's equivalent dimension)
 *
 *   Ie, The subpicture's largest dimension is made equal to the
 *   equivalent canvas dimension.
 *
 *  - The upconverted subpicture's smallest dimension is then padded
 *    to make the upconverted subpicture have the same dimensions of
 *    the canvas.
 *
 * In Crop mode:
 *  - The subpicture is upconverted with an inverse scalefactor of:
 *     (The size of subpicture's smallest dimension)
 *     --------------------------------------------
 *     (The size of canvas's equivalent dimension)
 *
 *   Ie, The subpicture's smallest dimension is made equal to the
 *   equivalent canvas dimension. (The subpicture will then be
 *   larger than the canvas)
 *
 *  - The upconverted subpicture's largest dimension is then cropped
 *    to make the upconverted subpicture have the same dimensions of
 *    the canvas.
 */

/* NB, use of `padd' in this module is a 16-17th Century spelling of `pad' */

#define WIDTH_TEXT N_( "Output width" )
#define WIDTH_LONGTEXT N_( \
    "Output (canvas) image width" )
#define HEIGHT_TEXT N_( "Output height" )
#define HEIGHT_LONGTEXT N_( \
    "Output (canvas) image height" )
#define ASPECT_TEXT N_( "Output picture aspect ratio" )
#define ASPECT_LONGTEXT N_( \
    "Set the canvas' picture aspect ratio. " \
    "If omitted, the canvas is assumed to have the same SAR as the input." )
#define PADD_TEXT N_( "Pad video" )
#define PADD_LONGTEXT N_( \
    "If enabled, video will be padded to fit in canvas after scaling. " \
    "Otherwise, video will be cropped to fix in canvas after scaling." )
#define CANVAS_HELP N_( "Automatically resize and pad a video" )

#define CFG_PREFIX "canvas-"

/*****************************************************************************
 * Module descriptor
 *****************************************************************************/
vlc_module_begin ()
    set_shortname( N_("Canvas") )
    set_description( N_("Canvas video filter") )
    set_capability( "video filter2", 0 )
    set_help( CANVAS_HELP )
    set_callbacks( Activate, Destroy )

    set_category( CAT_VIDEO )
    set_subcategory( SUBCAT_VIDEO_VFILTER )

    add_integer_with_range( CFG_PREFIX "width", 0, 0, INT_MAX,
                            WIDTH_TEXT, WIDTH_LONGTEXT, false )
    add_integer_with_range( CFG_PREFIX "height", 0, 0, INT_MAX,
                            HEIGHT_TEXT, HEIGHT_LONGTEXT, false )

    add_string( CFG_PREFIX "aspect", NULL,
                ASPECT_TEXT, ASPECT_LONGTEXT, false )

    add_bool( CFG_PREFIX "padd", true,
              PADD_TEXT, PADD_LONGTEXT, false )
vlc_module_end ()

static const char *const ppsz_filter_options[] = {
    "width", "height", "aspect", "padd", NULL
};

struct filter_sys_t
{
    filter_chain_t *p_chain;
};

/*****************************************************************************
 *
 *****************************************************************************/
static int Activate( vlc_object_t *p_this )
{
    filter_t *p_filter = (filter_t *)p_this;
    unsigned i_canvas_width; /* width of output canvas */
    unsigned i_canvas_height; /* height of output canvas */
    unsigned i_canvas_aspect; /* canvas PictureAspectRatio */
    es_format_t fmt; /* target format after up/down conversion */
    char psz_croppadd[100];
    int i_padd,i_offset;
    char *psz_aspect, *psz_parser;
    bool b_padd;
    unsigned i_fmt_in_aspect;

    if( !p_filter->b_allow_fmt_out_change )
    {
        msg_Err( p_filter, "Picture format change isn't allowed" );
        return VLC_EGENERIC;
    }

    if( p_filter->fmt_in.video.i_chroma != p_filter->fmt_out.video.i_chroma )
    {
        msg_Err( p_filter, "Input and output chromas don't match" );
        return VLC_EGENERIC;
    }

    config_ChainParse( p_filter, CFG_PREFIX, ppsz_filter_options,
                       p_filter->p_cfg );

    i_canvas_width = var_CreateGetInteger( p_filter, CFG_PREFIX "width" );
    i_canvas_height = var_CreateGetInteger( p_filter, CFG_PREFIX "height" );

    if( i_canvas_width == 0 || i_canvas_height == 0 )
    {
        msg_Err( p_filter, "Width and height options must be set" );
        return VLC_EGENERIC;
    }

    if( i_canvas_width & 1 || i_canvas_height & 1 )
    {
        /* If this restriction were ever relaxed, it is very important to
         * get the field polatiry correct */
        msg_Err( p_filter, "Width and height options must be even integers" );
        return VLC_EGENERIC;
    }

    if( p_filter->fmt_in.video.i_sar_num )
        i_fmt_in_aspect = (int64_t)p_filter->fmt_in.video.i_sar_num *
                      p_filter->fmt_in.video.i_width *
                      VOUT_ASPECT_FACTOR /
                      p_filter->fmt_in.video.i_sar_den /
                      p_filter->fmt_in.video.i_height;
    else
        i_fmt_in_aspect = (int64_t)p_filter->fmt_in.video.i_width *
                      VOUT_ASPECT_FACTOR /
                      p_filter->fmt_in.video.i_height;

    psz_aspect = var_CreateGetNonEmptyString( p_filter, CFG_PREFIX "aspect" );
    if( psz_aspect )
    {
        psz_parser = strchr( psz_aspect, ':' );
        int numerator = atoi( psz_aspect );
        int denominator = psz_parser ? atoi( psz_parser+1 ) : 0;
        denominator = denominator == 0 ? 1 : denominator;
        i_canvas_aspect = numerator * VOUT_ASPECT_FACTOR / denominator;
        free( psz_aspect );

        if( numerator <= 0 || denominator < 0 )
        {
            msg_Err( p_filter, "Aspect ratio must be strictly positive" );
            return VLC_EGENERIC;
        }
    }
    else
    {
        /* if there is no user supplied aspect ratio, assume the canvas
         * has the same sample aspect ratio as the subpicture */
        /* aspect = subpic_sar * canvas_width / canvas_height
         *  where subpic_sar = subpic_ph * subpic_par / subpic_pw */
        i_canvas_aspect = (uint64_t) p_filter->fmt_in.video.i_height
                        * i_fmt_in_aspect
                        * i_canvas_width
                        / (i_canvas_height * p_filter->fmt_in.video.i_width);
    }

    b_padd = var_CreateGetBool( p_filter, CFG_PREFIX "padd" );

    filter_sys_t *p_sys = (filter_sys_t *)malloc( sizeof( filter_sys_t ) );
    if( !p_sys )
        return VLC_ENOMEM;
    p_filter->p_sys = p_sys;

    p_sys->p_chain = filter_chain_New( p_filter, "video filter2", true,
                                       alloc_init, NULL, p_filter );
    if( !p_sys->p_chain )
    {
        msg_Err( p_filter, "Could not allocate filter chain" );
        free( p_sys );
        return VLC_EGENERIC;
    }

    es_format_Copy( &fmt, &p_filter->fmt_in );

    /* one dimension will end up with one of the following: */
    fmt.video.i_width = i_canvas_width;
    fmt.video.i_height = i_canvas_height;

    if( b_padd )
    {
        /* Padd */
        if( i_canvas_aspect > i_fmt_in_aspect )
        {
            /* The canvas has a wider aspect than the subpicture:
             *  ie, pillarbox the [scaled] subpicture */
            /* The following is derived form:
             * width = upconverted_subpic_height * subpic_par / canvas_sar
             *  where canvas_sar = canvas_width / (canvas_height * canvas_par)
             * then simplify */
            fmt.video.i_width = i_canvas_width
                              * i_fmt_in_aspect
                              / i_canvas_aspect;
            if( fmt.video.i_width & 1 ) fmt.video.i_width -= 1;

            i_padd = (i_canvas_width - fmt.video.i_width) / 2;
            i_offset = (i_padd & 1);
            snprintf( psz_croppadd, 100, "croppadd{paddleft=%d,paddright=%d}",
                      i_padd - i_offset, i_padd + i_offset );
        }
        else
        {
            /* The canvas has a taller aspect than the subpicture:
             *  ie, letterbox the [scaled] subpicture */
            fmt.video.i_height = i_canvas_height
                               * i_canvas_aspect
                               / i_fmt_in_aspect;
            if( fmt.video.i_height & 1 ) fmt.video.i_height -= 1;

            i_padd = (i_canvas_height - fmt.video.i_height ) / 2;
            i_offset = (i_padd & 1);
            snprintf( psz_croppadd, 100, "croppadd{paddtop=%d,paddbottom=%d}",
                      i_padd - i_offset, i_padd + i_offset );
        }
    }
    else
    {
        /* Crop */
        if( i_canvas_aspect < i_fmt_in_aspect )
        {
            /* The canvas has a narrower aspect than the subpicture:
             *  ie, crop the [scaled] subpicture horizontally */
            fmt.video.i_width = i_canvas_width
                              * i_fmt_in_aspect
                              / i_canvas_aspect;
            if( fmt.video.i_width & 1 ) fmt.video.i_width -= 1;

            i_padd = (fmt.video.i_width - i_canvas_width) / 2;
            i_offset = (i_padd & 1);
            snprintf( psz_croppadd, 100, "croppadd{cropleft=%d,cropright=%d}",
                      i_padd - i_offset, i_padd + i_offset );
        }
        else
        {
            /* The canvas has a shorter aspect than the subpicture:
             *  ie, crop the [scaled] subpicture vertically */
            fmt.video.i_height = i_canvas_height
                               * i_canvas_aspect
                               / i_fmt_in_aspect;
            if( fmt.video.i_height & 1 ) fmt.video.i_height -= 1;

            i_padd = (fmt.video.i_height - i_canvas_height) / 2;
            i_offset = (i_padd & 1);
            snprintf( psz_croppadd, 100, "croppadd{croptop=%d,cropbottom=%d}",
                      i_padd - i_offset, i_padd + i_offset );
        }
    }

    /* xxx, should the clean area include the letter-boxing?
     *  probably not, as some codecs can make use of that information
     *  and it should be a scaled version of the input clean area
     *   -- davidf */
    fmt.video.i_visible_width = fmt.video.i_width;
    fmt.video.i_visible_height = fmt.video.i_height;

    filter_chain_Reset( p_sys->p_chain, &p_filter->fmt_in, &fmt );
    /* Append scaling module */
    filter_chain_AppendFilter( p_sys->p_chain, NULL, NULL, NULL, NULL );
    /* Append padding module */
    filter_chain_AppendFromString( p_sys->p_chain, psz_croppadd );

    fmt = *filter_chain_GetFmtOut( p_sys->p_chain );
    es_format_Copy( &p_filter->fmt_out, &fmt );

    p_filter->fmt_out.video.i_sar_num =
        i_canvas_aspect    * p_filter->fmt_out.video.i_height;
    p_filter->fmt_out.video.i_sar_den =
        VOUT_ASPECT_FACTOR * p_filter->fmt_out.video.i_width;

    if( p_filter->fmt_out.video.i_width != i_canvas_width
     || p_filter->fmt_out.video.i_height != i_canvas_height )
    {
        msg_Warn( p_filter, "Looks like something went wrong. "
                  "Output size is %dx%d while we asked for %dx%d",
                  p_filter->fmt_out.video.i_width,
                  p_filter->fmt_out.video.i_height,
                  i_canvas_width, i_canvas_height );
    }

    p_filter->pf_video_filter = Filter;

    return VLC_SUCCESS;
}

/*****************************************************************************
 *
 *****************************************************************************/
static void Destroy( vlc_object_t *p_this )
{
    filter_t *p_filter = (filter_t *)p_this;
    filter_chain_Delete( p_filter->p_sys->p_chain );
    free( p_filter->p_sys );
}

/*****************************************************************************
 *
 *****************************************************************************/
static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
{
    return filter_chain_VideoFilter( p_filter->p_sys->p_chain, p_pic );
}

/*****************************************************************************
 *
 *****************************************************************************/
static picture_t *video_new( filter_t *p_filter )
{
    return filter_NewPicture( (filter_t*)p_filter->p_owner );
}

static void video_del( filter_t *p_filter, picture_t *p_pic )
{
    return filter_DeletePicture( (filter_t*)p_filter->p_owner, p_pic );
}

static int alloc_init( filter_t *p_filter, void *p_data )
{
    p_filter->p_owner = p_data;
    p_filter->pf_video_buffer_new = video_new;
    p_filter->pf_video_buffer_del = video_del;
    return VLC_SUCCESS;
}


text:
package org.apache.camel.builder.endpoint.dsl;

import javax.annotation.Generated;
import org.apache.camel.builder.EndpointConsumerBuilder;
import org.apache.camel.builder.EndpointProducerBuilder;
import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;

/**
 * Use a Camel Data Format as a regular Camel Component.
 *
 * Generated by camel build tools - do NOT edit this file!
 */
@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
public interface DataFormatEndpointBuilderFactory {

    /**
     * Builder for endpoint for the Data Format component.
     */
    public interface DataFormatEndpointBuilder
            extends
                EndpointProducerBuilder {
        default AdvancedDataFormatEndpointBuilder advanced() {
            return (AdvancedDataFormatEndpointBuilder) this;
        }
        /**
         * Whether the producer should be started lazy (on the first message).
         * By starting lazy you can use this to allow CamelContext and routes to
         * startup in situations where a producer may otherwise fail during
         * starting and cause the route to fail being started. By deferring this
         * startup to be lazy then the startup failure can be handled during
         * routing messages via Camel's routing error handlers. Beware that when
         * the first message is processed then creating and starting the
         * producer may take a little time and prolong the total processing time
         * of the processing.
         *
         * The option is a: boolean type.
         *
         * Default: false
         * Group: producer
         */
        default DataFormatEndpointBuilder lazyStartProducer(
                boolean lazyStartProducer) {
            doSetProperty("lazyStartProducer", lazyStartProducer);
            return this;
        }
        /**
         * Whether the producer should be started lazy (on the first message).
         * By starting lazy you can use this to allow CamelContext and routes to
         * startup in situations where a producer may otherwise fail during
         * starting and cause the route to fail being started. By deferring this
         * startup to be lazy then the startup failure can be handled during
         * routing messages via Camel's routing error handlers. Beware that when
         * the first message is processed then creating and starting the
         * producer may take a little time and prolong the total processing time
         * of the processing.
         *
         * The option will be converted to a boolean type.
         *
         * Default: false
         * Group: producer
         */
        default DataFormatEndpointBuilder lazyStartProducer(
                String lazyStartProducer) {
            doSetProperty("lazyStartProducer", lazyStartProducer);
            return this;
        }
    }

    /**
     * Advanced builder for endpoint for the Data Format component.
     */
    public interface AdvancedDataFormatEndpointBuilder
            extends
                EndpointProducerBuilder {
        default DataFormatEndpointBuilder basic() {
            return (DataFormatEndpointBuilder) this;
        }
        /**
         * Sets whether synchronous processing should be strictly used, or Camel
         * is allowed to use asynchronous processing (if supported).
         *
         * The option is a: boolean type.
         *
         * Default: false
         * Group: advanced
         */
        default AdvancedDataFormatEndpointBuilder synchronous(
                boolean synchronous) {
            doSetProperty("synchronous", synchronous);
            return this;
        }
        /**
         * Sets whether synchronous processing should be strictly used, or Camel
         * is allowed to use asynchronous processing (if supported).
         *
         * The option will be converted to a boolean type.
         *
         * Default: false
         * Group: advanced
         */
        default AdvancedDataFormatEndpointBuilder synchronous(String synchronous) {
            doSetProperty("synchronous", synchronous);
            return this;
        }
    }

    public interface DataFormatBuilders {
        /**
         * Data Format (camel-dataformat)
         * Use a Camel Data Format as a regular Camel Component.
         *
         * Category: core,transformation
         * Since: 2.12
         * Maven coordinates: org.apache.camel:camel-dataformat
         *
         * Syntax: dataformat:name:operation
         *
         * Path parameter: name (required)
         * Name of data format
         *
         * Path parameter: operation (required)
         * Operation to use either marshal or unmarshal
         * There are 2 enums and the value can be one of: marshal, unmarshal
         *
         * @param path name:operation
         */
        default DataFormatEndpointBuilder dataformat(String path) {
            return DataFormatEndpointBuilderFactory.endpointBuilder("dataformat", path);
        }
        /**
         * Data Format (camel-dataformat)
         * Use a Camel Data Format as a regular Camel Component.
         *
         * Category: core,transformation
         * Since: 2.12
         * Maven coordinates: org.apache.camel:camel-dataformat
         *
         * Syntax: dataformat:name:operation
         *
         * Path parameter: name (required)
         * Name of data format
         *
         * Path parameter: operation (required)
         * Operation to use either marshal or unmarshal
         * There are 2 enums and the value can be one of: marshal, unmarshal
         *
         * @param componentName to use a custom component name for the endpoint
         * instead of the default name
         * @param path name:operation
         */
        default DataFormatEndpointBuilder dataformat(
                String componentName,
                String path) {
            return DataFormatEndpointBuilderFactory.endpointBuilder(componentName, path);
        }
    }
    static DataFormatEndpointBuilder endpointBuilder(
            String componentName,
            String path) {
        class DataFormatEndpointBuilderImpl extends AbstractEndpointBuilder implements DataFormatEndpointBuilder, AdvancedDataFormatEndpointBuilder {
            public DataFormatEndpointBuilderImpl(String path) {
                super(componentName, path);
            }
        }
        return new DataFormatEndpointBuilderImpl(path);
    }
}


text:
import os
from six.moves import input
import yaml
from copy import deepcopy
from argparse import ArgumentParser

from hobo.api import Hobo
from commandsession import CommandSession

def main():
    """cli entry point.
    """
    argparser = ArgumentParser()
    argparser.add_argument('--verbose', action='store_true', help='stream stdout/stderr', default=False)
    argparser.add_argument('--debug', action='store_true', help='debug', default=False)
    argparser.add_argument('--dump', action='store_true', help='Dump commands', default=False)

    subparsers = argparser.add_subparsers(dest='command')

    base_parser = subparsers.add_parser(
        'base',
        help="Prepare a base image to clone from"
    )
    base_parser.add_argument(
        'image_name',
        help='Name of resultant image.'
    )
    base_parser.add_argument(
        'image_desc',
        help='Image description.'
    )
    base_parser_grp = base_parser.add_mutually_exclusive_group(required=True)

    base_parser_grp.add_argument(
        '--base-os', dest='base_os',
        help='Desired os/platform to base image on.'
    )
    base_parser.add_argument(
        '--install',
        help='Packages to install.'
    )
    base_parser.add_argument(
        '--run', nargs='?', action='append',
        help='Scripts to run.'
    )
    base_parser.add_argument(
        '--upload', nargs='?', action='append',
        help='Files to upload.'
    )
    base_parser.add_argument(
        '--size',
        help='Disk size of image.'
    )

    base_parser_grp.add_argument(
        '--from-file', dest='image_file',
        help='Use base image template from file.'
    )
    base_parser.add_argument(
        '--template',
        help='Which template to use from file'
    )

    build_parser = subparsers.add_parser('build')
    build_parser.add_argument(
        'base_os',
        help='Desired os/platform for build.'
    )
    build_parser.add_argument(
        '--name',
        help='Domain names. Multiple names will create additional domains.'
    )
    build_parser.add_argument(
        '--size',
        help='Desired image size.'
    )
    build_parser.add_argument(
        '--hostname',
        help='Desired hostname.'
    )
    build_parser.add_argument(
        '--ram',
        help='memory.'
    )
    build_parser.add_argument(
        '--cpus',
        help='Num cpus.'
    )
    build_parser.add_argument(
        '--tags', nargs='?', action='append',
        help='Tags.'
    )

    info_parser = subparsers.add_parser('info')
    info_parser.add_argument(
        '--domain',
        help='Which domain to check out.'
    )
    info_parser.add_argument(
        '--format',
        help='output format.'
    )

    destroy_parser = subparsers.add_parser('destroy')
    destroy_parser.add_argument(
        '--domain',
        help='Which domain to delete.'
    )

    package_parser = subparsers.add_parser('package')
    package_parser.add_argument(
        'domain_name',
        help='Which domain to package.'
    )
    package_parser.add_argument(
        'image_name',
        help='Name of resulting template.'
    )
    package_parser.add_argument(
        'image_desc',
        help='Description of resulting template.'
    )
    package_parser.add_argument(
        '--install', action='store_true',
        help='Install as local template?.'
    )
    package_parser.add_argument(
        '--compress', action='store_true',
        help='Compress?.'
    )

    args = vars(argparser.parse_args())

    verbose = args.pop('verbose')
    debug = args.pop('debug')
    dump = args.pop('dump')
    command = args.pop('command')

    # Perform some extra arg validation crapola that is
    # tough to do with argparse.
    if command == 'base' and 'image_file' in args:
        # read data from yaml file instead of cli
        assert os.path.exists(args['image_file'])

        if not args['template']:
            print('--template is required with --from-file')
            return False

        template = args.pop('template')
        image_file = args.pop('image_file')

        with open(image_file, 'r') as yml:
            templates = yaml.load(yml.read())
            if template not in templates:
                print('template not found')
                return False

            for k, v in templates[template].items():
                args[k] = v

    elif command == 'base':
        if args['template']:
            print('--template not supported unless --image-file')
            return False

    if command == 'destroy' and not args.get('domain'):
        print('danger, will robinson:')
        resp = input('y/n')
        if not resp.strip() == 'y':
            return

    env = {} if not debug else {'LIBGUESTFS_DEBUG': '1'}
    session = CommandSession(stream=verbose)  # , env=env)  #FIXME this hangs due to proxy.
    hobo = Hobo(session=session)
    func = getattr(hobo, command)
    ret = func(**args)
    if dump:
        for item in session.command_dump:
            print(item)
    return 0 if ret else 1


text:
package org.ecg.refdata.datasource.ejb.config;

import org.ecg.refdata.datasource.ejb.config.RefDataConfiguration.UndefinedTypeException;
import org.ecg.refdata.IDictionaryConfig;
import org.ecg.refdata.IReferenceDataConfig;
import java.io.Serializable;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class EjbReferenceDataConfig implements IReferenceDataConfig, Serializable {

    private static final long serialVersionUID = 1L;
    private static Log log = LogFactory.getLog(EjbReferenceDataConfig.class);

    Map<String, IDictionaryConfig> dictionaryConfigMap;
    Map<String, String> dictId2Type;

    public EjbReferenceDataConfig(Map<String, String> dictId2Type) {
        this.dictId2Type = dictId2Type;
    }

    public Map<String, IDictionaryConfig> getDictionaryConfigMap() {
        Set<String> ids;
        if (dictionaryConfigMap == null) {
            Map<String, IDictionaryConfig> dictionaryConfigMap2 = new HashMap<String, IDictionaryConfig>();

            for (Entry<String, String> ent : dictId2Type.entrySet()) {
                String id = ent.getKey();
                String type = ent.getValue();
                try {
                    dictionaryConfigMap2.put(id, new EjbDictionaryConfig(new RefDataConfiguration(type), Arrays.asList(new String[]{id})));
                } catch (UndefinedTypeException ex) {
                    log.error("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! internal error !!!", ex);
                    continue;
                }
            }
            dictionaryConfigMap = dictionaryConfigMap2;
        }
        return dictionaryConfigMap;
    }

}


text:
<?xml version="1.0" encoding="UTF-8"?>
<ldswebml type="image" uri="/media-library/images/missionary#portrait-elder-missionary-905807" xml:lang="eng" locale="eng" status="publish" xmlns:its="http://www.w3.org/2005/11/its">
  <search-meta>
      <uri-title its:translate="no">portrait-elder-missionary-905807</uri-title>
      <source>portrait-elder-missionary-905807</source>
      <publication-type its:translate="no">image</publication-type>
      <media-type its:translate="no">image</media-type>
      <publication value="ldsorg">LDS.org</publication>
      <publication-date value="2012-06-20">2012-06-20</publication-date>
      <title/>
      <description/>
      <collections>
          <collection its:translate="no">global-search</collection>
          <collection its:translate="no">media</collection>
          <collection its:translate="no">images</collection>
      </collections>
      <subjects>
          <subject>Elder missionaries</subject>
          <subject>Portraits</subject>
      </subjects>
  </search-meta>
  <no-search>
      <path>http://media.ldscdn.org/images/media-library/missionary/portrait-elder-missionary-905807-gallery.jpg</path>
      <images>
          http://media.ldscdn.org/images/media-library/missionary/portrait-elder-missionary-905807-thumbnail.jpg
      </images>
          <download-urls>
              <download-url>
                  Mobile
                  <size>77 KB</size>
                  <path>http://media.ldscdn.org/images/media-library/missionary/portrait-elder-missionary-905807-mobile.jpg</path>
              </download-url>
              <download-url>
                  Tablet
                  <size>100 KB</size>
                  <path>http://media.ldscdn.org/images/media-library/missionary/portrait-elder-missionary-905807-tablet.jpg</path>
              </download-url>
              <download-url>
                  Print
                  <size>199 KB</size>
                  <path>http://media.ldscdn.org/images/media-library/missionary/portrait-elder-missionary-905807-print.jpg</path>
              </download-url>
              <download-url>
                  Wallpaper
                  <size>318 KB</size>
                  <path>http://media.ldscdn.org/images/media-library/missionary/portrait-elder-missionary-905807-wallpaper.jpg</path>
              </download-url>
          </download-urls>
  </no-search>
</ldswebml>