text:
using System.ComponentModel.DataAnnotations;
using NTierApplications.Domain.Entities;
using NTierApplications.MVC.Infrastructure.Mapping;

namespace NTierApplications.MVC.Models
{
    public class LocationViewModel : ICreateMapping<Location>
    {
        public int Id { get; set; }

        [Required]
        [MaxLength(50)]
        public string Name { get; set; }

        [Required]
        [MaxLength(100)]
        public string Address { get; set; }

        [Required]
        public string City { get; set; }

        [Required]
        [MaxLength(2)]
        public string State { get; set; }

        [Required]
        public int Zip { get; set; }
    }
}

redpajama_set_name: RedPajamaGithub


text:
// The MIT License (MIT)
//
// Copyright (c) 2014-2016, Institute for Software & Systems Engineering
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

namespace Tests.Serialization.Objects
{
	using System;
	using SafetySharp.Modeling;
	using SafetySharp.Runtime.Serialization;
	using Shouldly;

	internal class BoxedValues : SerializationObject
	{
		protected override void Check()
		{
			var o = (object)1;
			var p = (object)new X { A = 1, B = 2 };
			var c = new C { O = o, P = p };

			Should.Throw<NotSupportedException>(() => GenerateCode(SerializationMode.Optimized, c, o, p));

			// TODO: Uncomment once boxed value types are supported
			//StateSlotCount.ShouldBe(2);
			//
			//Serialize();
			//c.O = null;
			//c.P = null;
			//Deserialize();
			//c.O.ShouldBe(o);
			//c.P.ShouldBe(p);
		}

		private class C : Component
		{
			public object O;
			public object P;
		}

		private struct X
		{
			public int A;
			public int B;
		}
	}
}


text:
package org.fastcatsearch.http.action.management.analysis;

import java.io.CharArrayReader;
import java.io.Writer;

import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.core.AnalyzerOption;
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
import org.apache.lucene.analysis.tokenattributes.CharsRefTermAttribute;
import org.fastcatsearch.http.ActionAuthority;
import org.fastcatsearch.http.ActionAuthorityLevel;
import org.fastcatsearch.http.ActionMapping;
import org.fastcatsearch.http.action.ActionRequest;
import org.fastcatsearch.http.action.ActionResponse;
import org.fastcatsearch.http.action.AuthAction;
import org.fastcatsearch.ir.analysis.AnalyzerPool;
import org.fastcatsearch.plugin.Plugin;
import org.fastcatsearch.plugin.PluginService;
import org.fastcatsearch.plugin.analysis.AnalysisPlugin;
import org.fastcatsearch.service.ServiceManager;
import org.fastcatsearch.util.ResponseWriter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@ActionMapping(value = "/management/analysis/analysis-tools", authority = ActionAuthority.Analysis, authorityLevel = ActionAuthorityLevel.READABLE)
public class GetBasicAnalizedResultAction extends AuthAction {

	private static final Logger logger = LoggerFactory.getLogger(GetBasicAnalizedResultAction.class);

	@Override
	public void doAuthAction(ActionRequest request, ActionResponse response) throws Exception {

		PluginService pluginService = ServiceManager.getInstance().getService(PluginService.class);

		String pluginId = request.getParameter("pluginId");
		String analyzerId = request.getParameter("analyzerId");
		String queryWords = request.getParameter("queryWords");
		String forQuery = request.getParameter("forQuery");

		String errorMessage = null;

		Writer writer = response.getWriter();
		ResponseWriter responseWriter = getDefaultResponseWriter(writer);
		responseWriter.object();
		responseWriter.key("query").value(queryWords);

		try {
//			AnalyzerFactory factory = pluginService.getAnalyzerFactoryManager().getAnalyzerFactory(pluginId+"."+analyzerId);
			Plugin plugin = pluginService.getPlugin(pluginId);
			if (plugin == null) {
				throw new Exception("Cannot find plugin >> " + (pluginId + "." + analyzerId));
			}
			AnalysisPlugin analysisPlugin = (AnalysisPlugin) plugin;
			AnalyzerPool analyzerPool = analysisPlugin.getAnalyzerPool(analyzerId);

			if (analyzerPool == null) {
				throw new Exception("Cannot find analyzer >> " + (pluginId + "." + analyzerId));
			}
			AnalyzerOption analyzerOption = new AnalyzerOption();
			if ("true".equalsIgnoreCase(forQuery)) {
				analyzerOption.setForQuery();
			}

			Analyzer analyzer = null;
			try{
				analyzer = analyzerPool.getFromPool();

				responseWriter.key("result").array("terms");

				char[] fieldValue = queryWords.toCharArray();
				TokenStream tokenStream = analyzer.tokenStream("", new CharArrayReader(fieldValue), analyzerOption);
				tokenStream.reset();
				CharsRefTermAttribute termAttribute = null;
				if (tokenStream.hasAttribute(CharsRefTermAttribute.class)) {
					termAttribute = tokenStream.getAttribute(CharsRefTermAttribute.class);
				}
				CharTermAttribute charTermAttribute = null;
				if (tokenStream.hasAttribute(CharTermAttribute.class)) {
					charTermAttribute = tokenStream.getAttribute(CharTermAttribute.class);
				}
				while (tokenStream.incrementToken()) {
					String key = "";
					if (termAttribute != null) {
						key = termAttribute.toString();
					} else if (charTermAttribute != null) {
						key = charTermAttribute.toString();
					}
					responseWriter.value(key);
				}
				responseWriter.endArray();
			}finally{
				analyzerPool.releaseToPool(analyzer);
			}
		} catch (Throwable t) {
			errorMessage = t.toString();
			logger.error("", t);
		} finally {

			if(errorMessage != null){
				responseWriter.key("success").value(false);
				responseWriter.key("errorMessage").value(errorMessage);
			}else{
				responseWriter.key("success").value(true);
			}
			responseWriter.endObject().done();
			if (writer != null) {
				writer.close();
			}
		}
	}

}


text:
<?php

namespace Zend\Mail\Storage\Exception;

use Zend\Mail\Exception\ExceptionInterface as MailException;

interface ExceptionInterface extends MailException
{
}


text:
<?php

declare(strict_types=1);

namespace Nyholm\Psr7Server;

use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\StreamInterface;

/**
 * @author Tobias Nyholm <tobias.nyholm@gmail.com>
 * @author Martijn van der Ven <martijn@vanderven.se>
 */
interface ServerRequestCreatorInterface
{
    /**
     * Create a new server request from the current environment variables.
     * Defaults to a GET request to minimise the risk of an \InvalidArgumentException.
     * Includes the current request headers as supplied by the server through `getallheaders()`.
     * If `getallheaders()` is unavailable on the current server it will fallback to its own `getHeadersFromServer()` method.
     * Defaults to php://input for the request body.
     *
     * @throws \InvalidArgumentException if no valid method or URI can be determined
     */
    public function fromGlobals(): ServerRequestInterface;

    /**
     * Create a new server request from a set of arrays.
     *
     * @param array                                $server  typically $_SERVER or similar structure
     * @param array                                $headers typically the output of getallheaders() or similar structure
     * @param array                                $cookie  typically $_COOKIE or similar structure
     * @param array                                $get     typically $_GET or similar structure
     * @param array                                $post    typically $_POST or similar structure
     * @param array                                $files   typically $_FILES or similar structure
     * @param StreamInterface|resource|string|null $body    Typically stdIn
     *
     * @throws \InvalidArgumentException if no valid method or URI can be determined
     */
    public function fromArrays(
        array $server,
        array $headers = [],
        array $cookie = [],
        array $get = [],
        array $post = [],
        array $files = [],
        $body = null
    ): ServerRequestInterface;

    /**
     * Get parsed headers from ($_SERVER) array.
     *
     * @param array $server typically $_SERVER or similar structure
     *
     * @return array
     */
    public static function getHeadersFromServer(array $server): array;
}


text:
package daemon

import (
	"github.com/docker/docker/container"
	"github.com/docker/docker/libcontainerd"
)

func (daemon *Daemon) getLibcontainerdCreateOptions(container *container.Container) (*[]libcontainerd.CreateOption, error) {
	return &[]libcontainerd.CreateOption{}, nil
}


text:
import OrdinaryDefineOwnProperty = require('../2018/OrdinaryDefineOwnProperty');
export = OrdinaryDefineOwnProperty;


text:
    <button class="btn" ng-click="open()">Open me!</button>

I'm a modal!

{{item}}

            <button class="btn btn-warning cancel" ng-click="close()">Cancel</button>


text:
<?php

/*
 * This file is part of PHP CS Fixer.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *     Dariusz Rumiński <dariusz.ruminski@gmail.com>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace PhpCsFixer\Tokenizer\Transformer;

use PhpCsFixer\Tokenizer\AbstractTransformer;
use PhpCsFixer\Tokenizer\CT;
use PhpCsFixer\Tokenizer\Token;
use PhpCsFixer\Tokenizer\Tokens;

/**
 * Transform T_USE into:
 * - CT::T_USE_TRAIT for imports,
 * - CT::T_USE_LAMBDA for lambda variable uses.
 *
 * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
 *
 * @internal
 */
final class UseTransformer extends AbstractTransformer
{
    /**
     * {@inheritdoc}
     */
    public function getCustomTokens()
    {
        return array(CT::T_USE_TRAIT, CT::T_USE_LAMBDA);
    }

    /**
     * {@inheritdoc}
     */
    public function getRequiredPhpVersionId()
    {
        return 50300;
    }

    /**
     * {@inheritdoc}
     */
    public function process(Tokens $tokens, Token $token, $index)
    {
        if ($token->isGivenKind(T_USE) && $this->isUseForLambda($tokens, $index)) {
            $token->override(array(CT::T_USE_LAMBDA, $token->getContent()));
        }

        if (!$token->isClassy()) {
            return;
        }

        $prevTokenIndex = $tokens->getPrevMeaningfulToken($index);
        $prevToken = $prevTokenIndex === null ? null : $tokens[$prevTokenIndex];

        if ($prevToken->isGivenKind(T_DOUBLE_COLON)) {
            return;
        }

        // Skip whole class braces content.
        // That way we can skip whole tokens in class declaration, therefore skip `T_USE` for traits.

        $index = $tokens->getNextTokenOfKind($index, array('{'));
        $innerLimit = $tokens->findBlockEnd(Tokens::BLOCK_TYPE_CURLY_BRACE, $index);

        while ($index < $innerLimit) {
            $token = $tokens[++$index];

            if (!$token->isGivenKind(T_USE)) {
                continue;
            }

            if ($this->isUseForLambda($tokens, $index)) {
                $token->override(array(CT::T_USE_LAMBDA, $token->getContent()));
            } else {
                $token->override(array(CT::T_USE_TRAIT, $token->getContent()));
            }
        }
    }

    /**
     * Check if token under given index is `use` statement for lambda function.
     *
     * @param Tokens $tokens
     * @param int    $index
     *
     * @return bool
     */
    private function isUseForLambda(Tokens $tokens, $index)
    {
        $nextToken = $tokens[$tokens->getNextMeaningfulToken($index)];

        // test `function () use ($foo) {}` case
        return $nextToken->equals('(');
    }
}


text:
      module grtrans_inputs

! for future with multiple emis names
!      use strings, only: countsubstring

      implicit none

      namelist /geodata/   standard,mumin,mumax,nmu,phi0,spin, uout,uin, rcut, &
       nrotype, gridvals, nn, i1, i2, extra, debug
      namelist /fluiddata/ fname, dt, nt, nload, nmdot, mdotmin, mdotmax, sigcut
      namelist /emisdata/  ename, mbh, nfreq, fmin, fmax, muval, gmin, gmax, p1, p2, jetalpha, &
           stype, delta, nweights, coefindx
      namelist /general/   use_geokerr, nvals, iname, cflag
! namelists for fluid models
! AC koral will share same structure as harm...
      namelist /harm/  fdfile, fgfile, fhfile, fnt, fnfiles, findf, fjonfix, &
           foffset, fsim, fdindf, fmagcrit, fscalefac
      namelist /analytic/ fnw, fwmin, fwmax, fnfreq_tab, ffmin, ffmax, frmax, fnr, fsigt, ffcol, &
           frspot,fr0spot,fn0spot,ftscl,frscl,fmdot,fnscl,fnnthscl,fnnthp,fbeta,fbl06,fnp,ftp, &
           frin,frout,fthin,fthout,fphiin,fphiout

      integer :: standard,nrotype,nro,nphi,nup,nvals,nfreq,nmu,cflag, nt,nmdot, &
           nload,extra,i1,i2,debug
      logical :: use_geokerr
      real(kind=8) :: mumax,mumin,spin,rcut,a1,a2,b1,b2,mbh,uout,uin, &
           fmin,fmax,dt,mdotmin,mdotmax,phi0,muval,gmin,gmax,p1,p2, &
           jetalpha, delta, sigcut
      character(len=250) :: ename,fname,iname,stype
      real(kind=8), dimension(:), allocatable :: freqs,mdots,mu0
      real(kind=8), dimension(4) :: gridvals
      integer, dimension(3) :: nn
      ! fluid arguments
      character(len=250) :: fdfile,fhfile,fgfile,fsim
      integer :: fnt,findf,fnfiles,fjonfix,fnw,fnfreq_tab, &
           fnr,foffset,fdindf,fmagcrit,fbl06,nweights,nepotherargs
      integer, dimension(7) :: coefindx
      real(8) :: frspot,fr0spot,fn0spot,ftscl,frscl,fwmin,fwmax,ffmin, &
           ffmax,frmax,fsigt,ffcol,fmdot,fnscl,fnnthscl,fnnthp,fbeta,fnp,ftp, &
           frin,frout,fthin,fthout,fphiin,fphiout,fscalefac
      real(kind=8), dimension(:), allocatable :: epotherargs
      interface read_inputs
        module procedure read_inputs
      end interface

      contains

        subroutine read_inputs(file)
        character(len=20), intent(in) :: file
        integer :: i
          open(unit=8, file=file)
          read(8,nml=geodata)
!          write(6,*) 'n: ',n
!          read(8,nml=emisdata)
          read(8,nml=fluiddata)
!          write(6,*) 'model: ',fname
          read(8,nml=emisdata)
          read(8,nml=general)
          read(8,nml=harm)
          read(8,nml=analytic)
!          write(6,*) 'general: ',iname
          close(unit=8)
          a1=dble(gridvals(1))
          a2=dble(gridvals(2))
          b1=dble(gridvals(3))
          b2=dble(gridvals(4))
          nro=nn(1)
          nphi=nn(2)
          nup=nn(3)
!          write(6,*) 'read inputs nup: ',spin
! Compute frequencies w/ log spacing between and including fmin, fmax:
          allocate(freqs(nfreq)); allocate(mu0(nmu)); allocate(mdots(nmdot))
          if(nfreq==1) then
            freqs=(/fmin/)
          else
            freqs=fmin*exp((/(i-1,i=1,nfreq)/)*log(fmax/fmin)/(nfreq-1))
          endif
          if(nmdot==1) then
            mdots=(/mdotmin/)
          else
            mdots=mdotmin*exp((/(i-1,i=1,nmdot)/)*log(mdotmax/mdotmin)/(nmdot-1))
          endif
          if(nmu==1) then
            mu0=(/mumin/)
          else
            mu0=mumin+(mumax-mumin)/(nmu-1)*(/(i-1,i=1,nmu)/)
          endif
! new stuff for epotherargs:
          if(nweights==1) then
             allocate(epotherargs(2))
             epotherargs(1)=delta
             epotherargs(2)=1.
          else
             allocate(epotherargs(7))
             epotherargs(1)=delta
             epotherargs(2:7)=(/0.10714295,0.4459917,1.34219997, &
                  2.17450422,1.36515333,0.52892829/)
          endif
          nepotherargs=nweights+1
!          write(6,*) 'nup: ',nup,freqs,fmax,fmin,fmin*exp(log(fmax/fmin))
        end subroutine read_inputs

        subroutine delete_inputs()
! deallocate input variables
        deallocate(mu0); deallocate(freqs); deallocate(mdots); deallocate(epotherargs)
        end subroutine delete_inputs

      end module grtrans_inputs


text:
The AbsoluteLayout is the simplest layout in NativeScript. It uses absolute left-top (x/y) coordinates to position its children and the place of each of them depends on its Top, Left, Width and Height properties.
The AbsoluteLayout will not enforce any layout constraints on its elements and will not resize them at runtime when its size changes.

**API Reference for** [AbsoluteLayout Class](http://docs.nativescript.org/api-reference/modules/_ui_layouts_absolute_layout_.html)

A basic usage and definition of AbsoluteLayout and its children in HTML.
<snippet id='absolute-layout-html'/>


text:
![image](./Screenshots/SimpleTabLogo.png)

[![CI Status](http://img.shields.io/travis/azfx/SimpleTab.svg?style=flat)](https://travis-ci.org/azfx/SimpleTab)
[![Version](https://img.shields.io/cocoapods/v/SimpleTab.svg?style=flat)](http://cocoapods.org/pods/SimpleTab)
[![License](https://img.shields.io/cocoapods/l/SimpleTab.svg?style=flat)](http://cocoapods.org/pods/SimpleTab)
[![Platform](https://img.shields.io/cocoapods/p/SimpleTab.svg?style=flat)](http://cocoapods.org/pods/SimpleTab)

## About
.                          |.
:-------------------------:|:-------------------------:
![image](./Screenshots/simpletab1.gif) | ![image](./Screenshots/simpletab2.gif)

SimpleTab provides an easy alternative to the default UITabBarController with following support :

* Custom UI for Tab Bar Item
* Custom Tab Bar Item Animations on Tab Switching
* Custom View Transitions on Tab Switching

SimpleTab is developed with following principles :

* Simple - Easy to use and revert
* Keep the wheel - Utilize core features of UITabBarController
* Flexible - Provide hooks to customize UI and Animations

### Note: At the moment, SimpleTab does not work when instantiated programmatically. It must be used along with UITabBarController set in Interface Builder.

## Demo

The included example project demonstrates the usage of SimpleTab

To run the example project, clone the repo, and run `pod install` from the Example directory first.

## Requirements

* iOS 8.0+
* ARC

## Installation

SimpleTab is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod "SimpleTab"
```

> Note: SimpleTab now supports Swift 3.X starting 0.2.0 version.

## Getting Started

1.0 Import SimpleTab Framework to your Project

```swift
#import SimpleTab
```

2.0 Using Interface Builder, ensure :

* Tab Bar Controller is set as `SimpleTabBarController`
* Tab Bar is set as `SimpleTabBar`
* Tab Bar Item is set as `SimpleTabBarITem`

3.0 Get Handle to Tab Bar Controller, preferably in AppDelegate

```swift
simpleTBC = self.window!.rootViewController as? SimpleTabBarController
```

4.0 Set View Transition
>Included Animations
>
*  PopViewTransition
*  CrossFadeTransition

```swift
simpleTBC?.viewTransition = PopViewTransition()
```

5.0 Set Tab Bar Style

>Included Styles
>
* PopTabBarStyle
* ElegantTabBarStyle

```swift
var style:SimpleTabBarStyle = PopTabBarStyle(tabBar: simpleTBC!.tabBar)
```

5.1 Optional - Set Tab Title attributes for selected and unselected (normal) states.
Or use Tint Color in the Interface Builder to set the states

```swift
style.setTitleTextAttributes([NSFontAttributeName : UIFont.systemFontOfSize(14),  NSForegroundColorAttributeName: UIColor.lightGrayColor()], forState: .Normal)
style.setTitleTextAttributes([NSFontAttributeName : UIFont.systemFontOfSize(14),NSForegroundColorAttributeName: colorWithHexString("4CB6BE")], forState: .Selected)
```

5.2 Optional - Set Tab Icon colors for selected and unselected (normal) states.
Or use the App tint color to set the states

```swift
style.setIconColor(UIColor.lightGrayColor(), forState: UIControlState.Normal)
style.setIconColor(UIColor.blueColor(), forState: UIControlState.Selected)
```

6.0 And finally, let Tab Bar Controller know of the style in use

```swift
simpleTBC?.tabBarStyle = style
```

## Customizations
Refer [customizations](./customizations.md)

## Author

azfx, abdul.zalil@gmail.com

## License

SimpleTab is available under the MIT license. See the LICENSE file for more info.


text:
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const types_1 = require("./types");
const MemoryConnector_1 = require("./MemoryConnector");
class ModelClass {
    constructor(props, keys) {
        this.changedProps = {};
        this.persistentProps = props;
        this.keys = keys;
        for (const key in this.persistentProps) {
            Object.defineProperty(this, key, {
                get: () => this.attributes()[key],
                set: value => this.assign({ [key]: value }),
            });
        }
        const model = this.constructor;
        for (const key in model.keys) {
            Object.defineProperty(this, key, {
                get: () => (this.keys ? this.keys[key] : undefined),
            });
        }
    }
    static modelScope() {
        return {
            tableName: this.tableName,
            filter: this.filter,
            limit: this.limit,
            skip: this.skip,
            order: this.order,
        };
    }
    static limitBy(amount) {
        var _a;
        return _a = class extends this {
            },
            _a.limit = amount,
            _a;
    }
    static unlimited() {
        var _a;
        return _a = class extends this {
            },
            _a.limit = undefined,
            _a;
    }
    static skipBy(amount) {
        var _a;
        return _a = class extends this {
            },
            _a.skip = amount,
            _a;
    }
    static unskipped() {
        var _a;
        return _a = class extends this {
            },
            _a.skip = undefined,
            _a;
    }
    static orderBy(order) {
        var _a;
        const newOrder = [...this.order, ...(Array.isArray(order) ? order : [order])];
        return _a = class extends this {
            },
            _a.order = newOrder,
            _a;
    }
    static unordered() {
        var _a;
        return _a = class extends this {
            },
            _a.order = [],
            _a;
    }
    static reorder(order) {
        var _a;
        return _a = class extends this {
            },
            _a.order = Array.isArray(order) ? order : [order],
            _a;
    }
    static filterBy(andFilter) {
        var _a;
        let filter = andFilter;
        if (this.filter) {
            for (const key in this.filter) {
                if (this.filter[key] !== undefined && andFilter[key] !== undefined) {
                    filter = { $and: [filter, andFilter] };
                    break;
                }
                filter[key] = this.filter[key];
            }
        }
        if (Object.keys(andFilter).length === 0)
            filter = this.filter;
        return _a = class extends this {
            },
            _a.filter = filter,
            _a;
    }
    static orFilterBy(orFilter) {
        var _a;
        const filter = Object.keys(orFilter).length === 0
            ? this.filter
            : this.filter
                ? { $or: [this.filter, orFilter] }
                : orFilter;
        return _a = class extends this {
            },
            _a.filter = filter,
            _a;
    }
    static unfiltered() {
        var _a;
        return _a = class extends this {
            },
            _a.filter = undefined,
            _a;
    }
    static build(createProps) {
        return new this(this.init(createProps));
    }
    static buildScoped(createProps) {
        return new this(this.init(Object.assign(Object.assign({}, this.filter), createProps)));
    }
    static create(createProps) {
        return this.build(createProps).save();
    }
    static createScoped(props) {
        return this.buildScoped(props).save();
    }
    static async all() {
        const items = await this.connector.query(this.modelScope());
        return items.map(item => {
            const keys = {};
            for (const key in this.keys) {
                keys[key] = item[key];
                delete item[key];
            }
            return new this(item, keys);
        });
    }
    static async first() {
        const items = await this.limitBy(1).all();
        return items.pop();
    }
    static async select(...keys) {
        const items = await this.connector.select(this.modelScope(), ...keys);
        return items;
    }
    static async pluck(key) {
        const items = await this.select(key);
        return items.map(item => item[key]);
    }
    static async count() {
        return await this.connector.count(this.modelScope());
    }
    isPersistent() {
        return this.keys !== undefined;
    }
    isNew() {
        return this.keys === undefined;
    }
    attributes() {
        return Object.assign(Object.assign(Object.assign({}, this.persistentProps), this.changedProps), this.keys);
    }
    assign(props) {
        for (const key in props) {
            if (this.persistentProps[key] !== props[key]) {
                this.changedProps[key] = props[key];
            }
            else {
                delete this.changedProps[key];
            }
        }
        return this;
    }
    itemScope() {
        const model = this.constructor;
        return {
            tableName: model.tableName,
            filter: this.keys,
            limit: 1,
            skip: 0,
            order: [],
        };
    }
    async save() {
        const model = this.constructor;
        if (this.keys) {
            const changedKeys = Object.keys(this.changedProps);
            if (changedKeys.length > 0) {
                const items = await model.connector.updateAll(this.itemScope(), this.changedProps);
                const item = items.pop();
                if (item) {
                    for (const key in model.keys) {
                        this.keys[key] = item[key];
                        delete item[key];
                    }
                    this.persistentProps = item;
                    this.changedProps = {};
                }
                else {
                    throw 'Item not found';
                }
            }
        }
        else {
            const items = await model.connector.batchInsert(model.tableName, model.keys, [
                Object.assign(Object.assign({}, this.persistentProps), this.changedProps),
            ]);
            const item = items.pop();
            if (item) {
                this.keys = {};
                for (const key in model.keys) {
                    this.keys[key] = item[key];
                    delete item[key];
                }
                this.persistentProps = item;
                this.changedProps = {};
            }
            else {
                throw 'Failed to insert item';
            }
        }
        return this;
    }
}
exports.ModelClass = ModelClass;
function Model(props) {
    var _a;
    const connector = props.connector ? props.connector : new MemoryConnector_1.MemoryConnector();
    const order = props.order ? (Array.isArray(props.order) ? props.order : [props.order]) : [];
    const keyDefinitions = props.keys || { id: types_1.KeyType.number };
    return _a = class Model extends ModelClass {
            constructor(props, keys) {
                super(props, keys);
                this.changedProps = {};
            }
            static orderBy(order) {
                return super.orderBy(order);
            }
            static reorder(order) {
                return super.reorder(order);
            }
            static filterBy(filter) {
                return super.filterBy(filter);
            }
            static orFilterBy(filter) {
                return super.orFilterBy(filter);
            }
            static async select(...keys) {
                return super.select(...keys);
            }
            static async pluck(key) {
                return super.pluck(key);
            }
            static async all() {
                return (await super.all());
            }
            static async first() {
                return (await super.first());
            }
            static async count() {
                return await super.count();
            }
            static build(props) {
                return super.build(props);
            }
            static buildScoped(props) {
                return super.buildScoped(props);
            }
            static async create(props) {
                return (await super.create(props));
            }
            static async createScoped(props) {
                return (await super.createScoped(props));
            }
            attributes() {
                return Object.assign(Object.assign(Object.assign({}, this.persistentProps), this.changedProps), this.keys);
            }
            assign(props) {
                for (const key in props) {
                    if (this.persistentProps[key] !== props[key]) {
                        this.changedProps[key] = props[key];
                    }
                    else {
                        delete this.changedProps[key];
                    }
                }
                return this;
            }
        },
        _a.tableName = props.tableName,
        _a.filter = props.filter,
        _a.limit = props.limit,
        _a.skip = props.skip,
        _a.order = order,
        _a.keys = keyDefinitions,
        _a.connector = connector,
        _a.init = props.init,
        _a;
}
exports.Model = Model;
exports.default = Model;


text:
makeActive: function(arg){

	options = {
		className: 'active',
		selector: ''
	}

	if(typeof arg == 'string'){
		options.className = arg
	}

	else if (typeof arg == 'object'){
		var options = $.extend(options, arg);
	}

	return this.each(function(){
		$(this)
		.addClass(options.className)
		.siblings(options.selector)
		.removeClass(options.className);
	});

}


text:
<?php

class Edgecom_Faq_Helper_Data extends Mage_Core_Helper_Abstract
{
}


text:
Writing a Vimeo and YouTube plugin for Pelican
##############################################
:date: 2013-08-09 17:38
:author: kura
:category: coding
:tags: python, pelican, youtube, vimeo
:slug: writing-a-vimeo-and-youtube-plugin-for-pelican

.. contents::
    :backlinks: none

`Pelican <http://getpelican.com/>`_ is a Python-powered static blog generator
that processes `ReStructuredText <http://docutils.sourceforge.net/rst.html>`_
and `Markdown <http://daringfireball.net/projects/markdown/>`_ articles and
pages and converts them to HTML. I use Pelican to power this blog.

There is a YouTube RST directive built in to Pelican core but it really
shouldn't exist there.

I submitted a pull request for Pelican core to enable Vimeo videos in articles
but that request was declined because it didn't belong in the core. So I
decided I would write it as a plugin instead and while I was doing it, also
wrote a plugin for YouTube so that it could be removed from the core.

`There is a decent amount of detail in the Pelican documentation on how to
write plugins
<http://docs.getpelican.com/en/3.2/plugins.html#how-to-create-plugins>`_, I'm
not going to cover the whole process but I thought I would cover a little of
what I did.

Adding an RST directive
=======================

Really all we're doing is modifying docutils on-the-fly to tell it how to
understand new directives, so we need to import directives from docutils

.. code-block:: python

    from docutils.parsers.rst import directives, Directive

With this in place, we can dynamically register a new directive to docutils

.. code-block:: python

    directives.register_directive('vimeo', Vimeo)

The first argument we pass in is the name of our directive, the second
argument is the name of the class we wish to be invoked.

Writing the Directive
=====================

I'll now break down the Vimeo class and explain what it does, piece by piece.

We will need to import an extra method from docutils

.. code-block:: python

    from docutils import nodes

This is used to append segments of data together, in our case HTML.

class Vimeo
-----------

.. code-block:: python

    class Vimeo(Directive):

This is pretty self explanatory, we define a new class that inherits from
`docutils.parsers.rst.Directive`.

Next we define a method for handling our alignment choices

.. code-block:: python

    def align(argument):
        return directives.choice(argument, ('left', 'center', 'right'))

Now we need to set some base values against our class for docutils to know how
many arguments are required and so on, it's pretty easy to understand. For the
alignment option we pass it the callable method declared above, but without
calling it.

.. code-block:: python

    required_arguments = 1
    optional_arguments = 2
    option_spec = {
        'width': directives.positive_int,
        'height': directives.positive_int,
        'align': align
    }

    final_argument_whitespace = False
    has_content = False

And finally we move on to the meat of the plugin, the method that actually does
the processing.

The method name is called run because that is required by docutils.

.. code-block:: python

    def run(self):

First I get the videoID from the first argument in the RST, I tend set default
values for width, height and alignment. Those three arguments are optional, but
if they have been defined then I override the defaults.

.. code-block:: python

        videoID = self.arguments[0].strip()
        width = 420
        height = 315
        align = 'left'

        if 'width' in self.options:
            width = self.options['width']

        if 'height' in self.options:
            height = self.options['height']

        if 'align' in self.options:
            align = self.options['align']

Next I define the Vimeo URL and the two blocks of HTML that create the
surrounding div element and the video iframe. Here I also replace the videoID
in to the URL and also the optional arguments specified above.

.. code-block:: python

        url = 'https://player.vimeo.com/video/{}'.format(videoID)
        div_block = '
'.format(align)
        embed_block = ''.format(width, height, url)

And finally I create a list of docutils nodes with the HTML we created above.

.. code-block:: python

        return [
            nodes.raw('', div_block, format='html'),
            nodes.raw('', embed_block, format='html'),
            nodes.raw('', '
', format='html')]

And that's really it, it's a simple as that. `You can view full source on
GitHub <https://github.com/kura/pelican_vimeo>`_ and also `read the manual for
pelican-vimeo on it's software page on this website
</pelican-vimeo>`_.


text:
package com.example;

@Marker
public class Person {

    private String fullName;

    private Address address;

    public String getFullName() {
        return fullName;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }

    public Address getAddress() {
        return address;
    }

    public void setAddress(Address address) {
        this.address = address;
    }
}


text:
<!doctype html>

  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <meta name="viewport" content="width=device-width">
  <link type="text/css" rel="stylesheet" href="common.css">
  <title>Angular file upload sample</title>

  <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/codemirror/4.8.0/codemirror.min.css">

  Angular Version: <input type="text" ng-model="angularVersion">
  <input type="button" data-ng-click="changeAngularVersion()" value="Go">

Angular file upload Demo

  Visit ng-file-upload on github

    + edit upload html
    reset to
      default

          <form name="myForm">
            <fieldset>
              <legend>Upload on form submit</legend>
              Username: <input type="text" name="userName" ng-model="username" size="39" required>
              *required

              Profile Picture: <input type="file" ngf-select ng-model="picFile" name="file" ngf-accept="'image/*'" required>
              *required

              <button ng-disabled="!myForm.$valid" ng-click="uploadPic(picFile)">Submit</button>

              = 0">

              Upload Successful
            </fieldset>

          </form>

        <fieldset>
          <legend>Play with options</legend>

            <div ngf-select ngf-drop ng-model="files" ngf-model-invalid="invalidFiles"
                 ng-model-options="modelOptionsObj"
                 ngf-multiple="multiple" ngf-pattern="pattern" ngf-accept="acceptSelect"
                 ng-disabled="disabled" ngf-capture="capture"
                 ngf-drag-over-class="dragOverClassObj"
                 ngf-validate="validateObj"
                 ngf-resize="resizeObj"
                 ngf-resize-if="resizeIfFn($file, $width, $height)"
                 ngf-dimensions="dimensionsFn($file, $width, $height)"
                 ngf-duration="durationFn($file, $duration)"
                 ngf-keep="keepDistinct ? 'distinct' : keep"
                 ngf-fix-orientation="orientation"
                 ngf-allow-dir="allowDir" class="drop-box" ngf-drop-available="dropAvailable">Select File
               or Drop File

            <div ngf-drop ng-model="files" ngf-model-invalid="invalidFiles"
                 ng-model-options="modelOptionsObj"
                 ngf-multiple="multiple" ngf-pattern="'image/*'"
                 ng-disabled="disabled"
                 ngf-drag-over-class="dragOverClassObj"
                 ngf-validate="validateObj"
                 ngf-resize="resizeObj"
                 ngf-resize-if="resizeIfFn($file, $width, $height)"
                 ngf-dimensions="dimensionsFn($file, $width, $height)"
                 ngf-duration="durationFn($file, $duration)"
                 ngf-keep="keepDistinct ? 'distinct' : keep"
                 ngf-enable-firefox-paste="true"
                 ngf-fix-orientation="orientation"
                 ngf-allow-dir="allowDir" class="drop-box" ng-show="dropAvailable">
              Paste or Drop Image from browser

            accept (for select browser dependent): <input type="text" ng-model="acceptSelect">

            ngf-capture (for mobile): <input type="text" ng-model="capture">

            ngf-pattern (validate file model): <input type="text" ng-model="pattern">

            ngf-validate: <input type="text" ng-model="validate" size="49">

            ngf-drag-over-class (chrome): <input size="31" type="text" ng-model="dragOverClass">

            ng-model-options: <input type="text" size="43" ng-model="modelOptions">

            ngf-resize: <input type="text" size="43" ng-model="resize">

            ngf-resize-if: <input type="text" size="43" ng-model="resizeIf">

            ngf-dimensions: <input type="text" size="43" ng-model="dimensions">

            ngf-duration: <input type="text" size="43" ng-model="duration">

            <input type="checkbox" ng-model="multiple">ngf-multiple (allow multiple files)
            <input type="checkbox" ng-model="disabled">ng-disabled

            <input type="checkbox" ng-model="allowDir">ngf-allow-dir (allow directory drop Chrome
              only)

            <input type="checkbox" ng-model="keep">ngf-keep (keep the previous model values in
              ng-model)

            <input type="checkbox" ng-model="keepDistinct">ngf-keep="distinct" (do not allow
              duplicates)

            <input type="checkbox" ng-model="orientation">ngf-fix-orientation (for exif jpeg files)

            Upload resumable chunk size: <input type="text" ng-model="chunkSize">

Preview image/audio/video:

            <audio controls ngf-src="!files[0].$error && files[0]"></audio>
            <video controls ngf-src="!files[0].$error && files[0]"></video>

        </fieldset>

				= 0">

{{f.progress}}%

        <button class="button" ng-click="f.upload.abort();f.upload.aborted=true"
                ng-show="f.upload != null && f.progress < 100 && !f.upload.aborted">
          Abort/Pause
        </button>
        <button class="button" ng-click="upload(f, true);f.upload.aborted=false"
                ng-show="isResumeSupported && f.upload != null && f.upload.aborted">Resume
        </button>
        <button class="button" ng-click="restart(f);f.upload.aborted=false"
                ng-show="isResumeSupported && f.upload != null && (f.progress == 100 || f.upload.aborted)">Restart
        </button>
        {{f.name}} - size: {{f.size}}B - type: {{f.type}}
        details

{{f.result}}

file name: {{item.name}}

name: {{item.fieldName}}

size on the serve: {{item.size}}

value: {{item.value}}

request headers: {{f.result.requestHeaders}}

Invalid File: {{f.$error}} {{f.$errorParam}}, {{f.name}} - size: {{f.size}}B - type:
        {{f.type}}

{{errorMsg}}

How to upload to the server:

    <input type="radio" name="howToSend" ng-model="howToSend" value="1" ng-init="howToSend = 1">$upload.upload():
      multipart/form-data upload cross browser

    <input type="radio" name="howToSend" ng-model="howToSend" value="2"
                  ng-disabled="usingFlash">$upload.http(): binary content with file's
      Content-Type

Can be used to upload files directory into CouchDB,
      imgur, etc... without multipart form
      data (HTML5 FileReader browsers only)

    <input type="radio" name="howToSend" ng-model="howToSend" value="3">Amazon S3 bucket upload

    <form ng-show="howToSend==3" class="s3" id="s3form" action="http://localhost:8888" onsubmit="return false">

      Provide S3 upload parameters. Click here for
      detailed documentation

      S3 upload url including bucket name: <input type="text" ng-model="s3url">

      AWSAccessKeyId: <input type="Text" name="AWSAccessKeyId" ng-model="AWSAccessKeyId">

      acl (private or public): <input type="text" ng-model="acl" value="private">

      success_action_redirect: <input type="text" ng-model="success_action_redirect">

      policy: <input type="text" ng-model="policy">

      signature: <input type="text" ng-model="signature">

      <button ng-click="showHelper=!showHelper">S3 Policy signing helper (Optional)</button>

        If you don't have your policy and signature you can use this tool to generate them by providing these two fields
        and clicking on sign

        AWS Secret Key: <input type="text" ng-model="AWSSecretKey">

        JSON policy:
 <textarea type="text" ng-model="jsonPolicy" rows=10 cols=70></textarea>
        <button ng-click="generateSignature()">Sign</button>

    </form>

      <input type="checkbox" ng-model="generateErrorOnServer">Return server error with http code: <input type="text"
                                                                                ng-model="serverErrorCode"
                                                                                size="5"> and
      message: <input type="text" ng-model="serverErrorMsg">

donate
Feedback/Issues


text:
import TdContainer from "../../../html/Table/Td.js";
import ColorStyle from "../../../html/Style/Color.js";
import TextAlignment from "../../../html/Style/Text/TextAlignment.js";

export default class NumberTdContainer extends TdContainer {

    set number(value) {

        if (value < 0) {
            this.backgroundColor = ColorStyle.RED;
            this.color=ColorStyle.WHITE;
        } else {
            this.backgroundColor = ColorStyle.GREEN;
            this.color=ColorStyle.WHITE;
        }

        this.text = Math.round(value)+" %";
        this.textAlignment=TextAlignment.RIGHT;
        this.widthPixel=100;
        //this.paddingPixel=10;

    }

}


text:
/**
 * @generated-from ./$batch.test.js
 * This file is autogenerated from a template. Please do not edit it directly.
 * To rebuild it from its template use the command
 * > npm run generate
 * More information can be found in CONTRIBUTING.md
 */

/* eslint-disable no-unused-vars */

import { asyncBatch, asyncToArray, range } from '../..'
describe('asyncBatch', () => {
  it('returns an iterable with batches', async () => {
    const iter = asyncBatch(2, [1, 2, 3, 4, 5, 6, 7, 8, 9])
    expect((await asyncToArray(iter))).toEqual([[1, 2], [3, 4], [5, 6], [7, 8], [9]])
  })
  it('returns an iterable with batches when passed an iterable', async () => {
    const iter = asyncBatch(2, range({
      start: 1,
      end: 10
    }))
    expect((await asyncToArray(iter))).toEqual([[1, 2], [3, 4], [5, 6], [7, 8], [9]])
  })
  it('returns an iterable with batches when passed an iterable (2)', async () => {
    const iter = asyncBatch(2, range({
      start: 1,
      end: 9
    }))
    expect((await asyncToArray(iter))).toEqual([[1, 2], [3, 4], [5, 6], [7, 8]])
  })
  it('returns an iterable with batches (curried version)', async () => {
    const iter = asyncBatch(2)
    expect((await asyncToArray(iter(range({
      start: 1,
      end: 10
    }))))).toEqual([[1, 2], [3, 4], [5, 6], [7, 8], [9]])
  })
  it('returns an empty iterable when passed null', async () => {
    expect((await asyncToArray(asyncBatch(2, null)))).toEqual([])
  })
})


text:
package magick;

/**
 * Corresponds to the ImageMagick enumerated type of the same name.
 *
 * @author Eric Yeo
 */
public interface PreviewType {

    public final static int UndefinedPreview = 0;
    public final static int RotatePreview = 1;
    public final static int ShearPreview = 2;
    public final static int RollPreview = 3;
    public final static int HuePreview = 4;
    public final static int SaturationPreview = 5;
    public final static int BrightnessPreview = 6;
    public final static int GammaPreview = 7;
    public final static int SpiffPreview = 8;
    public final static int DullPreview = 9;
    public final static int GrayscalePreview = 10;
    public final static int QuantizePreview = 11;
    public final static int DespecklePreview = 12;
    public final static int ReduceNoisePreview = 13;
    public final static int AddNoisePreview = 14;
    public final static int SharpenPreview = 15;
    public final static int BlurPreview = 16;
    public final static int ThresholdPreview = 17;
    public final static int EdgeDetectPreview = 18;
    public final static int SpreadPreview = 19;
    public final static int SolarizePreview = 20;
    public final static int ShadePreview = 21;
    public final static int RaisePreview = 22;
    public final static int SegmentPreview = 23;
    public final static int SwirlPreview = 24;
    public final static int ImplodePreview = 25;
    public final static int WavePreview = 26;
    public final static int OilPaintPreview = 27;
    public final static int CharcoalDrawingPreview = 28;
    public final static int JPEGPreview = 29;

}


text:
package org.apache.beam.sdk.io.aws2.sqs;

import org.apache.beam.sdk.testing.CoderProperties;
import org.apache.beam.sdk.testing.TestPipeline;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import software.amazon.awssdk.services.sqs.SqsClient;
import software.amazon.awssdk.services.sqs.model.SendMessageRequest;

/** Tests on {@link SqsUnboundedSource}. */
@RunWith(JUnit4.class)
public class SqsUnboundedSourceTest {

  private static final String DATA = "testData";

  @Rule public TestPipeline pipeline = TestPipeline.create();

  @Rule public EmbeddedSqsServer embeddedSqsRestServer = new EmbeddedSqsServer();

  @Test
  public void testCheckpointCoderIsSane() {
    final SqsClient client = embeddedSqsRestServer.getClient();
    final String queueUrl = embeddedSqsRestServer.getQueueUrl();
    client.sendMessage(SendMessageRequest.builder().queueUrl(queueUrl).messageBody(DATA).build());
    SqsUnboundedSource source =
        new SqsUnboundedSource(
            SqsIO.read()
                .withQueueUrl(queueUrl)
                .withSqsClientProvider(SqsClientProviderMock.of(client))
                .withMaxNumRecords(1));
    CoderProperties.coderSerializable(source.getCheckpointMarkCoder());
  }
}


text:
package org.conqat.engine.architecture.assessment;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.OutputStream;
import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;

import org.conqat.engine.architecture.format.ArchitectureFormats;
import org.conqat.engine.architecture.format.EArchitectureIOAttribute;
import org.conqat.engine.architecture.format.EArchitectureIOElement;
import org.conqat.engine.architecture.scope.ArchitectureDefinition;
import org.conqat.engine.architecture.scope.ComponentNode;
import org.conqat.engine.architecture.scope.DependencyPolicy;
import org.conqat.engine.commons.findings.Finding;
import org.conqat.engine.commons.node.NodeUtils;
import org.conqat.engine.commons.sorting.NameSorter.NameComparator;
import org.conqat.engine.core.logging.IConQATLogger;
import org.conqat.lib.commons.collections.CollectionUtils;
import org.conqat.lib.commons.collections.SetMap;
import org.conqat.lib.commons.filesystem.FileSystemUtils;
import org.conqat.lib.commons.xml.LowercaseResolver;
import org.conqat.lib.commons.xml.XMLWriter;

/**
 * Writes an assessed architecture to disk.
 *
 * @author $Author: hummelb $
 * @version $Rev: 41275 $
 * @ConQAT.Rating GREEN Hash: DF3FD0EFE88FE1C4D94BBC0358C15E5B
 */
/* package */class AssessmentFileWriter extends
		XMLWriter<EArchitectureIOElement, EArchitectureIOAttribute> {

	/** Architecture that gets written to file */
	private final ArchitectureDefinition architecture;

	/** Logger */
	private final IConQATLogger logger;

	/** Constructor. */
	public AssessmentFileWriter(OutputStream outputStream,
			ArchitectureDefinition arch, IConQATLogger logger) {
		super(
				outputStream,
				new LowercaseResolver<EArchitectureIOElement, EArchitectureIOAttribute>(
						EArchitectureIOAttribute.class));
		this.architecture = arch;
		this.logger = logger;
	}

	/**
	 * Constructor
	 *
	 * @param file
	 *            Target file into which assessment results are written
	 */
	public AssessmentFileWriter(File file, ArchitectureDefinition arch,
			IConQATLogger logger) throws FileNotFoundException {
		this(getStream(file), arch, logger);
	}

	/** Creates the stream used for output. */
	private static PrintStream getStream(File file)
			throws FileNotFoundException {
		try {
			return new PrintStream(file, FileSystemUtils.UTF8_ENCODING);
		} catch (UnsupportedEncodingException e) {
			throw new AssertionError("Error: " + FileSystemUtils.UTF8_ENCODING
					+ " not supported!");
		}
	}

	/** Write architecture to file */
	public void writeArchitecture() {
		// add XML header with version and encoding information
		addHeader("1.0", FileSystemUtils.UTF8_ENCODING);

		openElement(EArchitectureIOElement.ASSESSMENT);
		addAttribute(EArchitectureIOAttribute.XMLNS,
				ArchitectureFormats.ASSESSMENT_RESULT_XML_NAMESPACE);

		if (architecture.hasChildren()) {
			ComponentNode[] children = architecture.getChildren();
			// Sort by name to get stable output
			Arrays.sort(children, NameComparator.getInstance());
			for (ComponentNode topLevelComponent : children) {
				writeComponent(topLevelComponent);
			}
		}

		writeOrphans();

		writeDependencyGroups();
		closeElement(EArchitectureIOElement.ASSESSMENT);

		// close the underlying stream
		close();
	}

	/** Write a component and its descendants to XML */
	private void writeComponent(ComponentNode component) {
		openElement(EArchitectureIOElement.COMPONENT);
		addAttribute(EArchitectureIOAttribute.NAME, component.getName());
		writeMatchedVertices(component);
		if (component.hasChildren()) {
			for (ComponentNode childComponent : component.getChildren()) {
				writeComponent(childComponent);
			}
		}
		closeElement(EArchitectureIOElement.COMPONENT);
	}

	/** Writes the vertices contained in the component to XML */
	@SuppressWarnings("unchecked")
	private void writeMatchedVertices(ComponentNode component) {
		Object matchedTypesObject = component
				.getValue(ArchitectureAnalyzer.MATCHED_TYPES_KEY);
		if (matchedTypesObject == null) {
			return;
		}

		if (!(matchedTypesObject instanceof Collection)) {
			logger.warn("Unexpected type found for key "
					+ ArchitectureAnalyzer.MATCHED_TYPES_KEY + " at node "
					+ component.getId());
			return;
		}

		Collection<String> matchedTypes = (Collection<String>) matchedTypesObject;
		for (String matchedType : CollectionUtils.sort(matchedTypes)) {
			addClosedElement(EArchitectureIOElement.TYPE,
					EArchitectureIOAttribute.NAME, matchedType);
		}
	}

	/** Writes the orphans list. */
	private void writeOrphans() {
		List<String> orphans = NodeUtils.getStringList(architecture,
				ArchitectureAnalyzer.ORPHANS_KEY);
		if (orphans == null) {
			return;
		}

		for (String orphan : CollectionUtils.sort(orphans)) {
			addClosedElement(EArchitectureIOElement.ORPHAN,
					EArchitectureIOAttribute.NAME, orphan);
		}
	}

	/** Write dependency groups section */
	private void writeDependencyGroups() {
		List<DependencyPolicy> policies = architecture.getSortedPolicies();
		for (DependencyPolicy policy : policies) {
			writeDependencyPolicy(policy);
		}
	}

	/** Write a single dependency policy */
	private void writeDependencyPolicy(DependencyPolicy policy) {
		openElement(EArchitectureIOElement.DEPENDENCY_POLICY);
		writeDependencyPolicyAttributes(policy);
		writeDependencies(policy);
		closeElement(EArchitectureIOElement.DEPENDENCY_POLICY);
	}

	/** Write attributes for a dependency policy */
	private void writeDependencyPolicyAttributes(DependencyPolicy policy)
			throws AssertionError {
		addAttribute(EArchitectureIOAttribute.SOURCE, policy.getSource()
				.getName());
		addAttribute(EArchitectureIOAttribute.TARGET, policy.getTarget()
				.getName());

		addAttribute(EArchitectureIOAttribute.POLICY_TYPE,
				policy.getType());
		addAttribute(EArchitectureIOAttribute.ASSESSMENT_TYPE,
				policy.getAssessment());
	}

	/** Write dependencies list */
	private void writeDependencies(DependencyPolicy policy) {
		// use sets to reduce the dependencies to unique pairs (there might be
		// multiple findings for each pair of files)
		SetMap<String, String> filteredDependencies = new SetMap<String, String>();
		for (Finding dependency : policy.getDependencies()) {
			filteredDependencies.add(dependency.getDependencySource(),
					dependency.getDependencyTarget());
		}

		for (String source : CollectionUtils.sort(filteredDependencies
				.getKeys())) {
			for (String target : CollectionUtils.sort(filteredDependencies
					.getCollection(source))) {
				addClosedElement(EArchitectureIOElement.DEPENDENCY,
						EArchitectureIOAttribute.SOURCE, source,
						EArchitectureIOAttribute.TARGET, target);
			}
		}
	}
}


text:
import * as React from 'react';

export default class NotFound extends React.PureComponent {
  render() {
    return
Not found
;
  }
}


text:
void Logger::outputDebugString (const String& text)
{
    std::cerr << text << std::endl;
}

//==============================================================================
SystemStats::OperatingSystemType SystemStats::getOperatingSystemType()
{
    return Linux;
}

String SystemStats::getOperatingSystemName()
{
    return "Linux";
}

String SystemStats::getDeviceDescription()
{
    return String();
}

bool SystemStats::isOperatingSystem64Bit()
{
   #if JUCE_64BIT
    return true;
   #else
    //xxx not sure how to find this out?..
    return false;
   #endif
}

//==============================================================================
namespace LinuxStatsHelpers
{
    String getCpuInfo (const char* const key)
    {
        StringArray lines;
        File ("/proc/cpuinfo").readLines (lines);

        for (int i = lines.size(); --i >= 0;) // (NB - it's important that this runs in reverse order)
            if (lines[i].startsWithIgnoreCase (key))
                return lines[i].fromFirstOccurrenceOf (":", false, false).trim();

        return String();
    }
}

String SystemStats::getCpuVendor()
{
    return LinuxStatsHelpers::getCpuInfo ("vendor_id");
}

int SystemStats::getCpuSpeedInMegaherz()
{
    return roundToInt (LinuxStatsHelpers::getCpuInfo ("cpu MHz").getFloatValue());
}

int SystemStats::getMemorySizeInMegabytes()
{
    struct sysinfo sysi;

    if (sysinfo (&sysi) == 0)
        return sysi.totalram * sysi.mem_unit / (1024 * 1024);

    return 0;
}

int SystemStats::getPageSize()
{
    return sysconf (_SC_PAGESIZE);
}

//==============================================================================
String SystemStats::getLogonName()
{
    if (const char* user = getenv ("USER"))
        return CharPointer_UTF8 (user);

    if (struct passwd* const pw = getpwuid (getuid()))
        return CharPointer_UTF8 (pw->pw_name);

    return String();
}

String SystemStats::getFullUserName()
{
    return getLogonName();
}

String SystemStats::getComputerName()
{
    char name [256] = { 0 };
    if (gethostname (name, sizeof (name) - 1) == 0)
        return name;

    return String();
}

static String getLocaleValue (nl_item key)
{
    const char* oldLocale = ::setlocale (LC_ALL, "");
    String result (String::fromUTF8 (nl_langinfo (key)));
    ::setlocale (LC_ALL, oldLocale);
    return result;
}

String SystemStats::getUserLanguage()    { return getLocaleValue (_NL_IDENTIFICATION_LANGUAGE); }
String SystemStats::getUserRegion()      { return getLocaleValue (_NL_IDENTIFICATION_TERRITORY); }
String SystemStats::getDisplayLanguage() { return getUserLanguage(); }

//==============================================================================
void CPUInformation::initialise() noexcept
{
    const String flags (LinuxStatsHelpers::getCpuInfo ("flags"));
    hasMMX   = flags.contains ("mmx");
    hasSSE   = flags.contains ("sse");
    hasSSE2  = flags.contains ("sse2");
    hasSSE3  = flags.contains ("sse3");
    has3DNow = flags.contains ("3dnow");

    numCpus = LinuxStatsHelpers::getCpuInfo ("processor").getIntValue() + 1;
}

//==============================================================================
uint32 juce_millisecondsSinceStartup() noexcept
{
    timespec t;
    clock_gettime (CLOCK_MONOTONIC, &t);

    return t.tv_sec * 1000 + t.tv_nsec / 1000000;
}

int64 Time::getHighResolutionTicks() noexcept
{
    timespec t;
    clock_gettime (CLOCK_MONOTONIC, &t);

    return (t.tv_sec * (int64) 1000000) + (t.tv_nsec / 1000);
}

int64 Time::getHighResolutionTicksPerSecond() noexcept
{
    return 1000000;  // (microseconds)
}

double Time::getMillisecondCounterHiRes() noexcept
{
    return getHighResolutionTicks() * 0.001;
}

bool Time::setSystemTimeToThisTime() const
{
    timeval t;
    t.tv_sec = millisSinceEpoch / 1000;
    t.tv_usec = (millisSinceEpoch - t.tv_sec * 1000) * 1000;

    return settimeofday (&t, 0) == 0;
}


text:
#ifndef SkSGGradient_DEFINED
#define SkSGGradient_DEFINED

#include "modules/sksg/include/SkSGRenderEffect.h"

#include "include/core/SkColor.h"
#include "include/core/SkPoint.h"
#include "include/core/SkScalar.h"
#include "include/core/SkShader.h"

#include <vector>

namespace sksg {

/**
 * Gradient base class.
 */
class Gradient : public Shader {
public:
    struct ColorStop {
        SkScalar  fPosition;
        SkColor4f fColor;

        bool operator==(const ColorStop& other) const {
            return fPosition == other.fPosition && fColor == other.fColor;
        }
    };

    SG_ATTRIBUTE(ColorStops, std::vector<ColorStop>, fColorStops)
    SG_ATTRIBUTE(TileMode  , SkTileMode            , fTileMode  )

protected:
    sk_sp<SkShader> onRevalidateShader() final;

    virtual sk_sp<SkShader> onMakeShader(const std::vector<SkColor4f>& colors,
                                         const std::vector<SkScalar >& positions) const = 0;

protected:
    Gradient() = default;

private:
    std::vector<ColorStop> fColorStops;
    SkTileMode             fTileMode = SkTileMode::kClamp;

    using INHERITED = Shader;
};

class LinearGradient final : public Gradient {
public:
    static sk_sp<LinearGradient> Make() {
        return sk_sp<LinearGradient>(new LinearGradient());
    }

    SG_ATTRIBUTE(StartPoint, SkPoint, fStartPoint)
    SG_ATTRIBUTE(EndPoint  , SkPoint, fEndPoint  )

protected:
    sk_sp<SkShader> onMakeShader(const std::vector<SkColor4f>&,
                                 const std::vector<SkScalar >&) const override;

private:
    LinearGradient() = default;

    SkPoint fStartPoint = SkPoint::Make(0, 0),
            fEndPoint   = SkPoint::Make(0, 0);

    using INHERITED = Gradient;
};

class RadialGradient final : public Gradient {
public:
    static sk_sp<RadialGradient> Make() {
        return sk_sp<RadialGradient>(new RadialGradient());
    }

    SG_ATTRIBUTE(StartCenter, SkPoint , fStartCenter)
    SG_ATTRIBUTE(EndCenter  , SkPoint , fEndCenter  )
    SG_ATTRIBUTE(StartRadius, SkScalar, fStartRadius)
    SG_ATTRIBUTE(EndRadius  , SkScalar, fEndRadius  )

protected:
    sk_sp<SkShader> onMakeShader(const std::vector<SkColor4f>&,
                                 const std::vector<SkScalar >&) const override;

private:
    RadialGradient() = default;

    SkPoint  fStartCenter = SkPoint::Make(0, 0),
             fEndCenter   = SkPoint::Make(0, 0);
    SkScalar fStartRadius = 0,
             fEndRadius   = 0;

    using INHERITED = Gradient;
};

} // namespace sksg

#endif // SkSGGradient_DEFINED


text:
/*global define*/
define({
  "_widgetLabel": "Υπέρθεση πλέγματος",
  "description": "Προσαρμοσμένο Web AppBuilder widget για την εμφάνιση υπέρθεσης πλέγματος συντεταγμένης."
});


text:
package com.metech.firefly.api.obj;

public class FlightInfo{

    private String arrival_time;
    private String departure_time;
    private String flight_number;
    //private String fare;
    private String journey_sell_key;
    private basic_class basic_class;
    private flex_class flex_class;

    private String mh_flight_number;
    //codeshare
    private EconomyPromoClass economy_promo_class;
    private EconomyPromoClass economy_class;

    public String getMh_flight_number() {
        return mh_flight_number;
    }

    public void setMh_flight_number(String mh_flight_number) {
        this.mh_flight_number = mh_flight_number;
    }

    public EconomyPromoClass getBusiness_class() {
        return business_class;
    }

    public void setBusiness_class(EconomyPromoClass business_class) {
        this.business_class = business_class;
    }

    public EconomyPromoClass getEconomy_class() {
        return economy_class;
    }

    public void setEconomy_class(EconomyPromoClass economy_class) {
        this.economy_class = economy_class;
    }

    private EconomyPromoClass business_class;

    public EconomyPromoClass getEconomy_promo_class() {
        return economy_promo_class;
    }

    public void setEconomy_promo_class(EconomyPromoClass economy_promo_class) {
        this.economy_promo_class = economy_promo_class;
    }

    public class EconomyPromoClass{

        private String class_of_service;
        private String fare_sell_key;
        private String tax;
        private String fare_price;
        private String discount;
        private String total_fare;
        private String status;
        private String before_discount_fare;

        public String getNon_discounted_fare() {
            return before_discount_fare;
        }

        public void setNon_discounted_fare(String non_discounted_fare) {
            this.before_discount_fare = non_discounted_fare;
        }

        public Boolean getChecked() {
            return checked;
        }

        public void setChecked(Boolean checked) {
            this.checked = checked;
        }

        private Boolean checked = false;

        public String getStatus() {
            return status;
        }

        public void setStatus(String status) {
            this.status = status;
        }

        public String getClass_of_service() {
            return class_of_service;
        }

        public void setClass_of_service(String class_of_service) {
            this.class_of_service = class_of_service;
        }

        public String getFare_sell_key() {
            return fare_sell_key;
        }

        public void setFare_sell_key(String fare_sell_key) {
            this.fare_sell_key = fare_sell_key;
        }

        public String getTax() {
            return tax;
        }

        public void setTax(String tax) {
            this.tax = tax;
        }

        public String getFare_price() {
            return fare_price;
        }

        public void setFare_price(String fare_price) {
            this.fare_price = fare_price;
        }

        public String getDiscount() {
            return discount;
        }

        public void setDiscount(String discount) {
            this.discount = discount;
        }

        public String getTotal_fare() {
            return total_fare;
        }

        public void setTotal_fare(String total_fare) {
            this.total_fare = total_fare;
        }

    }

    public class basic_class{

        private String class_of_service;
        private String fare_sell_key;
        private String tax;
        private String fare_price;
        private String discount;
        private String total_fare;
        private String status;

        public String getBefore_discounted_fare() {
            return before_discount_fare;
        }

        public void setBefore_discounted_fare(String before_discounted_fare) {
            this.before_discount_fare = before_discounted_fare;
        }

        private String before_discount_fare;

        public String getStatus() {
            return status;
        }

        public void setStatus(String status) {
            this.status = status;
        }

        public String getClass_of_service() {
            return class_of_service;
        }

        public void setClass_of_service(String class_of_service) {
            this.class_of_service = class_of_service;
        }

        public String getFare_sell_key() {
            return fare_sell_key;
        }

        public void setFare_sell_key(String fare_sell_key) {
            this.fare_sell_key = fare_sell_key;
        }

        public String getTax() {
            return tax;
        }

        public void setTax(String tax) {
            this.tax = tax;
        }

        public String getFare_price() {
            return fare_price;
        }

        public void setFare_price(String fare_price) {
            this.fare_price = fare_price;
        }

        public String getDiscount() {
            return discount;
        }

        public void setDiscount(String discount) {
            this.discount = discount;
        }

        public String getTotal_fare() {
            return total_fare;
        }

        public void setTotal_fare(String total_fare) {
            this.total_fare = total_fare;
        }

    }

    public class flex_class{

        private String class_of_service;
        private String fare_sell_key;
        private String tax;
        private String fare_price;
        private String discount;
        private String total_fare;
        private String status;

        public String getBefore_discounted_fare() {
            return before_discount_fare;
        }

        public void setBefore_discounted_fare(String before_discounted_fare) {
            this.before_discount_fare = before_discounted_fare;
        }

        private String before_discount_fare;

        public String getStatus() {
            return status;
        }

        public void setStatus(String status) {
            this.status = status;
        }

        public String getClass_of_service() {
            return class_of_service;
        }

        public void setClass_of_service(String class_of_service) {
            this.class_of_service = class_of_service;
        }

        public String getFare_sell_key() {
            return fare_sell_key;
        }

        public void setFare_sell_key(String fare_sell_key) {
            this.fare_sell_key = fare_sell_key;
        }

        public String getTax() {
            return tax;
        }

        public void setTax(String tax) {
            this.tax = tax;
        }

        public String getFare_price() {
            return fare_price;
        }

        public void setFare_price(String fare_price) {
            this.fare_price = fare_price;
        }

        public String getDiscount() {
            return discount;
        }

        public void setDiscount(String discount) {
            this.discount = discount;
        }

        public String getTotal_fare() {
            return total_fare;
        }

        public void setTotal_fare(String total_fare) {
            this.total_fare = total_fare;
        }

    }

    public basic_class getBasicObj() {
        return basic_class;
    }

    public void setBasicObj(basic_class basicObj) {
        this.basic_class = basicObj;
    }

    public flex_class getFlexObj() {
        return flex_class;
    }

    public void setFlexObj(flex_class flexObj) {
        this.flex_class = flexObj;
    }

    public String getArrival_time() {
        return arrival_time;
    }

    public void setArrival_time(String arrival_time) {
        this.arrival_time = arrival_time;
    }

    public String getDeparture_time() {
        return departure_time;
    }

    public void setDeparture_time(String departure_time) {
        this.departure_time = departure_time;
    }

    public String getFlight_number() {
        return flight_number;
    }

    public void setFlight_number(String flight_number) {
        this.flight_number = flight_number;
    }

    public String getJourney_sell_key() {
        return journey_sell_key;
    }

    public void setJourney_sell_key(String journey_sell_key) {
        this.journey_sell_key = journey_sell_key;
    }

}


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <name>Flowable5 - Mule - Compatibility tests</name>
  <artifactId>flowable5-mule-test</artifactId>
  <packaging>jar</packaging>

  <parent>
    <groupId>org.flowable</groupId>
    <artifactId>flowable-root</artifactId>
    <relativePath>../..</relativePath>
    <version>6.0.0.RC1-SNAPSHOT</version>
  </parent>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <spring.mule.version>3.2.10.RELEASE</spring.mule.version>
    <activiti.artifact>
      org.activiti.mule.test
    </activiti.artifact>
  </properties>

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <includes>
          <include>**/*.*</include>
        </includes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.6</version>
        <configuration>
          <workingDirectory>${project.build.directory}</workingDirectory>
          <systemPropertyVariables>
            <propertyName>mule.workingDirectory</propertyName>
            <buildDirectory>${project.build.directory}</buildDirectory>
          </systemPropertyVariables>
          <runOrder>alphabetical</runOrder>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
          </archive>
        </configuration>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>
                      maven-bundle-plugin
                    </artifactId>
                    <versionRange>
                      [2.1.0,)
                    </versionRange>
                    <goals>
                      <goal>cleanVersions</goal>
                      <goal>manifest</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore></ignore>
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <dependencies>
    <dependency>
      <groupId>org.flowable</groupId>
      <artifactId>flowable-engine</artifactId>
    </dependency>
    <dependency>
      <groupId>org.flowable</groupId>
      <artifactId>flowable5-engine</artifactId>
    </dependency>
    <dependency>
      <groupId>org.flowable</groupId>
      <artifactId>flowable-spring</artifactId>
    </dependency>
    <dependency>
      <groupId>org.flowable</groupId>
      <artifactId>flowable5-spring</artifactId>
    </dependency>
    <dependency>
      <groupId>org.flowable</groupId>
      <artifactId>flowable-mule</artifactId>
    </dependency>
    <dependency>
      <groupId>org.flowable</groupId>
      <artifactId>flowable5-compatibility</artifactId>
    </dependency>
    <dependency>
      <groupId>org.flowable</groupId>
      <artifactId>flowable5-spring-compatibility</artifactId>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-beans</artifactId>
      <version>${spring.mule.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-core</artifactId>
      <version>${spring.mule.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
      <version>${spring.mule.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-aop</artifactId>
      <version>${spring.mule.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-jdbc</artifactId>
      <version>${spring.mule.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context-support</artifactId>
      <version>${spring.mule.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-jms</artifactId>
      <version>${spring.mule.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-tx</artifactId>
      <version>${spring.mule.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
      <version>${spring.mule.version}</version>
    </dependency>
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mule.transports</groupId>
      <artifactId>mule-transport-http</artifactId>
      <version>${mule.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mule.transports</groupId>
      <artifactId>mule-transport-vm</artifactId>
      <version>${mule.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mule.modules</groupId>
      <artifactId>mule-module-scripting</artifactId>
      <version>${mule.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mule.modules</groupId>
      <artifactId>mule-module-spring-security</artifactId>
      <version>${mule.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mule.tests</groupId>
      <artifactId>mule-tests-functional</artifactId>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>distro</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.1.1</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <phase>package</phase>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <excludePackageNames>org.activiti.impl*,org.activiti.engine.impl*</excludePackageNames>
          <additionalparam>-Xdoclint:none</additionalparam>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

  <repositories>
      <repository>
          <id>mulesoft-releases</id>
          <name>MuleSoft Releases Repository</name>
          <url>https://repository-master.mulesoft.org/nexus/content/groups/public/</url>
          <layout>default</layout>
      </repository>
  </repositories>

</project>


text:
package com.iknow.imageselect.view;

/**
 * Author: J.Chou
 * Email: who_know_me@163.com
 * Created: 2016年04月06日 6:40 PM
 * Description:
 */

public interface IImageChooseView {
    void reloadData();
}


text:
<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model app\modules\cms\models\Block */
/* @var $form yii\widgets\ActiveForm */
?>

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

        <?= $form->field($model, 'alias')->textInput(['maxlength' => 64, 'placeholder' => 'на английском языке']) ?>

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

        <?= $form->field($model, 'content')->widget(\app\assets\Redactor::className()) ?>

            <?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Добавить') : Yii::t('app', 'Обновить'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>

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


text:
import Skype4Py

skype = Skype4Py.Skype()
skype.Attach()

for chat in skype.RecentChats:
  print '"%s" -> "%s"' % (chat.FriendlyName, chat.Name)


text:
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
    http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
    <changeSet author="Chi" id="20171128-add-collocation-manifest">
        <preConditions onFail="MARK_RAN">
            <not><tableExists tableName="collocation_manifest"/></not>
        </preConditions>
        <createTable tableName="collocation_manifest">
            <column name="system_id" type="BIGINT" autoIncrement="true">
                <constraints nullable="false" primaryKey="true"/>
            </column>
            <column name="dataset_internal_name_left" type="VARCHAR(40)">
                <constraints nullable="false"/>
            </column>
            <column name="dataset_internal_name_right" type="VARCHAR(40)">
                <constraints nullable="false"/>
            </column>
            <column name="job_id" type="UUID"/>
            <column name="created_at" type="TIMESTAMP WITH TIME ZONE" defaultValueComputed="now()">
                <constraints nullable="false"/>
            </column>
            <column name="updated_at" type="TIMESTAMP WITH TIME ZONE" defaultValueComputed="now()">
                <constraints nullable="false"/>
            </column>
            <column name="deleted_at" type="TIMESTAMP WITH TIME ZONE"/>
        </createTable>
    </changeSet>
</databaseChangeLog>


text:
import { readFileSync, statSync } from "fs";
import { FirebaseError } from "./error";

export function fileExistsSync(path: string): boolean {
  try {
    return statSync(path).isFile();
  } catch (e: any) {
    return false;
  }
}

export function dirExistsSync(path: string): boolean {
  try {
    return statSync(path).isDirectory();
  } catch (e: any) {
    return false;
  }
}

export function readFile(path: string): string {
  try {
    return readFileSync(path).toString();
  } catch (e: unknown) {
    if ((e as NodeJS.ErrnoException).code === "ENOENT") {
      throw new FirebaseError(`File not found: ${path}`);
    }
    throw e;
  }
}


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Mattia caespitosa A.DC.

### Remarks
null


text:
using System;
using System.Globalization;
using System.Windows.Data;

namespace Put.io.Wp.Converters
{
    public class InvertBool : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var actualVal = value as bool?;

            if (actualVal.HasValue)
                return !actualVal.Value;

            return false;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}


text:
namespace vt
{
#ifdef _WIN32
#ifdef LAMURE_VT_LIBRARY
std::string vt::VTConfig::CONFIG_PATH;
#endif
#else
std::string vt::VTConfig::CONFIG_PATH;
#endif

void VTConfig::read_config(const char* path_config)
{
    CSimpleIniA* ini_config = new CSimpleIniA(true, false, false);

    if(ini_config->LoadFile(path_config) < 0)
    {
        throw std::runtime_error("Configuration file parsing error");
    }

    _size_tile = (uint16_t)atoi(ini_config->GetValue(VTConfig::TEXTURE_MANAGEMENT, VTConfig::TILE_SIZE, VTConfig::UNDEF));
    _size_padding = (uint16_t)atoi(ini_config->GetValue(VTConfig::TEXTURE_MANAGEMENT, VTConfig::TILE_PADDING, VTConfig::UNDEF));
    _size_physical_texture = (uint32_t)atoi(ini_config->GetValue(VTConfig::TEXTURE_MANAGEMENT, VTConfig::PHYSICAL_SIZE_MB, VTConfig::UNDEF));
    _size_physical_update_throughput = (uint32_t)atoi(ini_config->GetValue(VTConfig::TEXTURE_MANAGEMENT, VTConfig::PHYSICAL_UPDATE_THROUGHPUT_MB, VTConfig::UNDEF));
    _size_ram_cache = (uint32_t)atoi(ini_config->GetValue(VTConfig::TEXTURE_MANAGEMENT, VTConfig::RAM_CACHE_SIZE_MB, VTConfig::UNDEF));
    _format_texture = VTConfig::which_texture_format(ini_config->GetValue(VTConfig::TEXTURE_MANAGEMENT, VTConfig::TEXTURE_FORMAT, VTConfig::UNDEF));
    _verbose = atoi(ini_config->GetValue(VTConfig::DEBUG, VTConfig::VERBOSE, VTConfig::UNDEF)) == 1;
}
void VTConfig::define_size_physical_texture(uint32_t max_tex_layers, uint32_t max_tex_px_width_gl)
{
    size_t max_tex_byte_size = (size_t)_size_physical_texture * 1024 * 1024;

    size_t max_tex_px_width_custom = (size_t)std::pow(2, (size_t)std::log2(sqrt(max_tex_byte_size / get_byte_stride())));
    size_t max_tex_px_width = ((size_t)max_tex_px_width_gl < max_tex_px_width_custom ? (size_t)max_tex_px_width_gl : (size_t)max_tex_px_width_custom);

    size_t tex_tile_width = max_tex_px_width / _size_tile;
    size_t tex_px_width = tex_tile_width * _size_tile;
    size_t tex_byte_size = tex_px_width * tex_px_width * get_byte_stride();
    size_t layers = max_tex_byte_size / tex_byte_size;

    _phys_tex_px_width = (uint32_t)tex_px_width;
    _phys_tex_tile_width = (uint32_t)tex_tile_width;
    _phys_tex_layers = (uint16_t)layers < (uint16_t)max_tex_layers ? (uint16_t)layers : (uint16_t)max_tex_layers;
}
uint16_t VTConfig::get_size_tile() const { return _size_tile; }
uint16_t VTConfig::get_size_padding() const { return _size_padding; }
VTConfig::FORMAT_TEXTURE VTConfig::get_format_texture() const { return _format_texture; }
bool VTConfig::is_verbose() const { return _verbose; }
uint32_t VTConfig::get_size_physical_update_throughput() const { return _size_physical_update_throughput; }
uint32_t VTConfig::get_phys_tex_px_width() const { return _phys_tex_px_width; }
uint32_t VTConfig::get_phys_tex_tile_width() const { return _phys_tex_tile_width; }
uint16_t VTConfig::get_phys_tex_layers() const { return _phys_tex_layers; }
uint16_t VTConfig::get_byte_stride() const
{
    uint8_t _byte_stride = 0;
    switch(_format_texture)
    {
    case VTConfig::FORMAT_TEXTURE::RGBA8:
        _byte_stride = 4;
        break;
    case VTConfig::FORMAT_TEXTURE::RGB8:
        _byte_stride = 3;
        break;
    case VTConfig::FORMAT_TEXTURE::R8:
        _byte_stride = 1;
        break;
    }

    return _byte_stride;
}
const VTConfig::FORMAT_TEXTURE VTConfig::which_texture_format(const char* _texture_format)
{
    if(strcmp(_texture_format, TEXTURE_FORMAT_RGBA8) == 0)
    {
        return RGBA8;
    }
    else if(strcmp(_texture_format, TEXTURE_FORMAT_RGB8) == 0)
    {
        return RGB8;
    }
    else if(strcmp(_texture_format, TEXTURE_FORMAT_R8) == 0)
    {
        return R8;
    }
    throw std::runtime_error("Unknown texture format");
}

uint32_t VTConfig::get_size_ram_cache() const { return _size_ram_cache; }
void VTConfig::set_defaults()
{
    _size_tile = 256;
    _size_padding = 1;
    _size_physical_texture = 4096;
    _size_physical_update_throughput = 4;
    _size_ram_cache = 16384;
    _format_texture = FORMAT_TEXTURE::RGB8;
    _verbose = false;

    define_size_physical_texture(64, 8192);
}
void VTConfig::set_size_tile(uint16_t sizeTile) { _size_tile = sizeTile; }
void VTConfig::set_size_padding(uint16_t sizePadding) { _size_padding = sizePadding; }
void VTConfig::set_size_physical_texture(uint32_t sizePhysicalTexture) { _size_physical_texture = sizePhysicalTexture; }
void VTConfig::set_size_physical_update_throughput(uint32_t sizePhysicalUpdateThroughput) { _size_physical_update_throughput = sizePhysicalUpdateThroughput; }
void VTConfig::set_size_ram_cache(uint32_t sizeRamCache) { _size_ram_cache = sizeRamCache; }
void VTConfig::set_format_texture(VTConfig::FORMAT_TEXTURE formatTexture) { _format_texture = formatTexture; }
void VTConfig::set_verbose(bool verbose) { _verbose = verbose; }
} // namespace vt


text:
package models.Studenten;

import org.skife.jdbi.v2.DBI;
import org.skife.jdbi.v2.Handle;
import play.db.DB;

/**
 * Created by Manuel on 27.11.2014.
 */

public class Studenten {
    public static String dbName = "r_Studenten"; // fuer Studierende
    private String semester;
    private String studiengang;
    private int dm; //Deutsche männlich
    private int dw; // Deutsche weiblich
    private int am; // Ausländer männlich
    private int aw; // Ausländer weiblich

    /**
     * Konstruktor der Klasse Studenten
     * @param semester
     * @param studiengang
     * @param dm
     * @param dw
     * @param am
     * @param aw
     */
    public Studenten(String semester, String studiengang, int dm, int dw, int am, int aw){
        this.semester = semester;
        this.studiengang = studiengang;
        this.dm = dm;
        this.dw = dw;
        this.am = am;
        this.aw = aw;
    }

    /**
     * Methode, welche eine Instanz der Klasse Studenten in die SQL-Tabelle von dbName einfügt, hier Tabelle "Studenten"
     */
    public void toDBEntry(){
        DBI dbi = new DBI(DB.getDataSource("sem"));
        Handle h = dbi.open();
        String insert = "Insert INTO " + dbName + "(Semester, Studiengang, MaennlichDeutsch, WeiblichDeutsch, MaennlichAuslaender, WeiblichAuslaender) values (?, ?, ?, ?, ?, ?)";
        h.execute(insert, this.semester, this.studiengang, this.dm, this.dw,this.am,this.aw);
        h.close();
    }

    /**
     * Methode für Testzwecke/ Ausgabe eines Objektes der Klasse Studenten in der Standardfehlerausgabe
     * @return
     */
    public String toString(){
        StringBuilder builder = new StringBuilder("Semester:");
        builder.append(this.semester).append("||Studiengang:")
                .append(this.studiengang).append("||Deutsche männlich:")
                .append(this.dm).append("||Deutsche weiblich:")
                .append(this.dw).append("||Ausländer männlich:")
                .append(this.am).append("||Ausländer weiblich:")
                .append(this.aw);
        return builder.toString();
    }

}


text:
package com.att.dao.aaf.test;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

import java.io.IOException;
import java.math.BigInteger;
import java.nio.ByteBuffer;
import java.security.NoSuchAlgorithmException;
import java.util.List;

import org.junit.Test;

import com.att.authz.layer.Result;
import com.att.dao.aaf.cass.CertDAO;
import com.att.dao.aaf.cass.CertDAO.Data;
import com.att.inno.env.APIException;

/**
 * UserDAO unit test.
 * User: tp007s
 * Date: 7/19/13
 */
public class JU_CertDAO  extends AbsJUCass {
	@Test
	public void test() throws IOException, NoSuchAlgorithmException, APIException {
		CertDAO cdao = new CertDAO(trans,cluster,"authz");
		try {
			// Create
	        CertDAO.Data data = new CertDAO.Data();
	        data.serial=new BigInteger("11839383");
	        data.id = "m55555@tguard.att.com";
	        data.x500="CN=ju_cert.dao.att.com, OU=AAF, O=\"ATT Services, Inc.\", L=Southfield, ST=Michigan, C=US";
	        data.x509="I'm a cert";
	        data.ca = "aaf";
			cdao.create(trans,data);

//	        Bytification
	        ByteBuffer bb = data.bytify();
	        Data bdata = new CertDAO.Data();
	        bdata.reconstitute(bb);
	        checkData1(data, bdata);

			// Validate Read with key fields in Data
			Result<List<CertDAO.Data>> rlcd = cdao.read(trans,data);
			assertTrue(rlcd.isOKhasData());
			for(CertDAO.Data d : rlcd.value) {
				checkData1(data,d);
			}

			// Validate Read with key fields in Data
			rlcd = cdao.read(trans,data.ca,data.serial);
			assertTrue(rlcd.isOKhasData());
			for(CertDAO.Data d : rlcd.value) {
				checkData1(data,d);
			}

			// Update
			data.id = "m66666.tguard.att.com";
			cdao.update(trans,data);
			rlcd = cdao.read(trans,data);
			assertTrue(rlcd.isOKhasData());
			for(CertDAO.Data d : rlcd.value) {
				checkData1(data,d);
			}

			cdao.delete(trans,data, true);
		} finally {
			cdao.close(trans);
		}

	}

	private void checkData1(Data data, Data d) {
		assertEquals(data.ca,d.ca);
		assertEquals(data.serial,d.serial);
		assertEquals(data.id,d.id);
		assertEquals(data.x500,d.x500);
		assertEquals(data.x509,d.x509);
	}

}


text:
{-# LANGUAGE TypeFamilies #-}

{-# OPTIONS_GHC -fno-warn-orphans #-}

-- | Execution mode for tx creation tests.

module Test.Pos.Client.Txp.Mode
       ( TxpTestProperty
       , TxpTestMode
       , withBVData
       ) where

import           Universum

import qualified Data.ByteString as BS
import           Test.QuickCheck (Testable (..), ioProperty)
import           Test.QuickCheck.Monadic (PropertyM, monadic)

import           Pos.Chain.Update (BlockVersionData)
import           Pos.Client.Txp.Addresses (MonadAddresses (..))
import           Pos.Core (Address, makePubKeyAddressBoot)
import           Pos.Core.NetworkMagic (NetworkMagic (..))
import           Pos.Crypto (deterministicKeyGen)
import           Pos.DB (MonadGState (..))

import           Test.Pos.Chain.Genesis.Dummy (dummyBlockVersionData)

----------------------------------------------------------------------------
-- Mock for TxCreateMode
----------------------------------------------------------------------------

type TxpTestMode = ReaderT BlockVersionData IO

----------------------------------------------------------------------------
-- Boilerplate TxpTestMode instances
----------------------------------------------------------------------------

instance MonadGState TxpTestMode where
    gsAdoptedBVData = ask

instance MonadAddresses TxpTestMode where
    type AddrData TxpTestMode = ()
    getNewAddress nm _ _ = pure (fakeAddressForMonadAddresses nm)
    getFakeChangeAddress nm _ = pure (fakeAddressForMonadAddresses nm)

fakeAddressForMonadAddresses :: NetworkMagic -> Address
fakeAddressForMonadAddresses nm = address
  where
    -- seed for address generation is a ByteString with 32 255's
    seedSize = 32
    seed = BS.replicate seedSize (255 :: Word8)
    address = makePubKeyAddressBoot nm $ fst $ deterministicKeyGen seed

withBVData
  :: MonadReader BlockVersionData m
  => BlockVersionData
  -> m a
  -> m a
withBVData bvd = local (const bvd)

----------------------------------------------------------------------------
-- Property
----------------------------------------------------------------------------

type TxpTestProperty = PropertyM TxpTestMode

-- Cannot write a general OVERLAPPABLE instance with MonadTrans since
-- type families cannot be OVERLAPPABLE.
instance MonadAddresses TxpTestProperty where
    type AddrData TxpTestProperty = AddrData TxpTestMode
    getNewAddress nm epochSlots = lift . (getNewAddress nm epochSlots)
    getFakeChangeAddress nm = lift . (getFakeChangeAddress nm)

instance Testable a => Testable (TxpTestProperty a) where
    property = monadic (ioProperty . flip runReaderT dummyBlockVersionData)


text:
package org.apache.servicecomb.router.exception;

/**
 * @Author GuoYl123
 * @Date 2019/11/4
 **/
public class RouterIllegalParamException extends RuntimeException {

  private static final long serialVersionUID = 4359709211352400087L;

  public RouterIllegalParamException(String message) {
    super(message);
  }

  public RouterIllegalParamException(String message, Throwable cause) {
    super(message, cause);
  }
}


text:
package org.apache.qpid.proton.message;

public class MessageFormatException extends RuntimeException
{
    public MessageFormatException(String message, CharSequence value)
    {
        super(message + ": "+ value);
    }
}


text:
@protocol BCOQueryResultGroup <NSObject>

@property(nonatomic, readonly) id identifier;

@property(nonatomic, readonly) id result;

@property(nonatomic, readonly) NSUInteger numberOfObjects;
@property(nonatomic, readonly) NSArray *objects;

@end


text:
package org.usfirst.frc2832.Robot_2015.commands;
import org.usfirst.frc2832.Robot_2015.subsystems.LiftControl;

import edu.wpi.first.wpilibj.command.CommandGroup;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;

/**
 *Drops the stack at a specific level.
 *level 0 = bottom level
 *level 1 = scoring platform level
 *level 2 = placing on top of a tote on the ground
 */
public class DropStack extends CommandGroup implements Instruction {

	public enum DropType {
		ground, platform, tote;
	}

	/**
	 *Drops the stack at a specific level.
	 *level 0 = bottom level
	 *level 1 = scoring platform level
	 *level 2 = placing on top of a tote on the ground
	 */
    public  DropStack(DropType drop) {
    	switch (drop) {
    	case ground:
    		addSequential (new SetForkPosition(0));
    		break;
    	case platform:
    		addSequential (new SetForkPosition(0.06));//the level of the scoring platform
    		break;
    	case tote:
    		addSequential(new SetForkPosition(LiftControl.metersToLevel[1]));
    		break;
    	}
    	addSequential(new OpenFork());
        // Add Commands here:
        // e.g. addSequential(new Command1());
        //      addSequential(new Command2());
        // these will run in order.

        // To run multiple commands at the same time,
        // use addParallel()
        // e.g. addParallel(new Command1());
        //      addSequential(new Command2());
        // Command1 and Command2 will run in parallel.

        // A command group will require all of the subsystems that each member
        // would require.
        // e.g. if Command1 requires chassis, and Command2 requires arm,
        // a CommandGroup containing them would require both the chassis and the
        // arm.
    }
}


text:
using namespace std;
using namespace impala_udf;

namespace impala {

AnyVal* CreateAnyVal(ObjectPool* pool, const ColumnType& type) {
  switch(type.type) {
    case TYPE_NULL: return pool->Add(new AnyVal);
    case TYPE_BOOLEAN: return pool->Add(new BooleanVal);
    case TYPE_TINYINT: return pool->Add(new TinyIntVal);
    case TYPE_SMALLINT: return pool->Add(new SmallIntVal);
    case TYPE_INT: return pool->Add(new IntVal);
    case TYPE_BIGINT: return pool->Add(new BigIntVal);
    case TYPE_FLOAT: return pool->Add(new FloatVal);
    case TYPE_DOUBLE: return pool->Add(new DoubleVal);
    case TYPE_STRING: return pool->Add(new StringVal);
    case TYPE_TIMESTAMP: return pool->Add(new TimestampVal);
    case TYPE_DECIMAL: return pool->Add(new DecimalVal);
    default:
      DCHECK(false) << "Unsupported type: " << type;
      return NULL;
  }
}

void AnyValUtil::ColumnTypeToTypeDesc(
    const ColumnType& type, FunctionContext::TypeDesc* out) {
  switch (type.type) {
    case TYPE_BOOLEAN:
      out->type = FunctionContext::TYPE_BOOLEAN;
      break;
    case TYPE_TINYINT:
      out->type = FunctionContext::TYPE_TINYINT;
      break;
    case TYPE_SMALLINT:
      out->type = FunctionContext::TYPE_SMALLINT;
      break;
    case TYPE_INT:
      out->type = FunctionContext::TYPE_INT;
      break;
    case TYPE_BIGINT:
      out->type = FunctionContext::TYPE_BIGINT;
      break;
    case TYPE_FLOAT:
      out->type = FunctionContext::TYPE_FLOAT;
      break;
    case TYPE_DOUBLE:
      out->type = FunctionContext::TYPE_DOUBLE;
      break;
    case TYPE_TIMESTAMP:
      out->type = FunctionContext::TYPE_TIMESTAMP;
      break;
    case TYPE_STRING:
      out->type = FunctionContext::TYPE_STRING;
      break;
    case TYPE_CHAR:
      out->type = FunctionContext::TYPE_FIXED_BUFFER;
      break;
    case TYPE_DECIMAL:
      out->type = FunctionContext::TYPE_DECIMAL;
      out->precision = type.precision;
      out->scale = type.scale;
      break;
    default:
      DCHECK(false) << "Unknown type: " << type;
  }
}

}