text:
<?php

namespace Doctrine\Bundle\DoctrineBundle;

use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Bridge\Doctrine\RegistryInterface;
use Symfony\Bridge\Doctrine\ManagerRegistry;
use Doctrine\ORM\ORMException;
use Doctrine\ORM\EntityManager;

/**
 * References all Doctrine connections and entity managers in a given Container.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class Registry extends ManagerRegistry implements RegistryInterface
{
    /**
     * Construct.
     *
     * @param ContainerInterface $container
     * @param array              $connections
     * @param array              $entityManagers
     * @param string             $defaultConnection
     * @param string             $defaultEntityManager
     */
    public function __construct(ContainerInterface $container, array $connections, array $entityManagers, $defaultConnection, $defaultEntityManager)
    {
        $this->setContainer($container);

        parent::__construct('ORM', $connections, $entityManagers, $defaultConnection, $defaultEntityManager, 'Doctrine\ORM\Proxy\Proxy');
    }

    /**
     * Gets the default entity manager name.
     *
     * @return string The default entity manager name
     *
     * @deprecated
     */
    public function getDefaultEntityManagerName()
    {
        trigger_error('getDefaultEntityManagerName is deprecated since Symfony 2.1. Use getDefaultManagerName instead', E_USER_DEPRECATED);

        return $this->getDefaultManagerName();
    }

    /**
     * Gets a named entity manager.
     *
     * @param string $name The entity manager name (null for the default one)
     *
     * @return \Doctrine\ORM\EntityManager
     *
     * @deprecated
     */
    public function getEntityManager($name = null)
    {
        trigger_error('getEntityManager is deprecated since Symfony 2.1. Use getManager instead', E_USER_DEPRECATED);

        return $this->getManager($name);
    }

    /**
     * Gets an array of all registered entity managers
     *
     * @return EntityManager[] an array of all EntityManager instances
     *
     * @deprecated
     */
    public function getEntityManagers()
    {
        trigger_error('getEntityManagers is deprecated since Symfony 2.1. Use getManagers instead', E_USER_DEPRECATED);

        return $this->getManagers();
    }

    /**
     * Resets a named entity manager.
     *
     * This method is useful when an entity manager has been closed
     * because of a rollbacked transaction AND when you think that
     * it makes sense to get a new one to replace the closed one.
     *
     * Be warned that you will get a brand new entity manager as
     * the existing one is not useable anymore. This means that any
     * other object with a dependency on this entity manager will
     * hold an obsolete reference. You can inject the registry instead
     * to avoid this problem.
     *
     * @param string $name The entity manager name (null for the default one)
     *
     * @return EntityManager
     *
     * @deprecated
     */
    public function resetEntityManager($name = null)
    {
        trigger_error('resetEntityManager is deprecated since Symfony 2.1. Use resetManager instead', E_USER_DEPRECATED);

        $this->resetManager($name);
    }

    /**
     * Resolves a registered namespace alias to the full namespace.
     *
     * This method looks for the alias in all registered entity managers.
     *
     * @param string $alias The alias
     *
     * @return string The full namespace
     *
     * @deprecated
     */
    public function getEntityNamespace($alias)
    {
        trigger_error('getEntityNamespace is deprecated since Symfony 2.1. Use getAliasNamespace instead', E_USER_DEPRECATED);

        return $this->getAliasNamespace($alias);
    }

    /**
     * Resolves a registered namespace alias to the full namespace.
     *
     * This method looks for the alias in all registered entity managers.
     *
     * @param string $alias The alias
     *
     * @return string The full namespace
     *
     * @see Configuration::getEntityNamespace
     */
    public function getAliasNamespace($alias)
    {
        foreach (array_keys($this->getManagers()) as $name) {
            try {
                return $this->getManager($name)->getConfiguration()->getEntityNamespace($alias);
            } catch (ORMException $e) {
            }
        }

        throw ORMException::unknownEntityNamespace($alias);
    }

    /**
     * Gets all connection names.
     *
     * @return array An array of connection names
     *
     * @deprecated
     */
    public function getEntityManagerNames()
    {
        trigger_error('getEntityManagerNames is deprecated since Symfony 2.1. Use getManagerNames instead', E_USER_DEPRECATED);

        return $this->getManagerNames();
    }

    /**
     * Gets the entity manager associated with a given class.
     *
     * @param string $class A Doctrine Entity class name
     *
     * @return EntityManager|null
     *
     * @deprecated
     */
    public function getEntityManagerForClass($class)
    {
        trigger_error('getEntityManagerForClass is deprecated since Symfony 2.1. Use getManagerForClass instead', E_USER_DEPRECATED);

        return $this->getManagerForClass($class);
    }
}

redpajama_set_name: RedPajamaGithub


text:
package json.processing.service.categoryService;

import json.processing.model.dto.binding.jsonBindingModels.CategoryBindingModel;
import json.processing.model.dto.binding.xmlBindingModels.seedCategoriesBindingModels.CategorySeedDataWrapper;
import json.processing.model.dto.view.jsonViewModels.CategoryByProductsCountViewModel;

import java.util.List;

public interface CategoryService {

    void persist(CategoryBindingModel categoryBindingModel);

    CategoryBindingModel getCategoryById(Long categoryID);

    List<CategoryByProductsCountViewModel> categoriesByProductCount();

    void persisAllCategories(CategorySeedDataWrapper categoryWrapper);
}


text:
package com.querydsl.core.types.dsl;

import java.lang.reflect.AnnotatedElement;
import java.util.Set;

import javax.annotation.Nullable;

import com.querydsl.core.types.*;

/**
 * {@code SetPath} represents set paths
 *
 * @author tiwe
 *
 * @param <E> component type
 * @param <Q> component query type
 */
public class SetPath<E, Q extends SimpleExpression<? super E>> extends CollectionPathBase<Set<E>, E, Q> {

    private static final long serialVersionUID = 4145848445507037373L;

    private final Class<E> elementType;

    private final PathImpl<Set<E>> pathMixin;

    @Nullable
    private transient Q any;

    private final Class<Q> queryType;

    protected SetPath(Class<? super E> type, Class<Q> queryType, String variable) {
        this(type, queryType, PathMetadataFactory.forVariable(variable));
    }

    protected SetPath(Class<? super E> type, Class<Q> queryType, Path<?> parent, String property) {
        this(type, queryType, PathMetadataFactory.forProperty(parent, property));
    }

    protected SetPath(Class<? super E> type, Class<Q> queryType, PathMetadata metadata) {
        this(type, queryType, metadata, PathInits.DIRECT);
    }

    @SuppressWarnings("unchecked")
    protected SetPath(Class<? super E> type, Class<Q> queryType, PathMetadata metadata, PathInits inits) {
        super(new ParameterizedPathImpl<Set<E>>((Class) Set.class, metadata, type), inits);
        this.elementType = (Class<E>) type;
        this.queryType = queryType;
        this.pathMixin = (PathImpl<Set<E>>) mixin;
    }

    @Override
    public final <R,C> R accept(Visitor<R,C> v, C context) {
        return v.visit(pathMixin, context);
    }

    @Override
    public Q any() {
        if (any == null) {
            any = newInstance(queryType, PathMetadataFactory.forCollectionAny(this));
        }
        return any;
    }

    @Override
    public Class<E> getElementType() {
        return elementType;
    }

    @Override
    public PathMetadata getMetadata() {
        return pathMixin.getMetadata();
    }

    @Override
    public Path<?> getRoot() {
        return pathMixin.getRoot();
    }

    @Override
    public AnnotatedElement getAnnotatedElement() {
        return pathMixin.getAnnotatedElement();
    }

    @Override
    public Class<?> getParameter(int index) {
        if (index == 0) {
            return elementType;
        } else {
            throw new IndexOutOfBoundsException(String.valueOf(index));
        }
    }

}


text:
from distutils.core import setup
from Cython.Build import cythonize

setup(
	ext_modules = cythonize("rsm.pyx")
)


text:
//
//  MGSFragariaView.h
//  Fragaria
//
//  File created by Jim Derry on 2015/02/07.
//
//

#import <Cocoa/Cocoa.h>
#import <Fragaria/FragariaMacros.h>

NS_ASSUME_NONNULL_BEGIN

@class MGSTextView;
@class MGSColourScheme;

@protocol MGSAutoCompleteDelegate;
@protocol MGSBreakpointDelegate;
@protocol MGSFragariaTextViewDelegate;
@protocol MGSDragOperationDelegate;

/**
 *  MGSFragariaView re-implements MGSFragaria from scratch as an IB-compatible
 *  NSView. It is fully compatible with Fragaria's "modern" property-based API
 *  and leaves behind all support for the old docspec, setters and preferences.
 *
 *  All API properties are fully bindings-compatible (two-way).
 *
 *  Optional pre-set settings that largely match classic Fragaria's settings and
 *  appearance are available in the MGSUserDefaultsDefinitions category,
 *  including a plist dictionary that can be used for userDefaults.
 *
 *  A complete management system for properties and user defaults, as well as
 *  a modern set of user interfaces are available in MGSUserDefaultsController
 *  group of files. These are for convenience and are in no way required in
 *  order to use MGSFragariaView.
 */

IB_DESIGNABLE
@interface MGSFragariaView : NSView

#pragma mark - Accessing Fragaria's Views
/// @name Accessing Fragaria's Views

/** Fragaria's text view. */
@property (nonatomic, strong, readonly) MGSTextView *textView;
/** Fragaria's scroll view. */
@property (nonatomic, strong, readonly) NSScrollView *scrollView;

#pragma mark - Accessing Text Content
/// @name Accessing Text Content

/** The plain text string of the text editor.*/
@property (nonatomic, copy) NSString *string;

/** The text editor string, including the style changes applied by
 *  the syntax highlighter. */
- (NSAttributedString *)attributedStringWithSyntaxColouring;

/** The text storage associated with this instance of Fragaria.
 *  @warning Do not use textView.textStorage instead! */
- (NSTextStorage *)textStorage;

#pragma mark - Getting Line and Column Information
/// @name Getting Line and Column Information

/** Get the row and the column corresponding to the given character index.
 *  @param r If not NULL, on return points to the row index where i is located,
 *    or to NSNotFound if the character index is invalid.
 *  @param c If not NULL, on return points to the column index where i is
 *    located, or to NSNotFound if the character index is invalid.
 *  @param i The character index.
 *  @discussion If i points to a tabulation character, only the first of the
 *    columns spanned by the tabulation will be returned. If i points to one
 *    past the last character in the string, the row and column returned
 *    will point to where that character will be when it is inserted. */
- (void)getRow:(out nullable NSUInteger *)r column:(out nullable NSUInteger *)c forCharacterIndex:(NSUInteger)i;

/** Get the row and the offset in that row which correspond to the given
 *  character index.
 *  @param r If not NULL, on return points to the row index where i is located,
 *    or to NSNotFound if the character index is invalid.
 *  @param c If not NULL, on return points to the index in the row r where i is
 *    located, or to NSNotFound if the character index is invalid.
 *  @param i The character index.
 *  @discussion If i points to one past the last character in the string, the
 *    row and index returned will point to where that character will be when
 *    it is inserted. */
- (void)getRow:(out nullable NSUInteger *)r indexInRow:(out nullable NSUInteger *)c forCharacterIndex:(NSUInteger)i;

/** The character index corresponding to the given column and row.
 *  @param c A column index.
 *  @param r A row index.
 *  @returns A character index, or NSNotFound if there is no character at the
 *    specified position.
 *  @discussion If the column and the row point inside of a tabulation
 *    character, the index of that character is returned. Newline characters
 *    are assumed to span all the columns past the last one in the line's
 *    contents. */
- (NSUInteger)characterIndexAtColumn:(NSUInteger)c withinRow:(NSUInteger)r;

/** The character index corresponding to the offset of a character in its row.
 *  @param c A character index, relative to the beginning of the row.
 *  @param r A row index.
 *  @returns A character index, or NSNotFound if there is no character at the
 *    specified position.
 *  @discussion Any line number returned by mgs_rowOfCharacter: is a valid
 *    line number for this function. If the line number is valid, this function
 *    will always return a valid character index in that line. If the
 *    index parameter specifies a character outside the bounds of the line,
 *    the index of one past the last character of content of that line will be
 *    returned. */
- (NSUInteger)characterIndexAtIndex:(NSUInteger)c withinRow:(NSUInteger)r;

#pragma mark - Creating Split Panels
/// @name Creating Split Panels

/** Replaces the text storage object of this Fragaria instance's text view to
 *  the specified text storage.
 *
 *  @discussion This allows two Fragaria instances to show the same text in a
 *       split view, for example. Replacing the text storage directly on the
 *       text view's layout manager is not supported, and will not work
 *       properly.
 *
 *  @param textStorage The new text storage for this instance of Fragaria. */
- (void)replaceTextStorage:(NSTextStorage *)textStorage;

#pragma mark - Configuring Syntax Highlighting
/// @name Configuring Syntax Highlighting

/** Specifies whether the document shall be syntax highlighted.*/
@property (nonatomic, getter=isSyntaxColoured) BOOL syntaxColoured;

/** Specifies the current syntax definition name.*/
@property (nonatomic, assign) NSString *syntaxDefinitionName;

/** Indicates if multiline strings should be coloured.*/
@property BOOL coloursMultiLineStrings;
/** Indicates if coloring should end at end of line.*/
@property BOOL coloursOnlyUntilEndOfLine;

#pragma mark - Configuring Autocompletion
/// @name Configuring Autocompletion

/** The autocomplete delegate for this instance of Fragaria. The autocomplete
 *  delegate provides a list of words that can be used by the autocomplete
 *  feature. If this property is nil, then the list of autocomplete words will
 *  be read from the current syntax highlighting dictionary. */
@property (nonatomic, weak, nullable) IBOutlet id<MGSAutoCompleteDelegate> autoCompleteDelegate;

/** Specifies the delay time for autocomplete, in seconds.*/
@property double autoCompleteDelay;
/** Specifies whether or not auto complete is enabled.*/
@property BOOL autoCompleteEnabled;
/** Specifies if autocompletion should include keywords.*/
@property BOOL autoCompleteWithKeywords;
/** If set to YES, pressing the space bar will cancel autocompletion instead of
 *  confirming it. */
@property BOOL autoCompleteDisableSpaceEnter;
/** If set to YES, autocomplete will not modify the text until the completion
 *  confirmed. */
@property BOOL autoCompleteDisablePreview;

#pragma mark - Highlighting the current line
/// @name Highlighting the Current Line

/** Specifies whether or not the line with the cursor should be highlighted.*/
@property (nonatomic, assign) BOOL highlightsCurrentLine;

#pragma mark - Configuring the Gutter
/// @name Configuring the Gutter

/** Indicates whether or not the gutter is visible.*/
@property (nonatomic, assign) BOOL showsGutter;
/** Specifies the minimum width of the line number gutter.*/
@property (nonatomic, assign) CGFloat minimumGutterWidth;

/** Indicates whether or not line numbers are displayed when the gutter is visible.*/
@property (nonatomic, assign) BOOL showsLineNumbers;
/** Specifies the starting line number in the text view.*/
@property (nonatomic, assign) NSUInteger startingLineNumber;

/** Indicates whether or not the separator are displayed when the gutter is visible.*/
@property (nonatomic, assign) BOOL showsGutterSeparator;

/** Specifies the standard font for the line numbers in the gutter.*/
@property (nonatomic, assign) IBInspectable NSFont *gutterFont;

#pragma mark - Showing Syntax Errors
/// @name Showing Syntax Errors

/** When set to an array containing MGSSyntaxError instances, Fragaria
 *  use these instances to provide feedback to the user in the form of:
 *   - highlighting lines and syntax errors in the text view.
 *   - displaying warning icons in the gutter.
 *   - providing a description of the syntax errors in popovers. */
@property (nonatomic, assign, nullable) NSArray *syntaxErrors;

/** Indicates whether or not error warnings are displayed.*/
@property (nonatomic, assign) BOOL showsSyntaxErrors;

/** If showing syntax errors, highlights individual errors instead of
 * highlighting the full line. */
@property (nonatomic, assign) BOOL showsIndividualErrors;

#pragma mark - Showing Breakpoints
/// @name Showing Breakpoints

/** The breakpoint delegate for this instance of Fragaria. The breakpoint
 * delegate is responsible of managing a list of lines where a breakpoint
 * marker is present. */
@property (nonatomic, weak, nullable) IBOutlet id<MGSBreakpointDelegate> breakpointDelegate;

/** Forces the line number view to reload the the breakpoint data from the
 *  breakpoint delegate.
 *  @discussion This method should be called when you want to update the
 *              shown breakpoints without an input from the user. It's not
 *              necessary to call this method in response to a
 *              toggleBreakpointForFragaria:onLine: message. */
- (void)reloadBreakpointData;

#pragma mark - Tabulation and Indentation
/// @name Tabulation and Indentation

/** Specifies the number of spaces per tab.*/
@property (nonatomic, assign) NSInteger tabWidth;
/** Specifies the automatic indentation width.*/
@property (nonatomic, assign) NSUInteger indentWidth;
/** Specifies whether spaces should be inserted instead of tab characters when
 *  indenting.*/
@property (nonatomic, assign) BOOL indentWithSpaces;
/** Specifies whether or not tab stops should be used when indenting.*/
@property (nonatomic, assign) BOOL useTabStops;
/** Indicates whether or not braces should be indented automatically.*/
@property (nonatomic, assign) BOOL indentBracesAutomatically;
/** Indicates whether or not new lines should be indented automatically.*/
@property (nonatomic, assign) BOOL indentNewLinesAutomatically;

#pragma mark - Automatic Bracing
/// @name Automatic Bracing

/** Specifies whether or not closing parentheses are inserted automatically.*/
@property (nonatomic, assign) BOOL insertClosingParenthesisAutomatically;
/** Specifies whether or not closing braces are inserted automatically.*/
@property (nonatomic, assign) BOOL insertClosingBraceAutomatically;

/** Specifies whether or not matching braces are shown in the editor.*/
@property (nonatomic, assign) BOOL showsMatchingBraces;

/** Specifies whether or not to beep when an expected matching brace is not found */
@property (nonatomic, assign) BOOL beepOnMissingBrace;

/** Specifies the pairs of characters to treat as braces.
    The key is the opening brace character and the value is the closing brace character.
    e.g. [x setBraces:@{ @'{' : @'}' , @'[' : @']' }]
*/
@property (nonatomic, retain) NSDictionary *braces;

#pragma mark - Page Guide and Line Wrap
/// @name Showing the Page Guide

/** Specifies the column position to draw the page guide. Independently of
 *  whether or not showsPageGuide is enabled, also indicates the line wrap
 *  column when both lineWrap and lineWrapsAtPageGuide are enabled.*/
@property (nonatomic, assign) NSInteger pageGuideColumn;
/** Specifies whether or not to show the page guide.*/
@property (nonatomic, assign) BOOL showsPageGuide;

/** Indicates whether or not line wrap is enabled.*/
@property (nonatomic, assign) BOOL lineWrap;
/** If lineWrap is enabled, this indicates whether the line should wrap at the
 *  page guide column. */
@property (nonatomic, assign) BOOL lineWrapsAtPageGuide;

#pragma mark - Showing Invisible Characters
/// @name Showing Invisible Characters

/** Indicates whether or not invisible characters in the editor are revealed.*/
@property (nonatomic, assign) IBInspectable BOOL showsInvisibleCharacters;

/**
 *  Clears the current substitutes for invisible characters
 **/
- (void)clearInvisibleCharacterSubstitutes;

/**
 *  Remove the substitute for invisible character `character`
 **/
- (void)removeSubstituteForInvisibleCharacter:(unichar)character;

/**
 *  Add a substitute `substitute` for invisible character `character`
 **/
- (void)addSubstitute:(NSString *)substitute forInvisibleCharacter:(unichar)character;

#pragma mark - Configuring Text Appearance and Color Schemes
/// @name Configuring Text Appearance and Color Schemes

/** Specifies the text editor font.*/
@property (nonatomic) IBInspectable NSFont *textFont;
/** The real line height as a multiple of the natural line height for the
 *  current font. */
@property (nonatomic) CGFloat lineHeightMultiple;

@property (nonatomic) BOOL useSystemSelectionColor;

/** The current color scheme applied to Fragaria */
@property (nonatomic, copy) MGSColourScheme *colourScheme;

#pragma mark - Configuring Additional Text View Behavior
/// @name Configuring Additional Text View Behavior

/** The text view delegate of this instance of Fragaria. This is an utility
 * accessor and setter for textView.delegate. */
@property (nonatomic, weak, nullable) IBOutlet id<MGSFragariaTextViewDelegate, MGSDragOperationDelegate> textViewDelegate;

/** Indicates whether or not the vertical scroller should be displayed.*/
@property (nonatomic, assign) BOOL hasVerticalScroller;
/** Indicates whether or not the "rubber band" effect is disabled.*/
@property (nonatomic, assign) BOOL scrollElasticityDisabled;

/** Scrolls the text view to a specific line, selecting it if specified.
 *  @param lineToGoTo Indicates the line the view should attempt to move to.
 *  @param centered   Deprecated parameter.
 *  @param highlight  Indicates whether or not the line should be selected. */
- (void)goToLine:(NSInteger)lineToGoTo centered:(BOOL)centered highlight:(BOOL)highlight;

@end

@interface MGSFragariaView (MGSDeprecated)

@property (copy) NSColor *textColor FRAGARIA_DEPRECATED_MSG("use colourScheme instead");
@property NSColor *backgroundColor FRAGARIA_DEPRECATED_MSG("use colourScheme instead");
@property (nonatomic, assign) NSColor *defaultSyntaxErrorHighlightingColour FRAGARIA_DEPRECATED_MSG("use colourScheme instead");
@property (nonatomic, assign) NSColor *textInvisibleCharactersColour FRAGARIA_DEPRECATED_MSG("use colourScheme instead");
@property (nonatomic, assign) NSColor *currentLineHighlightColour FRAGARIA_DEPRECATED_MSG("use colourScheme instead");
@property (nonatomic, assign) NSColor *insertionPointColor FRAGARIA_DEPRECATED_MSG("use colourScheme instead");

/** Specifies the standard color of the line numbers in the gutter.*/
@property (nonatomic, assign) NSColor *gutterTextColour FRAGARIA_DEPRECATED_MSG("use colourScheme instead");
/** Specifies the background colour of the gutter view */
@property (nonatomic, assign) NSColor *gutterBackgroundColour FRAGARIA_DEPRECATED_MSG("use colourScheme instead");

@end

NS_ASSUME_NONNULL_END


text:
package me.tatarka.simplefragment.test;

import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import me.tatarka.simplefragment.SimpleFragment;
import me.tatarka.simplefragment.SimpleFragmentIntent;

/**
 * Since this class is constructed through reflection, we can't use a mock. Instead use a poor-man's
 * version by setting booleans when methods are called.
 */
public class TestSimpleFragment extends SimpleFragment {
    @Override
    public void onCreate(Context context, @Nullable Bundle state) {
    }

    @Override
    public View onCreateView(final LayoutInflater inflater, final ViewGroup parent) {
        return new TestSimpleFragmentRootView(inflater.getContext());
    }
}


text:
layout: project
type: project
published: true
image:  img/kukuicup.jpg
title: "Kukui Cup"
date: 2014 - 2010
labels:
  - Python
  - Django
  - WattDepot
  - Serious Games
summary: Explores how information technology, serious games, and educational pedagogy can support long-term change in sustainability-related behaviors.
projecturl: http://kukuicup.org
---


text:
CC = gcc

#The default target executes practical1 dependancy
all : practical1

#Compiles the executable
practical1: mycat.c filecopy.o
	$(CC) -o practical1 filecopy.o mycat.c

#Compiles the object file
filecopy.o: filecopy.c
	$(CC) -c filecopy.c

#Clear all object files
clean :
	rm *.o


text:
package com.stackify.api.common.log;

import com.stackify.api.AppIdentity;
import com.stackify.api.EnvironmentDetail;
import com.stackify.api.LogMsg;
import com.stackify.api.LogMsgGroup;
import com.stackify.api.common.AppIdentityService;
import com.stackify.api.common.collect.SynchronizedEvictingQueue;
import com.stackify.api.common.util.Preconditions;
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;
import net.jodah.failsafe.Failsafe;
import net.jodah.failsafe.RetryPolicy;

import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.Queue;

/**
 * LogCollector
 *
 * @author Eric Martin
 */
@Slf4j
public class LogCollector {

    /**
     * Max batch size of log messages to be sent in a single request
     */
    private static final int MAX_BATCH = 100;

    private static final String DEFAULT_PLATFORM = "java";

    /**
     * The logger (project) name
     */
    private final String logger;

    /**
     * The logger platform (log type)
     */
    private final String platform;

    /**
     * Environment details
     */
    private final EnvironmentDetail envDetail;

    /**
     * Application identity service
     */
    private final AppIdentityService appIdentityService;

    /**
     * The queue of objects to be transmitted
     */
    private final Queue<LogMsg> queue = new SynchronizedEvictingQueue<LogMsg>(10000);

    private final RetryPolicy<LogMsgGroup> retryPolicy = new RetryPolicy<LogMsgGroup>()
            .withDelay(Duration.ofSeconds(10))
            .withMaxRetries(3);

    /**
     * Constructor
     *
     * @param platform  Logger platform (log type)
     * @param logger    The logger (project) name
     * @param envDetail Environment details
     */
    public LogCollector(@NonNull final String platform,
                        @NonNull final String logger,
                        @NonNull final EnvironmentDetail envDetail,
                        @NonNull final AppIdentityService appIdentityService) {
        this.platform = platform;
        this.logger = logger;
        this.envDetail = envDetail;
        this.appIdentityService = appIdentityService;
    }

    /**
     * Constructor
     *
     * @param logger    The logger (project) name
     * @param envDetail Environment details
     */
    public LogCollector(final String logger,
                        final EnvironmentDetail envDetail,
                        final AppIdentityService appIdentityService) {
        this(DEFAULT_PLATFORM, logger, envDetail, appIdentityService);
    }

    /**
     * Queues logMsg to be sent
     *
     * @param logMsg The log message
     */
    public void addLogMsg(final LogMsg logMsg) {
        Preconditions.checkNotNull(logMsg);
        queue.offer(logMsg);
    }

    /**
     * Flushes the queue by sending all messages to Stackify
     *
     * @param logTransport The LogMsgGroup sender
     * @return The number of messages sent to Stackify
     * @throws Exception
     */
    public int flush(final LogTransport logTransport) throws Exception {

        int numSent = 0;
        int maxToSend = queue.size();

        if (0 < maxToSend) {
            AppIdentity appIdentity = appIdentityService.getAppIdentity();

            while (numSent < maxToSend && queue.size() > 0) {

                // get the next batch of messages
                int batchSize = Math.min(maxToSend - numSent, MAX_BATCH);

                List<LogMsg> batch = new ArrayList<LogMsg>(batchSize);

                for (int i = 0; i < batchSize; ++i) {
                    batch.add(queue.remove());
                }

                if (batch.size() > 0) {
                    // build the log message group
                    LogMsgGroup group = createLogMessageGroup(batch, platform, logger, envDetail, appIdentity);

                    send(logTransport, group);

                    // next iteration
                    numSent += batchSize;
                }
            }
        }

        return numSent;
    }

    /**
     * Send group to transport - with retry policy configured
     */
    private void send(final LogTransport logTransport,
                      final LogMsgGroup group) {
        Failsafe.with(retryPolicy).runAsync(() -> logTransport.send(group));
    }

    /**
     * @param batch       - a bunch of messages that should be sent over the wire
     * @param platform    - platform (log type)
     * @param logger      - logger (project) name
     * @param envDetail   - environment details
     * @param appIdentity - application identity
     * @return LogMessage group object with
     */
    private LogMsgGroup createLogMessageGroup(final List<LogMsg> batch,
                                              final String platform,
                                              final String logger,
                                              final EnvironmentDetail envDetail,
                                              final AppIdentity appIdentity) {
        final LogMsgGroup.Builder groupBuilder = LogMsgGroup.newBuilder();

        groupBuilder
                .platform(platform)
                .logger(logger)
                .serverName(envDetail.getDeviceName())
                .env(envDetail.getConfiguredEnvironmentName())
                .appName(envDetail.getConfiguredAppName())
                .appLoc(envDetail.getAppLocation());

        if (appIdentity != null) {
            groupBuilder
                    .cdId(appIdentity.getDeviceId())
                    .cdAppId(appIdentity.getDeviceAppId())
                    .appNameId(appIdentity.getAppNameId())
                    .appEnvId(appIdentity.getAppEnvId())
                    .envId(appIdentity.getEnvId())
                    .env(appIdentity.getEnv());

            if ((appIdentity.getAppName() != null) && (0 < appIdentity.getAppName().length())) {
                groupBuilder.appName(appIdentity.getAppName());
            }
        }

        groupBuilder.msgs(batch);

        return groupBuilder.build();
    }
}


text:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Snoopy
{
    /**** Public variables ****/

    /* user definable vars */

    var $scheme = 'http'; // http or https
    var $host = "www.php.net"; // host name we are connecting to
    var $port = 80; // port we are connecting to
    var $proxy_host = ""; // proxy host to use
    var $proxy_port = ""; // proxy port to use
    var $proxy_user = ""; // proxy user to use
    var $proxy_pass = ""; // proxy password to use

    var $agent = "Snoopy v2.0.0"; // agent we masquerade as
    var $referer = ""; // referer info to pass
    var $cookies = array(); // array of cookies to pass
    // $cookies["username"]="joe";
    var $rawheaders = array(); // array of raw headers to send
    // $rawheaders["Content-type"]="text/html";

    var $maxredirs = 5; // http redirection depth maximum. 0 = disallow
    var $lastredirectaddr = ""; // contains address of last redirected address
    var $offsiteok = true; // allows redirection off-site
    var $maxframes = 0; // frame content depth maximum. 0 = disallow
    var $expandlinks = true; // expand links to fully qualified URLs.
    // this only applies to fetchlinks()
    // submitlinks(), and submittext()
    var $passcookies = true; // pass set cookies back through redirects
    // NOTE: this currently does not respect
    // dates, domains or paths.

    var $user = ""; // user for http authentication
    var $pass = ""; // password for http authentication

    // http accept types
    var $accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*";

    var $results = ""; // where the content is put

    var $error = ""; // error messages sent here
    var $response_code = ""; // response code returned from server
    var $headers = array(); // headers returned from server sent here
    var $maxlength = 500000; // max return data length (body)
    var $read_timeout = 0; // timeout on read operations, in seconds
    // supported only since PHP 4 Beta 4
    // set to 0 to disallow timeouts
    var $timed_out = false; // if a read operation timed out
    var $status = 0; // http request status

    var $temp_dir = "/tmp"; // temporary directory that the webserver
    // has permission to write to.
    // under Windows, this should be C:\temp

    var $curl_path = false;
    // deprecated, snoopy no longer uses curl for https requests,
    // but instead requires the openssl extension.

    // send Accept-encoding: gzip?
    var $use_gzip = true;

    // file or directory with CA certificates to verify remote host with
    var $cafile;
    var $capath;

    /**** Private variables ****/

    var $_maxlinelen = 4096; // max line length (headers)

    var $_httpmethod = "GET"; // default http request method
    var $_httpversion = "HTTP/1.0"; // default http request version
    var $_submit_method = "POST"; // default submit method
    var $_submit_type = "application/x-www-form-urlencoded"; // default submit type
    var $_mime_boundary = ""; // MIME boundary for multipart/form-data submit type
    var $_redirectaddr = false; // will be set if page fetched is a redirect
    var $_redirectdepth = 0; // increments on an http redirect
    var $_frameurls = array(); // frame src urls
    var $_framedepth = 0; // increments on frame depth

    var $_isproxy = false; // set if using a proxy server
    var $_fp_timeout = 30; // timeout for socket connection

    /*======================================================================*\
        Function:	fetch
        Purpose:	fetch the contents of a web page
                    (and possibly other protocols in the
                    future like ftp, nntp, gopher, etc.)
        Input:		$URI	the location of the page to fetch
        Output:		$this->results	the output text from the fetch
    \*======================================================================*/

    function fetch($URI)
    {

        $URI_PARTS = parse_url($URI);
        if (!empty($URI_PARTS["user"]))
            $this->user = $URI_PARTS["user"];
        if (!empty($URI_PARTS["pass"]))
            $this->pass = $URI_PARTS["pass"];
        if (empty($URI_PARTS["query"]))
            $URI_PARTS["query"] = '';
        if (empty($URI_PARTS["path"]))
            $URI_PARTS["path"] = '';

        $fp = null;

        switch (strtolower($URI_PARTS["scheme"])) {
            case "https":
                if (!extension_loaded('openssl')) {
                    trigger_error("openssl extension required for HTTPS", E_USER_ERROR);
                    exit;
                }
                $this->port = 443;
            case "http":
                $this->scheme = strtolower($URI_PARTS["scheme"]);
                $this->host = $URI_PARTS["host"];
                if (!empty($URI_PARTS["port"]))
                    $this->port = $URI_PARTS["port"];
                if ($this->_connect($fp)) {
                    if ($this->_isproxy) {
                        // using proxy, send entire URI
                        $this->_httprequest($URI, $fp, $URI, $this->_httpmethod);
                    } else {
                        $path = $URI_PARTS["path"] . ($URI_PARTS["query"] ? "?" . $URI_PARTS["query"] : "");
                        // no proxy, send only the path
                        $this->_httprequest($path, $fp, $URI, $this->_httpmethod);
                    }

                    $this->_disconnect($fp);

                    if ($this->_redirectaddr) {
                        /* url was redirected, check if we've hit the max depth */
                        if ($this->maxredirs > $this->_redirectdepth) {
                            // only follow redirect if it's on this site, or offsiteok is true
                            if (preg_match("|^https?://" . preg_quote($this->host) . "|i", $this->_redirectaddr) || $this->offsiteok) {
                                /* follow the redirect */
                                $this->_redirectdepth++;
                                $this->lastredirectaddr = $this->_redirectaddr;
                                $this->fetch($this->_redirectaddr);
                            }
                        }
                    }

                    if ($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0) {
                        $frameurls = $this->_frameurls;
                        $this->_frameurls = array();

                        while (list(, $frameurl) = each($frameurls)) {
                            if ($this->_framedepth < $this->maxframes) {
                                $this->fetch($frameurl);
                                $this->_framedepth++;
                            } else
                                break;
                        }
                    }
                } else {
                    return false;
                }
                return $this;
                break;
            default:
                // not a valid protocol
                $this->error = 'Invalid protocol "' . $URI_PARTS["scheme"] . '"\n';
                return false;
                break;
        }
        return $this;
    }

    /*======================================================================*\
        Function:	submit
        Purpose:	submit an http(s) form
        Input:		$URI	the location to post the data
                    $formvars	the formvars to use.
                        format: $formvars["var"] = "val";
                    $formfiles  an array of files to submit
                        format: $formfiles["var"] = "/dir/filename.ext";
        Output:		$this->results	the text output from the post
    \*======================================================================*/

    function submit($URI, $formvars = "", $formfiles = "")
    {
        unset($postdata);

        $postdata = $this->_prepare_post_body($formvars, $formfiles);

        $URI_PARTS = parse_url($URI);
        if (!empty($URI_PARTS["user"]))
            $this->user = $URI_PARTS["user"];
        if (!empty($URI_PARTS["pass"]))
            $this->pass = $URI_PARTS["pass"];
        if (empty($URI_PARTS["query"]))
            $URI_PARTS["query"] = '';
        if (empty($URI_PARTS["path"]))
            $URI_PARTS["path"] = '';

        switch (strtolower($URI_PARTS["scheme"])) {
            case "https":
                if (!extension_loaded('openssl')) {
                    trigger_error("openssl extension required for HTTPS", E_USER_ERROR);
                    exit;
                }
                $this->port = 443;
            case "http":
                $this->scheme = strtolower($URI_PARTS["scheme"]);
                $this->host = $URI_PARTS["host"];
                if (!empty($URI_PARTS["port"]))
                    $this->port = $URI_PARTS["port"];
                if ($this->_connect($fp)) {
                    if ($this->_isproxy) {
                        // using proxy, send entire URI
                        $this->_httprequest($URI, $fp, $URI, $this->_submit_method, $this->_submit_type, $postdata);
                    } else {
                        $path = $URI_PARTS["path"] . ($URI_PARTS["query"] ? "?" . $URI_PARTS["query"] : "");
                        // no proxy, send only the path
                        $this->_httprequest($path, $fp, $URI, $this->_submit_method, $this->_submit_type, $postdata);
                    }

                    $this->_disconnect($fp);

                    if ($this->_redirectaddr) {
                        /* url was redirected, check if we've hit the max depth */
                        if ($this->maxredirs > $this->_redirectdepth) {
                            if (!preg_match("|^" . $URI_PARTS["scheme"] . "://|", $this->_redirectaddr))
                                $this->_redirectaddr = $this->_expandlinks($this->_redirectaddr, $URI_PARTS["scheme"] . "://" . $URI_PARTS["host"]);

                            // only follow redirect if it's on this site, or offsiteok is true
                            if (preg_match("|^https?://" . preg_quote($this->host) . "|i", $this->_redirectaddr) || $this->offsiteok) {
                                /* follow the redirect */
                                $this->_redirectdepth++;
                                $this->lastredirectaddr = $this->_redirectaddr;
                                if (strpos($this->_redirectaddr, "?") > 0)
                                    $this->fetch($this->_redirectaddr); // the redirect has changed the request method from post to get
                                else
                                    $this->submit($this->_redirectaddr, $formvars, $formfiles);
                            }
                        }
                    }

                    if ($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0) {
                        $frameurls = $this->_frameurls;
                        $this->_frameurls = array();

                        while (list(, $frameurl) = each($frameurls)) {
                            if ($this->_framedepth < $this->maxframes) {
                                $this->fetch($frameurl);
                                $this->_framedepth++;
                            } else
                                break;
                        }
                    }

                } else {
                    return false;
                }
                return $this;
                break;
            default:
                // not a valid protocol
                $this->error = 'Invalid protocol "' . $URI_PARTS["scheme"] . '"\n';
                return false;
                break;
        }
        return $this;
    }

    /*======================================================================*\
        Function:	fetchlinks
        Purpose:	fetch the links from a web page
        Input:		$URI	where you are fetching from
        Output:		$this->results	an array of the URLs
    \*======================================================================*/

    function fetchlinks($URI)
    {
        if ($this->fetch($URI) !== false) {
            if ($this->lastredirectaddr)
                $URI = $this->lastredirectaddr;
            if (is_array($this->results)) {
                for ($x = 0; $x < count($this->results); $x++)
                    $this->results[$x] = $this->_striplinks($this->results[$x]);
            } else
                $this->results = $this->_striplinks($this->results);

            if ($this->expandlinks)
                $this->results = $this->_expandlinks($this->results, $URI);
            return $this;
        } else
            return false;
    }

    /*======================================================================*\
        Function:	fetchform
        Purpose:	fetch the form elements from a web page
        Input:		$URI	where you are fetching from
        Output:		$this->results	the resulting html form
    \*======================================================================*/

    function fetchform($URI)
    {

        if ($this->fetch($URI) !== false) {

            if (is_array($this->results)) {
                for ($x = 0; $x < count($this->results); $x++)
                    $this->results[$x] = $this->_stripform($this->results[$x]);
            } else
                $this->results = $this->_stripform($this->results);

            return $this;
        } else
            return false;
    }

    /*======================================================================*\
        Function:	fetchtext
        Purpose:	fetch the text from a web page, stripping the links
        Input:		$URI	where you are fetching from
        Output:		$this->results	the text from the web page
    \*======================================================================*/

    function fetchtext($URI)
    {
        if ($this->fetch($URI) !== false) {
            if (is_array($this->results)) {
                for ($x = 0; $x < count($this->results); $x++)
                    $this->results[$x] = $this->_striptext($this->results[$x]);
            } else
                $this->results = $this->_striptext($this->results);
            return $this;
        } else
            return false;
    }

    /*======================================================================*\
        Function:	submitlinks
        Purpose:	grab links from a form submission
        Input:		$URI	where you are submitting from
        Output:		$this->results	an array of the links from the post
    \*======================================================================*/

    function submitlinks($URI, $formvars = "", $formfiles = "")
    {
        if ($this->submit($URI, $formvars, $formfiles) !== false) {
            if ($this->lastredirectaddr)
                $URI = $this->lastredirectaddr;
            if (is_array($this->results)) {
                for ($x = 0; $x < count($this->results); $x++) {
                    $this->results[$x] = $this->_striplinks($this->results[$x]);
                    if ($this->expandlinks)
                        $this->results[$x] = $this->_expandlinks($this->results[$x], $URI);
                }
            } else {
                $this->results = $this->_striplinks($this->results);
                if ($this->expandlinks)
                    $this->results = $this->_expandlinks($this->results, $URI);
            }
            return $this;
        } else
            return false;
    }

    /*======================================================================*\
        Function:	submittext
        Purpose:	grab text from a form submission
        Input:		$URI	where you are submitting from
        Output:		$this->results	the text from the web page
    \*======================================================================*/

    function submittext($URI, $formvars = "", $formfiles = "")
    {
        if ($this->submit($URI, $formvars, $formfiles) !== false) {
            if ($this->lastredirectaddr)
                $URI = $this->lastredirectaddr;
            if (is_array($this->results)) {
                for ($x = 0; $x < count($this->results); $x++) {
                    $this->results[$x] = $this->_striptext($this->results[$x]);
                    if ($this->expandlinks)
                        $this->results[$x] = $this->_expandlinks($this->results[$x], $URI);
                }
            } else {
                $this->results = $this->_striptext($this->results);
                if ($this->expandlinks)
                    $this->results = $this->_expandlinks($this->results, $URI);
            }
            return $this;
        } else
            return false;
    }

    /*======================================================================*\
        Function:	set_submit_multipart
        Purpose:	Set the form submission content type to
                    multipart/form-data
    \*======================================================================*/
    function set_submit_multipart()
    {
        $this->_submit_type = "multipart/form-data";
        return $this;
    }

    /*======================================================================*\
        Function:	set_submit_normal
        Purpose:	Set the form submission content type to
                    application/x-www-form-urlencoded
    \*======================================================================*/
    function set_submit_normal()
    {
        $this->_submit_type = "application/x-www-form-urlencoded";
        return $this;
    }

    /*======================================================================*\
        Private functions
    \*======================================================================*/

    /*======================================================================*\
        Function:	_striplinks
        Purpose:	strip the hyperlinks from an html document
        Input:		$document	document to strip.
        Output:		$match		an array of the links
    \*======================================================================*/

    function _striplinks($document)
    {
        preg_match_all("'<\s*a\s.*?href\s*=\s*			# find <a href=
						([\"\'])?					# find single or double quote
						(?(1) (.*?)\\1 | ([^\s\>]+))		# if quote found, match up to next matching
													# quote, otherwise match up to next space
						'isx", $document, $links);

        // catenate the non-empty matches from the conditional subpattern

        while (list($key, $val) = each($links[2])) {
            if (!empty($val))
                $match[] = $val;
        }

        while (list($key, $val) = each($links[3])) {
            if (!empty($val))
                $match[] = $val;
        }

        // return the links
        return $match;
    }

    /*======================================================================*\
        Function:	_stripform
        Purpose:	strip the form elements from an html document
        Input:		$document	document to strip.
        Output:		$match		an array of the links
    \*======================================================================*/

    function _stripform($document)
    {
        preg_match_all("'<\/?(FORM|INPUT|SELECT|TEXTAREA|(OPTION))[^<>]*>(?(2)(.*(?=<\/?(option|select)[^<>]*>[\r\n]*)|(?=[\r\n]*))|(?=[\r\n]*))'Usi", $document, $elements);

        // catenate the matches
        $match = implode("\r\n", $elements[0]);

        // return the links
        return $match;
    }

    /*======================================================================*\
        Function:	_striptext
        Purpose:	strip the text from an html document
        Input:		$document	document to strip.
        Output:		$text		the resulting text
    \*======================================================================*/

    function _striptext($document)
    {

        // I didn't use preg eval (//e) since that is only available in PHP 4.0.
        // so, list your entities one by one here. I included some of the
        // more common ones.

        $search = array("'<script[^>]*?>.*?</script>'si", // strip out javascript
            "'<[\/\!]*?[^<>]*?>'si", // strip out html tags
            "'([\r\n])[\s]+'", // strip out white space
            "'&(quot|#34|#034|#x22);'i", // replace html entities
            "'&(amp|#38|#038|#x26);'i", // added hexadecimal values
            "'&(lt|#60|#060|#x3c);'i",
            "'&(gt|#62|#062|#x3e);'i",
            "'&(nbsp|#160|#xa0);'i",
            "'&(iexcl|#161);'i",
            "'&(cent|#162);'i",
            "'&(pound|#163);'i",
            "'&(copy|#169);'i",
            "'&(reg|#174);'i",
            "'&(deg|#176);'i",
            "'&(#39|#039|#x27);'",
            "'&(euro|#8364);'i", // europe
            "'&a(uml|UML);'", // german
            "'&o(uml|UML);'",
            "'&u(uml|UML);'",
            "'&A(uml|UML);'",
            "'&O(uml|UML);'",
            "'&U(uml|UML);'",
            "'ß'i",
        );
        $replace = array("",
            "",
            "\\1",
            "\"",
            "&",
            "<",
            ">",
            " ",
            chr(161),
            chr(162),
            chr(163),
            chr(169),
            chr(174),
            chr(176),
            chr(39),
            chr(128),
            "ä",
            "ö",
            "ü",
            "Ä",
            "Ö",
            "Ü",
            "ß",
        );

        $text = preg_replace($search, $replace, $document);

        return $text;
    }

    /*======================================================================*\
        Function:	_expandlinks
        Purpose:	expand each link into a fully qualified URL
        Input:		$links			the links to qualify
                    $URI			the full URI to get the base from
        Output:		$expandedLinks	the expanded links
    \*======================================================================*/

    function _expandlinks($links, $URI)
    {

        preg_match("/^[^\?]+/", $URI, $match);

        $match = preg_replace("|/[^\/\.]+\.[^\/\.]+$|", "", $match[0]);
        $match = preg_replace("|/$|", "", $match);
        $match_part = parse_url($match);
        $match_root =
            $match_part["scheme"] . "://" . $match_part["host"];

        $search = array("|^http://" . preg_quote($this->host) . "|i",
            "|^(\/)|i",
            "|^(?!http://)(?!mailto:)|i",
            "|/\./|",
            "|/[^\/]+/\.\./|"
        );

        $replace = array("",
            $match_root . "/",
            $match . "/",
            "/",
            "/"
        );

        $expandedLinks = preg_replace($search, $replace, $links);

        return $expandedLinks;
    }

    /*======================================================================*\
        Function:	_httprequest
        Purpose:	go get the http(s) data from the server
        Input:		$url		the url to fetch
                    $fp			the current open file pointer
                    $URI		the full URI
                    $body		body contents to send if any (POST)
        Output:
    \*======================================================================*/

    function _httprequest($url, $fp, $URI, $http_method, $content_type = "", $body = "")
    {
        $cookie_headers = '';
        if ($this->passcookies && $this->_redirectaddr)
            $this->setcookies();

        $URI_PARTS = parse_url($URI);
        if (empty($url))
            $url = "/";
        $headers = $http_method . " " . $url . " " . $this->_httpversion . "\r\n";
        if (!empty($this->host) && !isset($this->rawheaders['Host'])) {
            $headers .= "Host: " . $this->host;
            if (!empty($this->port) && $this->port != '80')
                $headers .= ":" . $this->port;
            $headers .= "\r\n";
        }
        if (!empty($this->agent))
            $headers .= "User-Agent: " . $this->agent . "\r\n";
        if (!empty($this->accept))
            $headers .= "Accept: " . $this->accept . "\r\n";
        if ($this->use_gzip) {
            // make sure PHP was built with --with-zlib
            // and we can handle gzipp'ed data
            if (function_exists('gzinflate')) {
                $headers .= "Accept-encoding: gzip\r\n";
            } else {
                trigger_error(
                    "use_gzip is on, but PHP was built without zlib support." .
                    "  Requesting file(s) without gzip encoding.",
                    E_USER_NOTICE);
            }
        }
        if (!empty($this->referer))
            $headers .= "Referer: " . $this->referer . "\r\n";
        if (!empty($this->cookies)) {
            if (!is_array($this->cookies))
                $this->cookies = (array)$this->cookies;

            reset($this->cookies);
            if (count($this->cookies) > 0) {
                $cookie_headers .= 'Cookie: ';
                foreach ($this->cookies as $cookieKey => $cookieVal) {
                    $cookie_headers .= $cookieKey . "=" . urlencode($cookieVal) . "; ";
                }
                $headers .= substr($cookie_headers, 0, -2) . "\r\n";
            }
        }
        if (!empty($this->rawheaders)) {
            if (!is_array($this->rawheaders))
                $this->rawheaders = (array)$this->rawheaders;
            while (list($headerKey, $headerVal) = each($this->rawheaders))
                $headers .= $headerKey . ": " . $headerVal . "\r\n";
        }
        if (!empty($content_type)) {
            $headers .= "Content-type: $content_type";
            if ($content_type == "multipart/form-data")
                $headers .= "; boundary=" . $this->_mime_boundary;
            $headers .= "\r\n";
        }
        if (!empty($body))
            $headers .= "Content-length: " . strlen($body) . "\r\n";
        if (!empty($this->user) || !empty($this->pass))
            $headers .= "Authorization: Basic " . base64_encode($this->user . ":" . $this->pass) . "\r\n";

        //add proxy auth headers
        if (!empty($this->proxy_user))
            $headers .= 'Proxy-Authorization: ' . 'Basic ' . base64_encode($this->proxy_user . ':' . $this->proxy_pass) . "\r\n";

        $headers .= "\r\n";

        // set the read timeout if needed
        if ($this->read_timeout > 0)
            socket_set_timeout($fp, $this->read_timeout);
        $this->timed_out = false;

        fwrite($fp, $headers . $body, strlen($headers . $body));

        $this->_redirectaddr = false;
        unset($this->headers);

        // content was returned gzip encoded?
        $is_gzipped = false;

        while ($currentHeader = fgets($fp, $this->_maxlinelen)) {
            if ($this->read_timeout > 0 && $this->_check_timeout($fp)) {
                $this->status = -100;
                return false;
            }

            if ($currentHeader == "\r\n")
                break;

            // if a header begins with Location: or URI:, set the redirect
            if (preg_match("/^(Location:|URI:)/i", $currentHeader)) {
                // get URL portion of the redirect
                preg_match("/^(Location:|URI:)[ ]+(.*)/i", chop($currentHeader), $matches);
                // look for :// in the Location header to see if hostname is included
                if (!preg_match("|\:\/\/|", $matches[2])) {
                    // no host in the path, so prepend
                    $this->_redirectaddr = $URI_PARTS["scheme"] . "://" . $this->host . ":" . $this->port;
                    // eliminate double slash
                    if (!preg_match("|^/|", $matches[2]))
                        $this->_redirectaddr .= "/" . $matches[2];
                    else
                        $this->_redirectaddr .= $matches[2];
                } else
                    $this->_redirectaddr = $matches[2];
            }

            if (preg_match("|^HTTP/|", $currentHeader)) {
                if (preg_match("|^HTTP/[^\s]*\s(.*?)\s|", $currentHeader, $status)) {
                    $this->status = $status[1];
                }
                $this->response_code = $currentHeader;
            }

            if (preg_match("/Content-Encoding: gzip/", $currentHeader)) {
                $is_gzipped = true;
            }

            $this->headers[] = $currentHeader;
        }

        $results = '';
        do {
            $_data = fread($fp, $this->maxlength);
            if (strlen($_data) == 0) {
                break;
            }
            $results .= $_data;
        } while (true);

        // gunzip
        if ($is_gzipped) {
            // per http://www.php.net/manual/en/function.gzencode.php
            $results = substr($results, 10);
            $results = gzinflate($results);
        }

        if ($this->read_timeout > 0 && $this->_check_timeout($fp)) {
            $this->status = -100;
            return false;
        }

        // check if there is a a redirect meta tag

        if (preg_match("'<meta[\s]*http-equiv[^>]*?content[\s]*=[\s]*[\"\']?\d+;[\s]*URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i", $results, $match)) {
            $this->_redirectaddr = $this->_expandlinks($match[1], $URI);
        }

        // have we hit our frame depth and is there frame src to fetch?
        if (($this->_framedepth < $this->maxframes) && preg_match_all("'<frame\s+.*src[\s]*=[\'\"]?([^\'\"\>]+)'i", $results, $match)) {
            $this->results[] = $results;
            for ($x = 0; $x < count($match[1]); $x++)
                $this->_frameurls[] = $this->_expandlinks($match[1][$x], $URI_PARTS["scheme"] . "://" . $this->host);
        } // have we already fetched framed content?
        elseif (is_array($this->results))
            $this->results[] = $results;
        // no framed content
        else
            $this->results = $results;

        return $this;
    }

    /*======================================================================*\
        Function:	setcookies()
        Purpose:	set cookies for a redirection
    \*======================================================================*/

    function setcookies()
    {
        for ($x = 0; $x < count($this->headers); $x++) {
            if (preg_match('/^set-cookie:[\s]+([^=]+)=([^;]+)/i', $this->headers[$x], $match))
                $this->cookies[$match[1]] = urldecode($match[2]);
        }
        return $this;
    }

    /*======================================================================*\
        Function:	_check_timeout
        Purpose:	checks whether timeout has occurred
        Input:		$fp	file pointer
    \*======================================================================*/

    function _check_timeout($fp)
    {
        if ($this->read_timeout > 0) {
            $fp_status = socket_get_status($fp);
            if ($fp_status["timed_out"]) {
                $this->timed_out = true;
                return true;
            }
        }
        return false;
    }

    /*======================================================================*\
        Function:	_connect
        Purpose:	make a socket connection
        Input:		$fp	file pointer
    \*======================================================================*/

    function _connect(&$fp)
    {
        if (!empty($this->proxy_host) && !empty($this->proxy_port)) {
            $this->_isproxy = true;

            $host = $this->proxy_host;
            $port = $this->proxy_port;

            if ($this->scheme == 'https') {
                trigger_error("HTTPS connections over proxy are currently not supported", E_USER_ERROR);
                exit;
            }
        } else {
            $host = $this->host;
            $port = $this->port;
        }

        $this->status = 0;

        $context_opts = array();

        if ($this->scheme == 'https') {
            // if cafile or capath is specified, enable certificate
            // verification (including name checks)
            if (isset($this->cafile) || isset($this->capath)) {
                $context_opts['ssl'] = array(
                    'verify_peer' => true,
                    'CN_match' => $this->host,
                    'disable_compression' => true,
                );

                if (isset($this->cafile))
                    $context_opts['ssl']['cafile'] = $this->cafile;
                if (isset($this->capath))
                    $context_opts['ssl']['capath'] = $this->capath;
            }

            $host = 'ssl://' . $host;
        }

        $context = stream_context_create($context_opts);

        if (version_compare(PHP_VERSION, '5.0.0', '>')) {
            if($this->scheme == 'http')
                $host = "tcp://" . $host;
            $fp = stream_socket_client(
                "$host:$port",
                $errno,
                $errmsg,
                $this->_fp_timeout,
                STREAM_CLIENT_CONNECT,
                $context);
        } else {
            $fp = fsockopen(
                $host,
                $port,
                $errno,
                $errstr,
                $this->_fp_timeout,
                $context);
        }

        if ($fp) {
            // socket connection succeeded
            return true;
        } else {
            // socket connection failed
            $this->status = $errno;
            switch ($errno) {
                case -3:
                    $this->error = "socket creation failed (-3)";
                case -4:
                    $this->error = "dns lookup failure (-4)";
                case -5:
                    $this->error = "connection refused or timed out (-5)";
                default:
                    $this->error = "connection failed (" . $errno . ")";
            }
            return false;
        }
    }

    /*======================================================================*\
        Function:	_disconnect
        Purpose:	disconnect a socket connection
        Input:		$fp	file pointer
    \*======================================================================*/

    function _disconnect($fp)
    {
        return (fclose($fp));
    }

    /*======================================================================*\
        Function:	_prepare_post_body
        Purpose:	Prepare post body according to encoding type
        Input:		$formvars  - form variables
                    $formfiles - form upload files
        Output:		post body
    \*======================================================================*/

    function _prepare_post_body($formvars, $formfiles)
    {
        settype($formvars, "array");
        settype($formfiles, "array");
        $postdata = '';

        if (count($formvars) == 0 && count($formfiles) == 0)
            return;

        switch ($this->_submit_type) {
            case "application/x-www-form-urlencoded":
                reset($formvars);
                while (list($key, $val) = each($formvars)) {
                    if (is_array($val) || is_object($val)) {
                        while (list($cur_key, $cur_val) = each($val)) {
                            $postdata .= urlencode($key) . "[]=" . urlencode($cur_val) . "&";
                        }
                    } else
                        $postdata .= urlencode($key) . "=" . urlencode($val) . "&";
                }
                break;

            case "multipart/form-data":
                $this->_mime_boundary = "Snoopy" . md5(uniqid(microtime()));

                reset($formvars);
                while (list($key, $val) = each($formvars)) {
                    if (is_array($val) || is_object($val)) {
                        while (list($cur_key, $cur_val) = each($val)) {
                            $postdata .= "--" . $this->_mime_boundary . "\r\n";
                            $postdata .= "Content-Disposition: form-data; name=\"$key\[\]\"\r\n\r\n";
                            $postdata .= "$cur_val\r\n";
                        }
                    } else {
                        $postdata .= "--" . $this->_mime_boundary . "\r\n";
                        $postdata .= "Content-Disposition: form-data; name=\"$key\"\r\n\r\n";
                        $postdata .= "$val\r\n";
                    }
                }

                reset($formfiles);
                while (list($field_name, $file_names) = each($formfiles)) {
                    settype($file_names, "array");
                    while (list(, $file_name) = each($file_names)) {
                        if (!is_readable($file_name)) continue;

                        $fp = fopen($file_name, "r");
                        $file_content = fread($fp, filesize($file_name));
                        fclose($fp);
                        $base_name = basename($file_name);

                        $postdata .= "--" . $this->_mime_boundary . "\r\n";
                        $postdata .= "Content-Disposition: form-data; name=\"$field_name\"; filename=\"$base_name\"\r\n\r\n";
                        $postdata .= "$file_content\r\n";
                    }
                }
                $postdata .= "--" . $this->_mime_boundary . "--\r\n";
                break;
        }

        return $postdata;
    }

    /*======================================================================*\
    Function:	getResults
    Purpose:	return the results of a request
    Output:		string results
    \*======================================================================*/

    function getResults()
    {
        return $this->results;
    }
}

?>


text:
<?php

namespace Oqq\Minc\Filesystem\Exception;

/**
 * @author Eric Braun <eb@oqq.be>
 */
class CouldNotReadFileContentException extends IOException
{
}


text:
#ifndef MESSAGE_FILTERS_SYNC_EXACT_TIME_H
#define MESSAGE_FILTERS_SYNC_EXACT_TIME_H

#include "message_filters/synchronizer.h"
#include "message_filters/connection.h"
#include "message_filters/null_types.h"
#include "message_filters/signal9.h"

#include <boost/tuple/tuple.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/function.hpp>
#include <boost/thread/mutex.hpp>

#include <boost/bind.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/noncopyable.hpp>
#include <boost/mpl/or.hpp>
#include <boost/mpl/at.hpp>
#include <boost/mpl/vector.hpp>

#include <ros/assert.h>
#include <ros/message_traits.h>
#include <ros/message_event.h>

#include <deque>
#include <vector>
#include <string>

namespace message_filters
{
namespace sync_policies
{

namespace mpl = boost::mpl;

template<typename M0, typename M1, typename M2 = NullType, typename M3 = NullType, typename M4 = NullType,
         typename M5 = NullType, typename M6 = NullType, typename M7 = NullType, typename M8 = NullType>
struct ExactTime : public PolicyBase<M0, M1, M2, M3, M4, M5, M6, M7, M8>
{
  typedef Synchronizer<ExactTime> Sync;
  typedef PolicyBase<M0, M1, M2, M3, M4, M5, M6, M7, M8> Super;
  typedef typename Super::Messages Messages;
  typedef typename Super::Signal Signal;
  typedef typename Super::Events Events;
  typedef typename Super::RealTypeCount RealTypeCount;
  typedef typename Super::M0Event M0Event;
  typedef typename Super::M1Event M1Event;
  typedef typename Super::M2Event M2Event;
  typedef typename Super::M3Event M3Event;
  typedef typename Super::M4Event M4Event;
  typedef typename Super::M5Event M5Event;
  typedef typename Super::M6Event M6Event;
  typedef typename Super::M7Event M7Event;
  typedef typename Super::M8Event M8Event;
  typedef boost::tuple<M0Event, M1Event, M2Event, M3Event, M4Event, M5Event, M6Event, M7Event, M8Event> Tuple;

  ExactTime(uint32_t queue_size)
  : parent_(0)
  , queue_size_(queue_size)
  {
  }

  ExactTime(const ExactTime& e)
  {
    *this = e;
  }

  ExactTime& operator=(const ExactTime& rhs)
  {
    parent_ = rhs.parent_;
    queue_size_ = rhs.queue_size_;
    last_signal_time_ = rhs.last_signal_time_;
    tuples_ = rhs.tuples_;

    return *this;
  }

  void initParent(Sync* parent)
  {
    parent_ = parent;
  }

  template<int i>
  void add(const typename mpl::at_c<Events, i>::type& evt)
  {
    ROS_ASSERT(parent_);

    namespace mt = ros::message_traits;

    boost::mutex::scoped_lock lock(mutex_);

    Tuple& t = tuples_[mt::TimeStamp<typename mpl::at_c<Messages, i>::type>::value(*evt.getMessage())];
    boost::get<i>(t) = evt;

    checkTuple(t);
  }

  template<class C>
  Connection registerDropCallback(const C& callback)
  {
    return drop_signal_.template addCallback(callback);
  }

  template<class C>
  Connection registerDropCallback(C& callback)
  {
    return drop_signal_.template addCallback(callback);
  }

  template<class C, typename T>
  Connection registerDropCallback(const C& callback, T* t)
  {
    return drop_signal_.template addCallback(callback, t);
  }

  template<class C, typename T>
  Connection registerDropCallback(C& callback, T* t)
  {
    return drop_signal_.template addCallback(callback, t);
  }

private:

  // assumes mutex_ is already locked
  void checkTuple(Tuple& t)
  {
    namespace mt = ros::message_traits;

    bool full = true;
    full = full && (bool)boost::get<0>(t).getMessage();
    full = full && (bool)boost::get<1>(t).getMessage();
    full = full && (RealTypeCount::value > 2 ? (bool)boost::get<2>(t).getMessage() : true);
    full = full && (RealTypeCount::value > 3 ? (bool)boost::get<3>(t).getMessage() : true);
    full = full && (RealTypeCount::value > 4 ? (bool)boost::get<4>(t).getMessage() : true);
    full = full && (RealTypeCount::value > 5 ? (bool)boost::get<5>(t).getMessage() : true);
    full = full && (RealTypeCount::value > 6 ? (bool)boost::get<6>(t).getMessage() : true);
    full = full && (RealTypeCount::value > 7 ? (bool)boost::get<7>(t).getMessage() : true);
    full = full && (RealTypeCount::value > 8 ? (bool)boost::get<8>(t).getMessage() : true);

    if (full)
    {
      parent_->signal(boost::get<0>(t), boost::get<1>(t), boost::get<2>(t),
                       boost::get<3>(t), boost::get<4>(t), boost::get<5>(t),
                       boost::get<6>(t), boost::get<7>(t), boost::get<8>(t));

      last_signal_time_ = mt::TimeStamp<M0>::value(*boost::get<0>(t).getMessage());

      tuples_.erase(last_signal_time_);

      clearOldTuples();
    }

    if (queue_size_ > 0)
    {
      while (tuples_.size() > queue_size_)
      {
        Tuple& t2 = tuples_.begin()->second;
        drop_signal_.call(boost::get<0>(t2), boost::get<1>(t2), boost::get<2>(t2),
                          boost::get<3>(t2), boost::get<4>(t2), boost::get<5>(t2),
                          boost::get<6>(t2), boost::get<7>(t2), boost::get<8>(t2));
        tuples_.erase(tuples_.begin());
      }
    }
  }

  // assumes mutex_ is already locked
  void clearOldTuples()
  {
    typename M_TimeToTuple::iterator it = tuples_.begin();
    typename M_TimeToTuple::iterator end = tuples_.end();
    for (; it != end;)
    {
      if (it->first <= last_signal_time_)
      {
        typename M_TimeToTuple::iterator old = it;
        ++it;

        Tuple& t = old->second;
        drop_signal_.call(boost::get<0>(t), boost::get<1>(t), boost::get<2>(t),
                          boost::get<3>(t), boost::get<4>(t), boost::get<5>(t),
                          boost::get<6>(t), boost::get<7>(t), boost::get<8>(t));
        tuples_.erase(old);
      }
      else
      {
        // the map is sorted by time, so we can ignore anything after this if this one's time is ok
        break;
      }
    }
  }

private:
  Sync* parent_;

  uint32_t queue_size_;
  typedef std::map<ros::Time, Tuple> M_TimeToTuple;
  M_TimeToTuple tuples_;
  ros::Time last_signal_time_;

  Signal drop_signal_;

  boost::mutex mutex_;
};

} // namespace sync
} // namespace message_filters

#endif // MESSAGE_FILTERS_SYNC_EXACT_TIME_H


text:
<?php

namespace App\Controller;

use App\Entity\Framework\LsAssociation;
use App\Entity\Framework\LsDoc;
use App\Entity\Framework\LsItem;
use App\Security\Permission;
use Doctrine\Persistence\ManagerRegistry;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;

#[Route(path: '/treeuiinfo')]
class UiInfoController extends AbstractController
{
    public function __construct(
        private readonly ManagerRegistry $managerRegistry,
    ) {
    }

    #[Route(path: '/multi/{id}', name: 'multi_tree_info_json', methods: ['POST'])]
    #[IsGranted(Permission::FRAMEWORK_EDIT, 'doc')]
    public function multiJsonInfo(Request $request, LsDoc $doc): JsonResponse
    {
        $objs = [];

        /** @var array $docs - argument passed as an array */
        $docs = $request->request->all('doc');
        foreach ($docs as $id) {
            $d = $this->managerRegistry->getRepository(LsDoc::class)
                ->find($id);
            if (null !== $d) {
                $objs['docs'][$id] = $this->generateDocArray($d);
            }
        }

        /** @var array $items - argument passed as an array */
        $items = $request->request->all('item');
        foreach ($items as $id) {
            $i = $this->managerRegistry->getRepository(LsItem::class)
                ->find($id);
            if (null !== $i) {
                $objs['items'][$id] = $this->generateItemArray($i);
            }
        }

        /** @var array $assocs - argument passed as an array */
        $assocs = $request->request->all('assoc');
        foreach ($assocs as $id) {
            $a = $this->managerRegistry->getRepository(LsAssociation::class)
                ->find($id);
            if (null !== $a) {
                $objs['assocs'][$id] = $this->generateAssociationArray($a);
            }
        }

        return new JsonResponse($objs);
    }

    #[Route(path: '/doc/{id}', name: 'lsdoc_tree_json', methods: ['GET'])]
    #[IsGranted(Permission::FRAMEWORK_EDIT, 'doc')]
    public function docJsonInfo(LsDoc $doc): JsonResponse
    {
        return $this->generateDocJsonResponse($doc);
    }

    #[Route(path: '/item/{id}', name: 'lsitem_tree_json', methods: ['GET'])]
    #[IsGranted(Permission::ITEM_EDIT, 'item')]
    public function itemJsonInfo(LsItem $item): JsonResponse
    {
        return $this->generateItemJsonResponse($item);
    }

    #[Route(path: '/association/{id}', name: 'doc_tree_association_json', methods: ['GET'])]
    #[Security("is_granted('edit', association.getLsDoc())")]
    public function associationJsonInfo(LsAssociation $association): JsonResponse
    {
        return $this->generateAssociationJsonResponse($association);
    }

    protected function generateDocJsonResponse(LsDoc $doc): JsonResponse
    {
        return new JsonResponse($this->generateDocArray($doc));
    }

    protected function generateDocArray(LsDoc $doc): array
    {
        return [
            'id' => $doc->getId(),
            'identifier' => $doc->getIdentifier(),
            'uri' => $doc->getUri(),
            'title' => $doc->getTitle(),
            'officialSourceURL' => $doc->getOfficialUri(),
            'creator' => $doc->getCreator(),
            'publisher' => $doc->getPublisher(),
            'description' => $doc->getDescription(),
            'language' => $doc->getLanguage(),
            'adoptionStatus' => $doc->getAdoptionStatus(),
            'statusStart' => $doc->getStatusStart()?->format('Y-m-d'),
            'statusEnd' => $doc->getStatusEnd()?->format('Y-m-d'),
            'note' => $doc->getNote(),
            'version' => $doc->getVersion(),
            'lastChangeDateTime' => $doc->getChangedAt()->format('Y-m-d\TH:i:s'),
        ];
    }

    protected function generateItemJsonResponse(LsItem $item): JsonResponse
    {
        return new JsonResponse($this->generateItemArray($item));
    }

    protected function generateItemArray(LsItem $item): array
    {
        // retrieve isChildOf assoc id for the item
        $assoc = $this->managerRegistry->getRepository(LsAssociation::class)->findOneBy([
            'originLsItem' => $item,
            'type' => LsAssociation::CHILD_OF,
            'lsDoc' => $item->getLsDoc(),
        ]);

        $ret = [
            'id' => $item->getId(),
            'identifier' => $item->getIdentifier(),
            'uri' => $item->getUri(),
            'fullStatement' => $item->getFullStatement(),
            'humanCodingScheme' => $item->getHumanCodingScheme(),
            'listEnumInSource' => $item->getListEnumInSource(),
            'abbreviatedStatement' => $item->getAbbreviatedStatement(),
            'conceptKeywords' => $item->getConceptKeywordsString(),
            'conceptKeywordsUri' => $item->getConceptKeywordsUri(),
            'notes' => $item->getNotes(),
            'language' => $item->getLanguage(),
            'educationalAlignment' => $item->getEducationalAlignment(),
            'itemType' => $item->getItemType(),
            'changedAt' => $item->getChangedAt(),
            'assocData' => [],
            'extra' => $item->getExtra(),
        ];

        if (null !== $assoc) {
            $destItem = $assoc->getDestinationNodeIdentifier();

            if (null !== $destItem) {
                $ret['assocData'] = [
                    'assocDoc' => $assoc->getLsDocIdentifier(),
                    'assocId' => $assoc->getId(),
                    'identifier' => $assoc->getIdentifier(),
                    'uri' => $assoc->getUri(),
                    //'groupId' => $assoc->getGroup()?->getId(),
                    'dest' => ['doc' => $assoc->getLsDocIdentifier(), 'item' => $destItem, 'uri' => $destItem],
                ];
                if ($assoc->getGroup()) {
                    $ret['assocData']['groupId'] = $assoc->getGroup()->getId();
                }
                if ($assoc->getSequenceNumber()) {
                    $ret['assocData']['seq'] = $assoc->getSequenceNumber();
                }
            }
        }

        $json = $this->renderView('framework/doc_tree/export_item.json.twig', ['lsItem' => $ret]);

        return \json_decode($json, true, 512, JSON_THROW_ON_ERROR);
    }

    protected function generateAssociationJsonResponse(LsAssociation $association): JsonResponse
    {
        return new JsonResponse($this->generateAssociationArray($association));
    }

    protected function generateAssociationArray(LsAssociation $association): array
    {
        $origin = $association->getOrigin();
        if (\is_string($origin)) {
            $originIdentifier = preg_replace('/^local:/', '', $origin);
            $originDoc = $association->getLsDocIdentifier();
        } else {
            $originIdentifier = $origin->getIdentifier();
            if ($origin instanceof LsDoc) {
                $originDoc = $origin->getIdentifier();
            } else {
                $originDoc = $origin->getLsDocIdentifier();
            }
        }
        $dest = $association->getDestination();
        if (\is_string($dest)) {
            $destIdentifier = preg_replace('/^local:/', '', $dest);
            $destDoc = $association->getLsDocIdentifier();
        } else {
            $destIdentifier = $dest->getIdentifier();
            if ($dest instanceof LsDoc) {
                $destDoc = $dest->getIdentifier();
            } else {
                $destDoc = $dest->getLsDocIdentifier();
            }
        }

        return [
            'id' => $association->getId(),
            'identifier' => $association->getIdentifier(),
            'origin' => [
                'doc' => $originDoc,
                'item' => $originIdentifier,
                'uri' => $originIdentifier,
            ],
            'type' => $association->getNormalizedType(),
            'dest' => [
                'doc' => $destDoc,
                'item' => $destIdentifier,
                'uri' => $destIdentifier,
            ],
            'groupId' => $association->getGroup()?->getId(),
            'seq' => $association->getSequenceNumber(),
            'mod' => $association->getUpdatedAt()->format('Y-m-d\TH:i:s'),
        ];
    }
}


text:
package com.navercorp.pinpoint.test;

import com.navercorp.pinpoint.profiler.context.storage.Storage;
import com.navercorp.pinpoint.profiler.context.storage.StorageFactory;
import com.navercorp.pinpoint.profiler.sender.DataSender;

/**
 * @author hyungil.jeong
 * @author emeroad
 */
public class SimpleSpanStorageFactory implements StorageFactory {

    private final DataSender dataSender;

    public SimpleSpanStorageFactory(DataSender dataSender) {
        if (dataSender == null) {
            throw new NullPointerException("dataSender must not be null");
        }
        this.dataSender = dataSender;
    }

    @Override
    public Storage createStorage() {
        return new SimpleSpanStorage(this.dataSender);
    }

}


text:
package ga

//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
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

import (
	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)

// UpdateEndpointGroup invokes the ga.UpdateEndpointGroup API synchronously
func (client *Client) UpdateEndpointGroup(request *UpdateEndpointGroupRequest) (response *UpdateEndpointGroupResponse, err error) {
	response = CreateUpdateEndpointGroupResponse()
	err = client.DoAction(request, response)
	return
}

// UpdateEndpointGroupWithChan invokes the ga.UpdateEndpointGroup API asynchronously
func (client *Client) UpdateEndpointGroupWithChan(request *UpdateEndpointGroupRequest) (<-chan *UpdateEndpointGroupResponse, <-chan error) {
	responseChan := make(chan *UpdateEndpointGroupResponse, 1)
	errChan := make(chan error, 1)
	err := client.AddAsyncTask(func() {
		defer close(responseChan)
		defer close(errChan)
		response, err := client.UpdateEndpointGroup(request)
		if err != nil {
			errChan <- err
		} else {
			responseChan <- response
		}
	})
	if err != nil {
		errChan <- err
		close(responseChan)
		close(errChan)
	}
	return responseChan, errChan
}

// UpdateEndpointGroupWithCallback invokes the ga.UpdateEndpointGroup API asynchronously
func (client *Client) UpdateEndpointGroupWithCallback(request *UpdateEndpointGroupRequest, callback func(response *UpdateEndpointGroupResponse, err error)) <-chan int {
	result := make(chan int, 1)
	err := client.AddAsyncTask(func() {
		var response *UpdateEndpointGroupResponse
		var err error
		defer close(result)
		response, err = client.UpdateEndpointGroup(request)
		callback(response, err)
		result <- 1
	})
	if err != nil {
		defer close(result)
		callback(nil, err)
		result <- 0
	}
	return result
}

// UpdateEndpointGroupRequest is the request struct for api UpdateEndpointGroup
type UpdateEndpointGroupRequest struct {
	*requests.RpcRequest
	PortOverrides              *[]UpdateEndpointGroupPortOverrides          `position:"Query" name:"PortOverrides"  type:"Repeated"`
	ClientToken                string                                       `position:"Query" name:"ClientToken"`
	HealthCheckIntervalSeconds requests.Integer                             `position:"Query" name:"HealthCheckIntervalSeconds"`
	Description                string                                       `position:"Query" name:"Description"`
	HealthCheckProtocol        string                                       `position:"Query" name:"HealthCheckProtocol"`
	EndpointRequestProtocol    string                                       `position:"Query" name:"EndpointRequestProtocol"`
	HealthCheckPath            string                                       `position:"Query" name:"HealthCheckPath"`
	EndpointConfigurations     *[]UpdateEndpointGroupEndpointConfigurations `position:"Query" name:"EndpointConfigurations"  type:"Repeated"`
	EndpointGroupId            string                                       `position:"Query" name:"EndpointGroupId"`
	TrafficPercentage          requests.Integer                             `position:"Query" name:"TrafficPercentage"`
	HealthCheckPort            requests.Integer                             `position:"Query" name:"HealthCheckPort"`
	ThresholdCount             requests.Integer                             `position:"Query" name:"ThresholdCount"`
	EndpointGroupRegion        string                                       `position:"Query" name:"EndpointGroupRegion"`
	Name                       string                                       `position:"Query" name:"Name"`
}

// UpdateEndpointGroupPortOverrides is a repeated param struct in UpdateEndpointGroupRequest
type UpdateEndpointGroupPortOverrides struct {
	ListenerPort string `name:"ListenerPort"`
	EndpointPort string `name:"EndpointPort"`
}

// UpdateEndpointGroupEndpointConfigurations is a repeated param struct in UpdateEndpointGroupRequest
type UpdateEndpointGroupEndpointConfigurations struct {
	Type                       string `name:"Type"`
	EnableClientIPPreservation string `name:"EnableClientIPPreservation"`
	Weight                     string `name:"Weight"`
	EnableProxyProtocol        string `name:"EnableProxyProtocol"`
	Endpoint                   string `name:"Endpoint"`
}

// UpdateEndpointGroupResponse is the response struct for api UpdateEndpointGroup
type UpdateEndpointGroupResponse struct {
	*responses.BaseResponse
	RequestId string `json:"RequestId" xml:"RequestId"`
}

// CreateUpdateEndpointGroupRequest creates a request to invoke UpdateEndpointGroup API
func CreateUpdateEndpointGroupRequest() (request *UpdateEndpointGroupRequest) {
	request = &UpdateEndpointGroupRequest{
		RpcRequest: &requests.RpcRequest{},
	}
	request.InitWithApiInfo("Ga", "2019-11-20", "UpdateEndpointGroup", "gaplus", "openAPI")
	request.Method = requests.POST
	return
}

// CreateUpdateEndpointGroupResponse creates a response to parse from UpdateEndpointGroup response
func CreateUpdateEndpointGroupResponse() (response *UpdateEndpointGroupResponse) {
	response = &UpdateEndpointGroupResponse{
		BaseResponse: &responses.BaseResponse{},
	}
	return
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://docbook.org/xml/5.1/rng/docbook.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://docbook.org/xml/5.1/sch/docbook.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<chapter xmlns="http://docbook.org/ns/docbook"
    xmlns:xlink="http://www.w3.org/1999/xlink" version="5.1">
     <title>KNART statement supports</title>
     <para>KNARTs support the creation of statements through standardized questionnaires and order
        sets. </para>
</chapter>


text:
<!DOCTYPE html>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="generator" content="Laika 0.18.0 + Helium Theme" />
    <title>${cursor.currentDocument.title}</title>
    @:for(laika.site.metadata.authors)
      <meta name="author" content="${_}"/>
    @:@
    @:for(laika.site.metadata.description)
      <meta name="description" content="${_}"/>
    @:@
    @:for(helium.favIcons)
      <link rel="icon" @:attribute(sizes, _.sizes) @:attribute(type, _.type) href="@:path(_.target)"/>
    @:@
    @:for(helium.webFonts)
      <link rel="stylesheet" href="${_}">
    @:@
    @:linkCSS { paths = ${helium.site.includeCSS} }
    @:linkJS { paths = ${helium.site.includeJS} }

    @:heliumInitPreview(container)

          @:icon(navigationMenu)

        @:for(laika.versions)

            Documentation

        @:@

      ${?helium.topBar.home}

      ${?helium.topBar.links}

      @:navigationTree {
        entries = [
          { target = "/", excludeRoot = true, excludeSections = true, depth = 2 }
        ]
      }

Projects

http4s

blaze

http4s-jdk-http-client

http4s-dom

rho

feral

${cursor.currentDocument.title}

        @:navigationTree {
          entries = [
           { target = "#", excludeRoot = true, depth = 2 }
          ]
        }

@:for(helium.markupEditLinks)${_.icon}${_.text}@:@

        ${cursor.currentDocument.content}

          http4s is a Typelevel Project distributed under the Apache 2 License.


text:
'use strict';
/*jshint node:true, mocha:true, expr:true*/
var expect = require('chai').expect;

var log = require('../../../lib/util/logging.js');

describe('log', function() {
  it('should initialize', function() {
    expect(log).to.be.an('Object');
    expect(log).to.have.all.keys('trace', 'debug', 'info', 'warn', 'error', 'fatal');
  });
  it('should log fatal', function() {
    log.fatal('fatal');
  });
  it('should log error', function() {
    log.error('error');
  });
  it('should log warn', function() {
    log.warn('warn');
  });
  it('should log info', function() {
    log.info('info');
  });
  it('should log debug', function() {
    log.debug('debug');
  });
  it('should log trace', function() {
    log.trace('trace');
  });
});


text:
class UserActionsUI : public content::WebUIController {
 public:
  explicit UserActionsUI(content::WebUI* contents);
  virtual ~UserActionsUI();

 private:
  DISALLOW_COPY_AND_ASSIGN(UserActionsUI);
};

#endif  // CHROME_BROWSER_UI_WEBUI_USER_ACTIONS_USER_ACTIONS_UI_H_