text:
package scratchlib.objects.user.morphs;

import java.awt.image.BufferedImage;
import java.util.Arrays;
import java.util.Collections;
import java.util.stream.Stream;

import scratchlib.media.ScratchFormEncoder;
import scratchlib.objects.ScratchObject;
import scratchlib.objects.fixed.collections.ScratchObjectAbstractCollection;
import scratchlib.objects.fixed.collections.ScratchObjectArray;
import scratchlib.objects.fixed.collections.ScratchObjectDictionary;
import scratchlib.objects.fixed.collections.ScratchObjectOrderedCollection;
import scratchlib.objects.fixed.data.ScratchObjectAbstractString;
import scratchlib.objects.fixed.data.ScratchObjectUtf8;
import scratchlib.objects.fixed.dimensions.ScratchObjectPoint;
import scratchlib.objects.fixed.forms.ScratchObjectForm;
import scratchlib.objects.inline.ScratchObjectBoolean;
import scratchlib.objects.user.ScratchObjectCustomBlockDefinition;
import scratchlib.objects.user.media.ScratchObjectImageMedia;
import scratchlib.project.ScratchVersion;

/**
 * Represents a morph that has a name, media, variables, and - most importantly
 * - can contain scripts.
 *
 * <p>
 * The only known subclasses are the stage ({@link ScratchObjectStageMorph}) and
 * its sprites ({@link ScratchObjectSpriteMorph}).
 */
public class ScratchObjectScriptableMorph extends ScratchObjectMorph
{
    /**
     * Specifies a morph's name.
     *
     * @see ScratchObjectUtf8
     */
    public static final String FIELD_OBJ_NAME = "objName";

    /**
     * Specifies a morph's variables (e.g. the stage vars, or a sprite's vars).
     * Maps their names to their values.
     *
     * @see ScratchObjectDictionary
     */
    public static final String FIELD_VARS = "vars";
    /**
     * Specifies a morph's scripting bin (array of (point, blocksArray) tuples).
     *
     * @see ScratchObjectArray
     */
    public static final String FIELD_BLOCKS_BIN = "blocksBin";

    /**
     * BYOB 3.1.1 field. Specifies a morph's custom blocks
     * ({@link ScratchObjectCustomBlockDefinition}).
     *
     * @see ScratchObjectOrderedCollection
     */
    public static final String FIELD_CUSTOM_BLOCKS = "customBlocks";

    /**
     * Specifies whether a morph is just a clone of another morph.
     *
     * @see ScratchObjectBoolean
     */
    public static final String FIELD_IS_CLONE = "isClone";

    /**
     * Specifies all of the morph's media.
     *
     * @see ScratchObjectOrderedCollection
     */
    public static final String FIELD_MEDIA = "media";
    /**
     * Specifies the morph's current costume.
     *
     * @see ScratchObjectImageMedia
     */
    public static final String FIELD_COSTUME = "costume";

    /**
     * Constructs an instance with the default values and with the given classID
     * and version.
     *
     * @param classID The ID of the class this object belongs to.
     * @param version The version of the class this object belongs to.
     */
    public ScratchObjectScriptableMorph(int classID, ClassVersion version)
    {
        super(classID, version);

        specifyField(FIELD_OBJ_NAME, new ScratchObjectUtf8(""));

        specifyField(FIELD_VARS, new ScratchObjectDictionary());
        specifyField(FIELD_BLOCKS_BIN, new ScratchObjectArray());

        specifyField(FIELD_CUSTOM_BLOCKS, new ScratchObjectOrderedCollection(), ScratchVersion.BYOB311);

        specifyField(FIELD_IS_CLONE, ScratchObjectBoolean.FALSE);

        specifyField(FIELD_MEDIA, new ScratchObjectOrderedCollection());
        specifyField(FIELD_COSTUME, NIL);

        // populate fields

        ScratchObjectImageMedia background = getEmptyBackground();
        setField(FIELD_MEDIA, new ScratchObjectOrderedCollection(Collections.singletonList(background)));
        setField(FIELD_COSTUME, background);
    }

    /**
     * @return An empty image that can be used as the default background without
     *         taking up a lot of space.
     */
    private static ScratchObjectImageMedia getEmptyBackground()
    {
        BufferedImage im = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);
        ScratchObjectForm form = ScratchFormEncoder.encode(im);

        ScratchObjectImageMedia background = new ScratchObjectImageMedia();
        background.setField(ScratchObjectImageMedia.FIELD_MEDIA_NAME, new ScratchObjectUtf8("empty"));
        background.setField(ScratchObjectImageMedia.FIELD_FORM, form);

        return background;
    }

    // ---- BASIC --------------------------------------------------------------

    /**
     * @return The morph's name.
     */
    public String getName()
    {
        return ((ScratchObjectAbstractString) getField(FIELD_OBJ_NAME)).getValue();
    }

    /**
     * Updates the morph's name. Note that this change is NOT reflected anywhere
     * else (when used in blocks, etc).
     *
     * @param name The new name.
     */
    public void setName(String name)
    {
        setField(FIELD_OBJ_NAME, new ScratchObjectUtf8(name));
    }

    // ---- CUSTOM BLOCKS ------------------------------------------------------

    /**
     * @return The number of custom blocks the morph owns.
     */
    public int getCustomBlockCount()
    {
        final ScratchObject collectionObj = getField(FIELD_CUSTOM_BLOCKS);
        if (collectionObj == ScratchObject.NIL) {
            return 0;
        }
        return ((ScratchObjectAbstractCollection) collectionObj).size();
    }

    /**
     * Obtains a custom block from the morph. Indexes run from 0 to
     * {@code getCustomBlockCount()}.
     *
     * @param index The custom block's index.
     * @return The custom block object at the given index.
     */
    public ScratchObjectCustomBlockDefinition getCustomBlock(int index)
    {
        final ScratchObjectAbstractCollection collection = (ScratchObjectAbstractCollection) getField(
                FIELD_CUSTOM_BLOCKS);
        return (ScratchObjectCustomBlockDefinition) collection.get(index);
    }

    /**
     * Adds a custom block to the morph. Note that the block's {@code isGlobal}
     * flag is not updated.
     *
     * @param block The custom block to add.
     */
    public void addCustomBlock(ScratchObjectCustomBlockDefinition block)
    {
        ScratchObject collectionObj = getField(FIELD_CUSTOM_BLOCKS);
        if (collectionObj == ScratchObject.NIL) {
            collectionObj = new ScratchObjectOrderedCollection();
            setField(FIELD_CUSTOM_BLOCKS, collectionObj);
        }
        ((ScratchObjectAbstractCollection) collectionObj).add(block);
    }

    /**
     * Removes a custom block from the morph. Indexes run from 0 to
     * {@code getCustomBlockCount()}.
     *
     * @param index The custom block's index.
     */
    public void removeCustomBlock(int index)
    {
        final ScratchObject collectionObj = getField(FIELD_CUSTOM_BLOCKS);
        ((ScratchObjectAbstractCollection) collectionObj).remove(index);
    }

    /**
     * Removes a given custom block from the morph.
     *
     * @param block The custom block.
     */
    public void removeCustomBlock(ScratchObjectCustomBlockDefinition block)
    {
        final ScratchObject collectionObj = getField(FIELD_CUSTOM_BLOCKS);
        ((ScratchObjectAbstractCollection) collectionObj).remove(block);
    }

    /**
     * Removes all custom blocks from this morph.
     */
    public void clearCustomBlocks()
    {
        final ScratchObject collectionObj = getField(FIELD_CUSTOM_BLOCKS);
        if (collectionObj == ScratchObject.NIL) {
            return;
        }
        ((ScratchObjectAbstractCollection) collectionObj).clear();
    }

    /**
     * @return A stream of all custom blocks the morph owns.
     */
    public Stream<ScratchObjectCustomBlockDefinition> streamCustomBlocks()
    {
        final ScratchObject collectionObj = getField(FIELD_CUSTOM_BLOCKS);
        if (collectionObj == ScratchObject.NIL) {
            return Stream.empty();
        }
        return ((ScratchObjectAbstractCollection) collectionObj).stream()
                .map(obj -> (ScratchObjectCustomBlockDefinition) obj);
    }

    // ---- SCRIPTS ------------------------------------------------------------

    /**
     * @return The number of scripts the morph owns.
     */
    public int getScriptCount()
    {
        final ScratchObject collectionObj = getField(FIELD_BLOCKS_BIN);
        return ((ScratchObjectAbstractCollection) collectionObj).size();
    }

    /**
     * Obtains a script from the morph. A script is a tuple/collection of its
     * location (a point) and body (a collection of blocks). Indexes run from 0
     * to {@code getScriptCount()}.
     *
     * @param index The script's index.
     * @return The script at the given index.
     */
    public ScratchObjectAbstractCollection getScript(int index)
    {
        final ScratchObjectAbstractCollection collection = (ScratchObjectAbstractCollection) getField(FIELD_BLOCKS_BIN);
        return (ScratchObjectAbstractCollection) collection.get(index);
    }

    /**
     * Obtains the location of one of the morph's scripts. Indexes run from 0 to
     * {@code getScriptCount()}.
     *
     * @param index The script's index.
     * @return The location of the script at the given index.
     */
    public ScratchObjectPoint getScriptLocation(int index)
    {
        return (ScratchObjectPoint) getScript(index).get(0);
    }

    /**
     * Obtains the body of one of the morph's scripts. The body is a collection
     * of block arrays. Indexes run from 0 to {@code getScriptCount()}.
     *
     * @param index The script's index.
     * @return The body of the script at the given index.
     */
    public ScratchObjectAbstractCollection getScriptBody(int index)
    {
        return (ScratchObjectAbstractCollection) getScript(index).get(1);
    }

    /**
     * Adds a script to the morph.
     *
     * @param location The script's location.
     * @param body The script's body (collection of block arrays).
     */
    public void addScript(ScratchObjectPoint location, ScratchObjectAbstractCollection body)
    {
        final ScratchObject collectionObj = getField(FIELD_BLOCKS_BIN);
        final ScratchObject script = new ScratchObjectArray(Arrays.asList(location, body));
        ((ScratchObjectAbstractCollection) collectionObj).add(script);
    }

    /**
     * Adds a script to the morph. A script is a tuple/collection of its
     * location (a point) and body (a collection of blocks).
     *
     * @param script The script tuple.
     */
    public void addScript(ScratchObjectAbstractCollection script)
    {
        final ScratchObject collectionObj = getField(FIELD_BLOCKS_BIN);
        ((ScratchObjectAbstractCollection) collectionObj).add(script);
    }

    /**
     * Removes a script from the morph. Indexes run from 0 to
     * {@code getScriptCount()}.
     *
     * @param index The script's index.
     */
    public void removeScript(int index)
    {
        final ScratchObject collectionObj = getField(FIELD_BLOCKS_BIN);
        ((ScratchObjectAbstractCollection) collectionObj).remove(index);
    }

    /**
     * Removes a given script from the morph.
     *
     * @param script The script.
     */
    public void removeScript(ScratchObjectAbstractCollection script)
    {
        final ScratchObject collectionObj = getField(FIELD_BLOCKS_BIN);
        ((ScratchObjectAbstractCollection) collectionObj).remove(script);
    }

    /**
     * Removes all scripts from this morph.
     */
    public void clearScripts()
    {
        final ScratchObject collectionObj = getField(FIELD_BLOCKS_BIN);
        ((ScratchObjectAbstractCollection) collectionObj).clear();
    }

    /**
     * @return A stream of all scripts the morph owns.
     */
    public Stream<ScratchObjectAbstractCollection> streamScripts()
    {
        final ScratchObject collectionObj = getField(FIELD_BLOCKS_BIN);
        return ((ScratchObjectAbstractCollection) collectionObj).stream()
                .map(obj -> (ScratchObjectAbstractCollection) obj);
    }

    /**
     * @return A stream of the bodies of all scripts the morph owns.
     */
    public Stream<ScratchObjectAbstractCollection> streamScriptBodies()
    {
        return streamScripts().map(script -> (ScratchObjectAbstractCollection) script.get(1));
    }
}


text:
using System;
using System.IO;
using System.Text;
using IEC60870.IE.Base;

namespace IEC60870.IE
{
    public class IeTime56 : InformationElement
    {
        private readonly byte[] value = new byte[7];

        public IeTime56(long timestamp, TimeZone timeZone, bool invalid)
        {
            var datetime = new DateTime(timestamp);
            var ms = datetime.Millisecond + 1000 * datetime.Second;

            value[0] = (byte) ms;
            value[1] = (byte) (ms >> 8);
            value[2] = (byte) datetime.Minute;

            if (invalid)
            {
                value[2] |= 0x80;
            }
            value[3] = (byte) datetime.Hour;
            if (datetime.IsDaylightSavingTime())
            {
                value[3] |= 0x80;
            }
            value[4] = (byte) (datetime.Day + ((((int) datetime.DayOfWeek + 5) % 7 + 1) << 5));
            value[5] = (byte) (datetime.Month + 1);
            value[6] = (byte) (datetime.Year % 100);
        }

        public IeTime56(long timestamp) : this(timestamp, TimeZone.CurrentTimeZone, false)
        {
        }

        public IeTime56(byte[] value)
        {
            for (var i = 0; i < 7; i++)
            {
                this.value[i] = value[i];
            }
        }

        public IeTime56(BinaryReader reader)
        {
            value = reader.ReadBytes(7);
        }

        public override int Encode(byte[] buffer, int i)
        {
            Array.Copy(value, 0, buffer, i, 7);
            return 7;
        }

        public long GetTimestamp(int startOfCentury, TimeZone timeZone)
        {
            if (value[6] < startOfCentury % 100)
            {
            }

            return -1;
        }

        public long GetTimestamp(int startOfCentury)
        {
            return GetTimestamp(startOfCentury, TimeZone.CurrentTimeZone);
        }

        public long GetTimestamp()
        {
            return GetTimestamp(1970, TimeZone.CurrentTimeZone);
        }

        public int GetMillisecond()
        {
            return ((value[0] & 0xff) + ((value[1] & 0xff) << 8)) % 1000;
        }

        public int GetSecond()
        {
            return ((value[0] & 0xff) + ((value[1] & 0xff) << 8)) / 1000;
        }

        public int GetMinute()
        {
            return value[2] & 0x3f;
        }

        public int GetHour()
        {
            return value[3] & 0x1f;
        }

        public int GetDayOfWeek()
        {
            return (value[4] & 0xe0) >> 5;
        }

        public int GetDayOfMonth()
        {
            return value[4] & 0x1f;
        }

        public int GetMonth()
        {
            return value[5] & 0x0f;
        }

        public int GetYear()
        {
            return value[6] & 0x7f;
        }

        public bool IsSummerTime()
        {
            return (value[3] & 0x80) == 0x80;
        }

        public bool IsInvalid()
        {
            return (value[2] & 0x80) == 0x80;
        }

        public override string ToString()
        {
            var builder = new StringBuilder("Time56: ");
            AppendWithNumDigits(builder, GetDayOfMonth(), 2);
            builder.Append("-");
            AppendWithNumDigits(builder, GetMonth(), 2);
            builder.Append("-");
            AppendWithNumDigits(builder, GetYear(), 2);
            builder.Append(" ");
            AppendWithNumDigits(builder, GetHour(), 2);
            builder.Append(":");
            AppendWithNumDigits(builder, GetMinute(), 2);
            builder.Append(":");
            AppendWithNumDigits(builder, GetSecond(), 2);
            builder.Append(":");
            AppendWithNumDigits(builder, GetMillisecond(), 3);

            if (IsSummerTime())
            {
                builder.Append(" DST");
            }

            if (IsInvalid())
            {
                builder.Append(", invalid");
            }

            return builder.ToString();
        }

        private void AppendWithNumDigits(StringBuilder builder, int value, int numDigits)
        {
            var i = numDigits - 1;
            while (i < numDigits && value < Math.Pow(10, i))
            {
                builder.Append("0");
                i--;
            }
            builder.Append(value);
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
// Copyright (c) 2014 openMVG authors.

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

#ifndef OPENMVG_COLORHARMONIZATION_VLDSEGMENT_H
#define OPENMVG_COLORHARMONIZATION_VLDSEGMENT_H

#include "openMVG/color_harmonization/selection_interface.hpp"
#include "openMVG/matching/kvld/kvld.h"
#include "openMVG/matching/kvld/kvld_draw.h"

namespace openMVG {
namespace color_harmonization {

class commonDataByPair_VLDSegment  : public commonDataByPair
{
  public:
  commonDataByPair_VLDSegment( const std::string & sLeftImage,
                               const std::string & sRightImage,
                               const std::vector< matching::IndMatch >& vec_PutativeMatches,
                               const vector< SIOPointFeature >& vec_featsL,
                               const vector< SIOPointFeature >& vec_featsR):
           commonDataByPair( sLeftImage, sRightImage ),
           _vec_PutativeMatches( vec_PutativeMatches ),
           _vec_featsL( vec_featsL ), _vec_featsR( vec_featsR )
  {}

  virtual ~commonDataByPair_VLDSegment()
  {}

  /**
   * Put masks to white, images are conserved
   *
   * \param[out] maskLeft Mask of the left image (initialized to corresponding image size).
   * \param[out] maskRight  Mask of the right image (initialized to corresponding image size).
   *
   * \return True.
   */
  virtual bool computeMask(
    Image< unsigned char > & maskLeft,
    Image< unsigned char > & maskRight )
  {
    std::vector< matching::IndMatch > vec_KVLDMatches;

    Image< unsigned char > imageL, imageR;
    ReadImage( _sLeftImage.c_str(), &imageL );
    ReadImage( _sRightImage.c_str(), &imageR );

    Image< float > imgA ( imageL.GetMat().cast< float >() );
    Image< float > imgB ( imageR.GetMat().cast< float >() );

    std::vector< Pair > matchesFiltered, matchesPair;

    for( std::vector< matching::IndMatch >::const_iterator iter_match = _vec_PutativeMatches.begin();
          iter_match != _vec_PutativeMatches.end();
          ++iter_match )
    {
      matchesPair.push_back( std::make_pair( iter_match->_i, iter_match->_j ) );
    }

    std::vector< double > vec_score;

    //In order to illustrate the gvld(or vld)-consistant neighbors, the following two parameters has been externalized as inputs of the function KVLD.
    openMVG::Mat E = openMVG::Mat::Ones( _vec_PutativeMatches.size(), _vec_PutativeMatches.size() ) * ( -1 );
    // gvld-consistancy matrix, intitialized to -1,  >0 consistancy value, -1=unknow, -2=false
    std::vector< bool > valide( _vec_PutativeMatches.size(), true );// indices of match in the initial matches, if true at the end of KVLD, a match is kept.

    size_t it_num = 0;
    KvldParameters kvldparameters;//initial parameters of KVLD
    //kvldparameters.K = 5;
    while (
      it_num < 5 &&
      kvldparameters.inlierRate >
      KVLD(
        imgA, imgB,
        _vec_featsL, _vec_featsR,
        matchesPair, matchesFiltered,
        vec_score, E, valide, kvldparameters ) )
    {
      kvldparameters.inlierRate /= 2;
      std::cout<<"low inlier rate, re-select matches with new rate="<<kvldparameters.inlierRate<<std::endl;
      kvldparameters.K = 2;
      it_num++;
    }

    bool bOk = false;
    if( !matchesPair.empty())
    {
      // Get mask
      getKVLDMask(
        &maskLeft, &maskRight,
        _vec_featsL, _vec_featsR,
        matchesPair,
        valide,
        E);
      bOk = true;
    }
    else{
      maskLeft.fill( 0 );
      maskRight.fill( 0 );
    }

    return bOk;
  }

private:
  // Left and Right features
  std::vector< SIOPointFeature > _vec_featsL, _vec_featsR;
  // Left and Right corresponding index (putatives matches)
  std::vector< matching::IndMatch > _vec_PutativeMatches;
};

}  // namespace color_harmonization
}  // namespace openMVG

#endif  // OPENMVG_COLORHARMONIZATION_VLDSEGMENT_H


text:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:padding="12dp">

    <TextView
        android:id="@+id/chatroom_list_item_name"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:text="name" />

    <TextView
        android:id="@+id/chatroom_list_item_id"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="id"
        android:textSize="12sp"
        android:textColor="#CCC"/>

</LinearLayout>


text:
/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM e:/builds/moz2_slave/rel-m-rel-xr-w32-bld/build/dom/interfaces/svg/nsIDOMSVGNumber.idl
 */

#ifndef __gen_nsIDOMSVGNumber_h__
#define __gen_nsIDOMSVGNumber_h__

#ifndef __gen_domstubs_h__
#include "domstubs.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif

/* starting interface:    nsIDOMSVGNumber */
#define NS_IDOMSVGNUMBER_IID_STR "98575762-a936-4ecf-a226-b74c3a2981b4"

#define NS_IDOMSVGNUMBER_IID \
  {0x98575762, 0xa936, 0x4ecf, \
    { 0xa2, 0x26, 0xb7, 0x4c, 0x3a, 0x29, 0x81, 0xb4 }}

class NS_NO_VTABLE NS_SCRIPTABLE nsIDOMSVGNumber : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOMSVGNUMBER_IID)

  /* attribute float value; */
  NS_SCRIPTABLE NS_IMETHOD GetValue(float *aValue) = 0;
  NS_SCRIPTABLE NS_IMETHOD SetValue(float aValue) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIDOMSVGNumber, NS_IDOMSVGNUMBER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIDOMSVGNUMBER \
  NS_SCRIPTABLE NS_IMETHOD GetValue(float *aValue); \
  NS_SCRIPTABLE NS_IMETHOD SetValue(float aValue);

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIDOMSVGNUMBER(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetValue(float *aValue) { return _to GetValue(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetValue(float aValue) { return _to SetValue(aValue); }

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIDOMSVGNUMBER(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetValue(float *aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetValue(float aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetValue(aValue); }

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsDOMSVGNumber : public nsIDOMSVGNumber
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIDOMSVGNUMBER

  nsDOMSVGNumber();

private:
  ~nsDOMSVGNumber();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsDOMSVGNumber, nsIDOMSVGNumber)

nsDOMSVGNumber::nsDOMSVGNumber()
{
  /* member initializers and constructor code */
}

nsDOMSVGNumber::~nsDOMSVGNumber()
{
  /* destructor code */
}

/* attribute float value; */
NS_IMETHODIMP nsDOMSVGNumber::GetValue(float *aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsDOMSVGNumber::SetValue(float aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif

#endif /* __gen_nsIDOMSVGNumber_h__ */


text:
package rejoin_unsafe
/*
* File Generated by enaml generator
* !!! Please do not edit this file !!!
*/
type RejoinUnsafeJob struct {

	/*CfMysql - Descr: Username used by the sidecar endpoints for Basic Auth Default: <nil>
*/
	CfMysql *CfMysql `yaml:"cf_mysql,omitempty"`

	/*ClusterIps - Descr: IP addresses of all MySQL nodes Default: <nil>
*/
	ClusterIps interface{} `yaml:"cluster_ips,omitempty"`

}


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package erp.mfin.form;

import erp.data.SDataConstants;
import erp.data.SDataConstantsSys;
import erp.data.SDataReadDescriptions;
import erp.data.SDataUtilities;
import erp.form.SFormComponentItemPicker;
import erp.lib.SLibConstants;
import erp.lib.SLibTimeUtilities;
import erp.lib.form.SFormField;
import erp.lib.form.SFormUtilities;
import erp.lib.form.SFormValidation;
import erp.lib.table.STableColumnForm;
import erp.lib.table.STableConstants;
import erp.lib.table.STablePane;
import erp.mfin.data.SDataAccountItem;
import erp.mfin.data.SDataAccountItemEntry;
import erp.mfin.data.SDataAccountItemEntryRow;
import erp.mfin.data.SDataAccountItemItem;
import erp.mfin.data.SDataAccountItemItemRow;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import java.util.Vector;
import javax.swing.AbstractAction;
import javax.swing.JButton;
import javax.swing.JOptionPane;

/**
 *
 * @author  Sergio Flores
 */
public class SFormAccountItem extends javax.swing.JDialog implements erp.lib.form.SFormInterface, java.awt.event.ActionListener {

    private static final int ALL = 0;
    private static final int DBT = 1;
    private static final int CDT = 2;

    private int mnFormType;
    private int mnFormResult;
    private int mnFormStatus;
    private boolean mbFirstTime;
    private boolean mbResetingForm;
    private java.util.Vector<erp.lib.form.SFormField> mvFields;
    private erp.client.SClientInterface miClient;

    private erp.mfin.data.SDataAccountItem moAccountItem;
    private erp.lib.form.SFormField moFieldAccountItem;
    private erp.lib.form.SFormField moFieldIsDeleted;
    private erp.lib.table.STablePane moPaneEntries;
    private erp.lib.table.STablePane moPaneItems;
    private erp.mfin.form.SFormAccountItemEntry moFormEntry;
    private erp.mfin.form.SFormAccountItemItem moFormItem;
    private erp.form.SFormComponentItemPicker moComponentItemPicker;

    private int[] manAccountTypes;
    private java.lang.String msEmptyAccountId;
    private java.lang.String msEmptyCostCenterId;
    private java.lang.String msTextAll;
    private java.lang.String msTextDbt;
    private java.lang.String msTextCdt;

    /** Creates new form SFormAccountItem */
    public SFormAccountItem(erp.client.SClientInterface client) {
        super(client.getFrame(), true);
        miClient = client;
        mnFormType = SDataConstants.FIN_ACC_ITEM;
        initComponents();
        initComponentsExtra();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jtpTabbedPane = new javax.swing.JTabbedPane();
        jpAccountItem = new javax.swing.JPanel();
        jPanel13 = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jlAccountItem = new javax.swing.JLabel();
        jtfAccountItem = new javax.swing.JTextField();
        jPanel5 = new javax.swing.JPanel();
        jlDummy01 = new javax.swing.JLabel();
        jckIsDeleted = new javax.swing.JCheckBox();
        jpEntries = new javax.swing.JPanel();
        jPanel6 = new javax.swing.JPanel();
        jbEntryNew = new javax.swing.JButton();
        jbEntryEdit = new javax.swing.JButton();
        jbEntryDelete = new javax.swing.JButton();
        jpItems = new javax.swing.JPanel();
        jPanel10 = new javax.swing.JPanel();
        jbItemNew = new javax.swing.JButton();
        jbItemEdit = new javax.swing.JButton();
        jbItemDelete = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jbOk = new javax.swing.JButton();
        jbCancel = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Paquete de configuración de cuentas contables para ítems"); // NOI18N
        setModal(true);
        setResizable(false);
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowActivated(java.awt.event.WindowEvent evt) {
                formWindowActivated(evt);
            }
        });

        jpAccountItem.setLayout(new java.awt.BorderLayout());

        jPanel13.setBorder(javax.swing.BorderFactory.createTitledBorder("Datos del registro:"));
        jPanel13.setLayout(new java.awt.GridLayout(1, 2, 5, 5));

        jPanel1.setLayout(new java.awt.GridLayout(2, 2, 5, 5));

        jPanel4.setLayout(new java.awt.BorderLayout());

        jlAccountItem.setText("Paquete de configuración: *");
        jlAccountItem.setPreferredSize(new java.awt.Dimension(150, 20));
        jPanel4.add(jlAccountItem, java.awt.BorderLayout.LINE_START);

        jtfAccountItem.setText("ACCOUNT");
        jPanel4.add(jtfAccountItem, java.awt.BorderLayout.CENTER);

        jPanel1.add(jPanel4);

        jPanel5.setLayout(new java.awt.BorderLayout());

        jlDummy01.setPreferredSize(new java.awt.Dimension(150, 20));
        jPanel5.add(jlDummy01, java.awt.BorderLayout.LINE_START);

        jckIsDeleted.setText("Registro eliminado");
        jPanel5.add(jckIsDeleted, java.awt.BorderLayout.CENTER);

        jPanel1.add(jPanel5);

        jPanel13.add(jPanel1);

        jpAccountItem.add(jPanel13, java.awt.BorderLayout.NORTH);

        jpEntries.setBorder(javax.swing.BorderFactory.createTitledBorder("Configuración de cuentas contables:"));
        jpEntries.setLayout(new java.awt.BorderLayout());

        jPanel6.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 1, 0));

        jbEntryNew.setIcon(new javax.swing.ImageIcon(getClass().getResource("/erp/img/icon_std_new.gif"))); // NOI18N
        jbEntryNew.setToolTipText("Crear");
        jbEntryNew.setPreferredSize(new java.awt.Dimension(23, 23));
        jPanel6.add(jbEntryNew);

        jbEntryEdit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/erp/img/icon_std_edit.gif"))); // NOI18N
        jbEntryEdit.setToolTipText("Modificar");
        jbEntryEdit.setPreferredSize(new java.awt.Dimension(23, 23));
        jPanel6.add(jbEntryEdit);

        jbEntryDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/erp/img/icon_std_delete.gif"))); // NOI18N
        jbEntryDelete.setToolTipText("Eliminar");
        jbEntryDelete.setPreferredSize(new java.awt.Dimension(23, 23));
        jPanel6.add(jbEntryDelete);

        jpEntries.add(jPanel6, java.awt.BorderLayout.PAGE_START);

        jpAccountItem.add(jpEntries, java.awt.BorderLayout.CENTER);

        jtpTabbedPane.addTab("Cuentas contables", jpAccountItem);

        jpItems.setBorder(javax.swing.BorderFactory.createTitledBorder("Asignación de cuentas contables:"));
        jpItems.setLayout(new java.awt.BorderLayout());

        jPanel10.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 1, 0));

        jbItemNew.setIcon(new javax.swing.ImageIcon(getClass().getResource("/erp/img/icon_std_new.gif"))); // NOI18N
        jbItemNew.setToolTipText("Crear");
        jbItemNew.setPreferredSize(new java.awt.Dimension(23, 23));
        jPanel10.add(jbItemNew);

        jbItemEdit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/erp/img/icon_std_edit.gif"))); // NOI18N
        jbItemEdit.setToolTipText("Modificar");
        jbItemEdit.setPreferredSize(new java.awt.Dimension(23, 23));
        jPanel10.add(jbItemEdit);

        jbItemDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/erp/img/icon_std_delete.gif"))); // NOI18N
        jbItemDelete.setToolTipText("Eliminar");
        jbItemDelete.setPreferredSize(new java.awt.Dimension(23, 23));
        jPanel10.add(jbItemDelete);

        jpItems.add(jPanel10, java.awt.BorderLayout.PAGE_START);

        jtpTabbedPane.addTab("Ítems", jpItems);

        getContentPane().add(jtpTabbedPane, java.awt.BorderLayout.CENTER);

        jPanel2.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        jbOk.setText("Aceptar"); // NOI18N
        jbOk.setToolTipText("[Ctrl + Enter]");
        jbOk.setPreferredSize(new java.awt.Dimension(75, 23));
        jPanel2.add(jbOk);

        jbCancel.setText("Cancelar"); // NOI18N
        jbCancel.setToolTipText("[Escape]");
        jPanel2.add(jbCancel);

        getContentPane().add(jPanel2, java.awt.BorderLayout.PAGE_END);

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-900)/2, (screenSize.height-600)/2, 900, 600);
    }// </editor-fold>//GEN-END:initComponents

    private void formWindowActivated(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowActivated
        windowActivated();
    }//GEN-LAST:event_formWindowActivated

    private void initComponentsExtra() {
        int i = 0;
        STableColumnForm[] columns = null;
        mvFields = new Vector<SFormField>();

        moFieldAccountItem = new SFormField(miClient, SLibConstants.DATA_TYPE_STRING, true, jtfAccountItem, jlAccountItem);
        moFieldAccountItem.setLengthMax(50);
        moFieldIsDeleted = new SFormField(miClient, SLibConstants.DATA_TYPE_BOOLEAN, true, jckIsDeleted);

        mvFields.add(moFieldAccountItem);
        mvFields.add(moFieldIsDeleted);

        moFormEntry = new SFormAccountItemEntry(miClient);
        moFormItem = new SFormAccountItemItem(miClient);
        moComponentItemPicker = new SFormComponentItemPicker(miClient, SDataConstants.FINS_TP_ACC_ITEM);

        moPaneEntries = new STablePane(miClient);
        moPaneEntries.setDoubleClickAction(this, "publicActionEntryEdit");
        jpEntries.add(moPaneEntries, BorderLayout.CENTER);
        i = 0;
        columns = new STableColumnForm[7];
        columns[i++] = new STableColumnForm(SLibConstants.DATA_TYPE_STRING, "Tipo cuentas contables", 150);
        columns[i++] = new STableColumnForm(SLibConstants.DATA_TYPE_STRING, "No. cuenta contable", STableConstants.WIDTH_ACCOUNT_ID);
        columns[i++] = new STableColumnForm(SLibConstants.DATA_TYPE_STRING, "Cuenta contable", STableConstants.WIDTH_ACCOUNT);
        columns[i++] = new STableColumnForm(SLibConstants.DATA_TYPE_STRING, "No. centro costo", 100);
        columns[i++] = new STableColumnForm(SLibConstants.DATA_TYPE_STRING, "Centro costo", 150);
        columns[i++] = new STableColumnForm(SLibConstants.DATA_TYPE_STRING, "Tipo asiento contable", 75);
        columns[i] = new STableColumnForm(SLibConstants.DATA_TYPE_DOUBLE, "Porcentaje", STableConstants.WIDTH_PERCENTAGE);
        columns[i].setCellRenderer(miClient.getSessionXXX().getFormatters().getTableCellRendererPercentage());

        for (i = 0; i < columns.length; i++) {
            moPaneEntries.addTableColumn(columns[i]);
        }

        moPaneItems = new STablePane(miClient);
        moPaneItems.setDoubleClickAction(this, "publicActionItemEdit");
        jpItems.add(moPaneItems, BorderLayout.CENTER);
        i = 0;
        columns = new STableColumnForm[5];
        columns[i++] = new STableColumnForm(SLibConstants.DATA_TYPE_STRING, "Centro contable", 150);
        columns[i++] = new STableColumnForm(SLibConstants.DATA_TYPE_STRING, "Tipo referencia", 150);
        columns[i++] = new STableColumnForm(SLibConstants.DATA_TYPE_STRING, "Referencia", 225);
        columns[i++] = new STableColumnForm(SLibConstants.DATA_TYPE_DATE, "Ini. vigencia", STableConstants.WIDTH_DATE);
        columns[i++] = new STableColumnForm(SLibConstants.DATA_TYPE_BOOLEAN, "Eliminado", STableConstants.WIDTH_BOOLEAN);

        for (i = 0; i < columns.length; i++) {
            moPaneItems.addTableColumn(columns[i]);
        }

        msEmptyAccountId = SDataUtilities.createNewFormattedAccountId(miClient, miClient.getSessionXXX().getParamsErp().getDeepAccounts());
        msEmptyCostCenterId = SDataUtilities.createNewFormattedCostCenterId(miClient, miClient.getSessionXXX().getParamsErp().getDeepCostCenters());
        manAccountTypes = new int[] {
            SDataConstantsSys.FINS_TP_ACC_ITEM_ASSET,
            SDataConstantsSys.FINS_TP_ACC_ITEM_INV_MFG_CO,
            SDataConstantsSys.FINS_TP_ACC_ITEM_INV_MFG_BP,
            SDataConstantsSys.FINS_TP_ACC_ITEM_INV_WAR_PUR,
            SDataConstantsSys.FINS_TP_ACC_ITEM_INV_WAR_SAL,
            SDataConstantsSys.FINS_TP_ACC_ITEM_INV_CONSIG_PUR,
            SDataConstantsSys.FINS_TP_ACC_ITEM_INV_CONSIG_SAL,
            SDataConstantsSys.FINS_TP_ACC_ITEM_COGS,
            SDataConstantsSys.FINS_TP_ACC_ITEM_PUR,
            SDataConstantsSys.FINS_TP_ACC_ITEM_PUR_ADJ_DEV,
            SDataConstantsSys.FINS_TP_ACC_ITEM_PUR_ADJ_DISC,
            SDataConstantsSys.FINS_TP_ACC_ITEM_SAL,
            SDataConstantsSys.FINS_TP_ACC_ITEM_SAL_ADJ_DEV,
            SDataConstantsSys.FINS_TP_ACC_ITEM_SAL_ADJ_DISC,
            SDataConstantsSys.FINS_TP_ACC_ITEM_INV_OPEN,
            SDataConstantsSys.FINS_TP_ACC_ITEM_INV_END,
            SDataConstantsSys.FINS_TP_ACC_ITEM_ADJ_INC,
            SDataConstantsSys.FINS_TP_ACC_ITEM_ADJ_DEC,
            SDataConstantsSys.FINS_TP_ACC_ITEM_CHG_PUR,
            SDataConstantsSys.FINS_TP_ACC_ITEM_CHG_SAL,
            SDataConstantsSys.FINS_TP_ACC_ITEM_MFG_CO,
            SDataConstantsSys.FINS_TP_ACC_ITEM_MFG_BP,
            SDataConstantsSys.FINS_TP_ACC_ITEM_WAR_PUR,
            SDataConstantsSys.FINS_TP_ACC_ITEM_WAR_SAL,
            SDataConstantsSys.FINS_TP_ACC_ITEM_CONSIG_PUR,
            SDataConstantsSys.FINS_TP_ACC_ITEM_CONSIG_SAL,
            SDataConstantsSys.FINS_TP_ACC_ITEM_DEPREC,
            SDataConstantsSys.FINS_TP_ACC_ITEM_DEPREC_REC,
            SDataConstantsSys.FINS_TP_ACC_ITEM_DEPREC_EXP
        };

        jbOk.addActionListener(this);
        jbCancel.addActionListener(this);
        jbEntryNew.addActionListener(this);
        jbEntryEdit.addActionListener(this);
        jbEntryDelete.addActionListener(this);
        jbItemNew.addActionListener(this);
        jbItemEdit.addActionListener(this);
        jbItemDelete.addActionListener(this);

        AbstractAction actionOk = new AbstractAction() {
            @Override
            public void actionPerformed(ActionEvent e) { actionOk(); }
        };

        SFormUtilities.putActionMap(getRootPane(), actionOk, "ok", KeyEvent.VK_ENTER, KeyEvent.CTRL_DOWN_MASK);

        AbstractAction actionCancel = new AbstractAction() {
            @Override
            public void actionPerformed(ActionEvent e) { actionCancel(); }
        };

        SFormUtilities.putActionMap(getRootPane(), actionCancel, "cancel", KeyEvent.VK_ESCAPE, 0);
    }

    private void windowActivated() {
        if (mbFirstTime) {
            mbFirstTime = false;
            jtfAccountItem.requestFocus();
        }
    }

    private erp.mfin.data.SDataAccountItemEntry createEntry(int type, double percentage) {
        SDataAccountItemEntry entry = new SDataAccountItemEntry();

        entry.setPkAccountItemTypeId(type);
        entry.setDbmsAccountItemType(SDataReadDescriptions.getCatalogueDescription(miClient, SDataConstants.FINS_TP_ACC_ITEM, new int[] { type }));
        entry.setPercentage(percentage);
        entry.setFkAccountId_n(msEmptyAccountId);
        entry.setFkCostCenterId_n(msEmptyCostCenterId);
        entry.setFkBookkeepingRegistryTypeId(SDataConstantsSys.FINS_TP_BKR_ALL);
        entry.setDbmsBookkeepingRegistryType(msTextAll);

        return entry;
    }

    private void actionEntryNew() {
        int index = -1;
        SDataAccountItemEntry entry = null;
        SDataAccountItemEntry entryAux = null;

        moComponentItemPicker.formReset();
        moComponentItemPicker.setFormVisible(true);

        if (moComponentItemPicker.getFormResult() == SLibConstants.FORM_RESULT_OK) {
            entry = createEntry(((int[]) moComponentItemPicker.getValue(SLibConstants.VALUE_PRIMARY_KEY))[0], 0d);

            moFormEntry.formReset();
            moFormEntry.setRegistry(entry);
            moFormEntry.setVisible(true);

            if (moFormEntry.getFormResult() == SLibConstants.FORM_RESULT_OK) {
                entry = (SDataAccountItemEntry) moFormEntry.getRegistry();

                for (int i = 0; i < moPaneEntries.getTableGuiRowCount(); i++) {
                    entryAux = (SDataAccountItemEntry) moPaneEntries.getTableRow(i).getData();

                    if (entry.getPkAccountItemTypeId() <= entryAux.getPkAccountItemTypeId()) {
                        index = i;
                        if (entry.getFkAccountId_n().compareTo(entryAux.getFkAccountId_n()) <= 0) {
                            break;
                        }
                    }
                }

                if (index == -1) {
                    index = moPaneEntries.getTableGuiRowCount();
                    moPaneEntries.addTableRow(new SDataAccountItemEntryRow(entry));
                }
                else {
                    moPaneEntries.insertTableRow(new SDataAccountItemEntryRow(entry), index);
                }

                moPaneEntries.renderTableRows();
                moPaneEntries.setTableRowSelection(index);
            }
        }
    }

    private void actionEntryEdit() {
        int index = moPaneEntries.getTable().getSelectedRow();

        if (index != -1) {
            ((SDataAccountItemEntry) moPaneEntries.getSelectedTableRow().getData()).setDbmsAccountItem(moFieldAccountItem.getString());

            moFormEntry.formReset();
            moFormEntry.setRegistry((SDataAccountItemEntry) moPaneEntries.getSelectedTableRow().getData());
            moFormEntry.setVisible(true);

            if (moFormEntry.getFormResult() == SLibConstants.FORM_RESULT_OK) {
                moPaneEntries.setTableRow(new SDataAccountItemEntryRow((SDataAccountItemEntry) moFormEntry.getRegistry()), index);

                moPaneEntries.renderTableRows();
                moPaneEntries.setTableRowSelection(index);
            }
        }
    }

    private void actionEntryDelete() {
        int index = moPaneEntries.getTable().getSelectedRow();

        if (index != -1 && miClient.showMsgBoxConfirm(SLibConstants.MSG_CNF_REG_DELETE) == JOptionPane.YES_OPTION) {
            moPaneEntries.removeTableRow(index);
            moPaneEntries.renderTableRows();

            if (moPaneEntries.getTableGuiRowCount() > 0) {
                moPaneEntries.setTableRowSelection(index < moPaneEntries.getTableGuiRowCount() ? index : moPaneEntries.getTableGuiRowCount() - 1);
            }
        }
    }

    private void actionItem(boolean isNew) {
        int index = -1;
        SDataAccountItemItem item = null;

        if (isNew) {
            item = new SDataAccountItemItem();
            item.setPkAccountItemId(moAccountItem == null ? 0 : moAccountItem.getPkAccountItemId());
            item.setPkDateStartId(SLibTimeUtilities.getBeginOfYear(miClient.getSessionXXX().getWorkingDate()));
        }
        else if (moPaneItems.getSelectedTableRow() != null) {
            item = (SDataAccountItemItem) moPaneItems.getSelectedTableRow().getData();
        }

        if (item != null) {
            moFormItem.formRefreshCatalogues();
            moFormItem.formReset();
            moFormItem.setRegistry(item);
            moFormItem.setVisible(true);

            if (moFormItem.getFormResult() == SLibConstants.FORM_RESULT_OK) {
                if (isNew) {
                    moPaneItems.addTableRow(new SDataAccountItemItemRow(moFormItem.getRegistry()));
                }
                else {
                    moPaneItems.setTableRow(new SDataAccountItemItemRow(moFormItem.getRegistry()), moPaneItems.getTable().getSelectedRow());
                }

                index = moPaneItems.getTable().getSelectedRow();
                moPaneItems.renderTableRows();
                moPaneItems.setTableRowSelection(index);
            }
        }
    }

    private void actionItemDelete() {
        int index = -1;

        if (moPaneItems.getSelectedTableRow() != null) {
            SDataAccountItemItem item = (SDataAccountItemItem) ((SDataAccountItemItemRow) moPaneItems.getSelectedTableRow()).getData();

            item.setIsDeleted(true);
            moPaneItems.setTableRow(new SDataAccountItemItemRow(item), moPaneItems.getTable().getSelectedRow());

            index = moPaneItems.getTable().getSelectedRow();
            moPaneItems.renderTableRows();
            moPaneItems.setTableRowSelection(index);
        }
    }

    private void actionEdit(boolean edit) {

    }

    private void actionOk() {
        SFormValidation validation = formValidate();

        if (validation.getIsError()) {
            if (validation.getComponent() != null) {
                jtpTabbedPane.setSelectedIndex(validation.getTabbedPaneIndex());
                validation.getComponent().requestFocus();
            }
            if (validation.getMessage().length() > 0) {
                miClient.showMsgBoxWarning(validation.getMessage());
            }
        }
        else {
            mnFormResult = SLibConstants.FORM_RESULT_OK;
            setVisible(false);
        }
    }

    private void actionCancel() {
        mnFormResult = SLibConstants.FORM_RESULT_CANCEL;
        setVisible(false);
    }

    public void publicActionEntryEdit() {
        actionEntryEdit();
    }

    public void publicActionItemEdit() {
        actionItem(false);
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JButton jbCancel;
    private javax.swing.JButton jbEntryDelete;
    private javax.swing.JButton jbEntryEdit;
    private javax.swing.JButton jbEntryNew;
    private javax.swing.JButton jbItemDelete;
    private javax.swing.JButton jbItemEdit;
    private javax.swing.JButton jbItemNew;
    private javax.swing.JButton jbOk;
    private javax.swing.JCheckBox jckIsDeleted;
    private javax.swing.JLabel jlAccountItem;
    private javax.swing.JLabel jlDummy01;
    private javax.swing.JPanel jpAccountItem;
    private javax.swing.JPanel jpEntries;
    private javax.swing.JPanel jpItems;
    private javax.swing.JTextField jtfAccountItem;
    private javax.swing.JTabbedPane jtpTabbedPane;
    // End of variables declaration//GEN-END:variables

    @Override
    public void formClearRegistry() {
        moAccountItem = null;
    }

    @Override
    public void formReset() {
        mbResetingForm = true;

        mnFormResult = SLibConstants.UNDEFINED;
        mnFormStatus = SLibConstants.UNDEFINED;
        mbFirstTime = true;

        moAccountItem = null;
        moPaneEntries.createTable();
        moPaneEntries.clearTableRows();
        moPaneItems.createTable();
        moPaneItems.clearTableRows();
        msTextAll = SDataReadDescriptions.getCatalogueDescription(miClient, SDataConstants.FINS_TP_BKR, new int[] { SDataConstantsSys.FINS_TP_BKR_ALL });
        msTextDbt = SDataReadDescriptions.getCatalogueDescription(miClient, SDataConstants.FINS_TP_BKR, new int[] { SDataConstantsSys.FINS_TP_BKR_DBT });
        msTextCdt = SDataReadDescriptions.getCatalogueDescription(miClient, SDataConstants.FINS_TP_BKR, new int[] { SDataConstantsSys.FINS_TP_BKR_CDT });

        for (int i = 0; i < mvFields.size(); i++) {
            mvFields.get(i).resetField();
        }

        jckIsDeleted.setEnabled(false);

        jtpTabbedPane.setSelectedIndex(0);
        //jtpTabbedPane.setEnabledAt(1, false);

        // Initialize business partner account entries:

        for (int type : manAccountTypes) {
            moPaneEntries.addTableRow(new SDataAccountItemEntryRow(createEntry(type, 1d)));
        }

        moPaneEntries.renderTableRows();
        moPaneEntries.setTableRowSelection(0);

        mbResetingForm = false;
    }

    @Override
    public void formRefreshCatalogues() {
        moFormEntry.formRefreshCatalogues();
        moComponentItemPicker.formRefreshCatalogues();
    }

    @Override
    public erp.lib.form.SFormValidation formValidate() {
        int i;
        double[][] percentages = new double[manAccountTypes.length][3]; // secundary index for bookkeeping registry type: 0 = ALL; 1 = DBT; 2 = CDT
        SFormValidation validation = new SFormValidation();
        SDataAccountItemEntry entry = null;

        for (i = 0; i < mvFields.size(); i++) {
            if (!((erp.lib.form.SFormField) mvFields.get(i)).validateField()) {
                validation.setIsError(true);
                validation.setComponent(mvFields.get(i).getComponent());
                validation.setTabbedPaneIndex(0);
                break;
            }
        }

        if (!validation.getIsError()) {
            // Validate account type percentages:

            for (i = 0; i < moPaneEntries.getTableGuiRowCount() && !validation.getIsError(); i++) {
                entry = (SDataAccountItemEntry) ((SDataAccountItemEntryRow) moPaneEntries.getTableRow(i)).getData();
                switch (entry.getFkBookkeepingRegistryTypeId()) {
                    case SDataConstantsSys.FINS_TP_BKR_ALL:
                        percentages[entry.getPkAccountItemTypeId() - 1][ALL] += entry.getPercentage();
                        break;
                    case SDataConstantsSys.FINS_TP_BKR_DBT:
                        percentages[entry.getPkAccountItemTypeId() - 1][DBT] += entry.getPercentage();
                        break;
                    case SDataConstantsSys.FINS_TP_BKR_CDT:
                        percentages[entry.getPkAccountItemTypeId() - 1][CDT] += entry.getPercentage();
                        break;
                    default:
                        validation.setMessage("El tipo de asiento contable del tipo de cuenta '" + SDataReadDescriptions.getCatalogueDescription(miClient, SDataConstants.FINS_TP_ACC_ITEM, new int[] { i + 1 }) + "'\n" +
                                "es inválido en la posición " + (i + 1) + ".");
                        validation.setComponent(moPaneEntries.getTable());
                        validation.setTabbedPaneIndex(0);
                }
            }

            if (!validation.getIsError()) {
                for (i = 0; i < percentages.length; i++) {
                    if (percentages[i][ALL] != 0d) {
                        // Only bookkeeping registry type "ALL" must be provided:

                        if (percentages[i][ALL] != 1d) {
                            validation.setMessage("La suma total de los porcentajes del tipo de asiento contable '" + msTextAll + "'\n" +
                                    "para el tipo de cuenta '" + SDataReadDescriptions.getCatalogueDescription(miClient, SDataConstants.FINS_TP_ACC_ITEM, new int[] { i + 1 }) + "' " +
                                    "(" + miClient.getSessionXXX().getFormatters().getDecimalsPercentageFormat().format(percentages[i][ALL]) + ")\n" +
                                    "debe ser igual a " + miClient.getSessionXXX().getFormatters().getDecimalsPercentageFormat().format(1d) + ".");
                            validation.setComponent(moPaneEntries.getTable());
                            validation.setTabbedPaneIndex(0);
                            break;
                        }
                        else if (percentages[i][DBT] != 0d || percentages[i][CDT] != 0d) {
                            validation.setMessage("Si se configuran asientos contables del tipo '" + msTextAll + "'\n" +
                                    "para el tipo de cuenta '" + SDataReadDescriptions.getCatalogueDescription(miClient, SDataConstants.FINS_TP_ACC_ITEM, new int[] { i + 1 }) + "'\n" +
                                    "no se pueden configurar asientos contables del tipo '" + msTextDbt + "' o '" + msTextCdt + "'.");
                            validation.setComponent(moPaneEntries.getTable());
                            validation.setTabbedPaneIndex(0);
                            break;
                        }
                    }
                    else {
                        // Both bookkeeping registry types "DEBIT" and "CREDIT" must be provided:

                        if (percentages[i][DBT] != 1d) {
                            validation.setMessage("La suma total de los porcentajes del tipo de asiento contable '" + msTextDbt + "'\n" +
                                    "para el tipo de cuenta '" + SDataReadDescriptions.getCatalogueDescription(miClient, SDataConstants.FINS_TP_ACC_ITEM, new int[] { i + 1 }) + "' " +
                                    "(" + miClient.getSessionXXX().getFormatters().getDecimalsPercentageFormat().format(percentages[i][DBT]) + ")\n" +
                                    "debe ser igual a " + miClient.getSessionXXX().getFormatters().getDecimalsPercentageFormat().format(1d) + ".");
                            validation.setComponent(moPaneEntries.getTable());
                            validation.setTabbedPaneIndex(0);
                            break;
                        }
                        else if (percentages[i][CDT] != 1d) {
                            validation.setMessage("La suma total de los porcentajes del tipo de asiento contable '" + msTextCdt + "'\n" +
                                    "para el tipo de cuenta '" + SDataReadDescriptions.getCatalogueDescription(miClient, SDataConstants.FINS_TP_ACC_ITEM, new int[] { i + 1 }) + "' " +
                                    "(" + miClient.getSessionXXX().getFormatters().getDecimalsPercentageFormat().format(percentages[i][CDT]) + ")\n" +
                                    "debe ser igual a " + miClient.getSessionXXX().getFormatters().getDecimalsPercentageFormat().format(1d) + ".");
                            validation.setComponent(moPaneEntries.getTable());
                            validation.setTabbedPaneIndex(0);
                            break;
                        }
                        else if (percentages[i][ALL] != 0d) {
                            validation.setMessage("Si se configuran asientos contables de los tipos '" + msTextDbt + "' y '" + msTextCdt + "'\n" +
                                    "para el tipo de cuenta '" + SDataReadDescriptions.getCatalogueDescription(miClient, SDataConstants.FINS_TP_ACC_ITEM, new int[] { i + 1 }) + "'\n" +
                                    "no se pueden configurar asientos contables del tipo '" + msTextAll + "'.");
                            validation.setComponent(moPaneEntries.getTable());
                            validation.setTabbedPaneIndex(0);
                            break;
                        }
                    }
                }
            }

            if (!validation.getIsError()) {
                if (moPaneItems.getTableGuiRowCount() == 0) {
                    if (miClient.showMsgBoxConfirm("No se han definido registros a los que les aplique este paquete de configuración.\nDe cualquier forma, ¿está seguro que desea salir?") != JOptionPane.YES_OPTION) {
                        validation.setMessage("Se deben definir registros a los que les aplique este paquete de configuración.");
                    }
                }
            }
        }

        return validation;
    }

    @Override
    public void setFormStatus(int status) {
        mnFormStatus = status;
    }

    @Override
    public void setFormVisible(boolean visible) {
        setVisible(visible);
    }

    @Override
    public int getFormStatus() {
        return mnFormStatus;
    }

    @Override
    public int getFormResult() {
        return mnFormResult;
    }

    @Override
    public void setRegistry(erp.lib.data.SDataRegistry registry) {
        int i = 0;
        SDataAccountItemEntry entry = null;

        moAccountItem = (SDataAccountItem) registry;

        moFieldAccountItem.setFieldValue(moAccountItem.getAccountItem());
        moFieldIsDeleted.setFieldValue(moAccountItem.getIsDeleted());

        moPaneEntries.clearTableRows();
        for (i = 0; i < moAccountItem.getDbmsEntries().size(); i++) {
            entry = moAccountItem.getDbmsEntries().get(i);

            if (entry.getFkAccountId_n().length() == 0) {
                entry.setFkAccountId_n(msEmptyAccountId);
            }
            if (entry.getFkCostCenterId_n().length() == 0) {
                entry.setFkCostCenterId_n(msEmptyCostCenterId);
            }

            moPaneEntries.addTableRow(new SDataAccountItemEntryRow(entry));
        }
        moPaneEntries.renderTableRows();
        moPaneEntries.setTableRowSelection(0);

        moPaneItems.clearTableRows();
        for (i = 0; i < moAccountItem.getDbmsItems().size(); i++) {
            moPaneItems.addTableRow(new SDataAccountItemItemRow(moAccountItem.getDbmsItems().get(i)));
        }
        moPaneItems.renderTableRows();
        moPaneItems.setTableRowSelection(0);

        jckIsDeleted.setEnabled(true);
    }

    @Override
    public erp.lib.data.SDataRegistry getRegistry() {
        int i = 0;
        SDataAccountItemEntry entry = null;

        if (moAccountItem == null) {
            moAccountItem = new SDataAccountItem();
            moAccountItem.setFkUserNewId(miClient.getSession().getUser().getPkUserId());
        }
        else {
            moAccountItem.setFkUserEditId(miClient.getSession().getUser().getPkUserId());
        }

        moAccountItem.setAccountItem(moFieldAccountItem.getString());
        moAccountItem.setIsDeleted(moFieldIsDeleted.getBoolean());

        moAccountItem.getDbmsEntries().clear();
        for (i = 0; i < moPaneEntries.getTableGuiRowCount(); i++) {
            entry = ((SDataAccountItemEntry) ((SDataAccountItemEntryRow) moPaneEntries.getTableRow(i)).getData());

            if (entry.getFkAccountId_n().compareTo(msEmptyAccountId) == 0) {
                entry.setFkAccountId_n("");
            }
            if (entry.getFkCostCenterId_n().compareTo(msEmptyCostCenterId) == 0) {
                entry.setFkCostCenterId_n("");
            }

            moAccountItem.getDbmsEntries().add(entry);
        }

        moAccountItem.getDbmsItems().clear();
        for (i = 0; i < moPaneItems.getTableGuiRowCount(); i++) {
            moAccountItem.getDbmsItems().add(((SDataAccountItemItem) ((SDataAccountItemItemRow) moPaneItems.getTableRow(i)).getData()));
        }

        return moAccountItem;
    }

    @Override
    public void setValue(int type, java.lang.Object value) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public java.lang.Object getValue(int type) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public javax.swing.JLabel getTimeoutLabel() {
        return null;
    }

    @Override
    public void actionPerformed(java.awt.event.ActionEvent e) {
        if (e.getSource() instanceof javax.swing.JButton) {
            JButton button = (JButton) e.getSource();

            if (button == jbOk) {
                actionOk();
            }
            else if (button == jbCancel) {
                actionCancel();
            }
            else if (button == jbEntryNew) {
                actionEntryNew();
            }
            else if (button == jbEntryEdit) {
                actionEntryEdit();
            }
            else if (button == jbEntryDelete) {
                actionEntryDelete();
            }
            else if (button == jbItemNew) {
                actionItem(true);
            }
            else if (button == jbItemEdit) {
                actionItem(false);
            }
            else if (button == jbItemDelete) {
                actionItemDelete();
            }
        }
    }
}


text:
/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* $Source: src/include/usr/targeting/common/targreasoncodes.H $          */
/*                                                                        */
/* OpenPOWER HostBoot Project                                             */
/*                                                                        */
/* Contributors Listed Below - COPYRIGHT 2012,2014                        */
/* [+] International Business Machines Corp.                              */
/*                                                                        */
/*                                                                        */
/* Licensed under the Apache License, Version 2.0 (the "License");        */
/* you may not use this file except in compliance with the License.       */
/* You may obtain a copy of the License at                                */
/*                                                                        */
/*     http://www.apache.org/licenses/LICENSE-2.0                         */
/*                                                                        */
/* Unless required by applicable law or agreed to in writing, software    */
/* distributed under the License is distributed on an "AS IS" BASIS,      */
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or        */
/* implied. See the License for the specific language governing           */
/* permissions and limitations under the License.                         */
/*                                                                        */
/* IBM_PROLOG_END_TAG                                                     */
#ifndef __TARGETING_COMMON_TARGREASONCODES_H
#define __TARGETING_COMMON_TARGREASONCODES_H

/**
 *  @file targeting/common/targetreasoncodes.H
 *
 *  @brief Provides reason codes for various targeting errors
 */

#include <targeting/adapters/types.H>

namespace TARGETING
{

enum TargetingModuleId
{
    TARG_MOD_TEST         = 0x01,
    TARG_MOD_ATTRRP       = 0x02,
    TARG_MOD_ATTR_SYNC    = 0x03,
    TARG_RT_GET_RT_TARGET = 0x04,
    TARG_RT_GET_HB_TARGET = 0x05,
    TARG_GET_ATTR_OVER    = 0x06,
    TARG_WRITE_PERM_ATTR  = 0x07,

};

enum TargetingReasonCode
{
    TARG_RC_TEST_TARGET_FFDC                = TARG_COMP_ID | 0x01,
    TARG_RC_BAD_EYECATCH                    = TARG_COMP_ID | 0x02,
    TARG_RC_MM_BLOCK_FAIL                   = TARG_COMP_ID | 0x03,
    TARG_RC_MM_PERM_FAIL                    = TARG_COMP_ID | 0x04,
    TARG_RC_ATTR_MSG_FAIL                   = TARG_COMP_ID | 0x05,
    TARG_RC_UNHANDLED_ATTR_SEC_TYPE         = TARG_COMP_ID | 0x06,
    TARG_RC_ATTR_SYNC_TO_FSP_FAIL           = TARG_COMP_ID | 0x07,
    TARG_RC_ATTR_SYNC_REQUEST_TO_HB_FAIL    = TARG_COMP_ID | 0x08,
    TARG_RC_ATTR_SYNC_TO_HB_FAIL            = TARG_COMP_ID | 0x09,
    TARG_RT_UNIT_TARGET_NOT_FOUND           = TARG_COMP_ID | 0x0a,
    TARG_RT_NO_PROC_TARGET                  = TARG_COMP_ID | 0x0b,
    TARG_RT_TARGET_TYPE_NOT_SUPPORTED       = TARG_COMP_ID | 0x0c,
    TARG_RC_ATTR_OVER_PNOR_SEC_SPACE_FAIL   = TARG_COMP_ID | 0x0d,
    TARG_RC_ATTR_OVER_ATTR_DATA_SIZE_FAIL   = TARG_COMP_ID | 0x0e,
    TARG_RC_WRITE_PERM_ATTR_FAIL            = TARG_COMP_ID | 0x0f,
    TARG_RC_WRITE_PERM_ATTR_TARGET_FAIL     = TARG_COMP_ID | 0x10,
    TARG_RC_WRITE_ATTR_OVER_WRONG_PNOR_SEC  = TARG_COMP_ID | 0x11,
    TARG_RC_WRITE_ATTR_OVER_NO_TANK_LAYER   = TARG_COMP_ID | 0x12,
};

}; // End TARGETING namespace

#endif // __TARGETING_COMMON_TARGREASONCODES_H


text:
USE TelerikAcademy

SELECT e.FirstName + ' ' + e.LastName AS EmployeeName,
		em.FirstName + ' ' + em.LastName AS ManagerName,
		a.AddressText AS EmployeeAdress
FROM Employees e
	INNER JOIN Employees em
		ON e.ManagerID = em.EmployeeID
			INNER JOIN Addresses a
				ON e.AddressID = a.AddressID


text:
package com.emc.vipr.client.core;

import static com.emc.vipr.client.core.util.ResourceUtils.refIds;
import static com.emc.vipr.client.core.util.ResourceUtils.defaultList;
import static com.emc.vipr.client.core.impl.PathConstants.*;
import java.net.URI;
import java.util.*;
import com.emc.storageos.model.DataObjectRestRep;
import com.emc.storageos.model.RelatedResourceRep;
import com.emc.storageos.model.TagAssignment;
import com.emc.storageos.model.TaskList;
import com.emc.storageos.model.TaskResourceRep;
import com.emc.storageos.model.auth.*;
import com.emc.storageos.model.quota.QuotaInfo;
import com.emc.storageos.model.quota.QuotaUpdateParam;
import com.emc.storageos.model.search.SearchResultResourceRep;
import com.emc.storageos.model.search.SearchResults;
import com.emc.storageos.model.search.Tags;
import com.emc.vipr.client.Task;
import com.emc.vipr.client.Tasks;
import com.emc.vipr.client.core.filters.ResourceFilter;
import com.emc.vipr.client.impl.RestClient;
import com.emc.vipr.client.core.search.SearchBuilder;
import com.emc.vipr.client.core.util.ResourceUtils;
import javax.ws.rs.core.UriBuilder;

/**
 * Base class for all resource types. This class provides the implementation of many methods that may or may not be
 * implemented by all resources as a convenience (ACLs/Tasks/Quotas). This also provides a basic implementation of
 * {@link Resources#getByIds(Collection, ResourceFilter)} that looks up each resource in the collection one by one.
 *
 * @param <T>
 *            the type of resource.
 */
public abstract class AbstractResources<T extends DataObjectRestRep> implements Resources<T> {

    protected final RestClient client;
    protected final Class<T> resourceClass;
    protected final String baseUrl;

    /** Whether to include inactive resources in fetch operations, defaults to false. */
    private boolean includeInactive;

    /** Whether to include internal resources in fetch operations, defaults to false. */
    private boolean includeInternal;

    public AbstractResources(RestClient client, Class<T> resourceClass, String baseUrl) {
        this.client = client;
        this.baseUrl = baseUrl;
        this.resourceClass = resourceClass;
    }

    /**
     * Configures the fetch operations to include inactive resources.
     *
     * @param inactive
     *            whether to include inactive resources.
     * @return this AbstractResources.
     */
    public AbstractResources<T> withInactive(boolean inactive) {
        this.includeInactive = inactive;
        return this;
    }

    /**
     * Configures the fetch operations to include internal resources.
     *
     * @param internal
     *            whether to include internal resources.
     * @return this AbstractResources.
     */
    public AbstractResources<T> withInternal(boolean internal) {
        this.includeInternal = internal;
        return this;
    }

    /**
     * Gets the URL for selecting a resource by ID: <tt>baseUrl/{id}</tt>
     *
     * @return the ID URL.
     */
    protected String getIdUrl() {
        return String.format(ID_URL_FORMAT, baseUrl);
    }

    /**
     * Gets the URL for deactivating a resource by ID: <tt>baseUrl/{id}/deactivate</tt>
     *
     * @return the deactivate URL.
     */
    protected String getDeactivateUrl() {
        return String.format(DEACTIVATE_URL_FORMAT, baseUrl);
    }

    /**
     * Gets the URL for registering a resource by ID: <tt>baseUrl/{id}/register</tt>
     *
     * @return the deactivate URL.
     */
    protected String getRegisterUrl() {
        return String.format(REGISTER_URL_FORMAT, baseUrl);
    }

    /**
     * Gets the URL for de-registering a resource by ID: <tt>baseUrl/{id}/deregister</tt>
     *
     * @return the deactivate URL.
     */
    protected String getDeregisterUrl() {
        return String.format(DEREGISTER_URL_FORMAT, baseUrl);
    }

    /**
     * Gets the URL for getting/setting tags for a resource by ID: <tt>baseUrl/{id}/tags</tt>
     *
     * @return the tags URL.
     */
    protected String getTagsUrl() {
        return String.format(TAGS_URL_FORMAT, baseUrl);
    }

    /**
     * Gets the URL for getting/setting ACLs for a resource by ID: <tt>baseUrl/{id}/acl</tt>
     *
     * @return the ACLs URL.
     */
    protected String getAclUrl() {
        return String.format(ACL_URL_FORMAT, baseUrl);
    }

    /**
     * Gets the URL for getting/setting role assignments for a resource by ID: <tt>baseUrl/{id}/role-assignments</tt>
     *
     * @return the role assignments URL.
     */
    protected String getRoleAssignmentsUrl() {
        return String.format(ID_URL_FORMAT + ROLE_ASSIGNMENT_PATH, baseUrl);
    }

    /**
     * Gets the URL for getting/setting quotas for a resource by ID: <tt>baseUrl/{id}/quota</tt>
     *
     * @return the quota URL.
     */
    protected String getQuotaUrl() {
        return String.format(QUOTA_URL_FORMAT, baseUrl);
    }

    /**
     * Gets the URL for searching for resources of this type: <tt>baseUrl/search</tt>
     *
     * @return the search URL.
     */
    protected String getSearchUrl() {
        return String.format(SEARCH_URL_FORMAT, baseUrl);
    }

    @Override
    public T get(URI id) {
        if (id != null) {
            return client.get(resourceClass, getIdUrl(), id);
        }
        else {
            return null;
        }
    }

    @Override
    public T get(RelatedResourceRep ref) {
        return (ref != null) ? get(ref.getId()) : null;
    }

    @Override
    public List<T> getByIds(Collection<URI> ids) {
        return getByIds(ids, null);
    }

    @Override
    public List<T> getByIds(Collection<URI> ids, ResourceFilter<T> filter) {
        List<T> results = new ArrayList<T>();
        if (ids != null) {
            for (URI id : ids) {
                if (!acceptId(id, filter)) {
                    continue;
                }

                T item = get(id);
                if ((item != null) && accept(item, filter)) {
                    results.add(item);
                }
            }
        }
        return results;
    }

    @Override
    public List<T> getByRefs(Collection<? extends RelatedResourceRep> resources) {
        return getByRefs(resources, null);
    }

    @Override
    public List<T> getByRefs(Collection<? extends RelatedResourceRep> refs, ResourceFilter<T> filter) {
        return getByIds(refIds(refs), filter);
    }

    @Override
    public Set<String> getTags(URI id) {
        Tags tags = client.get(Tags.class, getTagsUrl(), id);
        return tags != null ? tags.getTag() : new HashSet<String>();
    }

    @Override
    public void addTags(URI id, Set<String> add) {
        updateTags(id, new TagAssignment(add, new HashSet<String>()));
    }

    @Override
    public void removeTags(URI id, Set<String> remove) {
        updateTags(id, new TagAssignment(new HashSet<String>(), remove));
    }

    @Override
    public void updateTags(URI id, TagAssignment tags) {
        client.put(String.class, tags, getTagsUrl(), id);
    }

    /**
     * Deactivates a resource by ID. Some resource types return no result on deactivate.
     *
     * @param id
     *            the ID of the resource to deactivate.
     */
    protected void doDeactivate(URI id) {
        client.post(String.class, getDeactivateUrl(), id);
    }

    /**
     * Deactivates a resource by ID and returns the deactivate task. Some resource types return a task when
     * deactivating.
     *
     * @param id
     *            the ID of the resource to deactivate.
     * @return the deactivate task.
     */
    protected Task<T> doDeactivateWithTask(URI id) {
        return postTask(getDeactivateUrl(), id);
    }

    /**
     * Deactivates a resource by ID and returns the deactivate tasks. Some resource types return tasks when
     * deactivating.
     *
     * @param id
     *            the ID of the resource to deactivate.
     * @return the deactivate tasks.
     */
    protected Tasks<T> doDeactivateWithTasks(URI id) {
        return postTasks(getDeactivateUrl(), id);
    }

    /**
     * Gets the tasks associated with a resource by ID (when supported).
     *

     * API Call: GET <tt>baseUrl/{id}/tasks</tt>
     *
     * @param id
     *            the ID of the resource.
     * @return the tasks associated with the resource.
     */
    protected Tasks<T> doGetTasks(URI id) {
        TaskList response = client.get(TaskList.class, getIdUrl() + "/tasks", id);
        return new Tasks<T>(client, response.getTaskList(), resourceClass);
    }

    /**
     * Gets a single task for a resource by ID.
     *

     * API Call: GET <tt>baseUrl/{id}/tasks/{taskId}</tt>
     *
     * @param id
     *            the ID of the resource.
     * @param taskId
     *            the ID of the task to retrieve.
     * @return the task.
     */
    protected Task<T> doGetTask(URI id, URI taskId) {
        TaskResourceRep response = client.get(TaskResourceRep.class, getIdUrl() + "/tasks/{taskId}", id, taskId);
        return new Task<T>(client, response, resourceClass);
    }

    /**
     * Get ACLs for resources that support it.
     *

     * API Call: GET <tt>baseUrl/{id}/acl</tt>
     *
     * @param id
     *            the ID of the resource.
     * @return the list of ACL entries.
     */
    protected List<ACLEntry> doGetACLs(URI id) {
        ACLAssignments response = client.get(ACLAssignments.class, getAclUrl(), id);
        return defaultList(response.getAssignments());
    }

    /**
     * Update ACLs for resource that support it.
     *

     * API Call: PUT <tt>baseUrl/{id}/acl</tt>
     *
     * @param id
     *            the ID of the resource.
     * @param aclChanges
     *            the ACL changes.
     * @return the resulting list of ACL entries.
     */
    protected List<ACLEntry> doUpdateACLs(URI id, ACLAssignmentChanges aclChanges) {
        ACLAssignments response = client.put(ACLAssignments.class, aclChanges, getAclUrl(), id);
        return defaultList(response.getAssignments());
    }

    /**
     * Gets the quota info for resources that support it.
     *

     * API Call: GET <tt>baseUrl/{id}/quota</tt>
     *
     * @param id
     *            the ID of the resource.
     * @return the quota info.
     */
    protected QuotaInfo doGetQuota(URI id) {
        return client.get(QuotaInfo.class, getQuotaUrl(), id);
    }

    /**
     * Updates the quota info for resources that support it.
     *

     * API Call: PUT <tt>baseUrl/{id}/quota</tt>
     *
     * @param id
     *            the ID of the resource.
     * @param quota
     *            the quota update information.
     * @return the quota info.
     */
    protected QuotaInfo doUpdateQuota(URI id, QuotaUpdateParam quota) {
        return client.put(QuotaInfo.class, quota, getQuotaUrl(), id);
    }

    /**
     * Performs a POST with no request that will return a single task as a response.
     *
     * @param path
     *            the path to post to.
     * @param args
     *            the path arguments.
     * @return the task object.
     */
    protected Task<T> postTask(String path, Object... args) {
        TaskResourceRep task = client.post(TaskResourceRep.class, path, args);
        return new Task<T>(client, task, resourceClass);
    }

    /**
     * Performs a POST with a request that will return a single task as a response.
     *
     * @param request
     *            the request object.
     * @param path
     *            the path to post to.
     * @param args
     *            the path arguments.
     * @return the task object.
     */
    protected Task<T> postTask(Object request, String path, Object... args) {
        TaskResourceRep task = client.post(TaskResourceRep.class, request, path, args);
        return new Task<T>(client, task, resourceClass);
    }

    /**
     * Performs a POST with no request and returns a single task as a response.
     *
     * @param uri
     *            the URI to post to.
     * @return the task object.
     */
    protected Task<T> postTaskURI(URI uri) {
        TaskResourceRep task = client.postURI(TaskResourceRep.class, uri);
        return new Task<T>(client, task, resourceClass);
    }

    /**
     * Performs a DELETE with no request and returns a single task as a response.
     *
     * @param uri
     *            the URI to post to.
     * @return the task object.
     */
    protected Task<T> deleteTaskURI(URI uri) {
        TaskResourceRep task = client.deleteURI(TaskResourceRep.class, uri);
        return new Task<T>(client, task, resourceClass);
    }

    /**
     * Performs a DELETE with a request that will return a single task as a response.
     *
     * @param path
     *            the path to post to.
     * @param args
     *            the path arguments.
     * @return the task object.
     */
    protected Task<T> deleteTask(String path, Object... args) {
        TaskResourceRep task = client.delete(TaskResourceRep.class, path, args);
        return new Task<T>(client, task, resourceClass);
    }

    /**
     * Performs a POST with a request that will return a single task as a response.
     *
     * @param request
     *            the request object.
     * @param uri
     *            the URI to post to.
     * @return the task object.
     */
    protected Task<T> postTaskURI(Object request, URI uri) {
        TaskResourceRep task = client.postURI(TaskResourceRep.class, request, uri);
        return new Task<T>(client, task, resourceClass);
    }

    /**
     * Performs a PUT with a request that will return a single task as a response.
     *
     * @param request
     *            the request object.
     * @param path
     *            the path to put to.
     * @param args
     *            the path arguments.
     * @return the task object.
     */
    protected Task<T> putTask(Object request, String path, Object... args) {
        TaskResourceRep task = client.put(TaskResourceRep.class, request, path, args);
        return new Task<T>(client, task, resourceClass);
    }

    /**
     * Performs a PUT with a request that will return a single task as a response.
     *
     * @param request
     *            the request object.
     * @param uri
     *            the URI to put to.
     * @return the task object.
     */
    protected Task<T> putTaskURI(Object request, URI uri) {
        TaskResourceRep task = client.putURI(TaskResourceRep.class, request, uri);
        return new Task<T>(client, task, resourceClass);
    }

    /**
     * Performs a POST with no request that will return multiple tasks as a response.
     *
     * @param path
     *            the path to post to.
     * @param args
     *            the path arguments.
     * @return the tasks object.
     */
    protected Tasks<T> postTasks(String path, Object... args) {
        TaskList tasks = client.post(TaskList.class, path, args);
        return new Tasks<T>(client, tasks.getTaskList(), resourceClass);
    }

    /**
     * Performs a POST with a request that will return multiple tasks as a response.
     *
     * @param request
     *            the request object.
     * @param path
     *            the path to post to.
     * @param args
     *            the path arguments.
     * @return the tasks object.
     */
    protected Tasks<T> postTasks(Object request, String path, Object... args) {
        TaskList tasks = client.post(TaskList.class, request, path, args);
        return new Tasks<T>(client, tasks.getTaskList(), resourceClass);
    }

    /**
     * Performs a POST with a request that will return multiple tasks as a response.
     *
     * @param request
     *            the request object.
     * @param uri
     *            the URI to post to.
     * @return the tasks object.
     */
    protected Tasks<T> postTasksURI(Object request, URI uri) {
        TaskList tasks = client.postURI(TaskList.class, request, uri);
        return new Tasks<T>(client, tasks.getTaskList(), resourceClass);
    }

    /**
     * Determines if the ID is accepted by the filter.
     *
     * @param id
     *            the ID.
     * @param filter
     *            the filter (may be null for no filtering).
     * @return true if the ID is accepted.
     */
    protected <V extends DataObjectRestRep> boolean acceptId(URI id, ResourceFilter<V> filter) {
        if (id == null) {
            return false;
        }
        if (filter != null) {
            return filter.acceptId(id);
        }
        return true;
    }

    /**
     * Determines if the item is accepted.
     *
     * @param item
     *            the item.
     * @param filter
     *            the filter (may be null for no filtering).
     * @return true if the item is accepted.
     */
    protected <V extends DataObjectRestRep> boolean accept(V item, ResourceFilter<V> filter) {
        // Filter inactive
        if (!includeInactive && !ResourceUtils.isActive(item)) {
            return false;
        }
        // Filter internal
        if (!includeInternal && !ResourceUtils.isNotInternal(item)) {
            return false;
        }
        if (filter != null) {
            return filter.accept(item);
        }
        return true;
    }

    @Override
    public SearchBuilder<T> search() {
        return new SearchBuilder<T>(this);
    }

    /**
     * Performs a search for resources matching the a single search parameter.
     *
     * @param name
     *            the parameter name.
     * @param value
     *            the parameter value.
     * @return the list of resources.
     */
    public List<SearchResultResourceRep> performSearchBy(String name, Object value) {
        Map<String, Object> params = Collections.singletonMap(name, value);
        return performSearch(params);
    }

    /**
     * Performs a search for resources matching the given parameters.
     *
     * @param params
     *            the search query parameters.
     * @return the list of resources.
     */
    public List<SearchResultResourceRep> performSearch(Map<String, Object> params) {
        UriBuilder builder = client.uriBuilder(getSearchUrl());
        for (Map.Entry<String, Object> entry : params.entrySet()) {
            builder.queryParam(entry.getKey(), entry.getValue());
        }
        SearchResults searchResults = client.getURI(SearchResults.class, builder.build());
        List<SearchResultResourceRep> results = searchResults.getResource();
        if (results == null) {
            results = new ArrayList<SearchResultResourceRep>();
        }
        return results;
    }
}


text:
package org.opensmartgridplatform.domain.core.entities;

import java.io.Serializable;
import java.util.Objects;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MapsId;

/**
 * FirmwareFileFirmwareModule entity class holds the module version of a
 * firmware module included in a firmware file.
 */
@Entity
public class FirmwareFileFirmwareModule implements Comparable<FirmwareFileFirmwareModule>, Serializable {

    private static final long serialVersionUID = 1301961968551172326L;

    @Embeddable
    public static class FirmwareFileFirmwareModuleId implements Serializable {

        private static final long serialVersionUID = 6612499807879722629L;

        @Column
        private Long firmwareFileId;

        @Column
        private Long firmwareModuleId;

        protected FirmwareFileFirmwareModuleId() {
            // No-argument constructor, not to be used by application code.
        }

        public FirmwareFileFirmwareModuleId(final Long firmwareFileId, final Long firmwareModuleId) {
            this.firmwareFileId = firmwareFileId;
            this.firmwareModuleId = firmwareModuleId;
        }

        public Long getFirmwareFileId() {
            return this.firmwareFileId;
        }

        public Long getFirmwareModuleId() {
            return this.firmwareModuleId;
        }

        @Override
        public boolean equals(final Object obj) {
            if (this == obj) {
                return true;
            }
            if (!(obj instanceof FirmwareFileFirmwareModuleId)) {
                return false;
            }
            final FirmwareFileFirmwareModuleId other = (FirmwareFileFirmwareModuleId) obj;
            return Objects.equals(this.firmwareFileId, other.firmwareFileId)
                    && Objects.equals(this.firmwareModuleId, other.firmwareModuleId);
        }

        @Override
        public int hashCode() {
            return Objects.hash(this.firmwareFileId, this.firmwareModuleId);
        }

        @Override
        public String toString() {
            return String.format("[file=%s, module=%s]", this.firmwareFileId, this.firmwareModuleId);
        }
    }

    @EmbeddedId
    private FirmwareFileFirmwareModuleId id;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "firmware_file_id")
    @MapsId("firmwareFileId")
    private FirmwareFile firmwareFile;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "firmware_module_id")
    @MapsId("firmwareModuleId")
    private FirmwareModule firmwareModule;

    @Column(nullable = false)
    private String moduleVersion;

    protected FirmwareFileFirmwareModule() {
        // No-argument constructor, not to be used by application code.
    }

    public FirmwareFileFirmwareModule(final FirmwareFile firmwareFile, final FirmwareModule firmwareModule,
            final String moduleVersion) {
        this.firmwareFile = firmwareFile;
        this.firmwareModule = firmwareModule;
        this.id = new FirmwareFileFirmwareModuleId(firmwareFile.getId(), firmwareModule.getId());
        this.moduleVersion = moduleVersion;
    }

    @Override
    public boolean equals(final Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof FirmwareFileFirmwareModule)) {
            return false;
        }
        final FirmwareFileFirmwareModule other = (FirmwareFileFirmwareModule) obj;
        return Objects.equals(this.firmwareFile, other.firmwareFile)
                && Objects.equals(this.firmwareModule, other.firmwareModule);
    }

    @Override
    public int hashCode() {
        return Objects.hash(this.firmwareFile, this.firmwareModule);
    }

    @Override
    public int compareTo(final FirmwareFileFirmwareModule o) {
        final int compareFirmwareFile = this.firmwareFile.getIdentification()
                .compareTo(o.firmwareFile.getIdentification());
        if (compareFirmwareFile != 0) {
            return compareFirmwareFile;
        }
        final int compareFirmwareModule = this.firmwareModule.compareTo(o.firmwareModule);
        if (compareFirmwareModule != 0) {
            return compareFirmwareModule;
        }
        return this.moduleVersion.compareTo(o.moduleVersion);
    }

    @Override
    public String toString() {
        return String.format("FirmwareFileFirmwareModule[file=%s, module=%s, version=%s]",
                this.firmwareFile.getIdentification(), this.firmwareModule.getDescription(), this.moduleVersion);
    }

    public void prepareForRemoval() {
        this.firmwareFile = null;
        this.firmwareModule = null;
    }

    public final FirmwareFileFirmwareModuleId getId() {
        return this.id;
    }

    public FirmwareFile getFirmwareFile() {
        return this.firmwareFile;
    }

    public FirmwareModule getFirmwareModule() {
        return this.firmwareModule;
    }

    public String getModuleVersion() {
        return this.moduleVersion;
    }

    public void setModuleVersion(final String moduleVersion) {
        this.moduleVersion = moduleVersion;
    }

}


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

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="../styles/main.css">

Search Results

Loading...

Action Functions, SearchPanel

Activate, SearchPanel

Activation Functions, SearchPanel

Searching...

No Matches


text:
namespace SIS.WEBSERVER.Results
{
    using SIS.HTTP.Enums;
    using SIS.HTTP.Headers;
    using SIS.HTTP.Responses;

    public class InlineResourceResult : HttpResponse
    {
        public InlineResourceResult(byte[] content, HttpStatusCode httpStatusCode)
            : base(httpStatusCode)
        {
            this.Headers.Add(new HttpHeader(HttpHeader.ContentLenght, content.Length.ToString()));
            this.Headers.Add(new HttpHeader(HttpHeader.ContentDisposition, "inline"));
            this.Content = content;
        }
    }
}


text:
<!DOCTYPE HTML>

<title>BGFXCapsLimits.Buffer (LWJGL 3.1.0 - bgfx)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2016-10-30">
<link rel="stylesheet" type="text/css" href="../../../javadoc.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../jquery/jquery-ui.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Package

Class

Deprecated

Index

Prev Class

Next Class

Frames

No Frames

All Classes

SEARCH:
<input type="text" id="search" value=" " disabled="disabled">
<input type="reset" id="reset" value=" " disabled="disabled">

JavaScript is disabled on your browser.

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

Package org.lwjgl.bgfx

Class BGFXCapsLimits.Buffer

java.lang.Object

org.lwjgl.system.CustomBuffer<SELF>

org.lwjgl.system.StructBuffer<BGFXCapsLimits,BGFXCapsLimits.Buffer>

org.lwjgl.bgfx.BGFXCapsLimits.Buffer

All Implemented Interfaces:

org.lwjgl.system.Pointer

Enclosing class:

BGFXCapsLimits

public static class BGFXCapsLimits.Buffer
extends org.lwjgl.system.StructBuffer<BGFXCapsLimits,BGFXCapsLimits.Buffer>

An array of BGFXCapsLimits structs.

Nested Class Summary

Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

org.lwjgl.system.Pointer.Default

Field Summary

Fields inherited from interface org.lwjgl.system.Pointer

POINTER_SHIFT, POINTER_SIZE

Constructor Summary

Constructors

Constructor and Description

Buffer(java.nio.ByteBuffer container)

Creates a new BGFXCapsLimits.Buffer instance backed by the specified container.

Method Summary

All Methods Instance Methods Concrete Methods

Modifier and Type
Method and Description

int
maxBlits()

Returns the value of the maxBlits field.

int
maxDrawCalls()

Returns the value of the maxDrawCalls field.

int
maxDynamicIndexBuffers()

Returns the value of the maxDynamicIndexBuffers field.

int
maxDynamicVertexBuffers()

Returns the value of the maxDynamicVertexBuffers field.

int
maxFBAttachments()

Returns the value of the maxFBAttachments field.

int
maxFrameBuffers()

Returns the value of the maxFrameBuffers field.

int
maxIndexBuffers()

Returns the value of the maxIndexBuffers field.

int
maxOcclusionQueries()

Returns the value of the maxOcclusionQueries field.

int
maxPrograms()

Returns the value of the maxPrograms field.

int
maxShaders()

Returns the value of the maxShaders field.

int
maxTextures()

Returns the value of the maxTextures field.

int
maxTextureSamplers()

Returns the value of the maxTextureSamplers field.

int
maxTextureSize()

Returns the value of the maxTextureSize field.

int
maxUniforms()

Returns the value of the maxUniforms field.

int
maxVertexBuffers()

Returns the value of the maxVertexBuffers field.

int
maxVertexDecls()

Returns the value of the maxVertexDecls field.

int
maxVertexStreams()

Returns the value of the maxVertexStreams field.

int
maxViews()

Returns the value of the maxViews field.

Methods inherited from class org.lwjgl.system.StructBuffer

get, get, get, get, put, put

Methods inherited from class org.lwjgl.system.CustomBuffer

address, address, address0, capacity, clear, compact, duplicate, flip, free, hasRemaining, limit, limit, mark, position, position, put, remaining, reset, rewind, slice, slice, toString

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Buffer

public Buffer(java.nio.ByteBuffer container)

Creates a new BGFXCapsLimits.Buffer instance backed by the specified container.

 Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values
 will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided
 by BGFXCapsLimits.SIZEOF, and its mark will be undefined.

The created buffer instance holds a strong reference to the container object.

Method Detail

maxDrawCalls

public int maxDrawCalls()

Returns the value of the maxDrawCalls field.

maxBlits

public int maxBlits()

Returns the value of the maxBlits field.

maxTextureSize

public int maxTextureSize()

Returns the value of the maxTextureSize field.

maxViews

public int maxViews()

Returns the value of the maxViews field.

maxFrameBuffers

public int maxFrameBuffers()

Returns the value of the maxFrameBuffers field.

maxFBAttachments

public int maxFBAttachments()

Returns the value of the maxFBAttachments field.

maxPrograms

public int maxPrograms()

Returns the value of the maxPrograms field.

maxShaders

public int maxShaders()

Returns the value of the maxShaders field.

maxTextures

public int maxTextures()

Returns the value of the maxTextures field.

maxTextureSamplers

public int maxTextureSamplers()

Returns the value of the maxTextureSamplers field.

maxVertexDecls

public int maxVertexDecls()

Returns the value of the maxVertexDecls field.

maxVertexStreams

public int maxVertexStreams()

Returns the value of the maxVertexStreams field.

maxIndexBuffers

public int maxIndexBuffers()

Returns the value of the maxIndexBuffers field.

maxVertexBuffers

public int maxVertexBuffers()

Returns the value of the maxVertexBuffers field.

maxDynamicIndexBuffers

public int maxDynamicIndexBuffers()

Returns the value of the maxDynamicIndexBuffers field.

maxDynamicVertexBuffers

public int maxDynamicVertexBuffers()

Returns the value of the maxDynamicVertexBuffers field.

maxUniforms

public int maxUniforms()

Returns the value of the maxUniforms field.

maxOcclusionQueries

public int maxOcclusionQueries()

Returns the value of the maxOcclusionQueries field.

Skip navigation links

Package

Class

Deprecated

Index

Prev Class

Next Class

Frames

No Frames

All Classes

JavaScript is disabled on your browser.

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

Copyright LWJGL. All Rights Reserved. License terms.


text:
/**
 *
 */
//只输入数字
angular.module("admin")
    .directive('numberic', function () {
        return {
            require: 'ngModel',
            restrict: "EA",
            scope: {
                max: '@',
                maxLength: '@',
                min: '@'
            },
            link: function (scope, ele, attrs, modelCtrl) {
                modelCtrl.$parsers.push(function (inputValue) {
                    if (inputValue == undefined) {
                        return '';
                    }

                    var max = +scope.max;
                    var maxLength = +scope.maxLength;
                    var min = +scope.min;

                    var transformedInput = inputValue.replace(/[^^\d+(\.\d)?$]/g, '');

                    if (maxLength && inputValue.length > maxLength) {
                        transformedInput = inputValue.slice(0, maxLength);
                    }
                    if (max && +transformedInput > max) {
                        transformedInput = max + '';
                    }
                    if (min && +transformedInput < min) {
                        transformedInput = min + '';
                    }
                    if (transformedInput != inputValue) {
                        modelCtrl.$setViewValue(transformedInput);
                        modelCtrl.$render();
                    }
                    return transformedInput;
                })
            }
        }
    });

//只输入中文和字母
angular.module("admin")
    .directive('chinese', function () {
        return {
            require: 'ngModel',
            restrict: "EA",
            scope: {
                max: '@',
                maxLength: '@',
                min: '@'
            },
            link: function (scope, ele, attrs, modelCtrl) {
                modelCtrl.$parsers.push(function (inputValue) {
                    if (inputValue == undefined) {
                        return '';
                    }

                    var max = +scope.max;
                    var maxLength = +scope.maxLength;
                    var min = +scope.min;

                    var transformedInput = inputValue.replace(/[^a-zA-Z\u4e00-\u9fa5]+$/g, '');

                    if (maxLength && inputValue.length > maxLength) {
                        transformedInput = inputValue.slice(0, maxLength);
                    }
                    if (max && +transformedInput > max) {
                        transformedInput = max + '';
                    }
                    if (min && +transformedInput < min) {
                        transformedInput = min + '';
                    }
                    if (transformedInput != inputValue) {
                        modelCtrl.$setViewValue(transformedInput);
                        modelCtrl.$render();
                    }
                    return transformedInput;
                })
            }
        }
    });


text:
require "base64"
require "crosby"

module Crosby
  module RSpecHelper
    def crosby_email(mailer, method, *args)
      @crosby_uuid ||= generate_crosby_digest(mailer, method, *args)
      exporter = Crosby::Exporter.new(mailer, method, @crosby_uuid, *args)
      return (exporter.export ? exporter.mail : false)
    end

    def generate_crosby_digest(*args)
      Base64.encode64(args.map(&:to_s).join("|")).chomp
    end
  end
end

begin
  if Kernel.const_defined?(:Spec)
    class ActiveSupport::TestCase
      include Crosby::RSpecHelper
    end
  else
    RSpec.configure do |c|
      c.include Crosby::RSpecHelper
    end
  end
rescue NameError
  raise Crosby::MissingRSpec, "Crosby can't find RSpec at the Spec::Runner " \
                              "or RSpec namespace."
end