text:
#import "PanelController.h"
#import "BackgroundView.h"
#import "StatusItemView.h"
#import "MenubarController.h"
#import "ApplicationDelegate.h"

#import <Sparkle/Sparkle.h>

//remote
#import "SRActionHandler.h"

#define OPEN_DURATION .00
#define CLOSE_DURATION .00

#define SEARCH_INSET 17

#define POPUP_HEIGHT 180
#define PANEL_WIDTH 280
#define MENU_ANIMATION_DURATION .1

#pragma mark -

@implementation PanelController

@synthesize backgroundView = _backgroundView;
@synthesize hasActivePanel = _hasActivePanel;
@synthesize delegate = _delegate;
@synthesize headerText = _headerText;
@synthesize channelText = _channelText;
@synthesize statusText = _statusText;
@synthesize preferencesButton;
@synthesize quitButton;
@synthesize channel;

#pragma mark -

- (id)initWithDelegate:(id<PanelControllerDelegate>)delegate
{
    self = [super initWithWindowNibName:@"Panel"];
    if (self != nil)
    {
        _delegate = delegate;
    }
    return self;
}

- (void)dealloc
{

}

#pragma mark -

- (void)awakeFromNib
{
    [super awakeFromNib];

    // Make a fully skinned panel
    NSPanel *panel = (id)[self window];
    [panel setAcceptsMouseMovedEvents:YES];
    [panel setLevel:NSPopUpMenuWindowLevel];
    [panel setOpaque:NO];
    [panel setBackgroundColor:[NSColor clearColor]];
    [_channelText setStringValue:channel];
    [_statusText setAttributedStringValue:[self formattedStatusText]];
}

#pragma mark - Public accessors

- (BOOL)hasActivePanel
{
    return _hasActivePanel;
}

- (void)setHasActivePanel:(BOOL)flag
{
    if (_hasActivePanel != flag)
    {
        _hasActivePanel = flag;

        if (_hasActivePanel)
        {
            [self openPanel];
        }
        else
        {
            [self closePanel];
        }
    }
}

#pragma mark - NSWindowDelegate

- (void)windowWillClose:(NSNotification *)notification
{
    self.hasActivePanel = NO;
}

- (void)windowDidResignKey:(NSNotification *)notification;
{
    if ([[self window] isVisible])
    {
        self.hasActivePanel = NO;
    }
}

- (void)windowDidResize:(NSNotification *)notification
{
    NSWindow *panel = [self window];
    NSRect statusRect = [self statusRectForWindow:panel];
    NSRect panelRect = [panel frame];

    CGFloat statusX = roundf(NSMidX(statusRect));
    CGFloat panelX = statusX - NSMinX(panelRect);

    self.backgroundView.arrowX = panelX;
}

#pragma mark - Keyboard

- (void)cancelOperation:(id)sender
{
    self.hasActivePanel = NO;
}

#pragma mark - Public methods

- (NSRect)statusRectForWindow:(NSWindow *)window
{
    NSRect screenRect = [[[NSScreen screens] objectAtIndex:0] frame];
    NSRect statusRect = NSZeroRect;

    StatusItemView *statusItemView = nil;
    if ([self.delegate respondsToSelector:@selector(statusItemViewForPanelController:)])
    {
        statusItemView = [self.delegate statusItemViewForPanelController:self];
    }

    if (statusItemView)
    {
        statusRect = statusItemView.globalRect;
        statusRect.origin.y = NSMinY(statusRect) - NSHeight(statusRect);
    }
    else
    {
        statusRect.size = NSMakeSize(STATUS_ITEM_VIEW_WIDTH, [[NSStatusBar systemStatusBar] thickness]);
        statusRect.origin.x = roundf((NSWidth(screenRect) - NSWidth(statusRect)) / 2);
        statusRect.origin.y = NSHeight(screenRect) - NSHeight(statusRect) * 2;
    }
    return statusRect;
}

- (void)openPanel
{
    NSWindow *panel = [self window];

    NSRect screenRect = [[[NSScreen screens] objectAtIndex:0] frame];
    NSRect statusRect = [self statusRectForWindow:panel];

    NSRect panelRect = [panel frame];
//    panelRect.size.width = PANEL_WIDTH;
//    panelRect.size.height = POPUP_HEIGHT;
    panelRect.origin.x = roundf(NSMidX(statusRect) - NSWidth(panelRect) / 2);
    panelRect.origin.y = NSMaxY(statusRect) - NSHeight(panelRect);

    if (NSMaxX(panelRect) > (NSMaxX(screenRect) - ARROW_HEIGHT))
        panelRect.origin.x -= NSMaxX(panelRect) - (NSMaxX(screenRect) - ARROW_HEIGHT);

    [NSApp activateIgnoringOtherApps:NO];
    [panel setAlphaValue:0];
    [panel setFrame:statusRect display:YES];
    [panel makeKeyAndOrderFront:nil];

    NSTimeInterval openDuration = OPEN_DURATION;

    NSEvent *currentEvent = [NSApp currentEvent];
    if ([currentEvent type] == NSLeftMouseDown)
    {
        NSUInteger clearFlags = ([currentEvent modifierFlags] & NSDeviceIndependentModifierFlagsMask);
        BOOL shiftPressed = (clearFlags == NSShiftKeyMask);
        BOOL shiftOptionPressed = (clearFlags == (NSShiftKeyMask | NSAlternateKeyMask));
        if (shiftPressed || shiftOptionPressed)
        {
            openDuration *= 10;

            if (shiftOptionPressed)
                NSLog(@"Icon is at %@\n\tMenu is on screen %@\n\tWill be animated to %@",
                      NSStringFromRect(statusRect), NSStringFromRect(screenRect), NSStringFromRect(panelRect));
        }
    }

    [NSAnimationContext beginGrouping];
    [[NSAnimationContext currentContext] setDuration:openDuration];
    [[panel animator] setFrame:panelRect display:YES];
    [[panel animator] setAlphaValue:1];
    [NSAnimationContext endGrouping];
}

- (void)closePanel
{
    [NSAnimationContext beginGrouping];
    [[NSAnimationContext currentContext] setDuration:CLOSE_DURATION];
    [[[self window] animator] setAlphaValue:0];
    [NSAnimationContext endGrouping];

    dispatch_after(dispatch_walltime(NULL, NSEC_PER_SEC * CLOSE_DURATION * 2), dispatch_get_main_queue(), ^{

        [self.window orderOut:nil];
    });
}

- (void)update
{
    [_statusText setAttributedStringValue:[self formattedStatusText]];
    [_channelText setStringValue:channel];

    /* do other stuff, like channel */
    // ta da
}

- (NSAttributedString *)formattedStatusText
{

    ApplicationDelegate *appDelegate = (ApplicationDelegate *)[[NSApplication sharedApplication] delegate];
    NSString *status;
    NSColor *color;

    /* update connection status text */
    NSInteger num = [appDelegate numberActiveControllers];
    if (num > 0) {
        CGFloat red = 46.0f/255.0f;
        CGFloat green = 204.0f/255.0f;
        CGFloat blue = 133.0f/255.0f;

        color = [NSColor colorWithCalibratedRed:red green:green blue:blue alpha:1.0f];

        NSString *format = (num == 1) ? @"%ld controller connected" : @"%ld controllers connected";
        status = [NSString stringWithFormat:format, num];
    } else {
        CGFloat red = 192.0f/255.0f;
        CGFloat green = 57.0f/255.0f;
        CGFloat blue = 43.0f/255.0f;

        color = [NSColor colorWithCalibratedRed:red green:green blue:blue alpha:1.0f];
        status = [NSString stringWithFormat:@"No controllers connected"];
    }

    NSMutableDictionary *options = [NSMutableDictionary dictionary];

    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc]init] ;
    [paragraphStyle setAlignment:NSCenterTextAlignment];

    [options setObject:paragraphStyle forKey:NSParagraphStyleAttributeName];
    [options setObject:color forKey:NSForegroundColorAttributeName];

    NSAttributedString *aString = [[NSAttributedString alloc] initWithString:status attributes:options];

    return aString;
}

- (IBAction)preferencesClicked:(id)sender {
    ApplicationDelegate *app = (ApplicationDelegate *)[[NSApplication sharedApplication] delegate];
    [app generateNewChannel];
}
- (IBAction)quitClicked:(id)sender {
    [NSApp terminate:self];
}

@end


text:
package org.example.logic;

import io.github.whiskeysierra.archer.Logic;
import org.example.SomeLogic;

@Logic
public final class LogicCallingLogic {

    private SomeLogic logic;

    public void send() {
        logic.process();
    }

}

redpajama_set_name: RedPajamaGithub


text:
package org.apache.pulsar.functions.worker;

import java.io.IOException;
import java.util.Optional;
import lombok.extern.slf4j.Slf4j;
import org.apache.bookkeeper.common.util.OrderedExecutor;
import org.apache.pulsar.broker.PulsarServerException;
import org.apache.pulsar.broker.ServiceConfiguration;
import org.apache.pulsar.broker.authentication.AuthenticationService;
import org.apache.pulsar.broker.authorization.AuthorizationService;
import org.apache.pulsar.broker.resources.PulsarResources;
import org.apache.pulsar.common.configuration.PulsarConfigurationLoader;
import org.apache.pulsar.functions.worker.rest.WorkerServer;
import org.apache.pulsar.functions.worker.service.WorkerServiceLoader;
import org.apache.pulsar.metadata.api.extended.MetadataStoreExtended;

@Slf4j
public class Worker {

    private final WorkerConfig workerConfig;
    private final WorkerService workerService;
    private WorkerServer server;

    private final OrderedExecutor orderedExecutor =
            OrderedExecutor.newBuilder().numThreads(8).name("zk-cache-ordered").build();
    private PulsarResources pulsarResources;
    private MetadataStoreExtended configMetadataStore;
    private final ErrorNotifier errorNotifier;

    public Worker(WorkerConfig workerConfig) {
        this.workerConfig = workerConfig;
        this.workerService = WorkerServiceLoader.load(workerConfig);
        this.errorNotifier = ErrorNotifier.getDefaultImpl();
    }

    protected void start() throws Exception {
        workerService.initAsStandalone(workerConfig);
        workerService.start(getAuthenticationService(), getAuthorizationService(), errorNotifier);
        server = new WorkerServer(workerService, getAuthenticationService());
        server.start();
        log.info("/** Started worker server **/");

        try {
            errorNotifier.waitForError();
        } catch (Throwable th) {
            log.error("!-- Fatal error encountered. Worker will exit now. --!", th);
            throw th;
        }
    }

    private AuthorizationService getAuthorizationService() throws PulsarServerException {

        if (this.workerConfig.isAuthorizationEnabled()) {

            log.info("starting configuration cache service");
            try {
                configMetadataStore = PulsarResources.createMetadataStore(
                        workerConfig.getConfigurationMetadataStoreUrl(),
                        (int) workerConfig.getMetadataStoreSessionTimeoutMillis());
            } catch (IOException e) {
                throw new PulsarServerException(e);
            }
            pulsarResources = new PulsarResources(null, configMetadataStore);
            return new AuthorizationService(getServiceConfiguration(), this.pulsarResources);
            }
        return null;
    }

    private AuthenticationService getAuthenticationService() throws PulsarServerException {
        return new AuthenticationService(getServiceConfiguration());
    }

    protected void stop() {
        try {
            if (null != this.server) {
                this.server.stop();
            }
            workerService.stop();
        } catch (Exception e) {
            log.warn("Failed to gracefully stop worker service ", e);
        }

        if (this.configMetadataStore != null) {
            try {
                this.configMetadataStore.close();
            } catch (Exception e) {
                log.warn("Failed to close global zk cache ", e);
            }
        }

        if (orderedExecutor != null) {
            orderedExecutor.shutdownNow();
        }
    }

    public Optional<Integer> getListenPortHTTP() {
        return this.server.getListenPortHTTP();
    }

    public Optional<Integer> getListenPortHTTPS() {
        return this.server.getListenPortHTTPS();
    }

    private ServiceConfiguration getServiceConfiguration() {
        ServiceConfiguration serviceConfiguration = PulsarConfigurationLoader.convertFrom(workerConfig);
        serviceConfiguration.setClusterName(workerConfig.getPulsarFunctionsCluster());
        return serviceConfiguration;
    }
}


text:
package org.apache.beam.sdk.transforms;

import java.io.Serializable;
import java.util.Comparator;
import org.apache.beam.sdk.transforms.Combine.BinaryCombineFn;
import org.apache.beam.sdk.transforms.display.DisplayData;
import org.checkerframework.checker.nullness.qual.Nullable;

/**
 * {@code PTransform}s for computing the maximum of the elements in a {@code PCollection}, or the
 * maximum of the values associated with each key in a {@code PCollection} of {@code KV}s.
 *
 *
Example 1: get the maximum of a {@code PCollection} of {@code Double}s.
 *
 *
{@code
 * PCollection<Double> input = ...;
 * PCollection<Double> max = input.apply(Max.doublesGlobally());
 * }

 *
 *
Example 2: calculate the maximum of the {@code Integer}s associated with each unique key
 * (which is of type {@code String}).
 *
 *
{@code
 * PCollection<KV<String, Integer>> input = ...;
 * PCollection<KV<String, Integer>> maxPerKey = input
 *     .apply(Max.<String>integersPerKey());
 * }

 */
@SuppressWarnings({
  "nullness" // TODO(https://github.com/apache/beam/issues/20497)
})
public class Max {

  private Max() {
    // do not instantiate
  }

  /**
   * Returns a {@code PTransform} that takes an input {@code PCollection<Integer>} and returns a
   * {@code PCollection<Integer>} whose contents is the maximum of the input {@code PCollection}'s
   * elements, or {@code Integer.MIN_VALUE} if there are no elements.
   */
  public static Combine.Globally<Integer, Integer> integersGlobally() {
    return Combine.globally(new MaxIntegerFn());
  }

  /**
   * Returns a {@code PTransform} that takes an input {@code PCollection<KV<K, Integer>>} and
   * returns a {@code PCollection<KV<K, Integer>>} that contains an output element mapping each
   * distinct key in the input {@code PCollection} to the maximum of the values associated with that
   * key in the input {@code PCollection}.
   *
   *
See {@link Combine.PerKey} for how this affects timestamps and windowing.
   */
  public static <K> Combine.PerKey<K, Integer, Integer> integersPerKey() {
    return Combine.perKey(new MaxIntegerFn());
  }

  /**
   * Returns a {@code PTransform} that takes an input {@code PCollection<Long>} and returns a {@code
   * PCollection<Long>} whose contents is the maximum of the input {@code PCollection}'s elements,
   * or {@code Long.MIN_VALUE} if there are no elements.
   */
  public static Combine.Globally<Long, Long> longsGlobally() {
    return Combine.globally(new MaxLongFn());
  }

  /**
   * Returns a {@code PTransform} that takes an input {@code PCollection<KV<K, Long>>} and returns a
   * {@code PCollection<KV<K, Long>>} that contains an output element mapping each distinct key in
   * the input {@code PCollection} to the maximum of the values associated with that key in the
   * input {@code PCollection}.
   *
   *
See {@link Combine.PerKey} for how this affects timestamps and windowing.
   */
  public static <K> Combine.PerKey<K, Long, Long> longsPerKey() {
    return Combine.perKey(new MaxLongFn());
  }

  /**
   * Returns a {@code PTransform} that takes an input {@code PCollection<Double>} and returns a
   * {@code PCollection<Double>} whose contents is the maximum of the input {@code PCollection}'s
   * elements, or {@code Double.NEGATIVE_INFINITY} if there are no elements.
   */
  public static Combine.Globally<Double, Double> doublesGlobally() {
    return Combine.globally(new MaxDoubleFn());
  }

  /**
   * Returns a {@code PTransform} that takes an input {@code PCollection<KV<K, Double>>} and returns
   * a {@code PCollection<KV<K, Double>>} that contains an output element mapping each distinct key
   * in the input {@code PCollection} to the maximum of the values associated with that key in the
   * input {@code PCollection}.
   *
   *
See {@link Combine.PerKey} for how this affects timestamps and windowing.
   */
  public static <K> Combine.PerKey<K, Double, Double> doublesPerKey() {
    return Combine.perKey(new MaxDoubleFn());
  }

  /**
   * A {@code CombineFn} that computes the maximum of a collection of {@code Integer}s, useful as an
   * argument to {@link Combine#globally} or {@link Combine#perKey}.
   */
  public static Combine.BinaryCombineIntegerFn ofIntegers() {
    return new Max.MaxIntegerFn();
  }

  /**
   * A {@code CombineFn} that computes the maximum of a collection of {@code Long}s, useful as an
   * argument to {@link Combine#globally} or {@link Combine#perKey}.
   */
  public static Combine.BinaryCombineLongFn ofLongs() {
    return new Max.MaxLongFn();
  }

  /**
   * A {@code CombineFn} that computes the maximum of a collection of {@code Double}s, useful as an
   * argument to {@link Combine#globally} or {@link Combine#perKey}.
   */
  public static Combine.BinaryCombineDoubleFn ofDoubles() {
    return new Max.MaxDoubleFn();
  }

  /**
   * A {@code CombineFn} that computes the maximum of a collection of elements of type {@code T}
   * using an arbitrary {@link Comparator} and {@code identity}, useful as an argument to {@link
   * Combine#globally} or {@link Combine#perKey}.
   *
   * @param <T> the type of the values being compared
   */
  public static <T, ComparatorT extends Comparator<? super T> & Serializable> BinaryCombineFn<T> of(
      final T identity, final ComparatorT comparator) {
    return new MaxFn<>(identity, comparator);
  }

  /**
   * A {@code CombineFn} that computes the maximum of a collection of elements of type {@code T}
   * using an arbitrary {@link Comparator}, useful as an argument to {@link Combine#globally} or
   * {@link Combine#perKey}.
   *
   * @param <T> the type of the values being compared
   */
  public static <T, ComparatorT extends Comparator<? super T> & Serializable> BinaryCombineFn<T> of(
      final ComparatorT comparator) {
    return new MaxFn<>(null, comparator);
  }

  public static <T extends Comparable<? super T>> BinaryCombineFn<T> naturalOrder(T identity) {
    return new MaxFn<>(identity, new Top.Natural<>());
  }

  public static <T extends Comparable<? super T>> BinaryCombineFn<T> naturalOrder() {
    return new MaxFn<>(null, new Top.Natural<>());
  }

  /**
   * Returns a {@code PTransform} that takes an input {@code PCollection<T>} and returns a {@code
   * PCollection<T>} whose contents is the maximum according to the natural ordering of {@code T} of
   * the input {@code PCollection}'s elements, or {@code null} if there are no elements.
   */
  public static <T extends Comparable<? super T>> Combine.Globally<T, T> globally() {
    return Combine.globally(Max.<T>naturalOrder());
  }

  /**
   * Returns a {@code PTransform} that takes an input {@code PCollection<KV<K, T>>} and returns a
   * {@code PCollection<KV<K, T>>} that contains an output element mapping each distinct key in the
   * input {@code PCollection} to the maximum according to the natural ordering of {@code T} of the
   * values associated with that key in the input {@code PCollection}.
   *
   *
See {@link Combine.PerKey} for how this affects timestamps and windowing.
   */
  public static <K, T extends Comparable<? super T>> Combine.PerKey<K, T, T> perKey() {
    return Combine.perKey(Max.<T>naturalOrder());
  }

  /**
   * Returns a {@code PTransform} that takes an input {@code PCollection<T>} and returns a {@code
   * PCollection<T>} whose contents is the maximum of the input {@code PCollection}'s elements, or
   * {@code null} if there are no elements.
   */
  public static <T, ComparatorT extends Comparator<? super T> & Serializable>
      Combine.Globally<T, T> globally(ComparatorT comparator) {
    return Combine.globally(Max.of(comparator));
  }

  /**
   * Returns a {@code PTransform} that takes an input {@code PCollection<KV<K, T>>} and returns a
   * {@code PCollection<KV<K, T>>} that contains one output element per key mapping each to the
   * maximum of the values associated with that key in the input {@code PCollection}.
   *
   *
See {@link Combine.PerKey} for how this affects timestamps and windowing.
   */
  public static <K, T, ComparatorT extends Comparator<? super T> & Serializable>
      Combine.PerKey<K, T, T> perKey(ComparatorT comparator) {
    return Combine.perKey(Max.of(comparator));
  }

  /////////////////////////////////////////////////////////////////////////////

  private static class MaxFn<T> extends BinaryCombineFn<T> {

    private final @Nullable T identity;
    private final Comparator<? super T> comparator;

    private <ComparatorT extends Comparator<? super T> & Serializable> MaxFn(
        @Nullable T identity, ComparatorT comparator) {
      this.identity = identity;
      this.comparator = comparator;
    }

    @Override
    public T identity() {
      return identity;
    }

    @Override
    public T apply(T left, T right) {
      return comparator.compare(left, right) >= 0 ? left : right;
    }

    @Override
    public void populateDisplayData(DisplayData.Builder builder) {
      super.populateDisplayData(builder);
      builder.add(DisplayData.item("comparer", comparator.getClass()).withLabel("Record Comparer"));
    }
  }

  private static class MaxIntegerFn extends Combine.BinaryCombineIntegerFn {

    @Override
    public int apply(int left, int right) {
      return Math.max(left, right);
    }

    @Override
    public int identity() {
      return Integer.MIN_VALUE;
    }
  }

  private static class MaxLongFn extends Combine.BinaryCombineLongFn {

    @Override
    public long apply(long left, long right) {
      return Math.max(left, right);
    }

    @Override
    public long identity() {
      return Long.MIN_VALUE;
    }
  }

  private static class MaxDoubleFn extends Combine.BinaryCombineDoubleFn {

    @Override
    public double apply(double left, double right) {
      return Math.max(left, right);
    }

    @Override
    public double identity() {
      return Double.NEGATIVE_INFINITY;
    }
  }
}


text:
package org.apache.geode.internal.cache.wan.misc;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;

import org.junit.Test;
import org.junit.experimental.categories.Category;

import org.apache.geode.cache.Region;
import org.apache.geode.internal.cache.wan.WANTestBase;
import org.apache.geode.internal.net.SocketCreatorFactory;
import org.apache.geode.test.dunit.IgnoredException;
import org.apache.geode.test.dunit.Wait;
import org.apache.geode.test.dunit.WaitCriterion;
import org.apache.geode.test.junit.categories.WanTest;

@Category({WanTest.class})
public class WANSSLDUnitTest extends WANTestBase {

  public WANSSLDUnitTest() {
    super();
  }

  @Test
  public void testSenderSSLReceiverSSL() {
    Integer lnPort = (Integer) vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1));
    Integer nyPort = (Integer) vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort));

    vm2.invoke(() -> WANTestBase.createReceiverWithSSL(nyPort));

    vm4.invoke(() -> WANTestBase.createCacheWithSSL(lnPort));

    vm4.invoke(() -> WANTestBase.createSender("ln", 2, false, 100, 10, false, false, null, true));

    vm2.invoke(
        () -> WANTestBase.createReplicatedRegion(getTestMethodName() + "_RR", null, isOffHeap()));

    vm4.invoke(() -> WANTestBase.startSender("ln"));

    vm4.invoke(
        () -> WANTestBase.createReplicatedRegion(getTestMethodName() + "_RR", "ln", isOffHeap()));

    vm4.invoke(() -> WANTestBase.doPuts(getTestMethodName() + "_RR", 1000));

    vm2.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + "_RR", 1000));
  }

  @Test
  public void testSenderNoSSLReceiverSSL() {
    IgnoredException.addIgnoredException("Unexpected IOException");
    IgnoredException.addIgnoredException("SSL Error");
    IgnoredException.addIgnoredException("Unrecognized SSL message");

    Integer lnPort = (Integer) vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1));
    Integer nyPort = (Integer) vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort));

    vm2.invoke(() -> WANTestBase.createReceiverWithSSL(nyPort));

    vm4.invoke(() -> WANTestBase.createCache(lnPort));

    String senderId = "ln";
    vm4.invoke(
        () -> WANTestBase.createSender(senderId, 2, false, 100, 10, false, false, null, true));

    String regionName = getTestMethodName() + "_RR";
    vm2.invoke(() -> WANTestBase.createReplicatedRegion(regionName, null, isOffHeap()));

    vm4.invoke(() -> WANTestBase.startSender(senderId));

    // Verify the sender is started
    vm4.invoke(() -> verifySenderRunningState(senderId));

    // Verify the sender is not connected
    vm4.invoke(() -> verifySenderConnectedState(senderId, false));

    vm4.invoke(() -> WANTestBase.createReplicatedRegion(regionName, "ln", isOffHeap()));

    // Do some puts in the sender
    int numPuts = 10;
    vm4.invoke(() -> WANTestBase.doPuts(regionName, numPuts));

    // Verify the sender is still started
    vm4.invoke(() -> verifySenderRunningState(senderId));

    // Verify the sender is still not connected
    vm4.invoke(() -> verifySenderConnectedState(senderId, false));

    // Verify the sender queue size
    vm4.invoke(() -> testQueueSize(senderId, numPuts));

    // Stop the receiver
    vm2.invoke(() -> closeCache());
    vm2.invoke(() -> closeSocketCreatorFactory());

    // Restart the receiver with SSL disabled
    createCacheInVMs(nyPort, vm2);
    vm2.invoke(() -> createReplicatedRegion(regionName, null, isOffHeap()));
    vm2.invoke(() -> createReceiver());

    // Wait for the queue to drain
    vm4.invoke(() -> checkQueueSize(senderId, 0));

    // Verify region size on receiver
    vm2.invoke(() -> validateRegionSize(regionName, numPuts));
  }

  @Test
  public void testSenderSSLReceiverNoSSL() {
    IgnoredException.addIgnoredException("Acceptor received unknown");
    IgnoredException.addIgnoredException("failed accepting client");
    IgnoredException.addIgnoredException("Error in connecting to peer");
    IgnoredException.addIgnoredException("Remote host closed connection during handshake");
    Integer lnPort = (Integer) vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1));
    Integer nyPort = (Integer) vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort));

    createCacheInVMs(nyPort, vm2);
    vm2.invoke(() -> WANTestBase.createReceiver());

    vm4.invoke(() -> WANTestBase.createCacheWithSSL(lnPort));

    vm4.invoke(() -> WANTestBase.createSender("ln", 2, false, 100, 10, false, false, null, true));

    vm2.invoke(
        () -> WANTestBase.createReplicatedRegion(getTestMethodName() + "_RR", null, isOffHeap()));

    vm4.invoke(() -> WANTestBase.startSender("ln"));

    vm4.invoke(
        () -> WANTestBase.createReplicatedRegion(getTestMethodName() + "_RR", "ln", isOffHeap()));

    vm4.invoke(() -> WANTestBase.doPuts(getTestMethodName() + "_RR", 1));

    Boolean doesSizeMatch = (Boolean) vm2
        .invoke(() -> WANSSLDUnitTest.ValidateSSLRegionSize(getTestMethodName() + "_RR", 1));

    assertFalse(doesSizeMatch);
  }

  public static boolean ValidateSSLRegionSize(String regionName, final int regionSize) {
    final Region r = cache.getRegion(Region.SEPARATOR + regionName);
    assertNotNull(r);
    WaitCriterion wc = new WaitCriterion() {
      public boolean done() {
        return false;
      }

      public String description() {
        return null;
      }
    };
    Wait.waitForCriterion(wc, 2000, 500, false);

    if (r.size() == regionSize) {
      return true;
    }
    return false;
  }

  private void closeSocketCreatorFactory() {
    SocketCreatorFactory.close();
  }
}


text:
import React from 'react';
import { push } from 'react-router-redux';
import { connect } from 'react-redux';

import RowWithButton from '../../components/RowWithButton/RowWithButton';

let Home = props => {
    return(
        <div className="container">
            <RowWithButton
                color="#1ed760"
                link="/ask/new"
                title="Need anything?"
                buttonText="Ask for it!"
            />
            <RowWithButton
                color="#38a9ff"
                link="/offer/new"
                title="Anything to offer?"
                buttonText="Start sharing!"
            />
        </div>
    )
};

const mapDispatchToProps = dispatch => {
    return {
        push: (path) => dispatch(push(path)),
    }
};

export default connect(
    null,
    mapDispatchToProps
)(Home);


text:
LEVEL = ../../../..
LIBRARYNAME = LLVMSystemZAsmParser

# Hack: we need to include 'main' SystemZ target directory to grab private headers
CPP.Flags += -I$(PROJ_OBJ_DIR)/.. -I$(PROJ_SRC_DIR)/..

include $(LEVEL)/Makefile.common


text:
package org.assertj.core.util;

import java.util.Comparator;

public final class StringHashCodeTestComparator implements Comparator<String> {

  @Override
  public int compare(String s1, String s2) {
    return s1.hashCode() - s2.hashCode();
  }

  @Override
  public String toString() {
    return "StringHashCodeTestComparator";
  }
}


text:
require 'spec_helper'
module Sexpr::Grammar
  describe Tagging, "mod2rulename" do
    include Tagging

    it 'work on simple module name' do
      mod2rulename(:Test).should eq(:test)
    end

    it 'work on complex module name' do
      mod2rulename(:ThisIsATest).should eq(:this_is_a_test)
    end

    it 'works with a module' do
      mod2rulename(::Sexpr::Grammar).should eq(:grammar)
    end

  end
end


text:
FROM python:3.5-slim

RUN apt-get update \
    && apt-get install -y \
        ca-certificates \
        gcc \
        git \
        libev4 \
        libev-dev \
        libevent-dev \
        libxml2-dev \
        libxslt1-dev \
        libffi-dev \
        # psycopg2
        python-dev \
        libpq-dev \
    && apt-get clean \
    && apt-get autoremove -y \
    && rm -rf /var/lib/apt/lists/*

# grab gosu for easy step-down from root
ENV GOSU_VERSION 1.9
RUN apt-get update \
    && apt-get install -y \
        curl \
    && gpg --keyserver pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
    && curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
    && curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
    && gpg --verify /usr/local/bin/gosu.asc \
    && rm /usr/local/bin/gosu.asc \
    && chmod +x /usr/local/bin/gosu \
    && apt-get clean \
    && apt-get autoremove -y \
        curl \
    && rm -rf /var/lib/apt/lists/*

RUN update-ca-certificates

RUN mkdir -p /code
WORKDIR /code

RUN pip install -U pip

COPY ./requirements.txt /code/requirements.txt
COPY ./constraints.txt /code/constraints.txt

RUN pip install --no-cache-dir -c /code/constraints.txt -r /code/requirements.txt

RUN apt-get remove -y gcc

COPY ./ /code/

RUN python manage.py collectstatic --noinput

ARG GIT_COMMIT=
ENV GIT_COMMIT ${GIT_COMMIT}

CMD ["python", "manage.py", "--help"]


text:
#include <aws/kendra/model/SalesforceCustomKnowledgeArticleTypeConfiguration.h>
#include <aws/core/utils/json/JsonSerializer.h>

#include <utility>

using namespace Aws::Utils::Json;
using namespace Aws::Utils;

namespace Aws
{
namespace kendra
{
namespace Model
{

SalesforceCustomKnowledgeArticleTypeConfiguration::SalesforceCustomKnowledgeArticleTypeConfiguration() :
    m_nameHasBeenSet(false),
    m_documentDataFieldNameHasBeenSet(false),
    m_documentTitleFieldNameHasBeenSet(false),
    m_fieldMappingsHasBeenSet(false)
{
}

SalesforceCustomKnowledgeArticleTypeConfiguration::SalesforceCustomKnowledgeArticleTypeConfiguration(JsonView jsonValue) :
    m_nameHasBeenSet(false),
    m_documentDataFieldNameHasBeenSet(false),
    m_documentTitleFieldNameHasBeenSet(false),
    m_fieldMappingsHasBeenSet(false)
{
  *this = jsonValue;
}

SalesforceCustomKnowledgeArticleTypeConfiguration& SalesforceCustomKnowledgeArticleTypeConfiguration::operator =(JsonView jsonValue)
{
  if(jsonValue.ValueExists("Name"))
  {
    m_name = jsonValue.GetString("Name");

    m_nameHasBeenSet = true;
  }

  if(jsonValue.ValueExists("DocumentDataFieldName"))
  {
    m_documentDataFieldName = jsonValue.GetString("DocumentDataFieldName");

    m_documentDataFieldNameHasBeenSet = true;
  }

  if(jsonValue.ValueExists("DocumentTitleFieldName"))
  {
    m_documentTitleFieldName = jsonValue.GetString("DocumentTitleFieldName");

    m_documentTitleFieldNameHasBeenSet = true;
  }

  if(jsonValue.ValueExists("FieldMappings"))
  {
    Array<JsonView> fieldMappingsJsonList = jsonValue.GetArray("FieldMappings");
    for(unsigned fieldMappingsIndex = 0; fieldMappingsIndex < fieldMappingsJsonList.GetLength(); ++fieldMappingsIndex)
    {
      m_fieldMappings.push_back(fieldMappingsJsonList[fieldMappingsIndex].AsObject());
    }
    m_fieldMappingsHasBeenSet = true;
  }

  return *this;
}

JsonValue SalesforceCustomKnowledgeArticleTypeConfiguration::Jsonize() const
{
  JsonValue payload;

  if(m_nameHasBeenSet)
  {
   payload.WithString("Name", m_name);

  }

  if(m_documentDataFieldNameHasBeenSet)
  {
   payload.WithString("DocumentDataFieldName", m_documentDataFieldName);

  }

  if(m_documentTitleFieldNameHasBeenSet)
  {
   payload.WithString("DocumentTitleFieldName", m_documentTitleFieldName);

  }

  if(m_fieldMappingsHasBeenSet)
  {
   Array<JsonValue> fieldMappingsJsonList(m_fieldMappings.size());
   for(unsigned fieldMappingsIndex = 0; fieldMappingsIndex < fieldMappingsJsonList.GetLength(); ++fieldMappingsIndex)
   {
     fieldMappingsJsonList[fieldMappingsIndex].AsObject(m_fieldMappings[fieldMappingsIndex].Jsonize());
   }
   payload.WithArray("FieldMappings", std::move(fieldMappingsJsonList));

  }

  return payload;
}

} // namespace Model
} // namespace kendra
} // namespace Aws


text:
var assert = require('assert'),
    vows = require('vows'),
    nock = require('nock');

var apiEndpoint = nock('http://dc.api.mailchimp.com:80').post('/1.1/?output=json&method=inlineCss', encodeURIComponent(JSON.stringify({ apikey: "apiKey-dc", html: "" })))
                                                        .reply(200, "\"", strip_css: "true" })))
                                                        .reply(200, "\"<\\/head><\\/body><\\/html>\"")
                                                        .post('/1.1/?output=json&method=inlineCss', encodeURIComponent(JSON.stringify({ apikey: "apiKey-dc", html: "", strip_css: "true" })))
                                                        .reply(200, "\"<\\/head><\\/body><\\/html>\"");

var MailChimpAPI = require('mailchimp').MailChimpAPI;

vows.describe('MailChimpAPI v1.1').addBatch({

	'MailChimpAPI v1.1 wrapper': {

		'when instantiated': {
			topic: function () { return new MailChimpAPI('apiKey-dc', { version : '1.1' }) },
			'successfully creates an instance': function (api) {
				assert.isObject(api);
				assert.strictEqual(api.version, '1.1');
			},

			/*** inlineCss ***/

			'and calling method "inlineCss" with mandatory arguments': {
				topic: function (api) { api.inlineCss({ html: "" }, this.callback) },
				'returns html with inline CSS': function (error, data) {
					assert.isNull(error);
					assert.isString(data);
				}
			},

			'and calling method "inlineCss" without mandatory arguments': {
				topic: function (api) { api.inlineCss(this.callback) },
				'returns an error': function (error, data) {
					assert.instanceOf(error, Error);
				}
			},

			'and calling method "inlineCss" with all arguments': {
				topic: function (api) { api.inlineCss({ html: "", strip_css: "true" }, this.callback) },
				'returns html with inline CSS': function (error, data) {
					assert.isNull(error);
					assert.isString(data);
				}
			},

			'and calling method "inlineCss" with superflous arguments': {
				topic: function (api) { api.inlineCss({ html: "", strip_css: "true", superflous: "superflous" }, this.callback) },
				'returns html with inline CSS and superflous arguments are discarded': function (error, data) {
					assert.isNull(error);
					assert.isString(data);
				}
			}

		}

	}

}).export(module);


text:
<?php

namespace KoolKode\Http\Komponent\Filter;

use KoolKode\Http\Entity\FormEntityInterface;
use KoolKode\Http\Http;
use KoolKode\Http\Komponent\Event\PrepareRequestEvent;

/**
 * Allows for method overrides of HTTP request with POST, supports both X-HTTP-Method-Override
 * header and _method param in query or form data.
 *
 * @author Martin Schröder
 */
class MethodOverrideFilter
{
	protected $param;

	protected $headers = [
		'X-Http-Method', // Microsoft
		'X-Http-Method-Override', // Google
		'X-Method-Override' // IBM
	];

	public function __construct($param = '_method', array $headers = NULL)
	{
		$this->param = ($param === NULL) ? NULL : (string)$param;

		if($headers !== NULL)
		{
			$this->headers = $headers;
		}
	}

	public function __invoke(PrepareRequestEvent $event)
	{
		$request = $event->request;

		if($request->isPost(false))
		{
			$method = NULL;

			foreach($this->headers as $headerName)
			{
				if($request->hasHeader($headerName))
				{
					$method = $request->getHeader($headerName);

					break;
				}
			}

			if($method === NULL && $this->param !== NULL)
			{
				$method = $request->getUri()->getQueryParam($this->param, NULL);

				if($method === NULL)
				{
					$mediaType = $request->getMediaType();

					if($mediaType->is(Http::FORM_ENCODED) || $mediaType->is(Http::FORM_MULTIPART_ENCODED))
					{
						$entity = $request->getEntity();

						if($entity instanceof FormEntityInterface)
						{
							$method = $entity->get($this->param, NULL);
						}
					}
				}
			}

			if($method !== NULL && preg_match("'^[a-z]{3,}$'i", (string)$method))
			{
				$request->setMethodOverride($method);
			}
		}
	}
}


text:
'use strict';

/**
 * model
 * @module model
 * @desc Custom model definition
 * @requires underscore
 * @requires config
 */

var _ = require('underscore');

/**
 * The Model definition
 * @return {Object} Model
 */
module.exports = (function() {

  /**
   * Model
   * @desc A model
   * @class
   */
  var Model = function() {

    /*
     * isEmpty
     * @desc Determine whether a model is empty
     * @param  {String}  key Object key
     * @return {Boolean} isEmpty Returns whether an attribute is empty
     */
    this.isEmpty = function(key) {
      var isEmpty = true,
        model = key ? this.get(key) : this;

      if (model) {
        var relations = model.getRelations();

        if (relations.length === 0) {
          isEmpty = _.isEmpty(model.attributes);
        } else {
          _.each(relations, function(relation) {
            var child = model.get(relation.key);
            if (child && !child.isEmpty()) {
              isEmpty = false;
            }
          }, model);
        }
      }

      return isEmpty;
    };

    Model.__super__.constructor.apply(this, arguments);

  };

  return Model;

}());


text:
package com.blinkbox.books

import scala.language.implicitConversions

final case class Sensitive[A](value: A) {
  override def toString: String = "******"
}

object Sensitive {
  implicit def forAny[A](value: A): Sensitive[A] = Sensitive(value)
}


text:
namespace Azure.ResourceManager.Resources.Models
{
    /// <summary> The provider registration definition. </summary>
    public partial class ProviderRegistrationContent
    {
        /// <summary> Initializes a new instance of ProviderRegistrationContent. </summary>
        public ProviderRegistrationContent()
        {
        }

        /// <summary> The provider consent. </summary>
        internal ProviderConsentDefinition ThirdPartyProviderConsent { get; set; }
        /// <summary> A value indicating whether authorization is consented or not. </summary>
        public bool? ConsentToAuthorization
        {
            get => ThirdPartyProviderConsent is null ? default : ThirdPartyProviderConsent.ConsentToAuthorization;
            set
            {
                if (ThirdPartyProviderConsent is null)
                    ThirdPartyProviderConsent = new ProviderConsentDefinition();
                ThirdPartyProviderConsent.ConsentToAuthorization = value;
            }
        }
    }
}


text:
FROM openjdk:8-jdk-alpine

MAINTAINER Matthias Balke <mathias.balke@googlemail.com>

VOLUME /tmp

ADD application.properties application.properties

ADD harvester.jar app.jar

RUN touch /app.war

EXPOSE 9090

ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "/app.jar"]


text:
TEST(MathMetaRevScal, value_type) {
  using stan::math::child_type;
  using stan::math::var;

  EXPECT_SAME_TYPE(double, child_type<var>::type);
}


text:
```
npm i
npm start
open localhost:3000?counter=10
```


text:
using System;

namespace Azure.AI.FormRecognizer.Models
{
    /// <summary> Request parameter to copy an existing custom model from the source resource to a target resource referenced by the resource ID. </summary>
    internal partial class CopyRequest
    {
        /// <summary> Initializes a new instance of CopyRequest. </summary>
        /// <param name="targetResourceId"> Azure Resource Id of the target Form Recognizer resource where the model is copied to. </param>
        /// <param name="targetResourceRegion"> Location of the target Azure resource. A valid Azure region name supported by Cognitive Services. </param>
        /// <param name="copyAuthorization"> Entity that encodes claims to authorize the copy request. </param>
        /// <exception cref="ArgumentNullException"> <paramref name="targetResourceId"/>, <paramref name="targetResourceRegion"/>, or <paramref name="copyAuthorization"/> is null. </exception>
        public CopyRequest(string targetResourceId, string targetResourceRegion, CopyAuthorizationResult copyAuthorization)
        {
            if (targetResourceId == null)
            {
                throw new ArgumentNullException(nameof(targetResourceId));
            }
            if (targetResourceRegion == null)
            {
                throw new ArgumentNullException(nameof(targetResourceRegion));
            }
            if (copyAuthorization == null)
            {
                throw new ArgumentNullException(nameof(copyAuthorization));
            }

            TargetResourceId = targetResourceId;
            TargetResourceRegion = targetResourceRegion;
            CopyAuthorization = copyAuthorization;
        }

        /// <summary> Azure Resource Id of the target Form Recognizer resource where the model is copied to. </summary>
        public string TargetResourceId { get; }
        /// <summary> Location of the target Azure resource. A valid Azure region name supported by Cognitive Services. </summary>
        public string TargetResourceRegion { get; }
        /// <summary> Entity that encodes claims to authorize the copy request. </summary>
        public CopyAuthorizationResult CopyAuthorization { get; }
    }
}


text:
<?php

/**
 * Class manages article select lists configuration
 */
class selectlist_main_ajax extends ajaxListComponent
{

    /**
     * If true extended column selection will be build
     *
     * @var bool
     */
    protected $_blAllowExtColumns = true;

    /**
     * Columns array
     *
     * @var array
     */
    protected $_aColumns = array('container1' => array( // field , table,         visible, multilanguage, ident
        array('oxartnum', 'oxarticles', 1, 0, 0),
        array('oxtitle', 'oxarticles', 1, 1, 0),
        array('oxean', 'oxarticles', 0, 0, 0),
        array('oxmpn', 'oxarticles', 0, 0, 0),
        array('oxprice', 'oxarticles', 0, 0, 0),
        array('oxstock', 'oxarticles', 0, 0, 0),
        array('oxid', 'oxarticles', 0, 0, 1)
    ),
                                 'container2' => array(
                                     array('oxartnum', 'oxarticles', 1, 0, 0),
                                     array('oxtitle', 'oxarticles', 1, 1, 0),
                                     array('oxean', 'oxarticles', 0, 0, 0),
                                     array('oxmpn', 'oxarticles', 0, 0, 0),
                                     array('oxprice', 'oxarticles', 0, 0, 0),
                                     array('oxstock', 'oxarticles', 0, 0, 0),
                                     array('oxid', 'oxobject2selectlist', 0, 0, 1),
                                     array('oxid', 'oxarticles', 0, 0, 1)
                                 ),
                                 'container3' => array(
                                     array('oxtitle', 'oxselectlist', 1, 1, 0),
                                     array('oxsort', 'oxobject2selectlist', 1, 0, 0),
                                     array('oxident', 'oxselectlist', 0, 0, 0),
                                     array('oxvaldesc', 'oxselectlist', 0, 0, 0),
                                     array('oxid', 'oxselectlist', 0, 0, 1)
                                 )
    );

    /**
     * Returns SQL query for data to fetc
     *
     * @return string
     */
    protected function _getQuery()
    {
        $myConfig = $this->getConfig();

        // looking for table/view
        $sArtTable = $this->_getViewName('oxarticles');
        $sCatTable = $this->_getViewName('oxcategories');
        $sO2CView = $this->_getViewName('oxobject2category');
        $oDb = oxDb::getDb();
        $sSelId = oxRegistry::getConfig()->getRequestParameter('oxid');
        $sSynchSelId = oxRegistry::getConfig()->getRequestParameter('synchoxid');

        // category selected or not ?
        if (!$sSelId) {
            // performance
            $sQAdd = " from $sArtTable where 1 ";
            $sQAdd .= $myConfig->getConfigParam('blVariantsSelection') ? '' : " and $sArtTable.oxparentid = '' ";
        } else {
            // selected category ?
            if ($sSynchSelId && $sSelId != $sSynchSelId) {
                $sQAdd = " from $sO2CView as oxobject2category left join $sArtTable on ";
                $sQAdd .= $myConfig->getConfigParam('blVariantsSelection') ? " ( $sArtTable.oxid=oxobject2category.oxobjectid or $sArtTable.oxparentid=oxobject2category.oxobjectid ) " : " $sArtTable.oxid=oxobject2category.oxobjectid ";
                $sQAdd .= " where oxobject2category.oxcatnid = " . $oDb->quote($sSelId);
            } else {
                $sQAdd = " from $sArtTable left join oxobject2selectlist on $sArtTable.oxid=oxobject2selectlist.oxobjectid ";
                $sQAdd .= " where oxobject2selectlist.oxselnid = " . $oDb->quote($sSelId);
            }
        }

        if ($sSynchSelId && $sSynchSelId != $sSelId) {
            // performance
            $sQAdd .= " and $sArtTable.oxid not in ( select oxobject2selectlist.oxobjectid from oxobject2selectlist ";
            $sQAdd .= " where oxobject2selectlist.oxselnid = " . $oDb->quote($sSynchSelId) . " ) ";
        }

        return $sQAdd;
    }

    /**
     * Removes article from Selection list
     */
    public function removeArtFromSel()
    {
        $aChosenArt = $this->_getActionIds('oxobject2selectlist.oxid');

        if (oxRegistry::getConfig()->getRequestParameter('all')) {

            $sQ = parent::_addFilter("delete oxobject2selectlist.* " . $this->_getQuery());
            oxDb::getDb()->Execute($sQ);

        } elseif (is_array($aChosenArt)) {
            $sQ = "delete from oxobject2selectlist where oxobject2selectlist.oxid in (" . implode(", ", oxDb::getInstance()->quoteArray($aChosenArt)) . ") ";
            oxDb::getDb()->Execute($sQ);
        }
    }

    /**
     * Adds article to Selection list
     */
    public function addArtToSel()
    {
        $aAddArticle = $this->_getActionIds('oxarticles.oxid');
        $soxId = oxRegistry::getConfig()->getRequestParameter('synchoxid');

        if (oxRegistry::getConfig()->getRequestParameter('all')) {
            $sArtTable = $this->_getViewName('oxarticles');
            $aAddArticle = $this->_getAll(parent::_addFilter("select $sArtTable.oxid " . $this->_getQuery()));
        }

        if ($soxId && $soxId != "-1" && is_array($aAddArticle)) {
            $oDb = oxDb::getDb();
            foreach ($aAddArticle as $sAdd) {
                $oNewGroup = oxNew("oxbase");
                $oNewGroup->init("oxobject2selectlist");
                $oNewGroup->oxobject2selectlist__oxobjectid = new oxField($sAdd);
                $oNewGroup->oxobject2selectlist__oxselnid = new oxField($soxId);
                $oNewGroup->oxobject2selectlist__oxsort = new oxField(( int ) $oDb->getOne("select max(oxsort) + 1 from oxobject2selectlist where oxobjectid =  " . $oDb->quote($sAdd) . " ", false, false));
                $oNewGroup->save();

            }
        }

    }
}


text:
'use strict';
const EventEmitter = require('events');
const http = require('http');
const https = require('https');
const PassThrough = require('stream').PassThrough;
const urlLib = require('url');
const querystring = require('querystring');
const duplexer3 = require('duplexer3');
const isStream = require('is-stream');
const getStream = require('get-stream');
const timedOut = require('timed-out');
const urlParseLax = require('url-parse-lax');
const urlToOptions = require('url-to-options');
const lowercaseKeys = require('lowercase-keys');
const decompressResponse = require('decompress-response');
const isRetryAllowed = require('is-retry-allowed');
const Buffer = require('safe-buffer').Buffer;
const isURL = require('isurl');
const isPlainObj = require('is-plain-obj');
const PCancelable = require('p-cancelable');
const pTimeout = require('p-timeout');
const pkg = require('./package');

const getMethodRedirectCodes = new Set([300, 301, 302, 303, 304, 305, 307, 308]);
const allMethodRedirectCodes = new Set([300, 303, 307, 308]);

function requestAsEventEmitter(opts) {
	opts = opts || {};

	const ee = new EventEmitter();
	const requestUrl = opts.href || urlLib.resolve(urlLib.format(opts), opts.path);
	const redirects = [];
	let retryCount = 0;
	let redirectUrl;

	const get = opts => {
		if (opts.protocol !== 'http:' && opts.protocol !== 'https:') {
			ee.emit('error', new got.UnsupportedProtocolError(opts));
			return;
		}

		let fn = opts.protocol === 'https:' ? https : http;

		if (opts.useElectronNet && process.versions.electron) {
			const electron = require('electron');
			fn = electron.net || electron.remote.net;
		}

		const req = fn.request(opts, res => {
			const statusCode = res.statusCode;

			res.url = redirectUrl || requestUrl;
			res.requestUrl = requestUrl;

			const followRedirect = opts.followRedirect && 'location' in res.headers;
			const redirectGet = followRedirect && getMethodRedirectCodes.has(statusCode);
			const redirectAll = followRedirect && allMethodRedirectCodes.has(statusCode);

			if (redirectAll || (redirectGet && (opts.method === 'GET' || opts.method === 'HEAD'))) {
				res.resume();

				if (statusCode === 303) {
					// Server responded with "see other", indicating that the resource exists at another location,
					// and the client should request it from that location via GET or HEAD.
					opts.method = 'GET';
				}

				if (redirects.length >= 10) {
					ee.emit('error', new got.MaxRedirectsError(statusCode, redirects, opts), null, res);
					return;
				}

				const bufferString = Buffer.from(res.headers.location, 'binary').toString();

				redirectUrl = urlLib.resolve(urlLib.format(opts), bufferString);

				redirects.push(redirectUrl);

				const redirectOpts = Object.assign({}, opts, urlLib.parse(redirectUrl));

				ee.emit('redirect', res, redirectOpts);

				get(redirectOpts);

				return;
			}

			setImmediate(() => {
				const response = opts.decompress === true &&
					typeof decompressResponse === 'function' &&
					req.method !== 'HEAD' ? decompressResponse(res) : res;

				if (!opts.decompress && ['gzip', 'deflate'].indexOf(res.headers['content-encoding']) !== -1) {
					opts.encoding = null;
				}

				response.redirectUrls = redirects;

				ee.emit('response', response);
			});
		});

		req.once('error', err => {
			const backoff = opts.retries(++retryCount, err);

			if (backoff) {
				setTimeout(get, backoff, opts);
				return;
			}

			ee.emit('error', new got.RequestError(err, opts));
		});

		if (opts.gotTimeout) {
			timedOut(req, opts.gotTimeout);
		}

		setImmediate(() => {
			ee.emit('request', req);
		});
	};

	setImmediate(() => {
		get(opts);
	});
	return ee;
}

function asPromise(opts) {
	const timeoutFn = requestPromise => opts.gotTimeout && opts.gotTimeout.request ?
		pTimeout(requestPromise, opts.gotTimeout.request, new got.RequestError({message: 'Request timed out', code: 'ETIMEDOUT'}, opts)) :
		requestPromise;

	return timeoutFn(new PCancelable((onCancel, resolve, reject) => {
		const ee = requestAsEventEmitter(opts);
		let cancelOnRequest = false;

		onCancel(() => {
			cancelOnRequest = true;
		});

		ee.on('request', req => {
			if (cancelOnRequest) {
				req.abort();
			}

			onCancel(() => {
				req.abort();
			});

			if (isStream(opts.body)) {
				opts.body.pipe(req);
				opts.body = undefined;
				return;
			}

			req.end(opts.body);
		});

		ee.on('response', res => {
			const stream = opts.encoding === null ? getStream.buffer(res) : getStream(res, opts);

			stream
				.catch(err => reject(new got.ReadError(err, opts)))
				.then(data => {
					const statusCode = res.statusCode;
					const limitStatusCode = opts.followRedirect ? 299 : 399;

					res.body = data;

					if (opts.json && res.body) {
						try {
							res.body = JSON.parse(res.body);
						} catch (e) {
							if (statusCode >= 200 && statusCode < 300) {
								throw new got.ParseError(e, statusCode, opts, data);
							}
						}
					}

					if (statusCode !== 304 && (statusCode < 200 || statusCode > limitStatusCode)) {
						throw new got.HTTPError(statusCode, res.headers, opts);
					}

					resolve(res);
				})
				.catch(err => {
					Object.defineProperty(err, 'response', {value: res});
					reject(err);
				});
		});

		ee.on('error', reject);
	}));
}

function asStream(opts) {
	const input = new PassThrough();
	const output = new PassThrough();
	const proxy = duplexer3(input, output);
	let timeout;

	if (opts.gotTimeout && opts.gotTimeout.request) {
		timeout = setTimeout(() => {
			proxy.emit('error', new got.RequestError({message: 'Request timed out', code: 'ETIMEDOUT'}, opts));
		}, opts.gotTimeout.request);
	}

	if (opts.json) {
		throw new Error('got can not be used as stream when options.json is used');
	}

	if (opts.body) {
		proxy.write = () => {
			throw new Error('got\'s stream is not writable when options.body is used');
		};
	}

	const ee = requestAsEventEmitter(opts);

	ee.on('request', req => {
		proxy.emit('request', req);

		if (isStream(opts.body)) {
			opts.body.pipe(req);
			return;
		}

		if (opts.body) {
			req.end(opts.body);
			return;
		}

		if (opts.method === 'POST' || opts.method === 'PUT' || opts.method === 'PATCH') {
			input.pipe(req);
			return;
		}

		req.end();
	});

	ee.on('response', res => {
		clearTimeout(timeout);

		const statusCode = res.statusCode;

		res.pipe(output);

		if (statusCode !== 304 && (statusCode < 200 || statusCode > 299)) {
			proxy.emit('error', new got.HTTPError(statusCode, res.headers, opts), null, res);
			return;
		}

		proxy.emit('response', res);
	});

	ee.on('redirect', proxy.emit.bind(proxy, 'redirect'));
	ee.on('error', proxy.emit.bind(proxy, 'error'));

	return proxy;
}

function normalizeArguments(url, opts) {
	if (typeof url !== 'string' && typeof url !== 'object') {
		throw new TypeError(`Parameter \`url\` must be a string or object, not ${typeof url}`);
	} else if (typeof url === 'string') {
		url = url.replace(/^unix:/, 'http://$&');
		url = urlParseLax(url);
	} else if (isURL.lenient(url)) {
		url = urlToOptions(url);
	}

	if (url.auth) {
		throw new Error('Basic authentication must be done with auth option');
	}

	opts = Object.assign(
		{
			path: '',
			retries: 2,
			decompress: true,
			useElectronNet: true
		},
		url,
		{
			protocol: url.protocol || 'http:' // Override both null/undefined with default protocol
		},
		opts
	);

	opts.headers = Object.assign({
		'user-agent': `${pkg.name}/${pkg.version} (https://github.com/sindresorhus/got)`,
		'accept-encoding': 'gzip,deflate'
	}, lowercaseKeys(opts.headers));

	const query = opts.query;

	if (query) {
		if (typeof query !== 'string') {
			opts.query = querystring.stringify(query);
		}

		opts.path = `${opts.path.split('?')[0]}?${opts.query}`;
		delete opts.query;
	}

	if (opts.json && opts.headers.accept === undefined) {
		opts.headers.accept = 'application/json';
	}

	const body = opts.body;
	if (body !== null && body !== undefined) {
		const headers = opts.headers;
		if (!isStream(body) && typeof body !== 'string' && !Buffer.isBuffer(body) && !(opts.form || opts.json)) {
			throw new TypeError('options.body must be a ReadableStream, string, Buffer or plain Object');
		}

		const canBodyBeStringified = isPlainObj(body) || Array.isArray(body);
		if ((opts.form || opts.json) && !canBodyBeStringified) {
			throw new TypeError('options.body must be a plain Object or Array when options.form or options.json is used');
		}

		if (isStream(body) && typeof body.getBoundary === 'function') {
			// Special case for https://github.com/form-data/form-data
			headers['content-type'] = headers['content-type'] || `multipart/form-data; boundary=${body.getBoundary()}`;
		} else if (opts.form && canBodyBeStringified) {
			headers['content-type'] = headers['content-type'] || 'application/x-www-form-urlencoded';
			opts.body = querystring.stringify(body);
		} else if (opts.json && canBodyBeStringified) {
			headers['content-type'] = headers['content-type'] || 'application/json';
			opts.body = JSON.stringify(body);
		}

		if (headers['content-length'] === undefined && headers['transfer-encoding'] === undefined && !isStream(body)) {
			const length = typeof opts.body === 'string' ? Buffer.byteLength(opts.body) : opts.body.length;
			headers['content-length'] = length;
		}

		opts.method = (opts.method || 'POST').toUpperCase();
	} else {
		opts.method = (opts.method || 'GET').toUpperCase();
	}

	if (opts.hostname === 'unix') {
		const matches = /(.+?):(.+)/.exec(opts.path);

		if (matches) {
			opts.socketPath = matches[1];
			opts.path = matches[2];
			opts.host = null;
		}
	}

	if (typeof opts.retries !== 'function') {
		const retries = opts.retries;

		opts.retries = (iter, err) => {
			if (iter > retries || !isRetryAllowed(err)) {
				return 0;
			}

			const noise = Math.random() * 100;

			return ((1 << iter) * 1000) + noise;
		};
	}

	if (opts.followRedirect === undefined) {
		opts.followRedirect = true;
	}

	if (opts.timeout) {
		if (typeof opts.timeout === 'number') {
			opts.gotTimeout = {request: opts.timeout};
		} else {
			opts.gotTimeout = opts.timeout;
		}
		delete opts.timeout;
	}

	return opts;
}

function got(url, opts) {
	try {
		return asPromise(normalizeArguments(url, opts));
	} catch (err) {
		return Promise.reject(err);
	}
}

got.stream = (url, opts) => asStream(normalizeArguments(url, opts));

const methods = [
	'get',
	'post',
	'put',
	'patch',
	'head',
	'delete'
];

for (const method of methods) {
	got[method] = (url, opts) => got(url, Object.assign({}, opts, {method}));
	got.stream[method] = (url, opts) => got.stream(url, Object.assign({}, opts, {method}));
}

class StdError extends Error {
	constructor(message, error, opts) {
		super(message);
		this.name = 'StdError';

		if (error.code !== undefined) {
			this.code = error.code;
		}

		Object.assign(this, {
			host: opts.host,
			hostname: opts.hostname,
			method: opts.method,
			path: opts.path,
			protocol: opts.protocol,
			url: opts.href
		});
	}
}

got.RequestError = class extends StdError {
	constructor(error, opts) {
		super(error.message, error, opts);
		this.name = 'RequestError';
	}
};

got.ReadError = class extends StdError {
	constructor(error, opts) {
		super(error.message, error, opts);
		this.name = 'ReadError';
	}
};

got.ParseError = class extends StdError {
	constructor(error, statusCode, opts, data) {
		super(`${error.message} in "${urlLib.format(opts)}": \n${data.slice(0, 77)}...`, error, opts);
		this.name = 'ParseError';
		this.statusCode = statusCode;
		this.statusMessage = http.STATUS_CODES[this.statusCode];
	}
};

got.HTTPError = class extends StdError {
	constructor(statusCode, headers, opts) {
		const statusMessage = http.STATUS_CODES[statusCode];
		super(`Response code ${statusCode} (${statusMessage})`, {}, opts);
		this.name = 'HTTPError';
		this.statusCode = statusCode;
		this.statusMessage = statusMessage;
		this.headers = headers;
	}
};

got.MaxRedirectsError = class extends StdError {
	constructor(statusCode, redirectUrls, opts) {
		super('Redirected 10 times. Aborting.', {}, opts);
		this.name = 'MaxRedirectsError';
		this.statusCode = statusCode;
		this.statusMessage = http.STATUS_CODES[this.statusCode];
		this.redirectUrls = redirectUrls;
	}
};

got.UnsupportedProtocolError = class extends StdError {
	constructor(opts) {
		super(`Unsupported protocol "${opts.protocol}"`, {}, opts);
		this.name = 'UnsupportedProtocolError';
	}
};

module.exports = got;


text:
<form method="post" id='edit-promo-form'>
<?php

function textInput($key , $value, $class=null) {

	if (isset($class) && $class===true) {
		$class = 'promo-date-picker';
		$value = date('Y-m-d', strtotime($value));
	} else {
		$class = '';
	}

	echo ''.ucfirst($key).'<input type="text" name="'.$key.'" class="form-control '.$class.'" value="'.$value.'">';
}

function textArea($key , $value) {
	echo "".ucfirst($key)."<textarea class='form-control' name='caption' >".$value."</textarea>";
}

function hiddenInput($key , $value) {
	echo "<input type='hidden' class='form-control' name='".$key."' value='".$value."' >";
}
	// var_dump($_GET);
	/* LOAD CONFIGURATION APP */
	include_once('/kunden/homepages/0/d643120834/htdocs/config/index.php');
	$config = new Blog();
	$promo = $config->getPromoById($_GET['promo_id']);

	foreach ($promo[0] as $key => $value) {
		switch ($key) {
			case 'caption':
				textArea($key, $value);
				break;
			case 'title':
				textInput($key , $value);
				break;
			case 'paypal_url':
				textInput($key , $value);
				break;
			case 'start_date':
				textInput($key , $value,true);
				break;
			case 'desc':
				textInput($key , $value);
				break;
			// case 'date':
			// 	textInput($key , $value, true);
			// 	break;
			case 'id':
				hiddenInput($key , $value);
				break;
		}
	}
?>
<input type="hidden" name="processing" value="true"></input>
<button type="submit" class="btn btn-secondary-outline btn-block m-b-md"> Save Changes</button>

</form>


text:
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Base de donn�es: `gsb_frais`
--

-- --------------------------------------------------------

--
-- Structure de la table `Forfait`
--

CREATE TABLE IF NOT EXISTS `Forfait` (
  `id` char(3) NOT NULL,
  `libelle` char(30) DEFAULT NULL,
  `montant` decimal(5,2) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Structure de la table `Etat`
--

CREATE TABLE IF NOT EXISTS `Etat` (
  `id` char(2) NOT NULL,
  `libelle` varchar(30) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Structure de la table `Visiteur`
--

CREATE TABLE IF NOT EXISTS `Visiteur` (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `nom` varchar(60) NOT NULL,
  `prenom` varchar(60)  NOT NULL,
  `adresse` varchar(120) DEFAULT NULL,
  `cp` char(5) DEFAULT NULL,
  `ville` varchar(60) DEFAULT NULL,
  `dateEmbauche` date DEFAULT NULL,
  `login` char(60) NOT NULL,

  PRIMARY KEY (`id`)
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Structure de la table `historiquePassword`
--

CREATE TABLE IF NOT EXISTS `historiquePassword` (
  `idVisiteur` int UNSIGNED NOT NULL,
  `pwd` char(32) NOT NULL,
  `updated_date` date NOT NULL,

  PRIMARY KEY (`idVisiteur`, `pwd`)
) ENGINE=InnoDB;

ALTER TABLE `historiquePassword` ADD CONSTRAINT `historiquePassword_visiteur` FOREIGN KEY (`idVisiteur`) REFERENCES `Visiteur`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;

-- --------------------------------------------------------

--
-- Structure de la table `FicheFrais`
--

CREATE TABLE IF NOT EXISTS `FicheFrais` (
  `id` int(11) UNSIGNED auto_increment,
  `idVisiteur` int UNSIGNED NOT NULL,
  `mois` tinyint UNSIGNED NOT NULL,
  `annee` smallint UNSIGNED NOT NULL,
  `nbJustificatifs` tinyint UNSIGNED DEFAULT NULL,
  `montantValide` decimal(10,2) DEFAULT NULL,
  `dateModif` date DEFAULT NULL,
  `idEtat` char(2) DEFAULT 'CR',
  PRIMARY KEY (`id`),
  FOREIGN KEY (`idEtat`) REFERENCES Etat(`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  FOREIGN KEY (`idVisiteur`) REFERENCES Visiteur(`id`)  ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB;

-- --------------------------------------------------------

--
-- Structure de la table `LigneFraisForfait`
--

CREATE TABLE IF NOT EXISTS `LigneFraisForfait` (
  `idFicheFrais` int(11) UNSIGNED NOT NULL,
  `idForfait` char(3) NOT NULL,
  `quantite` smallint UNSIGNED DEFAULT NULL,
  PRIMARY KEY (`idFicheFrais`, `idForfait`)
) ENGINE=InnoDB;

ALTER TABLE `LigneFraisForfait` ADD CONSTRAINT `LigneFraisForfait_FicheFrais` FOREIGN KEY (`idFicheFrais`) REFERENCES `FicheFrais`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `LigneFraisForfait` ADD CONSTRAINT `LigneFraisForfait_Forfait` FOREIGN KEY (`idForfait`) REFERENCES `Forfait`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;

-- --------------------------------------------------------

--
-- Structure de la table `LigneFraisHorsForfait`
--

CREATE TABLE IF NOT EXISTS `LigneFraisHorsForfait` (
  `idFraisHF`    int(11) UNSIGNED auto_increment,
  `idFicheFrais` int(11) UNSIGNED NOT NULL,
  `dteFraisHF`  date DEFAULT NULL,
  `libFraisHF`  varchar(60) DEFAULT NULL,
  `quantite`  smallint UNSIGNED DEFAULT NULL,
  `montant` decimal(10,2) DEFAULT 0,
  PRIMARY KEY (`idFraisHF`)
) ENGINE=InnoDB;

ALTER TABLE `LigneFraisHorsForfait` ADD CONSTRAINT `LigneFraisHorsForfait_FicheFrais` FOREIGN KEY (`idFicheFrais`) REFERENCES `FicheFrais`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;

-- --------------------------------------------------------

--
-- Insert `Visiteur`
--

INSERT INTO Visiteur(nom, prenom, login, DateEmbauche) VALUES
('comptable', 'comptable', 'comptable', NOW()),
('admin', 'admin', 'admin', NOW());

-- --------------------------------------------------------

--
-- Insert `historiquePassword`
--

INSERT INTO `historiquePassword` (`idVisiteur`, `pwd`, `updated_date`) VALUES
(1, md5('comptable'), NOW()),
(2, md5('admin'), NOW());

-- --------------------------------------------------------

--
-- Insert `Etat`
--

INSERT INTO `Etat` (`id`, `libelle`) VALUES
('CL', 'Saisie clôturée'),
('CR', 'Fiche créée, saisie en cours'),
('RB', 'Remboursée'),
('VA', 'Validée et mise en paiement');

-- --------------------------------------------------------

--
-- Insert `Forfait`
--

INSERT INTO `Forfait` (`id`, `libelle`, `montant`) VALUES
('ETP', 'Forfait Etape', '110.00'),
('KM', 'Frais Kilométrique', '0.62'),
('REP', 'Repas Restaurant', '25.00'),
('NUI', 'Nuitée Hôtel', '80.00');


text:
module MixpanelTesting
  VERSION='0.1.2'
end


text:
class CreateArticleHasKeywords < ActiveRecord::Migration
  def change
    create_table :article_has_keywords do |t|
      t.references :article, index: true
      t.references :keyword, index: true

      t.timestamps
    end
  end
end


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using UnityEngine;
using System.Collections;
using HoloToolkit.Unity;

namespace HoloToolkit.Examples.Prototyping
{
    /// <summary>
    /// scales an object based on the selected value in the array
    /// Supports ScaletoValue for animaiton and easing, ...auto detected.
    /// </summary>
    public class CycleScale : CycleArray<Vector3>
    {
        private ScaleToValue mScaler;

        protected override void Awake()
        {
            mScaler = GetComponent<ScaleToValue>();

            base.Awake();
        }

        /// <summary>
        /// Set the scale value or animate scale
        /// </summary>
        /// <param name="index"></param>
        public override void SetIndex(int index)
        {
            base.SetIndex(index);

            Vector3 item = Current;

            if (mScaler != null)
            {
                mScaler.TargetValue = item;
                mScaler.StartRunning();
            }
            else
            {
                TargetObject.transform.localScale = item;
            }
        }
    }
}


text:
    <waltz-page-header icon="paper-plane-o"
                       name="Matching Change Initiatives"
                       small="{{ ctrl.externalId }}">
        <breadcrumbs>

Home

Waltz

        </breadcrumbs>
    </waltz-page-header>

 1">

                Several Change Initiatives match the supplied external id.

                Please select one:

        <waltz-no-data ng-if="ctrl.changeInitiatives.length === 0">
            <message>
                No Change Initiatives found with matching external id.
            </message>

        </waltz-no-data>


text:
package com.testdomain;

public class Person {
  private Integer id;

  private String firstName;

  private String lastName;

  public String getFirstName() {
    return firstName;
  }

  public void setFirstName(String firstName) {
    this.firstName = firstName;
  }

  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  public String getLastName() {
    return lastName;
  }

  public void setLastName(String lastName) {
    this.lastName = lastName;
  }

  public String toString() {
    StringBuffer sb = new StringBuffer();
    sb.append("id: ");
    sb.append(id);
    sb.append(", firstName: ");
    sb.append(firstName);
    sb.append(", lastName: ");
    sb.append(lastName);

    return sb.toString();
  }
}


text:
Thumbs.Router = Backbone.Router.extend(Thumbs._super).extend({
    preRoutes: null,

    _bindRoutes: function () {
        if (this.preBind && _.isFunction(this.preBind)) {
            this.preBind();
        }
        this._super('_bindRoutes', arguments);
    },

    route: function (route, name, callback) {
        if (!Thumbs.history) {
            Thumbs.history = Backbone.history;
        }

        this._super('route', arguments);

        this.setupPreRoute('all', route);
        this.setupPreRoute(null, route);

        return this;
    },

    setupPreRoute: function (path, route) {
        var checks, callback, preRoute;
        if (!path) {
            path = route;
            preRoute = "pre-route_" + route;
        } else {
            preRoute = "pre-route_" + path + route;
        }

        if (this.preRoutes && this.preRoutes[path]) {
            callback = this.preRoutes[path];

            if (_.isString(callback)) {
                callback = this[callback];
            } else if (_.isArray(callback)) {
                checks = callback;
                callback = _.bind(function () {
                    var i, result = true;
                    for (i = 0; i < checks.length; ++i) {
                        result = checks[i].apply(this);
                        if (!result) {
                            break;
                        }
                    }

                    return result;
                }, this);
            }

            if (!_.isRegExp(preRoute)) {
                preRoute = this._routeToRegExp(preRoute);
            }

            Thumbs.history.route(preRoute, _.bind(function () {
                return callback.apply(this);
            }, this));
        }

        return this;
    }
});


text:
package openperipheral.interfaces.oc.asm.object;

import java.util.Map;
import java.util.Set;
import openperipheral.adapter.IMethodExecutor;
import openperipheral.adapter.composed.IndexedMethodMap;
import openperipheral.interfaces.oc.asm.CommonMethodsBuilder;
import openperipheral.interfaces.oc.asm.ICodeGenerator;
import openperipheral.interfaces.oc.asm.Utils;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
import org.objectweb.asm.commons.Method;

public class ObjectCodeGenerator implements ICodeGenerator {

	private static final Type BASE_TYPE = Type.getType(ObjectEnvironmentBase.class);

	private static final Type SUPER_CTOR_TYPE = Type.getMethodType(Type.VOID_TYPE);

	@Override
	public byte[] generate(String clsName, Class<?> targetClass, Set<Class<?>> exposedInterfaces, IndexedMethodMap methods, int methodsId) {
		ClassWriter writer = new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS);

		writer.visit(Opcodes.V1_6,
				Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL | Opcodes.ACC_SYNTHETIC | Opcodes.ACC_SUPER,
				clsName, null, BASE_TYPE.getInternalName(), Utils.getInterfaces(exposedInterfaces));

		Type targetType = Type.getType(targetClass);

		CommonMethodsBuilder builder = new CommonMethodsBuilder(writer, clsName, targetType);

		builder.addTargetField();
		builder.addMethodsField();

		builder.addClassInit(methodsId);
		createConstructors(writer, clsName, targetType);

		final Map<Method, Type> exposedMethods = Utils.getExposedMethods(exposedInterfaces);
		for (Map.Entry<Method, Type> e : exposedMethods.entrySet())
			builder.addExposedMethodBypass(e.getKey(), e.getValue());

		for (int i = 0; i < methods.size(); i++) {
			String name = methods.getMethodName(i);
			IMethodExecutor executor = methods.getMethod(i);
			builder.createScriptMethodWrapper(name, i, executor);
		}

		writer.visitEnd();

		return writer.toByteArray();
	}

	private static void createConstructors(ClassWriter writer, String clsName, Type targetType) {
		createDefaultConstructor(writer, clsName, targetType);
		createDummyConstructor(writer, clsName, targetType);
	}

	private static void visitSuperCtor(MethodVisitor init) {
		init.visitVarInsn(Opcodes.ALOAD, 0);
		init.visitInsn(Opcodes.DUP);
		init.visitMethodInsn(Opcodes.INVOKESPECIAL, BASE_TYPE.getInternalName(), "<init>", SUPER_CTOR_TYPE.getDescriptor(), false);
	}

	private static void createDefaultConstructor(ClassWriter writer, String clsName, Type targetType) {
		final Type ctorType = Type.getMethodType(Type.VOID_TYPE, targetType);

		MethodVisitor init = writer.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_SYNTHETIC, "<init>", ctorType.getDescriptor(), null, null);
		init.visitCode();

		visitSuperCtor(init);

		init.visitVarInsn(Opcodes.ALOAD, 1);
		init.visitFieldInsn(Opcodes.PUTFIELD, clsName, CommonMethodsBuilder.TARGET_FIELD_NAME, targetType.getDescriptor());
		init.visitInsn(Opcodes.RETURN);

		init.visitMaxs(0, 0);

		init.visitEnd();
	}

	private static void createDummyConstructor(ClassWriter writer, String clsName, Type targetType) {
		final Type ctorType = Type.getMethodType(Type.VOID_TYPE);

		MethodVisitor init = writer.visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_SYNTHETIC, "<init>", ctorType.getDescriptor(), null, null);
		init.visitCode();

		visitSuperCtor(init);

		init.visitInsn(Opcodes.ACONST_NULL);
		init.visitFieldInsn(Opcodes.PUTFIELD, clsName, CommonMethodsBuilder.TARGET_FIELD_NAME, targetType.getDescriptor());
		init.visitInsn(Opcodes.RETURN);

		init.visitMaxs(0, 0);

		init.visitEnd();
	}
}


text:
<?php declare(strict_types=1);

namespace Kicaj\Schema\Database\MySQL;

use Kicaj\Schema\DbTable;
use Kicaj\Schema\Itf\ColumnItf;
use Kicaj\Schema\Itf\ConstraintItf;
use Kicaj\Schema\Itf\DatabaseItf;
use Kicaj\Schema\Itf\IndexItf;
use Kicaj\Schema\Itf\TableItf;
use Kicaj\Schema\SchemaEx;
use Kicaj\Tools\Helper\Str;

/**
 * MySQL Table.
 *
 * @author Rafal Zajac <rzajac@gmail.com>
 */
class Table extends DbTable
{
    /**
     * TableDef constructor.
     *
     * @param string      $tableCS The table create statement.
     * @param DatabaseItf $db      The database interface.
     *
     * @throws SchemaEx
     */
    public function __construct(string $tableCS, DatabaseItf $db)
    {
        $this->tableCS = $tableCS;
        $this->db = $db;

        $this->parseTableCS();
    }

    /**
     * Parse table create statement.
     *
     * @throws SchemaEx
     */
    protected function parseTableCS()
    {
        $lines = explode("\n", $this->tableCS);

        foreach ($lines as $index => $line) {
            $line = trim($line);
            // Column definitions start with `
            if (0 === strpos($line, '`')) {
                $this->addColumn(new Column($line, $index, $this));
            } elseif (Index::isIndexDef($line)) {
                $this->addIndex(new Index($line, $this));
            } elseif (Constraint::isConstraintDef($line)) {
                $this->addConstraint(new Constraint($line, $this));
            } elseif (preg_match('/CREATE TABLE `(.*?)`/', $line, $matches) === 1) {
                $this->name = $matches[1];
                $this->type = TableItf::TYPE_TABLE;
            } elseif (preg_match('/VIEW `(.*?)` AS /i', $line, $matches) === 1) {
                $this->name = $matches[1];
                $this->type = TableItf::TYPE_VIEW;
            }
        }
    }

    /**
     * Add database column definition.
     *
     * The addition order is significant.
     *
     * @param ColumnItf $column
     */
    public function addColumn(ColumnItf $column)
    {
        $this->columns[$column->getName()] = $column;
    }

    /**
     * Add index definition.
     *
     * @param IndexItf $index
     *
     * @throws SchemaEx
     */
    public function addIndex(IndexItf $index)
    {
        $this->indexes[$index->getName()] = $index;

        if ($index->getType() == IndexItf::PRIMARY) {
            /** @var Column $column */
            foreach ($index->getColumns() as $column) {
                $column->setPartOfPk();
            }
        }
    }

    /**
     * Add index constraint.
     *
     * @param ConstraintItf $constraint
     */
    public function addConstraint(ConstraintItf $constraint)
    {
        $this->constraints[$constraint->getName()] = $constraint;
    }

    public function getDropStatement(): string
    {
        $sql = '';
        switch ($this->type) {
            case TableItf::TYPE_TABLE:
                $sql = 'DROP TABLE IF EXISTS `' . $this->name . '`;';
                break;

            case TableItf::TYPE_VIEW:
                $sql = 'DROP VIEW IF EXISTS `' . $this->name . '`;';
        }

        return $sql;
    }

    /**
     * Fix and rewrite CREATE statements if needed.
     *
     * @param bool $addIfNotExists Set to true to add if not exists condition.
     *
     * @return string The table create statement.
     */
    protected function fixCreateStatement(bool $addIfNotExists = false): string
    {
        $tableCS = '';
        switch ($this->type) {
            case TableItf::TYPE_TABLE:
                $tableCS = $this->fixTableCreateStatement($addIfNotExists);
                break;

            case TableItf::TYPE_VIEW:
                $tableCS = $this->fixViewCreateStatement($addIfNotExists);
                break;
        }

        return $tableCS;
    }

    /**
     * Fix and rewrite CREATE statements if needed.
     *
     * @param bool $addIfNotExists Set to true to add if not exists condition.
     *
     * @return string The table create statement.
     */
    protected function fixViewCreateStatement(bool $addIfNotExists = false): string
    {
        $tableCS = $this->tableCS;

        if (!(Str::endsWith(trim($this->tableCS), ';'))) {
            $tableCS = trim($this->tableCS) . ";";
        }

        if (!$addIfNotExists) {
            return $tableCS;
        }

        return preg_replace('/CREATE/', 'CREATE OR REPLACE', $tableCS);
    }

    /**
     * Fix and rewrite table CREATE statement if needed.
     *
     * @param bool $addIfNotExists Set to true to add if not exists condition.
     *
     * @return string The table create statement.
     */
    protected function fixTableCreateStatement(bool $addIfNotExists = false): string
    {
        $tableCS = $this->tableCS;

        if (!(Str::endsWith(trim($this->tableCS), ';'))) {
            $tableCS = trim($this->tableCS) . ";";
        }

        $tableCS = preg_replace('/(AUTO_INCREMENT=)([0-9]+)/', '${1}1', $tableCS);

        if (!$addIfNotExists) {
            return $tableCS;
        }

        $tableCS = preg_replace('/CREATE TABLE/', 'CREATE TABLE'.' IF NOT EXISTS', $tableCS);

        return $tableCS;
    }

    public function getPrimaryKey()
    {
        return array_key_exists('', $this->indexes) ? $this->indexes[''] : null;
    }

    public function getCreateStatement(bool $addIfNotExists = false): string
    {
        return $this->fixCreateStatement($addIfNotExists);
    }
}


text:
Projection that may be projected along with other supported volume types
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**config_map** | [**V1ConfigMapProjection**](V1ConfigMapProjection.md) |  | [optional]
**downward_api** | [**V1DownwardAPIProjection**](V1DownwardAPIProjection.md) |  | [optional]
**secret** | [**V1SecretProjection**](V1SecretProjection.md) |  | [optional]
**service_account_token** | [**V1ServiceAccountTokenProjection**](V1ServiceAccountTokenProjection.md) |  | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


text:
set (INPUT_FILE "" CACHE STRING "")
set (OUTPUT_FILE "" CACHE STRING "")

foreach (VAR IN ITEMS INPUT_FILE OUTPUT_FILE)

    if (NOT ${VAR})

        message (FATAL_ERROR "${VAR} must be set")

    endif ()

endforeach ()

file (READ "${INPUT_FILE}" CONTENTS)
string (REPLACE "[" "" CONTENTS "${CONTENTS}")
string (REPLACE "]" "" CONTENTS "${CONTENTS}")
file (WRITE "${OUTPUT_FILE}" "${CONTENTS}")


text:
<!DOCTYPE html>

    <meta charset="utf-8" />

    <title>User agent detail - Mozilla/5.0 (compatible; U; ABrowse 0.6; Syllable) AppleWebKit/420+ (KHTML, like Gecko)</title>

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css">
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
    <link href="../circle.css" rel="stylesheet">

User agent detail

            Mozilla/5.0 (compatible; U; ABrowse 0.6; Syllable) AppleWebKit/420+ (KHTML, like Gecko)

	General	Device	Bot

Provider	Browser	Engine	OS	Brand	Model	Type	Is mobile	Is touch	Is bot	Name	Type	Parse time	Actions

Test suite

Browscap
6014
vendor/browscap/browscap/tests/fixtures/issues/issue-865.php	ABrowse 0.6	WebKit unknown	Syllable unknown	unknown	general Desktop	Desktop						0

Detail

Browscap result detail

Array
(
    [Comment] => ABrowse 0.6
    [Browser] => ABrowse
    [Browser_Type] => Browser
    [Browser_Bits] => 32
    [Browser_Maker] => Syllable Project
    [Browser_Modus] => unknown
    [Version] => 0.6
    [MajorVer] => 0
    [MinorVer] => 6
    [Platform] => Syllable
    [Platform_Version] => unknown
    [Platform_Description] => unknown
    [Platform_Bits] => 32
    [Platform_Maker] => Syllable Project
    [Alpha] =>
    [Beta] =>
    [Win16] =>
    [Win32] =>
    [Win64] =>
    [Frames] => 1
    [IFrames] => 1
    [Tables] => 1
    [Cookies] => 1
    [BackgroundSounds] =>
    [JavaScript] => 1
    [VBScript] =>
    [JavaApplets] => 1
    [ActiveXControls] =>
    [isMobileDevice] =>
    [isTablet] =>
    [isSyndicationReader] =>
    [Crawler] =>
    [isFake] =>
    [isAnonymized] =>
    [isModified] =>
    [CssVersion] => 3
    [AolVersion] => 0
    [Device_Name] => general Desktop
    [Device_Maker] => Various
    [Device_Type] => Desktop
    [Device_Pointing_Method] => mouse
    [Device_Code_Name] => general Desktop
    [Device_Brand_Name] => unknown
    [RenderingEngine_Name] => WebKit
    [RenderingEngine_Version] => unknown
    [RenderingEngine_Maker] => Apple Inc
)

        close

PiwikDeviceDetector
3.6.1
vendor/piwik/device-detector/Tests/fixtures/desktop.yml	ABrowse 0.6	WebKit 	Syllable 			desktop	close	close				0

Detail

PiwikDeviceDetector result detail

Array
(
    [user_agent] => Mozilla/5.0 (compatible; U; ABrowse 0.6; Syllable) AppleWebKit/420+ (KHTML, like Gecko)
    [os] => Array
        (
            [name] => Syllable
            [short_name] => SYL
            [version] =>
            [platform] =>
        )

    [client] => Array
        (
            [type] => browser
            [name] => ABrowse
            [short_name] => AB
            [version] => 0.6
            [engine] => WebKit
        )

    [device] => Array
        (
            [type] => desktop
            [brand] =>
            [model] =>
        )

    [os_family] => Unix
    [browser_family] => Unknown
)

        close

WhichBrowser
v2.0.18
vendor/whichbrowser/parser/tests/data/desktop/os-syllable.yaml	ABrowse 0.6	Webkit 420	Syllable 			desktop	close	close			close	0

Detail

WhichBrowser result detail

Array
(
    [headers] => User-Agent: Mozilla/5.0 (compatible; U; ABrowse 0.6; Syllable) AppleWebKit/420+ (KHTML, like Gecko)
    [result] => Array
        (
            [browser] => Array
                (
                    [name] => ABrowse
                    [version] => 0.6
                    [type] => browser
                )

            [engine] => Array
                (
                    [name] => Webkit
                    [version] => 420
                )

            [os] => Array
                (
                    [name] => Syllable
                )

            [device] => Array
                (
                    [type] => desktop
                )

        )

    [readable] => ABrowse 0.6 on Syllable
)

        close

Providers

BrowscapFull
6014
	ABrowse 0.6	WebKit 	Syllable 			Desktop						0.012

Detail

BrowscapFull result detail

stdClass Object
(
    [browser_name_regex] => /^mozilla\/5\.0 \(compatible; u; abrowse 0\.6.*syllable.*\) applewebkit\/.* \(khtml.* like gecko\).*$/
    [browser_name_pattern] => mozilla/5.0 (compatible; u; abrowse 0.6*syllable*) applewebkit/* (khtml* like gecko)*
    [parent] => ABrowse 0.6
    [comment] => ABrowse 0.6
    [browser] => ABrowse
    [browser_type] => Browser
    [browser_bits] => 32
    [browser_maker] => Syllable Project
    [browser_modus] => unknown
    [version] => 0.6
    [majorver] => 0
    [minorver] => 6
    [platform] => Syllable
    [platform_version] => unknown
    [platform_description] => unknown
    [platform_bits] => 32
    [platform_maker] => Syllable Project
    [alpha] =>
    [beta] =>
    [win16] =>
    [win32] =>
    [win64] =>
    [frames] => 1
    [iframes] => 1
    [tables] => 1
    [cookies] => 1
    [backgroundsounds] =>
    [javascript] => 1
    [vbscript] =>
    [javaapplets] => 1
    [activexcontrols] =>
    [ismobiledevice] =>
    [istablet] =>
    [issyndicationreader] =>
    [crawler] =>
    [isfake] =>
    [isanonymized] =>
    [ismodified] =>
    [cssversion] => 3
    [aolversion] => 0
    [device_name] => general Desktop
    [device_maker] => Various
    [device_type] => Desktop
    [device_pointing_method] => mouse
    [device_code_name] => general Desktop
    [device_brand_name] => unknown
    [renderingengine_name] => WebKit
    [renderingengine_version] => unknown
    [renderingengine_description] => For Google Chrome, iOS (including both mobile Safari, WebViews within third-party apps, and web clips), Safari, Arora, Midori, OmniWeb, Shiira, iCab since version 4, Web, SRWare Iron, Rekonq, and in Maxthon 3.
    [renderingengine_maker] => Apple Inc
)

        close

BrowscapLite
6014

                        No result found

BrowscapPhp
6014
	ABrowse 0.6	close	Syllable 	close	close	Desktop					close	0.015

Detail

BrowscapPhp result detail

stdClass Object
(
    [browser_name_regex] => /^mozilla\/5\.0 \(compatible; u; abrowse 0\.6.*syllable.*\) applewebkit\/.* \(khtml.* like gecko\).*$/
    [browser_name_pattern] => mozilla/5.0 (compatible; u; abrowse 0.6*syllable*) applewebkit/* (khtml* like gecko)*
    [parent] => ABrowse 0.6
    [comment] => ABrowse 0.6
    [browser] => ABrowse
    [browser_type] => unknown
    [browser_bits] => 0
    [browser_maker] => Syllable Project
    [browser_modus] => unknown
    [version] => 0.6
    [majorver] => 0
    [minorver] => 6
    [platform] => Syllable
    [platform_version] => unknown
    [platform_description] => unknown
    [platform_bits] => 0
    [platform_maker] => unknown
    [alpha] => false
    [beta] => false
    [win16] => false
    [win32] => false
    [win64] => false
    [frames] => false
    [iframes] => false
    [tables] => false
    [cookies] => false
    [backgroundsounds] => false
    [javascript] => false
    [vbscript] => false
    [javaapplets] => false
    [activexcontrols] => false
    [ismobiledevice] =>
    [istablet] =>
    [issyndicationreader] => false
    [crawler] =>
    [isfake] => false
    [isanonymized] => false
    [ismodified] => false
    [cssversion] => 0
    [aolversion] => 0
    [device_name] => unknown
    [device_maker] => unknown
    [device_type] => Desktop
    [device_pointing_method] => mouse
    [device_code_name] => unknown
    [device_brand_name] => unknown
    [renderingengine_name] => unknown
    [renderingengine_version] => unknown
    [renderingengine_description] => unknown
    [renderingengine_maker] => unknown
)

        close

DonatjUAParser
v0.5.1
	AppleWebKit 420	close	close	close	close	close	close	close	close	close	close	0

Detail

DonatjUAParser result detail

Array
(
    [platform] =>
    [browser] => AppleWebKit
    [version] => 420
)

        close

JenssegersAgent
v2.3.3
	Mozilla 	close	 	close	close	close		close			close	0.002

Detail

JenssegersAgent result detail

Array
(
    [browserName] => Mozilla
    [browserVersion] =>
    [osName] =>
    [osVersion] =>
    [deviceModel] => WebKit
    [isMobile] =>
    [isRobot] =>
    [botName] =>
)

        close

NeutrinoApiCom

	ABrowse 0.6	close	Syllable 			desktop-browser		close			close	0.20501

Detail

NeutrinoApiCom result detail

stdClass Object
(
    [mobile_screen_height] => 0
    [is_mobile] =>
    [type] => desktop-browser
    [mobile_brand] =>
    [mobile_model] =>
    [version] => 0.6
    [is_android] =>
    [browser_name] => ABrowse
    [operating_system_family] => Syllable
    [operating_system_version] =>
    [is_ios] =>
    [producer] => Kurt Skauen
    [operating_system] => Syllable
    [mobile_screen_width] => 0
    [mobile_browser] =>
)

        close

PiwikDeviceDetector
3.6.1
	ABrowse 0.6	WebKit 	Syllable 			desktop						0.006

Detail

PiwikDeviceDetector result detail

Array
(
    [client] => Array
        (
            [type] => browser
            [name] => ABrowse
            [short_name] => AB
            [version] => 0.6
            [engine] => WebKit
        )

    [operatingSystem] => Array
        (
            [name] => Syllable
            [short_name] => SYL
            [version] =>
            [platform] =>
        )

    [device] => Array
        (
            [brand] =>
            [brandName] =>
            [model] =>
            [device] => 0
            [deviceName] => desktop
        )

    [bot] =>
    [extra] => Array
        (
            [isBot] =>
            [isBrowser] => 1
            [isFeedReader] =>
            [isMobileApp] =>
            [isPIM] =>
            [isLibrary] =>
            [isMediaPlayer] =>
            [isCamera] =>
            [isCarBrowser] =>
            [isConsole] =>
            [isFeaturePhone] =>
            [isPhablet] =>
            [isPortableMediaPlayer] =>
            [isSmartDisplay] =>
            [isSmartphone] =>
            [isTablet] =>
            [isTV] =>
            [isDesktop] => 1
            [isMobile] =>
            [isTouchEnabled] =>
        )

)

        close

SinergiBrowserDetector
6.0.1
	Mozilla 5.0	close	 	close		close		close		close	close	0

Detail

SinergiBrowserDetector result detail

Array
(
    [browser] => Sinergi\BrowserDetector\Browser Object
        (
            [userAgent:Sinergi\BrowserDetector\Browser:private] => Sinergi\BrowserDetector\UserAgent Object
                (
                    [userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (compatible; U; ABrowse 0.6; Syllable) AppleWebKit/420+ (KHTML, like Gecko)
                )

            [name:Sinergi\BrowserDetector\Browser:private] => Mozilla
            [version:Sinergi\BrowserDetector\Browser:private] => 5.0
            [isRobot:Sinergi\BrowserDetector\Browser:private] =>
            [isChromeFrame:Sinergi\BrowserDetector\Browser:private] =>
            [isFacebookWebView:Sinergi\BrowserDetector\Browser:private] =>
            [isCompatibilityMode:Sinergi\BrowserDetector\Browser:private] =>
        )

    [operatingSystem] => Sinergi\BrowserDetector\Os Object
        (
            [name:Sinergi\BrowserDetector\Os:private] => unknown
            [version:Sinergi\BrowserDetector\Os:private] => unknown
            [isMobile:Sinergi\BrowserDetector\Os:private] =>
            [userAgent:Sinergi\BrowserDetector\Os:private] => Sinergi\BrowserDetector\UserAgent Object
                (
                    [userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (compatible; U; ABrowse 0.6; Syllable) AppleWebKit/420+ (KHTML, like Gecko)
                )

        )

    [device] => Sinergi\BrowserDetector\Device Object
        (
            [name:Sinergi\BrowserDetector\Device:private] => unknown
            [userAgent:Sinergi\BrowserDetector\Device:private] => Sinergi\BrowserDetector\UserAgent Object
                (
                    [userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (compatible; U; ABrowse 0.6; Syllable) AppleWebKit/420+ (KHTML, like Gecko)
                )

        )

)

        close

UAParser
v3.4.5

                        No result found

UserAgentApiCom

                        No result found

UserAgentStringCom

	ABrowse 0.6	close	Syllable 	close	close	close	close	close				0.074

Detail

UserAgentStringCom result detail

stdClass Object
(
    [agent_type] => Browser
    [agent_name] => ABrowse
    [agent_version] => 0.6
    [os_type] => Syllable
    [os_name] => Syllable
    [os_versionName] =>
    [os_versionNumber] =>
    [os_producer] =>
    [os_producerURL] =>
    [linux_distibution] => Null
    [agent_language] =>
    [agent_languageTag] =>
)

        close

WhatIsMyBrowserCom

	Mozilla 5.0	WebKit 420	 			close	close	close	close	close	close	0.23601

Detail

WhatIsMyBrowserCom result detail

stdClass Object
(
    [operating_system_name] =>
    [simple_sub_description_string] =>
    [simple_browser_string] => Mozilla 5
    [browser_version] => 5
    [extra_info] => Array
        (
        )

    [operating_platform] =>
    [extra_info_table] => Array
        (
        )

    [layout_engine_name] => WebKit
    [detected_addons] => Array
        (
        )

    [operating_system_flavour_code] =>
    [hardware_architecture] =>
    [operating_system_flavour] =>
    [operating_system_frameworks] => Array
        (
        )

    [browser_name_code] => mozilla
    [operating_system_version] =>
    [simple_operating_platform_string] =>
    [is_abusive] =>
    [layout_engine_version] => 420
    [browser_capabilities] => Array
        (
        )

    [operating_platform_vendor_name] =>
    [operating_system] =>
    [operating_system_version_full] =>
    [operating_platform_code] =>
    [browser_name] => Mozilla
    [operating_system_name_code] =>
    [user_agent] => Mozilla/5.0 (compatible; U; ABrowse 0.6; Syllable) AppleWebKit/420+ (KHTML, like Gecko)
    [browser_version_full] => 5.0
    [browser] => Mozilla 5
)

        close

WhichBrowser
v2.0.18
	ABrowse 0.6	Webkit 420	Syllable 			desktop		close			close	0.001

Detail

WhichBrowser result detail

Array
(
    [browser] => Array
        (
            [name] => ABrowse
            [version] => 0.6
            [type] => browser
        )

    [engine] => Array
        (
            [name] => Webkit
            [version] => 420
        )

    [os] => Array
        (
            [name] => Syllable
        )

    [device] => Array
        (
            [type] => desktop
        )

)

        close

Woothee
v1.2.0

                        No result found

Wurfl
1.7.1.0

                        No result found

Zsxsoft
1.3

                        No result found

About this comparison

                The primary goal of this project is simple

                I wanted to know which user agent parser is the most accurate in each part - device detection, bot detection and so on...

                The secondary goal is to provide a source for all user agent parsers to improve their detection based on this results.

                You can also improve this further, by suggesting ideas at ThaDafinser/UserAgentParserComparison

                The comparison is based on the abstraction by ThaDafinser/UserAgentParser

			Comparison created 2016-05-10 08:03:50 | by
            ThaDafinser


text:
include ../make/bazel.mk

.PHONY: build release push
build:
	${BAZEL} build //contestk/go/...

release: build
	${BAZEL} run //contestk:push_contest_container

push: release
	$(BAZEL) run --config=mayberemote //kube/go/pushk -- --use-temp-checkout contest