text:
package storm.trident.planner;

public class ProcessorContext {
    public Object batchId;
    public Object[] state;

    public ProcessorContext(Object batchId, Object[] state) {
        this.batchId = batchId;
        this.state = state;
    }
}

redpajama_set_name: RedPajamaGithub


text:
This service is part of amazee.io Lagoon, a Docker build and deploy system for
OpenShift & Kubernetes. Please reference our [documentation] for detailed
information on using, developing, and administering Lagoon.

# Logs to Microsoft Teams (`logs2microsoftteams`)

Watches all the Lagoon logs and checks for events that should trigger a
Microsoft Teams message. Each log message is tied to a Lagoon project, and
channel configuration for that project is retrieved from the Lagoon API.

Examples of events that might trigger a message: GitHub pull request opened, a
new build for a Lagoon project environent has started, a task was completed.

## Technology

* Node.js
* Message Queue

## Related Services

* API [***dependency***]
* RabbitMQ [***dependency***]

## Message Queues

* Consumes: `lagoon-logs`, `lagoon-logs:microsoftTeams`
* Produces: `lagoon-logs:microsoftTeams`

[documentation]: https://lagoon.readthedocs.io/


text:
/*global QUnit */

sap.ui.define([
		"sap/m/Page",
		"sap/m/ObjectStatus",
		"test-resources/sap/ui/support/TestHelper"
], function (Page, ObjectStatus, testRule)  {
		"use strict";

		QUnit.module("ObjectStatus with active: true and no icon or text", {
			beforeEach: function () {
				this.page = new Page("objectStatusContext", {
					content: new ObjectStatus({
						active: true
					})
				});
				this.page.placeAt("qunit-fixture");
			},
			afterEach: function () {
				this.page.destroy();
			}
		});

		testRule({
			executionScopeType: "subtree",
			executionScopeSelectors: "objectStatusContext",
			libName: "sap.m",
			ruleId: "objectStatusActive",
			expectedNumberOfIssues: 1
		});
	});


text:
import time

class Timer(object):
    def __init__(self, name):
        self.name = name

    def __enter__(self):
        self.start = time.time()

    def __exit__(self, type, value, traceback):
        print "{0} took {1} seconds".format(self.name, int(time.time() - self.start))


text:
using System;

namespace KitchenPC.Menus
{
   public class MenuResult
   {
      public bool MenuCreated;
      public bool MenuUpdated;

      public Guid? NewMenuId;
   }
}


text:
Javascript does not allow overiding of operators, so named methods are used.  The methods are also chainable.  For example, the hypotenuse of a triangle is calculated as:

    var c = a.pow(2).plus(b.pow(2)).sqrt()

## Methods

The table below contains:

* *Name* - the ISQ method name
* *JS Equivalent* - the equivalent javascript symbol or function
* *Aliases* - method name(s) used by other Number packages

Name  | JS Equivalent | Aliases
------ | ---- | -------
plus | + |  add
minus | - | subtract
times | * | mul, multiply or multiplyBy
dividedBy | / | div, divide or divideBy
abs | Math.abs |
pow | Math.pow |
sqrt | Math.pow(*x*, 0.5) |
eq | == | equal, equals, eql or equalTo
ne | != | notEqual, notEquals or notEqualTo
lt | < | lessThan
gt | > | greaterThan
lte | <= | lessThanOrEqual
gte | >= | greaterThanOrEqual
cmp | *see below* | compare or comparesTo

## Comparision

`cmp` compares two numbers and returns a value (-1, 0 or 1) that indicates whether the first number is less than, equal to, or greater than the second number.

A sample implementation is:

````js
function cmp(a, b) {
    let D = a - b;
    return D === 0 ? 0 : D <= 0 ? -1 : 1;
}
````


text:
package com.evolveum.midpoint.web.page.admin.configuration.dto;

import java.io.Serializable;

/**
 * @author lazyman
 */
public class BulkActionDto implements Serializable {

    public static final String F_SCRIPT = "script";
    public static final String F_ASYNC = "async";

    private String script;
    private boolean async = true;

    public String getScript() {
        return script;
    }

    public void setScript(String script) {
        this.script = script;
    }

    public boolean isAsync() {
        return async;
    }

    public void setAsync(boolean async) {
        this.async = async;
    }
}


text:
<!DOCTYPE html>

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

    <title>Brouze | About Us</title>

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

    <link href="css/about-page.css" rel="stylesheet">

    <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">

                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                    Toggle navigation

                </button>
                Brouze

Home

About

Contact

Sign In

Meet the Team

Our team met at the Girls Who Code 2015 Summer Immersion Program Level 2, held at the Microsoft campus in Mountain View, CA. Together, they created Brouze in hopes to help high school students access the proper tutoring help that they might need.

Gabrielle Cohn

Gabrielle is an upcoming junior at Wilson High School in Portland, Oregon. Outside of coding, she enjoys watching unholy amounts of Netflix, reading, sketching, and sleeping.

Ilana Franklin

Ilana is a rising senior at Piedmont High School in - you guessed it - Piedmont, California. Outside of coding, she also enjoys listening to music, honing her art and design skills, playing video games, and overthrowing the patriarchy.

Shannon Chen

Shannon is an upcoming junior at Saratoga High School in Saratoga, California. Outside of coding, she enjoys running, reading, and music.

Acknowledgements

There are many people we would like to thank for their help while we were building this website - we could not have done this on our own! Below are just some of the people that helped us accomplish our vision:

Microsoft

Through hosting the Girls Who Code Summer Immersion Program at its Mountain View Campus, Microsoft provided us computers, space to work, and delicious food. The staff we met there organized mentorship events for us that allowed us to meet professionals in technological fields.

Girls Who Code

None of us would have met if we hadn't gone to Girls Who Code's Summer Immersion Program. This organization has shown us how fun coding can be and that it is possible for us to pursue our dreams working in the computer science industry.

Our Parents

Without our parents, we wouldn't be here. They have given us support through their busy lives, and have encouraged us to do what we love.

Our Mentors at Girls Who Code

Sarah, Yoko, and Jade at Girls Who Code were here with us day after day for the seven-week-long Summer Immersion Program. They diligently answered our questions, patiently taught us more about computer science, and made our experience more fun.

Copyright 2015 - YAAAS Labs


text:
package org.apache.phoenix.parse;

import java.sql.SQLException;
import java.util.Collections;
import java.util.List;

/**
 *
 * Node representing the IS NULL and IS NOT NULL expressions in SQL
 *
 *
 * @since 0.1
 */
public class IsNullParseNode extends UnaryParseNode {
    private final boolean negate;

    IsNullParseNode(ParseNode expr, boolean negate) {
        super(expr);
        this.negate = negate;
    }

    public boolean isNegate() {
        return negate;
    }

    @Override
    public <T> T accept(ParseNodeVisitor<T> visitor) throws SQLException {
        List<T> l = Collections.emptyList();
        if (visitor.visitEnter(this)) {
            l = acceptChildren(visitor);
        }
        return visitor.visitLeave(this, l);
    }
}


text:
<?php include('../config/config.php'); ?>
<!DOCTYPE html>

    <link rel="stylesheet" href="/style/google-material-icons.css">
    <link rel="stylesheet" href="/style/material.blue_grey-deep_orange.min.css" />
    <link rel="stylesheet" href="/style/general-style.css" />
    <title>Downloads</title>

<?php
spl_autoload_register(function ($class_name) {
    include '../classes/'. $class_name . '.php';
});

include('../page-includes/header.php');

$json_file=JSON_DATA_RELATIVE_PATH;

Helpers::zip_directory('../ressources/images/thumbnails', 'thumb-backup.zip');
$thumbnails=DOWNLOAD_TMP_RELATIVE_PATH.'/thumb-backup.zip';

Helpers::zip_directory('../ressources', 'complete-backup.zip');
$complete_backup=DOWNLOAD_TMP_RELATIVE_PATH.'/complete-backup.zip';
?>

        <img src="<?php echo DOWNLOAD_THUMBNAIL_PATH; ?>">

Downloads

        JSON Data File
        <button class="mdl-button mdl-js-button mdl-button--icon mdl-button--colored">
            <a href="<?php echo $json_file; ?>" target="_blank">
                file_download

        </button>

        Thumbnails
        <button class="mdl-button mdl-js-button mdl-button--icon mdl-button--colored">
            <a href="<?php echo $thumbnails; ?>" target="_blank">
                file_download

        </button>

        Complete backup
        <button class="mdl-button mdl-js-button mdl-button--icon mdl-button--colored">
            <a href="<?php echo $complete_backup; ?>" target="_blank">
                cloud_download

        </button>

<?php
include('../page-includes/footer.php');
?>


text:
jQuery Transfer Numbers is a plugin that transfers numbers by flying from one element to another.

## Features

* Increments and Decrements Values
* Transfer speed is customizable
* Gamification style for your Web Apps
* Bind to most event listeners
* Stops at 0

## Basic usage

You need to include the jQuery library and the plugin file:

```html
  <!-- Adjust depending on where you have located the files -->
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
  <script src="js/jquery-transfer-numbers.js"></script>
```

A unique element containing a numeric unsigned integer is required for the origin. A second unique element is required for the destination:
```html
 <div> This is the source <span id="origin">25</span></div>
 <div> This is the destination <span id="destination">0</span></div>
```

Initialize the plugin by placing it inside an event listener.  The binding or element should be the origin, but does not have to be.   Apply the function name 'transferN' to the element containing the listener:
```javascript
 $('#origin').click( function() {

    $(this).transferN(); // Number will countdown to zero

 });
```

## Advanced usage

The optional target parameter defines the target element.  You may specify any speed duration in milliseconds, and third parameter is a boolean for flying values to the target element:
```javascript
 $('#origin').click( function() {

    $(this).transferN({ target: '#destination', speed: 1000, fly: false }); // 1 second per flying digit

 });
```

For a demonstration of usage and examples visit [the demo page](http://runastartup.com/transfer-numbers/)

## Change Log
1.2.2
```html
  -Optional flying
  -More accurate count by allowing one concurrent transfer
  -Target element no longer required
  -Removed event listener after first fire to prevent error
```
1.0.0
```html
  -Public Release
```


text:
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="Refresh" content="0; url=https://pstopia.github.io{{ page.url }}" />

  <title>
    {% if page.prob_name %}
      {{ page.prob_name }} - {{ page.round_name }} · {{ site.title }}
    {% elsif page.title == "Home" %}
      {{ site.title }} · {{ site.tagline }}
    {% else %}
      {{ page.title }} · {{ site.title }}
    {% endif %}
  </title>

  <link rel="stylesheet" href="{{ site.baseurl }}/styles.css">

  {% seo title=false %}

  <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
  <script>
    (adsbygoogle = window.adsbygoogle || []).push({
      google_ad_client: "ca-pub-3784329934070798",
      enable_page_level_ads: true
    });
  </script>
</head>


text:
class TransportOrderItem < ApplicationRecord
  belongs_to :transport_order
  belongs_to :fdp
  belongs_to :store
  belongs_to :commodity
  belongs_to :unit_of_measure
  belongs_to :transport_requisition_item

end


text:
<!--
   This file is part of the X12Parser library that provides tools to
   manipulate X12 messages using Ruby native syntax.

   http://x12parser.rubyforge.org

   Copyright (C) 2009 APP Design, Inc.

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

   $Id: BHT.xml 78 2009-05-12 22:27:26Z ikk $
-->

<Segment name="BHT" comment="To define the business hierarchical structure of the transaction set and identify the business application purpose and reference data, i.e., number, date, and time">
  <Field name="HierarchicalStructureCode" min="4" max="4" validation="T1005" comment="Code indicating the hierarchical application structure of a transaction set that utilizes the HL segment to define the structure of the transaction set"/>
  <Field name="TransactionSetPurposeCode" min="2" max="2" validation="T353" comment="Code identifying purpose of transaction set"/>
  <Field name="ReferenceIdentification" required="y" min="1" max="50" comment="Reference information as defined for a particular Transaction Set or as specified by the Reference Identification Qualifier"/>
  <Field name="Date" required="y" min="8" max="8" comment="Date expressed as CCYYMMDD where CC represents the first two digits of the calendar year"/>
  <Field name="Time" required="y" min="4" max="8" comment="Time expressed in 24-hour clock time as follows: HHMM, or HHMMSS, or HHMMSSD, or HHMMSSDD, where H = hours (00-23), M = minutes (00-59), S = integer seconds (00-59) and DD = decimal seconds; decimal seconds are expressed as follows: D = tenths (0-9) and DD = hundredths (00-99)"/>
  <Field name="TransactionTypeCode" required="n" min="2" max="2" validation="T640" comment="Code specifying the type of transaction"/>
</Segment>


text:
namespace app { namespace Fuse { namespace Entities { struct Component; } } }
namespace app { namespace Uno { namespace Collections { struct List1_Enumerator__Fuse_Entities_Component; } } }

namespace app {
namespace Uno {
namespace Collections {

struct List__Fuse_Entities_Component;

struct List__Fuse_Entities_Component__uType : ::uClassType
{
    ::app::Uno::Collections::IList__Fuse_Entities_Component __interface_0;
    ::app::Uno::Collections::ICollection__Fuse_Entities_Component __interface_1;
    ::app::Uno::Collections::IEnumerable__Fuse_Entities_Component __interface_2;
};

List__Fuse_Entities_Component__uType* List__Fuse_Entities_Component__typeof();

::uObject* List__Fuse_Entities_Component__GetEnumerator_boxed(List__Fuse_Entities_Component* __this);
void List__Fuse_Entities_Component___ObjInit(List__Fuse_Entities_Component* __this);
void List__Fuse_Entities_Component___ObjInit_1(List__Fuse_Entities_Component* __this, int capacity);
void List__Fuse_Entities_Component__Add(List__Fuse_Entities_Component* __this, ::app::Fuse::Entities::Component* item);
void List__Fuse_Entities_Component__AddRange(List__Fuse_Entities_Component* __this, ::uObject* items);
void List__Fuse_Entities_Component__BoundsCheck(List__Fuse_Entities_Component* __this, int index);
void List__Fuse_Entities_Component__Clear(List__Fuse_Entities_Component* __this);
bool List__Fuse_Entities_Component__Contains(List__Fuse_Entities_Component* __this, ::app::Fuse::Entities::Component* item);
void List__Fuse_Entities_Component__EnsureCapacity(List__Fuse_Entities_Component* __this);
int List__Fuse_Entities_Component__get_Count(List__Fuse_Entities_Component* __this);
::app::Fuse::Entities::Component* List__Fuse_Entities_Component__get_Item(List__Fuse_Entities_Component* __this, int index);
::app::Uno::Collections::List1_Enumerator__Fuse_Entities_Component List__Fuse_Entities_Component__GetEnumerator(List__Fuse_Entities_Component* __this);
int List__Fuse_Entities_Component__IndexOf(List__Fuse_Entities_Component* __this, ::app::Fuse::Entities::Component* item);
void List__Fuse_Entities_Component__Insert(List__Fuse_Entities_Component* __this, int index, ::app::Fuse::Entities::Component* item);
List__Fuse_Entities_Component* List__Fuse_Entities_Component__New_1(::uStatic* __this);
List__Fuse_Entities_Component* List__Fuse_Entities_Component__New_2(::uStatic* __this, int capacity);
bool List__Fuse_Entities_Component__Remove(List__Fuse_Entities_Component* __this, ::app::Fuse::Entities::Component* item);
void List__Fuse_Entities_Component__RemoveAt(List__Fuse_Entities_Component* __this, int index);
void List__Fuse_Entities_Component__set_Item(List__Fuse_Entities_Component* __this, int index, ::app::Fuse::Entities::Component* value);
void List__Fuse_Entities_Component__Sort(List__Fuse_Entities_Component* __this, ::uDelegate* comparer);
::uArray* List__Fuse_Entities_Component__ToArray(List__Fuse_Entities_Component* __this);

struct List__Fuse_Entities_Component : ::uObject
{
    ::uStrong< ::uArray*> _data;
    int _used;
    int _version;

    ::uObject* GetEnumerator_boxed() { return List__Fuse_Entities_Component__GetEnumerator_boxed(this); }
    void _ObjInit() { List__Fuse_Entities_Component___ObjInit(this); }
    void _ObjInit_1(int capacity) { List__Fuse_Entities_Component___ObjInit_1(this, capacity); }
    void Add(::app::Fuse::Entities::Component* item) { List__Fuse_Entities_Component__Add(this, item); }
    void AddRange(::uObject* items) { List__Fuse_Entities_Component__AddRange(this, items); }
    void BoundsCheck(int index) { List__Fuse_Entities_Component__BoundsCheck(this, index); }
    void Clear() { List__Fuse_Entities_Component__Clear(this); }
    bool Contains(::app::Fuse::Entities::Component* item) { return List__Fuse_Entities_Component__Contains(this, item); }
    void EnsureCapacity() { List__Fuse_Entities_Component__EnsureCapacity(this); }
    int Count() { return List__Fuse_Entities_Component__get_Count(this); }
    ::app::Fuse::Entities::Component* Item(int index) { return List__Fuse_Entities_Component__get_Item(this, index); }
    ::app::Uno::Collections::List1_Enumerator__Fuse_Entities_Component GetEnumerator();
    int IndexOf(::app::Fuse::Entities::Component* item) { return List__Fuse_Entities_Component__IndexOf(this, item); }
    void Insert(int index, ::app::Fuse::Entities::Component* item) { List__Fuse_Entities_Component__Insert(this, index, item); }
    bool Remove(::app::Fuse::Entities::Component* item) { return List__Fuse_Entities_Component__Remove(this, item); }
    void RemoveAt(int index) { List__Fuse_Entities_Component__RemoveAt(this, index); }
    void Item(int index, ::app::Fuse::Entities::Component* value) { List__Fuse_Entities_Component__set_Item(this, index, value); }
    void Sort(::uDelegate* comparer) { List__Fuse_Entities_Component__Sort(this, comparer); }
    ::uArray* ToArray() { return List__Fuse_Entities_Component__ToArray(this); }
};

}}}

#include <app/Uno.Collections.List1_Enumerator__Fuse_Entities_Component.h>

namespace app {
namespace Uno {
namespace Collections {

inline ::app::Uno::Collections::List1_Enumerator__Fuse_Entities_Component List__Fuse_Entities_Component::GetEnumerator() { return List__Fuse_Entities_Component__GetEnumerator(this); }

}}}

#endif


text:
<?php

PhabricatorRebuildIndexesWorker::rebuildObjectsWithQuery('HeraldRuleQuery');


text:
package customerinsightsapi

// Copyright (c) Microsoft and contributors.  All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/services/customerinsights/mgmt/2017-01-01/customerinsights"
	"github.com/Azure/go-autorest/autorest"
)

// OperationsClientAPI contains the set of methods on the OperationsClient type.
type OperationsClientAPI interface {
	List(ctx context.Context) (result customerinsights.OperationListResultPage, err error)
}

var _ OperationsClientAPI = (*customerinsights.OperationsClient)(nil)

// HubsClientAPI contains the set of methods on the HubsClient type.
type HubsClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, hubName string, parameters customerinsights.Hub) (result customerinsights.Hub, err error)
	Delete(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.HubsDeleteFuture, err error)
	Get(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.Hub, err error)
	List(ctx context.Context) (result customerinsights.HubListResultPage, err error)
	ListByResourceGroup(ctx context.Context, resourceGroupName string) (result customerinsights.HubListResultPage, err error)
	Update(ctx context.Context, resourceGroupName string, hubName string, parameters customerinsights.Hub) (result customerinsights.Hub, err error)
}

var _ HubsClientAPI = (*customerinsights.HubsClient)(nil)

// ProfilesClientAPI contains the set of methods on the ProfilesClient type.
type ProfilesClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, hubName string, profileName string, parameters customerinsights.ProfileResourceFormat) (result customerinsights.ProfilesCreateOrUpdateFuture, err error)
	Delete(ctx context.Context, resourceGroupName string, hubName string, profileName string, localeCode string) (result customerinsights.ProfilesDeleteFuture, err error)
	Get(ctx context.Context, resourceGroupName string, hubName string, profileName string, localeCode string) (result customerinsights.ProfileResourceFormat, err error)
	GetEnrichingKpis(ctx context.Context, resourceGroupName string, hubName string, profileName string) (result customerinsights.ListKpiDefinition, err error)
	ListByHub(ctx context.Context, resourceGroupName string, hubName string, localeCode string) (result customerinsights.ProfileListResultPage, err error)
}

var _ ProfilesClientAPI = (*customerinsights.ProfilesClient)(nil)

// InteractionsClientAPI contains the set of methods on the InteractionsClient type.
type InteractionsClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, hubName string, interactionName string, parameters customerinsights.InteractionResourceFormat) (result customerinsights.InteractionsCreateOrUpdateFuture, err error)
	Get(ctx context.Context, resourceGroupName string, hubName string, interactionName string, localeCode string) (result customerinsights.InteractionResourceFormat, err error)
	ListByHub(ctx context.Context, resourceGroupName string, hubName string, localeCode string) (result customerinsights.InteractionListResultPage, err error)
	SuggestRelationshipLinks(ctx context.Context, resourceGroupName string, hubName string, interactionName string) (result customerinsights.SuggestRelationshipLinksResponse, err error)
}

var _ InteractionsClientAPI = (*customerinsights.InteractionsClient)(nil)

// RelationshipsClientAPI contains the set of methods on the RelationshipsClient type.
type RelationshipsClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, hubName string, relationshipName string, parameters customerinsights.RelationshipResourceFormat) (result customerinsights.RelationshipsCreateOrUpdateFuture, err error)
	Delete(ctx context.Context, resourceGroupName string, hubName string, relationshipName string) (result customerinsights.RelationshipsDeleteFuture, err error)
	Get(ctx context.Context, resourceGroupName string, hubName string, relationshipName string) (result customerinsights.RelationshipResourceFormat, err error)
	ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.RelationshipListResultPage, err error)
}

var _ RelationshipsClientAPI = (*customerinsights.RelationshipsClient)(nil)

// RelationshipLinksClientAPI contains the set of methods on the RelationshipLinksClient type.
type RelationshipLinksClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, hubName string, relationshipLinkName string, parameters customerinsights.RelationshipLinkResourceFormat) (result customerinsights.RelationshipLinksCreateOrUpdateFuture, err error)
	Delete(ctx context.Context, resourceGroupName string, hubName string, relationshipLinkName string) (result customerinsights.RelationshipLinksDeleteFuture, err error)
	Get(ctx context.Context, resourceGroupName string, hubName string, relationshipLinkName string) (result customerinsights.RelationshipLinkResourceFormat, err error)
	ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.RelationshipLinkListResultPage, err error)
}

var _ RelationshipLinksClientAPI = (*customerinsights.RelationshipLinksClient)(nil)

// AuthorizationPoliciesClientAPI contains the set of methods on the AuthorizationPoliciesClient type.
type AuthorizationPoliciesClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, hubName string, authorizationPolicyName string, parameters customerinsights.AuthorizationPolicyResourceFormat) (result customerinsights.AuthorizationPolicyResourceFormat, err error)
	Get(ctx context.Context, resourceGroupName string, hubName string, authorizationPolicyName string) (result customerinsights.AuthorizationPolicyResourceFormat, err error)
	ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.AuthorizationPolicyListResultPage, err error)
	RegeneratePrimaryKey(ctx context.Context, resourceGroupName string, hubName string, authorizationPolicyName string) (result customerinsights.AuthorizationPolicy, err error)
	RegenerateSecondaryKey(ctx context.Context, resourceGroupName string, hubName string, authorizationPolicyName string) (result customerinsights.AuthorizationPolicy, err error)
}

var _ AuthorizationPoliciesClientAPI = (*customerinsights.AuthorizationPoliciesClient)(nil)

// ConnectorsClientAPI contains the set of methods on the ConnectorsClient type.
type ConnectorsClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, hubName string, connectorName string, parameters customerinsights.ConnectorResourceFormat) (result customerinsights.ConnectorsCreateOrUpdateFuture, err error)
	Delete(ctx context.Context, resourceGroupName string, hubName string, connectorName string) (result customerinsights.ConnectorsDeleteFuture, err error)
	Get(ctx context.Context, resourceGroupName string, hubName string, connectorName string) (result customerinsights.ConnectorResourceFormat, err error)
	ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.ConnectorListResultPage, err error)
}

var _ ConnectorsClientAPI = (*customerinsights.ConnectorsClient)(nil)

// ConnectorMappingsClientAPI contains the set of methods on the ConnectorMappingsClient type.
type ConnectorMappingsClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, hubName string, connectorName string, mappingName string, parameters customerinsights.ConnectorMappingResourceFormat) (result customerinsights.ConnectorMappingResourceFormat, err error)
	Delete(ctx context.Context, resourceGroupName string, hubName string, connectorName string, mappingName string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, hubName string, connectorName string, mappingName string) (result customerinsights.ConnectorMappingResourceFormat, err error)
	ListByConnector(ctx context.Context, resourceGroupName string, hubName string, connectorName string) (result customerinsights.ConnectorMappingListResultPage, err error)
}

var _ ConnectorMappingsClientAPI = (*customerinsights.ConnectorMappingsClient)(nil)

// KpiClientAPI contains the set of methods on the KpiClient type.
type KpiClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, hubName string, kpiName string, parameters customerinsights.KpiResourceFormat) (result customerinsights.KpiCreateOrUpdateFuture, err error)
	Delete(ctx context.Context, resourceGroupName string, hubName string, kpiName string) (result customerinsights.KpiDeleteFuture, err error)
	Get(ctx context.Context, resourceGroupName string, hubName string, kpiName string) (result customerinsights.KpiResourceFormat, err error)
	ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.KpiListResultPage, err error)
	Reprocess(ctx context.Context, resourceGroupName string, hubName string, kpiName string) (result autorest.Response, err error)
}

var _ KpiClientAPI = (*customerinsights.KpiClient)(nil)

// WidgetTypesClientAPI contains the set of methods on the WidgetTypesClient type.
type WidgetTypesClientAPI interface {
	Get(ctx context.Context, resourceGroupName string, hubName string, widgetTypeName string) (result customerinsights.WidgetTypeResourceFormat, err error)
	ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.WidgetTypeListResultPage, err error)
}

var _ WidgetTypesClientAPI = (*customerinsights.WidgetTypesClient)(nil)

// ViewsClientAPI contains the set of methods on the ViewsClient type.
type ViewsClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, hubName string, viewName string, parameters customerinsights.ViewResourceFormat) (result customerinsights.ViewResourceFormat, err error)
	Delete(ctx context.Context, resourceGroupName string, hubName string, viewName string, userID string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, hubName string, viewName string, userID string) (result customerinsights.ViewResourceFormat, err error)
	ListByHub(ctx context.Context, resourceGroupName string, hubName string, userID string) (result customerinsights.ViewListResultPage, err error)
}

var _ ViewsClientAPI = (*customerinsights.ViewsClient)(nil)

// LinksClientAPI contains the set of methods on the LinksClient type.
type LinksClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, hubName string, linkName string, parameters customerinsights.LinkResourceFormat) (result customerinsights.LinksCreateOrUpdateFuture, err error)
	Delete(ctx context.Context, resourceGroupName string, hubName string, linkName string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, hubName string, linkName string) (result customerinsights.LinkResourceFormat, err error)
	ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.LinkListResultPage, err error)
}

var _ LinksClientAPI = (*customerinsights.LinksClient)(nil)

// RolesClientAPI contains the set of methods on the RolesClient type.
type RolesClientAPI interface {
	ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.RoleListResultPage, err error)
}

var _ RolesClientAPI = (*customerinsights.RolesClient)(nil)

// RoleAssignmentsClientAPI contains the set of methods on the RoleAssignmentsClient type.
type RoleAssignmentsClientAPI interface {
	CreateOrUpdate(ctx context.Context, resourceGroupName string, hubName string, assignmentName string, parameters customerinsights.RoleAssignmentResourceFormat) (result customerinsights.RoleAssignmentsCreateOrUpdateFuture, err error)
	Delete(ctx context.Context, resourceGroupName string, hubName string, assignmentName string) (result autorest.Response, err error)
	Get(ctx context.Context, resourceGroupName string, hubName string, assignmentName string) (result customerinsights.RoleAssignmentResourceFormat, err error)
	ListByHub(ctx context.Context, resourceGroupName string, hubName string) (result customerinsights.RoleAssignmentListResultPage, err error)
}

var _ RoleAssignmentsClientAPI = (*customerinsights.RoleAssignmentsClient)(nil)

// ImagesClientAPI contains the set of methods on the ImagesClient type.
type ImagesClientAPI interface {
	GetUploadURLForData(ctx context.Context, resourceGroupName string, hubName string, parameters customerinsights.GetImageUploadURLInput) (result customerinsights.ImageDefinition, err error)
	GetUploadURLForEntityType(ctx context.Context, resourceGroupName string, hubName string, parameters customerinsights.GetImageUploadURLInput) (result customerinsights.ImageDefinition, err error)
}

var _ ImagesClientAPI = (*customerinsights.ImagesClient)(nil)


text:
'use strict';
var FacebookStrategy = require('passport-facebook').Strategy;
var TwitterStrategy = require('passport-twitter').Strategy;
var UserModel = require('../models').UserModel;

function findOrCreate ( profile, cb ) {
    UserModel.findOrCreate({ userId: profile.id }, profile, cb);
}

function parserProfile( profile ) {
    return {
        userId 		   : profile.id,
        userName   : profile.username,
        displayName	: profile.displayName
    };
}

exports.socialAuth = function ( app, passport ){
	passport.use( new FacebookStrategy({
	    clientID: app.get('facebookId'),
	    clientSecret: app.get('facebookSecret'),
	    callbackURL: "/auth/facebook/callback"
	}, function( accessToken, refreshToken, profile, done ) {
	    console.log(profile);
	    profile = parserProfile( profile );
        findOrCreate(profile, done);
	}));

	passport.use( new TwitterStrategy({
	    consumerKey: app.get('twitterKey'),
	    consumerSecret: app.get('twitterSecret'),
	    callbackURL: "/auth/twitter/callback"
	}, function( token, tokenSecret, profile, done ) {
		console.log(profile);
	    profile = parserProfile( profile );
        findOrCreate(profile, done);
	}));

	passport.serializeUser( function(user, done){
	    done(null, user);
	});

	passport.deserializeUser( function(obj, done){
	    done(null, obj);
	});
}


text:
import { TemperatureMin32 } from "../../";

export = TemperatureMin32;


text:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
            android:opacity="opaque">
    <item android:drawable="@color/material_grey_50"/>
    <item>
        <bitmap
            android:src="@drawable/branded_logo_icon"
            android:gravity="center"/>
    </item>
</layer-list>


text:
"""Create PDF for individual family's Timetable.

Usage:
  family2pdf.py [-d|--debug] DIR
  family2pdf.py (-h | --help)
  family2pdf.py --version

Arguments:
  DIR     output directory.

Options:
  -d,--debug     Turn on debug output.
  -h,--help      Show this screen.
  --version      Show version.

"""
from reportlab.lib import colors
from reportlab.lib.pagesizes import A4
from reportlab.platypus import (
    SimpleDocTemplate,
    Table,
    TableStyle,
    Image,
    Paragraph,
    Spacer,
    PageBreak)
from reportlab.lib.units import mm, cm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_JUSTIFY
from docopt import docopt
import csv
import logging

log = logging.getLogger(__name__)

from deep import get_source_data, timetable_from_list

W, H = A4
TITLE_FONT = "Helvetica-Bold"
TITLE_SIZE = 16
TH_LOGO = "7thlogo.png"
MAP_FILE = "map.png"

TITLE = "7th Lichfield Scout Group"
SUBTITLE = "2019 Family Camp"

ACTS = {
    'Archery (Outdoor and Indoor)':
        'Please meet your instructor by the archery range. (Please wear a top '
        'with long sleeves to protect your arms and tie back long hair). Take a '
        'moment to check your timetable to see if you are meant to be indoor or '
        'outdoor and ensure you join the correct session.',
    'Blindfold Trail':
        'Please meet your instructor at the Blindfold Trail. (You are advised to wear '
        'long trousers, long sleeves and sturdy shoes).',
    'BMX Biking':
        'Please meet your instructor at the BMX track. (You are strongly advised '
        'to ensure all those participating wear long trousers and long sleeves '
        'as it is a loose gravel track). PLEASE NOTE THAT ALL BMX RIDERS MUST BE '
        'AT LEAST 9 YEARS OLD.',
    'Canoeing':
        'Please meet your instructor at the river bank. (No valuables i.e. '
        'watches, mobile phones, wallets, keys etc. as these may be lost or '
        'damaged as falling in is always a possibility. Wear old clothes). '
        'Please note that if smaller children do not fit securely into a buoyancy '
        'aid they will not be allowed to take part.',
    'Climbing':
        'Please meet your instructor by the entrance to the kitchen. Here the '
        'instructor will issue your safety equipment before taking you to the '
        'Climbing Quarry.',
    'Caving':
        'Please meet your instructor at the man-made caves. (This activity '
        'can be a bit wet and muddy. If possible, please wear old '
        'clothes/waterproof\'s. It is also stony so long trousers are a good '
        'idea).',
    'The Crystal Maze':
        'Please meet your instructor at the Crystal Maze.',
    'Fire Lighting':
        'Please meet at the entrance to the fire area.',
    'Pond Dipping':
        'Please meet your instructor at the pond, which is behind the gents toilet, '
        'near the Crystal Maze.',
    'Woodland Craft':
        'Please meet your instructor in the hut near the fire area.'
}

programme = [
    ['Friday', [
        ['8.00pm', 'Flag Break (camp opening ceremony)'],
    ]],
    ['Saturday', [
        ['8.45am', 'Flag Break (announcement of badge competition winner)'],
        ['9.00am-1.00pm and 1.30pm-4.30pm', 'Escape Boxes'],
        ['9.30am-4.30pm', 'Activities'],
        ['11.00am-7.00pm', 'Face Painting and Glitter Tattoos'],
        ['2.00pm-11.00pm', 'Astronomy group'],
        ['2.30pm-6.30pm', 'Crazy Golf'],
        ['5.00pm-6.30pm', 'BBQ and Ice Cream Van'],
        ['7.15pm', 'Flag down'],
        ['7.30pm', 'Campfire (marquee if wet)']
    ]],
    ['Sunday', [
        ['9.00am', 'Flag Break'],
        ['9.30am-1.30pm', 'Activities'],
        ['1.40pm', 'Flag down (camp closing ceremony)'],
        ['2.00pm-4.00pm', 'Packing away and vacate site']
    ]]
]

KIT = [['Tent', 'Mallet'],
       ['Ground sheet', 'Airbed/ Karrimat'],
       ['Sleeping bags', 'Extra blanket'],
       ['Pillows', 'Folding chairs'],
       ['Fold up table',
        'Light (there is no electricity point provided on the field)'],
       ['Torch (batteries?)', 'Cooler box with ice packs'],
       ['Cooking gas (or use the on-site catering)', 'Pans'],
       ['Washing up liquid/ scourer', 'Water container'],
       ['Cooking utensils (corkscrew, sharp knife, can opener, wooden spoon)',
        'Matches'],
       ['Plates/cups/bowls/tumblers', 'Cutlery'],
       ['J-Cloths', 'Tea towels'],
       ['Bin liners', 'Food (Breakfast x2, Lunch x2, accompaniments '
                      'for bbq on Sat eve, snacks, drinks)'],
       ['Clothes', 'Beaver/cub/scout uniform'],
       ['Wellies (hopefully not!)', 'Kagools (likewise)'],
       ['Toiletries', 'First aid kit'],
       ['Towels', 'Sunblock'],
       ['Insect repellent', 'Tissues'],
       ['Games', 'Kids bikes'],
       ['Fuel for your fire. (There is no firewood on site)']]

styles = {
    'default': ParagraphStyle(
        'default',
        fontName='Times-Roman',
        fontSize=10,
        leading=12,
        leftIndent=0,
        rightIndent=0,
        firstLineIndent=0,
        alignment=TA_LEFT,
        spaceBefore=0,
        spaceAfter=0,
        bulletFontName='Times-Roman',
        bulletFontSize=10,
        bulletIndent=0,
        textColor=colors.black,
        backColor=None,
        wordWrap=None,
        borderWidth=0,
        borderPadding=0,
        borderColor=None,
        borderRadius=None,
        allowWidows=1,
        allowOrphans=0,
        textTransform=None,  # 'uppercase' | 'lowercase' | None
        endDots=None,
        splitLongWords=1,
    )}

styles['Title'] = ParagraphStyle(
    'Title',
    parent=styles['default'],
    fontName='Helvetica-Bold',
    fontSize=22,
    spaceBefore=0,
    spaceAfter=6,
    leading=30,
    alignment=TA_CENTER,
    textColor=colors.purple,
)
styles['Title2'] = ParagraphStyle(
    'Title2',
    parent=styles['default'],
    fontName='Helvetica-Bold',
    fontSize=18,
    spaceBefore=0,
    spaceAfter=6,
    leading=30,
    alignment=TA_CENTER,
    textColor=colors.purple,
)
styles['Subtitle'] = ParagraphStyle(
    'SubTitle',
    parent=styles['default'],
    fontName='Helvetica-Bold',
    fontSize=14,
    spaceBefore=4,
    spaceAfter=1,
    leading=24,
    alignment=TA_LEFT,
    textColor=colors.purple,
)
styles['ActName'] = ParagraphStyle(
    'ActName',
    parent=styles['default'],
    fontName='Helvetica-Bold',
    fontSize=12,
    spaceBefore=3,
    spaceAfter=1,
    leftIndent=1 * cm,
    leading=20,
    alignment=TA_LEFT,
    textColor=colors.purple,
)
styles['ActDesc'] = ParagraphStyle(
    'ActDesc',
    parent=styles['default'],
    fontName='Helvetica-Bold',
    fontSize=10,
    spaceBefore=0,
    spaceAfter=1,
    leftIndent=2 * cm,
    leading=10,
    alignment=TA_LEFT,
    textColor=colors.black,
)

styles['Body'] = ParagraphStyle(
    'Body',
    parent=styles['default'],
    fontName='Helvetica-Bold',
    fontSize=11,
    spaceBefore=2,
    spaceAfter=2,
    leftIndent=0.75 * cm,
    leading=14,
    alignment=TA_JUSTIFY,
    textColor=colors.black,
)

styles['BodySmall'] = ParagraphStyle(
    'BodySmall',
    parent=styles['default'],
    fontName='Helvetica-Bold',
    fontSize=9,
    spaceBefore=2,
    spaceAfter=2,
    leftIndent=0.75 * cm,
    leading=14,
    alignment=TA_JUSTIFY,
    textColor=colors.black,
)

styles['TBody'] = ParagraphStyle(
    'TBody',
    parent=styles['default'],
    fontName='Helvetica-Bold',
    fontSize=12,
    spaceBefore=2,
    spaceAfter=2,
    leftIndent=0,
    leading=14,
    alignment=TA_LEFT,
    textColor=colors.black,
)

def pageTemplate():
    def familyTemplate(canvas, doc):
        canvas.saveState()
        canvas.drawImage(TH_LOGO, 1 * cm, H - 4.5 * cm,
                         width=5 * cm, height=5 * cm, mask=None,
                         preserveAspectRatio=True)

        canvas.setFont(TITLE_FONT, TITLE_SIZE)
        canvas.drawCentredString(W / 2.0, H - 1.3 * cm, TITLE)
        canvas.setFont(TITLE_FONT, TITLE_SIZE)
        canvas.drawCentredString(W / 2.0, H - 2 * cm, SUBTITLE)
        canvas.restoreState()

    return familyTemplate

def title(text):
    return Paragraph(text, styles['Title'])

def title2(text):
    return Paragraph(text, styles['Title2'])

def subtitle(text):
    return Paragraph(text, styles['Subtitle'])

def activity_name(text):
    return Paragraph(text, styles['ActName'])

def activity_desc(text):
    return Paragraph(text, styles['ActDesc'])

def para(text):
    return Paragraph(text, styles['Body'])

def para_small(text):
    return Paragraph(text, styles['BodySmall'])

def tbody(text):
    return Paragraph(text, styles['TBody'])

def gen_story(doc):
    e = []
    e.append(Spacer(0 * cm, 1 * cm))
    e.append(title2("Welcome to Family Camp."))
    e.append(title2("Let the action begin!!"))

    e.append(title2('Programme'))

    for day, acts in programme:
        e.append(subtitle(day))

        table = Table([[tbody(_) for _ in row] for row in acts])
        table.setStyle(TableStyle([
            ('BOTTOMPADDING', (0, -1), (-1, -1), 1 * cm),
            ('VALIGN', (0, 0), (-1, -1), 'TOP'),
            # ('LINEABOVE', (0, 1), (-1, -1), 1, colors.purple),
        ]))
        e.append(table)

    e.append(PageBreak())

    e.append(title2("Activities"))
    e.append(para("Please find enclosed details of when your chosen "
                  "activities will be taking place and information "
                  "about other events that are available, should you "
                  "require them, during the weekend. "))

    e.append(para("Please wear suitable footwear for all activities "
                  "and remember that all children must be supervised. "
                  "All activities should take approximately 1 hour unless "
                  "stated otherwise. Please note that the times given are "
                  "the activity START time so please be 5 minutes early! "
                  "Please use your map provided for meeting places and "
                  "activities."))

    e.append(para("Participation in activities allocated to Under 5's will always be "
                  "at the discretion of the Entrust instructor."))

    for name, desc in sorted(ACTS.items(), key=lambda x: x[0]):
        e.append(activity_name(name))
        e.append(activity_desc(desc))

    e.append(PageBreak())

    e.append(subtitle('Camping Arrangements'))
    e.append(para(
        'Please note that the camping arrangements have changed from '
        'previous years due to reorganization of the Shugborough '
        'site. Please see below:-'))

    e.append(subtitle('Night Owl Zone'))
    e.append(para('The area at the bottom of the field to the left of the main entrance is intended '
                  'for groups who stay up later into the night. Please camp as far away as '
                  'possible from the main buildings and the quieter zone if you intend to stay up late.'))

    e.append(para('Please be aware that noise travels a long way on a quiet campsite at night and tent '
                  'walls provide no sound proofing. We want everyone to enjoy their evening and sitting '
                  'around the campfire is a big part of family camp for many of us. But please have '
                  'a thought for those that have gone to bed and for the children that will be listening '
                  'to your late night chat in their sleeping bags.'))

    e.append(subtitle('Quieter Zone'))
    e.append(para('If you are camped in the Quieter Zone (marked on the map) please keep noise to a '
                  'minimum after 10:00pm. Please note that the Family Camp team is not responsible '
                  'or empowered to enforce the quiet policy.'))

    e.append(subtitle("BBQ"))

    e.append(para('The BBQ will be on Saturday evening '
                  'Campers that have requested a vegetarian or gluten free meal will '
                  'have a raffle ticket in their Welcome Pack. Please take this '
                  'ticket along with you so that the Catering Team know that '
                  'yours is one of the vegetarian or gluten free meals. If you have other special '
                  'dietary requirements (but do not have a raffle ticket) please '
                  'speak to the Catering Team as soon as possible (well before '
                  'the BBQ) and they will do their best to provide for you. '
                  'The BBQ is an opportunity to gather together for a meal, so '
                  'please bring your tables and chairs, drinks & extra snacks '
                  'up to the BBQ area. We are hoping that an ice-cream van will pay '
                  'us a visit, so have some change ready as '
                  'these are not pre-paid.'))

    e.append(subtitle('Camp Fire'))
    e.append(para(
        'Saturday 7.30pm - 8.30pm. If the weather is dry there will be a campfire at the '
        'campfire circle. Please come along, with your chairs, to join in with the singing.'))

    e.append(para(
        'At the end of the campfire we will have marshmallows for all that wish to toast them. '
        'So that this activity can be conducted safely it will take place outside the campfire '
        'circle using our backwoods cooking equipment. This will involve the movement of '
        'the hot embers so we ask that you please be patient and listen carefully to any '
        'safety instructions given at the close of the campfire whilst this is organised. '
        'Please note that for additional safety you will need to supervise your own children '
        'so marshmallows will only be issued to adults.'))

    e.append(PageBreak())

    e.append(subtitle('Flag Break & Flag Down'))
    e.append(para("This is when we all congregate round the flag to receive "
                  "information about camp and to update you on the day's "
                  "activities. Please see the Programme for times. "
                  "Many campers choose to wear their 7th Lichfield Hoodie or "
                  "T-shirt (and knecker if they are invested). Beavers, Cubs, "
                  "Scouts and Leaders might like to wear uniform for the Sunday "
                  "morning Flag Break."))

    e.append(subtitle('Family Camp Badge'))
    e.append(para('Each family group will have a voucher in their pack to obtain a '
                  'Family Camp Badge free of charge. We will be happy to exchange these directly '
                  'after flag breaks on Saturday and Sunday. Additional badges will be available '
                  'to purchase for £1.50 at the same time.'))

    e.append(subtitle('Tuck Shop'))
    e.append(para('There will be a tuck shop in the dining area next to the caterers where '
                  'you will be able to purchase sweets, cakes and soft drinks. This will be '
                  'manned over the weekend by our Scouts who are raising money for overseas adventures.'))

    e.append(subtitle('Astronomy'))
    e.append(para("The Rosliston Astronomy Group will be joining us on Saturday afternoon. "
                  "They will arrange safe solar viewing during daylight along with the opportunity to make "
                  "and launch paper rockets. As darkness descends you will be given the chance to view "
                  "the wider universe through first class equipment."))

    e.append(subtitle('Escape Boxes'))
    e.append(para(
        'If you want to exercise your brain then this could be the activity for you. Solve a '
        'series of problems to find the codes you need to unlock the box. Will you be the first '
        'to get inside to stop the timer? Groups of up to 7 can work on each box allowing '
        'families to work together. This activity will be available on Saturday in the small green '
        'yurt and is suitable for ages 7 and above. If you would like to have a go at this brand '
        'new activity then add your name to the sign-up sheet (location to be advised at flag '
        'break).'))

    e.append(para(
        'Thank you to The Problem Solving Company for loaning us their Escape Boxes.'))

    e.append(subtitle('Face painting and Glitter Tattoos'))
    e.append(para(
        'On site from late Saturday morning will be a Face Painting and Glitter Tattoo Artiste. '
        'Everyone aged 3 and above can go along to get their face painted and/or get a glitter '
        'tattoo of their choice, including one of our very own 7th logo. Children aged 2-3 will be '
        'able to have a design painted on their arm. You will find her at the top of the field '
        'near the large tree with the picnic benches. As this activity marks the skin there are a '
        'number of terms and conditions that we must adhere to. We recommend that you '
        'read them (copy in the pack) before participating. Ultimately the artiste's decision is '
        'final and we ask that you respect that.'))

    e.append(PageBreak())

    e.append(subtitle('Crazy Golf'))
    e.append(para(
        'To add to the fun there will be a 9 hole Crazy Golf course on site on Saturday '
        'afternoon situated near to the catering block. Challenge your putting skills over holes '
        'that include bunkers, ramps, tunnels and rebound bars to name but a few. This '
        'activity is suitable for all ages. Just turn up to have a go. Parents, please ensure '
        'younger children are supervised.'))

    e.append(subtitle('Recycling'))
    e.append(para('Entrust operates a recycling policy at Shugborough, there are '
                  'separate bins for recyclable and non recyclable waste. Please '
                  'ensure that you separate your waste and dispose of it in the correct bins. '))

    e.append(para('Recyclable materials are: all glass, all plastic bottles, '
                  'all cans, all tetrapacks, all foil and all plastic tubs and trays. '
                  'All other waste, including any cardboard waste must be placed in the general waste bins. '
                  'For the avoidance of doubt polystyrene food containers and cups must go in general waste bins.'))

    e.append(para('There are recycling and rubbish bins near the canteen building.'))

    e.append(subtitle('General Information'))
    e.append(para('The campsite does not permit pets but does allow BBQs '
                  'and fires, providing they are up off the ground. You will need to bring '
                  'your own fuel as there is no firewood on site.'))

    e.append(para('If you have any queries, please do not hesitate to come '
                  'and ask the Family Camp organising team. They may not have all the answers '
                  'but they will always be happy to try to help. '))
    e.append(para('The Service Team will be '
                  'wearing hiviz neckers. The Service Team are Explorer Scouts that are on '
                  'site for the weekend to help with some of the tasks that need to be '
                  'done. If you need something such as toilet rolls for the loos, the '
                  'Service Team should be able to help.'))

    # Kit list.

    e.append(PageBreak())

    e.append(title2('Suggested Kit List for Family Camp'))
    e.append(para("The following is just a suggested list of items that you "
                  "may find useful to take to camp."))

    kit_table = Table([[tbody(_) for _ in row] for row in KIT])
    kit_table.setStyle(TableStyle([
        ('TOPPADDING', (0, 0), (-1, 0), 0.5 * cm),
        ('VALIGN', (0, 0), (-1, -1), 'TOP'),
        ('LINEABOVE', (0, 1), (-1, -1), 1, colors.purple),
    ]))
    e.append(kit_table)

    # Map
    e.append(PageBreak())

    e.append(title2('Site Map'))

    map = Image(MAP_FILE, 17.5 * cm, 24.5 * cm)
    e.append(map)

    return e

def gen_pdf(filename):
    doc = SimpleDocTemplate(filename, pagesize=A4,
                            topMargin=3.25 * cm, bottomMargin=0)

    e = gen_story(doc)

    # write the document to disk
    doc.build(e, onFirstPage=pageTemplate(),
              onLaterPages=pageTemplate())

if __name__ == '__main__':
    args = docopt(__doc__, version='1.0')

    level = logging.DEBUG if args['--debug'] else logging.INFO
    logging.basicConfig(level=level)
    log.debug("Debug On\n")

    out_dir = args['DIR']

    gen_pdf("{}/info_pack.pdf".format(out_dir))


text:
from __future__ import absolute_import, division, print_function

from muninn.enum import Enum

class CascadeRule(Enum):
    _items = ("IGNORE", "CASCADE_PURGE_AS_STRIP", "CASCADE_PURGE", "STRIP", "CASCADE", "PURGE")


text:
package me.rhespanhol.rxtraktjava.entities;

public class ShareSettings {

    public Boolean facebook;
    public Boolean twitter;
    public Boolean tumblr;

}


text:
#import "NSString.h"

@interface NSString (CPStringAdditions_XmlString)
+ (id)stringWithXmlString:(const char *)arg1;
- (id)componentsSeparatedByWhitespace;
- (id)initFromXmlNode:(struct _xmlNode *)arg1 ns:(const char *)arg2 attributeName:(const char *)arg3;
- (id)initWithContentOfXmlNode:(struct _xmlNode *)arg1;
- (id)initWithValueOfXmlAttribute:(struct _xmlAttr *)arg1;
- (const char *)xmlString;
- (id)initWithXmlString:(const char *)arg1;
@end


text:
package platform

import (
   "time"
   "net/http"
   "reflect"
   "strconv"
   "server/db"
   "server/util"
   "server/model"
   "appengine"
   "appengine/datastore"
)

const limit_query_posts int = 25
const limit_query_comments int = 25

func GetDependencies(r *http.Request) (db.Database, util.Logger) {
   c := appengine.NewContext(r)
   return &gapDatabase{c}, c
}

type gapDatabase struct {
   c appengine.Context
}

func (g *gapDatabase) getKeyString(key *datastore.Key) string {
   if tmp := key.IntID(); tmp != 0 {
      return strconv.FormatInt(tmp, 10)
   } else {
      return key.StringID()
   }
}

func (g* gapDatabase) handleError(err error, msg string) {
   if err != nil {
      g.c.Errorf("%s\n%s\n", msg, err.Error())
   }
}

func (g *gapDatabase) setModelIds(models interface{}, keys []*datastore.Key)  {
   arr := reflect.ValueOf(models)
   for i, key := range keys {
      arr.Index(i).FieldByName("Id").SetString(g.getKeyString(key))
   }
}

// Loads all posts from the database sorted by date (newest first)
func (g *gapDatabase) GetPosts() (res []model.Post) {
   q := datastore.NewQuery("Post").Order("-Timestamp").Limit(limit_query_posts)
   res = make([]model.Post, limit_query_posts)
   keys, err := q.GetAll(g.c, &res)
   g.handleError(err, "GetPosts returned an error.")
   g.setModelIds(res, keys)
   return res[:len(keys)]
}

// Loads all comments for a post sorted by date (newest first)
func (g *gapDatabase) GetComments(postId string) (res []model.Comment) {
   q := datastore.NewQuery("Comment").Ancestor(g.getPostId(postId)).Order("-Timestamp").Limit(limit_query_comments)
   res = make([]model.Comment, limit_query_comments)
   keys, err := q.GetAll(g.c, &res)
   g.handleError(err, "GetPosts returned an error.")
   g.setModelIds(res, keys)
   return res[:len(keys)]
}

// Loads a post by ID. Returns nil if it doesn't exist.
func (g *gapDatabase) GetPost(id string) *model.Post {
   var num int64
   var kerr error
   var key *datastore.Key
   num, kerr = strconv.ParseInt(id, 10, 64)

   if kerr == nil {
      key = datastore.NewKey(g.c, "Post", "", num, nil)
   } else {
      key = datastore.NewKey(g.c, "Post", id, 0, nil)
   }

   post := &model.Post{}
   if err := datastore.Get(g.c, key, post); err != nil {
      g.c.Errorf("Error loading posts with ID '%s'\n%s\n", id, err.Error())
      return nil
   }
   return post
}

func (g *gapDatabase) getPostId(id string) *datastore.Key {
   var num int64
   var kerr error
   var key *datastore.Key
   num, kerr = strconv.ParseInt(id, 10, 64)
   if kerr == nil {
      key = datastore.NewKey(g.c, "Post", "", num, nil)
   } else {
      key = datastore.NewKey(g.c, "Post", id, 0, nil)
   }
   return key
}

// Loads a comment by ID. Returns nil if it doesn't exist.
func (g *gapDatabase) GetComment(id string) *model.Comment {
   return nil
}

// Creates a post in the database. The newly created post will have a valid
// ID and zero values for any properties omitted. If the argument is nil,
// then a new post is created with a valid ID and zero values for all
// properties.
func (g *gapDatabase) CreatePost(v *model.Post) *model.Post {
   if v == nil {
      v = &model.Post{}
   }
   v.LastModified = time.Now()
   if v.Timestamp.IsZero() {
      v.Timestamp = v.LastModified
   }
   key, err := datastore.Put(g.c, datastore.NewIncompleteKey(g.c, "Post", nil), v)
   if err != nil {
      g.c.Errorf("Error creating a post\n%s\n", err.Error())
      return nil
   }
   v.Id = g.getKeyString(key)
   return v
}

// Creates an empty comment in the database. The argument specifies what post
// is associated with the comment that is created and it must not be nil.
// The comment returned will have a valid ID and zero values for any
// properties omitted in comment argument. if the comment is nil, then a new
// post is created with a valid ID and zero values for all properties.
func (g *gapDatabase) CreateComment(p string, c *model.Comment) *model.Comment {
   return nil
}

// Saves a post to the database. This is the same as deleting the post,
// and creating a new post from parameter. Note the the post should have a
// valid ID.
func (g *gapDatabase) SavePost(v *model.Post) {

}

// Saves a comment to the database and behaves like SavePost. Note the the
//comment should have a valid ID.
func (g *gapDatabase) SaveComment(v *model.Comment) {

}

// Deletes a post permanently. This also deletes its comments.
func (g *gapDatabase) DeletePost(v *model.Post) {

}

// Deletes a comment permanently.
func (g *gapDatabase) DeleteComment(v *model.Comment) {

}


text:
require 'rubygems'
require 'bundler'
Bundler::GemHelper.install_tasks

require 'rake/clean'
CLEAN << FileList["pkg", "coverage"]

require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)

RSpec::Core::RakeTask.new(:rcov) do |t|
  t.rcov = true
end

task :default => :spec

require 'rdoc/task'
Rake::RDocTask.new do |rdoc|
  rdoc.rdoc_dir = 'rdoc'
  rdoc.title = "Watirmark::BVT #{Watirmark::BVT::VERSION::STRING}"
  rdoc.rdoc_files.include('README*')
  rdoc.rdoc_files.include('lib/**/*.rb')
end

desc "deploy the gem to the gem server; must be run on on gem server"
task :deploy => [:clean, :install] do
  gemserver=ENV['GEM_SERVER']
  ssh_options='-o User=root -o IdentityFile=~/.ssh/0-default.private -o StrictHostKeyChecking=no -o CheckHostIP=no -o UserKnownHostsFile=/dev/null'
  temp_dir=`ssh #{ssh_options} #{gemserver} 'mktemp -d'`.strip
  system("scp #{ssh_options} pkg/*.gem '#{gemserver}:#{temp_dir}'")
  system("ssh #{ssh_options} #{gemserver} 'gem install --local --no-ri #{temp_dir}/*.gem --ignore-dependencies'")
  system("ssh #{ssh_options} #{gemserver} 'rm -rf #{temp_dir}'")
end


text:
package org.apache.storm.trident.planner.processor;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.apache.storm.task.TopologyContext;
import org.apache.storm.trident.operation.TridentOperationContext;
import org.apache.storm.trident.planner.ProcessorContext;
import org.apache.storm.trident.planner.TridentProcessor;
import org.apache.storm.trident.state.State;
import org.apache.storm.trident.state.StateUpdater;
import org.apache.storm.trident.topology.TransactionAttempt;
import org.apache.storm.trident.tuple.TridentTuple;
import org.apache.storm.trident.tuple.TridentTuple.Factory;
import org.apache.storm.trident.tuple.TridentTupleView.ProjectionFactory;
import org.apache.storm.tuple.Fields;

public class PartitionPersistProcessor implements TridentProcessor {
    StateUpdater updater;
    State state;
    String stateId;
    TridentContext context;
    Fields inputFields;
    ProjectionFactory projection;
    FreshCollector collector;

    public PartitionPersistProcessor(String stateId, Fields inputFields, StateUpdater updater) {
        this.updater = updater;
        this.stateId = stateId;
        this.inputFields = inputFields;
    }

    @Override
    public void prepare(Map<String, Object> conf, TopologyContext context, TridentContext tridentContext) {
        List<Factory> parents = tridentContext.getParentTupleFactories();
        if (parents.size() != 1) {
            throw new RuntimeException("Partition persist operation can only have one parent");
        }
        this.context = tridentContext;
        state = (State) context.getTaskData(stateId);
        projection = new ProjectionFactory(parents.get(0), inputFields);
        collector = new FreshCollector(tridentContext);
        updater.prepare(conf, new TridentOperationContext(context, projection));
    }

    @Override
    public void cleanup() {
        updater.cleanup();
    }

    @Override
    public void startBatch(ProcessorContext processorContext) {
        processorContext.state[context.getStateIndex()] = new ArrayList<TridentTuple>();
    }

    @Override
    public void execute(ProcessorContext processorContext, String streamId, TridentTuple tuple) {
        ((List) processorContext.state[context.getStateIndex()]).add(projection.create(tuple));
    }

    @Override
    public void flush() {
        // NO-OP
    }

    @Override
    public void finishBatch(ProcessorContext processorContext) {
        collector.setContext(processorContext);
        Object batchId = processorContext.batchId;
        // since this processor type is a committer, this occurs in the commit phase
        List<TridentTuple> buffer = (List) processorContext.state[context.getStateIndex()];

        // don't update unless there are tuples
        // this helps out with things like global partition persist, where multiple tasks may still
        // exist for this processor. Only want the global one to do anything
        // this is also a helpful optimization that state implementations don't need to manually do
        if (buffer.size() > 0) {
            Long txid = null;
            // this is to support things like persisting off of drpc stream, which is inherently unreliable
            // and won't have a tx attempt
            if (batchId instanceof TransactionAttempt) {
                txid = ((TransactionAttempt) batchId).getTransactionId();
            }
            state.beginCommit(txid);
            updater.updateState(state, buffer, collector);
            state.commit(txid);
        }
    }

    @Override
    public Factory getOutputFactory() {
        return collector.getOutputFactory();
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Lucene.Net.Search;
using Lucene.Net.Index;
using Lucene.Net.Util;

namespace Lucene.Net.Analysis
{

    ///
    ///*

    /// * Allows multiple {@link Filter}s to be chained.
    /// * Logical operations such as NOT and XOR
    /// * are applied between filters. One operation can be used
    /// * for all filters, or a specific operation can be declared
    /// * for each filter.
    /// *

    /// *

    /// * Order in which filters are called depends on
    /// * the position of the filter in the chain. It's probably
    /// * more efficient to place the most restrictive filters
    /// * /least computationally-intensive filters first.
    /// *

    ///
    public class ChainedFilter : Filter
    {
        public enum Logic
        {
            NONE = -1,
            OR = 0,
            AND = 1,
            ANDNOT = 2,
            XOR = 3
        };

        ///Logical operation when none is declared. Defaults to OR
        public const Logic DEFAULT = Logic.OR;

        /** The filter chain */
        private Filter[] chain = null;

        private Logic[] logicArray;

        private Logic logic = Logic.NONE;

        ///Ctor<param name="chain">The chain of filters</param>
        public ChainedFilter(Filter[] chain)
        {
            this.chain = chain;
        }

        ///ctor
        ///<param name="chain">The chain of filters</param>
        ///<param name="logicArray">Logical operations to apply between filters</param>
        public ChainedFilter(Filter[] chain, Logic[] logicArray)
        {
            this.chain = chain;
            this.logicArray = logicArray;
        }

        ///ctor
        ///<param name="chain">The chain of filters</param>
        ///<param name="logic">Logical operation to apply to ALL filters</param>
        public ChainedFilter(Filter[] chain, Logic logic)
        {
            this.chain = chain;
            this.logic = logic;
        }

        ///<see cref="Filter#getDocIdSet"/>
        public override DocIdSet GetDocIdSet(IndexReader reader)
        {
            int[] index = new int[1]; // use array as reference to modifiable int;
            index[0] = 0;             // an object attribute would not be thread safe.
            if (logic != Logic.NONE)
                return GetDocIdSet(reader, logic, index);
            else if (logicArray != null)
                return GetDocIdSet(reader, logicArray, index);
            else
                return GetDocIdSet(reader, DEFAULT, index);
        }

        private DocIdSetIterator GetDISI(Filter filter, IndexReader reader)
        {
            DocIdSet docIdSet = filter.GetDocIdSet(reader);
            if (docIdSet == null)
            {
                return DocIdSet.EMPTY_DOCIDSET.Iterator();
            }
            else
            {
                DocIdSetIterator iter = docIdSet.Iterator();
                if (iter == null)
                {
                    return DocIdSet.EMPTY_DOCIDSET.Iterator();
                }
                else
                {
                    return iter;
                }
            }
        }

        private OpenBitSetDISI InitialResult(IndexReader reader, Logic logic, int[] index)
        {
            OpenBitSetDISI result;
            /**
             * First AND operation takes place against a completely false
             * bitset and will always return zero results.
             */
            if (logic == Logic.AND)
            {
                result = new OpenBitSetDISI(GetDISI(chain[index[0]], reader), reader.MaxDoc());
                ++index[0];
            }
            else if (logic == Logic.ANDNOT)
            {
                result = new OpenBitSetDISI(GetDISI(chain[index[0]], reader), reader.MaxDoc());
                result.Flip(0, reader.MaxDoc()); // NOTE: may set bits for deleted docs.
                ++index[0];
            }
            else
            {
                result = new OpenBitSetDISI(reader.MaxDoc());
            }
            return result;
        }

        ///
        ///  * Provide a SortedVIntList when it is definitely
        ///  * smaller than an OpenBitSet
        ///  * @deprecated Either use CachingWrapperFilter, or
        ///  * switch to a different DocIdSet implementation yourself.
        ///  * This method will be removed in Lucene 4.0
        ///
        protected DocIdSet FinalResult(OpenBitSetDISI result, int maxDocs)
        {
            return result;
        }

        /**
         * Delegates to each filter in the chain.
         * @param reader IndexReader
         * @param logic Logical operation
         * @return DocIdSet
         */
        private DocIdSet GetDocIdSet(IndexReader reader, Logic logic, int[] index)
        {
            OpenBitSetDISI result = InitialResult(reader, logic, index);
            for (; index[0] < chain.Length; index[0]++)
            {
                DoChain(result, logic, chain[index[0]].GetDocIdSet(reader));
            }
            return FinalResult(result, reader.MaxDoc());
        }

        /**
         * Delegates to each filter in the chain.
         * @param reader IndexReader
         * @param logic Logical operation
         * @return DocIdSet
         */
        private DocIdSet GetDocIdSet(IndexReader reader, Logic[] logic, int[] index)
        {
            if (logic.Length != chain.Length)
                throw new ArgumentException("Invalid number of elements in logic array");

            OpenBitSetDISI result = InitialResult(reader, logic[0], index);
            for (; index[0] < chain.Length; index[0]++)
            {
                DoChain(result, logic[index[0]], chain[index[0]].GetDocIdSet(reader));
            }
            return FinalResult(result, reader.MaxDoc());
        }

        public override String ToString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("ChainedFilter: [");
            for (int i = 0; i < chain.Length; i++)
            {
                sb.Append(chain[i]);
                sb.Append(' ');
            }
            sb.Append(']');
            return sb.ToString();
        }

        private void DoChain(OpenBitSetDISI result, Logic logic, DocIdSet dis)
        {

            if (dis is OpenBitSet)
            {
                // optimized case for OpenBitSets
                switch (logic)
                {
                    case Logic.OR:
                        result.Or((OpenBitSet)dis);
                        break;
                    case Logic.AND:
                        result.And((OpenBitSet)dis);
                        break;
                    case Logic.ANDNOT:
                        result.AndNot((OpenBitSet)dis);
                        break;
                    case Logic.XOR:
                        result.Xor((OpenBitSet)dis);
                        break;
                    default:
                        DoChain(result, DEFAULT, dis);
                        break;
                }
            }
            else
            {
                DocIdSetIterator disi;
                if (dis == null)
                {
                    disi = DocIdSet.EMPTY_DOCIDSET.Iterator();
                }
                else
                {
                    disi = dis.Iterator();
                    if (disi == null)
                    {
                        disi = DocIdSet.EMPTY_DOCIDSET.Iterator();
                    }
                }

                switch (logic)
                {
                    case Logic.OR:
                        result.InPlaceOr(disi);
                        break;
                    case Logic.AND:
                        result.InPlaceAnd(disi);
                        break;
                    case Logic.ANDNOT:
                        result.InPlaceNot(disi);
                        break;
                    case Logic.XOR:
                        result.InPlaceXor(disi);
                        break;
                    default:
                        DoChain(result, DEFAULT, dis);
                        break;
                }
            }
        }

    }

}


text:
require 'pry'
require_relative 'prison'
require_relative 'address'
require_relative 'load_data'
require_relative 'matcher'

codes = LoadData.laa_codes ; nil
prisons = LoadData.prison_finder_prisons ; nil
former_prisons = LoadData.former_prisons ; nil
jointly_managed_prison_second_location = LoadData.jointly_managed_prison_second_location ; nil
addresses = LoadData.addresses ; nil

puts %w[prison address].join("\t")
prisons.each do |prison|
  name = prison.name
  address = Matcher.address_uprn(name, prison, addresses)
  all_addresses = Matcher.all_addresses(prison, prisons, addresses, jointly_managed_prison_second_location)
  code = Matcher.match_code(name, codes)
  puts [
    code,
    address,
    # all_addresses
  ].join("\t") if address
end
former_prisons.each do |prison|
  address = Matcher.address_uprn(prison.name, prison, addresses)
  code = prison.prison
  puts [
    code,
    address
  ].join("\t") if address
end


text:
#ifndef QINPUTDIALOG_H
#define QINPUTDIALOG_H

#include <QtWidgets/qtwidgetsglobal.h>
#include <QtWidgets/qdialog.h>
#include <QtCore/qstring.h>
#include <QtWidgets/qlineedit.h>

QT_BEGIN_NAMESPACE

#ifndef QT_NO_INPUTDIALOG

class QInputDialogPrivate;

class Q_WIDGETS_EXPORT QInputDialog : public QDialog
{
    Q_OBJECT
    Q_DECLARE_PRIVATE(QInputDialog)
//  Q_ENUMS(InputMode InputDialogOption)
    QDOC_PROPERTY(InputMode inputMode READ inputMode WRITE setInputMode)
    QDOC_PROPERTY(QString labelText READ labelText WRITE setLabelText)
    QDOC_PROPERTY(InputDialogOptions options READ options WRITE setOptions)
    QDOC_PROPERTY(QString textValue READ textValue WRITE setTextValue NOTIFY textValueChanged)
    QDOC_PROPERTY(int intValue READ intValue WRITE setIntValue NOTIFY intValueChanged)
    QDOC_PROPERTY(int doubleValue READ doubleValue WRITE setDoubleValue NOTIFY doubleValueChanged)
    QDOC_PROPERTY(QLineEdit::EchoMode textEchoMode READ textEchoMode WRITE setTextEchoMode)
    QDOC_PROPERTY(bool comboBoxEditable READ isComboBoxEditable WRITE setComboBoxEditable)
    QDOC_PROPERTY(QStringList comboBoxItems READ comboBoxItems WRITE setComboBoxItems)
    QDOC_PROPERTY(int intMinimum READ intMinimum WRITE setIntMinimum)
    QDOC_PROPERTY(int intMaximum READ intMaximum WRITE setIntMaximum)
    QDOC_PROPERTY(int intStep READ intStep WRITE setIntStep)
    QDOC_PROPERTY(double doubleMinimum READ doubleMinimum WRITE setDoubleMinimum)
    QDOC_PROPERTY(double doubleMaximum READ doubleMaximum WRITE setDoubleMaximum)
    QDOC_PROPERTY(int doubleDecimals READ doubleDecimals WRITE setDoubleDecimals)
    QDOC_PROPERTY(QString okButtonText READ okButtonText WRITE setOkButtonText)
    QDOC_PROPERTY(QString cancelButtonText READ cancelButtonText WRITE setCancelButtonText)

public:
    enum InputDialogOption {
        NoButtons                    = 0x00000001,
        UseListViewForComboBoxItems  = 0x00000002,
        UsePlainTextEditForTextInput = 0x00000004
    };

    Q_DECLARE_FLAGS(InputDialogOptions, InputDialogOption)

    enum InputMode {
        TextInput,
        IntInput,
        DoubleInput
    };

    QInputDialog(QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
    ~QInputDialog();

    void setInputMode(InputMode mode);
    InputMode inputMode() const;

    void setLabelText(const QString &text);
    QString labelText() const;

    void setOption(InputDialogOption option, bool on = true);
    bool testOption(InputDialogOption option) const;
    void setOptions(InputDialogOptions options);
    InputDialogOptions options() const;

    void setTextValue(const QString &text);
    QString textValue() const;

    void setTextEchoMode(QLineEdit::EchoMode mode);
    QLineEdit::EchoMode textEchoMode() const;

    void setComboBoxEditable(bool editable);
    bool isComboBoxEditable() const;

    void setComboBoxItems(const QStringList &items);
    QStringList comboBoxItems() const;

    void setIntValue(int value);
    int intValue() const;

    void setIntMinimum(int min);
    int intMinimum() const;

    void setIntMaximum(int max);
    int intMaximum() const;

    void setIntRange(int min, int max);

    void setIntStep(int step);
    int intStep() const;

    void setDoubleValue(double value);
    double doubleValue() const;

    void setDoubleMinimum(double min);
    double doubleMinimum() const;

    void setDoubleMaximum(double max);
    double doubleMaximum() const;

    void setDoubleRange(double min, double max);

    void setDoubleDecimals(int decimals);
    int doubleDecimals() const;

    void setOkButtonText(const QString &text);
    QString okButtonText() const;

    void setCancelButtonText(const QString &text);
    QString cancelButtonText() const;

    using QDialog::open;
    void open(QObject *receiver, const char *member);

    QSize minimumSizeHint() const Q_DECL_OVERRIDE;
    QSize sizeHint() const Q_DECL_OVERRIDE;

    void setVisible(bool visible) Q_DECL_OVERRIDE;

    static QString getText(QWidget *parent, const QString &title, const QString &label,
                           QLineEdit::EchoMode echo = QLineEdit::Normal,
                           const QString &text = QString(), bool *ok = Q_NULLPTR,
                           Qt::WindowFlags flags = Qt::WindowFlags(),
                           Qt::InputMethodHints inputMethodHints = Qt::ImhNone);
    static QString getMultiLineText(QWidget *parent, const QString &title, const QString &label,
                                    const QString &text = QString(), bool *ok = Q_NULLPTR,
                                    Qt::WindowFlags flags = Qt::WindowFlags(),
                                    Qt::InputMethodHints inputMethodHints = Qt::ImhNone);
    static QString getItem(QWidget *parent, const QString &title, const QString &label,
                           const QStringList &items, int current = 0, bool editable = true,
                           bool *ok = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags(),
                           Qt::InputMethodHints inputMethodHints = Qt::ImhNone);

    static int getInt(QWidget *parent, const QString &title, const QString &label, int value = 0,
                      int minValue = -2147483647, int maxValue = 2147483647,
                      int step = 1, bool *ok = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
    static double getDouble(QWidget *parent, const QString &title, const QString &label, double value = 0,
                            double minValue = -2147483647, double maxValue = 2147483647,
                            int decimals = 1, bool *ok = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());

#if QT_DEPRECATED_SINCE(5, 0)
    QT_DEPRECATED static inline int getInteger(QWidget *parent, const QString &title, const QString &label, int value = 0,
                          int minValue = -2147483647, int maxValue = 2147483647,
                          int step = 1, bool *ok = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags())
    {
        return getInt(parent, title, label, value, minValue, maxValue, step, ok, flags);
    }
#endif

Q_SIGNALS:
    // ### emit signals!
    void textValueChanged(const QString &text);
    void textValueSelected(const QString &text);
    void intValueChanged(int value);
    void intValueSelected(int value);
    void doubleValueChanged(double value);
    void doubleValueSelected(double value);

public:
    void done(int result) Q_DECL_OVERRIDE;

private:
    Q_DISABLE_COPY(QInputDialog)
    Q_PRIVATE_SLOT(d_func(), void _q_textChanged(const QString&))
    Q_PRIVATE_SLOT(d_func(), void _q_plainTextEditTextChanged())
    Q_PRIVATE_SLOT(d_func(), void _q_currentRowChanged(const QModelIndex&, const QModelIndex&))
};

Q_DECLARE_OPERATORS_FOR_FLAGS(QInputDialog::InputDialogOptions)

#endif // QT_NO_INPUTDIALOG

QT_END_NAMESPACE

#endif // QINPUTDIALOG_H


text:
Nonrel Search, A port of gae-search using django-nonrel
=======================================================

*Full text search with a non-relational database backend.*

Contributing
------------
You are highly encouraged to participate in the development, simply use
GitHub's fork/pull request system.
If you don't like GitHub (for some reason) you're welcome
to send regular patches to the mailing list.

:Mailing list: http://groups.google.com/group/django-non-relational
:Bug tracker: https://github.com/django-nonrel/nonrel-search/issues
:License: 2-clause BSD
:Keywords: django, search, nosql, database, python


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference
// Implementation, v2.2.4-2
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.07.05 at 09:07:58 PM CEST
//

package org.opentosca.bus.management.service.impl.collaboration.model;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

/**
 *

 * The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="CollaborationMessage">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="HeaderMap" type="{http://collaboration.org/schema}KeyValueMap"/>
 *         <element name="Body" type="{http://collaboration.org/schema}BodyType" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CollaborationMessage", propOrder = {"headerMap", "body"})
public class CollaborationMessage {

    @XmlElement(name = "HeaderMap", required = true)
    protected KeyValueMap headerMap;
    @XmlElement(name = "Body")
    protected BodyType body;

    public CollaborationMessage() {
    }

    public CollaborationMessage(final KeyValueMap headerMap, final BodyType body) {
        this.headerMap = headerMap;
        this.body = body;
    }

    /**
     * Gets the value of the headerMap property.
     *
     * @return possible object is {@link KeyValueMap }
     */
    public KeyValueMap getHeaderMap() {
        return this.headerMap;
    }

    /**
     * Sets the value of the headerMap property.
     *
     * @param value allowed object is {@link KeyValueMap }
     */
    public void setHeaderMap(final KeyValueMap value) {
        this.headerMap = value;
    }

    /**
     * Gets the value of the body property.
     *
     * @return possible object is {@link BodyType }
     */
    public BodyType getBody() {
        return this.body;
    }

    /**
     * Sets the value of the body property.
     *
     * @param value allowed object is {@link BodyType }
     */
    public void setBody(final BodyType value) {
        this.body = value;
    }
}


text:
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

import json
import re

from ansible.errors import AnsibleConnectionFailure
from ansible.module_utils._text import to_text, to_bytes
from ansible.plugins.terminal import TerminalBase
from ansible.utils.display import Display

display = Display()

class TerminalModule(TerminalBase):

    terminal_stdout_re = [
        re.compile(br"[\r\n]?[\w\+\-\.:\/\[\]]+(?:\([^\)]+\)){0,3}(?:[>#]) ?$")
    ]

    terminal_stderr_re = [
        re.compile(br"% ?Error"),
        # re.compile(br"^% \w+", re.M),
        re.compile(br"% ?Bad secret"),
        re.compile(br"[\r\n%] Bad passwords"),
        re.compile(br"invalid input", re.I),
        re.compile(br"(?:incomplete|ambiguous) command", re.I),
        re.compile(br"connection timed out", re.I),
        re.compile(br"[^\r\n]+ not found"),
        re.compile(br"'[^']' +returned error code: ?\d+"),
        re.compile(br"Bad mask", re.I),
        re.compile(br"% ?(\S+) ?overlaps with ?(\S+)", re.I),
        re.compile(br"[%\S] ?Error: ?[\s]+", re.I),
        re.compile(br"[%\S] ?Informational: ?[\s]+", re.I),
        re.compile(br"Command authorization failed")
    ]

    def on_open_shell(self):
        try:
            self._exec_cli_command(b'terminal length 0')
        except AnsibleConnectionFailure:
            raise AnsibleConnectionFailure('unable to set terminal parameters')

        try:
            self._exec_cli_command(b'terminal width 512')
            try:
                self._exec_cli_command(b'terminal width 0')
            except AnsibleConnectionFailure:
                pass
        except AnsibleConnectionFailure:
            display.display('WARNING: Unable to set terminal width, command responses may be truncated')

    def on_become(self, passwd=None):
        if self._get_prompt().endswith(b'#'):
            return

        cmd = {u'command': u'enable'}
        if passwd:
            # Note: python-3.5 cannot combine u"" and r"" together.  Thus make
            # an r string and use to_text to ensure it's text on both py2 and py3.
            cmd[u'prompt'] = to_text(r"[\r\n]?(?:Local[_| ])?[Pp]assword: ?$", errors='surrogate_or_strict')
            cmd[u'answer'] = passwd
            cmd[u'prompt_retry_check'] = True
        try:
            self._exec_cli_command(to_bytes(json.dumps(cmd), errors='surrogate_or_strict'))
            prompt = self._get_prompt()
            if prompt is None or not prompt.endswith(b'#'):
                raise AnsibleConnectionFailure('failed to elevate privilege to enable mode still at prompt [%s]' % prompt)
        except AnsibleConnectionFailure as e:
            prompt = self._get_prompt()
            raise AnsibleConnectionFailure('unable to elevate privilege to enable mode, at prompt [%s] with error: %s' % (prompt, e.message))

    def on_unbecome(self):
        prompt = self._get_prompt()
        if prompt is None:
            # if prompt is None most likely the terminal is hung up at a prompt
            return

        if b'(config' in prompt:
            self._exec_cli_command(b'end')
            self._exec_cli_command(b'disable')

        elif prompt.endswith(b'#'):
            self._exec_cli_command(b'disable')


text:
(function() {
  var module = QUnit.module;

  module("Audio");

  //Set up some test fixtures
  function MockAudio() {
    var self = this;
    this.endedListeners = [];
    this.canPlayType = function() {
      return true;
    };
    this.addEventListener = function(event, listener) {
      switch (event) {
        case "ended":
          this.endedListeners.push(listener);
          break;
        default:
          throw("Not implemented");
      }
    };
    this.removeEventListener = function(event, listener) {
      switch (event) {
        case "ended":
          var ind = this.endedListeners.indexOf(listener);
          if (ind) this.endedListeners.splice(ind, 1);
          break;
        default:
          throw("Not implemented");
      }
    };

    function fireEnded() {
      setTimeout(function() {
        self.ended = true;
        self.endedListeners.forEach(function(f) {
          f.call(self);
        });
      }, 0);
    }
    this.play = function() {
      if (this.src) {
        fireEnded();
      }
    };
    this.pause = function() {};
    this.ended = false;
  }

  function ChromeBuggedAudio() {
    var self = this;
    this.canPlayType = function() {
      return true;
    };
    this.addEventListener = function(event, listener) {};
    this.removeEventListener = function(event, listener) {};
    this.play = function() {
      if (this.src) {
        self.ended = true;
        self.src = null;
        ok(true, "Audio played");
      }
    };
    this.pause = function() {};
    this.ended = false;
  }

  asyncTest("setChannels", function() {
    // Test that setChannels doesn't break sound
    expect(2);
    window.Audio = MockAudio;
    Crafty.support.audio = true;
    Crafty.audio.setChannels(5);
    Crafty.audio.add("mockSound", ["sound.ogg"]);
    var a = Crafty.audio.play("mockSound", 1);
    ok(typeof a === "object", "Type of a is object: " + a);
    a.addEventListener("ended", function() {
      ok(true, "Sound played");
      delete window.Audio; //reset Audio to platform default
      Crafty.audio.channels = [];
      start();
    });
  });

  test("chromeBug", function() {
    // Test that we don't exhaust our audio channels if Chrome bug 280417
    // eats our "ended" events
    expect(10);
    window.Audio = ChromeBuggedAudio;
    Crafty.support.audio = true;
    Crafty.audio.setChannels(1);
    Crafty.support.audio = true;
    Crafty.audio.add("mockSound", ["sound.ogg"]);

    var a;
    for (var i = 0; i < 10; i++) {
      a = Crafty.audio.play("mockSound", 1); // This will trigger an assertion
    }
    delete window.Audio; //reset Audio to platform default
    Crafty.audio.channels = [];
  });
})();


text:
package org.lwjgl.openvr;

import org.lwjgl.system.*;

import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.JNI.*;

public class VROverlayView {

    protected VROverlayView() {
        throw new UnsupportedOperationException();
    }

    // --- [ VROverlayView_AcquireOverlayView ] ---

    /** Unsafe version of: {@link #VROverlayView_AcquireOverlayView AcquireOverlayView} */
    public static int nVROverlayView_AcquireOverlayView(long ulOverlayHandle, long pNativeDevice, long pOverlayView, int unOverlayViewSize) {
        long __functionAddress = OpenVR.VROverlayView.AcquireOverlayView;
        if (CHECKS) {
            check(__functionAddress);
        }
        return callJPPI(ulOverlayHandle, pNativeDevice, pOverlayView, unOverlayViewSize, __functionAddress);
    }

    /**
     * Acquires an {@code OverlayView_t} from an overlay handle
     *
     *
The overlay view can be used to sample the contents directly by a native API. The contents of the {@code OverlayView_t} will remain unchanged through
     * the lifetime of the {@code OverlayView_t}.

     *
     *
The caller acquires read privileges over the {@code OverlayView_t}, but should not write to it.

     *
     *
{@code AcquireOverlayView()} may be called on the same {@code ulOverlayHandle} multiple times to refresh the image contents. In this case the caller is
     * strongly encouraged to re-use the same {@code pOverlayView} for all re-acquisition calls.

     *
     *
If the producer has not yet queued an image, {@code AcquireOverlayView} will return success, and the {@code Texture_t} will have the expected
     * {@code ETextureType}. However, the {@code Texture_t->handle} will be {@code nullptr}. Once the producer generates the first overlay frame,
     * {@code Texture_t->handle} will become a valid handle.

     */
    @NativeType("EVROverlayError")
    public static int VROverlayView_AcquireOverlayView(@NativeType("VROverlayHandle_t") long ulOverlayHandle, @NativeType("VRNativeDevice_t *") VRNativeDevice pNativeDevice, @NativeType("VROverlayView_t *") VROverlayView_t pOverlayView, @NativeType("uint32_t") int unOverlayViewSize) {
        return nVROverlayView_AcquireOverlayView(ulOverlayHandle, pNativeDevice.address(), pOverlayView.address(), unOverlayViewSize);
    }

    // --- [ VROverlayView_ReleaseOverlayView ] ---

    /** Unsafe version of: {@link #VROverlayView_ReleaseOverlayView ReleaseOverlayView} */
    public static int nVROverlayView_ReleaseOverlayView(long pOverlayView) {
        long __functionAddress = OpenVR.VROverlayView.ReleaseOverlayView;
        if (CHECKS) {
            check(__functionAddress);
        }
        return callPI(pOverlayView, __functionAddress);
    }

    /**
     * Releases an acquired {@code OverlayView_t}.
     *
     *
Denotes that {@code pOverlayView} will no longer require access to the resources it acquired in all previous calls to {@code AcquireOverlayView()}.

     *
     *
All {@code OverlayView_t*}'s provided to {@code AcquireOverlayView()} as {@code pOverlayViews} must be passed into {@code ReleaseOverlayView()} in
     * order for the underlying GPU resources to be freed.

     */
    @NativeType("EVROverlayError")
    public static int VROverlayView_ReleaseOverlayView(@NativeType("VROverlayView_t *") VROverlayView_t pOverlayView) {
        return nVROverlayView_ReleaseOverlayView(pOverlayView.address());
    }

    // --- [ VROverlayView_PostOverlayEvent ] ---

    /** Unsafe version of: {@link #VROverlayView_PostOverlayEvent PostOverlayEvent} */
    public static void nVROverlayView_PostOverlayEvent(long ulOverlayHandle, long pvrEvent) {
        long __functionAddress = OpenVR.VROverlayView.PostOverlayEvent;
        if (CHECKS) {
            check(__functionAddress);
        }
        callJPV(ulOverlayHandle, pvrEvent, __functionAddress);
    }

    /** Posts an overlay event. */
    public static void VROverlayView_PostOverlayEvent(@NativeType("VROverlayHandle_t") long ulOverlayHandle, @NativeType("VREvent_t *") VREvent pvrEvent) {
        nVROverlayView_PostOverlayEvent(ulOverlayHandle, pvrEvent.address());
    }

    // --- [ VROverlayView_IsViewingPermitted ] ---

    /** Determines whether this process is permitted to view an overlay's content. */
    @NativeType("bool")
    public static boolean VROverlayView_IsViewingPermitted(@NativeType("VROverlayHandle_t") long ulOverlayHandle) {
        long __functionAddress = OpenVR.VROverlayView.IsViewingPermitted;
        if (CHECKS) {
            check(__functionAddress);
        }
        return callJZ(ulOverlayHandle, __functionAddress);
    }

}


text:
package org.libelektra.exception.model;

import org.junit.Test;
import org.libelektra.Key;
import org.libelektra.exception.InstallationException;

import static org.junit.Assert.assertEquals;

public class WarningEntryTest {

    @Test
    public void warningEntry_shouldBePardsedCorrectly() {
        String errorNumber = InstallationException.errorNumber();
        String configFile = "file.conf";
        String mountpoint = "system/test";
        String file = "kdb.c";
        String line = "50";
        String module = "kdb";
        String reason = "This is a testerror";

        final String warningKeyName = String.format("warnings/#00", 0);
        Key warningKey = Key.create("user/temporary/errorkey");
        warningKey.setMeta("warnings/#00/number", errorNumber);
        warningKey.setMeta("warnings/#00/configfile", configFile);
        warningKey.setMeta("warnings/#00/mountpoint", mountpoint);
        warningKey.setMeta("warnings/#00/file", file);
        warningKey.setMeta("warnings/#00/line", line);
        warningKey.setMeta("warnings/#00/module", module);
        warningKey.setMeta("warnings/#00/reason", reason);

        WarningEntry warningEntry = new WarningEntry(warningKey, 0);

        assertEquals(errorNumber, warningEntry.getWarningNumber());
        assertEquals(configFile, warningEntry.getConfigFile());
        assertEquals(mountpoint, warningEntry.getMountpoint());
        assertEquals(module, warningEntry.getModule());
        assertEquals(reason, warningEntry.getReason());

        String expectedDebugInformation = String.format("At: %s:%s", file, line);
        assertEquals(expectedDebugInformation, warningEntry.getDebugInformation());
    }

}


text:
package cn.com.warlock.wisp.core.test.plugin.injector.template;

import org.junit.Assert;
import org.junit.Test;

import cn.com.warlock.wisp.core.dto.MysqlEntry;
import cn.com.warlock.wisp.core.dto.MysqlEntryWrap;
import cn.com.warlock.wisp.core.exception.WispInjectorException;
import cn.com.warlock.wisp.core.plugin.injector.template.IInjectEventProcessCallback;
import cn.com.warlock.wisp.core.plugin.injector.template.IInjectEventProcessOperator;
import cn.com.warlock.wisp.core.plugin.injector.template.InjectorEventProcessTemplate;

public class InjectorEventProcessTemplateTestCase {

    @Test
    public void test() {

        IInjectEventProcessOperator injectEventProcessOperator = new InjectorEventProcessTemplate(
                new IInjectEventProcessCallback() {

                    @Override
                    public void
                    processMysqlEntry(
                            MysqlEntryWrap mysqlEntry)
                            throws
                            WispInjectorException {

                    }

                    @Override
                    public void shutdown() {

                    }
                });

        MysqlEntryWrap mysqlEntryWrap = new MysqlEntryWrap("topic", new MysqlEntry());

        try {

            injectEventProcessOperator.processEntry(mysqlEntryWrap);

            injectEventProcessOperator.shutdown();

        } catch (WispInjectorException e) {

            Assert.assertTrue(false);
        }
    }
}