text:
package com.pivotal.gemfirexd.internal.impl.store.access.btree;

import com.pivotal.gemfirexd.internal.iapi.error.StandardException;
import com.pivotal.gemfirexd.internal.iapi.services.io.FormatableBitSet;
import com.pivotal.gemfirexd.internal.iapi.services.io.TypedFormat;
import com.pivotal.gemfirexd.internal.iapi.services.monitor.Monitor;
import com.pivotal.gemfirexd.internal.iapi.services.sanity.SanityManager;
import com.pivotal.gemfirexd.internal.iapi.store.access.Qualifier;
import com.pivotal.gemfirexd.internal.iapi.store.access.RowUtil;
import com.pivotal.gemfirexd.internal.iapi.store.raw.AuxObject;
import com.pivotal.gemfirexd.internal.iapi.store.raw.ContainerHandle;
import com.pivotal.gemfirexd.internal.iapi.store.raw.FetchDescriptor;
import com.pivotal.gemfirexd.internal.iapi.store.raw.Page;
import com.pivotal.gemfirexd.internal.iapi.store.raw.RecordHandle;
import com.pivotal.gemfirexd.internal.iapi.types.DataValueDescriptor;
import com.pivotal.gemfirexd.internal.iapi.types.SQLLongint;
import com.pivotal.gemfirexd.internal.impl.store.access.StorableFormatId;
import com.pivotal.gemfirexd.internal.impl.store.access.conglomerate.ConglomerateUtil;

/**

Base class for leaf and branch control rows.

Concurrency Notes

All access through control rows is serialized by an exclusive latch on
the page the control row is for.  The page is latched when the control
row is "gotten" (ControlRow#Get), and unlatched when the control row
is released (ControlRow#release).

To Do List

 [NOTE1]
The code is arranged to fault in fields from the row as necessary.
many of the fields of a control row are rarely used (left sibling, parent).
The accessors fault in the underlying column only when
requested by allocating the appropriate object and calling fetchFromSlot and
only fetching the requested field.

 [NOTE2]
Currently, all the fields of the control row are stored as StorableU8s
for simplicity.  This is too few bits to hold the long page numbers, and
too many to hold the version, level, and isRoot flag.  Some consideration
will have to be given to the appropriate storage format for these values.

 [NOTE3]
The implementation relies on the existance of page "auxiliary" pointers
which keep Object versions of the control row.

@see ControlRow#get
@see ControlRow#release

**/

public abstract class ControlRow implements AuxObject, TypedFormat
{
    /**
     * Version indentifier of the control row within the page.
     *

     * This is the format id of the control row.  The format id is currently
     * one of either StoredFormatIds.ACCESS_BTREE_LEAFCONTROLROW_ID or
     * StoredFormatIds.ACCESS_BTREE_BRANCHCONTROLROW_ID.
     **/
    private StorableFormatId    version = null;

    /**
     * Pointer to page which is "left" at the current level.
     *

     * Currently all pages at a level are doubly linked.  The leftmost page
     * in a level has a leftSiblingPageNumber ==
     * ContainerHandle.INVALID_PAGE_NUMBER.  All key values on the page which
     * is left must precede the first key value on the current page.
     **/
	private SQLLongint leftSiblingPageNumber;

    /**
     * Pointer to page which is "right" at the current level.
     *

     * Currently all pages at a level are doubly linked.  The rightmost page
     * in a level has a rightSiblingPageNumber ==
     * ContainerHandle.INVALID_PAGE_NUMBER.  All key values on the page which
     * is right of the current page must follow the last key value on the
     * current page.
     **/
	private SQLLongint rightSiblingPageNumber;

    /**
     * The parent page of the current page.
     *

     * For consistency checking it is useful to maintain the parentPageNumber
     * field of the current page.  The root page has a value of
     * ContainerHandle.INVALID_PAGE_NUMBER in it's parentPageNumber field.
     *

     * RESOLVE (mikem) - we need to come up with some way to not maintain these,
     * maybe by providing a property on secondary index or a different 2nd
     * index.
     *
     **/
	private SQLLongint parentPageNumber; // for consistency checking

    /**
     * The level of the btree.
     *

     * The leaf level of the btree is 0.  The first branch level (parent level
     * of the leaf), is level 1.  The height of the btree is (level + 1).
     *

     * The smallest btree is a one page btree with only a leaf, and no branch
     * pages.
     **/
	private SQLLongint level;

    /**
     * Is this page the root of the btree?
     *

     * Currently "1" if the page is the root page, else "0".
     *

     * RESOLVE (mikem) When real datatype come about, this value should
     * probably be just a bit in some status word.
     **/
	private SQLLongint isRoot = null;

    /**
     * A copy of the Conglomerate that describes the owning conglom.
     *

     * This information is used during logical undo to get the type information
     * so that rows can be compared and searched for.  We may be able to get
     * away with a subset of the information stored in the conglomerate.
     *

     * RESOLVE (mikem) - change this to only store the info on the root page.
     **/
    private BTree    btree = null;

    /**
     * The page that this control row describes.
     **/
	protected Page page;

    /**
     * The page that this control row describes.
     **/
	protected DataValueDescriptor row[];

    /**
     * row used to replace fetchFieldFromSlot() calls.
     **/
    protected DataValueDescriptor[] scratch_row;

    /**
     * FetchDescriptor used to replace fetchFieldFromSlot() calls.
     **/
    protected FetchDescriptor   fetchDesc;

    /**
     * In memory hint about whether to use the last_search_result hint during
     * search.
     **/
    transient protected boolean use_last_search_result_hint = false;

    /**
     * In memory hint about where to begin the binary search to find a key
     * on the the current control page.
     **/
    transient protected int last_search_result = 0;

    /**
     * Column number assignments for columns of the control row.
     *

     * The control row is stored as the first row in a btree page.  The row
     * is an array of columns.  The Control row columns are the columns numbered
     * from ControlRow.CR_COLID_FIRST through ControlRow.CR_COLID_LAST.  The
     * classes which implement the concrete derived classes of ControlRow may
     * add columns to the control row, but they must be added after the
     * ControlRow columns.
     **/
	protected static final int CR_COLID_FIRST		= 0;
	protected static final int CR_VERSION_COLID		= CR_COLID_FIRST + 0;
	protected static final int CR_LEFTSIB_COLID		= CR_COLID_FIRST + 1;
	protected static final int CR_RIGHTSIB_COLID	= CR_COLID_FIRST + 2;
	protected static final int CR_PARENT_COLID		= CR_COLID_FIRST + 3;
	protected static final int CR_LEVEL_COLID		= CR_COLID_FIRST + 4;
	protected static final int CR_ISROOT_COLID		= CR_COLID_FIRST + 5;
	protected static final int CR_CONGLOM_COLID	    = CR_COLID_FIRST + 6;
	protected static final int CR_COLID_LAST		= CR_CONGLOM_COLID;
	protected static final int CR_NCOLUMNS			= CR_COLID_LAST + 1;

    /**
     * bit sets used to fetch single columns at a time.
     **/
    protected static final FormatableBitSet   CR_VERSION_BITSET =
        new FormatableBitSet(CR_VERSION_COLID + 1);
    protected static final FormatableBitSet   CR_LEFTSIB_BITSET =
        new FormatableBitSet(CR_LEFTSIB_COLID + 1);
    protected static final FormatableBitSet   CR_RIGHTSIB_BITSET =
        new FormatableBitSet(CR_RIGHTSIB_COLID + 1);
    protected static final FormatableBitSet   CR_PARENT_BITSET =
        new FormatableBitSet(CR_PARENT_COLID + 1);
    protected static final FormatableBitSet   CR_LEVEL_BITSET =
        new FormatableBitSet(CR_LEVEL_COLID + 1);
    protected static final FormatableBitSet   CR_ISROOT_BITSET =
        new FormatableBitSet(CR_ISROOT_COLID + 1);
    protected static final FormatableBitSet   CR_CONGLOM_BITSET =
        new FormatableBitSet(CR_CONGLOM_COLID + 1);

    /**
     * Values passed in the flag argument to splitFor.
     **/
    /* row causing split would be last row on leaf page */
    public static final int SPLIT_FLAG_LAST_ON_PAGE      = 0x000000001;
    /* row causing split would be last row in table */
    public static final int SPLIT_FLAG_LAST_IN_TABLE     = 0x000000002;
    /* row causing split would be first row on page */
    public static final int SPLIT_FLAG_FIRST_ON_PAGE     = 0x000000004;
    /* row causing split would be first row in table */
    public static final int SPLIT_FLAG_FIRST_IN_TABLE    = 0x000000008;

    /**
     * The slot at which all control rows reside.
     **/
	protected static final int CR_SLOT = 0;

	/*
	** Constructors of ControlRow
	*/

    static
    {
        CR_VERSION_BITSET.set(CR_VERSION_COLID);
        CR_LEFTSIB_BITSET.set(CR_LEFTSIB_COLID);
        CR_RIGHTSIB_BITSET.set(CR_RIGHTSIB_COLID);
        CR_PARENT_BITSET.set(CR_PARENT_COLID);
        CR_LEVEL_BITSET.set(CR_LEVEL_COLID);
        CR_ISROOT_BITSET.set(CR_ISROOT_COLID);
        CR_CONGLOM_BITSET.set(CR_CONGLOM_COLID);
    }

    /**
     * No arg constructor.
     *

     * GetControlRowForPage() will call this constructor when it uses the
     * monitor to create a control row dynamically given a given format id.
     **/
    protected ControlRow()
    {
        this.scratch_row =
            new DataValueDescriptor[getNumberOfControlRowColumns()];

        this.fetchDesc   =
            new FetchDescriptor(
                this.scratch_row.length, (FormatableBitSet) null, (Qualifier[][]) null);
    }

    /**
     * Constructor for making a new control row as part of allocating a new
	 * page.  Fills in all the fields but does not write them anywhere.
     *

	 *

	 * Changes to this constructor will probably require changes to the
	 * corresponding accessor(s).
     *
     * @param btree      Static information about the btree.
     * @param page       The page described by this control row.
     * @param parent     The parent page of this page, "null" if this page is
     *                   root or if not maintaining parent links.
     * @param isRoot     Is this page the root of the tree?
     *
     *
     * @exception StandardException Standard exception policy.
     **/
	protected ControlRow(
    OpenBTree         btree,
    Page		      page,
    int			      level,
    ControlRow	      parent,
    boolean           isRoot
    )
        throws StandardException
	{
		// The caller is expected to have latched the pages.
        if (SanityManager.DEBUG)
        {
            SanityManager.ASSERT(page.isLatched());
            SanityManager.ASSERT(parent == null || parent.page.isLatched());
        }

		// Maintain which page this control row describes.
		this.page = page;

		// Page numbers start out "invalid".  Presumably the caller will
		// link the page into a page chain as one of its next steps.
		leftSiblingPageNumber  =
            new SQLLongint(btree.container.INVALID_PAGE_NUMBER);
		rightSiblingPageNumber =
            new SQLLongint(btree.container.INVALID_PAGE_NUMBER);

		// Remember the parent if there is one and we're remembering parents.
        parentPageNumber = new SQLLongint(
            (parent == null ?
                 btree.container.INVALID_PAGE_NUMBER :
                 parent.page.getPageNumber()));

		// All pages start out not being root pages.  The caller will setIsRoot
		// if this is going to be a root page. Zero means false - see
		// getIsRoot/setIsRoot.
		this.isRoot = new SQLLongint(isRoot ? 1 : 0);

        // set the rest of the state, as passed in.
		this.level   = new SQLLongint(level);
        this.version = new StorableFormatId(getTypeFormatId());

        // If it is a root page then store the real btree conglomerate, if it
        // is not a root page then set up an "empty" btree conglomerate which
        // will be stored as "null".
        this.btree =
            (isRoot ?
             btree.getConglomerate() :
             (BTree) Monitor.newInstanceFromIdentifier(
                btree.getConglomerate().getTypeFormatId()));

        // Initialize the object array to be used for interacting with raw
        // store to insert, fetch, and update the control row.
        this.row = new DataValueDescriptor[getNumberOfControlRowColumns()];
	    this.row[CR_VERSION_COLID]	= this.version;
	    this.row[CR_LEFTSIB_COLID]	= this.leftSiblingPageNumber;
	    this.row[CR_RIGHTSIB_COLID]	= this.rightSiblingPageNumber;
	    this.row[CR_PARENT_COLID]	= this.parentPageNumber;
	    this.row[CR_LEVEL_COLID]	= this.level;
	    this.row[CR_ISROOT_COLID]	= this.isRoot;
	    this.row[CR_CONGLOM_COLID]  = this.btree;

		// Make the control row the aux object for the page so control row
		// getters end up with the same row.
		page.setAuxObject(this);
	}

    /**
     * Constructor for making a control row for an existing page.
     *

     * Not all the fields are filled in; their values will get faulted in from
     * the page as necessary.
     *

	 * Classes which extend ControlRow must delegate to this constructor
	 * and may want to override it as well.
	 * Changes to this constructor will probably require changes to the
	 * corresponding accessor(s).
     *
     * @param container  Open container
     * @param page       The page described by this control row.
     *
     * @exception StandardException Standard exception policy.
     **/
	protected ControlRow(ContainerHandle container, Page page)
        throws StandardException
	{
        System.out.println("ControlRow construct 2.");

		// The caller is expected to have latched the pages.
        if (SanityManager.DEBUG)
            SanityManager.ASSERT(page.isLatched());

		// Remember the page.
		this.page = page;

		// The rest of the fields are left null; they'll get faulted
		// in if/when necessary.  See the accessors.
	}

    /* Private/Protected methods of ControlRow: */

    /**
     * Get version of the control row.
     *

     * Returns the version of the control row, faulting it in from the page
     * if necessary.
     *
	 * @return version of the control row.
     *
	 * @exception  StandardException  Standard exception policy.
     **/
	protected int getVersion()
		throws StandardException
	{
		if (this.version == null)
		{
			// Fault in the version.
			this.version = new StorableFormatId();

            scratch_row[CR_VERSION_COLID] = this.version;

            fetchDesc.setValidColumns(CR_VERSION_BITSET);

            this.page.fetchFromSlot(
               (RecordHandle) null, CR_SLOT, scratch_row, fetchDesc, false);
		}
		return this.version.getValue();
	}

    /**
     * Set version of the control row.
     *

     * Sets the version of the control row.  Updates both the in-memory
     * control row and the disk copy.
     *
	 * @exception  StandardException  Standard exception policy.
     **/
	protected void setVersion(int version)
		throws StandardException
	{
		// Store the field.
		if (this.version == null)
			this.version = new StorableFormatId();
		this.version.setValue(version);

		// Write the field through to the underlying row.
		this.page.updateFieldAtSlot(
            CR_SLOT, CR_VERSION_COLID, this.version, null);
	}

	/**
	 * Get the control row for this page's left sibling, or null if there is no
	 * left sibling (which probably means it's the leftmost page at its level).
	 * Since right-to-left traversal of an index level	is deadlock-prone, this
	 * method will only get get the left sibling if it can latch it without
	 * waiting.
     *
	 * @exception WaitError if the latch request would have had to wait.
     *
     * @exception StandardException Standard exception policy.
	 **/
	public ControlRow getLeftSibling(OpenBTree btree)
		throws StandardException, WaitError
	{
		ControlRow cr;

		long pageno = this.getleftSiblingPageNumber();

		// Is there a left sibling?
		if (pageno == ContainerHandle.INVALID_PAGE_NUMBER)
			return null;

		// Try to get the control row without waiting
		cr = ControlRow.getNoWait(btree, pageno);
		if (cr == null)
			throw new WaitError();

		return cr;
	}

	protected void setLeftSibling(ControlRow leftsib)
        throws StandardException
	{
        long left_sib_pageno =
            (leftsib == null ? ContainerHandle.INVALID_PAGE_NUMBER :
                               leftsib.page.getPageNumber());

		// Store the field.
		if (leftSiblingPageNumber == null)
			leftSiblingPageNumber = new SQLLongint(left_sib_pageno);
        else
            this.leftSiblingPageNumber.setValue(left_sib_pageno);

		// Write the field through to the underlying row
        try
        {
            this.page.updateFieldAtSlot(
                CR_SLOT, CR_LEFTSIB_COLID, this.leftSiblingPageNumber, null);
        }
        catch (StandardException se)
        {
            // Since this is an update of a fixed length field it should
            // never fail, but it has happened enough that an assert helps
            // with debugging.
            if (SanityManager.DEBUG)
            {
                SanityManager.THROWASSERT(
                    "setLeftSibling got an exception: " +
                    "control_row = " + this +
                    "trying to update field number " + CR_LEFTSIB_COLID +
                    "to new value " + this.leftSiblingPageNumber, se);
            }
            throw(se);
        }
	}

	/**
	Return the control row for this page's right sibling.  Unlike getting
	the left sibling, it's ok to wait for the right sibling latch since
	left-to-right is the deadlock-free ordering.

    @exception StandardException Standard exception policy.
	**/
	protected ControlRow getRightSibling(OpenBTree open_btree)
		throws StandardException
	{
		long pageno = this.getrightSiblingPageNumber();

		// Return the control row for the page.
		if (pageno == ContainerHandle.INVALID_PAGE_NUMBER)
			return null;
		else
			return ControlRow.get(open_btree, pageno);
	}

	// This method will have to update the row.
	protected void setRightSibling(ControlRow rightsib)
        throws StandardException
	{
        long right_sib_pageno =
            (rightsib == null ? ContainerHandle.INVALID_PAGE_NUMBER :
                                rightsib.page.getPageNumber());

		// Store the field.
		if (rightSiblingPageNumber == null)
			rightSiblingPageNumber = new SQLLongint(right_sib_pageno);
        else
            this.rightSiblingPageNumber.setValue(right_sib_pageno);

		// Write the field through to the underlying row
        try
        {
		this.page.updateFieldAtSlot(
            CR_SLOT, CR_RIGHTSIB_COLID, this.rightSiblingPageNumber, null);
        }
        catch (StandardException se)
        {
            // Since this is an update of a fixed length field it should
            // never fail, but it has happened enough that an assert helps
            // with debugging.

            if (SanityManager.DEBUG)
            {
                SanityManager.THROWASSERT(
                    "setRightSibling got an exception: " +
                    "control_row = " + this +
                    "trying to update field number " + CR_RIGHTSIB_COLID +
                    "to new value " + this.rightSiblingPageNumber, se);
            }
            throw(se);
        }
	}

	/**
	Get the page number of the left sibling. Fault it's value in if it
    hasn't been yet.

    @exception StandardException Standard exception policy.
	**/
	public long getleftSiblingPageNumber()
        throws StandardException
	{
		if (this.leftSiblingPageNumber == null)
		{
			// Fault in the page number.
			this.leftSiblingPageNumber = new SQLLongint();

            if (SanityManager.DEBUG)
                SanityManager.ASSERT(scratch_row != null);

            scratch_row[CR_LEFTSIB_COLID] = this.leftSiblingPageNumber;

            fetchDesc.setValidColumns(CR_LEFTSIB_BITSET);
            this.page.fetchFromSlot(
               (RecordHandle) null, CR_SLOT, scratch_row, fetchDesc, false);

		}

        return(leftSiblingPageNumber.getLong());
	}

	/**
	Get the page number of the right sibling. Fault it's value in if it
    hasn't been yet.

    @exception StandardException Standard exception policy.
	**/
	protected long getrightSiblingPageNumber()
        throws StandardException
	{
		if (this.rightSiblingPageNumber == null)
		{
			// Fault in the page number.
			this.rightSiblingPageNumber = new SQLLongint();

            scratch_row[CR_RIGHTSIB_COLID] = this.rightSiblingPageNumber;

            fetchDesc.setValidColumns(CR_RIGHTSIB_BITSET);
            this.page.fetchFromSlot(
               (RecordHandle) null, CR_SLOT, scratch_row, fetchDesc, false);
		}

        return(rightSiblingPageNumber.getLong());
	}

	/**
	Get the page number of the parent, if it's being maintained.
	Note that there is intentionally no way to get the control
	row for the parent page - the b-tree code NEVER traverses
	up the tree, even in consistency checks.

    @exception StandardException Standard exception policy.
	**/
	protected long getParentPageNumber()
        throws StandardException
	{
		if (this.parentPageNumber == null)
		{
			// Fault in the page number.
			this.parentPageNumber = new SQLLongint();

            scratch_row[CR_PARENT_COLID] = this.parentPageNumber;

            fetchDesc.setValidColumns(CR_PARENT_BITSET);
            this.page.fetchFromSlot(
               (RecordHandle) null, CR_SLOT, scratch_row, fetchDesc, false);
		}

		// See NOTE3 about converting from int to long.
		long pageno = parentPageNumber.getLong();
		return pageno;
	}

	void setParent(long parent)
        throws StandardException
	{
		// Store the field.
		if (parentPageNumber == null)
			parentPageNumber = new SQLLongint();
		this.parentPageNumber.setValue(parent);

		// Write the field through to the underlying row
        try
        {
            this.page.updateFieldAtSlot(
                CR_SLOT, CR_PARENT_COLID, this.parentPageNumber, null);
        }
        catch (StandardException se)
        {
            // Since this is an update of a fixed length field it should
            // never fail, but it has happened enough that an assert helps
            // with debugging.

            if (SanityManager.DEBUG)
            {
                SanityManager.THROWASSERT(
                    "setParent got an exception: " +
                    "control_row = " + this +
                    "trying to update field number " + CR_PARENT_COLID +
                    "to new value " + this.parentPageNumber, se);
            }
            throw(se);
        }

        return;
	}

	protected int getLevel()
        throws StandardException
	{
		if (this.level == null)
		{
			// Fault in the level
			this.level = new SQLLongint();

            scratch_row[CR_LEVEL_COLID] = this.level;

            fetchDesc.setValidColumns(CR_LEVEL_BITSET);
            this.page.fetchFromSlot(
               (RecordHandle) null, CR_SLOT, scratch_row, fetchDesc, false);
		}

		return((int) this.level.getLong());
	}

	protected void setLevel(int newlevel)
        throws StandardException
	{
		// Store the field.
		if (this.level == null)
			this.level = new SQLLongint();
		this.level.setValue((long) newlevel);

		// Write the field through to the underlying row.
		this.page.updateFieldAtSlot(CR_SLOT, CR_LEVEL_COLID, this.level, null);
	}

	protected boolean getIsRoot()
        throws StandardException
	{
		// convert 1 to true, 0 to false;

		if (this.isRoot == null)
		{
			// Fault in the level
			this.isRoot = new SQLLongint();

            scratch_row[CR_ISROOT_COLID] = this.isRoot;

            fetchDesc.setValidColumns(CR_ISROOT_BITSET);
            this.page.fetchFromSlot(
               (RecordHandle) null, CR_SLOT, scratch_row, fetchDesc, false);
		}

		return((this.isRoot.getLong() == 1));
	}

	protected void setIsRoot(boolean isRoot)
        throws StandardException
	{
        // RESOLVE (mmm) - need to store more efficiently //

		// Store the field.
		if (this.isRoot == null)
			this.isRoot = new SQLLongint();

		this.isRoot.setValue((isRoot) ? 1 : 0);

		// Write the field through to the underlying row.
		this.page.updateFieldAtSlot(
            CR_SLOT, CR_ISROOT_COLID, this.isRoot, null);
	}

    /**
     * Get format id information for row on page.
     *

     * Returns the format id information for a row on the page. faulting it
     * in from the page if necessary.
     *
	 * @return format id of a row on the page.
     *
	 * @exception  StandardException  Standard exception policy.
     **/
	public BTree getConglom(int format_id)
		throws StandardException
	{

        if (SanityManager.DEBUG)
        {
            // this call is only valid on root pages.  If called on non
            // root pages it will return a "null" conglom object.
            SanityManager.ASSERT(
                (this.page.getPageNumber() == BTree.ROOTPAGEID) && getIsRoot());
        }

		if (this.btree == null)
		{
            // use format id to create empty instance of Conglomerate class
            this.btree = (BTree) Monitor.newInstanceFromIdentifier(format_id);

            scratch_row[CR_CONGLOM_COLID] = this.btree;

            fetchDesc.setValidColumns(CR_CONGLOM_BITSET);
            this.page.fetchFromSlot(
               (RecordHandle) null, CR_SLOT, scratch_row, fetchDesc, false);
		}
		return this.btree;
	}

    /**
     * Set the conglomerate field in the btree.
     *

     * Sets the btree field of the control row.  Updates just the disk copy.
     *
	 * @exception  StandardException  Standard exception policy.
     **/
	private void setConglom(BTree btree)
		throws StandardException
	{
		// Store the field.  Delay faulting value into object until getConlgom()
        // call, which in general only happens during recovery.

		// Write the field through to the underlying row.
		this.page.updateFieldAtSlot(CR_SLOT, CR_CONGLOM_COLID, btree, null);
	}

	/*
	** Methods for getting control rows from pages.
	*/

	/**
	  Get the control row from the given page in the b-tree.
	  The returned control row will be of the correct type
	  for the page (i.e., either a LeafControlRow or a
	  BranchControlRow).

    @exception StandardException Standard exception policy.
	 **/
	public static ControlRow get(OpenBTree open_btree, long pageNumber)
		throws StandardException
	{
        return(ControlRow.get(open_btree.container, pageNumber));
	}

	public static ControlRow get(ContainerHandle container, long pageNumber)
		throws StandardException
	{
        if (SanityManager.DEBUG)
        {
            SanityManager.ASSERT(container != null,
                "ControlRow.Get() is being called on a closed container.");
        }

		// Get the page, waiting if necessary.  The page is returned latched.
		Page page = container.getPage(pageNumber);

        if (SanityManager.DEBUG)
        {
			if (page == null)
            	SanityManager.THROWASSERT(
                	"No page at pagenumber: " + pageNumber +
                	"; ContainerHandle = "    + container);
        }

		// Return the corresponding control row.
		return getControlRowForPage(container, page);
	}

	/**
	Get the control row for the given page if the latch on the
	page can be obtained without waiting, else return null.

    @exception StandardException Standard exception policy.
	**/
	public static ControlRow getNoWait(
    OpenBTree       open_btree,
    long            pageNumber)
		throws StandardException
	{
		// Try to get the page without waiting.  If we would have
		// to wait, return null.
		Page page = open_btree.container.getUserPageNoWait(pageNumber);
		if (page == null)
			return null;

		// Got the page without waiting.  Return the corresponding
		// control row.
		return getControlRowForPage(open_btree.container, page);
	}

	protected static ControlRow getControlRowForPage(
    ContainerHandle container,
    Page            page)
        throws StandardException
	{
        ControlRow cr = null;

		// See if the control row is still cached with the page
		// If so, just use the cached control row.
		AuxObject auxobject = page.getAuxObject();
		if (auxobject != null)
			return (ControlRow) auxobject;

        if (SanityManager.DEBUG)
            SanityManager.ASSERT(page.recordCount() >= 1);

		// No cached control row, so create a new one.

        // Use the version field to determine the type of the row to
        // create.  This routine depends on the version field being the same
        // number column in all control rows.

        StorableFormatId version = new StorableFormatId();

        DataValueDescriptor[] version_ret = new DataValueDescriptor[1];

        version_ret[0] = version;

        // TODO (mikem) - get rid of this new.

        page.fetchFromSlot(
           (RecordHandle) null, CR_SLOT, version_ret,
           new FetchDescriptor(1, CR_VERSION_BITSET, (Qualifier[][]) null),
           false);

        // use format id to create empty instance of right Conglomerate class
        cr = (ControlRow) Monitor.newInstanceFromIdentifier(version.getValue());
        cr.page = page;

        // call page specific initialization.
        cr.controlRowInit();

        // cache this Control row with the page in the cache.
		page.setAuxObject(cr);

        return(cr);
	}

	/**
	Release this control row's resources.
	**/
	public void release()
	{
        if (SanityManager.DEBUG)
            SanityManager.ASSERT(page != null);

        if (page != null)
            page.unlatch();

		// It might be nice to set the page object to null, but
		// since there might be multiple control rows on this
		// page, we'd have to maintain a use count.  Rather than
		// doing that we'll let the garbage collector earn its
		// keep.  We are also expecting that the raw store will
		// throw errors if we attempt to use an unlatched page.
	}

    /**
    Search this index page.

    This method is very performance sensitive.  It is the intention that no
    object allocations occur during the execution of this method.

    This method performs a binary search on the page and finds the entry i on
    the page such that entry[i] <= key < entry[i+1].  The result of the search
    is filled into the passed in params structure.

    @param params the parameters of the search

    @exception StandardException could be thrown by underlying raw store
    operations.

    @see SearchParameters
    **/
    protected void searchForEntry(SearchParameters params)
		throws StandardException
    {
        if (SanityManager.DEBUG)
        {
            // System.out.println("searchForEntry() enter: params:" + params);
            // System.out.println("searchForEntry() enter: this:"   + this);
            // System.out.println("searchForEntry() enter: this page:"   + debugPage(params.btree));
        }

        // leftrange and rightrange indicates the range of slots to search.
        // The range starts as all the slots on the page not including slot
        // 0 which is the control row.
        int leftrange  = 1;
        int rightrange = page.recordCount() - 1;

        // leftslot and rightslot if non-zero, mean that the key has been
        // compared to the row at that slot.  If non-zero the key must be
        // greater than the key at leftslot and the key must be lest than
        // the key at rightslot.
        int leftslot  = 0;
        int rightslot = rightrange + 1;

        int midslot;
        int compare_ret;

        // search until you either exactly find the key, or you have
        // compared 2 adjacent rows and found the value must exist between
        // the 2.

        if (this.use_last_search_result_hint)
        {
            // make sure to set midslot to point to somwhere in the legal range.
            midslot =
                ((this.last_search_result == 0) ? 1 : this.last_search_result);

            if (midslot > rightrange)
                midslot = rightrange;
        }
        else
        {
            // if we don't think we have a good hint where to start the search
            // just go to the middle.
            midslot = (leftrange + rightrange) / 2;
        }

        if (SanityManager.DEBUG)
        {
            if ((leftslot != (rightslot - 1)) &&
                !(midslot >= leftrange && midslot <= rightrange))
            {
                SanityManager.THROWASSERT(
                    "midslot = "     + midslot +
                    ";leftrange = "  + leftrange +
                    ";rightrange = " + rightrange);
            }
        }

        while (leftslot != (rightslot - 1))
        {
			// Compare the index row to the key.
			compare_ret =
                compareIndexRowFromPageToKey(
                    this,
                    midslot,
                    params.template, params.searchKey,
                    params.btree.getConglomerate().nUniqueColumns,
                    params.partial_key_match_op,
                    params.btree.getConglomerate().ascDescInfo);

            if (compare_ret == 0)
            {
                // Found exact match
				params.resultSlot = midslot;
				params.resultExact = true;

                // update the hints based on result of the search.
                use_last_search_result_hint =
                    (midslot == this.last_search_result) ? true : false;
                this.last_search_result = midslot;

                return;
            }
            else if (compare_ret > 0)
            {
                // key falls to the left of midslot
                rightslot  = midslot;
                rightrange = midslot - 1;
            }
            else
            {
                // key falls to the right of midslot
                leftslot   = midslot;
                leftrange  = midslot + 1;
            }

            midslot = (leftrange + rightrange) / 2;
            //midslot = (leftrange + rightrange) >> 1;
        }

        // update the hints based on result of the search.
        this.use_last_search_result_hint =
            (leftslot == this.last_search_result);
        this.last_search_result = leftslot;

        // no exact match found, leftslot will point at the slot on the
        // page just before where the row should be inserted.  In the case
        // where the key is before rows on the page then leftslot will be
        // 0 (an empty page is a special case of this).
        if (SanityManager.DEBUG)
        {
			if (leftslot != rightslot - 1)
            	SanityManager.THROWASSERT(
                	"leftslot = " + leftslot + "; rightslot = " + rightslot);
        }

        params.resultSlot  = leftslot;
        params.resultExact = false;

        if (SanityManager.DEBUG)
        {
            // System.out.println("searchForEntry() exit: params:" + params);
        }

        return;
    }

    protected void searchForEntryBackward(SearchParameters params)
		throws StandardException
    {
        if (SanityManager.DEBUG)
        {
            // System.out.println("searchForEntry() enter: params:" + params);
            // System.out.println("searchForEntry() enter: this:"   + this);
            // System.out.println("searchForEntry() enter: this page:"   + debugPage(params.btree));
        }

        // leftrange and rightrange indicates the range of slots to search.
        // The range starts as all the slots on the page not including slot
        // 0 which is the control row.
        int leftrange  = 1;
        int rightrange = page.recordCount() - 1;

        // leftslot and rightslot if non-zero, mean that the key has been
        // compared to the row at that slot.  If non-zero the key must be
        // greater than the key at leftslot and the key must be lest than
        // the key at rightslot.
        int leftslot  = 0;
        int rightslot = rightrange + 1;

        int midslot;
        int compare_ret;

        // search until you either exactly find the key, or you have
        // compared 2 adjacent rows and found the value must exist between
        // the 2.

        if (this.use_last_search_result_hint)
        {
            // make sure to set midslot to point to somwhere in the legal range.
            midslot =
                ((this.last_search_result == 0) ? 1 : this.last_search_result);

            if (midslot > rightrange)
                midslot = rightrange;
        }
        else
        {
            // if we don't think we have a good hint where to start the search
            // just go to the middle.
            midslot = (leftrange + rightrange) / 2;
        }

        if (SanityManager.DEBUG)
        {
            if ((leftslot != (rightslot - 1)) &&
                !(midslot >= leftrange && midslot <= rightrange))
            {
                SanityManager.THROWASSERT(
                    "midslot = "     + midslot +
                    ";leftrange = "  + leftrange +
                    ";rightrange = " + rightrange);
            }
        }

        while (leftslot != (rightslot - 1))
        {
			// Compare the index row to the key.
			compare_ret =
                compareIndexRowFromPageToKey(
                    this,
                    midslot,
                    params.template, params.searchKey,
                    params.btree.getConglomerate().nUniqueColumns,
                    params.partial_key_match_op,
                    params.btree.getConglomerate().ascDescInfo);

            if (compare_ret == 0)
            {
                // Found exact match
				params.resultSlot = midslot;
				params.resultExact = true;

                // update the hints based on result of the search.
                use_last_search_result_hint =
                    (midslot == this.last_search_result) ? true : false;
                this.last_search_result = midslot;

                return;
            }
            else if (compare_ret > 0)
            {
                // key falls to the left of midslot
                rightslot  = midslot;
                rightrange = midslot - 1;
            }
            else
            {
                // key falls to the right of midslot
                leftslot   = midslot;
                leftrange  = midslot + 1;
            }

            midslot = (leftrange + rightrange) / 2;
            //midslot = (leftrange + rightrange) >> 1;
        }

        // update the hints based on result of the search.
        this.use_last_search_result_hint =
            (leftslot == this.last_search_result);
        this.last_search_result = leftslot;

        // no exact match found, leftslot will point at the slot on the
        // page just before where the row should be inserted.  In the case
        // where the key is before rows on the page then leftslot will be
        // 0 (an empty page is a special case of this).
        if (SanityManager.DEBUG)
        {
			if (leftslot != rightslot - 1)
            	SanityManager.THROWASSERT(
                	"leftslot = " + leftslot + "; rightslot = " + rightslot);
        }

        params.resultSlot  = leftslot;
        params.resultExact = false;

        if (SanityManager.DEBUG)
        {
            // System.out.println("searchForEntry() exit: params:" + params);
        }

        return;
    }

	/**
	Compare two orderable rows, considering nCompareCols, and return -1, 0, or 1
	depending on whether the first row (indexrow) is less than, equal to, or
    greater than the second (key).  The key may have fewer columns present
    than nCompareCols.

	In such a case, if all the columns of the partial key match all of the
    corresponding columns in the index row, then the value passed in in
    partialKeyOrder is returned.  The caller should pass in partialKeyOrder=1
    if the index rows which match a partial key should be considered to be
    greater than the partial key, and -1 if they should be considered to be
    less.

    This routine only reads objects off the page if it needs them, so if a
    multi-part key differs in the first column the subsequent columns are not
    read.

    @param indexpage Controlrow of page to get target row from.
    @param slot      Slot to get control row from.
    @param indexrow template of the target row (the row in the index).
	@param key the (possibly partial) search key.
	@param nCompareCols the number of columns to compare.
	@param partialKeyOrder what to return on a partial key match.
	@param ascOrDesc column sort order information
	@throws StandardException if lower levels have a problem.

    @exception StandardException Standard exception policy.
	**/
	public static int compareIndexRowFromPageToKey(
    ControlRow              indexpage,
    int                     slot,
    DataValueDescriptor[]   indexrow,
    DataValueDescriptor[]	key,
    int                     nCompareCols,
    int                     partialKeyOrder,
    boolean[]               ascOrDesc)
        throws StandardException
	{
        int compare_result;

		// Get the actual number of key columns present
		// in the partial key.
		int partialKeyCols = key.length;

        // Fetch entire index row from page.
        // RESOLVE (mikem) - it may be more efficient to fetch just the
        // columns you need, but there is overhead currently in raw
        // store, since to get to the n'th column you have to walk
        // through the preceding n-1 columns.
        indexpage.page.fetchFromSlot(
            (RecordHandle) null, slot, indexrow,
            (FetchDescriptor) null,
            true);

		// Compare corresponding columns in the index row and the key.
		for (int i = 0; i < nCompareCols; i++)
		{
			// See if we have run out of partial key columns.
			if (i >= partialKeyCols)
			{
				// All the columns of the partial key match, and
				// there are more columns in the index row.  We
				// want to return -1 or 1, depending on whether the
				// caller wants to direct the search to the beginning
				// of this key range or the beginning of the next
				// one.  If the caller passes in -1, the index row
				// will appear less than the partial key, sending the
				// search to the next range ("to the right").  If the
				// caller passes in 1, the index row will appear
				// to be greater than the search key, sending the search
				// to the beginning of the range ("to the left").
				return partialKeyOrder;
			}

			// Get the corresponding columns to compare

			// Orderable indexcol = (Orderable) indexrow[i];
			// Orderable keycol = (Orderable) key[i];

			// Compare them.
			// int r = indexcol.compare(keycol);

            int r = indexrow[i].compare(key[i]);

			// If the columns don't compare equal, we're done.
			// Return the sense of the comparison.
			if (r != 0)
			{
				//coulmns could have been sorted in ascending or descending
				//order. depending on ascending/descending order search
				//direction will change.

				if (ascOrDesc[i])  // true - Ascending order
					return r;
				else
					return -r;
		    }
		}

		// We made it through all the columns, and they must have
		// all compared equal.  So return that the rows compare equal.
		return 0;
	}

	public static int compareIndexRowToKey(
    DataValueDescriptor[]   indexrow,
    DataValueDescriptor[]   key,
    int                     nCompareCols,
    int                     partialKeyOrder,
    boolean[]               ascOrDesc)
        throws StandardException
	{
		// Get the actual number of key columns present
		// in the partial key.
		int partialKeyCols = key.length;

		// Compare corresponding columns in the index row and the key.
		for (int i = 0; i < nCompareCols; i++)
		{
			// See if we have run out of partial key columns.
			if (i >= partialKeyCols)
			{
				// All the columns of the partial key match, and
				// there are more columns in the index row.  We
				// want to return -1 or 1, depending on whether the
				// caller wants to direct the search to the beginning
				// of this key range or the beginning of the next
				// one.  If the caller passes in -1, the index row
				// will appear less than the partial key, sending the
				// search to the next range ("to the right").  If the
				// caller passes in 1, the index row will appear
				// to be greater than the search key, sending the search
				// to the beginning of the range ("to the left").
				return partialKeyOrder;
			}

			// Get the corresponding columns to compare
			DataValueDescriptor indexcol = indexrow[i];
			DataValueDescriptor keycol = key[i];

			// Compare them.
			int r = indexcol.compare(keycol);

			// If the columns don't compare equal, we're done.
			// Return the sense of the comparison.
			if (r != 0)
			{
				if (ascOrDesc[i])  // true - column in ascending order
					return r;
				else
					return -r;
		    }
		}

		// We made it through all the columns, and they must have
		// all compared equal.  So return that the rows compare equal.
		return 0;
	}

	/**
	 ** Perform consistency checks which are common to all
	 ** pages that derive from ControlRow (both leaf and
	 ** branch pages).  The checks are:
	 ** <menu>
	 **
 This page thinks the parent argument is actually
	 **      its parent.
	 **
 The level of this page is 1 less than the level of
	 **      the parent.
	 **
 All the rows on the page are in order.
	 **
 Both left and right siblings, if they exist, are at
	 **      the same level of this page.
	 **
 This page is the left sibling of its right sibling,
	 **      and it's the right sibling of its left sibling.
	 **
 The last row on the left sibling is < the first
	 **      row on this page.
	 **
 The first row on the right sibling is > than the
	 **      the last row on this page.
	 ** </menu>
	 ** Note that these last two are really only true if there
	 ** are never duplicate keys.

    @exception StandardException Standard exception policy.
	 **/
	protected void checkGeneric(
    OpenBTree  btree,
    ControlRow parent,
    boolean    check_other_pages)
        throws StandardException
	{
        if (SanityManager.DEBUG)
        {
            SanityManager.ASSERT(this.page.recordCount() >= 1);
            SanityManager.ASSERT(!this.page.isDeletedAtSlot(0));

            // Make sure that we think we're a child of the parent.
			if (((parent != null) &&
                 (parent.page.getPageNumber() != this.getParentPageNumber())))
            	SanityManager.THROWASSERT(this + " not child of " + parent);

            // Check this page's level.
			if (((parent != null) &&
                 (parent.getLevel() != this.getLevel() + 1)))
            	SanityManager.THROWASSERT(this +
						" at wrong level when compared to parent:" + parent);

            // Check rows are in order.
            checkRowOrder(btree, parent);

            // Check siblings.
            if (check_other_pages)
                checkSiblings(btree);
        }
	}

	/**
	 ** Check that all rows on the page are in order.  This
	 ** means that each key is > than the previous key.

    @exception StandardException Standard exception policy.
	 **/
	protected boolean checkRowOrder(OpenBTree btree, ControlRow parent)
        throws StandardException
	{
        if (SanityManager.DEBUG)
        {
            RecordHandle            lesser_handle   = null;
            RecordHandle            greater_handle  = null;
            DataValueDescriptor[]   lesser          = getRowTemplate(btree);
            DataValueDescriptor[]   greater         = getRowTemplate(btree);
            boolean                 is_consistent   = true;

            int numslots = page.recordCount();
            for (int i = ControlRow.CR_SLOT + 1; (i + 1) < numslots; i++)
            {
               lesser_handle =
                   page.fetchFromSlot(
                       (RecordHandle) null, i, lesser,
                       (FetchDescriptor) null, true);
               greater_handle =
                   page.fetchFromSlot(
                       (RecordHandle) null, i + 1, greater,
                       (FetchDescriptor) null, true);

               SanityManager.ASSERT(btree.getConglomerate().nUniqueColumns <=
                                    btree.getConglomerate().nKeyFields);
               int compare_result =
                   compareIndexRowToKey(
                       lesser, greater,
                       btree.getConglomerate().nUniqueColumns, 0,
                       btree.getConglomerate().ascDescInfo);

               // >= 0 means that lesser >= greater
			   if (compare_result >= 0)
               {
                   SanityManager.THROWASSERT(
                       "Bad order of rows found in conglomerate: " + btree +
                       "\n." +
                       "compare result = " + compare_result + ".  " +
                       "nKeyFields = "     + btree.getConglomerate().nKeyFields +
                       ".\n" +
                       this + " rows " + (i) + " and " + (i + 1) +
                       " out of order.\n" +
                       "row[" + i + "] + "  + RowUtil.toString(lesser) + "\n" +
                       "row[" + (i + 1) + "] + "  + RowUtil.toString(greater) +
                       "\ndump of page = " +
                           debugPage(btree) +
                       "\ndump of parent page = " +
                           ((parent != null) ?
                                parent.debugPage(btree) : "null parent") +
                       "\rawstore dump = " + this.page);

                   is_consistent = false;
               }
            }
            return(is_consistent);
        }
        else
        {
            return(true);
        }
	}

    protected boolean compareRowsOnSiblings(
        OpenBTree   btree,
        ControlRow  left_sib,
        ControlRow  right_sib)
            throws StandardException
    {
        if (SanityManager.DEBUG)
        {
            boolean is_consistent = true;

            // Check that left last row is < right page's first row.
            if (left_sib.page.recordCount()  > 1 &&
                right_sib.page.recordCount() > 1)
            {
                DataValueDescriptor[] left_lastrow   = getRowTemplate(btree);
                DataValueDescriptor[] right_firstrow = getRowTemplate(btree);

                RecordHandle    left_lastrow_handle   =
                    left_sib.page.fetchFromSlot(
                        (RecordHandle) null, left_sib.page.recordCount() - 1,
                        left_lastrow,
                        (FetchDescriptor) null, true);

                RecordHandle    right_firstrow_handle  =
                    right_sib.page.fetchFromSlot(
                        (RecordHandle) null, 1, right_firstrow,
                        (FetchDescriptor) null, true);

                int r =
                    compareIndexRowToKey(
                        left_lastrow, right_firstrow,
                        btree.getConglomerate().nUniqueColumns,
                        0, btree.getConglomerate().ascDescInfo);

				if (r >= 0)
                {
                	SanityManager.THROWASSERT(
                      "last row on left page " +
                          left_sib.page.getPageNumber() +
                      " > than first row on right page " +
                          right_sib.page.getPageNumber() + "\n" +
                      "left last row = " + RowUtil.toString(left_lastrow) +
                      "right first row = " + RowUtil.toString(right_firstrow)+
                      left_sib + " last > first of " + right_sib);

                    is_consistent = false;
                }
            }
            return(is_consistent);
        }
        else
        {
            return(true);
        }
    }

	/**
	 ** Perform checks on the siblings of this page: make sure
	 ** that they're at the same level as this page, that they're
	 ** mutually linked together, and that the first/last keys
	 ** on sibling pages are in order.

    @exception StandardException Standard exception policy.
	 **/
	protected void checkSiblings(OpenBTree btree)
        throws StandardException
	{
        if (SanityManager.DEBUG)
        {
            // Get this page's left sibling.
            ControlRow leftsib  = null;
            ControlRow rightsib = null;

            try
            {
                try
                {
                    leftsib = this.getLeftSibling(btree);
                }
                catch (WaitError e)
                {
                    // In a normal system it may be possible to not get
                    // the left sibling (some other thread either user
                    // or daemon cache cleaner thread) may already have
                    // the latch on the page, and waiting on it could cause
                    // a latch/latch deadlock.  So for now just give up
                    // doing the consistency check in this case.
                    //
                    // RESOLVE (mikem) - We could do fancier things than
                    // ignore this error, but the only safe way to wait for
                    // a right to left latch is to release current latch which
                    // will complicate all the code, and this is only a sanity
                    // check.

                    // SanityManager.DEBUG_PRINT(
                    //   "ControlRow.checkSiblings",
                    //   this + " left sibling deadlock");

                    // give up on checking the left sibling.
                    leftsib = null;
                }

                // There may not be a left sibling; if there is, check it out.
                if (leftsib != null)
                {
                    // Check that it's at the same level as this page.
					if (leftsib.getLevel() != this.getLevel())
                    	SanityManager.THROWASSERT(
                        	(leftsib + "not at same level as " + this));

                    // Check that its right sibling is this page.
                    long hopefullythis_pageno =
                        leftsib.getrightSiblingPageNumber();

					if (hopefullythis_pageno != this.page.getPageNumber())
                    	SanityManager.THROWASSERT(
                        	"right sibling of " + leftsib + " isn't "  + this);

                    // Check that its last row is < this page's first row.
                    compareRowsOnSiblings(btree, leftsib, this);

                    // Done looking at the left sibling.
                    leftsib.release();
                    leftsib = null;
                }

                // Get the right sibling page.
                rightsib = this.getRightSibling(btree);

                // There may not be a right sibling; if there is, check it out.
                if (rightsib != null)
                {
                    // Check that it's at the same level as this page.
					if (rightsib.getLevel() != this.getLevel())
                    	SanityManager.THROWASSERT(
                        	rightsib + "not at same level as " + this);

                    // Check that its left sibling is this page.
                    long hopefullythis_pageno =
                        rightsib.getleftSiblingPageNumber();

					if (hopefullythis_pageno != this.page.getPageNumber())
                    	SanityManager.THROWASSERT(
                        	"left sibling of " + rightsib + " isn't "  + this);

                    // Check that its first row is > this page's last row.
                    compareRowsOnSiblings(btree, this, rightsib);

                    // Done looking at it.
                    rightsib.release();
                    rightsib = null;
                }
            }
            finally
            {
                if (leftsib != null)
                    leftsib.release();
                if (rightsib != null)
                    rightsib.release();
            }
        }
	}

	/**
	 ** Link this page to the right of the target page.
	 **

	 ** Upon entry, this page and the target must be
	 ** latched.  Upon exit, this page and the target
	 ** remain latched.
	 **

	 ** This method carefully acquires pages from left
	 ** to right in order to avoid deadlocks.

    @exception StandardException Standard exception policy.
	 */
	void linkRight(OpenBTree btree, ControlRow target)
        throws StandardException
	{
		ControlRow rightSibling = null;

        try
        {
            rightSibling = target.getRightSibling(btree);
            this.setRightSibling(rightSibling);
            this.setLeftSibling(target);
            if (rightSibling != null)
                rightSibling.setLeftSibling(this);
            target.setRightSibling(this);
        }
        finally
        {
            if (rightSibling != null)
                rightSibling.release();
        }
	}

	/**
	 ** Unlink this page from its siblings.  This method
	 ** will give up and return false rather than run the
	 ** risk of a deadlock.
	 **

	 ** On entry this page must be latched.  The siblings
	 ** are latched and unlatched during the operation.  Upon
	 ** exit, this page will remain latched, but unlinked from
	 ** its siblings and deallocated from the container.
	 **

	 ** The seemingly odd situation that this page will be
	 ** returned latched but deallocated is intentional.
	 ** The container will not be able to reuse this page
	 ** until the latch is released, and the caller may still
	 ** need to read information out of it.

    @exception StandardException Standard exception policy.
	 **/
	boolean unlink(OpenBTree btree)
        throws StandardException
	{
		ControlRow leftsib  = null;
		ControlRow rightsib = null;

        try
        {
            // Try to get the left sibling, and give up if
            // it can't be obtained without waiting.

            try
            {
                leftsib = this.getLeftSibling(btree);
            }
            catch (WaitError e)
            {
                return false;
            }

            // We can wait for the right sibling since it's
            // in the deadlock-free direction.

            rightsib = this.getRightSibling(btree);

            // Change the links that pointed to this page to
            // point to the appropriate sibling.

            if (leftsib != null)
                leftsib.setRightSibling(rightsib);
            if (rightsib != null)
                rightsib.setLeftSibling(leftsib);

            // Deallocate the page.
            // Would need to clear out aux object here.
            //
            // RESOLVE (mikem) - how to deallocate a page. //
            btree.container.removePage(this.page);

            // After removePage call the current page is unlatched, and should
            // not be referenced anymore.
            if (SanityManager.DEBUG)
            {
                SanityManager.ASSERT(!this.page.isLatched());
            }

            return true;
        }
        finally
        {
            // Unlatch the siblings.
            if (leftsib != null)
                leftsib.release();
            if (rightsib != null)
                rightsib.release();
        }
	}

    public Page getPage()
    {
        return(page);
    }

    /**
     * Get the row.
     *

     * Return the object array that represents the control row for use
     * in raw store fetch, insert, and/or update.
     *
	 * @return The row.
     *
     **/
    protected final DataValueDescriptor[] getRow()
    {
        return(row);
    }

	/*
	 * The following methods must be implemented by all
	 * control rows.
	 */

    /**
     * Check consistency of the page and its children, returning the number of
     * pages seen, and throwing errors if inconsistencies are found.
     *

     *
	 * @return The identifier to be used to open the conglomerate later.
     *
     * @param btree  The open btree to associate latches/locks with.
     * @param parent The parent page of this page, "null" if this page is
     *               root or if not maintaining parent links.
     * @param check_other_pages
     *               Should the consistency check go to other pages (this
     *               option breaks the latch protocol).
     *
	 * @exception  StandardException  Standard exception policy.
     **/
	abstract protected int checkConsistency(
    OpenBTree  btree,
    ControlRow parent,
    boolean    check_other_pages)
        throws StandardException;

    /**
     * Return the left child pointer for the page.
     *

     * Leaf pages don't have children, so they override this and return null.
     *
	 * @return The page which is the leftmost child of this page.
     *
     * @param btree  The open btree to associate latches/locks with.
     *
	 * @exception  StandardException  Standard exception policy.
     **/
	protected abstract ControlRow getLeftChild(OpenBTree btree)
        throws StandardException;

    /**
     * Return the right child pointer for the page.
     *

     * Leaf pages don't have children, so they override this and return null.
     *
	 * @return The page which is the rightmost child of this page.
     *
     * @param btree  The open btree to associate latches/locks with.
     *
	 * @exception  StandardException  Standard exception policy.
     **/
	protected abstract ControlRow getRightChild(OpenBTree btree)
        throws StandardException;

    /**
     * Perform page specific initialization.
     *

     *
     **/
    protected abstract void controlRowInit();

    /**
     * Is the current page the leftmost leaf of tree?
     *

     *
	 * @return true if the current page is the leftmost leaf of the tree,
     *              else return false.
     *
	 * @exception  StandardException  Standard exception policy.
     **/
    public abstract boolean isLeftmostLeaf()
		throws StandardException;

    /**
     * Is the current page the rightmost leaf of tree?
     *

     *
	 * @return true if the current page is the rightmost leaf of the tree,
     *              else return false.
     *
	 * @exception  StandardException  Standard exception policy.
     **/
    public abstract boolean isRightmostLeaf()
		throws StandardException;

	/**
	 ** Perform a recursive search, ultimately returning the latched
	 ** leaf page and row slot after which the given key belongs.
	 ** The slot is returned in the result structure.  If the key
	 ** exists on the page, the resultExact field will be true.  Otherwise,
	 ** resultExact field will be false, and the row slot returned will be
	 ** the one immediately preceding the position at which the key
	 ** belongs.

    @exception StandardException Standard exception policy.
	 **/
	public abstract ControlRow search(
        SearchParameters    search_params)
            throws StandardException;
    /**
     * Get the number of columns in the control row.
     *

     * Control rows all share the first columns as defined by this class and
     * then add columns to the end of the control row.  For instance a branch
     * control row add a child page pointer field.
     *

     *
	 * @return The total number of columns in the control row.
     **/
    protected abstract int getNumberOfControlRowColumns();

    /**
     * Search and return the left most leaf page.
     *

	 * Perform a recursive search, ultimately returning the
     * leftmost leaf page which is the first leaf page in the
	 * leaf sibling chain.  (This method might better be called
	 * getFirstLeafPage()).
     *
	 * @return The leftmost leaf page.
     *
     * @param btree  The open btree to associate latches/locks with.
     *
	 * @exception  StandardException  Standard exception policy.
     **/
	protected abstract ControlRow searchLeft(OpenBTree btree)
        throws StandardException;

    /**
     * Search and return the right most leaf page.
     *

	 * Perform a recursive search, ultimately returning the
	 * rightmost leaf page which is the last leaf page in the
	 * leaf sibling chain.  (This method might better be called
	 * getLastLeafPage()).
     *
	 * @return The rightmost leaf page.
     *
     * @param btree  The open btree to associate latches/locks with.
     *
	 * @exception  StandardException  Standard exception policy.
     **/
	protected abstract ControlRow searchRight(OpenBTree btree)
        throws StandardException;

	/**
	 **	Perform a recursive shrink operation for the key.
	 ** If this method returns true, the caller should
	 ** remove the corresponding entry for the page.
	 ** This routine is not guaranteed to successfully
	 ** shrink anything.  The page lead to by the key might
	 ** turn out not to be empty by the time shrink gets
	 ** there, and shrinks will give up if there is a deadlock.
     **

     ** As currently implemented shrinkFor must be executed while holding
     ** an exclusive container lock on the entire table.  It is expected that
     ** this call is made within an internal transaction which has been called
     ** by a post commit thread.  Latches are released by the code.  The raw
     ** store guarantees that deallocated pages are not seen by other xacts
     ** until the transaction has been committed.
	 **

     ** Note that a non-table level lock implementation must hold latches on
     ** pages affected until end transaction.
     **

     ** On entry, the current page is latched.  On exit, all pages will have
     ** been unlatched.
     **
     ** @exception StandardException Standard exception policy.
	 **/
	protected abstract boolean shrinkFor(
    OpenBTree               btree,
    DataValueDescriptor[]   key)
        throws StandardException;

    /**
     * Perform a top down split pass making room for the the key in "row".
     *

     * Perform a split such that a subsequent call to insert
	 * given the argument index row will likely find room for it.  Since
     * latches are released the client must code for the case where another
     * user has grabbed the space made available by the split pass and be
     * ready to do another split.
     *

     *
	 * @return page number of the newly allocated leaf page created by split.
     *
     * @param open_btree The open btree to associate latches with.
     * @param template   A scratch area to use while searching for split pass.
     * @param parentpage The parent page of the current page in the split pass.
     *                   starts at null for root.
     * @param row        The key to make room for during the split pass.
     * @param flag       A flag used to direct where point of split should be
     *                   chosen.
     *
	 * @exception  StandardException  Standard exception policy.
     **/
	protected abstract long splitFor(
    OpenBTree               open_btree,
    DataValueDescriptor[]   template,
    BranchControlRow        parentpage,
    DataValueDescriptor[]   row,
    int                     flag)
        throws StandardException;

	/**
	 ** Recursively print the tree starting at current node in tree.

    @exception StandardException Standard exception policy.
	 **/
	public abstract void printTree(
    OpenBTree  btree)
        throws StandardException;

	/*
	** Methods of AuxObject
	*/

	/**
		Called when the page is being evicted from cache or when a rollback
		happened on the page and may possibly have changed the control row's
        value

		@see AuxObject#auxObjectInvalidated
	**/
 	public void auxObjectInvalidated()
	{
		version = null;
		leftSiblingPageNumber = null;
		rightSiblingPageNumber = null;
		parentPageNumber = null;
		level = null;
		isRoot = null;
		page = null;
	}

    /**
     * Return a new template for reading a data row from the current page.
     *

     * Default implementation for rows which are the same as the conglomerates
     * template, sub-classes can alter if underlying template is different
     * (for instance branch rows add an extra field at the end).
     *
	 * @return Newly allocated template.
     *
	 * @exception  StandardException  Standard exception policy.
     **/
    public DataValueDescriptor[] getRowTemplate(OpenBTree    open_btree)
		throws StandardException
    {
        return(open_btree.getConglomerate().createTemplate(
                    open_btree.getRawTran()));
    }

	/**
	 ** Debug toString() method's.
	 **/

    /**
     * Dump complete information about control row and rows on the page.
     *

     *
	 * @return string with all info.
     *
	 * @exception  StandardException  Standard exception policy.
     **/
	public String debugPage(
    OpenBTree   open_btree)
        throws StandardException
	{
        String ret_str;

        if (SanityManager.DEBUG)
        {
            StringBuilder string = new StringBuilder(4096);
            string.append(this.toString());
            string.append("\n");

            DataValueDescriptor[] row = getRowTemplate(open_btree);

            string.append(
                ConglomerateUtil.debugPage(
                    page, ControlRow.CR_SLOT + 1, false, row));

            ret_str = string.toString();
        }
        else
        {
            ret_str = null;
        }

        return(ret_str);
	}

    /**
     * The standard toString().
     *

     * This is a concise print out of the info in the control row, does not
     * include anything the page.
     *

     *
     **/
	public String toString()
    {
        if (SanityManager.DEBUG)
        {
            StringBuilder string = new StringBuilder(4096);

            try {

                // LEAF, BRANCH, LEAF-ROOT, BRANCH-ROOT
                string.append((getLevel() == 0) ? "\nLEAF" : "\nBRANCH");
                string.append((getIsRoot())     ? "-ROOT" : "");

                // (PAGE NUMBER)(LEVEL):num recs
                //     example: (107)(lev=2):num recs = 16
                string.append("(");
                string.append(this.page.getPageNumber());
                string.append(")(lev=");
                string.append(level);
                string.append("): num recs = ");
                string.append(this.page.recordCount());
                string.append("\n");

                // rest of info
                string.append("\t");

                string.append("left = ");
                string.append(getleftSiblingPageNumber());
                string.append(";");

                string.append("right = ");
                string.append(getrightSiblingPageNumber());
                string.append(";");

                string.append("parent = ");
                string.append(getParentPageNumber());
                string.append(";");

                string.append("isRoot = ");
                string.append(getIsRoot());
                string.append(";");

            }
            catch (Throwable t)
            {
                string.append(
                    "error encountered while doing ControlRow.toString()");
            }

            return(string.toString());
        }
        else
        {
            return(null);
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
Home/World/Games/PSL organisers did not sleep for six weeks, says PCB chairperson
PSL organisers did not sleep for six weeks, says PCB chairperson
TheInstantTeam March 19, 2019
Photograph: AFP
Pakistan Cricket Board Chairperson Ehsan Mani has stated that his establishment labored extraordinarily laborious to organise the Pakistan Tremendous League (PSL) 2019.
"The organising staff didn't sleep correctly for six weeks," he stated in a press convention on Monday. "Everybody performed their half in organising the PSL fixtures in Karachi."
Mani added that the organisers had a variety of assist from Sindh authorities and Rangers.
The event had its justifiable share of controversies too. Indian-owned IMG Reliance, which was given the rights to broadcast PSL matches, declined to take action due to Pakistan's escalating tensions with India. PSL organisers discovered one other manufacturing associate then. He added that the problems obtained sorted out in a well timed method by the grace of Allah.
Associated: Indian-owned IMG Reliance won't be broadcasting PSL matches anymore
Talking concerning the terrorist assault in New Zealand's Christchurch, he expressed his heartfelt condolences to these affected by the mass shootings. He added that they determined to maintain the closing ceremony a easy affair in mild of the tragedy.
Pakistan cricket was affected due to terrorist assaults. "Cricket mustn't cease due to terrorism," Mani stated.
The PCB chairperson, talking on the PSL fixtures in Karachi, stated that greater than 0.2 million spectators loved the matches within the Nationwide Stadium.
Associated: 'Today, cricket, Karachi and the people of Pakistan have won'
"Abroad cricketer and international supporting employees additionally got here to Karachi for the T20 event. For the primary time, not a single participant refused to play in Pakistan," he stated. "The whole nation is looking for the PSL to be held once more.
"Greater than 80 officers of the international technical employees got here to Pakistan as nicely," Mani added.
Talking on the well being of Asif Ali's daughter, he stated that Islamabad United has given the Spirit of Cricket Trophy to the all-rounder. "His daughter is extraordinarily sick and all our prayers are together with her," he added.
Associated: Dean Jones cries while speaking about the condition of Asif Ali's daughter
He stated that PCB will attempt their finest to organise all the fifth version of the event within the nation.
"Rawalpindi cricket stadium is being renovated. The Multan cricket stadium is appropriate for cricket matches," he stated. "Miranshah cricket stadium has been constructed too." These stadiums weren't getting used as a result of there was no worldwide cricket within the nation. We'll go to these stadiums within the subsequent few months.
On the potential of organising a cricket match in Hyderabad, he stated that a variety of work must be carried out to get the cricket stadium in form for the matches. "There isn't any electrical energy there and the infrastructure is just not so good. There are not any inns in Hyderabad. The cricketers need to keep in five-star inns with swimming pool services. We'll attempt to organise a match there," he added.
He additionally spoke on selling ladies's cricket as nicely. "Girls's cricket is my first precedence. There are a variety of gifted ladies cricketers whom can't be undermined."
Nonetheless, the cricket board's chief said that it's not possible to organise an excellent league for girls cricketers in the intervening time. "The pool of girls's cricket may be very small and fewer than 50 ladies are taking part in in the intervening time."
Associated: ICC orders PCB to pay 60% of BCCI's legal costs
Pakistan paid twice the sum of money for internet hosting fixtures in Dubai, he stated. "It's essential to host fixtures in Pakistan if now we have to enhance the cricketing construction within the nation."
Mani added that solely a single assembly of the cricket committee has taken place and the board is engaged on their suggestions.
Hailing Najam Sethi's companies for making PSL a profitable occasion, he stated that his predecessor had labored rather a lot for making the event what it's at this time. He claimed that that they had invited him to observe the PSL fixtures however didn't get any reply from him.
PCB Managing Director Wasim Khan, talking within the press convention, stated that they're able to offering high-level safety to the groups. "The delegation of cricket boards of Sri Lanka and Bangladesh had been happy with the safety plans. We'll attempt to organize a bilateral collection towards Sri Lanka in Pakistan," he stated.
Asif Ali Bangladesh Islamabad United Karachi Pakistan Cricket Board pakistan super league pcb PCB-BCCI series dispute psl PSL 2019 sri lanka
Vote for Williamson, England's Stokes tells New Zealanders
PHF's new secretary will get 'vote of confidence' from congress
PHF's congress appoint Manzoor Junior as new chief selector
Nationwide Hockey Championship kicks off in Karachi
Immense mismanagement in Nationwide Hockey Championship
Lasith Malinga to play T20s after quitting ODIs
West Indies recall Narine and Pollard for T20s in opposition to India
Isis calls on followers to 'take revenge' for New Zealand terror attack
Death toll rises to 25 as one more infant dies in drought-hit Thar
NFL free agency news: Cowboys sign safety George Iloka | NFL

redpajama_set_name: RedPajamaCommonCrawl


text:
Liverpool suffer setback over Moises Caicedo
Liverpool are among the likes of Manchester United, Chelsea and Arsenal in receiving a major setback over the potential signing of Brighton starlet, Moises Caicedo.
That is according to a report from The Mirror, who claim that Brighton are ready to sit down and discuss a new deal after several clubs registered their interest in signing the 20-year-old in the summer transfer window.
As per the same report, it is said that the 23-cap Ecuadorian international will see his efforts rewarded with a wage that brings him in line with other fellow first-team regulars.
Klopp will be gutted
The latest reports surrounding the much sought-after Caicedo will come as a blow to Jurgen Klopp, who will not want his side to miss out on signing a star who "will turn into a world class player", in what was a statement from his national team manager Gustavo Alfaro, in a game that saw Caicedo mark Lionel Messi on his debut for his Country.
In what is demonstrative of a lack of depth and quality in the Liverpool engine room at this moment in time, the side will surely be looking to bring in high quality options with bags of potential, and Caicedo is an asset who fits those parameters perfectly.
But, if the Ecuadorian midfielder is to sign improved terms at The Amex Stadium, then Klopp's hopes of prising the midfielder away in the winter transfer window will either fall short, or elevate the player's price tag to an almost untenable sum.
Though, if the latter is to occur, it will be a reflection of the 20-year-old's average of 10.77 ball recoveries, 8.57 passes under pressure, and 4.25 tackles + interceptions per 90, with these metrics illustrative of a star in the making.
Caicedo was developing both parts of his game under former boss Graham Potter to great effect. So whether he can keep this up under the tutelage of a different boss remains to be seen.
But, from a Liverpool perspective, this is certainly one to keep an eye on, in a time that sees the club vulnerable amidst this latest setback in securing the starlet short-term.
Liverpool: Calvin Ramsay praised by journalist after impressive full debut
Liverpool: Why Mohamed Salah is still crucial


Let us be your guide to the culture, warmth, and beauty of southern Belize. We are a jungle eco-resort situated on 100 acres along the banks of the Moho River in the foothills of the Maya Mountains. Explore the rainforest, rivers, reefs, and ruins and immerse yourself in local life and forge new relationships. Our tours take you chocolate making with a Mayan cacao farmer and his family, swimming through wet caves to an underground waterfall, and exploring ruins of the ancient Maya. We will show you the real Belize.
Activities available at the lodge include birding, kayaking, swimming, medicinal plant walks, yoga, massage or simply relaxing in a hammock and enjoying our incredible farm-to-table foods in a jungle paradise. We are only eight miles from the Caribbean – close enough to enjoy snorkeling, diving, or fishing on one of our day trips.
Our stay at Cotton Tree Lodge has been an amazing experience. Valerie and her staff are all friendly and accommodating, and Blue's virgin Chocolate Coladas were a favorite amongst our teens. Pop took us cave swimming at Blue Creek and taught us a bit about Mayan culture. Armando's organic garden is amazing: the calaloo was delicious. And we had a blast sharing meals and swims off the sinking dock in the Moho River with new friends! The beds were comfortable, plenty of hot water for showers, plenty of bottled water for drinking...we would definitely stay at Cotton Tree for a jungle adventure again in the future!
Subscribe to our mailing list to get upcoming specials directly to your inbox!
Free roundtrip flights between Belize International and Punta Gorda Airports for the guests staying 4 nights or longer and purchasing our All Inclusive Package directly on our website. May not be combined with any other discounts or promotions, 2 people per room maximum. Please use code FREEAIR when you book.
Free nanny services for guests purchasing our All Inclusive Package directly on our website. May not be combined with any other discounts or promotions.Use code: FREENANNY at booking.


text:
Latest in Culture
How to be a human being in the comments: A refresher
Portland wants to get driverless cars on its roads this year
The Renault R.S. 2027 Vision could be the F1 car of the future
Coal company plans Kentucky's biggest solar farm for old mine site
Image credit: REUTERS/Jason Redmond
Amazon will help train veterans for tech jobs
The company is working with the Labor Department on an apprenticeship program.
Billy Steele
01.20.17 in Business
REUTERS/Jason Redmond
Last week, Amazon said it would bring 100,000 full-time jobs to the US by 2018. This week, the online retailer announced a registered apprenticeship program with the US Department of Labor that will offer training to veterans. The initiative follows CEO Jeff Bezos' pledge to hire 25,000 veterans and their spouses over the course of five years. That goal was announced back in May.
This new apprenticeship program will train veterans for "in-demand technical careers" at Amazon. In a press release announcing the initiative, the US Department of Labor said that the first participants will be trained for an AWS Cloud Support Associate position. The Labor Department also explained that over 200 companies, colleges and labor organizations have signed on to participate in the larger ApprenticeshipUSA program. As TechCrunch notes, Amazon and Tesla Motors are the only two big name tech companies listed that offer registered apprenticeships.
Via: TechCrunch
Source: US Department of Labor
In this article: amazon, apprenticeship, business, culture, departmentoflabor, jobs, tech, training, veterans


tripping over nothing in particular temporarily suspended.
Thus, the photos below with the ridiculously chic Hater Blockers.
Here is Eve demonstrating "Full Pout."
Here is Cate ensuring that her shades are securely in place.
Here is Jonah tolerating my interruption of his Lego time.


Skilled and dedicated team: We are a small but powerful team of 5 full-time employed staff members.
Enabling sustainable change: Achieved by strength-based and citizen-driven models.
implementing by using their 'strengths' (current assets).
Learning organisation: Our work generates local knowledge and local priorities for change.
People believing in themselves, working together to create healthy and caring communities.
With communities, building physical, mental and social health and inspiring hope.


Southwire's Type TC Power Cable is manufactured using Type THHN or THWN conductors. Individual conductors are bare annealed copper covered with a polyvinyl chloride (PVC) insulation over which a nylon (polyamide) or UL listed equal jacket is applied. The overall jacket consists of a flame retardant, moisture and sunlight resistant PVC jacket. Non-halogen jacket available upon request.


text:
DRC: Bishops Call for Active Involvement of SADC in General Election
Latest News September 14, 2018 Neliba
KINSHASA, SEPTEMBER 14, 2018 (CISA)-The National Episcopal Conference of Congo (CENCO) has urged President Edgar Lungu of Zambia, the Chairperson of the Southern African Development Community (SADC)'s organ on politics Defense and Security Cooperation (SADC Troika) to support the Democratic Republic of Congo to conduct peaceful elections in December.
Archbishop Fridolin Ambongo the Vice President of CENCO and Coadjutor Archbishop of Kinshasa led representatives of CENCO in a meeting with President Lungu on Monday September 10, at State House in Lusaka.
"We are convinced that only a credible, transparent, inclusive and peaceful election is the real solution and peaceful way out of the socio-political crisis that our country has been going through since 2016," reads part of the message to President Lungu, reported Vatican News.
"…with your SADC colleagues, you can help the Congolese people come out of this crisis to win the challenge of organising a worthy, credible, transparent, inclusive and peaceful election on 23 December 2018," the bishops said.
They requested SADC to accompany the Congolese people and to also play a role in addressing some of the concerns expressed for credibility, transparency, inclusive and peaceful elections.
Some of the issues raised by the Bishops include fears that eligible voters could be left out due to the biometric voter registration; doubts about the reliability of the national election commission (CENI)'s voting machines; a continuing tense socio-political climate in the country and the persistence insecurity particularly in the eastern part of the country.
President Lungu through his official Facebook page confirmed to have met DRC Bishops Conference when they paid him a courtesy call at Statehouse.
"During our meeting, the DRC Secretary General of the Bishops' Conference Father Donatien Nshole told me that the Church is worried with the current situation in DRC elections. The exclusion of Jean-Pierre Bemba, Moise Katumbi and three other former Prime Ministers may result in the outcome of the elections being undermined," he reported.
He pledged to work with other SADC member states on taking steps to help create confidence in the DRC's electoral process and ensure that the outcome of the election is free, fair and universally acceptable.
DRC is a member of the Southern African Development Community (SADC), a Regional Economic Community comprising 16 Member States. The SADC Troika on Politics, Security and Defense is formal institution of SADC with the mandate to support the achievement and maintenance of security and the rule of law in the SADC region.
GHANA: Koffi Annan Laid to Rest in Accra
NIGERIA: Government Declares Ongoing Floods a National Disaster


The FLX320-1-CV-D is a single channel, 70V/100V, 1/2 rack amplifier delivering 320W audio power with built in DSP, RS232 control and remote volume control. The FLX320-1-CV-D amplifier supports Dante™ audio.
The FLX (pronounced FLEX) Series of amplifiers is the most versatile 1/2 rack amplifier Stewart has ever produced. The FLX320-1-CV-D provides 320 watts into a 4 Ohm load. At the heart of the amplifier is a robust, internal, full-function DSP designed to solve a multitude of your audio problems in just one enclosure. The DSP includes a full cross-point mixer, EQ, filters, limiters and much more. A USB port makes programming simple, fast and repeatable for large installations. The RVC and RS232 control allow volume control from a wide range of devices. In addition, the Dante™ network capability provides four network input audio channels and four network output audio channels. You won't find a more flexible combination of power output and processing in a comparable package on the market today.


Tweak Library – Disable search option using "F3" button in Internet Explorer.
Disable search option using "F3" button in Internet Explorer.
In Internet Explorer, the "F3" keystroke adds a Search panel to the left of the screen. This setting can make "F3" keystroke ineffective and restrict it from launching the Search panel.
You can control some features and behaviors of Internet Explorer. If you press "F3" key in Internet Explorer, Internet Explorer will show a Search panel to the left of the screen. You can restrict the "F3" button from launching this effect.
Even if you enable the "F3" keystroke to display the Search panel in Internet Explorer, all the open Internet Explorer windows will not show this panel.
For this, go to Start > Run, enter "regedit" and navigate to the registry path listed below. You can create a DWORD value "NoFindFiles" at HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE registry paths, if this value does not exist.
Now, right-click and modify the value to "1" which can restrict the launch of Search panel with "F3" keystroke. However, if you want to get back to the original state, change the value to "0".
This feature works on Internet Explorer version 5 and above. Additionally, in case of Windows 98/ME, "F3" keystroke will launch "Find Files" dialog instead of showing the Search panel.
The ".reg" file can disable search option using "F3" button in Internet Explorer.
The ".reg" file can permit search using "F3" button.
The Search is not allowed by pressing the 'F3' key, after the changes have been made in the registry.
The user can invoke 'Search Companion' by pressing the "F3" key.
Now, right-click in the open area to create a DWORD Value with the name "NoFindFiles" in "Restrictions" key.
Next, right-click on the "NoFindFiles" DWORD value and click on 'Modify'.


text:
In the framework of the Geneva consultations, U.N. Special Envoy for Syria Mr. Staffan de Mistura met today with a delegation from The Day After Association, led by Mr. Murhaf Joueijati, and a delegation from the Cordoba Working Group, led by Mr. Mohamed Ahmed Barmou.
Both delegations shared with the U.N. Special Envoy their perspectives for a political solution in Syria and discussed the worsening situation on the ground.
At the end of his meetings, Mr. de Mistura reiterated his strong conviction that only a political solution can address the root causes of the ongoing conflict in a sustainable manner and bring it to an end.
In a press statement issued on 30 May, the United Nations Special Envoy for Syria, Staffan de Mistura, strongly condemned the death of at least 70 civilians in Syria's northern Aleppo province by barrel bombs dropped from government helicopters. "The news of aerial bombing by Syrian helicopters on a civilian market area of the Aleppo neighborhood of Al Shaar deserves the most strong international condemnation," he said. Mr. de Mistura stressed that the protection of civilians during armed conflicts is a cornerstone of international humanitarian law, and applies in all circumstances and without distinction.
On 21 May, Mr. de Mistura received a delegation from the Hashemite Kingdom of Jordan, led by Mr. Nawaf Al Tal, Adviser to the Foreign Minister. Mr. Al Tal shared his Government's assessments of the situation in Syria, the extent of the humanitarian suffering and its impact on the neighboring countries, as well as ways to end the conflict there through diplomatic efforts. In his separate meeting with a delegation of the European Union, led by EEAS Managing Director Mingarelli, the Special Envoy heard the EU's emphasis on a search for a political solution to the Syrian crisis. Mr. Mingarelli reiterated the EU's full support for the OSE-led effort to create a conducive environment for the resumption of a meaningful political process. The Special Envoy also met with Ms. Basma Kodmani, Executive Director of the Arab Reform Initiative, Mr. Samir Aita, member of the Syrian Democratic Forum, and Mr. Nabil Kassis of the Al-Waed party. At the end of the day, Mr. de Mistura observed that, "deepening humanitarian and security concerns, as well as the evolving priorities of the people in Syria, are outpacing discussions over a political solution in Syria. The ISIL/Daesh offensive on Palmyra is a stark reminder of that", he stressed. Mr. de Mistura also took note of calls on the United Nations to redouble efforts to help Syrian and regional actors reach an agreement on a peaceful future Syria.
The UN Spokesperson told reporters on 12 May that Special Envoy for Syria, Staffan de Mistura, held consultations with the Chairman of the National Coordination Committee for Democratic Change (NCC), Hassan Abdel Azim, as well as with the Chairman of the Building the Syrian State political party, Louay Hussain. At the conclusion of these consultations, Mr. de Mistura stressed that it was critical to reach out to Syrian political actors. "No one more than the Syrians themselves recognize the urgency of bringing the conflict to an end", he stated. As part of ongoing consultations, the Special Envoy met over the past week with delegations from Saudi Arabia, Turkey and France as well as with former Special Envoy Kofi Annan. Mr. de Mistura also met with various Syrians, including representatives of civil society and religious leaders to hear further views and perspectives on ways to resolve the conflict.


Sculptural brass ring with jewel-toned glass cabochons. Mondo Mondo rings are stackable, becoming a unique statement to each wearer.
Trained in metalsmithing by Mexican artisans, Natasha Ghosn created her jewelry line Mondo Mondo (World World in Italian) as her own "little world" to explore. The result – an unusual, eclectic line, incorporating bright and reflective jewel tones into molded and sculptural cast polished brass. Each bejeweled piece is designed and made by hand in Ghosn's Echo Park studio in Los Angeles.


Faqbot transforms companies' FAQ page into automated chat. We use best-in-class artificial intelligence to understand, reduce customer support volume and scale.
Faqbot: This 18 year old French high school dropout just launched a new AI chatbot platformThis article will take you 3 minute(s) to read Startups are using artificial intelligence (AI) in diverse processes such as employee hiring , personal assistants , chatbots and more. Global chatbot market is expected to reach $1.23 billion by 2025, this is an annual growth rate of 24.3 percent, reports Grand View Research .
Turn your FAQ page into a chatbot without knowing how to code - The American GeniusA new debate is emerging in the web development world and it's not about which framework is best, or which language is most marketable. In fact the debate isn't a matter of code, it's a matter of words. "Full Stack Developer" is the title developers both new and old often use to describe themselves.
Faqbot wants to eliminate the old FAQ pages with chatbotsFrench teenager Mathis André had been tinkering around building websites when he dropped out of school at the age of 16 before eventually becoming interested in bots, the software which has exhibited a lot of promise in areas like customer service and e-commerce.
Hensies: Mathis a levé 440.000€ pour sa start-upEn 2017, Mathis André a lancé sa propre start-up, nommée Faqbot. Le jeune Hensitois de 19 ans et Denny Wong, son associé, ont trouvé des investisseurs pour développer leur entreprise. Ils viennent de lever 440.000€. Mathis André, passionné d'informatique, avait choisi d'arrêter l'école à 15 ans afin de se consacrer à son domaine de prédilection.
Would you recommend Faqbot 3.0 to a friend?
My name is Mathis. I'm the CEO & Co-founder of Faqbot. Faqbot transforms companies' FAQ page into automated chat powered by artificial intelligence and natural language processing. Approximately 1 year ago we launched our first platform version and the result was tremendous. We have worked hard to develop the best SaaS platform to build self-servicing help for customer support, sales and marketing automation. We built our own AI engine that is optimised for FAQ-content, and which uses natural language processing (NLP) to best connect customer questions with helpful answers. By building our own AI engine instead of using existing technologies, we chose the hard way of doing this. But it also paid off: because of our experience our AI engine is two times more accurate than other AI engines on the market for this specific task. Now we are ready and excited to use this AI-engine to improve the accuracy of our chatbots. We would love for you to test it out & hear your feedback! Feel free to comments here, or email me mathis@faqbot.co, if you have any questions or comments. Sign up to our 14-day free trial (no credit card required) and let us know what you think, enjoy!!
Website is offline here. What's going on?
Trying to visit https://faqbot.co/home, https://faqbot.co and other variations, but none seems to work. When you're going to fix that?
@fernando_paladini Hi Fernando, website is live, can you please details?
@fernando_paladini @mathisandre_ I am in China, I can not open https://faqbot.co/, https://www.faqbot.co/ too. It is a blank page.
@mathisandre_ The website still ofline here. Any update on that? I don't know what's going on. I would like to check out your product but I cannot do that. It just shows an blank screen / blank page, just like the reported by @hain .
Why do you not have the chatbot on your site? That would show commitment to eat your own dog food.
@kevbaum It is a good remark! Maybe because we are too busy for our customers and prospects first, then we will set up our own Faqbot ;) Did you tried Faqbot?
@mathisandre Not yet - evaluating a few for feature/price fit - We evaluate SAAS products and recommend them to our client base. We then help them make them work. We are currently looking for Products the improve/reduce cost around client support and engagement. I will have a look soon. Currently evaluating Drift.
@kevbaum Great to hear this. Faqbot can definitely help your client base to reduce support volume. We also have an API you can plug to work with Drift and Intercom for your information!