text:
#pragma once
#ifndef EL_PSEUDOSPECTRA_IRL_HPP
#define EL_PSEUDOSPECTRA_IRL_HPP

#include "./Lanczos.hpp"

namespace El {
namespace pspec {

template<typename Real>
inline void
ComputeNewEstimates
( const vector<Matrix<Real>>& HDiagList,
  const vector<Matrix<Real>>& HSubdiagList,
  const Matrix<Int>& activeConverged,
  Matrix<Real>& activeEsts )
{
    DEBUG_ONLY(CallStackEntry cse("pspec::ComputeNewEstimates"))
    const Real normCap = NormCap<Real>();
    const Int numShifts = activeEsts.Height();
    if( numShifts == 0 )
        return;
    const Int basisSize = HDiagList[0].size();
    Matrix<Real> HDiag, HSubdiag, w(basisSize);
    for( Int j=0; j<numShifts; ++j )
    {
        HDiag = HDiagList[j];
        HSubdiag = HSubdiagList[j];
        if( !activeConverged.Get(j,0) )
        {
            if( !HasNan(HDiag) && !HasNan(HSubdiag) )
            {
                lapack::SymmetricTridiagEig
                ( basisSize, HDiag.Buffer(), HSubdiag.Buffer(), w.data(),
                  basisSize-1, basisSize-1 );
                const Real est = Sqrt(w[0]);
                activeEsts.Set( j, 0, Min(est,normCap) );
            }
            else
               activeEsts.Set( j, 0, normCap );
        }
    }
}

template<typename Real>
inline void
ComputeNewEstimates
( const vector<Matrix<Real>>& HDiagList,
  const vector<Matrix<Real>>& HSubdiagList,
  const DistMatrix<Int,MR,STAR>& activeConverged,
        DistMatrix<Real,MR,STAR>& activeEsts )
{
    DEBUG_ONLY(CallStackEntry cse("pspec::ComputeNewEstimates"))
    ComputeNewEstimates
    ( HDiagList, HSubdiagList, activeConverged.LockedMatrix(),
      activeEsts.Matrix() );
}

template<typename Real>
inline void
Restart
( const vector<Matrix<Real>>& HDiagList,
  const vector<Matrix<Real>>& HSubdiagList,
  const Matrix<Int>& activeConverged,
  vector<Matrix<Complex<Real>>>& VList )
{
    DEBUG_ONLY(CallStackEntry cse("pspec::Restart"))
    const Int n = VList[0].Height();
    const Int numShifts = VList[0].Width();
    if( numShifts == 0 )
        return;
    const Int basisSize = HDiagList[0].size();
    Matrix<Real> HDiag, HSubdiag, w(basisSize);
    Matrix<Real> q(basisSize,1);
    Matrix<Complex<Real>> u(n,1);
    for( Int j=0; j<numShifts; ++j )
    {
        HDiag = HDiagList[j];
        HSubdiag = HSubdiagList[j];

        if( !activeConverged.Get(j,0) )
        {
            if( !HasNan(HDiag) && !HasNan(HSubdiag) )
            {
                lapack::SymmetricTridiagEig
                ( basisSize, HDiag.Buffer(), HSubdiag.Buffer(), w.data(),
                  q.Buffer(), basisSize, basisSize-1, basisSize-1 );

                Zeros( u, n, 1 );
                for( Int k=0; k<basisSize; ++k )
                {
                    const Matrix<Complex<Real>>& V = VList[k];
                    auto v = V( IR(0,n), IR(j,j+1) );
                    Axpy( q.Get(k,0), v, u );
                }
                Matrix<Complex<Real>>& V = VList[0];
                auto v = V( IR(0,n), IR(j,j+1) );
                v = u;
            }
        }
    }
}

template<typename Real>
inline void
Restart
( const vector<Matrix<Real>>& HDiagList,
  const vector<Matrix<Real>>& HSubdiagList,
  const DistMatrix<Int,MR,STAR>& activeConverged,
  vector<DistMatrix<Complex<Real>>>& VList )
{
    DEBUG_ONLY(CallStackEntry cse("pspec::Restart"))
    const Int basisSize = HDiagList[0].size();
    vector<Matrix<Complex<Real>>> VLocList(basisSize+1);
    for( Int j=0; j<basisSize+1; ++j )
        VLocList[j] = View( VList[j].Matrix() );
    Restart
    ( HDiagList, HSubdiagList, activeConverged.LockedMatrix(), VLocList );
}

template<typename Real>
inline Matrix<Int>
IRL
( const Matrix<Complex<Real>>& U, const Matrix<Complex<Real>>& shifts,
  Matrix<Real>& invNorms, PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )
{
    DEBUG_ONLY(CallStackEntry cse("pspec::IRL"))
    using namespace pspec;
    typedef Complex<Real> C;
    const Int n = U.Height();
    const Int numShifts = shifts.Height();

    const Int maxIts = psCtrl.maxIts;
    const Int basisSize = psCtrl.basisSize;
    const bool reorthog = psCtrl.reorthog;
    const bool deflate = psCtrl.deflate;
    const bool progress = psCtrl.progress;

    // Keep track of the number of iterations per shift
    Matrix<Int> itCounts;
    Ones( itCounts, numShifts, 1 );

    // Keep track of the pivoting history if deflation is requested
    Matrix<Int> preimage;
    Matrix<C> pivShifts( shifts );
    if( deflate )
    {
        preimage.Resize( numShifts, 1 );
        for( Int j=0; j<numShifts; ++j )
            preimage.Set( j, 0, j );
    }

    // MultiShiftTrsm currently requires write access
    Matrix<C> UCopy( U );

    // The Hessenberg algorithm currently needs explicit access to the adjoint
    Matrix<C> UAdj;
    if( !psCtrl.schur )
        Adjoint( U, UAdj );

    // Simultaneously run IRL for different shifts
    vector<Matrix<C>> VList(basisSize+1), activeVList(basisSize+1);
    for( Int j=0; j<basisSize+1; ++j )
        Zeros( VList[j], n, numShifts );
    Gaussian( VList[0], n, numShifts );
    vector<Matrix<Real>> HDiagList(numShifts), HSubdiagList(numShifts);
    Matrix<Real> realComponents;
    Matrix<Complex<Real>> components;

    Matrix<Int> activeConverged;
    Zeros( activeConverged, numShifts, 1 );

    psCtrl.snapCtrl.ResetCounts();

    Timer timer, subtimer;
    Int numIts=0, numDone=0;
    Matrix<Real> estimates(numShifts,1);
    Zeros( estimates, numShifts, 1 );
    Matrix<Real> lastActiveEsts;
    Matrix<Int> activePreimage;
    while( true )
    {
        const Int numActive = ( deflate ? numShifts-numDone : numShifts );
        auto activeShifts = pivShifts( IR(0,numActive), IR(0,1) );
        auto activeEsts = estimates( IR(0,numActive), IR(0,1) );
        auto activeItCounts = itCounts( IR(0,numActive), IR(0,1) );
        for( Int j=0; j<basisSize+1; ++j )
            View( activeVList[j], VList[j], IR(0,n), IR(0,numActive) );
        if( deflate )
        {
            View( activePreimage, preimage, IR(0,numActive), IR(0,1) );
            Zeros( activeConverged, numActive, 1 );
        }

        // Reset the Rayleigh quotients
        for( Int j=0; j<numActive; ++j )
        {
            HDiagList[j].Resize( 0, 1, basisSize );
            HSubdiagList[j].Resize( 0, 1, basisSize );
        }

        if( progress )
            timer.Start();
        Matrix<Real> colNorms;
        ColumnNorms( activeVList[0], colNorms );
        InvBetaScale( colNorms, activeVList[0] );
        for( Int j=0; j<basisSize; ++j )
        {
            lastActiveEsts = activeEsts;
            activeVList[j+1] = activeVList[j];
            if( psCtrl.schur )
            {
                if( progress )
                    subtimer.Start();
                MultiShiftTrsm
                ( LEFT, UPPER, NORMAL,
                  C(1), UCopy, activeShifts, activeVList[j+1] );
                MultiShiftTrsm
                ( LEFT, UPPER, ADJOINT,
                  C(1), UCopy, activeShifts, activeVList[j+1] );
                if( progress )
                {
                    const double msTime = subtimer.Stop();
                    const Int numActiveShifts = activeShifts.Height();
                    const double gflops =
                        (8.*n*n*numActiveShifts)/(msTime*1.e9);
                    cout << "  MultiShiftTrsm's: " << msTime
                         << " seconds, " << gflops << " GFlops" << endl;
                }
            }
            else
            {
                if( progress )
                    subtimer.Start();
                MultiShiftHessSolve
                ( UPPER, NORMAL,
                  C(1), U, activeShifts, activeVList[j+1] );
                Matrix<C> activeShiftsConj;
                Conjugate( activeShifts, activeShiftsConj );
                MultiShiftHessSolve
                ( LOWER, NORMAL,
                  C(1), UAdj, activeShiftsConj, activeVList[j+1] );
                if( progress )
                {
                    const double msTime = subtimer.Stop();
                    const Int numActiveShifts = activeShifts.Height();
                    const double gflops =
                        (32.*n*n*numActiveShifts)/(msTime*1.e9);
                    cout << "  MultiShiftHessSolve's: " << msTime
                         << " seconds, " << gflops << " GFlops" << endl;
                }
            }

            // Orthogonalize with respect to the old iterate
            if( j > 0 )
            {
                ExtractList( HSubdiagList, realComponents, j-1 );
                ColumnSubtractions
                ( realComponents, activeVList[j-1], activeVList[j+1] );
            }

            // Orthogonalize with respect to the last iterate
            InnerProducts( activeVList[j], activeVList[j+1], realComponents );
            PushBackList( HDiagList, realComponents );
            ColumnSubtractions
            ( realComponents, activeVList[j], activeVList[j+1] );

            if( reorthog )
            {
                // Explicitly (re)orthogonalize against all previous vectors
                for( Int i=0; i<j; ++i )
                {
                    InnerProducts
                    ( activeVList[i], activeVList[j+1], components );
                    ColumnSubtractions
                    ( components, activeVList[i], activeVList[j+1] );
                }
            }

            // Compute the norm of what is left
            ColumnNorms( activeVList[j+1], realComponents );
            PushBackList( HSubdiagList, realComponents );

            // TODO: Handle lucky breakdowns
            InvBetaScale( realComponents, activeVList[j+1] );

            ComputeNewEstimates
            ( HDiagList, HSubdiagList, activeConverged, activeEsts );
            // We will have the same estimate two iterations in a row when
            // restarting
            if( j != 0 )
                activeConverged =
                    FindConverged
                    ( lastActiveEsts, activeEsts, activeItCounts, psCtrl.tol );

            psCtrl.snapCtrl.Iterate();
        }
        if( progress )
            subtimer.Start();
        Restart
        ( HDiagList, HSubdiagList, activeVList, activeConverged, activeEsts );
        if( progress )
            cout << "IRL restart: " << subtimer.Stop()
                 << " seconds" << endl;

        const Int numActiveDone = ZeroNorm( activeConverged );
        if( deflate )
            numDone += numActiveDone;
        else
            numDone = numActiveDone;
        numIts += basisSize;
        if( progress )
        {
            const double iterTime = timer.Stop();
            cout << "iteration " << numIts << ": " << iterTime
                 << " seconds, " << numDone << " of " << numShifts
                 << " converged" << endl;
        }
        if( numIts >= maxIts )
            break;

        if( numDone == numShifts )
            break;
        else if( deflate && numActiveDone != 0 )
        {
            Deflate
            ( activeShifts, activePreimage, activeVList[0], activeEsts,
              activeConverged, activeItCounts, progress );
            lastActiveEsts = activeEsts;
        }

        // Save snapshots of the estimates at the requested rate
        Snapshot
        ( preimage, estimates, itCounts, numIts, deflate, psCtrl.snapCtrl );
    }

    invNorms = estimates;
    if( deflate )
        RestoreOrdering( preimage, invNorms, itCounts );
    FinalSnapshot( invNorms, itCounts, psCtrl.snapCtrl );

    return itCounts;
}

template<typename Real>
inline DistMatrix<Int,VR,STAR>
IRL
( const AbstractDistMatrix<Complex<Real>>& UPre,
  const AbstractDistMatrix<Complex<Real>>& shiftsPre,
        AbstractDistMatrix<Real>& invNormsPre,
  PseudospecCtrl<Real> psCtrl=PseudospecCtrl<Real>() )
{
    DEBUG_ONLY(CallStackEntry cse("pspec::IRL"))
    using namespace pspec;
    typedef Complex<Real> C;

    auto UPtr = ReadProxy<C,MC,MR>( &UPre );
    auto& U = *UPtr;

    auto shiftsPtr = ReadProxy<C,VR,STAR>( &shiftsPre );
    auto& shifts = *shiftsPtr;

    auto invNormsPtr = WriteProxy<Real,VR,STAR>( &invNormsPre );
    auto& invNorms = *invNormsPtr;

    const Int n = U.Height();
    const Int numShifts = shifts.Height();
    const Grid& g = U.Grid();

    const Int maxIts = psCtrl.maxIts;
    const Int basisSize = psCtrl.basisSize;
    const bool reorthog = psCtrl.reorthog;
    const bool deflate = psCtrl.deflate;
    const bool progress = psCtrl.progress;

    // Keep track of the number of iterations per shift
    DistMatrix<Int,VR,STAR> itCounts(g);
    Ones( itCounts, numShifts, 1 );

    // Keep track of the pivoting history if deflation is requested
    DistMatrix<Int,VR,STAR> preimage(g);
    DistMatrix<C,  VR,STAR> pivShifts( shifts );
    if( deflate )
    {
        preimage.AlignWith( shifts );
        preimage.Resize( numShifts, 1 );
        const Int numLocShifts = preimage.LocalHeight();
        for( Int iLoc=0; iLoc<numLocShifts; ++iLoc )
        {
            const Int i = preimage.GlobalRow(iLoc);
            preimage.SetLocal( iLoc, 0, i );
        }
    }

    // The Hessenberg algorithm currently requires explicit adjoint access
    DistMatrix<C,VC,STAR> U_VC_STAR(g), UAdj_VC_STAR(g);
    if( !psCtrl.schur )
    {
        U_VC_STAR = U;
        Adjoint( U, UAdj_VC_STAR );
    }

    // Simultaneously run IRL for different shifts
    vector<DistMatrix<C>> VList(basisSize+1), activeVList(basisSize+1);
    for( Int j=0; j<basisSize+1; ++j )
    {
        VList[j].SetGrid( g );
        Zeros( VList[j], n, numShifts );
    }
    Gaussian( VList[0], n, numShifts );
    const Int numMRShifts = VList[0].LocalWidth();
    vector<Matrix<Real>> HDiagList(numMRShifts),
                         HSubdiagList(numMRShifts);
    Matrix<Real> realComponents;
    Matrix<Complex<Real>> components;

    DistMatrix<Int,MR,STAR> activeConverged(g);
    Zeros( activeConverged, numShifts, 1 );

    psCtrl.snapCtrl.ResetCounts();

    Timer timer, subtimer;
    Int numIts=0, numDone=0;
    DistMatrix<Real,MR,STAR> estimates(g), lastActiveEsts(g);
    estimates.AlignWith( shifts );
    Zeros( estimates, numShifts, 1 );
    DistMatrix<Int,VR,STAR> activePreimage(g);
    while( true )
    {
        const Int numActive = ( deflate ? numShifts-numDone : numShifts );
        auto activeShifts = pivShifts( IR(0,numActive), IR(0,1) );
        auto activeEsts = estimates( IR(0,numActive), IR(0,1) );
        auto activeItCounts = itCounts( IR(0,numActive), IR(0,1) );
        for( Int j=0; j<basisSize+1; ++j )
            View( activeVList[j], VList[j], IR(0,n), IR(0,numActive) );
        if( deflate )
        {
            View( activePreimage, preimage, IR(0,numActive), IR(0,1) );
            Zeros( activeConverged, numActive, 1 );
        }

        // Reset the Rayleigh quotients
        const Int numActiveMR = estimates.LocalHeight();
        for( Int jLoc=0; jLoc<numActiveMR; ++jLoc )
        {
            HDiagList[jLoc].Resize( 0, 1, basisSize );
            HSubdiagList[jLoc].Resize( 0, 1, basisSize );
        }

        if( progress )
        {
            mpi::Barrier( g.Comm() );
            if( g.Rank() == 0 )
                timer.Start();
        }
        DistMatrix<Real,MR,STAR> colNorms(g);
        ColumnNorms( activeVList[0], colNorms );
        InvBetaScale( colNorms, activeVList[0] );
        for( Int j=0; j<basisSize; ++j )
        {
            lastActiveEsts = activeEsts;
            activeVList[j+1] = activeVList[j];
            if( psCtrl.schur )
            {
                if( progress )
                {
                    mpi::Barrier( g.Comm() );
                    if( g.Rank() == 0 )
                        subtimer.Start();
                }
                MultiShiftTrsm
                ( LEFT, UPPER, NORMAL,
                  C(1), U, activeShifts, activeVList[j+1] );
                MultiShiftTrsm
                ( LEFT, UPPER, ADJOINT,
                  C(1), U, activeShifts, activeVList[j+1] );
                if( progress )
                {
                    mpi::Barrier( g.Comm() );
                    if( g.Rank() == 0 )
                    {
                        const double msTime = subtimer.Stop();
                        const Int numActiveShifts = activeShifts.Height();
                        const double gflops =
                            (8.*n*n*numActiveShifts)/(msTime*1.e9);
                        cout << "  MultiShiftTrsm's: " << msTime
                             << " seconds, " << gflops << " GFlops" << endl;
                    }
                }
            }
            else
            {
                if( progress )
                {
                    mpi::Barrier( g.Comm() );
                    if( g.Rank() == 0 )
                        subtimer.Start();
                }
                // NOTE: This redistribution sequence might not be necessary
                DistMatrix<C,STAR,VR> activeV_STAR_VR( activeVList[j+1] );
                MultiShiftHessSolve
                ( UPPER, NORMAL, C(1), U_VC_STAR, activeShifts,
                  activeV_STAR_VR );
                DistMatrix<C,VR,STAR> activeShiftsConj(g);
                Conjugate( activeShifts, activeShiftsConj );
                MultiShiftHessSolve
                ( LOWER, NORMAL, C(1), UAdj_VC_STAR, activeShiftsConj,
                  activeV_STAR_VR );
                activeVList[j+1] = activeV_STAR_VR;
                if( progress )
                {
                    mpi::Barrier( g.Comm() );
                    if( g.Rank() == 0 )
                    {
                        const double msTime = subtimer.Stop();
                        const Int numActiveShifts = activeShifts.Height();
                        const double gflops =
                            (32.*n*n*numActiveShifts)/(msTime*1.e9);
                        cout << "  MultiShiftHessSolve's: " << msTime
                             << " seconds, " << gflops << " GFlops" << endl;
                    }
                }
            }

            // Orthogonalize with respect to the old iterate
            if( j > 0 )
            {
                ExtractList( HSubdiagList, realComponents, j-1 );
                ColumnSubtractions
                ( realComponents, activeVList[j-1], activeVList[j+1] );
            }

            // Orthogonalize with respect to the last iterate
            InnerProducts( activeVList[j], activeVList[j+1], realComponents );
            PushBackList( HDiagList, realComponents );
            ColumnSubtractions
            ( realComponents, activeVList[j], activeVList[j+1] );

            if( reorthog )
            {
                // Explicitly (re)orthogonalize against all previous vectors
                for( Int i=0; i<j; ++i )
                {
                    InnerProducts
                    ( activeVList[i], activeVList[j+1], components );
                    ColumnSubtractions
                    ( components, activeVList[i], activeVList[j+1] );
                }
            }

            // Compute the norm of what is left
            ColumnNorms( activeVList[j+1], realComponents );
            PushBackList( HSubdiagList, realComponents );

            // TODO: Handle lucky breakdowns
            InvBetaScale( realComponents, activeVList[j+1] );

            ComputeNewEstimates
            ( HDiagList, HSubdiagList, activeConverged, activeEsts );
            // We will have the same estimate two iterations in a row when
            // restarting
            if( j != 0 )
                activeConverged =
                    FindConverged
                    ( lastActiveEsts, activeEsts, activeItCounts, psCtrl.tol );

            psCtrl.snapCtrl.Iterate();
        }
        if( progress )
        {
            mpi::Barrier( g.Comm() );
            if( g.Rank() == 0 )
                subtimer.Start();
        }
        Restart( HDiagList, HSubdiagList, activeConverged, activeVList );
        if( progress )
        {
            mpi::Barrier( g.Comm() );
            if( g.Rank() == 0 )
                cout << "IRL computations: " << subtimer.Stop()
                     << " seconds" << endl;
        }

        const Int numActiveDone = ZeroNorm( activeConverged );
        if( deflate )
            numDone += numActiveDone;
        else
            numDone = numActiveDone;
        numIts += basisSize;
        if( progress )
        {
            mpi::Barrier( g.Comm() );
            if( g.Rank() == 0 )
            {
                const double iterTime = timer.Stop();
                cout << "iteration " << numIts << ": " << iterTime
                     << " seconds, " << numDone << " of " << numShifts
                     << " converged" << endl;
            }
        }
        if( numIts >= maxIts )
            break;

        if( numDone == numShifts )
            break;
        else if( deflate && numActiveDone != 0 )
        {
            Deflate
            ( activeShifts, activePreimage, activeVList[0], activeEsts,
              activeConverged, activeItCounts, progress );
            lastActiveEsts = activeEsts;
        }

        // Save snapshots of the estimates at the requested rate
        Snapshot
        ( preimage, estimates, itCounts, numIts, deflate, psCtrl.snapCtrl );
    }

    invNorms = estimates;
    if( deflate )
        RestoreOrdering( preimage, invNorms, itCounts );
    FinalSnapshot( invNorms, itCounts, psCtrl.snapCtrl );

    return itCounts;
}

} // namespace pspec
} // namespace El

#endif // ifndef EL_PSEUDOSPECTRA_IRL_HPP


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.kusto.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.kusto.fluent.models.DatabasePrincipalAssignmentInner;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The list Kusto database principal assignments operation response. */
@Fluent
public final class DatabasePrincipalAssignmentListResult {
    /*
     * The list of Kusto database principal assignments.
     */
    @JsonProperty(value = "value")
    private List<DatabasePrincipalAssignmentInner> value;

    /**
     * Get the value property: The list of Kusto database principal assignments.
     *
     * @return the value value.
     */
    public List<DatabasePrincipalAssignmentInner> value() {
        return this.value;
    }

    /**
     * Set the value property: The list of Kusto database principal assignments.
     *
     * @param value the value value to set.
     * @return the DatabasePrincipalAssignmentListResult object itself.
     */
    public DatabasePrincipalAssignmentListResult withValue(List<DatabasePrincipalAssignmentInner> value) {
        this.value = value;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (value() != null) {
            value().forEach(e -> e.validate());
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
package org.onosproject.protocol.restconf.server.utils.exceptions;

/**
 * Represents class of errors related to YDT parse utils.
 */
public class YdtParseException extends RuntimeException {
    /**
     * Constructs an exception with the specified message.
     *
     * @param message the message describing the specific nature of the error
     */
    public YdtParseException(String message) {
        super(message);
    }

    /**
     * Constructs an exception with the specified message and the underlying
     * cause.
     *
     * @param message the message describing the specific nature of the error
     * @param cause   the underlying cause of this error
     */
    public YdtParseException(String message, Throwable cause) {
        super(message, cause);
    }
}


text:
#ifndef _PROC_SERVICE_2_H
#define _PROC_SERVICE_2_H

/*
 * Types, function definitions for the provider of services beyond
 * proc_service.  This interface will be used by import modules like
 * BAT/prex, NEO debugger etc.
 */

/*
 CCR info

 Version history:

        1.0       - Initial CCR release

        1.1       - Changes for GLUE/neo.
                    New entry points ps_svnt_generic() and ps_svc_generic()
                  - New entry point ps_getpid()

 Release information for automatic CCR updates:
 BEGIN RELEASE NOTES: (signifies what gets put into CCR release notes)
        1.2       - Changes to support Solaris 2.7

 END RELEASE NOTES: (signifies what gets put into CCR release notes)

 Following is used for CCR version number:

#define CCR_PROC_SERVICE_2_VERSION 1.2

*/

#include <proc_service.h>
#include <sys/types.h>

#ifdef __cplusplus
extern "C" {
#endif

struct ps_loadobj {
        int     objfd;          /* fd of the load object or executable
                                 * -1 implies its not available.
                                 * This file decriptor is live only during the
                                 * particular call to ps_iter_f().  If you
                                 * need it beyond that you need to dup() it.
                                 */
        psaddr_t
                text_base;      /* address where text of loadobj was mapped */
        psaddr_t
                data_base;      /* address where data of loadobj was mapped */
        const char *objname;    /* loadobj name */
};

typedef int ps_iter_f(const struct ps_prochandle *, const struct ps_loadobj *,
                        void *cd);

/*
 * Returns the ps_prochandle for the current process under focus.  Returns
 * NULL if there is none.
 */

const struct ps_prochandle *
ps_get_prochandle(void);

/*
 * Returns the ps_prochandle for the current process(allows core files to
 * be specified) under focus.  Returns NULL if there is none.
 */
const struct ps_prochandle *
ps_get_prochandle2(int cores_too);

/*
 * Returns the pid of the process referred to by the ps_prochandle.
 *
 * 0 is returned in case the ps_prochandle is not valid or refers to dead
 * process.
 *
 */
pid_t
ps_getpid(const struct ps_prochandle *);

/*
 * Iteration function that iterates over all load objects *and the
 *      executable*
 *
 *      If the callback routine returns:
 *      0 - continue processing link objects
 *      non zero - stop calling the callback function
 *
 */

ps_err_e
ps_loadobj_iter(const struct ps_prochandle *, ps_iter_f *, void *clnt_data);

/*
 * Address => function name mapping
 *
 * Given an address, returns a pointer to the function's
 * linker name (null terminated).
 */

ps_err_e
ps_find_fun_name(const struct ps_prochandle *, psaddr_t addr,
                        const char **name);

/*
 * Interface to LD_PRELOAD.  LD_PRELOAD given library across the
 * program 'exec'.
 *
 */

/*
 * Append/Prepend the 'lib' (has to be library name as understood by LD_PRELOAD)
 * to the LD_PRELOAD variable setting to be used by the debugee
 * Returns a cookie (in id).
 */
ps_err_e
ps_ld_preload_append(const char *lib, int *id);
ps_err_e
ps_ld_preload_prepend(const char *lib, int *id);

/*
 * Remove the library associated with 'id' from the LD_PRELOAD setting.
 *
 */
ps_err_e
ps_ld_preload_remove(int id);

#ifdef __cplusplus
}
#endif

/*
 * The following are C++ only interfaces
 */
#ifdef __cplusplus

/*
 * classes ServiceDbx and ServantDbx and defined in "gp_dbx_svc.h" which is
 * accessed via CCR
 */
extern class ServantDbx *ps_svnt_generic();
extern class ServiceDbx *ps_svc_generic();

#endif

#endif /* _PROC_SERVICE_2_H */


text:
__author__ = 'dkov'

# class StreamDict(Object):
#     def __init__(self, dictionary):
#         self._data = self.__validate(dictionary)
#
#     def __validate(self, dictionary):
#         self.__contains(dictionary, 'Length', Numeric)
#         return True
#
#     def __contains(self, dictionary, key):
#         if key not in dictionary:
#             raise Exception("OMG!")


text:
namespace Gu.Wpf.UiAutomation.UiTests.Elements
{
    using System;
    using System.Globalization;
    using NUnit.Framework;

    public class DatePickerTests
    {
        private const string ExeFileName = "WpfApplication.exe";

        [Test]
        public void Find()
        {
            using var app = Application.Launch(ExeFileName, "DatePickerWindow");
            var window = app.MainWindow;
            var datePicker = window.FindDatePicker();
            Assert.IsInstanceOf<DatePicker>(datePicker);
            Assert.IsInstanceOf<DatePicker>(UiElement.FromAutomationElement(datePicker.AutomationElement));
        }

        [Test]
        public void Value()
        {
            using var app = Application.Launch(ExeFileName, "DatePickerWindow");
            var window = app.MainWindow;
            var datePicker = window.FindDatePicker();
            Assert.AreEqual(string.Empty, datePicker.Value);
            datePicker.Value = "2017-12-31";
            Assert.AreEqual(DateTime.Parse("2017-12-31 00:00:00", CultureInfo.CurrentCulture), DateTime.Parse(datePicker.Value, CultureInfo.CurrentCulture));
        }
    }
}


text:
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.openapi.editor;

import com.intellij.openapi.Disposable;
import com.intellij.util.containers.ContainerUtil;
import org.intellij.lang.annotations.MagicConstant;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.awt.*;
import java.util.EventListener;
import java.util.List;

/**
 * Provides an ability to introduce custom visual elements into editor's representation.
 * Such elements are not reflected in document contents. Elements are 'anchored' to a certain document offset at creation,
 * this offset behaves similar to a zero-range {@link RangeMarker} with respect to document changes.
 *

 * @see Editor#getInlayModel()
 */
public interface InlayModel {
  /**
   * Same as {@link #addInlineElement(int, boolean, EditorCustomElementRenderer)}, making created element associated with following text.
   */
  @Nullable
  default <T extends EditorCustomElementRenderer> Inlay<T> addInlineElement(int offset, @NotNull T renderer) {
    return addInlineElement(offset, false, renderer);
  }

  /**
   * Introduces an inline visual element at a given offset, its width and appearance is defined by the provided renderer.
   *
   * @param relatesToPrecedingText whether element is associated with preceding or following text
   *                               (see {@link Inlay#isRelatedToPrecedingText()})
   * @return {@code null} if requested element cannot be created, e.g. if corresponding functionality
   *         is not supported by current editor instance.
   */
  @Nullable
  <T extends EditorCustomElementRenderer> Inlay<T> addInlineElement(int offset, boolean relatesToPrecedingText, @NotNull T renderer);

  /**
   * Introduces an inline visual element at a given offset, its width and appearance is defined by the provided renderer.
   *
   * @param relatesToPrecedingText whether element is associated with preceding or following text
   *                               (see {@link Inlay#isRelatedToPrecedingText()})
   * @param priority if multiple elements are requested to be displayed for the same position, this parameter defines the relative
   *    *                 positioning of such elements (larger priority value means the element will be rendered closer to the left)
   * @return {@code null} if requested element cannot be created, e.g. if corresponding functionality
   *         is not supported by current editor instance.
   */
  @Nullable
  <T extends EditorCustomElementRenderer> Inlay<T> addInlineElement(int offset, boolean relatesToPrecedingText, int priority, @NotNull T renderer);

  /**
   * Introduces a 'block' visual element at a given offset, its size and appearance is defined by the provided renderer. This element
   * will be displayed between lines of text.
   *
   * @param relatesToPrecedingText whether element is associated with preceding or following text
   *                               (see {@link Inlay#isRelatedToPrecedingText()})
   * @param showAbove whether element will be displayed above or below corresponding visual line
   * @param priority if multiple elements are requested to be displayed for the same visual line, this parameter defines the relative
   *                 positioning of such elements (larger priority value means the element will be rendered closer to the text)
   * @return {@code null} if requested element cannot be created, e.g. if corresponding functionality
   *         is not supported by current editor instance.
   *
   * @see BlockInlayPriority
   */
  @Nullable
  <T extends EditorCustomElementRenderer> Inlay<T> addBlockElement(int offset,
                                                                boolean relatesToPrecedingText,
                                                                boolean showAbove,
                                                                int priority,
                                                                @NotNull T renderer);

  /**
   * Introduces a visual element, which will be displayed after the end of corresponding logical line.
   *
   * @param relatesToPrecedingText whether element is associated with preceding or following text
   *                               (see {@link Inlay#isRelatedToPrecedingText()})
   * @return {@code null} if requested element cannot be created, e.g. if corresponding functionality
   *         is not supported by current editor instance.
   */
  @Nullable
  <T extends EditorCustomElementRenderer> Inlay<T> addAfterLineEndElement(int offset, boolean relatesToPrecedingText, @NotNull T renderer);

  /**
   * Returns a list of inline elements for a given offset range (both limits are inclusive). Returned list is sorted by offset.
   * Both visible and invisible (due to folding) elements are returned.
   */
  @NotNull
  List<Inlay<?>> getInlineElementsInRange(int startOffset, int endOffset);

  /**
   * Same as {@link #getInlineElementsInRange(int, int)}, but returned list contains only inlays with renderer of given type.
   */
  default <T> List<Inlay<? extends T>> getInlineElementsInRange(int startOffset, int endOffset, @NotNull Class<T> type) {
    //noinspection unchecked
    return (List)ContainerUtil.filter(getInlineElementsInRange(startOffset, endOffset), inlay -> type.isInstance(inlay.getRenderer()));
  }

  /**
   * Returns a list of block elements for a given offset range (both limits are inclusive) in priority order
   * (higher priority ones appear first). Both visible and invisible (due to folding) elements are returned.
   */
  @NotNull
  List<Inlay<?>> getBlockElementsInRange(int startOffset, int endOffset);

  /**
   * Same as {@link #getBlockElementsInRange(int, int)}, but returned list contains only inlays with renderer of given type.
   */
  default <T> List<Inlay<? extends T>> getBlockElementsInRange(int startOffset, int endOffset, @NotNull Class<T> type) {
    //noinspection unchecked
    return (List)ContainerUtil.filter(getBlockElementsInRange(startOffset, endOffset), inlay -> type.isInstance(inlay.getRenderer()));
  }

  /**
   * Returns a list of block elements displayed for a given visual line in appearance order (top to bottom).
   * Only visible (not folded) elements are returned.
   */
  @NotNull
  List<Inlay<?>> getBlockElementsForVisualLine(int visualLine, boolean above);

  /**
   * Tells whether there exists at least one block element currently.
   */
  default boolean hasBlockElements() {
    return !getBlockElementsInRange(0, Integer.MAX_VALUE).isEmpty();
  }

  /**
   * Tells whether given range of offsets (both sides inclusive) contains at least one inline element.
   */
  default boolean hasInlineElementsInRange(int startOffset, int endOffset) {
    return !getInlineElementsInRange(startOffset, endOffset).isEmpty();
  }

  /**
   * Tells whether there exists at least one inline element currently.
   */
  default boolean hasInlineElements() {
    return hasInlineElementsInRange(0, Integer.MAX_VALUE);
  }

  /**
   * Tells whether there exists an inline visual element at a given offset.
   */
  boolean hasInlineElementAt(int offset);

  /**
   * Tells whether there exists an inline visual element at a given visual position.
   * Only visual position to the left of the element is recognized.
   */
  default boolean hasInlineElementAt(@NotNull VisualPosition visualPosition) {
    return getInlineElementAt(visualPosition) != null;
  }

  /**
   * Return a custom visual element at at a given visual position. Only visual position to the left of the element is recognized.
   */
  @Nullable
  Inlay getInlineElementAt(@NotNull VisualPosition visualPosition);

  /**
   * Return a custom visual element at given coordinates in editor's coordinate space,
   * or {@code null} if there's no element at given point.
   */
  @Nullable
  Inlay getElementAt(@NotNull Point point);

  /**
   * Return a custom visual element with renderer of given type at given coordinates in editor's coordinate space,
   * or {@code null} if there's no such element at given point.
   */
  @Nullable
  default <T> Inlay<? extends T> getElementAt(@NotNull Point point, @NotNull Class<T> type) {
    Inlay inlay = getElementAt(point);
    //noinspection unchecked
    return inlay != null && type.isInstance(inlay.getRenderer()) ? inlay : null;
  }

  /**
   * Returns a list of after-line-end elements for a given offset range (both limits are inclusive).
   * Returned list is sorted by offset. Both visible and invisible (due to folding) elements are returned.
   *
   * @see #addAfterLineEndElement(int, boolean, EditorCustomElementRenderer)
   */
  @NotNull
  List<Inlay<?>> getAfterLineEndElementsInRange(int startOffset, int endOffset);

  /**
   * Same as {@link #getAfterLineEndElementsInRange(int, int)}, but returned list contains only inlays with renderer of given type.
   */
  @NotNull
  default <T> List<Inlay<? extends T>> getAfterLineEndElementsInRange(int startOffset, int endOffset, @NotNull Class<T> type) {
    //noinspection unchecked
    return (List)ContainerUtil.filter(getAfterLineEndElementsInRange(startOffset, endOffset),
                                      inlay -> type.isInstance(inlay.getRenderer()));
  }

  /**
   * Returns after-line-end elements for a given logical line, in creation order (this is the order they are displayed in).
   * Elements are returned regardless of whether they are currently visible.
   *
   * @see #addAfterLineEndElement(int, boolean, EditorCustomElementRenderer)
   */
  @NotNull
  List<Inlay<?>> getAfterLineEndElementsForLogicalLine(int logicalLine);

  /**
   * When text is inserted at inline element's offset, resulting element's position is determined by its
   * {@link Inlay#isRelatedToPrecedingText()} property. But to enable natural editing experience around inline elements (so that typed text
   * appears at caret visual position), caret position is also taken into account at document insertion. This method allows to disable
   * accounting for caret position, and can be useful for document modifications which don't originate directly from user actions.
   */
  void setConsiderCaretPositionOnDocumentUpdates(boolean enabled);

  /**
   * Allows to perform a group of inlay operations (adding, disposing, updating) in a batch mode. For large number of operations, this
   * decreases the total time taken by the operations. Batch mode introduces an additional overhead though (roughly proportional to the file
   * size), so for a small number of operations in a big file, using it will result in the larger total execution time.  Using batch mode
   * can also change certain outcomes of the applied changes. In particular, resulting caret's visual position might be different in batch
   * mode (due to simplified update logic), if inlays are added or removed at caret offset. The number of changes which justifies using
   * batch mode can be determined empirically, but usually it's around hundred(s).
   *

   * Executed code should not perform document- or editor-related operations other than those operating on inlays. In particular, modifying
   * document, querying or updating folding, soft-wrap or caret state, as well as performing editor coordinate transformations (e.g. visual
   * to logical position conversions) might lead to incorrect results or throw an exception.
   *
   * @param batchMode whether to enable batch mode for executed inlay operations
   */
  void execute(boolean batchMode, @NotNull Runnable operation);

  /**
   * Tells whether the current code is executing as part of a batch inlay update operation.
   *
   * @see #execute(boolean, Runnable)
   */
  boolean isInBatchMode();

  /**
   * Adds a listener that will be notified after adding, updating and removal of custom visual elements.
   */
  void addListener(@NotNull Listener listener, @NotNull Disposable disposable);

  interface Listener extends EventListener {
    default void onAdded(@NotNull Inlay<?> inlay) {}

    default void onUpdated(@NotNull Inlay<?> inlay) {}

    /**
     * @param changeFlags see {@link ChangeFlags}
     */
    default void onUpdated(@NotNull Inlay<?> inlay, @MagicConstant(flagsFromClass = ChangeFlags.class) int changeFlags) {
      onUpdated(inlay);
    }

    default void onRemoved(@NotNull Inlay<?> inlay) {}

    /**
     * @see #execute(boolean, Runnable)
     */
    default void onBatchModeStart(@NotNull Editor editor) {}

    /**
     * @see #execute(boolean, Runnable)
     */
    default void onBatchModeFinish(@NotNull Editor editor) {}
  }

  /**
   * An adapter useful for the cases, when the same action is to be performed after custom visual element's adding, updating and removal.
   */
  abstract class SimpleAdapter implements Listener {
    @Override
    public void onAdded(@NotNull Inlay inlay) {
      onUpdated(inlay, ChangeFlags.WIDTH_CHANGED |
                       ChangeFlags.HEIGHT_CHANGED |
                       (inlay.getGutterIconRenderer() == null ? 0 : ChangeFlags.GUTTER_ICON_PROVIDER_CHANGED));
    }

    @Override
    public void onRemoved(@NotNull Inlay inlay) {
      onUpdated(inlay, ChangeFlags.WIDTH_CHANGED |
                       ChangeFlags.HEIGHT_CHANGED |
                       (inlay.getGutterIconRenderer() == null ? 0 : ChangeFlags.GUTTER_ICON_PROVIDER_CHANGED));
    }
  }

  /**
   * Flags provided by {@link Listener#onUpdated(Inlay, int)}.
   */
  interface ChangeFlags {
    int WIDTH_CHANGED = 0x1;
    int HEIGHT_CHANGED = 0x2;
    int GUTTER_ICON_PROVIDER_CHANGED = 0x4;
  }
}


text:
package org.elasticsearch.index.mapper;

import org.apache.lucene.document.LatLonShape;
import org.elasticsearch.common.Explicit;
import org.elasticsearch.common.geo.GeometryParser;
import org.elasticsearch.common.geo.builders.ShapeBuilder;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.geometry.Geometry;
import org.elasticsearch.index.query.VectorGeoShapeQueryProcessor;

/**
 * FieldMapper for indexing {@link LatLonShape}s.
 *

 * Currently Shapes can only be indexed and can only be queried using
 * {@link org.elasticsearch.index.query.GeoShapeQueryBuilder}, consequently
 * a lot of behavior in this Mapper is disabled.
 *

 * Format supported:
 *

 * "field" : {
 * "type" : "polygon",
 * "coordinates" : [
 * [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]
 * ]
 * }
 *

 * or:
 *

 * "field" : "POLYGON ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0))
 */
public class GeoShapeFieldMapper extends AbstractGeometryFieldMapper<Geometry, Geometry> {
    public static final String CONTENT_TYPE = "geo_shape";

    public static class Builder extends AbstractGeometryFieldMapper.Builder<AbstractGeometryFieldMapper.Builder, GeoShapeFieldMapper> {
        public Builder(String name) {
            super (name, new GeoShapeFieldType(), new GeoShapeFieldType());
        }

        @Override
        public GeoShapeFieldMapper build(BuilderContext context) {
            setupFieldType(context);
            return new GeoShapeFieldMapper(name, fieldType, defaultFieldType, ignoreMalformed(context), coerce(context),
                ignoreZValue(), context.indexSettings(), multiFieldsBuilder.build(this, context), copyTo);
        }

        @Override
        protected void setupFieldType(BuilderContext context) {
            super.setupFieldType(context);

            GeoShapeFieldType fieldType = (GeoShapeFieldType)fieldType();
            boolean orientation = fieldType.orientation == ShapeBuilder.Orientation.RIGHT;

            GeometryParser geometryParser = new GeometryParser(orientation, coerce(context).value(), ignoreZValue().value());

            fieldType.setGeometryIndexer(new GeoShapeIndexer(orientation, fieldType.name()));
            fieldType.setGeometryParser( (parser, mapper) -> geometryParser.parse(parser));
            fieldType.setGeometryQueryBuilder(new VectorGeoShapeQueryProcessor());
        }
    }

    public static final class GeoShapeFieldType extends AbstractGeometryFieldType<Geometry, Geometry> {
        public GeoShapeFieldType() {
            super();
        }

        protected GeoShapeFieldType(GeoShapeFieldType ref) {
            super(ref);
        }

        @Override
        public GeoShapeFieldType clone() {
            return new GeoShapeFieldType(this);
        }

        @Override
        public String typeName() {
            return CONTENT_TYPE;
        }
    }

    public GeoShapeFieldMapper(String simpleName, MappedFieldType fieldType, MappedFieldType defaultFieldType,
                               Explicit<Boolean> ignoreMalformed, Explicit<Boolean> coerce,
                               Explicit<Boolean> ignoreZValue, Settings indexSettings,
                               MultiFields multiFields, CopyTo copyTo) {
        super(simpleName, fieldType, defaultFieldType, ignoreMalformed, coerce, ignoreZValue, indexSettings,
            multiFields, copyTo);
    }

    @Override
    protected void doMerge(Mapper mergeWith) {
        if (mergeWith instanceof LegacyGeoShapeFieldMapper) {
            LegacyGeoShapeFieldMapper legacy = (LegacyGeoShapeFieldMapper) mergeWith;
            throw new IllegalArgumentException("[" + fieldType().name() + "] with field mapper [" + fieldType().typeName() + "] " +
                "using [BKD] strategy cannot be merged with " + "[" + legacy.fieldType().typeName() + "] with [" +
                legacy.fieldType().strategy() + "] strategy");
        }
        super.doMerge(mergeWith);
    }

    @Override
    public GeoShapeFieldType fieldType() {
        return (GeoShapeFieldType) super.fieldType();
    }

    @Override
    protected String contentType() {
        return CONTENT_TYPE;
    }
}


text:
package com.example.hg4.jiangnankezhan;

import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Matrix;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;

import com.avos.avoscloud.AVCloudQueryResult;
import com.avos.avoscloud.AVException;
import com.avos.avoscloud.AVObject;
import com.avos.avoscloud.AVQuery;
import com.avos.avoscloud.AVUser;
import com.avos.avoscloud.CloudQueryCallback;
import com.avos.avoscloud.FindCallback;
import com.avos.avoscloud.GetCallback;
import com.avos.avoscloud.SaveCallback;
import com.example.hg4.jiangnankezhan.Model.Course;
import com.example.hg4.jiangnankezhan.Utils.Constants;
import com.example.hg4.jiangnankezhan.Utils.DaoUtil;
import com.example.hg4.jiangnankezhan.Utils.HttpUtils;
import com.example.hg4.jiangnankezhan.Utils.JsoupUtils;
import com.example.hg4.jiangnankezhan.Utils.PerferencesUtils;

import org.litepal.crud.DataSupport;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.Response;

import static com.example.hg4.jiangnankezhan.R.id.code;

public class EduLoginActivity extends BaseActivity implements View.OnClickListener{
	private EditText username;
	private EditText password;
	private EditText codeInput;
	private ImageView verficationCode;
	private Button refreshCode;
	private Button login;
	private String[] time = new String[] { "周一", "周二", "周三", "周四", "周五", "周六", "周日" };
	private String studentName;
	private byte[] byteCode;
	private ImageView back;
	private ArrayList<String> mList;
	private LoadingDialog dialog;
	private List<Map<String, Course[]>> courseList;
	private static Spinner sp_school_year;
	private static Spinner sp_term;
	private static String outputInfo = null;
	private static String urlEncodeStudentName = null;
	private static Map<String, String> requestHeadersMap, loginRequestBodyMap, scheduleRequestBodyMap,pyjhRequestBodyMap;
	private static String currentYear;
	private static String currentTerm;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_edu_login);
		Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
		setSupportActionBar(toolbar);
		initIntent();
		initView();
		setTimeAdapter();
		setTarget();
		initRequestData();
		initRequestBody();
	}
	private void initView(){
		verficationCode=(ImageView)this.findViewById(R.id.edulogin_code);
		back=(ImageView)this.findViewById(R.id.edu_back_home);
		initVerCode();
		username=(EditText)this.findViewById(R.id.edulogin_username);
		password=(EditText)this.findViewById(R.id.edulogin_password);
		codeInput=(EditText)this.findViewById(R.id.edulogin_codeinput);
		refreshCode=(Button)this.findViewById(R.id.edulogin_refresh);
		login=(Button)this.findViewById(R.id.edulogin_login);
		refreshCode.setOnClickListener(this);
		login.setOnClickListener(this);
		back.setOnClickListener(this);
		sp_school_year = (Spinner) this.findViewById(R.id.year_spinner);
		sp_term = (Spinner) this.findViewById(R.id.term_spinner);
		AVQuery<AVObject> query1=new AVQuery<>("Constant");
		query1.whereEqualTo("name","currentYear");
		query1.getFirstInBackground(new GetCallback<AVObject>() {
			@Override
			public void done(AVObject avObject, AVException e) {
				if(avObject!=null){
					currentYear=avObject.getString("value1");
					currentTerm=avObject.getString("value2");
				}
			}
		});
	}
	private void initVerCode(){
		if(byteCode!=null){
			Bitmap bitmap=BitmapFactory.decodeByteArray(byteCode,0,byteCode.length);
			verficationCode.setBackground(new BitmapDrawable(getResources(),resizeBitmap(bitmap,100,60)));
			byteCode=null;

	}
		else {
			HttpUtils.sendGetRequest(Constants.VERTIFICATION_CODE_URL, new Callback() {
				@Override
				public void onFailure(Call call, IOException e) {
					//加载获取失败图片
					runOnUiThread(new Runnable() {
						@Override
						public void run() {
							Toast.makeText(EduLoginActivity.this,"获取验证码失败,请使用校园网",Toast.LENGTH_SHORT).show();
						}
					});
				}

				@Override
				public void onResponse(Call call, Response response) throws IOException {
					final byte[] content=response.body().bytes();
					if(content!=null){
						runOnUiThread(new Runnable() {
							@Override
							public void run() {
								Bitmap bitmap=BitmapFactory.decodeByteArray(content,0,content.length);
								verficationCode.setBackground(new BitmapDrawable(getResources(),resizeBitmap(bitmap,100,60)));
							}
						});
					}

				}
			});
		}

	}
	private Bitmap resizeBitmap(Bitmap bitmap,float width,float height){
			int w = bitmap.getWidth();
			int h = bitmap.getHeight();
			Matrix matrix = new Matrix();
			float scaleX = (float) width / w;
			float scaleY = (float) height / h;
			matrix.postScale(scaleX, scaleY);
			Bitmap resizeBitmap = Bitmap.createBitmap(bitmap, 0, 0, w, h, matrix, true);
			return resizeBitmap;
	}
	private void initRequestData(){
		requestHeadersMap=new LinkedHashMap<>();
		loginRequestBodyMap=new LinkedHashMap<>();
		scheduleRequestBodyMap=new LinkedHashMap<>();
		pyjhRequestBodyMap=new LinkedHashMap<>();
		requestHeadersMap.put(Constants.HEAD_HOST_KEY,Constants.HEAD_HOST_VALUE);
		requestHeadersMap.put(Constants.HEAD_AGENT_KEY,Constants.HEAD_AGENT_VALUE);
		requestHeadersMap.put(Constants.HEAD_REFERER_KEY,Constants.HEAD_REFERER_LOGIN);

	}
	private void initRequestBody(){
		HttpUtils.sendGetRequest(Constants.EDU_LOGIN_URL, new Callback() {
			@Override
			public void onFailure(Call call, IOException e) {
				e.printStackTrace();
			}

			@Override
			public void onResponse(Call call, Response response) throws IOException {
				if(response!=null){
					try{
						String html=new String(response.body().bytes(),"gb2312");
						JsoupUtils.setViewStateValue(html);
						if(Constants.LOGIN_BODY_VIEWSTATE_VALUE!=null)
							loginRequestBodyMap.put(Constants.LOGIN_BODY_VIEWSTATE_KEY,Constants.LOGIN_BODY_VIEWSTATE_VALUE);
						Log.d("test",Constants.LOGIN_BODY_VIEWSTATE_VALUE);
					}catch (UnsupportedEncodingException e){
						e.printStackTrace();
					}
				}
			}
		});
		loginRequestBodyMap.put(Constants.LOGIN_BODY_TYPE_KEY,Constants.LOGIN_BODY_TYPE_VALUE);
		loginRequestBodyMap.put(Constants.LOGIN_BODY_BUTTON_KEY,Constants.LOGIN_BODY_BUTTON_VALUE);
		loginRequestBodyMap.put(Constants.LOGIN_BODY_LANGUAGE_KEY,Constants.LOGIN_BODY_LANGUAGE_VALUE);
	}
	private void addRequestBody(){
		Constants.LOGIN_BODY_USERNAME_VALUE=username.getText().toString();
		Constants.LOGIN_BODY_PASSWORD_VALUE=password.getText().toString();
		Constants.LOGIN_BODY_VERCODE_VALUE=codeInput.getText().toString();
		loginRequestBodyMap.put(Constants.LOGIN_BODY_USERNAME_KEY,Constants.LOGIN_BODY_USERNAME_VALUE);
		loginRequestBodyMap.put(Constants.LOGIN_BODY_PASSWORD_KEY,Constants.LOGIN_BODY_PASSWORD_VALUE);
		loginRequestBodyMap.put(Constants.LOGIN_BODY_VERCODE_KEY,Constants.LOGIN_BODY_VERCODE_VALUE);

		HttpUtils.sendPostRequest(Constants.EDU_LOGIN_URL, new Callback() {
			@Override
			public void onFailure(Call call, IOException e) {
				e.printStackTrace();
			}

			@Override
			public void onResponse(Call call, Response response) {
				try{
					String result = null;

					try {
						result=new String(response.body().bytes(),"gb2312");
						Log.e("test", result);
						JsoupUtils.setViewStateValue(result);
						Map<String, String> returnInfo = JsoupUtils.getNameOrFailedInfo(result);
						studentName = returnInfo.get(Constants.STUDENTNAME);
						if (null != studentName) {
							// 将gb2312编码的学生姓名转为url编码的字符串
							urlEncodeStudentName = URLEncoder.encode(studentName, "gb2312");
							outputInfo = "登录成功,为防止课程数据丢失,请耐心等待不要离开";
							searchScheduleOperation(EduLoginActivity.this);
						} else {
							String failedInfo = returnInfo.get("failedInfo");
							if (null != failedInfo) {
								outputInfo = failedInfo;
								dialog.dismiss();
								initVerCode();
							} else {
								outputInfo = "服务器错误,请重试!";
							}
						}
					} catch (UnsupportedEncodingException e) {
						e.printStackTrace();
						outputInfo = "服务器错误,请重试!";
					} finally {
						runOnUiThread(new Runnable() {
							@Override
							public void run() {
								Toast.makeText(EduLoginActivity.this, outputInfo, Toast.LENGTH_SHORT).show();
							}
						});

					}
				}
				catch(IOException e){
					e.printStackTrace();
				}
			}
		},loginRequestBodyMap,requestHeadersMap);
	}
	private void searchScheduleOperation(final Context context) {
		// 重新拼接好网址
		final String newScheduleUrl = Constants.EDU_SCHEDULE_URL
				.replace("studentName", urlEncodeStudentName)
				.replace("user",Constants.LOGIN_BODY_USERNAME_VALUE);

		// 这里需要注意,OkHttp这里设置requestHeader的Referer时,如果出现中文,会报错。所以之前就对学生姓名进行了url编码
		//有蜜汁bug,post参数正确不能访问当前学期的课表,其他时间正常,但是少提交一些参数可以访问当前学期,长期使用需要根据时间修正当前学期参数
		boolean flag=EduLoginActivity.getSelectedSchoolYearValue().equals(currentYear)&&EduLoginActivity.getSelectedTermValue().equals(currentTerm);
		if(!flag){
			requestHeadersMap.put(Constants.HEAD_REFERER_KEY, newScheduleUrl);
			scheduleRequestBodyMap.put(Constants.SCHEDULE_BODY_SCHOOLYEAR_KEY,EduLoginActivity.getSelectedSchoolYearValue());
			scheduleRequestBodyMap.put(Constants.SCHEDULE_BODY_TERM_KEY, EduLoginActivity.getSelectedTermValue());
			getViewState(newScheduleUrl,scheduleRequestBodyMap,requestHeadersMap);
			scheduleRequestBodyMap.put(Constants.SCHEDULE_BODY_VIEWSTATE_KEY,Constants.LOGIN_BODY_VIEWSTATE_VALUE);
			scheduleRequestBodyMap.put(Constants.SCHEDULE_BODY_EVENTARGUMENT_KEY,Constants.SCHEDULE_BODY_EVENTARGUMENT_VALUE);
			scheduleRequestBodyMap.put(Constants.SCHEDULE_BODY_EVENTTARGET_KEY,Constants.SCHEDULE_BODY_EVENTTARGET_VALUE);
		}
		// 这里的请求地址和Referer一样,不过这里学生姓名直接用中文也没问题。就和之前的Referer保持一致了,也用那个使用率url编码的地址
		setAndSaveSchedule(context,newScheduleUrl);
	}

	private void setAndSaveSchedule(final Context context,String newScheduleUrl){
			HttpUtils.sendPostRequest(newScheduleUrl, new Callback() {
				@Override
				public void onFailure(Call call, IOException e) {

				}
				@Override
				public void onResponse(Call call, Response response) throws IOException {
					try {
						if (null != response) {
							String result = new String(response.body().bytes(), "gb2312");
							Log.e("test", result);
							JsoupUtils.setViewStateValue(result);
							courseList = JsoupUtils.getCourseList(result);
							if (null != courseList) {
								outputInfo = "获取课表成功!";

								//查询新课表时,删除本地原有课表
								DataSupport.deleteAll(Course.class);
								//查询本地数据库,不存在则存入数据库
								for(String date:time){

									for(Map<String,Course[]> temp:courseList){
										Course[] courseArray=temp.get(date);
										if(null!=courseArray){
											for(Course course:courseArray){
												if (DaoUtil.courseQueryByCourseData(course.getCoursedata())==null){
													boolean flag=course.save();

												}
											}
										}
									}
								}
									saveCourseInCloud();

							} else {
								outputInfo = "获取课表失败,请重试!";
							}
						} else {
							outputInfo = "获取课表失败,请重试!";
						}
					} catch (UnsupportedEncodingException e) {
						e.printStackTrace();
						outputInfo = "获取课表失败,请重试!";
					}
				}
			}, scheduleRequestBodyMap, requestHeadersMap);

	}
	private void getViewState(String Url,Map<String,String> RequestBodyMap,Map<String,String> requestHeadersMap){
		try{
			//获取课程表界面的viewstate
			Response response=HttpUtils.postSync(Url,RequestBodyMap,requestHeadersMap);
			String result=new String(response.body().bytes(),"gb2312");
			JsoupUtils.setViewStateValue(result);
		}
		catch (Exception e){
			e.printStackTrace();
		}
	}
	@Override
	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
		switch (requestCode){
			case 1:
				if(resultCode==0){
					finish();
				}
				if(resultCode==1){
					setTimeAdapter();
				}
				break;
			default:
				break;
		}
	}

	private void setTimeAdapter() {
		mList = new ArrayList<String>();
		String strTime= PerferencesUtils.getUserStringData(this,id,"入学年份");
		if("".equals(strTime)){
			startActivityForResult(new Intent(EduLoginActivity.this,ListGradeActivity.class),1);
		}
		else {
			int time = Integer.parseInt(strTime);
			for(int i = 0;i < 4;i++) {
				mList.add((time+i)+"-"+(time+i+1));
			}
			ArrayAdapter<String> mAdapter = new ArrayAdapter<String>(EduLoginActivity.this, android.R.layout.simple_spinner_item, mList);

			mAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
			sp_school_year.setAdapter(mAdapter);
		}

	}

	private void initIntent() {
		Intent intent = getIntent();
		if(intent.getByteArrayExtra("verificationCode")!=null)
		byteCode = intent.getByteArrayExtra("verificationCode");
	}

	public static String getSelectedSchoolYearValue() {
		return sp_school_year.getSelectedItem().toString();
	}

	public static String getSelectedTermValue() {
		return sp_term.getSelectedItem().toString();
	}

	private void setTarget(){
		sp_school_year.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
			@Override
			public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
				Constants.SCHEDULE_BODY_EVENTTARGET_VALUE="xnd";
			}

			@Override
			public void onNothingSelected(AdapterView<?> parent) {

			}
		});
		sp_term.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
			@Override
			public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
				Constants.SCHEDULE_BODY_EVENTTARGET_VALUE="xqd";
			}

			@Override
			public void onNothingSelected(AdapterView<?> parent) {

			}
		});
	}

	private void saveCourseInCloud(){
		List<Course> list=DataSupport.findAll(Course.class);
		for(Course course:list){
			final Course[] courses=new Course[1];
			courses[0]=course;
			AVQuery<AVObject> query=new AVQuery<>("Course");
			query.whereEqualTo("coursedata",course.getCoursedata());
			query.findInBackground(new FindCallback<AVObject>() {
				@Override
				public void done(List<AVObject> list, AVException e) {
					if(list!=null&&e==null){
						if(list.size()!=0){
							Log.e("test","existed");
						}
						else {
							AVObject AVcourse=new AVObject("Course");
							AVcourse.put("coursedata",courses[0].getCoursedata());
							AVcourse.put("teacher",courses[0].getTeacher());
							AVcourse.put("courseName",courses[0].getCourseName());
							AVcourse.put("courseType",courses[0].getCourseType());
							AVcourse.put("isSingle",courses[0].getIsSingle());
							AVcourse.put("isDouble",courses[0].getIsDouble());
							AVcourse.put("start",courses[0].getStart());
							AVcourse.put("end",courses[0].getEnd());
							if(courses[0].getLength()!="")
								AVcourse.put("length",Integer.parseInt(courses[0].getLength()));
							AVcourse.put("weekLength",courses[0].getWeekLength());
							AVcourse.put("date",courses[0].getDate());
							AVcourse.put("duration",courses[0].getDuration());
							AVcourse.put("classroom",courses[0].getClassroom());
							AVcourse.put("courseBeginNumber",courses[0].getCourseBeginNumber());
							AVcourse.saveInBackground(new SaveCallback() {
								@Override
								public void done(AVException e) {
									if(e==null){
										Log.e("test","ok");

									}
									else {
										outputInfo="保存课程到云端失败";
									}
								}
							});
						}
					}
				}
			});
		}
		runOnUiThread(new Runnable() {
			@Override
			public void run() {
				Intent intent=new Intent(EduLoginActivity.this,EduService.class);
				intent.putExtra("studentName",urlEncodeStudentName);
				startService(intent);
				Toast.makeText(EduLoginActivity.this, outputInfo, Toast.LENGTH_SHORT).show();
				setResult(1);
				dialog.dismiss();
				EduLoginActivity.this.finish();

			}
		});
	}
	@Override
	public void onClick(View v) {
		switch (v.getId()){
			case R.id.edulogin_refresh:
				initVerCode();
				break;
			case R.id.edulogin_login:
				if((!username.getText().toString().equals(""))
						&&(!password.getText().toString().equals(""))
						&&(!username.getText().toString().equals(""))){
					addRequestBody();
					dialog=new LoadingDialog(this);
					dialog.setMessage("获取课表中").show();
				}else{
					Toast.makeText(EduLoginActivity.this,"请完整填写信息哦",Toast.LENGTH_SHORT).show();
				}

				break;
			case R.id.edu_back_home:
				EduLoginActivity.this.finish();
				break;
		}
	}

}


text:
const newSectionProjectController = require('./new-section-project.controller');

const moduleName   = 'section-project-form.component',
      dependencies = [];

angular.module(moduleName, dependencies)
	.controller(newSectionProjectController.name, newSectionProjectController.ctrl);

module.exports = moduleName;


text:
namespace AgpuD3D12
{

class DescriptorTableMemoryAllocator
{
public:
	DescriptorTableMemoryAllocator();
    ~DescriptorTableMemoryAllocator();

	void setup(uint32_t maxDescriptorCount);

	int32_t allocate();
    void free(int32_t descriptorTableIndex);

private:
	uint32_t descriptorCount;
	int32_t nextFreeItem;
    std::vector<int32_t> freeList;
};

enum class ShaderResourceViewType
{
    Buffer = 0,
    Texture1D,
    Texture1DArray,
    Texture2D,
    Texture2DArray,
    Texture2DMS,
    Texture2DMSArray,
    Texture3D,
    TextureCube,
    TextureCubeArray,
    Count
};

enum class UnorderedAccessViewType
{
    Buffer = 0,
    Texture1D,
    Texture1DArray,
    Texture2D,
    Texture2DArray,
    Texture3D,
    Count
};

class ADXShaderSignature : public agpu::shader_signature
{
public:
    ADXShaderSignature(const agpu::device_ref &cdevice);
    ~ADXShaderSignature();

    static agpu::shader_signature_ref create(const agpu::device_ref &device, const ComPtr<ID3D12RootSignature> &rootSignature, ADXShaderSignatureBuilder *builder);

    virtual agpu::shader_resource_binding_ptr createShaderResourceBinding(agpu_uint element) override;

public:
    agpu::device_ref device;
    ComPtr<ID3D12RootSignature> rootSignature;
    ComPtr<ID3D12DescriptorHeap> shaderResourceViewHeap;
    ComPtr<ID3D12DescriptorHeap> samplerHeap;

	std::vector<ShaderSignatureBindingBank> banks;
	size_t pushConstantCount;

	std::vector<D3D12_GPU_DESCRIPTOR_HANDLE> descriptorTableHeapGPUBaseAddress;
	std::vector<D3D12_CPU_DESCRIPTOR_HANDLE> descriptorTableHeapCPUBaseAddress;
	std::vector<D3D12_GPU_DESCRIPTOR_HANDLE> nullDescriptorTables;
private:
	bool constructDescriptorTableAllocators();
	bool initializeDescriptorTable(const ShaderSignatureBindingBank &bank, const D3D12_CPU_DESCRIPTOR_HANDLE &tableHandle);

    std::mutex allocationMutex;
	std::vector<DescriptorTableMemoryAllocator> descriptorAllocators;
};

} // End of namespace AgpuD3D12

#endif //AGPU_D3D12_SHADER_SIGNATURE_BUILDER_HPP


text:
<?php

/**
 * Image drawer which based on GD extension.
 *
 * @author  Igor Golovanov <igor.golovanov@gmail.com>
 *
 * @property-read resource $gdResource GD resource.
 */
class YiiImageGdDrawer extends YiiImageDrawer implements YiiImageGdAware
{

    /**
     * @var resource
     */
    private $_resource;

    /**
     * Constructs Drawer with a given gd image resource
     *
     * @param resource $resource
     */
    public function __construct($resource)
    {
        parent::__construct();

        if (!is_resource($resource)) {
            throw new RuntimeException('Resource image is not a resource.');
        }
        $this->_resource = $resource;
    }

    /**
     * Get GD resource.
     *
     * @return resource
     */
    public function getGdResource()
    {
        return $this->_resource;
    }

    /**
     * {@inheritDoc}
     */
    protected function drawArc(YiiImagePoint $center, YiiImageBox $size, $start,
                               $end, YiiImageColor $color)
    {
        if (false === imagearc(
                        $this->gdResource, $center->x, $center->y, $size->width,
                        $size->height, $start, $end,
                        $this->createGdColor($color)
        )) {
            throw new RuntimeException('Draw arc operation failed');
        }
    }

    /**
     * {@inheritDoc}
     */
    protected function drawChord(YiiImagePoint $center, YiiImageBox $size,
                                 $start, $end, YiiImageColor $color,
                                 $fill = false)
    {
        if ($fill) {
            $style = IMG_ARC_CHORD;
        } else {
            $style = IMG_ARC_CHORD | IMG_ARC_NOFILL;
        }

        /**
         * This function doesn't work properly because of a bug in GD
         */
        if (false === imagefilledarc(
                        $this->gdResource, $center->x, $center->y, $size->width,
                        $size->height, $start, $end,
                        $this->createGdColor($color), $style
        )) {
            throw new RuntimeException('Draw chord operation failed');
        }
    }

    /**
     * {@inheritDoc}
     */
    protected function drawEllipse(YiiImagePoint $center, YiiImageBox $size,
                                   YiiImageColor $color, $fill = false)
    {
        if ($fill) {
            $callback = 'imagefilledellipse';
        } else {
            $callback = 'imageellipse';
        }

        if (false === $callback(
                        $this->gdResource, $center->x, $center->y, $size->width,
                        $size->height, $this->createGdColor($color))
        ) {
            throw new RuntimeException('Draw ellipse operation failed');
        }
    }

    /**
     * {@inheritDoc}
     */
    protected function drawLine(YiiImagePoint $start, YiiImagePoint $end,
                                YiiImageColor $color)
    {
        if (false === imageline(
                        $this->gdResource, $start->x, $start->y, $end->x,
                        $end->y, $this->createGdColor($color)
        )) {
            throw new RuntimeException('Draw line operation failed');
        }
    }

    /**
     * {@inheritDoc}
     */
    protected function drawPieSlice(YiiImagePoint $center, YiiImageBox $size,
                                    $start, $end, YiiImageColor $color,
                                    $fill = false)
    {
        if ($fill) {
            $style = IMG_ARC_EDGED;
        } else {
            $style = IMG_ARC_EDGED | IMG_ARC_NOFILL;
        }

        if (false === imagefilledarc(
                        $this->gdResource, $center->x, $center->y, $size->width,
                        $size->h, $start, $end, $this->createGdColor($color),
                                                                     $style
        )) {
            throw new RuntimeException('Draw chord operation failed');
        }
    }

    /**
     * {@inheritDoc}
     */
    protected function drawDot(YiiImagePoint $position, YiiImageColor $color)
    {
        if (false === imagesetpixel(
                        $this->gdResource, $position->x, $position->y,
                        $this->createGdColor($color)
        )) {
            throw new RuntimeException('Draw point operation failed');
        }
    }

    /**
     * {@inheritDoc}
     */
    protected function drawPolygon(array $coordinates, YiiImageColor $color,
                                   $fill = false)
    {
        if (count($coordinates) < 3) {
            throw new InvalidArgumentException(sprintf(
                            'A polygon must consist of at least 3 points, %d given',
                            count($coordinates)
            ));
        }

        $points = array();

        foreach ($coordinates as $coordinate) {
            if (!$coordinate instanceof YiiImagePoint) {
                throw new InvalidArgumentException(sprintf(
                                'Each entry in coordinates array must be instance of ' .
                                'YiiImagePoint, %s given',
                                var_export($coordinate, true)
                ));
            }

            $points[] = $coordinate->x;
            $points[] = $coordinate->y;
        }

        if ($fill) {
            $callback = 'imagefilledpolygon';
        } else {
            $callback = 'imagepolygon';
        }

        if (false === $callback(
                        $this->gdResource, $points, count($coordinates),
                                                          $this->createGdColor($color)
        )) {
            throw new RuntimeException('Draw polygon operation failed');
        }
    }

    /**
     * {@inheritDoc}
     */
    protected function drawText($string, YiiImageFont $font,
                                YiiImagePoint $position, $angle = 0)
    {
        $angle    = -1 * $angle;
        $fontsize = $font->size;
        $fontfile = $font->file;
        $info     = imageftbbox($fontsize, $angle, $fontfile, $string);
        $xs       = array($info[0], $info[2], $info[4], $info[6]);
        $ys = array($info[1], $info[3], $info[5], $info[7]);

        $xdiff = 0 - min($xs) + $position->x;
        $ydiff = 0 - min($ys) + $position->y;

        foreach ($xs as &$x) {
            $x += $xdiff;
        }

        foreach ($ys as &$y) {
            $y += $ydiff;
        }

        if (false === imagealphablending($this->gdResource, true)) {
            throw new RuntimeException('Font mask operation failed');
        }

        if (false === imagefttext(
                        $this->gdResource, $fontsize, $angle, $xs[0], $ys[0],
                        $this->createGdColor($font->color), $fontfile, $string
        )) {
            throw new RuntimeException('Font mask operation failed');
        }

        if (false === imagealphablending($this->gdResource, false)) {
            throw new RuntimeException('Font mask operation failed');
        }
    }

    /**
     * Internal
     *
     * Generates a GD color from Color instance
     *
     * @param YiiImageColor $color
     *
     * @return resource
     *
     * @throws RuntimeException
     */
    private function createGdColor(YiiImageColor $color)
    {
        $color = imagecolorallocatealpha(
                $this->gdResource, $color->red, $color->green, $color->blue,
                round(127 * $color->alpha / 100)
        );
        if (false === $color) {
            throw new RuntimeException(sprintf(
                            'Unable to allocate color "RGB(%s, %s, %s)" with ' .
                            'transparency of %d percent', $color->red,
                            $color->green, $color->blue, $color->alpha
            ));
        }

        return $color;
    }

}


text:
package com.updatecontrols.correspondence.strategy;

public interface PostCallback {

	void onSuccess();
}


text:
Changelog
=========

1.5.5 (TBC)
-----

* Fix google#346: --root option not working on windows due to slashes in path

1.5.4 (2020-08-18)
-----

* Fix google#166, Allow space before C++11 attributes

1.5.3 (2020-07-20)
-----

* Fix #156: sed/gsed output parameter rejected
* Fix #156: sed/gsed output without other stdout information
* improvements to regression tests

1.5.2 (2020-06-24)
-----

* Fix #83, output formats "sed" and "gsed" to auto-fix some issues
* Fix #92, new category "build/namespaces_headers" for unnamed namespaces in header file
* Sort list of files before processing
* Fix #144 Falso positive for indent when using QT macros "signals" and "slots"
* Fix #76 Parsing of class decorators that also use digits
* Fix #139 Add message "Relative paths like . and .. are not allowed"

1.5.1 (2020-06-05)
-----

* Revert #43 behavior change for include order from 1.5.0, and hide it behind command-line-flag `--includeorder=standardcfirst`.
  It turns out there is no easy objective way to tell c system headers from certain c++ library headers, and Google cpplint intentionally classifies some C++ header includes as C system header for simplicity.
* Libraries considered as C system headers using --includeorder=standardcfirst now also includes linux-specifc headers (glibc-devel, glibc-kernheaders, linux-libc-dev).

1.5.0 (2020-05-31)
-----

* Fix #43 false positives in header include order by checking includes against a list of c headers.
  Since this interprets certain include lines different than before, output about header include order changes.

1.4.6 (2020-05-31)
-----

* Fix #135: allow 'if constexpr' in readability/braces.
* Fix runtime warning: Close files after reading contents

1.4.5 (2020-01-13)
-----

* Avoid false positive for [build/include_what_you_use] in case of `foo.set<type>` and `foo->set<type>` usage.
* Avoid false positive for [build/include_what_you_use] in case of `map` is user defined function
* Escape backslashes in pydoc strings to get rid of DeprecationWarning.
* Fix false positive "should include its header" for 3rd party headers
* Add support for c++17 tuple destructuring
* fix #123: Inconsistent behavior of --headers and --extensions
* Fix #114: --exclude not working recursively
* fix #112, identifying of copy constructors should allow combinations of volatile and const

1.4.4 (2019-02-25)
-----

Another cleanup release

* NOBUG: fix unit/cli tests for source release
* NOBUG: reduce diff to upstream by intentionally using deprecated functions where upstream uses them
* add `--version` command (https://github.com/cpplint/cpplint/issues/27)

1.4.3 (2019-02-18)
-----

* Revert "Fix the `build/endif_comment` check", same as reverted in upstream

1.4.2 (2019-02-17)
-----

* Cleanup release, fixes further issues with tests and source distribution

1.4.1 (2019-02-17)
-----

* Cleanup release, only adds test support files to source dist

1.4.0 (2019-02-17)
-----

* Incorporate cpplint updates from google (e5d807c6a0d,  2018-05-03)
  * Fix the `build/endif_comment` check (https://github.com/google/styleguide/pull/169)
  * Teach the explicit constructor check about constexpr (#56)
  * Changed vs7 output format (#57)
  * Remove presubmit check for DISALLOW_* macros (#54)
  * add `--quiet` flag as in upstream (https://github.com/google/styleguide/pull/293)
  * support `--root` argument to run in different folder (https://github.com/google/styleguide/pull/291)
  * Fix 16bit Unicode issue (https://github.com/google/styleguide/issues/337)

1.3.0 (2016-07-12)
-----

* Incorporate cpplint updates from google (6d3a7d8a2, 2016-07-14)
* Add --headers flag to choose which extensions are header files.
* Add regression testsing.

1.2.2 (2016-04-07)
-----

* Fixes bug causing RValue detection with namespaces to fail.

1.2.1 (2016-03-19)
-----

* Fixes error in setup.py.

1.2.0 (2016-03-19)
-----

* Adds `.cu` and `.cuh` as supported file extensions by default.
* Moves the warning "Include the directory when naming .h files" from the `build/include` category to the `build/include_subdir` category.

1.1.0 (2016-02-24)
-----

* Adds quiet option to suppress non error-related output.

1.0.1 (2016-02-12)
-----

* Updates PyPi README.

1.0.0 (2016-02-03)
-----

* Fixes a --repository flag bug.

0.0.9 (2016-01-23)
-----

* Adds the --exclude flag to exclude files from being linted.

0.0.8 (2016-01-18)
-----

* Adds the --repository flag to set the location of the project root for header guard calculations.
* Adds support for ``#pragma once`` as an alternative to header include guards.

0.0.7 (2016-01-07)
-----

* Fixes a Windows include guard bug.
* Adds escaping and more detail to JUnit XML output.

0.0.6 (2015-12-15)
-----

* Adds the --recursive flag.
* Adds JUnit XML output.

0.0.5 (2015-01-04)
-----

* Maintenance release, undoes earlier project folder structure changes to remain as true to upstream as possible.

0.0.4 (2015-01-04)
-----

* Merged with upstream revision r141 (2014-12-04)
* This includes many new checks, see commit messages for details
* This also reverts some renaming of files, to stay close to the original project

0.0.3 (2012-11-24)
-----

* python 3 compatibility

0.0.2 (2012-11-06)
-----

* fixed and extended allowed extensions

0.0.1 (2012-10-13)
-----

* import from googlecode, added setup.py
* imported revision r83 (2012-05-11)


text:
<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model app\models\PengurusanProgramBinaanJurulatih */

$this->title = $model->penyertaan_sukan_jurulatih_id;
$this->params['breadcrumbs'][] = ['label' => 'Penyertaan Sukan Jurulatih', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="penyertaan-sukan-jurulatih-view">

    <?= $this->render('_form', [
        'model' => $model,
        'readonly' => $readonly,
    ]) ?>

</div>


text:
#ifndef QEMU_I2C_H
#define QEMU_I2C_H

#include "qdev.h"

/* The QEMU I2C implementation only supports simple transfers that complete
   immediately.  It does not support slave devices that need to be able to
   defer their response (eg. CPU slave interfaces where the data is supplied
   by the device driver in response to an interrupt).  */

enum i2c_event {
    I2C_START_RECV,
    I2C_START_SEND,
    I2C_FINISH,
    I2C_NACK /* Masker NACKed a receive byte.  */
};

/* Master to slave.  */
typedef int (*i2c_send_cb)(i2c_slave *s, uint8_t data);
/* Slave to master.  */
typedef int (*i2c_recv_cb)(i2c_slave *s);
/* Notify the slave of a bus state change.  */
typedef void (*i2c_event_cb)(i2c_slave *s, enum i2c_event event);

typedef int (*i2c_slave_initfn)(i2c_slave *dev);

typedef struct {
    DeviceInfo qdev;

    /* Callbacks provided by the device.  */
    i2c_slave_initfn init;
    i2c_event_cb event;
    i2c_recv_cb recv;
    i2c_send_cb send;
} I2CSlaveInfo;

struct i2c_slave
{
    DeviceState qdev;
    I2CSlaveInfo *info;

    /* Remaining fields for internal use by the I2C code.  */
    uint8_t address;
};

i2c_bus *i2c_init_bus(DeviceState *parent, const char *name);
void i2c_set_slave_address(i2c_slave *dev, uint8_t address);
int i2c_bus_busy(i2c_bus *bus);
int i2c_start_transfer(i2c_bus *bus, uint8_t address, int recv);
void i2c_end_transfer(i2c_bus *bus);
void i2c_nack(i2c_bus *bus);
int i2c_send(i2c_bus *bus, uint8_t data);
int i2c_recv(i2c_bus *bus);

#define I2C_SLAVE_FROM_QDEV(dev) DO_UPCAST(i2c_slave, qdev, dev)
#define FROM_I2C_SLAVE(type, dev) DO_UPCAST(type, i2c, dev)

void i2c_register_slave(I2CSlaveInfo *type);

DeviceState *i2c_create_slave(i2c_bus *bus, const char *name, uint8_t addr);

/* max7310.c */
void max7310_reset(i2c_slave *i2c);
qemu_irq *max7310_gpio_in_get(i2c_slave *i2c);
void max7310_gpio_out_set(i2c_slave *i2c, int line, qemu_irq handler);

/* wm8750.c */
void wm8750_data_req_set(DeviceState *dev,
                void (*data_req)(void *, int, int), void *opaque);
void wm8750_dac_dat(void *opaque, uint32_t sample);
uint32_t wm8750_adc_dat(void *opaque);
void *wm8750_dac_buffer(void *opaque, int samples);
void wm8750_dac_commit(void *opaque);
void wm8750_set_bclk_in(void *opaque, int new_hz);

/* tmp105.c */
void tmp105_set(i2c_slave *i2c, int temp);

/* lm832x.c */
void lm832x_key_event(i2c_slave *i2c, int key, int state);

#endif


text:
using System.Collections.Generic;
using System.Text.Json;
using Azure.AI.Translation.Document;
using Azure.Core;

namespace Azure.AI.Translation.Document.Models
{
    internal partial class FileFormatListResult
    {
        internal static FileFormatListResult DeserializeFileFormatListResult(JsonElement element)
        {
            IReadOnlyList<FileFormat> value = default;
            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("value"))
                {
                    List<FileFormat> array = new List<FileFormat>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(FileFormat.DeserializeFileFormat(item));
                    }
                    value = array;
                    continue;
                }
            }
            return new FileFormatListResult(value);
        }
    }
}


text:
<?php

namespace LinguaLeo\MyArray;

use LinguaLeo\DataQuery\ResultInterface;

class Result implements ResultInterface
{
    private $table;
    private $count;

    public function __construct($table, $count)
    {
        $this->table = $table;
        $this->count = $count;
    }

    public function column($number)
    {
        $fields = array_keys($this->table);
        return $this->table[$fields[$number]];
    }

    public function count()
    {
        return $this->count;
    }

    public function keyValue()
    {
        $fields = array_keys($this->table);
        return array_combine($this->table[$fields[0]], $this->table[$fields[1]]);
    }

    public function many()
    {
        $rows = [];
        foreach ($this->table as $field => $column) {
            foreach ($column as $i => $value) {
                $rows[$i][$field] = $value;
            }
        }
        return $rows;
    }

    public function one()
    {
        $row = [];
        foreach ($this->table as $field => $column) {
            $row[$field] = reset($column);
        }
        return $row;
    }

    public function table()
    {
        return $this->table;
    }

    public function value($name)
    {
        if (isset($this->table[$name])) {
            return reset($this->table[$name]);
        }
        return null;
    }

    public function free()
    {
        $this->table = null;
        $this->count = 0;
        return true;
    }
}


text:
title: this page has moved.
layout: simple_page
redirect_to: operations/rolling-updates.html
---


text:
using System;

namespace OneDrive
{
    public class StreamDownloadOptions : CancellableRequestOptions
    {
        public ContentRange ContentRange
        {
            get
            {
                return ContentRange.FromContentRangeHeaderValue(ValueForHeader(ApiConstants.RangeHeaderName));
            }

            set
            {
                SetValueForHeader(ApiConstants.RangeHeaderName,
                    value != null ? value.ToContentRangeHeaderValue() : null);
            }
        }

        public string IfMatchETag
        {
            get { return ValueForHeader(ApiConstants.IfMatchHeaderName); }
            set { SetValueForHeader(ApiConstants.IfMatchHeaderName, value); }
        }

        public static StreamDownloadOptions Default
        {
            get { return new StreamDownloadOptions(); }
        }
    }
}


text:
// Code generated by client-gen. DO NOT EDIT.

package v1alpha1

import (
	"context"
	"time"

	scheme "github.com/traefik/traefik/v2/pkg/provider/kubernetes/crd/generated/clientset/versioned/scheme"
	v1alpha1 "github.com/traefik/traefik/v2/pkg/provider/kubernetes/crd/traefik/v1alpha1"
	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	types "k8s.io/apimachinery/pkg/types"
	watch "k8s.io/apimachinery/pkg/watch"
	rest "k8s.io/client-go/rest"
)

// ServersTransportsGetter has a method to return a ServersTransportInterface.
// A group's client should implement this interface.
type ServersTransportsGetter interface {
	ServersTransports(namespace string) ServersTransportInterface
}

// ServersTransportInterface has methods to work with ServersTransport resources.
type ServersTransportInterface interface {
	Create(ctx context.Context, serversTransport *v1alpha1.ServersTransport, opts v1.CreateOptions) (*v1alpha1.ServersTransport, error)
	Update(ctx context.Context, serversTransport *v1alpha1.ServersTransport, opts v1.UpdateOptions) (*v1alpha1.ServersTransport, error)
	Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
	DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
	Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ServersTransport, error)
	List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ServersTransportList, error)
	Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
	Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ServersTransport, err error)
	ServersTransportExpansion
}

// serversTransports implements ServersTransportInterface
type serversTransports struct {
	client rest.Interface
	ns     string
}

// newServersTransports returns a ServersTransports
func newServersTransports(c *TraefikV1alpha1Client, namespace string) *serversTransports {
	return &serversTransports{
		client: c.RESTClient(),
		ns:     namespace,
	}
}

// Get takes name of the serversTransport, and returns the corresponding serversTransport object, and an error if there is any.
func (c *serversTransports) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ServersTransport, err error) {
	result = &v1alpha1.ServersTransport{}
	err = c.client.Get().
		Namespace(c.ns).
		Resource("serverstransports").
		Name(name).
		VersionedParams(&options, scheme.ParameterCodec).
		Do(ctx).
		Into(result)
	return
}

// List takes label and field selectors, and returns the list of ServersTransports that match those selectors.
func (c *serversTransports) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ServersTransportList, err error) {
	var timeout time.Duration
	if opts.TimeoutSeconds != nil {
		timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
	}
	result = &v1alpha1.ServersTransportList{}
	err = c.client.Get().
		Namespace(c.ns).
		Resource("serverstransports").
		VersionedParams(&opts, scheme.ParameterCodec).
		Timeout(timeout).
		Do(ctx).
		Into(result)
	return
}

// Watch returns a watch.Interface that watches the requested serversTransports.
func (c *serversTransports) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
	var timeout time.Duration
	if opts.TimeoutSeconds != nil {
		timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
	}
	opts.Watch = true
	return c.client.Get().
		Namespace(c.ns).
		Resource("serverstransports").
		VersionedParams(&opts, scheme.ParameterCodec).
		Timeout(timeout).
		Watch(ctx)
}

// Create takes the representation of a serversTransport and creates it.  Returns the server's representation of the serversTransport, and an error, if there is any.
func (c *serversTransports) Create(ctx context.Context, serversTransport *v1alpha1.ServersTransport, opts v1.CreateOptions) (result *v1alpha1.ServersTransport, err error) {
	result = &v1alpha1.ServersTransport{}
	err = c.client.Post().
		Namespace(c.ns).
		Resource("serverstransports").
		VersionedParams(&opts, scheme.ParameterCodec).
		Body(serversTransport).
		Do(ctx).
		Into(result)
	return
}

// Update takes the representation of a serversTransport and updates it. Returns the server's representation of the serversTransport, and an error, if there is any.
func (c *serversTransports) Update(ctx context.Context, serversTransport *v1alpha1.ServersTransport, opts v1.UpdateOptions) (result *v1alpha1.ServersTransport, err error) {
	result = &v1alpha1.ServersTransport{}
	err = c.client.Put().
		Namespace(c.ns).
		Resource("serverstransports").
		Name(serversTransport.Name).
		VersionedParams(&opts, scheme.ParameterCodec).
		Body(serversTransport).
		Do(ctx).
		Into(result)
	return
}

// Delete takes name of the serversTransport and deletes it. Returns an error if one occurs.
func (c *serversTransports) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
	return c.client.Delete().
		Namespace(c.ns).
		Resource("serverstransports").
		Name(name).
		Body(&opts).
		Do(ctx).
		Error()
}

// DeleteCollection deletes a collection of objects.
func (c *serversTransports) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
	var timeout time.Duration
	if listOpts.TimeoutSeconds != nil {
		timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
	}
	return c.client.Delete().
		Namespace(c.ns).
		Resource("serverstransports").
		VersionedParams(&listOpts, scheme.ParameterCodec).
		Timeout(timeout).
		Body(&opts).
		Do(ctx).
		Error()
}

// Patch applies the patch and returns the patched serversTransport.
func (c *serversTransports) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ServersTransport, err error) {
	result = &v1alpha1.ServersTransport{}
	err = c.client.Patch(pt).
		Namespace(c.ns).
		Resource("serverstransports").
		Name(name).
		SubResource(subresources...).
		VersionedParams(&opts, scheme.ParameterCodec).
		Body(data).
		Do(ctx).
		Into(result)
	return
}


text:
package chav1961.purelib.fsys.interfaces;

import java.io.IOException;

/**
 *
This interface describes file system locker. It is used to lock/unlock entites in the file system

 * @author Alexander Chernomyrdin aka chav1961
 * @since 0.0.5
 */
public interface FileSystemLockInterface {
	/**
	 *
Try to lock file system resource.

	 * @param path any resource name (usually, but not mandatory - file name)
	 * @param sharedMode lock resource in shared (false) or exclusive (true) mode;
	 * @return true on success, false otherwise
	 * @throws IOException if any exceptions was thrown
	 */
	boolean tryLock(String path, boolean sharedMode)  throws IOException;

	/**
	 *
Lock file system resource. Waits until lock is successful

	 * @param path any resource name (usually, but not mandatory - file name)
	 * @param sharedMode lock resource in shared (false) or exclusive (true) mode;
	 * @return true on success, false otherwise
	 * @throws IOException if any exceptions was thrown
	 */
	void lock(String path, boolean sharedMode) throws IOException;

	/**
	 *
Unlock file system resource.

	 * @param path any resource name (usually, but not mandatory - file name)
	 * @param sharedMode unlock resource in shared (false) or exclusive (true) mode;
	 * @throws IOException if any exceptions was thrown
	 */
	void unlock(String path, boolean sharedMode)  throws IOException;
}