text:
package org.jasig.cas.ticket.support;

import org.jasig.cas.ticket.TicketState;
import org.springframework.stereotype.Component;

/**
 * NeverExpiresExpirationPolicy always answers false when asked if a Ticket is
 * expired. Use this policy when you want a Ticket to live forever, or at least
 * as long as the particular CAS Universe exists.
 *
 * @author Scott Battaglia
 * @since 3.0.0
 */
@Component("neverExpiresExpirationPolicy")
public final class NeverExpiresExpirationPolicy extends AbstractCasExpirationPolicy {

    /** Serializable Unique ID. */
    private static final long serialVersionUID = 3833747698242303540L;

    /**
     * Instantiates a new Never expires expiration policy.
     */
    public NeverExpiresExpirationPolicy() {}

    @Override
    public boolean isExpired(final TicketState ticketState) {
        return false;
    }

    @Override
    public Long getTimeToLive() {
        return new Long(Integer.MAX_VALUE);
    }

    @Override
    public Long getTimeToIdle() {
        return new Long(Integer.MAX_VALUE);
    }
}

redpajama_set_name: RedPajamaGithub


text:
module Test.QuickCheck.Instances.List
       (anyList,nonEmpty
       ,infiniteList
       ,setLength
       ,increasing,nondecreasing
       ,increasingInf,nondecreasingInf
       ,decreasing,nonincreasing
       ,decreasingInf,nonincreasingInf
       ) where

import Test.QuickCheck hiding (infiniteList)
import Test.QuickCheck.Instances.Num
import Control.Applicative

{- | Generates a non-empty list with the contents generated using its
     argument.
-}
nonEmpty :: Gen a -> Gen [a]
nonEmpty x = liftA2 (:) x (anyList x)

{- | Generates any list (possibly empty) with the contents generated using
     its argument.
-}
anyList :: Gen a -> Gen [a]
anyList x = frequency [(1, pure []), (4, nonEmpty x)]

{- | Generates an infinite list with contents generated using its argument
-}
infiniteList :: Gen a -> Gen [a]
infiniteList x = liftA2 (:) x (infiniteList x)

{- | Generates a list with a set length
-}
setLength :: Int -> Gen a -> Gen [a]
setLength 0 _ = pure []
setLength n g = (:) <$> g <*> setLength (n-1) g

sumA :: (Applicative f, Num a) => f a -> f [a] -> f [a]
sumA = liftA2 (scanl (+))

monotonic_ :: (Arbitrary a, Num a) => (Gen a -> Gen [a]) -> Gen a -> Gen [a]
monotonic_ listGen gen = sumA arbitrary (listGen gen)

-- TODO: Generalise this to Ord a.
monotonic :: (Arbitrary a, Num a) => Gen a -> Gen [a]
monotonic gen = monotonic_ anyList gen

-- | Generate increasing towards infinity
increasing :: (Arbitrary a, Eq a, Num a) => Gen [a]
increasing = monotonic positive

-- | Generate an infinite list of increasing values
increasingInf :: (Arbitrary a, Eq a, Num a) => Gen [a]
increasingInf = monotonic_ infiniteList positive

-- | Generate nondecreasing values
nondecreasing :: (Arbitrary a, Num a) => Gen [a]
nondecreasing = monotonic nonNegative

-- | Generate an infinite list of nondecreasing values
nondecreasingInf :: (Arbitrary a, Num a) => Gen [a]
nondecreasingInf = monotonic_ infiniteList nonNegative

-- | Generate increasing towards infinity
decreasing :: (Arbitrary a, Eq a, Num a) => Gen [a]
decreasing = monotonic negative

-- | Generate an infinite list of increasing values
decreasingInf :: (Arbitrary a, Eq a, Num a) => Gen [a]
decreasingInf = monotonic_ infiniteList negative

-- | Generate nondecreasing values
nonincreasing :: (Arbitrary a, Num a) => Gen [a]
nonincreasing = monotonic nonPositive

-- | Generate an infinite list of nondecreasing values
nonincreasingInf :: (Arbitrary a, Num a) => Gen [a]
nonincreasingInf = monotonic_ infiniteList nonPositive


text:
/**
 * Autogenerated by Thrift Compiler (0.9.3)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package com.frc.thrift.datatype;

import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;

import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2017-01-05")
public class ResSetStr implements org.apache.thrift.TBase<ResSetStr, ResSetStr._Fields>, java.io.Serializable, Cloneable, Comparable<ResSetStr> {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ResSetStr");

  private static final org.apache.thrift.protocol.TField RES_FIELD_DESC = new org.apache.thrift.protocol.TField("res", org.apache.thrift.protocol.TType.I32, (short)1);
  private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.SET, (short)2);
  private static final org.apache.thrift.protocol.TField EXT_FIELD_DESC = new org.apache.thrift.protocol.TField("ext", org.apache.thrift.protocol.TType.STRING, (short)3);

  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
  static {
    schemes.put(StandardScheme.class, new ResSetStrStandardSchemeFactory());
    schemes.put(TupleScheme.class, new ResSetStrTupleSchemeFactory());
  }

  public int res; // required
  public Set<String> value; // required
  public String ext; // required

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
    RES((short)1, "res"),
    VALUE((short)2, "value"),
    EXT((short)3, "ext");

    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

    static {
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
        byName.put(field.getFieldName(), field);
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, or null if its not found.
     */
    public static _Fields findByThriftId(int fieldId) {
      switch(fieldId) {
        case 1: // RES
          return RES;
        case 2: // VALUE
          return VALUE;
        case 3: // EXT
          return EXT;
        default:
          return null;
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, throwing an exception
     * if it is not found.
     */
    public static _Fields findByThriftIdOrThrow(int fieldId) {
      _Fields fields = findByThriftId(fieldId);
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
      return fields;
    }

    /**
     * Find the _Fields constant that matches name, or null if its not found.
     */
    public static _Fields findByName(String name) {
      return byName.get(name);
    }

    private final short _thriftId;
    private final String _fieldName;

    _Fields(short thriftId, String fieldName) {
      _thriftId = thriftId;
      _fieldName = fieldName;
    }

    public short getThriftFieldId() {
      return _thriftId;
    }

    public String getFieldName() {
      return _fieldName;
    }
  }

  // isset id assignments
  private static final int __RES_ISSET_ID = 0;
  private byte __isset_bitfield = 0;
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
  static {
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    tmpMap.put(_Fields.RES, new org.apache.thrift.meta_data.FieldMetaData("res", org.apache.thrift.TFieldRequirementType.DEFAULT,
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT,
        new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET,
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    tmpMap.put(_Fields.EXT, new org.apache.thrift.meta_data.FieldMetaData("ext", org.apache.thrift.TFieldRequirementType.DEFAULT,
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    metaDataMap = Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ResSetStr.class, metaDataMap);
  }

  public ResSetStr() {
  }

  public ResSetStr(
    int res,
    Set<String> value,
    String ext)
  {
    this();
    this.res = res;
    setResIsSet(true);
    this.value = value;
    this.ext = ext;
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public ResSetStr(ResSetStr other) {
    __isset_bitfield = other.__isset_bitfield;
    this.res = other.res;
    if (other.isSetValue()) {
      Set<String> __this__value = new HashSet<String>(other.value);
      this.value = __this__value;
    }
    if (other.isSetExt()) {
      this.ext = other.ext;
    }
  }

  public ResSetStr deepCopy() {
    return new ResSetStr(this);
  }

  @Override
  public void clear() {
    setResIsSet(false);
    this.res = 0;
    this.value = null;
    this.ext = null;
  }

  public int getRes() {
    return this.res;
  }

  public ResSetStr setRes(int res) {
    this.res = res;
    setResIsSet(true);
    return this;
  }

  public void unsetRes() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RES_ISSET_ID);
  }

  /** Returns true if field res is set (has been assigned a value) and false otherwise */
  public boolean isSetRes() {
    return EncodingUtils.testBit(__isset_bitfield, __RES_ISSET_ID);
  }

  public void setResIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RES_ISSET_ID, value);
  }

  public int getValueSize() {
    return (this.value == null) ? 0 : this.value.size();
  }

  public java.util.Iterator<String> getValueIterator() {
    return (this.value == null) ? null : this.value.iterator();
  }

  public void addToValue(String elem) {
    if (this.value == null) {
      this.value = new HashSet<String>();
    }
    this.value.add(elem);
  }

  public Set<String> getValue() {
    return this.value;
  }

  public ResSetStr setValue(Set<String> value) {
    this.value = value;
    return this;
  }

  public void unsetValue() {
    this.value = null;
  }

  /** Returns true if field value is set (has been assigned a value) and false otherwise */
  public boolean isSetValue() {
    return this.value != null;
  }

  public void setValueIsSet(boolean value) {
    if (!value) {
      this.value = null;
    }
  }

  public String getExt() {
    return this.ext;
  }

  public ResSetStr setExt(String ext) {
    this.ext = ext;
    return this;
  }

  public void unsetExt() {
    this.ext = null;
  }

  /** Returns true if field ext is set (has been assigned a value) and false otherwise */
  public boolean isSetExt() {
    return this.ext != null;
  }

  public void setExtIsSet(boolean value) {
    if (!value) {
      this.ext = null;
    }
  }

  public void setFieldValue(_Fields field, Object value) {
    switch (field) {
    case RES:
      if (value == null) {
        unsetRes();
      } else {
        setRes((Integer)value);
      }
      break;

    case VALUE:
      if (value == null) {
        unsetValue();
      } else {
        setValue((Set<String>)value);
      }
      break;

    case EXT:
      if (value == null) {
        unsetExt();
      } else {
        setExt((String)value);
      }
      break;

    }
  }

  public Object getFieldValue(_Fields field) {
    switch (field) {
    case RES:
      return getRes();

    case VALUE:
      return getValue();

    case EXT:
      return getExt();

    }
    throw new IllegalStateException();
  }

  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
  public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case RES:
      return isSetRes();
    case VALUE:
      return isSetValue();
    case EXT:
      return isSetExt();
    }
    throw new IllegalStateException();
  }

  @Override
  public boolean equals(Object that) {
    if (that == null)
      return false;
    if (that instanceof ResSetStr)
      return this.equals((ResSetStr)that);
    return false;
  }

  public boolean equals(ResSetStr that) {
    if (that == null)
      return false;

    boolean this_present_res = true;
    boolean that_present_res = true;
    if (this_present_res || that_present_res) {
      if (!(this_present_res && that_present_res))
        return false;
      if (this.res != that.res)
        return false;
    }

    boolean this_present_value = true && this.isSetValue();
    boolean that_present_value = true && that.isSetValue();
    if (this_present_value || that_present_value) {
      if (!(this_present_value && that_present_value))
        return false;
      if (!this.value.equals(that.value))
        return false;
    }

    boolean this_present_ext = true && this.isSetExt();
    boolean that_present_ext = true && that.isSetExt();
    if (this_present_ext || that_present_ext) {
      if (!(this_present_ext && that_present_ext))
        return false;
      if (!this.ext.equals(that.ext))
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    List<Object> list = new ArrayList<Object>();

    boolean present_res = true;
    list.add(present_res);
    if (present_res)
      list.add(res);

    boolean present_value = true && (isSetValue());
    list.add(present_value);
    if (present_value)
      list.add(value);

    boolean present_ext = true && (isSetExt());
    list.add(present_ext);
    if (present_ext)
      list.add(ext);

    return list.hashCode();
  }

  @Override
  public int compareTo(ResSetStr other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetRes()).compareTo(other.isSetRes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.res, other.res);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetValue()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetExt()).compareTo(other.isSetExt());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetExt()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ext, other.ext);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }

  public _Fields fieldForId(int fieldId) {
    return _Fields.findByThriftId(fieldId);
  }

  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
  }

  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder("ResSetStr(");
    boolean first = true;

    sb.append("res:");
    sb.append(this.res);
    first = false;
    if (!first) sb.append(", ");
    sb.append("value:");
    if (this.value == null) {
      sb.append("null");
    } else {
      sb.append(this.value);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("ext:");
    if (this.ext == null) {
      sb.append("null");
    } else {
      sb.append(this.ext);
    }
    first = false;
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    // check for sub-struct validity
  }

  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
    try {
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
    try {
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
      __isset_bitfield = 0;
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private static class ResSetStrStandardSchemeFactory implements SchemeFactory {
    public ResSetStrStandardScheme getScheme() {
      return new ResSetStrStandardScheme();
    }
  }

  private static class ResSetStrStandardScheme extends StandardScheme<ResSetStr> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, ResSetStr struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField schemeField;
      iprot.readStructBegin();
      while (true)
      {
        schemeField = iprot.readFieldBegin();
        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
          break;
        }
        switch (schemeField.id) {
          case 1: // RES
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.res = iprot.readI32();
              struct.setResIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // VALUE
            if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
              {
                org.apache.thrift.protocol.TSet _set16 = iprot.readSetBegin();
                struct.value = new HashSet<String>(2*_set16.size);
                String _elem17;
                for (int _i18 = 0; _i18 < _set16.size; ++_i18)
                {
                  _elem17 = iprot.readString();
                  struct.value.add(_elem17);
                }
                iprot.readSetEnd();
              }
              struct.setValueIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // EXT
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.ext = iprot.readString();
              struct.setExtIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot, ResSetStr struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(RES_FIELD_DESC);
      oprot.writeI32(struct.res);
      oprot.writeFieldEnd();
      if (struct.value != null) {
        oprot.writeFieldBegin(VALUE_FIELD_DESC);
        {
          oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.value.size()));
          for (String _iter19 : struct.value)
          {
            oprot.writeString(_iter19);
          }
          oprot.writeSetEnd();
        }
        oprot.writeFieldEnd();
      }
      if (struct.ext != null) {
        oprot.writeFieldBegin(EXT_FIELD_DESC);
        oprot.writeString(struct.ext);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class ResSetStrTupleSchemeFactory implements SchemeFactory {
    public ResSetStrTupleScheme getScheme() {
      return new ResSetStrTupleScheme();
    }
  }

  private static class ResSetStrTupleScheme extends TupleScheme<ResSetStr> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, ResSetStr struct) throws org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetRes()) {
        optionals.set(0);
      }
      if (struct.isSetValue()) {
        optionals.set(1);
      }
      if (struct.isSetExt()) {
        optionals.set(2);
      }
      oprot.writeBitSet(optionals, 3);
      if (struct.isSetRes()) {
        oprot.writeI32(struct.res);
      }
      if (struct.isSetValue()) {
        {
          oprot.writeI32(struct.value.size());
          for (String _iter20 : struct.value)
          {
            oprot.writeString(_iter20);
          }
        }
      }
      if (struct.isSetExt()) {
        oprot.writeString(struct.ext);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, ResSetStr struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(3);
      if (incoming.get(0)) {
        struct.res = iprot.readI32();
        struct.setResIsSet(true);
      }
      if (incoming.get(1)) {
        {
          org.apache.thrift.protocol.TSet _set21 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
          struct.value = new HashSet<String>(2*_set21.size);
          String _elem22;
          for (int _i23 = 0; _i23 < _set21.size; ++_i23)
          {
            _elem22 = iprot.readString();
            struct.value.add(_elem22);
          }
        }
        struct.setValueIsSet(true);
      }
      if (incoming.get(2)) {
        struct.ext = iprot.readString();
        struct.setExtIsSet(true);
      }
    }
  }

}


text:
static char state_unreferenced_callback_tag = 0;
LUABIND_API char luabind::detail::state_use_count_tag = 0;

void luabind::detail::shared_ptr_deleter::alter_use_count(
    lua_State* L, lua_Integer diff)
{
    lua_rawgetp(L, LUA_REGISTRYINDEX, &state_use_count_tag);
    lua_Integer uc = lua_tointeger(L, -1) + diff;
    lua_pop(L, 1);
    assert(uc >= 0);
    lua_pushinteger(L, uc);
    lua_rawsetp(L, LUA_REGISTRYINDEX, &state_use_count_tag);

    if (!uc)
    {
        if (state_unreferenced_fun cb = get_state_unreferenced_callback(L))
            cb(L);
    }
}

void luabind::set_state_unreferenced_callback(
    lua_State* L, state_unreferenced_fun cb)
{
    lua_pushcfunction(L, reinterpret_cast<lua_CFunction>(cb));
    lua_rawsetp(L, LUA_REGISTRYINDEX, &state_unreferenced_callback_tag);
}

luabind::state_unreferenced_fun
luabind::get_state_unreferenced_callback(
    lua_State* L)
{
    lua_rawgetp(L, LUA_REGISTRYINDEX, &state_unreferenced_callback_tag);
    state_unreferenced_fun cb = reinterpret_cast<state_unreferenced_fun>(
        lua_tocfunction(L, -1));
    lua_pop(L, 1);
    return cb;
}

bool luabind::is_state_unreferenced(lua_State* L)
{
    lua_rawgetp(L, LUA_REGISTRYINDEX, &detail::state_use_count_tag);
    lua_Integer uc = lua_tointeger(L, -1);
    lua_pop(L, 1);
    assert(uc >= 0);
    return uc <= 0;
}


text:
package persistence.entities

import java.util.UUID

case class Supplier(id : String, name: String, description: String) {
  def toSimpleSupplier = SimpleSupplier(this.name,this.description)
}

case class SimpleSupplier(name: String, desc: String){
  def toSupplier = Supplier(UUID.randomUUID().toString,this.name,this.desc)
}


text:
El cielo se enrojeció de repente, y el fuego ancestral del dragón Vladimir alcanzó
por la retro guardia gran parte del ejercito, que en ese momento estaba desprevenido.


text:
""" This script parse and download the attachments of an email """
# coding:utf-8
import os
import poplib
import email
import time
from datetime import datetime
from email._parseaddr import parsedate_tz
import util
from Preprocess import main as predo
import const

__author__ = "Aiden"
__date__ = "2016-12-28"
__copyright__ = "Copyright 2016, wochacha"
__version__ = "1.1.2"

class Email(object):
    """This class is to parse an email and get its attachment files """
    # email configuration
    def __init__(self):
        self.dateDir = datetime.now().strftime("%Y%m%d")
        self.host = const.EMAIL_CONF['host']
        self.port = const.EMAIL_CONF['port']
        self.user_id = const.EMAIL_CONF['user']
        self.pwd = const.EMAIL_CONF['password']
        self.uidl = ''
        self.mail_id = ''
        self.send_date = ''
        self.biz_name = ''
        self.send_datetime = ''

    def main(self):
        """ parse the email and save its attachments """
        mail_server = poplib.POP3(self.host, self.port)
        try:
            mail_server.user(self.user_id)
            mail_server.pass_(self.pwd)
        except poplib.error_proto as e:
            print("Login failed:", e)
            exit(1)
        (mail_count, size) = mail_server.stat()
        print("MailNum: {0}  Size: {1}MB".format(
            mail_count, round(size / 1024 / 1024)))
        results = util.mysql_execute("select uidl from tesla_email")
        # get local uidl list
        loc_uidl = [loc_one[0] for loc_one in results]
        # Get a unique identification of an email
        # construct a list that contains ready-to-download id
        serv_uidl_dic = {serv_one.decode().split(
            )[-1]: serv_one.decode().split()[0] for serv_one in mail_server.uidl()[1]}
        # new email uidl set
        new_uidl = set(serv_uidl_dic.keys()).difference(set(loc_uidl))
        if not new_uidl:
            print("No new emails !")
            exit(0)
        # Loop email sequence
        for uidl in new_uidl:
            self.mail_id = serv_uidl_dic[uidl]
            print('Now downloading the email No.{}'.format(self.mail_id))
            self.parse_email(mail_server, uidl)
            print("=================================")
            # log out from mail server
        mail_server.quit()

    def parse_email(self, mail_conn, uidl):
        """parse email content"""
        messages = mail_conn.retr(self.mail_id)[1]
        content = email.message_from_bytes(
            '\n'.encode('utf-8').join(messages))
        subject = email.header.decode_header(content.get('subject'))
        mail_from = email.utils.parseaddr(content.get("from"))[1]
        print("From:", mail_from)
        raw_date_time = parsedate_tz(content.get('date'))
        # (y, month, d, h, min, sec, _, _, _, tzoffset) = parsedate_tz(content.get('date'))
        # sentDate = "%d-%02d-%02d %02d:%02d:%02d" % (y, month, d, h, min, sec)
        self.send_datetime = time.strftime(
            "%Y-%m-%d %H:%M:%S", raw_date_time[0:-1])
        print("Date:", self.send_datetime)
        self.send_date = time.strftime("%Y%m%d", raw_date_time[:-1])
        sub = self.decode_str(subject[0][0])
        print("Subject:", sub)
        # Insert new email-info into the table: tesla_email
        util.mysql_execute("""INSERT INTO tesla_email(
            uidl, sequence, subject, mail_from, send_date) values(
                '{}', {}, '{}', '{}', '{}') """.format(
                    uidl, self.mail_id, sub, mail_from, self.send_datetime))
        self.download_files(content)

    def download_files(self, mail):
        """download email attachemnts"""
        for part in mail.walk():
            if not part.is_multipart():
                # Start to deal with attachments
                name = part.get_param('name')
                if name:
                    tmp_name = email.header.decode_header(name)
                    filename = self.decode_str(tmp_name[0][0])
                    print('Attachment:', filename)
                    # set download path
                    filepath = os.path.join(const.WIN_EMAIL_DIR, self.send_date)
                    # If not exist, create it
                    if not os.path.exists(filepath):
                        os.makedirs(filepath)
                    filename = self.set_filename(filepath, filename)
                    full_path = os.path.join(filepath, filename)
                    # save file
                    with open(full_path, 'wb') as fo:
                        fo.write(part.get_payload(decode=True))
                    md5 = util.get_file_md5(full_path)
                    file_size = util.format_filesize(full_path)
                    # insert the record into mysql table
                    util.mysql_execute("""INSERT IGNORE INTO importdata.tesla_file(
                        uidl, filename, size, send_date, md5) values (
                            '{}', '{}', '{}', '{}', '{}') """.format(
                                self.mail_id, filename, file_size, self.send_datetime, md5))
                    predo(full_path, 'tesla')
                else:
                    pass
                    # deal with email contents
                    # ch = par.get_content_charset()
                    # if ch == None:
                    #  print(par.get_payload(decode=True).decode())
                    # else:
                    #   print(par.get_payload(decode=True).decode(ch))

    @staticmethod
    def set_filename(filepath, filename, n=1):
        """ dddd"""
        while os.path.exists(os.path.join(filepath, filename)):
            filename = "{}({}).{}".format(
                os.path.splitext(filename)[0], str(n), os.path.splitext(filename)[1])
            n += 1
        return filename

    @staticmethod
    def decode_str(name):
        """if byte string then decode it"""
        if isinstance(name[0][0], bytes):
            try:
                if name[0][1] is None:
                    output_name = name[0][0].decode()
                else:
                    output_name = name[0][0].decode(name[0][1])
            except UnicodeDecodeError:
                output_name = name[0][0].decode('gb18030')
        else:
            output_name = name[0][0]

        return output_name

# main call
if __name__ == '__main__':
    OBJ_GET_EMAIL = Email()
    OBJ_GET_EMAIL.main()

    # mailServer.dele(i)
    # mailServer.quit()


text:
layout: page
title: Full Song Lessons - Learn to play guitar like your favorite artists, with step by step song lessons - Song Notes by David Pots
permalink: /songs/by-artist
---

{% assign song_lessons = site.lessons | where: "category","full_song" %}

Song Lessons

Here's a list of the {{ song_lessons.size }} song lessons I've made on my YouTube channel. I typically add one song lesson per week. Want to request a song lesson? Email me and let me know!

  Recently Added Most Popular Beginner-Friendly by Artist by Song Title by Song Year

{% assign number_of_pdfs = 0 %}
{% assign songs_by_artist = site.lessons | where: "category", "full_song" | group_by: "artist" | sort: "name" %}

{% for artist in songs_by_artist %}
{% assign artist_count = 0 %}

{% for song in artist.items %}
  {% assign artist_count = artist_count | plus: 1 %}
{% endfor %}

{% if artist_count > 0 %}

{{artist.name}}

  {% assign sorted_by_song_name = artist.items | sort: "song_title" %}
  {% for song in sorted_by_song_name %}

{{song.song_title}}

  {% endfor %}

{% endif %}
{% endfor %}

More song lessons:  Recently Added | Most Popular | Beginner-Friendly | by Artist | by Song Title | by Song Year


text:
<?php $this->view('partials/head', array(
	"scripts" => array(
		"clients/client_list.js"
	)
)); ?>

	<?php $widget->view($this, 'duplicated_computernames'); ?>

	<?php $widget->view($this, 'modified_computernames'); ?>

    <?php $widget->view($this, 'bound_to_ds'); ?>

<?php $this->view('partials/foot'); ?>


text:
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<title>Main page - ECM ECO Monitoring</title>

ECM ECO Monitoring

Instrumenty
pomiarowe i systemy w ochronie œrodowiska.

41-506
Chorzów, ul. Maronia 44, tel./fax: +(48)-32-246 2471, e-mail : ecmpol@demo.pl

Informacje o
        Firmie

Zakres
        dzia³ania

Informacje
        kontaktowe

Wiêcej informacji

Lista
        ³¹czy do partnerów ECM

Biuletyny

Informacje
o firmie

ECO Monitoring (ECM) jest
producentem sprzêtu do monitorowania œrodowiska, integratorem
systemów zbierania i analizy danych pomiarowych oraz firm¹
konsultingowo-eksperck¹ w projektach dotycz¹cych ochrony œrodowiska.

Holding ECM ECO Monitoring jest
czêœci¹ amerykañskiego koncernu TSI - Environmental
Systems Corporation.

(Wiêcej
o ECM ECO Monitoring)

Powrót do pocz¹tku

Podstawowy zakres dzia³ania
ECM obejmuje :

Monitorowanie
gazów procesowych.

ECM oferuje szerok¹ gam¹
analizatorów do kontroli procesów przemys³owych. Do najwa¿niejszych
nale¿¹ analizatory O2 i wszelkich gazów wystêpuj¹cych w
procesie spalania dla przemys³ów takich jak metalurgia, energetyka, przemys³ cementowy,
spo¿ywczy, petrochemia, chemia

Monitorowanie spalin - emisje.

ECM jest integratorem z³o¿onych
systemów monitoringu przy u¿yciu wszelkich znanych technik.
Obok stacjonarnych zestawów dla monitorowania przemys³owych Ÿróde³
emisji dostêpne s¹ tak¿e ruchome stanowiska pomiarowe
zainstalowane na kompletnie wyposa¿onych samochodach.

ECM produkuje najwy¿szej
jakoœci kontenery z izolacj¹ ciepln¹ - niezbêdne dla
zainstalowania pracuj¹cych w trudnych warunkach zestawów pomiarowych.

Monitorowanie
zanieczyszczen powietrza - imisje.

ECM integruje systemy
zbierania danych z³o¿one z czujników pomiarowych, analizatorów
i komputerowych centrów przetwarzania i obróbki informacji
wyposa¿one w specjalistyczne oprogramowanie.

Monitorowanie
jakoœci wody

ECM oferuje kompletne
zestawy analizatorów dla wody pitnej, przemys³owej, œcieków,
a tak¿e dla specjalnych zastosowañ. Dostarczane s¹ tak¿e
niezbêdne pompy, filtry oraz systemy obróbki danych pomiarowych.

Meteorologia

ECM dostarcza
profesjonalne stacje meteorologiczne do pomiarów wszelkich
parametrów meteorologicznych.

Odpady

ECM dysponuje doœwiadczeniem
w zakresie projektowania i wykonawstwa obiektów utylizacji odpadów.

Powrót do pocz¹tku

Informacje
kontaktowe :

Adres : ECO Monitoring, Maronia 44, 41-506 Chorzów

tel./fax : (32) 246 2471 wewn. 362

Adres poczty elektronicznej : ecmpol@demo.pl

Powrót do
pocz¹tku

Wiêcej
informacii

Chc¹c otrzymaæ wiêcej
informacji na interesuj¹cy Ciê temat przyœlij na nasz adres
poczt¹, faxem lub poczt¹ elektroniczn¹ wype³niony Kwestionariusz.

Powrót do pocz¹tku

BIULETYNY

Biuletyn 1 / 2000

Powrót do pocz¹tku

Lista
 ³¹czy
do partnerów ECM

Apel www.apel.cz

Balston-Whatman www.balston.co.uk

BAS Elektra www.bas-elektra.cz

DataQua www.dataqua.hu

EG&G Chandler www.trigas.net

EPM www.epmenvironmental.com

ESC www.envirosys.com

Gastech www.gastech-inc.com

Hydrolab www.hydrolab.com

J.U.M. www.jum.com

Kalman System www.ns.kfkipark.hu/kalman

Monitor Europe www.monitoreurope.com

PCME www.pcme.co.uk

Shaw Moisture www.shawmeters.com

TSI www.tsi.com

Turner Designs www.turnerdesigns.com

Verewa www.durag.de

Powrót do pocz¹tku

ECM ECO Monitoring

Ostatnia modyfikacja: máj 02, 2000.


text:
// Copyright 2014 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
// Original code is licensed as follows:

#include "fxbarcode/oned/BC_OnedCodaBarWriter.h"

#include "core/fxcrt/fx_extension.h"
#include "core/fxcrt/fx_memory.h"
#include "fxbarcode/BC_Writer.h"
#include "fxbarcode/common/BC_CommonBitMatrix.h"
#include "fxbarcode/oned/BC_OneDimWriter.h"
#include "third_party/base/stl_util.h"

namespace {

const char kOnedCodaAlphabet[] = {'0', '1', '2', '3', '4', '5', '6', '7',
                                  '8', '9', '-', '$', ':', '/', '.', '+',
                                  'A', 'B', 'C', 'D', 'T', 'N'};

const int8_t kOnedCodaCharacterEncoding[] = {
    0x03, 0x06, 0x09, 0x60, 0x12, 0x42, 0x21, 0x24, 0x30, 0x48, 0x0c,
    0x18, 0x45, 0x51, 0x54, 0x15, 0x1A, 0x29, 0x0B, 0x0E, 0x1A, 0x29};
static_assert(FX_ArraySize(kOnedCodaCharacterEncoding) == 22, "Wrong size");
static_assert(FX_ArraySize(kOnedCodaCharacterEncoding) ==
                  FX_ArraySize(kOnedCodaAlphabet),
              "Wrong size");

const char kStartEndChars[] = {'A', 'B', 'C', 'D', 'T', 'N', '*', 'E',
                               'a', 'b', 'c', 'd', 't', 'n', 'e'};
const char kCOntentChars[] = {'0', '1', '2', '3', '4', '5', '6', '7',
                              '8', '9', '-', '$', '/', ':', '+', '.'};

}  // namespace

CBC_OnedCodaBarWriter::CBC_OnedCodaBarWriter() = default;

CBC_OnedCodaBarWriter::~CBC_OnedCodaBarWriter() = default;

bool CBC_OnedCodaBarWriter::SetStartChar(char start) {
  if (!pdfium::ContainsValue(kStartEndChars, start))
    return false;

  m_chStart = start;
  return true;
}

bool CBC_OnedCodaBarWriter::SetEndChar(char end) {
  if (!pdfium::ContainsValue(kStartEndChars, end))
    return false;

  m_chEnd = end;
  return true;
}

void CBC_OnedCodaBarWriter::SetDataLength(int32_t length) {
  m_iDataLenth = length + 2;
}

bool CBC_OnedCodaBarWriter::SetTextLocation(BC_TEXT_LOC location) {
  if (location < BC_TEXT_LOC_NONE || location > BC_TEXT_LOC_BELOWEMBED) {
    return false;
  }
  m_locTextLoc = location;
  return true;
}

bool CBC_OnedCodaBarWriter::SetWideNarrowRatio(int8_t ratio) {
  if (ratio < 2 || ratio > 3)
    return false;

  m_iWideNarrRatio = ratio;
  return true;
}

bool CBC_OnedCodaBarWriter::FindChar(wchar_t ch, bool isContent) {
  if (ch > 0x7F)
    return false;

  char narrow_ch = static_cast<char>(ch);
  return pdfium::ContainsValue(kCOntentChars, narrow_ch) ||
         (isContent && pdfium::ContainsValue(kStartEndChars, narrow_ch));
}

bool CBC_OnedCodaBarWriter::CheckContentValidity(WideStringView contents) {
  return HasValidContentSize(contents) &&
         std::all_of(
             contents.begin(), contents.end(),
             [this](const wchar_t& ch) { return this->FindChar(ch, false); });
}

WideString CBC_OnedCodaBarWriter::FilterContents(WideStringView contents) {
  WideString filtercontents;
  filtercontents.Reserve(contents.GetLength());
  wchar_t ch;
  for (size_t index = 0; index < contents.GetLength(); index++) {
    ch = contents[index];
    if (ch > 175) {
      index++;
      continue;
    }
    if (!FindChar(ch, true))
      continue;
    filtercontents += ch;
  }
  return filtercontents;
}

uint8_t* CBC_OnedCodaBarWriter::EncodeWithHint(const ByteString& contents,
                                               BCFORMAT format,
                                               int32_t& outWidth,
                                               int32_t& outHeight,
                                               int32_t hints) {
  if (format != BCFORMAT_CODABAR)
    return nullptr;
  return CBC_OneDimWriter::EncodeWithHint(contents, format, outWidth, outHeight,
                                          hints);
}

uint8_t* CBC_OnedCodaBarWriter::EncodeImpl(const ByteString& contents,
                                           int32_t& outLength) {
  ByteString data = m_chStart + contents + m_chEnd;
  m_iContentLen = data.GetLength();
  uint8_t* result = FX_Alloc2D(uint8_t, m_iWideNarrRatio * 7, data.GetLength());
  char ch;
  int32_t position = 0;
  for (size_t index = 0; index < data.GetLength(); index++) {
    ch = FXSYS_ToUpperASCII(data[index]);
    switch (ch) {
      case 'T':
        ch = 'A';
        break;
      case 'N':
        ch = 'B';
        break;
      case '*':
        ch = 'C';
        break;
      case 'E':
        ch = 'D';
        break;
      default:
        break;
    }
    int8_t code = 0;
    for (size_t i = 0; i < FX_ArraySize(kOnedCodaAlphabet); i++) {
      if (ch == kOnedCodaAlphabet[i]) {
        code = kOnedCodaCharacterEncoding[i];
        break;
      }
    }
    uint8_t color = 1;
    int32_t counter = 0;
    int32_t bit = 0;
    while (bit < 7) {
      result[position] = color;
      position++;
      if (((code >> (6 - bit)) & 1) == 0 || counter == m_iWideNarrRatio - 1) {
        color = !color;
        bit++;
        counter = 0;
      } else {
        counter++;
      }
    }
    if (index < data.GetLength() - 1) {
      result[position] = 0;
      position++;
    }
  }
  outLength = position;
  return result;
}

WideString CBC_OnedCodaBarWriter::encodedContents(WideStringView contents) {
  WideString strStart(static_cast<wchar_t>(m_chStart));
  WideString strEnd(static_cast<wchar_t>(m_chEnd));
  return strStart + contents + strEnd;
}

bool CBC_OnedCodaBarWriter::RenderResult(WideStringView contents,
                                         uint8_t* code,
                                         int32_t codeLength) {
  return CBC_OneDimWriter::RenderResult(
      encodedContents(contents).AsStringView(), code, codeLength);
}


text:
package net.dreamlu.easy.commons.utils;

import java.util.Arrays;

import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;

/**
 * AES对称加密
 */
public class AESUtils {
	private AESUtils(){}

	/**
	 * 加密
	 * @param secret 密钥
	 * @param value 待加密的字符串
	 * @return 加密后的字符串
	 */
	public static String encrypt(String secret, String value) {
		SecretKeySpec keySpec = getKey(secret);
		IvParameterSpec iv = new IvParameterSpec("0102030405060708".getBytes());
		try {
			Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
			cipher.init(Cipher.ENCRYPT_MODE, keySpec, iv);
			byte[] encrypted = cipher.doFinal(value.getBytes(Charsets.UTF_8));
			return Base64Utils.encode(encrypted);
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	}

	/**
	 * 解密
	 * @param secret 密钥
	 * @param value 待解密字符串
	 * @return 解密后的字符串
	 */
	public static String decrypt(String secret, String value) {
		SecretKeySpec keySpec = getKey(secret);
		IvParameterSpec iv = new IvParameterSpec("0102030405060708".getBytes());
		try {
			Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");

			cipher.init(Cipher.DECRYPT_MODE, keySpec, iv);
			byte[] encrypted1 = Base64Utils.decodeBase64(value);

			byte[] original = cipher.doFinal(encrypted1);
			return new String(original, Charsets.UTF_8);
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	}

	/**
	 * 生成加密的密钥,保证长度为16位
	 * @param secret 用户的密钥
	 * @return 生成的密钥
	 */
	private static SecretKeySpec getKey(String secret) {
		byte[] bytes = secret.getBytes(Charsets.UTF_8);
		return new SecretKeySpec(Arrays.copyOf(bytes, 16), "AES");
	}
}


text:
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef NET_DIAL_DIAL_HTTP_SERVER_H
#define NET_DIAL_DIAL_HTTP_SERVER_H

#include <string>

#include "base/callback_forward.h"
#include "base/memory/ref_counted.h"
#include "base/single_thread_task_runner.h"
#include "net/dial/dial_service_handler.h"
#include "net/http/http_status_code.h"
#include "net/server/http_server.h"
#include "net/server/http_server_response_info.h"

namespace net {

class DialService;
class HttpResponseInfo;
class IPEndPoint;

// This class is created and owned by DialService and is not meant to be
// used externally.
// All functions run on the DialService's message loop, except for
// the callback AsyncReceivedResponse() which is eventually called
// by a DialServiceHandler.
// It's refcounted threadsafe so we can safely bind it to the callback we pass
// to DialServiceHandler::handleRequest().
class NET_EXPORT DialHttpServer
    : public HttpServer::Delegate,
      public base::RefCountedThreadSafe<DialHttpServer> {
 public:
  explicit DialHttpServer(DialService* dial_service);
  void Stop();

  // HttpServer::Delegate implementation
  virtual void OnConnect(int /*conn_id*/) override{};
  virtual void OnHttpRequest(int conn_id,
                             const HttpServerRequestInfo& info) override;

  virtual void OnClose(int conn_id) override;

  // Unused HttpServer::Delegate
  virtual void OnWebSocketRequest(
      int /*connection_id*/,
      const HttpServerRequestInfo& /*info*/) override {}

  virtual void OnWebSocketMessage(int /*connection_id*/,
                                  const std::string& /*data*/) override {}

  // Return the formatted application URL
  std::string application_url() const { return server_url_ + "apps/"; }

  // Return the formatted location URL.
  std::string location_url() const { return server_url_ + "dd.xml"; }

  // Somewhat similar to HttpServer::GetLocalAddress, but figures out the
  // network IP address and uses that. The port remains the same.
  int GetLocalAddress(IPEndPoint* addr);

 private:
  friend class base::RefCountedThreadSafe<DialHttpServer>;
  virtual ~DialHttpServer();

  void ConfigureApplicationUrl();

  // Send the DIAL Device Description Manifest to the client.
  void SendDeviceDescriptionManifest(int conn_id);

  // Query DIAL service for a handler for the given request.
  // Return false if no handler found, true if handleRequest() was issued
  // to the handler.
  bool DispatchToHandler(int conn_id, const HttpServerRequestInfo& info);

  // Callback from WebKit thread when the HTTP task is complete.
  // Post the response info to DIAL service thread.
  void AsyncReceivedResponse(int conn_id,
                             std::unique_ptr<HttpServerResponseInfo> response);
  // Handles DIAL response.
  void OnReceivedResponse(int conn_id,
                          std::unique_ptr<HttpServerResponseInfo> response);

  std::unique_ptr<HttpServer> http_server_;
  std::string server_url_;
  // DialService owns this object.
  DialService* dial_service_;

  // Message Loop of the thread that created us. We make sure http server
  // is only called on the proper thread.
  scoped_refptr<base::SingleThreadTaskRunner> task_runner_;

  DISALLOW_COPY_AND_ASSIGN(DialHttpServer);
};

}  // namespace net

#endif  // NET_DIAL_DIAL_HTTP_SERVER_H


text:
<?php

namespace FSB\ASTT\FrontBundle\Controller;

use FSB\ASTT\FrontBundle\Controller\FrontController;

class TeamsController extends FrontController
{
    public function indexAction()
    {
        $pageTitle = 'Equipes';

        $em = $this->getDoctrine()->getEntityManager();

        $teamsArray = array(
            'W' => $em->getRepository('FSBASTTCoreBundle:Team')->findAllDisplayedByCivility('W'),
            'M' => $em->getRepository('FSBASTTCoreBundle:Team')->findAllDisplayedByCivility('M'),
            'Y' => $em->getRepository('FSBASTTCoreBundle:Team')->findAllDisplayedByCivility('Y')
        );

        return $this->render('FSBASTTFrontBundle:Teams:index.html.twig', array(
            'page_title' => $pageTitle,
            'teamsArray' => $teamsArray
        ));
    }

    public function showAction($id)
    {
        $pageTitle = 'Equipe';

        $em = $this->getDoctrine()->getEntityManager();

        $team = $em->getRepository('FSBASTTCoreBundle:Team')->findOneById($id);

        if (!$team) {
            throw $this->createNotFoundException('Cette équipe n\'existe pas.');
        }

        $players = $em->getRepository('FSBASTTCoreBundle:Player')->findByTeam($team->getId());

        $rep = 'images/teams/';
        $allowed_formats = array('.jpg', '.JPG', '.jpeg', '.JPEG', '.gif', '.png', '.PNG');
        $photo = NULL;
        foreach ($allowed_formats as $af) {
            if (file_exists($rep.$team->getId().$af)) {
                $photo = $team->getId().$af;
                break;
            }
        }

        return $this->render('FSBASTTFrontBundle:Teams:show.html.twig', array(
            'page_title' => $pageTitle,
            'team' => $team,
            'players' => $players,
            'photo' => $photo
        ));
    }

    public function resultsAction($id)
    {
        $pageTitle = 'Résumés';

        $em = $this->getDoctrine()->getEntityManager();

        $team = $em->getRepository('FSBASTTCoreBundle:Team')->findOneById($id);

        if (!$team) {
            throw $this->createNotFoundException('Cette équipe n\'existe pas.');
        }

        $results = $em->getRepository('FSBASTTCoreBundle:Result')->findAllByTeam($team->getId());

        return $this->render('FSBASTTFrontBundle:Teams:results.html.twig', array(
            'page_title' => $pageTitle,
            'team' => $team,
            'results' => $results
        ));
    }
}


text:
No requirements.

## Providers

| Name | Version |
|------|---------|
|  [google](#provider\_google) | 4.11.0 |
|  [google-beta](#provider\_google-beta) | 4.11.0 |
|  [random](#provider\_random) | 3.1.0 |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
|  [project\_id](#input\_project\_id) | The project ID to manage the Secret Manager resources | `string` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
|  [secret\_names](#output\_secret\_names) | List of secret names |
|  [secret\_versions](#output\_secret\_versions) | List of secret versions |


text:
using base::LazyInstance;
using base::ThreadLocalPointer;

namespace content {
namespace {

// Returns the id of the given |service_worker_registration|, which
// is only available on the implementation of the interface.
int64_t GetServiceWorkerRegistrationId(
    blink::WebServiceWorkerRegistration* service_worker_registration) {
  return static_cast<WebServiceWorkerRegistrationImpl*>(
             service_worker_registration)->registration_id();
}

void ConnectToServiceOnMainThread(
    mojo::InterfaceRequest<mojom::BackgroundSyncService> request) {
  DCHECK(ChildThreadImpl::current());
  ChildThreadImpl::current()->service_registry()->ConnectToRemoteService(
      std::move(request));
}

LazyInstance<ThreadLocalPointer<BackgroundSyncProvider>>::Leaky
    g_sync_provider_tls = LAZY_INSTANCE_INITIALIZER;

}  // namespace

BackgroundSyncProvider::BackgroundSyncProvider(
    const scoped_refptr<base::SingleThreadTaskRunner> main_task_runner)
    : main_thread_task_runner_(main_task_runner) {
  DCHECK(main_task_runner);
  g_sync_provider_tls.Pointer()->Set(this);
}

BackgroundSyncProvider::~BackgroundSyncProvider() {
  g_sync_provider_tls.Pointer()->Set(nullptr);
}

// static
BackgroundSyncProvider*
BackgroundSyncProvider::GetOrCreateThreadSpecificInstance(
    base::SingleThreadTaskRunner* main_thread_task_runner) {
  DCHECK(main_thread_task_runner);
  if (g_sync_provider_tls.Pointer()->Get())
    return g_sync_provider_tls.Pointer()->Get();

  bool have_worker_id = (WorkerThread::GetCurrentId() > 0);
  if (!main_thread_task_runner->BelongsToCurrentThread() && !have_worker_id) {
    // On a worker thread, this could happen if this method is called
    // very late (say by a garbage collected mojom::SyncRegistration).
    return nullptr;
  }

  BackgroundSyncProvider* instance =
      new BackgroundSyncProvider(main_thread_task_runner);

  if (have_worker_id) {
    // For worker threads, use the observer interface to clean up when workers
    // are stopped.
    WorkerThread::AddObserver(instance);
  }

  return instance;
}

void BackgroundSyncProvider::registerBackgroundSync(
    const blink::WebSyncRegistration* options,
    blink::WebServiceWorkerRegistration* service_worker_registration,
    blink::WebSyncRegistrationCallbacks* callbacks) {
  DCHECK(options);
  DCHECK(service_worker_registration);
  DCHECK(callbacks);
  int64_t service_worker_registration_id =
      GetServiceWorkerRegistrationId(service_worker_registration);
  std::unique_ptr<const blink::WebSyncRegistration> optionsPtr(options);
  std::unique_ptr<blink::WebSyncRegistrationCallbacks> callbacksPtr(callbacks);

  // base::Unretained is safe here, as the mojo channel will be deleted (and
  // will wipe its callbacks) before 'this' is deleted.
  GetBackgroundSyncServicePtr()->Register(
      mojo::ConvertTo<mojom::SyncRegistrationPtr>(*(optionsPtr.get())),
      service_worker_registration_id,
      base::Bind(&BackgroundSyncProvider::RegisterCallback,
                 base::Unretained(this),
                 base::Passed(std::move(callbacksPtr))));
}

void BackgroundSyncProvider::getRegistrations(
    blink::WebServiceWorkerRegistration* service_worker_registration,
    blink::WebSyncGetRegistrationsCallbacks* callbacks) {
  DCHECK(service_worker_registration);
  DCHECK(callbacks);
  int64_t service_worker_registration_id =
      GetServiceWorkerRegistrationId(service_worker_registration);
  std::unique_ptr<blink::WebSyncGetRegistrationsCallbacks> callbacksPtr(
      callbacks);

  // base::Unretained is safe here, as the mojo channel will be deleted (and
  // will wipe its callbacks) before 'this' is deleted.
  GetBackgroundSyncServicePtr()->GetRegistrations(
      service_worker_registration_id,
      base::Bind(&BackgroundSyncProvider::GetRegistrationsCallback,
                 base::Unretained(this),
                 base::Passed(std::move(callbacksPtr))));
}

void BackgroundSyncProvider::WillStopCurrentWorkerThread() {
  delete this;
}

void BackgroundSyncProvider::RegisterCallback(
    std::unique_ptr<blink::WebSyncRegistrationCallbacks> callbacks,
    mojom::BackgroundSyncError error,
    const mojom::SyncRegistrationPtr& options) {
  // TODO(iclelland): Determine the correct error message to return in each case
  std::unique_ptr<blink::WebSyncRegistration> result;
  switch (error) {
    case mojom::BackgroundSyncError::NONE:
      if (!options.is_null())
        result = mojo::ConvertTo<std::unique_ptr<blink::WebSyncRegistration>>(
            options);
      callbacks->onSuccess(std::move(result));
      break;
    case mojom::BackgroundSyncError::NOT_FOUND:
      NOTREACHED();
      break;
    case mojom::BackgroundSyncError::STORAGE:
      callbacks->onError(
          blink::WebSyncError(blink::WebSyncError::ErrorTypeUnknown,
                              "Background Sync is disabled."));
      break;
    case mojom::BackgroundSyncError::NOT_ALLOWED:
      callbacks->onError(
          blink::WebSyncError(blink::WebSyncError::ErrorTypeNoPermission,
                              "Attempted to register a sync event without a "
                              "window or registration tag too long."));
      break;
    case mojom::BackgroundSyncError::PERMISSION_DENIED:
      callbacks->onError(
          blink::WebSyncError(blink::WebSyncError::ErrorTypePermissionDenied,
                              "Permission denied."));
      break;
    case mojom::BackgroundSyncError::NO_SERVICE_WORKER:
      callbacks->onError(
          blink::WebSyncError(blink::WebSyncError::ErrorTypeUnknown,
                              "No service worker is active."));
      break;
  }
}

void BackgroundSyncProvider::GetRegistrationsCallback(
    std::unique_ptr<blink::WebSyncGetRegistrationsCallbacks> callbacks,
    mojom::BackgroundSyncError error,
    const mojo::Array<mojom::SyncRegistrationPtr>& registrations) {
  // TODO(iclelland): Determine the correct error message to return in each case
  switch (error) {
    case mojom::BackgroundSyncError::NONE: {
      blink::WebVector<blink::WebSyncRegistration*> results(
          registrations.size());
      for (size_t i = 0; i < registrations.size(); ++i) {
        results[i] =
            mojo::ConvertTo<std::unique_ptr<blink::WebSyncRegistration>>(
                registrations[i])
                .release();
      }
      callbacks->onSuccess(results);
      break;
    }
    case mojom::BackgroundSyncError::NOT_FOUND:
    case mojom::BackgroundSyncError::NOT_ALLOWED:
    case mojom::BackgroundSyncError::PERMISSION_DENIED:
      // These errors should never be returned from
      // BackgroundSyncManager::GetRegistrations
      NOTREACHED();
      break;
    case mojom::BackgroundSyncError::STORAGE:
      callbacks->onError(
          blink::WebSyncError(blink::WebSyncError::ErrorTypeUnknown,
                              "Background Sync is disabled."));
      break;
    case mojom::BackgroundSyncError::NO_SERVICE_WORKER:
      callbacks->onError(
          blink::WebSyncError(blink::WebSyncError::ErrorTypeUnknown,
                              "No service worker is active."));
      break;
  }
}

mojom::BackgroundSyncServicePtr&
BackgroundSyncProvider::GetBackgroundSyncServicePtr() {
  if (!background_sync_service_.get()) {
    mojo::InterfaceRequest<mojom::BackgroundSyncService> request =
        mojo::GetProxy(&background_sync_service_);
    main_thread_task_runner_->PostTask(
        FROM_HERE,
        base::Bind(&ConnectToServiceOnMainThread, base::Passed(&request)));
  }
  return background_sync_service_;
}

}  // namespace content


text:
"""
The MIT License

Copyright (c) 2011 Olle Johansson

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

from GoldQuest import *
from plugins.Plugin import *

class QuestPlugin(Plugin):
    name = "QuestPlugin"
    author = "Olle Johansson"
    description = "A simple multi user quest game."
    commands = [
        dict(
            command = ['!quest'],
            handler = 'quest',
            onevents = ['Message'],
        )
    ]
    nick = 'GoldQuest'
    game = None

    def setup(self):
        """
        Sets up a new instance of the game class.
        """
        self.game = GoldQuest(self.bridge.cfg)

    def quest(self, shout, command, comobj):
        text = self.strip_command(shout.text, command)
        msg = self.game.play(text)
        return self.send_message(msg, False)


text:
<?php

namespace Oro\Bundle\ApiBundle\Processor\Shared;

use Oro\Component\ChainProcessor\ContextInterface;
use Oro\Component\ChainProcessor\ProcessorInterface;
use Oro\Bundle\ApiBundle\Processor\SingleItemContext;
use Oro\Bundle\ApiBundle\Request\EntityIdTransformerInterface;

class NormalizeEntityId implements ProcessorInterface
{
    /** @var EntityIdTransformerInterface */
    protected $entityIdTransformer;

    /**
     * @param EntityIdTransformerInterface $entityIdTransformer
     */
    public function __construct(EntityIdTransformerInterface $entityIdTransformer)
    {
        $this->entityIdTransformer = $entityIdTransformer;
    }

    /**
     * {@inheritdoc}
     */
    public function process(ContextInterface $context)
    {
        /** @var SingleItemContext $context */

        $entityId = $context->getId();
        if (!is_string($entityId)) {
            // an entity identifier is already normalized
            return;
        }

        $context->setId(
            $this->entityIdTransformer->reverseTransform($context->getClassName(), $entityId)
        );
    }
}


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Grevillea 14(no. 69): 21 (1885)

#### Original name
Polyporus zonalis var. semilaccatus Berk., 1878

### Remarks
null


text:
<?php

Route::group(array('prefix' => 'admin', 'namespace' => 'Modules\Media\Http\Controllers', 'before' => 'auth.login'), function () {
    // Post routing
    Route::get('media/datatable/{param?}/', array('as' => 'admin.media.datatable', 'uses' => 'MediaController@getDatatable'));
    Route::get('media/datatable2/{param?}/', array('as' => 'admin.media.datatablefiles', 'uses' => 'MediaController@getDatatablefiles'));
    Route::resource('media', 'MediaController');
});


text:
#include <stdio.h>
#include <winpr/crt.h>
#include <winpr/windows.h>

#define EXPECTED_SIZEOF_BYTE 1
#define EXPECTED_SIZEOF_BOOLEAN 1
#define EXPECTED_SIZEOF_CHAR 1
#define EXPECTED_SIZEOF_UCHAR 1
#define EXPECTED_SIZEOF_INT8 1
#define EXPECTED_SIZEOF_UINT8 1
#define EXPECTED_SIZEOF_INT16 2
#define EXPECTED_SIZEOF_UINT16 2
#define EXPECTED_SIZEOF_WORD 2
#define EXPECTED_SIZEOF_WCHAR 2
#define EXPECTED_SIZEOF_SHORT 2
#define EXPECTED_SIZEOF_USHORT 2
#define EXPECTED_SIZEOF_BOOL 4
#define EXPECTED_SIZEOF_INT 4
#define EXPECTED_SIZEOF_UINT 4
#define EXPECTED_SIZEOF_INT32 4
#define EXPECTED_SIZEOF_UINT32 4
#define EXPECTED_SIZEOF_DWORD 4
#define EXPECTED_SIZEOF_DWORD32 4
#define EXPECTED_SIZEOF_LONG 4
#define EXPECTED_SIZEOF_LONG32 4
#define EXPECTED_SIZEOF_INT64 8
#define EXPECTED_SIZEOF_UINT64 8
#define EXPECTED_SIZEOF_DWORD64 8
#define EXPECTED_SIZEOF_DWORDLONG 8
#define EXPECTED_SIZEOF_LONG64 8
#define EXPECTED_SIZEOF_ULONGLONG 8
#define EXPECTED_SIZEOF_LUID 8
#define EXPECTED_SIZEOF_FILETIME 8
#define EXPECTED_SIZEOF_LARGE_INTEGER 8
#define EXPECTED_SIZEOF_ULARGE_INTEGER 8
#define EXPECTED_SIZEOF_GUID 16
#define EXPECTED_SIZEOF_SYSTEMTIME 16
#define EXPECTED_SIZEOF_SIZE_T sizeof(void*)
#define EXPECTED_SIZEOF_INT_PTR sizeof(void*)
#define EXPECTED_SIZEOF_UINT_PTR sizeof(void*)
#define EXPECTED_SIZEOF_DWORD_PTR sizeof(void*)
#define EXPECTED_SIZEOF_LONG_PTR sizeof(void*)
#define EXPECTED_SIZEOF_ULONG_PTR sizeof(void*)

#define TEST_SIZEOF_TYPE(_name)                                                                    \
	if (sizeof(_name) != EXPECTED_SIZEOF_##_name)                                                  \
	{                                                                                \
		fprintf(stderr, "sizeof(%s) mismatch: Actual: %" PRIuz ", Expected: %" PRIuz "\n", #_name, \
		        sizeof(_name), (size_t)EXPECTED_SIZEOF_##_name);                                   \
		status = -1;                                                                               \
	}

int TestTypes(int argc, char* argv[])
{
	int status = 0;

	TEST_SIZEOF_TYPE(INT8)
	TEST_SIZEOF_TYPE(UINT8)

	TEST_SIZEOF_TYPE(BYTE)
	TEST_SIZEOF_TYPE(BOOLEAN)
	TEST_SIZEOF_TYPE(CHAR)
	TEST_SIZEOF_TYPE(UCHAR)

	TEST_SIZEOF_TYPE(INT16)
	TEST_SIZEOF_TYPE(UINT16)

	TEST_SIZEOF_TYPE(WORD)
	TEST_SIZEOF_TYPE(WCHAR)
	TEST_SIZEOF_TYPE(SHORT)
	TEST_SIZEOF_TYPE(USHORT)

	/* fails on OS X */
	// TEST_SIZEOF_TYPE(BOOL)

	TEST_SIZEOF_TYPE(INT)
	TEST_SIZEOF_TYPE(UINT)
	TEST_SIZEOF_TYPE(DWORD)
	TEST_SIZEOF_TYPE(DWORD32)
	TEST_SIZEOF_TYPE(LONG)
	TEST_SIZEOF_TYPE(LONG32)

	TEST_SIZEOF_TYPE(INT32)
	TEST_SIZEOF_TYPE(UINT32)

	TEST_SIZEOF_TYPE(INT64)
	TEST_SIZEOF_TYPE(UINT64)

	TEST_SIZEOF_TYPE(DWORD64)
	TEST_SIZEOF_TYPE(DWORDLONG)

	TEST_SIZEOF_TYPE(LONG64)
	TEST_SIZEOF_TYPE(ULONGLONG)

	TEST_SIZEOF_TYPE(LUID)
	TEST_SIZEOF_TYPE(FILETIME)
	TEST_SIZEOF_TYPE(LARGE_INTEGER)
	TEST_SIZEOF_TYPE(ULARGE_INTEGER)

	TEST_SIZEOF_TYPE(GUID)
	TEST_SIZEOF_TYPE(SYSTEMTIME)

	TEST_SIZEOF_TYPE(SIZE_T)
	TEST_SIZEOF_TYPE(INT_PTR)
	TEST_SIZEOF_TYPE(UINT_PTR)
	TEST_SIZEOF_TYPE(DWORD_PTR)
	TEST_SIZEOF_TYPE(LONG_PTR)
	TEST_SIZEOF_TYPE(ULONG_PTR)

	return status;
}