text:
type RefArray{R<:Integer,N}
    a::Array{R,N}
end

type PooledDataArray{T, R<:Integer, N} <: AbstractDataArray{T, N}
    refs::Array{R, N}
    pool::Vector{T}

    function PooledDataArray(rs::RefArray{R, N},
                             p::Vector{T})
        # refs mustn't overflow pool
        if length(rs.a) > 0 && max(rs.a) > prod(size(p))
            error("Reference array points beyond the end of the pool")
        end
        new(rs.a,p)
    end
end
typealias PooledDataVector{T,R} PooledDataArray{T,R,1}
typealias PooledDataMatrix{T,R} PooledDataArray{T,R,2}

##############################################################################
##
## PooledDataArray constructors
##
# How do you construct a PooledDataArray from an Array?
# From the same sigs as a DataArray!
#
# Algorithm:
# * Start with:
#   * A null pool
#   * A pre-allocated refs
#   * A hash from T to Int
# * Iterate over d
#   * If value of d in pool already, set the refs accordingly
#   * If value is new, add it to the pool, then set refs
##############################################################################

# Echo inner constructor as an outer constructor
function PooledDataArray{T,R<:Integer,N}(refs::RefArray{R, N},
                                         pool::Vector{T})
    PooledDataArray{T,R,N}(refs, pool)
end

# A no-op constructor
PooledDataArray(d::PooledDataArray) = d

# Constructor from array, w/ pool, missingness, and ref type
function PooledDataArray{T,R<:Integer,N}(d::AbstractArray{T, N},
                                         pool::Vector{T},
                                         m::AbstractArray{Bool, N},
                                         r::Type{R} = DEFAULT_POOLED_REF_TYPE)
    if length(pool) > typemax(R)
        error("Cannot construct a PooledDataVector with type $R with a pool of size $(length(pool))")
    end

    newrefs = Array(R, size(d))
    poolref = Dict{T, R}()

    # loop through once to fill the poolref dict
    for i = 1:length(pool)
        poolref[pool[i]] = i
    end

    # fill in newrefs
    for i = 1:length(d)
        if m[i]
            newrefs[i] = 0
        else
            newrefs[i] = get(poolref, d[i], 0)
        end
    end
    return PooledDataArray(RefArray(newrefs), pool)
end

# Constructor from array, w/ missingness and ref type
function PooledDataArray{T,R<:Integer,N}(d::AbstractArray{T, N},
                                         m::AbstractArray{Bool, N},
                                         r::Type{R} = DEFAULT_POOLED_REF_TYPE)
    pool = sort(unique(d[!m]))
    PooledDataArray(d, pool, m, r)
end

# Construct an all-NA PooledDataVector of a specific type
PooledDataArray(t::Type, dims::Int...) = PooledDataArray(Array(t, dims...), trues(dims...))
PooledDataArray{R<:Integer}(t::Type, r::Type{R}, dims::Int...) = PooledDataArray(Array(t, dims...), trues(dims...), r)

# Construct an empty PooledDataVector of a specific type
PooledDataArray(t::Type) = PooledDataArray(similar(Array(t,1),0), trues(0))
PooledDataArray{R<:Integer}(t::Type, r::Type{R}) = PooledDataArray(similar(Array(t,1),0), trues(0), r)

# Convert a BitArray to an Array{Bool} (m = missingness)
# For some reason an additional method is needed but even that doesn't work
# For a BitArray a refs type of Uint8 will always be sufficient as the size of the pool is 0, 1 or 2
PooledDataArray{N}(d::BitArray{N}) = PooledDataArray(bitunpack(d), falses(size(d)), Uint8)
PooledDataArray{N}(d::BitArray{N}, m::AbstractArray{Bool, N}) = PooledDataArray(bitunpack(d), m, Uint8)

# Convert a DataArray to a PooledDataArray
PooledDataArray{T,R<:Integer}(da::DataArray{T},
                              r::Type{R} = DEFAULT_POOLED_REF_TYPE) = PooledDataArray(da.data, da.na, r)
PooledDataArray{T,R<:Integer}(da::DataArray{T},
                              pool::Vector{T},
                              r::Type{R} = DEFAULT_POOLED_REF_TYPE) = PooledDataArray(da.data, pool, da.na, r)

# Convert a Array{T} to a PooledDataArray
PooledDataArray{T,R<:Integer}(d::Array{T},
                              r::Type{R} = DEFAULT_POOLED_REF_TYPE) = PooledDataArray(d, falses(size(d)), r)
PooledDataArray{T,R<:Integer}(d::Array{T},
                              pool::Vector{T},
                              r::Type{R} = DEFAULT_POOLED_REF_TYPE) = PooledDataArray(d, pool, falses(size(d)), r)

# Explicitly convert Ranges into a PooledDataVector
PooledDataArray{R<:Integer}(rs::Ranges,
                            r::Type{R} = DEFAULT_POOLED_REF_TYPE) = PooledDataArray([rs], falses(length(rs)), r)

# Initialized constructors with 0's, 1's
for (f, basef) in ((:pdatazeros, :zeros), (:pdataones, :ones))
    @eval begin
        ($f)(dims::Int...) = PooledDataArray(($basef)(dims...), falses(dims...))
        ($f)(t::Type, dims::Int...) = PooledDataArray(($basef)(t, dims...), falses(dims...))
        ($f){R<:Integer}(t::Type, r::Type{R}, dims::Int...) = PooledDataArray(($basef)(t, dims...), falses(dims...), r)
    end
end

# Initialized constructors with false's or true's
for (f, basef) in ((:pdatafalses, :falses), (:pdatatrues, :trues))
    @eval begin
        ($f)(dims::Int...) = PooledDataArray(($basef)(dims...), falses(dims...), Uint8)
        ($f){R<:Integer}(r::Type{R}, dims::Int...) = PooledDataArray(($basef)(dims...), falses(dims...), r)
    end
end

# Super hacked-out constructor: PooledDataVector[1, 2, 2, NA]
function getindex(::Type{PooledDataVector}, vals...)
    # For now, just create a DataVector and then convert it
    # TODO: Rewrite for speed
    PooledDataArray(DataVector[vals...])
end

##############################################################################
##
## Basic size properties of all Data* objects
##
##############################################################################

size(pda::PooledDataArray) = size(pda.refs)
length(pda::PooledDataArray) = length(pda.refs)
endof(pda::PooledDataArray) = endof(pda.refs)

##############################################################################
##
## Copying Data* objects
##
##############################################################################

copy(pda::PooledDataArray) = PooledDataArray(RefArray(copy(pda.refs)),
                                             copy(pda.pool))
# TODO: Implement copy_to()

##############################################################################
##
## Predicates, including the new isna()
##
##############################################################################

function isnan(pda::PooledDataArray)
    PooledDataArray(RefArray(copy(pda.refs)), isnan(pda.pool))
end

function isfinite(pda::PooledDataArray)
    PooledDataArray(RefArray(copy(pda.refs)), isfinite(pda.pool))
end

isna(pda::PooledDataArray) = pda.refs .== 0

##############################################################################
##
## PooledDataArray utilities
##
## TODO: Add methods with these names for DataArray's
##       Decide whether levels() or unique() is primitive. Make the other
##       an alias.
##  Tom: I don't think levels and unique are the same. R doesn't include NA's
##       with levels, but it does with unique. Having these different is
##       useful.
##
##############################################################################

function compact{T,R<:Integer,N}(d::PooledDataArray{T,R,N})
    sz = length(d.pool)

    REFTYPE = sz <= typemax(Uint8)  ? Uint8 :
              sz <= typemax(Uint16) ? Uint16 :
              sz <= typemax(Uint32) ? Uint32 :
                                      Uint64

    if REFTYPE == R
        return d
    end

    newrefs = convert(Array{REFTYPE, N}, d.refs)
    PooledDataArray(RefArray(newrefs), d.pool)
end

# Convert a PooledDataVector{T} to a DataVector{T}
function values{T}(pda::PooledDataArray{T})
    res = DataArray(T, size(pda)...)
    for i in 1:length(pda)
        r = pda.refs[i]
        if r == 0
            res[i] = NA
        else
            res[i] = pda.pool[r]
        end
    end
    return res
end
DataArray(pda::PooledDataArray) = values(pda)
values(da::DataArray) = copy(da)
values(a::Array) = copy(a)

function unique{T}(x::PooledDataArray{T})
    if any(x.refs .== 0)
        n = length(x.pool)
        d = Array(T, n + 1)
        for i in 1:n
            d[i] = x.pool[i]
        end
        m = falses(n + 1)
        m[n + 1] = true
        return DataArray(d, m)
    else
        return DataArray(copy(x.pool), falses(length(x.pool)))
    end
end
levels{T}(pda::PooledDataArray{T}) = pda.pool

function unique{T}(adv::AbstractDataVector{T})
  values = Dict{Union(T, NAtype), Bool}()
  for i in 1:length(adv)
    values[adv[i]] = true
  end
  unique_values = collect(keys(values))
  res = DataArray(T, length(unique_values))
  for i in 1:length(unique_values)
    res[i] = unique_values[i]
  end
  return res
end
levels{T}(adv::AbstractDataVector{T}) = unique(adv)

get_indices{T,R}(x::PooledDataArray{T,R}) = x.refs

function index_to_level{T,R}(x::PooledDataArray{T,R})
    d = Dict{R, T}()
    for i in one(R):convert(R, length(x.pool))
        d[i] = x.pool[i]
    end
    return d
end

function level_to_index{T,R}(x::PooledDataArray{T,R})
    d = Dict{T, R}()
    for i in one(R):convert(R, length(x.pool))
        d[x.pool[i]] = i
    end
    d
end

function PooledDataArray{S,R,N}(x::PooledDataArray{S,R,N},
                                newpool::Vector{S})
    # QUESTION: should we have a ! version of this? If so, needs renaming?
    tidx::Array{R} = findat(x.pool, newpool)
    refs = zeros(R, length(x))
    for i in 1:length(refs)
        if x.refs[i] != 0
            refs[i] = tidx[x.refs[i]]
        end
    end
    PooledDataArray(RefArray(refs), newpool)
end

myunique(x::AbstractVector) = x[sort(unique(findat(x, x)))]  # gets the ordering right
myunique(x::AbstractDataVector) = myunique(removeNA(x))   # gets the ordering right; removes NAs

function set_levels{T,R}(x::PooledDataArray{T,R}, newpool::AbstractVector)
    pool = myunique(newpool)
    refs = zeros(R, length(x))
    tidx::Array{R} = findat(newpool, pool)
    tidx[isna(newpool)] = 0
    for i in 1:length(refs)
        if x.refs[i] != 0
            refs[i] = tidx[x.refs[i]]
        end
    end
    return PooledDataArray(RefArray(refs), pool)
end

function set_levels!{T,R}(x::PooledDataArray{T,R}, newpool::AbstractVector{T})
    if newpool == myunique(newpool) # no NAs or duplicates
        x.pool = newpool
        return x
    else
        x.pool = myunique(newpool)
        tidx::Array{R} = findat(newpool, x.pool)
        tidx[isna(newpool)] = 0
        for i in 1:length(x.refs)
            if x.refs[i] != 0
                x.refs[i] = tidx[x.refs[i]]
            end
        end
        return x
    end
end

function set_levels(x::PooledDataArray, d::Dict)
    newpool = copy(DataArray(x.pool))
    # An NA in `v` is put in the pool; that will cause it to become NA
    for (k,v) in d
        idx = findin(newpool, [k])
        if length(idx) == 1
            newpool[idx[1]] = v
        end
    end
    set_levels(x, newpool)
end

function set_levels!{T,R}(x::PooledDataArray{T,R}, d::Dict{T,T})
    for (k,v) in d
        idx = findin(x.pool, [k])
        if length(idx) == 1
            x.pool[idx[1]] = v
        end
    end
    x
end

function set_levels!{T,R}(x::PooledDataArray{T,R}, d::Dict{T,Any}) # this version handles NAs in d's values
    newpool = copy(DataArray(x.pool))
    # An NA in `v` is put in the pool; that will cause it to become NA
    for (k,v) in d
        idx = findin(newpool, [k])
        if length(idx) == 1
            newpool[idx[1]] = v
        end
    end
    set_levels!(x, newpool)
end

reorder(x::PooledDataArray) = PooledDataArray(x, sort(levels(x)))  # just re-sort the pool

reorder(x::PooledDataArray, y::AbstractVector...) = reorder(mean, x, y...)

reorder(fun::Function, x::PooledDataArray, y::AbstractVector...) =
    reorder(fun, x, DataFrame({y...}))

reverse(x::PooledDataArray) = PooledDataArray(RefArray(reverse(x.refs)), x.pool)

##############################################################################
##
## similar()
##
##############################################################################

# This needs to be parameterized to remove ambiguity warnings
similar{T,R}(pda::PooledDataArray{T,R}) = pda

function similar{T,R}(pda::PooledDataArray{T,R}, dims::Int...)
    PooledDataArray(RefArray(fill(zero(R), dims...)), pda.pool)
end

function similar{T,R}(pda::PooledDataArray{T,R}, dims::Dims)
    PooledDataArray(RefArray(fill(zero(R), dims)), pda.pool)
end

##############################################################################
##
## find()
##
##############################################################################

find(pdv::PooledDataVector{Bool}) = find(values(pdv))

##############################################################################
##
## getindex()
##
##############################################################################

# pda[SingleItemIndex]
function getindex(pda::PooledDataArray, i::Real)
    if pda.refs[i] == 0
        return NA
    else
        return pda.pool[pda.refs[i]]
    end
end

# pda[MultiItemIndex]
function getindex(pda::PooledDataArray, inds::AbstractDataVector{Bool})
    inds = find(replaceNA(inds, false))
    return PooledDataArray(RefArray(pda.refs[inds]), copy(pda.pool))
end
function getindex(pda::PooledDataArray, inds::AbstractDataVector)
    inds = removeNA(inds)
    return PooledDataArray(RefArray(pda.refs[inds]), copy(pda.pool))
end
function getindex(pda::PooledDataArray, inds::Union(Vector, BitVector, Ranges))
    return PooledDataArray(RefArray(pda.refs[inds]), copy(pda.pool))
end

# pdm[SingleItemIndex, SingleItemIndex)
function getindex(pda::PooledDataArray, i::Real, j::Real)
    if pda.refs[i, j] == 0
        return NA
    else
        return pda.pool[pda.refs[i, j]]
    end
end

# pda[SingleItemIndex, MultiItemIndex]
function getindex(pda::PooledDataArray, i::Real, col_inds::AbstractDataVector{Bool})
    getindex(pda, i, find(replaceNA(col_inds, false)))
end
function getindex(pda::PooledDataArray, i::Real, col_inds::AbstractDataVector)
    getindex(pda, i, removeNA(col_inds))
end
# TODO: Make inds::AbstractVector
function getindex(pda::PooledDataArray,
             i::Real,
             col_inds::Union(Vector, BitVector, Ranges))
    error("not yet implemented")
    PooledDataArray(RefArray(pda.refs[i, col_inds]), pda.pool[i, col_inds])
end

# pda[MultiItemIndex, SingleItemIndex]
function getindex(pda::PooledDataArray, row_inds::AbstractDataVector{Bool}, j::Real)
    getindex(pda, find(replaceNA(row_inds, false)), j)
end
function getindex(pda::PooledDataArray, row_inds::AbstractVector, j::Real)
    getindex(pda, removeNA(row_inds), j)
end
# TODO: Make inds::AbstractVector
function getindex(pda::PooledDataArray,
             row_inds::Union(Vector, BitVector, Ranges),
             j::Real)
    error("not yet implemented")
    PooledDataArray(RefArray(pda.refs[row_inds, j]), pda.pool[row_inds, j])
end

# pda[MultiItemIndex, MultiItemIndex]
function getindex(pda::PooledDataArray,
             row_inds::AbstractDataVector{Bool},
             col_inds::AbstractDataVector{Bool})
    getindex(pda, find(replaceNA(row_inds, false)), find(replaceNA(col_inds, false)))
end
function getindex(pda::PooledDataArray,
             row_inds::AbstractDataVector{Bool},
             col_inds::AbstractDataVector)
    getindex(pda, find(replaceNA(row_inds, false)), removeNA(col_inds))
end
# TODO: Make inds::AbstractVector
function getindex(pda::PooledDataArray,
             row_inds::AbstractDataVector{Bool},
             col_inds::Union(Vector, BitVector, Ranges))
    getindex(pda, find(replaceNA(row_inds, false)), col_inds)
end
function getindex(pda::PooledDataArray,
             row_inds::AbstractDataVector,
             col_inds::AbstractDataVector{Bool})
    getindex(pda, removeNA(row_inds), find(replaceNA(col_inds, false)))
end
function getindex(pda::PooledDataArray,
             row_inds::AbstractDataVector,
             col_inds::AbstractDataVector)
    getindex(pda, removeNA(row_inds), removeNA(col_inds))
end
# TODO: Make inds::AbstractVector
function getindex(pda::PooledDataArray,
             row_inds::AbstractDataVector,
             col_inds::Union(Vector, BitVector, Ranges))
    getindex(pda, removeNA(row_inds), col_inds)
end
# TODO: Make inds::AbstractVector
function getindex(pda::PooledDataArray,
             row_inds::Union(Vector, BitVector, Ranges),
             col_inds::AbstractDataVector{Bool})
    getindex(pda, row_inds, find(replaceNA(col_inds, false)))
end
# TODO: Make inds::AbstractVector
function getindex(pda::PooledDataArray,
             row_inds::Union(Vector, BitVector, Ranges),
             col_inds::AbstractDataVector)
    getindex(pda, row_inds, removeNA(col_inds))
end
# TODO: Make inds::AbstractVector
function getindex(pda::PooledDataArray,
                  row_inds::Union(Vector, BitVector, Ranges),
                  col_inds::Union(Vector, BitVector, Ranges))
    error("not yet implemented")
    PooledDataArray(RefArray(pda.refs[row_inds, col_inds]), pda.pool[row_inds, col_inds])
end

##############################################################################
##
## setindex!() definitions
##
##############################################################################

function getpoolidx{T,R<:Union(Uint8, Uint16, Int8, Int16)}(pda::PooledDataArray{T,R}, val::Any)
    val::T = convert(T,val)
    pool_idx = findfirst(pda.pool, val)
    if pool_idx <= 0
        push!(pda.pool, val)
        pool_idx = length(pda.pool)
        if pool_idx > typemax(R)
            error("You're using a PooledDataArray with ref type $R, which can only hold $(int(typemax(R))) values,\n",
                  "and you just tried to add the $(typemax(R)+1)th reference.  Please change the ref type\n",
                  "to a larger int type, or use the default ref type ($DEFAULT_POOLED_REF_TYPE).")
        end
    end
    return pool_idx
end

function getpoolidx{T,R}(pda::PooledDataArray{T,R}, val::Any)
    val::T = convert(T,val)
    pool_idx = findfirst(pda.pool, val)
    if pool_idx <= 0
        push!(pda.pool, val)
        pool_idx = length(pda.pool)
    end
    return pool_idx
end

# x[SingleIndex] = NA
# TODO: Delete values from pool that no longer exist?
# Not a good idea.  Add another function called drop_unused_levels to do this.
# R has the convention that if f is a factor then factor(f) drops unused levels
function setindex!(x::PooledDataArray, val::NAtype, ind::Real)
    x.refs[ind] = 0
    return NA
end

# x[SingleIndex] = Single Item
# TODO: Delete values from pool that no longer exist?
function setindex!{T,R}(x::PooledDataArray{T,R}, val::Any, ind::Real)
    val = convert(T, val)
    x.refs[ind] = getpoolidx(x, val)
    return val
end

# x[MultiIndex] = NA
# TODO: Find a way to delete the next four methods
function setindex!(x::PooledDataArray{NAtype},
                val::NAtype,
                inds::AbstractVector{Bool})
    error("Don't use PooledDataVector{NAtype}'s")
end
function setindex!(x::PooledDataArray{NAtype},
                val::NAtype,
                inds::AbstractVector)
    error("Don't use PooledDataVector{NAtype}'s")
end
function setindex!(x::PooledDataArray, val::NAtype, inds::AbstractVector{Bool})
    inds = find(inds)
    x.refs[inds] = 0
    return NA
end
function setindex!(x::PooledDataArray, val::NAtype, inds::AbstractVector)
    x.refs[inds] = 0
    return NA
end

# pda[MultiIndex] = Multiple Values
function setindex!(pda::PooledDataArray,
                   vals::AbstractVector,
                   inds::AbstractVector{Bool})
    setindex!(pda, vals, find(inds))
end
function setindex!(pda::PooledDataArray,
                   vals::AbstractVector,
                   inds::AbstractVector)
    for (val, ind) in zip(vals, inds)
        pda[ind] = val
    end
    return vals
end

# pda[SingleItemIndex, SingleItemIndex] = NA
function setindex!{T,R}(pda::PooledDataMatrix{T,R}, val::NAtype, i::Real, j::Real)
    pda.refs[i, j] = zero(R)
    return NA
end
# pda[SingleItemIndex, SingleItemIndex] = Single Item
function setindex!{T,R}(pda::PooledDataMatrix{T,R}, val::Any, i::Real, j::Real)
    val = convert(T, val)
    pda.refs[i, j] = getpoolidx(pda, val)
    return val
end

##############################################################################
##
## show() and similar methods
##
##############################################################################

function string(x::PooledDataVector)
    tmp = join(x, ", ")
    return "[$tmp]"
end

# # Need setindex!()'s to make this work
# This is broken now because the inner show returns to the outer show.
# function show(io::IO, pda::PooledDataArray)
#     invoke(show, (Any, AbstractArray), io, pda)
#     print(io, "\nlevels: ")
#     print(io, levels(pda))
# end

##############################################################################
##
## Replacement operations
##
##############################################################################

function replace!(x::PooledDataArray{NAtype}, fromval::NAtype, toval::NAtype)
    NA # no-op to deal with warning
end
function replace!(x::PooledDataArray, fromval::NAtype, toval::NAtype)
    NA # no-op to deal with warning
end
function replace!{S, T}(x::PooledDataArray{S}, fromval::T, toval::NAtype)
    fromidx = findfirst(x.pool, fromval)
    if fromidx == 0
        error("can't replace a value not in the pool in a PooledDataVector!")
    end

    x.refs[x.refs .== fromidx] = 0

    return NA
end
function replace!{S, T}(x::PooledDataArray{S}, fromval::NAtype, toval::T)
    toidx = findfirst(x.pool, toval)
    # if toval is in the pool, just do the assignment
    if toidx != 0
        x.refs[x.refs .== 0] = toidx
    else
        # otherwise, toval is new, add it to the pool
        push!(x.pool, toval)
        x.refs[x.refs .== 0] = length(x.pool)
    end

    return toval
end
function replace!{R, S, T}(x::PooledDataArray{R}, fromval::S, toval::T)
    # throw error if fromval isn't in the pool
    fromidx = findfirst(x.pool, fromval)
    if fromidx == 0
        error("can't replace a value not in the pool in a PooledDataArray!")
    end

    # if toval is in the pool too, use that and remove fromval from the pool
    toidx = findfirst(x.pool, toval)
    if toidx != 0
        x.refs[x.refs .== fromidx] = toidx
        #x.pool[fromidx] = None    TODO: what to do here??
    else
        # otherwise, toval is new, swap it in
        x.pool[fromidx] = toval
    end

    return toval
end

##############################################################################
##
## Sorting can use the pool to speed things up
##
##############################################################################

# TODO handle sortperm for non-sorted keys
sortperm(pda::PooledDataArray) = groupsort_indexer(pda)[1]
function sortperm(pda::PooledDataArray)
    if issorted(pda.pool)
        return groupsort_indexer(pda)[1]
    else
        return sortperm(reorder!(copy(pda)))
    end
end

sortperm(pda::PooledDataArray, ::Sort.ReverseOrdering) = reverse(sortperm(pda))
sort(pda::PooledDataArray) = pda[sortperm(pda)]
sort(pda::PooledDataArray, ::Sort.ReverseOrdering) = pda[reverse(sortperm(pda))]
type FastPerm{O<:Sort.Ordering,V<:AbstractVector} <: Sort.Ordering
    ord::O
    vec::V
end
FastPerm{O<:Sort.Ordering,V<:AbstractVector}(o::O,v::V) = FastPerm{O,V}(o,v)
sortperm{V}(x::AbstractVector, a::Sort.Algorithm, o::FastPerm{Sort.ForwardOrdering,V}) = x[sortperm(o.vec)]
sortperm{V}(x::AbstractVector, a::Sort.Algorithm, o::FastPerm{Sort.ReverseOrdering,V}) = x[reverse(sortperm(o.vec))]
Perm{O<:Sort.Ordering}(o::O, v::PooledDataVector) = FastPerm(o, v)

##############################################################################
##
## PooledDataVecs: EXPLANATION SHOULD GO HERE
##
##############################################################################

function PooledDataVecs{S,Q<:Integer,R<:Integer,N}(v1::PooledDataArray{S,Q,N},
                                                   v2::PooledDataArray{S,R,N})
    pool = sort(unique([v1.pool, v2.pool]))
    sz = length(pool)

    REFTYPE = sz <= typemax(Uint8)  ? Uint8 :
              sz <= typemax(Uint16) ? Uint16 :
              sz <= typemax(Uint32) ? Uint32 :
                                      Uint64

    tidx1 = convert(Vector{REFTYPE}, findat(v1.pool, pool))
    tidx2 = convert(Vector{REFTYPE}, findat(v2.pool, pool))
    refs1 = zeros(REFTYPE, length(v1))
    refs2 = zeros(REFTYPE, length(v2))
    for i in 1:length(refs1)
        if v1.refs[i] != 0
            refs1[i] = tidx1[v1.refs[i]]
        end
    end
    for i in 1:length(refs2)
        if v2.refs[i] != 0
            refs2[i] = tidx2[v2.refs[i]]
        end
    end
    return (PooledDataArray(RefArray(refs1), pool),
            PooledDataArray(RefArray(refs2), pool))
end

function PooledDataVecs{S,R<:Integer,N}(v1::PooledDataArray{S,R,N},
                                        v2::AbstractArray{S,N})
    return PooledDataVecs(v1,
                          PooledDataArray(v2))
end
function PooledDataVecs{S,R<:Integer,N}(v1::PooledDataArray{S,R,N},
                                        v2::AbstractArray{S,N})
    return PooledDataVecs(v1,
                          PooledDataArray(v2))
end

####
function PooledDataVecs{S,R<:Integer,N}(v1::AbstractArray{S,N},
                                        v2::PooledDataArray{S,R,N})
    return PooledDataVecs(PooledDataArray(v1),
                          v2)
end

function PooledDataVecs(v1::AbstractArray,
                        v2::AbstractArray)

    ## Return two PooledDataVecs that share the same pool.

    ## TODO: allow specification of REFTYPE
    refs1 = Array(DEFAULT_POOLED_REF_TYPE, size(v1))
    refs2 = Array(DEFAULT_POOLED_REF_TYPE, size(v2))
    poolref = Dict{promote_type(eltype(v1), eltype(v2)), DEFAULT_POOLED_REF_TYPE}()
    maxref = 0

    # loop through once to fill the poolref dict
    for i = 1:length(v1)
        if !isna(v1[i])
            poolref[v1[i]] = 0
        end
    end
    for i = 1:length(v2)
        if !isna(v2[i])
            poolref[v2[i]] = 0
        end
    end

    # fill positions in poolref
    pool = sort(collect(keys(poolref)))
    i = 1
    for p in pool
        poolref[p] = i
        i += 1
    end

    # fill in newrefs
    zeroval = zero(DEFAULT_POOLED_REF_TYPE)
    for i = 1:length(v1)
        if isna(v1[i])
            refs1[i] = zeroval
        else
            refs1[i] = poolref[v1[i]]
        end
    end
    for i = 1:length(v2)
        if isna(v2[i])
            refs2[i] = zeroval
        else
            refs2[i] = poolref[v2[i]]
        end
    end

    return (PooledDataArray(RefArray(refs1), pool),
            PooledDataArray(RefArray(refs2), pool))
end


text:
'use strict';

$(function () {

  // Helper function for vertically aligning DOM elements
  // http://www.seodenver.com/simple-vertical-align-plugin-for-jquery/
  $.fn.vAlign = function () {
    return this.each(function () {
      var ah = $(this).height();
      var ph = $(this).parent().height();
      var mh = (ph - ah) / 2;
      $(this).css('margin-top', mh);
    });
  };

  $.fn.stretchFormtasticInputWidthToParent = function () {
    return this.each(function () {
      var p_width = $(this).closest("form").innerWidth();
      var p_padding = parseInt($(this).closest("form").css('padding-left'), 10) + parseInt($(this).closest('form').css('padding-right'), 10);
      var this_padding = parseInt($(this).css('padding-left'), 10) + parseInt($(this).css('padding-right'), 10);
      $(this).css('width', p_width - p_padding - this_padding);
    });
  };

  $('form.formtastic li.string input, form.formtastic textarea').stretchFormtasticInputWidthToParent();

  // Vertically center these paragraphs
  // Parent may need a min-height for this to work..
  $('ul.downplayed li div.content p').vAlign();

  // When a sandbox form is submitted..
  $("form.sandbox").submit(function () {

    var error_free = true;

    // Cycle through the forms required inputs
    $(this).find("input.required").each(function () {

      // Remove any existing error styles from the input
      $(this).removeClass('error');

      // Tack the error style on if the input is empty..
      if ($(this).val() === '') {
        $(this).addClass('error');
        $(this).wiggle();
        error_free = false;
      }

    });

    return error_free;
  });

});

function clippyCopiedCallback() {
  $('#api_key_copied').fadeIn().delay(1000).fadeOut();

  // var b = $("#clippy_tooltip_" + a);
  // b.length != 0 && (b.attr("title", "copied!").trigger("tipsy.reload"), setTimeout(function() {
  //   b.attr("title", "copy to clipboard")
  // },
  // 500))
}

// Logging function that accounts for browsers that don't have window.console
function log() {
  log.history = log.history || [];
  log.history.push(arguments);
  if (this.console) {
    console.log(Array.prototype.slice.call(arguments)[0]);
  }
}

// Handle browsers that do console incorrectly (IE9 and below, see http://stackoverflow.com/a/5539378/7913)
if (Function.prototype.bind && console && typeof console.log === "object") {
  [
    "log", "info", "warn", "error", "assert", "dir", "clear", "profile", "profileEnd"
  ].forEach(function (method) {
      console[method] = this.bind(console[method], console);
    }, Function.prototype.call);
}

window.Docs = {

  shebang: function () {

    // If shebang has an operation nickname in it..
    // e.g. /docs/#!/words/get_search
    var fragments = $.param.fragment().split('/');
    fragments.shift(); // get rid of the bang

    switch (fragments.length) {
      case 1:
        break;
      case 2:
        var target = '#resources_nav [data-resource] [data-endpoint=' + fragments[0] + '_' + fragments[1] + ']',
          n = $('#swagger_sidebar').find(target),
          attr = n.attr('data-selected');

        if (typeof attr == typeof undefined) {
          n.trigger("click");
        }
        break;
    }

  }

};

redpajama_set_name: RedPajamaGithub


text:
from django import forms
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
from django.utils.translation import ugettext_lazy as _

from models import (Choice, Poll, Vote)

class ChoiceAdmin(admin.ModelAdmin):
    fields = ['poll', 'choice', 'user']
    list_display = ['poll', 'choice', 'user', 'date_created']
    search_fields = ['choice']

admin.site.register(Choice, ChoiceAdmin)

class PollAdmin(admin.ModelAdmin):
    fields = ['title', 'description', 'user', 'allow_new_choices',
              'status', 'published_at']
    list_display = ['title', 'user', 'allow_new_choices',
                    'status', 'published_at', 'date_created',
                    'date_modified']
    list_filter = ['status', 'allow_new_choices']
    search_fields = ['title', 'description']

admin.site.register(Poll, PollAdmin)

class VoteAdmin(admin.ModelAdmin):
    fields = ['user', 'choice']
    list_display = ['user', 'choice', 'date_created']

admin.site.register(Vote, VoteAdmin)


text:
import processing.core.*;
import processing.data.*;
import processing.event.*;
import processing.opengl.*;

import controlP5.*;
import processing.serial.*;
import cc.arduino.*;

import java.util.HashMap;
import java.util.ArrayList;
import java.io.File;
import java.io.BufferedReader;
import java.io.PrintWriter;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.IOException;

public class GooglyEyeController extends PApplet {

// import oscP5.*;
// import netP5.*;

Arduino arduino;
// OscP5 oscP5;
// NetAddress myRemoteLocation;

int pixelsPerInch=10;
int interOccular = 500;
int eyeRad = 465/2;//46.5inch diam
int eyeMinorRad = 235/2;//23.5 inches diam
int rotationHeading = 0;
int rotationAltitude = 0;
// int pupilR =0;
// int pupilThetaDegrees = 0;
int pupilGutter= 145 -eyeMinorRad; //gutter carriage to edge is 15 and 14.5  floor to 14.5
float zoom = 2.05f;

ControlP5 cp5;
boolean mouse = true;
boolean bounce= false;
boolean OSC;
boolean eyesConected = true; //checked later on

public void setup() {
  size( displayWidth/2, displayWidth/2, P3D);
  initFirmata();
  initControlPanel();
  frameRate(24);
  smooth();
}

public void draw() {
  background(60);
  camera(-width*zoom, -height*zoom, height*zoom, width, height, 0, 0, 1, 0);
  noStroke();
  pushMatrix();
  // translate(width/2, height/2, zoom);//centers the rotation and the draw surface in the upper middle of the screen
  rotateY(radians(rotationHeading));
  rotateX(radians(rotationAltitude));
  drawGumball();
  //  eyeModel(0, 0, eyeRad, eyeMinorRad, pupilR, pupilThetaDegrees, pupilGutter);
  PVector origin = new PVector(0, 0, 0);
  PVector gap = new PVector(interOccular/2, 0, 0);
  // println("gap: "+gap);
  PVector origin1, origin2;
  origin1 = origin.get();
  origin2 = origin.get();
  origin1.add(gap);
  origin2.sub(gap);

  // findGazeDrawEye(origin1, planarMouse());
  findGazeDrawEye(origin2,planarMouse());

  planarMouse();
  // eyeModel( origin.add(gap),  pupilR, pupilThetaDegrees, pupilGutter);
  popMatrix();
  camera();
  cp5.draw();

  // //  cp5.draw();//draw the sliders
  //   if (mouse) {
  //     simpleMouseXYControl();
  //   }
  //   else if (bounce) {
  //     sinuasoidalBounce();
  //   }
  //   else if (OSC) {
  //     //osc
  //   }
}

public void initFirmata() {
  //ToDo: Dif between left and right eye
  int arduinoIndex = 5;
  println(Arduino.list());
  if (Arduino.list().length > 4) {
    eyesConected = true;
    println("Found first arduino");
    arduino = new Arduino(this, Arduino.list()[arduinoIndex], 57600);
  }
   int imaginaryPinUsedToDifferentiateTheEyes = 0;
  // boolean isLeftEye;
  int isLeftEye = 99;
  //0 when right eye 1 when left eye
   isLeftEye = arduino.analogRead(imaginaryPinUsedToDifferentiateTheEyes);
println("isLeftEye: "+isLeftEye);
}

public void initControlPanel() {
  cp5 = new ControlP5(this);
  bounce = true;
  cp5.setAutoDraw(false);
  cp5.addSlider("eyeRad", 1, height/2).linebreak();
  cp5.addSlider("eyeMinorRad", 10, 150).linebreak();
  cp5.addSlider("interOccular", 1, width).linebreak();
  cp5.addSlider("rotationHeading", -45, 45 ).linebreak();
  cp5.addSlider("rotationAltitude", -45, 45 ).linebreak();
  cp5.addSlider("zoom", 0.01f, 3.5f ).linebreak();
  //  cp5.addSlider("pupilR", -255, 255 ).linebreak();
  //  cp5.addSlider("pupilThetaDegrees", 0, 360 ).linebreak();
  cp5.addSlider("pupilGutter", 0, 100 ).linebreak();
  cp5.addToggle("mouse").linebreak().setState(false);
  cp5.addToggle("bounce").linebreak().setState(true);
  cp5.addToggle("OSC").linebreak().setState(false);
}

// void simpleMouseXYControl() {
//   float mouseXUnitized = map(mouseX, 0, width, -1, 1);
//   float mouseYUnitized = map(mouseY, 0, height, 1, -1);
//   float pupilR01 = sqrt((mouseXUnitized*mouseXUnitized)+(mouseYUnitized*mouseYUnitized));
//   // pupilR = int(map(pupilR01, 0, 1, 0, 255));
//   pupilThetaDegrees = int(degrees(atan2(mouseYUnitized, mouseXUnitized)));
//   pupilThetaDegrees = (pupilThetaDegrees+360)%360;
//   //  pupilR= int(map(touchOSCxParam, 0, 1, -255, 255)) ;
//   //  pupilThetaDegrees= int(map(touchOSCyParam, 0, 1, 0, 360)) ;

// //  if (mouseX < width/2) {
// //    pupilR=-pupilR;
// //    pupilThetaDegrees=(pupilThetaDegrees+180)%360;
// //  }
//   moveEye(11, 11);
// }

public void sinuasoidalBounce() {
  float sinuasoid = sin(radians(frameCount%360));
  //  int discreteRotaryGoal  = int(map(sinuasoid, -1, 1, 0, 16));
  // constrain(sinuasoid,-1,1);
  int pupilR= PApplet.parseInt(map(sinuasoid, -1, 1, -255, 255));
   int pupilThetaDegrees = PApplet.parseInt(map(sinuasoid, -1, 1, 0, 360));
  moveEye(pupilThetaDegrees, pupilR);

}

public void moveEye(int thetaGoal, int pupilRGoal) {
  boolean debug = false;
  //Moves the physical eye to the coord specified.
  //TODO consider feedback upon goal reach
  //TODO figure out a left eye right eye solution or move them in tandem
  //Rotation: 0 to 360 CCW with zero at 3:00.
  //linear: 0 to 360 with 180 being home

    int pupilRArduino = PApplet.parseInt(map(pupilRGoal, -255, 255, 0, 360));
    pupilRArduino=constrain(pupilRArduino, 0, 360);
  // pupilRArduino = 360;
  int discreteRotaryGoal = (PApplet.parseInt(map(thetaGoal, 0, 360, 0, 16)));
  discreteRotaryGoal = (discreteRotaryGoal+6)%16;
  if (debug) {
    print("pupilRArduino: ", pupilRArduino);
    print("\tthetaGoal: ", thetaGoal);
    println("\tdiscreteRotaryGoal: ", discreteRotaryGoal);
  }
  if (eyesConected) {
    // int systemHz = int(frameRate);
    int communicationPeriod = 3;
    // if (frameCount%communicationPeriod == 0) {
      //these arent really ananlog write commands, I am just using firmata to move the numbers
      arduino.analogWrite(2, pupilRArduino);
      arduino.analogWrite(3, discreteRotaryGoal);
    // }
  }
}

public void drawGumball() {
  int lineLength = 100;
  //draws a trident of colored lines to help with axis ID
  strokeWeight(1);
  strokeCap(ROUND);
  stroke(255, 0, 0); //x is red
  line(0, 0, lineLength, 0);
  stroke(0, 255, 0);//y is green
  line(0, 0, 0, lineLength);
  stroke(0, 0, 255);//z is blue
  line(0, 0, 0, 0, 0, lineLength);
}

public void findGazeDrawEye(PVector origin, PVector target) {
  //determines, based on the location of the eye annd the location of the thing to be looked t
  //the proper render/command to display/run the eye to
  boolean debug = true;
  strokeWeight(1);
  strokeCap(ROUND);
  stroke(0, 255, 0); //x is red
  PVector eyeNormal = new PVector(0, 0, 1);
  if (debug)line(origin.x, origin.y, origin.z, origin.x, origin.y, origin.z+400);
  stroke(255, 0, 0); //x is red
  if (debug)line(origin.x, origin.y, origin.z, target.x, target.y, target.z);
  PVector gazeVector = target.get();
  gazeVector.sub(origin);
  float gazeTheta = PVector.angleBetween(eyeNormal, gazeVector);
  if (gazeVector.x < 0) {
    gazeTheta = -gazeTheta;
  }
  // println("gazeTheta: "+degrees(gazeTheta));
  int pupilR = PApplet.parseInt(tan(gazeTheta)*255);
  // print("\tpupilR:\t"+pupilR);
  int thetaGoal = 0;
  // float gazeX;
  // float gazeY;
  // float gazeZ;
  // PVector gaze = new PVector(
  float sinuasoid = sin(radians(frameCount%360));
  //  int discreteRotaryGoal  = int(map(sinuasoid, -1, 1, 0, 16));
  // constrain(sinuasoid,-1,1);
    thetaGoal = PApplet.parseInt(map(sinuasoid, -1, 1, 0, 360));

  eyeModel(origin, pupilR, thetaGoal);
  moveEye(thetaGoal, pupilR);
  // return gaze;
}

public PVector planarMouse() {
  //returns a target that is on the screen
  noCursor();
  noStroke();
  fill(255, 44);
  // controllerOrigin
  // rect(width, width-100, 0, 400);
  pushMatrix();
  rotateX(radians(90));
  int planeWidth = interOccular*2;
  int planeDepth = planeWidth*2;
  translate(-planeWidth/2, eyeRad*3, 0);
  // rect(0, 0, planeWidth, planeDepth);
  stroke(33);
  strokeWeight(1);
  int stripePitch = 99;
  for (int xStripe = 0; xStripe <= planeWidth/stripePitch; ++xStripe) {
    line(xStripe*stripePitch, 0, xStripe*stripePitch, planeDepth);
  }
  for (int yStripe = 0; yStripe <= planeDepth/stripePitch; ++yStripe) {
    line(0, yStripe*stripePitch, planeWidth, yStripe*stripePitch);
  }
  popMatrix();
  stroke(255, 0, 255);//white
  strokeWeight(40);
  strokeCap(ROUND);
  PVector target = new PVector(map(mouseX, 0, width, -planeWidth, planeWidth), 0, map(mouseY, 0, height, 0, planeDepth*2));
  point(target.x, target.y-20, target.z);//whte dot behind eye
  noStroke();
  return target;
}

public void eyeModel(PVector origin, int pupilR, int pupilTheta) {
  // Displays a visual model of the eye with the specified params

  int xCen = PApplet.parseInt(origin.x);
  int yCen = PApplet.parseInt(origin.y);
  int zCen = PApplet.parseInt(origin.z);
  int bigRad =eyeRad ;//46.5inch diam
  int smallRad = eyeMinorRad;//23.5 inches diam ////delete
  int trueMaximum = bigRad-smallRad-pupilGutter;
  float gutterLossCoeff = eyeRad/trueMaximum;
  int max255 = PApplet.parseInt(gutterLossCoeff*255);
  pupilR = constrain(pupilR, -max255, max255); //can travel backwards, meaning not truly polar coords
  pupilTheta = constrain(pupilTheta, 0, 360);//Angular position of the pupil, CCW degrees from 3 o'clock

  int pupilRPixels = PApplet.parseInt(map(pupilR, -255, 255, -eyeRad, eyeRad));
  pupilRPixels = constrain(pupilRPixels, -trueMaximum, trueMaximum);
  //whte dot behind eye
  stroke(255);//white
  strokeWeight(10);
  strokeCap(ROUND);
  point(xCen, yCen, zCen);//whte dot behind eye
  noStroke();
  //EYEBALL
  pushMatrix();
  translate(0, 0, bigRad);
  float pupilThetaRadians=radians(pupilTheta);
  fill(211);//White of entire eye
  ellipse(xCen, yCen, 2*bigRad, 2*bigRad);//White of eye
  fill(222);//White of traversable eye area
  translate(0, 0, 1);//shift 1 px forward to avoid self intercection
  ellipse(xCen, yCen, 2*(bigRad-pupilGutter), 2*(bigRad-pupilGutter));//White of eye, travelable zone
  fill(45);//Pupil Black
  translate(0, 0, 1);//shift 1 px forward to avoid self intercection
  ellipse(xCen + pupilRPixels*cos(pupilThetaRadians), yCen-pupilRPixels*sin(pupilThetaRadians), 2*smallRad, 2*smallRad);
  translate(0, 0, 1);//shift 1 px forward to avoid self intercection
  noFill();
  stroke(255);//HILIGHT WHITE
  strokeWeight(bigRad/10);
  strokeCap(SQUARE);//For the hilight
  float hightlightRad = 1.4f;
  arc(xCen, yCen, hightlightRad*bigRad, hightlightRad*bigRad, radians(207), radians(223));
  arc(xCen, yCen, hightlightRad*bigRad, hightlightRad*bigRad, radians(228), radians(239));
  noStroke();
  popMatrix();
}

// void OSCSetup(){
//   oscP5 = new OscP5(this, 12000);
//   myRemoteLocation = new NetAddress("10.140.70.36", 11111);
// }

// void oscEvent(OscMessage theOscMessage) {
//   //Is called whenever an OSC packet is recieved
//   float touchOSCxParam = 0.0;
//   float touchOSCyParam =0.0;
//   /* check if theOscMessage has the address pattern we are looking for. */
//   if (theOscMessage.checkAddrPattern("/3/xy")==true) {
//     touchOSCxParam = theOscMessage.get(0).floatValue();
//     touchOSCyParam = theOscMessage.get(1).floatValue();
//     //    println(" X: "+touchOSCxParam+" y: "+touchOSCyParam);
//   }

//   println("### received an osc message. with address pattern "+theOscMessage.addrPattern());
//   float newX = map(touchOSCxParam, 0, 1, -1, 1);
//   float newY = map(touchOSCyParam, 0, 1, 1, -1);//center on center
//   // println(" newX: "+newX+" newY: "+newY);

//   float pupilR01 = constrain(sqrt((newX*newX)+(newY*newY)), 0, 1);
//   pupilR = int(map(pupilR01, 0, 1, 0, 360));

//   pupilThetaDegrees = -int(degrees(atan2(newY, newX)));
//   //  pupilR= int(map(touchOSCxParam, 0, 1, -255, 255)) ;
//   //  pupilThetaDegrees= int(map(touchOSCyParam, 0, 1, 0, 360)) ;
//   moveEye(pupilThetaDegrees,pupilR);

// }

//
//public void controlEvent(ControlEvent theEvent) {
//  //  OscMessage thetaCommand = new OscMessage("/3/xy");
//  OscMessage thetaCommand = new OscMessage("/1/fader");
//  thetaCommand.add(1);
//  //  thetaCommand.add(",");
//  //  thetaCommand.add(0.0);
//  oscP5.send(thetaCommand, myRemoteLocation);
//}

  static public void main(String[] passedArgs) {
    String[] appletArgs = new String[] { "GooglyEyeController" };
    if (passedArgs != null) {
      PApplet.main(concat(appletArgs, passedArgs));
    } else {
      PApplet.main(appletArgs);
    }
  }
}


text:
<?php namespace App\Http\Controllers\Auth;
use App\User;
use Validator;
use App\Http\Controllers\Controller;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
use Illuminate\Http\Request;

class AuthController extends Controller
{
    /*
    |--------------------------------------------------------------------------
    | Registration & Login Controller
    |--------------------------------------------------------------------------
    |
    | This controller handles the registration of new users, as well as the
    | authentication of existing users. By default, this controller uses
    | a simple trait to add these behaviors. Why don't you explore it?
    |
    */
    use AuthenticatesAndRegistersUsers;

    /**
     * Create a new authentication controller instance.
     * @param  \Illuminate\Contracts\Auth\Guard  $auth
     * @return void
     */
    public function __construct(Guard $auth)
    {
        $this->auth = $auth;
        $this->middleware('guest', ['except' => 'getLogout']);
    }

    /**
     * Register disabled
     * @return \Illuminate\Http\Response
     */
    public function getRegister()
    {
        return redirect('auth/login');die;
    }

    /**
     * Handle a registration request for the application.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
    public function postRegister(Request $request)
    {
        return redirect('auth/login');die;
    }

    /**
     * Show Login Form
     *
     * @return Response
     */
    public function getLogin()
    {
        return view('cms.auth.login');
    }

    /**
     * Handle a login request to the application.
     *
     * @param  Request  $request
     * @return Response
     */
    public function postLogin(Request $request)
    {
        $this->validate($request,['email' => 'required|email', 'password' => 'required']);
        $request->offsetSet('status',1);
        if ($this->auth->attempt($request->only('email', 'password','status'))){
            return redirect('/dashboard');
        }else{
            return redirect('/auth/login')->withErrors(['email' => trans('app.email_or_password_incorrect')]);
        }
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Media;

namespace Rmvvml
{
    /// <summary>
    /// Adorner中に簡単にコントロールを表示するためのクラス
    /// </summary>
    public class SimpleAdornerBase : Adorner
    {
        public SimpleAdornerBase(UIElement adornedElement)
            : base(adornedElement)
        {
            Host = new Grid();
        }

        /// <summary>
        /// Adorner内のルート要素
        /// </summary>
        protected Grid Host { get; set; }

        protected override int VisualChildrenCount
        {
            get { return 1; }
        }

        protected override Size MeasureOverride(Size constraint)
        {
            Host.Measure(constraint);
            return base.MeasureOverride(constraint);
        }

        protected override Size ArrangeOverride(Size finalSize)
        {
            Host.Arrange(new Rect(finalSize));
            return base.ArrangeOverride(finalSize);
        }

        protected override Visual GetVisualChild(int index)
        {
            if (index >= VisualChildrenCount)
            {
                throw new IndexOutOfRangeException();
            }
            return Host;
        }

        public void Show()
        {
            AdornerLayer layer = AdornerLayer.GetAdornerLayer(AdornedElement);
            layer.Add(this);
        }

        public void Hide()
        {
            AdornerLayer layer = AdornerLayer.GetAdornerLayer(AdornedElement);
            layer.Remove(this);
        }

        public void Update()
        {
            AdornerLayer layer = AdornerLayer.GetAdornerLayer(AdornedElement);
            layer.Update(AdornedElement);
        }
    }
}


text:
import bcrypt from 'bcrypt-nodejs';

export default (sequelize, DataTypes) => {
  const User = sequelize.define('User', {
    name: {
      type: DataTypes.STRING,
      allowNull: false,
      validate: {
        notEmpty: {
          message: 'Username cannot be empty'
        }
      }
    },
    username: {
      allowNull: false,
      type: DataTypes.STRING,
      unique: true,
      validate: {
        notEmpty: {
          message: 'Username cannot be empty'
        }
      }
    },
    email: {
      type: DataTypes.STRING,
      allowNull: false,
      unique: true,
      validate: {
        isEmail: {
          message: 'Invalid email address!'
        }
      }
    },
    password: {
      type: DataTypes.STRING,
      validate: {
        len: {
          args: [4, 100],
          message: 'Password too short!'
        }
      }
    },
    RoleId: {
      allowNull: false,
      type: DataTypes.INTEGER,
      validate: {
        isInt: {
          message: 'Role Id must be an integer'
        }
      }
    }
  }, {
    classMethods: {
      associate: (models) => {
        User.belongsTo(models.Role, {
          onDelete: 'CASCADE',
          foreignKey: {
            allowNull: false
          }
        });

        User.hasMany(models.Document, {
          foreignKey: 'UserId'
        });
      }
    },

    instanceMethods: {
      hashPassword() {
        this.password = bcrypt.hashSync(this.password, bcrypt.genSaltSync(8));
      },

      matchPassword(password) {
        return bcrypt.compareSync(password, this.password);
      }
    },

    hooks: {
      beforeCreate(user) {
        user.hashPassword();
      },

      beforeUpdate(user) {
        if (user._changed.password) {
          user.hashPassword();
        }
      }
    }
  });
  return User;
};


text:
using System;
using System.Diagnostics;
using System.Threading;

using NUnit.Framework;
using PNUnit.Framework;

namespace TestLibraries
{
    [TestFixture, Explicit("PNUnit Test")]
    //TestGroup that runs their tests without any synchronization. Each test runs in parallel
    public class ParallelExample
    {
        private const int MAX_ITERATIONS = 5;
        [Test]
        public void ParallelTest_A()
        {
            //Obtain the sleep time from the configuration file parameters
            string[] testParams = PNUnitServices.Get().GetTestParams();
            int sleepTime = int.Parse(testParams[0]);

            int count = 0;
            while (count < MAX_ITERATIONS)
            {
                PNUnitServices.Get().WriteLine(
                    string.Format("Starting  ParallelTest_A, Time: {0}. Iteration:{1}",
                        DateTime.Now.ToString(),
                        count + 1));

                PNUnitServices.Get().WriteLine(
                    string.Format("Sleeping  ParallelTest_A for {1} seconds, Time: {0}",
                        DateTime.Now.ToString(),
                        sleepTime));

                Thread.Sleep(sleepTime * 1000);

                PNUnitServices.Get().WriteLine(
                    string.Format("Waking up ParallelTest_A, Time: {0}",
                    DateTime.Now.ToString()));

                count++;
            }
        }

        [Test]
        public void ParallelTest_B()
        {
            string[] testParams = PNUnitServices.Get().GetTestParams();
            int sleepTime = int.Parse(testParams[0]);

            int count = 0;
            while (count < MAX_ITERATIONS)
            {
                PNUnitServices.Get().WriteLine(
                    string.Format("Starting  ParallelTest_B, Time: {0}. Iteration:{1}",
                    DateTime.Now.ToString(),
                    count + 1));

                PNUnitServices.Get().WriteLine(
                    string.Format("Sleeping  ParallelTest_B for {1} seconds, Time: {0}",
                    DateTime.Now.ToString(),
                    sleepTime));

                Thread.Sleep(sleepTime * 1000);

                PNUnitServices.Get().WriteLine(
                    string.Format("Waking up ParallelTest_B, Time: {0}",
                    DateTime.Now.ToString()));

                count++;
            }
        }
    }

    [TestFixture, Explicit("PNUnit Test")]
    public class ParallelExampleWithBarriers
    {
        public const string START_BARRIER = "START_BARRIER";
        public const string WAIT_BARRIER  = "WAIT_BARRIER";

        [Test]
        public void ParallelTestWithBarriersA()
        {
            //First step should be the initialization of synchronization barriers
            PNUnitServices.Get().InitBarriers();

            PNUnitServices.Get().WriteLine(
                string.Format(
                    "ParallelTestWithBarriersA: Waiting for peer synchronization before starting... Time:{0}",
                    DateTime.Now.ToString()));

            PNUnitServices.Get().EnterBarrier(START_BARRIER);
            PNUnitServices.Get().WriteLine(string.Format(
                "ParallelTestWithBarriersA: Sync start performed!... Time:{0}", DateTime.Now.ToString()));

            PNUnitServices.Get().WriteLine(
                string.Format("Sleeping  ParallelTestWithBarriersA for 5 seconds, Time: {0}",
                DateTime.Now.ToString()));

            Thread.Sleep(5000);

            PNUnitServices.Get().WriteLine(
                string.Format(
                "ParallelTestWithBarriersA: Waiting for peer synchronization after sleeping... Time:{0}",
                DateTime.Now.ToString()));

            PNUnitServices.Get().EnterBarrier(WAIT_BARRIER);
            PNUnitServices.Get().WriteLine(string.Format("ParallelTestWithBarriersA: Sync end!. Time:{0}", DateTime.Now.ToString()));
        }

        [Test]
        public void ParallelTestWithBarriersB()
        {
            PNUnitServices.Get().InitBarriers();

            PNUnitServices.Get().WriteLine(
                string.Format(
                "ParallelTestWithBarriersB: About to sleep for 4 seconds before starting... Time:{0}",
                DateTime.Now.ToString()));

            Thread.Sleep(4000);

            PNUnitServices.Get().EnterBarrier(START_BARRIER);
            PNUnitServices.Get().WriteLine(string.Format(
                "ParallelTestWithBarriersB: Sync start performed!... Time:{0}", DateTime.Now.ToString()));

            PNUnitServices.Get().WriteLine(
                string.Format("Sleeping  ParallelTestWithBarriersB for 1 second, Time: {0}",
                DateTime.Now.ToString()));

            Thread.Sleep(1000);

            PNUnitServices.Get().WriteLine(
                string.Format(
                "ParallelTestWithBarriersB: Waiting for peer synchronization after sleeping... Time:{0}",
                DateTime.Now.ToString()));

            PNUnitServices.Get().EnterBarrier(WAIT_BARRIER);
            PNUnitServices.Get().WriteLine(string.Format("ParallelTestWithBarriersB: Sync end!. Time:{0}", DateTime.Now.ToString()));
        }
    }
}


text:
@implementation GCPhotoPickerCell
@synthesize titleLabel;

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(75, 10, 235, 25)];
        self.titleLabel.font = [UIFont systemFontOfSize:15];
        [self.contentView addSubview:titleLabel];
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end


text:
<md-content layout="column" ng-controller="ctrl.controller as taskCtrl">

    <md-tabs md-dynamic-height>
        <md-tab>
            <md-tab-label>
                {{ 'TASK.TASK_DETAILS' | translate }}
            </md-tab-label>
            <md-tab-body>
                <md-content layout="row">

                        <md-card>
                            <md-card-content>

{{ 'WORKFLOW.INFORMATION' | translate }}

{{ 'COMMON.STATUS' | translate }}

                                            <md-button ng-repeat="status in taskCtrl.statuses" class="button-status {{((taskCtrl.task.properties.bpm_status == status) && taskCtrl.toggleStatus.item == -1) ? 'active' : ''}}" ng-click="taskCtrl.changeStatus($index)" ng-class="{'active' : taskCtrl.toggleStatus.item == $index}">{{status | workflowTaskStatus}}</md-button>

{{ 'COMMON.DUE_DATE' | translate }}

{{ taskCtrl.task.workflowInstance.dueDate | openeDate }}

{{ 'COMMON.PRIORITY' | translate }}

{{ taskCtrl.task.workflowInstance.priority | workflowTaskPriority}}

{{ 'COMMON.CREATEDBY' | translate }}

{{ taskCtrl.task.workflowInstance.initiator.firstName }} {{ taskCtrl.task.workflowInstance.initiator.lastName }}

{{ 'COMMON.CREATED' | translate }}

{{ taskCtrl.task.workflowInstance.startDate | openeDate }}

{{ 'COMMON.DESCRIPTION' | translate }}

{{ taskCtrl.task | taskDescription }}

 {{'TASK.THIS_TASK_IS_UNASSIGNED' | translate}}

                            </md-card-content>

                                <md-button class="md-primary" ng-click="taskCtrl.claim()" ng-show="taskCtrl.task.isClaimable">{{'TASK.CLAIM' | translate}}</md-button>
                                <md-button class="md-primary" ng-click="taskCtrl.releaseToPool()" ng-show="!taskCtrl.task.isClaimable && taskCtrl.task.isPooled">{{'TASK.RELEASE_TO_POOL' | translate}}</md-button>
                                <md-button class="md-primary" ng-click="taskCtrl.approve()">{{'TASK.APPROVE' | translate}}</md-button>
                                <md-button class="md-primary" ng-click="taskCtrl.reject()">{{'TASK.REJECT' | translate}}</md-button>

                        </md-card>

                        <md-card>
                            <md-card-content>

{{'TASK.ITEMS' | translate}}

                                <md-divider style="margin-bottom: 1em;"></md-divider>

                                        {{item.name}}

{{ 'COMMON.CREATED' | translate }} {{item.modified | date}} {{ 'COMMON.BY' | translate }} {{item.createdBy.firstName}} {{item.createdBy.lastName}}

                                        <md-button class="md-primary" ng-click="taskCtrl.previewDocument(item)">{{ 'COMMON.PREVIEW' | translate }}</md-button>

                                        <md-button class="md-primary" ng-href="#/cases/case/{{taskCtrl.task.caseId}}/doc/{{taskCtrl.documentNodeRefToOpen(item) | nodeRefUri}}">{{ 'COMMON.OPEN' | translate }}</md-button>

                            </md-card-content>
                        </md-card>

                </md-content>
            </md-tab-body>
        </md-tab>
        <ng-include src="'app/src/tasks/common/view/workflowDetails.html'"></ng-include>
    </md-tabs>
</md-content>


text:
package org.codehaus.groovy.runtime.callsite;

import groovy.lang.MetaClass;

/**
 * Call site which holds reference to meta class
 *
 * @author Alex Tkachman
*/
public abstract class MetaClassSite extends AbstractCallSite {
    protected final MetaClass metaClass;

    public MetaClassSite(CallSite site, MetaClass metaClass) {
        super(site);
        this.metaClass = metaClass;
    }
}


text:
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Management.Automation.Runspaces;
using System.Reflection;
using System.Text;

namespace OffensivePowerShellTasking
{
    public class PSTask
    {
        public int ID { get; set; }
        private AppDomain PSAppDomain = null;
        private PSExecutionItem task = null;
        private static int JobCounter = 0;

        public PSTask()
        {
            this.ID = JobCounter++;
        }

        public void Initialize(string PSScriptBlock)
        {
            PSAppDomain = AppDomain.CreateDomain(Guid.NewGuid().ToString(), AppDomain.CurrentDomain.Evidence);

            // Create a new PSTask object in a separate app domain.
            // Because PSExecutionitem implements MarshalByRefObject, CreateInstanceAndUnwrap returns a "proxy" object that we can use to query info about the remote object
            task = (PSExecutionItem)PSAppDomain.CreateInstanceAndUnwrap(
                Assembly.GetExecutingAssembly().FullName,
                typeof(PSExecutionItem).FullName,
                false,
                BindingFlags.Default,
                default(Binder),
                new object[] { PSScriptBlock },      // PSExecutionitem constructor arguments
                default(CultureInfo),
                null,
                AppDomain.CurrentDomain.Evidence
            );
        }

        public void Start()
        {
            if (task == null)
            {
                throw new Exception("Task has not been initialized");
            }

            task.Invoke();
        }

        public PipelineState GetStatus()
        {
            if (task == null)
            {
                throw new Exception("Task has not been initialized");
            }
            return task.GetState();
        }

        public StringBuilder GetOutput()
        {
            if (task == null)
            {
                throw new Exception("Task has not been initialized");
            }

            return task.GetOutput();
        }

        // Stops any current tasks and unloads the PSAppDomain.  Throws an exception if the domain can't be unloaded
        public void Shutdown()
        {
            if (task != null)
            {
                task.Stop();
                task = null;
            }

            if (PSAppDomain != null)
            {
                AppDomain.Unload(PSAppDomain);
                PSAppDomain = null;
            }
        }
    }
}


text:
package everstore.api.exception;

import everstore.api.EverstoreException;

public final class OpenTransactionFailed extends EverstoreException {
    public OpenTransactionFailed(final String journalName, Throwable cause) {
        super("Could not open transaction for journal: " + journalName, cause);
    }
}


text:
if 'test' not in __import__('sys').argv[0]:
    import gevent.monkey
    gevent.monkey.patch_all()
from couchdb import Server as CouchdbServer, Session
from logging import getLogger
from openprocurement.edge.utils import (
    add_logging_context,
    set_logging_context,
    prepare_couchdb,
    prepare_couchdb_views,
    beforerender,
    request_params,
    set_renderer
)

LOGGER = getLogger("{}.init".format(__name__))

from pyramid.config import Configurator
from pyramid.events import NewRequest, BeforeRender, ContextFound
from pyramid.renderers import JSON, JSONP
from pyramid.settings import asbool

VALIDATE_DOC_ID = '_design/_auth'
VALIDATE_DOC_UPDATE = """function(newDoc, oldDoc, userCtx){
    if(newDoc._deleted && newDoc.tenderID) {
        throw({forbidden: 'Not authorized to delete this document'});
    }
    if(userCtx.roles.indexOf('_admin') !== -1 && newDoc._id.indexOf('_design/') === 0) {
        return;
    }
    if(userCtx.name === '%s') {
        return;
    } else {
        throw({forbidden: 'Only authorized user may edit the database'});
    }
}"""

class Server(CouchdbServer):
    _uuid = None

    @property
    def uuid(self):
        """The uuid of the server.

        :rtype: basestring
        """
        if self._uuid is None:
            _, _, data = self.resource.get_json()
            self._uuid = data['uuid']
        return self._uuid

def main(global_config, **settings):
    version = settings.get('api_version')
    route_prefix = '/api/{}'.format(version)
    config = Configurator(
        autocommit=True,
        settings=settings,
        route_prefix=route_prefix,
    )
    config.include('pyramid_exclog')
    config.include("cornice")
    config.add_request_method(request_params, 'params', reify=True)
    config.add_renderer('prettyjson', JSON(indent=4))
    config.add_renderer('jsonp', JSONP(param_name='opt_jsonp'))
    config.add_renderer('prettyjsonp', JSONP(indent=4, param_name='opt_jsonp'))
    config.add_subscriber(add_logging_context, NewRequest)
    config.add_subscriber(set_logging_context, ContextFound)
    config.add_subscriber(set_renderer, NewRequest)
    config.add_subscriber(beforerender, BeforeRender)
    config.scan("openprocurement.edge.views.spore")
    config.scan("openprocurement.edge.views.health")

    resources = settings.get('resources') and settings['resources'].split(',')
    couch_url = settings.get('couchdb.url') + settings.get('couchdb.db_name')
    for resource in resources:
        config.scan("openprocurement.edge.views." + resource)
        prepare_couchdb_views(couch_url, resource, LOGGER)
        LOGGER.info('Push couch {} views successful.'.format(resource))
        LOGGER.info('{} resource initialized successful.'.format(resource.title()))

    # CouchDB connection
    server = Server(settings.get('couchdb.url'),
                    session=Session(retry_delays=range(10)))
    config.registry.couchdb_server = server
    config.registry.db = prepare_couchdb(settings.get('couchdb.url'),
                                         settings.get('couchdb.db_name'),
                                         LOGGER)
    config.registry.server_id = settings.get('id', '')
    config.registry.health_threshold = float(settings.get('health_threshold', 99))
    config.registry.api_version = version
    config.registry.update_after = asbool(settings.get('update_after', True))
    return config.make_wsgi_app()


text:
AutoRest generated clients support a number of retry policies based on [The Transient Fault Handling Application Block](https://msdn.microsoft.com/en-us/library/hh680934%28v=pandp.50%29.aspx). Retry policies allow generated clients to automatically recover from transient server errors (e.g. error code 5XX).

There are two ways to customize the retry behavior:

- Change the detection strategy - define which server error responses need to be retried and which ones should to be re-thrown
- Change the retry strategy - specify how long and how many times to continue retrying

By default, the detection strategy is configured to retry on HttpStatusCode 408 (RequestTimeout) as well as all 5XX codes. The only exceptions are 501 (NotImplemented) and 505 (HttpVersionNotSupported) status codes which are re-thrown to the user.

The default retry strategy is based on exponential back-off with maximum of three attempts, back-off delta of 10 seconds, minimum back-off of 1 second, and maximum back-off of 10 seconds.

## Changing the Detection Strategy
Detection strategy can be customized by implementing interface [ITransientErrorDetectionStrategy](https://github.com/Azure/azure-sdk-for-net/blob/psSdkJson6/src/SdkCommon/ClientRuntime/ClientRuntime/TransientFaultHandling/ITransientErrorDetectionStrategy.cs):
```csharp
public class ServerErrorDetectionStrategy : ITransientErrorDetectionStrategy
{
    public bool IsTransient(Exception ex)
    {
        if (ex != null)
        {
            // AutoRest will use this error type for all server errors.
            HttpRequestWithStatusException httpException;
            if ((httpException = ex as HttpRequestWithStatusException) != null)
            {
                // Condition to retry
                if (httpException.StatusCode == HttpStatusCode.InternalServerError)
                {
                    return true;
                }
            }
        }
        return false;
    }
}
```
Finally, set the client retry policy using preferred retry strategy:
```csharp
var retryPolicy = new RetryPolicy<ServerErrorDetectionStrategy>(new FixedIntervalRetryStrategy());
client.SetRetryPolicy(retryPolicy);
```

## Changing the Retry Strategy
Microsoft.Rest.ClientRuntime comes with three built-in retry strategies:

- [ExponentialBackoffRetryStrategy](https://github.com/Azure/azure-sdk-for-net/blob/psSdkJson6/src/SdkCommon/ClientRuntime/ClientRuntime/TransientFaultHandling/ExponentialBackoffRetryStrategy.cs) - a retry strategy with backoff parameters for calculating the exponential delay between retries
- [FixedIntervalRetryStrategy](https://github.com/Azure/azure-sdk-for-net/blob/psSdkJson6/src/SdkCommon/ClientRuntime/ClientRuntime/TransientFaultHandling/FixedIntervalRetryStrategy.cs) - a retry strategy with a specified number of retry attempts and a default, fixed time interval between retries
- [IncrementalRetryStrategy](https://github.com/Azure/azure-sdk-for-net/blob/psSdkJson6/src/SdkCommon/ClientRuntime/ClientRuntime/TransientFaultHandling/IncrementalRetryStrategy.cs) - a retry strategy with a specified number of retry attempts and an incremental time interval between retries

In order to set the retry strategy in the client, follow these steps:
```csharp
var retryPolicy = new RetryPolicy<HttpStatusCodeErrorDetectionStrategy>(new FixedIntervalRetryStrategy(10));
client.SetRetryPolicy(retryPolicy);
```

In order to implement a custom retry strategy extend [RetryStrategy](https://github.com/Azure/azure-sdk-for-net/blob/psSdkJson6/src/SdkCommon/ClientRuntime/ClientRuntime/TransientFaultHandling/RetryPolicy.cs) abstract class.


text:
#import <Cocoa/Cocoa.h>

//! Project version number for MedKitDomain macOS.
FOUNDATION_EXPORT double MedKitDomainVersionNumber;

//! Project version string for MedKitDomain macOS.
FOUNDATION_EXPORT const unsigned char MedKitDomainVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <MedKitDomain_macOS/PublicHeader.h>


text:
package org.checkerframework.dataflow.cfg.node;

import java.util.Collection;
import java.util.LinkedList;

import org.checkerframework.dataflow.util.HashCodeUtils;

import org.checkerframework.javacutil.InternalUtils;

import com.sun.source.tree.Tree;
import com.sun.source.tree.Tree.Kind;

/**
 * A node for the greater than comparison:
 *
 *

 *   expression > expression
 *

 *
 * @author Stefan Heule
 * @author Charlie Garrett
 *
 */
public class GreaterThanNode extends Node {

    protected Tree tree;
    protected Node left;
    protected Node right;

    public GreaterThanNode(Tree tree, Node left, Node right) {
        super(InternalUtils.typeOf(tree));
        assert tree.getKind() == Kind.GREATER_THAN;
        this.tree = tree;
        this.left = left;
        this.right = right;
    }

    public Node getLeftOperand() {
        return left;
    }

    public Node getRightOperand() {
        return right;
    }

    @Override
    public Tree getTree() {
        return tree;
    }

    @Override
    public <R, P> R accept(NodeVisitor<R, P> visitor, P p) {
        return visitor.visitGreaterThan(this, p);
    }

    @Override
    public String toString() {
        return "(" + getLeftOperand() + " > " + getRightOperand() + ")";
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null || !(obj instanceof GreaterThanNode)) {
            return false;
        }
        GreaterThanNode other = (GreaterThanNode) obj;
        return getLeftOperand().equals(other.getLeftOperand())
                && getRightOperand().equals(other.getRightOperand());
    }

    @Override
    public int hashCode() {
        return HashCodeUtils.hash(getLeftOperand(), getRightOperand());
    }

    @Override
    public Collection<Node> getOperands() {
        LinkedList<Node> list = new LinkedList<Node>();
        list.add(getLeftOperand());
        list.add(getRightOperand());
        return list;
    }
}


text:
python-football-sim
===================


text:
namespace AuthService.Model
{
    using System;
    using System.Collections.Generic;

    public partial class UserProfile
    {
        public int UserId { get; set; }
        public string UserName { get; set; }
        public Nullable<bool> IsCompany { get; set; }
        public Nullable<bool> IsTester { get; set; }
        public string emailaddress { get; set; }
        public string AlternateUserId { get; set; }
    }
}


text:
class QSettings;

namespace compilerExplorer {
namespace network{
class Request;
class RequestGeneratorPrivate;
class COMPILEREXPLORERSHARED_EXPORT RequestGenerator
{
public:
	RequestGenerator();
	RequestGenerator(const QString &address, const int port);
	virtual ~RequestGenerator();
	std::unique_ptr<Request> createCompilerRequest();
	QString address() const;
	void setAddress(const QString &address);
	int port() const;
	void setPort(const int port);
	void setCompilerLocation(const QString &location);
	void setCompilerOptions(const QString &options);
	void setSourceCode(const QString &code);
	void setFilters(const QStringList &filters);
	void updateSettings(const QSettings &settings);
	static std::unique_ptr<Request> comilersListRequest(const QString &address);
private:
	std::unique_ptr<RequestGeneratorPrivate> d;
};
}
}
#endif // REQUESTGENERATOR_H


text:
package org.apache.jackrabbit.oak.security.privilege;

import org.apache.jackrabbit.oak.AbstractSecurityTest;
import org.apache.jackrabbit.oak.api.Root;
import org.apache.jackrabbit.oak.api.Tree;
import org.apache.jackrabbit.oak.plugins.tree.RootProvider;
import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
import org.apache.jackrabbit.oak.spi.state.NodeState;
import org.apache.jackrabbit.oak.spi.state.NodeStore;
import org.junit.Before;
import org.junit.Test;

import javax.jcr.RepositoryException;

import static org.apache.jackrabbit.JcrConstants.JCR_SYSTEM;
import static org.apache.jackrabbit.oak.spi.security.privilege.PrivilegeConstants.REP_PRIVILEGES;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.isNull;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

public class PrivilegeInitializerTest extends AbstractSecurityTest {

    private PrivilegeInitializer initializer;

    @Override
    @Before
    public void before() throws Exception {
        super.before();
        initializer = new PrivilegeInitializer(getRootProvider());
    }

    @Test(expected = IllegalStateException.class)
    public void testMissingJcrSystem() {
        initializer.initialize(mock(NodeBuilder.class));
    }

    @Test
    public void testAlreadyInitialized() {
        NodeBuilder nb = when(mock(NodeBuilder.class).hasChildNode(JCR_SYSTEM)).thenReturn(true).getMock();
        when(nb.getChildNode(JCR_SYSTEM)).thenReturn(nb);
        when(nb.hasChildNode(REP_PRIVILEGES)).thenReturn(true);

        initializer.initialize(nb);

        verify(nb, never()).child(anyString());
    }

    @Test(expected = RuntimeException.class)
    public void testPrivilegeRegistrationFails() {
        try {
            NodeState ns = mock(NodeState.class);
            NodeBuilder nb = when(mock(NodeBuilder.class).hasChildNode(JCR_SYSTEM)).thenReturn(true).getMock();
            when(nb.getChildNode(anyString())).thenReturn(nb);
            when(nb.child(anyString())).thenReturn(nb);
            when(nb.getNodeState()).thenReturn(ns);

            Tree t = when(mock(Tree.class).exists()).thenReturn(true).getMock();
            when(t.hasChild(anyString())).thenReturn(true);

            Root r = when(mock(Root.class).getTree(anyString())).thenReturn(t).getMock();
            RootProvider rp = when(mock(RootProvider.class).createSystemRoot(any(NodeStore.class), isNull())).thenReturn(r).getMock();
            PrivilegeInitializer pi = new PrivilegeInitializer(rp);
            pi.initialize(nb);
        } catch (RuntimeException e) {
            assertTrue(e.getCause() instanceof RepositoryException);
            throw e;
        }
    }
}


text: export * from './standings.component';


text:
namespace Rotativa.NetCore
{
    public class WkhtmltoimageDriver : WkhtmlDriver
    {
        private const string WkhtmlExe = "wkhtmltoimage.exe";

        /// <summary>
        /// Converts given HTML string to PDF.
        /// </summary>
        /// <param name="wkhtmltopdfPath">Path to wkthmltopdf.</param>
        /// <param name="switches">Switches that will be passed to wkhtmltopdf binary.</param>
        /// <param name="html">String containing HTML code that should be converted to PDF.</param>
        /// <returns>PDF as byte array.</returns>
        public static byte[] ConvertHtml(string wkhtmltopdfPath, string switches, string html)
        {
            return Convert(wkhtmltopdfPath, switches, html, WkhtmlExe);
        }

        /// <summary>
        /// Converts given URL to PDF.
        /// </summary>
        /// <param name="wkhtmltopdfPath">Path to wkthmltopdf.</param>
        /// <param name="switches">Switches that will be passed to wkhtmltopdf binary.</param>
        /// <returns>PDF as byte array.</returns>
        public static byte[] Convert(string wkhtmltopdfPath, string switches)
        {
            return Convert(wkhtmltopdfPath, switches, null, WkhtmlExe);
        }
    }
}


text:
@echo off
setlocal

set "WD=%__CD__%"
if NOT EXIST "%WD%msys-2.0.dll" set "WD=%~dp0usr\bin\"

rem To activate windows native symlinks uncomment next line
rem set MSYS=winsymlinks:nativestrict

rem Set debugging program for errors
rem set MSYS=error_start:%WD%../../mingw64/bin/qtcreator.exe^|-debug^|^<process-id^>

rem To export full current PATH from environment into MSYS2 use '-use-full-path' parameter
rem or uncomment next line
rem set MSYS2_PATH_TYPE=inherit

:checkparams
rem Help option
if "x%~1" == "x-help" (
  call :printhelp "%~nx0"
  exit /b %ERRORLEVEL%
)
if "x%~1" == "x--help" (
  call :printhelp "%~nx0"
  exit /b %ERRORLEVEL%
)
if "x%~1" == "x-?" (
  call :printhelp "%~nx0"
  exit /b %ERRORLEVEL%
)
if "x%~1" == "x/?" (
  call :printhelp "%~nx0"
  exit /b %ERRORLEVEL%
)
rem Shell types
if "x%~1" == "x-msys" shift& set MSYSTEM=MSYS& goto :checkparams
if "x%~1" == "x-msys2" shift& set MSYSTEM=MSYS& goto :checkparams
if "x%~1" == "x-mingw32" shift& set MSYSTEM=MINGW32& goto :checkparams
if "x%~1" == "x-mingw64" shift& set MSYSTEM=MINGW64& goto :checkparams
if "x%~1" == "x-mingw" shift& (if exist "%WD%..\..\mingw64" (set MSYSTEM=MINGW64) else (set MSYSTEM=MINGW32))& goto :checkparams
rem Console types
if "x%~1" == "x-consolez" shift& set MSYSCON=console.exe& goto :checkparams
if "x%~1" == "x-mintty" shift& set MSYSCON=mintty.exe& goto :checkparams
if "x%~1" == "x-conemu" shift& set MSYSCON=conemu& goto :checkparams
if "x%~1" == "x-defterm" shift& set MSYSCON=defterm& goto :checkparams
rem Other parameters
if "x%~1" == "x-full-path" shift& set MSYS2_PATH_TYPE=inherit& goto :checkparams
if "x%~1" == "x-use-full-path" shift& set MSYS2_PATH_TYPE=inherit& goto :checkparams
if "x%~1" == "x-here" shift& set CHERE_INVOKING=enabled_from_arguments& goto :checkparams
if "x%~1" == "x-where" (
  if "x%~2" == "x" (
    echo Working directory is not specified for -where parameter. 1>&2
    exit /b 2
  )
  cd /d "%~2" || (
    echo Cannot set specified working diretory "%~2". 1>&2
    exit /b 2
  )
  set CHERE_INVOKING=enabled_from_arguments
)& shift& shift& goto :checkparams

rem Setup proper title
if "%MSYSTEM%" == "MINGW32" (
  set "CONTITLE=MinGW x32"
) else if "%MSYSTEM%" == "MINGW64" (
  set "CONTITLE=MinGW x64"
) else (
  set "CONTITLE=MSYS2 MSYS"
)

if "x%MSYSCON%" == "xmintty.exe" goto startmintty
if "x%MSYSCON%" == "xconsole.exe" goto startconsolez
if "x%MSYSCON%" == "xconemu" goto startconemu
if "x%MSYSCON%" == "xdefterm" goto startsh

if NOT EXIST "%WD%mintty.exe" goto startsh
set MSYSCON=mintty.exe
:startmintty
start "%CONTITLE%" "%WD%mintty" -i /msys2.ico /usr/bin/bash --login %1 %2 %3 %4 %5 %6 %7 %8 %9
exit /b %ERRORLEVEL%

:startconsolez
cd %WD%..\lib\ConsoleZ
start "%CONTITLE%" console -t "%CONTITLE%" -r %1 %2 %3 %4 %5 %6 %7 %8 %9
exit /b %ERRORLEVEL%

:startconemu
call :conemudetect || (
  echo ConEmu not found. Exiting. 1>&2
  exit /b 1
)
start "%CONTITLE%" "%ComEmuCommand%" /Here /Icon "%WD%..\..\msys2.ico" /cmd "%WD%bash" --login %1 %2 %3 %4 %5 %6 %7 %8 %9
exit /b %ERRORLEVEL%

:startsh
set MSYSCON=
start "%CONTITLE%" "%WD%bash" --login %1 %2 %3 %4 %5 %6 %7 %8 %9
exit /b %ERRORLEVEL%

:EOF
exit /b 0

:conemudetect
set ComEmuCommand=
if defined ConEmuDir (
  if exist "%ConEmuDir%\ConEmu64.exe" (
    set "ComEmuCommand=%ConEmuDir%\ConEmu64.exe"
    set MSYSCON=conemu64.exe
  ) else if exist "%ConEmuDir%\ConEmu.exe" (
    set "ComEmuCommand=%ConEmuDir%\ConEmu.exe"
    set MSYSCON=conemu.exe
  )
)
if not defined ComEmuCommand (
  ConEmu64.exe /Exit 2>nul && (
    set ComEmuCommand=ConEmu64.exe
    set MSYSCON=conemu64.exe
  ) || (
    ConEmu.exe /Exit 2>nul && (
      set ComEmuCommand=ConEmu.exe
      set MSYSCON=conemu.exe
    )
  )
)
if not defined ComEmuCommand (
  FOR /F "tokens=*" %%A IN ('reg.exe QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\ConEmu64.exe" /ve 2^>nul ^| find "REG_SZ"') DO (
    set "ComEmuCommand=%%A"
  )
  if defined ComEmuCommand (
    call set "ComEmuCommand=%%ComEmuCommand:*REG_SZ    =%%"
    set MSYSCON=conemu64.exe
  ) else (
    FOR /F "tokens=*" %%A IN ('reg.exe QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\ConEmu.exe" /ve 2^>nul ^| find "REG_SZ"') DO (
      set "ComEmuCommand=%%A"
    )
    if defined ComEmuCommand (
      call set "ComEmuCommand=%%ComEmuCommand:*REG_SZ    =%%"
      set MSYSCON=conemu.exe
    )
  )
)
if not defined ComEmuCommand exit /b 2
exit /b 0

:printhelp
echo Usage:
echo     %~1 [options] [bash parameters]
echo.
echo Options:
echo     -mingw32 ^| -mingw64 ^| -msys[2]   Set shell type
echo     -defterm ^| -mintty ^| -conemu ^| -consolez
echo                                      Set terminal type
echo     -here                            Use current directory as working
echo                                      directory
echo     -where DIRECTORY                 Use specified DIRECTORY as working
echo                                      directory
echo     -[use-]full-path                 Use full currnent PATH variable
echo                                      instead of triming to minimal
echo     -help ^| --help ^| -? ^| /?         Display this help and exit
echo.
echo Any parameter that cannot be treated as valid option and all
echo following parameters are passed as bash command parameters.
echo.
exit /b 0


text:
<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2017 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: Dean <zxxjjforever@163.com>
// +----------------------------------------------------------------------
namespace plugins\demo\controller; //Demo插件英文名,改成你的插件英文就行了
use cmf\controller\PluginBaseController;
use plugins\Demo\Model\PluginDemoModel;
use think\Db;

class IndexController extends PluginBaseController
{

    function index($id)
    {

        $users = Db::name("user")->limit(0, 5)->select();
        $demos = PluginDemoModel::all();

        // print_r($demos);

        $this->assign("users", $users);

        return $this->fetch("/index");
    }

}


text:
#define EIGEN_USE_THREADS

#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/framework/register_types.h"
#include "tensorflow/core/framework/tensor.h"
#include "tensorflow/core/framework/tensor_shape.h"
#include "tensorflow/core/kernels/fill_functor.h"
#include "tensorflow/core/kernels/inplace_ops_functor.h"
#include "tensorflow/core/lib/core/status.h"

namespace tensorflow {
typedef Eigen::ThreadPoolDevice CPUDevice;
#ifdef TENSORFLOW_USE_SYCL
typedef Eigen::SyclDevice SyclDevice;
#endif // TENSORFLOW_USE_SYCL

namespace functor {

template <typename Device, typename T>
Status DoParallelConcatUpdate(const Device& d, const Tensor& value,
                              int32 loc, Tensor* output) {
  auto Tvalue = value.flat_outer_dims<T>();
  auto Toutput = output->flat_outer_dims<T>();
  auto nrows = Toutput.dimension(0);
  auto r = (loc % nrows + nrows) % nrows;  // Guard index range.
  Toutput.template chip<0>(r).device(d) = Tvalue.template chip<0>(0);
  return Status::OK();
}

template <>
Status DoParallelConcat(const CPUDevice& d, const Tensor& value, int32 loc,
                        Tensor* output) {
  CHECK_EQ(value.dtype(), output->dtype());
  switch (value.dtype()) {
#define CASE(type)                  \
  case DataTypeToEnum<type>::value: \
    return DoParallelConcatUpdate<CPUDevice, type>(d, value, loc, output);
    TF_CALL_NUMBER_TYPES(CASE);
    TF_CALL_string(CASE);
#undef CASE
    default:
      return errors::InvalidArgument("Unsupported data type: ", value.dtype());
  }
}

#ifdef TENSORFLOW_USE_SYCL
template <>
Status DoParallelConcat(const SyclDevice& d, const Tensor& value, int32 loc,
                        Tensor* output) {
  CHECK_EQ(value.dtype(), output->dtype());
  switch (value.dtype()) {
#define CASE(type)                  \
  case DataTypeToEnum<type>::value: \
    return DoParallelConcatUpdate<SyclDevice, type>(d, value, loc, output);
    TF_CALL_GPU_NUMBER_TYPES_NO_HALF(CASE);
#undef CASE
    default:
      return errors::InvalidArgument("Unsupported data type: ", value.dtype());
  }
}
#endif // TENSORFLOW_USE_SYCL

}  // end namespace functor

namespace {

template <typename Device>
class ParallelConcatUpdate : public OpKernel {
 public:
  explicit ParallelConcatUpdate(OpKernelConstruction* ctx) : OpKernel(ctx) {
    OP_REQUIRES_OK(ctx, ctx->GetAttr("loc", &loc_));
  }

  void Compute(OpKernelContext* ctx) override {
    auto value = ctx->input(0);
    auto update = ctx->input(1);

    OP_REQUIRES(
        ctx, value.dims() == update.dims(),
        errors::InvalidArgument("value and update shape doesn't match: ",
                                value.shape().DebugString(), " vs. ",
                                update.shape().DebugString()));
    for (int i = 1; i < value.dims(); ++i) {
      OP_REQUIRES(
          ctx, value.dim_size(i) == update.dim_size(i),
          errors::InvalidArgument("value and update shape doesn't match ",
                                  value.shape().DebugString(), " vs. ",
                                  update.shape().DebugString()));
    }
    OP_REQUIRES(ctx, 1 == update.dim_size(0),
                errors::InvalidArgument("update shape doesn't match: ",
                                        update.shape().DebugString()));

    Tensor output = value;  // This creates an alias intentionally.
    const auto& d = ctx->eigen_device<Device>();
    OP_REQUIRES_OK(
        ctx, ::tensorflow::functor::DoParallelConcat(d, update, loc_, &output));
    ctx->set_output(0, output);
  }

 private:
  int32 loc_;
};

template <typename Device, typename T>
class ParallelConcatStart : public OpKernel {
 public:
  explicit ParallelConcatStart(OpKernelConstruction* ctx) : OpKernel(ctx) {
    OP_REQUIRES_OK(ctx, ctx->GetAttr("shape", &shape_));
  }

  void Compute(OpKernelContext* ctx) override {
    Tensor* out = nullptr;
    // We do not know whether the output will be used on GPU. Setting it to be
    // gpu-compatible for now.
    AllocatorAttributes attr;
    attr.set_gpu_compatible(true);
    OP_REQUIRES_OK(ctx, ctx->allocate_output(0, shape_, &out, attr));
  }

 private:
  TensorShape shape_;
};

class FailureKernel : public OpKernel {
 public:
  explicit FailureKernel(OpKernelConstruction* ctx) : OpKernel(ctx) {
    OP_REQUIRES_OK(ctx,
                   errors::Internal("Found instance of parallel_stack which "
                                    "could not be properly replaced."));
  }

  void Compute(OpKernelContext*) override {}
};

#define REGISTER(type)                                    \
  REGISTER_KERNEL_BUILDER(Name("_ParallelConcatUpdate")   \
                              .Device(DEVICE_CPU)         \
                              .TypeConstraint<type>("T"), \
                          ParallelConcatUpdate<CPUDevice>);
TF_CALL_POD_STRING_TYPES(REGISTER)
#undef REGISTER

#define REGISTER_EMPTY(type)                                  \
  REGISTER_KERNEL_BUILDER(Name("_ParallelConcatStart")        \
                              .Device(DEVICE_CPU)             \
                              .TypeConstraint<type>("dtype"), \
                          ParallelConcatStart<CPUDevice, type>)

TF_CALL_POD_STRING_TYPES(REGISTER_EMPTY)
#undef REGISTER_EMPTY

#define REGISTER_PARALLEL_CONCAT(type)                                     \
  REGISTER_KERNEL_BUILDER(                                                 \
      Name("ParallelConcat").Device(DEVICE_CPU).TypeConstraint<type>("T"), \
      FailureKernel);
TF_CALL_POD_STRING_TYPES(REGISTER_PARALLEL_CONCAT);
#undef REGISTER_PARALLEL_CONCAT

#ifdef TENSORFLOW_USE_SYCL
#define REGISTER_EMPTY(type)                                  \
  REGISTER_KERNEL_BUILDER(Name("_ParallelConcatStart")        \
                              .Device(DEVICE_SYCL)            \
                              .TypeConstraint<type>("dtype"), \
                          ParallelConcatStart<SyclDevice, type>);
TF_CALL_GPU_NUMBER_TYPES_NO_HALF(REGISTER_EMPTY)
#undef REGISTER_EMPTY

#define REGISTER_PARALLEL_CONCAT(type)                                      \
  REGISTER_KERNEL_BUILDER(                                                  \
      Name("ParallelConcat").Device(DEVICE_SYCL).TypeConstraint<type>("T"), \
      FailureKernel);
TF_CALL_GPU_NUMBER_TYPES_NO_HALF(REGISTER_PARALLEL_CONCAT);
#undef REGISTER_PARALLEL_CONCAT

#define REGISTER(type)                                    \
  REGISTER_KERNEL_BUILDER(Name("_ParallelConcatUpdate")   \
                              .Device(DEVICE_SYCL)        \
                              .TypeConstraint<type>("T"), \
                          ParallelConcatUpdate<SyclDevice>);
TF_CALL_GPU_NUMBER_TYPES_NO_HALF(REGISTER)
#undef REGISTER

// Register versions that operate on int32 data on the CPU even though the op
// has been placed on the SYCL

REGISTER_KERNEL_BUILDER(Name("_ParallelConcatUpdate")
                            .Device(DEVICE_SYCL)
                            .HostMemory("value")
                            .HostMemory("update")
                            .HostMemory("output")
                            .TypeConstraint<int32>("T"),
                        ParallelConcatUpdate<CPUDevice>);
#endif // TENSORFLOW_USE_SYCL

#if GOOGLE_CUDA

typedef Eigen::GpuDevice GPUDevice;

#define REGISTER_EMPTY(type)                                  \
  REGISTER_KERNEL_BUILDER(Name("_ParallelConcatStart")        \
                              .Device(DEVICE_GPU)             \
                              .TypeConstraint<type>("dtype"), \
                          ParallelConcatStart<GPUDevice, type>);
TF_CALL_GPU_NUMBER_TYPES(REGISTER_EMPTY)
#undef REGISTER_EMPTY

#define REGISTER_PARALLEL_CONCAT(type)                                     \
  REGISTER_KERNEL_BUILDER(                                                 \
      Name("ParallelConcat").Device(DEVICE_GPU).TypeConstraint<type>("T"), \
      FailureKernel);
TF_CALL_GPU_NUMBER_TYPES(REGISTER_PARALLEL_CONCAT);
#undef REGISTER_PARALLEL_CONCAT

#define REGISTER(type)                                    \
  REGISTER_KERNEL_BUILDER(Name("_ParallelConcatUpdate")   \
                              .Device(DEVICE_GPU)         \
                              .TypeConstraint<type>("T"), \
                          ParallelConcatUpdate<GPUDevice>);
TF_CALL_GPU_NUMBER_TYPES(REGISTER)
#undef REGISTER

// Register versions that operate on int32 data on the CPU even though the op
// has been placed on the GPU

REGISTER_KERNEL_BUILDER(Name("_ParallelConcatUpdate")
                            .Device(DEVICE_GPU)
                            .HostMemory("value")
                            .HostMemory("update")
                            .HostMemory("output")
                            .TypeConstraint<int32>("T"),
                        ParallelConcatUpdate<CPUDevice>);
#endif

}  // end namespace
}  // end namespace tensorflow


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mycompany.access_webs;

/**
 *
 * @author joseph
 */

import Inventory.Location;
import java.util.List;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

@Path("/Location")
public class LocationResource {

     LocationService Location_Service = new LocationService();

    // CRUD -- CREATE operation
    @POST
    @Produces(MediaType.APPLICATION_JSON)
    @Consumes(MediaType.APPLICATION_JSON)
    public Location createAddress(Location Loc) {
        Location LocationResponse = Location_Service.CreateLocation(Loc);
        return LocationResponse;
    }

    // CRUD -- READ operation
    @GET
    @Produces(MediaType.APPLICATION_JSON)
    public List<Location> getAllLocations() {
        List<Location> LocationList = Location_Service.getAllLocations();
        return LocationList;
    }

     // CRUD -- READ operation
    @GET
    @Path("/{id}")
    @Produces(MediaType.APPLICATION_JSON)
    public Location getLocationForId(@PathParam("id") String id) {
        Location Loc = Location_Service.getLocationForId(id);

        return Loc;
    }

     // CRUD -- UPDATE operation
    @PUT
    @Produces(MediaType.APPLICATION_JSON)
    @Consumes(MediaType.APPLICATION_JSON)
    public Location updateLocation(Location Loc) {
        Location LocationResponse = Location_Service.updateLocation(Loc);
        return LocationResponse;
    }

    // CRUD -- DELETE operation
    @DELETE
    @Path("/{id}")
    @Produces(MediaType.APPLICATION_JSON)
    public Location deleteLocation(@PathParam("id") String id) {
        Location LocationResponse = Location_Service.deleteLocation(id);
        return LocationResponse;
    }

}


text:
NS_ASSUME_NONNULL_BEGIN

@interface Device : NSManagedObject

// Insert code here to declare functionality of your managed object subclass

@end

NS_ASSUME_NONNULL_END

#import "Device+CoreDataProperties.h"


text:
developing-with-drush
=====================

Developing with Drush


text:
<?php

namespace Coyote\Services\FormBuilder\Fields;

class Tel extends Text
{
    //
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>D-Index</title>
<meta name="date" content="2017-05-08">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Package

Class

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes

A B C D E F G I K L M N P R S T U V W

D

DEFAULT_PORT - Static variable in class Config

A B C D E F G I K L M N P R S T U V W

Skip navigation links

Package

Class

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes