text:
@class DVTSourceControlWorkingCopy, DVTStackBacktrace, IDESourceControlWorkingTree, IDEWorkspace, NSArray, NSOperationQueue, NSString, NSWindow;

@interface IDESourceControlOperationInfo : NSObject <DVTInvalidation>
{
    NSOperationQueue *_queue;
    IDESourceControlWorkingTree *_workingTree;
    IDEWorkspace *_workspace;
    NSArray *_itemsToOperateOn;
    NSWindow *_window;
    DVTSourceControlWorkingCopy *_workingCopy;
    id  _currentCancellable;
}

+ (id)containerFileTypesBlacklistedFromOutlineViewCompression;
+ (unsigned long long)assertionBehaviorAfterEndOfEventForSelector:(SEL)arg1;
+ (void)initialize;
@property(retain) id  currentCancellable; // @synthesize currentCancellable=_currentCancellable;
@property(retain) DVTSourceControlWorkingCopy *workingCopy; // @synthesize workingCopy=_workingCopy;
@property __weak NSWindow *window; // @synthesize window=_window;
@property(retain) NSArray *itemsToOperateOn; // @synthesize itemsToOperateOn=_itemsToOperateOn;
@property(retain) IDEWorkspace *workspace; // @synthesize workspace=_workspace;
@property(retain) IDESourceControlWorkingTree *workingTree; // @synthesize workingTree=_workingTree;
- (id)calculateContainersForItem:(id)arg1;
- (id)processInfoWithProgressBlock:(dispatch_block_t)arg1 isSingleOperation:(BOOL)arg2 completionBlock:(dispatch_block_t)arg3;
- (void)primitiveInvalidate;
- (id)init;

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

@end


text:
import React, { ReactNode } from 'react';
import styled from 'styled-components';

// == styles =======================================================================================
const Label = styled.div`
  margin: 0.15rem;
  font-size: 0.7rem;
  line-height: 1em;
  overflow: hidden;
  width: calc( 100% - 4.3rem );
  text-overflow: ellipsis;
  white-space: nowrap;
`;

const Root = styled.div`
  display: flex;
  justify-content: space-between;
  margin: 0.125rem 0;
`;

// == components ===================================================================================
export interface InspectorItemProps {
  className?: string;
  children?: ReactNode;
  name?: string;
  description?: string;
}

const InspectorItem = ( {
  className,
  children,
  name,
  description
}: InspectorItemProps ): JSX.Element => (
  <Root
    className={ className }
    data-stalker={ description ?? name }
  >
    <Label>{ name }</Label>
    { children }
  </Root>
);

export { InspectorItem };

redpajama_set_name: RedPajamaGithub


text:
    {{ custom_title }}

.NET | TDD | Architecture

<form class="bd-search d-flex align-items-center" action="/search.html" method="get">

<input type="search" class="form-control" name="q" id="search-input" placeholder="Search..." aria-label="Search..." autocomplete="off">
</form>


text:
<?php include 'includes/header.php';?>

Corsair GS600 600 Watt PSU

The Corsair Gaming Series GS600 is the ideal price/performance choice for mid-spec gaming PC

$ 1234.00

In Stock

						<button type="button" class="btn btn-success">
							Add to cart
						</button>

						<button type="button" class="btn btn-danger">
							Add to wishlist
						</button>

DESCRIPTION

PRODUCT INFO

REVIEWS

								The Corsair Gaming Series GS600 power supply is the ideal price-performance solution for building or upgrading a Gaming PC. A single +12V rail provides up to 48A of reliable, continuous power for multi-core gaming PCs with multiple graphics cards. The ultra-quiet, dual ball-bearing fan automatically adjusts its speed according to temperature, so it will never intrude on your music and games. Blue LEDs bathe the transparent fan blades in a cool glow. Not feeling blue? You can turn off the lighting with the press of a button.

Corsair Gaming Series GS600 Features:

It supports the latest ATX12V v2.3 standard and is backward compatible with ATX12V 2.2 and ATX12V 2.01 systems

An ultra-quiet 140mm double ball-bearing fan delivers great airflow at an very low noise level by varying fan speed in response to temperature

80Plus certified to deliver 80% efficiency or higher at normal load conditions (20% to 100% load)

0.99 Active Power Factor Correction provides clean and reliable power

Universal AC input from 90~264V — no more hassle of flipping that tiny red switch to select the voltage input!

Extra long fully-sleeved cables support full tower chassis

A three year warranty and lifetime access to Corsair's legendary technical support and customer service

Over Current/Voltage/Power Protection, Under Voltage Protection and Short Circuit Protection provide complete component safety

Dimensions: 150mm(W) x 86mm(H) x 160mm(L)

MTBF: 100,000 hours

Safety Approvals: UL, CUL, CE, CB, FCC Class B, TÜV, CCC, C-tick

<?php include 'includes/footer.php';?>


text:
/*	$NetBSD: lpt_elb.c,v 1.2 2003/07/15 01:37:37 lukem Exp $	*/

/*-
 * Copyright (c) 2003 The NetBSD Foundation, Inc.
 * All rights reserved.
 *
 * This code is derived from software contributed to The NetBSD Foundation
 * by Juergen Hannken-Illjes.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *      This product includes software developed by the NetBSD
 *      Foundation, Inc. and its contributors.
 * 4. Neither the name of The NetBSD Foundation nor the names of its
 *    contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lpt_elb.c,v 1.2 2003/07/15 01:37:37 lukem Exp $");

#include <sys/param.h>
#include <sys/conf.h>
#include <sys/device.h>
#include <sys/systm.h>
#include <sys/tty.h>

#include <machine/bus.h>

#include <dev/ic/lptreg.h>
#include <dev/ic/lptvar.h>

#include <evbppc/explora/dev/elbvar.h>

static int	lpt_elb_probe(struct device *, struct cfdata *, void *);
static void	lpt_elb_attach(struct device *, struct device *, void *);

CFATTACH_DECL(lpt_elb, sizeof(struct lpt_softc),
    lpt_elb_probe, lpt_elb_attach, NULL, NULL);

int
lpt_elb_probe(struct device *parent, struct cfdata *cf, void *aux)
{
	struct elb_attach_args *oaa = aux;

	if (strcmp(oaa->elb_name, cf->cf_name) != 0)
		return 0;

	return (1);
}

void
lpt_elb_attach(struct device *parent, struct device *self, void *aux)
{
	struct lpt_softc *sc = (struct lpt_softc *)self;
	struct elb_attach_args *eaa = aux;

	sc->sc_iot = eaa->elb_bt;
	bus_space_map(sc->sc_iot, eaa->elb_base, LPT_NPORTS, 0, &sc->sc_ioh);

	printf("\n");

	lpt_attach_subr(sc);
}


text:
from PIL import Image
import sys

import pyocr
import pyocr.builders

tools = pyocr.get_available_tools()
if len(tools) == 0:
    print("No OCR tool found")
    sys.exit(1)
# The tools are returned in the recommended order of usage
tool = tools[0]
print("Will use tool '%s'" % (tool.get_name()))
# Ex: Will use tool 'libtesseract'

langs = tool.get_available_languages()
print("Available languages: %s" % ", ".join(langs))
lang = langs[1]
print("Will use lang '%s'" % (lang))

txt = tool.image_to_string(
    Image.open('KTP2.png'),
    lang=lang,
    builder=pyocr.builders.TextBuilder()
)
print('text is'+txt)


text:
package io.subutai.core.registration.rest.transitional;

import java.util.HashSet;
import java.util.Set;

import io.subutai.common.host.ContainerHostState;
import io.subutai.common.host.HostArchitecture;
import io.subutai.common.host.HostInfo;
import io.subutai.common.host.HostInterface;
import io.subutai.common.host.HostInterfaceModel;
import io.subutai.common.host.HostInterfaces;
import io.subutai.common.host.Quota;
import io.subutai.core.registration.api.ResourceHostRegistrationStatus;
import io.subutai.core.registration.api.service.ContainerInfo;

public class ContainerInfoJson implements ContainerInfo
{
    private String id;
    private String hostname;
    private String name;
    private Integer vlan;
    private String envId;
    private String templateName;
    private Set<HostInterfaceJson> interfaces = new HashSet<>();
    private HostArchitecture arch;
    private String publicKey;
    private String gateway;
    private ResourceHostRegistrationStatus status = ResourceHostRegistrationStatus.REQUESTED;
    private ContainerHostState state;
    private Quota quota;

    ContainerInfoJson( ContainerInfo hostInfo )
    {
        this.id = hostInfo.getId();
        this.hostname = hostInfo.getHostname();
        this.name = hostInfo.getContainerName();
        this.templateName = hostInfo.getTemplateName();
        this.vlan = hostInfo.getVlan();
        this.arch = hostInfo.getArch();
        this.publicKey = hostInfo.getPublicKey();
        this.status = hostInfo.getStatus();
        this.gateway = hostInfo.getGateway();
        this.state = hostInfo.getState();
        this.quota = hostInfo.getRawQuota();
        this.envId = hostInfo.getEnvId();
        if ( arch == null )
        {
            arch = HostArchitecture.AMD64;
        }
        for ( HostInterface anHostInterface : hostInfo.getHostInterfaces().getAll() )
        {
            this.interfaces.add( new HostInterfaceJson( anHostInterface ) );
        }
    }

    @Override
    public Quota getRawQuota()
    {
        return quota;
    }

    @Override
    public String getId()
    {
        return id;
    }

    @Override
    public String getHostname()
    {
        return hostname;
    }

    @Override
    public String getContainerName()
    {
        return name;
    }

    @Override
    public String getGateway()
    {
        return gateway;
    }

    @Override
    public ContainerHostState getState()
    {
        return state;
    }

    @Override
    public HostInterfaces getHostInterfaces()
    {
        HostInterfaces result = new HostInterfaces();
        if ( this.interfaces == null )
        {
            return result;
        }
        for ( HostInterface hostInterface : this.interfaces )
        {
            HostInterfaceModel model = new HostInterfaceModel( hostInterface );
            result.addHostInterface( model );
        }
        return result;
    }

    @Override
    public HostArchitecture getArch()
    {
        return arch;
    }

    @Override
    public String getTemplateName()
    {
        return templateName;
    }

    @Override
    public Integer getVlan()
    {
        return vlan;
    }

    @Override
    public String getEnvId()
    {
        return envId;
    }

    @Override
    public String getPublicKey()
    {
        return publicKey;
    }

    @Override
    public ResourceHostRegistrationStatus getStatus()
    {
        return status;
    }

    @Override
    public int compareTo( final HostInfo o )
    {
        return hostname.compareTo( o.getHostname() );
    }

    @Override
    public boolean equals( final Object o )
    {
        if ( this == o )
        {
            return true;
        }
        if ( !( o instanceof ContainerInfoJson ) )
        {
            return false;
        }

        final ContainerInfoJson that = ( ContainerInfoJson ) o;

        return arch == that.arch && hostname.equals( that.hostname ) && id.equals( that.id ) && interfaces
                .equals( that.interfaces );
    }

    @Override
    public int hashCode()
    {
        return id.hashCode();
    }

    @Override
    public String toString()
    {
        return "ContainerHostInfoModel{" + "id='" + id + '\'' + ", hostname='" + hostname + '\'' + ", interfaces="
                + interfaces + ", arch=" + arch + '}';
    }
}


text:
package gles2

import (
	"github.com/slimsag/gfx"
	gl "github.com/slimsag/gfx/internal/gles2/2.0/gles2"
)

// Texture implements the gfx.Texture interface by wrapping a OpenGL
// texture object ID.
type Texture struct {
	// o is literally the OpenGL texture object ID.
	o uint32

	ctx *Context
	typ gfx.TextureType
}

// Type implements the gfx.Texture interface.
func (t *Texture) Type() gfx.TextureType {
	return t.typ
}

// Delete implements the gfx.Object interface.
func (t *Texture) Delete() {
	if t.o == 0 {
		return
	}
	gl.DeleteTextures(1, &t.o)
	t.o = 0
}

// Object implements the gfx.Object interface.
func (t *Texture) Object() interface{} {
	return t.o
}


text:
package com.ait.lienzo.client.widget;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import com.ait.lienzo.client.core.config.LienzoCore;
import com.ait.lienzo.client.core.event.AbstractNodeHumanInputEvent;
import com.ait.lienzo.client.core.event.INodeXYEvent;
import com.ait.lienzo.client.core.event.NodeDragEndEvent;
import com.ait.lienzo.client.core.event.NodeDragMoveEvent;
import com.ait.lienzo.client.core.event.NodeDragStartEvent;
import com.ait.lienzo.client.core.event.NodeGestureChangeEvent;
import com.ait.lienzo.client.core.event.NodeGestureEndEvent;
import com.ait.lienzo.client.core.event.NodeGestureStartEvent;
import com.ait.lienzo.client.core.event.NodeMouseClickEvent;
import com.ait.lienzo.client.core.event.NodeMouseDoubleClickEvent;
import com.ait.lienzo.client.core.event.NodeMouseDownEvent;
import com.ait.lienzo.client.core.event.NodeMouseEnterEvent;
import com.ait.lienzo.client.core.event.NodeMouseExitEvent;
import com.ait.lienzo.client.core.event.NodeMouseMoveEvent;
import com.ait.lienzo.client.core.event.NodeMouseOutEvent;
import com.ait.lienzo.client.core.event.NodeMouseOverEvent;
import com.ait.lienzo.client.core.event.NodeMouseUpEvent;
import com.ait.lienzo.client.core.event.NodeMouseWheelEvent;
import com.ait.lienzo.client.core.event.NodeTouchCancelEvent;
import com.ait.lienzo.client.core.event.NodeTouchEndEvent;
import com.ait.lienzo.client.core.event.NodeTouchMoveEvent;
import com.ait.lienzo.client.core.event.NodeTouchStartEvent;
import com.ait.lienzo.client.core.event.TouchPoint;
import com.ait.lienzo.client.core.mediator.Mediators;
import com.ait.lienzo.client.core.shape.IPrimitive;
import com.ait.lienzo.client.core.shape.Node;
import com.ait.lienzo.client.core.shape.Shape;
import com.ait.lienzo.client.core.shape.Viewport;
import com.ait.lienzo.shared.core.types.DragMode;
import com.ait.lienzo.shared.core.types.EventPropagationMode;
import com.ait.tooling.common.api.java.util.function.Predicate;
import com.ait.tooling.nativetools.client.collection.NFastArrayList;
import com.google.gwt.core.client.JsArray;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.Style.Cursor;
import com.google.gwt.dom.client.Touch;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.DoubleClickEvent;
import com.google.gwt.event.dom.client.DoubleClickHandler;
import com.google.gwt.event.dom.client.GestureChangeEvent;
import com.google.gwt.event.dom.client.GestureChangeHandler;
import com.google.gwt.event.dom.client.GestureEndEvent;
import com.google.gwt.event.dom.client.GestureEndHandler;
import com.google.gwt.event.dom.client.GestureStartEvent;
import com.google.gwt.event.dom.client.GestureStartHandler;
import com.google.gwt.event.dom.client.MouseDownEvent;
import com.google.gwt.event.dom.client.MouseDownHandler;
import com.google.gwt.event.dom.client.MouseEvent;
import com.google.gwt.event.dom.client.MouseMoveEvent;
import com.google.gwt.event.dom.client.MouseMoveHandler;
import com.google.gwt.event.dom.client.MouseOutEvent;
import com.google.gwt.event.dom.client.MouseOutHandler;
import com.google.gwt.event.dom.client.MouseOverEvent;
import com.google.gwt.event.dom.client.MouseOverHandler;
import com.google.gwt.event.dom.client.MouseUpEvent;
import com.google.gwt.event.dom.client.MouseUpHandler;
import com.google.gwt.event.dom.client.MouseWheelEvent;
import com.google.gwt.event.dom.client.MouseWheelHandler;
import com.google.gwt.event.dom.client.TouchCancelEvent;
import com.google.gwt.event.dom.client.TouchCancelHandler;
import com.google.gwt.event.dom.client.TouchEndEvent;
import com.google.gwt.event.dom.client.TouchEndHandler;
import com.google.gwt.event.dom.client.TouchEvent;
import com.google.gwt.event.dom.client.TouchMoveEvent;
import com.google.gwt.event.dom.client.TouchMoveHandler;
import com.google.gwt.event.dom.client.TouchStartEvent;
import com.google.gwt.event.dom.client.TouchStartHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.GwtEvent.Type;

/**
 * This class is the center for all canvas events.
 * <p>
 * It can not and should not be used directly as it is used internally by the toolkit to handle and dispatch {@link Shape} events.
 */
final class LienzoHandlerManager
{
    private final LienzoPanel m_lienzo;

    private final Viewport    m_viewport;

    private final Mediators   m_mediators;

    private boolean           m_dragging               = false;

    private boolean           m_dragging_using_touches = false;

    private boolean           m_dragging_dispatch_move = false;

    private boolean           m_dragging_ignore_clicks = false;

    private boolean           m_dragging_mouse_pressed = false;

    private DragMode          m_drag_mode              = null;

    private IPrimitive<?>     m_drag_node              = null;

    private IPrimitive<?>     m_over_prim              = null;

    private DragContext       m_dragContext;

    private List<TouchPoint>  m_touches                = null;

    public LienzoHandlerManager(final LienzoPanel lienzo)
    {
        m_lienzo = lienzo;

        m_viewport = m_lienzo.getViewport();

        m_mediators = m_viewport.getMediators();

        addHandlers();
    }

    private final List<TouchPoint> getTouches(final TouchEvent<?> event)
    {
        final JsArray<Touch> jsarray = event.getTouches();

        final Element element = event.getRelativeElement();

        if ((null != jsarray) && (jsarray.length() > 0))
        {
            final int size = jsarray.length();

            final ArrayList<TouchPoint> touches = new ArrayList<TouchPoint>(size);

            for (int i = 0; i < size; i++)
            {
                final Touch touch = jsarray.get(i);

                touches.add(new TouchPoint(touch.getRelativeX(element), touch.getRelativeY(element)));
            }
            return touches;
        }
        else
        {
            int x = event.getNativeEvent().getClientX() - element.getAbsoluteLeft() + element.getScrollLeft() + element.getOwnerDocument().getScrollLeft();

            int y = event.getNativeEvent().getClientY() - element.getAbsoluteTop() + element.getScrollTop() + element.getOwnerDocument().getScrollTop();

            return Arrays.asList(new TouchPoint(x, y));
        }
    }

    private final void addHandlers()
    {
        m_lienzo.addClickHandler(new ClickHandler()
        {
            @Override
            public void onClick(final ClickEvent event)
            {
                onNodeMouseClick(new NodeMouseClickEvent(event));

                event.preventDefault();
            }
        });
        m_lienzo.addDoubleClickHandler(new DoubleClickHandler()
        {
            @Override
            public void onDoubleClick(final DoubleClickEvent event)
            {
                onNodeMouseDoubleClick(new NodeMouseDoubleClickEvent(event));

                event.preventDefault();
            }
        });
        m_lienzo.addMouseMoveHandler(new MouseMoveHandler()
        {
            @Override
            public void onMouseMove(final MouseMoveEvent event)
            {
                if ((m_dragging) && (m_dragging_using_touches))
                {
                    event.preventDefault();

                    return;// Ignore weird Mouse Move (0,0) in the middle of a Touch Drag on iOS/Safari
                }
                final NodeMouseMoveEvent nevent = new NodeMouseMoveEvent(event);

                if (m_mediators.handleEvent(nevent))
                {
                    event.preventDefault();

                    return;
                }
                onNodeMouseMove(nevent);

                event.preventDefault();
            }
        });
        m_lienzo.addMouseUpHandler(new MouseUpHandler()
        {
            @Override
            public void onMouseUp(final MouseUpEvent event)
            {
                final NodeMouseUpEvent nevent = new NodeMouseUpEvent(event);

                if (m_mediators.handleEvent(nevent))
                {
                    return;
                }
                onNodeMouseUp(nevent);
            }
        });
        m_lienzo.addMouseDownHandler(new MouseDownHandler()
        {
            @Override
            public void onMouseDown(final MouseDownEvent event)
            {
                final NodeMouseDownEvent nevent = new NodeMouseDownEvent(event);

                if (m_mediators.handleEvent(nevent))
                {
                    event.preventDefault();

                    return;
                }
                onNodeMouseDown(nevent);

                event.preventDefault();
            }
        });
        m_lienzo.addMouseOutHandler(new MouseOutHandler()
        {
            @Override
            public void onMouseOut(final MouseOutEvent event)
            {
                final NodeMouseOutEvent nevent = new NodeMouseOutEvent(event);

                if (m_mediators.handleEvent(nevent))
                {
                    return;
                }
                onNodeMouseOut(nevent);
            }
        });
        m_lienzo.addMouseOverHandler(new MouseOverHandler()
        {
            @Override
            public void onMouseOver(final MouseOverEvent event)
            {
                final NodeMouseOverEvent nevent = new NodeMouseOverEvent(event);

                if (m_mediators.handleEvent(nevent))
                {
                    return;
                }
                onNodeMouseOver(nevent);
            }
        });
        m_lienzo.addMouseWheelHandler(new MouseWheelHandler()
        {
            @Override
            public void onMouseWheel(final MouseWheelEvent event)
            {
                final NodeMouseWheelEvent nevent = new NodeMouseWheelEvent(event);

                if (m_mediators.handleEvent(nevent))
                {
                    event.preventDefault();

                    event.stopPropagation();
                }
                else
                {
                    fireEvent(nevent);
                }
            }
        });
        m_lienzo.addTouchCancelHandler(new TouchCancelHandler()
        {
            @Override
            public void onTouchCancel(final TouchCancelEvent event)
            {
                final NodeTouchCancelEvent nevent = new NodeTouchCancelEvent(event, getTouches(event));

                if (m_mediators.handleEvent(event))
                {
                    event.preventDefault();

                    return;
                }
                onNodeMouseOut(nevent);

                event.preventDefault();
            }
        });
        m_lienzo.addTouchEndHandler(new TouchEndHandler()
        {
            @Override
            public void onTouchEnd(final TouchEndEvent event)
            {
                final NodeTouchEndEvent nevent = new NodeTouchEndEvent(event, m_touches);

                if (m_mediators.handleEvent(nevent))
                {
                    event.preventDefault();

                    return;
                }
                onNodeMouseUp(nevent);

                event.preventDefault();
            }
        });
        m_lienzo.addTouchMoveHandler(new TouchMoveHandler()
        {
            @Override
            public void onTouchMove(final TouchMoveEvent event)
            {
                m_touches = getTouches(event);

                final NodeTouchMoveEvent nevent = new NodeTouchMoveEvent(event, m_touches);

                if (m_mediators.handleEvent(nevent))
                {
                    event.preventDefault();

                    return;
                }
                onNodeMouseMove(nevent);

                event.preventDefault();
            }
        });
        m_lienzo.addTouchStartHandler(new TouchStartHandler()
        {
            @Override
            public void onTouchStart(final TouchStartEvent event)
            {
                m_touches = getTouches(event);

                final NodeTouchStartEvent nevent = new NodeTouchStartEvent(event, m_touches);

                if (m_mediators.handleEvent(nevent))
                {
                    event.preventDefault();

                    return;
                }
                onNodeMouseDown(nevent);

                event.preventDefault();
            }
        });
        m_lienzo.addGestureStartHandler(new GestureStartHandler()
        {
            @Override
            public void onGestureStart(final GestureStartEvent event)
            {
                final NodeGestureStartEvent nevent = new NodeGestureStartEvent(event.getScale(), event.getRotation());

                if (m_mediators.handleEvent(nevent))
                {
                    event.preventDefault();

                    return;
                }
                fireEvent(nevent);

                event.preventDefault();
            }
        });
        m_lienzo.addGestureEndHandler(new GestureEndHandler()
        {
            @Override
            public void onGestureEnd(final GestureEndEvent event)
            {
                final NodeGestureEndEvent nevent = new NodeGestureEndEvent(event.getScale(), event.getRotation());

                if (m_mediators.handleEvent(nevent))
                {
                    event.preventDefault();

                    return;
                }
                fireEvent(nevent);

                event.preventDefault();
            }
        });
        m_lienzo.addGestureChangeHandler(new GestureChangeHandler()
        {
            @Override
            public void onGestureChange(final GestureChangeEvent event)
            {
                final NodeGestureChangeEvent nevent = new NodeGestureChangeEvent(event.getScale(), event.getRotation());

                if (m_mediators.handleEvent(nevent))
                {
                    event.preventDefault();

                    return;
                }
                fireEvent(nevent);

                event.preventDefault();
            }
        });
    }

    private final Shape<?> findShapeAtPoint(final int x, final int y)
    {
        return m_viewport.findShapeAtPoint(x, y);
    }

    private final void doDragCancel(final INodeXYEvent event)
    {
        if (m_dragging)
        {
            doDragMove(event);

            Cursor cursor = m_lienzo.getNormalCursor();

            if (null == cursor)
            {
                cursor = LienzoCore.get().getDefaultNormalCursor();

                if (null == cursor)
                {
                    cursor = m_lienzo.getWidgetCursor();

                    if (null == cursor)
                    {
                        cursor = Cursor.DEFAULT;
                    }
                }
            }
            m_lienzo.setCursor(cursor);

            if (DragMode.DRAG_LAYER == m_drag_mode)
            {
                m_drag_node.setVisible(true);

                m_dragContext.dragDone();

                m_drag_node.getLayer().draw();

                m_lienzo.getDragLayer().clear();
            }
            else
            {
                m_dragContext.dragDone();
            }
            m_drag_node.setDragging(false);

            m_drag_node.fireEvent(new NodeDragEndEvent(m_dragContext));

            m_drag_node = null;

            m_drag_mode = null;

            m_dragging = false;

            m_dragging_dispatch_move = false;

            m_dragging_using_touches = false;
        }
    }

    private final void doDragStart(final IPrimitive<?> node, final INodeXYEvent event)
    {
        if (m_dragging)
        {
            doDragCancel(event);
        }
        Cursor cursor = m_lienzo.getSelectCursor();

        if (null == cursor)
        {
            cursor = LienzoCore.get().getDefaultSelectCursor();

            if (null == cursor)
            {
                cursor = Cursor.CROSSHAIR;
            }
        }
        m_lienzo.setCursor(cursor);

        m_drag_node = node;

        m_drag_mode = node.getDragMode();

        m_dragContext = new DragContext(event, node);

        m_drag_node.setDragging(true);

        m_drag_node.fireEvent(new NodeDragStartEvent(m_dragContext));

        m_dragging = true;

        if (DragMode.DRAG_LAYER == m_drag_mode)
        {
            m_drag_node.setVisible(false);

            m_drag_node.getLayer().draw();

            m_dragContext.drawNodeWithTransforms(m_lienzo.getDragLayer().getContext());
        }
        m_dragging_dispatch_move = m_drag_node.isEventHandled(NodeDragMoveEvent.getType());

        m_dragging_using_touches = ((event.getNodeEvent().getAssociatedType() == NodeTouchMoveEvent.getType()) || (event.getNodeEvent().getAssociatedType() == NodeTouchStartEvent.getType()));
    }

    private final void doDragMove(final INodeXYEvent event)
    {
        m_dragContext.dragUpdate(event);

        if (m_dragging_dispatch_move)
        {
            m_drag_node.fireEvent(new NodeDragMoveEvent(m_dragContext));
        }
        if (DragMode.DRAG_LAYER == m_drag_mode)
        {
            m_lienzo.getDragLayer().draw();

            m_dragContext.drawNodeWithTransforms(m_lienzo.getDragLayer().getContext());
        }
        else
        {
            m_drag_node.getLayer().batch();
        }
    }

    private final void onNodeMouseClick(final INodeXYEvent event)
    {
        if (m_dragging_ignore_clicks)
        {
            m_dragging_ignore_clicks = false;

            return;
        }
        fireEventForPrimitive(findPrimitiveForEventType(event, NodeMouseClickEvent.getType()), event);
    }

    private final void onNodeMouseDoubleClick(final INodeXYEvent event)
    {
        fireEventForPrimitive(findPrimitiveForEventType(event, NodeMouseDoubleClickEvent.getType()), event);
    }

    private final IPrimitive<?> findPrimitiveForEventType(final INodeXYEvent event, final Type<?> type)
    {
        return findPrimitiveForPredicate(event, new Predicate<IPrimitive<?>>()
        {
            @Override
            public boolean test(final IPrimitive<?> prim)
            {
                return prim.isEventHandled(type);
            }
        });
    }

    private final IPrimitive<?> findPrimitiveForPredicate(final INodeXYEvent event, final Predicate<IPrimitive<?>> pred)
    {
        NFastArrayList<IPrimitive<?>> list = null;

        EventPropagationMode stop = EventPropagationMode.LAST_ANCESTOR;

        Node<?> node = findShapeAtPoint(event.getX(), event.getY());

        while ((null != node) && (null != node.asPrimitive()))
        {
            final IPrimitive<?> prim = node.asPrimitive();

            if (pred.test(prim))
            {
                final EventPropagationMode mode = prim.getEventPropagationMode();

                if (null == list)
                {
                    list = new NFastArrayList<IPrimitive<?>>();
                }
                list.add(prim);

                if (mode == EventPropagationMode.NO_ANCESTORS)
                {
                    return prim;
                }
                if (mode.getOrder() < stop.getOrder())
                {
                    stop = mode;

                    break;
                }
            }
            node = node.getParent();
        }
        if ((list != null) && (list.isEmpty() == false))
        {
            final int size = list.size();

            if (stop == EventPropagationMode.FIRST_ANCESTOR)
            {
                if (size > 1)
                {
                    return list.get(1);
                }
            }
            else
            {
                if (size > 1)
                {
                    return list.get(size - 1);
                }
            }
            return list.get(0);
        }
        return null;
    }

    private final void doPrepareDragging(final INodeXYEvent event)
    {
        final IPrimitive<?> find = findPrimitiveForPredicate(event, new Predicate<IPrimitive<?>>()
        {
            @Override
            public boolean test(final IPrimitive<?> prim)
            {
                return prim.isDraggable();
            }
        });
        if (null != find)
        {
            doDragStart(find, event);
        }
    }

    private final void onNodeMouseDown(final INodeXYEvent event)
    {
        if (m_dragging_mouse_pressed)
        {
            return;
        }
        if (m_dragging)
        {
            doDragCancel(event);
        }
        m_dragging_mouse_pressed = true;

        fireEventForPrimitive(findPrimitiveForEventType(event, event.getNodeEvent().getAssociatedType()), event);
    }

    @SuppressWarnings("unchecked")
    private final void doCancelEnterExitShape(final INodeXYEvent event)
    {
        if ((null != m_over_prim) && (m_over_prim.isEventHandled(NodeMouseExitEvent.getType())))
        {
            if (event instanceof AbstractNodeHumanInputEvent)
            {
                m_over_prim.fireEvent(new NodeMouseExitEvent(((AbstractNodeHumanInputEvent<MouseEvent<?>, ?>) event).getHumanInputEvent(), event.getX(), event.getY()));
            }
            else
            {
                m_over_prim.fireEvent(new NodeMouseExitEvent(null, event.getX(), event.getY()));
            }
        }
        m_over_prim = null;
    }

    // This will also return the shape under the cursor, for some optimization on Mouse Move

    @SuppressWarnings("unchecked")
    private final Shape<?> doCheckEnterExitShape(final INodeXYEvent event)
    {
        final int x = event.getX();

        final int y = event.getY();

        final Shape<?> shape = findShapeAtPoint(x, y);

        if (shape != null)
        {
            final IPrimitive<?> prim = shape.asPrimitive();

            if (null != m_over_prim)
            {
                if (prim != m_over_prim)
                {
                    if (m_over_prim.isEventHandled(NodeMouseExitEvent.getType()))
                    {
                        if (event instanceof AbstractNodeHumanInputEvent)
                        {
                            m_over_prim.fireEvent(new NodeMouseExitEvent(((AbstractNodeHumanInputEvent<MouseEvent<?>, ?>) event).getHumanInputEvent(), x, y));
                        }
                        else
                        {
                            m_over_prim.fireEvent(new NodeMouseExitEvent(null, x, y));
                        }
                    }
                }
            }
            if (prim != m_over_prim)
            {
                if ((null != prim) && (prim.isEventHandled(NodeMouseEnterEvent.getType())))
                {
                    if (event instanceof AbstractNodeHumanInputEvent)
                    {
                        prim.fireEvent(new NodeMouseEnterEvent(((AbstractNodeHumanInputEvent<MouseEvent<?>, ?>) event).getHumanInputEvent(), x, y));
                    }
                    else
                    {
                        prim.fireEvent(new NodeMouseEnterEvent(null, x, y));
                    }
                }
                m_over_prim = prim;
            }
        }
        else
        {
            doCancelEnterExitShape(event);
        }
        return shape;
    }

    private final void onNodeMouseMove(final INodeXYEvent event)
    {
        if (m_dragging_mouse_pressed)
        {
            if (false == m_dragging)
            {
                doPrepareDragging(event);

                if (false == m_dragging)
                {
                    // Don't pick up any draggable objects along the way - LIENZO-88
                    //
                    // Not sure about this, it may interfere with deferred mouse click handling

                    m_dragging_mouse_pressed = false;
                }
            }
        }
        if (m_dragging)
        {
            doDragMove(event);

            return;
        }
        doCheckEnterExitShape(event);

        fireEventForPrimitive(findPrimitiveForEventType(event, event.getNodeEvent().getAssociatedType()), event);
    }

    private final void onNodeMouseUp(final INodeXYEvent event)
    {
        m_dragging_mouse_pressed = false;

        if (m_dragging)
        {
            doDragCancel(event);

            m_dragging_ignore_clicks = true;

            return;
        }
        fireEventForPrimitive(findPrimitiveForEventType(event, event.getNodeEvent().getAssociatedType()), event);
    }

    private final void onNodeMouseOut(final INodeXYEvent event)
    {
        m_dragging_mouse_pressed = false;// in case someone does a pop up ( Window.alert() ), this causes technically a MouseDown cancel

        if (m_dragging)
        {
            doDragCancel(event);
        }
        doCancelEnterExitShape(event);

        fireEvent(event.getNodeEvent());
    }

    private final void onNodeMouseOver(final INodeXYEvent event)
    {
        final Node<?> node = doCheckEnterExitShape(event);

        if ((null != node) && (node.isListening()) && (node.isVisible()) && (node.isEventHandled(NodeMouseOverEvent.getType())))
        {
            node.fireEvent(event.getNodeEvent());
        }
        fireEvent(event.getNodeEvent());
    }

    private final void fireEventForPrimitive(final IPrimitive<?> prim, final INodeXYEvent event)
    {
        if (null != prim)
        {
            prim.fireEvent(event.getNodeEvent());
        }
        else
        {
            fireEvent(event.getNodeEvent());
        }
    }

    private final void fireEvent(final GwtEvent<?> event)
    {
        m_viewport.fireEvent(event);
    }
}


text:
<?php

namespace Symfony\Component\HttpFoundation\Test\Constraint;

use PHPUnit\Framework\Constraint\Constraint;
use Symfony\Component\HttpFoundation\Response;

final class ResponseStatusCodeSame extends Constraint
{
    private int $statusCode;

    public function __construct(int $statusCode)
    {
        $this->statusCode = $statusCode;
    }

    public function toString(): string
    {
        return 'status code is '.$this->statusCode;
    }

    /**
     * @param Response $response
     */
    protected function matches($response): bool
    {
        return $this->statusCode === $response->getStatusCode();
    }

    /**
     * @param Response $response
     */
    protected function failureDescription($response): string
    {
        return 'the Response '.$this->toString();
    }

    /**
     * @param Response $response
     */
    protected function additionalFailureDescription($response): string
    {
        return (string) $response;
    }
}


text:
<?php
/**
 * Created by PhpStorm.
 * User: hebidu
 * Date: 2017-09-27
 * Time: 14:37
 */

namespace sunsun\transfer_station\client;

use sunsun\server\consts\DeviceType;
use sunsun\transfer_station\interfaces\DeviceClientInterface;

class FactoryClient
{
    /**
     * @param $did
     * @return null|DeviceClientInterface
     */
    public static function createClient($did)
    {
        $type = DeviceType::getDeviceType($did);
        switch ($type) {
            case DeviceType::Did_FilterVat:
                return new FilterClient();
                break;
            case DeviceType::Did_PetFeeder:
                return new PetFeederClient();
                break;
            case DeviceType::Did_WaterPump:
                return new WaterPumpClient();
                break;
            case DeviceType::Did_AQ806:
                return new Aq806Client();
                break;
            case DeviceType::Did_APH300:
                return new AphClient();
                break;
            case DeviceType::Did_HeatingRod:
                return new HeatingRodClient();
                break;
            case DeviceType::Did_ADT:
                return new AdtClient();
                break;
            case DeviceType::Did_CP1000:
                return new Cp1000Client();
                break;
            case DeviceType::Did_AQ118:
                return new Aq118Client();
                break;
            case DeviceType::Did_Feeder:
                return new FeederClient();
                break;
            case DeviceType::Did_FeederV2:
                return new FeederV2Client();
                break;
            case DeviceType::Did_Hwfish:
                return new HwfishClient();
                break;
            case DeviceType::Did_Aq136:
                return new Aq136Client();
                break;
            default:
                break;
        }
        return null;
    }

    public static function updateAppCnt($did, $cnt)
    {
        $client = self::createClient($did);
        $client->updateAppCnt($did, $cnt);
    }

    public static function getInfo($client_id,$did,$pwd){

    }
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Data Models: GIO Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="GIO Reference Manual">
<link rel="up" href="pt02.html" title="Part II. API Reference">
<link rel="prev" href="GSimplePermission.html" title="GSimplePermission">
<link rel="next" href="GListModel.html" title="GListModel">
<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">

Data Models

GListModel — An interface describing a dynamic list of objects

GListStore — A simple implementation of GListModel

Generated by GTK-Doc V1.24


text:
CREATE INDEX i1 ON t1(a);
SELECT name fROM sqlite_master
WHERE type='table' OR type='index'
ORDER BY name;


text:
import * as stream from "mithril/stream";
import {Stream} from "mithril/stream";
import {ValidatableMixin} from "models/mixins/new_validatable_mixin";
import {Rules} from "models/secret_configs/rules";
import {SecretConfigJSON, SecretConfigsJSON} from "models/secret_configs/secret_configs_json";
import {Configurations} from "models/shared/configuration";

export class SecretConfig extends ValidatableMixin {
  id: Stream<string>;
  description: Stream<string>;
  pluginId: Stream<string>;
  properties: Stream<Configurations>;
  rules: Stream<Rules>;

  constructor(id: string, description: string, pluginId: string, properties: Configurations, rules: Rules) {
    super();
    ValidatableMixin.call(this);
    this.id          = stream(id);
    this.description = stream(description);
    this.pluginId    = stream(pluginId);
    this.properties  = stream(properties);
    this.rules       = stream(rules);
    this.validatePresenceOf("id");
    this.validateIdFormat("id");
    this.validatePresenceOf("pluginId");
  }

  static fromJSON(data: SecretConfigJSON) {
    const configurations = Configurations.fromJSON(data.properties);
    const rules          = Rules.fromJSON(data.rules);
    return new SecretConfig(data.id, data.description, data.plugin_id, configurations, rules);
  }

  toJSON(): object {
    return {
      id: this.id,
      description: this.description,
      plugin_id: this.pluginId,
      properties: this.properties,
      rules: this.rules
    };
  }
}

export class SecretConfigs extends Array<Stream<SecretConfig>> {

  constructor(...secretConfigs: Array<Stream<SecretConfig>>) {
    super(...secretConfigs);
    Object.setPrototypeOf(this, Object.create(SecretConfigs.prototype));
  }

  static fromJSON(data: SecretConfigsJSON) {
    const secretConfigs = data
      ._embedded
      .secret_configs
      .map((secretConfigJson) => stream(SecretConfig.fromJSON(secretConfigJson)));

    return new SecretConfigs(...secretConfigs);
  }
}


text:
//
//  W A R N I N G
//  -------------
//
// This file is not part of the Qt API.  It exists purely as an
// implementation detail.  This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.

#ifndef Patternist_XsdSchemaMerger_H
#define Patternist_XsdSchemaMerger_H

#include <private/qxsdschema_p.h>

QT_BEGIN_NAMESPACE

namespace QPatternist
{
    /**
     * @short A helper class that merges two schemas into one.
     *
     * This class is used in XsdValidatingInstanceReader to merge the schema
     * given in the constructor with a schema defined in the instance document
     * via xsi:schemaLocation or xsi:noNamespaceSchema location.
     *
     * @ingroup Patternist_schema
     * @author Tobias Koenig <tobias.koenig@nokia.com>
     */
    class XsdSchemaMerger : public QSharedData
    {
        public:
            typedef QExplicitlySharedDataPointer<XsdSchemaMerger> Ptr;

            /**
             * Creates a new schema merger object that merges @p schema with @p otherSchema.
             */
            XsdSchemaMerger(const XsdSchema::Ptr &schema, const XsdSchema::Ptr &otherSchema);

            /**
             * Returns the merged schema.
             */
            XsdSchema::Ptr mergedSchema() const;

        private:
            void merge(const XsdSchema::Ptr &schema, const XsdSchema::Ptr &otherSchema);

            XsdSchema::Ptr m_mergedSchema;
    };
}

QT_END_NAMESPACE

#endif


text:
import EntityManager from './EntityManager';
import { WorkflowProcessInstanceService } from '../../services';

export default class WorkflowProcessInstanceManager extends EntityManager {

  constructor() {
    super();
    this.service = new WorkflowProcessInstanceService();
  }

  getService() {
    return this.service;
  }

  getEntityType() {
    return 'WorkflowProcessInstance';
  }

  getCollectionType() {
    // Use in the version 8.x.x return 'workflowProcessInstances';
    return 'resources';
  }
}


text:
inherit MASTER_ROOM;

void create_object(void);
void init(void);
int do_enter(string str);

void create_object(void)
{
    set_short("A road leading south from the square");
    set_long("You are on a road leading south from the main square of the " +
             "village. The square is to the north, and the road continues " +
             "to the south. There is a house to the west and to the east " +
             "you see a grove of oak trees. Further south the road turns " +
             "to the west. To the east the cliff towers above the village. " +
             "The castle stands there silent, overlooking the village.\n");
    set_new_light(5);

    add_item("square","It appears to be the centre of the village, but " +
             "there does not seem to be much activity");
    add_item("house","A small house with a red roof and a stone chimney");
    add_item("grove","A grove of oak trees. You can hardly see anything " +
             "in there, as very little light comes through the branches of " +
             "the trees. You think you can hear something from inside the " +
             "grove, though..");
    add_item("cliff","Dark and threathening it looms over the village");
    add_item("castle","The castle stands there on it's cliff. It looks " +
             "spooky and you soon turn away from the sight");
    add_item("$|$melody|$flute|$grove","You think you hear someone playing " +
             "a sad melody on a flute in there. Maybe you could enter the " +
             "grove and investigate?");

    add_exit(ROOM + "square","north");
    add_exit(ROOM + "road23","south");
}

void init(void)
{
    add_action("do_enter","enter");
}

int do_enter(string str)
{
    if(str == "grove")
    {
        W("You enter the grove to investigate.\n");
        TP->move_player("enters the grove",
                        ROOM + "grove",
                        "comes walking into the grove from the road " +
                        "outside",1);
        return 1;
    }
    return notify_fail("Enter what?\n");
}


text:
Refinery::Core::Engine.routes.draw do

  # Admin routes
  namespace :alerts, :path => '' do
    namespace :admin, :path => Refinery::Core.backend_route do
      resources :alerts, :except => :show do
        collection do
          post :update_positions
        end
      end
    end
  end

end


text:
PROSES PEMESANAN BERHASIL

Terima kasih telah memesan di PizzaHot Delivery, pesanan Anda akan Kami proses secepatnya :)

Selanjutnya, silahkan cek secara berkala riwayat belanja dengan mengklik menu RIWAYAT BELANJA diatas atau <?= anchor('customer/shopping_history', '  klik disni', ['class' => 'btn btn-primary']) ?>


text:
import os
import shutil
from shutil import rmtree
from tempfile import mkdtemp

import pytest
from mock import Mock

from pip._internal.exceptions import HashMismatch
from pip._internal.models.link import Link
from pip._internal.network.download import Downloader
from pip._internal.network.session import PipSession
from pip._internal.operations.prepare import (
    _copy_source_tree,
    _download_http_url,
    unpack_file_url,
    unpack_http_url,
)
from pip._internal.utils.hashes import Hashes
from pip._internal.utils.urls import path_to_url
from tests.lib.filesystem import (
    get_filelist,
    make_socket_file,
    make_unreadable_file,
)
from tests.lib.path import Path
from tests.lib.requests_mocks import MockResponse

def test_unpack_http_url_with_urllib_response_without_content_type(data):
    """
    It should download and unpack files even if no Content-Type header exists
    """
    _real_session = PipSession()

    def _fake_session_get(*args, **kwargs):
        resp = _real_session.get(*args, **kwargs)
        del resp.headers["Content-Type"]
        return resp

    session = Mock()
    session.get = _fake_session_get
    downloader = Downloader(session, progress_bar="on")

    uri = path_to_url(data.packages.joinpath("simple-1.0.tar.gz"))
    link = Link(uri)
    temp_dir = mkdtemp()
    try:
        unpack_http_url(
            link,
            temp_dir,
            downloader=downloader,
            download_dir=None,
        )
        assert set(os.listdir(temp_dir)) == {
            'PKG-INFO', 'setup.cfg', 'setup.py', 'simple', 'simple.egg-info'
        }
    finally:
        rmtree(temp_dir)

def test_download_http_url__no_directory_traversal(tmpdir):
    """
    Test that directory traversal doesn't happen on download when the
    Content-Disposition header contains a filename with a ".." path part.
    """
    mock_url = 'http://www.example.com/whatever.tgz'
    contents = b'downloaded'
    link = Link(mock_url)

    session = Mock()
    resp = MockResponse(contents)
    resp.url = mock_url
    resp.headers = {
        # Set the content-type to a random value to prevent
        # mimetypes.guess_extension from guessing the extension.
        'content-type': 'random',
        'content-disposition': 'attachment;filename="../out_dir_file"'
    }
    session.get.return_value = resp
    downloader = Downloader(session, progress_bar="on")

    download_dir = tmpdir.joinpath('download')
    os.mkdir(download_dir)
    file_path, content_type = _download_http_url(
        link,
        downloader,
        download_dir,
        hashes=None,
    )
    # The file should be downloaded to download_dir.
    actual = os.listdir(download_dir)
    assert actual == ['out_dir_file']

@pytest.fixture
def clean_project(tmpdir_factory, data):
    tmpdir = Path(str(tmpdir_factory.mktemp("clean_project")))
    new_project_dir = tmpdir.joinpath("FSPkg")
    path = data.packages.joinpath("FSPkg")
    shutil.copytree(path, new_project_dir)
    return new_project_dir

def test_copy_source_tree(clean_project, tmpdir):
    target = tmpdir.joinpath("target")
    expected_files = get_filelist(clean_project)
    assert len(expected_files) == 3

    _copy_source_tree(clean_project, target)

    copied_files = get_filelist(target)
    assert expected_files == copied_files

@pytest.mark.skipif("sys.platform == 'win32' or sys.version_info < (3,)")
def test_copy_source_tree_with_socket(clean_project, tmpdir, caplog):
    target = tmpdir.joinpath("target")
    expected_files = get_filelist(clean_project)
    socket_path = str(clean_project.joinpath("aaa"))
    make_socket_file(socket_path)

    _copy_source_tree(clean_project, target)

    copied_files = get_filelist(target)
    assert expected_files == copied_files

    # Warning should have been logged.
    assert len(caplog.records) == 1
    record = caplog.records[0]
    assert record.levelname == 'WARNING'
    assert socket_path in record.message

@pytest.mark.skipif("sys.platform == 'win32' or sys.version_info < (3,)")
def test_copy_source_tree_with_socket_fails_with_no_socket_error(
    clean_project, tmpdir
):
    target = tmpdir.joinpath("target")
    expected_files = get_filelist(clean_project)
    make_socket_file(clean_project.joinpath("aaa"))
    unreadable_file = clean_project.joinpath("bbb")
    make_unreadable_file(unreadable_file)

    with pytest.raises(shutil.Error) as e:
        _copy_source_tree(clean_project, target)

    errored_files = [err[0] for err in e.value.args[0]]
    assert len(errored_files) == 1
    assert unreadable_file in errored_files

    copied_files = get_filelist(target)
    # All files without errors should have been copied.
    assert expected_files == copied_files

def test_copy_source_tree_with_unreadable_dir_fails(clean_project, tmpdir):
    target = tmpdir.joinpath("target")
    expected_files = get_filelist(clean_project)
    unreadable_file = clean_project.joinpath("bbb")
    make_unreadable_file(unreadable_file)

    with pytest.raises(shutil.Error) as e:
        _copy_source_tree(clean_project, target)

    errored_files = [err[0] for err in e.value.args[0]]
    assert len(errored_files) == 1
    assert unreadable_file in errored_files

    copied_files = get_filelist(target)
    # All files without errors should have been copied.
    assert expected_files == copied_files

class Test_unpack_file_url(object):

    def prep(self, tmpdir, data):
        self.build_dir = tmpdir.joinpath('build')
        self.download_dir = tmpdir.joinpath('download')
        os.mkdir(self.build_dir)
        os.mkdir(self.download_dir)
        self.dist_file = "simple-1.0.tar.gz"
        self.dist_file2 = "simple-2.0.tar.gz"
        self.dist_path = data.packages.joinpath(self.dist_file)
        self.dist_path2 = data.packages.joinpath(self.dist_file2)
        self.dist_url = Link(path_to_url(self.dist_path))
        self.dist_url2 = Link(path_to_url(self.dist_path2))

    def test_unpack_file_url_no_download(self, tmpdir, data):
        self.prep(tmpdir, data)
        unpack_file_url(self.dist_url, self.build_dir)
        assert os.path.isdir(os.path.join(self.build_dir, 'simple'))
        assert not os.path.isfile(
            os.path.join(self.download_dir, self.dist_file))

    def test_unpack_file_url_bad_hash(self, tmpdir, data,
                                      monkeypatch):
        """
        Test when the file url hash fragment is wrong
        """
        self.prep(tmpdir, data)
        url = '{}#md5=bogus'.format(self.dist_url.url)
        dist_url = Link(url)
        with pytest.raises(HashMismatch):
            unpack_file_url(dist_url,
                            self.build_dir,
                            hashes=Hashes({'md5': ['bogus']}))

    def test_unpack_file_url_thats_a_dir(self, tmpdir, data):
        self.prep(tmpdir, data)
        dist_path = data.packages.joinpath("FSPkg")
        dist_url = Link(path_to_url(dist_path))
        unpack_file_url(dist_url, self.build_dir,
                        download_dir=self.download_dir)
        assert os.path.isdir(os.path.join(self.build_dir, 'fspkg'))

@pytest.mark.parametrize('exclude_dir', [
    '.nox',
    '.tox'
])
def test_unpack_file_url_excludes_expected_dirs(tmpdir, exclude_dir):
    src_dir = tmpdir / 'src'
    dst_dir = tmpdir / 'dst'
    src_included_file = src_dir.joinpath('file.txt')
    src_excluded_dir = src_dir.joinpath(exclude_dir)
    src_excluded_file = src_dir.joinpath(exclude_dir, 'file.txt')
    src_included_dir = src_dir.joinpath('subdir', exclude_dir)

    # set up source directory
    src_excluded_dir.mkdir(parents=True)
    src_included_dir.mkdir(parents=True)
    src_included_file.touch()
    src_excluded_file.touch()

    dst_included_file = dst_dir.joinpath('file.txt')
    dst_excluded_dir = dst_dir.joinpath(exclude_dir)
    dst_excluded_file = dst_dir.joinpath(exclude_dir, 'file.txt')
    dst_included_dir = dst_dir.joinpath('subdir', exclude_dir)

    src_link = Link(path_to_url(src_dir))
    unpack_file_url(
        src_link,
        dst_dir,
        download_dir=None
    )
    assert not os.path.isdir(dst_excluded_dir)
    assert not os.path.isfile(dst_excluded_file)
    assert os.path.isfile(dst_included_file)
    assert os.path.isdir(dst_included_dir)


text: <input type="text" id="dialogtext"><button id="ok">OK!</button>


text: Set of libraries for iOS (Swift), Android and BLE enabled Arduino based devices


text:
package thedonkey;

import java.io.IOException;
import java.util.Arrays;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.context.embedded.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpStatus;

import com.mangofactory.swagger.plugin.EnableSwagger;

import thedonkey.persistence.Account;
import thedonkey.persistence.AccountRepository;
import thedonkey.persistence.Bookmark;
import thedonkey.persistence.BookmarkRepository;
import thedonkey.util.PasswordHash;

/**
 * Initializes and starts the application.
 */
@Configuration
@ComponentScan
@EnableAutoConfiguration
@EnableSwagger
public class DonkeyApplication {
  @Bean
  CommandLineRunner init(AccountRepository accountRepository, BookmarkRepository bookmarkRepository) {
    return (evt) -> Arrays.asList("jhoeller,dsyer,pwebb,ogierke,rwinch,mfisher,mpollack,jlong".split(",")).forEach(
        a -> {
          Account account = accountRepository.save(new Account(a, PasswordHash.computeHash("password")));
          bookmarkRepository.save(new Bookmark(account, "http://bookmark.com/1/" + a, "A description"));
          bookmarkRepository.save(new Bookmark(account, "http://bookmark.com/2/" + a, "A description"));
        });
  }

  // CORS
  @Bean
  FilterRegistrationBean corsFilter(@Value("${tagit.origin:http://localhost:9000}") String origin) {
    return new FilterRegistrationBean(new Filter() {
      @Override
      public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException,
          ServletException {
        HttpServletRequest request = (HttpServletRequest) req;
        HttpServletResponse response = (HttpServletResponse) res;
        String method = request.getMethod();
        // this origin value could just as easily have come from a database
        response.setHeader("Access-Control-Allow-Origin", origin);
        response.setHeader("Access-Control-Allow-Methods", "POST,GET,OPTIONS,DELETE");
        response.setHeader("Access-Control-Max-Age", Long.toString(60 * 60));
        response.setHeader("Access-Control-Allow-Credentials", "true");
        response
            .setHeader(
                "Access-Control-Allow-Headers",
                "Origin,Accept,X-Requested-With,Content-Type,Access-Control-Request-Method,Access-Control-Request-Headers,Authorization");
        if ("OPTIONS".equals(method)) {
          response.setStatus(HttpStatus.OK.value());
        } else {
          chain.doFilter(req, res);
        }
      }

      @Override
      public void init(FilterConfig filterConfig) {}

      @Override
      public void destroy() {}
    });
  }

  public static void main(String[] args) {
    SpringApplication.run(DonkeyApplication.class, args);
  }
}


text:
<?php

/* emhEcommerceBundle:Produits:add.html.twig */
class __TwigTemplate_d9bb3b028e6f463868cbb3cc52e8bb2af00a7e9a1a993c625ef1d743a944a245 extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = false;

        $this->blocks = array(
        );
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        // line 1
        echo "

            <form action=\"";
        // line 3
        echo $this->env->getExtension('routing')->getPath("emh_ecommerce_add_formation");
        echo "\" method=\"post\">
               ";
        // line 4
        echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getContext($context, "form"), 'widget');
        echo "

<input type=\"submit\"/>

            </form>

";
    }

    public function getTemplateName()
    {
        return "emhEcommerceBundle:Produits:add.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  27 => 4,  23 => 3,  19 => 1,);
    }
}


text:
package de.jpaw.bonaparte.hazelcast;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import com.hazelcast.config.SerializationConfig;
import com.hazelcast.nio.serialization.PortableFactory;
import com.hazelcast.nio.serialization.Portable;

import de.jpaw.bonaparte.core.BonaPortableClass;

/** Class to scan the class path and create factories as required. */
public class PortableFactoryBuilder extends AbstractScanner<BonapartePortable> {

    static class BonapartePortableFactory implements PortableFactory {
        private final ConcurrentHashMap<Integer, BonaPortableClass<BonapartePortable>> bclasses
            = new ConcurrentHashMap<Integer, BonaPortableClass<BonapartePortable>>(256);

        @Override
        public Portable create(int classId) {
            BonaPortableClass<BonapartePortable> bclass = bclasses.get(classId);
            return bclass == null ? null : bclass.newInstance();
        }

        private void addClass(BonaPortableClass<BonapartePortable> bclass) {
            BonaPortableClass<BonapartePortable> old = bclasses.putIfAbsent(bclass.getId(), bclass);
            if (old != null && old != bclass) {
                LOGGER.error("duplicate factoryId {} / classId {} for {} and {}", bclass.getFactoryId(), bclass.getId(), old.getPqon(), bclass.getPqon());
                throw new RuntimeException("Duplicate factory / class ID");
            }
        }

        private int size() {
            return bclasses.size();
        }
    }

    private final ConcurrentHashMap<Integer, BonapartePortableFactory> factoryMap
        = new ConcurrentHashMap<Integer, BonapartePortableFactory>(16);

    @Override
    protected void addBClass(BonaPortableClass<BonapartePortable> bclass) {
        Integer factoryId = bclass.getFactoryId();  // autobox only once
        BonapartePortableFactory myFactory = factoryMap.get(factoryId);
        if (myFactory == null) {
            // create a new factory, the factoryId occurs the first time now
            factoryMap.putIfAbsent(factoryId, new BonapartePortableFactory());
        }
        factoryMap.get(factoryId).addClass(bclass);
    }

    public void scanPackage(String packageName) {
        scanPackage(packageName, BonapartePortable.class);
    }

    public void registerFactories(SerializationConfig cfg) {
        for (Map.Entry<Integer, BonapartePortableFactory> e : factoryMap.entrySet()) {
            LOGGER.info("Registering PortableFactory for Id {} with {} classes", e.getKey(), e.getValue().size());
            cfg.addPortableFactory(e.getKey(), e.getValue());
        }
    }
}


text:
import inspect
import re

from django.db.models import ForeignKey

from south.db import generic
from django.core.management.commands import inspectdb

class DatabaseOperations(generic.DatabaseOperations):

    """
    SQLite3 implementation of database operations.
    """

    backend_name = "sqlite3"

    # SQLite ignores several constraints. I wish I could.
    supports_foreign_keys = False
    has_check_constraints = False

    # You can't add UNIQUE columns with an ALTER TABLE.
    def add_column(self, table_name, name, field, *args, **kwds):
        # Run ALTER TABLE with no unique column
        unique, field._unique, field.db_index = field.unique, False, False
        # If it's not nullable, and has no default, raise an error (SQLite is picky)
        if (not field.null and
            (not field.has_default() or field.get_default() is None) and
            not field.empty_strings_allowed):
            raise ValueError("You cannot add a null=False column without a default value.")
        # Don't try and drop the default, it'll fail
        kwds['keep_default'] = True
        generic.DatabaseOperations.add_column(self, table_name, name, field, *args, **kwds)
        # If it _was_ unique, make an index on it.
        if unique:
            self.create_index(table_name, [field.column], unique=True)

    def _remake_table(self, table_name, renames={}, deleted=[], altered={}):
        """
        Given a table and three sets of changes (renames, deletes, alters),
        recreates it with the modified schema.
        """
        # Dry runs get skipped completely
        if self.dry_run:
            return
        # Temporary table's name
        temp_name = "_south_new_" + table_name
        # Work out the (possibly new) definitions of each column
        definitions = {}
        cursor = self._get_connection().cursor()
        # Get the index descriptions
        indexes = self._get_connection().introspection.get_indexes(cursor, table_name)
        # Work out new column defs.
        for column_info in self._get_connection().introspection.get_table_description(cursor, table_name):
            name = column_info[0]
            if name in deleted:
                continue
            type = column_info[1]
            unique = indexes[name]['unique']
            primary_key = indexes[name]['primary_key']
            # Deal with an alter (these happen before renames)
            if name in altered:
                type = altered[name]
            # Deal with a rename
            if name in renames:
                name = renames[name]
            # Add to the defs
            definitions[name] = type
            if primary_key:
                definitions[name] += " PRIMARY KEY"
        # Alright, Make the table
        self.execute("CREATE TABLE %s (%s)" % (
            self.quote_name(temp_name),
            ", ".join(["%s %s" % (self.quote_name(cname), ctype) for cname, ctype in definitions.items()]),
        ))
        # Copy over the data
        self._copy_data(table_name, temp_name, renames)
        # Delete the old table, move our new one over it
        self.delete_table(table_name)
        self.rename_table(temp_name, table_name)

    def _copy_data(self, src, dst, field_renames={}):
        "Used to copy data into a new table"
        # Make a list of all the fields to select
        cursor = self._get_connection().cursor()
        q_fields = [column_info[0] for column_info in self._get_connection().introspection.get_table_description(cursor, dst)]
        new_to_old = {}
        for old, new in field_renames.items():
            new_to_old[new] = old
        q_fields_new = []
        for field in q_fields:
            if field in new_to_old:
                # Make sure renames are done correctly
                q_fields_new.append("%s AS %s" % (self.quote_name(new_to_old[field]), self.quote_name(field)))
            else:
                q_fields_new.append(self.quote_name(field))
        q_fields = q_fields_new
        # Copy over the data
        self.execute("INSERT INTO %s SELECT %s FROM %s;" % (
            self.quote_name(dst),
            ', '.join(q_fields),
            self.quote_name(src),
        ))

    def alter_column(self, table_name, name, field, explicit_name=True):
        """
        Changes a column's SQL definition
        """
        # Get the column's SQL
        field.set_attributes_from_name(name)
        if not explicit_name:
            name = field.db_column
        else:
            field.column = name
        sql = self.column_sql(table_name, name, field, with_name=False, field_prepared=True)
        # Remake the table correctly
        self._remake_table(table_name, altered={name: sql})

    def delete_column(self, table_name, column_name):
        """
        Deletes a column.
        """
        self._remake_table(table_name, deleted=[column_name])

    def rename_column(self, table_name, old, new):
        """
        Renames a column from one name to another.
        """
        self._remake_table(table_name, renames={old: new})

    # Nor unique creation
    def create_unique(self, table_name, columns):
        """
        Not supported under SQLite.
        """
        print "   ! WARNING: SQLite does not support adding unique constraints. Ignored."

    # Nor unique deletion
    def delete_unique(self, table_name, columns):
        """
        Not supported under SQLite.
        """
        print "   ! WARNING: SQLite does not support removing unique constraints. Ignored."

    # Not implemented this yet.
    def delete_primary_key(self, table_name):
        raise NotImplementedError()

    # No cascades on deletes
    def delete_table(self, table_name, cascade=True):
        generic.DatabaseOperations.delete_table(self, table_name, False)


text:
<?php

class PodioMissingRelationshipError extends PodioError
{
}


text:
package xml

import (
	"encoding/xml"
	"flag"
	"net/http"
)

var (
	indent = flag.Bool("xml:indent", false, "use a human readable format of XML")
)

// XML is a controller with helper functions
// for rendering Go objects as JSON.
type XML struct {
}

// RenderXML gets any object and returns an HTTP handler
// that renders the object.
func (c *XML) RenderXML(obj interface{}) http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		var b []byte
		var err error
		if *indent {
			b, err = xml.MarshalIndent(obj, "", "\t")
		} else {
			b, err = xml.Marshal(obj)
		}

		// Make sure there are no errors.
		if err != nil {
			http.Error(w, err.Error(), http.StatusInternalServerError)
			return
		}

		// TODO: use custom status code.
		w.WriteHeader(http.StatusOK)
		w.Write(b)
	})
}


text:
<?php do_action( 'bp_before_directory_members_page' ); ?>

			<button class="close" aria-label="Close" data-dismiss="alert" type="button">
				×
			</button>

				<?php _e('There are two ways to get an invitation code to join to the AlphaSSS:'); ?>

  <?php _e('1. The fastest: Request invitation from anybody who is online. You\'ll your code within seconds.'); ?>

  <?php _e('2. Post your invitation request in the general forum. Someone will read it and send you invitation.'); ?>

				<?php _e('Easy Peasy!'); ?>

	<?php do_action( 'bp_before_directory_members' ); ?>

	<?php do_action( 'bp_before_directory_members_content' ); ?>

	<?php if ( is_user_logged_in() ):?>

			<?php bp_directory_members_search_form(); ?>

	<?php endif;?>

	<?php do_action( 'bp_before_directory_members_tabs' ); ?>

	<form action="" method="post" id="members-directory-form" class="dir-form">

<a href="<?php bp_members_directory_permalink(); ?>"><?php printf( __( 'All Members %s', 'buddyboss' ), bp_get_total_member_count() ); ?>

				<?php if ( is_user_logged_in() && bp_is_active( 'friends' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>

<a href="<?php echo bp_loggedin_user_domain() . bp_get_friends_slug() . '/my-friends/'; ?>"><?php printf( __( 'My Friends %s', 'buddyboss' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ); ?>

				<?php endif; ?>

				<?php do_action( 'bp_members_directory_member_types' ); ?>

				<?php do_action( 'bp_members_directory_member_sub_types' ); ?>

					<?php _e( 'Order By:', 'buddyboss' ); ?>
					<select id="members-order-by">
						<option value="active"><?php _e( 'Last Active', 'buddyboss' ); ?></option>
						<option value="newest"><?php _e( 'Newest Registered', 'buddyboss' ); ?></option>

						<?php if ( bp_is_active( 'xprofile' ) ) : ?>
							<option value="alphabetical"><?php _e( 'Alphabetical', 'buddyboss' ); ?></option>
						<?php endif; ?>

						<?php do_action( 'bp_members_directory_order_options' ); ?>
					</select>

			<?php bp_get_template_part( 'members/members-loop' ); ?>

		<?php do_action( 'bp_directory_members_content' ); ?>

		<?php wp_nonce_field( 'directory_members', '_wpnonce-member-filter' ); ?>

		<?php do_action( 'bp_after_directory_members_content' ); ?>

	</form>

	<?php do_action( 'bp_after_directory_members' ); ?>

<?php do_action( 'bp_after_directory_members_page' ); ?>


text:
// using namespace  ::color::compare::less_or_equal

#include "../../generic/model.hpp"

 namespace color
  {
   namespace compare
    {

     template < typename category_name >
      bool less_or_equal
       (
         ::color::model< category_name >  const& left
        ,::color::model< category_name >  const& right
       )
       {
        return left.container() <= right.container();
       }

     template< typename tag_name, typename category_name >
      bool less_or_equal
       (
         ::color::constant::base< tag_name >  const& left
        ,::color::model< category_name >      const& right
       )
       {
        return ::color::compare::less_or_equal< category_name >( ::color::model< category_name >( left ), right );
       }

     template < typename category_name, typename tag_name >
      bool less_or_equal
       (
         ::color::model< category_name >      const& left
        ,::color::constant::base< tag_name >  const& right
       )
       {
        return ::color::compare::less_or_equal< category_name >( left, ::color::model< category_name >( right ) );
       }

     namespace  operators
      {

       template< typename category_name >
        inline
        bool
        operator <=( ::color::model< category_name > const& left, ::color::model< category_name > const&  right )
         {
          return ::color::compare::less_or_equal( left, right );
         }

       template< typename tag_name, typename category_name >
        inline
        bool
        operator <=( ::color::constant::base< tag_name > const& left, ::color::model< category_name > const&  right )
         {
          return ::color::compare::less_or_equal( left, right );
         }

       template< typename category_name, typename tag_name >
        inline
        bool
        operator <=(::color::model< category_name > const& left, ::color::constant::base< tag_name > const&  right )
         {
          return ::color::compare::less_or_equal( left, right );
         }

      }

     namespace functor
      {

       template< typename category_name >
        class less_or_equal
         {
          public:
           typedef ::color::model< category_name > value_type;
           bool operator ()( value_type const& left, value_type const& right )const
            {
             return ::color::compare::less_or_equal( left, right );
            }
         };

      }

    }
 }

#if !defined( COLOR_DO_NOT_SPECIALIZE_STD_COMPARISON )

 namespace std
  {

    template< typename category_name >
     struct less_equal< ::color::model< category_name >  >
      {
       private:
         typedef ::color::model< category_name > value_type;
       public:
         bool operator ()( value_type const& left, value_type const& right )const
          {
           return ::color::compare::less_or_equal( left, right );
          }
      };

  }

#endif

#endif


text:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

          <title>ScalaBusMod - lang-scala.git 1.0.0 API - org.vertx.scala.mods.ScalaBusMod</title>
          <meta name="description" content="ScalaBusMod - lang - scala.git 1.0.0 API - org.vertx.scala.mods.ScalaBusMod" />
          <meta name="keywords" content="ScalaBusMod lang scala.git 1.0.0 API org.vertx.scala.mods.ScalaBusMod" />
          <meta http-equiv="content-type" content="text/html; charset=UTF-8" />

      <link href="../../../../lib/template.css" media="screen" type="text/css" rel="stylesheet" />
      <link href="../../../../lib/diagrams.css" media="screen" type="text/css" rel="stylesheet" id="diagrams-css" />

org.vertx.scala.mods

ScalaBusMod

        trait

        ScalaBusMod extends (Message[JsonObject]) ⇒ Unit with VertxAccess

Extend this trait to get an easy to use interface for your EventBus module. It relies on the
sender sending JSON requests with an {"action":"<something>"}. It will reply with either a
{"status":"ok"} JSON object or an {"status":"error", "error":"<ERROR_CODE>",
"message":"<detailed message of error>"}. You can provide extra fields in your reply, by adding
a JsonObject to your reply (Ok or Error). If you need to do something asynchronously while
processing the message, use AsyncReply. You just need to map the Future to one of the Ok or
Error replies. Exceptions that you forget to catch will always yield a "MODULE_EXCEPTION" error
code.

          Linear Supertypes

VertxAccess, (Message[JsonObject]) ⇒ Unit, AnyRef, Any

<input id="mbrsel-input" type="text" accesskey="/" />

              Ordering

Alphabetic

By inheritance

                Inherited

ScalaBusMod

VertxAccess

Function1

AnyRef

Any

Hide All

Show all

            Learn more about member selection

            Visibility

Public

All

Abstract Value Members

        abstract
        val

        container: Container

Definition Classes

VertxAccess

        abstract
        val

        logger: Logger

Definition Classes

VertxAccess

        abstract
        def

        receive: (Message[JsonObject]) ⇒ PartialFunction[String, BusModReceiveEnd]

Override this method to handle a message received via the eventbus.

Override this method to handle a message received via the eventbus. This function reads the
action parameter out of the message and checks if the returned PartialFunction is defined
on it. With the returned BusModReply, you can easily tell whether the message resulted in an
error or everything went well by replying Ok.

returns

A partial function consisting of an "action" -> BusModReply.

        abstract
        val

        vertx: Vertx

Definition Classes

VertxAccess

Concrete Value Members

        final
        def

        !=(arg0: AnyRef): Boolean

Definition Classes

AnyRef

        final
        def

        !=(arg0: Any): Boolean

Definition Classes

Any

        final
        def

        ##(): Int

Definition Classes

AnyRef → Any

        final
        def

        ==(arg0: AnyRef): Boolean

Definition Classes

AnyRef

        final
        def

        ==(arg0: Any): Boolean

Definition Classes

Any

        def

        andThen[A](g: (Unit) ⇒ A): (Message[JsonObject]) ⇒ A

Definition Classes

Function1

Annotations

                @unspecialized()

        final
        def

        apply(msg: Message[JsonObject]): Unit

Definition Classes

ScalaBusMod → Function1

        final
        def

        asInstanceOf[T0]: T0

Definition Classes

Any

        def

        clone(): AnyRef

Attributes

protected[java.lang]

Definition Classes

AnyRef

Annotations

                @throws(

      ...
    )

        def

        compose[A](g: (A) ⇒ Message[JsonObject]): (A) ⇒ Unit

Definition Classes

Function1

Annotations

                @unspecialized()

        final
        def

        eq(arg0: AnyRef): Boolean

Definition Classes

AnyRef

        def

        equals(arg0: Any): Boolean

Definition Classes

AnyRef → Any

        implicit
        val

        executionContext: ExecutionContext

        def

        finalize(): Unit

Attributes

protected[java.lang]

Definition Classes

AnyRef

Annotations

                @throws(

      classOf[java.lang.Throwable]
    )

        final
        def

        getClass(): Class[_]

Definition Classes

AnyRef → Any

        def

        hashCode(): Int

Definition Classes

AnyRef → Any

        final
        def

        isInstanceOf[T0]: Boolean

Definition Classes

Any

        final
        def

        ne(arg0: AnyRef): Boolean

Definition Classes

AnyRef

        final
        def

        notify(): Unit

Definition Classes

AnyRef

        final
        def

        notifyAll(): Unit

Definition Classes

AnyRef

        final
        def

        synchronized[T0](arg0: ⇒ T0): T0

Definition Classes

AnyRef

        def

        toString(): String

Definition Classes

Function1 → AnyRef → Any

        final
        def

        wait(): Unit

Definition Classes

AnyRef

Annotations

                @throws(

      ...
    )

        final
        def

        wait(arg0: Long, arg1: Int): Unit

Definition Classes

AnyRef

Annotations

                @throws(

      ...
    )

        final
        def

        wait(arg0: Long): Unit

Definition Classes

AnyRef

Annotations

                @throws(

      ...
    )

Inherited from VertxAccess

Inherited from (Message[JsonObject]) ⇒ Unit

Inherited from AnyRef

Inherited from Any

Ungrouped


text:
layout: page
title: Troubleshooting
lang: en
---

# Firewall or proxy server settings

The tool automatically detects proxy configuration from the system. However, that may fail or cause misconfiguration. In those cases, please use the `-proxy` option to specify proxy server hostname and port number like `-proxy 192.168.1.1:8080` (for proxy server 192.168.1.1, and the port number 8080).

Note: This tool does not support proxy servers with any authentication such as Basic authentication or NTLM.

# Performance issue

If the command feels slow or stalled, please try re-run with an option `-verbose`. That will show more detailed progress. But in most cases, the cause is simply you have a larger data to process. Otherwise, you already hit a rate limit from API servers. If you want to see rate limit status, please see capture logs and debug for more details.

The tool automatically adjusts concurrency to avoid additional limitation from API servers. If you want to see current concurrency, please run the command like below. That will show a current window size (maximum concurrency) per endpoint. The debug message "WaiterStatus" reports current concurrency and window sizes. The map "runners" is for operations currently waiting for a result from API servers. The map "window" is for window size for each endpoint. The map "concurrency" is for current concurrency per endpoint. The below example indicates for the endpoint "https://api.dropboxapi.com/2/file_requests/create", the tool does not allow call that endpoint with the concurrency grater than one. That means it requires operation one by one, and there is no easy workaround to speed up operations.
```
tbx job log last -quiet | jq 'select(.msg == "WaiterStatus")'
{
  "level": "DEBUG",
  "time": "2020-11-10T14:55:57.501+0900",
  "name": "z951.z960.z112064",
  "caller": "nw_congestion/congestion.go:310",
  "msg": "WaiterStatus",
  "goroutine": "gr:284877",
  "runners": {
    "gr:1": {
      "key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-https://api.dropboxapi.com/2/file_requests/create",
      "go_routine_id": "gr:1",
      "running_since": "2020-11-10T14:55:56.124899+09:00"
    }
  },
  "numRunners": 1,
  "waiters": [],
  "numWaiters": 0,
  "window": {
    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-https://api.dropboxapi.com/2/team/token/get_authenticated_admin": 5,
    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-https://api.dropboxapi.com/2/team/token/get_authenticated_admin": 5,
    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-https://api.dropboxapi.com/2/team/token/get_authenticated_admin": 5,
    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-https://api.dropboxapi.com/2/team/token/get_authenticated_admin": 5,
    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-https://api.dropboxapi.com/2/file_requests/create": 1,
    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-https://api.dropboxapi.com/2/files/list_folder": 5,
    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-https://api.dropboxapi.com/2/files/save_url": 5,
    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-https://api.dropboxapi.com/2/files/save_url/check_job_status": 5,
    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-https://api.dropboxapi.com/2/files/search/continue_v2": 5,
    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-https://api.dropboxapi.com/2/files/search_v2": 5,
    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-https://api.dropboxapi.com/2/users/get_current_account": 5,
    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-https://api.dropboxapi.com/2/files/copy_reference/get": 4,
    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-https://api.dropboxapi.com/2/files/copy_v2": 5,
    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-https://api.dropboxapi.com/2/files/delete_v2": 5,
    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-https://api.dropboxapi.com/2/files/get_metadata": 5,
    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-https://api.dropboxapi.com/2/files/list_folder": 4,
    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-https://api.dropboxapi.com/2/sharing/list_mountable_folders": 4,
    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-https://content.dropboxapi.com/2/files/download": 5,
    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-https://content.dropboxapi.com/2/files/export": 4
  },
  "concurrency": {
    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-https://api.dropboxapi.com/2/file_requests/create": 1
  }
}
```

# Garbled output

If the tool output garbled, please stop the tool with Ctrl+C. This issue usually happens when your console does not have a font to display it. Then, please try to change the font that supports your language. Or, please try the option `-lang en` to overwrite language setting of the tool to English.

In PowerShell, you can change the font with (1) right-click on the title bar, (2) click properties, (3) then choose the font tab, (4) then change to an appropriate font like "MS Gothic."

# Log files

By default, log files are stored under the path "%USERPROFILE%\.toolbox\jobs" (e.g. `C:\Users\USERNAME\.toolbox\jobs`) on windows, or "$HOME\.toolbox\jobs" in Linux or macOS (e.g. `/Users/USERNAME/.toolbox/jobs`). Log files contain information such as (1) Runtime information, e.g. OS type/version/environment variables, (2) Runtime options to the tool (including a copy of input data files), (3) Account information of services such as Dropbox, (4) Request and response data to API servers, (5) Data in services such as file name, metadata, id, URL etc. (depends on the command).

Those logs do not contain password, credentials, or API token. But API tokens are stored under the path "%USERPROFILE%\.toolbox\secrets" (e.g. `C:\Users\USERNAME\.toolbox\secrets`) on windows, or "$HOME\.toolbox\secrets" in Linux or macOS (e.g. `/Users/USERNAME/.toolbox/secrets`). These secrets folder files are obfuscated but please do not share these files to anyone including a service provider support such as Dropbox support.

## Log format

There are several folders and files stored under the `jobs` folder. First, the job folder will be created every run with a name (internally called Job Id) with the format "yyyyMMdd-HHmmSS.xxx". The first part "yyyyMMdd-HHmmSS" is for local date/time of the command start. The second part ".xxx" is the sequential or random three-character ID to avoid conflict with a concurrent run.

Under the job folder, there are subfolders (1) `logs`: runtime logs including request/response data, parameters, or debug information, (2) `reports`: reports folder is for manage generated reports, (3) `kvs`: KVS folder is for runtime database folder.

On troubleshooting, files under `logs` are essential to understand what happened in runtime. The tool generates several types of logs. Those logs are JSON Lines format. Note: JSON Lines is a format that separate data with line separators. Please see [JSON Lines](https://jsonlines.org/) for more detail about the specification.

Some logs are compressed with gzip format. If a log compressed, then the file has a suffix '.gz'. Additionally, logs such as capture logs and toolbox logs are divided by certain size. If you want to analyze logs, please consider using `job log` commands. For example, `job log last -quiet` will report toolbox logs of the latest job with decompressed and concatenated.

## Debug logs

The tool will record all debug information into debug logs that have a prefix "toolbox". All records have a source code file name and line at the operation. If you find some suspicious error, then go to the source code and debug it. Some troubleshooting requires statistical analysis such as for performance tuning or out of memory. It is better to work with a tool such as `grep` or [jq](https://stedolan.github.io/jq/).

If you want to see heap size data in time series, please run the command like below. Then you can see time + heap size in CSV format.
```
tbx job log last -quiet | jq -r 'select(.msg == "Heap stats") | [.time, .HeapInuse] | @csv'
"2020-11-10T14:55:45.725+0900",18604032
"2020-11-10T14:55:50.725+0900",15130624
"2020-11-10T14:55:55.725+0900",17408000
"2020-11-10T14:56:00.725+0900",17014784
"2020-11-10T14:56:05.726+0900",19193856
"2020-11-10T14:56:10.725+0900",19136512
"2020-11-10T14:56:15.726+0900",16637952
"2020-11-10T14:56:20.725+0900",16678912
"2020-11-10T14:56:25.727+0900",16678912
"2020-11-10T14:56:30.730+0900",16678912
"2020-11-10T14:56:35.726+0900",16678912
```

## API transaction logs

The toll will record API requests and responses into capture logs that have a prefix "capture". This capture logs do not contain requests and responses of OAuth. Additionally, API token strings are replaced with `<secret>`.


text:
**Spesifik Aplikasi**
  * OpenOffice About
      Asli:
      ![](http://dev-legacy.blankonlinux.or.id/wiki/raw-attachment/wiki/Artwork/MenujuLontara/Screenshot-About%20OpenOffice.org.png)
  * OpenOffice Splash
      Asli:
      ![](http://dev-legacy.blankonlinux.or.id/wiki/raw-attachment/wiki/Artwork/MenujuLontara/splash.png)
  * Rencana
  ![](http://dev-legacy.blankonlinux.or.id/attachment/wiki/Keseneian/MenujuLontara/splash_coba_kecil.png)

Last modified on 06/16/2008 10:32:46 AM

## Kesenian Lontara Final

### GTK Theme

Tema yang digunakan pada rilis kali ini (Lontara), masih menggunakan Tema Docang

![](http://dodolboks.files.wordpress.com/2008/03/docang.jpg)

Unduh Tema Ini : http://cecunguk.blankonlinux.or.id/~alie/themes/

**Alternatif Tema yang ada Pada Lontara**

**Tema Dodol**
Tema dodol merupakan tema modifikasi Dari Docang yang berbasis pada engine murrine, Tema dodol sangat bersahabat dengan penggunaan memori sistem

![](http://dodolboks.files.wordpress.com/2008/03/screen-dodol.jpg)

Unduh Tema Ini : http://cecunguk.blankonlinux.or.id/~alie/themes/

**Tema Gonjing** (Usulan)

Unduh Tema Ini : http://cecunguk.blankonlinux.or.id/~alie/themes/

### Wallpaper

**Kapal Pensi**

Sebuah wallpaper usulan Farhan

![](http://cecunguk.blankonlinux.or.id/~alie/screen/kapal-pensi.jpg)

Unduh wallpaper ini : http://cecunguk.blankonlinux.or.id/~alie/wallpaper

Alternatif: Wallpaper wayang

http://cecunguk.blankonlinux.or.id/~alie/wallpaper

retroika

### GDM Theme

GDM default menggunakan gdm Sangaji

Alternatif GDM : Retroika

http://dodolboks.files.wordpress.com/2008/03/screen-gdm-retroika.jpg

Unduh wallpaper ini : http://cecunguk.blankonlinux.or.id/~alie/gdm

### Ikon

Untuk Icon Default Lontara Masih menggunakan Docang

http://gnome-look.org/CONTENT/content-pre1/70622-1.png

### Logo

* Logo BlankOn Linux http://cecunguk.blankonlinux.or.id/~alie/logo/logo-Blangkon.jpg

  + Unduh Berkas Asal(Sources) : http://cecunguk.blankonlinux.or.id/~alie/logo/logo-BlankOn.svg

* Logo BlankOn Dengan Tulisan http://cecunguk.blankonlinux.or.id/~alie/logo/logo-blangkon1.png

  + Unduh Berkas Asal(Sources) http://cecunguk.blankonlinux.or.id/~alie/logo/logo-blangkon1.svg

* Logo BlankOn Dengan Tulisan Kesamping http://cecunguk.blankonlinux.or.id/~alie/logo/logo-blangkon2.png

  + Unduh Berkas Asal(Sources) http://cecunguk.blankonlinux.or.id/~alie/logo/logo-blangkon1.svg

![](http://cecunguk.blankonlinux.or.id/~alie/logo/logo-blangkon2.svg)

---


text:
package com.github.traviolia.logic_engine.rules.runtime;

public enum TermType {
    ATOM,
    STRUCT,
    VAR;
}


text:
'use strict';

var togileApp = angular.module('frontendApp',
    ['ngRoute', 'restangular', 'ngCookies']
);

// ROUTING
togileApp.config(function ($routeProvider) {
    $routeProvider.when('/', {
        templateUrl: 'views/main.html',
        controller: 'MainCtrl'
    })
    .when('/lists/', {
        templateUrl: 'views/lists.html',
        controller: 'ListsCtrl'
    })
    .otherwise({
        redirectTo: '/'
    });
});

// Restangular configs
togileApp.run(function ($rootScope, Restangular, $cookieStore, $cookies) {

    $rootScope.user = $cookies.togile ? $cookies.togile : null;

    Restangular.setBaseUrl('/api/v1');

    Restangular.setRequestSuffix('/');

    Restangular.setResponseExtractor(function (response, operation) {
        var apiResponse = response;
        if (operation === 'getList') {
            // Received response: { objects:[...], meta:{...} }
            apiResponse = response.objects;
            apiResponse._meta = response.meta;
        }
        return apiResponse;
    });

    Restangular.setRestangularFields({
        selfLink: 'resource_uri'
    });

    //CSRF TOKEN!
    Restangular.setDefaultHeaders({
        'X-CSRFTOKEN': $cookies.csrftoken
    });
});