text:
#ifndef _THRIFT_TRANSPORT_H
#define _THRIFT_TRANSPORT_H

#ifdef __cplusplus
extern "C" {
#endif

/**
 * Enumerated definitions of supported transports
 */
typedef enum {
  T_TRANSPORT_MEMORY_BUFFER = 1,
  T_TRANSPORT_FAKE = 2,
} ThriftTransportType;

/*!
 * Thrift Transport class
 */
struct _ThriftTransport
{
  ThriftTransportType ttype;
  /* vtable */
  int32_t (*read) (struct _ThriftTransport *transport, void *buf,
                   u_int32_t len, int *error);
  u_int8_t (*write) (struct _ThriftTransport *transport, const void *buf,
                     const u_int32_t len, int *error);
};
typedef struct _ThriftTransport ThriftTransport;

/* used by THRIFT_TYPE_TRANSPORT */
ThriftTransportType thrift_transport_get_type (void);

/* virtual public methods */

/*!
 * Read some data into the buffer buf.
 * \public \memberof ThriftTransportInterface
 */
static inline int32_t
thrift_transport_read (ThriftTransport *transport, void *buf,
                       u_int32_t len, int *error)
{
  return transport->read (transport, buf, len, error);
}

/*!
 * Writes data from a buffer to the transport.
 * \public \memberof ThriftTransportInterface
 */
static inline u_int8_t
thrift_transport_write (ThriftTransport *transport, const void *buf,
                        const u_int32_t len, int *error)
{
  return transport->write (transport, buf, len, error);
}

/* define error/exception types */
typedef enum
{
  THRIFT_TRANSPORT_ERROR_UNKNOWN,
  THRIFT_TRANSPORT_ERROR_HOST,
  THRIFT_TRANSPORT_ERROR_SOCKET,
  THRIFT_TRANSPORT_ERROR_CONNECT,
  THRIFT_TRANSPORT_ERROR_SEND,
  THRIFT_TRANSPORT_ERROR_RECEIVE,
  THRIFT_TRANSPORT_ERROR_CLOSE
} ThriftTransportError;

#ifdef __cplusplus
}
#endif

#endif /* _THRIFT_TRANSPORT_H */

redpajama_set_name: RedPajamaGithub


text:
<idea-plugin>
    <!--<application-components>
        <component>
            <interface-class>com.intellij.xdebugger.XDebugSession</interface-class>
        </component>
    </application-components> -->
</idea-plugin>


text:
subcategory: "Cloud (Stackdriver) Logging"
page_title: "Google: google_logging_organization_bucket_config"
description: |-
  Manages a organization-level logging bucket config.
---

# google\_logging\_organization\_bucket\_config

Manages a organization-level logging bucket config. For more information see
[the official logging documentation](https://cloud.google.com/logging/docs/) and
[Storing Logs](https://cloud.google.com/logging/docs/storage).

~> **Note:** Logging buckets are automatically created for a given folder, project, organization, billingAccount and cannot be deleted. Creating a resource of this type will acquire and update the resource that already exists at the desired location. These buckets cannot be removed so deleting this resource will remove the bucket config from your terraform state but will leave the logging bucket unchanged. The buckets that are currently automatically created are "_Default" and "_Required".

## Example Usage

```hcl
data "google_organization" "default" {
	organization = "123456789"
}

resource "google_logging_organization_bucket_config" "basic" {
	organization    = data.google_organization.default.organization
	location  = "global"
	retention_days = 30
	bucket_id = "_Default"
}
```

## Argument Reference

The following arguments are supported:

* `organization` - (Required) The parent resource that contains the logging bucket.

* `location` - (Required) The location of the bucket. The supported locations are: "global" "us-central1"

* `bucket_id` - (Required) The name of the logging bucket. Logging automatically creates two log buckets: `_Required` and `_Default`.

* `description` - (Optional) Describes this bucket.

* `retention_days` - (Optional) Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used. Bucket retention can not be increased on buckets outside of projects.

## Attributes Reference

In addition to the arguments listed above, the following computed attributes are
exported:

* `id` - an identifier for the resource with format `organizations/{{organization}}/locations/{{location}}/buckets/{{bucket_id}}`

* `name` -  The resource name of the bucket. For example: "organizations/my-organization-id/locations/my-location/buckets/my-bucket-id"

* `lifecycle_state` -  The bucket's lifecycle such as active or deleted. See [LifecycleState](https://cloud.google.com/logging/docs/reference/v2/rest/v2/billingAccounts.buckets#LogBucket.LifecycleState).

## Import

This resource can be imported using the following format:

```
$ terraform import google_logging_organization_bucket_config.default organizations/{{organization}}/locations/{{location}}/buckets/{{bucket_id}}
```


text:
from setuptools import setup

setup(
    name="bizdatim",
    version="0.2.0",
    description="Module for performing simple business day arithmetic; forked from python-bizdatetime",
    license="MIT",
    long_description=open("README.rst").read(),
    author="Sergiy Kuzmenko",
    author_email="sergiy@kuzmenko.org",
    maintainer="Polyconseil Dev Team",
    maintainer_email="opensource+bizdatim@polyconseil.fr",
    url="https://github.com/Polyconseil/bizdatim",
    py_modules=["bizdatim"],
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Topic :: Office/Business :: Scheduling',
        'Topic :: Software Development :: Libraries :: Python Modules',
    ],
)


text:
using System;
using System.IO;
using System.Linq;
using System.Reflection;
using Autofac;
using Microsoft.Extensions.DependencyInjection;

namespace IFramework.DependencyInjection.Autofac
{
    public static class ConfigurationExtension
    {
        public static Assembly[] GetAssemblies(Func<string, bool> assemblyNameExpression)
        {
            var assemblyFiles = Directory.GetFiles(AppDomain.CurrentDomain.BaseDirectory)
                                         .Select(f => new FileInfo(f))
                                         .ToArray();

            var assemblies = assemblyFiles.Where(f => f.Name.EndsWith(".dll")
                                                      && !f.Name.EndsWith(".PrecompiledViews.dll")
                                                      && !f.Name.EndsWith(".Views.dll"))
                                          .Where(f => assemblyNameExpression(f.Name))
                                          .Select(f => Assembly.Load(f.Name.Remove(f.Name.Length - 4)))
                                          .ToArray();

            var loadedAssemblies = AppDomain.CurrentDomain
                                            .GetAssemblies()
                                            .Where(assembly => !assembly.GetName().Name.EndsWith(".PrecompiledViews")
                                                               && !assembly.GetName().Name.EndsWith(".Views"))
                                            .Where(assembly => assemblyNameExpression(assembly.GetName().Name));

            return loadedAssemblies.Union(assemblies)
                                   .ToArray();
        }

        public static IServiceCollection AddAutofacContainer(this IServiceCollection services,
                                                             Func<string, bool> assemblyNameExpression)
        {
            return services.AddAutofacContainer(GetAssemblies(assemblyNameExpression));
        }

        public static IServiceCollection AddAutofacContainer(this IServiceCollection services)
        {
            return services.AddAutofacContainer((Assembly[]) null);
        }

        public static IServiceCollection AddAutofacContainer(this IServiceCollection services, ContainerBuilder builder, params Assembly[] assemblies)
        {
            if (assemblies?.Length > 0)
            {
                builder.RegisterAssemblyTypes(assemblies);
            }

            ObjectProviderFactory.Instance.SetProviderBuilder(new ObjectProviderBuilder(builder));
            return services;
        }

        public static IServiceCollection AddAutofacContainer(this IServiceCollection services,
                                                             params string[] assemblies)
        {
            return services.AddAutofacContainer(assemblies.Select(Assembly.Load).ToArray());
        }

        public static IServiceCollection AddAutofacContainer(this IServiceCollection services,
                                                             params Assembly[] assemblies)
        {
            var builder = new ContainerBuilder();
            if (assemblies?.Length > 0)
            {
                builder.RegisterAssemblyTypes(assemblies);
            }

            ObjectProviderFactory.Instance.SetProviderBuilder(new ObjectProviderBuilder(builder));
            return services;
        }
    }
}


text:
description("This tests that the input events are dispatched when contentEditable nodes are edited");

var actualInputEventCount = 0;
var expectedInputEventCount = 0;

function fired(evt, expectedId, expectedText)
{
    actualInputEventCount++;
    shouldBe("event.target.id", "'" + expectedId + "'");
    shouldBe("event.target.innerHTML", "'" + expectedText + "'");
}

var testDataRoot = document.createElement("div");
document.body.appendChild(testDataRoot);

function makeTestTarget(fragment)
{
    testDataRoot.innerHTML = fragment;
    return testDataRoot.firstChild;
}

function clearTestTarget()
{
    makeTestTarget("");
}

function setupForFiringTest(fragment, expectedText)
{
    var target = makeTestTarget(fragment);
    target.addEventListener("input", function(evt) { fired(evt, target.id, expectedText); });
    sel.selectAllChildren(target);
    expectedInputEventCount++;
    return target;
}

var sel = document.getSelection();

// A trivial case: inserting text should dispatch the event
var target0 = setupForFiringTest('
Text should be replace this
', "Text");
sel.selectAllChildren(target0);
document.execCommand("insertText", false, "Text");

// A direct DOM manipulation shouldn't dispatch the event
var target1 = makeTestTarget('
Text should be insert via script:
');
target1.addEventListener("input", function(evt) { testFailed("should not be reached"); });
target1.firstChild.data += "Text";

// An event should be dispatched even if resulting DOM tree doesn't change after the edit. (with replacing it)
var target2Text = "This text should not be changed.";
var target2 = setupForFiringTest('
This text should not be changed.
', target2Text);
document.execCommand("insertText", false, target2Text);

// An "delete" command should dispatch an input event.
var target3 = setupForFiringTest('
This text shouldn be deleted.
', '');
document.execCommand("delete", false);

// A command other than text-editing should dispatch an input event.
// Also note that createLink is a composite command,
// so this test also ensures that even composite command dispatches the event only once.
var target4 = setupForFiringTest('
This text should be a link.
', "This text should be a link.");
document.execCommand("createLink", false, "http://www.example.com/");

// An event shouldn't be dispatched to a 'display:none' node.
var target5 = makeTestTarget('
This will not be rendered.
');
target5.addEventListener("input", function(evt) { testFailed("should not be reached"); });
sel.selectAllChildren(target5);
target5.style.display = "none";
document.execCommand("insertText", false, "Text");

// The event should be dispatched from the editable root.
makeTestTarget('
Start,Middle,End.
');
var target6parent = document.getElementById("target6parent");
var target6start = document.getElementById("target6start");
var target6middle = document.getElementById("target6middle");
var target6end = document.getElementById("target6end");

var expectedText6 = "Start,Middle,End.";
target6parent.addEventListener("input", function(evt) { fired(evt, "target6parent", expectedText6); });
expectedInputEventCount++;
target6start.addEventListener("input", function(evt) { testFailed("should not be reached"); });
target6end.addEventListener("input", function(evt) { testFailed("should not be reached"); });
target6middle.addEventListener("input", function(evt) { fired(evt, "target6end", ""); });
sel.selectAllChildren(target6parent);
document.execCommand("createLink", false, "http://www.example.com/");

// Ensure key events can cause the event
var target7 = setupForFiringTest('
Replaced
', "X");
sel.selectAllChildren(target7);
eventSender.keyDown('X');

var target8 = setupForFiringTest('
Deleted
', '');
sel.selectAllChildren(target8);
eventSender.keyDown('Delete');

var target9parent = makeTestTarget('

foo

');
var target9child = document.getElementById('target9child');
target9child.addEventListener("input", function(evt) { testFailed("should not be reached"); });
target9parent.addEventListener("input", function(evt) { fired(evt, target9parent.id, '
Replacing
'); });
sel.selectAllChildren(target9child);
document.execCommand("insertText", false, "Replacing");
expectedInputEventCount++;

var target10parent = makeTestTarget('

foo

');
var target10child = document.getElementById("t10child");
var target10gch = document.getElementById("t10gch");
target10gch.addEventListener("input", function(evt) { fired(evt, target10gch.id, 'Replacing'); });
sel.selectAllChildren(target10gch);
document.execCommand("insertText", false, "Replacing");
expectedInputEventCount++;

shouldBe("expectedInputEventCount", "actualInputEventCount");
clearTestTarget();


text:
package com.akpwebdesign.Breakout.gameStates;

public enum States {
	SPLASH(0),
	MAIN_MENU(1),
	GAME(2),
	PAUSE_MENU(3),
	LOSE_GAME(4),
	WIN_GAME(5),
	EDITOR(6),
	LEVEL_CHANGE(7);

	private int stateID;

	States(int stateID) {
		this.setStateID(stateID);
	}

	public int getStateID() {
		return stateID;
	}

	private void setStateID(int stateID) {
		this.stateID = stateID;
	}
}


text:
import {NgModule,Component,Input,Output,EventEmitter,forwardRef} from '@angular/core';
import {CommonModule} from '@angular/common';
import {NG_VALUE_ACCESSOR, ControlValueAccessor} from '@angular/forms';

export const TOGGLEBUTTON_VALUE_ACCESSOR: any = {
  provide: NG_VALUE_ACCESSOR,
  useExisting: forwardRef(() => ToggleButton),
  multi: true
};

@Component({
    selector: 'p-toggleButton',
    template: `

            {{checked ? onLabel : offLabel}}

    `,
    providers: [TOGGLEBUTTON_VALUE_ACCESSOR]
})
export class ToggleButton implements ControlValueAccessor {

    @Input() onLabel: string = 'Yes';

    @Input() offLabel: string = 'No';

    @Input() onIcon: string;

    @Input() offIcon: string;

    @Input() disabled: boolean;

    @Input() style: any;

    @Input() styleClass: string;

    @Output() onChange: EventEmitter<any> = new EventEmitter();

    checked: boolean = false;

    onModelChange: Function = () => {};

    onModelTouched: Function = () => {};

    public hover: boolean;

    getIconClass() {
        let baseClass = 'ui-button-icon-left fa fa-fw';
        return baseClass + ' ' + (this.checked ? this.onIcon : this.offIcon);
    }

    toggle(event: Event) {
        if(!this.disabled) {
            this.checked = !this.checked;
            this.onModelChange(this.checked);
            this.onModelTouched();
            this.onChange.emit({
                originalEvent: event,
                checked: this.checked
            })
        }
    }

    writeValue(value: any) : void {
        this.checked = value;
    }

    registerOnChange(fn: Function): void {
        this.onModelChange = fn;
    }

    registerOnTouched(fn: Function): void {
        this.onModelTouched = fn;
    }

    setDisabledState(val: boolean): void {
        this.disabled = val;
    }
}

@NgModule({
    imports: [CommonModule],
    exports: [ToggleButton],
    declarations: [ToggleButton]
})
export class ToggleButtonModule { }


text:
<?php
//mysql_connect("localhost","root","");
//mysql_select_db("fulumail");

mysql_connect("localhost","design61_dhanoa","dhanoa");
mysql_select_db("design61_fulumail");

?>


text:
module Embot.Commands.SlackStateDump where

import           ClassyPrelude
import           Control.Arrow ((<<<), (>>>), returnA)
import           Control.Lens (_1, _2, to, view)
import           Control.Wire (hold)
import           Data.Attoparsec.Text (endOfInput, skipSpace)
import qualified Data.Map.Strict as Map
import qualified Data.Sequence as Seq
import           TextShow (showt)

import           Embot.Action (Action(SendMessage))
import           Embot.Command (Command, commandChat, simpleCommands)
import           Embot.Slack ( RtmStartRp
                             , Channel, channelName, channelIsArchived, channelIsGeneral, channelMembers
                             , Group, groupName, groupIsArchived, groupMembers
                             , IM, imUser, imIsOpen
                             , User, userName, userRealName, userPresence, userIsAdmin, userIsOwner, userIsPrimaryOwner, userIsRestricted, userIsUltraRestricted
                             , ID, unID
                             , Presence(PresenceAway) )
import           Embot.SlackState (SlackState)
import qualified Embot.SlackState as SlackState
import           Embot.Types (EmbotLogic, MinimalEmbotMonad)

effects :: MinimalEmbotMonad m => RtmStartRp -> SlackState m -> EmbotLogic m
effects rtmStartRp slackState = foldMap (($ rtmStartRp) >>> ($ slackState))
    [ showChannels
    , showGroups
    , showIMs
    , showUsers
    ]

showChannels :: MinimalEmbotMonad m => RtmStartRp -> SlackState m -> EmbotLogic m
showChannels rtmStartRp slackState =
  proc event -> do
    channels <- hold <<< view SlackState.channels slackState -< event
    command <- simpleCommands rtmStartRp $ "show" *> skipSpace *> "channels" *> endOfInput -< event
    returnA -< map (respond channels) command
  where
    respond :: Map (ID Channel) Channel -> Command a -> Seq Action
    respond channels cmd = Seq.singleton $ SendMessage (view commandChat cmd) (intercalate "\n" . map formatChan . sortBy (compare `on` view channelName) . toList $ channels)

    formatChan :: Channel -> Text
    formatChan = do
      name <- view channelName
      archived <- view channelIsArchived
      general <- view channelIsGeneral
      members <- view channelMembers
      let tags = intercalate " " . catMaybes
                    $ [ guard archived >> pure "(archived)"
                      , guard general >> pure "(general)"
                      , Just $ "(" <> showt (length members) <> " members)" ]
      pure $ "#" <> name <> " " <> tags

showGroups :: MinimalEmbotMonad m => RtmStartRp -> SlackState m -> EmbotLogic m
showGroups rtmStartRp slackState =
  proc event -> do
    groups <- hold <<< view SlackState.groups slackState -< event
    command <- simpleCommands rtmStartRp $ "show" *> skipSpace *> "groups" *> endOfInput -< event
    returnA -< map (respond groups) command
  where
    respond :: Map (ID Group) Group -> Command a -> Seq Action
    respond groups cmd = Seq.singleton $ SendMessage (view commandChat cmd) (intercalate "\n" . map formatGroup . sortBy (compare `on` view groupName) . toList $ groups)

    formatGroup :: Group -> Text
    formatGroup = do
      name <- view groupName
      archived <- view groupIsArchived
      members <- view groupMembers
      let tags = intercalate " " . catMaybes
                    $ [ guard archived >> pure "(archived)"
                      , Just $ "(" <> showt (length members) <> " members)" ]
      pure $ name <> " " <> tags

showIMs :: MinimalEmbotMonad m => RtmStartRp -> SlackState m -> EmbotLogic m
showIMs rtmStartRp slackState =
  proc event -> do
    ims <- hold <<< view SlackState.ims slackState -< event
    users <- hold <<< view SlackState.users slackState -< event
    command <- simpleCommands rtmStartRp $ "show" *> skipSpace *> "ims" *> endOfInput -< event
    returnA -< map (respond users ims) command
  where
    respond :: Map (ID User) User -> Map (ID IM) IM -> Command a -> Seq Action
    respond users ims (view commandChat -> chat) =
      let imLines = map formatIM
                  . sortBy (compare `on` fst)
                  . map addUserName
                  . toList $ ims
          addUserName im =
            let name = fromMaybe (view (imUser . to unID) im) . map (view userName) $ Map.lookup (view imUser im) users
            in (name, im)
      in Seq.singleton $ SendMessage chat (intercalate "\n" imLines)

    formatIM :: (Text, IM) -> Text
    formatIM = do
      name <- view _1
      open <- view (_2 . imIsOpen)
      let tags = intercalate " " . catMaybes
                    $ [ guard open >> pure "(open)" ]
      pure $ name <> " " <> tags

showUsers :: MinimalEmbotMonad m => RtmStartRp -> SlackState m -> EmbotLogic m
showUsers rtmStartRp slackState =
  proc event -> do
    users <- hold <<< view SlackState.users slackState -< event
    command <- simpleCommands rtmStartRp $ "show" *> skipSpace *> "users" *> endOfInput -< event
    returnA -< map (respond users) command
  where
    respond :: Map (ID User) User -> Command a -> Seq Action
    respond users (view commandChat -> chat) =
      let userLines = map formatUser
                    . sortBy (compare `on` view userName)
                    . toList $ users
      in Seq.singleton $ SendMessage chat (intercalate "\n" userLines)

    formatUser :: User -> Text
    formatUser = do
      name            <- view userName
      realName        <- view userRealName
      admin           <- view userIsAdmin
      owner           <- view userIsOwner
      primaryOwner    <- view userIsPrimaryOwner
      restricted      <- view userIsRestricted
      ultraRestricted <- view userIsUltraRestricted
      presenceAway    <- view (userPresence . to (== Just PresenceAway))
      let tags = intercalate " " . catMaybes
                    $ [ guard admin >> pure "(admin)"
                      , guard owner >> pure "(owner)"
                      , guard primaryOwner >> pure "(primary owner)"
                      , guard restricted >> pure "(restricted)"
                      , guard ultraRestricted >> pure "(ultra restricted)"
                      , guard presenceAway >> pure "(away)" ]
      pure $ "@" <> name <> " (" <> realName <> ") " <> tags


text:
<?php

use common\models\Category;
use common\models\SizeTableName;
use common\widgets\SeoForm;
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model common\models\Category */
/* @var $form yii\widgets\ActiveForm */

?>

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'parent')
        ->dropDownList(ArrayHelper::map(Category::findAll(['parent' => 0]), 'id', 'name')) ?>

        <?= $form->field($model, 'slug')->textInput(['maxlength' => true]) ?>

        <?= $form->field($model, 'size_table_name_id')
            ->dropDownList(ArrayHelper::map(SizeTableName::find()
                ->all(), 'id', 'name'), $model->size_table_name_id ?
                ['options' => [$model->size_table_name_id => ['selected' => 'selected']]] :
                ['options' => [2 => ['selected' => 'selected']]]) ?>

    <?= $form->field($model, 'description')->textarea(['rows' => 6]) ?>

    <?= SeoForm::widget(['model' => $model]) ?>

        <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>

    <?php ActiveForm::end(); ?>


text:
package org.springframework.boot.autoconfigure.jdbc;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.GenericBeanDefinition;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.ImportBeanDefinitionRegistrar;
import org.springframework.core.type.AnnotationMetadata;

/**
 * Configures DataSource initialization.
 *
 * @author Stephane Nicoll
 */
@Configuration(proxyBeanMethods = false)
@Import({ DataSourceInitializerInvoker.class, DataSourceInitializationConfiguration.Registrar.class })
class DataSourceInitializationConfiguration {

	/**
	 * {@link ImportBeanDefinitionRegistrar} to register the
	 * {@link DataSourceInitializerPostProcessor} without causing early bean instantiation
	 * issues.
	 */
	static class Registrar implements ImportBeanDefinitionRegistrar {

		private static final String BEAN_NAME = "dataSourceInitializerPostProcessor";

		@Override
		public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata,
				BeanDefinitionRegistry registry) {
			if (!registry.containsBeanDefinition(BEAN_NAME)) {
				GenericBeanDefinition beanDefinition = new GenericBeanDefinition();
				beanDefinition.setBeanClass(DataSourceInitializerPostProcessor.class);
				beanDefinition.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
				// We don't need this one to be post processed otherwise it can cause a
				// cascade of bean instantiation that we would rather avoid.
				beanDefinition.setSynthetic(true);
				registry.registerBeanDefinition(BEAN_NAME, beanDefinition);
			}
		}

	}

}


text:
@protocol UnplannedViewControllerDelegate
-(void) ZhiFuBaoStyle;
@end
@interface UnplannedViewController : SZTableViewController

@property (nonatomic, strong) NSArray *maintain;
@property (nonatomic , assign) BOOL isWorkingHours;
@property (nonatomic , assign) BOOL isHidden;
@property (nonatomic, weak) id<UnplannedViewControllerDelegate> delegate;

-(SZFinalMaintenanceUnitItem *)isExistenceWithQRCode:(SZQRCodeProcotolitem *)item;

@end


text:
package org.hswebframework.web.authorization.basic.web;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.SneakyThrows;
import org.hswebframework.web.authorization.Authentication;
import org.hswebframework.web.authorization.ReactiveAuthenticationManager;
import org.hswebframework.web.authorization.annotation.Authorize;
import org.hswebframework.web.authorization.events.AuthorizationBeforeEvent;
import org.hswebframework.web.authorization.events.AuthorizationDecodeEvent;
import org.hswebframework.web.authorization.events.AuthorizationFailedEvent;
import org.hswebframework.web.authorization.events.AuthorizationSuccessEvent;
import org.hswebframework.web.authorization.exception.AuthenticationException;
import org.hswebframework.web.authorization.exception.UnAuthorizedException;
import org.hswebframework.web.authorization.simple.PlainTextUsernamePasswordAuthenticationRequest;
import org.hswebframework.web.logging.AccessLogger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.http.MediaType;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.*;
import reactor.core.publisher.Mono;

import java.util.Map;
import java.util.function.Function;

/**
 * @author zhouhao
 */
@RestController
@RequestMapping("${hsweb.web.mappings.authorize:authorize}")
@Tag(name = "授权接口")
public class AuthorizationController {

    @Autowired
    private ApplicationEventPublisher eventPublisher;

    @Autowired
    private ReactiveAuthenticationManager authenticationManager;

    @GetMapping("/me")
    @Authorize
    @Operation(summary = "当前登录用户权限信息")
    public Mono<Authentication> me() {
        return Authentication.currentReactive()
                .switchIfEmpty(Mono.error(UnAuthorizedException::new));
    }

    @PostMapping(value = "/login", consumes = MediaType.APPLICATION_JSON_VALUE)
    @Authorize(ignore = true)
    @AccessLogger(ignore = true)
    @Operation(summary = "登录",description = "必要参数:username,password.根据配置不同,其他参数也不同,如:验证码等.")
    public Mono<Map<String, Object>> authorizeByJson(@Parameter(example = "{\"username\":\"admin\",\"password\":\"admin\"}")
                                                     @RequestBody Mono<Map<String, Object>> parameter) {
        return doLogin(parameter);
    }

    /**
     * <img src="https://raw.githubusercontent.com/hs-web/hsweb-framework/4.0.x/hsweb-authorization/hsweb-authorization-basic/img/autz-flow.png">
     */
    @SneakyThrows
    private Mono<Map<String, Object>> doLogin(Mono<Map<String, Object>> parameter) {

        return parameter.flatMap(parameters -> {
            String username_ = (String) parameters.get("username");
            String password_ = (String) parameters.get("password");

            Assert.hasLength(username_, "validation.username_must_not_be_empty");
            Assert.hasLength(password_, "validation.password_must_not_be_empty");

            Function<String, Object> parameterGetter = parameters::get;
            return Mono.defer(() -> {
                AuthorizationDecodeEvent decodeEvent = new AuthorizationDecodeEvent(username_, password_, parameterGetter);
                return decodeEvent
                        .publish(eventPublisher)
                        .then(Mono.defer(() -> {
                            String username = decodeEvent.getUsername();
                            String password = decodeEvent.getPassword();
                            AuthorizationBeforeEvent beforeEvent = new AuthorizationBeforeEvent(username, password, parameterGetter);
                            return beforeEvent
                                    .publish(eventPublisher)
                                    .then(authenticationManager
                                            .authenticate(Mono.just(new PlainTextUsernamePasswordAuthenticationRequest(username, password)))
                                            .switchIfEmpty(Mono.error(() -> new AuthenticationException(AuthenticationException.ILLEGAL_PASSWORD)))
                                            .flatMap(auth -> {
                                                //触发授权成功事件
                                                AuthorizationSuccessEvent event = new AuthorizationSuccessEvent(auth, parameterGetter);
                                                event.getResult().put("userId", auth.getUser().getId());
                                                return event
                                                        .publish(eventPublisher)
                                                        .then(Mono.fromCallable(event::getResult));
                                            }));
                        }));
            }).onErrorResume(err -> {
                AuthorizationFailedEvent failedEvent = new AuthorizationFailedEvent(username_, password_, parameterGetter);
                failedEvent.setException(err);
                return failedEvent
                        .publish(eventPublisher)
                        .then(Mono.error(failedEvent.getException()));
            });
        });

    }

}


text:
mv javascript/ app/dynamic/
rm app/dynamic/app/scripts
mkdir app/dynamic/app/scripts/
cp C:/Users/RonThomas/Source/Scripts/test.sh app/dynamic/app/scripts/
cp app/dynamic/app/script.sh app/dynamic/app/scripts/
cp app/dynamic/app/scripts app/dynamic/app/scripts


text:
Airplanes are programming heaven. Going on a 10+ hour flight is a recipe for extraordinary focus and productivity. I always get off these flights feeling good and having done some cool shit. I wanted that without the plane though.

Airplane Mode turns off the distracting parts of the internet, so you can read docs but not get on Facebook, Twitter, Gmail, etc.

![Picture](picture.png)

Just click it to toggle between airplane mode and normal.

## Install

All you need is the `Airplane\ Mode.app` part (452kb). So just [download the `.zip`](https://github.com/evancz/airplane-mode/archive/master.zip) and grab it out of there.

From there just click the icon to toggle things on and off.

## Customize

This is just a wrapper around [a Python file](Airplane%20Mode.app/Contents/Resources/script) that messes with your `/etc/hosts` file. The [`on`](Airplane%20Mode.app/Contents/Resources/on) and [`off`](Airplane%20Mode.app/Contents/Resources/off) files determine how things work. You can just edit them. Add or remove websites to the list depending on your bad habits.

You can get to these files pretty easy too. Just right click the icon and go to "Show Package Contents". That will let you get at all the relevant files in Finder.

![Customize](customize.png)

## How do I make something like this?

I made it with this [Platypus](http://www.sveinbjorn.org/platypus) thing for Mac. It was super easy and fun. Just wrote a simple Python script and was able to bundle it all up with a custom icon. Had a great experience, trying to think of more things I can automate with a simple button like this!

## Feature Request

Can someone figure out how to make the icon turn on and off depending on the status? Is that even possible? It would be sick though, so open a PR if you figure it out!


text:
[![Open bugs badge](https://img.shields.io/badge/dynamic/json.svg?label=open%20bugs&url=https%3A%2F%2Fapi.github.com%2Fsearch%2Fissues%3Fq%3Dis%253Aopen%2Blabel%253Atype%253ABug%2Blabel%253A%255BProgressView%255D&query=%24.total_count)](https://github.com/material-components/material-components-ios/issues?q=is%3Aopen+is%3Aissue+label%3Atype%3ABug+label%3A%5BProgressView%5D)

Progress view is a linear progress indicator that implements Material Design animation and layout.

## Design & API documentation

Material Design guidelines: Progress & Activity

Class: MDCProgressView

Enumeration: MDCProgressViewBackwardAnimationMode

## Related components

ActivityIndicator

**Contents**

- [Overview](#overview)
- [Installation](#installation)
  - [Installation with CocoaPods](#installation-with-cocoapods)
  - [Importing](#importing)
- [Usage](#usage)
  - [Typical use](#typical-use)
- [Differences From UIProgressView](#differences-from-uiprogressview)
- [Accessibility](#accessibility)
  - [MDCProgressView](#mdcprogressview)

- - -

## Overview

The `MDCProgressView` control is designed to be a drop-in replacement for `UIProgressView`. The API
methods are the same as a `UIProgressView`, with the addition of a few key methods required to
achieve the desired animation of the control.

## Installation

### Installation with CocoaPods

Add the following to your `Podfile`:

```bash
pod 'MaterialComponents/ProgressView'
```

Then, run the following command:

```bash
pod install
```

### Importing

To import the component:

#### Swift
```swift
import MaterialComponents.MaterialProgressView
```

#### Objective-C

```objc
#import "MaterialProgressView.h"
```

## Usage

### Typical use

Add the progress view to your view hierarchy like you would with any other view.

**NOTE**: We recommend adding the progress view to the bottom of a view.

**Step 1: Add the progress view to a view**

Add the progress view to a view and set the desired progress and hidden state.

#### Swift

```swift
let progressView = MDCProgressView()
progressView.progress = 0

let progressViewHeight = CGFloat(2)
progressView.frame = CGRect(x: 0, y: view.bounds.height - progressViewHeight, width: view.bounds.width, height: progressViewHeight)
view.addSubview(progressView)
```

#### Objective-C

```objc
@property(nonatomic) MDCProgressView *progressView;
...

// Progress view configuration.
self.progressView = [[MDCProgressView alloc] initWithFrame:myframe];
self.progressView.progress = 0;  // You can also set a greater progress for actions already started.
[self.view addSubview:self.progressView];
```

**Step 2: Change the progress and hidden state**

Both the progress and the hidden state can be animated, with a completion block.

#### Swift

```swift
func startAndShowProgressView() {
  progressView.progress = 0
  progressView.setHidden(false, animated: true)
}

func completeAndHideProgressView() {
  progressView.setProgress(1, animated: true) { (finished) in
    self.progressView.setHidden(true, animated: true)
  }
}
```

#### Objective-C

```objc
- (void)startAndShowProgressView {
  self.progressView.progress = 0;
  [self.progressView setHidden:NO animated:YES completion:nil];
}

- (void)completeAndHideProgressView {
  __weak __typeof__(self) weakSelf = self;
  [self.progressView setProgress:1 animated:YES completion:^(BOOL finished){
    [weakSelf.progressView setHidden:YES animated:YES completion:nil];
  }];
}
```

## Differences From UIProgressView

This progress view provides an animation effect when showing and hiding it: it grows up (resp.
shrinks down). Additionally, all animated changes APIs take an optional completion block, to
synchronize multistep animations.

## Accessibility

### MDCProgressView

#### `-accessibilityValue`

Like UIProgressView, MDCProgressView's `accessibilityValue` is based on the current value of the ProgressView's
`progress` property. Also like UIProgressView, this `accessibilityValue` takes the form of a whole number
percentage. To ensure the same behavior between the two classes, the MDCProgressView class has a static
UIProgressView that instances query for its `accessibilityValue` whenever they need to provide their own.

The ProgressView announces a new `accessibilityValue` whenever its `progress` changes if VoiceOver is on.


text:
module Pumper
  class Pump
    def initialize(options)
      @options = options
    end

    def perform
      project = Project.new(options)
      commands = Command::Repository.new(project)

      commands.add(Command::GemRebuildCommand)
      commands.add(Command::GemUninstallCommand, { gem_name: specification.name })

      if project.is_vendor
        commands.add(Command::GemInstallToVendorCommand, { project_path: project.path, gem_name: specification.name })
      else
        commands.add(
          Command::GemInstallCommand,
          {
            gem_name: specification.name,
            gem_file_name: specification.gem_file_name,
            project_path: project.path
          }
        )
      end

      project.bump_version!(specification)
      commands.execute
    end

    private

    attr_reader :options

    def specification
      @specification ||= Specification.new
    end
  end
end


text:
<!DOCTYPE html>

    <link rel="stylesheet" href="simonscss.css"/>
    <meta charset="UTF-8">
    <title></title>

<button onclick="playPressed();">play</button>

    Click play to start

back to home page


text:
package com.glaf.jbpm.dao;

import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.Query;
import org.hibernate.Session;
import org.jbpm.JbpmContext;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.ProcessInstance;
import org.jbpm.graph.exe.Token;
import org.jbpm.taskmgmt.exe.PooledActor;
import org.jbpm.taskmgmt.exe.TaskInstance;

import com.glaf.core.util.LogUtils;
import com.glaf.jbpm.model.TaskItem;
import com.glaf.jbpm.query.ProcessQuery;

public class JbpmTaskDAO {
	protected static final Log logger = LogFactory.getLog(JbpmTaskDAO.class);

	/**
	 * 获取全部用户的待办任务,用于消息系统的催办。
	 *
	 * @param jbpmContext
	 * @return
	 */
	public List<TaskItem> getAllTaskItems(JbpmContext jbpmContext) {
		ProcessQuery query = new ProcessQuery();
		query.setTaskType("running");
		return this.getTaskItems(jbpmContext, query);
	}

	/**
	 * 获取用户已经处理过的流程实例编号
	 *
	 * @param paramMap
	 * @return
	 */
	public Collection<Long> getFinishedProcessInstanceIds(
			JbpmContext jbpmContext, ProcessQuery query) {
		Collection<Long> processInstanceIds = new HashSet<Long>();
		Collection<TaskInstance> taskInstances = this.getFinishedTaskInstances(
				jbpmContext, query);
		if (taskInstances != null && taskInstances.size() > 0) {
			Iterator<TaskInstance> iterator = taskInstances.iterator();
			while (iterator.hasNext()) {
				TaskInstance ti = iterator.next();
				if (ti.hasEnded() && StringUtils.isNotEmpty(ti.getActorId())) {
					Token token = ti.getToken();
					ProcessInstance pi = token.getProcessInstance();
					processInstanceIds.add(pi.getId());
				}
			}
		}
		return processInstanceIds;
	}

	/**
	 * 获取已经完成了的任务实例
	 *
	 * @param jbpmContext
	 * @param paramMap
	 * @return
	 */
	public List<TaskInstance> getFinishedTaskInstances(JbpmContext jbpmContext,
			ProcessQuery query) {
		StringBuffer buffer = new StringBuffer();
		buffer.append(" select ti from org.jbpm.taskmgmt.exe.TaskInstance as ti where ti.actorId is not null and ti.start is not null and ti.end is not null and ti.isSuspended != true and ti.isOpen = false ");

		Map<String, Object> params = new java.util.HashMap<String, Object>();

		if (query.getActorId() != null) {
			buffer.append(" and ti.actorId = :actorId ");
			params.put("actorId", query.getActorId());
		}

		if (query.getActorIds() != null && !query.getActorIds().isEmpty()) {
			Collection<String> collection = query.getActorIds();
			if (collection != null && collection.size() > 0) {
				buffer.append(" and ( ");
				int index = 0;
				for (Object object : collection) {
					if (index > 0) {
						buffer.append(" or ");
					}
					String p_name = "actorId_" + index;
					buffer.append(" ti.actorId = :").append(p_name);
					params.put(p_name, object);
					index++;
				}
				buffer.append(" ) ");
			}
		}

		if (query.getProcessInstanceId() != null) {
			buffer.append(" and ti.processInstance.id = :processInstanceId ");
			params.put("processInstanceId", query.getProcessInstanceId());
		}

		if (query.getProcessInstanceIds() != null
				&& !query.getProcessInstanceIds().isEmpty()) {
			Collection<Long> collection = query.getProcessInstanceIds();
			if (collection != null && collection.size() > 0) {
				buffer.append(" and ( ");
				int index = 0;
				for (Long pid : collection) {
					if (index > 0) {
						buffer.append(" or ");
					}
					String p_name = "processInstanceId_" + index;
					buffer.append(" ti.processInstance.id = :").append(p_name);

					params.put(p_name, pid);

					index++;
				}
				buffer.append(" ) ");
			}
		}

		if (query.getTaskName() != null) {
			buffer.append(" and ti.name like :taskName ");
			params.put("taskName", "%" + query.getTaskName() + "%");
		}

		if (query.getTaskNames() != null && !query.getTaskNames().isEmpty()) {
			Collection<String> collection = query.getTaskNames();
			if (collection != null && collection.size() > 0) {
				buffer.append(" and ( ");
				int index = 0;
				for (Object object : collection) {
					if (index > 0) {
						buffer.append(" or ");
					}
					String p_name = "taskName_" + index;
					buffer.append(" ti.name = :").append(p_name);
					params.put(p_name, object);
					index++;
				}
				buffer.append(" ) ");
			}
		}

		if (query.getAfterTaskCreateDate() != null) {
			params.put("afterTaskCreateDate", query.getAfterTaskCreateDate());
			buffer.append(" and ( ti.create >= :afterTaskCreateDate )");
		}

		if (query.getBeforeTaskCreateDate() != null) {
			params.put("beforeTaskCreateDate", query.getBeforeTaskCreateDate());
			buffer.append(" and ( ti.create <= :beforeTaskCreateDate )");
		}

		if (query.getAfterTaskStartDate() != null) {
			params.put("afterTaskStartDate", query.getAfterTaskStartDate());
			buffer.append(" and ( ti.start >= :afterTaskStartDate )");
		}

		if (query.getBeforeTaskStartDate() != null) {
			params.put("beforeTaskStartDate", query.getBeforeTaskStartDate());
			buffer.append(" and ( ti.start <= :beforeTaskStartDate )");
		}

		if (query.getAfterTaskEndDate() != null) {
			params.put("afterTaskEndDate", query.getAfterTaskEndDate());
			buffer.append(" and ( ti.end >= :afterTaskEndDate )");
		}

		if (query.getBeforeTaskEndDate() != null) {
			params.put("beforeTaskEndDate", query.getBeforeTaskEndDate());
			buffer.append(" and ( ti.end <= :beforeTaskEndDate )");
		}

		if (query.getTaskType() != null) {
			if (StringUtils.equals(query.getTaskType(), "running")) {
				buffer.append(" and ti.end is null ");
			} else if (StringUtils.equals(query.getTaskType(), "finished")) {
				buffer.append(" and ti.end is not null ");
			}
		}

		if (query.getProcessName() != null) {
			params.put("processName", query.getProcessName());
			buffer.append(" and ti.processInstance.name = :processName ");
		}

		if (query.getProcessNames() != null
				&& !query.getProcessNames().isEmpty()) {
			Collection<String> collection = query.getProcessNames();
			if (collection != null && collection.size() > 0) {
				buffer.append(" and ( ");
				int index = 0;
				for (Object object : collection) {
					if (index > 0) {
						buffer.append(" or ");
					}
					String p_name = "processName_" + index;
					buffer.append(
							" ti.processInstance.processDefinition.name = :")
							.append(p_name);
					params.put(p_name, object);
					index++;
				}
				buffer.append(" ) ");
			}
		}

		if (query.getProcessDefinitionId() != null) {
			buffer.append(" and ti.processInstance.processDefinition.id = :processDefinitionId ");
			params.put("processDefinitionId", query.getProcessDefinitionId());
		}

		if (LogUtils.isDebug()) {
			logger.debug(buffer.toString());
		}

		Session session = jbpmContext.getSession();
		Query q = session.createQuery(buffer.toString());
		q.setMaxResults(5000);

		if (params != null && params.size() > 0) {
			Set<Entry<String, Object>> entrySet = params.entrySet();
			for (Entry<String, Object> entry : entrySet) {
				String name = entry.getKey();
				Object value = entry.getValue();
				if (value != null) {
					q.setParameter(name, value);
				}
			}
		}

		List<?> rows = q.list();
		List<TaskInstance> taskInstances = new java.util.ArrayList<TaskInstance>();
		if (rows != null && rows.size() > 0) {
			Iterator<?> iterator = rows.iterator();
			while (iterator.hasNext()) {
				taskInstances.add((TaskInstance) iterator.next());
			}
		}

		return taskInstances;
	}

	public List<TaskInstance> getPooledTaskInstances(JbpmContext jbpmContext,
			ProcessQuery query) {
		StringBuffer buffer = new StringBuffer();
		buffer.append(" select ti from org.jbpm.taskmgmt.exe.PooledActor pooledActor join pooledActor.taskInstances ti where 1=1 and ti.actorId is null and ti.isSuspended != true and ti.isOpen = true and ti.processInstance.end is null ");
		Map<String, Object> params = new java.util.HashMap<String, Object>();

		if (query.getActorId() != null) {
			buffer.append(" and pooledActor.actorId = :actorId ");
			params.put("actorId", query.getActorId());
		}

		if (query.getActorIds() != null && !query.getActorIds().isEmpty()) {
			Collection<String> collection = query.getActorIds();
			if (collection != null && collection.size() > 0) {
				buffer.append(" and ( ");
				int index = 0;
				for (Object object : collection) {
					if (index > 0) {
						buffer.append(" or ");
					}
					String p_name = "actorId_" + index;
					buffer.append(" pooledActor.actorId = :").append(p_name);
					params.put(p_name, object);
					index++;
				}
				buffer.append(" ) ");
			}
		}

		if (query.getProcessInstanceId() != null) {
			buffer.append(" and ti.processInstance.id = :processInstanceId ");
			params.put("processInstanceId", query.getProcessInstanceId());
		}

		if (query.getProcessInstanceIds() != null
				&& !query.getProcessInstanceIds().isEmpty()) {
			Collection<Long> collection = query.getProcessInstanceIds();
			if (collection != null && collection.size() > 0) {
				buffer.append(" and ( ");
				int index = 0;
				for (Long pid : collection) {
					if (index > 0) {
						buffer.append(" or ");
					}
					String p_name = "processInstanceId_" + index;
					buffer.append(" ti.processInstance.id = :").append(p_name);

					params.put(p_name, pid);

					index++;
				}
				buffer.append(" ) ");
			}
		}

		if (query.getTaskName() != null) {
			buffer.append(" and ti.name like :taskName ");
			params.put("taskName", "%" + query.getTaskName() + "%");
		}

		if (query.getTaskNames() != null && !query.getTaskNames().isEmpty()) {
			Collection<String> collection = query.getTaskNames();
			if (collection != null && collection.size() > 0) {
				buffer.append(" and ( ");
				int index = 0;
				for (Object object : collection) {
					if (index > 0) {
						buffer.append(" or ");
					}
					String p_name = "taskName_" + index;
					buffer.append(" ti.name = :").append(p_name);
					params.put(p_name, object);
					index++;
				}
				buffer.append(" ) ");
			}
		}

		if (query.getAfterTaskCreateDate() != null) {
			params.put("afterTaskCreateDate", query.getAfterTaskCreateDate());
			buffer.append(" and ( ti.create >= :afterTaskCreateDate )");
		}

		if (query.getBeforeTaskCreateDate() != null) {
			params.put("beforeTaskCreateDate", query.getBeforeTaskCreateDate());
			buffer.append(" and ( ti.create <= :beforeTaskCreateDate )");
		}

		if (query.getAfterTaskStartDate() != null) {
			params.put("afterTaskStartDate", query.getAfterTaskStartDate());
			buffer.append(" and ( ti.start >= :afterTaskStartDate )");
		}

		if (query.getBeforeTaskStartDate() != null) {
			params.put("beforeTaskStartDate", query.getBeforeTaskStartDate());
			buffer.append(" and ( ti.start <= :beforeTaskStartDate )");
		}

		if (query.getAfterTaskEndDate() != null) {
			params.put("afterTaskEndDate", query.getAfterTaskEndDate());
			buffer.append(" and ( ti.end >= :afterTaskEndDate )");
		}

		if (query.getBeforeTaskEndDate() != null) {
			params.put("beforeTaskEndDate", query.getBeforeTaskEndDate());
			buffer.append(" and ( ti.end <= :beforeTaskEndDate )");
		}

		if (query.getTaskType() != null) {
			if (StringUtils.equals(query.getTaskType(), "running")) {
				buffer.append(" and ti.end is null ");
			} else if (StringUtils.equals(query.getTaskType(), "finished")) {
				buffer.append(" and ti.end is not null ");
			}
		}

		if (query.getProcessName() != null) {
			params.put("processName", query.getProcessName());
			buffer.append(" and ti.processInstance.name = :processName ");
		}

		if (query.getProcessNames() != null
				&& !query.getProcessNames().isEmpty()) {
			Collection<String> collection = query.getProcessNames();
			if (collection != null && collection.size() > 0) {
				buffer.append(" and ( ");
				int index = 0;
				for (Object object : collection) {
					if (index > 0) {
						buffer.append(" or ");
					}
					String p_name = "processName_" + index;
					buffer.append(
							" ti.processInstance.processDefinition.name = :")
							.append(p_name);
					params.put(p_name, object);
					index++;
				}
				buffer.append(" ) ");
			}
		}

		if (query.getProcessDefinitionId() != null) {
			buffer.append(" and ti.processInstance.processDefinition.id = :processDefinitionId ");
			params.put("processDefinitionId", query.getProcessDefinitionId());
		}

		if (LogUtils.isDebug()) {
			logger.debug(buffer.toString());
		}

		Session session = jbpmContext.getSession();
		Query q = session.createQuery(buffer.toString());
		q.setMaxResults(5000);

		if (params != null && params.size() > 0) {
			Set<Entry<String, Object>> entrySet = params.entrySet();
			for (Entry<String, Object> entry : entrySet) {
				String name = entry.getKey();
				Object value = entry.getValue();
				if (value != null) {
					q.setParameter(name, value);
				}
			}
		}

		List<?> rows = q.list();
		List<TaskInstance> taskInstances = new java.util.ArrayList<TaskInstance>();
		if (rows != null && rows.size() > 0) {
			Iterator<?> iterator = rows.iterator();
			while (iterator.hasNext()) {
				taskInstances.add((TaskInstance) iterator.next());
			}
		}

		return taskInstances;
	}

	public List<TaskInstance> getTaskInstances(JbpmContext jbpmContext,
			ProcessQuery query) {
		StringBuffer buffer = new StringBuffer();
		buffer.append("  select ti from org.jbpm.taskmgmt.exe.TaskInstance as ti where ti.actorId is not null and ti.isSuspended != true and ti.isOpen = true and ti.processInstance.end is null ");

		Map<String, Object> params = new java.util.HashMap<String, Object>();

		if (query.getActorId() != null) {
			buffer.append(" and ti.actorId = :actorId ");
			params.put("actorId", query.getActorId());
		}

		if (query.getActorIds() != null && !query.getActorIds().isEmpty()) {
			Collection<String> collection = query.getActorIds();
			if (collection != null && collection.size() > 0) {
				buffer.append(" and ( ");
				int index = 0;
				for (Object object : collection) {
					if (index > 0) {
						buffer.append(" or ");
					}
					String p_name = "actorId_" + index;
					buffer.append(" ti.actorId = :").append(p_name);
					params.put(p_name, object);
					index++;
				}
				buffer.append(" ) ");
			}
		}

		if (query.getProcessInstanceId() != null) {
			buffer.append(" and ti.processInstance.id = :processInstanceId ");

			params.put("processInstanceId", query.getProcessInstanceId());

		}

		if (query.getProcessInstanceIds() != null
				&& !query.getProcessInstanceIds().isEmpty()) {
			Collection<Long> collection = query.getProcessInstanceIds();
			if (collection != null && collection.size() > 0) {
				buffer.append(" and ( ");
				int index = 0;
				for (Long pid : collection) {
					if (index > 0) {
						buffer.append(" or ");
					}
					String p_name = "processInstanceId_" + index;
					buffer.append(" ti.processInstance.id = :").append(p_name);

					params.put(p_name, pid);

					index++;
				}
				buffer.append(" ) ");
			}
		}

		if (query.getTaskName() != null) {
			buffer.append(" and ti.name like :taskName ");
			params.put("taskName", "%" + query.getTaskName() + "%");
		}

		if (query.getTaskNames() != null && !query.getTaskNames().isEmpty()) {
			Collection<String> collection = query.getTaskNames();
			if (collection != null && collection.size() > 0) {
				buffer.append(" and ( ");
				int index = 0;
				for (Object object : collection) {
					if (index > 0) {
						buffer.append(" or ");
					}
					String p_name = "taskName_" + index;
					buffer.append(" ti.name = :").append(p_name);
					params.put(p_name, object);
					index++;
				}
				buffer.append(" ) ");
			}
		}

		if (query.getAfterTaskCreateDate() != null) {
			params.put("afterTaskCreateDate", query.getAfterTaskCreateDate());
			buffer.append(" and ( ti.create >= :afterTaskCreateDate )");
		}

		if (query.getBeforeTaskCreateDate() != null) {
			params.put("beforeTaskCreateDate", query.getBeforeTaskCreateDate());
			buffer.append(" and ( ti.create <= :beforeTaskCreateDate )");
		}

		if (query.getAfterTaskStartDate() != null) {
			params.put("afterTaskStartDate", query.getAfterTaskStartDate());
			buffer.append(" and ( ti.start >= :afterTaskStartDate )");
		}

		if (query.getBeforeTaskStartDate() != null) {
			params.put("beforeTaskStartDate", query.getBeforeTaskStartDate());
			buffer.append(" and ( ti.start <= :beforeTaskStartDate )");
		}

		if (query.getAfterTaskEndDate() != null) {
			params.put("afterTaskEndDate", query.getAfterTaskEndDate());
			buffer.append(" and ( ti.end >= :afterTaskEndDate )");
		}

		if (query.getBeforeTaskEndDate() != null) {
			params.put("beforeTaskEndDate", query.getBeforeTaskEndDate());
			buffer.append(" and ( ti.end <= :beforeTaskEndDate )");
		}

		if (query.getTaskType() != null) {
			if (StringUtils.equals(query.getTaskType(), "running")) {
				buffer.append(" and ti.end is null ");
			} else if (StringUtils.equals(query.getTaskType(), "finished")) {
				buffer.append(" and ti.end is not null ");
			}
		}

		if (query.getProcessName() != null) {
			params.put("processName", query.getProcessName());
			buffer.append(" and ti.processInstance.name = :processName ");
		}

		if (query.getProcessNames() != null
				&& !query.getProcessNames().isEmpty()) {
			Collection<String> collection = query.getProcessNames();
			if (collection != null && collection.size() > 0) {
				buffer.append(" and ( ");
				int index = 0;
				for (Object object : collection) {
					if (index > 0) {
						buffer.append(" or ");
					}
					String p_name = "processName_" + index;
					buffer.append(
							" ti.processInstance.processDefinition.name = :")
							.append(p_name);
					params.put(p_name, object);
					index++;
				}
				buffer.append(" ) ");
			}
		}

		if (query.getProcessDefinitionId() != null) {
			buffer.append(" and ti.processInstance.processDefinition.id = :processDefinitionId ");
			params.put("processDefinitionId", query.getProcessDefinitionId());
		}

		if (LogUtils.isDebug()) {
			logger.debug(buffer.toString());
		}

		Session session = jbpmContext.getSession();
		Query q = session.createQuery(buffer.toString());
		q.setMaxResults(5000);

		if (params != null && params.size() > 0) {
			Set<Entry<String, Object>> entrySet = params.entrySet();
			for (Entry<String, Object> entry : entrySet) {
				String name = entry.getKey();
				Object value = entry.getValue();
				if (value != null) {
					q.setParameter(name, value);
				}
			}
		}

		List<?> rows = q.list();
		List<TaskInstance> taskInstances = new java.util.ArrayList<TaskInstance>();
		if (rows != null && rows.size() > 0) {
			Iterator<?> iterator = rows.iterator();
			while (iterator.hasNext()) {
				taskInstances.add((TaskInstance) iterator.next());
			}
		}

		return taskInstances;
	}

	public List<TaskItem> getTaskItems(JbpmContext jbpmContext,
			ProcessQuery query) {
		List<TaskInstance> taskInstances = new java.util.ArrayList<TaskInstance>();

		List<TaskInstance> rows01 = this.getTaskInstances(jbpmContext, query);
		List<TaskInstance> rows02 = this.getPooledTaskInstances(jbpmContext,
				query);

		if (rows01 != null && rows01.size() > 0) {
			logger.debug("task size:" + rows01.size());
			Iterator<TaskInstance> iter01 = rows01.iterator();
			while (iter01.hasNext()) {
				TaskInstance taskInstance = iter01.next();
				taskInstances.add(taskInstance);
			}
		}

		if (rows02 != null && rows02.size() > 0) {
			logger.debug("pooled task size:" + rows02.size());
			Iterator<TaskInstance> iter02 = rows02.iterator();
			while (iter02.hasNext()) {
				TaskInstance taskInstance = iter02.next();
				taskInstances.add(taskInstance);
			}
		}

		List<TaskItem> taskItems = new java.util.ArrayList<TaskItem>();

		Iterator<TaskInstance> iterator = taskInstances.iterator();
		while (iterator.hasNext()) {
			TaskInstance taskInstance = iterator.next();
			if (taskInstance.isOpen() && !taskInstance.hasEnded()) {
				Token token = taskInstance.getToken();
				if (token == null) {
					continue;
				}
				String actorId = taskInstance.getActorId();
				ProcessInstance processInstance = token.getProcessInstance();
				ProcessDefinition processDefinition = processInstance
						.getProcessDefinition();
				if (StringUtils.isNotEmpty(actorId)) {
					TaskItem item = new TaskItem();
					item.setActorId(actorId);
					item.setRowId(processInstance.getKey());
					item.setTaskInstanceId(taskInstance.getId());
					item.setTaskName(taskInstance.getName());
					item.setTaskDescription(taskInstance.getDescription());
					item.setCreateDate(taskInstance.getCreate());
					item.setProcessInstanceId(processInstance.getId());
					item.setProcessName(processDefinition.getName());
					item.setProcessDescription(processDefinition
							.getDescription());
					taskItems.add(item);
				} else {
					Set<PooledActor> pooledActors = taskInstance
							.getPooledActors();
					if (pooledActors != null && pooledActors.size() > 0) {
						Iterator<PooledActor> iter = pooledActors.iterator();
						while (iter.hasNext()) {
							PooledActor actor = iter.next();
							String pooledActorId = actor.getActorId();
							TaskItem item = new TaskItem();
							item.setTaskInstanceId(taskInstance.getId());
							item.setRowId(processInstance.getKey());
							item.setActorId(pooledActorId);
							item.setTaskName(taskInstance.getName());
							item.setTaskDescription(taskInstance
									.getDescription());
							item.setCreateDate(taskInstance.getCreate());
							item.setProcessInstanceId(processInstance.getId());
							item.setProcessName(processDefinition.getName());
							item.setProcessDescription(processDefinition
									.getDescription());
							taskItems.add(item);
						}
					}
				}
			}
		}

		return taskItems;
	}

	/**
	 * 获取用户已经处理过的流程实例编号
	 *
	 * @param query
	 * @return
	 */
	public Collection<Long> getWorkedProcessInstanceIds(
			JbpmContext jbpmContext, ProcessQuery query) {
		Collection<Long> processInstanceIds = new HashSet<Long>();
		Collection<TaskInstance> taskInstances = this.getFinishedTaskInstances(
				jbpmContext, query);
		if (taskInstances != null && taskInstances.size() > 0) {
			Iterator<TaskInstance> iterator = taskInstances.iterator();
			while (iterator.hasNext()) {
				TaskInstance ti = iterator.next();
				if (ti.hasEnded() && StringUtils.isNotEmpty(ti.getActorId())) {
					Token token = ti.getToken();
					ProcessInstance pi = token.getProcessInstance();
					processInstanceIds.add(pi.getId());
				}
			}
		}
		return processInstanceIds;
	}

	/**
	 * 获取用户已经处理过的任务
	 *
	 * @param query
	 * @return
	 */
	public List<TaskItem> getWorkedTaskItems(JbpmContext jbpmContext,
			ProcessQuery query) {
		List<TaskItem> finishedTaskItems = new java.util.ArrayList<TaskItem>();
		Collection<TaskInstance> taskInstances = this.getFinishedTaskInstances(
				jbpmContext, query);
		if (taskInstances != null && taskInstances.size() > 0) {
			Iterator<TaskInstance> iterator = taskInstances.iterator();
			while (iterator.hasNext()) {
				TaskInstance ti = iterator.next();
				if (ti.hasEnded() && StringUtils.isNotEmpty(ti.getActorId())) {
					Token token = ti.getToken();
					ProcessInstance pi = token.getProcessInstance();
					ProcessDefinition pd = pi.getProcessDefinition();
					TaskItem item = new TaskItem();
					item.setRowId(pi.getKey());
					item.setActorId(ti.getActorId());
					item.setCreateDate(ti.getCreate());
					item.setStartDate(ti.getStart());
					item.setEndDate(ti.getEnd());
					item.setTaskDescription(ti.getDescription());
					item.setTaskName(ti.getName());
					item.setProcessName(pd.getName());
					item.setProcessDescription(pd.getDescription());
					finishedTaskItems.add(item);
				}
			}
		}
		return finishedTaskItems;
	}

}


text:
$here = $PSScriptRoot

$modulePath = "$here\..\..\.."
$moduleName = Split-Path -Path $modulePath -Leaf

InModuleScope $moduleName {
    Describe New-DSCPullServerAdminSQLDatabase {
        It 'Should write a warning when database already exists' {
            Mock -CommandName Test-DSCPullServerDatabaseExist -MockWith {
                $true
            }

            Mock -CommandName Write-Warning
            Mock -CommandName Invoke-DSCPullServerSQLCommand

            New-DSCPullServerAdminSQLDatabase -SQLServer 'Server\Instance' -Database 'DSCDB' -Credential ([pscredential]::Empty) -Confirm:$false

            Assert-MockCalled -CommandName Write-Warning -Exactly -Times 1 -Scope it
            Assert-MockCalled -CommandName Invoke-DSCPullServerSQLCommand -Exactly -Times 0 -Scope it
        }

        It 'Should create a database when database does not already exists' {
            Mock -CommandName Test-DSCPullServerDatabaseExist -MockWith {
                $false
            }

            Mock -CommandName Write-Warning
            Mock -CommandName Invoke-DSCPullServerSQLCommand -MockWith {
                param (
                    $script
                )
                Write-Verbose -Message $Script -Verbose
            }

            $result = New-DSCPullServerAdminSQLDatabase -SQLServer 'Server\Instance' -Database 'DSCDB' -Confirm:$false 4>&1
            $result | Should -Not -BeNullOrEmpty

            Assert-MockCalled -CommandName Write-Warning -Exactly -Times 0 -Scope it
            Assert-MockCalled -CommandName Invoke-DSCPullServerSQLCommand -Exactly -Times 4 -Scope it
        }

        It 'Should have ShouldProcess before calling Invoke-DSCPullServerSQLCommand' {
            Mock -CommandName Test-DSCPullServerDatabaseExist -MockWith {
                $false
            }

            Mock -CommandName Write-Warning
            Mock -CommandName Invoke-DSCPullServerSQLCommand

            New-DSCPullServerAdminSQLDatabase -SQLServer 'Server\Instance' -Database 'DSCDB' -Confirm:$false -WhatIf

            Assert-MockCalled -CommandName Write-Warning -Exactly -Times 0 -Scope it
            Assert-MockCalled -CommandName Invoke-DSCPullServerSQLCommand -Exactly -Times 0 -Scope it
        }
    }
}


text:
namespace utils {
namespace signals {

class interrupts_handler;
class interrupts_inhibiter;

}  // namespace signals
}  // namespace utils

#endif  // !defined(UTILS_SIGNALS_INTERRUPTS_FWD_HPP)


text:
/// Copyright (c) 2012 Ecma International.  All rights reserved.
/// Ecma International makes this code available under the terms and conditions set
/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
/// "Use Terms").   Any redistribution of this code must retain the above
/// copyright and this notice and otherwise comply with the Use Terms.
/**
 * @path ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-3.js
 * @description Array.prototype.map - applied to boolean primitive
 */

function testcase() {

        function callbackfn(val, idx, obj) {
            return obj instanceof Boolean;
        }

        try {
            Boolean.prototype[0] = true;
            Boolean.prototype.length = 1;

            var testResult = Array.prototype.map.call(false, callbackfn);
            return testResult[0] === true;
        } finally {
            delete Boolean.prototype[0];
            delete Boolean.prototype.length;
        }
    }
runTestCase(testcase);


text:
**Namespace:** [OfficeDevPnP.Core.Entities](OfficeDevPnP.Core.Entities.md)
**Assembly:** OfficeDevPnP.Core.dll
## Syntax
```C#
public YammerUserContact()
```
## See also
- [YammerUserContact](OfficeDevPnP.Core.Entities.YammerUserContact.md)
- [OfficeDevPnP.Core.Entities](OfficeDevPnP.Core.Entities.md)


text:
set -e
set -x

if [ "$HOST" = "i686-linux-gnu" ]
then
    export CC="$CC -m32"
fi
if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$TRAVIS_COMPILER" = "gcc" ]
then
    export CC="gcc-9"
fi

./configure \
    --enable-experimental="$EXPERIMENTAL" \
    --with-test-override-wide-multiply="$WIDEMUL" --with-bignum="$BIGNUM" --with-asm="$ASM" \
    --enable-ecmult-static-precomputation="$STATICPRECOMPUTATION" --with-ecmult-gen-precision="$ECMULTGENPRECISION" \
    --enable-module-ecdh="$ECDH" --enable-module-recovery="$RECOVERY" \
    --enable-module-schnorrsig="$SCHNORRSIG" \
    --with-valgrind="$WITH_VALGRIND" \
    --host="$HOST" $EXTRAFLAGS

if [ -n "$BUILD" ]
then
    make -j2 "$BUILD"
fi
if [ "$RUN_VALGRIND" = "yes" ]
then
    make -j2
    # the `--error-exitcode` is required to make the test fail if valgrind found errors, otherwise it'll return 0 (http://valgrind.org/docs/manual/manual-core.html)
    valgrind --error-exitcode=42 ./tests 16
    valgrind --error-exitcode=42 ./exhaustive_tests
fi
if [ "$BENCH" = "yes" ]
then
    if [ "$RUN_VALGRIND" = "yes" ]
    then
        # Using the local `libtool` because on macOS the system's libtool has nothing to do with GNU libtool
        EXEC='./libtool --mode=execute valgrind --error-exitcode=42'
    else
        EXEC=
    fi
    # This limits the iterations in the benchmarks below to ITER(set in .travis.yml) iterations.
    export SECP256K1_BENCH_ITERS="$ITERS"
    {
        $EXEC ./bench_ecmult
        $EXEC ./bench_internal
        $EXEC ./bench_sign
        $EXEC ./bench_verify
    } >> bench.log 2>&1
    if [ "$RECOVERY" = "yes" ]
    then
        $EXEC ./bench_recover >> bench.log 2>&1
    fi
    if [ "$ECDH" = "yes" ]
    then
        $EXEC ./bench_ecdh >> bench.log 2>&1
    fi
    if [ "$SCHNORRSIG" = "yes" ]
    then
        $EXEC ./bench_schnorrsig >> bench.log 2>&1
    fi
fi
if [ "$CTIMETEST" = "yes" ]
then
    ./libtool --mode=execute valgrind --error-exitcode=42 ./valgrind_ctime_test > valgrind_ctime_test.log 2>&1
fi


text:
from django.contrib import admin
from modulos.articulos.models import Articulos

admin.site.register(Articulos)


text:
package com.alibaba.json.bvt.bug;

import java.io.Serializable;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.TimeZone;

import junit.framework.TestCase;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;

public class Bug_for_lenolix_8 extends TestCase {
    protected void setUp() throws Exception {
        JSON.defaultTimeZone = TimeZone.getTimeZone("Asia/Shanghai");
        JSON.defaultLocale = Locale.CHINA;
    }

    public void test_for_objectKey() throws Exception {
        DateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", JSON.defaultLocale);
        simpleDateFormat.setTimeZone(JSON.defaultTimeZone);
        Map<Integer, User> map = new HashMap<Integer, User>();

        User user = new User();
        user.setId(1);
        user.setIsBoy(true);
        user.setName("leno.lix");
        user.setBirthDay(simpleDateFormat.parse("2012-03-07 22:38:21"));
        user.setGmtCreate(new java.sql.Date(simpleDateFormat.parse("2012-02-03 22:38:21").getTime()));

        map.put(1, user);

        String mapJson = JSON.toJSONString(map, SerializerFeature.WriteClassName, SerializerFeature.WriteMapNullValue);

        System.out.println(mapJson);

        Object object = JSON.parse(mapJson);

    }

    public static class User implements Serializable {

        /**
             *
             */

        private static final long  serialVersionUID = 6192533820796587011L;

        private Integer            id;
        private String             name;
        private Boolean            isBoy;
        private Date               birthDay;
        private java.sql.Date      gmtCreate;
        private java.sql.Timestamp gmtModified;

        public Integer getId() {
            return id;
        }

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

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Boolean getIsBoy() {
            return isBoy;
        }

        public void setIsBoy(Boolean isBoy) {
            this.isBoy = isBoy;
        }

        public Date getBirthDay() {
            return birthDay;
        }

        public void setBirthDay(Date birthDay) {
            this.birthDay = birthDay;
        }

        public java.sql.Date getGmtCreate() {
            return gmtCreate;
        }

        public void setGmtCreate(java.sql.Date gmtCreate) {
            this.gmtCreate = gmtCreate;
        }

        public java.sql.Timestamp getGmtModified() {
            return gmtModified;
        }

        public void setGmtModified(java.sql.Timestamp gmtModified) {
            this.gmtModified = gmtModified;
        }

    }
}


text:
<?xml version='1.0' encoding='UTF-8'?>
<eveapi version="2">
  <currentTime>2015-06-17 00:16:06</currentTime>
  <result>
    <rowset name="corporateContactList" key="contactID" columns="contactID,contactName,standing,contactTypeID">
        <row contactID="99004230" contactName="Sugar." standing="-5.2" contactTypeID="16159" />
        <row contactID="99005276" contactName="Illuminati Confirmed." standing="-10.0" contactTypeID="16159" />
    </rowset>
    <rowset name="allianceContactList" key="contactID" columns="contactID,contactName,standing,contactTypeID">
      <row contactID="1399057309" contactName="HUN Reloaded" standing="-5.23" contactTypeID="16159" />
      <row contactID="1463354890" contactName="Nulli Secunda" standing="-5.1" contactTypeID="16159" />
      <row contactID="1555742183" contactName="Here Be Dragons" standing="-7.5" contactTypeID="16159" />
    </rowset>
  </result>
  <cachedUntil>2015-06-17 00:31:06</cachedUntil>
</eveapi>


text:
package apple.uikit.enums;

import org.moe.natj.general.ann.Generated;
import org.moe.natj.general.ann.NInt;

@Generated
public final class NSLayoutAttribute {
    @Generated @NInt public static final long Left = 0x0000000000000001L;
    @Generated @NInt public static final long Right = 0x0000000000000002L;
    @Generated @NInt public static final long Top = 0x0000000000000003L;
    @Generated @NInt public static final long Bottom = 0x0000000000000004L;
    @Generated @NInt public static final long Leading = 0x0000000000000005L;
    @Generated @NInt public static final long Trailing = 0x0000000000000006L;
    @Generated @NInt public static final long Width = 0x0000000000000007L;
    @Generated @NInt public static final long Height = 0x0000000000000008L;
    @Generated @NInt public static final long CenterX = 0x0000000000000009L;
    @Generated @NInt public static final long CenterY = 0x000000000000000AL;
    @Generated @NInt public static final long LastBaseline = 0x000000000000000BL;
    @Generated @NInt public static final long Baseline = 0x000000000000000BL;
    @Generated @NInt public static final long FirstBaseline = 0x000000000000000CL;
    @Generated @NInt public static final long LeftMargin = 0x000000000000000DL;
    @Generated @NInt public static final long RightMargin = 0x000000000000000EL;
    @Generated @NInt public static final long TopMargin = 0x000000000000000FL;
    @Generated @NInt public static final long BottomMargin = 0x0000000000000010L;
    @Generated @NInt public static final long LeadingMargin = 0x0000000000000011L;
    @Generated @NInt public static final long TrailingMargin = 0x0000000000000012L;
    @Generated @NInt public static final long CenterXWithinMargins = 0x0000000000000013L;
    @Generated @NInt public static final long CenterYWithinMargins = 0x0000000000000014L;
    @Generated @NInt public static final long NotAnAttribute = 0x0000000000000000L;

    @Generated
    private NSLayoutAttribute() {
    }
}


text:
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.18010
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

//
// This code was auto-generated by Microsoft.VisualStudio.ServiceReference.Platforms, version 11.0.50727.1
//
namespace Ris.Client.WinRT
{

    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ServiceModel.ServiceContractAttribute(Namespace = "http://ogd.bka.gv.at/", ConfigurationName = "RISServices.OGDServiceSoap")]
    public interface OGDServiceSoap
    {

        [System.ServiceModel.OperationContractAttribute(Action = "http://ogd.bka.gv.at/request", ReplyAction = "*")]
        System.Threading.Tasks.Task<Ris.Client.WinRT.requestResponse> requestAsync(Ris.Client.WinRT.requestRequest request);

        [System.ServiceModel.OperationContractAttribute(Action = "http://ogd.bka.gv.at/getDocument", ReplyAction = "*")]
        System.Threading.Tasks.Task<Ris.Client.WinRT.getDocumentResponse> getDocumentAsync(Ris.Client.WinRT.getDocumentRequest request);

        [System.ServiceModel.OperationContractAttribute(Action = "http://ogd.bka.gv.at/version", ReplyAction = "*")]
        System.Threading.Tasks.Task<Ris.Client.WinRT.versionResponse> versionAsync(Ris.Client.WinRT.versionRequest request);
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(IsWrapped = false)]
    public partial class requestRequest
    {

        [System.ServiceModel.MessageBodyMemberAttribute(Name = "request", Namespace = "http://ogd.bka.gv.at/", Order = 0)]
        public Ris.Client.WinRT.requestRequestBody Body;

        public requestRequest()
        {
        }

        public requestRequest(Ris.Client.WinRT.requestRequestBody Body)
        {
            this.Body = Body;
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.Runtime.Serialization.DataContractAttribute(Namespace = "http://ogd.bka.gv.at/")]
    public partial class requestRequestBody
    {

        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false, Order = 0)]
        public string application;

        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false, Order = 1)]
        public string query;

        public requestRequestBody()
        {
        }

        public requestRequestBody(string application, string query)
        {
            this.application = application;
            this.query = query;
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(IsWrapped = false)]
    public partial class requestResponse
    {

        [System.ServiceModel.MessageBodyMemberAttribute(Name = "requestResponse", Namespace = "http://ogd.bka.gv.at/", Order = 0)]
        public Ris.Client.WinRT.requestResponseBody Body;

        public requestResponse()
        {
        }

        public requestResponse(Ris.Client.WinRT.requestResponseBody Body)
        {
            this.Body = Body;
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.Runtime.Serialization.DataContractAttribute(Namespace = "http://ogd.bka.gv.at/")]
    public partial class requestResponseBody
    {

        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false, Order = 0)]
        public string requestResult;

        public requestResponseBody()
        {
        }

        public requestResponseBody(string requestResult)
        {
            this.requestResult = requestResult;
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(IsWrapped = false)]
    public partial class getDocumentRequest
    {

        [System.ServiceModel.MessageBodyMemberAttribute(Name = "getDocument", Namespace = "http://ogd.bka.gv.at/", Order = 0)]
        public Ris.Client.WinRT.getDocumentRequestBody Body;

        public getDocumentRequest()
        {
        }

        public getDocumentRequest(Ris.Client.WinRT.getDocumentRequestBody Body)
        {
            this.Body = Body;
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.Runtime.Serialization.DataContractAttribute(Namespace = "http://ogd.bka.gv.at/")]
    public partial class getDocumentRequestBody
    {

        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false, Order = 0)]
        public string application;

        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false, Order = 1)]
        public string docId;

        public getDocumentRequestBody()
        {
        }

        public getDocumentRequestBody(string application, string docId)
        {
            this.application = application;
            this.docId = docId;
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(IsWrapped = false)]
    public partial class getDocumentResponse
    {

        [System.ServiceModel.MessageBodyMemberAttribute(Name = "getDocumentResponse", Namespace = "http://ogd.bka.gv.at/", Order = 0)]
        public Ris.Client.WinRT.getDocumentResponseBody Body;

        public getDocumentResponse()
        {
        }

        public getDocumentResponse(Ris.Client.WinRT.getDocumentResponseBody Body)
        {
            this.Body = Body;
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.Runtime.Serialization.DataContractAttribute(Namespace = "http://ogd.bka.gv.at/")]
    public partial class getDocumentResponseBody
    {

        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false, Order = 0)]
        public string getDocumentResult;

        public getDocumentResponseBody()
        {
        }

        public getDocumentResponseBody(string getDocumentResult)
        {
            this.getDocumentResult = getDocumentResult;
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(IsWrapped = false)]
    public partial class versionRequest
    {

        [System.ServiceModel.MessageBodyMemberAttribute(Name = "version", Namespace = "http://ogd.bka.gv.at/", Order = 0)]
        public Ris.Client.WinRT.versionRequestBody Body;

        public versionRequest()
        {
        }

        public versionRequest(Ris.Client.WinRT.versionRequestBody Body)
        {
            this.Body = Body;
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.Runtime.Serialization.DataContractAttribute()]
    public partial class versionRequestBody
    {

        public versionRequestBody()
        {
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(IsWrapped = false)]
    public partial class versionResponse
    {

        [System.ServiceModel.MessageBodyMemberAttribute(Name = "versionResponse", Namespace = "http://ogd.bka.gv.at/", Order = 0)]
        public Ris.Client.WinRT.versionResponseBody Body;

        public versionResponse()
        {
        }

        public versionResponse(Ris.Client.WinRT.versionResponseBody Body)
        {
            this.Body = Body;
        }
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.Runtime.Serialization.DataContractAttribute(Namespace = "http://ogd.bka.gv.at/")]
    public partial class versionResponseBody
    {

        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue = false, Order = 0)]
        public string versionResult;

        public versionResponseBody()
        {
        }

        public versionResponseBody(string versionResult)
        {
            this.versionResult = versionResult;
        }
    }

    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public interface OGDServiceSoapChannel : Ris.Client.WinRT.OGDServiceSoap, System.ServiceModel.IClientChannel
    {
    }

    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class OGDServiceSoapClient : System.ServiceModel.ClientBase<Ris.Client.WinRT.OGDServiceSoap>, Ris.Client.WinRT.OGDServiceSoap
    {

        /// <summary>
        /// Implement this partial method to configure the service endpoint.
        /// </summary>
        /// <param name="serviceEndpoint">The endpoint to configure</param>
        /// <param name="clientCredentials">The client credentials</param>
        static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials);

        public OGDServiceSoapClient() :
            base(OGDServiceSoapClient.GetDefaultBinding(), OGDServiceSoapClient.GetDefaultEndpointAddress())
        {
            this.Endpoint.Name = EndpointConfiguration.OGDServiceSoap.ToString();
            ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
        }

        public OGDServiceSoapClient(EndpointConfiguration endpointConfiguration) :
            base(OGDServiceSoapClient.GetBindingForEndpoint(endpointConfiguration), OGDServiceSoapClient.GetEndpointAddress(endpointConfiguration))
        {
            this.Endpoint.Name = endpointConfiguration.ToString();
            ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
        }

        public OGDServiceSoapClient(EndpointConfiguration endpointConfiguration, string remoteAddress) :
            base(OGDServiceSoapClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress))
        {
            this.Endpoint.Name = endpointConfiguration.ToString();
            ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
        }

        public OGDServiceSoapClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
            base(OGDServiceSoapClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
        {
            this.Endpoint.Name = endpointConfiguration.ToString();
            ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
        }

        public OGDServiceSoapClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
            base(binding, remoteAddress)
        {
        }

        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.Threading.Tasks.Task<Ris.Client.WinRT.requestResponse> Ris.Client.WinRT.OGDServiceSoap.requestAsync(Ris.Client.WinRT.requestRequest request)
        {
            return base.Channel.requestAsync(request);
        }

        public System.Threading.Tasks.Task<Ris.Client.WinRT.requestResponse> requestAsync(string application, string query)
        {
            Ris.Client.WinRT.requestRequest inValue = new Ris.Client.WinRT.requestRequest();
            inValue.Body = new Ris.Client.WinRT.requestRequestBody();
            inValue.Body.application = application;
            inValue.Body.query = query;
            return ((Ris.Client.WinRT.OGDServiceSoap)(this)).requestAsync(inValue);
        }

        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.Threading.Tasks.Task<Ris.Client.WinRT.getDocumentResponse> Ris.Client.WinRT.OGDServiceSoap.getDocumentAsync(Ris.Client.WinRT.getDocumentRequest request)
        {
            return base.Channel.getDocumentAsync(request);
        }

        public System.Threading.Tasks.Task<Ris.Client.WinRT.getDocumentResponse> getDocumentAsync(string application, string docId)
        {
            Ris.Client.WinRT.getDocumentRequest inValue = new Ris.Client.WinRT.getDocumentRequest();
            inValue.Body = new Ris.Client.WinRT.getDocumentRequestBody();
            inValue.Body.application = application;
            inValue.Body.docId = docId;
            return ((Ris.Client.WinRT.OGDServiceSoap)(this)).getDocumentAsync(inValue);
        }

        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.Threading.Tasks.Task<Ris.Client.WinRT.versionResponse> Ris.Client.WinRT.OGDServiceSoap.versionAsync(Ris.Client.WinRT.versionRequest request)
        {
            return base.Channel.versionAsync(request);
        }

        public System.Threading.Tasks.Task<Ris.Client.WinRT.versionResponse> versionAsync()
        {
            Ris.Client.WinRT.versionRequest inValue = new Ris.Client.WinRT.versionRequest();
            inValue.Body = new Ris.Client.WinRT.versionRequestBody();
            return ((Ris.Client.WinRT.OGDServiceSoap)(this)).versionAsync(inValue);
        }

        public virtual System.Threading.Tasks.Task OpenAsync()
        {
            return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndOpen));
        }

        public virtual System.Threading.Tasks.Task CloseAsync()
        {
            return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndClose));
        }

        private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration)
        {
            if ((endpointConfiguration == EndpointConfiguration.OGDServiceSoap))
            {
                System.ServiceModel.BasicHttpBinding result = new System.ServiceModel.BasicHttpBinding();
                result.MaxBufferSize = int.MaxValue;
                result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
                result.MaxReceivedMessageSize = int.MaxValue;
                result.AllowCookies = true;
                return result;
            }
            throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
        }

        private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration)
        {
            if ((endpointConfiguration == EndpointConfiguration.OGDServiceSoap))
            {
                return new System.ServiceModel.EndpointAddress("http://data.bka.gv.at/RIS/OGDService.asmx");
            }
            throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
        }

        private static System.ServiceModel.Channels.Binding GetDefaultBinding()
        {
            return OGDServiceSoapClient.GetBindingForEndpoint(EndpointConfiguration.OGDServiceSoap);
        }

        private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress()
        {
            return OGDServiceSoapClient.GetEndpointAddress(EndpointConfiguration.OGDServiceSoap);
        }

        public enum EndpointConfiguration
        {

            OGDServiceSoap,
        }
    }
}


text:
int initSDL();

class GraphicsSystem
{
public:
	GraphicsSystem(int width, int height);
	GraphicsSystem();
	~GraphicsSystem();

	void toggleFullscreen();
	void drawBuffer(GraphicsBuffer* buffer, Vector2 location);
	void drawBufferSection(GraphicsBuffer* buffer, Vector2 location, Rect section);
	void drawSprite(Sprite* sprite, Vector2 location);
	void drawAnimation(Animation* ani, Vector2 location);
	void writeText(Vector2 location, Font font, Color color, string text);
	void cleanUp();
	void clear(Color color);
	void clear(GraphicsBuffer &buffer, Color color);

	inline int getWidth() { return mScreenSurface->w; };
	inline int getHeight() { return mScreenSurface->h; };

	void addUnit(Unit* toAdd);
	void drawQueuedUnits();
	void flipDisplay();

private:
	SDL_Window* mWindow;
	SDL_Surface* mScreenSurface;

	std::vector<Unit*> mUnitsToDraw;

	bool fullScreen;
};

#endif


text:
cd "$(dirname "${BASH_SOURCE[0]}")" \
    && . "../../utils.sh"

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

print_in_purple "\n   Terminal\n\n"

execute "defaults write com.apple.terminal FocusFollowsMouse -string true" \
    "Make the focus automatically follow the mouse"

execute "defaults write com.apple.terminal SecureKeyboardEntry -bool true" \
    "Enable 'Secure Keyboard Entry'"

execute "defaults write com.apple.Terminal ShowLineMarks -int 0" \
    "Hide line marks"

execute "defaults write com.apple.terminal StringEncodings -array 4" \
    "Only use UTF-8"

execute "./set_terminal_theme.applescript" \
    "Set custom terminal theme"