text:
package com.expedia.seiso.web.eventhandler;

import javax.annotation.PostConstruct;

import lombok.val;
import lombok.extern.slf4j.Slf4j;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.rest.core.annotation.HandleAfterCreate;
import org.springframework.data.rest.core.annotation.HandleAfterSave;
import org.springframework.data.rest.core.annotation.HandleBeforeCreate;
import org.springframework.data.rest.core.annotation.HandleBeforeSave;
import org.springframework.data.rest.core.annotation.RepositoryEventHandler;
import org.springframework.stereotype.Component;

import com.expedia.seiso.domain.Domain;
import com.expedia.seiso.domain.entity.Endpoint;
import com.expedia.seiso.domain.entity.NodeIpAddress;
import com.expedia.seiso.domain.entity.RotationStatus;
import com.expedia.seiso.domain.repo.EndpointRepo;
import com.expedia.seiso.domain.repo.NodeIpAddressRepo;
import com.expedia.seiso.domain.repo.NodeRepo;
import com.expedia.seiso.domain.repo.RotationStatusRepo;
import com.expedia.seiso.domain.service.RotationService;

/**
 * @author Willie Wheeler
 */
@RepositoryEventHandler(NodeIpAddress.class)
@Component
@Slf4j
public class NodeIpAddressEventHandler {
	@Autowired private NodeRepo nodeRepo;
	@Autowired private NodeIpAddressRepo nodeIpAddressRepo;
	@Autowired private EndpointRepo endpointRepo;
	@Autowired private RotationStatusRepo rotationStatusRepo;
	@Autowired private RotationService rotationService;

	private RotationStatus unknownRotationStatus;

	@PostConstruct
	public void postConstruct() {
		// Assume this doesn't change over time.
		this.unknownRotationStatus = rotationStatusRepo.findByKey(Domain.UNKNOWN_ROTATION_STATUS_KEY);
	}

	/**
	 *

	 * Pre-processes HTTP POST events.
	 *

	 *

	 * If the rotation status or aggregate rotation status is {@code null}, we initialize it to the corresponding
	 * "unknown" status entity instead of leaving it null. This allows the UI to render missing/unknown statuses without
	 * doing explicit null checks.
	 *

	 *
	 * @param nip
	 *            node IP address to create
	 */
	@HandleBeforeCreate
	public void handleBeforeCreate(NodeIpAddress nip) {
		log.trace("NodeIpAddressEventHandler.handleBeforeCreate(): entered");
		replaceNullStatusesWithUnknown(nip);
		log.trace("NodeIpAddressEventHandler.handleBeforeCreate(): exiting");
	}

	/**
	 *

	 * Post-processes HTTP POST events.
	 *

	 *
	 * @param nip
	 */
	@HandleAfterCreate
	public void handleAfterCreate(NodeIpAddress nip) {
		log.trace("NodeIpAddressEventHandler.handleAfterCreate(): entered");
		createEndpointsForNodeIpAddress(nip);
		log.trace("NodeIpAddressEventHandler.handleAfterCreate(): exiting");
	}

	/**
	 *

	 * Pre-processes HTTP PUT and PATCH requests.
	 *

	 *

	 * If the rotation status or aggregate rotation status is {@code null}, we initialize it to the corresponding
	 * "unknown" status entity instead of leaving it null. This allows the UI to render missing/unknown statuses without
	 * doing explicit null checks.
	 *

	 *

	 * Generally we shouldn't have to do this, since we try to prevent node IP addresses from having {@code null}
	 * statuses, but we're just being paranoid.
	 *

	 *
	 * @param nip
	 *            node IP address to save
	 */
	@HandleBeforeSave
	public void handleBeforeSave(NodeIpAddress nip) {
		log.trace("NodeIpAddressEventHandler.handleBeforeSave(): entered");
		replaceNullStatusesWithUnknown(nip);
		log.trace("NodeIpAddressEventHandler.handleBeforeSave(): exiting");
	}

	/**
	 *

	 * Post-processes HTTP PUT and PATCH requests.
	 *

	 *
	 * @param nip
	 */
	@HandleAfterSave
	public void handleAfterSave(NodeIpAddress nip) {
		log.trace("NodeIpAddressEventHandler.handleAfterSave(): entered");
		rotationService.recalculateAggregateRotationStatus(nip);
		nodeIpAddressRepo.save(nip);

		val node = nip.getNode();
		rotationService.recalculateAggregateRotationStatus(node);
		nodeRepo.save(node);
		log.trace("NodeIpAddressEventHandler.handleAfterSave(): exiting");
	}

	private void replaceNullStatusesWithUnknown(NodeIpAddress nip) {
		if (nip.getRotationStatus() == null) {
			nip.setRotationStatus(unknownRotationStatus);
		}
		if (nip.getAggregateRotationStatus() == null) {
			nip.setAggregateRotationStatus(unknownRotationStatus);
		}
	}

	private void createEndpointsForNodeIpAddress(NodeIpAddress nip) {
		val ipAddress = nip.getIpAddress();
		val node = nip.getNode();
		val sips = node.getServiceInstance().getPorts();
		log.info("Creating endpoints for nip={} and each of {} ports", ipAddress, sips.size());

		sips.forEach(sip -> {

			// Set the rotation status on the endpoint. Hibernate can flush the persistence context at any time (e.g.,
			// before executing queries) and we must ensure that the endpoint is ready. I *think* the call to
			// setIpAddress() ends up making the endpoint persistent because it adds the endpoint to the NIP's list of
			// endpoints, but I'm not positive.

			// The call to setIpAddress() in particular needs to result in updating *both* sides of the relationship.
			// Otherwise, when ServiceInstanceServiceImpl recalculates the aggregate rotation statuses, it won't see
			// that the NIP has endpoints, and will assign the "no-endpoints" status. [WLW]

			// For some reason, gradle assemble (and hence Travis CI) craps out when I use a val here. I assume it has
			// something to do with the lambda. So use Endpoint. [WLW]
			log.trace("nip={} has {} endpoints", ipAddress, nip.getEndpoints().size());
			log.info("Creating endpoint: nip={}, port={}", ipAddress, sip.getNumber());
			// @formatter:off
			Endpoint endpoint = new Endpoint()
					.setRotationStatus(unknownRotationStatus)
					.setIpAddress(nip)
					.setPort(sip);
			// @formatter:on

			endpointRepo.save(endpoint);

			// Do this so the recalc below can actually see the endpoint.
			nip.getEndpoints().add(endpoint);
		});

		rotationService.recalculateAggregateRotationStatus(nip);
		nodeIpAddressRepo.save(nip);

		rotationService.recalculateAggregateRotationStatus(node);
		nodeRepo.save(node);
	}
}


text:
require "spec_helper"

module CoreHelper
  def create_rails_app
    Dir.chdir(File.join(File.dirname(__FILE__), "../staging"))
    system("rails new gem_test -d mysql -m ../../lib/rails_templates/default_template.rb >> /dev/null")
    puts "== Created rails application ====="
    system("pwd")
    require "gem_test/config/environment.rb"
    mock_rails_env
  end

  def destroy_rails_app
    begin
      system("rm -rf gem_test")
      puts "== Destroyed rails application ==="
      Dir.chdir("../../")
    rescue
      puts "Was not able to delete rails application"
    end
  end

  def mock_rails_env
    database_yml = File.join(File.dirname(__FILE__), '../staging/gem_test/config/database.yml')
    system("echo #{database_yml}")
    if File.exists?(database_yml)
      active_record_configuration = YAML.load_file(database_yml)["mysql"]

      ActiveRecord::Base.establish_connection(active_record_configuration)
      ActiveRecord::Base.logger = Logger.new(File.join(File.dirname(__FILE__), "debug.log"))

      ActiveRecord::Base.silence do
        ActiveRecord::Migration.verbose = false

        load(File.dirname(__FILE__) + '/../staging/gem_test/db/schema.rb')
        system("pwd")
        Dir.new(File.join(File.dirname(__FILE__), "/../../lib/generators/orochi/templates/models")).each do |file|
          load(file) if !File.directory?(file)
        end
      end
    else
      system("echo ':('")
    end
  end
end

redpajama_set_name: RedPajamaGithub


text:
    {!! Form::label('name', 'Name:') !!}
    {!! Form::text('name', null, ['class' => 'form-control', 'required']) !!}

    {!! Form::label('code', 'Code:') !!}
    {!! Form::text('code', null, ['class' => 'form-control', 'required']) !!}

    {!! Form::label('description', 'Description:') !!}
    {!! Form::textarea('description', null, ['class' => 'form-control', 'rows' => 5]) !!}

    {!! Form::label('cost_price', 'Cost Price:') !!}
    {!! Form::number('cost_price', null, ['class' => 'form-control']) !!}

    {!! Form::label('selling_price', 'Selling Price:') !!}
    {!! Form::number('selling_price', null, ['class' => 'form-control', 'required']) !!}

{{--

    {!! Form::label('discount', 'Discount:') !!}
    {!! Form::number('discount', null, ['class' => 'form-control']) !!}

 --}}

    {!! Form::label('vat', 'Vat:') !!}
    {!! Form::number('vat', null, ['class' => 'form-control']) !!}

            {!! Form::label('reorder_point', 'Reorder Point:') !!}
            {!! Form::number('reorder_point', null, ['class' => 'form-control', 'required']) !!}

            {!! Form::label('opening_stock', 'Opening Stock:') !!}
            {!! Form::number('opening_stock', null, ['class' => 'form-control', 'required']) !!}

            {!! Form::label('category', 'Category:') !!}

                <select name="category" required id="category" class="form-control" data-placeholder="-- Select --"
                    style="width: 100%;">
                    <option></option>
                    @foreach($categories as $category)
                        @if(isset($product) && $product->category_id == $category->id)
                            <option selected value="{{ $category->id }}">{{ $category->name . ' - ' . $category->uid }}</option>
                        @else
                            <option value="{{ $category->id }}">{{ $category->name . ' - ' . $category->uid }}</option>
                        @endif
                    @endforeach
                </select>

                    <button class="btn btn-default" type="button" style="padding: 5px 12px"
                        data-toggle="modal"
                        data-target="#add-category-modal">

                    </button>

        <input type="hidden" name="tags[]">

            {!! Form::label('tags', 'Tags:') !!}
            <select name="tags[]" id="tags" multiple class="form-control" data-placeholder="-- Select --">
                <option></option>
                @foreach($tags as $tag)
                    @if(isset($product) && $product->tags()->find($tag->id))
                        <option selected value="{{ $tag->id }}">{{ $tag->name }}</option>
                    @else
                        <option value="{{ $tag->id }}">{{ $tag->name }}</option>
                    @endif
                @endforeach
            </select>

            Attributes:

                    <input type="text" v-model="attrib.key" placeholder="key" class="form-control"
                        :required="index != attributes.length -1" :name="'attribute[' + index + '][key]'">

                        <input type="text" v-model="attrib.value" placeholder="value" class="form-control"
                            :required="index != attributes.length -1" :name="'attribute[' + index + '][value]'">

                            <button class="btn btn-default" @click="removeAttribute(index)" type="button">

                            </button>

                    <input type="text" v-model="nkey" placeholder="key" class="form-control">

                        <input type="text" v-model="nvalue" placeholder="value" class="form-control">

                            <button class="btn btn-default" @click="addAttribute()" type="button">

                            </button>

    {!! Form::submit('Save', ['class' => 'btn btn-primary']) !!}
    Cancel
    @if(isset($product))
        <button class="btn btn-danger pull-right"
            formaction="{{ route('products.destroy', $product->uid) }}"
            name="_method"
            value="DELETE">

        </button>
    @endif

@section('form.close')

    <form v-on:submit.prevent="addCategory()">

                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>

New Category

                        Parent
                        <select name="parent" id="parent" class="form-control" style="width: 100%" data-placeholder="-- Select --">
                            <option></option>
                            @foreach($categories as $category)
                                <option value="{{ $category->id }}">{{ $category->name . ' - ' . $category->uid }}</option>
                            @endforeach
                        </select>

                        Name
                        <input v-model="category.name" required type="text" class="form-control" id="name">

                        Description
                        <textarea v-model="category.description" rows="5" class="form-control" id="description"></textarea>

                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                    <button type="submit" class="btn btn-primary">Save</button>

    </form>

@endsection

@section('scripts')

@endsection


text:
<?php
namespace Home\Model;
use Think\Model\RelationModel;
class ChildAccountModel extends RelationModel {
    protected $_link = array(
        'Bill'=> array(
        	'mapping_type' => self::HAS_MANY,
        	'mapping_name' => 'bills',
        	'foreign_key' => 'bill_account_id'
        	)
     );
}


text:
using System;
using NetOffice;
using NetOffice.Attributes;
namespace NetOffice.OWC10Api.Enums
{
	 /// <summary>
	 /// SupportByVersion OWC10 1
	 /// </summary>
	[SupportByVersion("OWC10", 1)]
	[EntityType(EntityType.IsEnum)]
	public enum ChartFillTypeEnum
	{
		 /// <summary>
		 /// SupportByVersion OWC10 1
		 /// </summary>
		 /// <remarks>1</remarks>
		 [SupportByVersion("OWC10", 1)]
		 chFillSolid = 1,

		 /// <summary>
		 /// SupportByVersion OWC10 1
		 /// </summary>
		 /// <remarks>2</remarks>
		 [SupportByVersion("OWC10", 1)]
		 chFillPatterned = 2,

		 /// <summary>
		 /// SupportByVersion OWC10 1
		 /// </summary>
		 /// <remarks>3</remarks>
		 [SupportByVersion("OWC10", 1)]
		 chFillGradientOneColor = 3,

		 /// <summary>
		 /// SupportByVersion OWC10 1
		 /// </summary>
		 /// <remarks>4</remarks>
		 [SupportByVersion("OWC10", 1)]
		 chFillGradientTwoColors = 4,

		 /// <summary>
		 /// SupportByVersion OWC10 1
		 /// </summary>
		 /// <remarks>5</remarks>
		 [SupportByVersion("OWC10", 1)]
		 chFillGradientPresetColors = 5,

		 /// <summary>
		 /// SupportByVersion OWC10 1
		 /// </summary>
		 /// <remarks>6</remarks>
		 [SupportByVersion("OWC10", 1)]
		 chFillTexturePreset = 6,

		 /// <summary>
		 /// SupportByVersion OWC10 1
		 /// </summary>
		 /// <remarks>7</remarks>
		 [SupportByVersion("OWC10", 1)]
		 chFillTextureUserDefined = 7
	}
}


text:
@()

<meta name="description=" content="This page calculates the date when two people can start dating according to the "
half your age plus seven" or "divide by 2 plus 7 " rule. ">


text:
package org.wso2.developerstudio.eclipse.artifact.synapse.api.util;

import org.eclipse.osgi.util.NLS;

public class ArtifactConstants extends NLS {
	private static final String BUNDLE_NAME = "org.wso2.developerstudio.eclipse.artifact.synapse.api.util.constants"; //$NON-NLS-1$

	//control IDs
	public static String ID_API_CONTEXT;
	public static String ID_API_NAME;
	public static String ID_API_HOSTNAME;
	public static String ID_API_PORT;
	public static String ID_CREATE_PRJ;
	public static String ID_CREATE_REG_PRJ;
	public static String ID_SAVE_LOCATION;
	public static String ID_SWAGGER_FILE_REGISTRY_LOCATION;
	public static String ID_API_VERSIONTYPE;
	public static String ID_API_VERSION;
	public static String ID_API_PUBLISHSWAGGER;
	public static String ID_API_SWAGGER_FILE;

	//Messages
	public static String ERRMSG_SAVE_LOCATION;
	public static String ERRMSG_API_CONTEXT;
	public static String ERRMSG_API_PORT;
	public static String ERRMSG2_API_CONTEXT;

	//API version types
	public static String API_VERSION_TYPE_NONE;
	public static String API_VERSION_TYPE_CONTEXT;
	public static String API_VERSION_TYPE_URL;

	static {
		// initialize resource bundle
		NLS.initializeMessages(BUNDLE_NAME, ArtifactConstants.class);
	}

	private ArtifactConstants() {
	}
}


text:
using namespace MaxSDK::AssetManagement;

IObjParam *AlembicMeshGeomModifier::ip = NULL;
AlembicMeshGeomModifier *AlembicMeshGeomModifier::editMod = NULL;

static AlembicMeshGeomModifierClassDesc AlembicMeshGeomModifierDesc;
ClassDesc2 *GetAlembicMeshGeomModifierClassDesc()
{
  return &AlembicMeshGeomModifierDesc;
}

//--- Properties block -------------------------------

static const int ALEMBIC_MESH_GEOMETRY_MODIFIER_VERSION = 1;

static ParamBlockDesc2 AlembicMeshGeomModifierParams(
    0, _T(ALEMBIC_MESH_GEOM_MODIFIER_SCRIPTNAME), 0,
    GetAlembicMeshGeomModifierClassDesc(),
    P_AUTO_CONSTRUCT | P_AUTO_UI | P_VERSION,
    ALEMBIC_MESH_GEOMETRY_MODIFIER_VERSION, 0,

    // rollout description
    IDD_ALEMBIC_MESH_GEOM_PARAMS, IDS_ALEMBIC, 0, 0, NULL,

    // params
    AlembicMeshGeomModifier::ID_PATH, _T("path"), TYPE_FILENAME,
    P_RESET_DEFAULT, IDS_PATH, p_default, "", p_ui, TYPE_EDITBOX, IDC_PATH_EDIT,
    p_assetTypeID, kExternalLink, p_end,

    AlembicMeshGeomModifier::ID_IDENTIFIER, _T("identifier"), TYPE_STRING,
    P_RESET_DEFAULT, IDS_IDENTIFIER, p_default, "", p_ui, TYPE_EDITBOX,
    IDC_IDENTIFIER_EDIT, p_end,

    AlembicMeshGeomModifier::ID_TIME, _T("time"), TYPE_FLOAT, P_ANIMATABLE,
    IDS_TIME, p_default, 0.0f, p_range, 0.0f, 1000.0f, p_ui, TYPE_SPINNER,
    EDITTYPE_FLOAT, IDC_TIME_EDIT, IDC_TIME_SPIN, 0.01f, p_end,

    AlembicMeshGeomModifier::ID_GEOALPHA, _T("geoAlpha"), TYPE_FLOAT,
    P_ANIMATABLE, IDS_GEOALPHA, p_default, 1.0f, p_range, 0.0f, 1.0f, p_ui,
    TYPE_SPINNER, EDITTYPE_FLOAT, IDC_GEOALPHA_EDIT, IDC_GEOALPHA_SPIN, 0.1f,
    p_end,

    AlembicMeshGeomModifier::ID_MUTED, _T("muted"), TYPE_BOOL, P_ANIMATABLE,
    IDS_MUTED, p_default, TRUE, p_ui, TYPE_SINGLECHEKBOX, IDC_MUTED_CHECKBOX,
    p_end,

    AlembicMeshGeomModifier::ID_ADDITIVE, _T("additive"), TYPE_BOOL,
    P_ANIMATABLE, IDS_ADDITIVE, p_default, FALSE, p_ui, TYPE_SINGLECHEKBOX,
    IDC_ADDITIVE_CHECKBOX, p_end,

    p_end);

//--- Modifier methods -------------------------------

AlembicMeshGeomModifier::AlembicMeshGeomModifier()
{
  pblock = NULL;
  m_CachedAbcFile = "";

  GetAlembicMeshGeomModifierClassDesc()->MakeAutoParamBlocks(this);
}

AlembicMeshGeomModifier::~AlembicMeshGeomModifier()
{
  delRefArchive(m_CachedAbcFile);
}

RefTargetHandle AlembicMeshGeomModifier::Clone(RemapDir &remap)
{
  AlembicMeshGeomModifier *mod = new AlembicMeshGeomModifier();

  mod->ReplaceReference(0, remap.CloneRef(pblock));

  BaseClone(this, mod, remap);
  return mod;
}

void AlembicMeshGeomModifier::EnumAuxFiles(AssetEnumCallback &nameEnum,
                                           DWORD flags)
{
  if ((flags & FILE_ENUM_CHECK_AWORK1) && TestAFlag(A_WORK1)) {
    return;  // LAM - 4/11/03
  }

  if (!(flags & FILE_ENUM_INACTIVE)) {
    return;  // not needed by renderer
  }

  if (flags & FILE_ENUM_ACCESSOR_INTERFACE) {
    IEnumAuxAssetsCallback *callback =
        static_cast<IEnumAuxAssetsCallback *>(&nameEnum);
    callback->DeclareAsset(AlembicPathAccessor(this));
  }
  // else {
  //	IPathConfigMgr::GetPathConfigMgr()->RecordInputAsset(
  // this->GetParamBlockByID( 0 )->GetAssetUser( GetParamIdByName( this, 0,
  //"path" ), 0 ), nameEnum, flags);
  //}

  ReferenceTarget::EnumAuxFiles(nameEnum, flags);
}

void AlembicMeshGeomModifier::ModifyObject(TimeValue t, ModContext &mc,
                                           ObjectState *os, INode *node)
{
  ESS_CPP_EXCEPTION_REPORTING_START
  ESS_PROFILE_FUNC();

  Interval interval = FOREVER;  // os->obj->ObjectValidity(t);
  // ESS_LOG_INFO( "Interval Start: " << interval.Start() << " End: " <<
  // interval.End() );

  MCHAR const *strPath = NULL;
  this->pblock->GetValue(AlembicMeshGeomModifier::ID_PATH, t, strPath,
                         interval);

  MCHAR const *strIdentifier = NULL;
  this->pblock->GetValue(AlembicMeshGeomModifier::ID_IDENTIFIER, t,
                         strIdentifier, interval);

  float fTime;
  this->pblock->GetValue(AlembicMeshGeomModifier::ID_TIME, t, fTime, interval);

  BOOL bTopology = false;
  BOOL bGeometry = true;

  float fGeoAlpha;
  this->pblock->GetValue(AlembicMeshGeomModifier::ID_GEOALPHA, t, fGeoAlpha,
                         interval);

  BOOL bNormals = false;
  BOOL bUVs = false;

  BOOL bMuted;
  this->pblock->GetValue(AlembicMeshGeomModifier::ID_MUTED, t, bMuted,
                         interval);

  BOOL bAdditive;
  this->pblock->GetValue(AlembicMeshGeomModifier::ID_ADDITIVE, t, bAdditive,
                         interval);

  // ESS_LOG_INFO( "AlembicMeshGeomModifier::ModifyObject strPath: " << strPath
  // << " strIdentifier: " << strIdentifier << " fTime: " << fTime <<
  //	" bTopology: " << bTopology << " bGeometry: " << bGeometry << "
  // bNormals: " << bNormals << " bUVs: " << bUVs << " bMuted: " << bMuted );

  // IParamBlock2* pBlock = this->GetParamBlock(0);
  // if(pBlock){
  //   ESS_LOG_WARNING("ParamBlock: "<<pBlock->GetVersion());
  //}

  if (!bMuted && strPath && strIdentifier) {
    std::string szPath = EC_MCHAR_to_UTF8(strPath);
    std::string szIdentifier = EC_MCHAR_to_UTF8(strIdentifier);

    AbcG::IObject iObj;
    try {
      ESS_PROFILE_SCOPE("getObjectFromArchive");
      iObj = getObjectFromArchive(szPath, szIdentifier);
    }
    catch (std::exception exp) {
      extern bool g_hasModifierErrorOccurred;
      g_hasModifierErrorOccurred = true;
      ESS_LOG_ERROR("Can not open Alembic data stream.  Path: "
                    << szPath << " identifier: " << szIdentifier
                    << " reason: " << exp.what());
      return;
    }

    if (!iObj.valid()) {
      extern bool g_hasModifierErrorOccurred;
      g_hasModifierErrorOccurred = true;
      ESS_LOG_ERROR("Not a valid Alembic data stream.  Path: "
                    << szPath << " identifier: " << szIdentifier);
      return;
    }

    alembic_fillmesh_options options;
    options.fileName = szPath;
    options.pObjectCache = getObjectCacheFromArchive(szPath, szIdentifier);
    options.identifier = szIdentifier;
    options.pIObj = &iObj;
    options.dTicks = GetTimeValueFromSeconds(fTime);
    options.nDataFillFlags = 0;
    options.fVertexAlpha = fGeoAlpha;
    if (bAdditive == TRUE) {
      options.bAdditive = true;
    }
    else {
      options.bAdditive = false;
    }
    if (bTopology) {
      options.nDataFillFlags |= ALEMBIC_DATAFILL_FACELIST;
      options.nDataFillFlags |= ALEMBIC_DATAFILL_MATERIALIDS;
    }
    if (bGeometry) {
      options.nDataFillFlags |= ALEMBIC_DATAFILL_VERTEX;
    }
    if (bNormals) {
      options.nDataFillFlags |= ALEMBIC_DATAFILL_NORMALS;
    }
    if (bUVs) {
      options.nDataFillFlags |= ALEMBIC_DATAFILL_UVS;
    }

    options.pObject = os->obj;

    // Find out if we are modifying a poly object or a tri object
    if (os->obj->ClassID() == Class_ID(POLYOBJ_CLASS_ID, 0)) {
      ESS_PROFILE_SCOPE("reinterpret_cast1");
      PolyObject *pPolyObj = reinterpret_cast<PolyObject *>(os->obj);

      options.pMNMesh = &(pPolyObj->GetMesh());
    }
    else if (os->obj->CanConvertToType(Class_ID(POLYOBJ_CLASS_ID, 0))) {
      ESS_PROFILE_SCOPE("reinterpret_cast2");
      PolyObject *pPolyObj = reinterpret_cast<PolyObject *>(
          os->obj->ConvertToType(t, Class_ID(POLYOBJ_CLASS_ID, 0)));

      options.pMNMesh = &(pPolyObj->GetMesh());

      if (os->obj != pPolyObj) {
        os->obj = pPolyObj;
        os->obj->UnlockObject();
      }
    }
    else {
      ESS_LOG_ERROR(
          "Can not convert internal mesh data into a PolyObject, confused.");
      return;
    }

    try {
      AlembicImport_FillInPolyMesh(options);
    }
    catch (std::exception exp) {
      ESS_LOG_ERROR("Error reading mesh from Alembic data stream.  Path: "
                    << strPath << " identifier: " << strIdentifier
                    << " reason: " << exp.what());
      return;
    }
  }

  // update the validity channel
  if (bTopology) {
    ESS_PROFILE_SCOPE("UpdateValidity_Topology_Geom");
    os->obj->UpdateValidity(TOPO_CHAN_NUM, interval);
    os->obj->UpdateValidity(GEOM_CHAN_NUM, interval);
  }
  if (bGeometry) {
    ESS_PROFILE_SCOPE("UpdateValidity_Geom");
    os->obj->UpdateValidity(GEOM_CHAN_NUM, interval);
  }
  if (bUVs) {
    ESS_PROFILE_SCOPE("UpdateValidity_UV");
    os->obj->UpdateValidity(TEXMAP_CHAN_NUM, interval);
  }

  ESS_CPP_EXCEPTION_REPORTING_END
}
#if (crate_Max_Version >= 2015)
RefResult AlembicMeshGeomModifier::NotifyRefChanged(const Interval &changeInt,
                                                    RefTargetHandle hTarget,
                                                    PartID &partID,
                                                    RefMessage message,
                                                    BOOL propagate)
{
#else
RefResult AlembicMeshGeomModifier::NotifyRefChanged(Interval changeInt,
                                                    RefTargetHandle hTarget,
                                                    PartID &partID,
                                                    RefMessage message)
{
#endif
  ESS_CPP_EXCEPTION_REPORTING_START

  switch (message) {
    case REFMSG_CHANGE:
      if (hTarget == pblock) {
        ParamID changing_param = pblock->LastNotifyParamID();
        switch (changing_param) {
          case ID_PATH: {
            delRefArchive(m_CachedAbcFile);
            MCHAR const *strPath = NULL;
            TimeValue t = GetCOREInterface()->GetTime();
            Interval v;
            pblock->GetValue(AlembicMeshGeomModifier::ID_PATH, t, strPath, v);
            m_CachedAbcFile = EC_MCHAR_to_UTF8(strPath);
            addRefArchive(m_CachedAbcFile);
          } break;
          default:
            break;
        }

        AlembicMeshGeomModifierParams.InvalidateUI(changing_param);
      }
      break;

    case REFMSG_WANT_SHOWPARAMLEVEL:

      break;
  }

  ESS_CPP_EXCEPTION_REPORTING_END

  return REF_SUCCEED;
}

void AlembicMeshGeomModifier::BeginEditParams(IObjParam *ip, ULONG flags,
                                              Animatable *prev)
{
  this->ip = ip;
  editMod = this;

  AlembicMeshGeomModifierDesc.BeginEditParams(ip, this, flags, prev);
}

void AlembicMeshGeomModifier::EndEditParams(IObjParam *ip, ULONG flags,
                                            Animatable *next)
{
  AlembicMeshGeomModifierDesc.EndEditParams(ip, this, flags, next);

  this->ip = NULL;
  editMod = NULL;
}


text:
module Anticuado
  module JavaScript
    class Yarn < Anticuado::Base
      # @return [String] The result of command `yarn outdated`.
      def outdated
        return puts "have no yarn command" if `which yarn`.empty?

        if @project_dir
          Dir.chdir(@project_dir) do
            @outdated_libraries = run_outdated
          end
        else
          @outdated_libraries = run_outdated
        end
        @outdated_libraries
      end

      # @param [String] outdated The result of command `yarn outdated`
      # @return [Array] Array include outdated data.
      #                 If target project have no outdated data, then return blank array such as `[]`
      def format(outdated = nil)
        @outdated_libraries = outdated unless outdated.nil?

        array = @outdated_libraries.split(/\R/).map(&:strip)
        index = array.find_index { |line| line.scan(/Package\s+Current\s+Wanted\s+Latest/) != [] }

        return [] if index.nil?

        @formatted_outdated_libraries = array[index + 1...(array.size - 1)].map do |library|
          versions = library.split(/\s+/) # e.g. ["babel-brunch", "6.0.2", "6.0.6", "6.0.6"]
          {
              library_name: versions[0],
              current_version: versions[1],
              available_version: versions[2],
              latest_version: versions[3]
          }
        end
      end

      private

      def run_outdated
        `yarn install`
        `yarn outdated`
      end
    end # class Yarn
  end # module JavaScript
end # module Anticuado


text:
from __future__ import absolute_import

from bandit.core import config  # noqa
from bandit.core import context  # noqa
from bandit.core import manager  # noqa
from bandit.core import meta_ast  # noqa
from bandit.core import node_visitor  # noqa
from bandit.core import result_store  # noqa
from bandit.core import test_set  # noqa
from bandit.core import tester  # noqa
from bandit.core import utils  # noqa
from bandit.core.constants import *  # noqa
from bandit.core.objects import *  # noqa
from bandit.core.test_properties import *  # noqa


text:
package com.cyphercove.gdx.gdxtokryo.gdxserializers.math;

import com.badlogic.gdx.math.Vector3;
import com.esotericsoftware.kryo.Kryo;
import com.esotericsoftware.kryo.Serializer;
import com.esotericsoftware.kryo.io.Input;
import com.esotericsoftware.kryo.io.Output;

public class Vector3Serializer extends Serializer<Vector3> {
    @Override
    public void write(Kryo kryo, Output output, Vector3 vector3) {
        output.writeFloat(vector3.x);
        output.writeFloat(vector3.y);
        output.writeFloat(vector3.z);
    }

    @Override
    public Vector3 read(Kryo kryo, Input input, Class<Vector3> type) {
        float x = input.readFloat();
        float y = input.readFloat();
        float z = input.readFloat();
        return new Vector3(x, y, z);
    }

    @Override
    public Vector3 copy (Kryo kryo, Vector3 original) {
        return new Vector3(original);
    }
}


text:
/*
 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
 */
package javax.xml.crypto.test.dsig;

import java.io.File;
import java.security.Security;

import javax.xml.crypto.test.KeySelectors;

import static org.junit.jupiter.api.Assertions.assertTrue;

/**
 * This is a testcase to validate the "merlin-xpath-filter2-three" testcases
 * under data/vectors/ie/baltimore/merlin-examples directory
 *
 */
public class BaltimoreXPathFilter2ThreeTest {

    private SignatureValidator validator;

    static {
        Security.insertProviderAt
            (new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI(), 1);
    }

    public BaltimoreXPathFilter2ThreeTest() {
        String fs = System.getProperty("file.separator");
        String base = System.getProperty("basedir") == null ? "./": System.getProperty("basedir");
        base += fs + "src/test/resources"
            + fs + "interop" + fs + "xfilter2";
        validator = new SignatureValidator(new File
            (base, "merlin-xpath-filter2-three"));
    }

    @org.junit.jupiter.api.Test
    public void testSignSpec() throws Exception {
        String file = "sign-spec.xml";

        boolean coreValidity = validator.validate(file,
                    new KeySelectors.KeyValueKeySelector());
        assertTrue(coreValidity, "Signature failed core validation#1");

        coreValidity = validator.validate(file,
                    new KeySelectors.RawX509KeySelector());
        assertTrue(coreValidity, "Signature failed core validation#2");
    }

    @org.junit.jupiter.api.Test
    public void testSignXfdl() throws Exception {
        String file = "sign-xfdl.xml";

        boolean coreValidity = validator.validate(file,
                    new KeySelectors.KeyValueKeySelector());
        assertTrue(coreValidity, "Signature failed core validation#1");

        coreValidity = validator.validate(file,
                    new KeySelectors.RawX509KeySelector());
        assertTrue(coreValidity, "Signature failed core validation#2");
    }

}


text:
<?php
namespace Sonata\Component\Currency;

use Sonata\Component\Currency\CurrencyPriceCalculatorInterface;
use Sonata\Component\Product\ProductInterface;

/**
 * @author Hugo Briand <briand@ekino.com>
 */
class CurrencyPriceCalculator implements CurrencyPriceCalculatorInterface
{
    /**
     * {@inheritdoc}
     */
    public function getPrice(ProductInterface $product, CurrencyInterface $currency)
    {
        return $product->getPrice();
    }
}


text:
package com.effektif.workflow.impl.json.types;

import java.util.Map;

import com.effektif.workflow.impl.json.TypeMapping;
import com.effektif.workflow.impl.util.Reflection;

/**
 * @author Tom Baeyens
 */
public class BeanMapper<T> extends AbstractBeanMapper<T> {

  TypeMapping typeMapping;

  public BeanMapper(TypeMapping typeMapping) {
    super(Reflection.getSimpleName(typeMapping.getType()));
    this.typeMapping = typeMapping;
  }

  @Override
  protected TypeMapping getTypeMapping(Map jsonObject) {
    return typeMapping;
  }

  @Override
  protected TypeMapping getTypeMapping(Class beanClass) {
    return typeMapping;
  }
}


text:
<?php

class Model_Users extends Orm\Model
{
    protected static $_table_name = 'users';
    protected static $_primary_key = array('id');

    protected static $_properties = array(
        'id', // both validation & typing observers will ignore the PK
        'user' => array(
            'data_type' => 'varchar',
            'validation' => array('required'),

        ),
        'email' => array(
            'data_type' => 'varchar',
            'validation' => array('required'),

        ),
        'pass' => array(
            'data_type' => 'varchar',
            'validation' => array('required'),

        )
    );
}


text:
class AddReferencesToArcheologicalSites < ActiveRecord::Migration
  def change
    add_column :archeological_sites, :references, :text
  end
end


text:
#include "precompiled.h"
#include "LayoutBlockBox.h"
#include "LayoutBlockBoxSpace.h"
#include "LayoutEngine.h"
#include "../../Include/Rocket/Core/Element.h"
#include "../../Include/Rocket/Core/ElementUtilities.h"
#include "../../Include/Rocket/Core/ElementScroll.h"
#include "../../Include/Rocket/Core/Property.h"
#include "../../Include/Rocket/Core/StyleSheetKeywords.h"

namespace Rocket {
namespace Core {

// Creates a new block box for rendering a block element.
LayoutBlockBox::LayoutBlockBox(LayoutEngine* _layout_engine, LayoutBlockBox* _parent, Element* _element) : position(0, 0)
{
	space = new LayoutBlockBoxSpace(this);

	layout_engine = _layout_engine;
	parent = _parent;

	context = BLOCK;
	element = _element;
	interrupted_chain = NULL;

	box_cursor = 0;
	vertical_overflow = false;

	// Get our offset root from our parent, if it has one; otherwise, our element is the offset parent.
	if (parent != NULL &&
		parent->offset_root->GetElement() != NULL)
		offset_root = parent->offset_root;
	else
		offset_root = this;

	// Determine the offset parent for this element.
	LayoutBlockBox* self_offset_parent;
	if (parent != NULL &&
		parent->offset_parent->GetElement() != NULL)
		self_offset_parent = parent->offset_parent;
	else
		self_offset_parent = this;

	// Determine the offset parent for our children.
	if (parent != NULL &&
		parent->offset_parent->GetElement() != NULL &&
		(element == NULL || element->GetPosition() == POSITION_STATIC))
		offset_parent = parent->offset_parent;
	else
		offset_parent = this;

	// Build the box for our element, and position it if we can.
	if (parent != NULL)
	{
		space->ImportSpace(*parent->space);

		// Build our box if possible; if not, it will have to be set up manually.
		layout_engine->BuildBox(box, min_height, max_height, parent, element);

		// Position ourselves within our containing block (if we have a valid offset parent).
		if (parent->GetElement() != NULL)
		{
			if (self_offset_parent != this)
			{
				// Get the next position within our offset parent's containing block.
				parent->PositionBlockBox(position, box, element->GetProperty< int >(CLEAR));
				element->SetOffset(position - (self_offset_parent->GetPosition() - offset_root->GetPosition()), self_offset_parent->GetElement());
			}
			else
				element->SetOffset(position, NULL);
		}
	}

	if (element != NULL)
	{
		wrap_content = element->GetWhitespace() != WHITE_SPACE_NOWRAP;

		// Determine if this element should have scrollbars or not, and create them if so.
		element->GetOverflow(&overflow_x_property, &overflow_y_property);

		if (overflow_x_property == OVERFLOW_SCROLL)
			element->GetElementScroll()->EnableScrollbar(ElementScroll::HORIZONTAL, box.GetSize(Box::PADDING).x);
		else
			element->GetElementScroll()->DisableScrollbar(ElementScroll::HORIZONTAL);

		if (overflow_y_property == OVERFLOW_SCROLL)
			element->GetElementScroll()->EnableScrollbar(ElementScroll::VERTICAL, box.GetSize(Box::PADDING).x);
		else
			element->GetElementScroll()->DisableScrollbar(ElementScroll::VERTICAL);
	}
	else
	{
		wrap_content = true;
		overflow_x_property = OVERFLOW_VISIBLE;
		overflow_y_property = OVERFLOW_VISIBLE;
	}
}

// Creates a new block box in an inline context.
LayoutBlockBox::LayoutBlockBox(LayoutEngine* _layout_engine, LayoutBlockBox* _parent) : position(-1, -1)
{
	layout_engine = _layout_engine;
	parent = _parent;
	offset_parent = parent->offset_parent;
	offset_root = parent->offset_root;

	space = _parent->space;

	context = INLINE;
	line_boxes.push_back(new LayoutLineBox(this));
	wrap_content = parent->wrap_content;

	element = NULL;
	interrupted_chain = NULL;

	box_cursor = 0;
	vertical_overflow = false;

	layout_engine->BuildBox(box, min_height, max_height, parent, NULL);
	parent->PositionBlockBox(position, box, 0);
	box.SetContent(Vector2f(box.GetSize(Box::CONTENT).x, -1));

	// Reset the min and max heights; they're not valid for inline block boxes.
	min_height = 0;
	max_height = FLT_MAX;
}

// Releases the block box.
LayoutBlockBox::~LayoutBlockBox()
{
	for (size_t i = 0; i < block_boxes.size(); i++)
		delete block_boxes[i];

	for (size_t i = 0; i < line_boxes.size(); i++)
		delete line_boxes[i];

	if (context == BLOCK)
		delete space;
}

// Closes the box.
LayoutBlockBox::CloseResult LayoutBlockBox::Close()
{
	// If the last child of this block box is an inline box, then we haven't closed it; close it now!
	if (context == BLOCK)
	{
		CloseResult result = CloseInlineBlockBox();
		if (result != OK)
			return LAYOUT_SELF;
	}
	// Otherwise, we're an inline context box; so close our last line, which will still be open.
	else
	{
		line_boxes.back()->Close();

		// Expand our content area if any line boxes had to push themselves out.
		Vector2f content_area = box.GetSize();
		for (size_t i = 0; i < line_boxes.size(); i++)
			content_area.x = Math::Max(content_area.x, line_boxes[i]->GetDimensions().x);

		box.SetContent(content_area);
	}

	// Set this box's height, if necessary.
	if (box.GetSize(Box::CONTENT).y < 0)
	{
		Vector2f content_area = box.GetSize();
		content_area.y = Math::Clamp(box_cursor, min_height, max_height);

		if (element != NULL)
			content_area.y = Math::Max(content_area.y, space->GetDimensions().y);

		box.SetContent(content_area);
	}

	// Set the computed box on the element.
	if (element != NULL)
	{
		if (context == BLOCK)
		{
			// Calculate the dimensions of the box's *internal* content; this is the tightest-fitting box around all of the
			// internal elements, plus this element's padding.
			Vector2f content_box(0, 0);

			for (size_t i = 0; i < block_boxes.size(); i++)
				content_box.x = Math::Max(content_box.x, block_boxes[i]->GetBox().GetSize(Box::MARGIN).x);

			// Check how big our floated area is.
			Vector2f space_box = space->GetDimensions();
			content_box.x = Math::Max(content_box.x, space_box.x);

			// If our content is larger than our window, then we can either extend our box, if we're set to not wrap
			// our inline content, or enable the horizontal scrollbar, if we're set to auto-scrollbars. If we're set to
			// always use scrollbars, then the horiontal scrollbar will already have been enabled in the constructor.
			if (content_box.x > box.GetSize().x)
			{
				if (!wrap_content)
					box.SetContent(Vector2f(content_box.x, box.GetSize().y));
				else if (overflow_x_property == OVERFLOW_AUTO)
				{
					element->GetElementScroll()->EnableScrollbar(ElementScroll::HORIZONTAL, box.GetSize(Box::PADDING).x);

					if (!CatchVerticalOverflow())
						return LAYOUT_SELF;
				}
			}

			content_box.x += (box.GetEdge(Box::PADDING, Box::LEFT) + box.GetEdge(Box::PADDING, Box::RIGHT));

			content_box.y = box_cursor;
			content_box.y = Math::Max(content_box.y, space_box.y);
			if (!CatchVerticalOverflow(content_box.y))
				return LAYOUT_SELF;

			content_box.y += (box.GetEdge(Box::PADDING, Box::TOP) + box.GetEdge(Box::PADDING, Box::BOTTOM));

			element->SetBox(box);
			element->SetContentBox(space->GetOffset(), content_box);

			// Format any scrollbars which were enabled on this element.
			element->GetElementScroll()->FormatScrollbars();
		}
		else
			element->SetBox(box);
	}

	// Increment the parent's cursor.
	if (parent != NULL)
	{
		// If this close fails, it means this block box has caused our parent block box to generate an automatic
		// vertical scrollbar.
		if (!parent->CloseBlockBox(this))
			return LAYOUT_PARENT;
	}

	// If we represent a positioned element, then we can now (as we've been sized) act as the containing block for all
	// the absolutely-positioned elements of our descendants.
	if (context == BLOCK &&
		element != NULL)
	{
		if (element->GetPosition() != POSITION_STATIC)
			CloseAbsoluteElements();
	}

	return OK;
}

// Called by a closing block box child.
bool LayoutBlockBox::CloseBlockBox(LayoutBlockBox* child)
{
	ROCKET_ASSERT(context == BLOCK);
	box_cursor = (child->GetPosition().y - child->box.GetEdge(Box::MARGIN, Box::TOP) - (box.GetPosition().y + position.y)) + child->GetBox().GetSize(Box::MARGIN).y;

	return CatchVerticalOverflow();
}

// Called by a closing line box child.
LayoutInlineBox* LayoutBlockBox::CloseLineBox(LayoutLineBox* child, LayoutInlineBox* overflow, LayoutInlineBox* overflow_chain)
{
	ROCKET_ASSERT(context == INLINE);
	if (child->GetDimensions().x > 0)
		box_cursor = (child->GetPosition().y - (box.GetPosition().y + position.y)) + child->GetDimensions().y;

	// If we have any pending floating elements for our parent, then this would be an ideal time to position them.
	if (!float_elements.empty())
	{
		for (size_t i = 0; i < float_elements.size(); ++i)
			parent->PositionFloat(float_elements[i], box_cursor);

		float_elements.clear();
	}

	// Add a new line box.
	line_boxes.push_back(new LayoutLineBox(this));

	if (overflow_chain != NULL)
		line_boxes.back()->AddChainedBox(overflow_chain);

	if (overflow != NULL)
		return line_boxes.back()->AddBox(overflow);

	return NULL;
}

// Adds a new block element to this block box.
LayoutBlockBox* LayoutBlockBox::AddBlockElement(Element* element)
{
	ROCKET_ASSERT(context == BLOCK);

	// Check if our most previous block box is rendering in an inline context.
	if (!block_boxes.empty() &&
		block_boxes.back()->context == INLINE)
	{
		LayoutBlockBox* inline_block_box = block_boxes.back();
		LayoutInlineBox* open_inline_box = inline_block_box->line_boxes.back()->GetOpenInlineBox();
		if (open_inline_box != NULL)
		{
			// There's an open inline box chain, which means this block element is parented to it. The chain needs to
			// be positioned (if it hasn't already), closed and duplicated after this block box closes. Also, this
			// block needs to be aware of its parentage, so it can correctly compute its relative position. First of
			// all, we need to close the inline box; this will position the last line if necessary, but it will also
			// create a new line in the inline block box; we want this line to be in an inline box after our block
			// element.
			if (inline_block_box->Close() != OK)
				return NULL;

			interrupted_chain = open_inline_box;
		}
		else
		{
			// There are no open inline boxes, so this inline box just needs to be closed.
			if (CloseInlineBlockBox() != OK)
				return NULL;
		}
	}

	block_boxes.push_back(new LayoutBlockBox(layout_engine, this, element));
	return block_boxes.back();
}

// Adds a new inline element to this inline box.
LayoutInlineBox* LayoutBlockBox::AddInlineElement(Element* element, const Box& box)
{
	if (context == BLOCK)
	{
		LayoutInlineBox* inline_box;

		// If we have an open child rendering in an inline context, we can add this element into it.
		if (!block_boxes.empty() &&
			block_boxes.back()->context == INLINE)
			inline_box = block_boxes.back()->AddInlineElement(element, box);

		// No dice! Ah well, nothing for it but to open a new inline context block box.
		else
		{
			block_boxes.push_back(new LayoutBlockBox(layout_engine, this));

			if (interrupted_chain != NULL)
			{
				block_boxes.back()->line_boxes.back()->AddChainedBox(interrupted_chain);
				interrupted_chain = NULL;
			}

			inline_box = block_boxes.back()->AddInlineElement(element, box);
		}

		return inline_box;
	}
	else
	{
		// We're an inline context box, so we'll add this new inline element into our line boxes.
		return line_boxes.back()->AddElement(element, box);
	}
}

// Adds a line-break to this block box.
void LayoutBlockBox::AddBreak()
{
	int line_height = ElementUtilities::GetLineHeight(element);

	// Check for an inline box as our last child; if so, we can simply end its line and bail.
	if (!block_boxes.empty())
	{
		LayoutBlockBox* block_box = block_boxes.back();
		if (block_box->context == INLINE)
		{
			LayoutLineBox* last_line = block_box->line_boxes.back();
			if (last_line->GetDimensions().y < 0)
				block_box->box_cursor += line_height;
			else
				last_line->Close();

			return;
		}
	}

	// No inline box as our last child; no problem, just increment the cursor by the line height of this element.
	box_cursor += line_height;
}

// Adds an element to this block box to be handled as a floating element.
bool LayoutBlockBox::AddFloatElement(Element* element)
{
	// If we have an open inline block box, then we have to position the box a little differently.
	if (!block_boxes.empty() &&
		block_boxes.back()->context == INLINE)
		block_boxes.back()->float_elements.push_back(element);

	// Nope ... just place it!
	else
		PositionFloat(element);

	return true;
}

// Adds an element to this block box to be handled as an absolutely-positioned element.
void LayoutBlockBox::AddAbsoluteElement(Element* element)
{
	ROCKET_ASSERT(context == BLOCK);

	AbsoluteElement absolute_element;
	absolute_element.element = element;

	PositionBox(absolute_element.position, 0);

	// If we have an open inline-context block box as our last child, then the absolute element must appear after it,
	// but not actually close the box.
	if (!block_boxes.empty()
		&& block_boxes.back()->context == INLINE)
	{
		LayoutBlockBox* inline_context_box = block_boxes.back();
		float last_line_height = inline_context_box->line_boxes.back()->GetDimensions().y;

		absolute_element.position.y += (inline_context_box->box_cursor + Math::Max(0.0f, last_line_height));
	}

	// Find the positioned parent for this element.
	LayoutBlockBox* absolute_parent = this;
	while (absolute_parent != absolute_parent->offset_parent)
		absolute_parent = absolute_parent->parent;

	absolute_parent->absolute_elements.push_back(absolute_element);
}

// Lays out, sizes, and positions all absolute elements in this block relative to the containing block.
void LayoutBlockBox::CloseAbsoluteElements()
{
	if (!absolute_elements.empty())
	{
		// The size of the containing box, including the padding. This is used to resolve relative offsets.
		Vector2f containing_block = GetBox().GetSize(Box::PADDING);

		for (size_t i = 0; i < absolute_elements.size(); i++)
		{
			Element* absolute_element = absolute_elements[i].element;
			Vector2f absolute_position = absolute_elements[i].position;
			absolute_position -= position - offset_root->GetPosition();

			// Lay out the element.
			LayoutEngine layout_engine;
			layout_engine.FormatElement(absolute_element, containing_block);

			// Now that the element's box has been built, we can offset the position we determined was appropriate for
			// it by the element's margin. This is necessary because the coordinate system for the box begins at the
			// border, not the margin.
			absolute_position.x += absolute_element->GetBox().GetEdge(Box::MARGIN, Box::LEFT);
			absolute_position.y += absolute_element->GetBox().GetEdge(Box::MARGIN, Box::TOP);

			// Set the offset of the element; the element itself will take care of any RCSS-defined positional offsets.
			absolute_element->SetOffset(absolute_position, element);
		}

		absolute_elements.clear();
	}
}

// Returns the offset from the top-left corner of this box that the next child box will be positioned at.
void LayoutBlockBox::PositionBox(Vector2f& box_position, float top_margin, int clear_property) const
{
	// If our element is establishing a new offset hierarchy, then any children of ours don't inherit our offset.
	box_position = GetPosition();
	box_position += box.GetPosition();
	box_position.y += box_cursor;

	float clear_margin = space->ClearBoxes(box_position.y + top_margin, clear_property) - (box_position.y + top_margin);
	if (clear_margin > 0)
		box_position.y += clear_margin;
	else
	{
		// Check for a collapsing vertical margin.
		if (!block_boxes.empty() &&
			block_boxes.back()->context == BLOCK)
		{
			float bottom_margin = block_boxes.back()->GetBox().GetEdge(Box::MARGIN, Box::BOTTOM);
			box_position.y -= Math::Min(top_margin, bottom_margin);
		}
	}
}

// Returns the offset from the top-left corner of this box's offset element the next child block box, of the given
// dimensions, will be positioned at. This will include the margins on the new block box.
void LayoutBlockBox::PositionBlockBox(Vector2f& box_position, const Box& box, int clear_property) const
{
	PositionBox(box_position, box.GetEdge(Box::MARGIN, Box::TOP), clear_property);
	box_position.x += box.GetEdge(Box::MARGIN, Box::LEFT);
	box_position.y += box.GetEdge(Box::MARGIN, Box::TOP);

	LayoutEngine::Round(box_position);
}

// Returns the offset from the top-left corner of this box for the next line.
void LayoutBlockBox::PositionLineBox(Vector2f& box_position, float& box_width, bool& _wrap_content, const Vector2f& dimensions) const
{
	Vector2f cursor;
	PositionBox(cursor);

	space->PositionBox(box_position, box_width, cursor.y, dimensions);

	// Also, probably shouldn't check for widths when positioning the box?
	_wrap_content = wrap_content;
}

// Returns the block box's element.
Element* LayoutBlockBox::GetElement() const
{
	return element;
}

// Returns the block box's parent.
LayoutBlockBox* LayoutBlockBox::GetParent() const
{
	return parent;
}

// Returns the position of the block box, relative to its parent's content area.
const Vector2f& LayoutBlockBox::GetPosition() const
{
	return position;
}

// Returns the element against which all positions of boxes in the hierarchy are calculated relative to.
LayoutBlockBox* LayoutBlockBox::GetOffsetParent() const
{
	return offset_parent;
}

// Returns the block box against which all positions of boxes in the hierarchy are calculated relative to.
LayoutBlockBox* LayoutBlockBox::GetOffsetRoot() const
{
	return offset_root;
}

// Returns the block box's dimension box.
Box& LayoutBlockBox::GetBox()
{
	return box;
}

// Returns the block box's dimension box.
const Box& LayoutBlockBox::GetBox() const
{
	return box;
}

void* LayoutBlockBox::operator new(size_t size)
{
	void* memory = LayoutEngine::AllocateLayoutChunk(size);
	return memory;
}

void LayoutBlockBox::operator delete(void* chunk)
{
	LayoutEngine::DeallocateLayoutChunk(chunk);
}

// Closes our last block box, if it is an open inline block box.
LayoutBlockBox::CloseResult LayoutBlockBox::CloseInlineBlockBox()
{
	if (!block_boxes.empty() &&
		block_boxes.back()->context == INLINE)
		return block_boxes.back()->Close();

	return OK;
}

// Positions a floating element within this block box.
void LayoutBlockBox::PositionFloat(Element* element, float offset)
{
	Vector2f box_position;
	PositionBox(box_position);

	space->PositionBox(box_position.y + offset, element);
}

// Checks if we have a new vertical overflow on an auto-scrolling element.
bool LayoutBlockBox::CatchVerticalOverflow(float cursor)
{
	if (cursor == -1)
		cursor = box_cursor;

	float box_height = box.GetSize().y;
	if (box_height < 0)
		box_height = max_height;

	// If we're auto-scrolling and our height is fixed, we have to check if this box has exceeded our client height.
	if (!vertical_overflow &&
		box_height >= 0 &&
		overflow_y_property == OVERFLOW_AUTO)
	{
		if (cursor > box_height - element->GetElementScroll()->GetScrollbarSize(ElementScroll::HORIZONTAL))
		{
			vertical_overflow = true;
			element->GetElementScroll()->EnableScrollbar(ElementScroll::VERTICAL, box.GetSize(Box::PADDING).x);

			for (size_t i = 0; i < block_boxes.size(); i++)
				delete block_boxes[i];
			block_boxes.clear();

			delete space;
			space = new LayoutBlockBoxSpace(this);

			box_cursor = 0;
			interrupted_chain = NULL;

			return false;
		}
	}

	return true;
}

}
}


text:
package com.hazelcast.jet.examples.hadoop.cloud;

import com.hazelcast.jet.examples.hadoop.HadoopWordCount;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.mapred.JobConf;

/**
 * Word count example adapted to read from and write to Azure Data Lake Storage
 * using HDFS source and sink.
 *

 * The job reads objects from the given container {@link #FOLDER_NAME} and
 * writes the word count results to a folder inside that folder.
 *

 * To be able to read from and write to Azure Data Lake Storage, HDFS needs
 * {@code hadoop-azure-datalake} as dependency and credentials for the storage
 * account.
 *
 * @see
 * Hadoop Azure Data Lake Support for more information
 */
public class AzureDataLake {

    private static final String ACCOUNT_NAME = "";
    private static final String CLIENT_ID = "";
    private static final String TENANT_ID = "";
    private static final String CLIENT_CREDENTIALS = "";
    private static final String FOLDER_NAME = "jet-azure-data-lake-folder";

    public static void main(String[] args) throws Exception {
        Path inputPath = new Path("adl://" + ACCOUNT_NAME + ".azuredatalakestore.net/" + FOLDER_NAME);
        Path outputPath = new Path("adl://" + ACCOUNT_NAME + ".azuredatalakestore.net/" + FOLDER_NAME + "/results");

        JobConf jobConf = new JobConf();
        jobConf.set("fs.adl.oauth2.access.token.provider.type", "ClientCredential");
        jobConf.set("fs.adl.oauth2.refresh.url", "https://login.microsoftonline.com/" + TENANT_ID + "/oauth2/token");
        jobConf.set("fs.adl.oauth2.client.id", CLIENT_ID);
        jobConf.set("fs.adl.oauth2.credential", CLIENT_CREDENTIALS);

        HadoopWordCount.executeSample(jobConf, inputPath, outputPath);
    }
}


text:
using System.Collections.Generic;

namespace Imagination.Tools.APIDocGenerator
{
    public class DocumentationHeaderSettings
    {
        public string Title { get; set; }
        public string Version { get; set; }
        public string BaseURI { get; set; }
        public string MediaType { get; set; }
        public string RepositoryURI { get; set; }
        public string RepositoryFilesURI { get; set; }
        public string AuthorisationEndpoint { get; set; }
        public string OAuth20Description { get; set; }
        public Dictionary<string, string> Introduction { get; set; }
        public Dictionary<string, string> DefaultStatusDescriptions { get; set; }
        public Dictionary<string, Dictionary<string, string>> PagingFields { get; set; }
    }
}


text:
An utility app for tracking your raids/weekly/nightfall activities and loots.

This tool is intended only for helping Bungie's Destiny players on their weekly tasks. More will come in near future.

Stay tunned Guardians!


text:
React Router Guide
==================

Nesting UI is at the core of React Router. Think about any user
interface you're accustomed to, there is likely some shared UI as you
navigate around the application.

Let's imagine a little app with a dashboard, inbox, and calendar.

```
+---------------------------------------------------------+
| +---------+ +-------+ +--------+                        |
| |Dashboard| | Inbox | |Calendar|      Logged in as Jane |
| +---------+ +-------+ +--------+                        |
+---------------------------------------------------------+
|                                                         |
|                        Dashboard                        |
|                                                         |
|                                                         |
|   +---------------------+    +----------------------+   |
|   |                     |    |                      |   |
|   | +              +    |    +--------->            |   |
|   | |              |    |    |                      |   |
|   | |   +          |    |    +------------->        |   |
|   | |   |    +     |    |    |                      |   |
|   | |   |    |     |    |    |                      |   |
|   +-+---+----+-----+----+    +----------------------+   |
|                                                         |
+---------------------------------------------------------+
```

We have three main screens here with the top section of UI being
persistent.

Without React Router
--------------------

Without this router, you'd share that UI by repeating render code across
your views, probably with a `<Header/>` element:

```js
var Header = React.createClass({
  render: function () {
    return (
      <header>
        <ul>
          <li><a href="/">Dashboard</a></li>
          <li><a href="/inbox">Inbox</a></li>
          <li><a href="/calendar">Calendar</a></li>
        </ul>
        Logged in as Jane
      </header>
    );
  }
});

var DashboardRoute = React.createClass({
  render: function () {
    return (
      <div>
        <Header/>
        <Dashboard/>
      </div>
    );
  }
});

var InboxRoute = React.createClass({
  render: function () {
    return (
      <div>
        <Header/>
        <Inbox/>
      </div>
    );
  }
});

var CalendarRoute = React.createClass({
  render: function () {
    return (
      <div>
        <Header/>
        <Calendar/>
      </div>
    );
  }
});

// Not React Router API
otherRouter.route('/', function () {
  React.render(<DashboardRoute/>, document.body);
});

otherRouter.route('/inbox', function () {
  React.render(<InboxRoute/>, document.body);
});

otherRouter.route('/calendar', function () {
  React.render(<CalendarRoute/>, document.body);
});
```

The three main views' render methods are nearly identical. While one
level of shared UI like this is pretty easy to handle, getting deeper
and deeper adds more complexity.

Other approaches might introduce a lot of `if/else` or `switch/case`
into your app if you pass the route information down through the app
hierarchy via props.

```js
var App = React.createClass({
  render: function () {
    var page;
    switch (this.props.page) {
      case 'dashboard': page = <Dashboard/>; break;
      case 'inbox': page = <InboxRoute/>; break;
      default: page = <Index/>; break;
    }
    return (
      <div>{page}</div>
    );
  }
});
```

React Router embraces the common pattern of shared UI among user
interfaces by nesting the views for you, decreasing boilerplate.

With React Router
-----------------

Here's how it works:

1. You declare your view hierarchy with nested `<Route/>`s and provide
   them with a React element to handle the route when it's active.

2. React Router will match the deepest route against the URL, and then
   activate the entire tree of routes on that branch, nesting all the
   UI.

3. You simply use the `<RouteHandler/>` component and it will render the
   active child route.

```js
var Router = require('react-router'); // or var Router = ReactRouter; in browsers

var DefaultRoute = Router.DefaultRoute;
var Link = Router.Link;
var Route = Router.Route;
var RouteHandler = Router.RouteHandler;

var App = React.createClass({
  render: function () {
    return (
      <div>
        <header>
          <ul>
            <li><Link to="app">Dashboard</Link></li>
            <li><Link to="inbox">Inbox</Link></li>
            <li><Link to="calendar">Calendar</Link></li>
          </ul>
          Logged in as Jane
        </header>

        {/* this is the important part */}
        <RouteHandler/>
      </div>
    );
  }
});

var routes = (
  <Route name="app" path="/" handler={App}>
    <Route name="inbox" handler={Inbox}/>
    <Route name="calendar" handler={Calendar}/>
    <DefaultRoute handler={Dashboard}/>
  </Route>
);

Router.run(routes, function (Handler) {
  React.render(<Handler/>, document.body);
});

```

When the user lands at `/inbox`, the route named `inbox` gets matched so
its parent route, `app`, is also matched. The `run` callback receives
`Handler`, that has all of this match information wrapped up in it.

Rendering `Handler` is really just rendering `App` since it's the highest
matched route handler. Since `inbox` is the active child route,
rendering `<RouteHandler/>` in `App` renders the `Inbox` element.
`<RouteHandler/>` is nearly identical to `{{outlet}}` from Ember or
`<div ng-view/>` from Angular.

When the user navigates to `/calendar`, the same thing happens except
now `Calendar` is the `<RouteHandler/>` in `App`'s render method.

Finally, when the user navigates to the path `/`, `App` is active, and
notices that it has a `DefaultRoute`, so `Dashboard` becomes the new
`<RouteHandler/>`. If a `DefaultRoute` is defined, it will be active
when the parent's route is matched exactly.

Note that we don't need the `<Header/>` element since we don't have to
repeat it anymore. React Router shares that UI for us from one place.

More Nesting
------------

Nesting arbitarily deep UI is not a problem. Consider the `Inbox`
screen: it has a master list of messages on the left, a detail view of
the message on the right, and a toolbar over the top. The toolbar and
list are persistent, meanwhile the message view changes as the user
navigates through the messages.

```
+---------------------------------------------------------------------+
| +---------+ +-------+ +--------+                                    |
| |Dashboard| | Inbox | |Calendar|                  Logged in as Jane |
| +---------+ +-------+ +--------+                                    |
+---------------------------------------------------------------------+
| +---------+ +-------+                              +--------------+ |
| | Compose | | Reply |                              |Inbox Settings| |
| +---------+ +-------+                              +--------------+ |
+-------------------+-------------------------------------------------+
| David Brown       |                                                 |
| Hey, we need to...|                                                 |
|                   |                                                 |
|           12:30pm |                                                 |
+-------------------+                32 Unread Messages               |
| Mary Sweeney      |                                                 |
| I followed up w...|               456 Total Messages                |
|                   |                                                 |
|           12:10pm |                 3 Draft Messages                |
+-------------------+                                                 |
| DeMarcus Jones    |                                                 |
| check this out ...|                                                 |
|                   |                                                 |
|           11:25am |                                                 |
+-------------------+-------------------------------------------------+
```

Let's see how React Router handles this:

```js
var Inbox = React.createClass({
  render: function () {
    return (
      <div>
        <Toolbar/>
        <Messages/>
        <RouteHandler/>
      </div>
    );
  }
});

var routes = (
  <Route handler={App}>

    <Route name="inbox" handler={Inbox}>
      <Route name="message" path=":messageId" handler={Message}/>
      <DefaultRoute handler={InboxStats}/>
    </Route>

    <Route name="calendar" handler={Calendar}/>
    <DefaultRoute handler={Dashboard}/>

  </Route>
);
```

- Inbox now has a `<RouteHandler/>` in its render method,
  exactly like its parent.
- We added child routes to `inbox`; the messages or stats page can now
  render into it.

Nesting a new level of UI does not increase the complexity of your code.
You simply nest some routes and render them with `<RouteHandler/>`.

Dynamic Segments
----------------

When we added the `message` route, we introduced a "dynamic segment" to
the URL. These segments get parsed from the url and are available in
the `run` callback, or from `this.context.router` in a route handler.
Let's see how we can access the params.

Remember our message route looks like this:

```xml
<Route name="message" path=":messageId" handler={Message}/>
```

Lets look at accessing the `messageId` in `Message`.

```js
var Message = React.createClass({
  contextTypes: {
    router: React.PropTypes.func
  },

  render: function () {
    return (
      <div>{this.context.router.getCurrentParams().messageId}</div>
    );
  }
});
```

Assuming the user navigates to `/inbox/123`, `this.context.router.getCurrentParams().messageId` is
going to be `'123'`.

Alternatively, you can pass the param data down through the view
hierarchy from the `run` callback and access the params with
`this.props.params`.

```js
Router.run(routes, function (Handler, state) {
  var params = state.params;
  React.render(<Handler params={params}/>, document.body);
});

// and then pass the params down to every use of `<RouteHandler/>`
<RouteHandler {...this.props}/>

// Inbox ends up looking like this
var Inbox = React.createClass({
  render: function () {
    return (
      <div>
        <Toolbar/>
        <Messages/>
        <RouteHandler {...this.props}/>
      </div>
    );
  }
});

// and Message changes to:
var Message = React.createClass({
  render: function () {
    return (
      <div>{this.props.params.messageId}</div>
    );
  }
});
```

Important Note About Dynamic Segments
-------------------------------------

If you have dynamic segments in your URL, a transition from `/users/123`
to `/users/456` does not call `getInitialState`, `componentWillMount`, `componentWillUnmount` or `componentDidMount`. If you are using those lifecycle hooks to fetch
data and set state, you will also need to implement
`componentWillReceiveProps` on your handler and its stateful children, just like any other
component whose props are changing. This way you can leverage the
performance of the React DOM diff algorithm. Look at the `Contact`
handler [in the `master-detail` example](https://github.com/rackt/react-router/blob/master/examples/master-detail/app.js).

If you would rather force route handlers to re-mount when transitioning between dynamic segments, you can assign a unique key to your route handler component to bypass this optimization:

```js
var App = React.createClass({
   contextTypes: {
    router: React.PropTypes.func
  },

  getHandlerKey: function () {
    var childDepth = 1; // assuming App is top-level route
    var { router } = this.context;
    var key = router.getRoutes()[childDepth].name;
    var id = router.getParams().id;
    if (id) { key += id; }
    return key;
  },

  render: function () {
    return (
      <div>
        <RouteHandler key={this.getHandlerKey()} />
      </div>
    );
  }
});
```

Scrolling
---------

By default, the router will manage the scroll position between route
transitions. When a user clicks "back" or "forward", it will restore
their scroll position. If they visit a new route, it will automatically
scroll the window to the top. You can configure this option with
[Router.create][create].

Bells and Whistles
------------------

### `<Link/>`

The `<Link/>` element allows you to conveniently navigate users around
the application with accessible anchor tags that don't break normal link
functionality like control/command clicking to open in a new tab. Also,
when the route a link references is active, you get the `active` css
class to easily style your UI.

### `<NotFoundRoute/>`

At any level of your UI nesting, you can render a handler if the url
beyond what was matched isn't recognized.

```xml
<Route path="/" handler={App}>
  <Route name="inbox" path="/inbox" handler={Inbox}>
    <!--
      will render inside the `Inbox` UI for any paths not recognized
      after the parent route's path `/inbox/*`
    -->
    <NotFoundRoute handler={InboxNotFound}/>
    <Route name="message" path="/inbox/:messageId" handler={Message}/>
    <DefaultRoute handler={InboxStats}/>
  </Route>
  <Route name="calendar" path="/calendar" handler={Calendar}/>
  <DefaultRoute handler={Dashboard}/>
</Route>
<!-- will catch any route that isn't recognized at all -->
<NotFoundRoute handler={NotFound}/>
```

### `<Redirect/>`

URLs in an app change, so we made it easy to not break the old ones.

```xml
<Route name="message" path="/inbox/:messageId" handler={Message} />
<Redirect from="/messages/:messageId" to="message" />
```

Path Matching
-------------

There's a lot more to be said about path matching, check out the [Path
Matching Guide](path-matching.md).

API Documentation
-----------------

That's the gist of what this router is all about, but there's a lot more
it has to offer. Check out the [API Docs](../api) to learn about
redirecting transitions, query parameters and more.

CommonJS Guide
--------------

In order for the above examples to work in a CommonJS environment you'll need to `require` the following:

```
var Router = require('react-router');
var Route = Router.Route;
var NotFoundRoute = Router.NotFoundRoute;
var DefaultRoute = Router.DefaultRoute;
var Link = Router.Link;
var RouteHandler = Router.RouteHandler;
```


text:
package armdataprotection

import (
	"context"
	"errors"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
	armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
	"net/http"
	"net/url"
	"strings"
)

// RecoveryPointsClient contains the methods for the RecoveryPoints group.
// Don't use this type directly, use NewRecoveryPointsClient() instead.
type RecoveryPointsClient struct {
	host           string
	subscriptionID string
	pl             runtime.Pipeline
}

// NewRecoveryPointsClient creates a new instance of RecoveryPointsClient with the specified values.
// subscriptionID - The subscription Id.
// credential - used to authorize requests. Usually a credential from azidentity.
// options - pass nil to accept the default values.
func NewRecoveryPointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RecoveryPointsClient, error) {
	if options == nil {
		options = &arm.ClientOptions{}
	}
	ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint
	if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok {
		ep = c.Endpoint
	}
	pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options)
	if err != nil {
		return nil, err
	}
	client := &RecoveryPointsClient{
		subscriptionID: subscriptionID,
		host:           ep,
		pl:             pl,
	}
	return client, nil
}

// Get - Gets a Recovery Point using recoveryPointId for a Datasource.
// If the operation fails it returns an *azcore.ResponseError type.
// Generated from API version 2022-04-01
// resourceGroupName - The name of the resource group where the backup vault is present.
// vaultName - The name of the backup vault.
// backupInstanceName - The name of the backup instance
// options - RecoveryPointsClientGetOptions contains the optional parameters for the RecoveryPointsClient.Get method.
func (client *RecoveryPointsClient) Get(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, recoveryPointID string, options *RecoveryPointsClientGetOptions) (RecoveryPointsClientGetResponse, error) {
	req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, recoveryPointID, options)
	if err != nil {
		return RecoveryPointsClientGetResponse{}, err
	}
	resp, err := client.pl.Do(req)
	if err != nil {
		return RecoveryPointsClientGetResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return RecoveryPointsClientGetResponse{}, runtime.NewResponseError(resp)
	}
	return client.getHandleResponse(resp)
}

// getCreateRequest creates the Get request.
func (client *RecoveryPointsClient) getCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, recoveryPointID string, options *RecoveryPointsClientGetOptions) (*policy.Request, error) {
	urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/recoveryPoints/{recoveryPointId}"
	if client.subscriptionID == "" {
		return nil, errors.New("parameter client.subscriptionID cannot be empty")
	}
	urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
	if resourceGroupName == "" {
		return nil, errors.New("parameter resourceGroupName cannot be empty")
	}
	urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
	if vaultName == "" {
		return nil, errors.New("parameter vaultName cannot be empty")
	}
	urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName))
	if backupInstanceName == "" {
		return nil, errors.New("parameter backupInstanceName cannot be empty")
	}
	urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName))
	if recoveryPointID == "" {
		return nil, errors.New("parameter recoveryPointID cannot be empty")
	}
	urlPath = strings.ReplaceAll(urlPath, "{recoveryPointId}", url.PathEscape(recoveryPointID))
	req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath))
	if err != nil {
		return nil, err
	}
	reqQP := req.Raw().URL.Query()
	reqQP.Set("api-version", "2022-04-01")
	req.Raw().URL.RawQuery = reqQP.Encode()
	req.Raw().Header["Accept"] = []string{"application/json"}
	return req, nil
}

// getHandleResponse handles the Get response.
func (client *RecoveryPointsClient) getHandleResponse(resp *http.Response) (RecoveryPointsClientGetResponse, error) {
	result := RecoveryPointsClientGetResponse{}
	if err := runtime.UnmarshalAsJSON(resp, &result.AzureBackupRecoveryPointResource); err != nil {
		return RecoveryPointsClientGetResponse{}, err
	}
	return result, nil
}

// NewListPager - Returns a list of Recovery Points for a DataSource in a vault.
// If the operation fails it returns an *azcore.ResponseError type.
// Generated from API version 2022-04-01
// resourceGroupName - The name of the resource group where the backup vault is present.
// vaultName - The name of the backup vault.
// backupInstanceName - The name of the backup instance
// options - RecoveryPointsClientListOptions contains the optional parameters for the RecoveryPointsClient.List method.
func (client *RecoveryPointsClient) NewListPager(resourceGroupName string, vaultName string, backupInstanceName string, options *RecoveryPointsClientListOptions) *runtime.Pager[RecoveryPointsClientListResponse] {
	return runtime.NewPager(runtime.PagingHandler[RecoveryPointsClientListResponse]{
		More: func(page RecoveryPointsClientListResponse) bool {
			return page.NextLink != nil && len(*page.NextLink) > 0
		},
		Fetcher: func(ctx context.Context, page *RecoveryPointsClientListResponse) (RecoveryPointsClientListResponse, error) {
			var req *policy.Request
			var err error
			if page == nil {
				req, err = client.listCreateRequest(ctx, resourceGroupName, vaultName, backupInstanceName, options)
			} else {
				req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink)
			}
			if err != nil {
				return RecoveryPointsClientListResponse{}, err
			}
			resp, err := client.pl.Do(req)
			if err != nil {
				return RecoveryPointsClientListResponse{}, err
			}
			if !runtime.HasStatusCode(resp, http.StatusOK) {
				return RecoveryPointsClientListResponse{}, runtime.NewResponseError(resp)
			}
			return client.listHandleResponse(resp)
		},
	})
}

// listCreateRequest creates the List request.
func (client *RecoveryPointsClient) listCreateRequest(ctx context.Context, resourceGroupName string, vaultName string, backupInstanceName string, options *RecoveryPointsClientListOptions) (*policy.Request, error) {
	urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/recoveryPoints"
	if client.subscriptionID == "" {
		return nil, errors.New("parameter client.subscriptionID cannot be empty")
	}
	urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
	if resourceGroupName == "" {
		return nil, errors.New("parameter resourceGroupName cannot be empty")
	}
	urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
	if vaultName == "" {
		return nil, errors.New("parameter vaultName cannot be empty")
	}
	urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName))
	if backupInstanceName == "" {
		return nil, errors.New("parameter backupInstanceName cannot be empty")
	}
	urlPath = strings.ReplaceAll(urlPath, "{backupInstanceName}", url.PathEscape(backupInstanceName))
	req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath))
	if err != nil {
		return nil, err
	}
	reqQP := req.Raw().URL.Query()
	reqQP.Set("api-version", "2022-04-01")
	if options != nil && options.Filter != nil {
		reqQP.Set("$filter", *options.Filter)
	}
	if options != nil && options.SkipToken != nil {
		reqQP.Set("$skipToken", *options.SkipToken)
	}
	req.Raw().URL.RawQuery = reqQP.Encode()
	req.Raw().Header["Accept"] = []string{"application/json"}
	return req, nil
}

// listHandleResponse handles the List response.
func (client *RecoveryPointsClient) listHandleResponse(resp *http.Response) (RecoveryPointsClientListResponse, error) {
	result := RecoveryPointsClientListResponse{}
	if err := runtime.UnmarshalAsJSON(resp, &result.AzureBackupRecoveryPointResourceList); err != nil {
		return RecoveryPointsClientListResponse{}, err
	}
	return result, nil
}


text:
var utils = require('../nodejs/utils');

var jshint = {
    src: ['<%= appScriptsPath %>/**/*.js'],
    options: {
        jshintrc: '.jshintrc',
        reporter: require('jshint-stylish')
    }
};

if (utils.isJenkins()) {
    jshint.options.force = true;
    jshint.options.reporter = 'checkstyle';
    jshint.options.reporterOutput = "<%= jsHintXml %>";
}

module.exports = function() {
    return {
        jshint: jshint
    };
};


text:
package jp.gihyo.spark.ch05

// scalastyle:off println
import java.text.SimpleDateFormat

import org.apache.spark.{SparkConf, SparkContext}
import org.apache.spark.rdd.RDD
import org.apache.spark.sql.{SaveMode, SQLContext}
import org.apache.spark.sql.functions._

/**
  * An example code of the basic usage of DataFrame
  *
  * Run with
  * {{{
  * spark-submit --class jp.gihyo.spark.ch05.BasicDataFrameExample \
  *     path/to/gihyo-spark-book-example_2.10-1.0.1.jar
  *     201508_station_data.csv 201508_trip_data.csv
  * }}}
  */
object BasicDataFrameExample {

  def main(args: Array[String]): Unit = {
    if (args.length != 2) {
      new IllegalArgumentException("Invalid arguments")
      System.exit(1)
    }

    val conf = new SparkConf().setAppName("BasicDataFrameExample")
    val sc = new SparkContext(conf)
    val sqlContext = new SQLContext(sc)

    val stationPath = args(0)
    val tripPath = args(1)
    run(sc, sqlContext, stationPath, tripPath)

    sc.stop()
  }

  def run(
    sc: SparkContext,
    sqlContext: SQLContext,
    stationPath: String,
    tripPath: String): Unit = {
    import sqlContext.implicits._

    // Creates a DataFrame for the station data with a case class
    val stationRDD: RDD[(Int, String, Double, Double, Int, String, java.sql.Date)] =
      sc.textFile(stationPath).
        filter(line => !line.contains("station_id")).
        map { line =>
          val dateFormat = new SimpleDateFormat("MM/dd/yyy")

          val elms = line.split(",")
          val id = elms(0).toInt
          val name = elms(1)
          val lat = elms(2).toDouble
          val lon = elms(3).toDouble
          val dockcount = elms(4).toInt
          val landmark = elms(5)
          val parsedInstallation = dateFormat.parse(elms(6))
          val installation = new java.sql.Date(parsedInstallation.getTime)
          (id, name, lat, lon, dockcount, landmark, installation)
        }
    val stationDF = stationRDD.
      map { case (id, name, lat, lon, dockcount, landmark, installation) =>
        Station(id, name, lat, lon, dockcount, landmark, installation)
      }.toDF().cache()

    // Converts a DataFrame to RDD
    val rdd = stationDF.rdd
    // Uses getters of `Row`
    rdd.foreach { row =>
      val id = row.getInt(0)
      val name = row.getString(1)
      println(s"(id, name) = ($id, $name)")
    }
    rdd.foreach(row => println(s"${row.get(1)}"))

    // Shows the schema of the station DataFrame
    stationDF.printSchema()

    val localStation = stationDF.collect()

    // Selects and shows columns
    stationDF.select('id, $"name", stationDF("landmark"), col("dockcount")).show()
    stationDF.select('id, $"name", lit("STATION"), expr("id + 1")).show(5, false)

    // Counts the number of rows
    stationDF.count()
    stationDF.select('landmark).distinct().count()

    // Makes an alias of a column
    stationDF.select('name as "station_name").show(3, false)

    // Filters with a condition
    stationDF.filter('landmark === "San Jose").count()

    // Control flows
    stationDF.select('dockcount,
      when('dockcount >= 20, 2)
        .when('dockcount >= 15, 1)
        .otherwise(0)).show(3)

    // Sorts a DataFrame by columns or expressions
    stationDF.select('name, 'dockcount).orderBy('dockcount).show(5, false)
    stationDF.select('name, 'dockcount).orderBy('dockcount.desc).show(5, false)
    stationDF.select('name, 'lat, 'lon).orderBy('lat, 'lon).show(5, false)
    stationDF.select('name).orderBy(length('name)).show(5)

    // Uses a build-in function
    stationDF.select('name, length('name)).show(3, false)

    // Aggregation and grouping
    stationDF.agg(sum('dockcount)).show()
    stationDF.groupBy('landmark).count.show()
    stationDF.groupBy('landmark).agg(sum('dockcount)).show()
    stationDF.groupBy('landmark).agg(avg('lat), avg('lon)).show()

    // Create a DataFrame for the trip data
    val tripDF = sc.textFile(tripPath).
      filter(line => !line.contains("Trip ID")).
      map(_.split(",")).
      filter(_.size == 11).
      map { elms =>
        val dateFormat = new SimpleDateFormat("MM/dd/yyy HH:mm")

        val id = elms(0).toInt
        val duration = elms(1).toInt
        val startDate = new java.sql.Timestamp(dateFormat.parse(elms(2)).getTime)
        val startStation = elms(3)
        val startTerminal = elms(4).toInt
        val endDate = new java.sql.Timestamp(dateFormat.parse(elms(5)).getTime)
        val endStation = elms(6)
        val endTerminal = elms(7).toInt
        val bikeNum = elms(8).toInt
        val subscriberType = elms(9)
        val zipcode = elms(10)
        Trip(id, duration,
          startDate, startStation, startTerminal,
          endDate, endStation, endTerminal,
          bikeNum, subscriberType, zipcode)
      }.toDF().cache()

    tripDF.printSchema()

    // Joins the trip DataFrame with the station DataFrame
    var start = stationDF.as("start")
    var end = stationDF.as("end")
    start.columns.foreach { col => start = start.withColumnRenamed(col, s"start_${col}") }
    end.columns.foreach { col => end = end.withColumnRenamed(col, s"end_${col}") }
    val joinedTripDF = tripDF.
      join(start, tripDF("startTerminal") === start("start_id"), "inner").
      join(end, tripDF("endTerminal") === end("end_id"), "inner").cache()
    joinedTripDF.select('start_id, 'end_id).show(3)

    // Defines and uses an UDF
    val distance = udf((latA: Double, lonA: Double, latB: Double, lonB: Double) =>
      haversineDistance((latA, lonA), (latB, lonB)))
    joinedTripDF.select(
      'startStation,
      'endStation,
      distance('start_lat, 'start_lon, 'end_lat, 'end_lon) as "dist"
    ).filter('dist > 0.0).show(5, false)

    // Writes a DataFrame as JSON files
    tripDF.write.mode(SaveMode.Overwrite).format("json").save("./path/to/json/")

    // Loads a DataFrame from JSON files
    val df = sqlContext.read.format("json").load("./path/to/json/")

    // Operates a DataFrame with Spark SQL
    tripDF.registerTempTable("trip")
    val numRides = sqlContext.
      sql("SELECT count(id) AS count FROM trip WHERE to_date(startDate) = '2015-01-01'")
    numRides.show(1, false)

    // Registers an UDF on Spark SQL
    sqlContext.udf.register("distance",
      (lat1: Double, lon1: Double, lat2: Double, lon2: Double) =>
        haversineDistance((lat1, lon1), (lat2, lon2)))
    joinedTripDF.registerTempTable("joined_trip")
    val result = sqlContext.
      sql("SELECT " +
        "startTerminal, " +
        "endTerminal, " +
        "distance(start_lat, start_lon, end_lat, end_lon) AS dist " +
        "FROM joined_trip " +
        "WHERE startTerminal != endTerminal")
    result.show(3)

    // Unpersists DataFrames
    stationDF.unpersist()
    tripDF.unpersist()
    joinedTripDF.unpersist()
  }

  /**
    * Calculates a Haversine distance between two points by their latitudes and longitudes
    * SEE ALSO: https://en.wikipedia.org/wiki/Haversine_formula
    *
    * @param pointA Tuple2 of latitude and longitude
    * @param pointB Tuple2 of latitude and longitude
    * @return a Haversine distance
    */
  def haversineDistance(pointA: (Double, Double), pointB: (Double, Double)): Double = {
    val deltaLat = math.toRadians(pointB._1 - pointA._1)
    val deltaLon = math.toRadians(pointB._2 - pointA._2)
    val a = math.pow(
      math.sin(deltaLat / 2), 2) + math.cos(math.toRadians(pointA._1)) *
      math.cos(math.toRadians(pointB._1)) * math.pow(math.sin(deltaLon / 2), 2)
    val greatCircleDistance = 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a))
    6371000 * greatCircleDistance
  }
}

// scalastyle:on println


text:
package com.janeluo.jfinalplus.plugin.tablebind;

public interface INameStyle {

    String name(String className);

}


text:
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models

class Migration(SchemaMigration):

    def forwards(self, orm):

        # Adding model 'LinkType'
        db.create_table('links_linktype', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('title', self.gf('django.db.models.fields.CharField')(max_length=200)),
            ('image', self.gf('django.db.models.fields.files.ImageField')(max_length=100)),
        ))
        db.send_create_signal('links', ['LinkType'])

        # Adding field 'Link.link_type'
        db.add_column('links_link', 'link_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['links.LinkType'], null=True, blank=True), keep_default=False)

    def backwards(self, orm):

        # Deleting model 'LinkType'
        db.delete_table('links_linktype')

        # Deleting field 'Link.link_type'
        db.delete_column('links_link', 'link_type_id')

    models = {
        'contenttypes.contenttype': {
            'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
        },
        'links.link': {
            'Meta': {'object_name': 'Link'},
            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_link'", 'to': "orm['contenttypes.ContentType']"}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'link_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['links.LinkType']", 'null': 'True', 'blank': 'True'}),
            'object_pk': ('django.db.models.fields.TextField', [], {}),
            'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
            'url': ('django.db.models.fields.URLField', [], {'max_length': '200'})
        },
        'links.linktype': {
            'Meta': {'object_name': 'LinkType'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
            'title': ('django.db.models.fields.CharField', [], {'max_length': '200'})
        }
    }

    complete_apps = ['links']


text:
/*
 * ALMA - Atacama Large Millimiter Array (c) European Southern Observatory, 2007
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library; if not, write to the Free Software Foundation, Inc.,
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 */

/**
 * @author  acaproni
 * @version $Id: AlarmPanel.java,v 1.32 2012/11/19 09:48:03 acaproni Exp $
 * @since
 */

package alma.acsplugins.alarmsystem.gui;

import java.awt.BorderLayout;
import java.awt.CardLayout;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JPanel;

import org.omg.CORBA.ORB;

import cern.laser.client.data.Alarm;

import alma.acs.alarmsystem.corbaservice.AlarmServiceUtils;

import alma.acs.logging.AcsLogger;
import alma.acsplugins.alarmsystem.gui.statusline.StatusLine;
import alma.acsplugins.alarmsystem.gui.table.AlarmGUIType;
import alma.acsplugins.alarmsystem.gui.table.AlarmTable;
import alma.acsplugins.alarmsystem.gui.viewcoordination.ViewCoordinator;

import alma.acs.gui.util.threadsupport.EDTExecutor;

/**
 *
 * The panel showing alarms
 *

 * The panel has a different content in the following situations:
 *

 *
The ACS AS is in use
 *
The CERN AS is use but the alarm client is not connected to the alarm service
 *
The CERN AS is use and the alarm client is connected to the alarm service
 *

 *

 * The panel runs in stand alone and inside the OMC. Its interface is not
 * the standard SubsystemPlugin but the more generic OmcPlugin. For that reason
 * we can't use  {@link alma.acs.gui.util.panel.Frame}.
 */
public class AlarmPanel extends JPanel {

	/**
	 * The ORB
	 */
    private ORB orb=null;

    /**
	 * The logger
	 */
    private AcsLogger logger=null;

	/**
	 * The window that shows this panel
	 */
    private JFrame frame=null;

    /**
     * The panel shown when the ACS alarm system is in use.
     *

     * This panel contains a label to inform the user to open jlog instead
     */
    private final AcsAlSysPanel acsASPnl=new AcsAlSysPanel();

    /**
     * The panel shown when the AS is not available even if the CERN
     * AS is in use.
     *

     * This panel is shown at startup until the client connects to the AS.
     * The purpose is to inform the user that the AS is not available but can signal
     * an error if the AS did not start.
     */
    private final AlSysNotAvailPanel alSysNotAvailPnl=new AlSysNotAvailPanel();

    /**
     * The panel shown when the CERN alarm system is in use
     * and the client is connected to the AS
     */
    private final CernAlSysTabbedPane cernPnlTabbedPane = new CernAlSysTabbedPane(this,alSysNotAvailPnl);

    /**
     * The panel shown after initializing the GUI and before {@link #setServices(ORB, AcsLogger)}
     * is executed. In fact until that moment we don't know yet
     * which alarm system will be used so we present to the user a (hopefully) better message.
     */
    private final NoAcsPanel noACSPnl= new NoAcsPanel();

    /**
     * The layout to choose which panel the GUI shows
     */
    private final CardLayout layout = new CardLayout();

    /**
     * The panel showing the a different container for each situation
     */
    private final JPanel panel = new JPanel();

    /**
     * The name (in the layout) of alSysNotAvailPnl
     */
    public static final String alSysNotAvailName="CERN_N/A_pnl";

    /**
     * The name (in the layout) of cernSysPnl
     */
    public static final String cernSysName="CERN_pnl";

    /**
     * The name (in the layout) of acsASPnl
     */
    public static final String acsASName="ACS_pnl";

    /**
     * The name (in the layout) of noACSPnl
     */
    private static final String notInitedYetName="Not_Connected_Yet";

    /**
     * true if the alarm system in use is the ACS implementation
     */
    private boolean isAcsAs;

	/**
	 * Constructor, called when running inside the OMC.
	 */
	public AlarmPanel() {
		super(true);
		initialize();
	}

	/**
	 * Constructor, called when running stand-alone.
	 *
	 * @param frame The window that owns this panel
	 */
	public AlarmPanel(JFrame frame) {
		super(true);
		if (frame==null) {
			throw new IllegalArgumentException("Invalid null frame in constructor");
		}
		this.frame=frame;
		this.frame.setIconImage(new ImageIcon(AlarmGUIType.class.getResource(AlarmGUIType.iconFolder+"flag_red.png")).getImage());
		initialize();
	}

	/**
	 * Init the GUI
	 *
	 */
	private void initialize() {
		panel.setLayout(layout);
		panel.add(alSysNotAvailPnl, alSysNotAvailName);
		panel.add(cernPnlTabbedPane, cernSysName);
		panel.add(acsASPnl, acsASName);
		panel.add(noACSPnl,notInitedYetName);

		// At this stage the alarm system is unavailable  but we do not know yet
		// which is the type of alarm system in use
		panel.setLayout(layout);

		setLayout(new BorderLayout());
		add(panel,BorderLayout.CENTER);

		// This method is executed before setting the ContainerService
		// and so at this stage we do not know if the AS is CERN or ACS
		showPanel(notInitedYetName);
	}

	/**
	 * Connect the Client and listens to the categories.
	 *
	 * The CategoryClient is built only if its reference is null.
	 * Otherwise it means that the client is still trying to connect and the user
	 * restarted the plugin.
	 *
	 * @see SubsystemPlugin
	 */
	public void start() throws Exception {
		// Check if the CS have been set
		if (orb==null || logger==null) {
			throw new Exception("Services not set!");
		}
		cernPnlTabbedPane.setServices(orb, logger);
		cernPnlTabbedPane.start();
	}

	/**
	 * @see SubsystemPlugin
	 */
	public void stop() throws Exception {
		System.out.println("AlarmPanel.stop");
		cernPnlTabbedPane.stop();
	}
	/**
	 * Set the services
	 *
	 * @param orb The ORB
	 * @param logger The logger
	 */
	public void setServices(ORB orb, AcsLogger logger) {
		this.orb=orb;
		this.logger=logger;
		if (orb!=null && logger!=null) {
			// If the orb and the logger are not null, then
			// show the ACS or CERN panel
			if (initAlarmServiceType()) {
				// Show the ACS panel
				if (isAcsAs) {
					showPanel(acsASName);
				}
			} else {
				showPanel(alSysNotAvailName);
			}
		}
	}

	/**
	 * Return true if the panel is running inside OMC
	 *
	 * @see alma.acs.gui.util.panel.IPanel
	 */
	public boolean isOMCPlugin() {
		return frame==null;
	}

	/**
	 * @return true if an attempt to connect is running
	 */
	public boolean isConnecting() {
		return cernPnlTabbedPane.isConnecting();
	}

	/**
	 * Show a message in the status line
	 *
	 * @see StatusLine
	 */
	public void showMessage(String mesg, boolean red) {
		cernPnlTabbedPane.showMessage(mesg, red);
	}

	/**
	 * Show the alarm in the details table
	 *
	 * @param alarm The alarm to show in the details panel;
	 * 				if null the details table is cleared.
	 */
	public void showAlarmDetails(Alarm alarm) {
		cernPnlTabbedPane.showAlarmDetails(alarm);
	}

	/**
	 * Read the type of the alarm system in use.
	 *

	 * If it is not possible to get the type, then we set the alarm type as false because
	 * in that case an error panel is shown.
	 *

	 * If the AS is ACS, the ACS panel is shown.
	 */
	private boolean initAlarmServiceType() {
		if (orb==null || logger==null) {
			throw new IllegalStateException("The ORB/logger are still null!");
		}
		System.out.println("getAlarmServiceType");
		AlarmServiceUtils utils = new AlarmServiceUtils(orb,logger);
		boolean ret=false;
		try {
			ret=utils.getAlarmServiceType();
		} catch (Throwable t) {
			System.err.println("Unable to get the alarm system type: "+t.getMessage());
			t.printStackTrace(System.err);
		}
		isAcsAs=ret;
		return isAcsAs;
	}

	/**
	 * Show the panel with the given name
	 *
	 * @param panelName The not null and not empty
	 * 					name of the panel to show
	 *
	 * @throws IllegalArgumentException panelName is not a valid panel name
	 */
	public void showPanel(final String panelName) {
		if (panelName==null || panelName.isEmpty()) {
			throw new IllegalArgumentException("Invalid name of panel (null or empty name)");
		}
		boolean found=false;
		if (panelName.equals(cernSysName) || panelName.equals(acsASName) || panelName.equals(alSysNotAvailName) || panelName.equals(notInitedYetName)) {
			found=true;
		}
		if (!found) {
			throw new IllegalArgumentException("Panel name "+panelName+" NOT defined");
		}
		EDTExecutor.instance().execute(new Runnable() {
			@Override
			public void run() {
				layout.show(panel, panelName);
			}
		});
	}

	/**
	 * Single ViewCoordinator instance, created on demand.
	 */
	private ViewCoordinator viewCoord;

	public ViewCoordinator getViewCoordinator() {
		if (viewCoord == null) {
			if (cernPnlTabbedPane != null) {
				CernSysPanel cernPnl = cernPnlTabbedPane.getCernSysPanel();
				AlarmTable alarmTable = cernPnl.getAlarmTable();
				viewCoord = new ViewCoordinator(alarmTable);
			}
		}
		return viewCoord;
	}

}


text:
import lowdb from 'lowdb';
// import fileAsync from 'lowdb/lib/file-sync';
import fileSync from 'lowdb/lib/file-sync';
import path from 'path';
import fs from 'fs';

export default (state) => {
  const folder = path.resolve('.', 'store');
  if (!fs.existsSync(folder)) fs.mkdirSync(folder);

  const db = lowdb(`${folder}/${state.file}.json`, { storage: fileSync });
  const defaults = {};
  defaults[state.key] = [];
  db.defaults(defaults).value();
  state.db = db;

  return state;
};


text:
from __future__ import unicode_literals

from django.db import models, migrations

class Migration(migrations.Migration):

    dependencies = [
        ('reports', '0011_remove_reporte_nav'),
    ]

    operations = [
        migrations.AlterField(
            model_name='reporte',
            name='icono',
            field=models.CharField(default=b'', max_length=100, null=True, blank=True),
            preserve_default=True,
        ),
        migrations.AlterField(
            model_name='reporte',
            name='url_django',
            field=models.CharField(default=b'', max_length=100, null=True, blank=True),
            preserve_default=True,
        ),
    ]