text:
package net.sf.antcontrib.logic.condition;

import java.lang.reflect.Field;
import java.util.Vector;

import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.taskdefs.condition.Condition;
import org.apache.tools.ant.taskdefs.condition.ConditionBase;

/**
 * Extends ConditionBase so I can get access to the condition count and the
 * first condition. This is the class that the BooleanConditionTask is proxy
 * for.
 *
Developed for use with Antelope, migrated to ant-contrib Oct 2003.

 *
 * @author Dale Anson
 */
public class BooleanConditionBase extends ConditionBase {
    /**
     * Field conditions.
     */
    @SuppressWarnings("unused")
    private Vector<Condition> conditions = new Vector<Condition>();

    /**
     * Constructor.
     *
     * Copies parent conditions.
     */
    public BooleanConditionBase() {
        conditions = getParentConditions();
    }

    @SuppressWarnings("unchecked")
    private Vector<Condition> getParentConditions() {
        try {
            Field f = ConditionBase.class.getDeclaredField("conditions");
            f.setAccessible(true);
            return (Vector<Condition>) f.get(this);
        } catch (NoSuchFieldException e) {
            throw new BuildException(e);
        } catch (IllegalAccessException e) {
            throw new BuildException(e);
        }
    }

    /**
     * Adds a feature to the IsPropertyTrue attribute of the
     * BooleanConditionBase object.
     *
     * @param i The feature to be added to the IsPropertyTrue attribute
     */
    public void addIsPropertyTrue(IsPropertyTrue i) {
        super.add(i);
    }

    /**
     * Adds a feature to the IsPropertyFalse attribute of the
     * BooleanConditionBase object.
     *
     * @param i The feature to be added to the IsPropertyFalse attribute
     */
    public void addIsPropertyFalse(IsPropertyFalse i) {
        super.add(i);
    }

    /**
     * Method addIsGreaterThan.
     *
     * @param i IsGreaterThan
     */
    public void addIsGreaterThan(IsGreaterThan i) {
        super.add(i);
    }

    /**
     * Method addIsLessThan.
     *
     * @param i IsLessThan
     */
    public void addIsLessThan(IsLessThan i) {
        super.add(i);
    }
}


text:
package org.datavec.local.transforms.transform;

import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.datavec.api.transform.Transform;
import org.datavec.api.writable.Writable;
import org.datavec.local.transforms.LocalTransformExecutor;
import org.nd4j.linalg.function.Function;

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

/**
 * Created by Alex on 5/03/2016.
 */
@AllArgsConstructor
@Slf4j
public class LocalTransformFunction implements Function<List<Writable>, List<Writable>> {

    private final Transform transform;

    @Override
    public List<Writable> apply(List<Writable> v1) {
        if (LocalTransformExecutor.isTryCatch()) {
            try {
                return transform.map(v1);
            } catch (Exception e) {
                log.warn("Error occurred " + e + " on record " + v1);
                return new ArrayList<>();
            }
        }
        return transform.map(v1);
    }
}

redpajama_set_name: RedPajamaGithub


text:
#region License

//   Copyright 2010 John Sheehan
//
//   Licensed under the Apache License, Version 2.0 (the "License");
//   you may not use this file except in compliance with the License.
//   You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
//   Unless required by applicable law or agreed to in writing, software
//   distributed under the License is distributed on an "AS IS" BASIS,
//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//   See the License for the specific language governing permissions and
//   limitations under the License.

#endregion

namespace RestSharp
{
    /// <summary>
    /// Parameter container for REST requests
    /// </summary>
    public class Parameter
    {
        /// <summary>
        /// Name of the parameter
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Value of the parameter
        /// </summary>
        public object Value { get; set; }

        /// <summary>
        /// Type of the parameter
        /// </summary>
        public ParameterType Type { get; set; }

        /// <summary>
        /// MIME content type of the parameter
        /// </summary>
        public string ContentType { get; set; }

        /// <summary>
        /// Return a human-readable representation of this parameter
        /// </summary>
        /// <returns>String</returns>
        public override string ToString()
        {
            return string.Format("{0}={1}", this.Name, this.Value);
        }
    }
}


text:
package javax.crypto;

import java.security.Key;
import java.security.SecureRandom;
import java.security.InvalidKeyException;
import java.security.AlgorithmParameters;
import java.security.NoSuchAlgorithmException;
import java.security.InvalidAlgorithmParameterException;
import java.security.spec.AlgorithmParameterSpec;

/**
 * This class defines the Service Provider Interface (SPI)
 * for the Cipher class.
 * All the abstract methods in this class must be implemented by each
 * cryptographic service provider who wishes to supply the implementation
 * of a particular cipher algorithm.
 *

 * In order to create an instance of Cipher, which
 * encapsulates an instance of this CipherSpi class, an
 * application calls one of the
 * getInstance
 * factory methods of the
 * Cipher engine class and specifies the requested
 * transformation.
 * Optionally, the application may also specify the name of a provider.
 *

 * A transformation is a string that describes the operation (or
 * set of operations) to be performed on the given input, to produce some
 * output. A transformation always includes the name of a cryptographic
 * algorithm (e.g., DES), and may be followed by a feedback mode and
 * padding scheme.
 *

 * A transformation is of the form:
 *

 *

 *
"algorithm/mode/padding" or
 *

 *
"algorithm"
 *

 *
 *
 (in the latter case,
 * provider-specific default values for the mode and padding scheme are used).
 * For example, the following is a valid transformation:

 *
 *

 *     Cipher c = Cipher.getInstance("DES/CBC/PKCS5Padding");
 *

 *
 *
A provider may supply a separate class for each combination
 * of algorithm/mode/padding, or may decide to provide more generic
 * classes representing sub-transformations corresponding to
 * algorithm or algorithm/mode or algorithm//padding
 * (note the double slashes),
 * in which case the requested mode and/or padding are set automatically by
 * the getInstance methods of Cipher, which invoke
 * the engineSetMode and
 * engineSetPadding
 * methods of the provider's subclass of CipherSpi.
 *
 *
A Cipher property in a provider master class may have one of
 * the following formats:
 *
 *

 *
 *

 *

 *     // provider's subclass of "CipherSpi" implements "algName" with
 *     // pluggable mode and padding
 *     Cipher.algName
 *

 *
 *

 *

 *     // provider's subclass of "CipherSpi" implements "algName" in the
 *     // specified "mode", with pluggable padding
 *     Cipher.algName/mode
 *

 *
 *

 *

 *    // provider's subclass of "CipherSpi" implements "algName" with the
 *    // specified "padding", with pluggable mode
 *    Cipher.algName//padding
 *

 *
 *

 *

 *    // provider's subclass of "CipherSpi" implements "algName" with the
 *    // specified "mode" and "padding"
 *    Cipher.algName/mode/padding
 *

 *
 *

 *
 *
For example, a provider may supply a subclass of CipherSpi
 * that implements DES/ECB/PKCS5Padding, one that implements
 * DES/CBC/PKCS5Padding, one that implements
 * DES/CFB/PKCS5Padding, and yet another one that implements
 * DES/OFB/PKCS5Padding. That provider would have the following
 * Cipher properties in its master class:

 *
 *

 *
 *

 *

 *    Cipher.DES/ECB/PKCS5Padding
 *

 *
 *

 *

 *    Cipher.DES/CBC/PKCS5Padding
 *

 *
 *

 *

 *    Cipher.DES/CFB/PKCS5Padding
 *

 *
 *

 *

 *    Cipher.DES/OFB/PKCS5Padding
 *

 *
 *

 *
 *
Another provider may implement a class for each of the above modes
 * (i.e., one class for ECB, one for CBC, one for CFB,
 * and one for OFB), one class for PKCS5Padding,
 * and a generic DES class that subclasses from CipherSpi.
 * That provider would have the following
 * Cipher properties in its master class:

 *
 *

 *
 *

 *

 *    Cipher.DES
 *

 *
 *

 *
 *
The getInstance factory method of the Cipher
 * engine class follows these rules in order to instantiate a provider's
 * implementation of CipherSpi for a
 * transformation of the form "algorithm":
 *
 *

 *

 * Check if the provider has registered a subclass of CipherSpi
 * for the specified "algorithm".
 *
If the answer is YES, instantiate this
 * class, for whose mode and padding scheme default values (as supplied by
 * the provider) are used.
 *
If the answer is NO, throw a NoSuchAlgorithmException
 * exception.
 *

 *
 *
The getInstance factory method of the Cipher
 * engine class follows these rules in order to instantiate a provider's
 * implementation of CipherSpi for a
 * transformation of the form "algorithm/mode/padding":
 *
 *

 *

 * Check if the provider has registered a subclass of CipherSpi
 * for the specified "algorithm/mode/padding" transformation.
 *
If the answer is YES, instantiate it.
 *
If the answer is NO, go to the next step.

 *

 * Check if the provider has registered a subclass of CipherSpi
 * for the sub-transformation "algorithm/mode".
 *
If the answer is YES, instantiate it, and call
 * engineSetPadding(padding) on the new instance.
 *
If the answer is NO, go to the next step.

 *

 * Check if the provider has registered a subclass of CipherSpi
 * for the sub-transformation "algorithm//padding" (note the double
 * slashes).
 *
If the answer is YES, instantiate it, and call
 * engineSetMode(mode) on the new instance.
 *
If the answer is NO, go to the next step.

 *

 * Check if the provider has registered a subclass of CipherSpi
 * for the sub-transformation "algorithm".
 *
If the answer is YES, instantiate it, and call
 * engineSetMode(mode) and
 * engineSetPadding(padding) on the new instance.
 *
If the answer is NO, throw a NoSuchAlgorithmException
 * exception.
 *

 *
 * @see KeyGenerator
 * @see SecretKey
 */
public abstract class CipherSpi
{
    public CipherSpi()
    {
    }

    /**
     * Sets the mode of this cipher.
     *
     * @param mode the cipher mode
     * @exception NoSuchAlgorithmException if the requested cipher mode does not exist
     */
    protected abstract void engineSetMode(
        String  mode)
    throws NoSuchAlgorithmException;

    /**
     * Sets the padding mechanism of this cipher.
     *
     * @param padding the padding mechanism
     * @exception NoSuchPaddingException if the requested padding mechanism does not exist
     */
    protected abstract void engineSetPadding(
        String  padding)
    throws NoSuchPaddingException;

    /**
     * Returns the block size (in bytes).
     *
     * @return the block size (in bytes), or 0 if the underlying algorithm is not a block cipher
     */
    protected abstract int engineGetBlockSize();

    /**
     * Returns the length in bytes that an output buffer would
     * need to be in order to hold the result of the next update
     * or doFinal operation, given the input length
     * inputLen (in bytes).
     *

     * This call takes into account any unprocessed (buffered) data from a
     * previous update call, and padding.
     *

     * The actual output length of the next update or
     * doFinal call may be smaller than the length returned by
     * this method.
     *
     * @param inputLen the input length (in bytes)
     * @return the required output buffer size (in bytes)
     */
    protected abstract int engineGetOutputSize(
        int  inputLen);

    /**
     * Returns the initialization vector (IV) in a new buffer.
     *

     * This is useful in the context of password-based encryption or
     * decryption, where the IV is derived from a user-provided passphrase.
     *
     * @return the initialization vector in a new buffer, or null if the
     * underlying algorithm does not use an IV, or if the IV has not yet
     * been set.
     */
    protected abstract byte[] engineGetIV();

    /**
     * Returns the parameters used with this cipher.
     *

     * The returned parameters may be the same that were used to initialize
     * this cipher, or may contain a combination of default and random
     * parameter values used by the underlying cipher implementation if this
     * cipher requires algorithm parameters but was not initialized with any.
     *
     * @return the parameters used with this cipher, or null if this cipher
     * does not use any parameters.
     */
    protected abstract AlgorithmParameters engineGetParameters();

    /**
     * Initializes this cipher with a key and a source
     * of randomness.
     *

     * The cipher is initialized for one of the following four operations:
     * encryption, decryption, key wrapping or key unwrapping, depending on
     * the value of opmode.
     *

     * If this cipher requires any algorithm parameters that cannot be
     * derived from the given key, the underlying cipher
     * implementation is supposed to generate the required parameters itself
     * (using provider-specific default or random values) if it is being
     * initialized for encryption or key wrapping, and raise an
     * InvalidKeyException if it is being
     * initialized for decryption or key unwrapping.
     * The generated parameters can be retrieved using
     * engineGetParameters or
     * engineGetIV (if the parameter is an IV).
     *

     * If this cipher (including its underlying feedback or padding scheme)
     * requires any random bytes (e.g., for parameter generation), it will get
     * them from random.
     *
     *
Note that when a Cipher object is initialized, it loses all
     * previously-acquired state. In other words, initializing a Cipher is
     * equivalent to creating a new instance of that Cipher and initializing
     * it.
     * @param opmode the operation mode of this cipher (this is one of
     * the following:
     * ENCRYPT_MODE, DECRYPT_MODE,
     * WRAP_MODE or UNWRAP_MODE)
     * @param key the encryption key
     * @param random the source of randomness
     * @exception InvalidKeyException if the given key is inappropriate for
     * initializing this cipher, or if this cipher is being initialized for
     * decryption and requires algorithm parameters that cannot be
     * determined from the given key.
     */
    protected abstract void engineInit(
        int             opmode,
        Key             key,
        SecureRandom    random)
    throws InvalidKeyException;

    /**
     * Initializes this cipher with a key, a set of
     * algorithm parameters, and a source of randomness.
     *

     * The cipher is initialized for one of the following four operations:
     * encryption, decryption, key wrapping or key unwrapping, depending on
     * the value of opmode.
     *

     * If this cipher requires any algorithm parameters and
     *  params is null, the underlying cipher implementation is
     * supposed to generate the required parameters itself (using
     * provider-specific default or random values) if it is being
     * initialized for encryption or key wrapping, and raise an
     * InvalidAlgorithmParameterException if it is being
     * initialized for decryption or key unwrapping.
     * The generated parameters can be retrieved using
     * engineGetParameters or
     * engineGetIV (if the parameter is an IV).
     *

     * If this cipher (including its underlying feedback or padding scheme)
     * requires any random bytes (e.g., for parameter generation), it will get
     * them from random.
     *

     * Note that when a Cipher object is initialized, it loses all
     * previously-acquired state. In other words, initializing a Cipher is
     * equivalent to creating a new instance of that Cipher and initializing
     * it.
     *
     * @param opmode the operation mode of this cipher (this is one of the following:
     * ENCRYPT_MODE, DECRYPT_MODE,
     * WRAP_MODE or UNWRAP_MODE)
     * @param key the encryption key
     * @param params the algorithm parameters
     * @param random the source of randomness
     * @exception InvalidKeyException if the given key is inappropriate for initializing this cipher
     * @exception InvalidAlgorithmParameterException if the given algorithm parameters are inappropriate
     * for this cipher, or if this cipher is being initialized for decryption and requires
     * algorithm parameters and params is null.
     */
    protected abstract void engineInit(
        int                     opmode,
        Key                     key,
        AlgorithmParameterSpec  params,
        SecureRandom            random)
    throws InvalidKeyException, InvalidAlgorithmParameterException;

    /**
     * Initializes this cipher with a key, a set of
     * algorithm parameters, and a source of randomness.
     *

     * The cipher is initialized for one of the following four operations:
     * encryption, decryption, key wrapping or key unwrapping, depending on
     * the value of opmode.
     *

     * If this cipher requires any algorithm parameters and
     * params is null, the underlying cipher implementation is
     * supposed to generate the required parameters itself (using
     * provider-specific default or random values) if it is being
     * initialized for encryption or key wrapping, and raise an
     * InvalidAlgorithmParameterException if it is being
     * initialized for decryption or key unwrapping.
     * The generated parameters can be retrieved using
     * engineGetParameters or
     * engineGetIV (if the parameter is an IV).
     *

     * If this cipher (including its underlying feedback or padding scheme)
     * requires any random bytes (e.g., for parameter generation), it will get
     * them from random.
     *

     * Note that when a Cipher object is initialized, it loses all
     * previously-acquired state. In other words, initializing a Cipher is
     * equivalent to creating a new instance of that Cipher and initializing it.
     *
     * @param opmode the operation mode of this cipher (this is one of the following:
     * ENCRYPT_MODE, DECRYPT_MODE, WRAP_MODE
     * or UNWRAP_MODE)
     * @param key the encryption key
     * @param params the algorithm parameters
     * @param random the source of randomness
     * @exception InvalidKeyException if the given key is inappropriate for initializing this cipher
     * @exception InvalidAlgorithmParameterException if the given algorithm parameters are inappropriate
     * for this cipher, or if this cipher is being initialized for decryption and requires
     * algorithm parameters and params is null.
     */
    protected abstract void engineInit(
        int                 opmode,
        Key                 key,
        AlgorithmParameters params,
        SecureRandom        random)
    throws InvalidKeyException, InvalidAlgorithmParameterException;

    /**
     * Continues a multiple-part encryption or decryption operation
     * (depending on how this cipher was initialized), processing another data
     * part.
     *

     * The first inputLen bytes in the input
     * buffer, starting at inputOffset inclusive, are processed,
     * and the result is stored in a new buffer.
     *
     * @param input the input buffer
     * @param inputOffset the offset in input where the input starts
     * @param inputLen the input length
     * @return the new buffer with the result, or null if the underlying cipher is a
     * block cipher and the input data is too short to result in a new block.
     */
    protected abstract byte[] engineUpdate(
        byte[]      input,
        int         inputOffset,
        int         inputLen);

    /**
     * Continues a multiple-part encryption or decryption operation
     * (depending on how this cipher was initialized), processing another data
     * part.
     *

     * The first inputLen bytes in the input
     * buffer, starting at inputOffset inclusive, are processed,
     * and the result is stored in the output buffer, starting at
     * outputOffset inclusive.
     *

     * If the output buffer is too small to hold the result,
     * a ShortBufferException is thrown.
     *
     * @param input the input buffer
     * @param inputOffset the offset in input where the input starts
     * @param inputLen the input length
     * @param output the buffer for the result
     * @param outputOffset the offset in output where the result is stored
     * @return the number of bytes stored in output
     * @exception ShortBufferException if the given output buffer is too small to hold the result
     */
    protected abstract int engineUpdate(
        byte[]      input,
        int         inputOffset,
        int         inputLen,
        byte[]      output,
        int         outputOffset)
    throws ShortBufferException;

    /**
     * Encrypts or decrypts data in a single-part operation, or finishes a multiple-part operation.
     * The data is encrypted or decrypted, depending on how this cipher was initialized.
     *

     * The first inputLen bytes in the input
     * buffer, starting at inputOffset inclusive, and any input
     * bytes that may have been buffered during a previous update
     * operation, are processed, with padding (if requested) being applied.
     * The result is stored in a new buffer.
     *

     * A call to this method resets this cipher object to the state
     * it was in when previously initialized via a call to engineInit.
     * That is, the object is reset and available to encrypt or decrypt
     * (depending on the operation mode that was specified in the call to
     * engineInit) more data.
     *
     * @param input the input buffer
     * @param inputOffset the offset in input where the input starts
     * @param inputLen the input length
     * @return the new buffer with the result
     * @exception IllegalBlockSizeException if this cipher is a block cipher, no padding has been requested
     * (only in encryption mode), and the total input length of the data processed by this cipher is not a
     * multiple of block size
     * @exception BadPaddingException  if this cipher is in decryption mode, and (un)padding has been requested,
     * but the decrypted data is not bounded by the appropriate padding bytes
     */
    protected abstract byte[] engineDoFinal(
        byte[]      input,
        int         inputOffset,
        int         inputLen)
    throws IllegalBlockSizeException, BadPaddingException;

    /**
     * Encrypts or decrypts data in a single-part operation,
     * or finishes a multiple-part operation.
     * The data is encrypted or decrypted, depending on how this cipher was
     * initialized.
     *

     * The first inputLen bytes in the input
     * buffer, starting at inputOffset inclusive, and any input
     * bytes that may have been buffered during a previous update
     * operation, are processed, with padding (if requested) being applied.
     * The result is stored in the output buffer, starting at
     * outputOffset inclusive.
     *

     * If the output buffer is too small to hold the result,
     * a ShortBufferException is thrown.
     *

     * A call to this method resets this cipher object to the state
     * it was in when previously initialized via a call to
     * engineInit.
     * That is, the object is reset and available to encrypt or decrypt
     * (depending on the operation mode that was specified in the call to
     * engineInit) more data.
     *
     * @param input the input buffer
     * @param inputOffset the offset in input where the input starts
     * @param inputLen the input length
     * @param output the buffer for the result
     * @param outputOffset the offset in output where the result is stored
     * @return the number of bytes stored in output
     * @exception IllegalBlockSizeException if this cipher is a block cipher, no padding has been
     * requested (only in encryption mode), and the total input length of the data processed by this
     * cipher is not a multiple of block size
     * @exception ShortBufferException if the given output buffer is too small to hold the result
     * @exception BadPaddingException if this cipher is in decryption mode, and (un)padding has been requested,
     * but the decrypted data is not bounded by the appropriate padding bytes
     */
    protected abstract int engineDoFinal(
        byte[]      input,
        int         inputOffset,
        int         inputLen,
        byte[]      output,
        int         outputOffset)
    throws ShortBufferException, IllegalBlockSizeException, BadPaddingException;

    /**
     * Wrap a key.
     *

     * This concrete method has been added to this previously-defined
     * abstract class. (For backwards compatibility, it cannot be abstract.)
     * It may be overridden by a provider to wrap a key.
     * Such an override is expected to throw an IllegalBlockSizeException or
     * InvalidKeyException (under the specified circumstances),
     * if the given key cannot be wrapped.
     * If this method is not overridden, it always throws an
     * UnsupportedOperationException.
     *
     * @param key the key to be wrapped.
     * @return the wrapped key.
     * @exception IllegalBlockSizeException if this cipher is a block cipher, no padding has been requested,
     * and the length of the encoding of the key to be wrapped is not a multiple of the block size.
     * @exception InvalidKeyException if it is impossible or unsafe to wrap the key with this cipher (e.g.,
     * a hardware protected key is being passed to a software-only cipher).
     */
    protected byte[] engineWrap(
        Key     key)
    throws IllegalBlockSizeException, InvalidKeyException
    {
        throw new UnsupportedOperationException("Underlying cipher does not support key wrapping");
    }

    /**
     * Unwrap a previously wrapped key.
     *
     *
This concrete method has been added to this previously-defined
     * abstract class. (For backwards compatibility, it cannot be abstract.)
     * It may be overridden by a provider to unwrap a previously wrapped key.
     * Such an override is expected to throw an InvalidKeyException if
     * the given wrapped key cannot be unwrapped.
     * If this method is not overridden, it always throws an
     * UnsupportedOperationException.
     *
     * @param wrappedKey the key to be unwrapped.
     * @param wrappedKeyAlgorithm the algorithm associated with the wrapped key.
     * @param wrappedKeyType the type of the wrapped key. This is one of SECRET_KEY,
     * PRIVATE_KEY, or PUBLIC_KEY.
     * @return the unwrapped key.
     * @exception InvalidKeyException if wrappedKey does not represent a wrapped key,
     * or if the algorithm associated with the wrapped key is different from wrappedKeyAlgorithm
     * and/or its key type is different from wrappedKeyType.
     * @exception NoSuchAlgorithmException - if no installed providers can create keys for the
     * wrappedKeyAlgorithm.
     */
    protected java.security.Key engineUnwrap(
        byte[]  wrappedKey,
        String  wrappedKeyAlgorithm,
        int     wrappedKeyType)
    throws InvalidKeyException, NoSuchAlgorithmException
    {
        throw new UnsupportedOperationException("Underlying cipher does not support key unwrapping");
    }

    /**
     * Returns the key size of the given key object.
     *

     * This concrete method has been added to this previously-defined
     * abstract class. It throws an UnsupportedOperationException
     * if it is not overridden by the provider.
     *
     * @param key the key object.
     * @return the key size of the given key object.
     * @exception InvalidKeyException if key is invalid.
     */
    protected int engineGetKeySize(
        Key     key)
    throws InvalidKeyException
    {
        throw new UnsupportedOperationException("Key size unavailable");
    }
}


text:
// The MIT License (MIT)

// Copyright (c) 2014 Christopher Lillthors & Viktor Kronvall

// 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.

package main

import (
	"../Protocol"
	"bufio"
	"code.google.com/p/gcfg"
	"encoding/gob"
	"errors"
	"flag"
	"fmt"
	"github.com/ugorji/go/codec"
	"github.com/wsxiaoys/terminal/color"
	"io"
	"net"
	"os"
	"os/signal"
	"runtime"
	"strconv"
	"strings"
	"time"
)

//Configuration stuff.
var (
	configPath string
	prompt     = "Unicorn@ATM> "
	version    = 1.5
	author     = "Christopher Lillthors. Unicorn INC"
	address    = "Unicorn road 1337"
	mh         codec.MsgpackHandle //MessagePack
)

//Struct to hold all the configurations.
type Config struct {
	Client struct {
		Address string
		Port    string
	}
}

func init() {
	//For configurations.
	flag.StringVar(&configPath, "config", "client.gcfg", "Path to config file")
	flag.Parse()
	runtime.GOMAXPROCS(runtime.NumCPU()) //Use maximal number of cores.
}

func main() {
	//			Config area.
	/*---------------------------------------------------*/
	config := new(Config)
	var address string //holds the address to the server.
	var port string    //holds the port to the server.
	err := gcfg.ReadFileInto(config, configPath)
	checkError(err)
	address = config.Client.Address
	port = config.Client.Port
	address += ":" + port
	/*---------------------------------------------------*/

	//			Connection area
	/*---------------------------------------------------*/
	//Server has 30 seconds to respond.
	conn, err := net.DialTimeout("tcp", address, 30*time.Second)
	checkError(err)

	//For UNIX signal handling.
	c := make(chan os.Signal)      //A channel to listen on keyboard events.
	signal.Notify(c, os.Interrupt) //If user pressed CTRL - C.
	go cleanUp(c, &conn)

	inputCh := make(chan string)
	go listen(&conn, inputCh) //listen on keyboard events.

	reader := bufio.NewReader(os.Stdin)
	for {
		line, _ := reader.ReadString('\n')
		line = strings.TrimSpace(line)
		if line == "" {
			continue
		}
		inputCh <- line //listen on keyboard.
	}
}
func listen(conn *net.Conn, input chan string) {
	var counter int     //to increment the menu options.
	var language string //string to hold the language that the user choosed.
	decoder := gob.NewDecoder(*conn)
	menuconfig := new(Protocol.MenuConfig)

	color.Println("@{g}Downloading config files...")
	err := decoder.Decode(menuconfig) //
	checkError(err)
	color.Println("@{g}Config files downloaded\n")
	color.Println("\t\t\t\t@{b}Choose language")

	writeCh := make(chan *Protocol.Message) //send messages.
	readCh := make(chan *Protocol.Message)  //read messages.
	go readMessage(readCh, conn)            // function to listen to server.
	go writeMessage(writeCh, conn)          //function to write to server.

	//print out the different languages you can choose on the screen.
	for language, _ := range menuconfig.Menus {
		counter += 1
		color.Printf("@{g} %d) %s\n", counter, language)
	}

	//  1) Swedish
	//  2) English

	//User chooses languages.
	for {
		fmt.Print(prompt)
		language = <-input
		menu, ok := menuconfig.Menus[language]
		if !ok {
			color.Printf("@{r}%s\n", "Invalid input")
		} else {
			fmt.Println(strings.Join(menu.Menu, "\n"))
			break
		}
	}

	// ".................................................",
	// 		"UNICORN INC",
	// 		"1) Log in",
	// 		"2) Contact us",
	// 		"................................................."
K:
	for {
		fmt.Print(prompt)
		switch <-input {
		case "1":
			//user choosed "log in" Do something about it.
			err := login(input, writeCh, readCh) //handle login from user.
			if err != nil {
				//Login failed.
				color.Printf("@{r}%s\n", err.Error())
				color.Println("@{r}Please try again")
				continue
			}
			fmt.Println()
			fmt.Println(strings.Join(menuconfig.Menus[language].Login, "\n")) //print out the rest of the menu.
			break K                                                           //Break outer for loop.
		case "2":
			color.Printf("@{b}Version:%f\nAuthor:%s\nAddress:%s\n", version, author, address)
		default:
			color.Printf("@{r}%s\n", menuconfig.Menus[language].Invalid)
		}
	}

	// 	"1) Withdraw",
	// 	"2) Deposit",
	// 	"3) Balance"
	for {
		fmt.Print(prompt)
		switch <-input {
		case "1":
			err := bankHandler(Protocol.WithdrawStatusCode, input, writeCh, readCh)
			if err != nil {
				color.Printf("@{r}%s\n", err.Error())
				color.Println("@{r}Please try again")
				continue
			}
		case "2":
			err := bankHandler(Protocol.DepositStatusCode, input, writeCh, readCh)
			if err != nil {
				color.Printf("@{r}%s\n", err.Error())
				color.Println("@{r}Please try again")
				continue
			}
		case "3":
			err := bankHandler(Protocol.BalanceStatusCode, input, writeCh, readCh)
			if err != nil {
				color.Printf("@{r}%s\n", err.Error())
				color.Println("@{r}Please try again")
				continue
			}
		default:
			color.Printf("@{r}%s\n", menuconfig.Menus[language].Invalid)
		}
	}
}

func readMessage(readCh chan *Protocol.Message, conn *net.Conn) {
	decoder := codec.NewDecoder(*conn, &mh)
	for {
		message := new(Protocol.Message)
		err := decoder.Decode(message)
		if err == io.EOF {
			color.Printf("@{r}Server closed connection")
			os.Exit(1)
		}
		checkError(err)
		readCh <- message
	}
}

//write messages to the server.
func writeMessage(write chan *Protocol.Message, conn *net.Conn) {
	encoder := codec.NewEncoder(*conn, &mh)
	for {
		select {
		case message := <-write:
			err := encoder.Encode(message)
			if err != nil {
				color.Printf("@{r}%s", err.Error())
				break
			}
		}
	}
}

func bankHandler(code uint16, input chan string, writeCh, readCh chan *Protocol.Message) error {
	switch code {
	case Protocol.BalanceStatusCode:
		color.Println("@{b}Contacting bank... Please wait.")
		message := &Protocol.Message{
			Code: Protocol.BalanceStatusCode,
		}
		writeCh <- message
		response := <-readCh
		color.Printf("@{g}Your balance: %d\n", response.Payload)
	case Protocol.WithdrawStatusCode:
		color.Println("@{b}Please input your scratch code")
		fmt.Print(prompt)
		numString := <-input
		if Protocol.ScratchTest.MatchString(numString) {
			num, _ := strconv.Atoi(numString)
			if num%2 == 1 {
				color.Println("@{b}Please input the amount of money that you want to widthdraw.")
				fmt.Print(prompt)
				moneyString := <-input
				if Protocol.MoneyTest.MatchString(moneyString) {
					money, _ := strconv.Atoi(moneyString)
					message := &Protocol.Message{
						Code:    Protocol.WithdrawStatusCode,
						Payload: uint16(money),
					}
					color.Println("@{b}Contacting bank... Please wait.")
					writeCh <- message
					response := <-readCh
					if response.Code == Protocol.ResponseOK {
						color.Println("@{b}Status : @{g}OK")
					} else if response.Code == Protocol.ResponseMoneyProblem {
						color.Println("@{b}Status : @{r}Error:The amount of money was bigger than your balance.")
					}
				} else {
					return errors.New("Not a number!")
				}
			} else {
				return errors.New("Invalid scratch code.")
			}
		} else {
			return errors.New("Not a number!")
		}
	case Protocol.DepositStatusCode:
		color.Println("@{b}Please input the amount of money that you want to deposit.")
		fmt.Print(prompt)
		inputString := <-input
		if Protocol.MoneyTest.MatchString(inputString) {
			money, _ := strconv.Atoi(inputString)
			message := &Protocol.Message{
				Code:    Protocol.DepositStatusCode,
				Payload: uint16(money),
			}
			color.Println("@{b}Contacting bank... Please wait.")
			writeCh <- message
			<-readCh //wait for the response.
			color.Println("@{b}Status : @{g}OK")
		} else {
			return errors.New("Not a number!")
		}
	default:
		return errors.New("Unkown code.")
	}
	return nil
}

//input chan is for keyboard input.
func login(input chan string, writeCh, readCh chan *Protocol.Message) error {
	var cardNum, passNum string
	for {
		color.Println("@{gB}Input cardnumber.")
		fmt.Print(prompt)
		cardNum = <-input
		color.Println("@{gB}Input password.")
		fmt.Print(prompt)
		passNum = <-input
		if Protocol.CardnumberTest.MatchString(cardNum) && Protocol.PassnumberTest.MatchString(passNum) {
			break
		} else {
			color.Println("@{r}\nInvalid credentials. Please try again.")
		}
	}

	card, _ := strconv.Atoi(cardNum)
	pass, _ := strconv.Atoi(passNum)

	message := &Protocol.Message{
		Code:    Protocol.LoginStatusCode,
		Number:  uint16(card),
		Payload: uint16(pass),
	}
	writeCh <- message   //send message from server.
	response := <-readCh //read answer from server.
	if response.Code == Protocol.ResponseNotAccepted {
		return errors.New("You were not accepted")
	} else if response.Code == Protocol.ResponseAlreadyLoggedIn {
		return errors.New("Already logged in")
	}
	color.Printf("@{gB}You were granted access.")
	return nil
}

func cleanUp(c chan os.Signal, conn *net.Conn) {
	<-c
	(*conn).Close() //close connection.
	fmt.Fprintln(os.Stderr, "\nThank you for using a ATM from Unicorn INC")
	os.Exit(1)
}

//Convinience function.
func checkError(err error) {
	if err != nil {
		color.Printf("@{r}Fatal error: %s\n", err.Error())
		os.Exit(1)
	}
}


text:
"""fixml.py -- A tool to fix broken Robot Framework output files

Usage:  fixml.py inpath outpath

This tool can fix Robot Framework output files that are not properly finished
or are missing elements from the middle. It should be possible to generate
reports and logs from the fixed output afterwards with the `rebot` tool.

The tool uses BeautifulSoup module which must be installed separately.
See http://www.crummy.com/software/BeautifulSoup for more information.
Additionally, the tool is only compatible with Robot Framework 2.1.3 or newer.
"""

from __future__ import with_statement
import sys
import os
try:
    from BeautifulSoup import BeautifulStoneSoup
except ImportError:
    raise ImportError('fixml.py requires BeautifulSoup to be installed: '
                      'http://www.crummy.com/software/BeautifulSoup/')

class Fixxxer(BeautifulStoneSoup):
    NESTABLE_TAGS = {'suite': ['robot','suite', 'statistics'],
                     'doc': ['suite', 'test', 'kw'],
                     'metadata': ['suite'],
                     'item': ['metadata'],
                     'status': ['suite', 'test', 'kw'],
                     'test': ['suite'],
                     'tags': ['test'],
                     'tag': ['tags'],
                     'kw': ['suite', 'test', 'kw'],
                     'msg': ['kw', 'errors'],
                     'arguments': ['kw'],
                     'arg': ['arguments'],
                     'statistics': ['robot'],
                     'errors': ['robot']}
    __close_on_open = None

    def unknown_starttag(self, name, attrs, selfClosing=0):
        if name == 'robot':
            attrs = [(key, value if key != 'generator' else 'fixml.py')
                     for key, value in attrs]
        if name == 'kw' and ('type', 'teardown') in attrs:
            while self.tagStack[-1].name not in ['test', 'suite']:
                self._popToTag(self.tagStack[-1].name)
        if self.__close_on_open:
            self._popToTag(self.__close_on_open)
            self.__close_on_open = None
        BeautifulStoneSoup.unknown_starttag(self, name, attrs, selfClosing)

    def unknown_endtag(self, name):
        BeautifulStoneSoup.unknown_endtag(self, name)
        if name == 'status':
            self.__close_on_open = self.tagStack[-1].name
        else:
            self.__close_on_open = None

def main(inpath, outpath):
    with open(inpath) as infile:
        with open(outpath, 'w') as outfile:
            outfile.write(str(Fixxxer(infile)))
    return outpath

if __name__ == '__main__':
    try:
        outpath = main(*sys.argv[1:])
    except TypeError:
        print __doc__
    else:
        print os.path.abspath(outpath)


text:
import re
import uuid

from nose.plugins.attrib import attr

from test_base import TestBase
from tests.st.utils.docker_host import (DockerHost,
                                                          CommandExecError)
from tests.st.utils.utils import retry_until_success
from functools import partial

class TestBGPConfig(TestBase):

    @attr('slow')
    def test_defaults(self):
        """
        Test default BGP configuration commands.
        """
        with DockerHost('host', start_calico=False, dind=False) as host:
            # Check default AS command
            self.assertEquals(host.calicoctl("default-node-as"), "64511")
            host.calicoctl("default-node-as 12345")
            self.assertEquals(host.calicoctl("default-node-as"), "12345")
            with self.assertRaises(CommandExecError):
                host.calicoctl("default-node-as 99999999999999999999999")
            with self.assertRaises(CommandExecError):
                host.calicoctl("default-node-as abcde")

            # Check BGP mesh command
            self.assertEquals(host.calicoctl("bgp-node-mesh"), "on")
            host.calicoctl("bgp-node-mesh off")
            self.assertEquals(host.calicoctl("bgp-node-mesh"), "off")
            host.calicoctl("bgp-node-mesh on")
            self.assertEquals(host.calicoctl("bgp-node-mesh"), "on")

    @attr('slow')
    def test_as_num(self):
        """
        Test using different AS number for the node-to-node mesh.

        We run a multi-host test for this as we need to set up real BGP peers.
        """
        with DockerHost('host1', start_calico=False) as host1, \
             DockerHost('host2', start_calico=False) as host2:

            # Set the default AS number.
            host1.calicoctl("default-node-as 64512")

            # Start host1 using the inherited AS, and host2 using a specified
            # AS (same as default).
            host1.start_calico_node()
            host1.assert_driver_up()
            host2.start_calico_node(as_num="64512")
            host2.assert_driver_up()

            # Create the network on host1, but it should be usable from all
            # hosts.
            net = host1.create_network(str(uuid.uuid4()))

            workload_host1 = host1.create_workload("workload1", network=net)
            workload_host2 = host2.create_workload("workload2", network=net)

            # Allow network to converge
            workload_host1.assert_can_ping(workload_host2.ip, retries=10)

            # And check connectivity in both directions.
            self.assert_connectivity(pass_list=[workload_host1,
                                                workload_host2])

            # Check the BGP status on each host.
            self._check_status(host1, [("Mesh", host2.ip, "Established")])
            self._check_status(host2, [("Mesh", host1.ip, "Established")])

    @attr('slow')
    def test_node_peers(self):
        """
        Test per-node BGP peer configuration by turning off the mesh and
        configuring the mesh as a set of per node peers.
        """
        with DockerHost('host1', start_calico=False) as host1, \
             DockerHost('host2', start_calico=False) as host2:

            # Start both hosts using specific AS numbers.
            host1.start_calico_node(as_num="64513")
            host1.assert_driver_up()
            host2.start_calico_node(as_num="64513")
            host2.assert_driver_up()

            # Create the network on host1, but it should be usable from all
            # hosts.
            net = host1.create_network(str(uuid.uuid4()))
            workload_host1 = host1.create_workload("workload1", network=net)
            workload_host2 = host2.create_workload("workload2", network=net)

            # Allow network to converge
            workload_host1.assert_can_ping(workload_host2.ip, retries=10)

            # Turn the node-to-node mesh off and wait for connectivity to drop.
            host1.calicoctl("bgp-node-mesh off")
            workload_host1.assert_cant_ping(workload_host2.ip, retries=10)

            # Configure per-node peers to explicitly set up a mesh.
            host1.calicoctl("node bgppeer add %s as 64513" % host2.ip)
            host2.calicoctl("node bgppeer add %s as 64513" % host1.ip)

            # Allow network to converge
            workload_host1.assert_can_ping(workload_host2.ip, retries=10)

            # And check connectivity in both directions.
            self.assert_connectivity(pass_list=[workload_host1,
                                                workload_host2])

            # Check the BGP status on each host.
            self._check_status(host1, [("Node", host2.ip, "Established")])
            self._check_status(host2, [("Node", host1.ip, "Established")])

    @attr('slow')
    def test_global_peers(self):
        """
        Test global BGP peer configuration by turning off the mesh and
        configuring the mesh as a set of global peers.
        """
        with DockerHost('host1', start_calico=False) as host1, \
             DockerHost('host2', start_calico=False) as host2:

            # Start both hosts using specific AS numbers.
            host1.start_calico_node(as_num="64513")
            host1.assert_driver_up()
            host2.start_calico_node(as_num="64513")
            host2.assert_driver_up()

            # Create the network on host1, but it should be usable from all
            # hosts.
            net = host1.create_network(str(uuid.uuid4()))
            workload_host1 = host1.create_workload("workload1", network=net)
            workload_host2 = host2.create_workload("workload2", network=net)

            # Allow network to converge
            workload_host1.assert_can_ping(workload_host2.ip, retries=10)

            # Turn the node-to-node mesh off and wait for connectivity to drop.
            host1.calicoctl("bgp-node-mesh off")
            workload_host1.assert_cant_ping(workload_host2.ip, retries=10)

            # Configure global peers to explicitly set up a mesh.  This means
            # each node will try to peer with itself which will fail.
            host1.calicoctl("bgppeer add %s as 64513" % host2.ip)
            host1.calicoctl("bgppeer add %s as 64513" % host1.ip)

            # Allow network to converge
            workload_host1.assert_can_ping(workload_host2.ip, retries=10)

            # And check connectivity in both directions.
            self.assert_connectivity(pass_list=[workload_host1,
                                                workload_host2])

            # Check the BGP status on each host.  Connections from a node to
            # itself will be idle since this is invalid BGP configuration.
            self._check_status(host1, [("Global", host1.ip, "Idle"),
                                       ("Global", host2.ip, "Established")])
            self._check_status(host2, [("Global", host1.ip, "Established"),
                                       ("Global", host2.ip, "Idle")])

    def _check_status(self, host, expected):
        """
        Check the BIRD status on a particular host to see if it contains the
        expected BGP status.

        :param host: The host object to check.
        :param expected: A list of tuples containing:
            (peertype, ip address, state)
        where 'peertype' is one of "Global", "Mesh", "Node",  'ip address' is
        the IP address of the peer, and state is the expected BGP state (e.g.
        "Established" or "Idle").
        """
        output = host.calicoctl("status")
        lines = output.split("\n")
        for (peertype, ipaddr, state) in expected:
            name = "%s_%s" % (peertype, re.sub("[:\.]", "_", str(ipaddr)))
            for line in lines:
                columns = re.split("\s*", line.strip())
                if (columns[0] == name) and (columns[1] == "BGP"):
                    if columns[5] == state:
                        break
                    else:
                        msg = "Error in BIRD status for peer %s:\n" \
                              "Expected established?: %s; Actual: %s\n" \
                              "Output:\n%s" % (name, established,
                                               columns[5], output)
                        raise AssertionError(msg)
            else:
                msg = "Error in BIRD status for peer %s:\n" \
                      "Expected state?: %s\n" \
                      "Output: \n%s" % (name, state, output)
                raise AssertionError(msg)


text:
\documentclass[a4paper,8pt,titlepage]{scrbook}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{hyperref}
\usepackage{tabularx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{listings}
\usepackage{listings_glsl}
\usepackage{listings_mips}
\usepackage{listings_vhdl}
\usepackage[ruled,vlined]{algorithm2e}
\usepackage{esdiff}
\usepackage{float}
\usepackage{placeins}
\usepackage{lscape}
\usepackage{array}
\usepackage{geometry}
\geometry{left=2cm,right=2cm,top=2cm,bottom=2cm,bindingoffset=10mm}
\restylefloat{table}

\usepackage{enumitem}
\setlistdepth{20}
\renewlist{itemize}{itemize}{20}
\setlist[itemize]{label=$\cdot$}
\setlist[itemize,1]{label=\textbullet}
\setlist[itemize,2]{label=--}
\setlist[itemize,3]{label=\(\ast\)}

\usepackage{subcaption}
\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{decorations.pathreplacing}
\usetikzlibrary{shapes}

\title{Vorlesungen am Karlsruher Institut für Technologie}
\author{Maximilian Heß}
\date{Februar 2018}

\begin{document}
\maketitle
\tableofcontents

\part{Bachelor}
\include{algo2}
\include{algo2algorithmen}
\include{bwlc}
\include{computergrafik}
\include{echtzeitsysteme}
\include{financial_management}
\include{investments}
\include{it_sicherheitsmanagement}
\include{programmierparadigmen}

\part{Master}
\include{assetpricing}
\include{derivate}
\include{ioe}
\include{ioefragen}
\include{mikroprozessoren2}
\include{netzsicherheit}
\include{rechnerstrukturen}
\include{parallelrechnerparallelprogrammierung}
\include{pm}
\include{sicherheit}
\include{softwaretechnik2}
\include{sdi}
\include{telematik}
\include{vr}
\include{vs}
\include{wasa2}

\end{document}


text:
package com.scaffy.product.interceptor;

public interface BeforePointInterceptor extends PointInterceptor{
	public void before(ArgumentWrapper argWrapper);
}


text:
@implementation BMTestAPIManager

- (NSString *)interfaceUrl
{
    return @"washMall/priceType/getLevelTypeList";
}
@end


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Write your site description here. It will be used as your sites meta description as well!">

    <title>Help find RAF Serviceman Corrie McKeague - With everyone ALL IN- It's Easy</title>

    <link rel="canonical" href="http://yourdomain.com/charity/2014/09/27/corrie/">

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

    <link rel="stylesheet" href="/charity/css/clean-blog.css">

    <link rel="stylesheet" href="/charity/css/syntax.css">

    <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href='//fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
    <link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>

    <link type="application/atom+xml" rel="alternate" href="http://yourdomain.com/charity/feed.xml" title="With everyone ALL IN- It's Easy" />

            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                Toggle navigation

            </button>
            With everyone ALL IN- It's Easy

                    Home

                    About

                    Contact

Help find RAF Serviceman Corrie McKeague

We're raising £50,000 to help find RAF Serviceman Corrie McKeague

                    Posted by Dennis Fisher on September 27, 2014

On Friday 23rd September British Serviceman, RAF Airman Corrie McKeague went for a night out in Bury St Edmunds, with his mates from their nearby RAF Base at Honnington.
Corrie was last seen on CCTV in Bury St Edmunds town centre at 3:25am on Sat 24th September, walking in to a dead-end, loading bay area. Corrie has not been seen since.
The Police investigation team, through a combination of lack of resources, intransigence and incompetence have failed to capture and process vital evidence and still lack the basic resources to efficiently process a tiny number of phone calls per week.
After so many weeks of managing this search, Corrie's Mum, Nicola and his brothers Makeyan and Darroch are now desperately seeking your assistance to allow them to continue the search.

With your support we would like to use all funds to:
1. Fund the appointment of a Private Investigator.
2. Fund a data analyst to undertake the work the Police are not capable of resourcing. Collect, collate and analyse all of the information gathered so far and that will continue to be collected.
3. Fund the associated costs of offering a reward (this has already been secured).
4. The overhead cost of phone numbers and computer.
5. Cover the additional costs of being away from home for Nicola, Darroch and Makeyan in order to maintain their presence in Bury St Edmunds, from their home in Scotland. The family are committed to keeping these costs low.
We will have an independent accountant manage the record of receipts for all expenditure, which will be available publicly
All donations will be gratefully received and faithfully applied in the continued search for Corrie. When we find Corrie, any remaining funds may be used for Corrie's possible care or will be donated to charities, including local Search team SULSAR.
We desperately need your help to be able to bring Corrie home.

                        ← Previous Post

Copyright © ALL IN 2017


text:
{% load custom_filters %}

Property: {{ item.property.name|empty_as_dash }}

Caster Level: {{ item.caster_level|ordinal_number }}

Aura: {{ item.aura.name }};
{% if item.aura_dc %}
    (DC {{ item.aura_dc }})
{% endif %}
{% for aura_school in aura_schools %}
    {{ aura_school.name }}{% if not forloop.last %}, {% endif %}
{% endfor %}

Activation: {{ item.activation|empty_as_dash }}

{% if item.synergy_prerequisite %}
    Synergy Prerequisite: {{ item.synergy_prerequisite.name }}

{% endif %}


text:
package io.pdfdata;

import com.fasterxml.jackson.core.type.TypeReference;
import io.pdfdata.model.Info;

import java.io.IOException;

import static io.pdfdata.Network.Method.GET;

/**
 * API request facility corresponding to the PDFDATA.io API's root informational resource.
 *
 * @publicapi
 */
public class InfoRequest extends Request {
    private static final TypeReference<Info> TYPEREF = new TypeReference<Info>() {};

    public InfoRequest (API pdfdata) {
        super(pdfdata);
    }

    public Info get () throws IOException {
        return doRequest(GET, "", TYPEREF);
    }
}


text:
package gov.nih.nci.cabig.caaers.tools.editors;

import junit.framework.TestCase;

/**
 * @author Rhett Sutphin
 */
public class EnumByNameEditorTest extends TestCase {
    private EnumByNameEditor<TestEnum> editor = new EnumByNameEditor<TestEnum>(TestEnum.class);

    public void testSetAsText() throws Exception {
        editor.setAsText("F8");
        assertSame(TestEnum.F8, editor.getValue());
    }

    public void testSetAsTextNull() throws Exception {
        editor.setAsText(null);
        assertNull(editor.getValue());
    }

    public void testSetAsTextBlank() throws Exception {
        editor.setAsText("");
        assertNull(editor.getValue());
    }

    public void testGetAsText() throws Exception {
        editor.setValue(TestEnum.F3);
        assertEquals("F3", editor.getAsText());
    }

    public void testGetAsTextNull() throws Exception {
        editor.setValue(null);
        assertNull(editor.getAsText());
    }

    private static enum TestEnum {
        F3, F5, F8, F13
    }
}


text:
#region Using directives
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Nettiers.AdventureWorks.Web.UI;
#endregion

public partial class SalesTaxRate : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
	{
		FormUtil.RedirectAfterUpdate(GridView1, "SalesTaxRate.aspx?page={0}");
		FormUtil.SetPageIndex(GridView1, "page");
		FormUtil.SetDefaultButton((Button)GridViewSearchPanel1.FindControl("cmdSearch"));
    }

	protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
	{
		string urlParams = string.Format("SalesTaxRateId={0}", GridView1.SelectedDataKey.Values[0]);
		Response.Redirect("SalesTaxRateEdit.aspx?" + urlParams, true);
	}

}


text:
/** @fileoverview
  * This tool reads the output of parse.js and writes it into a PostgreSQL
  * database. Use like this:
  *
  * node store.js template.sld fields.csv
  *
  * Data gets written into the following tables:
  *
  * - sld_template      Template XML from parse.js, with modifiable parameters
  *                     replaced by placeholders.
  * - sld_featuretype   FeatureTypeStyle tags.
  * - sld_rule          Rules inside FeatureTypeStyles, and their names.
  * - sld_param         Modifiable parameters inside rules, and their
  *                     default values.
  * - sld_type          Location of each parameter type in the SLD structure.
  *                     Essentially fieldSpecList from parse.js is stored here
  *                     in serialized form. */

var fs=require('fs');
var pg=require('pg.js');
var Promise = require('es6-promise').Promise;
var filename = '';
var tname = '';
var template_id = 0;

/** @constructor
  * Deferred encapsulates a promise that gets fulfilled by outside code. */
var Deferred=function() {
	var self=this;

	this.promise=new Promise(function(resolve,reject) {
		self.resolve=resolve;
		self.reject=function(err, arg ) {
            console.log(err);
            if(arg) console.log(arg[0]);

        }
	});
};

/** Return a new function that calls fn making it see the desired scope
  * through its "this" variable.
  * @param {Object} scope Variable fn should see as "this".
  * @param {function()} fn Function to call. */
function bindToScope(scope, fn) {
	return function() {
		fn.apply(scope, arguments);
	};
}

/** @constructor
  * PostgreSQL database interface.
  * Simple wrapper to use promises with pg.js. */
var PgDatabase=function() {
	this.client=null;
};

/** @param {Object} client:
  * host, port, database, user and password. */
PgDatabase.prototype.connect=function(client) {
	var defer=new Deferred();

	this.client=client;
/*	this.client.connect(function(err) {
		if(err) return(defer.reject('Unable to connect to database: '+err));
		defer.resolve();
	}); */
    defer.resolve();
	return(defer.promise);
};

/* PgDatabase.prototype.close=function(conf) {
	return(Promise.resolve(this.client.end()));
}  */

/** Execute query without reading any results. */
PgDatabase.prototype.exec=function() {
	var query=this.client.query.apply(this.client,arguments);
	var defer=new Deferred();

	query.on('error',function(err) {
		defer.reject(err);
	});

	query.on('end',function(state) {
		defer.resolve(state);
	});

	return(defer.promise);
};

/** Send query to database and read a single result row. */
PgDatabase.prototype.querySingle=function() {
	console.log("querySingle, arguments", arguments);
	var query=this.client.query.apply(this.client,arguments);
	var defer=new Deferred();
	var result;

	query.on('row',function(row) {
		result=row;
	});

	query.on('error',function(err) {
		defer.reject(err);
	});

	query.on('end',function(state) {
		if(!result) return(defer.reject('Not found: ',arguments));
		defer.resolve(result);
	});

	return(defer.promise);
};

PgDatabase.prototype.begin=function() {
	return(this.exec('BEGIN TRANSACTION'));
};

PgDatabase.prototype.commit=function() {
	return(this.exec('COMMIT'));
};

PgDatabase.prototype.rollback=function() {
	return(this.exec('ROLLBACK'));
};

/** @constructor
  * SldInserter stores a parsed SLD template and field configuration
  * into an SQL database. */
var SldInserter=function() {
	this.db=null;

};

/** @param {object} pg client */
SldInserter.prototype.connect=function(client) {
	var defer=new Deferred();

	this.db=new PgDatabase();

	return(this.db.connect(client)).then(this.db.begin());
};

/** Roll back current transaction and close connection. */
SldInserter.prototype.abort=function() {
	return(this.db.rollback()); //.then(bindToScope(this.db,this.db.close)));
};

/** Commit current transaction and close connection. */
SldInserter.prototype.finish=function() {
	return(this.db.commit()); //.then(bindToScope(this.db,this.db.close)));
};

/** Read a file and retuŕn its contents in a promise.
  * @param {string} path File to read.
  * @param {string} name Description of the file for error messages.
  * @return {Promise} */
SldInserter.prototype.readFile=function(path, name) {
	var defer=new Deferred();

	fs.readFile(path,{encoding:'utf-8'},function(err, data) {
		if(err) defer.reject('Unable to read '+name+' from '+path+': '+err);
		defer.resolve(data);
	})

	return(defer.promise);
};

/** Read entire text contents of an SLD template and insert them into a single
  * database row.
  * @param {string} name name of original sld file
  * @param {string} templatePath Path of file to read.
  * @return {Promise} */
SldInserter.prototype.insertTemplate=function(templatePath, name, tname) {
	var self=this;
    self.filename = name;
    self.tname = tname;

	return(this.readFile(templatePath,'SLD template').then(function(sldTemplate) {
		return(self.db.querySingle(
			'INSERT INTO sld_template (content,name,sld_filename)'+
			' VALUES ($1,$2,$3)'+
			' RETURNING id',[sldTemplate, self.tname, self.filename]
		));
	}));
};

/** @param {number} templateId Refers to a template in the database.
  * @return {Promise} */
SldInserter.prototype.insertFeatureType=function(templateId,fieldList) {
    var name = fieldList[1],
    	title = fieldList[2],
    	order = fieldList[3];
	return(this.db.querySingle(
		'INSERT INTO sld_featuretype (template_id,name,title,featuretype_name, feature_order)'+
		' VALUES ($1,$2,$3,$4, $5)'+
		' RETURNING id',[templateId,name,title,'', order]
	));
};

/** @param {Promise} featureTypeInserted Should resolve to the ID of an
  * inserted feature type.
  * @param {Array.<string>} fieldList Data describing the feature type.
  * @return {Promise} */
SldInserter.prototype.insertRule=function(featureTypeInserted,fieldList) {
	var self=this;

	return(featureTypeInserted.then(function(featureTypeId) {
//		var nameList=fieldList[3].split(';');
		var nameList=fieldList[3].split('^');
		if(!nameList[1] && nameList[0]) nameList[1]=nameList[0];
        if(!nameList[1]) nameList[1]=fieldList[4];

		//no minscaledenominator
        if (!nameList[3] || nameList[3].length === 0) {
        	nameList[3] = null;
        }
		//no maxscaledenominator
        if (!nameList[4] || nameList[4].length === 0) {
        	nameList[4] = null;
        }
		return(self.db.querySingle(
			'INSERT INTO sld_rule (featuretype_id,name,title,abstract, minscaledenominator, maxscaledenominator, template_offset)'+
			' VALUES ($1,$2,$3,$4,$5,$6, $7)'+
			' RETURNING id',[featureTypeId.id,nameList[0],nameList[1],nameList[2], nameList[3], nameList[4], fieldList[2]]
		));
	}));
};

/** @param {Promise} ruleInserted Should resolve to the ID of an
 * inserted rule.
 * @param {Array.<string>} fieldList Data describing the .
 * @return {Promise} */
SldInserter.prototype.insertSymbolizer=function(ruleInserted,fieldList) {
    var self=this;

    return(ruleInserted.then(function(ruleId) {
        return(self.db.querySingle(
                'INSERT INTO sld_symbolizer (rule_id,symbolizer_type, symbolizer_order, uom)'+
                ' VALUES ($1,$2,$3,$4)'+
                ' RETURNING id',[ruleId.id,fieldList[1],fieldList[2],fieldList[3]]
        ));
    }));
};

/** Insert an SLD parameter description into the database.
  * @param {Promise} symbolizerInserted Should resolve to the ID of an inserted symbolizer.
  * @param {Array.<string>} fieldList Data describing the parameter type etc.
  * @return {Promise} */
SldInserter.prototype.insertParam=function(symbolizerInserted,fieldList) {
	var self=this;
	var defer=new Deferred();

	symbolizerInserted.then(function(symbolizerId) {
		var typeFound=self.db.querySingle(
			'SELECT id,name,symbolizer_parameter'+
			' FROM sld_type'+
			' WHERE symbolizer_parameter=$1',[fieldList[4]]
        );
//TODO: insert only parameters, which are in sld_type table
		typeFound.then(function(typeRow) {
            if(!typeRow) return defer.resolve();
			self.db.querySingle(
				'INSERT INTO sld_param (symbolizer_id,template_offset,type_id,default_value)'+
				' VALUES ($1,$2,$3,$4)'+
				' RETURNING id',[symbolizerId.id,fieldList[3],typeRow.id,fieldList[5]]
			).then(function() {
				defer.resolve();
			});
		});

	});

	return(defer.promise);
};

/** Insert rule and parameter descriptions from parse.js into the database.
  * @param {string} sldConfig Entire config file text content to parse.
  * @param {number} templateId Refers to a template in the database.
  * @return {Promise} Resolved when everything has been successfully inserted. */
SldInserter.prototype.parseConfig=function(sldConfig,templateId) {
	var defer=new Deferred();
	/** A separate promise for each database INSERT command to track them. */
	var promiseList=[];
	var lineList;
	var lineNum,lineCount;
	var fieldList;
	var featureTypeInserted,ruleInserted,fieldInserted,symbolizerInserted;

	lineList=sldConfig;  //.split(/\r?\n/);
	lineCount=lineList.length;

	for(lineNum=0;lineNum<lineCount;lineNum++) {
		line=lineList[lineNum];
		if(!line) continue;
		fieldList=line.split('\t');

		type=fieldList[0];

		if(type=='FeatureType') {
			featureTypeInserted=this.insertFeatureType(templateId, fieldList);
			featureTypeInserted.catch(function(err) {
				defer.reject('Error inserting feature type: '+err);
			});
			promiseList.push(featureTypeInserted);
		}

		if(type=='Rule') {
			ruleInserted=this.insertRule(featureTypeInserted,fieldList);
			ruleInserted.catch(function(err) {
				defer.reject('Error inserting rule: '+err);
			});
			promiseList.push(ruleInserted);
		}
        if(type=='Symbolizer') {
            symbolizerInserted=this.insertSymbolizer(ruleInserted,fieldList);
            symbolizerInserted.catch(function(err) {
                defer.reject('Error inserting symbolizer: '+err);
            });
            promiseList.push(symbolizerInserted);
        }

		if(type=='Field') {
			paramInserted=this.insertParam(symbolizerInserted,fieldList);
			paramInserted.catch(function(err) {
				defer.reject('Error inserting field: '+err);
			});
			promiseList.push(paramInserted);
		}
	}

	// Ready when all inserts finish.
	Promise.all(promiseList).then(function() {
		defer.resolve();
	});

	return(defer.promise);
};

/** Read SLD parameters and store them associated with templateId in the database.
  * @param {string []} params  parameter descriptions.
  * @param {number} templateId Refers to a template in the database.
  * @return {Promise} Resolved when everything has been successfully inserted. */
SldInserter.prototype.insertConfig=function(params,templateId) {
	var self=this;

    return(self.parseConfig(params,templateId));

};

/** Main function, read template and store data to sld_styles db
 * @param params : [] output of sld parse function
 * @param sld_template: file name of template file
 * @param name  original sld file name
 * @param cb {function} status cb
 * */
exports.store = function(params, client, name, tname, tfile, cb) {

	console.log("Store");
	var inserter=new SldInserter();

	var connected=inserter.connect(client);

	var templateInserted=connected.then(function() {
		return(inserter.insertTemplate(tfile.path, name, tname));
	});

	var configInserted=templateInserted.then(function(templateRow) {
        template_id = templateRow.id;
		return(inserter.insertConfig(params,templateRow.id));
	});

	var ready=configInserted;

	ready.catch(function(err) {
		inserter.abort();
        cb(err, 0);
		return;
	});

	ready.then(function() {
		return(inserter.finish());
	}).then(function() {
		console.log('Store success!');
        cb(false, template_id);
	});
};


text:
SCRIPT_ROOT=$(dirname $(readlink -f "$0"))
. "${SCRIPT_ROOT}/common.sh" || exit 1

DEFINE_string board "$DEFAULT_BOARD" \
  "The name of the board to check for images."

# Parse command line flags
FLAGS "$@" || exit 1
eval set -- "${FLAGS_ARGV}"

# Check on the board that they are trying to set up.
if [ -z "$FLAGS_board" ] ; then
  die_notrace "Error: --board required."
fi

IMAGES_DIR="${DEFAULT_BUILD_ROOT}/images/${FLAGS_board}"

# If there are no images, error out since presumably the
# caller isn't doing this for fun.
if [[ ! -d ${IMAGES_DIR} ]] ; then
  die_notrace \
      "${IMAGES_DIR} does not exist; have you run ./build_image?"
fi

# Use latest link if it exists, otherwise most recently changed dir
if [ -L ${IMAGES_DIR}/latest ] ; then
  if ! dst=$(readlink "${IMAGES_DIR}"/latest) ; then
    die_notrace "Could not read ${IMAGES_DIR}/latest; have you run ./build_image?"
  fi
  DEFAULT_FROM="${IMAGES_DIR}/${dst}"
else
  DEFAULT_FROM=$(ls -dt "$IMAGES_DIR"/*/ | head -1)
fi

echo $DEFAULT_FROM


text:
import dataProvider from '../../data-provider';
import {App, getApp} from '../App';

import {
  GraphQLID,
  GraphQLNonNull,
} from 'graphql';
import {
  fromGlobalId,
  mutationWithClientMutationId,
} from 'graphql-relay';

const deleteRoomMutation = mutationWithClientMutationId({
  name: 'DeleteRoom',
  inputFields: {
    id: {type: new GraphQLNonNull(GraphQLID)},
  },
  outputFields: {
    deletedId: {
      type: new GraphQLNonNull(GraphQLID),
      resolve: ({id}) => id,
    },
    app: {
      type: App,
      resolve: getApp,
    },
  },
  mutateAndGetPayload: ({id}) => {
    const {id: roomId} = fromGlobalId(id);
    if (!dataProvider.getStore('Room').deleteUnique(roomId))
      id = false;
    return {id};
  }
});

export default deleteRoomMutation;


text:
MigrationStatusSelectorオブジェクトは、getMigrationStatusメソッドの検索条件(実行パラメータ)を保持します。

### Service

+ [CampaignMigrationService](../../services/CampaignMigrationService.md)

### Namespace

[CampaignMigrationService#Namespace](../../services/CampaignMigrationService.md#namespace)

| Field | Type | Description | response | getMigrationStatus |
| ----- | ---- | ----------- | -------- | --------- |
| migrationJobIds[0..500] | xsd:long | マイグレーションジョブIDです。 | yes | Requirement | |
| accountId | xsd:long | アカウントID | yes | Optional
※代行認証の場合は指定必須です。 | |

この 作品 は クリエイティブ・コモンズ 表示 - 改変禁止 2.1 日本 ライセンスの下に提供されています。


text:
(function() {
    'use strict;'

    angular.module('app', ['ng', 'ui.router']).config([ '$urlRouterProvider', '$httpProvider', function($urlRouterProvider, $httpProvider) {
        $urlRouterProvider.otherwise('/');

        $httpProvider.interceptors.push('requestInterceptor');
    }])
})();


text:
title: Using Design Tokens
author: author
weight: 2
---

This article should describe how and where design tokens are used in the design system.


text:
#define C_TESTLUCY_TESTTERMINFO
#define TESTLUCY_USE_SHORT_NAMES
#include "Lucy/Util/ToolSet.h"

#include "Clownfish/TestHarness/TestBatchRunner.h"
#include "Lucy/Test.h"
#include "Lucy/Test/Search/TestSpan.h"
#include "Lucy/Search/Span.h"

TestSpan*
TestSpan_new() {
    return (TestSpan*)Class_Make_Obj(TESTSPAN);
}

void
test_span_init_values(TestBatchRunner *runner) {
    Span* span = Span_new(2,3,7.0);
    TEST_INT_EQ(runner, Span_Get_Offset(span), 2, "get_offset" );
    TEST_INT_EQ(runner, Span_Get_Length(span), 3, "get_length" );
    TEST_FLOAT_EQ(runner, Span_Get_Weight(span), 7.0, "get_weight" );

    Span_Set_Offset(span, 10);
    Span_Set_Length(span, 1);
    Span_Set_Weight(span, 4.0);

    TEST_INT_EQ(runner, Span_Get_Offset(span), 10, "set_offset" );
    TEST_INT_EQ(runner, Span_Get_Length(span), 1, "set_length" );
    TEST_FLOAT_EQ(runner, Span_Get_Weight(span), 4.0, "set_weight" );

    DECREF(span);
}

void
TestSpan_Run_IMP(TestSpan *self, TestBatchRunner *runner) {
    TestBatchRunner_Plan(runner, (TestBatch*)self, 6);
    test_span_init_values(runner);
}


text:
<?php

/*
* <auto-generated>
*     This code was generated by a Codezu.
*
*     Changes to this file may cause incorrect behavior and will be lost if
*     the code is regenerated.
* </auto-generated>
*/

namespace Mozu\Api\Urls\Platform\Extensions;

use Mozu\Api\MozuUrl;
use Mozu\Api\UrlLocation;

class CredentialStoreEntryUrl  {

	/**
		* Get Resource Url for StoreCredentials
		* @return string Resource Url
	*/
	public static function storeCredentialsUrl()
	{
		$url = "/api/platform/extensions/credentialStore/";
		$mozuUrl = new MozuUrl($url, UrlLocation::TENANT_POD,"POST", false) ;
		return $mozuUrl;
	}

}

?>


text:
<!doctype html>

    <title>Widi Examples</title>

Open your console


text:
/*
 * Simulator.h
 *
 *  Created on: Mar 10, 2016
 *      Author: vens
 */

#ifndef SIMULATOR_H_
#define SIMULATOR_H_

#include <fstream>
#include <list>
#include "libjson/json.h"
#include "libwavedrom/wavedrom.hpp"

class SimTask;

/**
 * This simulator handles generating and sending simulated tasks to the scheduler.
 */
class Simulator {
public:
	/// Create a new simulator
	Simulator();
	virtual ~Simulator();

	/// Convert a JSON array into a new task list to simulate
	void MakeTaskList(json_value * array);

	/// return true if all the tasks in the task list are finished
	bool IsDone();

	/// run one system tick on the scheduler
	void RunTick();

	void PrintLogData();

	/// export the json waveform file
	void ExportWaveform(std::ofstream& out, bool include_legend = true);

private:
	std::list<SimTask*> sim_task_list;
	std::list<SimTask*> finished_list;
	SimTask* running_task;

	unsigned int num_tasks;
	unsigned int remaining_tasks;

	unsigned long sys_time;

	wavedrom::Wavedrom wave_root;
	wavedrom::Signal * wave_running;
};

#endif /* SIMULATOR_H_ */


text:
package sbt
package compiler

import scala.reflect.Manifest
import scala.tools.nsc.{ast, interpreter, io, reporters, util, CompilerCommand, Global, Phase, Settings}
import interpreter.AbstractFileClassLoader
import io.{AbstractFile, PlainFile, VirtualDirectory}
import ast.parser.Tokens
import reporters.{ConsoleReporter, Reporter}
import util.BatchSourceFile
import Tokens.{EOF, NEWLINE, NEWLINES, SEMI}
import java.io.File
import java.nio.ByteBuffer
import java.net.URLClassLoader

// TODO: provide a way to cleanup backing directory

final class EvalImports(val strings: Seq[(String,Int)], val srcName: String)
final class EvalResult(val tpe: String, val getValue: ClassLoader => Any, val generated: Seq[File], val enclosingModule: String)
final class EvalException(msg: String) extends RuntimeException(msg)
// not thread safe, since it reuses a Global instance
final class Eval(optionsNoncp: Seq[String], classpath: Seq[File], mkReporter: Settings => Reporter, backing: Option[File])
{
	def this(mkReporter: Settings => Reporter, backing: Option[File]) = this(Nil, IO.classLocationFile[ScalaObject] :: Nil, mkReporter, backing)
	def this() = this(s => new ConsoleReporter(s), None)

	backing.foreach(IO.createDirectory)
	val classpathString = Path.makeString(classpath)
	val options = "-cp" +: classpathString +: optionsNoncp

	lazy val settings =
	{
		val s = new Settings(println)
		val command = new CompilerCommand(options.toList, s)
		s
	}
	lazy val reporter = mkReporter(settings)
	lazy val global: Global = new Global(settings, reporter)
	import global._
	import definitions._

	def eval(expression: String, imports: EvalImports = noImports, tpeName: Option[String] = None, srcName: String = "<setting>", line: Int = DefaultStartLine): EvalResult =
	{
			import Eval._
		val hash = Hash.toHex(Hash(bytes( bytes(expression) :: optBytes(backing)(fileExistsBytes) :: seqBytes(options)(bytes) ::
			seqBytes(classpath)(fileModifiedBytes) :: seqBytes(imports.strings.map(_._1))(bytes) :: optBytes(tpeName)(bytes) :: Nil)))
		val moduleName = makeModuleName(hash)

		lazy val unit = {
			reporter.reset
			mkUnit(srcName, line, expression)
		}
		lazy val run = new Run {
			override def units = (unit :: Nil).iterator
		}
		def unlinkAll(): Unit = for( (sym, _) <- run.symSource ) unlink(sym)
		def unlink(sym: Symbol) = sym.owner.info.decls.unlink(sym)

		val (tpe, value) =
			(tpeName, backing) match {
				case (Some(tpe), Some(back)) if classExists(back, moduleName) => (tpe, loadPlain(back, moduleName))
				case _ => try { eval0(expression, imports, tpeName, run, unit, backing, moduleName) } finally { unlinkAll() }
			}
		val classFiles = getClassFiles(backing, moduleName)
		new EvalResult(tpe, value, classFiles, moduleName)
	}
	def eval0(expression: String, imports: EvalImports, tpeName: Option[String], run: Run, unit: CompilationUnit, backing: Option[File], moduleName: String): (String, ClassLoader => Any) =
	{
		val dir = backing match { case None => new VirtualDirectory("<virtual>", None); case Some(dir) => new PlainFile(dir) }
		settings.outputDirs setSingleOutput dir

		val importTrees = parseImports(imports)
		val (parser, tree) = parseExpr(unit)

		val tpt: Tree = tpeName match {
			case Some(tpe) => parseType(tpe)
			case None => TypeTree(NoType)
		}

		unit.body = augment(parser, importTrees, tree, tpt, moduleName)

		def compile(phase: Phase): Unit =
		{
			globalPhase = phase
			if(phase == null || phase == phase.next || reporter.hasErrors)
				()
			else
			{
				atPhase(phase) { phase.run }
				compile(phase.next)
			}
		}

		compile(run.namerPhase)
		checkError("Type error in expression")
		val tpe = atPhase(run.typerPhase.next) { (new TypeExtractor).getType(unit.body) }

		(tpe, load(dir, moduleName))
	}
	def load(dir: AbstractFile, moduleName: String): ClassLoader => Any  = parent => getValue[Any](moduleName, new AbstractFileClassLoader(dir, parent))
	def loadPlain(dir: File, moduleName: String): ClassLoader => Any  = parent => getValue[Any](moduleName, new URLClassLoader(Array(dir.toURI.toURL), parent))

	val WrapValName = "$sbtdef"
		//wrap tree in object objectName { def WrapValName = <tree> }
	def augment(parser: global.syntaxAnalyzer.UnitParser, imports: Seq[Tree], tree: Tree, tpt: Tree, objectName: String): Tree =
	{
		val emptyTypeName = nme.EMPTY.toTypeName
		def emptyPkg = parser.atPos(0, 0, 0) { Ident(nme.EMPTY_PACKAGE_NAME) }
		def emptyInit = DefDef(
			NoMods,
			nme.CONSTRUCTOR,
			Nil,
			List(Nil),
			TypeTree(),
			Block(List(Apply(Select(Super(This(emptyTypeName), emptyTypeName), nme.CONSTRUCTOR), Nil)), Literal(Constant(())))
		)

		def method = DefDef(NoMods, WrapValName, Nil, Nil, tpt, tree)
		def moduleBody = Template(List(gen.scalaScalaObjectConstr), emptyValDef, List(emptyInit, method))
		def moduleDef = ModuleDef(NoMods, objectName, moduleBody)
		parser.makePackaging(0, emptyPkg, (imports :+ moduleDef).toList)
	}

	def getValue[T](objectName: String, loader: ClassLoader): T =
	{
		val clazz = Class.forName(objectName + "$", true, loader)
		val module = clazz.getField("MODULE$").get(null)
		val accessor = module.getClass.getMethod(WrapValName)
		val value = accessor.invoke(module)
		value.asInstanceOf[T]
	}

	final class TypeExtractor extends Traverser {
		private[this] var result = ""
		def getType(t: Tree) = { result = ""; traverse(t); result }
		override def traverse(tree: Tree): Unit = tree match {
			case d: DefDef if  d.symbol.nameString == WrapValName => result = d.symbol.tpe.finalResultType.toString
			case _ => super.traverse(tree)
		}
	}
	private[this] def classExists(dir: File, name: String) = (new File(dir, name + ".class")).exists
	// TODO: use the code from Analyzer
	private[this] def getClassFiles(backing: Option[File], moduleName: String): Seq[File] =
		backing match {
			case None => Nil
			case Some(dir) => dir listFiles moduleClassFilter(moduleName)
		}
	private[this] def moduleClassFilter(moduleName: String) = new java.io.FilenameFilter { def accept(dir: File, s: String) =
		(s contains moduleName) && (s endsWith ".class")
	}
	private[this] def parseExpr(unit: CompilationUnit) =
	{
		val parser = new syntaxAnalyzer.UnitParser(unit)

		val tree: Tree = parser.expr()
		val extra = parser.in.token match {
			case EOF => "  Ensure that there are no blank lines within a setting."
			case _ => ""
		}
		checkError("Error parsing expression." + extra)

		parser.accept(EOF)
		val extra2 = parser.in.token match {
			case SEMI => "  Note that settings are expressions and do not end with semicolons.  (Semicolons are fine within {} blocks, however.)"
			case NEWLINE | NEWLINES => "  Ensure that settings are separated by blank lines."
			case _ => ""
		}
		checkError("Error parsing expression." + extra2)

		(parser, tree)
	}
	private[this] def parseType(tpe: String): Tree =
	{
		val tpeParser = new syntaxAnalyzer.UnitParser(mkUnit("<expected-type>", DefaultStartLine, tpe))
		val tpt0: Tree = tpeParser.typ()
		tpeParser.accept(EOF)
		checkError("Error parsing expression type.")
		tpt0
	}
	private[this] def parseImports(imports: EvalImports): Seq[Tree] =
		imports.strings flatMap { case (s, line) => parseImport(mkUnit(imports.srcName, line, s)) }
	private[this] def parseImport(importUnit: CompilationUnit): Seq[Tree] =
	{
		val parser = new syntaxAnalyzer.UnitParser(importUnit)
		val trees: Seq[Tree] = parser.importClause()
		parser.accept(EOF)
		checkError("Error parsing imports for expression.")
		trees
	}

	val DefaultStartLine = 0
	private[this] def makeModuleName(hash: String): String  =  "$" + Hash.halve(hash)
	private[this] def noImports = new EvalImports(Nil, "")
	private[this] def mkUnit(srcName: String, firstLine: Int, s: String) = new CompilationUnit(new EvalSourceFile(srcName, firstLine, s))
	private[this] def checkError(label: String) = if(reporter.hasErrors) throw new EvalException(label)

	private[this] final class EvalSourceFile(name: String, startLine: Int, contents: String) extends BatchSourceFile(name, contents)
	{
		override def lineToOffset(line: Int): Int = super.lineToOffset((line - startLine) max 0)
		override def offsetToLine(offset: Int): Int = super.offsetToLine(offset) + startLine
	}
}
private object Eval
{
	def optBytes[T](o: Option[T])(f: T => Array[Byte]): Array[Byte] = seqBytes(o.toSeq)(f)
	def seqBytes[T](s: Seq[T])(f: T => Array[Byte]): Array[Byte] = bytes(s map f)
	def bytes(b: Seq[Array[Byte]]): Array[Byte] = bytes(b.length) ++ b.flatten.toArray[Byte]
	def bytes(b: Boolean): Array[Byte] = Array[Byte](if(b) 1 else 0)
	def filesModifiedBytes(fs: Array[File]): Array[Byte] = if(fs eq null) filesModifiedBytes(Array[File]()) else seqBytes(fs)(fileModifiedBytes)
	def fileModifiedBytes(f: File): Array[Byte] =
		(if(f.isDirectory) filesModifiedBytes(f listFiles classDirFilter) else bytes(f.lastModified)) ++
		bytes(f.getAbsolutePath)
	def fileExistsBytes(f: File): Array[Byte] =
		bytes(f.exists) ++
		bytes(f.getAbsolutePath)

	def bytes(s: String): Array[Byte] = s getBytes "UTF-8"
	def bytes(l: Long): Array[Byte] =
	{
		val buffer = ByteBuffer.allocate(8)
		buffer.putLong(l)
		buffer.array
	}
	def bytes(i: Int): Array[Byte] =
	{
		val buffer = ByteBuffer.allocate(4)
		buffer.putInt(i)
		buffer.array
	}

	private val classDirFilter: FileFilter = DirectoryFilter || GlobFilter("*.class")
}


text:
#region Apache License Version 2.0

#endregion Apache License Version 2.0

/*----------------------------------------------------------------
    Copyright (C) 2022 Senparc

    文件名:RequestBase.cs
    文件功能描述:所有客服请求消息的基类

    创建标识:Senparc - 20180616

    修改标识:Senparc - 20181226
    修改描述:v3.3.2 修改 DateTime 为 DateTimeOffset

----------------------------------------------------------------*/

using Senparc.NeuChar;
using System;

namespace Senparc.Weixin.Work.Entities.Request.KF
{
    public class RequestBase
    {
        public RequestMsgType MsgType { get; protected set; }
        public string FromUserName { get; set; }
        public DateTimeOffset CreateTime { get; set; }
    }
}


text:
package schema

import (
	"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions"
	apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
	"k8s.io/utils/pointer"
)

func VersionedIncompleteSchema() *apiextensionsv1.JSONSchemaProps {
	return &apiextensionsv1.JSONSchemaProps{
		Properties: map[string]apiextensionsv1.JSONSchemaProps{
			"message": {
				Type: "string",
			},
			"labels": {
				Type: "array",
				Items: &apiextensionsv1.JSONSchemaPropsOrArray{
					Schema: &apiextensionsv1.JSONSchemaProps{
						Type: "object",
						Properties: map[string]apiextensionsv1.JSONSchemaProps{
							"key":          {Type: "string"},
							"allowedRegex": {Type: "string"},
						},
					},
				},
			},
		},
	}
}

func VersionlessSchemaWithXPreserve() *apiextensions.JSONSchemaProps {
	return &apiextensions.JSONSchemaProps{
		XPreserveUnknownFields: pointer.Bool(true),
		Properties: map[string]apiextensions.JSONSchemaProps{
			"message": {
				Type: "string",
			},
			"labels": {
				Type: "array",
				Items: &apiextensions.JSONSchemaPropsOrArray{
					Schema: &apiextensions.JSONSchemaProps{
						Type:                   "object",
						XPreserveUnknownFields: pointer.Bool(true),
						Properties: map[string]apiextensions.JSONSchemaProps{
							"key":          {Type: "string"},
							"allowedRegex": {Type: "string"},
						},
					},
				},
			},
		},
	}
}

func VersionlessSchema() *apiextensions.JSONSchemaProps {
	return &apiextensions.JSONSchemaProps{
		Properties: map[string]apiextensions.JSONSchemaProps{
			"message": {
				Type: "string",
			},
			"labels": {
				Type: "array",
				Items: &apiextensions.JSONSchemaPropsOrArray{
					Schema: &apiextensions.JSONSchemaProps{
						Type: "object",
						Properties: map[string]apiextensions.JSONSchemaProps{
							"key":          {Type: "string"},
							"allowedRegex": {Type: "string"},
						},
					},
				},
			},
		},
	}
}


text:
/**
 * Script:  Weapon.cs
 * Date:    July 5
 * Author:  Ahmed Yehia
 * Description:
 *  Represents the weapon structure
 */
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System;

[Serializable]
public struct WeaponSounds
{
    public AudioClip fireAudioClip, reloadAudioClip, emptyAudioClip;
}
[Serializable]
public struct WeaponDamageSystem
{
    public float minDamage, maxDamage, shootingRange;
    public float force;
    [HideInInspector]
    public int bullets;
    public int  clips;
    public float fireRate;
    public int bulletsPerClip;

}
[Serializable]
public struct WeaponAnimationSystem
{
    public string draw,reload,shoot,idle;
    public float shootSpeed,reloadSpeed;
    public float reloadTime;
}
public enum ShootingMode
{
    Singleshot,
    Auto
}
public class Weapon : MonoBehaviour {

    public string weaponName;
    public GameObject weaponModel;
    public bool hasMuzzleFlash;
    public GameObject muzzleFlash;
    public bool hasHitParicles;
    public ParticleEmitter hitParticles;
    public ShootingMode shootingMode;
    public bool hasSound;
    public WeaponSounds weaponSounds;
    public WeaponDamageSystem damageSystem;
    public WeaponAnimationSystem animationSystem;
    public bool hasProjectile;
    public GameObject projectile;
    public Vector3 projectilePoint;
    public string ReticleName;
    public Vector3 ShootRay;
    public bool isReloading = false;
    public GUIContent GUIInfo = new GUIContent();
    private int _lastFrameShot;//For muzzle flash detection
    private float nextFireTime;
    [HideInInspector]
    public bool isShooting;
    public Transform shootingPoint;

    [Header("Aim Down Sights")]
    public bool enableAim;
    public float aimFieldOfView,normalFieldOfView;
    public Vector3 aimPosition, normalPosition;
    public float aimSpeed;
    public float aimRotation, normalRotation;
    public WeaponDamageSystem aimDamageSystem;
    public float aimMovementSpeed, normalMovementSpeed;
    float curField;
    float dampVel = .2f;
    public bool isAiming;
    public string aimReticleName;
    public float _minDamage, _maxDamage, _force;
    public ReticleChangerCVersion reticleChanger;
    private WeaponDamageSystem refDamageSystem;
    public Vignetting vi;
    public bool isAdrenaline;
    public bool hasDecal;
    public GameObject[] decals;
    [Header("Water")]
    public GameObject waterHitEffect;
    void Awake()
    {
        animation[animationSystem.shoot].layer = 10;
        animation[animationSystem.reload].layer = 20;
        animation[animationSystem.idle].layer = 1;
        animation[animationSystem.reload].speed = animationSystem.reloadSpeed;
    }
	void Start () {
        animation.Play(animationSystem.draw);
        if (hasHitParicles)
        {
            hitParticles.emit = false;
        }
        damageSystem.bullets = damageSystem.bulletsPerClip;
        refDamageSystem = this.damageSystem;

	}
	// Update is called once per frame
	void Update () {
        gameObject.transform.animation.Play(animationSystem.idle);
        if (Input.GetButton("Fire"))
        {
            isShooting = true;
            Fire();
        }
        else
        {
            isShooting = false;
        }
        if (Input.GetButton("Reload"))
        {
            Reload();
        }
        AimDownSights();

	}
    void LateUpdate()
    {
        if (hasMuzzleFlash)
        {
            if (_lastFrameShot == Time.frameCount)
            {
                //We shot, so enable it!
                muzzleFlash.transform.localRotation = Quaternion.AngleAxis(360 * UnityEngine.Random.value, Vector3.forward);
                muzzleFlash.SetActive(true);

                if (hasSound)
                {
                    if (!audio.isPlaying)
                    {
                        //Since MuzzleFlash is associated with high speed shot rate, eg: UZI
                        audio.loop = true;
                        audio.PlayOneShot(weaponSounds.fireAudioClip);
                    }
                }
            }

            else
            {
                muzzleFlash.SetActive(false);
                if (audio)
                {
                    audio.loop = false;
                }
            }
        }
        else
        {
            //Just Sound
            if (_lastFrameShot == Time.frameCount)
            {
                if (hasSound)
                {
                    if (!audio.isPlaying)
                    {
                        audio.PlayOneShot(weaponSounds.fireAudioClip);
                    }
                }
            }
        }
    }
    void Fire()
    {

        if (damageSystem.bullets ==0 && damageSystem.clips >0 && isReloading == false)
        {
            Reload();
        }

        if (damageSystem.bullets != 0 && isReloading == false)
        {
            //Then we fire
            if (Time.time - damageSystem.fireRate > nextFireTime)
            {
                nextFireTime = Time.time - Time.deltaTime;
            }
            animation.Play(animationSystem.shoot);

            while (nextFireTime < Time.time && damageSystem.bullets != 0)
            {
                FireOneShot();
                nextFireTime += damageSystem.fireRate;
            }
        }
        else
        {
            if (damageSystem.bullets == 0)
            {
                audio.PlayOneShot(weaponSounds.emptyAudioClip);
            }
        }
    }
    void FireOneShot()
    {
        animation[animationSystem.shoot].normalizedSpeed = animationSystem.shootSpeed;
        Vector3 shootDirection = weaponModel.transform.TransformDirection(Vector3.forward);
        RaycastHit hitInfo;
        //Check Hitting
        /*Physics.Raycast(Camera.main.ScreenPointToRay(shootDirection),out hitInfo,damageSystem.shootingRange))/*/
        if (Physics.Raycast(shootingPoint.position, shootDirection, out hitInfo, damageSystem.shootingRange))
        {
            if (hitInfo.rigidbody)
            {
                hitInfo.rigidbody.AddForceAtPosition(damageSystem.force * shootDirection,hitInfo.point);
            }
            //Do we have hit Particles?
            if (hasHitParicles)
	        {
                hitParticles.transform.position = hitInfo.point;
                hitParticles.transform.rotation = Quaternion.FromToRotation(Vector3.up,hitInfo.normal);
                hitParticles.Emit();
	        }
            if (hitInfo.collider.transform.tag == "HitHead" || hitInfo.collider.transform.tag == "HitBody")
            {
                hitInfo.collider.transform.GetComponent<HitListener>().SendHit();
                Debug.Log("Hit");
            }
            if (hitInfo.collider.tag == "Water")
            {
                Instantiate(waterHitEffect, hitInfo.point, Quaternion.identity);
            }
            if (hitInfo.collider.tag !="Player")
	        {
                hitInfo.transform.SendMessage("GetDamage",UnityEngine.Random.Range(damageSystem.minDamage,damageSystem.maxDamage),SendMessageOptions.DontRequireReceiver);
	        }
            if (hasProjectile)
	        {
                Instantiate(projectile,transform.position,Quaternion.FromToRotation(Vector3.up,transform.position));
	        }
            if (hasDecal && hitInfo.collider.tag != "Water")
            {
                int _decalNum = UnityEngine.Random.Range(0, decals.Length - 1);
                (Instantiate(decals[_decalNum], hitInfo.point, Quaternion.FromToRotation(Vector3.up, hitInfo.normal)) as GameObject).transform.parent = hitInfo.transform;
            }
        }
        damageSystem.bullets --;
        //Register that we shot
        _lastFrameShot = Time.frameCount;
        //Update our behaviuor
        enabled = true;
    }
    IEnumerator WaitForReloadTime(float reloadTime)
    {
        Debug.Log("started");
        yield return new WaitForSeconds(reloadTime);
        damageSystem.bullets = damageSystem.bulletsPerClip;
        Debug.Log("doinn");
        isReloading = false;
    }
    void Reload()
    {
        if (damageSystem.clips > 0 && !isReloading && damageSystem.bullets != damageSystem.bulletsPerClip)
        {
            isReloading = true;
            damageSystem.clips--;
            animation.Play(animationSystem.reload);
            audio.PlayOneShot(weaponSounds.reloadAudioClip);
            StartCoroutine(WaitForReloadTime( animationSystem.reloadTime));
        }
        else
        {
            audio.PlayOneShot(weaponSounds.emptyAudioClip);
        }

    }
    void OnDrawGizmosSelected()
    {
        if (hasProjectile)
        {
            Gizmos.DrawIcon(transform.position + projectilePoint, "Shoot.psd", true);
        }

    }
    void OnDrawGizmos()
    {
        Vector3 shootDirection = weaponModel.transform.TransformDirection(Vector3.forward);
        Gizmos.DrawRay(transform.position + ShootRay, shootDirection);//
    }
    void AimDownSights()
    {
        float newField = Mathf.SmoothDamp(Camera.main.fieldOfView, curField, ref dampVel, .3f); // Smoothly adjust fov

        Camera.main.fieldOfView = newField;

        if (Input.GetButtonDown("Fire2") && enableAim) // Are we aiming ?
            isAiming = !isAiming;

        if(isAiming)
        {
            curField = aimFieldOfView; // First set the new fov
            transform.root.GetComponent<CharacterMotor>().movement.maxForwardSpeed = aimMovementSpeed;
            this.damageSystem.maxDamage = _maxDamage;
            this.damageSystem.minDamage = _minDamage;
            this.damageSystem.force = _force;
            reticleChanger.ReticleType = aimReticleName;
            transform.localPosition = Vector3.Lerp(transform.localPosition, aimPosition, 0.3f);
            vi.enabled = true;
        }
        else if(!isAiming)
        {
            curField = normalFieldOfView; // First set the new fov
            if (!isAdrenaline)
            {
                transform.root.GetComponent<CharacterMotor>().movement.maxForwardSpeed = normalMovementSpeed;
            }
            else
            {
                transform.root.GetComponent<CharacterMotor>().movement.maxForwardSpeed = transform.root.GetComponent<Player>()._playerHealthSystem.maxAdrSpeed;

            }
            this.damageSystem.minDamage = refDamageSystem.minDamage;
            this.damageSystem.maxDamage = refDamageSystem.maxDamage;
            this.damageSystem.force = refDamageSystem.force;
            reticleChanger.ReticleType = ReticleName;
            transform.localPosition = Vector3.Lerp(transform.localPosition, normalPosition, aimSpeed);
            vi.enabled = false;
        }
        else
        {
            return;
        }
    }
    void AdrenalineChecker()
    {
        if (isAdrenaline)
        {

        }
        else
        {

        }
    }
}


text:
"""
Written by Daniel M. Aukes and CONTRIBUTORS
Email: danaukes<at>asu.edu.
Please see LICENSE for full license.
"""

from popupcad.manufacturing.multivalueoperation3 import MultiValueOperation3
import dev_tools.enum as enum
import popupcad

class Removability2(MultiValueOperation3):
    name = 'Removability'
    valuenames = []
    defaults = []
    keepout_types = enum.enum(
        one_way_up='one_way_up',
        one_way_down='one_way_down',
        two_way='two_way')
    keepout_type_default = keepout_types.one_way_up

    def operate(self, design):
        operation_ref, output_index = self.operation_links['parent'][0]
        ls1 = design.op_from_ref(operation_ref).output[output_index].csg

        if self.keepout_type == self.keepout_types.one_way_up:
            keepout = popupcad.algorithms.removability.one_way_up(ls1)
        elif self.keepout_type == self.keepout_types.one_way_down:
            keepout = popupcad.algorithms.removability.one_way_down(ls1)
        elif self.keepout_type == self.keepout_types.two_way:
            keepout = popupcad.algorithms.removability.two_way(ls1)
        else:
            raise Exception
        return keepout