text:
/* this ALWAYS GENERATED file contains the definitions for the interfaces */

 /* File created by MIDL compiler version 8.xx.xxxx */
/* at a redacted point in time
 */
/* Compiler settings for gen/chrome/updater/app/server/win/updater_idl.idl:
    Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.xx.xxxx
    protocol : dce , ms_ext, c_ext, robust
    error checks: allocation ref bounds_check enum stub_data
    VC __declspec() decoration level:
         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
         DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING(  ) */

#pragma warning( disable: 4049 )  /* more than 64k source lines */

/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 475
#endif

#include "rpc.h"
#include "rpcndr.h"

#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif /* __RPCNDR_H_VERSION__ */

#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/

#ifndef __updater_idl_h__
#define __updater_idl_h__

#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif

/* Forward Declarations */

#ifndef __IUpdateState_FWD_DEFINED__
#define __IUpdateState_FWD_DEFINED__
typedef interface IUpdateState IUpdateState;

#endif 	/* __IUpdateState_FWD_DEFINED__ */

#ifndef __IUpdaterRegisterAppCallback_FWD_DEFINED__
#define __IUpdaterRegisterAppCallback_FWD_DEFINED__
typedef interface IUpdaterRegisterAppCallback IUpdaterRegisterAppCallback;

#endif 	/* __IUpdaterRegisterAppCallback_FWD_DEFINED__ */

#ifndef __ICompleteStatus_FWD_DEFINED__
#define __ICompleteStatus_FWD_DEFINED__
typedef interface ICompleteStatus ICompleteStatus;

#endif 	/* __ICompleteStatus_FWD_DEFINED__ */

#ifndef __IUpdaterObserver_FWD_DEFINED__
#define __IUpdaterObserver_FWD_DEFINED__
typedef interface IUpdaterObserver IUpdaterObserver;

#endif 	/* __IUpdaterObserver_FWD_DEFINED__ */

#ifndef __IUpdaterCallback_FWD_DEFINED__
#define __IUpdaterCallback_FWD_DEFINED__
typedef interface IUpdaterCallback IUpdaterCallback;

#endif 	/* __IUpdaterCallback_FWD_DEFINED__ */

#ifndef __IUpdater_FWD_DEFINED__
#define __IUpdater_FWD_DEFINED__
typedef interface IUpdater IUpdater;

#endif 	/* __IUpdater_FWD_DEFINED__ */

#ifndef __UpdaterUserClass_FWD_DEFINED__
#define __UpdaterUserClass_FWD_DEFINED__

#ifdef __cplusplus
typedef class UpdaterUserClass UpdaterUserClass;
#else
typedef struct UpdaterUserClass UpdaterUserClass;
#endif /* __cplusplus */

#endif 	/* __UpdaterUserClass_FWD_DEFINED__ */

#ifndef __UpdaterSystemClass_FWD_DEFINED__
#define __UpdaterSystemClass_FWD_DEFINED__

#ifdef __cplusplus
typedef class UpdaterSystemClass UpdaterSystemClass;
#else
typedef struct UpdaterSystemClass UpdaterSystemClass;
#endif /* __cplusplus */

#endif 	/* __UpdaterSystemClass_FWD_DEFINED__ */

#ifndef __ICompleteStatus_FWD_DEFINED__
#define __ICompleteStatus_FWD_DEFINED__
typedef interface ICompleteStatus ICompleteStatus;

#endif 	/* __ICompleteStatus_FWD_DEFINED__ */

#ifndef __IUpdater_FWD_DEFINED__
#define __IUpdater_FWD_DEFINED__
typedef interface IUpdater IUpdater;

#endif 	/* __IUpdater_FWD_DEFINED__ */

#ifndef __IUpdaterObserver_FWD_DEFINED__
#define __IUpdaterObserver_FWD_DEFINED__
typedef interface IUpdaterObserver IUpdaterObserver;

#endif 	/* __IUpdaterObserver_FWD_DEFINED__ */

#ifndef __IUpdateState_FWD_DEFINED__
#define __IUpdateState_FWD_DEFINED__
typedef interface IUpdateState IUpdateState;

#endif 	/* __IUpdateState_FWD_DEFINED__ */

/* header files for imported files */
#include "oaidl.h"
#include "ocidl.h"

#ifdef __cplusplus
extern "C"{
#endif

#ifndef __IUpdateState_INTERFACE_DEFINED__
#define __IUpdateState_INTERFACE_DEFINED__

/* interface IUpdateState */
/* [unique][helpstring][uuid][dual][object] */

EXTERN_C const IID IID_IUpdateState;

#if defined(__cplusplus) && !defined(CINTERFACE)

    MIDL_INTERFACE("46ACF70B-AC13-406D-B53B-B2C4BF091FF6")
    IUpdateState : public IUnknown
    {
    public:
        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_state(
            /* [retval][out] */ LONG *__MIDL__IUpdateState0000) = 0;

        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_appId(
            /* [retval][out] */ BSTR *__MIDL__IUpdateState0001) = 0;

        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_nextVersion(
            /* [retval][out] */ BSTR *__MIDL__IUpdateState0002) = 0;

        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_downloadedBytes(
            /* [retval][out] */ LONGLONG *__MIDL__IUpdateState0003) = 0;

        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_totalBytes(
            /* [retval][out] */ LONGLONG *__MIDL__IUpdateState0004) = 0;

        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_installProgress(
            /* [retval][out] */ LONG *__MIDL__IUpdateState0005) = 0;

        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_errorCategory(
            /* [retval][out] */ LONG *__MIDL__IUpdateState0006) = 0;

        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_errorCode(
            /* [retval][out] */ LONG *__MIDL__IUpdateState0007) = 0;

        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_extraCode1(
            /* [retval][out] */ LONG *__MIDL__IUpdateState0008) = 0;

    };

#else 	/* C style interface */

    typedef struct IUpdateStateVtbl
    {
        BEGIN_INTERFACE

        HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
            IUpdateState * This,
            /* [in] */ REFIID riid,
            /* [annotation][iid_is][out] */
            _COM_Outptr_  void **ppvObject);

        ULONG ( STDMETHODCALLTYPE *AddRef )(
            IUpdateState * This);

        ULONG ( STDMETHODCALLTYPE *Release )(
            IUpdateState * This);

        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_state )(
            IUpdateState * This,
            /* [retval][out] */ LONG *__MIDL__IUpdateState0000);

        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_appId )(
            IUpdateState * This,
            /* [retval][out] */ BSTR *__MIDL__IUpdateState0001);

        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_nextVersion )(
            IUpdateState * This,
            /* [retval][out] */ BSTR *__MIDL__IUpdateState0002);

        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_downloadedBytes )(
            IUpdateState * This,
            /* [retval][out] */ LONGLONG *__MIDL__IUpdateState0003);

        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_totalBytes )(
            IUpdateState * This,
            /* [retval][out] */ LONGLONG *__MIDL__IUpdateState0004);

        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_installProgress )(
            IUpdateState * This,
            /* [retval][out] */ LONG *__MIDL__IUpdateState0005);

        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_errorCategory )(
            IUpdateState * This,
            /* [retval][out] */ LONG *__MIDL__IUpdateState0006);

        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_errorCode )(
            IUpdateState * This,
            /* [retval][out] */ LONG *__MIDL__IUpdateState0007);

        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_extraCode1 )(
            IUpdateState * This,
            /* [retval][out] */ LONG *__MIDL__IUpdateState0008);

        END_INTERFACE
    } IUpdateStateVtbl;

    interface IUpdateState
    {
        CONST_VTBL struct IUpdateStateVtbl *lpVtbl;
    };

#ifdef COBJMACROS

#define IUpdateState_QueryInterface(This,riid,ppvObject)	\
    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )

#define IUpdateState_AddRef(This)	\
    ( (This)->lpVtbl -> AddRef(This) )

#define IUpdateState_Release(This)	\
    ( (This)->lpVtbl -> Release(This) )

#define IUpdateState_get_state(This,__MIDL__IUpdateState0000)	\
    ( (This)->lpVtbl -> get_state(This,__MIDL__IUpdateState0000) )

#define IUpdateState_get_appId(This,__MIDL__IUpdateState0001)	\
    ( (This)->lpVtbl -> get_appId(This,__MIDL__IUpdateState0001) )

#define IUpdateState_get_nextVersion(This,__MIDL__IUpdateState0002)	\
    ( (This)->lpVtbl -> get_nextVersion(This,__MIDL__IUpdateState0002) )

#define IUpdateState_get_downloadedBytes(This,__MIDL__IUpdateState0003)	\
    ( (This)->lpVtbl -> get_downloadedBytes(This,__MIDL__IUpdateState0003) )

#define IUpdateState_get_totalBytes(This,__MIDL__IUpdateState0004)	\
    ( (This)->lpVtbl -> get_totalBytes(This,__MIDL__IUpdateState0004) )

#define IUpdateState_get_installProgress(This,__MIDL__IUpdateState0005)	\
    ( (This)->lpVtbl -> get_installProgress(This,__MIDL__IUpdateState0005) )

#define IUpdateState_get_errorCategory(This,__MIDL__IUpdateState0006)	\
    ( (This)->lpVtbl -> get_errorCategory(This,__MIDL__IUpdateState0006) )

#define IUpdateState_get_errorCode(This,__MIDL__IUpdateState0007)	\
    ( (This)->lpVtbl -> get_errorCode(This,__MIDL__IUpdateState0007) )

#define IUpdateState_get_extraCode1(This,__MIDL__IUpdateState0008)	\
    ( (This)->lpVtbl -> get_extraCode1(This,__MIDL__IUpdateState0008) )

#endif /* COBJMACROS */

#endif 	/* C style interface */

#endif 	/* __IUpdateState_INTERFACE_DEFINED__ */

#ifndef __IUpdaterRegisterAppCallback_INTERFACE_DEFINED__
#define __IUpdaterRegisterAppCallback_INTERFACE_DEFINED__

/* interface IUpdaterRegisterAppCallback */
/* [unique][helpstring][uuid][dual][object] */

EXTERN_C const IID IID_IUpdaterRegisterAppCallback;

#if defined(__cplusplus) && !defined(CINTERFACE)

    MIDL_INTERFACE("3FDEC4CB-8501-4ECD-A4CF-BF70326218D0")
    IUpdaterRegisterAppCallback : public IUnknown
    {
    public:
        virtual HRESULT STDMETHODCALLTYPE Run(
            /* [in] */ LONG status_code) = 0;

    };

#else 	/* C style interface */

    typedef struct IUpdaterRegisterAppCallbackVtbl
    {
        BEGIN_INTERFACE

        HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
            IUpdaterRegisterAppCallback * This,
            /* [in] */ REFIID riid,
            /* [annotation][iid_is][out] */
            _COM_Outptr_  void **ppvObject);

        ULONG ( STDMETHODCALLTYPE *AddRef )(
            IUpdaterRegisterAppCallback * This);

        ULONG ( STDMETHODCALLTYPE *Release )(
            IUpdaterRegisterAppCallback * This);

        HRESULT ( STDMETHODCALLTYPE *Run )(
            IUpdaterRegisterAppCallback * This,
            /* [in] */ LONG status_code);

        END_INTERFACE
    } IUpdaterRegisterAppCallbackVtbl;

    interface IUpdaterRegisterAppCallback
    {
        CONST_VTBL struct IUpdaterRegisterAppCallbackVtbl *lpVtbl;
    };

#ifdef COBJMACROS

#define IUpdaterRegisterAppCallback_QueryInterface(This,riid,ppvObject)	\
    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )

#define IUpdaterRegisterAppCallback_AddRef(This)	\
    ( (This)->lpVtbl -> AddRef(This) )

#define IUpdaterRegisterAppCallback_Release(This)	\
    ( (This)->lpVtbl -> Release(This) )

#define IUpdaterRegisterAppCallback_Run(This,status_code)	\
    ( (This)->lpVtbl -> Run(This,status_code) )

#endif /* COBJMACROS */

#endif 	/* C style interface */

#endif 	/* __IUpdaterRegisterAppCallback_INTERFACE_DEFINED__ */

#ifndef __ICompleteStatus_INTERFACE_DEFINED__
#define __ICompleteStatus_INTERFACE_DEFINED__

/* interface ICompleteStatus */
/* [unique][helpstring][uuid][dual][object] */

EXTERN_C const IID IID_ICompleteStatus;

#if defined(__cplusplus) && !defined(CINTERFACE)

    MIDL_INTERFACE("2FCD14AF-B645-4351-8359-E80A0E202A0B")
    ICompleteStatus : public IUnknown
    {
    public:
        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_statusCode(
            /* [retval][out] */ LONG *__MIDL__ICompleteStatus0000) = 0;

        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_statusMessage(
            /* [retval][out] */ BSTR *__MIDL__ICompleteStatus0001) = 0;

    };

#else 	/* C style interface */

    typedef struct ICompleteStatusVtbl
    {
        BEGIN_INTERFACE

        HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
            ICompleteStatus * This,
            /* [in] */ REFIID riid,
            /* [annotation][iid_is][out] */
            _COM_Outptr_  void **ppvObject);

        ULONG ( STDMETHODCALLTYPE *AddRef )(
            ICompleteStatus * This);

        ULONG ( STDMETHODCALLTYPE *Release )(
            ICompleteStatus * This);

        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_statusCode )(
            ICompleteStatus * This,
            /* [retval][out] */ LONG *__MIDL__ICompleteStatus0000);

        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_statusMessage )(
            ICompleteStatus * This,
            /* [retval][out] */ BSTR *__MIDL__ICompleteStatus0001);

        END_INTERFACE
    } ICompleteStatusVtbl;

    interface ICompleteStatus
    {
        CONST_VTBL struct ICompleteStatusVtbl *lpVtbl;
    };

#ifdef COBJMACROS

#define ICompleteStatus_QueryInterface(This,riid,ppvObject)	\
    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )

#define ICompleteStatus_AddRef(This)	\
    ( (This)->lpVtbl -> AddRef(This) )

#define ICompleteStatus_Release(This)	\
    ( (This)->lpVtbl -> Release(This) )

#define ICompleteStatus_get_statusCode(This,__MIDL__ICompleteStatus0000)	\
    ( (This)->lpVtbl -> get_statusCode(This,__MIDL__ICompleteStatus0000) )

#define ICompleteStatus_get_statusMessage(This,__MIDL__ICompleteStatus0001)	\
    ( (This)->lpVtbl -> get_statusMessage(This,__MIDL__ICompleteStatus0001) )

#endif /* COBJMACROS */

#endif 	/* C style interface */

#endif 	/* __ICompleteStatus_INTERFACE_DEFINED__ */

#ifndef __IUpdaterObserver_INTERFACE_DEFINED__
#define __IUpdaterObserver_INTERFACE_DEFINED__

/* interface IUpdaterObserver */
/* [unique][helpstring][uuid][oleautomation][object] */

EXTERN_C const IID IID_IUpdaterObserver;

#if defined(__cplusplus) && !defined(CINTERFACE)

    MIDL_INTERFACE("7B416CFD-4216-4FD6-BD83-7C586054676E")
    IUpdaterObserver : public IUnknown
    {
    public:
        virtual HRESULT STDMETHODCALLTYPE OnStateChange(
            /* [in] */ IUpdateState *update_state) = 0;

        virtual HRESULT STDMETHODCALLTYPE OnComplete(
            /* [in] */ ICompleteStatus *status) = 0;

    };

#else 	/* C style interface */

    typedef struct IUpdaterObserverVtbl
    {
        BEGIN_INTERFACE

        HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
            IUpdaterObserver * This,
            /* [in] */ REFIID riid,
            /* [annotation][iid_is][out] */
            _COM_Outptr_  void **ppvObject);

        ULONG ( STDMETHODCALLTYPE *AddRef )(
            IUpdaterObserver * This);

        ULONG ( STDMETHODCALLTYPE *Release )(
            IUpdaterObserver * This);

        HRESULT ( STDMETHODCALLTYPE *OnStateChange )(
            IUpdaterObserver * This,
            /* [in] */ IUpdateState *update_state);

        HRESULT ( STDMETHODCALLTYPE *OnComplete )(
            IUpdaterObserver * This,
            /* [in] */ ICompleteStatus *status);

        END_INTERFACE
    } IUpdaterObserverVtbl;

    interface IUpdaterObserver
    {
        CONST_VTBL struct IUpdaterObserverVtbl *lpVtbl;
    };

#ifdef COBJMACROS

#define IUpdaterObserver_QueryInterface(This,riid,ppvObject)	\
    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )

#define IUpdaterObserver_AddRef(This)	\
    ( (This)->lpVtbl -> AddRef(This) )

#define IUpdaterObserver_Release(This)	\
    ( (This)->lpVtbl -> Release(This) )

#define IUpdaterObserver_OnStateChange(This,update_state)	\
    ( (This)->lpVtbl -> OnStateChange(This,update_state) )

#define IUpdaterObserver_OnComplete(This,status)	\
    ( (This)->lpVtbl -> OnComplete(This,status) )

#endif /* COBJMACROS */

#endif 	/* C style interface */

#endif 	/* __IUpdaterObserver_INTERFACE_DEFINED__ */

#ifndef __IUpdaterCallback_INTERFACE_DEFINED__
#define __IUpdaterCallback_INTERFACE_DEFINED__

/* interface IUpdaterCallback */
/* [unique][helpstring][uuid][dual][object] */

EXTERN_C const IID IID_IUpdaterCallback;

#if defined(__cplusplus) && !defined(CINTERFACE)

    MIDL_INTERFACE("8BAB6F84-AD67-4819-B846-CC890880FD3B")
    IUpdaterCallback : public IUnknown
    {
    public:
        virtual HRESULT STDMETHODCALLTYPE Run(
            /* [in] */ LONG result) = 0;

    };

#else 	/* C style interface */

    typedef struct IUpdaterCallbackVtbl
    {
        BEGIN_INTERFACE

        HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
            IUpdaterCallback * This,
            /* [in] */ REFIID riid,
            /* [annotation][iid_is][out] */
            _COM_Outptr_  void **ppvObject);

        ULONG ( STDMETHODCALLTYPE *AddRef )(
            IUpdaterCallback * This);

        ULONG ( STDMETHODCALLTYPE *Release )(
            IUpdaterCallback * This);

        HRESULT ( STDMETHODCALLTYPE *Run )(
            IUpdaterCallback * This,
            /* [in] */ LONG result);

        END_INTERFACE
    } IUpdaterCallbackVtbl;

    interface IUpdaterCallback
    {
        CONST_VTBL struct IUpdaterCallbackVtbl *lpVtbl;
    };

#ifdef COBJMACROS

#define IUpdaterCallback_QueryInterface(This,riid,ppvObject)	\
    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )

#define IUpdaterCallback_AddRef(This)	\
    ( (This)->lpVtbl -> AddRef(This) )

#define IUpdaterCallback_Release(This)	\
    ( (This)->lpVtbl -> Release(This) )

#define IUpdaterCallback_Run(This,result)	\
    ( (This)->lpVtbl -> Run(This,result) )

#endif /* COBJMACROS */

#endif 	/* C style interface */

#endif 	/* __IUpdaterCallback_INTERFACE_DEFINED__ */

#ifndef __IUpdater_INTERFACE_DEFINED__
#define __IUpdater_INTERFACE_DEFINED__

/* interface IUpdater */
/* [unique][helpstring][uuid][dual][object] */

EXTERN_C const IID IID_IUpdater;

#if defined(__cplusplus) && !defined(CINTERFACE)

    MIDL_INTERFACE("63B8FFB1-5314-48C9-9C57-93EC8BC6184B")
    IUpdater : public IUnknown
    {
    public:
        virtual HRESULT STDMETHODCALLTYPE GetVersion(
            /* [retval][out] */ BSTR *version) = 0;

        virtual HRESULT STDMETHODCALLTYPE CheckForUpdate(
            /* [string][in] */ const WCHAR *app_id) = 0;

        virtual HRESULT STDMETHODCALLTYPE RegisterApp(
            /* [string][in] */ const WCHAR *app_id,
            /* [string][in] */ const WCHAR *brand_code,
            /* [string][in] */ const WCHAR *tag,
            /* [string][in] */ const WCHAR *version,
            /* [string][in] */ const WCHAR *existence_checker_path,
            /* [in] */ IUpdaterRegisterAppCallback *callback) = 0;

        virtual HRESULT STDMETHODCALLTYPE RunPeriodicTasks(
            /* [in] */ IUpdaterCallback *callback) = 0;

        virtual HRESULT STDMETHODCALLTYPE Update(
            /* [string][in] */ const WCHAR *app_id,
            /* [in] */ BOOL same_version_update_allowed,
            /* [in] */ IUpdaterObserver *observer) = 0;

        virtual HRESULT STDMETHODCALLTYPE UpdateAll(
            /* [in] */ IUpdaterObserver *observer) = 0;

    };

#else 	/* C style interface */

    typedef struct IUpdaterVtbl
    {
        BEGIN_INTERFACE

        HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
            IUpdater * This,
            /* [in] */ REFIID riid,
            /* [annotation][iid_is][out] */
            _COM_Outptr_  void **ppvObject);

        ULONG ( STDMETHODCALLTYPE *AddRef )(
            IUpdater * This);

        ULONG ( STDMETHODCALLTYPE *Release )(
            IUpdater * This);

        HRESULT ( STDMETHODCALLTYPE *GetVersion )(
            IUpdater * This,
            /* [retval][out] */ BSTR *version);

        HRESULT ( STDMETHODCALLTYPE *CheckForUpdate )(
            IUpdater * This,
            /* [string][in] */ const WCHAR *app_id);

        HRESULT ( STDMETHODCALLTYPE *RegisterApp )(
            IUpdater * This,
            /* [string][in] */ const WCHAR *app_id,
            /* [string][in] */ const WCHAR *brand_code,
            /* [string][in] */ const WCHAR *tag,
            /* [string][in] */ const WCHAR *version,
            /* [string][in] */ const WCHAR *existence_checker_path,
            /* [in] */ IUpdaterRegisterAppCallback *callback);

        HRESULT ( STDMETHODCALLTYPE *RunPeriodicTasks )(
            IUpdater * This,
            /* [in] */ IUpdaterCallback *callback);

        HRESULT ( STDMETHODCALLTYPE *Update )(
            IUpdater * This,
            /* [string][in] */ const WCHAR *app_id,
            /* [in] */ BOOL same_version_update_allowed,
            /* [in] */ IUpdaterObserver *observer);

        HRESULT ( STDMETHODCALLTYPE *UpdateAll )(
            IUpdater * This,
            /* [in] */ IUpdaterObserver *observer);

        END_INTERFACE
    } IUpdaterVtbl;

    interface IUpdater
    {
        CONST_VTBL struct IUpdaterVtbl *lpVtbl;
    };

#ifdef COBJMACROS

#define IUpdater_QueryInterface(This,riid,ppvObject)	\
    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )

#define IUpdater_AddRef(This)	\
    ( (This)->lpVtbl -> AddRef(This) )

#define IUpdater_Release(This)	\
    ( (This)->lpVtbl -> Release(This) )

#define IUpdater_GetVersion(This,version)	\
    ( (This)->lpVtbl -> GetVersion(This,version) )

#define IUpdater_CheckForUpdate(This,app_id)	\
    ( (This)->lpVtbl -> CheckForUpdate(This,app_id) )

#define IUpdater_RegisterApp(This,app_id,brand_code,tag,version,existence_checker_path,callback)	\
    ( (This)->lpVtbl -> RegisterApp(This,app_id,brand_code,tag,version,existence_checker_path,callback) )

#define IUpdater_RunPeriodicTasks(This,callback)	\
    ( (This)->lpVtbl -> RunPeriodicTasks(This,callback) )

#define IUpdater_Update(This,app_id,same_version_update_allowed,observer)	\
    ( (This)->lpVtbl -> Update(This,app_id,same_version_update_allowed,observer) )

#define IUpdater_UpdateAll(This,observer)	\
    ( (This)->lpVtbl -> UpdateAll(This,observer) )

#endif /* COBJMACROS */

#endif 	/* C style interface */

#endif 	/* __IUpdater_INTERFACE_DEFINED__ */

#ifndef __UpdaterLib_LIBRARY_DEFINED__
#define __UpdaterLib_LIBRARY_DEFINED__

/* library UpdaterLib */
/* [helpstring][version][uuid] */

EXTERN_C const IID LIBID_UpdaterLib;

EXTERN_C const CLSID CLSID_UpdaterUserClass;

#ifdef __cplusplus

class DECLSPEC_UUID("158428a4-6014-4978-83ba-9fad0dabe791")
UpdaterUserClass;
#endif

EXTERN_C const CLSID CLSID_UpdaterSystemClass;

#ifdef __cplusplus

class DECLSPEC_UUID("415FD747-D79E-42D7-93AC-1BA6E5FD4E93")
UpdaterSystemClass;
#endif
#endif /* __UpdaterLib_LIBRARY_DEFINED__ */

/* Additional Prototypes for ALL interfaces */

unsigned long             __RPC_USER  BSTR_UserSize(     unsigned long *, unsigned long            , BSTR * );
unsigned char * __RPC_USER  BSTR_UserMarshal(  unsigned long *, unsigned char *, BSTR * );
unsigned char * __RPC_USER  BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * );
void                      __RPC_USER  BSTR_UserFree(     unsigned long *, BSTR * );

/* end of Additional Prototypes */

#ifdef __cplusplus
}
#endif

#endif


text:
from xhttpnode.response import Response

class Application(object):
    """WSGI application for XHTTP node"""

    def __call__(self, environ, start_response):
        response = Response()
        response.content_type  = "text/html"
        response.encoding = 'utf-8'
        response.body = "
OK
"

        #get the controller that handle current XHTTP request
        controller = environ['xhttp.controller']

        return response

redpajama_set_name: RedPajamaGithub


text:
#ifndef MODMULTIFRAMEFG_H
#define MODMULTIFRAMEFG_H

#include "dcmtk/config/osconfig.h"
#include "dcmtk/dcmdata/dcsequen.h"
#include "dcmtk/dcmdata/dcdeftag.h"
#include "dcmtk/dcmdata/dcdatset.h"
#include "dcmtk/dcmiod/iodrules.h"
#include "dcmtk/dcmiod/ioddef.h"
#include "dcmtk/dcmiod/modbase.h"

/** Class managing the data from the Multi-Frame Functional Group Module. The
 *  actual functional groups are not included and can be interfaced by the
 *  FGInterface class in module "dcmfg".
 */
class DCMTK_DCMIOD_EXPORT IODMultiFrameFGModule : public IODModule
{

public:

  // Forward declaration
  class ConcatenationInfo;

  /** Constructor
   *  @param  data The item to be used for data storage. If NULL, the
   *          class creates an empty data container.
   *  @param  rules The rule set for this class. If NULL, the class creates
   *          one from scratch and adds its values.
   */
  IODMultiFrameFGModule(OFshared_ptr<DcmItem> data,
                        OFshared_ptr<IODRules> rules);

  /** Constructor
   */
  IODMultiFrameFGModule();

  /** Virtual destructor
   */
  virtual ~IODMultiFrameFGModule();

  /** Get name of the module ("MultiframeFunctionalGroupsModule")
   *  @return Name of the module ("MultiframeFunctionalGroupsModule")
   */
  virtual OFString getName() const;

  /** Reset attribute rules to their default values
   */
  virtual void resetRules();

  // -- getters --

  /** Get Instance Number
   *  @param  value Reference to variable in which the value should be stored
   *  @param  pos Index of the value to get (0..vm-1), -1 for all components
   *  @return EC_Normal if successful, an error code otherwise
   */
  virtual OFCondition getInstanceNumber(Sint32 &value,
                                        const unsigned int pos = 0);

   /** Get Content Date
    *  @param  value Reference to variable in which the value should be stored
    *  @param  pos Index of the value to get (0..vm-1), -1 for all components
    *  @return EC_Normal if successful, an error code otherwise
    */
  virtual OFCondition getContentDate(OFString &value,
                                     const signed long pos = 0);

   /** Get Content Time
    *  @param  value Reference to variable in which the value should be stored
    *  @param  pos Index of the value to get (0..vm-1), -1 for all components
    *  @return EC_Normal if successful, an error code otherwise
    */
  virtual OFCondition getContentTime(OFString &value,
                                     const signed long pos = 0);

   /** Get Number of Frames
    *  @param  value Reference to variable in which the value should be stored
    *  @param  pos Index of the value to get (0..vm-1), -1 for all components
    *  @return EC_Normal if successful, an error code otherwise
    */
  virtual OFCondition getNumberOfFrames(Sint32 &value,
                                        const unsigned int pos = 0);

   /** Get Representative Frame Number
    *  @param  value Reference to variable in which the value should be stored
    *  @param  pos Index of the value to get (0..vm-1), -1 for all components
    *  @return EC_Normal if successful, an error code otherwise
    */
  virtual OFCondition getRepresentativeFrameNumber(Uint16 &value,
                                                   const unsigned int pos = 0);

  /** Get Concatenation Information
   *  @return Reference to the concatenation information
   */
  virtual ConcatenationInfo& getConcatenationInfo();

   // -- setters --

  /** Set Instance Number
   *  @param  value Value to be stored
   *  @param  checkValue Check 'value' for conformance with VR (IS) and VM (1) if enabled
   *  @return EC_Normal if successful, an error code otherwise
   */
  virtual OFCondition setInstanceNumber(const OFString& value,
                                        const OFBool checkValue = OFTrue);

  /** Set Content Date
   *  @param  value Value to be stored
   *  @param  checkValue Check 'value' for conformance with VR (DA) and VM (1) if enabled
   *  @return EC_Normal if successful, an error code otherwise
   */
  virtual OFCondition setContentDate(const OFString &value,
                                     const OFBool checkValue = OFTrue);

  /** Set Content Time
   *  @param  value Value to be stored
   *  @param  checkValue Check 'value' for conformance with VR (TM) and VM (1) if enabled
   *  @return EC_Normal if successful, an error code otherwise
   */
  virtual OFCondition setContentTime(const OFString &value,
                                     const OFBool checkValue = OFTrue);

  /** Set Number of Frames
   *  @param  value Value to be stored
   *  @return EC_Normal if successful, an error code otherwise
   */
  virtual OFCondition setNumberOfFrames(const Uint16 value);

  /** Set Representative Frame Number
   *  @param  value Value to be stored
   *  @return EC_Normal if successful, an error code otherwise
   */
  virtual OFCondition setRepresentativeFrameNumber(const Uint16 value);

  /** Set concatenation information
   *  @param concatenationInfo The concatenation info to set
   *  @return EC_Normal if successful, error otherwise
   */
  virtual OFCondition setConcatenationInfo(const ConcatenationInfo& concatenationInfo);

  /** Helper class encapsulating concatenation information, including
   *  Concatenation Frame Offset Number,
   *  Concatenation UID,
   *  SOP Instance UID of Concatenation Source,
   *  In-concatenation Number,
   *  In-concatenation Total Number
   */
  class DCMTK_DCMIOD_EXPORT ConcatenationInfo : public IODComponent
  {

  public:

    /** Constructor
     *  @param  data The item to be used for data storage. If NULL, the
     *          class creates an empty data container.
     *  @param  rules The rule set where this classes rules are added to. If NULL, the
     *          class creates an empty rule set.
     */
    ConcatenationInfo(OFshared_ptr<DcmItem> data,
                      OFshared_ptr<IODRules> rules);

    /** Constructor
     *  @param  parent The parent component of this class (if applicable, might be NULL)
     */
    ConcatenationInfo(IODComponent* parent = NULL);

    /** Virtual destructor
     */
    virtual ~ConcatenationInfo();

    /** Resets attribute rules to their default values
     */
    virtual void resetRules();

    /** Get name of this component ("ConcatenationInfo")
     */
    virtual OFString getName() const;

    // -- getters --

    /** Get Concatenation Frame Offset Number
     *  @param  value Reference to variable in which the value should be stored
     *  @param  pos Index of the value to get (0..vm-1), -1 for all components
     *  @return EC_Normal if successful, an error code otherwise
     */
    OFCondition getConcatenationFrameOffsetNumber(Uint32& value,
                                                  const unsigned int pos);

    /** Get Concatenation UID
     *  @param  value Reference to variable in which the value should be stored
     *  @param  pos Index of the value to get (0..vm-1), -1 for all components
     *  @return EC_Normal if successful, an error code otherwise
     */
    OFCondition getConcatenationUID(OFString& value,
                                    const signed long pos);

    /** Get SOP Instance UID of Concatenation Source
     *  @param  value Reference to variable in which the value should be stored
     *  @param  pos Index of the value to get (0..vm-1), -1 for all components
     *  @return EC_Normal if successful, an error code otherwise
     */
    OFCondition getSOPInstanceUIDOfConcatenationSource(OFString& value,
                                                       const signed long pos);

    /** Get Concatenation Number
     *  @param  value Reference to variable in which the value should be stored
     *  @param  pos Index of the value to get (0..vm-1), -1 for all components
     *  @return EC_Normal if successful, an error code otherwise
     */
    OFCondition getInConcatenationNumber(Uint16& value,
                                         const unsigned int pos);

    /** Get Concatenation Total Number
     *  @param  value Reference to variable in which the value should be stored
     *  @param  pos Index of the value to get (0..vm-1), -1 for all components
     *  @return EC_Normal if successful, an error code otherwise
     */
    OFCondition getInConcatenationTotalNumber(Uint16& value,
                                              const unsigned int pos);

    // -- setters --

    /** Set Concatenation Frame Offset Number
     *  @param  value Value to be stored
     *  @return EC_Normal if successful, an error code otherwise
     */
    virtual OFCondition setConcatenationFrameOffsetNumber(const Uint32 value);

    /** Set Concatenation UID
     *  @param  value Value to be stored
     *  @param  checkValue If OFTrue, the value is checked for conformance
     *          (VR = UID and VM = 1).
     *  @return EC_Normal if successful, an error code otherwise
     */
    virtual OFCondition setConcatenationUID(const OFString &value,
                                            const OFBool checkValue = OFTrue);

    /** Set SOP Instance UID of Concatenation Source
     *  @param  value Value to be stored
     *  @param  checkValue If OFTrue, the value is checked for conformance
     *          (VR = UID and VM = 1).
     *  @return EC_Normal if successful, an error code otherwise
     */
    virtual OFCondition setSOPInstanceUIDOfConcatenationSource(const OFString &value,
                                                               const OFBool checkValue = OFTrue);

    /** Set In-concatenation Number
     *  @param  value Value to be stored
     *  @return EC_Normal if successful, an error code otherwise
     */
    virtual OFCondition setInConcatenationNumber(const Uint16 value);

    /** Set In-concatenation Total Number
     *  @param  value Value to be stored
     *  @return EC_Normal if successful, an error code otherwise
     */
    virtual OFCondition setInConcatenationTotalNumber(const Uint16 value);

  }; // ConcatenationInfoClass

private:

  /// Concatenation Information
  ConcatenationInfo m_ConcatenationInfo;

  /// Module name ("MultiframeFunctionalGroupsModule"
  static const OFString m_ModuleName;
};

#endif // MODMULTIFRAMEFG_H


text:
<?php

/**
 * Test: Api\Lists\Objects\Payer
 */

use Contributte\GopayInline\Api\Objects\Contact;
use Contributte\GopayInline\Api\Objects\Payer;
use Tester\Assert;

require __DIR__ . '/../../../../bootstrap.php';

// Simple
test(function () {
	$payer = new Payer();
	$payer->allowedPaymentInstruments = [1, 2, 3];
	$payer->defaultPaymentInstrument = 1;
	$payer->allowedSwifts = [4, 5, 6];
	$payer->defaultSwift = 4;
	$payer->contact = $contact = new Contact();

	$array = $payer->toArray();

	Assert::equal([1, 2, 3], $array['allowed_payment_instruments']);
	Assert::equal(1, $array['default_payment_instrument']);
	Assert::equal([4, 5, 6], $array['allowed_swifts']);
	Assert::equal(4, $array['default_swift']);
	Assert::equal($contact->toArray(), $array['contact']);
});


text:
<?php declare(strict_types=1);

namespace FilipSedivy\EET\Enum;

final class Warning
{
    public const LIST = [
        1 => 'DIC poplatnika v datove zprave se neshoduje s DIC v certifikatu',
        2 => 'Chybny format DIC poverujiciho poplatnika',
        3 => 'Chybna hodnota PKP',
        4 => 'Datum a cas prijeti trzby je novejsi nez datum a cas prijeti zpravy',
        5 => 'Datum a cas prijeti trzby je vyrazne v minulosti '
    ];
}


text:
package com.InfinityRaider.AgriCraft.items;

import com.InfinityRaider.AgriCraft.blocks.BlockCrop;
import com.InfinityRaider.AgriCraft.init.Blocks;
import com.InfinityRaider.AgriCraft.tileentity.TileEntityCrop;
import com.InfinityRaider.AgriCraft.tileentity.TileEntityTank;
import com.InfinityRaider.AgriCraft.utility.LogHelper;
import com.InfinityRaider.AgriCraft.utility.SeedHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemSeeds;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;

public class ItemDebugger extends ModItem {
    public ItemDebugger() {
        super();
        this.setCreativeTab(null);
    }

    @Override
    public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) {
        if(!world.isRemote) {
            LogHelper.debug("Clicked block at: (" + x + "," + y + "," + z + "):");
            //print data for crop
            if (world.getBlock(x, y, z) == Blocks.blockCrop) {
                TileEntityCrop cropTE = (TileEntityCrop) world.getTileEntity(x, y, z);
                BlockCrop blockCropBlock = (BlockCrop) world.getBlock(x, y, z);
                if (cropTE.crossCrop) {
                    LogHelper.debug(" - This is a crosscrop");
                }
                if (cropTE.hasPlant()) {
                    LogHelper.debug(" - This crop has a plant");
                    LogHelper.debug(" - Seed: " + ((ItemSeeds) cropTE.seed).getUnlocalizedName());
                    LogHelper.debug(" - RegisterName: " + Item.itemRegistry.getNameForObject(cropTE.seed) + ':' + cropTE.seedMeta);
                    LogHelper.debug(" - Plant: " + SeedHelper.getPlant((ItemSeeds) cropTE.seed).getUnlocalizedName());
                    LogHelper.debug(" - Meta: " + blockCropBlock.getPlantMetadata(world, x, y, z));
                    LogHelper.debug(" - Growth: " + cropTE.growth);
                    LogHelper.debug(" - Gain: " + cropTE.gain);
                    LogHelper.debug(" - Strength: " + cropTE.strength);
                    LogHelper.debug(" - Fertile: " + cropTE.isFertile());
                    LogHelper.debug(" - Mature: " + cropTE.isMature());
                }
            }

            //print data for tank
            else if (world.getBlock(x, y, z) == Blocks.blockWaterTank) {
                TileEntityTank tank = (TileEntityTank) world.getTileEntity(x, y, z);
                LogHelper.debug("Tank: " + (tank.isWood() ? "wood" : "iron") + " (single capacity: " + tank.getSingleCapacity() + ")");
                LogHelper.debug("  - MultiBlock: " + tank.isMultiBlock());
                LogHelper.debug("  - Connected tanks: " + tank.getConnectedTanks());
                int[] size = tank.getDimensions();
                LogHelper.debug("  - MultiBlock Size: " + size[0] + "x" + size[1] + "x" + size[2]);
                LogHelper.debug("  - FluidLevel: " + tank.getFluidLevel() + "/" + tank.getTotalCapacity());
                boolean left = tank.isMultiBlockPartner(world.getTileEntity(x - 1, y, z));
                boolean right = tank.isMultiBlockPartner(world.getTileEntity(x + 1, y, z));
                boolean back = tank.isMultiBlockPartner(world.getTileEntity(x, y, z - 1));
                boolean front = tank.isMultiBlockPartner(world.getTileEntity(x, y, z + 1));
                boolean top = tank.isMultiBlockPartner(world.getTileEntity(x, y + 1, z));
                boolean below = tank.isMultiBlockPartner(world.getTileEntity(x, y - 1, z));
                LogHelper.debug("  - Found multiblock partners on: " + (left ? "left, " : "") + (right ? "right, " : "") + (back ? "back, " : "") + (front ? "front, " : "") + (top ? "top, " : "") + (below ? "below" : ""));
                LogHelper.debug("Water level is on layer "+ (int) Math.floor(((float)tank.getFluidLevel()-0.1F)/((float)(tank.getSingleCapacity()*tank.getXSize()*tank.getZSize())))+ ".");
                LogHelper.debug("Tank clicked is on  layer "+tank.getYPosition()+".");
            }
        }

        return false;
    }

    @Override
    @SideOnly(Side.CLIENT)
    public void registerIcons(IIconRegister reg) {
    }
}


text:
Burbucoin integration/staging tree
================================
https://www.burbucoin.org
1) KWG
2) Merged mining

![burbucoin](src/qt/res/images/wallet_2.png)

What is burbucoin?
----------------

The U.S. subprime mortgage crisis was a set of events and conditions that led to a financial crisis and subsequent recession that began in 2008. It was characterized by a rise in subprime mortgage delinquencies and foreclosures, and the resulting decline of securities backed by said mortgages. These mortgage-backed securities (MBS) and collateralized debt obligations (CDO) initially offered attractive rates of return due to the higher interest rates on the mortgages; however, the lower credit quality ultimately caused massive defaults. While elements of the crisis first became more visible during 2007, several major financial institutions collapsed in September 2008, with significant disruption in the flow of credit to businesses and consumers and the onset of a severe global recession.

We have incorporated the lessons learned from housing bubble and subprime mortgage crisis, making burbucoin more reliable, more secure and decentralized. With this in mind, burbucoin is presented as the fittest medium for trading financial assets like WARRANTS, OPTIONS and FUTURES.

## Specs

Algorithm: Scrypt

Max Coin Limit: 8,400,000,000

Block Reward:  5,000

Block Time:  2.5 minutes

P2P Port:  8555

RPC Port:  8556

Madurity confirms: 30

Reward adjustment:  halving each 4 years

Difficulty adjustment: KGW algorithm from block #24,000

Merged mining prepared for merged mining from block #37,000

## Downloads

https://www.burbucoin.org

License
-------

Burbucoin is released under the terms of the MIT license. See `COPYING` for more
information or see http://opensource.org/licenses/MIT.

Development process
-------------------

Developers work in their own trees, then submit pull requests when they think
their feature or bug fix is ready.

If it is a simple/trivial/non-controversial change, then one of the Burbucoin
development team members simply pulls it.

If it is a *more complicated or potentially controversial* change, then the patch
submitter will be asked to start a discussion (if they haven't already) on the
[mailing list](http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development).

The patch will be accepted if there is broad consensus that it is a good thing.
Developers should expect to rework and resubmit patches if the code doesn't
match the project's coding conventions (see `doc/coding.txt`) or are
controversial.

The `master` branch is regularly built and tested, but is not guaranteed to be
completely stable. [Tags](https://github.com/bitcoin/bitcoin/tags) are created
regularly to indicate new official, stable release versions of Burbucoin.

Testing
-------

Testing and code review is the bottleneck for development; we get more pull
requests than we can review and test. Please be patient and help out, and
remember this is a security-critical project where any mistake might cost people
lots of money.

### Automated Testing

Developers are strongly encouraged to write unit tests for new code, and to
submit new unit tests for old code.

Unit tests for the core code are in `src/test/`. To compile and run them:

    cd src; make -f makefile.unix test

Unit tests for the GUI code are in `src/qt/test/`. To compile and run them:

    qmake BITCOIN_QT_TEST=1 -o Makefile.test bitcoin-qt.pro
    make -f Makefile.test
    ./litecoin-qt_test

Donations

BTC **[1BurBufgbHbm9gvXsEaWHkjvDk9cjTxVki](https://blockchain.info/address/1BurBufgbHbm9gvXsEaWHkjvDk9cjTxVki)**
DOGE DN8vkc6iuKe9WrKPPVMt8GaKkoRLxujqbb

BUR BZSX28aufv9CfQ7FdweLNpnHWwT99kRJu4


text:
define(["Unit"], function(Unit)
{
    "use strict";

    function Puzzle(cells, unitIn, grid, solution)
    {
        InputValidator.validateNotNull("cells", cells);
        // unit optional.
        // grid optional.
        // solution optional.

        var size, N, n;
        var unit = unitIn;

        this.cells = function()
        {
            return cells;
        };

        this.unit = function()
        {
            if (unit === undefined)
            {
                unit = new Unit(this.N());
            }

            return unit;
        };

        this.grid = function()
        {
            return grid;
        };

        this.solution = function()
        {
            return solution;
        };

        this.get = function(index)
        {
            return cells[index];
        };

        this.N = function()
        {
            if (N === undefined)
            {
                N = Math.sqrt(this.size());
            }

            return N;
        };

        this.n = function()
        {
            if (n === undefined)
            {
                n = Math.sqrt(this.N());
            }

            return n;
        };

        this.size = function()
        {
            if (size === undefined)
            {
                size = cells.length;
            }

            return size;
        };
    }

    Puzzle.prototype.adjustCandidates = function()
    {
        var answer = this;
        var size = this.size();

        for (var i = 0; i < size; i++)
        {
            var cell = answer.cells()[i];

            if (cell.isValue === true)
            {
                answer = answer.removeValueFromPeers(i);
            }
        }

        return answer;
    };

    Puzzle.prototype.candidateIndicesInUnit = function(candidate, unit, limitIn)
    {
        var length = unit.length;
        var limit = (limitIn !== undefined ? limitIn : length + 1);
        var cells = this.cells();
        var indices = [];

        for (var i = 0; i < length && indices.length <= limit; i++)
        {
            var index = unit[i];
            var cell = cells[index];

            if (cell.isCandidates === true && cell.candidates().includes(candidate))
            {
                indices.push(index);
            }
        }

        return (indices.length <= limit ? indices : []);
    };

    Puzzle.prototype.clueIndices = function()
    {
        var answer = [];
        var cells = this.cells();
        var size = this.size();

        for (var i = 0; i < size; i++)
        {
            var cell = cells[i];

            if (cell.isValue === true && cell.isClue())
            {
                answer.push(i);
            }
        }

        return answer;
    };

    Puzzle.prototype.conflictIndices = function(cell)
    {
        InputValidator.validateNotNull("cell", cell);

        var answer = [];

        if (cell.isValue === true)
        {
            var size = this.size();

            for (var i = 0; i < size; i++)
            {
                if (this.isConflictCell(i))
                {
                    answer.push(i);
                }
            }
        }

        return answer;
    };

    Puzzle.prototype.findCellsWithCandidateLength = function(length)
    {
        var answer = [];
        var size = this.size();

        for (var i = 0; i < size; i++)
        {
            var cell = this.get(i);

            if (cell.isCandidates === true && cell.candidates().length === length)
            {
                answer.push(i);
            }
        }

        return answer;
    };

    Puzzle.prototype.isConflictCell = function(index)
    {
        InputValidator.validateIsNumber("index", index);

        var answer = false;
        var cell0 = this.get(index);

        if (cell0.isValue === true)
        {
            var value0 = cell0.value();
            var peers = this.unit().getPeers(index);

            for (var i = 0; i < peers.length; i++)
            {
                var peer = peers[i];
                var cell = this.get(peer);

                if (cell.isValue === true && cell.value() === value0)
                {
                    answer = true;
                    break;
                }
            }
        }

        return answer;
    };

    Puzzle.prototype.isSameCandidateCell = function(selectedValue, index)
    {
        // selectedValue optional.
        InputValidator.validateIsNumber("index", index);

        var cell = this.get(index);

        return (cell.isCandidates === true && cell.candidates().includes(selectedValue));
    };

    Puzzle.prototype.isSameValueCell = function(selectedValue, index)
    {
        // selectedValue optional.
        InputValidator.validateIsNumber("index", index);

        var cell = this.get(index);

        return (cell.isValue === true && cell.value() === selectedValue);
    };

    Puzzle.prototype.removeValueFromPeers = function(index)
    {
        var answer = this;
        var cell0 = answer.cells()[index];

        if (cell0.isValue === true)
        {
            var value = cell0.value();
            var peers = this.unit().getPeers(index);
            var length = peers.length;

            for (var i = 0; i < length; i++)
            {
                var myIndex = peers[i];
                var cell = answer.cells()[myIndex];

                if (cell.isCandidates === true && cell.candidates().includes(value))
                {
                    var newCell = cell.withoutCandidate(value);
                    answer = answer.withCell(myIndex, newCell);
                }
            }
        }

        return answer;
    };

    Puzzle.prototype.sameCandidateIndices = function(cell)
    {
        // cell optional.

        var answer = [];

        if (cell && cell.isValue === true)
        {
            var size = this.size();

            for (var i = 0; i < size; i++)
            {
                if (this.isSameCandidateCell(cell.value(), i))
                {
                    answer.push(i);
                }
            }
        }

        return answer;
    };

    Puzzle.prototype.sameValueIndices = function(cell)
    {
        // cell optional.

        var answer = [];

        if (cell && cell.isValue === true)
        {
            var size = this.size();

            for (var i = 0; i < size; i++)
            {
                if (this.isSameValueCell(cell.value(), i))
                {
                    answer.push(i);
                }
            }
        }

        return answer;
    };

    Puzzle.prototype.withCandidate = function(index, candidate)
    {
        var answer = this;
        var cell = this.get(index);

        if (cell.isCandidates === true)
        {
            var newCell = this.get(index).withCandidate(candidate);
            answer = this.withCell(index, newCell);
        }

        return answer;
    };

    Puzzle.prototype.withCell = function(index, cell)
    {
        var newCells = this.cells().slice();
        newCells.splice(index, 1, cell);

        return new Puzzle(newCells, this.unit(), this.grid(), this.solution());
    };

    Puzzle.prototype.withCells = function(indices, cells)
    {
        var newCells = this.cells().slice();
        var length = indices.length;

        for (var i = 0; i < length; i++)
        {
            var index = indices[i];
            var cell = cells[i];
            newCells.splice(index, 1, cell);
        }

        return new Puzzle(newCells, this.unit(), this.grid(), this.solution());
    };

    Puzzle.prototype.withoutCandidate = function(index, candidate)
    {
        var answer = this;
        var cell = this.get(index);

        if (cell.isCandidates === true)
        {
            var newCell = cell.withoutCandidate(candidate);
            answer = this.withCell(index, newCell);
        }

        return answer;
    };

    Puzzle.prototype.withoutCandidates = function(indices, candidates)
    {
        var newCells = this.cells().slice();
        var length = indices.length;

        for (var i = 0; i < length; i++)
        {
            var index = indices[i];
            var cell = newCells[index].withoutCandidates(candidates);
            newCells.splice(index, 1, cell);
        }

        return new Puzzle(newCells, this.unit(), this.grid(), this.solution());
    };

    return Puzzle;
});


text:
package com.gemstone.gemfire.internal.cache;

import java.io.IOException;
import java.lang.ref.Reference;
import java.lang.ref.ReferenceQueue;
import java.util.Collection;
import java.util.Collections;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

import org.apache.logging.log4j.Logger;

import com.gemstone.gemfire.cache.EvictionAction;
import com.gemstone.gemfire.cache.CustomEvictionAttributes;
import com.gemstone.gemfire.cache.asyncqueue.internal.AsyncEventQueueImpl;
import com.gemstone.gemfire.cache.hdfs.HDFSIOException;
import com.gemstone.gemfire.cache.hdfs.internal.HDFSBucketRegionQueue;
import com.gemstone.gemfire.cache.hdfs.internal.HDFSEntriesSet;
import com.gemstone.gemfire.cache.hdfs.internal.HDFSEntriesSet.HDFSIterator;
import com.gemstone.gemfire.cache.hdfs.internal.HDFSGatewayEventImpl;
import com.gemstone.gemfire.cache.hdfs.internal.HDFSParallelGatewaySenderQueue;
import com.gemstone.gemfire.cache.hdfs.internal.PersistedEventImpl;
import com.gemstone.gemfire.cache.hdfs.internal.SortedHoplogPersistedEvent;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.i18n.LogWriterI18n;
import com.gemstone.gemfire.internal.cache.LocalRegion.IteratorType;
import com.gemstone.gemfire.internal.cache.RegionMap.Attributes;
import com.gemstone.gemfire.internal.cache.lru.EnableLRU;
import com.gemstone.gemfire.internal.cache.lru.LRUEntry;
import com.gemstone.gemfire.internal.cache.versions.RegionVersionVector;
import com.gemstone.gemfire.internal.cache.versions.VersionStamp;
import com.gemstone.gemfire.internal.cache.versions.VersionTag;
import com.gemstone.gemfire.internal.cache.wan.AbstractGatewaySender;
import com.gemstone.gemfire.internal.cache.wan.AbstractGatewaySenderEventProcessor;
import com.gemstone.gemfire.internal.cache.wan.parallel.ConcurrentParallelGatewaySenderQueue;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.util.concurrent.FutureResult;

/**
 * This class encapsulates all the functionality of HDFSRegionMap, so
 * that it can be provided to HDFSLRURegionMap.
 *
 * @author sbawaska
 */
public class HDFSRegionMapDelegate {

  private static final Logger logger = LogService.getLogger();

  private final BucketRegion owner;

  private ConcurrentParallelGatewaySenderQueue hdfsQueue;

  private final RegionMap backingRM;

  /** queue of dead iterators */
  private final ReferenceQueue<HDFSIterator> refs;

  private static final boolean DEBUG = Boolean.getBoolean("hdfsRegionMap.DEBUG");

  /**
   * used for serializing fetches from HDFS
   */
  private ConcurrentMap<Object, FutureResult> futures = new ConcurrentHashMap<Object, FutureResult>();

  public HDFSRegionMapDelegate(LocalRegion owner, Attributes attrs,
      InternalRegionArguments internalRegionArgs, RegionMap backingRM) {
    assert owner instanceof BucketRegion;
    this.owner = (BucketRegion) owner;
    this.backingRM = backingRM;
    refs = new ReferenceQueue<HDFSEntriesSet.HDFSIterator>();
  }

  public RegionEntry getEntry(Object key, EntryEventImpl event) {

    RegionEntry re = getEntry(key, event, true);
    // get from tx should put the entry back in map
    // it should be evicted once tx completes
    /**MergeGemXDHDFSToGFE txstate does not apply for this*/
    /* if (re != null && getTXState(event) != null) {
    if (re != null) {
      // put the region entry in backing CHM of AbstractRegionMap so that
      // it can be locked in basicPut/destroy
      RegionEntry oldRe = backingRM.putEntryIfAbsent(key, re);
      if (oldRe != null) {
        if (re instanceof OffHeapRegionEntry && !oldRe.equals(re)) {
          ((OffHeapRegionEntry)re).release();
        }
        return oldRe;
      }
      re.setMarkedForEviction();
      owner.updateSizeOnCreate(key,
          owner.calculateRegionEntryValueSize(re));
      ((AbstractRegionMap)backingRM).incEntryCount(1);
      ((AbstractRegionMap)backingRM).lruEntryCreate(re);
    }*/
    return re;
  }

  /*
  private TXStateInterface getTXState(EntryEventImpl event) {
    return event != null ? event.getTXState(this.owner) : this.owner
        .getTXState();
  }*/

  /**
   *
   * @param key
   * @param event
   * @param forceOnHeap if true will return heap version of off-heap region entries
   */
  private RegionEntry getEntry(Object key, EntryEventImpl event, boolean forceOnHeap) {
    closeDeadIterators();

    RegionEntry re = backingRM.getEntryInVM(key);
    if (logger.isTraceEnabled() || DEBUG) {
      logger.info(LocalizedMessage.create(LocalizedStrings.DEBUG, "HDFS: Found the key in CHM: " + key
          + " ,value=" + (re == null? "null" : "[" + re._getValue() + " or (" + re.getValueAsToken() + ")]")));
    }
    if ((re == null || (re.isRemoved() && !re.isTombstone()))
        && owner.getBucketAdvisor().isPrimary() && allowReadFromHDFS()) {
      if (logger.isTraceEnabled() || DEBUG) {
        logger.info(LocalizedMessage.create(LocalizedStrings.DEBUG, "HDFS: fetching from hdfs key:" + key));
      }
      try {
        this.owner.getPartitionedRegion().hdfsCalled(key);
        re = getEntryFromFuture(key);
        if (re != null) {
          return re;
        }

        assert this.owner.getPartitionedRegion().getDataPolicy()
            .withHDFS();
        byte[] k = EntryEventImpl.serialize(key);

        // for destroy ops we will retain the entry in the region map so
        // tombstones can be tracked
        //final boolean forceOnHeap = (event==null || !event.getOperation().isDestroy());

        // get from queue
        re = getFromHDFSQueue(key, k, forceOnHeap);
        if (re == null) {
          // get from HDFS
          re = getFromHDFS(key, k, forceOnHeap);
        }
        if (re != null && re.isTombstone()) {
          RegionVersionVector vector = this.owner.getVersionVector();
//          if (vector == null) {
//            this.owner.getLogWriterI18n().info(LocalizedStrings.DEBUG,
//            "found a tombstone in a region w/o a version vector: " + re + "; region: " + this.owner);
//          }
          if (vector == null
              || vector.isTombstoneTooOld(re.getVersionStamp().getMemberID(),
                                    re.getVersionStamp().getRegionVersion())) {
            re = null;
          }
        }
        if (logger.isTraceEnabled() || DEBUG) {
          logger.info(LocalizedMessage.create(LocalizedStrings.DEBUG, "HDFS: returning from hdfs re:" + re));
        }
      } catch (ForceReattemptException e) {
        throw new PrimaryBucketException(e.getLocalizedMessage(), e);
      } catch (IOException e) {
        throw new HDFSIOException("Error reading from HDFS", e);
      } finally {
        notifyFuture(key, re);
        // If we mark it here, the table scan may miss it causing updates/delete using table
        // scan to fail.
//        if (re != null) {
//          re.setMarkedForEviction();
//        }
        if(re != null && event != null && !re.isTombstone()) {
          if (logger.isTraceEnabled() || DEBUG) {
            logger.info(LocalizedMessage.create(LocalizedStrings.DEBUG, "HDFS: loaded from hdfs re:" + re));
          }
          BucketRegion br = (BucketRegion)owner;
          //CustomEvictionAttributes csAttr = br.getCustomEvictionAttributes();
          //if(csAttr!=null)
          event.setLoadedFromHDFS(true);
        }
      }
    }
    if(re!=null && re.isMarkedForEviction() && !re.isTombstone()) {
      if(event!=null) {
        event.setLoadedFromHDFS(true);
      }
    }

    return re;
  }

  /**
   * This method returns true if the RegionEntry should be read from HDFS.
   * fixes #49101 by not allowing reads from HDFS for persistent regions
   * that do not define an eviction criteria.
   *
   * @return true if RegionEntry should be read from HDFS
   */
  private boolean allowReadFromHDFS() {
    if (!owner.getDataPolicy().withPersistence()
        || owner.getCustomEvictionAttributes() != null
        || isEvictionActionLocalDestroy()){
        /**MergeGemXDHDFSToGFE this is used for global index. Hence not required here*/
        //|| owner.isUsedForIndex()) {
      // when region does not have persistence, we have to read from HDFS (even
      // though there is no eviction criteria) for constraint checks
      return true;
    }
    return false;
  }

  private boolean isEvictionActionLocalDestroy() {
    PartitionedRegion pr = owner.getPartitionedRegion();
    if (pr.getEvictionAttributes() != null) {
      return pr.getEvictionAttributes().getAction() == EvictionAction.LOCAL_DESTROY;
    }
    return false;
  }

  protected RegionEntry getEntry(EntryEventImpl event) {
    RegionEntry re = getEntry(event.getKey(), event, false);
    if (re != null && event.isLoadedFromHDFS()) {
      // put the region entry in backing CHM of AbstractRegionMap so that
      // it can be locked in basicPut/destroy
      RegionEntry oldRe = backingRM.putEntryIfAbsent(event.getKey(), re);
      if (oldRe != null) {
        if (re instanceof OffHeapRegionEntry && !oldRe.equals(re)) {
          ((OffHeapRegionEntry) re).release();
        }
        return oldRe;
      }
      // since the entry is faulted in from HDFS, it must have
      // satisfied the eviction criteria in the past, so mark it for eviction
      re.setMarkedForEviction();

      owner.updateSizeOnCreate(event.getKey(), owner.calculateRegionEntryValueSize(re));
      ((AbstractRegionMap) backingRM).incEntryCount(1);
      ((AbstractRegionMap) backingRM).lruEntryCreate(re);
    }
    return re;
  }

  @SuppressWarnings("unchecked")
  public Collection<RegionEntry> regionEntries() {
    closeDeadIterators();
    if (!owner.getPartitionedRegion().includeHDFSResults()) {
      if (logger.isDebugEnabled() || DEBUG) {
        logger.info(LocalizedMessage.create(LocalizedStrings.DEBUG, "Ignoring HDFS results for #regionEntries"));
      }
      return backingRM.regionEntriesInVM();
    }

    try {
      return createEntriesSet(IteratorType.ENTRIES);
    } catch (ForceReattemptException e) {
      throw new PrimaryBucketException(e.getLocalizedMessage(), e);
    }
  }

  public int size() {
    closeDeadIterators();
    if (!owner.getPartitionedRegion().includeHDFSResults()) {
      if (logger.isDebugEnabled() || DEBUG) {
        logger.info(LocalizedMessage.create(LocalizedStrings.DEBUG, "Ignoring HDFS results for #size"));
      }
      return backingRM.sizeInVM();
    }

    try {
      return createEntriesSet(IteratorType.KEYS).size();
    } catch (ForceReattemptException e) {
      throw new PrimaryBucketException(e.getLocalizedMessage(), e);
    }
  }

  public boolean isEmpty() {
    closeDeadIterators();
    if (!owner.getPartitionedRegion().includeHDFSResults()) {
      if (logger.isDebugEnabled() || DEBUG) {
        logger.info(LocalizedMessage.create(LocalizedStrings.DEBUG, "Ignoring HDFS results for #isEmpty"));
      }
      return backingRM.sizeInVM() == 0;
    }

    try {
      return createEntriesSet(IteratorType.KEYS).isEmpty();
    } catch (ForceReattemptException e) {
      throw new PrimaryBucketException(e.getLocalizedMessage(), e);
    }
  }

  private void notifyFuture(Object key, RegionEntry re) {
    FutureResult future = this.futures.remove(key);
    if (future != null) {
      future.set(re);
    }
  }

  private RegionEntry getEntryFromFuture(Object key) {
    FutureResult future = new FutureResult(this.owner.getCancelCriterion());
    FutureResult old = this.futures.putIfAbsent(key, future);
    if (old != null) {
      if (logger.isTraceEnabled() || DEBUG) {
        logger.info(LocalizedMessage.create(LocalizedStrings.DEBUG, "HDFS: waiting for concurrent fetch to complete for key:" + key));
      }
      try {
        return (RegionEntry) old.get();
      } catch (InterruptedException e) {
        Thread.currentThread().interrupt();
        this.owner.getCache().getCancelCriterion().checkCancelInProgress(null);
      }
    }
    return null;
  }

  private RegionEntry getFromHDFS(Object key, byte[] k, boolean forceOnHeap) throws IOException, ForceReattemptException {
    SortedHoplogPersistedEvent ev;
    try {
      ev = (SortedHoplogPersistedEvent) owner.getHoplogOrganizer().read(k);
    } catch (IOException e) {
      owner.checkForPrimary();
      throw e;
    }
    if (ev != null) {
      if (logger.isTraceEnabled() || DEBUG) {
        logger.info(LocalizedMessage.create(LocalizedStrings.DEBUG, "HDFS: got from hdfs ev:" + ev));
      }
      return getEntryFromEvent(key, ev, forceOnHeap, false);
    }
    return null;
  }

  /**
   * set the versionTag on the newly faulted-in entry
   */
  private void setVersionTag(RegionEntry re, VersionTag versionTag) {
    if (owner.concurrencyChecksEnabled) {
      versionTag.setMemberID(
            owner.getVersionVector().getCanonicalId(versionTag.getMemberID()));
      VersionStamp versionedRe = (VersionStamp) re;
      versionedRe.setVersions(versionTag);
    }
  }

  private RegionEntry getFromHDFSQueue(Object key, byte[] k, boolean forceOnHeap) throws ForceReattemptException {
    ConcurrentParallelGatewaySenderQueue q = getHDFSQueue();
    if (q == null) return null;
    HDFSGatewayEventImpl hdfsGatewayEvent = (HDFSGatewayEventImpl) q.get(owner.getPartitionedRegion(), k, owner.getId());
    if (hdfsGatewayEvent != null) {
      if (logger.isTraceEnabled() || DEBUG) {
        logger.info(LocalizedMessage.create(LocalizedStrings.DEBUG, "HDFS: got from hdfs queue: " + hdfsGatewayEvent));
      }
      return getEntryFromEvent(key, hdfsGatewayEvent, forceOnHeap, false);
    }
    return null;
  }

  private ConcurrentParallelGatewaySenderQueue getHDFSQueue()
      throws ForceReattemptException {
    if (this.hdfsQueue == null) {
      String asyncQId = this.owner.getPartitionedRegion().getHDFSEventQueueName();
      final AsyncEventQueueImpl asyncQ =  (AsyncEventQueueImpl)this.owner.getCache().getAsyncEventQueue(asyncQId);
      final AbstractGatewaySender gatewaySender = (AbstractGatewaySender)asyncQ.getSender();
      AbstractGatewaySenderEventProcessor ep = gatewaySender.getEventProcessor();
      if (ep == null) return null;
      hdfsQueue = (ConcurrentParallelGatewaySenderQueue)ep.getQueue();
    }

    // Check whether the queue has become primary here.
    // There could be some time between bucket becoming a primary
    // and underlying queue becoming a primary, so isPrimaryWithWait()
    // waits for some time for the queue to become a primary on this member
    final HDFSBucketRegionQueue brq = hdfsQueue.getBucketRegionQueue(
        this.owner.getPartitionedRegion(), this.owner.getId());
    if (brq != null) {
      if (owner.getBucketAdvisor().isPrimary()
          && !brq.getBucketAdvisor().isPrimaryWithWait()) {
        InternalDistributedMember primaryHolder = brq.getBucketAdvisor()
            .basicGetPrimaryMember();
        throw new PrimaryBucketException("Bucket " + brq.getName()
            + " is not primary. Current primary holder is " + primaryHolder);
      }
    }

    return hdfsQueue;
  }

  public RegionEntry getEntryFromEvent(Object key, HDFSGatewayEventImpl event, boolean forceOnHeap, boolean forUpdate) {
    Object val;
    if (event.getOperation().isDestroy()) {
      val = Token.TOMBSTONE;
    } else if (event.getOperation().isInvalidate()) {
      val = Token.INVALID;
    } else {
      val = event.getValue();
    }
    RegionEntry re = null;
    final TXStateInterface tx = owner.getTXState();
    if (tx == null) {
      re = createRegionEntry(key, val, event.getVersionTag(), forceOnHeap);
      return re;
    }
    else
    if (val != null) {
      if (((re = this.backingRM.getEntryInVM(key)) == null)
          || (re.isRemoved() && !re.isTombstone())) {
        boolean shouldCreateOnHeapEntry = !(owner.getOffHeap() && forUpdate);
        re = createRegionEntry(key, val, event.getVersionTag(), shouldCreateOnHeapEntry);
        if (forUpdate) {
          if (re != null && tx != null) {
            // put the region entry in backing CHM of AbstractRegionMap so that
            // it can be locked in basicPut/destroy
            RegionEntry oldRe = backingRM.putEntryIfAbsent(key, re);
            if (oldRe != null) {
              if (re instanceof OffHeapRegionEntry && !oldRe.equals(re)) {
                ((OffHeapRegionEntry)re).release();
              }
              return oldRe;
            }
            re.setMarkedForEviction();
            owner.updateSizeOnCreate(key,
                owner.calculateRegionEntryValueSize(re));
            ((AbstractRegionMap)backingRM).incEntryCount(1);
            ((AbstractRegionMap)backingRM).lruEntryCreate(re);
          }
        }
      }
    }
    return re;
  }

  public RegionEntry getEntryFromEvent(Object key, SortedHoplogPersistedEvent event, boolean forceOnHeap, boolean forUpdate) {
    Object val = getValueFromEvent(event);
    RegionEntry re = null;
    final TXStateInterface tx = owner.getTXState();
    if (tx == null) {
      re = createRegionEntry(key, val, event.getVersionTag(), forceOnHeap);
      return re;
    }
    else // FOR TX case, we need to create off heap entry if required
    if (val != null) {
      if (((re = this.backingRM.getEntryInVM(key)) == null)
          || (re.isRemoved() && !re.isTombstone())) {
        boolean shouldCreateOnHeapEntry = !(owner.getOffHeap() && forUpdate);
        re = createRegionEntry(key, val, event.getVersionTag(), shouldCreateOnHeapEntry);
        if(forUpdate) {
          if (re != null && tx != null) {
            // put the region entry in backing CHM of AbstractRegionMap so that
            // it can be locked in basicPut/destroy
            RegionEntry oldRe = backingRM.putEntryIfAbsent(key, re);
            if (oldRe != null) {
              if (re instanceof OffHeapRegionEntry && !oldRe.equals(re)) {
                ((OffHeapRegionEntry)re).release();
              }
              return oldRe;
            }
            re.setMarkedForEviction();
            owner.updateSizeOnCreate(key,
                owner.calculateRegionEntryValueSize(re));
            ((AbstractRegionMap)backingRM).incEntryCount(1);
            ((AbstractRegionMap)backingRM).lruEntryCreate(re);
          }
        }
      }
    }
    return re;
  }

  private RegionEntry createRegionEntry(Object key, Object value, VersionTag tag, boolean forceOnHeap) {
    RegionEntryFactory ref = backingRM.getEntryFactory();
    if (forceOnHeap) {
      ref = ref.makeOnHeap();
    }
    value = getValueDuringGII(key, value);
    RegionEntry re = ref.createEntry(this.owner, key, value);
    setVersionTag(re, tag);
    if (re instanceof LRUEntry) {
      assert backingRM instanceof AbstractLRURegionMap;
      EnableLRU ccHelper = ((AbstractLRURegionMap)backingRM)._getCCHelper();
      ((LRUEntry)re).updateEntrySize(ccHelper);
    }
    return re;
  }

  private Object getValueDuringGII(Object key, Object value) {
    if (owner.getIndexUpdater() != null && !owner.isInitialized()) {
      return AbstractRegionMap.listOfDeltasCreator.newValue(key, owner, value,
          null);
    }
    return value;
  }

  private Set createEntriesSet(IteratorType type)
      throws ForceReattemptException {
    ConcurrentParallelGatewaySenderQueue q = getHDFSQueue();
    if (q == null) return Collections.emptySet();
    HDFSBucketRegionQueue brq = q.getBucketRegionQueue(this.owner.getPartitionedRegion(), owner.getId());
    return new HDFSEntriesSet(owner, brq, owner.getHoplogOrganizer(), type, refs);
  }

  private void closeDeadIterators() {
    Reference<? extends HDFSIterator> weak;
    while ((weak = refs.poll()) != null) {
      if (logger.isTraceEnabled() || DEBUG) {
        logger.info(LocalizedMessage.create(LocalizedStrings.DEBUG, "Closing weak ref for iterator "
            + weak.get()));
      }
      weak.get().close();
    }
  }

  /**
   * gets the value from event, deserializing if necessary.
   */
  private Object getValueFromEvent(PersistedEventImpl ev) {
    if (ev.getOperation().isDestroy()) {
      return Token.TOMBSTONE;
    } else if (ev.getOperation().isInvalidate()) {
      return Token.INVALID;
    }
    return ev.getValue();
  }
}


text:
package software.amazon.awssdk.codegen.model.service;

import static java.util.Collections.singletonList;

import com.fasterxml.jackson.core.JsonToken;
import com.fasterxml.jackson.jr.stree.JrsArray;
import com.fasterxml.jackson.jr.stree.JrsValue;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.regex.Pattern;
import software.amazon.awssdk.utils.CollectionUtils;
import software.amazon.awssdk.utils.Validate;

/**
 * Represents the structure for each operation in paginators-1.json file
 *
 * This class is used to generate auto-paginated APIs.
 */
public class PaginatorDefinition {

    private static final String VALID_REGEX = "[a-zA-Z.]+";
    /**
     * The members in the request which needs to be set to get the next page.
     */
    private List<String> inputToken;

    /**
     * The members in the response which are used to get the next page.
     */
    private List<String> outputToken;

    /**
     * The paginated list of members in the response
     */
    private List<String> resultKey;

    /**
     * The name of the member in the response that indicates if the response is truncated.
     * If the value of member is true, there are more results that can be retrieved.
     * If the value of member is false, then there are no additional results.
     *
     * This is an optional field. If this value is missing, use the outputToken instead to check
     * if more results are available or not.
     */
    private String moreResults;

    /**
     * The member in the request that is used to limit the number of results per page.
     */
    private String limitKey;

    public PaginatorDefinition() {
    }

    public List<String> getInputToken() {
        return inputToken;
    }

    public void setInputToken(List<String> inputToken) {
        this.inputToken = inputToken;
    }

    public List<String> getOutputToken() {
        return outputToken;
    }

    public void setOutputToken(List<String> outputToken) {
        this.outputToken = outputToken;
    }

    public List<String> getResultKey() {
        return resultKey;
    }

    public void setResultKey(List<String> resultKey) {
        this.resultKey = resultKey;
    }

    public String getMoreResults() {
        return moreResults;
    }

    public void setMoreResults(String moreResults) {
        this.moreResults = moreResults;
    }

    public String getLimitKey() {
        return limitKey;
    }

    public void setLimitKey(String limitKey) {
        this.limitKey = limitKey;
    }

    /**
     * Returns a boolean value indicating if the information present in this object
     * is sufficient to generate the paginated APIs.
     *
     * @return True if all necessary information to generate paginator APIs is present. Otherwise false.
     */
    public boolean isValid() {
        Pattern p = Pattern.compile(VALID_REGEX);

        return !CollectionUtils.isNullOrEmpty(inputToken) &&
               !CollectionUtils.isNullOrEmpty(outputToken) &&
               outputToken.stream().allMatch(t -> p.matcher(t).matches());
    }

    private List<String> asList(JrsValue node) {
        if (node.isArray()) {
            List<String> output = new ArrayList<>();
            Iterator<JrsValue> elements = ((JrsArray) node).elements();
            elements.forEachRemaining(v  -> output.add(asString(v)));
            return output;
        } else {
            return singletonList(asString(node));
        }
    }

    private String asString(JrsValue value) {
        Validate.isTrue(value.asToken() == JsonToken.VALUE_STRING, "Expected a string node: " + value);
        return value.asText();
    }

    // CHECKSTYLE:OFF - These are all gross versions of the setter methods that match the C2J name.
    /**
     * Gross version of {@link #setLimitKey} that matches the JSON attribute name.
     */
    public void setLimit_key(String limitKey) {
        this.limitKey = limitKey;
    }

    /**
     * Gross version of {@link #setInputToken} that matches the JSON attribute name.
     */
    public void setInput_token(JrsValue inputToken) {
        this.inputToken = asList(inputToken);
    }

    /**
     * Gross version of {@link #setOutputToken} that matches the JSON attribute name.
     */
    public void setOutput_token(JrsValue outputToken) {
        this.outputToken = asList(outputToken);
    }

    /**
     * Gross version of {@link #setResultKey} that matches the JSON attribute name.
     */
    public void setResult_key(JrsValue resultKey) {
        this.resultKey = asList(resultKey);
    }

    /**
     * Gross version of {@link #setMoreResults} that matches the JSON attribute name.
     */
    public void setMore_results(String moreResults) {
        this.moreResults = moreResults;
    }
    // CHECKSTYLE:ON
}


text:
'use strict';

/**
 * Ajax request with verifying automatically and showing messages.
 *
 * Note! Not included in najax-tiny.js.

 *
 * | Method | Default ver | Tiny ver |
 * |:---|:---:|:---:|
 * | All methods | Yes | - |
 *
 * @namespace $najax@ex
 * @tutorial najax-ex
 *
 * @example
 * $najax.send('path.php').done();
 * $najax.send('path.php', null, {verify: $najax.define.verify}).done();
 * $najax.send('path.php', null, {verify: function(v){ return (v.verify)?true:false; } }).done();
 *
 * $najax.sendex('path.php').done();
 * $najax.sendex('path.php', null, {verify: $najax.define.verify}).done();
 */

/**
 * Response state defines.
 * @name state
 * @memberof $najax
 * @readonly
 * @enum {number}
 *
 * @see $najax.define.msg
 */
njx.state = {
	/** success. */
	success: 0,
	/** connection error. */
	ajax: 1,
	/** empty error. */
	empty: 2,
	/** verify error. */
	verify: 3,
	/** app error. */
	app: 4
};

/**
 * Default messages for $najax.send / $najax.sendex.
 * @name msg
 * @memberof $najax.define
 *
 * @type {object}
 * @property {string} [0] Success.
 * @property {string} [1]	 Connection error(ajax).
 * @property {string} [2] Empty error(ajax).
 * @property {string} [3] Verify error(ajax).
 * @property {string} [4] App error(ajax).
 *
 * @see $najax.state
 * @see $najax@ex.send
 * @see $najax@ex.sendex
 *
 * @example
 * $najax.define.msg[0] = 'Success.';
 */
njx.define.msg = {
	0: 'Success.',
	1: 'Connection error(ajax).',
	2: 'Empty error(ajax).',
	3: 'Verify error(ajax).',
	4: 'App error(ajax).'
};

/**
 * Default alert method for $najax.send.
 * @name fail
 * @memberof $najax.define
 *
 * @param {number} state Response state. See $najax.state.
 * @param {string} msg Message. See $najax.define.msg.
 * @param {*} v Response value.
 *
 * @see $najax.state
 * @see $najax.define.msg
 *
 * @see $najax@ex.send
 *
 * @example
 * $najax.define.fail = function(state, msg, v){
 *   alert(msg);
 * };
 */
njx.define.fail = function(state, msg, v){
	alert(msg);
};

/**
 * Default verify method for $najax.send / $najax.sendex.
 *
 * Specification

 * function(v){ return (v.result == 1); }
 *
 * @name verify
 * @memberof $najax.define
 *
 * @param {*} v Response value.
 * @return {boolean}
 *
 * @see $najax@ex.send
 * @see $najax@ex.sendex
 *
 * @example
 * $najax.define.verify = function(v){
 *   return (v.result == 1);
 * };
 */
njx.define.verify = function(v){
	return (v.result == 1);
};

/**
 * Default success-message method for $najax.sendex.
 *
 * Specification

 * Show message by $any.floating.msg
 *
 * @name successex
 * @memberof $najax.define
 *
 * @param {string} msg Message. See $najax.define.msg.
 * @param {*} v Response value.
 *
 * @see $najax.define.msg
 * @see $najax@ex.sendex
 *
 * @example
 * $najax.define.successex = function(msg, v){
 *   $any.floating.msg(msg);
 * }
 */
njx.define.successex = function(msg, v){
	$any.floating.msg(msg);
};

/**
 * Default fail-message method for $najax.sendex.
 *
 * Specification

 * Show message by $any.floating.msg
 *
 * @name failex
 * @memberof $najax.define
 *
 * @param {string} msg Message. See $najax.define.msg.
 * @param {*} v Response value.
 *
 * @see $najax.define.msg
 * @see $najax@ex.sendex
 *
 * @example
 * $najax.define.failex = function(type, msg, v){
 *   $any.floating.msg(msg, null, {css: 'error'});
 * }
 */
njx.define.failex = function(type, msg, v){
	$any.floating.msg(msg, null, {css: 'error'});
};

/**
 * @ignore
 */
function sdMsg(v, xhr, r, o){
	var tp = 0;

	if (xhr.status != 200){
		tp = njx.state.ajax;
	}else if (!v){
		tp = njx.state.empty;
	}else if (o.verify && !o.verify(v)){
		tp = njx.state.verify;
	}else if (r === false){
		tp = njx.state.app;
	}

	if (tp == 0){
		if (o.success){
			o.success(o.msg[tp], v);
		}
	}else{
		if (o.fail){
			o.fail(tp, o.msg[tp], v);
		}
	}
}

/**
 * Simple ajax request with verifying automatically and showing messages.
 *
 * @function send
 * @memberof $najax@ex
 *
 * @param {string} url URL.
 * @param {assoc} [vs=null] Parameters for GET / POST.
 * @param {assoc} [opt] Nx options.
 * @param {function} [opt.success=null] Success function.
 * @param {function} [opt.fail=$najax.define.fail] Fail function.
 * @param {function} [opt.verify=null] Verify function. If null, not verify. Ex: {verify: $najax.define.verify}
 * @param {assoc} [opt.msg=$najax.define.msg] Messages.
 * @returns {Nx}
 *
 * @see $najax.define.fail
 * @see $najax.define.verify
 * @see $najax.define.msg
 * @see $najax.request
 *
 * @tutorial najax-ex
 * @example
 * $najax.send('path.php').done();
 * $najax.send('path.php', null, {verify: $najax.define.verify}).done();
 * $najax.send('path.php', null, {verify: function(v){ return (v.verify)?true:false; } }).done();
 * $najax.send('path.php', null, {msg: {0: 'OK', 4: 'Application error!!'} }).done();
 */
njx.send = function(url, vs, opt){
	opt = ext(ext({}, {
		success: null,
		fail: njx.define.fail,
		verify: null,
		msg: njx.define.msg
	}, true), opt, true);

	return njx.request(url, vs, opt).__set('__after', function(v, xhr, r){
		sdMsg(v, xhr, r, opt);
	});
};

/**
 * Ajax request with verifying automatically and showing messages by $any.floating.msg, showing loading message.
 *
 * Requires

 * jQuery / any.js
 *
 * @function sendex
 * @memberof $najax@ex
 *
 * @param {string} url URL.
 * @param {assoc} [vs=null] Parameters for GET / POST.
 * @param {assoc} [opt] Nx options.
 * @param {function} [opt.success=$najax.define.successex] Success function.
 * @param {function} [opt.fail=$najax.define.failex] Fail function.
 * @param {function} [opt.verify=null] Verify function. If null, not verify. Ex: {verify: $najax.define.verify}
 * @param {assoc} [opt.msg=$najax.define.msg] Messages.
 * @param {string} [opt.loading='loading'] Loading CSS name.
 * @returns {Nx}
 *
 * @see $najax.define.successex
 * @see $najax.define.failex
 * @see $najax.define.verify
 * @see $najax.define.msg
 * @see $najax@ex.send
 * @see $najax.request
 *
 * @tutorial najax-ex
 * @example
 * $najax.sendex('path.php').done();
 * $najax.sendex('path.php', null, {verify: $najax.define.verify}).done();
 * $najax.sendex('path.php', null, {verify: function(v){ return (v.verify)?true:false; } }).done();
 * $najax.sendex('path.php', null, {msg: {0: 'OK', 4: 'Application error!!'} }).done();
 */
njx.sendex = function(url, vs, opt){
	opt = ext(ext({}, {
		success: njx.define.successex,
		fail: njx.define.failex,
		verify: null,
		msg: njx.define.msg,
		loading: 'loading'
	}, true), opt);

	return njx.send(url, vs, opt).__set('__before', function(){
		$any.floating.loading(true, {css: opt.loading});
	}).__set('__after', function(v, xhr, r){
		$any.floating.loading(false);

		sdMsg(v, xhr, r, opt);
		opt = null;
	});
};


text:
package com.atlassian.sal.testresources.pluginsettings;

import com.atlassian.sal.api.pluginsettings.PluginSettings;

import java.util.Map;
import java.util.HashMap;

public class MockPluginSettings implements PluginSettings
{
    private final Map<String, Object> map = new HashMap<String, Object>();

    public Object get(String key)
    {
        return map.get(key);
    }

    public Object put(String key, Object value)
    {
        return map.put(key, value);
    }

    public Object remove(String key)
    {
        return map.remove(key);
    }
}


text:
package log

import (
	"io"
	"io/ioutil"
	"os"
	"strings"

	"github.com/cockroachdb/cockroach/pkg/util/caller"
)

// TestLogScope represents the lifetime of a logging output.  It
// ensures that the log files are stored in a directory specific to a
// test, and asserts that logging output is not written to this
// directory beyond the lifetime of the scope.
type TestLogScope string

// tShim is the part of testing.T used by TestLogScope.
// We can't use testing.T directly because we have
// a linter which forbids its use in public interfaces.
type tShim interface {
	Fatal(...interface{})
	Failed() bool
	Error(...interface{})
	Errorf(fmt string, args ...interface{})
}

// Scope creates a TestLogScope which corresponds to the lifetime of a
// logging directory. If testName is empty, the logging directory is
// named after the caller of Scope, up `skip` caller levels. It also
// disables logging to stderr for severity levels below ERROR.
func Scope(t tShim, testName string) TestLogScope {
	if testName == "" {
		testName = "logUnknown"
		if _, _, f := caller.Lookup(1); f != "" {
			parts := strings.Split(f, ".")
			testName = "log" + parts[len(parts)-1]
		}
	}
	tempDir, err := ioutil.TempDir("", testName)
	if err != nil {
		t.Fatal(err)
	}
	if err := dirTestOverride(tempDir); err != nil {
		t.Fatal(err)
	}
	if err := EnableLogFileOutput(tempDir, Severity_ERROR); err != nil {
		t.Fatal(err)
	}
	return TestLogScope(tempDir)
}

// Close cleans up a TestLogScope. The directory and its contents are
// deleted, unless the test has failed and the directory is non-empty.
func (l TestLogScope) Close(t tShim) {
	defer func() {
		// Check whether there is something to remove.
		emptyDir, err := isDirEmpty(string(l))
		if err != nil {
			t.Fatal(err)
		}
		if t.Failed() && !emptyDir {
			// If the test failed, we keep the log files for further investigation,
			// but only if there were any.
			t.Errorf("test log files left over in: %s", l)
		} else {
			// Clean up.
			if err := os.RemoveAll(string(l)); err != nil {
				t.Error(err)
			}
		}
	}()
	// Flush/Close the log files.
	if err := dirTestOverride(""); err != nil {
		t.Fatal(err)
	}
}

// dirTestOverride sets the default value for the logging output directory
// for use in tests.
func dirTestOverride(dir string) error {
	// Ensure any remaining logs are written.
	Flush()

	logDir.Lock()
	logDir.name = dir
	logDir.Unlock()

	// When we change the directory we close the current logging
	// output, so that a rotation to the new directory is forced on
	// the next logging event.
	logging.mu.Lock()
	err := logging.closeFilesLocked()
	logging.mu.Unlock()

	return err
}

func isDirEmpty(dirname string) (bool, error) {
	f, err := os.Open(dirname)
	if err != nil {
		if os.IsNotExist(err) {
			return true, nil
		}
		return false, err
	}
	list, err := f.Readdir(1)
	errClose := f.Close()
	if err != nil && err != io.EOF {
		return false, err
	}
	if errClose != nil {
		return false, errClose
	}
	return len(list) == 0, nil
}


text:
package cloud.artik.example.hellocloud;

import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.Window;

import java.util.List;

import cloud.artik.example.hellocloud.Util.Retrofit.Response.Recipe;
import cloud.artik.example.hellocloud.Util.Retrofit.RestfulAdapter;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;

import static cloud.artik.example.hellocloud.Util.Config.ACCESS_TOKEN;
import static cloud.artik.example.hellocloud.Util.Config.DEVICE_ID_LIST;
import static cloud.artik.example.hellocloud.Util.Config.EMAIL;
import static cloud.artik.example.hellocloud.Util.Config.ID;
import static cloud.artik.example.hellocloud.Util.Config.REFRESH_TOKEN;
import static cloud.artik.example.hellocloud.Util.Config.SIGNIN;
import static cloud.artik.example.hellocloud.Util.Config.USER_DATA;

/**
 * Created by HMS on 2017-08-05.
 */

public class SplashActivity extends Activity {
    private static final String TAG = "SplashActivity";
    Handler h;
    protected void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_splash);
        h = new Handler();
        h.postDelayed(run1, 2000);
    }

    Runnable run1 = new Runnable() {
        @Override
        public void run() {

            SharedPreferences sf = getSharedPreferences(USER_DATA, 0);
            Boolean signinCheck = sf.getBoolean(SIGNIN, false);
            if(signinCheck){
                Log.d(TAG, "Signin true");

                String id = sf.getString(ID, "");
                String email = sf.getString(EMAIL, "");
                String accessToken = sf.getString(ACCESS_TOKEN, "");
                String refreshToken = sf.getString(REFRESH_TOKEN, "");
                String deviceId = sf.getString(DEVICE_ID_LIST, "");
                Log.d(TAG, "ID : " + id);
                Log.d(TAG, "Email : " + email);
                Log.d(TAG, "AccessToken : " + accessToken);
                Log.d(TAG, "refreshToken : " + refreshToken);
                Log.d(TAG, "deviceId : " + deviceId);
            }else{
                Log.d(TAG, "Signin false");
            }
            Call<Recipe> call = RestfulAdapter.getInstance().getRecipe();
            call.enqueue(new Callback<Recipe>() {
                @Override
                public void onResponse(Call<Recipe> call, Response<Recipe> response) {
                    Recipe recipe = response.body();

                    List<Recipe.Data> data = recipe.getData();
                    for(int i=0; i<data.size(); i++){
                        Log.d(TAG, data.get(i).getContent());

                    }

                }

                @Override
                public void onFailure(Call<Recipe> call, Throwable t) {

                }
            });

            Intent intent1 = new Intent(SplashActivity.this, MainActivity.class);
            startActivity(intent1);
            finish();
            //overridePendintTransition -> effect on fade in, fade out, sequence is important
            overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
        }
    };

    public void onBackPressed(){
        super.onBackPressed();
        h.removeCallbacks(run1);
    }
}


text:
package org.sagebionetworks.web.client.view;

import org.gwtbootstrap3.client.ui.Anchor;
import org.gwtbootstrap3.client.ui.BlockQuote;
import org.gwtbootstrap3.client.ui.Button;
import org.gwtbootstrap3.client.ui.Heading;
import org.gwtbootstrap3.client.ui.html.Div;
import org.sagebionetworks.web.client.DisplayUtils;
import org.sagebionetworks.web.client.SynapseJSNIUtils;
import org.sagebionetworks.web.client.widget.LoadingSpinner;
import org.sagebionetworks.web.client.widget.header.Header;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.user.client.ui.Widget;
import com.google.inject.Inject;

public class EmailInvitationViewImpl extends Composite implements EmailInvitationView {
	@UiField
	LoadingSpinner loading;
	@UiField
	Div notLoggedInContainer;
	@UiField
	SimplePanel synapseAlertContainer;
	@UiField
	Heading invitationTitle;
	@UiField
	BlockQuote invitationMessageWrapper;
	@UiField
	Heading invitationMessage;
	@UiField
	Anchor loginLink;
	@UiField
	Button registerButton;

	private Presenter presenter;
	private Header headerWidget;
	SynapseJSNIUtils jsniUtils;

	@Inject
	public EmailInvitationViewImpl(EmailInvitationViewImplUiBinder binder, Header headerWidget, SynapseJSNIUtils jsniUtils) {
		initWidget(binder.createAndBindUi(this));
		this.headerWidget = headerWidget;
		this.jsniUtils = jsniUtils;
		loginLink.addClickHandler(event -> presenter.onLoginClick());
		registerButton.addClickHandler(event -> presenter.onRegisterClick());
	}

	@Override
	public void setSynapseAlertContainer(Widget w) {
		synapseAlertContainer.setWidget(w);
	}

	@Override
	public void setInvitationTitle(String title) {
		invitationTitle.setText(title);
	}

	@Override
	public void setInvitationMessage(String message) {
		invitationMessage.clear();
		invitationMessageWrapper.setVisible(true);
		invitationMessage.add(new HTML(jsniUtils.sanitizeHtml(message)));
	}

	@Override
	public void setPresenter(final Presenter presenter) {
		this.presenter = presenter;
		headerWidget.configure();
		headerWidget.refresh();
		Window.scrollTo(0, 0); // scroll user to top of page
	}

	@Override
	public void showLoading() {
		loading.setVisible(true);
	}

	@Override
	public void hideLoading() {
		loading.setVisible(false);
	}

	@Override
	public void showInfo(String message) {
		DisplayUtils.showInfo(message);
	}

	@Override
	public void showErrorMessage(String message) {
		DisplayUtils.showErrorMessage(message);
	}

	@Override
	public void clear() {
		notLoggedInContainer.setVisible(false);
		invitationMessageWrapper.setVisible(false);
	}

	@Override
	public void showNotLoggedInUI() {
		notLoggedInContainer.setVisible(true);
	}

	public interface EmailInvitationViewImplUiBinder extends UiBinder<Widget, EmailInvitationViewImpl> {
	}
}


text:
The sample pipelines give you a quick start to build and deploy machine learning pipelines with Kubeflow Pipeline.
* Follow the guide to [deploy the Kubeflow pipelines service](https://www.kubeflow.org/docs/guides/pipelines/deploy-pipelines-service/).
* Build and deploy your pipeline [using the provided samples](https://www.kubeflow.org/docs/guides/pipelines/pipelines-samples/).

# Sample Structure
The samples are organized into the core set and the contrib set.

**Core samples** demonstrates the full KFP functionalities and are covered by the sample test infra.
The current status is not all samples are covered by the tests but they will be all covered in the near future.
A selected set of these core samples will also be preloaded to the KFP during deployment.
The core samples will also include intermediate samples that are
more complex than basic samples such as flip coins but simpler than TFX samples.
It serves to demonstrate a set of the outstanding features and offers users the next level KFP experience.

**Contrib samples** are not tested by KFP and could potentially be moved to
the core samples if the samples are of good quality and tests are covered and it demonstrates certain KFP functionality.
Another reason to put some samples in this directory is that some samples require certain
platform support that is hard to support in our test infra.

In the Core directory, each sample will be in a separate directory.
In the Contrib directory, there is an intermediate directory for each contributor,
e.g. ibm and arena, within which each sample is in a separate directory.
An example of the resulting structure is as follows:
```
pipelines/samples/
Core/
	dsl_static_type_checking/
		dsl_static_type_checking.ipynb
	xgboost_training_cm/
		xgboost_training_cm.py
	condition/
		condition.py
	recursion/
		recursion.py
Contrib/
	IBM/
		ffdl-seldon/
			ffdl_pipeline.ipynb
			ffdl_pipeline.py
			README.md
```

# Run Samples

## Compile the pipeline specification

Follow the guide to [building a pipeline](https://www.kubeflow.org/docs/guides/pipelines/build-pipeline/) to install the Kubeflow
Pipelines SDK and compile the sample Python into a workflow specification.
The specification takes one of the three forms: YAML file, YAML compressed into a `.tar.gz` file, and YAML compressed into a `.zip` file

For convenience, you can use the preloaded samples in the pipeline system. This saves you the steps required
to compile and compress the pipeline specification.

## Upload the pipeline to the Kubeflow Pipeline

Open the Kubeflow pipelines UI, and follow the prompts to create a new pipeline and upload the generated workflow
specification, `my-pipeline.zip` (example: `sequential.zip`).

## Run the pipeline

Follow the pipeline UI to create pipeline runs.

Useful parameter values:

* For the "exit_handler" and "sequential" samples: `gs://ml-pipeline-playground/shakespeare1.txt`
* For the "parallel_join" sample: `gs://ml-pipeline-playground/shakespeare1.txt` and `gs://ml-pipeline-playground/shakespeare2.txt`

## Notes: component source codes

All samples use pre-built components. The command to run for each container is built into the pipeline file.

# Sample contribution
For better readability and integrations with the sample test infrastructure, samples are encouraged to adopt the following conventions.

* The sample file should be either `*.py` or `*.ipynb`, and its file name is consistent with its directory name.
* For `*.py` sample, it's recommended to have a main invoking `kfp.compiler.Compiler().compile()` to compile the
pipeline function into pipeline yaml spec.
* For `*.ipynb` sample, parameters (e.g., `project_name`)
should be defined in a dedicated cell and tagged as parameter.
(If the author would like the sample test infra to run it by setting the `run_pipeline` flag to True in
the associated `config.yaml` file, the sample test infra will expect the sample to use the
`kfp.Client().create_run_from_pipeline_func` method for starting the run so that the sample test can watch the run.)
Detailed guideline is
[here](https://github.com/nteract/papermill). Also, all the environment setup and
preparation should be within the notebook, such as by `!pip install packages`

## How to add a sample test
Here are the ordered steps to add the sample tests for samples.
Only the core samples are expected to be added to the sample test infrastructure.

1. Make sure the sample follows the [sample conventions](#sample-contribution).
2. If the sample requires argument inputs, they can be specified in a config yaml file
placed under `test/sample-test/configs`. See
[`xgboost_training_cm.config.yaml`](https://github.com/kubeflow/pipelines/blob/master/test/sample-test/configs/xgboost_training_cm.config.yaml)
as an example.
The config yaml file will be validated according to `schema.config.yaml`.
If no config yaml is provided, pipeline parameters will be substituted by their default values.
3. Add your test name (in consistency with the file name and dir name) in
[`test/sample_test.yaml`](https://github.com/kubeflow/pipelines/blob/ecd93a50564652553260f8008c9a2d75ab907971/test/sample_test.yaml#L69)
4. (*Optional*) The current sample test infra only checks if runs succeed without custom validation logic.
If needed, runtime checks should be included in the sample itself. However, there is no custom validation logic
injection support for `*.py` samples, in which case the test infra compiles the sample, submit and run the sample, and check if it succeeds.


text:
import { CopyLink16 } from "../../";

export = CopyLink16;


text:
title: Cake v0.27.2 released
category: Release Notes
author: patriksvensson
---

Version 0.27.2 of Cake has been released.

This is a hotfix release of Cake.  Following the release of Cake 0.27.1 we discovered additional problems with assembly and dependency loading. Luckily, [Dave Glick](https://github.com/daveaglick) was kind enough to step up and (hopefully) squash these bugs once and for all.

Contributions were included from:
- [daveaglick](https://github.com/daveaglick)

Full details of everything that was included in this release can be seen below.

<!--excerpt-->

As part of this release we had [2 issues](https://github.com/cake-build/cake/issues?milestone=51&state=closed) closed.

__Bugs__

- [__#2137__](https://github.com/cake-build/cake/issues/2137) Dependency loading errors with Cake 0.27.1 and Cake.Powershell 0.4.5
- [__#2134__](https://github.com/cake-build/cake/issues/2134) Assembly conflicts during compilation